.theme-dir {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.theme-dir__item {
  --theme-macaron: var(--macaron-1, #d4ebfc);
  --theme-accent: #3d6a94;
  --theme-accent-2: #5898c8;
  --theme-mark-bg: color-mix(in srgb, var(--theme-macaron) 68%, #fff);
  --theme-mark-color: var(--theme-accent);
  border-radius: var(--radius-pill, 12px);
  border: 1px solid color-mix(in srgb, var(--theme-macaron) 52%, rgba(44, 36, 32, 0.1));
  background: var(--theme-macaron);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.theme-dir__item[data-theme="volcano"] {
  --theme-macaron: var(--macaron-6, #ffe8d4);
  --theme-accent: #9a5030;
  --theme-accent-2: #c87848;
}

.theme-dir__item[data-theme="water"] {
  --theme-macaron: var(--macaron-3, #d4f0e4);
  --theme-accent: #3a5c48;
  --theme-accent-2: #489868;
}

.theme-dir__item[data-theme="disaster"] {
  --theme-macaron: var(--macaron-4, #e6daf8);
  --theme-accent: #5a4088;
  --theme-accent-2: #8868b8;
}

.theme-dir__item[data-theme="region"] {
  --theme-macaron: var(--macaron-1, #d4ebfc);
  --theme-accent: #3d6a94;
  --theme-accent-2: #5898c8;
}

.theme-dir__item:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px color-mix(in srgb, var(--theme-macaron) 45%, rgba(44, 36, 32, 0.12));
}

.theme-dir__item.is-open {
  transform: none;
  border-color: color-mix(in srgb, var(--theme-accent) 38%, rgba(44, 36, 32, 0.1));
  box-shadow: 0 3px 12px color-mix(in srgb, var(--theme-macaron) 50%, rgba(44, 36, 32, 0.1));
}

.theme-dir__btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.95rem 1rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: inherit;
  outline-offset: 3px;
  text-decoration: none;
}

a.theme-dir__btn:hover {
  color: inherit;
}

.theme-dir__btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--theme-accent) 55%, white);
}

.theme-dir__mark {
  position: relative;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 14px;
  background: color-mix(in srgb, var(--theme-macaron) 55%, #fff);
  color: var(--theme-mark-color);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 1px 4px rgba(0, 0, 0, 0.04);
}

.theme-dir__icon {
  width: 1.15rem;
  height: 1.15rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-dir__num {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 1.18rem;
  height: 1.18rem;
  min-width: 1.18rem;
  margin-top: 0.08rem;
  padding: 0;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  background: var(--theme-accent);
  box-shadow: 0 1px 4px rgba(44, 36, 32, 0.16);
}

.theme-dir__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.theme-dir__category {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.35;
  color: var(--theme-accent);
}

.theme-dir__head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.theme-dir__kicker {
  margin: 0;
  flex-shrink: 0;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.5;
  color: var(--theme-accent);
}

.theme-dir__head-row .theme-dir__subtitle {
  flex: 1;
  min-width: 8.5rem;
  margin: 0;
}

.theme-dir__subtitle {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.42rem;
  font-size: clamp(0.76rem, 1.7vw, 0.86rem);
  font-weight: 600;
  line-height: 1.5;
  color: color-mix(in srgb, var(--theme-accent) 62%, #4a4a58);
}

.theme-dir__phrase {
  flex: 1;
  min-width: 0;
}

.theme-dir__kw {
  display: inline-block;
  color: color-mix(in srgb, var(--theme-accent) 88%, #2e3348);
  font-weight: 800;
}

.theme-dir__kw::after {
  content: "";
  display: block;
  width: 100%;
  height: 2.5px;
  margin-top: 0.1rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--theme-accent), var(--theme-accent-2));
  opacity: 0.88;
}

/* legacy aliases */
.theme-dir__label {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.35;
  color: var(--theme-accent);
  text-transform: none;
}

.theme-dir__title {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.42rem;
  font-size: clamp(0.76rem, 1.7vw, 0.86rem);
  font-weight: 600;
  line-height: 1.5;
  color: color-mix(in srgb, var(--theme-accent) 62%, #4a4a58);
}

.theme-dir__title::after {
  display: none;
}

.theme-dir__actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.theme-dir__status {
  padding: 0.24rem 0.58rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: 1px solid color-mix(in srgb, var(--theme-macaron) 45%, rgba(44, 36, 32, 0.1));
  background: color-mix(in srgb, var(--theme-macaron) 38%, #fff);
  color: color-mix(in srgb, var(--theme-accent) 72%, #6b6560);
}

.theme-dir__status.is-pending {
  color: #8a6848;
  background: color-mix(in srgb, var(--macaron-5, #fff3c8) 72%, #fff);
  border-color: color-mix(in srgb, var(--macaron-5, #fff3c8) 45%, rgba(44, 36, 32, 0.1));
}

.theme-dir__status.is-ready {
  color: var(--theme-accent);
  background: color-mix(in srgb, var(--theme-macaron) 42%, #fff);
  border-color: color-mix(in srgb, var(--theme-accent) 28%, transparent);
}

.theme-dir__chev {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #8a8498;
  box-shadow: inset 0 0 0 1px rgba(44, 36, 32, 0.05);
  transition: transform 0.22s ease, background 0.18s ease, color 0.18s ease;
}

.theme-dir__item:hover .theme-dir__chev {
  background: rgba(255, 255, 255, 0.98);
  color: var(--theme-accent);
  transform: translateX(2px);
}

.theme-dir__chev svg {
  width: 0.9rem;
  height: 0.9rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-dir__item.is-open .theme-dir__chev {
  transform: rotate(90deg);
}

.theme-dir__item.is-open:hover .theme-dir__chev {
  transform: rotate(90deg);
}

.theme-dir__panel {
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid rgba(44, 36, 32, 0.06);
}

.theme-dir__gallery {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.theme-hero {
  position: relative;
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 16px rgba(44, 36, 32, 0.08);
}

.theme-hero__viewport {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.theme-hero__viewport::-webkit-scrollbar {
  display: none;
}

.theme-hero__slide {
  flex: 0 0 100%;
  min-width: 100%;
  scroll-snap-align: start;
  box-sizing: border-box;
  padding: 0 0.35rem 0.5rem;
}

.theme-hero__slide .theme-dir__figure {
  gap: 0.45rem;
}

.theme-hero__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  cursor: pointer;
  color: #ffffff;
  background: rgba(17, 20, 38, 0.72);
  box-shadow:
    0 6px 20px rgba(10, 14, 30, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1;
  display: grid;
  place-items: center;
  z-index: 3;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition:
    background 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.theme-hero__nav:hover {
  background: rgba(17, 20, 38, 0.88);
  border-color: #ffffff;
  box-shadow:
    0 8px 24px rgba(10, 14, 30, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transform: translateY(-50%) scale(1.06);
}

.theme-hero__nav:active {
  transform: translateY(-50%) scale(0.98);
}

.theme-hero__nav:focus-visible {
  outline: 2px solid rgba(88, 168, 222, 0.95);
  outline-offset: 2px;
}

.theme-hero__nav--prev {
  left: 0.65rem;
}

.theme-hero__nav--next {
  right: 0.65rem;
}

@media (max-width: 720px) {
  .theme-hero__nav {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.5rem;
  }

  .theme-hero__nav--prev {
    left: 0.45rem;
  }

  .theme-hero__nav--next {
    right: 0.45rem;
  }
}

.theme-hero__hint {
  position: absolute;
  right: 0.65rem;
  bottom: 0.55rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  color: rgba(248, 250, 255, 0.92);
  background: rgba(18, 22, 40, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 2;
  pointer-events: none;
}

.theme-dir__figure {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.theme-dir__hotmap {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(44, 36, 32, 0.1);
  background: #fff;
}

.theme-dir__hotmap img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

.theme-dir__hotspots {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.theme-dir__hotspot {
  position: absolute;
  box-sizing: border-box;
  border: 2px solid transparent;
  border-radius: 6px;
  background: rgba(255, 220, 120, 0);
  cursor: pointer;
  pointer-events: auto;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.theme-dir__hotspot:hover,
.theme-dir__hotspot:focus-visible {
  background: rgba(255, 210, 90, 0.28);
  border-color: rgba(200, 120, 40, 0.55);
  box-shadow: 0 0 0 2px rgba(255, 240, 200, 0.5);
  outline: none;
}

.theme-dir__hotspot.is-speaking {
  background: rgba(92, 186, 152, 0.35);
  border-color: rgba(58, 152, 120, 0.75);
  animation: theme-hotspot-pulse 0.9s ease-in-out infinite;
}

@keyframes theme-hotspot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(92, 186, 152, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(92, 186, 152, 0); }
}

.theme-dir__audio-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.15rem;
  font-size: 0.72rem;
  color: #6b6560;
}

.theme-dir__accent-btn {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(44, 36, 32, 0.12);
  background: rgba(255, 255, 255, 0.85);
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  color: #6b6560;
  cursor: pointer;
}

.theme-dir__accent-btn.is-active {
  color: #2e3348;
  border-color: rgba(92, 186, 152, 0.45);
  background: rgba(212, 240, 228, 0.9);
}

.theme-dir__word-tip {
  min-height: 1.1em;
  font-weight: 600;
  color: #3a5c48;
}

.theme-dir__empty {
  margin: 0;
  padding: 0.85rem 0.95rem;
  border-radius: 10px;
  font-size: 0.78rem;
  line-height: 1.55;
  color: #6b6560;
  background: rgba(255, 255, 255, 0.65);
  border: 1px dashed rgba(44, 36, 32, 0.12);
}

.theme-dir__empty code {
  font-size: 0.72rem;
  color: #5c6478;
}

.theme-dir--nested {
  gap: 0.5rem;
}

.vocab-parse-panel .theme-dir__item,
.theme-dir--nested .theme-dir__item {
  border-radius: var(--radius-pill, 12px);
  border-width: 1px;
  border-style: solid;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.vocab-parse-panel .theme-dir__btn,
.theme-dir--nested .theme-dir__btn {
  padding: 0.72rem 0.85rem;
  gap: 0.72rem;
}

.vocab-parse-panel .theme-dir__mark,
.theme-dir--nested .theme-dir__mark {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 12px;
}

@media (max-width: 520px) {
  .theme-dir__btn {
    flex-wrap: wrap;
    gap: 0.65rem 0.85rem;
  }

  .theme-dir__actions {
    margin-left: auto;
  }
}

body.theme-view .theme-index {
  display: none;
}

body.theme-view .back--unit {
  display: none;
}

.theme-detail {
  display: none;
}

body.theme-view .theme-detail {
  display: block;
}

.theme-detail__card {
  border-radius: var(--radius-pill, 12px);
  border: 1px solid color-mix(in srgb, var(--theme-macaron, var(--macaron-1)) 52%, rgba(44, 36, 32, 0.1));
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  padding: 0 1rem 1rem;
}

body.theme-view .theme-detail__card[data-theme="volcano"] {
  --theme-macaron: var(--macaron-6, #ffe8d4);
  background: var(--macaron-6, #ffe8d4);
  border-color: color-mix(in srgb, var(--macaron-6, #ffe8d4) 52%, rgba(44, 36, 32, 0.1));
}

body.theme-view .theme-detail__card[data-theme="water"] {
  --theme-macaron: var(--macaron-3, #d4f0e4);
  background: var(--macaron-3, #d4f0e4);
  border-color: color-mix(in srgb, var(--macaron-3, #d4f0e4) 52%, rgba(44, 36, 32, 0.1));
}

body.theme-view .theme-detail__card[data-theme="disaster"] {
  --theme-macaron: var(--macaron-4, #e6daf8);
  background: var(--macaron-4, #e6daf8);
  border-color: color-mix(in srgb, var(--macaron-4, #e6daf8) 52%, rgba(44, 36, 32, 0.1));
}

body.theme-view .theme-detail__card[data-theme="region"] {
  --theme-macaron: var(--macaron-1, #d4ebfc);
  background: var(--macaron-1, #d4ebfc);
  border-color: color-mix(in srgb, var(--macaron-1, #d4ebfc) 52%, rgba(44, 36, 32, 0.1));
}

#theme-words-mount {
  margin-top: 0.85rem;
  padding: 1rem;
  max-width: 100%;
  overflow: hidden;
  border-radius: 20px;
  background-color: #fff5f8;
  background-image:
    linear-gradient(rgba(252, 228, 236, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(252, 228, 236, 0.35) 1px, transparent 1px);
  background-size: 18px 18px;
}

.theme-words {
  --tw-accent: var(--theme-accent, #9a5030);
  --tw-head-bg: #fce4ec;
  --tw-head-text: #4a4a4a;
  --tw-row-alt: #fdf2f5;
  --tw-word: #1a237e;
  --tw-text: #757575;
  --tw-border: rgba(252, 228, 236, 0.85);
}

.theme-words__head {
  margin-bottom: 0.65rem;
}

.theme-words__head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 1.25rem;
  margin-bottom: 0.35rem;
}

.theme-words__head-row .theme-words__kicker {
  margin: 0;
  flex-shrink: 0;
}

.theme-words__kicker {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--tw-accent, #3d6a94);
  letter-spacing: 0.02em;
}

.theme-words__theme-title {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.42rem;
  flex: 1;
  min-width: 12rem;
  font-size: clamp(0.84rem, 1.8vw, 0.96rem);
  font-weight: 600;
  line-height: 1.5;
  color: color-mix(in srgb, var(--tw-accent, #3d6a94) 62%, #4a4a58);
}

.head__theme-title.theme-words__theme-title {
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  font-weight: 700;
}

.theme-words__theme-num {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 1.18rem;
  height: 1.18rem;
  min-width: 1.18rem;
  margin-top: 0.08rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  background: var(--tw-accent, #3d6a94);
  box-shadow: 0 1px 4px rgba(44, 36, 32, 0.16);
}

.theme-words__theme-phrase {
  flex: 1;
  min-width: 0;
}

.theme-words__theme-kw {
  display: inline-block;
  color: color-mix(in srgb, var(--tw-accent, #3d6a94) 88%, #2e3348);
  font-weight: 800;
}

.theme-words__theme-kw::after {
  content: "";
  display: block;
  width: 100%;
  height: 2.5px;
  margin-top: 0.1rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tw-accent, #3d6a94) 42%, transparent);
}

.theme-detail[data-theme="core"] { --tw-accent: #b8476b; }
.theme-detail[data-theme="volcano"] { --tw-accent: #9a5030; }
.theme-detail[data-theme="water"] { --tw-accent: #3a5c48; }
.theme-detail[data-theme="disaster"] { --tw-accent: #5a4088; }
.theme-detail[data-theme="region"] { --tw-accent: #3d6a94; }

.theme-detail__card--no-gallery {
  display: none;
}

.theme-words__title {
  margin: 0 0 0.2rem;
  font-size: clamp(1.12rem, 2.4vw, 1.28rem);
  font-weight: 800;
  color: #4a4a4a;
  letter-spacing: 0.03em;
}

.theme-words__subtitle {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: #888888;
}

.theme-words__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
}

.theme-words__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.theme-words__filter-wrap {
  position: relative;
}

.theme-words__cloze-wrap {
  position: relative;
}

.theme-words__autoplay-wrap {
  position: relative;
}

.theme-words__tool-btn {
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  padding: 0.36rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.theme-words__tool-btn:hover {
  transform: translateY(-1px);
}

.theme-words__tool-btn.is-active {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.theme-words__tool-btn--filter {
  color: #3a5c48;
  background: #d4f0e4;
}

.theme-words__tool-btn--filter.is-active {
  color: #2e4a3a;
  background: #c4e8d8;
}

.theme-words__tool-btn--dict {
  color: #9a4060;
  background: #fde4ec;
}

.theme-words__tool-btn--dict.is-active {
  color: #8a3050;
  background: #f8c8d8;
}

.theme-words__tool-btn--cloze {
  color: #5a4088;
  background: #e8daf8;
}

.theme-words__tool-btn--cloze.is-active {
  color: #4a3078;
  background: #dcc8f0;
}

.theme-words__tool-btn--autoplay {
  color: #006874;
  background: #d4ebfc;
}

.theme-words__tool-btn--autoplay.is-active {
  color: #005a64;
  background: #bfe0f8;
}

.theme-words__tool-btn--print {
  color: #e65100;
  background: #fff3e0;
}

.theme-words__tool-btn--ipa {
  color: #3d5088;
  background: #e8eaf6;
}

.theme-words__tool-btn--ipa.is-active {
  color: #1a237e;
  background: #c5cae9;
}

.theme-words__play-icon {
  display: inline-block;
  width: 0;
  height: 0;
  margin-right: 0.35rem;
  vertical-align: middle;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid currentColor;
}

.theme-words__filter-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  z-index: 5;
  min-width: 7.5rem;
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid rgba(252, 228, 236, 0.95);
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(44, 36, 32, 0.1);
}

.theme-words__filter-menu[hidden] {
  display: none;
}

.theme-words__filter-opt {
  display: block;
  width: 100%;
  border: none;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  text-align: left;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: #666666;
  background: transparent;
  cursor: pointer;
}

.theme-words__filter-opt:hover,
.theme-words__filter-opt.is-active {
  color: #3a5c48;
  background: #eef8f2;
}

.theme-words__cloze-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  z-index: 5;
  min-width: 8.5rem;
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid rgba(209, 227, 255, 0.95);
  background: #f3f8ff;
  box-shadow: 0 8px 24px rgba(44, 36, 32, 0.1);
}

.theme-words__cloze-menu[hidden] {
  display: none;
}

.theme-words__cloze-opt {
  display: block;
  width: 100%;
  border: none;
  padding: 0.48rem 0.7rem;
  border-radius: 8px;
  text-align: left;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: #3d5088;
  background: transparent;
  cursor: pointer;
}

.theme-words__cloze-opt:hover,
.theme-words__cloze-opt.is-active {
  color: #1a237e;
  background: #e3efff;
}

.theme-words__autoplay-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 5;
  min-width: 9.5rem;
  padding: 0.35rem 0;
  margin: 0;
  list-style: none;
  border-radius: 12px;
  border: 1px solid rgba(209, 227, 255, 0.95);
  background: #f3f8ff;
  box-shadow: 0 8px 24px rgba(44, 36, 32, 0.1);
}

.theme-words__autoplay-menu[hidden] {
  display: none;
}

.theme-words__autoplay-menu li {
  margin: 0;
  padding: 0;
}

.theme-words__autoplay-opt {
  display: block;
  width: 100%;
  border: none;
  padding: 0.45rem 0.85rem;
  text-align: left;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: #006874;
  background: transparent;
  cursor: pointer;
}

.theme-words__autoplay-opt:hover {
  background: #e3f2fd;
}

.theme-words__accent {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.theme-words__accent-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b6560;
}

.theme-words__accent-btn,
.theme-words__dict-btn {
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  padding: 0.36rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #4a4a4a;
  background: #d1e3ff;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.theme-words__accent-btn.is-active {
  color: #0d47a1;
  border-color: rgba(13, 71, 161, 0.12);
  background: #d1e3ff;
  box-shadow: inset 0 0 0 1px rgba(13, 71, 161, 0.08);
}

.theme-words__progress {
  margin: 0 0 0 auto;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--tw-text);
}

.theme-words__progress strong {
  color: #e65100;
}

.theme-words__star-legend {
  margin-bottom: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--tw-border);
  background: rgba(255, 255, 255, 0.72);
}

.theme-words__star-legend-title {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #888888;
}

.theme-words__star-legend-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
}

.theme-words__star-legend-item {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  min-width: min(100%, 12rem);
}

.theme-words__star-legend-stars {
  display: inline-flex;
  gap: 0.04rem;
  flex-shrink: 0;
  padding-top: 0.08rem;
}

.theme-words__star-legend-stars .theme-words__diff-star {
  font-size: 0.72rem;
}

.theme-words__star-legend-text {
  font-size: 0.76rem;
  font-weight: 600;
  color: #757575;
  line-height: 1.4;
}

.theme-words__scroll {
  overflow-x: auto;
  overflow-y: visible;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border-radius: 16px;
  border: 1px solid var(--tw-border);
  background: #ffffff;
  box-shadow: 0 8px 28px rgba(252, 180, 200, 0.12);
}

.theme-words__table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 1rem;
  line-height: 1.7;
}

.theme-words--compact .theme-words__table {
  min-width: 680px;
}

.theme-words--compact .theme-words__table col.col-word { width: 18%; }
.theme-words--compact .theme-words__table col.col-ipa { width: 16%; }
.theme-words--compact .theme-words__table col.col-pos { width: 30%; }
.theme-words--compact .theme-words__table col.col-meta { width: 22%; }
.theme-words--compact .theme-words__table col.col-action { width: 10%; }

.theme-words__table col.col-word { width: 11%; }
.theme-words__table col.col-ipa { width: 8%; }
.theme-words__table col.col-pos { width: 11%; }
.theme-words__table col.col-phrases { width: 18%; }
.theme-words__table col.col-example { width: 24%; }
.theme-words__table col.col-note { width: 20%; }
.theme-words__table col.col-meta { width: 8%; }

.theme-words__table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 1.05rem 1rem;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--tw-head-text);
  background: var(--tw-head-bg);
  border-bottom: 1px solid rgba(244, 143, 177, 0.18);
  border-left: none;
  border-right: none;
}

.theme-words__th-ipa {
  white-space: nowrap;
}

.theme-words--hide-ipa col.col-ipa,
.theme-words--hide-ipa .theme-words__th-ipa,
.theme-words--hide-ipa .theme-words__cell--ipa {
  display: none;
}

.theme-words--hide-ipa.theme-words--compact .theme-words__table col.col-word {
  width: 20%;
}

.theme-words--hide-ipa.theme-words--compact .theme-words__table col.col-pos {
  width: 46%;
}

.theme-words--hide-ipa.theme-words--compact .theme-words__table col.col-meta {
  width: 24%;
}

.theme-words--hide-ipa.theme-words--compact .theme-words__table col.col-action {
  width: 10%;
}

.theme-words--hide-ipa.theme-words--compact .theme-words__table {
  min-width: 620px;
}

.theme-words__table tbody tr.theme-words__row {
  transition: background 0.15s ease, box-shadow 0.18s ease;
}

.theme-words__table tbody tr.theme-words__row:nth-child(4n + 1) {
  background: #ffffff;
}

.theme-words__table tbody tr.theme-words__row:nth-child(4n + 3) {
  background: var(--tw-row-alt);
}

.theme-words__table tbody tr.theme-words__row.is-expanded {
  background: #fff9fb;
  box-shadow: inset 0 -1px 0 rgba(244, 143, 177, 0.12);
}

.theme-words__table tbody tr.theme-words__row.is-known {
  box-shadow: inset 3px 0 0 rgba(230, 126, 34, 0.55);
}

.theme-words__table tbody tr.theme-words__row.is-fuzzy {
  box-shadow: inset 3px 0 0 rgba(13, 71, 161, 0.35);
}

.theme-words__table tbody tr.theme-words__row.is-forgot {
  box-shadow: inset 3px 0 0 rgba(216, 128, 140, 0.4);
}

.theme-words__table tbody tr.theme-words__row.is-correct {
  animation: theme-words-flash-ok 0.45s ease;
}

.theme-words__table tbody tr.theme-words__row.is-wrong {
  animation: theme-words-flash-bad 0.45s ease;
}

.theme-words__cell {
  vertical-align: top;
  padding: 1.1rem 1rem;
  border-bottom: none;
  border-left: none;
  border-right: none;
  color: var(--tw-text);
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: normal;
}

.theme-words__cell--word {
  min-width: 7rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--tw-word);
}

.theme-words__speak {
  border: none;
  padding: 0;
  background: none;
  font: inherit;
  font-size: inherit;
  font-weight: 700;
  color: var(--tw-word);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}

.theme-words__speak:hover {
  color: #0d47a1;
}

.theme-words__dict-input {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.28rem 0.5rem;
  border: none;
  border-radius: 0;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--tw-word);
  background: transparent;
  opacity: 0;
  caret-color: var(--tw-word);
  overflow-x: auto;
  white-space: nowrap;
}

.theme-words__dict-input::placeholder {
  color: rgba(107, 101, 96, 0.55);
  font-weight: 500;
}

.theme-words__write {
  display: none;
  position: relative;
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(120, 110, 100, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  overflow: hidden;
  transition: background 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.theme-words__mx-panel {
  position: relative;
  width: 100%;
  height: 2.65rem;
}

.theme-words--dictation .theme-words__write {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  height: auto;
  overflow: visible;
  padding-bottom: 0.04rem;
}

.theme-words--dictation .theme-words__mx-panel {
  height: 1.85rem;
}

.theme-words__dict-result {
  min-height: 1.35rem;
  padding: 0 0.15rem 0.05rem;
}

.theme-words__dict-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  border-radius: 999px;
  padding: 0.24rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.theme-words__dict-badge--ok {
  background: linear-gradient(160deg, #348a52, #256b3d);
  color: #f4fff7;
  border-color: rgba(255, 255, 255, 0.45);
}

.theme-words__dict-badge--bad {
  background: linear-gradient(160deg, #d94a4a, #9b2828);
  color: #fff8f7;
  border-color: rgba(255, 255, 255, 0.45);
}

.theme-words__write:focus-within {
  border-color: rgba(92, 186, 152, 0.55);
  box-shadow: 0 0 0 2px rgba(92, 186, 152, 0.12);
}

.theme-words__write.is-correct {
  border-color: rgba(72, 168, 120, 0.75);
  background: rgba(212, 240, 228, 0.72);
  box-shadow: 0 0 0 2px rgba(92, 186, 152, 0.38);
}

.theme-words__write.is-wrong {
  border-color: rgba(210, 110, 110, 0.75);
  background: rgba(255, 228, 228, 0.78);
  box-shadow: 0 0 0 2px rgba(224, 120, 120, 0.38);
}

.theme-words__write.is-near {
  border-color: rgba(215, 162, 72, 0.78);
  background: rgba(255, 245, 220, 0.86);
  box-shadow: 0 0 0 2px rgba(236, 186, 88, 0.35);
}

.theme-words__write.is-correct .theme-words__ink {
  opacity: 0.35;
}

.theme-words__ink {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
  z-index: 1;
}

.theme-words__write.has-ink .theme-words__dict-input:not(:focus) {
  pointer-events: none;
}

.theme-words__dict-input:focus,
.theme-words__dict-input:not(:placeholder-shown),
.theme-words__dict-input[data-dict-checked="1"] {
  outline: none;
  opacity: 1;
  background: rgba(255, 255, 255, 0.88);
}

.theme-words__dict-input.theme-words__dict-input--ok {
  border: 1px solid #2d8a4e;
  background: #e8f5ec;
  color: #174a2a;
  box-shadow: 0 0 0 2px rgba(45, 138, 78, 0.22);
}

.theme-words__dict-input.theme-words__dict-input--bad {
  border: 1px solid #c73e3e;
  background: #fdecea;
  color: #5c1f1f;
  box-shadow: 0 0 0 2px rgba(199, 62, 62, 0.2);
}

.theme-words__dict-input.theme-words__dict-input--ok:focus {
  border-color: #257a44;
  box-shadow: 0 0 0 2px rgba(45, 138, 78, 0.28);
}

.theme-words__dict-input.theme-words__dict-input--bad:focus {
  border-color: #b33535;
  box-shadow: 0 0 0 2px rgba(199, 62, 62, 0.28);
}

.theme-words__word-wrap {
  width: 100%;
  min-width: 0;
}

.theme-words--dictation .theme-words__cell--word {
  overflow: visible;
}

.theme-words--dictation .theme-words__speak {
  display: none !important;
}

.theme-words--dictation .theme-words__word-wrap {
  display: block;
  width: 100%;
  min-width: 0;
}

.theme-words--dictation .theme-words__write {
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
}

.theme-words--dictation .theme-words__dict-input {
  display: block;
  position: relative;
  inset: auto;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  width: 100%;
  height: auto;
  min-height: 1.45rem;
  opacity: 1;
  background: rgba(255, 255, 255, 0.92);
  pointer-events: auto;
  font-size: 0.86rem;
  padding: 0.18rem 0.42rem;
  line-height: 1.3;
  box-sizing: border-box;
}

.theme-words--dictation .theme-words__dict-input.theme-words__dict-input--ok {
  background: #e8f5ec;
  color: #174a2a;
}

.theme-words--dictation .theme-words__dict-input.theme-words__dict-input--bad {
  background: #fdecea;
  color: #5c1f1f;
}

.theme-words--dictation .theme-words__dict-result {
  display: block;
  min-height: 0;
  padding: 0;
}

.theme-words--dictation .theme-words__dict-result:empty {
  display: none;
}

.theme-words__write.is-correct .theme-words__dict-input,
.theme-words__write.is-wrong .theme-words__dict-input,
.theme-words__write.is-near .theme-words__dict-input,
.theme-words__dict-input[data-dict-checked="1"] {
  opacity: 1;
  pointer-events: auto;
}

.theme-words--dictation.theme-words--hide-ipa.theme-words--compact .theme-words__table col.col-word {
  width: 34%;
}

.theme-words--dictation.theme-words--hide-ipa.theme-words--compact .theme-words__table col.col-pos {
  width: 32%;
}

.theme-words--dictation.theme-words--hide-ipa.theme-words--compact .theme-words__table col.col-meta {
  width: 20%;
}

.theme-words--dictation.theme-words--hide-ipa.theme-words--compact .theme-words__table col.col-action {
  width: 14%;
}

.theme-words__cell--ipa {
  color: var(--tw-text);
  font-size: 0.95rem;
  white-space: nowrap;
  word-wrap: normal;
  overflow-wrap: normal;
  min-width: 6.5rem;
}

.theme-words__cell--pos {
  min-width: 10.5rem;
}

.theme-words__cell--pos strong {
  color: var(--tw-text);
  font-weight: 400;
}

.theme-words__pos-extra {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.95rem;
  color: var(--tw-text);
}

.theme-words__phrases {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.theme-words__phrases li {
  margin-bottom: 0.35rem;
  line-height: 1.6;
  color: var(--tw-text);
}

.theme-words__cell--example p {
  margin: 0;
  color: var(--tw-text);
}

.theme-words__ex-zh {
  margin: 0.35rem 0 0;
  color: #999999;
  font-size: 0.92rem;
}

.theme-words__cell--note {
  color: var(--tw-text);
  font-size: 0.82rem;
  line-height: 1.65;
}

.theme-words__cell--meta {
  min-width: 5.5rem;
}

.theme-words__cell--action {
  text-align: center;
  vertical-align: middle;
  padding-left: 0.35rem;
  padding-right: 0.65rem;
}

.theme-words__expand {
  font-family: inherit;
  cursor: pointer;
  border: 1px solid rgba(244, 143, 177, 0.35);
  padding: 0.38rem 0.82rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #9a4060;
  background: #fde4ec;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.theme-words__expand:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(244, 143, 177, 0.2);
}

.theme-words__expand.is-open {
  color: #ffffff;
  background: #f48fb1;
  border-color: transparent;
}

.theme-words__detail-row[hidden] {
  display: none;
}

.theme-words__detail-cell {
  padding: 0 0.85rem 1rem;
  border-bottom: none;
}

.theme-words__detail {
  padding: 0.15rem 0 0.35rem 0.75rem;
  border-left: 3px solid rgba(244, 143, 177, 0.45);
}

.theme-words__detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.theme-words__detail-card {
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(252, 228, 236, 0.9);
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(252, 180, 200, 0.08);
}

.theme-words__detail-card--phrases {
  background: linear-gradient(180deg, #f3f8ff 0%, #ffffff 100%);
  border-color: rgba(209, 227, 255, 0.9);
}

.theme-words__detail-card--example {
  background: linear-gradient(180deg, #f8f3ff 0%, #ffffff 100%);
  border-color: rgba(232, 218, 248, 0.9);
}

.theme-words__detail-card--note {
  background: linear-gradient(180deg, #fff8f0 0%, #ffffff 100%);
  border-color: rgba(255, 243, 224, 0.95);
}

.theme-words__detail-label {
  margin: 0 0 0.55rem;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #666666;
}

.theme-words__detail-card--phrases .theme-words__detail-label {
  color: #0d47a1;
}

.theme-words__detail-card--example .theme-words__detail-label {
  color: #5a4088;
}

.theme-words__example-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
}

.theme-words__example-head .theme-words__detail-label {
  margin: 0;
}

.theme-words__example-speak {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  padding: 0.28rem 0.62rem;
  border: 1px solid rgba(90, 64, 136, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: #5a4088;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.theme-words__example-speak:hover {
  background: #f3ebff;
  border-color: rgba(90, 64, 136, 0.45);
  color: #452e70;
}

.theme-words__example-speak.is-speaking {
  background: #ede4fb;
  border-color: rgba(90, 64, 136, 0.55);
  color: #452e70;
}

.theme-words__example-speak .theme-words__play-icon {
  width: 0.72rem;
  height: 0.72rem;
}

.theme-words__detail-card--note .theme-words__detail-label {
  color: #e65100;
}

.theme-words__detail-en {
  margin: 0;
  color: #444444;
  font-size: 0.98rem;
  line-height: 1.7;
}

.theme-words__detail-note {
  margin: 0;
  color: #555555;
  font-size: 0.95rem;
  line-height: 1.75;
}

.theme-words__detail-card .theme-words__phrases li {
  position: relative;
  padding-left: 0.85rem;
  margin-bottom: 0.42rem;
}

.theme-words__detail-card .theme-words__phrases li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.32rem;
  height: 0.32rem;
  border-radius: 50%;
  background: rgba(13, 71, 161, 0.35);
}

.theme-words__detail-card .theme-words__ex-zh {
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px dashed rgba(90, 64, 136, 0.15);
}

.theme-words__diff {
  display: flex;
  gap: 0.08rem;
  margin-bottom: 0.45rem;
}

.theme-words__diff-star {
  color: rgba(117, 117, 117, 0.25);
  font-size: 0.95rem;
  line-height: 1;
}

.theme-words__diff-star.is-on {
  color: #ffb74d;
}

.theme-words__status {
  width: 100%;
  max-width: 6.2rem;
  padding: 0.32rem 0.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  background: #d1e3ff;
  color: #0d47a1;
  cursor: pointer;
}

.theme-words__status--known {
  color: #e65100;
  background: #fff3e0;
  border-color: rgba(230, 126, 34, 0.18);
}

.theme-words__status--fuzzy {
  color: #0d47a1;
  background: #d1e3ff;
  border-color: rgba(13, 71, 161, 0.12);
}

.theme-words__status--forgot {
  color: #9a4060;
  background: #fde4ec;
  border-color: rgba(154, 64, 96, 0.14);
}

.theme-words__table tbody tr.theme-words__row.is-playing {
  background: #fff8e8;
  box-shadow: inset 3px 0 0 rgba(0, 104, 116, 0.45);
}

.theme-words--cloze-meaning .theme-words__cell--pos {
  position: relative;
  cursor: pointer;
  color: transparent;
  user-select: none;
}

.theme-words--cloze-meaning .theme-words__cell--pos strong,
.theme-words--cloze-meaning .theme-words__cell--pos .theme-words__pos-extra {
  visibility: hidden;
}

.theme-words--cloze-meaning .theme-words__cell--pos::after {
  content: "点击查看释义";
  color: #b0a0a8;
  font-size: 0.92rem;
  font-weight: 600;
}

.theme-words--cloze-meaning .theme-words__cell--pos.is-revealed {
  color: var(--tw-text);
  cursor: default;
}

.theme-words--cloze-meaning .theme-words__cell--pos.is-revealed strong,
.theme-words--cloze-meaning .theme-words__cell--pos.is-revealed .theme-words__pos-extra {
  visibility: visible;
}

.theme-words--cloze-meaning .theme-words__cell--pos.is-revealed::after {
  content: none;
}

.theme-words--cloze-word .theme-words__cell--word {
  position: relative;
  cursor: pointer;
}

.theme-words--cloze-word .theme-words__cell--word:not(.is-revealed) .theme-words__speak {
  visibility: hidden;
  position: absolute;
  pointer-events: none;
}

.theme-words--cloze-word .theme-words__cell--word:not(.is-revealed)::after {
  content: "点击查看单词";
  color: #b0a0a8;
  font-size: 0.92rem;
  font-weight: 600;
}

.theme-words--cloze-word .theme-words__cell--word.is-revealed {
  cursor: default;
}

.theme-words--cloze-word .theme-words__cell--word.is-revealed .theme-words__speak {
  visibility: visible;
  position: static;
  pointer-events: auto;
}

.theme-words--cloze-word .theme-words__cell--word.is-revealed::after {
  content: none;
}

.theme-words--dictation .theme-words__hide-dict {
  opacity: 0.28;
  pointer-events: none;
}

@media print {
  body * {
    visibility: hidden;
  }

  .theme-words,
  .theme-words * {
    visibility: visible;
  }

  .theme-words {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }

  #theme-words-mount {
    padding: 0;
    background: none;
  }

  .theme-words__toolbar,
  .theme-words__cell--action,
  .theme-words__expand {
    display: none !important;
  }

  .theme-words__detail-row[hidden] {
    display: none !important;
  }

  .theme-words__scroll {
    overflow: visible;
    box-shadow: none;
    border: none;
  }

  .theme-words__table thead th {
    position: static;
  }
}

.theme-words[data-theme="core"] { --tw-accent: #b8476b; }
.theme-words[data-theme="volcano"] { --tw-accent: #9a5030; }
.theme-words[data-theme="water"] { --tw-accent: #3a5c48; }
.theme-words[data-theme="disaster"] { --tw-accent: #5a4088; }
.theme-words[data-theme="region"] { --tw-accent: #3d6a94; }

@keyframes theme-words-flash-ok {
  0% { box-shadow: inset 3px 0 0 rgba(230, 126, 34, 0.75); }
  100% { box-shadow: inset 3px 0 0 rgba(230, 126, 34, 0.55); }
}

@keyframes theme-words-flash-bad {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  50% { transform: translateX(2px); }
  75% { transform: translateX(-1px); }
}

@media (max-width: 900px) {
  .theme-words__detail-grid {
    grid-template-columns: 1fr;
  }

  #theme-words-mount {
    padding: 0.65rem;
  }

  .theme-words__scroll {
    border-radius: 12px;
  }

  /* 默认隐藏音标：四列铺满屏宽，无需横滑 */
  .theme-words--hide-ipa.theme-words--compact .theme-words__table {
    min-width: 0;
    width: 100%;
    font-size: 0.88rem;
    line-height: 1.55;
  }

  .theme-words--hide-ipa.theme-words--compact .theme-words__table col.col-word {
    width: 24%;
  }

  .theme-words--hide-ipa.theme-words--compact .theme-words__table col.col-pos {
    width: 38%;
  }

  .theme-words--hide-ipa.theme-words--compact .theme-words__table col.col-meta {
    width: 22%;
  }

  .theme-words--hide-ipa.theme-words--compact .theme-words__table col.col-action {
    width: 16%;
  }

  /* 展开音标列时保留横滑 */
  .theme-words--show-ipa.theme-words--compact .theme-words__table {
    min-width: 640px;
  }

  .theme-words__table thead th,
  .theme-words__cell {
    padding: 0.65rem 0.45rem;
  }

  .theme-words__table thead th {
    font-size: 0.72rem;
    line-height: 1.35;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }

  .theme-words__cell--word {
    min-width: 0;
    font-size: 0.86rem;
  }

  .theme-words__cell--pos {
    min-width: 0;
    font-size: 0.84rem;
  }

  .theme-words__cell--meta {
    min-width: 0;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }

  .theme-words__cell--action {
    padding-left: 0.25rem;
    padding-right: 0.35rem;
  }

  .theme-words__diff {
    margin-bottom: 0.3rem;
    gap: 0.04rem;
  }

  .theme-words__diff-star {
    font-size: 0.72rem;
  }

  .theme-words__status {
    max-width: 100%;
    min-width: 0;
    padding: 0.22rem 0.28rem;
    font-size: 0.68rem;
  }

  .theme-words__expand {
    padding: 0.28rem 0.48rem;
    font-size: 0.68rem;
  }

  .theme-words__pos-extra {
    font-size: 0.82rem;
  }

  .theme-words--dictation.theme-words--hide-ipa.theme-words--compact .theme-words__table col.col-word {
    width: 44%;
  }

  .theme-words--dictation.theme-words--hide-ipa.theme-words--compact .theme-words__table col.col-pos {
    width: 26%;
  }

  .theme-words--dictation.theme-words--hide-ipa.theme-words--compact .theme-words__table col.col-meta {
    width: 18%;
  }

  .theme-words--dictation.theme-words--hide-ipa.theme-words--compact .theme-words__table col.col-action {
    width: 12%;
  }

  .theme-words--dictation .theme-words__mx-panel {
    height: 2rem;
  }

  .theme-words--dictation .theme-words__dict-input {
    font-size: 0.84rem;
    padding: 0.22rem 0.42rem;
  }
}

@media (max-width: 720px) {
  .theme-words__progress {
    margin-left: 0;
    width: 100%;
  }

  .theme-words__toolbar {
    gap: 0.45rem;
  }

  .theme-words__head {
    margin-bottom: 0.5rem;
  }

  .theme-words__subtitle::after {
    content: none;
  }

  .theme-words--show-ipa .theme-words__subtitle::after {
    content: " · 表格可左右滑动";
    color: #b0a0a8;
    font-weight: 600;
  }

  .theme-words__cell {
    padding: 0.55rem 0.38rem;
  }

  .theme-words__table thead th {
    padding-left: 0.38rem;
    padding-right: 0.38rem;
    font-size: 0.68rem;
  }

  .theme-words__detail-cell {
    padding: 0 0.55rem 0.85rem;
  }

  .theme-words__detail {
    padding-left: 0.55rem;
  }
}
