/* Arcade skin: shared layout and accessible states live in app.css. */
:root {
    --bg: #f2eedf;
    --surface-soft: #f8f5eb;
    --line: #d4cdbd;
    --muted: #605e58;
    --muted-strong: #45443f;
    --gold: #ffd25b;
    --font-display: Impact, Haettenschweiler, "Arial Black", sans-serif;
    --game-border: 2px solid var(--ink);
    --game-shadow: 5px 5px 0 var(--ink);
}
body { background-image: radial-gradient(#b9af943d 1px, transparent 1px); background-size: 18px 18px; }
.game-symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.game-icon, .hud-icon { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.background { display: none; }
.game-app { padding-block: 1.25rem 2.5rem; }
.shell { width: min(1240px, calc(100% - 3rem)); }
.topbar { grid-template-columns: minmax(190px, 1fr) minmax(370px, 1.3fr) auto; gap: 1.25rem; padding: 0.85rem 1.1rem; border: var(--game-border); border-radius: 18px; box-shadow: 0 4px 0 #19191b; }
.brand-mark { border: var(--game-border); border-radius: 13px; box-shadow: 2px 2px 0 var(--ink); }
.brand .eyebrow { margin: 0; font-size: 0.8rem; }
.brand-title { font-size: 1.15rem; font-weight: 850; letter-spacing: -0.03em; }
.brand-title span { display: block; font-size: 0.875rem; letter-spacing: 0; }
.stat-card { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 0 0.55rem; align-items: center; padding: 0.55rem 0.7rem; border: var(--game-border); border-radius: 12px; box-shadow: 2px 2px 0 #19191b; background: #fff; }
.hud-icon { grid-row: 1 / 3; width: 2rem; height: 2rem; }
.stat-coins { background: #fff0b7; }
.stat-coins .hud-icon { fill: #ffd25b; }
.stat-data .hud-icon { fill: #e60000; }
.stat-level .hud-icon { fill: #bde3d0; }
.stat-label { font-size: 0.875rem; }
.stat-value { margin: 0; font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.topbar-actions { display: grid; grid-template-columns: auto auto; max-width: 14rem; gap: 0.25rem 0.75rem; align-items: center; }
.status-pill { grid-column: 1 / -1; font-size: 0.8rem; text-align: right; }
.topbar-actions .ghost-button { font-size: 0.85rem; min-height: 2rem; }
.sound-button { border: 1px solid var(--ink); padding: 0.35rem 0.5rem; border-radius: 7px; background: #fff; color: var(--ink); font-size: 0.8rem; font-weight: 650; min-height: 2.5rem; }
.sound-button[aria-pressed="true"] { background: #d4efde; }
.game-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; margin: 1.25rem 0; }
.flow-nav { width: auto; flex-shrink: 0; gap: 0.25rem; border: 0; padding: 0; margin: 0; background: transparent; }
.flow-nav-button { flex: none; min-height: 2.5rem; padding: 0.5rem 1.1rem; border: 2px solid transparent; border-radius: 9px; font-size: 0.9rem; }
.flow-nav-button.is-active { border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); background: var(--gold); color: var(--ink); }
.flow-nav-button:disabled { color: #736e63; }
.experience-notice { max-width: 36rem; border: 0; border-radius: 0; background: transparent; padding: 0; margin: 0; font-size: 0.8rem; color: #625c4b; text-align: right; }
.panel { border: var(--game-border); border-radius: 18px; box-shadow: var(--game-shadow); }
.hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); border: var(--game-border); border-radius: 24px; background: #fffdf6; box-shadow: 7px 7px 0 var(--ink); }
.hero-grid.is-active { gap: 0; }
.hero-grid > .panel { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.hero-panel { gap: 1.1rem; padding: 2.25rem 1.75rem 1.75rem 2.5rem; }
.hero-eyebrow { padding: 0.35rem 0.65rem; background: #f9e3da; border: 1px solid var(--ink); border-radius: 6px; color: var(--ink); font-size: 0.8rem; letter-spacing: 0.06em; transform: rotate(-2deg); }
.hero-title { max-width: none; font-family: var(--font-display); font-size: clamp(3.6rem, 6.8vw, 6rem); font-weight: 900; letter-spacing: -0.025em; line-height: 1.05; white-space: nowrap; }
.hero-title span { display: inline; color: var(--red); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 4px 4px 0 var(--ink); }
.mission-tagline { max-width: 24ch; margin: 0; font-size: clamp(1.25rem, 2vw, 1.6rem); font-weight: 800; line-height: 1.3; }
.hero-copy { max-width: 38ch; font-size: 1.05rem; line-height: 1.6; }
.hero-action-row { grid-template-columns: minmax(0, 1fr) 3.5rem; gap: 0.75rem; margin-block: 0.25rem; }
.hero-actions { gap: 0.8rem; }
.hero-orbit { width: 3.5rem; border-width: 4px; box-shadow: inset 0 0 0 4px #ffe8af; }
.primary-button, .secondary-button, .inline-button { border: var(--game-border); border-radius: 10px; box-shadow: 3px 4px 0 var(--ink); font-weight: 750; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; }
.primary-button:hover:not(:disabled), .secondary-button:hover:not(:disabled), .inline-button:hover:not(:disabled) { border-color: var(--ink); transform: translate(-1px, -2px); box-shadow: 4px 6px 0 var(--ink); }
.primary-button:active:not(:disabled), .secondary-button:active:not(:disabled), .inline-button:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: none; }
.play-button { min-height: 3.4rem; padding-inline: 1.35rem; font-size: 1.15rem; }
.play-button::before { content: ""; border-left: 11px solid currentColor; border-top: 7px solid transparent; border-bottom: 7px solid transparent; margin-right: 0.25rem; }
.hero-facts { border: 0; gap: 1.25rem; padding: 0.75rem 0 0; margin: 0; }
.hero-facts li { padding-left: 0.65rem; border-left: 3px solid var(--gold); }
.hero-facts strong { font-size: 1.4rem; font-weight: 850; line-height: 1.2; }
.hero-facts span { margin-top: 0.25rem; font-size: 0.875rem; }
.hero-footnote { font-size: 0.875rem; }
.portal-panel { padding: 1.75rem 2rem 1.5rem; gap: 0.6rem; }
.portal-heading { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; text-align: left; }
.sector-label { font-size: 0.75rem; font-weight: 750; letter-spacing: 0.07em; text-transform: uppercase; }
.loot-sticker { display: flex; align-items: center; gap: 0.55rem; flex-shrink: 0; padding: 0.45rem 0.7rem; border: var(--game-border); border-radius: 10px; background: var(--gold); box-shadow: 3px 3px 0 var(--ink); transform: rotate(5deg); }
.loot-sticker > span { font-size: 0.8rem; line-height: 1.2; }
.loot-sticker strong { display: block; font-size: 1.15rem; font-weight: 850; }
.portal-stage { width: min(100%, 21.5rem); background: radial-gradient(circle, #f9dfad77 0, #fffdf600 69%); }
.portal-stage::before, .portal-stage::after { content: "✦"; position: absolute; color: var(--ink); font-size: 1.7rem; }
.portal-stage::before { top: 15%; left: 2%; transform: rotate(10deg); }
.portal-stage::after { bottom: 10%; right: 5%; font-size: 1.2rem; }
.portal-rim { border-width: 2px; }
.rim-outer { border-style: dashed; animation: orbit-turn 90s linear infinite; }
.rim-middle { background: #ffecab33; }
.portal-core { width: 38%; min-width: 5.5rem; align-content: center; gap: 0.1rem; border-width: 3px; box-shadow: 5px 6px 0 var(--ink); transition: box-shadow 0.2s, background 0.2s; }
.portal-core:hover:not(:disabled) { background: #ff2424; box-shadow: 7px 9px 0 var(--ink); }
.portal-bolt { width: 2.4rem; height: 2.4rem; fill: var(--gold); stroke: var(--ink); stroke-width: 1.5; }
.portal-copy { max-width: none; font-size: 1rem; font-weight: 850; letter-spacing: 0.03em; }
.coin { width: 11%; border: 2px solid #2b271c; box-shadow: inset 0 0 0 3px #fff1b3, 2px 3px 0 #2b271c; }
.coin::after { content: "V"; display: grid; place-items: center; position: absolute; inset: 0; color: #705314; font-size: 1rem; font-weight: 900; }
.portal-bot { position: absolute; z-index: 4; width: 30%; height: auto; bottom: -1%; left: -1%; filter: drop-shadow(1px 2px 0 #19191b22); animation: bot-hover 4s ease-in-out infinite; pointer-events: none; }
.avatar-bubble { position: relative; max-width: 26rem; padding: 0.7rem 0.9rem; border: var(--game-border); border-radius: 4px 13px 13px; box-shadow: 3px 3px 0 #ddd4bd; background: #fff; }
.avatar-label { font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; }
.avatar-bubble strong { font-size: 0.95rem; line-height: 1.4; }
.world-route { grid-column: 1 / -1; padding: 1rem 2.5rem 1.4rem; border-top: 2px dashed #c9c2b1; background: #f6f1e4; border-radius: 0 0 22px 22px; }
.route-label { display: block; margin-bottom: 0.85rem; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.level-path { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; list-style: none; padding: 0; margin: 0; }
.path-level { position: relative; display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 0.7rem; align-items: center; min-width: 0; }
.path-level:not(:last-child)::after { content: ""; position: absolute; top: 1.5rem; right: -1.5rem; width: 1rem; border-top: 3px dotted #a49b87; }
.path-node { display: grid; place-items: center; width: 3rem; height: 3rem; border: var(--game-border); border-radius: 50%; background: #e4dfd2; box-shadow: 2px 3px 0 var(--ink); font-size: 1.3rem; font-weight: 850; }
.path-level.is-active .path-node { background: var(--red); color: #fff; }
.path-level.is-done .path-node { background: #bde3d0; }
.path-info strong { display: block; font-size: 0.95rem; line-height: 1.3; }
.path-info span { display: block; margin-top: 0.15rem; font-size: 0.875rem; line-height: 1.4; color: var(--muted); }
.path-info small { font-size: 0.8rem; color: #57513f; font-weight: 700; }
.mini-badge, .question-badge { border-color: var(--ink); border-radius: 7px; background: #fff0b7; color: var(--ink); font-weight: 700; }
.roadmap-card { border: var(--game-border); box-shadow: 3px 3px 0 #ddd4bd; background: #f8f5eb; }
.roadmap-card.is-active { border-color: var(--ink); background: #fff0b7; }
.roadmap-card.is-done { border-color: var(--ink); background: #e3f3e9; }
.game-rules li::marker { font-size: 1.2em; }
.field input { border: var(--game-border); background: #fffdf7; }
.question-panel { padding-top: 0; overflow: hidden; }
.mission-strip { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0 -1.75rem 1.5rem; padding: 0.65rem 1.4rem; background: var(--ink); color: #fff; font-size: 0.75rem; font-weight: 750; letter-spacing: 0.05em; }
#comboBadge { letter-spacing: 0; color: #ffe395; }
#comboBadge.is-hot { color: #fff; background: #a83c09; padding: 0.15rem 0.5rem; border-radius: 5px; }
.progress-track { height: 0.8rem; border: var(--game-border); background: #f1ecdd; }
.progress-fill { background: repeating-linear-gradient(120deg, #f6c54d 0 10px, #ffde79 10px 20px); border-right: 2px solid var(--ink); }
.question-shell { position: relative; }
.question-badge { background: #f8e7de; }
.answer-grid { gap: 1rem; }
.answer-button { border: var(--game-border); border-radius: 12px; box-shadow: 3px 4px 0 #d7d0bd; transition: background 0.15s, transform 0.15s, box-shadow 0.15s; }
.answer-button:hover:not(:disabled) { border-color: var(--ink); background: #fffae8; transform: translateY(-2px); box-shadow: 3px 6px 0 #c2b69b; }
.answer-key { border: var(--game-border); border-radius: 8px; background: #f2eedf; }
.answer-button.is-selected { border-color: var(--ink); background: #ffe89b; box-shadow: 3px 4px 0 var(--ink); }
.answer-button.is-selected .answer-key { background: var(--ink); color: #fff; }
.answer-button.is-correct { border-color: #235638; background: #dff3e5; box-shadow: 3px 4px 0 #235638; }
.answer-button.is-wrong { border-color: #a33628; background: #ffe8df; box-shadow: 3px 4px 0 #a33628; }
.answer-feedback { border-width: 2px; }
.level-summary { border: var(--game-border); border-radius: 10px; background: #fff0b7; font-weight: 650; }
.reward-burst { display: none; position: absolute; z-index: 5; top: 1.25rem; left: 50%; width: max-content; max-width: 95%; padding: 0.6rem 1.1rem; border: var(--game-border); border-radius: 12px; background: var(--gold); box-shadow: 4px 4px 0 var(--ink); color: var(--ink); font-size: 1.3rem; font-weight: 850; pointer-events: none; }
.reward-burst.is-playing { display: block; animation: coin-reward 1.4s both; }
.stat-coins.is-celebrating { animation: hud-reward 0.6s ease; }
.question-panel.is-level-up .mission-strip { animation: level-reward 1s ease; }
.pulse-panel { background: #fff8de; }
.pulse-panel .panel-heading h3 { font-family: var(--font-display); font-size: 1.8rem; letter-spacing: 0.02em; text-transform: uppercase; }
.tier-card { border: 1.5px solid #c5b88f; background: #fffdf4; }
.tier-card.is-active { border-color: var(--ink); background: #ffe89b; box-shadow: 2px 2px 0 var(--ink); }
.tier-card.is-cap { border-style: dashed; }
.reward-visual { border: var(--game-border); background: repeating-conic-gradient(from -10deg at 50% 43%, #ffebb4 0deg 15deg, #fff7df 15deg 30deg); }
.reward-ring { border: 2px dashed var(--ink); }
.reward-core { width: 10rem; border: 3px solid var(--ink); box-shadow: 5px 6px 0 var(--ink); background: var(--gold); color: var(--ink); }
.reward-core strong { font-family: var(--font-display); font-size: 3.5rem; }
.reward-panel.is-celebrating .reward-core { animation: prize-reward 0.8s ease; }
.reward-panel .panel-heading h3 { font-family: var(--font-display); font-size: 2.25rem; text-transform: uppercase; }
.redeem-form { border: var(--game-border); background: #fffdf6; }
.toast { border: var(--game-border); box-shadow: 3px 3px 0 var(--ink); }
@keyframes orbit-turn { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes bot-hover { 50% { transform: translateY(-5px) rotate(-3deg); } }
@keyframes coin-reward { 0% { opacity: 0; transform: translate(-50%, 25px) scale(0.7) rotate(-5deg); } 15%, 70% { opacity: 1; transform: translate(-50%, 0) scale(1) rotate(-3deg); } 100% { opacity: 0; transform: translate(-50%, -35px) scale(0.95); } }
@keyframes hud-reward { 40% { transform: scale(1.08) rotate(-2deg); background: #ffdc69; } }
@keyframes level-reward { 30%, 70% { background: #68521a; color: #fff3be; } }
@keyframes prize-reward { 0% { transform: translate(-50%, -50%) scale(0.7) rotate(-12deg); } 65% { transform: translate(-50%, -50%) scale(1.07) rotate(4deg); } }
@media (max-width: 1080px) {
    .topbar { grid-template-columns: minmax(180px, 1fr) minmax(330px, 1.4fr); }
    .topbar-actions { grid-column: 1 / -1; grid-row: 2; max-width: none; display: flex; flex-direction: row; gap: 1rem; justify-content: flex-end; }
    .status-pill { margin-right: auto; text-align: left; }
    .hero-stats { grid-column: 2; grid-row: 1; }
    .hero-panel { padding: 1.75rem; }
    .portal-panel { padding: 1.5rem; }
    .portal-heading { flex-wrap: wrap; }
    .hero-action-row { grid-template-columns: minmax(0, 1fr) 3rem; }
    .hero-orbit { width: 3rem; }
    .world-route { padding-inline: 1.75rem; }
}
@media (max-width: 760px) {
    .shell { width: calc(100% - 2rem); }
    .game-app { padding-top: 0.8rem; }
    .topbar { grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; }
    .topbar-actions { grid-column: 2; grid-row: 1; display: grid; grid-template-columns: 1fr; gap: 0.2rem; }
    .topbar-actions .status-pill { display: none; }
    .hero-stats { grid-column: 1 / -1; grid-row: 2; }
    .game-toolbar { align-items: flex-start; gap: 0.8rem; margin-block: 1rem; }
    .flow-nav-button { padding: 0.45rem 0.65rem; }
    .experience-notice { max-width: 18rem; font-size: 0.8rem; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-panel { padding: 1.75rem 1.5rem 1rem; gap: 1rem; }
    .hero-title { font-size: clamp(3.5rem, 12vw, 5.5rem); }
    .mission-tagline { max-width: 30ch; }
    .hero-action-row { max-width: 30rem; }
    .hero-facts { max-width: 32rem; }
    .portal-panel { padding: 1rem 1.5rem 1.5rem; }
    .portal-heading { max-width: 28rem; }
    .portal-stage { width: min(100%, 19rem); }
    .world-route { padding: 1rem 1.5rem 1.5rem; }
    .level-path { gap: 1rem; }
    .path-level { grid-template-columns: 1fr; gap: 0.6rem; align-content: start; }
    .path-level:not(:last-child)::after { width: calc(100% - 3rem); right: 0; }
    .path-info strong { font-size: 0.85rem; }
    .path-info span, .path-info small { font-size: 0.8rem; }
    .mission-strip { margin-inline: -1.35rem; }
    .question-panel { padding: 0 1.35rem 1.35rem; }
}
@media (max-width: 480px) {
    .shell { width: calc(100% - 1.5rem); }
    .topbar { padding: 0.75rem; border-radius: 14px; gap: 0.8rem; }
    .brand { grid-column: 1; gap: 0.6rem; }
    .brand-mark { flex-basis: 2.5rem; width: 2.5rem; height: 2.5rem; }
    .brand-title { font-size: 1rem; }
    .brand-title span { font-size: 0.8rem; }
    .topbar-actions { grid-column: 2; grid-row: 1; }
    .topbar-actions .ghost-button { font-size: 0.8rem; }
    .hero-stats { grid-row: 2; gap: 0.4rem; }
    .stat-card { grid-template-columns: 1fr; padding: 0.5rem; gap: 0.1rem; position: relative; }
    .hud-icon { position: absolute; top: 0.5rem; right: 0.4rem; width: 1rem; height: 1rem; }
    .stat-label { font-size: 0.8rem; padding-top: 1.1rem; }
    .stat-value { font-size: 1.05rem; }
    .game-toolbar { flex-direction: column; gap: 0.65rem; }
    .flow-nav { margin: 0; }
    .flow-nav-button { flex: 1; }
    .experience-notice { max-width: none; text-align: left; line-height: 1.4; }
    .hero-panel { padding: 1.5rem 1.1rem 1rem; }
    .hero-title { font-size: clamp(3rem, 12.5vw, 4.8rem); }
    .hero-copy { font-size: 1rem; }
    .hero-action-row { grid-template-columns: minmax(0, 1fr) 3rem; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-facts { gap: 0.65rem; }
    .hero-facts span { font-size: 0.8rem; }
    .portal-panel { padding-inline: 1.1rem; }
    .world-route { padding-inline: 1rem; }
    .level-path { grid-template-columns: 1fr; gap: 1.1rem; }
    .path-level { grid-template-columns: 3rem minmax(0, 1fr); align-items: center; }
    .path-level:not(:last-child)::after { top: auto; bottom: -1rem; left: 1.4rem; width: 0; height: 0.8rem; border-top: 0; border-left: 3px dotted #a49b87; }
    .path-info strong { font-size: 1rem; }
    .path-info span, .path-info small { font-size: 0.875rem; }
    .sector-label { font-size: 0.8rem; }
    .loot-sticker strong { font-size: 1rem; }
    .mission-strip { margin-inline: -1.1rem; padding-inline: 1.1rem; font-size: 0.7rem; }
    .question-panel { padding: 0 1.1rem 1.1rem; }
}
.progress-button { grid-column: 1 / -1; min-height: 2.5rem; padding: 0.4rem 0.85rem; font-size: 0.9rem; }
.progress-dialog { width: min(30rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overflow-y: auto; padding: 1.5rem; border: var(--game-border); border-radius: 18px; background: #fffdf6; color: var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.progress-dialog::backdrop { background: #19191b99; backdrop-filter: blur(3px); }
.progress-dialog h2 { margin: 0; font-size: 1.4rem; }
.progress-dialog .panel-heading { align-items: center; margin-bottom: 1rem; }
.progress-dialog .progress-track { margin-top: 0.75rem; }
#progressNote { font-size: 1rem; color: var(--muted-strong); margin-bottom: 0; }
.play-grid { grid-template-columns: minmax(0, 1fr); width: min(100%, 920px); align-self: center; }
.question-panel { padding-bottom: 1rem; overflow: visible; }
.question-panel .mission-strip { border-radius: 15px 15px 0 0; margin-bottom: 0.85rem; }
.question-panel .panel-heading { margin-bottom: 0.85rem; }
.question-panel .panel-heading .eyebrow { display: none; }
.question-card { gap: 1rem; }
.question-body { gap: 0.5rem; }
.question-body h4 { font-size: clamp(1.25rem, 2.2vw, 1.7rem); }
.question-body p, .question-badge { display: none; }
.answer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.answer-button { min-height: 4.4rem; padding: 0.65rem; }
.answer-feedback { padding: 0; border: 0; color: var(--muted-strong); font-size: 1rem; }
.question-actions { position: sticky; bottom: 0; z-index: 4; background: #fff; padding-block: 0.6rem; gap: 0.65rem; box-shadow: 0 -8px 12px #ffffffed; border-radius: 0 0 12px 12px; }
.question-actions .help-copy { font-size: 0.95rem; }
.level-summary { font-size: 1rem; padding: 0.65rem; }
.is-playing-page .topbar { grid-template-columns: minmax(0, 1fr) auto; padding-block: 0.6rem; }
.is-playing-page .hero-stats { display: none; }
.is-playing-page .topbar-actions { grid-column: 2; grid-row: 1; display: flex; flex-wrap: wrap; flex-direction: row; justify-content: flex-end; max-width: none; gap: 0.6rem; }
.is-playing-page .status-pill { display: none; }
.is-playing-page .game-toolbar { margin-block: 0.85rem; }
@media (max-width: 600px) {
    .is-playing-page .topbar { gap: 0.6rem; }
    .is-playing-page .brand { grid-column: 1; }
    .is-playing-page .brand-title, .is-playing-page .brand .eyebrow { display: none; }
    .is-playing-page .brand-title span, .is-playing-page .topbar-actions .ghost-button { display: none; }
    .is-playing-page .topbar-actions { gap: 0.4rem; }
    .is-playing-page .topbar-actions .sound-button { min-height: 2.5rem; }
    .is-playing-page .experience-notice { font-size: 0.8rem; }
    .answer-grid { grid-template-columns: minmax(0, 1fr); }
    .question-panel .panel-heading h3 { font-size: 1.1rem; }
    .question-panel .panel-heading { gap: 0.4rem; }
    .question-card { gap: 0.8rem; }
    .answer-button { min-height: 3.5rem; }
}
/* Keep controls and navigation visible in the normal page flow. */
.navigation-dock { position: sticky; top: 0; z-index: 20; padding-block: max(0.5rem, env(safe-area-inset-top)) 0.6rem; background: var(--bg); }
.navigation-dock .game-toolbar { margin: 0.65rem 0 0; }
.experience-notice { align-self: flex-end; max-width: none; margin: 0 0 0.85rem; }
html { scroll-padding-top: 16rem; }
.question-actions { padding-bottom: max(0.6rem, env(safe-area-inset-bottom)); }
@media (max-width: 760px) {
    .game-app { padding-top: 0; }
    .navigation-dock { padding-bottom: 0.5rem; }
    .navigation-dock .topbar, .is-playing-page .navigation-dock .topbar { grid-template-columns: 2.5rem minmax(0, 1fr); gap: 0.6rem; padding: 0.6rem 0.75rem; border-radius: 12px; }
    .navigation-dock .brand { grid-column: 1; grid-row: 1; gap: 0; }
    .navigation-dock .brand-mark { flex-basis: 2.5rem; width: 2.5rem; height: 2.5rem; }
    .navigation-dock .brand > div:last-child, .navigation-dock .hero-stats, .navigation-dock .status-pill { display: none; }
    .navigation-dock .topbar-actions, .is-playing-page .navigation-dock .topbar-actions { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-end; grid-column: 2; grid-row: 1; max-width: none; gap: 0.5rem; }
    .navigation-dock .topbar-actions .ghost-button { display: none; }
    .navigation-dock .sound-button, .navigation-dock .progress-button { min-height: 2.75rem; font-size: 0.875rem; padding: 0.5rem 0.65rem; }
    .navigation-dock .game-toolbar { margin-top: 0.5rem; }
    .navigation-dock .flow-nav { width: 100%; }
    .navigation-dock .flow-nav-button { flex: 1; min-height: 2.75rem; padding: 0.4rem; }
    .experience-notice { align-self: stretch; text-align: left; font-size: 0.8rem; margin-bottom: 0.65rem; }
    .question-panel { padding: 0 1rem 0.6rem; }
    .question-panel .mission-strip { margin: 0 -1rem 0.65rem; padding: 0.45rem 0.8rem; font-size: 0.75rem; border-radius: 15px 15px 0 0; }
    .question-panel .panel-heading { margin-bottom: 0.65rem; }
    .question-panel .panel-heading h3 { font-size: 1.1rem; }
    .question-panel .panel-heading .mini-badge { display: none; }
    .question-card { gap: 0.65rem; }
    .question-body h4 { font-size: 1.2rem; line-height: 1.35; }
    .answer-grid { grid-template-columns: minmax(0, 1fr); gap: 0.55rem; }
    .answer-button { min-height: 3.25rem; padding: 0.55rem 0.65rem; gap: 0.6rem; grid-template-columns: 2rem minmax(0, 1fr); }
    .answer-key { width: 2rem; height: 2rem; }
    .answer-copy { font-size: 1rem; line-height: 1.35; }
    .question-actions { gap: 0.5rem; padding-top: 0.5rem; }
    .question-actions .help-copy { font-size: 0.875rem; line-height: 1.4; }
    .question-actions .primary-button { min-height: 2.75rem; padding-block: 0.6rem; }
    .level-summary { font-size: 0.95rem; line-height: 1.4; padding: 0.5rem 0.65rem; }
    .hero-panel { padding: 1.25rem 1.1rem 0.85rem; gap: 0.8rem; }
    .hero-title { font-size: clamp(3rem, 10vw, 4.5rem); }
    .mission-tagline { font-size: 1.2rem; }
    .hero-copy { font-size: 1rem; line-height: 1.45; }
    .hero-action-row { grid-template-columns: minmax(0, 1fr); }
    .hero-orbit { display: none; }
    .hero-actions { display: flex; flex-direction: row; gap: 0.65rem; }
    .hero-actions button { flex: 1; width: auto; font-size: 1rem; padding-inline: 0.65rem; }
    .hero-facts { padding-top: 0.4rem; gap: 0.6rem; }
    .portal-panel { gap: 0.6rem; padding: 0.75rem 1.1rem 1rem; }
    .portal-stage { width: min(100%, 14rem); }
    .avatar-bubble { padding: 0.65rem 0.8rem; }
    .avatar-bubble strong { font-size: 0.95rem; }
    .world-route { padding: 0.85rem 1rem 1rem; }
    .level-path { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
    .path-level { grid-template-columns: minmax(0, 1fr); gap: 0.55rem; align-content: start; }
    .path-level:not(:last-child)::after { top: 1.5rem; bottom: auto; left: 3.4rem; right: -0.25rem; width: auto; height: 0; border-left: 0; border-top: 3px dotted #a49b87; }
    .path-info strong { font-size: 0.875rem; }
    .path-info span, .path-info small { font-size: 0.8rem; }
}
@media (max-width: 340px) {
    .navigation-dock .sound-button, .navigation-dock .progress-button { padding-inline: 0.45rem; font-size: 0.8rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reward-burst.is-playing { transform: translateX(-50%); }
}
