/* Round 1: three independent type roles. Poster, transitions, notebook and card keep their existing styles. */
:root{
 --font-cinema:var(--title);--font-game-ui:"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;--font-march-record:DiaryHand,ExpeditionInk,"Kaiti SC",serif;
 --game-text:clamp(16px,1.25vw,21px);--game-task:clamp(17px,1.45vw,24px);--game-label:clamp(14px,1.05vw,17px);--game-action:clamp(15px,1.1vw,18px);--game-line:1.55;--game-tracking:.035em;--game-weight:400;
 --game-edge-left:max(24px,env(safe-area-inset-left));--game-edge-right:max(24px,env(safe-area-inset-right));--game-edge-top:max(8px,env(safe-area-inset-top));--game-edge-bottom:max(12px,env(safe-area-inset-bottom));--game-header-height:60px;
}
#game.ui-playing :is(.brand,.brand small,#objective,#objective small,#subtitle,#subtitle small,#controls button,.hotspot,.light-heading h2,.light-heading p,.reunion-heading h2,.reunion-heading p,.light-narration,.light-narration p,.light-narration small,.reunion-narration,.reunion-narration p,.reunion-narration small,.light-controls,.light-controls button,.reunion-controls,.reunion-controls button,.snow-interaction button,.snow-search-progress,.snow-rope-status small,.snow-rope-control small,.snow-rope-buttons button,.radio-inputs button,.radio-control-hint,.radio-stage-label,.radio-grip-target,.light-card-bank button,.light-puzzle-feedback,.light-puzzle-actions button,.reunion-timeline,.reunion-timeline p,.reunion-sources,.finale-heading,.finale-footer,.finale-footer h1,.finale-body,.finale-actions,.finale-actions button,.finale-identity-form textarea,.finale-identity-form small,.finale-compare-hint){font-family:var(--font-game-ui);font-weight:var(--game-weight);letter-spacing:var(--game-tracking);font-synthesis:none}
#game.ui-playing>header{inset:0 var(--game-edge-right) auto var(--game-edge-left);right:calc(var(--game-edge-right) + 92px);padding:var(--game-edge-top) 0 0;min-height:var(--game-header-height);display:flex;gap:16px;align-items:center;pointer-events:none}
#game.ui-playing>header .brand{font-size:var(--game-label);min-width:0;white-space:normal;line-height:1.5}
#game.ui-playing>header .brand small{font-size:var(--game-label);font-weight:500;white-space:normal}
#game.ui-playing>header>div{flex:none;gap:8px;pointer-events:auto;display:flex}
#game.ui-playing>header button,body:has(#game.ui-playing) #global-sound{font:500 var(--game-label)/1.35 var(--font-game-ui);min-height:44px;padding:8px 10px;min-width:44px;border:1px solid #dfd1ac55;border-radius:3px;background:#17201b66;color:#fff7e6;letter-spacing:0;white-space:nowrap}
body:has(#game.ui-playing) #global-sound{right:var(--game-edge-right);top:var(--game-edge-top);width:84px}
#game.ui-playing #hud #objective,#game.ui-playing :is(.light-heading,.reunion-heading){top:calc(var(--game-header-height) + var(--game-edge-top) + 8px);left:var(--game-edge-left);right:var(--game-edge-right);max-width:min(680px,calc(100% - var(--game-edge-left) - var(--game-edge-right)));font:500 var(--game-task)/1.45 var(--font-game-ui);letter-spacing:var(--game-tracking);padding:0 12px;border-left:1px solid #d1aa7380;overflow-wrap:anywhere;pointer-events:none}
#game.ui-playing :is(.light-heading,.reunion-heading) h2{font:500 var(--game-task)/1.45 var(--font-game-ui);letter-spacing:var(--game-tracking);margin:0}
#game.ui-playing #hud #objective small,#game.ui-playing :is(.light-heading,.reunion-heading) p{font:400 var(--game-label)/1.5 var(--font-game-ui);letter-spacing:.02em;margin:5px 0 0;max-width:100%;color:#ecdfc5}
#game.ui-playing .ui-task-toggle{position:absolute;right:0;top:-7px;min-height:44px;min-width:60px;padding:8px;border:1px solid #dfd1ac44;border-radius:3px;font:400 var(--game-label)/1.3 var(--font-game-ui);letter-spacing:0;background:#17201b88;color:#fff7e6;pointer-events:auto}
#game.ui-playing .ui-task-toggle{display:none}
/* Captions and action rows flow together, keeping multiline dialogue clear of buttons. */
#game.ui-playing:not(.chapter-snow):not(.chapter-light):not(.chapter-reunion):not(:has(.finale)) #hud{position:absolute;inset:0;display:grid;grid-template-rows:minmax(0,1fr) auto auto;gap:10px;padding:0 max(5%,var(--game-edge-right)) calc(var(--game-edge-bottom) + 25px) max(5%,var(--game-edge-left));pointer-events:none}
#game.ui-playing:not(.chapter-snow):not(.chapter-light):not(.chapter-reunion):not(:has(.finale)) #hud #subtitle{position:static;inset:auto;grid-row:2;max-width:960px;width:100%;margin:0 auto;max-height:28svh;overflow:auto;pointer-events:auto}
#game.ui-playing:not(.chapter-snow) #hud #controls{position:static;inset:auto;grid-row:3;width:100%;margin:0;pointer-events:auto}
#game.ui-playing :is(#subtitle,.light-narration p,.reunion-narration p,.finale-body){font-size:var(--game-text);line-height:var(--game-line);overflow-wrap:anywhere;text-shadow:0 2px 5px #000,0 0 12px #000c}
#game.ui-playing #subtitle small,#game.ui-playing :is(.light-narration,.reunion-narration) small{font-size:var(--game-label);line-height:1.4;margin-bottom:4px}
#game.ui-playing :is(#controls,.light-controls,.reunion-controls){display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:8px 12px;min-width:0}
#game.ui-playing :is(#controls button,.light-controls>button,.reunion-controls>button,.light-puzzle-actions button){font-size:var(--game-action);line-height:1.4;min-height:44px;padding:8px 12px;max-width:100%;white-space:normal;overflow-wrap:anywhere;border-radius:3px;border:1px solid #dfd1ac55;background:#14201966;box-shadow:none}
#game.ui-playing :is(.light-footer,.reunion-footer){left:max(4%,var(--game-edge-left));right:max(4%,var(--game-edge-right));bottom:calc(var(--game-edge-bottom) + 20px);max-height:42svh;overflow:auto;overscroll-behavior:contain;gap:10px;padding:8px 0;pointer-events:none}
#game.ui-playing :is(.light-footer,.reunion-footer)>*{pointer-events:auto}
#game.ui-playing.chapter-light:has(.light-puzzle-board) .light-narration{position:static;inset:auto;width:100%;text-align:center!important}
#game.ui-playing.chapter-light:has(.light-puzzle-board) .light-footer{bottom:calc(var(--game-edge-bottom) + 20px)}
#game.ui-playing :is(.light-card-bank,.light-puzzle-actions){gap:8px;flex-wrap:wrap}
#game.ui-playing .light-card-bank button{font-size:var(--game-action);min-height:44px}
#game.ui-playing.chapter-snow #snow-dock{left:var(--game-edge-left);right:var(--game-edge-right);bottom:calc(var(--game-edge-bottom) + 20px);max-height:43svh;overflow:auto;gap:12px;align-items:center;padding:4px 0}
#game.ui-playing.chapter-snow #snow-dock #subtitle{font-size:var(--game-text);line-height:var(--game-line);min-width:0}
#game.ui-playing.chapter-snow #snow-dock #controls{min-width:0;max-width:100%;gap:10px}
#game.ui-playing.chapter-snow #snow-dock #controls button{font-size:var(--game-action);line-height:1.4;min-height:44px;padding:8px;min-width:44px}
#game.ui-playing.chapter-snow :is(.snow-rope-status small,.snow-rope-control small){font-size:var(--game-label);line-height:1.4;letter-spacing:0}
#game.ui-playing .radio-control-hint{font:400 var(--game-label)/1.5 var(--font-game-ui)!important;letter-spacing:.02em!important;margin:0;max-width:100%}
#game.ui-playing .radio-stage-label{top:auto;bottom:39%;font-size:var(--game-label)}
#game.ui-playing .finale:not(.finale-souvenir) .finale-heading{left:var(--game-edge-left);right:calc(var(--game-edge-right) + 92px);width:auto;padding:var(--game-edge-top) 0;min-height:var(--game-header-height);font-size:var(--game-label);align-items:center}
#game.ui-playing .finale:not(.finale-souvenir) .finale-footer{left:var(--game-edge-left);right:var(--game-edge-right);width:auto;bottom:var(--game-edge-bottom);max-height:48svh;overflow:auto;padding:8px 0;gap:7px;overscroll-behavior:contain}
#game.ui-playing .finale:not(.finale-souvenir) .finale-footer h1{font-size:var(--game-task);line-height:1.4;animation:none}
#game.ui-playing .finale:not(.finale-souvenir) .finale-actions{gap:8px 12px}
#game.ui-playing .finale:not(.finale-souvenir) button{font-size:var(--game-action);line-height:1.4;min-height:44px;padding:8px 12px;border:1px solid #dfd1ac55;border-radius:3px;background:#14201966}
#game.ui-playing .finale-identity-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;max-width:780px}
#game.ui-playing .finale-identity-form label{grid-column:1/-1;min-width:0;font-size:var(--game-label);display:flex;align-items:center}
#game.ui-playing .finale-identity-form textarea{font-size:16px;line-height:1.5;height:60px;resize:none}
#game.ui-playing .finale-identity-form small{font-size:var(--game-label);text-align:left}
#game.ui-playing .finale-compare-hint{font-size:var(--game-label)}
#game.ui-playing .finale-era{top:calc(var(--game-header-height) + var(--game-edge-top) + 8px)}
@media(orientation:landscape) and (max-height:550px){
 :root{--game-text:16px;--game-task:17px;--game-label:14px;--game-action:15px;--game-header-height:48px;--game-edge-left:max(16px,env(safe-area-inset-left));--game-edge-right:max(16px,env(safe-area-inset-right));--game-edge-top:max(4px,env(safe-area-inset-top));--game-edge-bottom:max(8px,env(safe-area-inset-bottom))}
 #game.ui-playing>header .brand{font-size:0;line-height:1;max-width:50%}
 #game.ui-playing>header .brand i{display:none}
 #game.ui-playing>header .brand small{font-size:var(--game-label);line-height:1.5}
 #game.ui-playing>header>div{gap:6px}
 #game.ui-playing>header button{padding:6px 8px}
 #game.ui-playing:not(.chapter-snow):not(.chapter-light):not(.chapter-reunion):not(:has(.finale)) #hud{padding-bottom:calc(var(--game-edge-bottom) + 26px);gap:7px}
 #game.ui-playing :is(.light-footer,.reunion-footer){bottom:calc(var(--game-edge-bottom) + 24px);max-height:40svh;gap:7px}
 #game.ui-playing.chapter-snow #snow-dock{bottom:calc(var(--game-edge-bottom) + 24px);grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);max-height:43svh;gap:14px}
 #game.ui-playing.chapter-snow #snow-dock #controls{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}
 #game.ui-playing.chapter-snow #snow-dock .snow-rope-status{height:40px;gap:14px}
 #game.ui-playing.chapter-snow #snow-dock .snow-rope-control{height:58px}
 #game.ui-playing.chapter-snow #snow-dock .snow-rope-control small{margin-top:24px}
 #game.ui-playing.chapter-snow #snow-dock .snow-rope-buttons{width:100%}
 #game.ui-playing.chapter-snow #snow-dock .snow-rope-buttons button{min-width:44px;flex:1}
 #game.ui-playing .finale-compare .finale-footer{max-height:38svh}
}
@media(orientation:landscape) and (max-width:720px){
 #game.ui-playing>header .brand{max-width:44%}
 #game.ui-playing #hud #objective,#game.ui-playing :is(.light-heading,.reunion-heading){max-width:100%;font-size:16px}
 #game.ui-playing :is(#controls,.light-controls,.reunion-controls){gap:6px 8px}
 #game.ui-playing .finale-identity-form{gap:4px 8px}
}

/* Keep radio guidance above the hand targets; retain their original model coordinates. */
#game.ui-playing:not(.chapter-snow):not(.chapter-light):not(.chapter-reunion):has(.radio-scene) #hud{grid-template-rows:auto auto minmax(0,1fr);padding-top:calc(var(--game-header-height) + var(--game-edge-top) + 66px);padding-right:54%;padding-left:var(--game-edge-left);gap:8px}
#game.ui-playing:not(.chapter-snow):not(.chapter-light):not(.chapter-reunion):has(.radio-scene) #hud #subtitle{grid-row:1;text-align:left;max-height:20svh}
#game.ui-playing:not(.chapter-snow):not(.chapter-light):not(.chapter-reunion):has(.radio-scene) #hud #controls{grid-row:2;justify-content:flex-start}
#game.ui-playing:not(.chapter-snow):not(.chapter-light):not(.chapter-reunion):has(.radio-scene) .radio-control-hint{text-align:left}
#game.ui-playing:not(.chapter-snow):not(.chapter-light):not(.chapter-reunion):has(.radio-scene) .radio-stage-label{top:calc(var(--game-header-height) + var(--game-edge-top) + 8px);bottom:auto;left:60%;font-size:var(--game-label)}
#game.ui-playing #hotspots .radio-inputs .radio-hand-control{font-size:14px;min-height:44px;transform:translate(-50%,-100%);line-height:1.35}
#game.ui-playing .radio-grip-target{font-size:14px;line-height:1.4;min-width:64px;text-align:center}
#game.ui-playing:not(.chapter-snow):not(.chapter-light):not(.chapter-reunion):has(.radio-scene):has(#objective:not(.ui-task-collapsed)) #hud{padding-top:calc(var(--game-header-height) + var(--game-edge-top) + 110px)}
@media(min-height:551px){
 #game.ui-playing:not(.chapter-snow):not(.chapter-light):not(.chapter-reunion):has(.radio-scene) #hud{padding-top:calc(var(--game-header-height) + var(--game-edge-top) + 120px)}
}
#game.ui-playing button,#game.ui-playing :is(.light-puzzle-card,.reunion-place-label,.radio-lift-guide,.reunion-hold-hint,.snow-rope-control){font-family:var(--font-game-ui)}
#game:not(.ui-playing) .ui-task-toggle{display:none}
/* Dates belong to distinct map labels, rather than sharing one horizontal band. */
#game.ui-playing #hotspots.image-map .reunion-atlas .reunion-map-node .reunion-place-label{font:400 clamp(16px,1.2vw,22px)/1.35 var(--font-game-ui);letter-spacing:0;scale:1}
#game.ui-playing #hotspots.image-map .reunion-atlas .reunion-map-node.selected .reunion-place-label{scale:1.06;font-weight:500}
#game.ui-playing #hotspots.image-map .reunion-atlas .reunion-map-node .reunion-place-label time{font:400 clamp(14px,1vw,17px)/1.4 var(--font-game-ui);letter-spacing:0;white-space:normal;overflow-wrap:anywhere;max-width:130px;margin-top:4px}
#game.ui-playing #hotspots.image-map .reunion-atlas .map-place-shaanbei .reunion-place-label{left:25px;top:18px}
#game.ui-playing #hotspots.image-map .reunion-atlas .reunion-map-node .reunion-place-label{width:max-content;max-width:150px}
#game.ui-playing #hotspots.image-map .reunion-atlas .reunion-map-node .reunion-place-label time{white-space:nowrap;max-width:none}

/* Desktop carry guidance: compact reading column instead of oversized loose lines. */
@media(min-width:1000px) and (min-height:551px){
 #game.ui-playing:has(.radio-scene) #hud #subtitle{font-size:22px;line-height:1.65;max-width:340px;max-height:none;align-self:start;letter-spacing:.04em;text-wrap:pretty}
 #game.ui-playing:has(.radio-scene) #hud #subtitle small{font-size:13px;line-height:1.5;margin-bottom:8px;color:#e2ceaa}
 #game.ui-playing:has(.radio-scene) #hud #controls{max-width:340px;align-self:start;margin-top:10px;padding-top:12px;border-top:1px solid #d6c29a44}
 #game.ui-playing:has(.radio-scene) #hud .radio-control-hint{font-size:15px!important;line-height:1.9!important;color:#e7dcc6;letter-spacing:.03em!important;text-wrap:pretty}
}

@media(min-width:1000px) and (min-height:551px){#game.ui-playing:has(.radio-scene) #hud .radio-control-hint{text-wrap:balance;max-width:300px}}

/* Identity question is a cinematic title, independent of the ordinary UI heading size. */
#game.ui-playing .finale.finale-identity-question:not(.finale-souvenir) .finale-footer h1{font-size:clamp(68px,8vw,144px)!important;font-weight:500;line-height:1.2;letter-spacing:.16em;animation:identity-question-appear 3s ease-out both!important}
@media(prefers-reduced-motion:reduce){#game.ui-playing .finale.finale-identity-question:not(.finale-souvenir) .finale-footer h1{animation:none!important}}

/* Echo the prologue's title face in the final identity question. */
#game.ui-playing .finale.finale-identity-question:not(.finale-souvenir) .finale-footer h1{font-family:var(--title)!important;font-weight:900;letter-spacing:.08em;font-synthesis:none}
