:root{font-family:system-ui,-apple-system,'Malgun Gothic',sans-serif;color:#203b34;background:#f4f2eb;font-size:18px;--green:#244c43;--paper:#fffefa;--line:#d6ddd2;--gold:#875d26;--visible-height:100dvh}
*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{cursor:pointer;border:1px solid transparent;border-radius:12px;min-height:48px;min-width:44px;padding:12px 20px;background:var(--green);color:#fff;font-weight:750;touch-action:manipulation}button:hover:not(:disabled){filter:brightness(1.08)}button:disabled{cursor:default;opacity:.55}button.secondary{background:#edf2e9;color:var(--green);border-color:#c6d3c1}button.quiet{background:transparent;color:#52665a;padding:10px 14px;border-color:#ccd5c7}button:focus-visible,input:focus-visible,summary:focus-visible,a:focus-visible,.history:focus-visible{outline:3px solid #ad7225;outline-offset:3px}button,input,summary{-webkit-tap-highlight-color:transparent}h1,h2,p{margin-top:0}h1{font-size:clamp(1.3rem,2.8vw,1.8rem);letter-spacing:-.045em;line-height:1.35}h2{font-size:1.05rem;letter-spacing:-.035em}p{line-height:1.7}main{max-width:1360px;margin:auto;padding:24px 32px 28px;min-height:100dvh}.eyebrow{display:block;font-size:.73rem;letter-spacing:.08em;font-weight:700;color:#6c7967;margin-bottom:7px}
.welcome{min-height:84dvh;display:grid;justify-items:center;align-content:center;text-align:center;gap:12px}.welcome .blind{width:230px;height:220px;margin:12px 0 24px}.welcome p{margin:0 0 8px}.welcome .rule{font-size:.9rem;color:#58695d}.welcome button{min-width:210px;margin-top:12px}.topbar{display:flex;align-items:center;gap:22px;margin-bottom:22px}.brand{margin-right:auto}.brand h1{margin:0}.counters{display:flex;gap:10px}.counter{display:grid;grid-template-columns:auto auto;column-gap:13px;align-items:center;min-width:135px;border:1px solid #c9d8c3;border-radius:17px;padding:12px 15px;background:#e6eee0}.counter-label{grid-column:1;font-size:.8rem;font-weight:750}.counter>div{grid-column:2;grid-row:1/3;white-space:nowrap}.counter strong{font-size:2rem;line-height:1;letter-spacing:-.05em}.counter-total{font-size:.8rem;color:#52665a}.counter-caption{grid-column:1;font-size:.7rem;color:#52665a}.counter-guess{background:#f4ead8;border-color:#deceb0;color:#704b1e}.counter-guess .counter-caption,.counter-guess .counter-total{color:#80623c}.pill{display:inline-block;background:#e7ede0;border:1px solid #cad6bf;border-radius:24px;padding:9px 14px;font-size:.85rem;white-space:nowrap}
.question-side{display:flex;flex-direction:column;gap:12px;min-height:0}.question-side .stage{flex:1;min-height:0}.hint-panel{flex-shrink:0;max-height:45%;overflow:auto;border:1px solid #cad6c4;border-radius:16px;padding:5px 14px;background:var(--paper);font-size:.82rem}.hint-panel summary{font-weight:750;color:#365d46}.hint-panel p{font-size:.77rem;margin:4px 0 10px}.hint-panel button{font-size:.8rem;padding:9px 12px;width:100%;text-align:left;min-height:44px}.hint-panel .receive-hint{margin:4px 0 10px;text-align:center}.hint-messages{padding:0;list-style:none;margin:0}.hint-messages li{margin:7px 0}.review-layout{display:grid;grid-template-columns:minmax(200px,.8fr) minmax(0,1.2fr);gap:18px}.review-detail{border:1px solid #cdd9c6;border-radius:15px;padding:18px;overflow-wrap:anywhere;background:#f8faf5}.review-detail h3{font-size:1rem}.review-detail p{max-width:none;margin:12px 0}.review-detail ul{padding-left:20px}.review-detail a{display:inline-block;margin-right:7px}.review-answer{font-weight:750}.result .review>p{margin-left:0}.review-questions button:first-child{margin-top:0}
.layout{display:grid;grid-template-columns:minmax(210px,.7fr) minmax(440px,1.5fr);gap:24px;height:calc(var(--visible-height) - 160px);min-height:440px}.stage{background:#e7e5d8;border:1px solid #dedfce;border-radius:26px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:28px;position:relative;overflow:hidden}.stage:before,.stage:after{content:'';position:absolute;width:210px;height:210px;border-radius:50%;border:1px solid #c7cebb;top:-110px;left:-55px}.stage:after{top:auto;left:auto;right:-80px;bottom:-100px;width:310px;height:310px}.blind{position:relative;border:10px solid #796344;border-top-width:17px;border-radius:12px;background:repeating-linear-gradient(0deg,#c4a571 0,#c4a571 24px,#9d835b 25px,#e6cfa2 28px);height:280px;width:min(100%,280px);box-shadow:0 10px 0 #d1d1bd;display:grid;place-items:center;flex-shrink:0}.blind:after{content:'?';font-size:5rem;font-weight:800;color:#fffcef;text-shadow:0 3px #8d7650}.stage-caption{margin:30px 0 0;font-size:.9rem;color:#53624e;z-index:1}.conversation{background:var(--paper);border:1px solid var(--line);border-radius:24px;overflow:hidden;display:flex;flex-direction:column;min-height:0;box-shadow:0 4px 18px #244c4305}.history-heading{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:18px 24px 13px;border-bottom:1px solid #e5e8df}.history-heading h2{margin:0}.history-heading>span{font-size:.73rem;color:#687763}.history{overflow:auto;flex:1;padding:22px 24px;overscroll-behavior:contain;scroll-padding:20px}.empty{color:#677762;text-align:center;margin:22px 0}.exchange{padding-bottom:22px;margin-bottom:22px;border-bottom:1px solid #e7e9e2}.exchange:last-child{margin-bottom:0;border-bottom:0;padding-bottom:2px}.exchange-meta{display:flex;align-items:center;gap:10px;margin-bottom:9px;font-size:.7rem;line-height:1.5}.record-number{font-variant-numeric:tabular-nums;color:#68766a;font-weight:650}.record-kind{color:#45684b;background:#edf3e8;border-radius:6px;padding:3px 7px}.exchange-clarification .record-kind,.exchange-unknown .record-kind{color:#815724;background:#f5ecd9}.exchange-duplicate .record-kind{color:#5f6968;background:#edf0ee}.question{margin:0 0 10px;background:#eff4e8;border-radius:3px 13px 13px 13px;padding:12px 15px;max-width:100%;width:fit-content;overflow-wrap:anywhere;font-weight:600;line-height:1.6}.answer{margin:0;line-height:1.75;overflow-wrap:anywhere;padding:0 3px;color:#263f35}.answer:before{content:'↳';color:#6f8963;margin-right:9px}.previous{margin:12px 0;border-left:3px solid #b8c8a8;padding:2px 12px;color:#596b52;font-size:.85rem}.previous p{margin:5px 0}
.composer{padding:15px 22px 18px;border-top:1px solid var(--line);background:#fffefa;flex-shrink:0}.tabs{display:grid;grid-template-columns:1fr 1fr;gap:5px;background:#eef1e9;padding:4px;border-radius:13px;margin-bottom:12px}.tab{background:transparent;color:#5f6b5d;min-height:44px;border-radius:10px;padding:8px 10px;font-size:.9rem}.tab[aria-selected=true]{background:#fffefa;color:#244c43;box-shadow:0 1px 5px #244c431c;border-color:#cbd7c4}.mode-guess .tab[aria-selected=true]{background:#fffaf1;color:#704b1e;border-color:#dcc6a2}.mode-help{font-size:.8rem;margin:0 0 8px;color:#5d6d56}.mode-guess .mode-help{color:#7c5c31}.mode-guess .inputline>button{background:#805b2b}.mode-guess input{border-color:#ba9c72}.question-limit{font-size:.9rem;font-weight:700;background:#f4ead8;color:#765327;border-radius:10px;padding:11px 13px;margin:0 0 12px}label{display:block;font-size:.83rem;font-weight:650;margin:8px 0;color:#465d4d}.inputline{display:flex;gap:10px}input{border:1.5px solid #9dad94;border-radius:11px;padding:13px;min-width:0;width:100%;background:#fff;color:#203b34;min-height:50px;font-size:1rem;scroll-margin-bottom:20px}input:disabled{background:#f0f2ed;color:#56665c}.inputline button{flex-shrink:0}.example{font-size:.76rem;color:#697a60;margin:8px 0 0}.status{font-size:.82rem;line-height:1.6;color:#5d6d56;padding:10px 12px;background:#f0f3ec;border-radius:10px;margin:11px 0 0;overflow-wrap:anywhere}.status:empty{display:none}.status-heading{display:block;margin-bottom:3px}.status-error{background:#fbede3;color:#854b2a}.status-waiting{background:#eaf0eb;color:#365e4e}.status-waiting>span:before{content:'◌';margin-right:7px}.status-neutral{background:#f0f2ef;color:#5e6b60}.status button{display:block;margin-top:8px;min-height:44px;padding:8px 14px}.new-answer{align-self:center;margin:7px;min-height:44px;font-size:.8rem}
.actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}.result{max-width:780px;margin:auto;text-align:center;padding:40px 10px}.portrait{margin:0 auto 24px;max-width:320px}.portrait img{display:block;width:100%;height:auto;aspect-ratio:1/1;object-fit:contain;border-radius:18px;background:#eee8dc}.portrait figcaption{font-size:.75rem;line-height:1.6;color:#52665b;margin-top:10px;overflow-wrap:anywhere}.portrait-note{display:block}.result p{max-width:550px;margin:20px auto}.review{text-align:left}.review button{display:block;text-align:left;width:100%;margin:10px 0;background:#eef3e9;color:#244c43;border:2px solid #c1ceb7;padding-left:46px;position:relative}.review button:before{content:'○';position:absolute;left:15px;top:12px;font-size:1.3rem}.review button[aria-pressed=true]{border-color:#244c43}.review button[aria-pressed=true]:before{content:'✓'}.review details{margin:18px 0}.review li{margin-bottom:10px;line-height:1.6}details.supplement{font-size:.77rem;color:#596b51;margin:9px 0 0}summary{cursor:pointer;min-height:44px;display:flex;align-items:center}.supplement summary{width:fit-content;padding:6px 11px;border:1px solid #c2d0b8;border-radius:9px;min-height:44px}.supplement summary:before{content:'＋';margin-right:7px}.supplement[open] summary:before{content:'−'}.supplement p{margin-bottom:0}dialog{border:1px solid #d4dcca;border-radius:20px;max-width:min(90vw,500px);padding:28px;background:var(--paper);color:#203b34}dialog::backdrop{background:#142c25b3}dialog p{margin-top:0}#dialog-text{white-space:pre-line}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}a{color:#245e4a}.restoration{max-width:560px;margin:18vh auto;text-align:center}.restoration p{color:#61715b}.teacher-banner{padding:12px 24px;border-bottom:1px solid #cfdbca;background:#e9eee4;color:#425b3a;font-size:.8rem}.teacher-banner p{margin:4px 0 0}.teacher-banner+main{min-height:calc(100dvh - 85px)}
@media(max-width:1000px){.layout{grid-template-columns:minmax(180px,.55fr) minmax(390px,1.5fr);gap:17px}.topbar{gap:12px}.counter{min-width:120px;padding:10px 12px}.counter strong{font-size:1.8rem}main{padding:20px}.stage{padding:20px}.blind{height:230px}}
@media(max-width:800px){main{padding:14px 14px 20px}.topbar{flex-wrap:wrap;gap:12px;margin-bottom:14px}.brand{flex:1;min-width:200px}.brand h1{font-size:1.25rem}.brand .eyebrow{font-size:.65rem;margin-bottom:4px}.topbar>.quiet{order:2;padding:8px 12px}.counters{order:3;width:100%;display:grid;grid-template-columns:1fr 1fr}.counter{min-width:0;padding:9px 13px}.counter strong{font-size:1.8rem}.layout{display:flex;flex-direction:column;gap:12px;height:calc(var(--visible-height) - 190px);min-height:420px}.stage{display:none}.conversation{flex:1;border-radius:18px}.history-heading{padding:13px 16px 10px}.history{padding:16px}.exchange{padding-bottom:16px;margin-bottom:17px}.composer{padding:12px 14px max(14px,env(safe-area-inset-bottom))}.inputline button{padding:10px 15px}.tabs{margin-bottom:10px}.teacher-banner{padding:10px 15px}.result{padding-top:15px}.welcome .blind{height:190px;width:210px}.welcome{min-height:80dvh}.restoration{margin-top:12vh}}
@media(max-width:420px){.topbar>.quiet{font-size:.75rem;padding:8px}.brand{min-width:180px}.brand h1{font-size:1.15rem}.counter-label{font-size:.75rem}.counter strong{font-size:1.65rem}.inputline{gap:7px}.inputline button{padding:10px 12px;font-size:.9rem}.history-heading>span{display:none}}
@media(prefers-reduced-motion:no-preference){.result img{animation:reveal .3s ease-out}@keyframes reveal{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}}

.teacher-mode .layout{height:calc(var(--visible-height) - 245px)}
@media(max-width:800px){.teacher-mode .layout{height:calc(var(--visible-height) - 280px)}}

@media(max-height:650px){.stage{display:none}.layout,.teacher-mode .layout{min-height:0}.history{min-height:0}}
@media(max-width:800px){.question-side{flex:0 0 auto;width:100%}.hint-panel{max-height:230px}.review-layout{grid-template-columns:1fr}.review-detail{padding:14px}}

/* A short viewport always uses a column, including tablets wider than 800px. */
.composer-tools{display:flex;align-items:flex-start;gap:8px}.composer-tools .tabs{flex:1;min-width:0}.history-toggle{font-size:.77rem;white-space:nowrap;padding:8px 10px;min-height:44px}.history-heading{flex-shrink:0}.history{min-height:0}.conversation{min-width:0}
:is(.keyboard-open,.compact-layout) main{min-height:var(--visible-height);padding:8px}
:is(.keyboard-open,.compact-layout) .layout{display:flex;flex-direction:column;height:calc(var(--visible-height) - 68px);min-height:0;gap:8px}
:is(.keyboard-open,.compact-layout) .stage{display:none}
:is(.keyboard-open,.compact-layout) .question-side{flex:0 0 auto;width:100%;min-width:0}
:is(.keyboard-open,.compact-layout) .hint-panel{max-height:150px}
:is(.keyboard-open,.compact-layout) .conversation{flex:1 1 0;width:100%;overflow:hidden}
:is(.keyboard-open,.compact-layout) .history-heading{display:none}
:is(.keyboard-open,.compact-layout) .topbar{flex-wrap:nowrap;gap:8px;margin-bottom:8px;min-height:44px}
:is(.keyboard-open,.compact-layout) .brand{min-width:0}
:is(.keyboard-open,.compact-layout) .brand .eyebrow{display:none}
:is(.keyboard-open,.compact-layout) .brand h1{font-size:1rem}
:is(.keyboard-open,.compact-layout) .counters{width:auto;order:0;display:flex;gap:6px}
:is(.keyboard-open,.compact-layout) .counter{display:block;min-width:0;padding:6px 8px;border-radius:10px}
:is(.keyboard-open,.compact-layout) .counter-label{font-size:.65rem;margin-right:4px}
:is(.keyboard-open,.compact-layout) .counter>div{display:inline}
:is(.keyboard-open,.compact-layout) .counter strong{font-size:1.2rem}
:is(.keyboard-open,.compact-layout) :is(.counter-caption,.counter-total,.mode-help,.example,.teacher-banner){display:none}
:is(.keyboard-open,.compact-layout) .composer{padding:6px 10px max(8px,env(safe-area-inset-bottom))}
:is(.keyboard-open,.compact-layout) .composer label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
:is(.keyboard-open,.compact-layout) .tabs{margin-bottom:5px}
:is(.keyboard-open,.compact-layout) .history{padding:10px 14px;min-height:0}
:is(.keyboard-open,.compact-layout) .exchange{margin-bottom:12px;padding-bottom:12px}
:is(.keyboard-open,.compact-layout) .question{padding:8px 12px;margin-bottom:5px}
/* Keep the compact sidebar independent of focus: moving focus from an input
   to its button must not move that button between pointer-down and pointer-up. */
:is(.keyboard-open,.compact-layout) .question-side>.name-rules{display:none}
@media(max-width:800px){:is(.keyboard-open,.compact-layout) .brand{display:none}:is(.keyboard-open,.compact-layout) .topbar>.quiet{margin-left:auto;order:0;display:block;min-height:44px}}
/* Below 300px use document flow so an input can be reached by scrolling rather
   than being clipped by an impossible minimum-height flex allocation. */
.short-screen:not(.history-expanded) .layout{height:auto;min-height:0}
.short-screen:not(.history-expanded) .conversation{flex:0 0 auto;overflow:visible}
.short-screen:not(.history-expanded) .history{flex:none;min-height:120px;max-height:180px;overflow:auto}
/* The record view gives the whole visible pane to history, independently of
   browser chrome/keyboard height. Returning retains the same game and draft. */
.history-expanded main{min-height:var(--visible-height);padding:8px}
.history-expanded .topbar,.history-expanded .question-side,.history-expanded .composer{display:none}
.history-expanded .layout{display:flex;flex-direction:column;height:calc(var(--visible-height) - 16px);min-height:0;gap:0}
.history-expanded .conversation{flex:1 1 0;width:100%;overflow:hidden}
.history-expanded .history-heading{display:flex;padding:8px 12px;align-items:center;flex-shrink:0}
.history-expanded .history{flex:1;min-height:0;overflow:auto}
.history-expanded .history-heading h2{font-size:.9rem}
.scope-choice{width:min(100%,640px);text-align:left;border:1px solid var(--line);border-radius:14px;padding:12px 16px;background:var(--paper)}.scope-choice select{font:inherit;width:100%;min-height:48px;border:1px solid #9dad94;border-radius:9px;background:#fff;color:#203b34;padding:8px}.scope-choice p{font-size:.78rem;margin:6px 0;overflow-wrap:anywhere}.scope-choice summary{font-size:.8rem}.scope-label{font-size:.72rem;margin:3px 0 0;color:#596b51}.name-rules{font-size:.78rem;text-align:left;max-width:640px}.name-rules p{margin:6px 0}.question-side>.name-rules{border:1px solid var(--line);border-radius:12px;padding:0 12px;background:var(--paper);max-height:180px;overflow:auto;flex-shrink:0}.composer-caption{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;min-height:20px;padding-bottom:8px}.name-budget{font-size:.78rem;font-weight:750;color:#3a4a43;max-width:100%;margin-left:auto;white-space:normal;overflow-wrap:anywhere;line-height:1.5}.biography-sources{font-size:.76rem}.biography-sources a{display:inline-block;margin:0 5px}.result .scope-choice{margin:20px auto}.scope-choice select:focus-visible{outline:3px solid #ad7225;outline-offset:3px}
.record-temporary,.temporary-note{font-size:.7rem;line-height:1.5;color:#657365}.exchange-meta{flex-wrap:wrap}
.temporary-review{text-align:left;max-width:700px;margin:20px auto}.result .temporary-review p{margin:8px 0;max-width:none}
:is(.keyboard-open,.compact-layout) .question-side>.name-rules{max-height:96px}

/* v15: a reading room and an open historical notebook; no external assets. */
:root{--ink:#2b3632;--green:#273f39;--paper:#fffaf0;--line:#d7cab3;--gold:#886937;--seal:#953d30;color:var(--ink);background:#eee7d8}
body{background:radial-gradient(ellipse at 8% 0,#dfd1b977,transparent 45%),repeating-linear-gradient(96deg,#ffffff06 0 2px,#9e845304 2px 4px),#f3eee3}
h1,h2,h3,.unit-copy strong,.archive-seal{font-family:'Batang','바탕',Georgia,serif}
button{border-radius:6px;box-shadow:0 1px 0 #1f29251a;letter-spacing:-.025em}
button.secondary{background:#f1ebdc;color:#35463d;border-color:#cfc1a7}
button.quiet{color:#5d6054;border-color:#ccc1ad;border-radius:6px}
button:focus-visible,input:focus-visible,summary:focus-visible,a:focus-visible,.history:focus-visible{outline:3px solid #a74731;outline-offset:3px}
main{max-width:1380px}
.eyebrow{color:#8b493b;letter-spacing:.12em;font-size:.68rem;text-transform:none}
.welcome{grid-template-columns:minmax(300px,.9fr) minmax(400px,1.1fr);gap:30px 72px;align-content:center;align-items:start;justify-items:stretch;text-align:left;min-height:calc(100dvh - 52px);max-width:1150px;margin:auto;padding:24px 0}
.welcome>.review-identity{grid-column:1/-1}
.welcome-intro{padding:30px 0 20px;position:relative}
.welcome-intro>.eyebrow{padding-left:24px;position:relative;margin-bottom:24px}
.welcome-intro>.eyebrow:before{content:'';position:absolute;left:0;top:4px;width:11px;height:11px;background:var(--seal);transform:rotate(2deg)}
.welcome h1{font-size:clamp(2.7rem,4.6vw,4rem);line-height:1.28;letter-spacing:-.055em;max-width:7em;margin-bottom:24px;color:#283b34;font-weight:800;word-break:keep-all}
.welcome .welcome-lead{font-size:1rem;line-height:1.9;white-space:pre-line;color:#626457;margin:0}
.welcome .blind{width:185px;height:190px;margin:36px 0 24px}
.blind{border:0;border-top:9px solid #73613e;border-bottom:9px solid #73613e;border-radius:3px;background:repeating-linear-gradient(90deg,#af997a0a 0 1px,transparent 1px 8px),linear-gradient(90deg,#d6c7a7,#f0e3c5 12% 88%,#c8b78f);box-shadow:0 10px 18px #6d583f1c,0 2px 0 #a79774;transform:rotate(-1deg)}
.blind:after{font-family:'Batang','바탕',Georgia,serif;color:#635d47;text-shadow:none;font-weight:500;font-size:5rem;transform:rotate(1deg)}
.welcome .welcome-caption{font-size:.78rem;color:#77725f;margin:0 0 24px}
.game-rules{border-top:1px solid #cbbda3;padding-top:17px;max-width:330px}
.welcome .game-rules .rule{font-size:.79rem;color:#626553;margin:0 0 6px}
.welcome-setup{background:#fffaf0e8;border:1px solid #d0c1a6;border-top:4px solid #3d4d40;border-radius:3px;padding:26px 28px 20px;box-shadow:8px 8px 0 #e3dbc866}
.setup-heading{display:flex;gap:14px;align-items:center;margin-bottom:18px;padding-bottom:17px;border-bottom:1px solid #d8c9ad}
.setup-heading h2{font-size:1.3rem;margin:0;line-height:1.5;letter-spacing:-.04em}
.setup-heading .eyebrow{margin-bottom:4px;font-size:.62rem;color:#75735e}
.archive-seal{border:2px solid var(--seal);color:var(--seal);padding:7px 5px;font-size:1.1rem;letter-spacing:.04em;line-height:1.3;transform:rotate(-4deg);font-weight:800}
.scope-choice{width:100%;max-width:680px;border:0;border-radius:0;padding:0;background:transparent;text-align:left}
.scope-choice fieldset{border:0;padding:0;margin:0;min-inline-size:0}
.scope-choice legend{font-weight:750;font-size:.85rem;color:#35443b;margin:0 0 6px;padding:0}
.scope-choice .scope-instruction{font-size:.76rem;line-height:1.6;color:#686d5e;margin:0 0 13px}
.unit-options{display:grid;gap:9px}
.unit-option{display:flex;gap:12px;align-items:center;min-height:81px;padding:13px 12px;margin:0;border:1px solid #d4c8b1;border-radius:4px;background:#f9f5eb;cursor:pointer;transition:background .12s,border-color .12s;color:#35453b}
.unit-option:hover{background:#f0e7d4;border-color:#96856a}
.unit-option.is-selected{border-color:#68785e;background:#eef0e4;box-shadow:inset 3px 0 #4a5b45}
.unit-option input{width:22px;height:22px;min-height:22px;min-width:22px;margin:0;padding:0;accent-color:#3d5949;flex:0 0 22px;border-radius:2px;cursor:pointer}
.unit-copy{display:flex;flex:1;flex-direction:column;gap:5px;min-width:0}
.unit-copy strong{font-size:1rem;font-weight:800;line-height:1.3;color:#2d4438}
.unit-copy>span{font-size:.7rem;line-height:1.5;font-weight:400;color:#626b5c;word-break:keep-all}
.unit-count{font-size:.76rem;font-variant-numeric:tabular-nums;white-space:nowrap;color:#3d5442;padding-left:4px}
.unit-unavailable,.unit-unavailable:hover{background:#f2eee5;border-color:#dbd2c2;box-shadow:none;cursor:default}
.unit-unavailable .unit-copy strong,.unit-unavailable .unit-count{color:#756d5f}.unit-unavailable input{cursor:default}
.scope-choice .scope-summary{font-size:.85rem;color:#344e3c;font-weight:750;border-bottom:1px solid #ddcfb7;padding:13px 0 11px;margin:0 0 10px}
.scope-choice .selection-empty{color:#9a3829}
.scope-choice .scope-note{font-size:.68rem;color:#6d6b5b;line-height:1.65;margin:5px 0}
.scope-choice .next-game-note{color:#5f6859}
.scope-preview summary,.question-definitions>summary{font-size:.73rem;color:#5a634f;gap:7px;min-height:44px}
.scope-preview summary:before,.question-definitions>summary:before{content:'＋';color:#934b39;font-weight:700}
.scope-preview[open] summary:before,.question-definitions[open]>summary:before{content:'−'}
.scope-preview p{font-size:.72rem;color:#5a6255;line-height:1.9;margin:0 0 10px}
.welcome .primary-start{width:100%;min-height:54px;min-width:0;margin:12px 0 0;background:#8e3d30;border-color:#7d3328;font-size:.93rem;box-shadow:0 3px 0 #702f25}
.welcome .primary-start:disabled{background:#b8ac97;border-color:#b8ac97;box-shadow:none;color:#fff;opacity:1}
.welcome .privacy-note{font-size:.65rem;text-align:center;color:#716e5e;margin:14px 0 6px;line-height:1.6}
.question-definitions{border-top:1px solid #d8cbb5;margin-top:10px}
.question-definitions>p,.question-definitions .name-rules{font-size:.72rem;text-align:left;line-height:1.7;color:#626854}
.welcome .name-rules p{font-size:.72rem}
.topbar{border-bottom:1px solid #cdbfa6;padding-bottom:18px}
.brand h1{font-size:1.55rem;letter-spacing:-.045em}
.scope-label{color:#766c54;letter-spacing:.01em}
.counter{border-radius:4px;background:#ececdd;border-color:#c4c6af}
.counter-guess{background:#f0e6d4;border-color:#d0bfa2}
.layout{height:calc(var(--visible-height) - 178px)}
.stage{background:linear-gradient(145deg,#ede5d3,#e5dcc7);border:1px solid #cdbd9f;border-radius:3px;box-shadow:inset 0 0 0 6px #f6f0e54d}
.stage:before{border-radius:0;width:65%;height:70%;top:15%;left:17%;border:1px solid #bba98a44;transform:rotate(2deg)}
.stage:after{border-radius:0;width:65%;height:70%;top:15%;left:17%;right:auto;bottom:auto;border:1px solid #bba98a44;transform:rotate(-2deg)}
.stage-caption{font-family:'Batang','바탕',Georgia,serif;color:#746a51;letter-spacing:.06em}
.conversation{border-radius:4px;background:var(--paper);border-color:#cfc0a6;box-shadow:0 6px 16px #594a2f09}
.history-heading{border-bottom:1px solid #d7c9af;background:#f8f2e6;color:#34483a}
.history-heading h2{font-size:1.03rem}
.history{background:repeating-linear-gradient(0deg,transparent 0 31px,#8c734008 31px 32px)}
.exchange{border-color:#e0d5c0}
.question{background:#eeecdf;border:1px solid #d9d4c2;border-radius:2px 8px 8px 8px;color:#334539}
.answer{color:#2e3f35}
.answer:before{color:#9b4937}
.record-kind{background:#ececdf;color:#4d6147;border:1px solid #cbd1ba;border-radius:2px}
.record-number{color:#8c7c5f;letter-spacing:.04em}
.composer{background:#fdf8ed;border-color:#d6c8ad}
.tabs{background:#e9e3d5;border-radius:5px}
.tab{border-radius:3px;color:#77725e}
.tab[aria-selected=true]{background:#fffaf0;color:#2b4737;border-color:#b7bea4;box-shadow:0 1px 3px #6b5a3912}
.inputline input{border-radius:4px;border-color:#a6ab91;background:#fffdf7;color:#283b30}
.hint-panel,.question-side>.name-rules{border-radius:4px;background:#fbf5e8;border-color:#cbbb9e}
.hint-panel summary{color:#69583a}
.result{max-width:1080px;padding-top:26px}
.result>h1{font-size:clamp(1.8rem,3.5vw,2.6rem);color:#2a4034}
.result>.eyebrow{margin-bottom:16px}
.result .scope-choice{padding:22px 26px;border:1px solid #cdbd9f;background:#faf4e8;border-top:3px solid #4b5e46;border-radius:3px;margin:30px auto}
.result .actions{margin-top:18px}
.portrait img{border-radius:4px;border:6px solid #fff7e5;box-shadow:0 0 0 1px #c7b99d}
.review{padding:24px;border:1px solid #cbb99b;background:#fdf8ed;border-radius:3px;margin-top:24px}
.review>h2{font-size:1.4rem;padding-bottom:12px;border-bottom:1px solid #d7c6a8}
.review button{border-radius:3px;background:#f2ecdc;color:#4e5b44;border-color:#d3c4a7;font-size:.82rem}
.review button[aria-pressed=true]{background:#e9ecdc;border-color:#5f7352}
.review-detail{background:#fffaf0;border-radius:3px;border-color:#d7c8ad}
.review-detail h3{line-height:1.7;color:#3c503c}
.review-answer{color:#903f2c}
.restoration{max-width:680px;margin:6vh auto;padding:24px;background:#fffaf0;border:1px solid #d0c1a6;border-top:4px solid #4e6048;border-radius:3px}
.restoration .scope-choice{margin-top:24px;padding-top:20px;border-top:1px solid #d7c8ad}
@media(max-width:1050px){.welcome{gap:24px 36px;grid-template-columns:minmax(250px,.8fr) minmax(380px,1.2fr)}.welcome-setup{padding:22px}.welcome h1{font-size:2.9rem}.layout{height:calc(var(--visible-height) - 178px)}}
@media(max-width:800px){.welcome{grid-template-columns:1fr;gap:20px;max-width:620px;padding:12px 0;min-height:0}.welcome-intro{padding:8px 8px 4px}.welcome-intro>.eyebrow{margin-bottom:12px}.welcome h1{font-size:2.2rem;max-width:none;margin-bottom:13px}.welcome .welcome-lead{font-size:.87rem;line-height:1.8}.welcome-intro .blind,.welcome-intro .welcome-caption{display:none}.game-rules{display:flex;gap:16px;border:0;padding-top:14px;max-width:none;flex-wrap:wrap}.welcome .game-rules .rule{font-size:.7rem;margin:0}.welcome-setup{padding:20px}.layout{height:calc(var(--visible-height) - 208px)}.brand h1{font-size:1.25rem}.review{padding:16px}.result .scope-choice{padding:18px}.topbar{padding-bottom:12px}}
@media(max-width:450px){.welcome-setup{padding:18px 14px}.unit-option{padding:12px 10px;gap:9px}.unit-copy>span{font-size:.67rem}.unit-count{font-size:.72rem}.review{padding:12px}.result .scope-choice{padding:14px}.setup-heading h2{font-size:1.2rem}}
/* Compact game geometry is unchanged: style must not take record/input space. */
:is(.keyboard-open,.compact-layout) .layout{height:calc(var(--visible-height) - 68px)}
:is(.keyboard-open,.compact-layout) .topbar{padding-bottom:0;border-bottom:0}
:is(.keyboard-open,.compact-layout) .brand h1{font-size:1rem}
:is(.keyboard-open,.compact-layout) .counter{border-radius:4px}
:is(.keyboard-open,.compact-layout) .composer{border-top:1px solid #d6c8ad}
.history-expanded .layout{height:calc(var(--visible-height) - 16px)}
.short-screen:not(.history-expanded) .layout{height:auto}
@media(prefers-reduced-motion:reduce){.unit-option{transition:none}}
/* A wide short viewport keeps hint height out of the scrolling transcript. */
@media(min-width:900px){
 :is(.keyboard-open,.compact-layout):not(.history-expanded):not(.short-screen) .layout{display:grid;grid-template-columns:210px minmax(0,1fr);gap:12px}
 :is(.keyboard-open,.compact-layout):not(.history-expanded):not(.short-screen) .question-side{width:auto;min-height:0;overflow:hidden}
 :is(.keyboard-open,.compact-layout):not(.history-expanded):not(.short-screen) .hint-panel{max-height:100%;width:100%;padding:5px 10px}
 :is(.keyboard-open,.compact-layout):not(.history-expanded):not(.short-screen) .conversation{height:100%;min-height:0}
}
@media(max-width:899px){:is(.keyboard-open,.compact-layout) .hint-panel{max-height:110px}:is(.keyboard-open,.compact-layout) .hint-panel>p{display:none}}

/* Question meaning stays in the scrollable record, outside the input area. */
.question-reading{margin:5px 0 7px;padding:6px 9px;border-inline-start:3px solid #a18b66;background:#f5efdf;color:#514a3e;line-height:1.55;font-size:.78rem;overflow-wrap:anywhere;min-width:0}.question-reading p{margin:0}.question-reading p+p{margin-top:4px}
.question-basis-help{font-size:.8rem;line-height:1.5;margin:4px 0 8px;padding:6px 8px;background:#f2eedf;border-inline-start:3px solid #829073;color:#404b3c}

/* ===== 장막 속 인물 v0.1 (2026-11-14) ===== */
:root{--velvet:#6e2430;--velvet-deep:#45141c;--velvet-light:#93404a;--tassel:#c9a24a}
/* 무대: 장막 + 등불 + 실루엣 */
.blind.curtain-stage{position:relative;border:0;border-radius:6px;background:radial-gradient(ellipse at 50% 62%,#f7e7bd 0,#e9cf93 28%,#5b4a33 70%,#2c241a 100%);box-shadow:inset 0 -18px 30px #0000003d,0 12px 22px #3a2a1a33;overflow:hidden;transform:none;display:block}
.blind.curtain-stage:after{content:none}
.curtain-silhouette{position:absolute;left:50%;bottom:0;width:46%;height:72%;transform:translateX(-50%);background:radial-gradient(circle at 50% 22%,#2a201a 0 17%,transparent 17.5%),radial-gradient(ellipse at 50% 100%,#2a201a 0 52%,transparent 52.5%);filter:blur(1.2px);opacity:.82;animation:curtain-breathe 5s ease-in-out infinite}
.curtain{position:absolute;top:0;bottom:0;width:41%;background:repeating-linear-gradient(90deg,var(--velvet-deep) 0,var(--velvet) 7%,var(--velvet-light) 11%,var(--velvet) 15%,var(--velvet-deep) 20%);box-shadow:0 0 18px #0007;transform-origin:top center;transition:transform .9s cubic-bezier(.6,.05,.25,1)}
.curtain-left{left:0;border-radius:0 0 40% 0/0 0 12% 0}
.curtain-right{right:0;border-radius:0 0 0 40%/0 0 0 12%}
.curtain-left:after,.curtain-right:after{content:'';position:absolute;top:58%;width:12px;height:30px;border-radius:6px;background:linear-gradient(var(--tassel),#8a6a22)}
.curtain-left:after{right:-4px}.curtain-right:after{left:-4px}
.curtain-valance{position:absolute;left:0;right:0;top:0;height:13%;background:repeating-radial-gradient(circle at 50% -40%,var(--velvet) 0 34%,var(--velvet-deep) 35% 38%,transparent 39%) 0 0/16.66% 100%,linear-gradient(var(--velvet-deep),var(--velvet));border-bottom:3px solid var(--tassel)}
.curtain-sway .curtain-left{animation:sway-left .9s ease-out}
.curtain-sway .curtain-right{animation:sway-right .9s ease-out}
.curtain-sway .curtain-silhouette{animation:figure-nod .9s ease-out}
@keyframes sway-left{30%{transform:skewX(4deg) scaleX(.94)}65%{transform:skewX(-2deg)}}
@keyframes sway-right{30%{transform:skewX(-4deg) scaleX(.94)}65%{transform:skewX(2deg)}}
@keyframes figure-nod{35%{transform:translateX(-50%) translateY(4%)}70%{transform:translateX(-50%) translateY(-1%)}}
@keyframes curtain-breathe{50%{opacity:.7;transform:translateX(-50%) scale(1.015)}}
.welcome .blind.curtain-stage{width:230px;height:230px;margin:14px 0 22px}
.question-side .stage .blind.curtain-stage{width:min(100%,280px);height:min(60%,300px);min-height:180px}
.stage{background:linear-gradient(160deg,#3a2b22,#241a14);border-color:#5b4334}
.stage:before,.stage:after{border-color:#ffffff14}
.stage-caption{color:#e9d8b4}
/* 말풍선 */
.exchange{display:flex;flex-direction:column;gap:8px;border-bottom:0;padding-bottom:6px;margin-bottom:14px;animation:bubble-in .35s ease-out}
@keyframes bubble-in{from{opacity:0;transform:translateY(8px)}}
.bubble{max-width:min(88%,560px);border-radius:16px;padding:10px 14px;overflow-wrap:anywhere}
.bubble-student{align-self:flex-end;background:#e7efe2;border:1px solid #c9d8c0;border-bottom-right-radius:4px}
.bubble-student .exchange-meta{margin-bottom:4px;justify-content:flex-end}
.bubble-student .question{background:none;padding:0;margin:0;width:auto;border-radius:0}
.bubble-figure{align-self:flex-start;background:#fffaf0;border:1px solid #e1cfae;border-left:5px solid var(--velvet);border-bottom-left-radius:4px;box-shadow:0 3px 10px #6e243012}
.bubble-who{display:flex;align-items:center;gap:7px;font-size:.7rem;font-weight:750;color:var(--velvet);margin-bottom:3px;letter-spacing:.02em}
.figure-line{margin:2px 0 6px;font-family:'Batang','바탕',Georgia,serif;font-size:1.02rem;line-height:1.6;color:#3b2a20}
.bubble-figure .answer{font-weight:750;color:#263f35}
.bubble-figure .answer:before{content:'답 ';font-size:.72rem;font-weight:700;color:#fff;background:#4b6a55;border-radius:5px;padding:1px 6px;margin-right:7px;vertical-align:2px}
.exchange-unknown .bubble-figure .answer:before,.exchange-clarification .bubble-figure .answer:before{background:#9a7432;content:'안내 '}
.figure-clue{margin:8px 0 2px;padding:8px 10px;border-radius:10px;background:linear-gradient(90deg,#fbefc9,#fff7df);border:1px dashed var(--tassel);font-family:'Batang','바탕',Georgia,serif;line-height:1.6;animation:clue-glow 1.6s ease-out 1}
.clue-label{display:inline-block;font-family:system-ui,'Malgun Gothic',sans-serif;font-size:.68rem;font-weight:800;color:#7a5410;background:#f3d98f;border-radius:6px;padding:1px 7px;margin-right:8px;vertical-align:2px}
@keyframes clue-glow{0%{box-shadow:0 0 0 0 #e5bd5a99}40%{box-shadow:0 0 0 8px #e5bd5a33}100%{box-shadow:0 0 0 0 #e5bd5a00}}
.ai-tag{font-size:.62rem;font-weight:700;color:#4b5f86;background:#e6ecf8;border:1px solid #c7d3ea;border-radius:999px;padding:0 7px;letter-spacing:0}
.greeting{margin:8px 0}
.greeting .empty{text-align:left;margin:2px 0}
/* AI 다시 쓰기 제안 카드 */
.suggestion{margin:8px 0;padding:10px 12px;border-radius:14px;background:#fffaf0;border:1px solid #e1cfae;border-left:5px solid var(--velvet)}
.suggestion p{margin:3px 0}
.suggestion-text{font-family:'Batang','바탕',Georgia,serif;font-size:1rem;color:#3b2a20}
.suggestion-note{font-size:.74rem;color:#6b5b45}
.suggestion-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:6px}
.suggestion-actions button{min-height:44px}
.suggestion-loading p{animation:curtain-breathe 1.4s ease-in-out infinite;color:#6b5b45}
.suggestion-none{display:flex;align-items:center;gap:10px;justify-content:space-between;border-left-color:#9a7432;font-size:.82rem}
.sound-toggle{white-space:nowrap}
/* 결과: 장막이 걷힘 */
.curtain-reveal{position:relative;display:inline-block;overflow:hidden;border-radius:6px}
.curtain-reveal .curtain{width:51%;animation:reveal-left 1.6s cubic-bezier(.6,.05,.25,1) .2s forwards}
.curtain-reveal .curtain-right{animation-name:reveal-right}
.curtain-reveal .portrait{margin:0}
@keyframes reveal-left{to{transform:translateX(-102%)}}
@keyframes reveal-right{to{transform:translateX(102%)}}
/* 좁은 화면: 장막을 위쪽 띠로 보여 준다 */
@media(max-width:800px){
 .stage{display:flex;flex-direction:row;gap:12px;padding:8px 12px;min-height:0;flex:none;border-radius:14px}
 .question-side .stage .blind.curtain-stage{width:92px;height:76px;min-height:0;flex:none}
 .stage-caption{margin:0;font-size:.82rem}
 .question-side{flex:none}
 .bubble{max-width:94%}
}
@media(max-height:650px){.stage{display:none}}
:is(.keyboard-open,.compact-layout) .stage{display:none}
@media(prefers-reduced-motion:reduce){.curtain-silhouette,.curtain-sway .curtain,.curtain-sway .curtain-silhouette,.exchange,.figure-clue,.suggestion-loading p{animation:none}.curtain-reveal .curtain{animation:none;display:none}}

/* 2차: 입력 영역 압축(대화 기록 공간 확보) */
#mode-help{display:none}.composer .question-basis-help{font-size:.72rem;line-height:1.45;margin:2px 0 4px;padding:4px 8px}.composer .mode-help{font-size:.72rem;margin:2px 0 4px}.composer .tabs{margin-bottom:6px}

/* 3차: 초상 자료가 없는 인물의 이름패 */
.curtain-reveal-plate{width:min(100%,300px);height:220px;margin:6px auto 4px}.reveal-plate{position:absolute;inset:0;display:grid;place-content:center;gap:8px;text-align:center;background:radial-gradient(ellipse at 50% 55%,#fbf0d2 0,#ead3a0 45%,#9b7d4f 100%);border:6px double #8a6a3c;border-radius:6px;font-family:'Batang','바탕',Georgia,serif}.reveal-plate strong{font-size:2.3rem;letter-spacing:.12em;color:#3b2a20}.reveal-plate-label{font-size:.78rem;letter-spacing:.2em;color:#7a5f38}

/* 4차: 휴대폰은 무대를 숨기고 대화 기록 공간 우선(장막 색 띠만 표시) */
@media(max-width:800px){.question-side .stage{display:none}.conversation{border-top:7px solid var(--velvet);box-shadow:inset 0 3px 0 var(--tassel)}}

/* 4차: 정답 공개 뒤 인물과 대화 */
.talk{margin:18px auto;max-width:860px;width:100%;text-align:left;background:#fffaf0;border:1px solid #e1cfae;border-top:6px solid var(--velvet);border-radius:16px;padding:16px 18px}
.talk h2{margin:0 0 6px;font-size:1.15rem}
.talk-limit-note{font-size:.8rem;color:#6b5b45;background:#f6edd8;border-radius:8px;padding:7px 10px;margin:0 0 10px}
.talk-log{display:flex;flex-direction:column;gap:12px;margin:8px 0}
.talk-turn{display:flex;flex-direction:column;gap:6px;animation:bubble-in .35s ease-out}
.talk-pending .figure-line{animation:curtain-breathe 1.4s ease-in-out infinite;color:#6b5b45}
.talk-citations{margin-top:6px;font-size:.78rem}
.talk-citations summary{cursor:pointer;color:#6b4a1d;font-weight:700}
.talk-citations ul{margin:6px 0 0;padding-left:18px}
.talk-citations li{margin:4px 0;line-height:1.55;color:#3f3a2e}
.cite-level{display:inline-block;font-size:.66rem;font-weight:800;border-radius:5px;padding:0 6px;margin-right:6px;background:#e3ecdc;color:#365d46}
.cite-legend{background:#f3e0c0;color:#7a4f12}
.records-tag{color:#5b5b3a;background:#efeedf;border-color:#d9d6b8}
.talk-starters{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}
.talk-starters button{min-height:44px;font-size:.85rem}
.talk .inputline{display:flex;gap:8px}
.talk .inputline input{flex:1;min-width:0}
.talk-remaining,.talk-privacy{font-size:.75rem;color:#6b6b5a;margin:6px 0 0}

/* ===== 5차: SNS 메신저형 대화창(게임 중·공개 뒤 공통) ===== */
.history,.talk .chat-list{background:#f4ede0}
.history-heading{align-items:center;background:#fffaf0}
.chat-header{display:flex;align-items:center;gap:10px;min-width:0}
.chat-title{display:flex;flex-direction:column;min-width:0}
.chat-title strong{font-size:1rem;line-height:1.3}
.chat-status{font-size:.72rem;color:#6b6b5a}
.chat-status:before{content:'';display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--tassel);margin-right:5px;vertical-align:1px}
.chat-caption{font-size:.72rem;color:#7a7a68}
.chat-notice{text-align:center;margin:10px 0}
.chat-notice span{display:inline-block;font-size:.72rem;background:#00000010;color:#5f5a4c;border-radius:999px;padding:3px 12px}
.exchange{gap:4px;margin-bottom:10px}
.msg{display:flex;gap:8px;margin:4px 0}
.msg-me{flex-direction:column;align-items:flex-end}
.msg-me .msg-bubble{max-width:min(78%,520px);background:#2f5a4b;color:#fff;border:0;border-radius:18px 18px 4px 18px;padding:9px 14px;box-shadow:0 1px 2px #0002}
.msg-me .question{color:#fff;margin:0;font-weight:600}
.msg-me .exchange-meta{justify-content:flex-end;margin:0 6px 1px;font-size:.64rem;gap:6px}
.msg-me .record-kind{padding:1px 6px}
.msg-them{align-items:flex-start}
.msg-body{display:flex;flex-direction:column;gap:3px;max-width:min(82%,560px);min-width:0}
.msg-name{font-size:.72rem;font-weight:700;color:#5a4636;margin:0 0 0 2px;display:flex;align-items:center;gap:6px}
.msg-them .msg-bubble{background:#fff;border:1px solid #e3d6be;border-radius:4px 18px 18px 18px;padding:9px 13px;box-shadow:0 1px 2px #6e24300f;max-width:100%}
.msg-them .answer:before,.bubble-figure .answer:before{content:none}
.msg-them + .msg-them .avatar{visibility:hidden}
.msg-them + .msg-them .msg-name{display:none}
.avatar{flex:none;width:38px;height:38px;border-radius:50%;overflow:hidden;border:2px solid #fff;box-shadow:0 1px 3px #0003;background:#ddd}
.avatar-curtain{background:radial-gradient(circle at 50% 40%,#2a201a 0 15%,transparent 16%),radial-gradient(ellipse at 50% 112%,#2a201a 0 42%,transparent 43%),linear-gradient(90deg,var(--velvet-deep) 0 20%,var(--velvet) 20% 26%,#ecd39c 26% 74%,var(--velvet) 74% 80%,var(--velvet-deep) 80%)}
.avatar-photo img{width:100%;height:100%;object-fit:cover;object-position:50% 18%;display:block}
.avatar-plate{display:grid;place-items:center;background:radial-gradient(circle,#fbf0d2,#e2c58c);color:#3b2a20;font-family:'Batang','바탕',Georgia,serif;font-weight:700}
.chat-header .avatar{width:42px;height:42px}
.figure-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.figure-head .figure-line{margin:0}
.msg-them .answer{margin:0}
.answer.verdict{display:inline-block;font-weight:800;font-size:.85rem;padding:1px 11px;border-radius:999px;background:#e1eee2;color:#24543c;line-height:1.7}
.answer.verdict-no{background:#f5e1dc;color:#8a2f22}
.answer.notice-text{font-size:.86rem;color:#5b4a35;font-weight:600}
.msg-them .question-reading{margin:6px 0 0}
.msg-clue .msg-bubble{background:#fff7df;border:1px dashed var(--tassel)}
.msg-clue .figure-clue{margin:0;padding:0;border:0;background:none;animation:none}
.msg-clue .msg-bubble{animation:clue-glow 1.6s ease-out 1}
.greeting-wrap{padding-top:4px}
.composer .suggestion{margin:6px 0;padding:0;border:0;background:none}
.composer .suggestion .msg-bubble{border-left:1px solid #e3d6be}
.typing{animation:curtain-breathe 1.4s ease-in-out infinite}
.composer .inputline input,.talk .inputline input{border-radius:999px;padding-left:16px}
.composer .inputline button,.talk .inputline button{border-radius:999px}
/* 공개 뒤 대화 카드 = 게임 중 대화창과 같은 틀 */
.talk.chat-card{padding:0;overflow:hidden;border:1px solid var(--line);border-top:0;border-radius:24px;background:var(--paper)}
.talk .chat-header{padding:12px 18px;background:#fffaf0;border-bottom:1px solid #e5e8df;border-top:6px solid var(--velvet)}
.talk .chat-list{padding:14px 16px}
.talk .talk-log{margin:0}
.talk .chat-foot{padding:10px 16px 14px;border-top:1px solid #e5e8df;background:#fffaf0}
.talk .talk-starters{margin:0 0 8px}
.talk .talk-limit-note{margin:6px 0 0;font-size:.74rem}
.talk-remaining-line{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:.74rem;color:#6b6b5a;margin:6px 2px 0}
.chat-earlier{margin:0 0 4px}
.chat-earlier>summary{display:block;text-align:center;cursor:pointer;list-style:none;margin:2px 0 8px}
.chat-earlier>summary::-webkit-details-marker{display:none}
.chat-earlier>summary{font-size:.74rem;color:#5f5a4c}
.chat-earlier>summary:before{content:'▸ ';}
.chat-earlier[open]>summary:before{content:'▾ ';}
.chat-earlier-list .exchange{animation:none}
@media(max-width:800px){.msg-me .msg-bubble{max-width:86%}.msg-body{max-width:calc(100% - 46px)}.talk.chat-card{border-radius:16px}}

/* 6차: 질문 다듬기 카드는 대화 목록 안 말풍선 */
.history .suggestion{margin:8px 0}.history .suggestion .msg-bubble{border-color:#d9c39a;background:#fffdf6}
.msg-me .question{border:0;box-shadow:none;background:none;padding:0}

/* 8차: 휴대폰에서 대화 기록 공간 확보(힌트 상자 한 줄, 기준 설명 숨김) */
@media(max-width:800px){.question-side{flex-direction:row;gap:6px}.question-side>section,.question-side>details,.question-side>div{flex:1;min-width:0;font-size:.74rem}.composer .question-basis-help{display:none}.brand .eyebrow{display:none}.history-heading .chat-caption{display:none}.history-heading{padding:8px 12px}}

/* ===== v0.2 진행자: 별주부(장막 앞에서 질문을 전함) · 토끼(AI 다듬기 담당) ===== */
.avatar-jara{background:#d6ecef url("/host-jara.svg?v=0feb1c1124ea") center/100% no-repeat}
.avatar-tokki{background:#fbe8ec url("/host-tokki.svg?v=2b3ffa9a90d7") center/100% no-repeat}
.who-tokki .msg-bubble{background:#fff6f8;border:1px solid #f1c9d2}
.who-tokki .msg-name{color:#a2455c}
.msg-them.who-jara + .msg-them.who-tokki .avatar,.msg-them.who-tokki + .msg-them.who-jara .avatar{visibility:visible}
.msg-them.who-jara + .msg-them.who-tokki .msg-name,.msg-them.who-tokki + .msg-them.who-jara .msg-name{display:flex}
/* v0.8.6 말하는 사람이 장막 속 인물로 바뀌면 얼굴·이름 보이기(정답 공개 직후 인물 첫 말이 별주부 말처럼 보이던 문제) */
.msg-them.who-jara + .msg-them.who-figure .avatar,.msg-them.who-tokki + .msg-them.who-figure .avatar,.msg-them.who-figure + .msg-them.who-jara .avatar,.msg-them.who-figure + .msg-them.who-tokki .avatar{visibility:visible}
.msg-them.who-jara + .msg-them.who-figure .msg-name,.msg-them.who-tokki + .msg-them.who-figure .msg-name,.msg-them.who-figure + .msg-them.who-jara .msg-name,.msg-them.who-figure + .msg-them.who-tokki .msg-name{display:flex}
.stage-jara,.stage-tokki{position:absolute;bottom:-4%;width:34%;aspect-ratio:1;background:center/contain no-repeat;z-index:5;pointer-events:none;filter:drop-shadow(0 3px 3px #0005)}
.stage-jara{left:3%;background-image:url("/host-jara.svg?v=0feb1c1124ea")}
.stage-tokki{right:2%;background-image:url("/host-tokki.svg?v=2b3ffa9a90d7");transform:translateY(105%);transition:transform .45s cubic-bezier(.3,1.5,.5,1)}
body.tokki-on .stage-tokki{transform:translateY(8%)}
/* v0.8.5: 옛 jara-go(svg) 삭제 — 별주부 움직임은 맨 아래 v0.8.5 묶음 하나뿐 */
.curtain-reveal .stage-jara,.curtain-reveal .stage-tokki{opacity:0;transition:opacity .4s}
.welcome .blind.curtain-stage .stage-tokki{transform:translateY(8%)}
@media(prefers-reduced-motion:reduce){.stage-tokki{transition:none}}

/* ===== v0.2 배치: 왼쪽 조작판 ===== */
.control-panel{flex-shrink:0;display:flex;flex-direction:column;gap:8px;padding:12px;border:1px solid #cbbb9e;border-radius:4px;background:#fbf5e8}
.control-panel .counters{display:grid;grid-template-columns:1fr 1fr;gap:6px;width:auto;margin:0}
.control-panel .counter{min-width:0;padding:6px 10px;margin:0}
.control-panel .counter strong{font-size:1.45rem}
.control-panel .counter-caption{display:none}
.control-panel .composer-tools{display:flex;flex-direction:column;align-items:stretch;gap:6px}
.control-panel .tabs{margin:0}
.control-panel .tab{white-space:nowrap;font-size:.86rem;padding-inline:4px;min-width:0}
.control-panel .history-toggle{min-height:34px;padding:5px 10px}
.control-panel .question-basis-help{margin:0;font-size:.72rem;line-height:1.45;padding:5px 8px}
.control-panel .mode-help{margin:0;font-size:.72rem;color:#6b5a45}
.control-panel #mode-help{display:none}
.control-panel .control-budget{margin:0;font-size:.76rem;font-weight:700;color:#4a3b2a}
.question-side .stage{flex:1 1 0;min-height:150px}
.question-side .stage .blind.curtain-stage{height:min(88%,300px);min-height:130px}
.question-side .stage .stage-jara,.question-side .stage .stage-tokki{width:auto;height:46%;max-width:34%}
.composer-slim{padding:10px 16px 12px}
.composer-slim .composer-caption{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.composer-slim .status:empty{display:none}

/* ===== v0.3 위쪽 막대·HUD·역질문 ===== */
/* 위쪽 막대: 한 줄(제목+범위 / 소리·그만하기) */
.topbar{padding:4px 0 8px;margin-bottom:10px;align-items:center;gap:10px}
.topbar .brand{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;min-width:0}
.topbar .brand .eyebrow{display:none}
.topbar .brand h1{font-size:1.15rem;margin:0;line-height:1.25;letter-spacing:-.01em}
.topbar .scope-label{margin:0;font-size:.72rem;padding:2px 9px;border-radius:999px;background:#efe6d3;color:#5d4a33}
.topbar>.quiet,.topbar .sound-toggle{min-height:34px;padding:5px 12px;font-size:.8rem}
@media(min-width:801px){.layout{height:calc(var(--visible-height) - 146px)}}
/* 휴대폰 위쪽 막대 */
@media(max-width:800px){.topbar{gap:6px 8px;margin-bottom:8px}.topbar .brand{flex:1 1 0;min-width:0}.topbar>.quiet,.topbar .sound-toggle{padding:5px 9px;flex:none}.topbar .brand h1{font-size:1rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.topbar .scope-label{display:none}.topbar .counters{gap:6px}.topbar .counter{padding:4px 10px;border-radius:10px;column-gap:8px}.topbar .counter strong{font-size:1.2rem}.topbar .counter-caption{display:none}}
@media(max-width:420px){.topbar .brand h1{font-size:.9rem}}
/* HUD: 한 장의 조작판, 구역은 선으로만 나눔 */
.control-panel{gap:0;padding:0;overflow:hidden}
.hud-sec{padding:10px 12px;border-top:1px solid #e4d8c1}
.hud-sec:first-child{border-top:0}
.hud-label{margin:0 0 6px;font-size:.68rem;font-weight:800;letter-spacing:.04em;color:#8a6f4a}
.hud-tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.hud-tile{display:flex;flex-direction:column;gap:3px;padding:6px 8px;border-radius:6px;background:#fffdf8;border:1px solid #e6dcc8;min-width:0}
.hud-tile{justify-content:space-between}
.hud-tile-label{font-size:.68rem;font-weight:700;color:#6b5a45;line-height:1.2;word-break:keep-all}
.hud-tile-num strong{font-size:1.35rem;line-height:1;color:#2f4a3a}
.hud-tile-num small{font-size:.7rem;color:#8a7a66;margin-left:2px}
.hud-tile.low strong{color:var(--velvet,#7a2730)}
.control-panel .tabs{margin:0}
.control-panel .hint-panel,.control-panel .name-rules{border:0;border-radius:0;background:none;padding:0;margin:0;max-height:none;box-shadow:none;overflow:visible}
.control-panel .hud-help details+details{border-top:1px dashed #e4d8c1}
.control-panel details>summary{font-size:.8rem;font-weight:700;padding:7px 0;cursor:pointer;color:#3b2f22}
.control-panel details[open]>summary{padding-bottom:4px}
.control-panel details p{font-size:.74rem;line-height:1.5;margin:0 0 6px}
.control-panel .answer-rules .question-basis-help{margin:0 0 6px}
.control-panel .receive-hint{min-height:34px;font-size:.78rem;margin:0 0 8px}
.hud-note{margin:6px 0 0;font-size:.68rem;color:#8a7a66}
.history-heading .history-toggle{min-height:30px;padding:4px 12px;font-size:.75rem;white-space:nowrap}
/* 낮은 넓은 화면(높이<650): 머리띠를 얇게 남겨 크게 보기 버튼 유지 */
@media(min-width:801px){.compact-layout:not(.keyboard-open) .history-heading{display:flex;padding:4px 12px}.compact-layout:not(.keyboard-open) .history-heading .chat-status{display:none}.compact-layout:not(.keyboard-open) .history-heading .avatar{width:28px;height:28px}}
/* 아니요 뒤 역질문 */
.reverse-q{margin:8px 0 0;padding:7px 10px;border-radius:8px;background:#f1f6ee;border:1px dashed #9db38f;font-size:.86rem;line-height:1.5;display:flex;flex-wrap:wrap;gap:4px 8px;align-items:baseline}
.reverse-label{font-size:.66rem;font-weight:800;color:#3f6b44;background:#dfeedd;border-radius:6px;padding:1px 7px;white-space:nowrap}
.reverse-text{flex:1 1 12em;color:#2d3b2a}
.reverse-ai{font-size:.62rem}

/* ===== v0.3 2차: 아이콘·입력 전환·길잡이 ===== */
.topbar-v3{display:flex;align-items:flex-end;flex-wrap:wrap;gap:6px 12px}
.topbar-v3 .brand{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0;flex:1 1 0}
.topbar-v3 .brand-line{display:flex;align-items:baseline;gap:10px;min-width:0;max-width:100%}
.topbar-tools{display:flex;gap:6px}
.icon-btn{display:inline-grid;place-items:center;width:34px;height:34px;min-height:34px;padding:0;border-radius:8px;border:1px solid #d6c8ad;background:#fffaf0;color:#4a3b2a;cursor:pointer}
.icon-btn:hover{background:#f3ead8}.icon-btn:focus-visible{outline:2px solid #2f4a3a;outline-offset:2px}
.icon{display:block;width:18px;height:18px;background:currentColor;-webkit-mask:center/contain no-repeat;mask:center/contain no-repeat}
.icon-sound-on{-webkit-mask-image:url("/icon-sound-on.svg?v=d847a2edb63a");mask-image:url("/icon-sound-on.svg?v=d847a2edb63a")}
.icon-sound-off{-webkit-mask-image:url("/icon-sound-off.svg?v=e49de3030f6f");mask-image:url("/icon-sound-off.svg?v=e49de3030f6f")}
.icon-exit{-webkit-mask-image:url("/icon-exit.svg?v=d362b2dff619");mask-image:url("/icon-exit.svg?v=d362b2dff619")}
.sound-toggle[aria-pressed="false"]{color:#9a8a76}
.quit-btn{color:#7a2730}
@media(max-width:800px){.topbar-v3 .counters{order:3;width:100%}}
@media(min-width:801px){body.compact-layout:not(.history-expanded):not(.short-screen) .layout{height:calc(var(--visible-height) - 100px)}}
/* 넓은 화면: 위쪽 막대 없이 제목은 왼쪽 열 맨 위, 대화창은 전체 높이 */
@media(min-width:801px){.layout.layout-full,body.compact-layout:not(.history-expanded):not(.short-screen) .layout.layout-full{height:calc(var(--visible-height) - 56px)}.question-side>.topbar-v3{margin:0;padding:0 0 2px;border:0;flex:none}.question-side>.topbar-v3 .brand-line{flex-wrap:wrap;row-gap:2px}}
/* 입력창 왼쪽 질문/정답 전환(넓은 화면) */
.input-row{display:flex;align-items:center;gap:8px}
.input-row>.tabs{flex:none;display:flex;gap:3px;margin:0;padding:3px;border-radius:999px;background:#ece4d3}
.input-row>.tabs .tab{min-height:38px;padding:4px 12px;border-radius:999px;font-size:.82rem;white-space:nowrap}
.input-row>.question-limit{flex:none;margin:0;font-size:.78rem;max-width:11em}
.input-row>#input-panel{flex:1;min-width:0}
/* 도움 한 줄 */
.hud-tip{margin:0 0 6px;font-size:.78rem;line-height:1.5;color:#3b2f22}
.hud-tip-count{display:inline-block;margin-left:2px;font-size:.68rem;font-weight:800;color:#7a5410;background:#f3e3b8;border-radius:6px;padding:0 6px}
/* 길잡이 말풍선 */
.guide-q{background:#fdf6e3;border-color:#d9b867}
.guide-q .reverse-label{background:#f3e3b8;color:#7a5410}

/* ===== v0.3 말풍선 정리 ===== */
.verdict-inline{display:inline-block;margin:0 1px 0 2px;padding:0 9px;border-radius:7px;font-weight:800;line-height:1.55;vertical-align:baseline}
.verdict-inline.verdict-yes{background:#dcefdc;color:#24553a}
.verdict-inline.verdict-no{background:#f6dcd8;color:#8a2a22}
.answer-extra{margin:4px 0 0;font-size:.78rem;color:#7a6a55}
.reverse-q{margin:8px 0 0;padding:7px 0 0;border:0;border-top:1px dashed #ddd0b6;border-radius:0;background:none;display:block;font-size:.86rem;line-height:1.55}
.reverse-q .reverse-label{display:inline;margin-right:6px;padding:0;background:none;font-size:.72rem;font-weight:800;color:#3f6b44}
.reverse-q .reverse-text{color:#2d3b2a}
.ai-mini{display:inline-block;margin-left:5px;padding:0 5px;border-radius:5px;font-size:.6rem;font-weight:800;line-height:1.5;color:#4a4f8a;background:#e6e7f6;vertical-align:1px}
.guide-note{margin:4px 0 0;font-size:.72rem;color:#8a7a66}
.msg-clue .figure-clue{font-size:.92rem}
/* 토끼 제안: 바깥 상자 없이 같은 대화방의 한마디로 */
.history .msg.suggestion,.history .msg.suggestion-none{margin:0;padding:0;border:0;border-radius:0;background:none;display:flex;justify-content:flex-start;font-size:inherit}

/* ===== v0.4 난이도 ===== */
.level-picker{margin:14px 0 10px}
.level-label{margin:0 0 6px;font-size:.85rem;font-weight:800;color:#3b2f22}
.level-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.welcome .level-btn,.level-btn{min-width:0;width:auto;max-width:none;display:flex;flex-direction:column;align-items:center;gap:2px;min-height:54px;padding:6px 8px;border-radius:10px;border:1px solid #d6c8ad;background:#fffdf8;color:#3b2f22;cursor:pointer}
.level-btn strong{font-size:.95rem}.level-btn small{font-size:.72rem;color:#7a6a55}
.level-btn[aria-pressed="true"]{border:2px solid #2f4a3a;background:#eef4ea}
.level-btn:focus-visible{outline:2px solid #2f4a3a;outline-offset:2px}
.history-heading .history-toggle{min-height:34px}
.unmet-pick{display:flex;align-items:flex-start;gap:10px;margin:4px 0 12px;padding:10px 12px;border:1px solid #d6c8ad;border-radius:10px;background:#fffdf8;cursor:pointer}
.unmet-pick input{width:20px;height:20px;margin:2px 0 0;flex:none}
.unmet-pick span{display:flex;flex-direction:column;gap:2px;text-align:left}.unmet-pick strong{font-size:.92rem}.unmet-pick small{font-size:var(--fs-xs,.72rem);color:#7a6a55}
.level-note{margin:6px 0 0;font-size:.74rem;color:#7a6a55}

/* ===== v0.5 디자인 정리 ===== */
:root{--fs-xs:.72rem;--fs-sm:.82rem;--fs-md:.95rem;--fs-lg:1.15rem;--fs-xl:1.5rem;--ink:#2f2a22;--ink-sub:#6b5a45;--line-soft:#e4d8c1}
/* 글자 크기 단계: 같은 역할은 같은 크기 */
.msg-name,.exchange-meta,.chat-status,.hud-label,.hud-tile-label,.guide-note,.answer-extra,.suggestion-note,.hud-note,.hud-tip-count,.reverse-q .reverse-label,.gallery-date,.gallery-badge,.scope-note,.level-note,.level-btn small{font-size:var(--fs-xs)}
.hud-tip,.control-panel details>summary,.control-panel details p,.reverse-q,.input-row>.tabs .tab,.scope-instruction,.privacy-note,.gallery-line,.gallery-foot p{font-size:var(--fs-sm)}
.figure-line,.msg-bubble .question,.inputline input,.gallery-name{font-size:var(--fs-md)}
.topbar .brand h1,.chat-title strong,.setup-heading h2{font-size:var(--fs-lg)}
.hud-tile-num strong{font-size:var(--fs-xl)}
/* 토끼 말풍선: 바탕은 별주부와 같게, 이름 색으로만 구분 */
.who-tokki .msg-bubble{background:#fffdf8;border-color:#e6dcc8}
.history .suggestion .msg-bubble{background:#fffdf8;border-color:#e6dcc8}
/* 시작 화면 */
.welcome .welcome-lead{font-size:1.05rem;line-height:1.7;color:var(--ink)}
.welcome .game-rules{list-style:none;margin:6px 0 14px;padding:0;display:grid;gap:4px}
.welcome .game-rules .rule{margin:0;padding-left:14px;position:relative;font-size:var(--fs-sm);color:var(--ink-sub)}
.welcome .game-rules .rule:before{content:"";position:absolute;left:2px;top:.62em;width:5px;height:5px;border-radius:50%;background:#b08a4a}
.setup-heading{margin-bottom:6px}.setup-heading h2{margin:0}
.scope-choice legend{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.gallery-open{min-height:40px;padding:6px 16px;border-radius:999px}
.gallery-new{margin:10px 0 0;font-weight:700;color:#7a5410}
/* 전시관 */
.gallery{max-width:1100px;margin:0 auto;padding:8px 0 24px}
.gallery-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.gallery-head h1{margin:0;font-size:1.6rem}.gallery-count{margin:4px 0 0;color:var(--ink-sub);font-size:var(--fs-sm)}
.gallery-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:12px}
.gallery-card{display:flex;flex-direction:column;align-items:center;gap:4px;padding:16px 12px 12px;border-radius:12px;background:#fffdf8;border:1px solid var(--line-soft);text-align:center}
.gallery-plate{display:grid;place-items:center;width:64px;height:64px;border-radius:50%;background:#f3ead8;color:#5d4a33;font-size:1.6rem;font-weight:800;font-family:'Batang','바탕',serif;border:2px solid #d9c9a8}
.gallery-card.is-won .gallery-plate{background:#fbf1d6;border:3px solid #c9a24a;box-shadow:0 0 0 3px #f6e7b9}
.gallery-card.is-locked{background:#f4efe5;border-style:dashed}.gallery-card.is-locked .gallery-plate{background:#e6dfd0;color:#a39782;border-color:#d6ccb8}
.gallery-card.is-locked .gallery-name{color:#a39782;font-weight:600;font-size:var(--fs-sm)}
.gallery-badge{display:inline-block;padding:1px 8px;border-radius:999px;background:#eef4ea;color:#2f4a3a;font-weight:700}
.gallery-card.is-won .gallery-badge{background:#fbf1d6;color:#7a5410}
.gallery-line{margin:4px 0 0;color:#4a3b2a;line-height:1.5}
.gallery-date{color:#9a8a76}
.gallery-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:16px;color:var(--ink-sub)}
.gallery-foot p{margin:0}
/* 휴대폰: 대화 영역 넓히기 — 왼쪽 열은 길잡이 안내 한 줄만, 입력부 안내 줄 줄이기 */
@media(max-width:800px){
 .question-side>.name-rules,.question-side>.hint-panel{display:none}
 .question-side .hud-tip{margin:0;padding:4px 2px;font-size:var(--fs-xs)}
 .composer .mode-help,.composer .question-basis-help{display:none}
 .composer .composer-caption label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .composer{padding:8px 10px 10px}.composer .tabs{margin-bottom:6px}
 .composer-tools .history-toggle{min-height:36px;padding:4px 10px}
}

/* ===== v0.5 새 그림 ===== */
.blind.curtain-stage{background:#2c241a url("/img/stage-bg.webp?v=00c0aad5319e") center/cover no-repeat}
.curtain-stage .curtain-valance,.curtain-reveal .curtain-valance{display:none}
.curtain-stage .curtain,.curtain-reveal .curtain{position:absolute;top:0;bottom:0;width:50%;height:auto;background-color:transparent;background-repeat:no-repeat;background-size:200% 100%;border-radius:0;box-shadow:none;z-index:3}
.curtain-stage .curtain-left,.curtain-reveal .curtain-left{left:0;background-image:url("/img/curtain-left-c.webp?v=960897a16a06");background-position:left center;transform-origin:left top}
.curtain-stage .curtain-right,.curtain-reveal .curtain-right{right:0;left:auto;background-image:url("/img/curtain-right-c.webp?v=1edfdf7346a3");background-position:right center;transform-origin:right top}
.curtain-stage .curtain-left:after,.curtain-stage .curtain-right:after,.curtain-reveal .curtain-left:after,.curtain-reveal .curtain-right:after{content:none}
/* 가운데 틈 */.curtain-stage .curtain-left{background-position:-14% center}.curtain-stage .curtain-right{background-position:114% center}
.curtain-reveal .curtain{width:51%}
.curtain-silhouette{background:url("/img/silhouette.webp?v=e18d46684c25") center bottom/contain no-repeat;filter:none;width:30%;height:40%;bottom:28%;opacity:.85;z-index:2} /* 휘장(31~73%) 뒤에만 */
.stage-jara{background-image:url("/img/jara-idle.webp?v=1ee058a81883");height:58%;width:auto;max-width:40%;filter:drop-shadow(0 4px 4px #0006)}
.stage-tokki{background-image:url("/img/tokki-peek.webp?v=527ca7242959");height:54%;width:auto;max-width:38%}
.question-side .stage .stage-jara{height:56%;max-width:40%}.question-side .stage .stage-tokki{height:52%;max-width:38%}
body.tokki-thinking .stage-tokki{background-image:url("/img/tokki-think.webp?v=cb7bc203ca11")}
/* v0.8.5: 옛 jara-go-art(단일 그림) 삭제 */
.avatar-jara{background:#e6eee3 url("/img/jara-face.webp?v=b28e2083ad91") center 35%/125% no-repeat}
.avatar-tokki{background:#f8ece9 url("/img/tokki-face.webp?v=daaa3c9a582b") center 40%/125% no-repeat}

/* v0.5b 바닥에 세우기 + 중간 동작(CSS): 그림을 아래쪽에 맞추고 무대 마루에 발을 둔다 */
.stage-jara,.stage-tokki{background-position:center bottom;transform-origin:50% 100%}
.blind.curtain-stage .stage-jara{bottom:12%;filter:drop-shadow(0 4px 3px #0007)} /* 마루 윗면(높이 70~86%)에 발 — 그림 아래 여백 약 5% 감안 */
.blind.curtain-stage .stage-tokki{bottom:0}
/* v0.8.5: 옛 jara-breathe·jara-go-art2 삭제 */
body.tokki-on .stage-tokki{animation:tokki-bob 2.4s ease-in-out .5s infinite}
@keyframes tokki-bob{0%,100%{transform:translateY(8%)}50%{transform:translateY(6%) rotate(-1.5deg)}}
@media(prefers-reduced-motion:reduce){body.tokki-on .stage-tokki{animation:none}}

/* v0.5c 스프라이트시트(tools/sprite-warp.py로 만든 8프레임, 외부 전송 없음): 숨쉬기·걷기·알리며 끄덕이기 */
.stage-jara{background-image:url("/img/jara-breathe-sheet.webp?v=7631c2249e54");background-size:800% 100%;background-position:0% 100%;aspect-ratio:1/1;width:auto;max-width:none;animation:jara-frames 1.6s steps(8,jump-none) infinite}
/* 정사각 칸 */.question-side .stage .stage-jara,.blind.curtain-stage .stage-jara,.welcome .blind.curtain-stage .stage-jara{width:auto;max-width:none;aspect-ratio:1/1;height:46%} /* 앞의 토끼보다 작게(원근) */
@keyframes jara-frames{from{background-position:0% 100%}to{background-position:100% 100%}}
/* v0.8.5 별주부 「다녀와서 전하기」 — 상태는 .curtain-stage의 is-jara-*(app.js jaraTo가 바꿈).
   보냄: out(장막으로 0.8초 걸어감) → listen(장막 앞에서 듣기, 답 올 때까지) → 답: back(돌아서서 0.9초 돌아옴) → tell(정면으로 1.2초 전하기) → settle(숨쉬기).
   무대를 새로 그려도 --jara-t(이 상태에서 지난 시간, 음수)로 같은 자리에서 이어 간다. */
.blind.curtain-stage{--jara-dx:60%}
.curtain-stage.is-jara-out .stage-jara{background-image:url("/img/jara-walk-sheet.webp?v=1ba25673e073");animation:jara-out .8s cubic-bezier(.35,.1,.55,.95) both,jara-frames .8s steps(8,jump-none) both}
@keyframes jara-out{from{transform:translateX(0)}to{transform:translateX(var(--jara-dx))}}
.curtain-stage.is-jara-listen .stage-jara{background-image:url("/img/jara-walk-sheet.webp?v=1ba25673e073");background-position:0% 100%;transform:translateX(var(--jara-dx));animation:jara-listen 1.4s ease-in-out infinite}
@keyframes jara-listen{0%,100%{transform:translateX(var(--jara-dx)) rotate(0) scale(1,1)}50%{transform:translateX(var(--jara-dx)) rotate(2deg) scale(1.015,.975)}}
.curtain-stage.is-jara-listen .stage-jara::after{content:"";position:absolute;left:58%;top:-6%;width:36%;height:17%;border-radius:999px;background:#fffdf6 radial-gradient(circle,#7a5a3a 0 20%,transparent 26%) 0 50%/33.4% 100% repeat-x;box-shadow:0 1px 2px #0005;animation:jara-dots 1.2s ease-in-out infinite}
@keyframes jara-dots{0%,100%{opacity:.5}50%{opacity:1}}
.curtain-stage.is-jara-back .stage-jara{background-image:url("/img/jara-walk-sheet.webp?v=1ba25673e073");animation:jara-back .9s cubic-bezier(.35,.1,.55,.95) both,jara-frames .9s steps(8,jump-none) both}
@keyframes jara-back{0%{transform:translateX(var(--jara-dx)) scaleX(-1)}100%{transform:translateX(0) scaleX(-1)}} /* v0.8.6 바로 뒤집기 */
.curtain-stage.is-jara-tell .stage-jara{background-image:url("/img/jara-tell-sheet.webp?v=a43f7a2f42c9");animation:jara-arrive .35s ease-out both,jara-frames .6s steps(8,jump-none) 2 both}
@keyframes jara-arrive{0%{transform:scale(1.05,.93)}55%{transform:scale(.98,1.03)}100%{transform:none}}
.curtain-stage.is-jara-settle .stage-jara{animation:jara-settle .3s ease-out both,jara-frames 1.6s steps(8,jump-none) infinite}
@keyframes jara-settle{0%{transform:scale(1.03,.96)}100%{transform:none}}
.blind.curtain-stage .stage-jara{animation-delay:var(--jara-t,0s)}
@media(prefers-reduced-motion:reduce){
 .blind.curtain-stage .stage-jara{animation:none;transform:none;background-position:0% 100%}
 .blind.curtain-stage.is-jara-out .stage-jara,.blind.curtain-stage.is-jara-listen .stage-jara{background-image:url("/img/jara-walk-sheet.webp?v=1ba25673e073")}
 .blind.curtain-stage.is-jara-back .stage-jara,.blind.curtain-stage.is-jara-tell .stage-jara{background-image:url("/img/jara-tell-sheet.webp?v=a43f7a2f42c9")}
 .blind.curtain-stage.is-jara-listen .stage-jara::after{animation:none;opacity:1}
}

/* ===== v0.6 글자 크기 정리 ===== */
html body .review-identity .review-stamp,html body .review-identity strong,html body .scope-choice .scope-note,html body .unit-option .unit-copy>span,html body .exchange-meta .record-number,html body .exchange-meta .record-kind,html body .exchange-meta .record-temporary,html body .history .temporary-note,html body .hud-tile-num small{font-size:var(--fs-xs)}
html body .scope-choice .scope-instruction,html body .unit-option .unit-count,html body .scope-choice legend,html body .scope-choice .scope-summary,html body .level-picker .level-label,html body .msg-bubble .answer-note,html body .composer-caption label,html body .composer-caption .name-budget,html body .counter .counter-label,html body .counter .counter-total,html body .history-toggle,html body .history-heading .history-toggle{font-size:var(--fs-sm)}
html body .unmet-pick strong,html body .stage .stage-caption,html body .inputline button{font-size:var(--fs-md)}
html body .welcome .welcome-lead{font-size:1rem}
html body .counter strong,html body .topbar .counter strong,html body .control-panel .counter strong,html body :is(.keyboard-open,.compact-layout) .counter strong{font-size:var(--fs-lg)}
html body .gallery-head h1{font-size:var(--fs-xl)}
html body .tabs .tab{font-size:var(--fs-sm)}
@media(max-width:800px){html body .tabs .tab{white-space:nowrap}}
.gallery-card .gallery-plate{width:96px;height:96px;padding:0;overflow:hidden;font-size:0}
.gallery-card.is-locked .gallery-plate{width:64px;height:64px;font-size:1.6rem}
.gallery-plate img{display:block;width:100%;height:100%;object-fit:cover;object-position:center 18%}
.gallery-card .gallery-plate.no-portrait,.gallery-card.is-won .gallery-plate.no-portrait{background:#e9dfca url("/img/silhouette.webp?v=e18d46684c25") center 30%/120% no-repeat}
.gallery-card .gallery-badge{white-space:nowrap}

/* ===== v0.7 정답 공개 무대 ===== */

.reveal-wrap,.result .reveal-wrap.portrait{margin:0 auto 18px;width:min(100%,640px);max-width:none}.reveal-wrap.portrait .reveal-stage.has-cutout img.reveal-figure{background:none;border-radius:0;border:0;box-shadow:none;width:auto}.reveal-wrap.portrait .reveal-stage.has-frame img.reveal-figure{background:#eee8dc}
.reveal-stage{position:relative;width:100%;aspect-ratio:1586/992;border-radius:10px;overflow:hidden;background:#2c241a url("/img/stage-bg.webp?v=00c0aad5319e") center/cover no-repeat;box-shadow:0 14px 30px #3a2a1a40,inset 0 -20px 34px #0000004a;cursor:default;isolation:isolate}
.reveal-stage.is-playing{cursor:pointer}
.reveal-glow{position:absolute;inset:0;z-index:1;background:radial-gradient(ellipse 42% 48% at 50% 54%,#fff3c9f0 0,#ffd98a99 38%,#ffb85a33 62%,transparent 78%);opacity:0;mix-blend-mode:screen}
.reveal-rays{position:absolute;left:50%;top:54%;width:160%;aspect-ratio:1;z-index:1;transform:translate(-50%,-50%);background:repeating-conic-gradient(from 0deg,#fff1c455 0 6deg,transparent 6deg 18deg);-webkit-mask:radial-gradient(circle,#000 0,#000 18%,transparent 52%);mask:radial-gradient(circle,#000 0,#000 18%,transparent 52%);opacity:0}
.reveal-figure{position:absolute;z-index:2;left:50%;transform:translateX(-50%)}
.reveal-stage.has-cutout .reveal-figure{bottom:10%;height:72%;width:auto;aspect-ratio:1/1;object-fit:contain;filter:drop-shadow(0 0 1.5px #fff6dccc) drop-shadow(0 6px 6px #0000006b)} /* 밝은 테두리: 왕건 복두 날개가 들보에 묻히던 문제(재검토) */
.reveal-stage.has-frame .reveal-figure{top:27%;width:30%;aspect-ratio:1/1;object-fit:cover;border:5px solid #fff7e5;border-radius:4px;box-shadow:0 0 0 1px #c7b99d,0 10px 18px #00000059}
.reveal-plate-mini{top:20%;width:30%;aspect-ratio:1;display:grid;place-items:center;border-radius:50%;background:radial-gradient(circle at 50% 40%,#fbf0d2,#d9b878);border:5px double #8a6a3c;font:700 clamp(2rem,7vw,3.6rem)/1 'Batang','바탕',Georgia,serif;color:#3b2a20}
.reveal-stage .curtain{position:absolute;top:0;bottom:0;width:51%;z-index:3;background-color:transparent;background-repeat:no-repeat;background-size:200% 100%;pointer-events:none}
.reveal-stage .curtain-left{left:0;background-image:url("/img/curtain-left-c.webp?v=960897a16a06");background-position:left center;transform-origin:left top}
.reveal-stage .curtain-right{right:0;background-image:url("/img/curtain-right-c.webp?v=1edfdf7346a3");background-position:right center;transform-origin:right top}
.reveal-jara{position:absolute;z-index:4;left:3%;bottom:9%;height:40%;aspect-ratio:1;background:url("/img/jara-tell.webp?v=bae81e69397b") center bottom/contain no-repeat;filter:drop-shadow(0 4px 3px #0007);transform-origin:50% 100%}
.reveal-name{position:absolute;z-index:5;top:6%;right:4%;left:auto;transform:none;display:flex;flex-direction:column;align-items:center;gap:2px;padding:6px 24px 8px;border-radius:6px;background:linear-gradient(180deg,#7a4e28,#5c3818);border:3px double #d9b25a;box-shadow:0 6px 12px #0000005c,inset 0 1px 0 #ffffff2e;color:#fbecc8;font-family:'Batang','바탕',Georgia,serif;white-space:nowrap}
.reveal-name span{font-size:var(--fs-xs,.8rem);letter-spacing:.2em;color:#e8cf95}
.reveal-name strong{font-size:clamp(1.25rem,3.2vw,1.8rem);letter-spacing:.14em;line-height:1.15}
.reveal-petals{position:absolute;inset:0;z-index:6;width:100%;height:100%;pointer-events:none}
.reveal-credit{margin:6px 0 0;font-size:var(--fs-xs,.8rem);color:#7a6a55}.reveal-credit a{color:inherit}
/* 끝난 모습(다시 그리기·건너뛰기·움직임 줄이기) */
.reveal-stage.is-done .curtain-left{transform:translateX(-86%)}.reveal-stage.is-done .curtain-right{transform:translateX(86%)}
.reveal-stage.is-done .reveal-glow{opacity:.85}.reveal-stage.is-done .reveal-rays{opacity:.3}
/* 연출 */
.reveal-stage.is-playing .curtain-left{animation:rv-shiver .5s ease-in-out,rv-open-l 1.4s cubic-bezier(.6,.05,.25,1) .5s forwards}
.reveal-stage.is-playing .curtain-right{animation:rv-shiver .5s ease-in-out,rv-open-r 1.4s cubic-bezier(.6,.05,.25,1) .5s forwards}
.reveal-stage.is-playing .reveal-glow{animation:rv-glow .9s ease-out .9s forwards}
.reveal-stage.is-playing .reveal-rays{animation:rv-rays 1.2s ease-out 1s forwards,rv-spin 24s linear infinite}
.reveal-stage.is-done .reveal-rays{animation:rv-spin 24s linear infinite}
.reveal-stage.is-playing .reveal-figure{animation:rv-rise .9s cubic-bezier(.2,.8,.3,1) 1.1s both}
.reveal-stage.is-playing .reveal-name{animation:rv-drop .7s cubic-bezier(.3,1.5,.5,1) 2s both}
.reveal-stage.is-playing .reveal-jara{animation:rv-bow .8s ease-in-out 2.3s both}
@keyframes rv-shiver{25%{transform:scaleX(1.015)}50%{transform:scaleX(.99)}75%{transform:scaleX(1.01)}}
@keyframes rv-open-l{to{transform:translateX(-86%)}}@keyframes rv-open-r{to{transform:translateX(86%)}}
@keyframes rv-glow{to{opacity:.85}}@keyframes rv-rays{to{opacity:.3}}
@keyframes rv-spin{to{transform:translate(-50%,-50%) rotate(360deg)}}
@keyframes rv-rise{from{opacity:0;transform:translateX(-50%) translateY(10%) scale(.94)}to{opacity:1;transform:translateX(-50%) translateY(0) scale(1)}}
@keyframes rv-drop{from{opacity:0;transform:translateY(-140%)}to{opacity:1;transform:translateY(0)}}
@keyframes rv-bow{0%,100%{transform:rotate(0)}40%,60%{transform:rotate(-9deg) translateY(4%)}}
@media(prefers-reduced-motion:reduce){.reveal-stage *{animation:none!important}}
/* 좁은 화면: 이름패가 인물 머리를 가리던 문제(2026-11-15 휴대폰 촬영) → 작게, 오른쪽 위 */
@media(max-width:560px){.reveal-name{padding:3px 12px 4px;border-width:2px}.reveal-name span{display:none}.reveal-name strong{font-size:1rem;letter-spacing:.08em}}

/* ===== v0.7 UI 손질 ===== */

html body img.face-fit{object-fit:contain;object-position:50% 50%;transform-origin:50% 50%}
html body .avatar-photo,html body .gallery-plate.has-portrait{background:#f3ead8}
.gallery-grid{align-items:start;grid-auto-rows:auto}
.gallery-card{min-height:210px;justify-content:flex-start}
.gallery-card.is-locked{min-height:150px;justify-content:center}
.gallery-card.is-locked .gallery-plate{width:72px;height:72px}
.gallery-card .gallery-line{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}

/* ===== v0.8 UI 다듬기 ===== */
/* 배경 무늬: dot 시안 4장 중 선생님이 고른 C 연꽃 당초(진하기 그대로). Claude가 그린 구름무늬는 선생님 판단으로 뺌(2026-11-15).
   타일: tools/asset-pipeline/pattern-tile.py로 바탕 결을 지우고 투명하게 만든 640px(assets-incoming/bg-v08) */
html body{background:url("/img/pattern-lotus.webp?v=16e7c3462215") 0 0/640px 640px repeat,radial-gradient(ellipse at 8% 0,#dfd1b980,transparent 45%),#f3eee3}
/* 공통 값: 버튼은 세 가지 무게만 — 채움(지금 할 일)·한지(보조)·글자(작은 도구). 모서리 12px, 칩·전환만 둥근 알약 */
:root{--btn-r:12px;--focus-ring:#d39a2a;--paper-hi:#fffdf6;--paper-lo:#f2e9d6;--paper-edge:#cdb995;--lacquer-hi:#3a5e50;--lacquer-lo:#223b33;--lacquer-edge:#172a23}
html body button{border-radius:var(--btn-r);letter-spacing:-.02em;transition:transform .08s ease,box-shadow .12s ease,filter .12s ease,background-color .12s ease}
/* 초점: '고른 것'(초록)과 다른 금빛, 바깥에 띄움 */
html body button:focus-visible,html body summary:focus-visible,html body a:focus-visible,html body .history:focus-visible{outline:3px solid var(--focus-ring);outline-offset:2px}
/* 채움 버튼(옻칠 느낌): 물어보기·맞혀 보기·다시 하기·탐구 시작하기·다듬어 줘 */
html body :is(button[class=""],button.primary,button.primary-start,.inputline>button){background:linear-gradient(180deg,var(--lacquer-hi),var(--lacquer-lo));color:#fffaf0;border:1px solid var(--lacquer-edge);box-shadow:inset 0 1px 0 #ffffff2e,inset 0 -2px 0 #0000002e,0 2px 5px #1b2a2338;text-shadow:0 1px 0 #0000003a}
html body .mode-guess .inputline>button{background:linear-gradient(180deg,#956a35,#6f4a20);border-color:#5a3b17}
html body :is(button[class=""],button.primary,button.primary-start,.inputline>button):active:not(:disabled){transform:translateY(1px);box-shadow:inset 0 2px 4px #00000059}
/* 한지 버튼: 보조 동작 */
html body :is(button.secondary,button.gallery-open,.icon-btn,button.history-toggle,.status button,.review-questions button){background:linear-gradient(180deg,var(--paper-hi),var(--paper-lo));color:#3a3024;border:1px solid var(--paper-edge);box-shadow:inset 0 1px 0 #fff,0 1px 0 #dccdae,0 2px 5px #6b5a4514;text-shadow:none}
html body :is(button.secondary,button.gallery-open,.icon-btn,button.history-toggle,.status button):hover:not(:disabled){filter:none;background:linear-gradient(180deg,#fffef9,#f6eedc);border-color:#bba57c}
html body :is(button.secondary,button.gallery-open,.icon-btn,button.history-toggle,.status button,.review-questions button):active:not(:disabled){transform:translateY(1px);box-shadow:inset 0 2px 3px #6b5a4530}
/* 글자 버튼: 작은 도구 */
html body button.quiet:not(.history-toggle){border-radius:var(--btn-r);background:transparent;border:1px solid transparent;box-shadow:none;color:#5b4a35;text-decoration:underline;text-decoration-color:#cdb995;text-underline-offset:4px}
html body button:disabled{opacity:.5;box-shadow:none;filter:grayscale(.25);transform:none}
/* 누르는 곳 44px(작은 도구 포함) */
html body .icon-btn{width:44px;height:44px;min-height:44px;border-radius:var(--btn-r)}
html body .history-heading .history-toggle{min-height:44px;padding:6px 14px;border-radius:var(--btn-r)}
html body .gallery-open{border-radius:var(--btn-r);min-height:44px}
html body .input-row>.tabs .tab{min-height:44px}
/* 질문/정답 전환: 홈이 파인 판 위의 한지 조각 */
html body .tabs,html body .input-row>.tabs{background:#e9dfca;box-shadow:inset 0 1px 3px #6b5a4533}
html body .tab{border-radius:calc(var(--btn-r) - 3px);box-shadow:none;color:#6b5a45}
html body .input-row>.tabs .tab{border-radius:999px}
html body .tab[aria-selected=true]{background:linear-gradient(180deg,#fffef9,#f7f0e1);color:#22392f;border-color:#cdb995;box-shadow:0 1px 3px #6b5a4533}
html body .mode-guess .tab[aria-selected=true]{color:#6f4a20}

/* 글상자: 한지에 먹으로 쓰는 칸 — 오류처럼 보이던 붉은 이중 테두리 대신 금빛 고리 */
html body input[type=text],html body input:not([type]){background:var(--paper-hi);border:1.5px solid var(--paper-edge);color:#2f2a22;box-shadow:inset 0 1px 3px #6b5a4522}
html body input::placeholder{color:#968671;opacity:1}
html body input:focus{outline:none;border-color:#8a6a35;box-shadow:inset 0 1px 3px #6b5a4522,0 0 0 3px #e2b55a73}
html body input:focus-visible{outline:none}
html body .mode-guess input{border-color:#b9976a}
html body input:disabled{background:#f1ece2;color:#8a7c68;box-shadow:none}

/* 말풍선: 흰 상자 대신 한지 쪽지 */
html body .msg-them .msg-bubble{background:linear-gradient(180deg,#fffef9,#fffaf0);border:1px solid #e0d0b0;box-shadow:0 1px 0 #e9dcc2,0 3px 8px #6b5a4512}
html body .msg-me .msg-bubble{background:linear-gradient(180deg,#36604f,#2a5042);box-shadow:0 1px 0 #1d382e,0 3px 8px #1b2a2326}
html body .history,html body .talk .chat-list{background:radial-gradient(ellipse at 50% 0,#fbf5e8 0,transparent 60%),repeating-linear-gradient(93deg,#ffffff08 0 2px,#a8905c06 2px 5px),#f3ebdc}
html body .talk-limit-note{background:#f6eedd;border-radius:8px;padding:6px 9px}

/* 게임 중 무대: 검은 틀 속 작은 사진 → 칸을 채우는 단청 무대 */
@media(min-width:801px){
 html body .question-side .stage{position:relative;padding:0;background:#3a2516;border:0;border-radius:12px;box-shadow:0 0 0 1px #2a1a10,inset 0 0 0 3px #b98a3e,0 8px 18px #3a2a1a33;justify-content:flex-start;overflow:hidden}
 html body .question-side .stage:before,html body .question-side .stage:after{content:none}
 html body .question-side .stage .blind.curtain-stage{width:100%;height:100%;max-height:none;min-height:0;flex:1 1 auto;border-radius:0;box-shadow:none}
 html body .question-side .stage .stage-caption{position:absolute;left:0;right:0;bottom:0;margin:0;padding:22px 12px 9px;text-align:center;background:linear-gradient(180deg,transparent,#1e130bcc 55%);color:#f6e7c4;z-index:7;text-shadow:0 1px 2px #000a}
}
/* 세로 패드(좁고 긴 화면): 숨겼던 무대를 대화창 위 띠로 */
@media(max-width:800px) and (min-height:900px){
 body:not(.keyboard-open):not(.history-expanded) .question-side{flex-wrap:wrap}
 body:not(.keyboard-open):not(.history-expanded) .question-side .stage{display:block;order:-1;flex:0 0 100%;height:clamp(150px,20vh,230px);padding:0;border:0;border-radius:12px;overflow:hidden;position:relative;background:#3a2516;box-shadow:0 0 0 1px #2a1a10,inset 0 0 0 3px #b98a3e}
 body:not(.keyboard-open):not(.history-expanded) .question-side .stage:before,body:not(.keyboard-open):not(.history-expanded) .question-side .stage:after{content:none}
 body:not(.keyboard-open):not(.history-expanded) .question-side .stage .blind.curtain-stage{width:100%;height:100%;min-height:0;border-radius:0;box-shadow:none}
 body:not(.keyboard-open):not(.history-expanded) .question-side .stage .stage-caption{position:absolute;left:0;right:0;bottom:0;margin:0;padding:18px 12px 7px;text-align:center;background:linear-gradient(180deg,transparent,#1e130bcc 55%);color:#f6e7c4;z-index:7;font-size:var(--fs-sm)}
 body:not(.keyboard-open):not(.history-expanded) .conversation{border-top:1px solid var(--line);box-shadow:none}
}
/* 제목이 글자 중간에서 꺾이지 않게 */
html body .topbar .brand h1,html body .result h1{word-break:keep-all}

/* 결과 화면: 정점(이름패)을 위로, 넓은 화면은 무대·제목 왼쪽 / 인물과 대화 오른쪽 */
html body .gallery-new{display:inline-flex;align-items:center;gap:8px;margin:4px auto 14px;padding:8px 18px 8px 10px;border-radius:999px;background:linear-gradient(180deg,#fff6dc,#f8e7b8);border:2px solid #c9a24a;color:#6b4a12;font-weight:800;box-shadow:0 3px 10px #c9a24a40}
html body .gallery-new:before{content:'';flex:none;width:26px;height:26px;border-radius:50%;background:radial-gradient(circle at 40% 35%,#fbe6a6,#c9a24a 60%,#8a6a22);box-shadow:inset 0 0 0 2px #fff3cf}
@media(prefers-reduced-motion:no-preference){html body .gallery-new{animation:v08-badge .6s cubic-bezier(.3,1.5,.5,1) 2.4s both}@keyframes v08-badge{from{opacity:0;transform:scale(.7)}to{opacity:1;transform:scale(1)}}}
html body .result .actions{margin:6px 0 10px}
html body .result .actions .primary-start{min-width:160px}
html body .result-scope{margin:0 auto 14px;max-width:560px;text-align:left}
html body .result-scope>summary{justify-content:center;width:fit-content;margin:0 auto;padding:6px 14px;border-radius:var(--btn-r);color:#5b4a35;font-size:var(--fs-sm);font-weight:700;list-style:none;text-decoration:underline;text-decoration-color:#cdb995;text-underline-offset:4px}
html body .result-scope>summary::-webkit-details-marker{display:none}
html body .result-scope>summary:before{content:'▸';margin-right:6px;text-decoration:none;display:inline-block}
html body .result-scope[open]>summary:before{content:'▾'}
html body .result-scope .scope-choice{margin-top:8px}
html body .result .talk.chat-card{text-align:left;margin:8px 0 18px}
html body .result .review{margin-top:8px}
/* 근거 돌아보기 목록: 한지 카드, 고른 것은 초록 띠 */
html body .review-questions button{padding:12px 14px 12px 44px;margin:8px 0;border-radius:var(--btn-r);font-weight:700;color:#3a3024}
html body .review-questions button[aria-pressed=true]{background:linear-gradient(180deg,#f3f7ef,#e6efe2);border-color:#2f5a4b;box-shadow:inset 4px 0 0 #2f5a4b,0 1px 0 #c9d6c1;color:#22392f}
html body .review-questions button:before{top:50%;transform:translateY(-50%);font-size:1.05rem;left:16px}
html body .result .review-detail p{margin:10px 0;max-width:none} /* .result p(가운데·550px)가 근거 상자 안 문단만 들여 쓰던 문제 */
html body .result .chat-earlier>summary{margin:0 auto}html body .result .chat-earlier+.chat-notice{margin-top:2px}
html body .review-detail{background:var(--paper-hi);border:1px solid #e0d0b0;border-radius:var(--btn-r);box-shadow:0 2px 8px #6b5a4512}
@media(min-width:1024px){
 html body .result{max-width:1240px;display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);grid-template-rows:repeat(9,auto) 1fr;column-gap:32px;row-gap:0;align-items:start;padding-top:18px}
 html body .result>*{grid-column:1}
 html body .result>.talk{grid-column:2;grid-row:1/span 10;align-self:stretch;margin:22px 0 18px;display:flex;flex-direction:column;min-height:min(640px,calc(var(--visible-height) - 80px))}
 html body .result>.talk .chat-list{flex:1}
 html body .result>.review,html body .result>.temporary-review{grid-column:1/-1}
 html body .result>.reveal-wrap{width:100%;margin-bottom:12px}
 html body .result>h1{margin:4px 0 6px}
 html body .result>p{margin:6px auto 12px}
 html body .result>.gallery-new{justify-self:center}
}
/* ===== v0.8 UI 다듬기 끝 ===== */
/* ===== v0.8.2 검수 반영 ===== */
/* 시작 버튼: 오른쪽 상자 아래 고정 줄(화면이 낮아도 늘 보임). 줄 바탕은 상자 안쪽 여백까지 채운다. */
.welcome-setup{--setup-pad:28px;--setup-pad-b:20px}
@media(max-width:1050px){.welcome-setup{--setup-pad:22px;--setup-pad-b:22px}}
@media(max-width:800px){.welcome-setup{--setup-pad:20px;--setup-pad-b:20px}}
@media(max-width:450px){.welcome-setup{--setup-pad:14px;--setup-pad-b:18px}}
html body .welcome-setup .start-bar{position:sticky;bottom:0;z-index:5;margin:14px calc(-1*var(--setup-pad)) calc(-1*var(--setup-pad-b));padding:12px var(--setup-pad) 10px;background:#fffaf0;border-top:1px solid #e3d6bb;box-shadow:0 -10px 14px -12px #5a4a3066}
html body .welcome .start-bar .primary-start{margin:0}
html body .welcome .start-bar .privacy-note{margin:8px 0 0}
html{scroll-padding-bottom:96px}
/* 낮은 가로 화면(높이 650px 이하): 무대를 숨기지 않고 왼쪽 열의 남는 높이만큼 띠로(최소 84px, 최대 170px) */
@media(max-height:650px) and (min-width:801px){
 html body:not(.keyboard-open):not(.history-expanded) .layout-full .question-side .stage{display:block;flex:1 1 0;min-height:84px;max-height:170px;position:relative;overflow:hidden;padding:0;border:0;border-radius:10px;background:#3a2516;box-shadow:0 0 0 1px #2a1a10,inset 0 0 0 3px #b98a3e}
 html body:not(.keyboard-open):not(.history-expanded) .layout-full .question-side .stage:before,html body:not(.keyboard-open):not(.history-expanded) .layout-full .question-side .stage:after{content:none}
 html body:not(.keyboard-open):not(.history-expanded) .layout-full .question-side .stage .blind.curtain-stage{width:100%;height:100%;min-height:0;max-height:none;border-radius:0;box-shadow:none}
 html body:not(.keyboard-open):not(.history-expanded) .layout-full .question-side .stage .stage-caption{display:none}
}
/* 그만하기 확인 창: 버튼 세 개 */
#dialog .actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
#dialog .actions button{min-height:44px}
#dialog #dialog-alt[hidden]{display:none}
/* 정답 공개: 그림을 받는 동안 장막은 닫힌 채, 이름이 든 글은 장막이 열린 뒤에 */
.reveal-stage.is-waiting .reveal-figure,.reveal-stage.is-waiting .reveal-name,.reveal-stage.is-waiting .reveal-jara{opacity:0}
.reveal-stage.is-waiting .reveal-glow,.reveal-stage.is-waiting .reveal-rays{opacity:0}
html body .result.reveal-pending>:not(.reveal-wrap),html body .result.reveal-pending .reveal-credit{visibility:hidden;opacity:0}
html body .result>*{transition:opacity .5s ease}
@media(prefers-reduced-motion:reduce){html body .result>*{transition:none}}
/* 대화창 머리글: 처리 중일 때만 '전하고 있사옵니다', 쉬는 동안은 '기다리고 있사옵니다'(아직 처리 중처럼 읽히던 문제) */
.chat-status .status-idle{display:none}
#app:not([aria-busy="true"]) .chat-status .status-busy{display:none}
#app:not([aria-busy="true"]) .chat-status .status-idle{display:inline}
#app:not([aria-busy="true"]) .chat-status:has(.status-idle):before{background:#b9ad95}
/* 누르는 곳 44px: 기록 크게 보기, 결과 화면 출처 링크 */
html body .history-toggle{min-height:44px}
html body .result .biography-sources a,html body .reveal-credit a,html body .review-detail a{display:inline-flex;align-items:center;min-height:44px;padding:0 4px}
/* ===== v0.8.2 검수 반영 끝 ===== */
/* ===== v0.8.3 공개 대기 ===== */
/* 그림을 기다리는 동안(최대 8초): 1초 뒤부터 '채비' 문구가 떠오르고 장막이 살짝 흔들린다. 장막이 열리면 사라진다. */
.reveal-stage .reveal-wait{display:none}
.reveal-stage.is-waiting .reveal-wait{display:block;position:absolute;left:0;right:0;bottom:10%;margin:0;text-align:center;z-index:8;color:#f6e7c4;font-weight:700;font-size:var(--fs-sm,.85rem);text-shadow:0 1px 3px #000c;opacity:0}
@media(prefers-reduced-motion:no-preference){
 .reveal-stage.is-waiting .reveal-wait{animation:v083-wait-in .6s ease-out 1s forwards}
 .reveal-stage.is-waiting .curtain-left,.reveal-stage.is-waiting .curtain-right{animation:rv-shiver 1.4s ease-in-out 1s infinite}
}
@media(prefers-reduced-motion:reduce){.reveal-stage.is-waiting .reveal-wait{opacity:1}}
@keyframes v083-wait-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
/* ===== v0.8.3 공개 대기 끝 ===== */
/* === v0.8.4 개인정보 처리방침 링크 === */
html body .welcome .privacy-note .policy-link{display:inline-block;margin:-7px 0 -7px 8px;padding:7px 6px;color:#4f5a46;text-decoration:underline;text-underline-offset:2px;white-space:nowrap;border-radius:6px}
html body .welcome .start-bar .privacy-note{margin:10px 0 0}
html body .welcome .privacy-note .policy-link:hover{color:#244c43}
html body .welcome .privacy-note .policy-link:focus-visible{outline:2px solid #244c43;outline-offset:1px}
html body .talk-remaining-line .talk-privacy{word-break:keep-all;overflow-wrap:anywhere}
/* === /v0.8.4 === */
