:root {
  --paper: #f4efe3;
  --paper-2: #ebe4d3;
  --card: #fbf8f1;
  --ink: #102b1f;
  --ink-2: #3d5247;
  --ink-3: #6b7a70;
  --line: #d8cfba;
  --brand: #123524;
  --brand-2: #1c4a33;
  --accent: #d69e1c;
  --free: #1d7446;
  --free-bg: #dcefe1;
  --p1: #9a5a00;
  --p1-bg: #f6e6c7;
  --p2: #a3261d;
  --p2-bg: #f6dcd6;
  --none: #7a2e22;
  --none-bg: #efdcd3;
  --info: #24506b;
  --info-bg: #dce8ef;
  --font-display: 'Zodiak', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Satoshi', -apple-system, 'Segoe UI', system-ui, sans-serif;
  --r: 14px;
  --tab-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d1a14; --paper-2: #13241c; --card: #152a20; --ink: #eee8d8; --ink-2: #c2c9bd; --ink-3: #8f9b92;
    --line: #2a3e33; --brand: #e9e2cf; --brand-2: #d7cfb9; --accent: #e5b33a;
    --free: #7fd3a1; --free-bg: #173a27; --p1: #f0c070; --p1-bg: #3a2c12; --p2: #f19a8f; --p2-bg: #3d1a16;
    --none: #eea493; --none-bg: #3a1f19; --info: #9cc7e2; --info-bg: #15303f;
  }
}

[hidden] { display: none !important; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

.app {
  max-width: 520px; margin: 0 auto; min-height: 100dvh; position: relative;
  display: flex; flex-direction: column;
  border-left: 1px solid transparent; border-right: 1px solid transparent;
}
@media (min-width: 600px) { .app { border-color: var(--line); } }

/* top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + var(--safe-t)) 20px 10px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--brand); text-decoration: none; }
.logo { width: 34px; height: 34px; }
.brand-name { position: relative; display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1; letter-spacing: -0.01em; padding-left: .3em; }
.wm-flag .flag { fill: var(--flag, #ebc23f); }
.wm-flag { position: absolute; left: 0; top: 0; height: 1em; width: .44em; overflow: visible; }
.edition { font-size: 13px; color: var(--ink-3); font-weight: 500; letter-spacing: 0.02em; }

.views { flex: 1; position: relative; }
.view { display: none; padding: 0 20px calc(var(--tab-h) + var(--safe-b) + 24px); }
.view.active { display: block; }

/* ASK: idle */
.view-ask { display: none; flex-direction: column; min-height: calc(100dvh - 60px - var(--tab-h)); }
.view-ask.active { display: flex; }
.ask-idle { padding: 9vh 4px 0; }
.prompt-kicker { font-size: 14px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.prompt-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(32px, 9vw, 42px); line-height: 1.08; letter-spacing: -0.015em; color: var(--brand); max-width: 12ch; }

/* mic dock */
.mic-dock { margin-top: auto; padding-top: 28px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.transcript { min-height: 1.5em; text-align: center; font-size: 19px; color: var(--ink-2); font-weight: 500; max-width: 32ch; }
.transcript.live::after { content: '▍'; animation: blink 1s steps(1) infinite; color: var(--accent); margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.mic {
  position: relative; width: 112px; height: 112px; border-radius: 50%;
  background: var(--brand); color: var(--paper);
  display: grid; place-items: center;
  box-shadow: 0 10px 30px -10px rgba(18, 53, 36, .55), inset 0 -3px 0 rgba(0,0,0,.18);
  transition: transform .15s ease, width .25s ease, height .25s ease;
}
@media (prefers-color-scheme: dark) { .mic { color: #0d1a14; } }
.mic svg { width: 44px; height: 44px; }
.mic:active { transform: scale(.96); }
.mic-ring { position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; }
.mic.listening { background: var(--accent); color: #1a1405; }
.mic.listening .mic-ring { animation: pulse 1.4s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
.mic-hint { font-size: 14px; color: var(--ink-3); font-weight: 500; }

.typebox { width: 100%; display: flex; gap: 8px; margin-top: 8px; }
.typebox input {
  flex: 1; min-width: 0; height: 52px; padding: 0 16px; border-radius: var(--r);
  border: 1.5px solid var(--line); background: var(--card); font-size: 16px;
}
.typebox input::placeholder { color: var(--ink-3); }
.typebox input:focus { outline: none; border-color: var(--brand-2); }
.typebox button { width: 52px; height: 52px; border-radius: var(--r); background: var(--brand); color: var(--paper); display: grid; place-items: center; flex-shrink: 0; }
@media (prefers-color-scheme: dark) { .typebox button { color: #0d1a14; } }
.typebox button svg { width: 22px; height: 22px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding-top: 4px; }
.chip {
  padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: transparent;
  font-size: 14px; font-weight: 500; color: var(--ink-2); min-height: 40px;
}
.chip:active { background: var(--paper-2); }

/* compact dock once a result is showing */
.has-result .ask-idle { display: none; }
.has-result .mic-dock {
  position: sticky; bottom: calc(var(--tab-h) + var(--safe-b)); margin: 20px -20px 0; padding: 12px 16px 12px;
  background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  flex-direction: row; flex-wrap: wrap; gap: 10px; align-items: center;
}
.has-result .mic { width: 52px; height: 52px; order: 1; box-shadow: none; flex-shrink: 0; }
.has-result .mic svg { width: 24px; height: 24px; }
.has-result .typebox { flex: 1; order: 2; margin: 0; }
.has-result .mic-hint, .has-result .chips { display: none; }
.has-result .transcript { order: 0; width: 100%; font-size: 15px; min-height: 0; text-align: left; }
.has-result .transcript:empty { display: none; }
.has-result .view-ask { min-height: 0; }

/* RESULT */
.result { padding-top: 8px; }
.result.enter { animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.said { font-size: 14px; color: var(--ink-3); margin-bottom: 14px; }
.said q { color: var(--ink-2); font-style: normal; }
.verdict {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 12px; border-radius: 999px;
  font-weight: 700; font-size: 15px; letter-spacing: .01em;
}
.verdict::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.v-free { color: var(--free); background: var(--free-bg); }
.v-penalty1 { color: var(--p1); background: var(--p1-bg); }
.v-penalty2 { color: var(--p2); background: var(--p2-bg); }
.v-none { color: var(--none); background: var(--none-bg); }
.v-info { color: var(--info); background: var(--info-bg); }
.result h2 { font-family: var(--font-display); font-weight: 500; font-size: 28px; line-height: 1.15; letter-spacing: -0.01em; color: var(--brand); margin: 14px 0 12px; }
.answer { font-size: 18px; line-height: 1.55; color: var(--ink); }
.loc-note { margin-top: 10px; font-size: 14px; color: var(--ink-3); }

.speak-row { display: flex; gap: 10px; margin: 18px 0 26px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 12px;
  font-weight: 700; font-size: 15px; border: 1.5px solid var(--line); background: var(--card);
}
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--brand); color: var(--paper); border-color: var(--brand); }
@media (prefers-color-scheme: dark) { .btn.primary { color: #0d1a14; } }
.btn.speaking { border-color: var(--accent); }
.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; }
.eq i { width: 3px; background: currentColor; border-radius: 2px; animation: eq .9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .15s; } .eq i:nth-child(3) { animation-delay: .3s; }
@keyframes eq { 0%,100% { height: 4px; } 50% { height: 14px; } }

.section-label { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 10px; }
.options { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; counter-reset: opt; }
.option {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px 14px 52px; position: relative;
  counter-increment: opt;
}
.option::before {
  content: counter(opt); position: absolute; left: 14px; top: 14px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand); color: var(--paper); font-weight: 700; font-size: 14px; display: grid; place-items: center;
}
@media (prefers-color-scheme: dark) { .option::before { color: #0d1a14; } }
.option-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.option-title { font-weight: 700; font-size: 17px; line-height: 1.3; }
.pen { font-size: 12.5px; font-weight: 700; white-space: nowrap; padding: 3px 8px; border-radius: 6px; flex-shrink: 0; }
.pen.p0 { color: var(--free); background: var(--free-bg); }
.pen.p1 { color: var(--p1); background: var(--p1-bg); }
.pen.p2 { color: var(--p2); background: var(--p2-bg); }
.pen.px { color: var(--info); background: var(--info-bg); }
.option-detail { font-size: 15px; color: var(--ink-2); margin-top: 4px; line-height: 1.45; }

.note { border-left: 3px solid var(--accent); padding: 4px 0 4px 14px; font-size: 15px; color: var(--ink-2); margin-bottom: 24px; }

.refs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.ref {
  display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
  padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: transparent; min-height: 54px;
}
.ref:active { background: var(--paper-2); }
.ref-num { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--brand); min-width: 3.8em; }
.ref-title { flex: 1; font-size: 15px; color: var(--ink-2); line-height: 1.3; }
.ref svg { width: 18px; height: 18px; color: var(--ink-3); flex-shrink: 0; }

.alts { margin-bottom: 18px; }
.alts .chips { justify-content: flex-start; }
.disclaimer { font-size: 13px; color: var(--ink-3); line-height: 1.45; padding-bottom: 8px; }

.nomatch h2 { margin-top: 4px; }

/* BOOK */
.book-head { position: sticky; top: 0; background: var(--paper); padding: 6px 0 12px; z-index: 2; }
.view-title { font-family: var(--font-display); font-weight: 500; font-size: 28px; color: var(--brand); margin-bottom: 10px; }
#bookSearch {
  width: 100%; height: 48px; border-radius: var(--r); border: 1.5px solid var(--line); background: var(--card); padding: 0 16px; font-size: 16px;
}
#bookSearch:focus { outline: none; border-color: var(--brand-2); }
.book-list, .history-list { list-style: none; display: flex; flex-direction: column; }
.book-item { border-bottom: 1px solid var(--line); }
.book-item button { width: 100%; text-align: left; display: flex; gap: 14px; align-items: baseline; padding: 14px 2px; }
.book-item .n { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--brand); min-width: 2.4em; }
.book-item .t { font-size: 16px; line-height: 1.35; }
.book-item .s { display: block; font-size: 13.5px; color: var(--ink-3); margin-top: 3px; line-height: 1.4; }
.book-item mark { background: var(--p1-bg); color: inherit; border-radius: 3px; padding: 0 2px; }
.empty { color: var(--ink-3); padding: 30px 4px; font-size: 16px; }

.history-item button { width: 100%; text-align: left; padding: 14px 2px; border-bottom: 1px solid var(--line); display: block; }
.history-item .h-t { font-weight: 700; font-size: 16px; }
.history-item .h-q { font-size: 14px; color: var(--ink-3); margin-top: 2px; }

/* TABBAR */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 520px;
  height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: flex; background: var(--paper); border-top: 1px solid var(--line); z-index: 10;
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.tab svg { width: 24px; height: 24px; }
.tab.active { color: var(--brand); }

/* SHEET */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(8, 20, 14, .45); z-index: 20; animation: fade .2s ease both; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 520px;
  height: 88dvh; background: var(--card); border-radius: 20px 20px 0 0; z-index: 21;
  display: flex; flex-direction: column; animation: up .28s cubic-bezier(.2,.8,.2,1) both;
  box-shadow: 0 -10px 40px rgba(0,0,0,.18);
}
@keyframes up { from { transform: translate(-50%, 40px); opacity: 0; } }
.sheet-grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 0; }
.sheet-bar { display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 12px; border-bottom: 1px solid var(--line); }
.sheet-crumb { flex: 1; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.icon-btn svg { width: 22px; height: 22px; }
.sheet-body { overflow-y: auto; padding: 18px 22px calc(28px + var(--safe-b)); -webkit-overflow-scrolling: touch; }
.rule-num { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--accent); letter-spacing: .02em; }
.rule-title { font-family: var(--font-display); font-weight: 500; font-size: 26px; line-height: 1.18; color: var(--brand); margin: 4px 0 16px; letter-spacing: -0.01em; }
.rule-text p { font-family: var(--font-body); font-size: 17.5px; line-height: 1.6; margin-bottom: 12px; color: var(--ink); }
.rule-text p.b { padding-left: 18px; position: relative; }
.rule-text p.b::before { content: '•'; position: absolute; left: 2px; color: var(--accent); }
.rule-text p.bb { padding-left: 36px; position: relative; }
.rule-text p.bb::before { content: '–'; position: absolute; left: 18px; color: var(--ink-3); }
.rule-text p.ex { background: var(--paper-2); padding: 10px 12px; border-radius: 10px; font-size: 16px; }
.rule-text p.pen-line { font-family: var(--font-body); font-weight: 700; font-size: 15px; color: var(--p2); }
.rule-text h4 { font-family: var(--font-body); font-size: 15px; font-weight: 700; color: var(--brand); margin: 22px 0 8px; letter-spacing: .01em; }
.rule-text .defterm { color: inherit; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; cursor: pointer; background: none; border: 0; font: inherit; padding: 0; }
.sub-links { display: flex; flex-direction: column; gap: 6px; margin: 18px 0; }
.sheet-foot { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 14px; font-size: 13.5px; color: var(--ink-3); line-height: 1.5; }
.sheet-foot a { color: var(--brand-2); font-weight: 700; }

.toast { position: fixed; left: 0; right: 0; margin: 0 auto; width: fit-content; top: calc(80px + var(--safe-t)); pointer-events: none; background: var(--brand); color: var(--paper); padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 500; z-index: 40; max-width: 90vw; animation: rise .25s ease both; }
@media (prefers-color-scheme: dark) { .toast { color: #0d1a14; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.top-right { display: flex; align-items: center; gap: 4px; margin-right: -10px; }
.top-right .icon-btn { color: var(--ink-2); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.set-row:last-of-type { border-bottom: 0; }
.set-label { font-weight: 700; font-size: 16px; }
.set-help { font-size: 14px; color: var(--ink-3); margin-top: 2px; }
.switch { position: relative; width: 52px; height: 32px; border-radius: 999px; background: #b9b3a5; flex-shrink: 0; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--free); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.seg { display: flex; background: var(--paper-2); border-radius: 12px; padding: 3px; flex-shrink: 0; }
.seg button { padding: 8px 12px; border-radius: 9px; font-size: 14px; font-weight: 700; color: var(--ink-2); min-height: 38px; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--brand); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.set-about { font-size: 14px; color: var(--ink-3); line-height: 1.5; margin-top: 18px; }
.set-about a { color: var(--brand-2); font-weight: 700; }

/* Round context */
.round-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 20px 10px; }
.round-bar[hidden] { display: none; }
.round-k { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-right: 2px; }
.round-tag { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 4px 8px 4px 11px; border-radius: 999px; background: var(--paper-2); border: 1.5px solid var(--line); color: var(--ink); font-size: 13px; font-weight: 700; }
.round-tag svg { width: 14px; height: 14px; opacity: .8; }
.offer { margin: 22px 0 6px; padding: 16px; border-radius: var(--r); background: var(--card); border: 1.5px solid var(--accent); }
.offer-q { font-weight: 700; font-size: 17px; color: var(--ink); }
.offer-sub { margin-top: 4px; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.offer-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.btn.sm { min-height: 44px; padding: 0 16px; font-size: 15px; }

.offer-voice { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: 13px; color: var(--ink-3, var(--muted)); }
.offer-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); flex: none; transition: background .2s; }
.offer.listening .offer-dot { background: var(--accent, #d99a1e); animation: offerPulse 1.1s ease-in-out infinite; }
.offer.listening .offer-voice span:last-child::after { content: "\00a0\2014\00a0listening"; }
@keyframes offerPulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.6); opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .offer.listening .offer-dot { animation: none; } }

/* microphone permission fallback */
.mic.blocked { background: var(--paper-2); color: var(--ink-3); border: 2px dashed var(--line); box-shadow: none; }
.mic.blocked::after { content: ''; position: absolute; width: 58%; height: 2.5px; background: currentColor; border-radius: 2px; transform: rotate(-45deg); }
.offer-tap { border: 1.5px dashed var(--accent); background: transparent; border-radius: 999px; padding: 8px 14px; min-height: 40px; color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; }
.offer-tap svg { width: 18px; height: 18px; color: var(--accent); }
.mic-help { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.mic-help[hidden] { display: none; }
.mic-help-scrim { position: absolute; inset: 0; background: rgba(8, 20, 14, .45); animation: fade .2s ease both; }
.mic-help-card { position: relative; width: min(520px, 100%); max-height: 88vh; overflow: auto; background: var(--card); color: var(--ink); border-radius: 22px 22px 0 0; padding: 26px 22px calc(22px + var(--safe-b)); box-shadow: 0 -12px 40px -12px rgba(0,0,0,.35); animation: rise .25s ease both; }
@media (min-width: 640px) { .mic-help { align-items: center; } .mic-help-card { border-radius: 22px; } }
.mic-help-icon { position: relative; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); color: var(--brand); margin-bottom: 14px; }
.mic-help-icon svg { width: 26px; height: 26px; }
.mic-help-slash { position: absolute; width: 30px; height: 2.5px; background: #b4412a; border-radius: 2px; transform: rotate(-45deg); }
.mic-help-card h2 { font-family: var(--font-display); font-weight: 500; font-size: 26px; line-height: 1.15; color: var(--brand); }
.mic-help-body { margin-top: 8px; font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
.mic-help-steps { margin: 16px 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.mic-help-steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.4; font-weight: 500; }
.mic-help-steps li::before { content: counter(s); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: var(--paper); font-size: 13px; font-weight: 700; display: grid; place-items: center; margin-top: -1px; }
@media (prefers-color-scheme: dark) { .mic-help-steps li::before { color: #0d1a14; } }
.mic-help-tip { margin-top: 14px; font-size: 13.5px; line-height: 1.45; color: var(--ink-3); }
.mic-help-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.mic-help-btns .btn { flex: 1 1 140px; justify-content: center; }

/* sound toggle + big mute */
.sound-btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px 0 10px; border-radius: 999px; border: 1.5px solid var(--line); color: var(--ink-2); font-size: 14px; font-weight: 700; flex-shrink: 0; }
.sound-btn svg { width: 20px; height: 20px; }
.sound-btn.muted { background: var(--accent); border-color: var(--accent); color: #1a1405; }
.mute-bar {
  position: fixed; left: 0; right: 0; margin: 0 auto; z-index: 35;
  bottom: calc(var(--tab-h) + var(--safe-b) + 10px);
  width: min(calc(100% - 24px), 480px); min-height: 76px; padding: 12px 22px;
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; text-align: left;
  background: #b4412a; color: #fff; border-radius: 20px; box-shadow: 0 14px 34px -12px rgba(0,0,0,.45);
  animation: rise .2s ease both;
}
.mute-bar[hidden] { display: none; }
.mute-bar svg { grid-row: 1 / 3; width: 34px; height: 34px; }
.mute-bar-t { font-size: 22px; font-weight: 700; line-height: 1.1; }
.mute-bar-s { font-size: 13.5px; opacity: .9; }
.mute-bar:active { transform: scale(.98); }
@media (max-width: 440px) { .edition { display: none; } }

/* answer's main button: Mute while speaking, then Play again / Unmute */
#speakBtn { min-height: 56px; padding: 0 22px; font-size: 17px; gap: 10px; flex: 1 1 auto; justify-content: center; }
#speakBtn svg { width: 22px; height: 22px; }
#speakBtn.is-mute { background: #b4412a; border-color: #b4412a; color: #fff; }
#speakBtn.is-mute .eq { margin-left: 2px; }
#speakBtn.is-muted { background: var(--accent); border-color: var(--accent); color: #1a1405; }
.speak-row .btn:not(#speakBtn) { min-height: 56px; }
.set-row.set-col { flex-direction: column; align-items: stretch; gap: 12px; }
.seg.seg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.seg.seg-grid button { min-height: 44px; }

/* ---------- Casual options ---------- */
:root { --casual-bg: #e5ece0; --casual-line: #c3d3bd; --casual-k: #3f6b4f; }
@media (prefers-color-scheme: dark) { :root { --casual-bg: #173024; --casual-line: #2c4a3a; --casual-k: #8fc3a2; } }
.offer-casual { border: 1.5px solid var(--casual-line); background: var(--casual-bg); margin: 0 0 24px; }
.offer-casual .btn:not(.primary) { background: var(--card); }
.casual { margin: 0 0 24px; padding: 14px 16px 16px; border-radius: var(--r); background: var(--casual-bg); border: 1.5px solid var(--casual-line); }
.casual-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin-bottom: 8px; }
.casual-k { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--casual-k); }
.casual-basis { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); background: var(--card); }
.casual-basis.b-official { color: var(--info); background: var(--info-bg); border-color: transparent; }
.casual-basis.b-within { color: var(--free); background: var(--free-bg); border-color: transparent; }
.casual-basis.b-custom { color: var(--p1); background: var(--p1-bg); border-color: transparent; }
.casual-title { font-weight: 700; font-size: 16px; color: var(--ink); margin-bottom: 4px; }
.casual-body { font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.casual-caveat { margin-top: 10px; font-size: 13px; line-height: 1.45; color: var(--ink-3); }
.set-sub { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
