/* ================================================================
   Dictionary archive / taxonomy
================================================================ */

.dict-archive {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 16px 80px;
  color: #332a20;
}

.dict-archive__hero {
  margin-bottom: 34px;
  padding: 42px 34px;
  background: linear-gradient(135deg, #fff8ec 0%, #fffdf8 100%);
  border: 1px solid #ead7b8;
  border-radius: 18px;
  box-shadow: 0 14px 35px rgba(107, 72, 28, 0.07);
  text-align: center;
}

.dict-archive__eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 14px;
  padding: 5px 16px;
  border-radius: 999px;
  background: #fff;
  color: #a46a1e;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.dict-archive__title {
  margin: 0 0 12px;
  color: #f80;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.45;
}

.dict-archive__lead {
  margin: 0 auto 24px;
  max-width: 620px;
  color: #645d55;
  font-size: 0.98rem;
  line-height: 1.9;
}

.dict-search {
  display: flex;
  align-items: center;
  max-width: 680px;
  margin: 0 auto;
  padding: 8px;
  background: #fff;
  border: 1px solid #ead7b8;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(107, 72, 28, 0.08);
}

.dict-search__label {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 10px 0 12px;
  color: #332a20;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.dict-search input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 20px;
  border: 0;
  background: transparent;
  color: #332a20;
  font-size: 1rem;
  outline: none;
}

.dict-search button {
  flex: 0 0 auto;
  min-width: 130px;
  height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: #ee8f2b;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.dict-search button:hover {
  background: #df7f1f;
  transform: translateY(-1px);
}

.dict-archive__section {
  margin-bottom: 38px;
}

.dict-archive__section--result {
  padding: 28px;
  background: #fff;
  border: 1px solid #ead7b8;
  border-radius: 14px;
}

.dict-archive__section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  color: #f80;
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.5;
  background: none;
  border: none;
  padding: 0;
}

.dict-archive__section-title .material-icons-round {
  flex: 0 0 auto;
  display: block;
  width: 42px;
  color: #ffbe00;
  font-size: 42px;
  line-height: 1;
  text-align: center;
  -webkit-text-stroke: 2px #f80;
  text-stroke: 2px #f80;
}

.dict-archive__note,
.dict-archive__empty {
  margin: 0;
  color: #746b62;
  font-size: 0.92rem;
  line-height: 1.8;
}

.dict-archive__empty {
  padding: 18px;
  background: #fff8ec;
  border: 1px solid #ead7b8;
  border-radius: 10px;
}

.dict-archive__clear {
  margin: 18px 0 0;
  text-align: right;
  font-size: 0.9rem;
}

.dict-archive__clear a,
.dict-archive__back a {
  color: #c06f19;
  text-decoration: none;
}

.dict-archive__clear a:hover,
.dict-archive__back a:hover {
  text-decoration: underline;
}

.dict-category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.dict-category-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 76px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid #ead7b8;
  border-radius: 14px;
  color: #332a20;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(107, 72, 28, 0.05);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.dict-category-card:hover {
  background: #fff8ec;
  border-color: #ee8f2b;
  box-shadow: 0 12px 26px rgba(107, 72, 28, 0.09);
  transform: translateY(-1px);
  text-decoration: none;
}

.dict-category-card__name {
  font-weight: 700;
  line-height: 1.5;
}

.dict-category-card__count {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff4df;
  color: #9c621b;
  font-size: 0.82rem;
  font-weight: 700;
}

.dict-kana-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dict-kana-nav__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 42px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #ead7b8;
  border-radius: 999px;
  color: #5c421f;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.dict-kana-nav__item:hover,
.dict-kana-nav__item.is-current {
  background: #ee8f2b;
  border-color: #ee8f2b;
  color: #fff;
}

.dict-archive__back {
  margin-bottom: 24px;
  font-size: 0.9rem;
}

.dict-archive__cat-title {
  margin: 0 0 14px;
  padding: 12px 16px;
  background: #fff3e6;
  border-left: 4px solid #ff8800;
  border-radius: 0 8px 8px 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.dict-archive__cat-title a {
  color: #1e1a16;
  text-decoration: none;
}

.dict-archive__cat-title a:hover {
  color: #ff8800;
}

.dict-archive__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dict-archive__list--compact {
  grid-template-columns: repeat(4, 1fr);
}

.dict-archive__item {
  min-width: 0;
}

.dict-archive__item a {
  display: block;
  overflow: hidden;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #e8ddd0;
  border-radius: 999px;
  color: #332a20;
  font-size: 0.9rem;
  line-height: 1.45;
  text-align: center;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.dict-archive__item a:hover {
  background: #fff3e6;
  border-color: #ff8800;
  color: #c06f19;
}

.dict-accordion {
  margin-top: 14px;
  border: 1px solid #ead7b8;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.dict-accordion__item + .dict-accordion__item {
  border-top: 1px solid #ead7b8;
}

.dict-accordion__button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 17px 20px;
  border: 0;
  background: #fff;
  color: #332a20;
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.dict-accordion__button:hover {
  background: #fff8ec;
}

.dict-accordion__button::after {
  content: "";
  width: 9px;
  height: 9px;
  margin-left: 4px;
  border-right: 2px solid #c06f19;
  border-bottom: 2px solid #c06f19;
  transform: rotate(45deg);
  transition: transform 0.15s;
}

.dict-accordion__button[aria-expanded="true"]::after {
  transform: rotate(225deg);
}

.dict-accordion__count {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff4df;
  color: #9c621b;
  font-size: 0.82rem;
}

.dict-accordion__body {
  padding: 0 20px 20px;
}

.dict-accordion__loading {
  padding: 18px;
  background: #fff8ec;
  border-radius: 10px;
  color: #746b62;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .dict-archive {
    padding-right: 12.5px;
    padding-left: 12.5px;
  }

  .dict-archive__hero {
    padding: 32px 18px;
    border-radius: 14px;
  }

  .dict-archive__title {
    font-size: 1.62rem;
  }

  .dict-search {
    display: block;
    padding: 10px;
    border-radius: 18px;
  }

  .dict-search input {
    width: 100%;
    height: 46px;
    padding: 0 12px;
    text-align: center;
  }

  .dict-search__label {
    justify-content: center;
    width: 100%;
    height: auto;
    padding: 6px 0 0;
  }

  .dict-search button {
    width: 100%;
    margin-top: 8px;
  }

  .dict-category-grid {
    grid-template-columns: 1fr;
  }

  .dict-archive__list,
  .dict-archive__list--compact {
    grid-template-columns: repeat(2, 1fr);
  }

  .dict-kana-nav__item {
    min-width: calc((100% - 20px) / 3);
  }
}

@media (max-width: 420px) {
  .dict-archive__list,
  .dict-archive__list--compact {
    grid-template-columns: 1fr;
  }
}
