.header-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.language-switch {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.language-switch button {
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font: 12px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
}

.language-switch button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}

.language-switch button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html[lang="ja"] .article-deck,
html[lang="ja"] .article-body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
}

html[lang="ja"] .article-body {
  line-height: 2;
  letter-spacing: .01em;
}

html[lang="ja"] .article-body .article-lead {
  line-height: 1.9;
}

html[lang="ja"] .article-body h2,
html[lang="ja"] .article-body h3 {
  letter-spacing: 0;
}

html[lang="ja"] .article-header h1 {
  line-break: strict;
  text-wrap: balance;
  word-break: auto-phrase;
}

html[lang="ja"] .answer-copy {
  line-height: 1.9;
}

html[lang="ja"] .answer-track-subtitle,
html[lang="ja"] .compare-text span {
  display: none;
}

.tts-demo {
  margin: 2.2rem 0 2.5rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

.tts-demo-kicker {
  margin: 0 0 .25rem;
  color: var(--accent);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.tts-demo h3 {
  margin: 0 0 .35rem;
  font-size: 1.35rem;
  letter-spacing: -.02em;
}

.tts-demo-intro {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 14px;
}

.tts-demo label[for="tts-text"] {
  display: block;
  margin-bottom: .4rem;
  font-weight: 650;
}

.tts-demo textarea {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-height: 5.5rem;
  padding: .75rem .8rem;
  border: 1px solid #aeb8b0;
  border-radius: 5px;
  background: #fff;
  color: inherit;
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  resize: vertical;
}

.tts-demo textarea:focus-visible,
.tts-demo button:focus-visible,
.tts-demo input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tts-examples {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: .65rem 0 1rem;
}

.tts-examples button {
  min-height: 38px;
  padding: .4rem .65rem;
  border: 1px solid #cccfc7;
  border-radius: 999px;
  background: #fff;
  color: inherit;
  font: 12px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
}

.tts-examples button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tts-translation {
  margin: -.2rem 0 1rem;
  padding: .55rem .7rem;
  border-left: 2px solid var(--accent);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.tts-translation strong {
  color: var(--accent);
  font-weight: 650;
}

.tts-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin: .9rem 0 .7rem;
}

.tts-actions button {
  min-width: 7.5rem;
  min-height: 42px;
  padding: .55rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  font: 600 14px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
}

.tts-actions button + button {
  border-color: #aeb8b0;
  background: #fff;
  color: var(--ink);
}

.tts-actions button:disabled {
  cursor: default;
  opacity: .55;
}

.tts-status {
  min-height: 3em;
  margin: 0 0 .3rem;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.tts-status.is-result,
.answer-status.is-result {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .35rem .9rem;
  min-height: 0;
  margin: .85rem 0 .35rem;
  padding: .72rem .85rem;
  border: 1px solid #aeb8b0;
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
}

.tts-result-detail {
  min-width: 0;
  color: var(--muted);
}

.tts-result-speed {
  color: var(--accent);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
  white-space: nowrap;
}

.tts-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.reading-progress {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--accent);
  pointer-events: none;
}

.article-toc {
  margin: 0 0 44px;
  padding: 26px 0 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.article-toc h2 {
  margin: 0 0 20px;
  font-size: 21px;
  letter-spacing: -.02em;
}

.article-toc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.article-toc h3 {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.article-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-toc li + li {
  margin-top: 8px;
}

.article-toc a {
  display: flex;
  gap: 10px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.6;
  text-decoration: none;
}

.article-toc a:hover {
  color: var(--accent);
}

.article-toc .toc-no {
  min-width: 18px;
  padding-top: 1px;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.article-body h2[id] {
  scroll-margin-top: 76px;
}

@media (max-width: 600px) {
  .tts-demo {
    margin-left: -.35rem;
    margin-right: -.35rem;
    padding: 1rem;
  }
  .article-toc {
    margin-bottom: 32px;
    padding: 22px 0 24px;
  }
  .article-toc-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .tts-actions button {
    flex: 1 1 8rem;
  }
  .tts-result-speed {
    font-size: 1.2rem;
  }
}

.answer-card {
  margin: 0 0 2rem;
  padding: 1.25rem 1.35rem 1.1rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: #fbfaf6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.answer-label {
  margin: 0 0 .3rem;
  color: var(--accent);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.answer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1rem;
  flex-wrap: wrap;
  margin-bottom: .55rem;
}

.answer-yes {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -.055em;
  line-height: 1;
}

.answer-player {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  margin-top: .85rem;
  padding: .9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(40, 36, 28, .05);
}

.answer-track {
  min-width: 0;
}

.answer-track-head {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .38rem;
}

.answer-action-label {
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.answer-eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 11px;
}

.answer-eq i {
  width: 2px;
  height: 5px;
  border-radius: 2px;
  background: var(--accent);
  opacity: .45;
  transform-origin: bottom;
}

.answer-player.is-playing .answer-eq i {
  animation: answer-eq .7s ease-in-out infinite alternate;
  opacity: .9;
}

.answer-player.is-playing .answer-eq i:nth-child(2) {
  animation-delay: .15s;
}

.answer-player.is-playing .answer-eq i:nth-child(3) {
  animation-delay: .3s;
}

.answer-player.is-playing .answer-eq i:nth-child(4) {
  animation-delay: .45s;
}

.answer-track-title {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.01em;
  line-height: 1.55;
  line-break: strict;
  text-wrap: balance;
  word-break: auto-phrase;
}

.answer-track-subtitle {
  margin: .2rem 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.answer-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  padding: 0;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(56, 85, 62, .18);
  transition: filter .15s ease, box-shadow .15s ease, transform .15s ease;
}

.answer-play svg {
  width: 24px;
  height: 24px;
  transform: translateX(2px);
}

.answer-icon-pause {
  display: none;
  transform: none;
}

.answer-play[aria-pressed="true"] {
  background: #2f4a35;
  border-color: #2f4a35;
  box-shadow: 0 0 0 5px rgba(56, 85, 62, .14), 0 6px 14px rgba(56, 85, 62, .18);
}

.answer-play[aria-pressed="true"] .answer-icon-play {
  display: none;
}

.answer-play[aria-pressed="true"] .answer-icon-pause {
  display: block;
}

.answer-play:hover {
  filter: brightness(.94);
  transform: translateY(-1px);
}

.answer-play:active {
  transform: translateY(0);
}

.answer-play:disabled {
  cursor: default;
  opacity: .62;
}

.answer-play:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.answer-progress-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: .7rem .15rem 0;
}

.answer-progress {
  flex: 1;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7e2d7;
}

.answer-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width .12s linear;
}

.answer-time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}

.answer-note {
  margin: .7rem 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

@keyframes answer-eq {
  from {
    transform: scaleY(.6);
  }
  to {
    transform: scaleY(1.6);
  }
}

@media (prefers-reduced-motion: reduce) {
  .answer-player.is-playing .answer-eq i {
    animation: none;
  }

  .answer-play,
  .answer-progress span {
    transition: none;
  }
}

@media (max-width: 520px) {
  .answer-card {
    padding: 1rem;
  }

  .answer-player {
    gap: .7rem;
    padding: .8rem .85rem;
  }

  .answer-play {
    width: 52px;
    height: 52px;
  }

  .answer-track-title {
    font-size: 14px;
  }

  .answer-track-subtitle {
    font-size: 11.5px;
  }
}

.answer-copy {
  max-width: 62ch;
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}

.answer-status {
  min-height: 1.4em;
  margin: .55rem 0 0;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.voice-figure {
  margin: 2.2rem 0 2.4rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.voice-flow {
  display: flex;
  align-items: stretch;
}

.flow-step {
  flex: 1 1 0;
  min-width: 0;
  padding: .75rem .65rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.flow-step.is-key {
  border-color: var(--accent);
  background: #f4f7f2;
}

.flow-kicker {
  display: block;
  color: var(--accent);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.flow-step strong {
  display: block;
  margin: .12rem 0 .2rem;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.flow-step span:last-child {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.flow-arrow {
  flex: 0 0 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 13px;
}

.flow-arrow::before {
  content: "→";
}

.flow-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .7rem;
}

.flow-badges span {
  padding: .2rem .45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.voice-figure figcaption {
  margin-top: .7rem;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

@media (max-width: 700px) {
  .voice-flow {
    flex-direction: column;
  }
  .flow-step {
    width: 100%;
  }
  .flow-arrow {
    flex: 0 0 1.2rem;
  }
  .flow-arrow::before {
    content: "↓";
  }
}


.tts-example-note {
  margin: -.55rem 0 1rem;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.tts-timing {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 1rem 0 .85rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
  overflow: hidden;
}

.tts-timing div {
  min-width: 0;
  padding: .65rem .7rem;
  background: #fff;
  transition: background .18s ease, box-shadow .18s ease;
}

.tts-timing div.is-active {
  background: #f4f7f2;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.tts-timing div.is-done strong,
.tts-timing div.is-active strong {
  color: var(--accent);
}

.tts-speed-cell {
  background: #fbfaf6;
}

.tts-speed-cell.is-done {
  background: #edf4eb;
}

.tts-timing span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.tts-timing strong {
  display: block;
  margin-top: .1rem;
  color: var(--ink);
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
  line-height: 1.2;
}

.tts-status.is-busy::before,
.answer-status.is-busy::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: .42rem;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: .08em;
  animation: tts-live-pulse 1s ease-in-out infinite;
}

@keyframes tts-live-pulse {
  0%, 100% { opacity: .35; transform: scale(.85); }
  50% { opacity: 1; transform: scale(1); }
}

.abbr-term,
abbr.term {
  text-decoration: underline dotted;
  text-decoration-color: var(--accent);
  text-underline-offset: .18em;
  cursor: help;
}

abbr.term:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

abbr.term.is-active {
  background: #eef4ef;
}

.term-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05em;
  height: 1.05em;
  margin-left: .16em;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: #fff;
  color: var(--accent);
  font-size: .58em;
  font-weight: 700;
  line-height: 1;
  vertical-align: .46em;
  cursor: help;
}

.term-tooltip {
  position: fixed;
  z-index: 60;
  max-width: min(20rem, calc(100vw - 1rem));
  padding: .6rem .7rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(20, 40, 25, .16);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  pointer-events: none;
}

.term-tooltip[hidden] {
  display: none;
}

.phoneme-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 1rem 0 1.2rem;
}

.phoneme-chips span {
  padding: .4rem .6rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fbfaf6;
  font-size: 1.05rem;
  line-height: 1.2;
}

.phoneme-chips b {
  color: var(--accent);
  font-weight: 650;
}

.vits-arch-details {
  margin: 1.1rem 0 1.4rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.vits-arch-details summary {
  padding: .85rem 0;
  color: var(--accent);
  cursor: pointer;
  font-weight: 650;
}

.vits-arch-details[open] summary {
  padding-bottom: 1rem;
}

.vits-arch-details .vits-figure {
  margin-top: 0;
}

.vits-arch {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: .85rem;
  align-items: start;
}

.vits-panel {
  min-width: 0;
  padding: .8rem;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 7px;
  background: #fff;
}

.vits-panel.is-training {
  border-top-color: #b58b57;
  background: #fbfaf6;
}

.vits-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .65rem;
}

.vits-panel-title {
  margin: 0;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.vits-panel.is-training .vits-panel-title {
  color: #8a6435;
}

.vits-pill {
  padding: .14rem .4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.2;
  white-space: nowrap;
}

.vits-stage {
  padding: .5rem .6rem;
  border: 1px solid #d7dbd2;
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  background: #fff;
}

.vits-stage-kicker {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.vits-stage strong {
  display: block;
  margin-top: .08rem;
  font-size: 12px;
  line-height: 1.25;
}

.vits-stage small {
  display: block;
  margin-top: .12rem;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.35;
}

.vits-stage.is-output {
  background: #f4f7f2;
}

.vits-stage.is-loss {
  border-left-color: #b58b57;
  background: #fffdf8;
}

.vits-stage[data-vits] {
  position: relative;
  padding-right: 1.7rem;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.vits-stage[data-vits]::after {
  content: "?";
  position: absolute;
  top: .35rem;
  right: .4rem;
  display: grid;
  width: 1rem;
  height: 1rem;
  place-items: center;
  border: 1px solid #cccfc7;
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1;
}

.vits-stage[data-vits]:hover {
  border-color: var(--accent);
  background: #f7faf5;
}

.vits-stage[data-vits]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.vits-stage[data-vits].is-selected {
  border-color: var(--accent);
  background: #eef4ea;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.vits-panel.is-training .vits-stage[data-vits].is-selected {
  border-color: #b58b57;
  background: #fbf3e7;
  box-shadow: inset 0 0 0 1px #b58b57;
}

.vits-detail {
  position: fixed;
  z-index: 70;
  width: min(320px, calc(100vw - 24px));
  padding: .8rem 2rem .8rem .9rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  background: #fbfaf6;
  box-shadow: 0 12px 32px rgba(28, 35, 30, .18);
  font-size: 12px;
  line-height: 1.6;
}

.vits-detail[hidden] {
  display: none;
}

.vits-detail::after {
  content: "";
  position: absolute;
  left: calc(var(--vits-arrow-left, 50%) - 7px);
  width: 0;
  height: 0;
  border-right: 7px solid transparent;
  border-left: 7px solid transparent;
}

.vits-detail[data-placement="above"]::after {
  top: 100%;
  border-top: 8px solid #fbfaf6;
}

.vits-detail[data-placement="below"]::after {
  bottom: 100%;
  border-bottom: 8px solid #fbfaf6;
}

.vits-detail-close {
  position: absolute;
  top: .4rem;
  right: .4rem;
  display: grid;
  width: 1.6rem;
  height: 1.6rem;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font: 18px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
}

.vits-detail-close:hover {
  background: #eef0e9;
  color: var(--ink);
}

.vits-detail p {
  margin: 0;
}

.vits-detail-kicker {
  margin-bottom: .2rem !important;
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.vits-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 1rem;
  color: var(--accent);
  font-size: 12px;
  line-height: 1;
}

.vits-arrow::before {
  content: "↓";
}

.vits-branch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .4rem;
}

.vits-layer-list {
  list-style: none;
  margin: .35rem 0 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.vits-layer-list li {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: .35rem;
  padding: .16rem .3rem;
  border: 1px solid #e4e7e0;
  border-radius: 3px;
  background: #fbfaf6;
  font-size: 9px;
  line-height: 1.3;
}

.vits-layer-list span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.vits-layer-list b {
  font-weight: 650;
  text-align: right;
  overflow-wrap: anywhere;
}

.vits-panel.is-training .vits-stage {
  border-left-color: #b58b57;
}

.vits-panel.is-training .vits-arrow {
  color: #b58b57;
}

.compare-text {
  padding: .9rem 1rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  background: #fbfaf6;
  font-size: 1.05rem;
  line-height: 1.7;
}

.compare-text span {
  color: var(--muted);
  font-size: .86rem;
}

.model-compare {
  margin: 1.1rem 0 .7rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.model-row {
  display: grid;
  grid-template-columns: minmax(110px, .8fr) minmax(170px, 1.4fr) auto;
  align-items: center;
  gap: .8rem;
  padding: .65rem .75rem;
  background: #fff;
}

.model-row + .model-row {
  border-top: 1px solid var(--line);
}

.model-row.is-key {
  background: #f4f7f2;
  box-shadow: inset 3px 0 0 var(--accent);
}

.model-name strong,
.model-name span {
  display: block;
}

.model-name strong {
  font-size: 14px;
  line-height: 1.3;
}

.model-name span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.model-row audio {
  display: block;
  width: 100%;
  min-width: 0;
  height: 36px;
}

.model-duration {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.compare-note {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.spec-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1.5rem;
  margin: 1rem 0 1.4rem;
  padding: 0;
}

.spec-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .45rem 0;
  border-bottom: 1px solid var(--line);
}

.spec-list dt {
  color: var(--muted);
  font-size: 12px;
}

.spec-list dd {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}

.tool-list {
  padding-left: 1.1rem;
}

.tool-list li {
  margin: .35rem 0;
}

@media (max-width: 700px) {
  .tts-timing {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .vits-arch {
    grid-template-columns: 1fr;
  }
  .model-row {
    grid-template-columns: 1fr auto;
  }
  .model-row audio {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .model-duration {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 520px) {
  .tts-timing {
    grid-template-columns: 1fr;
  }
  .tts-timing div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
  }
  .tts-timing strong {
    margin-top: 0;
  }
  .spec-list {
    grid-template-columns: 1fr;
  }
}


@media print {
  .reading-progress,
  .vits-stage[data-vits]::after {
    display: none;
  }
  .article-toc {
    break-inside: avoid;
  }
}

@media (max-width: 760px) {
  .header-right {
    gap: 12px;
  }
  .language-switch button {
    padding: 6px 8px;
    font-size: 11px;
  }
}

/* Keep expanded block explanations readable on short screens. */
#vits-detail-body {
  max-height: max(80px, calc(100dvh - 180px));
  overflow-y: auto;
}

.tts-generated-audio { display: block; width: 100%; margin: 16px 0; }
.tts-generated-audio[hidden] { display: none; }
