/* Hallmark · macrostructure: Workbench · tone: playful · anchor hue: warm red */
@import url("tokens.css?v=0.2.018-20260822");

:root {
  --ink: #2a2024;
  --muted: #695960;
  --paper: #fff9f8;
  --white: #ffffff;
  --line: #f0e2e4;
  --red: #e79399;
  --red-dark: #b86a72;
  --red-pale: #fcecee;
  --green: #639774;
  --blue: #567fbd;
  --yellow: #dfad35;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); letter-spacing: 0; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.hidden { display: none !important; }
.app-shell { --page-pad-top: 20px; --page-pad-bottom: max(28px, env(safe-area-inset-bottom)); width: min(100%, 480px); min-height: 100vh; min-height: 100dvh; margin: 0 auto; padding: var(--page-pad-top) 18px var(--page-pad-bottom); }
.screen { min-height: calc(100vh - var(--page-pad-top) - var(--page-pad-bottom)); min-height: calc(100dvh - var(--page-pad-top) - var(--page-pad-bottom)); }
.topbar, .game-header, .ranking-title { display: flex; align-items: center; justify-content: space-between; }
.topbar { min-height: 28px; }
.version-chip { display: flex; align-items: center; gap: 7px; min-width: 0; max-width: calc(100% - 86px); padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 800; text-align: left; }
.version-chip > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.changelog-icon { display: grid; place-items: center; flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; background: #172033; color: #fff; font-size: 16px; font-weight: 900; line-height: 1; box-shadow: 0 8px 22px rgba(23, 32, 51, .12); }
.eyebrow { color: var(--red-dark); font-size: 12px; font-weight: 800; letter-spacing: 1px; }
.credits-link { color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: none; }
.welcome-hero { padding: 40px 4px 20px; text-align: center; }
.eyebrow { margin: 0 0 9px; }
h1 { margin: 0; font-size: 43px; line-height: 1.08; letter-spacing: 0; }
h1, .brand-small, h1 span, .brand-small span { color: var(--brand-title-ink); font-style: normal; }
.intro { max-width: 330px; margin: 12px auto 0; color: var(--muted); font-size: 14px; font-weight: 700; line-height: 1.45; text-align: center; }
.rule-board { min-height: 184px; padding: 25px 18px 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); box-shadow: 0 13px 30px rgba(90, 53, 57, .07); }
.sample-row { display: flex; align-items: baseline; justify-content: center; gap: 12px; margin-bottom: 26px; }
.sample-row b { font-size: 34px; line-height: 1; }
.sample-red { color: #d85d68; }.sample-blue { color: #3f6eae; }.sample-yellow { color: #c9941b; }
.answer-hint { padding: 11px 10px; border-radius: 5px; background: #fff1ef; color: var(--red-dark); font-size: 13px; font-weight: 700; text-align: center; }
.voice-ready-note { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 12px; margin-top: 14px; padding: 13px 15px; border: 1px solid var(--line); border-inline-start: 4px solid var(--red); border-radius: 7px; background: var(--white); box-shadow: 0 8px 20px rgba(90, 53, 57, .05); }
.voice-ready-icon { position: relative; display: block; width: 28px; height: 34px; margin: auto; border: 3px solid var(--red-dark); border-radius: 14px; }
.voice-ready-icon::before { content: ""; position: absolute; left: 50%; bottom: -8px; width: 18px; height: 11px; border: 3px solid var(--red-dark); 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(--red-dark); transform: translateX(-50%); }
.voice-ready-note p { min-width: 0; margin: 0; }
.voice-ready-note strong, .voice-ready-note 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; }
.start-panel { margin-top: 14px; padding: 17px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); box-shadow: 0 13px 30px rgba(90, 53, 57, .06); }
.start-panel label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 13px; font-weight: 800; }
input { width: 100%; height: 48px; padding: 0 13px; border: 1px solid #e9d9db; border-radius: 8px; outline: none; background: #fffdfd; color: var(--ink); }
input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(235, 116, 124, .12); }
.primary-button, .secondary-button { width: 100%; min-height: 48px; margin-top: 10px; border-radius: 7px; font-weight: 800; }
.primary-button { border: 1px solid var(--red-dark); background: var(--red); color: #fff; box-shadow: 0 6px 0 var(--red-dark); }
.start-panel > .primary-button { margin-bottom: 6px; }
.primary-button:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--red-dark); }
.secondary-button { border: 1px solid #eadcde; background: #fff; color: #59454a; }
.secondary-button:active { background: #fff4f3; }
.history-button { width: 100%; min-height: 48px; margin-top: 10px; border: 1px solid var(--ink); border-radius: 7px; background: var(--ink); color: #fff; font-weight: 900; }

.quiz-screen { display: flex; flex-direction: column; }
.game-header { min-height: 38px; }
.brand-small { font-size: 22px; font-weight: 900; }
.round-label { color: var(--muted); font-size: 13px; font-weight: 800; }
.progress { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin: 25px 0 23px; }
.progress i { height: 6px; border-radius: 999px; background: #eddfe0; }.progress i.on { background: var(--red); }
.word-stage { flex: 1; display: flex; align-items: center; justify-content: center; gap: clamp(6px, 2vw, 14px); min-height: 235px; margin: 14px 0; padding: 24px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 16px 36px rgba(90, 53, 57, .06); overflow: hidden; }
.color-word { flex: 0 1 auto; min-width: 0; max-width: 31%; font-weight: 900; line-height: 1.05; white-space: nowrap; text-align: center; text-shadow: 0 1px 0 rgba(255,255,255,.25); animation: word-in .32s ease-out; }
.color-word.color-word-white { text-shadow: -1px -1px 0 #6b5b60, 0 -1px 0 #6b5b60, 1px -1px 0 #6b5b60, -1px 0 0 #6b5b60, 1px 0 0 #6b5b60, -1px 1px 0 #6b5b60, 0 1px 0 #6b5b60, 1px 1px 0 #6b5b60; }
@supports (-webkit-text-stroke: 1px #6b5b60) { .color-word.color-word-white { -webkit-text-stroke: 1px #6b5b60; text-shadow: none; } }
@keyframes word-in { from { opacity: .15; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.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 var(--line); border-radius: 8px; background: #fffdfd; box-shadow: 0 8px 22px rgba(90, 53, 57, .05); transition: border-color 180ms ease, background 180ms ease; }
.speech-caption.live, .speech-caption.listening { border-color: #e6c7cb; background: #fffafa; }
.speech-caption.done { border-color: #d8e7dd; background: #fbfefc; }
.speech-caption.error, .speech-caption.timeout { background: #faf7f8; }
.caption-speaker { align-self: stretch; display: flex; align-items: center; justify-content: center; padding-right: 12px; border-right: 1px solid var(--line); color: var(--red-dark); 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: var(--red-dark); 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: 114px; margin-top: 0; padding: 12px 14px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fffdfd; box-shadow: 0 10px 24px rgba(90, 53, 57, .05); text-align: center; }
.answer-dock.listening { border-color: #e6c7cb; background: #fffafa; }
.answer-dock.done { border-color: #d8e7dd; background: #fbfefc; }
.answer-dock.error { border-color: #e6d7da; background: #fffafa; }
.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: 30px; border-radius: 3px; background: #dfc9cc; transform: scaleY(.22); transition: transform 90ms linear, background 180ms ease; }
.answer-dock.listening .listening-indicator i { background: var(--red); }
.answer-dock.processing .listening-indicator i { background: var(--red-dark); 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: var(--green); transform: scaleY(.55) !important; }
.answer-dock.error .listening-indicator i { background: #a5989b; 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: var(--red-dark); }
.answer-dock.done .listening-status { color: var(--green); }
.voice-support { min-height: 18px; margin: 2px 0 7px; color: var(--muted); font-size: 12px; line-height: 1.35; text-align: center; }
.voice-actions { min-height: 42px; 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: 7px; font-size: 13px; font-weight: 900; }
.stop-answer-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #e6d5d8; background: #fff; color: #59454a; }
.stop-answer-button span { width: 10px; height: 10px; border-radius: 2px; background: var(--red-dark); }
.retry-answer-button { border: 1px solid var(--red-dark); background: var(--red); color: #fff; }
.stop-answer-button:active, .retry-answer-button:active { transform: translateY(1px); }

.result-screen { padding-top: 35px; text-align: center; }
.result-screen h1 { font-size: 35px; }.result-lead { margin: 10px 0 20px; color: var(--muted); font-size: 15px; }
.brain-balance { margin: 0 0 18px; padding: 15px 16px 13px; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-align: left; }
.brain-balance-head, .balance-scale { display:flex; align-items:center; justify-content:space-between; }
.brain-balance-head { color: var(--ink); font-size: 13px; font-weight: 900; }.brain-balance-head b { color: var(--red-dark); font-size: 19px; }
.brain-balance-art { display:grid; place-items:center; margin:10px 0 13px; text-align:center; }
.brain-balance-art img { display:block; width:min(100%, 400px); height:auto; aspect-ratio:640 / 312; border-radius:0; object-fit:contain; }
.balance-track { position:relative; height:9px; overflow:visible; border-radius:999px; background:linear-gradient(90deg,#e8d5d8,#f4d17c 50%,#9bd8c0); }.balance-track span { display:block; width:0; height:100%; border-radius:inherit; background:linear-gradient(90deg,#f04438,#8b5cf6); transition:width .55s ease; }.balance-track i { position:absolute; top:50%; left:0; width:15px; height:15px; border:3px solid #fff; border-radius:50%; background:var(--ink); box-shadow:0 0 0 2px var(--ink); transform:translate(-50%,-50%); transition:left .55s ease; }
.balance-scale { margin-top:8px; color:var(--muted); font-size:11px; font-weight:800; }.balance-scale span:nth-child(2) { color:var(--ink); }
.review-card { margin: 0 0 12px; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-align: left; }
.answer-review { display: block; }
.answer-review .review-row { display: block; padding: 15px 16px; border-bottom: 1px solid #f3e6e7; }
.answer-review .review-row:last-child { border-bottom: 0; }
.review-row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.review-row-head b { font-size: 15px; }
.review-row-head i { color: var(--muted); font-size: 12px; font-style: normal; font-weight: 800; }
.review-row.correct .review-row-head i { color: var(--green); }
.review-answer-block > small { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 800; }
.review-colors { display: grid; gap: 5px; }
.review-colors span { display: grid; grid-template-columns: 24px 1fr; align-items: center; min-height: 30px; padding: 4px 8px; border-radius: 5px; background: #fff7f6; color: var(--ink); }
.review-colors em { color: var(--red-dark); font-size: 11px; font-style: normal; font-weight: 900; }
.review-colors b { font-size: 14px; }
.review-row p { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.ranking-block { overflow: hidden; margin: 0 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-align: left; }
.ranking-title { padding: 15px 16px 12px; border-bottom: 1px solid #f3e6e7; }.ranking-title b { font-size: 15px; }.ranking-title span { color: var(--muted); font-size: 11px; font-weight: 700; }
.ranking-list { min-height: 52px; }.rank-row { display: grid; grid-template-columns: 29px 1fr auto; gap: 7px; align-items: center; padding: 9px 16px; border-bottom: 1px solid #f6eeee; font-size: 13px; }.rank-row:last-child { border-bottom: 0; }.rank-row.current { background: #fff2f1; }.rank-no { color: var(--red-dark); font-weight: 900; }.rank-name { min-width:0; font-weight:800; }.rank-name b { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.rank-name small { display:block; margin-top:3px; color:var(--muted); font-size:11px; }.rank-score { color: var(--muted); font-size: 12px; }.rank-empty { padding: 18px 16px; color: var(--muted); font-size: 13px; text-align: center; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 5; max-width: calc(100vw - 44px); padding: 11px 16px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; transform: translateX(-50%); box-shadow: 0 10px 26px rgba(42, 32, 36, .22); }
.modal { position: fixed; inset: 0; z-index: 10; display: grid; place-items: end center; padding: 18px; }.modal-backdrop { position: absolute; inset: 0; background: rgba(42,32,36,.32); }.modal-card { position: relative; width: min(100%, 480px); max-height: min(78dvh, 650px); overflow: auto; border-radius: 12px 12px 8px 8px; background: #fff9f8; box-shadow: 0 20px 60px rgba(42,32,36,.22); }.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 16px; border-bottom: 1px solid var(--line); }.modal-head span,.modal-head b { display:block; }.modal-head span { color: var(--red-dark); font-size: 12px; font-weight: 900; }.modal-head b { margin-top: 3px; font-size: 22px; }.modal-close { border:0; border-radius: 6px; padding: 8px 10px; background:#fff; color:var(--muted); font-size:12px; font-weight:800; }.modal-close.changelog-close { display:grid; place-items:center; width:30px; height:30px; border-radius:50%; padding:0; background:#172033; color:#fff; font-size:21px; line-height:1; }.modal-content { padding: 12px 20px 22px; }.changelog-card { overflow:hidden; }.changelog-list { max-height: calc(min(78dvh, 650px) - 76px); overflow:auto; padding:4px 20px 18px; }.changelog-item { padding:14px 0; border-bottom:1px solid var(--line); }.changelog-item:last-child { border-bottom:0; }.changelog-item b { display:block; color:var(--ink); font-size:14px; }.changelog-item p { margin:6px 0 0; color:var(--muted); font-size:13px; line-height:1.55; }.history-item { display:grid; grid-template-columns:1fr auto; gap:8px; padding:14px 0; border-bottom:1px solid #f1e6e7; }.history-item:last-child { border-bottom:0; }.history-item b { font-size:15px; }.history-item span { color:var(--muted); font-size:12px; }.history-item i { align-self:center; color:var(--red-dark); font-size:14px; font-style:normal; font-weight:900; }.history-empty { padding:30px 4px; color:var(--muted); font-size:14px; text-align:center; }
#historyModal { place-items: center; padding: 22px; }
.credits-page { padding-top: 32px; }.credits-back { display:block; width:fit-content; margin:0 0 24px; padding:10px 14px; border-radius:999px; background:var(--ink); color:#fff; font-size:13px; font-weight:900; text-decoration:none; }.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; }.model-list { display:grid; gap:10px; }.team-list div { border:1px solid #efe6db; border-radius:18px; padding:18px; background:#fff; box-shadow:0 12px 30px rgba(90,53,57,.07); }.team-list span,.model-row span,.model-row small,.model-row strong { display:block; color:var(--muted); font-size:13px; font-weight:800; }.team-list b { display:block; margin-top:5px; font-size:24px; }.model-panel { margin-top:26px; padding-bottom:28px; }.model-row { border:1px solid #f0e2e4; border-radius:14px; padding:14px; background:#fff; box-shadow:0 10px 24px rgba(42,32,36,.06); }.model-row span { color:var(--red-dark); font-size:12px; font-weight:900; }.model-row b { display:block; margin-top:5px; font-size:18px; line-height:1.25; }.model-row strong { margin-top:4px; color:var(--red-dark); font-size:13px; line-height:1.35; }.model-row small { margin-top:7px; line-height:1.45; font-size:12px; font-weight:800; }
@media (max-height: 650px) { .welcome-hero { padding-top: 27px; padding-bottom: 17px; }.rule-board { min-height: 172px; }.sample-row { margin-bottom: 20px; }.word-stage { min-height: 170px; }.quiz-screen { min-height: calc(100vh - 48px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }.caption-char.incoming { animation: none; }.caption-cursor { animation: none !important; opacity: .65 !important; } }
.feedback-form { display:grid; gap:12px; padding:18px 20px 22px; }
.feedback-form textarea { width:100%; resize:vertical; padding:12px; border:1px solid var(--line); border-radius:7px; background:#fff; color:var(--ink); font:inherit; line-height:1.55; outline:none; }
.feedback-form textarea:focus { border-color:var(--red); box-shadow:0 0 0 3px rgba(198,74,82,.1); }
.modal-close { display:grid; place-items:center; width:30px; height:30px; border-radius:50%; padding:0; background:#172033; color:#fff; font-size:21px; line-height:1; }
.ranking-columns { display:grid; grid-template-columns:29px 1fr auto; gap:7px; padding:11px 20px 0; color:var(--muted); font-size:11px; font-weight:800; }
.ranking-columns span:last-child { text-align:right; }

/* 0.2.005 answer stage redesign */
.quiz-screen {
  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: auto;
  padding-top: 2px;
  text-align: center;
}
.quiz-screen .game-header {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  min-height: 66px;
}
.quiz-screen .brand-small {
  font-size: 24px;
  line-height: 1;
}
.quiz-screen .round-label {
  font-size: 12px;
  line-height: 1.2;
}
.quiz-screen .progress {
  margin: 16px 0 14px;
}
.quiz-screen .word-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: clamp(28px, 7dvh, 56px) 10px;
  border: 0;
  border-radius: 8px;
  background: #fffdfc;
  box-shadow: none;
}
.quiz-screen .word-stage::before {
  content: none;
  position: absolute;
  inset: 14px 10px;
  border-radius: 8px;
  background: #fffdfc;
  box-shadow: 0 20px 44px rgba(90, 53, 57, .09);
}
.quiz-screen .color-word {
  position: relative;
  z-index: 1;
}
.quiz-screen .speech-caption {
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 6px;
  min-height: 94px;
  margin: 18px 0 10px;
  padding: 16px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  text-align: center;
}
.quiz-screen .speech-caption.live,
.quiz-screen .speech-caption.listening {
  background: #fff7f6;
}
.quiz-screen .speech-caption.done {
  background: #f7fcf8;
}
.quiz-screen .caption-speaker {
  align-self: auto;
  padding: 0;
  border-right: 0;
  color: var(--red-dark);
  font-size: 12px;
  line-height: 1.2;
}
.quiz-screen .caption-line {
  width: 100%;
  min-height: 38px;
  justify-content: center;
  text-align: center;
}
.quiz-screen .recognition-text {
  width: 100%;
  font-size: 20px;
  line-height: 1.35;
  text-align: center;
}
.quiz-screen .recognition-text.placeholder {
  font-size: 14px;
}
.quiz-screen .answer-dock {
  min-height: 126px;
  padding: 15px 16px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}
.quiz-screen .answer-dock.listening {
  background: transparent;
}
.quiz-screen .answer-dock.done {
  background: transparent;
}
.quiz-screen .answer-dock.error {
  background: transparent;
}
.quiz-screen .listening-indicator {
  height: 38px;
  margin-bottom: 4px;
}
.quiz-screen .listening-status {
  min-height: 28px;
  font-size: 16px;
  line-height: 28px;
}
.quiz-screen .voice-actions {
  min-height: 42px;
}

@media (max-height: 700px) {
  .quiz-screen .game-header {
    min-height: 52px;
  }
  .quiz-screen .progress {
    margin: 10px 0 10px;
  }
  .quiz-screen .word-stage {
    min-height: 0;
    padding-block: 22px;
  }
  .quiz-screen .speech-caption {
    min-height: 78px;
    margin-top: 12px;
    padding: 12px;
  }
  .quiz-screen .answer-dock {
    min-height: 108px;
    padding: 12px;
  }
}

/* Product polish: preserve screen order, game colors and voice states. */
#welcome .welcome-hero { padding: 24px 4px; }
#welcome h1 { font-size: 36px; line-height: 1.2; }
#welcome .intro { margin-top: 8px; font-weight: 400; line-height: 1.5; }
#welcome .rule-board { min-height: 136px; padding: 24px 12px 16px; box-shadow: none; }
#welcome .sample-row { margin-bottom: 16px; }
#welcome .answer-hint { padding: 0; background: transparent; color: var(--muted); font-weight: 400; line-height: 1.5; }
#welcome .voice-ready-note { margin-top: 16px; padding: 8px 0 16px; border: 0; background: transparent; box-shadow: none; }
#welcome .voice-ready-note strong { font-weight: 600; }
#welcome .voice-ready-note p span { font-size: 13px; font-weight: 400; line-height: 1.5; }
#welcome .start-panel { margin-top: 8px; padding: 0; border: 0; background: transparent; box-shadow: none; }
#welcome .start-panel label { font-size: 14px; font-weight: 500; }
#welcome .version-chip, #welcome .credits-link { min-height: 44px; font-weight: 500; }
#welcome .credits-link { display: inline-flex; align-items: center; }
#welcome input { font-size: 16px; }
#welcome .history-button { min-height: 44px; border-color: var(--line); background: white; color: var(--muted); font-size: 14px; font-weight: 500; }
#welcome .secondary-button { min-height: 44px; font-size: 14px; font-weight: 500; }
#welcome .home-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
#welcome .home-links button { width: 100%; min-height: 44px; margin: 0; padding: 9px 4px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--ink); font-size: 13px; font-weight: 700; line-height: 1.5; box-shadow: none; }
#welcome .home-links button:hover { color: var(--ink); }
#welcome .home-links button:active { background: #fbeef0; transform: none; }
#welcome .home-footer { display: flex; justify-content: center; margin-top: 18px; }
#welcome .home-footer a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 8px 12px; color: var(--muted); font-size: 13px; font-weight: 700; line-height: 1.5; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
#welcome .home-footer a:hover { color: var(--ink); }
#welcome .home-footer img { width: 18px; height: 18px; flex: 0 0 auto; object-fit: contain; }
.primary-button { min-height: 48px; padding: 12px 16px; border-radius: 8px; background: #f0cdd1; color: #542d35; border-color: #d89ba2; box-shadow: 0 3px 0 #d89ba2; font-size: 16px; font-weight: 800; }
.primary-button:active { transform: translateY(2px); background: #e9bdc3; box-shadow: 0 1px 0 #d89ba2; }
.primary-button:disabled { opacity: .7; cursor: wait; }
.feedback-button { min-height: 44px; 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; }
#quiz .recognition-text { font-size: 18px; font-weight: 600; }
#quiz .recognition-text.placeholder { font-size: 14px; font-weight: 400; }
#quiz .listening-status { font-weight: 600; }
#quiz .stop-answer-button, #quiz .retry-answer-button { min-height: 44px; font-size: 14px; font-weight: 600; }
#quiz .retry-answer-button { background: #f0cdd1; color: #542d35; }
#roundResult h1 { font-size: 30px; line-height: 1.25; }
#roundResult .brain-balance, #roundResult .review-card, #roundResult .ranking-block { border: 0; border-radius: 0; background: transparent; }
#roundResult .review-colors span { background: transparent; padding-inline: 0; }
#roundResult .review-row p, #roundResult .review-answer-block > small, #roundResult .ranking-title span, #roundResult .rank-name small, #roundResult .rank-score { font-size: 13px; font-weight: 400; }
#roundResult .brain-balance-head, #roundResult .review-row-head i, #roundResult .balance-scale { font-weight: 500; }
.eyebrow { letter-spacing: 0; }
.modal-close { min-width: 44px; min-height: 44px; }

/* Shared interaction standards aligned with Sound Detective 0.2.048. */
body { line-height: 1.5; }
.app-shell { padding-inline: 20px; }
#welcome .version-chip, #welcome .credits-link { font-size: 12px; font-weight: 700; }
.version-chip { gap: 6px; }
.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; }
#welcome .intro { font-weight: 600; }
#welcome .voice-ready-note { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; margin: 16px 0 18px; padding: 0; }
.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; }
#welcome .voice-ready-note strong { font-weight: 800; }
#welcome .voice-ready-note p span { margin-top: 1px; font-size: 12px; font-weight: 600; }
#welcome .start-panel label { font-size: 13px; font-weight: 800; }
#welcome .start-panel > .primary-button { margin-top: 10px; margin-bottom: 2px; }
#quiz .game-header { min-height: 56px; gap: 4px; }
#quiz .brand-small { font-size: 22px; }
#quiz .progress { margin: 12px 0 14px; gap: 6px; }
#quiz .progress i { height: 5px; }
#quiz .word-stage { border: 1px solid var(--line); }
#quiz .answer-wrap { flex: 0 0 auto; display: grid; gap: 0; margin-top: 14px; 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; margin: 0; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: #fff; text-align: left; }
#quiz .speech-caption.live, #quiz .speech-caption.listening, #quiz .answer-dock.listening { background: #fffafa; }
#quiz .speech-caption.done, #quiz .answer-dock.done { background: #f8fcf9; }
#quiz .speech-caption.error, #quiz .speech-caption.timeout, #quiz .answer-dock.error { background: #fff8f9; }
#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; font-weight: 900; text-align: left; }
#quiz .recognition-text.placeholder { font-size: 14px; font-weight: 700; }
#quiz .answer-dock { min-height: 104px; padding: 12px 14px; border: 0; border-radius: 0; background: #fff; }
#quiz .listening-indicator { height: 32px; margin-bottom: 2px; }
#quiz .listening-status { min-height: 24px; line-height: 24px; }
.modal, #historyModal { place-items: center; padding: 16px; }
.modal-card { width: min(100%, 430px); max-height: min(78dvh, 620px); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 18px 48px rgba(42,32,36,.14); }
.modal-head { align-items: flex-start; gap: 16px; padding: 16px; }
.modal-head b { margin-top: 2px; font-size: 17px; }
.modal-head .modal-close { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 0; background: transparent; color: var(--muted); font-size: 26px; font-weight: 400; }
.changelog-list { max-height: calc(min(78dvh, 620px) - 86px); padding: 4px 16px 16px; }
.modal-content { padding: 4px 16px 16px; }
.changelog-item p { line-height: 1.5; }
.changelog-group { margin-top: 14px; }
.changelog-group h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; font-size: 13px; font-weight: 700; }
.changelog-group h3 span { font-size: 12px; color: var(--muted); }
.changelog-group ul { margin: 6px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.6; }
.changelog-group li { margin-top: 8px; overflow-wrap: anywhere; }
.changelog-group details { margin-top: 4px; color: var(--muted); font-size: 12px; }
.changelog-group summary { cursor: pointer; }
.changelog-group .changelog-empty, .changelog-item .changelog-meta { font-size: 12px; }
.feedback-form { padding: 18px; }
#rankingModal { place-items: end center; }
#rankingModal .modal-card { width: min(100%, 480px); }
.ranking-columns { padding: 12px 16px 0; }
#roundResult h1 { margin: 8px 0 16px; font-size: 28px; }
.result-screen { padding-top: 20px; }
.rank-row { padding: 12px 16px; }
.rank-row.current { border-radius: 8px; box-shadow: none; }
.model-row strong { color: #2d6cf5; }
.model-row span { color: var(--red-dark); }
.team-list b, .model-row b { color: var(--ink); }
@media (max-width: 380px) { .app-shell { padding-inline: 16px; } #roundResult h1 { font-size: 26px; } }
@media (max-height: 700px) { #quiz .game-header { min-height: 48px; } #quiz .progress { margin: 8px 0 10px; } }
