/* Hallmark · macrostructure: Marquee Hero · tone: playful · anchor hue: orange */
@import url("/games/sound/public/tokens.css?v=0.2.021-20260822");

:root {
  --ink: #172033;
  --muted: #768094;
  --orange: #ff6a3d;
  --cream: #fff9f1;
  --blue: #2d6cf5;
}

* { box-sizing: border-box; }
html {
  min-height: 100%;
  min-height: -webkit-fill-available;
}
body {
  margin: 0;
  min-height: 100%;
  min-height: -webkit-fill-available;
  background: var(--cream);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  overflow-x: clip;
  letter-spacing: 0;
  -webkit-text-size-adjust: 100%;
}
button, input { font: inherit; }
button {
  border: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button:disabled {
  opacity: .62;
  cursor: wait;
  transform: none !important;
  box-shadow: none !important;
}

.app {
  --page-pad-x: 18px;
  --page-pad-top: 22px;
  --page-pad-bottom: 32px;
  position: relative;
  width: min(100%, 480px);
  margin: auto;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  min-height: 100svh;
  min-height: 100dvh;
  padding: var(--page-pad-top) var(--page-pad-x) max(var(--page-pad-bottom), env(safe-area-inset-bottom));
  overflow-x: clip;
  overflow-y: visible;
}
.hidden { display: none !important; }
.version-chip {
  position: absolute;
  top: 18px;
  left: 18px;
  max-width: calc(100% - 112px);
  display: flex;
  align-items: center;
  gap: 7px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  z-index: 3;
}
.version-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.changelog-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #172033;
  color: white;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 22px #1720331f;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.home-team-link {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  display: flex;
  align-items: center;
  height: 28px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}
.brand { color: var(--brand-title-ink); font-weight: 900; letter-spacing: 0; }
.brand i { color: inherit; font-style: normal; }
.eyebrow {
  font-size: 13px;
  color: var(--orange);
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

#welcome {
  min-height: auto;
  display: flex;
  flex-direction: column;
}
.hero { padding-top: 54px; }
.hero h1 {
  font-size: 36px;
  line-height: 1.08;
  letter-spacing: 0;
  margin: 8px 0 8px;
}
.brand-title {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  line-height: 0;
}
.brand-title img {
  display: block;
  width: 100%;
  height: auto;
}
.hero-subtitle { max-width: 330px; margin: 0 auto; color: var(--muted); font-size: 14px; font-weight: 700; line-height: 1.45; text-align: center; }
.hero p {
  margin: 0;
  line-height: 1.45;
  color: var(--muted);
  font-size: 14px;
}
.howto-card {
  position: relative;
  width: min(92%, 400px);
  aspect-ratio: 3 / 2;
  margin: 14px auto;
  overflow: hidden;
  border-radius: 12px;
  background: #fff9f1;
  box-shadow: 0 12px 26px #30221110;
}
.howto-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.howto-copy {
  position: absolute;
  right: 4%;
  bottom: 5%;
  z-index: 1;
  display: grid;
  width: 43%;
  gap: 5px;
  margin: 0;
  color: var(--ink);
  text-align: left;
}
.howto-copy > span:first-child { font-size: 15px; font-weight: 900; line-height: 1.3; }
.howto-copy small { color: var(--muted); font-size: 11px; font-weight: 800; line-height: 1.3; }
.howto-answers { display: flex; flex-wrap: wrap; gap: 6px; }
.howto-answers strong {
  padding: 6px 9px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  line-height: 1;
}
.voice-ready-note { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 12px; margin: 0 0 14px; padding: 13px 15px; border: 1px solid #f1ddcf; border-inline-start: 4px solid var(--orange); border-radius: 7px; background: #fff; box-shadow: 0 8px 20px rgba(48, 34, 17, .05); }
.voice-ready-icon { position: relative; display: block; width: 28px; height: 34px; margin: auto; border: 3px solid var(--orange); border-radius: 14px; }
.voice-ready-icon::before { content: ""; position: absolute; left: 50%; bottom: -8px; width: 18px; height: 11px; border: 3px solid var(--orange); border-top: 0; border-radius: 0 0 12px 12px; transform: translateX(-50%); }
.voice-ready-icon::after { content: ""; position: absolute; left: 50%; bottom: -13px; width: 3px; height: 7px; background: var(--orange); transform: translateX(-50%); }
.voice-ready-note p { min-width: 0; margin: 0; }
.voice-ready-note strong, .voice-ready-note p span { display: block; }
.voice-ready-note strong { font-size: 14px; line-height: 1.35; }
.voice-ready-note p span { margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.45; }
.playback-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; width: min(100%, 320px); }
.playback-actions[hidden] { display: none; }
.playback-actions > button { min-width: 0; white-space: nowrap; }
.skip-playback { min-height: 44px; border: 1px solid var(--orange); border-radius: 7px; background: var(--orange); color: #fff; font-weight: 900; box-shadow: 0 4px 0 #c44824; }
.skip-playback:active { transform: translateY(2px); box-shadow: 0 2px 0 #c44824; }
.skip-playback[hidden] { display: none; }
.skip-playback[hidden] + .replay { grid-column: 1 / -1; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.card {
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 12px 30px #3022110c;
}
#welcome .card label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #e8e4dd;
  background: #fffdf9;
  border-radius: 8px;
  padding: 0 13px;
  outline: 0;
}
.input:focus { border-color: var(--orange); }
.primary {
  width: 100%;
  margin-top: 10px;
  padding: 13px;
  border-radius: 12px;
  background: var(--orange);
  color: white;
  font-weight: 800;
  box-shadow: 0 7px 0 #d84a26;
}
.primary:active { transform: translateY(4px); box-shadow: 0 3px 0 #d84a26; }
#welcome .card > .primary { margin-bottom: 7px; }
.primary:disabled {
  opacity: .7;
  cursor: wait;
  transform: none;
}
.share {
  width: 100%;
  margin-top: 8px;
  padding: 11px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e8edf6;
  color: #30405f;
  font-weight: 700;
  box-shadow: 0 6px 16px #1720330a;
}
.share:active {
  transform: translateY(2px);
  box-shadow: 0 3px 10px #1720330a;
}
.history-open {
  background: #172033;
  border-color: #172033;
  color: #fff;
  font-weight: 900;
}
.history-open:active {
  box-shadow: 0 3px 10px #17203318;
}
.back-link {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  border-radius: 14px;
  background: #172033;
  color: #fff;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}
.back-link {
  width: fit-content;
  margin: 0 0 24px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
}

.steps { display: flex; gap: 8px; margin: 28px 0 18px; }
.step { height: 7px; flex: 1; border-radius: 9px; background: #ede9e1; }
.step.on { background: var(--orange); }
#quiz {
  min-height: calc(100vh - var(--page-pad-top) - var(--page-pad-bottom));
  min-height: calc(100svh - var(--page-pad-top) - var(--page-pad-bottom));
  min-height: calc(100dvh - var(--page-pad-top) - var(--page-pad-bottom));
  display: flex;
  flex-direction: column;
}
.game-title { display: flex; justify-content: space-between; align-items: center; }
.question { font-weight: 800; font-size: 19px; }
.question-cue {
  width: fit-content;
  min-width: 132px;
  margin: 0 auto 22px;
  border: 1px solid #ffe0d0;
  border-radius: 999px;
  padding: 10px 22px;
  background: #fff;
  color: var(--orange);
  text-align: center;
  box-shadow: 0 12px 28px #30221110;
}
.question-cue b {
  display: block;
  font-size: 24px;
  line-height: 1.1;
}
.question-cue.cue-pop {
  animation: cue-pop .62s ease;
}
@keyframes cue-pop {
  0% { transform: translateY(-8px) scale(.94); opacity: .35; }
  55% { transform: translateY(0) scale(1.05); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
.quiz-focus {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 18px 0 24px;
}
.sound-stage {
  flex: 1 1 auto;
  width: 100%;
  min-height: clamp(220px, 34svh, 400px);
  max-height: 430px;
  margin: 0 auto;
  border: 1px solid #e7edf7;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #eef5ff 100%);
  box-shadow: 0 18px 42px #17203314;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
}
.sound-badge {
  min-width: 122px;
  border-radius: 999px;
  padding: 10px 18px;
  background: #172033;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 10px 24px #17203320;
}
.sound-stage span {
  display: none;
}
.sound-stage.stage-shift {
  animation: stage-shift .62s ease;
}
.sound-stage.audio-playing .sound-wave i {
  animation-play-state: running;
}
.sound-stage.audio-playing {
  border-color: #ffcfb9;
  background: linear-gradient(180deg, #fff9f1 0%, #fff1e8 100%);
}
.sound-stage.audio-loading {
  border-color: #cfe0ff;
  background: linear-gradient(180deg, #ffffff 0%, #edf5ff 100%);
}
.sound-stage.audio-loading .sound-badge {
  background: var(--blue);
}
.sound-stage.audio-needs-action {
  border-color: #ff9a7a;
  background: linear-gradient(180deg, #fff8f4 0%, #fff0e8 100%);
}
.sound-stage.audio-needs-action .sound-badge {
  background: var(--orange);
}
.sound-stage.audio-playing .sound-badge {
  background: var(--orange);
}
.sound-wave {
  position: relative;
  width: 128px;
  height: 70px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.sound-wave::before,
.sound-wave::after {
  content: "";
  position: absolute;
  inset: -16px -24px;
  border: 2px solid #ff6a3d55;
  border-radius: 999px;
  opacity: 0;
  transform: scale(.72);
  pointer-events: none;
}
.sound-stage.audio-playing .sound-wave::before,
.sound-stage.audio-playing .sound-wave::after {
  animation: sound-ripple 1.25s ease-out infinite;
}
.sound-stage.audio-playing .sound-wave::after {
  animation-delay: .42s;
}
.sound-wave i {
  width: 12px;
  height: 28px;
  border-radius: 999px;
  background: var(--orange);
  animation: wave 820ms ease-in-out infinite;
  animation-play-state: paused;
}
.sound-wave i:nth-child(2) { height: 48px; animation-delay: 80ms; background: #2d6cf5; }
.sound-wave i:nth-child(3) { height: 64px; animation-delay: 160ms; background: #172033; }
.sound-wave i:nth-child(4) { height: 46px; animation-delay: 240ms; background: #2d6cf5; }
.sound-wave i:nth-child(5) { height: 30px; animation-delay: 320ms; }
@keyframes stage-shift {
  0% { transform: translateY(12px) scale(.98); opacity: .45; }
  60% { transform: translateY(0) scale(1.02); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes wave {
  0%, 100% { transform: scaleY(.48); }
  50% { transform: scaleY(1); }
}
@keyframes sound-ripple {
  0% { opacity: .72; transform: scale(.72); }
  100% { opacity: 0; transform: scale(1.22); }
}
.playback-notice {
  width: 100%;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border: 1px solid #eee1d6;
  border-radius: 16px;
  background: #fffdf9;
  box-shadow: 0 12px 28px #17203310;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
}
.playback-notice.notice-loading {
  border-color: #cfe0ff;
  background: #f4f8ff;
  color: #1c55bc;
}
.playback-notice.notice-playing {
  border-color: #ffd1bd;
  background: #fff7f1;
  color: #bd4b27;
}
.playback-notice.notice-ready {
  border-color: #d9ead5;
  background: #f5fbf2;
  color: #315f2d;
}
.playback-notice.notice-warning {
  border-color: #ffb99f;
  background: #fff1e8;
  color: #c74420;
}
.replay {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  background: #fff7f1;
  border: 1px solid #ffd8c6;
  color: #a9462a;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 900;
  font-size: 14px;
}
.replay.attention {
  border-color: #ff6a3d;
  background: #fff1e8;
  color: #c74420;
  box-shadow: 0 8px 22px #ff6a3d24;
  animation: replay-pulse 1.1s ease-in-out infinite;
}
@keyframes replay-pulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}
.answer-area {
  position: relative;
  z-index: 6;
  flex-shrink: 0;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 14px 20px 24px;
  padding-bottom: max(18px, calc(12px + env(safe-area-inset-bottom)));
  background: #fffdf9;
  border-top: 1px solid #f0e8df;
  box-shadow: 0 -10px 22px #17203308;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.answer-area[hidden] {
  display: none;
}
.answer-wrap { max-width: 480px; margin: auto; }
.replay-zone {
  width: min(100%, 480px);
  margin: 0 auto;
}
.playback-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(132px, 42%);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #f0e8df;
  border-radius: 12px;
  background: #fffdf9;
  box-shadow: 0 8px 22px rgba(23, 32, 51, .05);
}
.playback-control.playback-loading {
  border-color: #cfe0ff;
  background: #f8fbff;
}
.playback-control.playback-playing {
  border-color: #ffd1bd;
  background: #fff9f4;
}
.playback-control.playback-ready {
  border-color: #d9ead5;
  background: #fbfef9;
}
.playback-control.playback-warning {
  border-color: #ffb99f;
  background: #fff6ef;
}
.playback-copy {
  min-width: 0;
}
.playback-copy span,
.playback-copy strong {
  display: block;
}
.playback-copy span {
  margin-bottom: 3px;
  color: #a9462a;
  font-size: 11px;
  font-weight: 900;
}
.playback-copy strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.speech-caption {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 68px;
  margin: 0 0 8px;
  padding: 10px 13px;
  overflow: hidden;
  border: 1px solid #f0e8df;
  border-radius: 8px;
  background: #fffdf9;
  box-shadow: 0 8px 22px rgba(23, 32, 51, .05);
  transition: border-color 180ms ease, background 180ms ease;
}
.speech-caption.live,
.speech-caption.listening {
  border-color: #b9d5e9;
  background: #f8fcff;
}
.speech-caption.done {
  border-color: #cfe5d6;
  background: #fbfefc;
}
.speech-caption.error,
.speech-caption.timeout {
  border-color: #ead4cd;
  background: #fff9f6;
}
.caption-speaker {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: 12px;
  border-right: 1px solid #f0e8df;
  color: #a9462a;
  font-size: 12px;
  font-weight: 900;
}
.caption-line {
  min-width: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.recognition-text {
  min-width: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.recognition-text.placeholder {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.caption-char {
  display: inline-block;
}
.caption-char.incoming {
  animation: caption-char-in 260ms ease-out both;
}
.caption-cursor {
  flex: 0 0 auto;
  width: 2px;
  height: 20px;
  margin-left: 3px;
  border-radius: 1px;
  background: #2f81b7;
  opacity: 0;
}
.speech-caption.live .caption-cursor,
.speech-caption.listening .caption-cursor {
  animation: caption-cursor 760ms step-end infinite;
}
@keyframes caption-char-in {
  from { opacity: .12; transform: translateY(6px) scale(.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes caption-cursor {
  0%, 48% { opacity: .9; }
  49%, 100% { opacity: 0; }
}
.answer-dock {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-height: 112px;
  padding: 12px 14px 14px;
  border: 1px solid #f0e8df;
  border-radius: 12px;
  background: #fffdf9;
  box-shadow: 0 8px 22px rgba(23, 32, 51, .05);
  text-align: center;
}
.answer-dock.listening {
  border-color: #b9d5e9;
  background: #f8fcff;
}
.answer-dock.done {
  border-color: #cfe5d6;
  background: #fbfefc;
}
.answer-dock.error {
  border-color: #ead4cd;
  background: #fff9f6;
}
.listening-indicator {
  width: 92px;
  height: 34px;
  margin: 0 auto 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.listening-indicator i {
  width: 6px;
  height: 28px;
  border-radius: 3px;
  background: #d9d0c8;
  transform: scaleY(.22);
  transition: transform 90ms linear, background 180ms ease;
}
.answer-dock.listening .listening-indicator i {
  background: #2f81b7;
}
.answer-dock.processing .listening-indicator i {
  background: #a9462a;
  animation: voice-processing .7s ease-in-out infinite alternate;
}
.answer-dock.processing .listening-indicator i:nth-child(2),
.answer-dock.processing .listening-indicator i:nth-child(4) {
  animation-delay: .16s;
}
.answer-dock.done .listening-indicator i {
  background: #4f9866;
  transform: scaleY(.55) !important;
}
.answer-dock.error .listening-indicator i {
  background: #a69a92;
  transform: scaleY(.18) !important;
}
@keyframes voice-processing {
  from { transform: scaleY(.22); }
  to { transform: scaleY(.85); }
}
.listening-status {
  display: block;
  min-height: 25px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 25px;
}
.answer-dock.listening .listening-status {
  color: #2f6f9c;
}
.answer-dock.done .listening-status {
  color: #4f9866;
}
.voice-support {
  min-height: 18px;
  margin: 2px 0 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}
.answer-dock:not(.error) .voice-support {
  display: none;
}
.voice-actions {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.stop-answer-button,
.retry-answer-button {
  width: min(100%, 220px);
  min-height: 40px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}
.stop-answer-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #e2d6cc;
  background: #fff;
  color: #704735;
}
.stop-answer-button span {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: #a9462a;
}
.retry-answer-button {
  border: 1px solid #a9462a;
  background: #fff1e8;
  color: #a9462a;
}
.stop-answer-button:active,
.retry-answer-button:active {
  transform: translateY(1px);
}
.record {
  width: 100%;
  height: 64px;
  border-radius: 17px;
  background: var(--ink);
  color: white;
  font-weight: 800;
  font-size: 17px;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.record.recording { background: #d94f3b; animation: blink .8s infinite; }
@keyframes blink { 50% { opacity: .7; } }
.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: #17203366;
}
.modal-card {
  position: relative;
  width: min(100%, 430px);
  max-height: min(78vh, 620px);
  overflow: hidden;
  background: #fffdf9;
  border: 1px solid #eee1d6;
  border-radius: 18px;
  box-shadow: 0 24px 80px #17203333;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 18px 12px;
  border-bottom: 1px solid #f0e8df;
}
.modal-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.modal-head b {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 18px;
}
.modal-head button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  padding: 0;
  background: #172033;
  color: white;
  font-size: 21px;
  line-height: 1;
}
.changelog-list,
.history-content {
  max-height: calc(min(78vh, 620px) - 70px);
  overflow: auto;
  padding: 4px 18px 18px;
}
.changelog-item {
  padding: 16px 0;
  border-bottom: 1px solid #f0e8df;
}
.changelog-item:last-child { border-bottom: 0; }
.changelog-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.changelog-item-head b {
  display: block;
  font-size: 14px;
  color: var(--ink);
}
.changelog-item-head time {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}
.changelog-statuses {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}
.changelog-statuses span {
  border: 1px solid #ded8cf;
  color: var(--muted);
  padding: 2px 6px;
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
}
.changelog-statuses span.confirmed {
  border-color: #9db7a7;
  color: #37654c;
}
.changelog-section {
  margin-top: 11px;
  padding-left: 10px;
  border-left: 2px solid #d9d4cb;
}
.changelog-section.feature { border-left-color: #5f8a70; }
.changelog-section.bug-fix { border-left-color: #b86a60; }
.changelog-section.maintenance { border-left-color: #9b895d; }
.changelog-section h4 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 12px;
}
.changelog-section h4 small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.changelog-section ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.changelog-section li + li { margin-top: 3px; }
.changelog-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.feedback { text-align: center; padding-top: 14vh; }
.result-icon { font-size: 70px; }
.feedback h1 { font-size: 34px; margin: 15px; }
.feedback p { color: var(--muted); }
.next { margin-top: 30px; }
.summary-page h1 {
  margin: 12px 0 16px;
  font-size: 38px;
  line-height: 1.16;
  letter-spacing: 0;
}
.result-stage {
  overflow: hidden;
  background: #fff;
  border: 1px solid #efe6db;
  border-radius: 24px;
  box-shadow: 0 18px 42px #30221112;
}
.result-art {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  min-height: 260px;
  overflow: hidden;
  background: #f3eee8;
}
.result-art-bg {
  position: absolute;
  inset: -34px;
  width: calc(100% + 68px);
  height: calc(100% + 68px);
  object-fit: cover;
  filter: blur(24px) saturate(1.18);
  opacity: .68;
  transform: scale(1.05);
}
.result-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #fff3 0%, #17203312 58%, #17203333 100%);
}
.result-art-main {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: min(78%, 292px);
  height: min(82%, 306px);
  transform: translate(-50%, -50%);
  object-fit: cover;
  object-position: center;
  border: 8px solid #fffdf9;
  border-radius: 20px;
  box-shadow: 0 18px 38px #17203333;
}
.result-copy {
  padding: 18px 20px 22px;
  text-align: center;
}
.score {
  font-size: 68px;
  font-weight: 900;
  letter-spacing: 0;
  color: var(--orange);
  line-height: 1;
}
.score small { font-size: 20px; letter-spacing: 0; }
.result-name {
  display: none;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.result-quote {
  margin: 14px auto 0;
  max-width: 360px;
  min-height: 58px;
  color: var(--ink);
  font-size: 21px;
  font-weight: 900;
  line-height: 1.42;
}
.result-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.answer-review,
.ranking {
  margin-top: 18px;
}
.answer-review > b,
.ranking > b {
  display: block;
  font-size: 15px;
}
.rank-note {
  margin: 6px 0 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.review-row {
  display: grid;
  grid-template-columns: 58px 1fr 48px;
  gap: 10px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid #f1eee9;
}
.review-row:last-child,
.rank-row:last-child {
  border-bottom: 0;
}
.review-row b {
  font-size: 13px;
}
.review-row span {
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
  word-break: break-word;
}
.review-row span small {
  display: block;
  margin-top: 3px;
  color: #c94c2b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}
.review-row i {
  justify-self: end;
  min-width: 44px;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  text-align: center;
}
.review-row.correct i {
  background: #e8f7ef;
  color: #137a42;
}
.review-row.wrong i {
  background: #fff0eb;
  color: #c94c2b;
}
.empty-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.history-progress {
  margin: 14px 0 16px;
  padding: 16px;
  border: 1px solid #efe6db;
  border-radius: 16px;
  background: #fff;
}
.history-progress strong {
  display: block;
  font-size: 28px;
  line-height: 1;
  color: var(--orange);
}
.history-progress span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.history-meter {
  height: 9px;
  margin-top: 12px;
  border-radius: 999px;
  background: #f0e8df;
  overflow: hidden;
}
.history-meter i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--orange);
}
.history-section-title {
  display: block;
  margin: 4px 0 2px;
  color: var(--ink);
  font-size: 15px;
}
.history-round {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid #f1eee9;
}
.history-round:last-child { border-bottom: 0; }
.history-icon {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  overflow: hidden;
  background: #f3eee8;
  box-shadow: 0 8px 20px #17203314;
}
.history-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.history-round time {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.history-round b {
  display: block;
  margin-top: 3px;
  font-size: 15px;
}
.history-accuracy {
  color: var(--orange);
  font-size: 20px;
  font-weight: 900;
}
.rank-row {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid #f1eee9;
  align-items: center;
}
.rank-row.current {
  margin: 8px 0;
  padding: 12px;
  border: 1px solid #ffd6c4;
  border-radius: 14px;
  background: #fff7f1;
  box-shadow: 0 10px 24px #ff6a3d16;
}
.rank-row b { font-size: 14px; }
.rank-row span { color: var(--muted); font-size: 13px; }
.rank-row .rank-player { min-width:0; color:var(--ink); }
.rank-row .rank-player > b { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rank-row .rank-player > span { display:block; margin-top:3px; }
.current-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  border-radius: 999px;
  padding: 3px 7px;
  background: var(--orange);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  vertical-align: 1px;
}
.finish { text-align: center; padding-top: 26px; }
.finish h1 { font-size: 36px; letter-spacing: 0; }
.finish .result-stage { margin-top: 18px; }
.finish #finishRank {
  display: block;
  margin-top: 14px;
  font-size: 15px;
}
.summary-page .primary { margin-top: 16px; }

@media (max-width: 520px) {
  .app {
    width: 100%;
  }
  .sound-stage {
    min-height: clamp(190px, 31svh, 340px);
    max-height: 360px;
  }
  .quiz-focus {
    min-height: 0;
  }
}

@media (max-width: 380px) {
  .app { --page-pad-x: 16px; }
  .version-chip { top: 14px; left: 14px; }
  .home-team-link { top: 14px; right: 14px; }
  .hero { padding-top: 46px; }
  .hero h1 { font-size: 32px; }
  .howto-card {
    margin: 12px auto;
  }
  .howto-copy { right: 3.5%; width: 44%; gap: 4px; }
  .howto-copy > span:first-child { font-size: 13px; }
  .howto-answers strong { padding: 5px 7px; font-size: 12px; }
  #welcome .card { padding: 14px; }
  .input,
  .primary { padding: 12px; }
  .sound-stage {
    min-height: clamp(170px, 29svh, 310px);
    max-height: 330px;
  }
  .summary-page h1 { font-size: 32px; }
  .result-art { min-height: 226px; }
  .result-art-main {
    width: min(80%, 248px);
    height: min(82%, 260px);
    border-width: 6px;
  }
  .score { font-size: 58px; }
  .result-quote {
    min-height: 52px;
    font-size: 18px;
  }
}

@media (max-width: 520px) and (max-height: 760px) {
  .app {
    --page-pad-top: 16px;
    --page-pad-bottom: 24px;
  }
  .version-chip {
    top: 12px;
    left: 12px;
    gap: 6px;
    font-size: 11px;
  }
  .home-team-link {
    top: 12px;
    right: 12px;
    height: 26px;
    font-size: 11px;
  }
  .changelog-icon {
    width: 26px;
    height: 26px;
    font-size: 15px;
  }
  .hero {
    padding-top: 42px;
  }
  .brand-title {
    margin-bottom: 8px;
  }
  .hero p {
    font-size: 13px;
    line-height: 1.36;
  }
  .howto-card {
    margin-top: 10px;
    margin-bottom: 10px;
  }
  #welcome .card {
    padding: 14px;
  }
  #welcome .card label {
    margin-bottom: 8px;
  }
  .input {
    padding: 0 13px;
  }
  .primary {
    margin-top: 8px;
    padding: 12px;
  }
  .share {
    margin-top: 6px;
    padding: 10px 12px;
  }
  .steps {
    margin: 18px 0 12px;
  }
  .quiz-focus {
    min-height: 0;
    gap: 11px;
    padding: 10px 0 16px;
  }
  .sound-stage {
    min-height: clamp(160px, 27svh, 300px);
    max-height: 315px;
    gap: 9px;
  }
  .sound-wave {
    height: 58px;
  }
  .replay {
    padding: 10px 20px;
  }
  .answer-area {
    padding: 12px 16px 20px;
    padding-bottom: max(15px, calc(9px + env(safe-area-inset-bottom)));
  }
  .replay-zone {
    width: min(100%, 480px);
  }
  .playback-control {
    padding: 10px;
    gap: 10px;
  }
  .speech-caption {
    min-height: 58px;
    margin-bottom: 6px;
    padding: 8px 10px;
  }
  .answer-dock {
    min-height: 106px;
  }
  .listening-indicator {
    height: 34px;
    margin-bottom: 3px;
  }
  .voice-actions {
    min-height: 38px;
  }
  .stop-answer-button,
  .retry-answer-button {
    min-height: 37px;
  }
  .record {
    height: 56px;
  }
}

@media (max-width: 520px) and (max-height: 660px) {
  .app {
    --page-pad-top: 12px;
    --page-pad-bottom: 18px;
  }
  .hero {
    padding-top: 38px;
  }
  .hero p {
    font-size: 12px;
    line-height: 1.32;
  }
  .howto-card {
    margin-top: 8px;
    margin-bottom: 8px;
  }
  #welcome .card {
    padding: 12px;
  }
  .input {
    padding: 10px 11px;
    border-radius: 10px;
  }
  .primary {
    padding: 11px;
    border-radius: 10px;
  }
  .sound-stage {
    min-height: clamp(140px, 24svh, 250px);
    max-height: 270px;
  }
  .sound-badge {
    min-width: 108px;
    font-size: 19px;
    padding: 9px 15px;
  }
  .sound-wave {
    width: 112px;
    height: 50px;
  }
  .sound-wave i {
    width: 10px;
    height: 22px;
  }
  .sound-wave i:nth-child(2) { height: 38px; }
  .sound-wave i:nth-child(3) { height: 50px; }
  .sound-wave i:nth-child(4) { height: 36px; }
  .sound-wave i:nth-child(5) { height: 24px; }
  .sound-stage span {
    font-size: 13px;
  }
  .quiz-focus {
    min-height: 0;
    gap: 9px;
    padding: 6px 0 10px;
  }
  .playback-notice {
    min-height: 52px;
    padding: 9px 12px;
    border-radius: 13px;
    font-size: 16px;
  }
  .replay {
    min-height: 42px;
    border-radius: 12px;
    font-size: 14px;
  }
  .replay-zone {
    width: 100%;
  }
  .playback-control {
    padding: 9px;
    gap: 9px;
  }
  .speech-caption {
    grid-template-columns: 36px minmax(0, 1fr);
    min-height: 54px;
  }
  .recognition-text {
    font-size: 15px;
  }
  .recognition-text.placeholder {
    font-size: 12px;
  }
  .answer-dock {
    min-height: 96px;
  }
  .listening-indicator {
    height: 30px;
  }
  .voice-support {
    margin-bottom: 5px;
  }
  .record {
    height: 52px;
  }
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 95px;
  transform: translateX(-50%);
  background: #172033;
  color: white;
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 13px;
  z-index: 7;
}

.team-page {
  padding-top: 32px;
}
.team-panel {
  margin-top: 38px;
}
.team-panel h1 {
  margin: 10px 0 22px;
  font-size: 42px;
  line-height: 1.08;
}
.team-list {
  display: grid;
  gap: 12px;
}
.team-list div {
  background: #fff;
  border: 1px solid #efe6db;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 12px 30px #3022110c;
}
.team-list span,
.team-list small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.team-list b {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 24px;
}
.team-list small {
  margin-top: 7px;
  line-height: 1.45;
}
.model-panel {
  margin-top: 26px;
  padding-bottom: 28px;
}
.model-list {
  display: grid;
  gap: 10px;
}
.model-row {
  background: #fff;
  border: 1px solid #e7edf7;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 10px 24px #1720330a;
}
.model-row span,
.model-row small,
.model-row strong {
  display: block;
}
.model-row span {
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
}
.model-row b {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}
.model-row strong {
  margin-top: 4px;
  color: #2d6cf5;
  font-size: 13px;
  line-height: 1.35;
}
.model-row small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}
.feedback-form { display:grid; gap:12px; padding:18px; }
.ranking-columns { display:grid; grid-template-columns:30px 1fr auto; gap:10px; padding:12px 18px 0; color:var(--muted); font-size:11px; font-weight:800; }
.ranking-columns span:last-child { text-align:right; }
#rankingModal { place-items:end center; padding:18px; }
#rankingModal .modal-card { width:min(100%, 480px); border-radius:12px 12px 8px 8px; }
.feedback-form textarea { width:100%; resize:vertical; padding:12px; border:1px solid #d8e2f0; border-radius:7px; color:var(--ink); font:inherit; line-height:1.55; }

/* 0.2.005 answer stage redesign */
#quiz {
  height: calc(100vh - var(--page-pad-top) - var(--page-pad-bottom));
  height: calc(100dvh - var(--page-pad-top) - var(--page-pad-bottom));
  min-height: 0;
  justify-content: space-between;
  gap: 0;
  overflow: hidden;
  text-align: center;
}
#quiz .game-title {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  min-height: 66px;
}
#quiz .brand {
  font-size: 24px;
  line-height: 1;
}
#quiz .question {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}
#quiz .steps {
  margin: 16px 0 14px;
}
#quiz .quiz-focus {
  flex: 1 1 auto;
  min-height: 0;
  justify-content: space-between;
  gap: 18px;
  padding: 0 0 18px;
}
#quiz .sound-stage {
  position: relative;
  min-height: 0;
  max-height: none;
  border: 0;
  border-radius: 8px;
  background: #eaf3ff;
  box-shadow: inset 0 -10px 0 rgba(196, 214, 237, .7);
  overflow: hidden;
}
#quiz .sound-stage::before {
  content: "";
  position: absolute;
  inset: 16px 12px;
  border-radius: 8px;
  background: #fffdf9;
  box-shadow: 0 20px 44px rgba(23, 32, 51, .09);
}
#quiz .sound-stage.audio-loading {
  background: #eaf3ff;
}
#quiz .sound-stage.audio-playing,
#quiz .sound-stage.audio-needs-action {
  background: #fff0e7;
}
#quiz .sound-badge,
#quiz .sound-wave {
  position: relative;
  z-index: 1;
}
#quiz .sound-badge {
  min-width: 148px;
  padding: 12px 20px;
  font-size: 24px;
}
#quiz .sound-wave {
  width: 158px;
  height: 86px;
  gap: 10px;
}
#quiz .sound-wave i {
  width: 10px;
}
#quiz .replay-zone {
  width: 100%;
}
#quiz .playback-control {
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 12px;
  padding: 15px 16px;
  border: 0;
  border-radius: 8px;
  background: #fffdf9;
  box-shadow: 0 14px 30px rgba(23, 32, 51, .08);
  text-align: center;
}
#quiz .playback-copy {
  display: grid;
  justify-items: center;
  gap: 3px;
}
#quiz .playback-copy span,
#quiz .playback-copy strong {
  text-align: center;
}
#quiz .playback-copy strong {
  font-size: 18px;
}
#quiz .replay {
  width: 100%;
  min-height: 44px;
}
#quiz .answer-area {
  border-top: 0;
  background: #fffdf9;
  box-shadow: 0 -18px 38px rgba(23, 32, 51, .08);
}
#quiz .answer-wrap {
  display: grid;
  gap: 10px;
}
#quiz .speech-caption {
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 6px;
  min-height: 94px;
  margin: 0;
  padding: 16px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(23, 32, 51, .08);
  text-align: center;
}
#quiz .speech-caption.live,
#quiz .speech-caption.listening {
  background: #f3fbff;
}
#quiz .speech-caption.done {
  background: #f7fcf8;
}
#quiz .speech-caption.error,
#quiz .speech-caption.timeout {
  background: #fff7f3;
}
#quiz .caption-speaker {
  align-self: auto;
  padding: 0;
  border-right: 0;
  color: #a9462a;
  font-size: 12px;
  line-height: 1.2;
}
#quiz .caption-line {
  width: 100%;
  min-height: 38px;
  justify-content: center;
  text-align: center;
}
#quiz .recognition-text {
  width: 100%;
  font-size: 20px;
  line-height: 1.35;
  text-align: center;
}
#quiz .recognition-text.placeholder {
  font-size: 14px;
}
#quiz .answer-dock {
  min-height: 126px;
  padding: 15px 16px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(23, 32, 51, .08);
}
#quiz .answer-dock.listening {
  background: #f3fbff;
}
#quiz .answer-dock.done {
  background: #f7fcf8;
}
#quiz .answer-dock.error {
  background: #fff7f3;
}
#quiz .listening-indicator {
  height: 38px;
  margin-bottom: 4px;
}
#quiz .listening-status {
  min-height: 28px;
  font-size: 20px;
  line-height: 28px;
}
#quiz .voice-actions {
  min-height: 42px;
}
#quiz.answer-mode .sound-wave {
  height: 54px;
}

@media (max-width: 22rem) {
  .playback-actions { grid-template-columns: 1fr; }
  .skip-playback[hidden] + .replay { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

#quiz.answer-mode .sound-badge {
  padding-block: 10px;
  font-size: 20px;
}

@media (max-height: 700px) {
  #quiz .game-title {
    min-height: 52px;
  }
  #quiz .steps {
    margin: 10px 0;
  }
  #quiz .quiz-focus {
    min-height: 0;
    gap: 8px;
    padding-bottom: 8px;
  }
  #quiz .sound-stage {
    min-height: 0;
  }
  #quiz .answer-area {
    padding: 8px 14px max(10px, env(safe-area-inset-bottom));
  }
  #quiz .answer-wrap {
    gap: 8px;
  }
  #quiz .speech-caption {
    min-height: 70px;
    padding: 9px 12px;
  }
  #quiz .answer-dock {
    min-height: 94px;
    padding: 8px 12px;
  }
  #quiz .listening-indicator {
    height: 28px;
    margin-bottom: 2px;
  }
  #quiz .listening-status {
    min-height: 24px;
    font-size: 18px;
    line-height: 24px;
  }
  #quiz .voice-actions {
    min-height: 38px;
  }
}

@media (max-height: 600px) {
  #quiz.answer-mode .sound-stage {
    grid-template-columns: auto auto;
    align-content: center;
    gap: 10px;
  }
  #quiz.answer-mode .sound-stage::before {
    inset: 7px 10px;
  }
  #quiz.answer-mode .sound-badge {
    min-width: 88px;
    padding: 8px 12px;
    font-size: 17px;
  }
  #quiz.answer-mode .sound-wave {
    width: 84px;
    height: 32px;
    gap: 5px;
  }
  #quiz.answer-mode .sound-wave i {
    width: 6px;
  }
}

/* Interface refinement: keep the established palette while reducing visual noise. */
:root {
  --surface: #fffdf9;
  --line: #eadfd4;
  --muted-surface: #f7f1e9;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.app {
  --page-pad-x: 20px;
  --page-pad-top: 20px;
  --page-pad-bottom: 28px;
}

.version-chip,
.home-team-link {
  top: 16px;
  font-size: 12px;
  font-weight: 700;
}
.version-chip { left: 20px; gap: 6px; }
.home-team-link { right: 20px; }
.changelog-icon {
  width: 20px;
  height: 20px;
  border: 1px solid currentColor;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-family: Georgia, serif;
  box-shadow: none;
}

.hero { padding-top: 50px; }
.brand-title { margin-bottom: 8px; }
.hero-subtitle { font-size: 14px; font-weight: 600; }
.good-things-beat {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  width: 32px;
  height: 8px;
  margin: 8px auto 0;
}
.good-things-beat i {
  display: block;
  width: 4px;
  border-radius: 2px;
  background: var(--orange);
}
.good-things-beat i:nth-child(1) { height: 4px; opacity: .55; }
.good-things-beat i:nth-child(2) { height: 8px; }
.good-things-beat i:nth-child(3) { height: 6px; opacity: .75; }
.howto-card {
  width: min(88%, 380px);
  margin: 16px auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}
.howto-copy > span:first-child { font-size: 14px; }
.howto-copy small { font-size: 12px; font-weight: 600; }
.howto-answers strong { font-size: 12px; }

.voice-ready-note {
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.voice-ready-icon {
  width: 16px;
  height: 22px;
  border-width: 2px;
}
.voice-ready-icon::before {
  bottom: -6px;
  width: 14px;
  height: 8px;
  border-width: 2px;
  border-top: 0;
}
.voice-ready-icon::after { bottom: -10px; width: 2px; height: 5px; }
.voice-ready-note strong { font-size: 14px; }
.voice-ready-note p span { margin-top: 1px; font-size: 12px; font-weight: 600; }

#welcome .card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#welcome .card label,
#welcome .card .input,
#welcome .card > .primary {
  grid-column: 1 / -1;
}
#welcome .card label { margin: 0 0 0; font-size: 13px; }
.input {
  min-height: 48px;
  border-color: var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 16px;
}
.primary {
  min-height: 48px;
  margin-top: 2px;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 3px 0 #d84a26;
  font-size: 16px;
}
.primary:active { transform: translateY(2px); box-shadow: 0 1px 0 #d84a26; }
#welcome .card > .primary { margin-bottom: 2px; }
.share,
.history-open {
  min-height: 42px;
  margin: 0;
  padding: 9px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
}
.share:active,
.history-open:active { background: #f3ebe2; box-shadow: none; transform: none; }
.studio-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration-color: #b8afa5;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.studio-link-favicon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  object-fit: contain;
}
.studio-link-arrow {
  flex: 0 0 auto;
  line-height: 1;
}
.studio-link:active { color: var(--ink); }
.good-things-easter-egg {
  display: block;
  width: min(64%, 240px);
  margin: 18px auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.good-things-easter-egg:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 5px;
}
.good-things-sketch {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  opacity: .94;
}
.good-things-easter-egg.beat { animation: good-things-three-beat .68s ease-out; }
.good-things-note {
  min-height: 21px;
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.55;
  text-align: center;
}
.good-things-note[hidden] { display: none; }
@keyframes good-things-three-beat {
  0%, 100% { transform: translateY(0); }
  14% { transform: translateY(-3px); }
  28% { transform: translateY(0); }
  46% { transform: translateY(-3px); }
  60% { transform: translateY(0); }
  78% { transform: translateY(-4px); }
}

#quiz .game-title { min-height: 56px; gap: 4px; }
#quiz .brand { font-size: 22px; }
#quiz .question { font-size: 12px; font-weight: 700; }
#quiz .steps { margin: 12px 0 14px; gap: 6px; }
.step { height: 5px; }
#quiz .quiz-focus { gap: 12px; padding-bottom: 14px; }
#quiz .sound-stage {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: none;
}
#quiz .sound-stage::before { display: none; }
#quiz .sound-stage.audio-loading { background: var(--surface); border-color: #d8d0c7; }
#quiz .sound-stage.audio-playing,
#quiz .sound-stage.audio-needs-action { background: #fff5ee; border-color: #f2c4af; }
#quiz .sound-badge {
  min-width: 126px;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 20px;
  box-shadow: none;
}
#quiz .sound-wave { width: 132px; height: 70px; gap: 8px; }
.sound-wave i,
.sound-wave i:nth-child(2),
.sound-wave i:nth-child(4) { background: var(--orange); }
.sound-wave i:nth-child(3) { background: var(--ink); }

#quiz .playback-control {
  grid-template-columns: minmax(0, 1fr) minmax(144px, 46%);
  justify-items: stretch;
  gap: 12px;
  padding: 12px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
}
#quiz .playback-copy { justify-items: start; align-content: center; }
#quiz .playback-copy span,
#quiz .playback-copy strong { text-align: left; }
#quiz .playback-copy strong { font-size: 15px; }
.playback-actions { width: 100%; }
.skip-playback,
.replay { min-height: 42px; border-radius: 8px; box-shadow: none; font-size: 13px; }
.skip-playback:active { transform: none; box-shadow: none; }

#quiz .answer-area {
  padding: 12px 20px max(16px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
  box-shadow: none;
}
#quiz .answer-wrap {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
#quiz .speech-caption {
  grid-template-columns: 44px minmax(0, 1fr);
  justify-items: stretch;
  gap: 12px;
  min-height: 64px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  text-align: left;
}
#quiz .speech-caption.live,
#quiz .speech-caption.listening { background: #fffaf6; }
#quiz .speech-caption.done { background: #f8fcf9; }
#quiz .speech-caption.error,
#quiz .speech-caption.timeout { background: #fff8f4; }
#quiz .caption-speaker {
  align-self: stretch;
  padding-right: 12px;
  border-right: 1px solid var(--line);
}
#quiz .caption-line { min-height: 32px; justify-content: flex-start; text-align: left; }
#quiz .recognition-text { font-size: 17px; text-align: left; }
#quiz .recognition-text.placeholder { font-size: 14px; }
#quiz .answer-dock {
  min-height: 104px;
  padding: 12px 14px;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}
#quiz .answer-dock.listening { background: #fffaf6; }
#quiz .answer-dock.done { background: #f8fcf9; }
#quiz .answer-dock.error { background: #fff8f4; }
#quiz .listening-indicator { height: 32px; margin-bottom: 2px; }
#quiz .answer-dock.listening .listening-indicator i { background: var(--orange); }
#quiz .listening-status { min-height: 24px; font-size: 16px; line-height: 24px; }
#quiz .answer-dock.listening .listening-status { color: #a9462a; }
#quiz .voice-actions { min-height: 38px; }

.modal { padding: 16px; }
.modal-card {
  border-color: var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 48px #17203324;
}
.modal-head { padding: 16px; }
.modal-head b { margin-top: 2px; font-size: 17px; }
.modal-head button {
  width: 32px;
  height: 32px;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 26px;
  font-weight: 400;
}
.changelog-list,
.history-content { padding: 4px 16px 16px; }
.changelog-item-head { align-items: flex-start; }
@media (max-width: 520px) {
  .changelog-item-head { display: block; }
  .changelog-statuses { justify-content: flex-start; margin-top: 8px; }
}
#rankingModal { padding: 16px; }
#rankingModal .modal-card { border-radius: 8px; }

.summary-page h1 {
  margin: 8px 0 16px;
  font-size: 28px;
  line-height: 1.25;
}
.result-stage {
  border-color: var(--line);
  border-radius: 8px;
  box-shadow: none;
}
.result-art-main {
  width: min(80%, 288px);
  height: min(84%, 304px);
  border-width: 4px;
  border-radius: 8px;
  box-shadow: 0 12px 28px #17203324;
}
.result-copy { padding: 18px 20px 20px; }
.score { font-size: 48px; }
.score small { font-size: 16px; }
.result-quote { min-height: 0; margin-top: 12px; font-size: 18px; line-height: 1.45; }
.result-sub { font-size: 13px; }
.summary-page .card {
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.summary-page > .share { margin-top: 10px; }
.answer-review,
.ranking { margin-top: 20px; }
.answer-review > b,
.ranking > b { font-size: 16px; }
.review-row { grid-template-columns: 54px 1fr 46px; padding: 12px 0; }
.rank-row { padding: 12px 0; }
.rank-row.current {
  margin: 6px 0;
  padding: 10px;
  border-radius: 8px;
  box-shadow: none;
}
.history-progress {
  margin: 12px 0 18px;
  padding: 14px;
  border: 0;
  border-radius: 8px;
  background: var(--muted-surface);
}
.history-progress strong { font-size: 24px; }
.history-icon { border-radius: 8px; box-shadow: none; }
.history-accuracy { font-size: 17px; }
.finish { padding-top: 20px; }
.finish h1 { font-size: 28px; }
.finish .result-stage { margin-top: 16px; }
.good-things-line {
  position: relative;
  width: fit-content;
  margin: 14px auto 0;
  padding-top: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.good-things-line::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 24px;
  height: 2px;
  border-radius: 1px;
  background: var(--orange);
  transform: translateX(-50%);
}
.inspiration-credit {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
.inspiration-sounds {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}
.inspiration-sounds i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--orange);
}
.toast { border-radius: 8px; }

@media (max-width: 380px) {
  .app { --page-pad-x: 16px; }
  .version-chip { left: 16px; }
  .home-team-link { right: 16px; }
  .hero { padding-top: 46px; }
  .howto-card { width: 92%; }
  .good-things-easter-egg { width: min(68%, 218px); }
  #welcome .card { padding: 0; }
  .summary-page h1,
  .finish h1 { font-size: 26px; }
  .score { font-size: 44px; }
}

@media (max-height: 700px) {
  #quiz .game-title { min-height: 48px; }
  #quiz .steps { margin: 8px 0 10px; }
  #quiz .quiz-focus { gap: 8px; padding-bottom: 8px; }
  #quiz .playback-control { padding-top: 8px; }
  #quiz .answer-area { padding: 8px 16px max(10px, env(safe-area-inset-bottom)); }
  #quiz .speech-caption { min-height: 56px; padding: 8px 12px; }
  #quiz .answer-dock { min-height: 86px; padding: 8px 12px; }
}
