/* Layout dimensions follow the chosen playing direction, including browsers
   whose screen-orientation API is unavailable. Pointer targets rotate with it. */
#app { position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);container-type:size; }
#app.rotated { transform:translate(-50%,-50%) rotate(90deg);
  --safe-t:env(safe-area-inset-right,0px);--safe-r:env(safe-area-inset-bottom,0px);
  --safe-b:env(safe-area-inset-left,0px);--safe-l:env(safe-area-inset-top,0px); }
.settings-scroll { max-height:calc(var(--app-h)*.55); }
.options { display:flex;flex-direction:column; }
.options .settings-scroll { flex:1;min-height:0; }
.options>.primary,.options>.sheet-mark,.options>.sheet-kicker { flex-shrink:0; }
.welcome { position:absolute;inset:0;z-index:20;display:grid;place-items:center;overflow:auto;padding:20px;
  background:radial-gradient(ellipse at top,#66382e,#20161a 75%); }
.welcome-card { width:min(100%,510px);padding:26px;border:1px solid #d7a66d88;border-radius:20px;
  background:#261c20;box-shadow:0 14px 45px #0006;text-align:center; }
.welcome-brand { color:#e5be87;font-size:11px;letter-spacing:.2em;font-weight:750; }
.welcome h2 { font-size:clamp(21px,5cqw,29px);line-height:1.4;margin:14px 0 6px;text-wrap:balance; }
.welcome p { color:#d1c5c0;font-size:13px;line-height:1.6;margin:8px 0; }
.orientation-choices { display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:18px 0; }
.orientation-choices button { min-height:124px;position:relative;display:flex;flex-direction:column;align-items:center;
  justify-content:center;gap:9px;padding:14px 8px;border:1px solid #b1a09780;border-radius:12px;background:#ffffff05; }
.orientation-choices button[aria-pressed=true] { background:#f7c992;color:#302117;border:2px solid #ffe3ad; }
.orientation-choices strong { font-size:16px; }.orientation-choices small { font-size:10px;font-weight:800; }
.device-outline { display:block;border:2px solid currentColor;border-radius:5px;position:relative; }
.device-outline:after { content:"";position:absolute;left:35%;right:35%;bottom:3px;height:2px;background:currentColor; }
.portrait-icon { width:25px;height:40px; }.landscape-icon { width:48px;height:28px;margin:6px 0; }
.welcome-language { display:flex;justify-content:center;gap:6px; }.welcome-language button { min-width:95px;min-height:40px;
  padding:6px 12px;border-radius:7px;background:#ffffff0b;font-size:13px; }
.welcome-language button[aria-pressed=true] { color:#ffdb9b;box-shadow:inset 0 -2px #ffdb9b; }
.welcome .primary { width:100%;justify-content:center;background:#ffcb95;color:#321b16;margin-top:15px; }
.welcome-note { margin-top:14px!important; }

/* A phone held sideways: a wide playfield and compact controls, with the
   record artwork and song list side by side. */
.landscape #hud { display:grid;grid-template-columns:minmax(0,1.1fr) minmax(120px,.9fr) 88px 40px;
  grid-template-rows:40px;align-items:center;gap:10px;padding:max(2px,var(--safe-t)) max(10px,var(--safe-r)) 2px max(10px,var(--safe-l));
  background:linear-gradient(100deg,#151e29,#1b2630 58%,#111b25);border-bottom:1px solid #b2e0d738;box-shadow:0 3px 12px #0007; }
.landscape .hud-main,.landscape .hud-bottom { display:contents; }
.landscape .track-h { grid-column:1;grid-row:1;min-width:0;align-self:start;padding-top:4px; }
.landscape .track-h strong,.landscape.jp-song .track-h strong { font-size:13px;line-height:17px;letter-spacing:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.landscape .mode-badge { grid-column:1;grid-row:1;justify-self:start;align-self:end;margin-bottom:3px;
  padding:0;border:0;background:none;gap:4px;font-size:8px; }
.landscape .mode-badge .mini-bars { display:none; }
.landscape .gauge-wrap { grid-column:2;grid-row:1;width:100%;max-width:none;padding-bottom:7px; }
.landscape .gauge-text small { font-size:7px; }.landscape .gauge-text b { font-size:10px; }
.landscape .gauge { height:6px;margin-top:3px;box-shadow:inset 0 1px 2px #0009,0 1px 0 #ffffff12; }
.landscape .gauge i { box-shadow:inset 0 1px #d9fff8a6,0 0 5px #8af0d545; }
.landscape .gauge-target { font-size:6px; }
.landscape .score-h { grid-column:3;grid-row:1;align-self:start;flex-direction:row;align-items:baseline;justify-content:flex-end;gap:4px;padding-top:4px; }
.landscape .score-h small { font-size:6px; }.landscape .score-h b { font-size:16px;letter-spacing:-.04em; }
.landscape .hud-main>button { grid-column:4;grid-row:1;width:40px;height:40px;justify-self:end; }
.landscape .stage-photo { height:100%; }.landscape .stage-shade { background:linear-gradient(#10131b22,#10131b88 65%,#10131bf2); }
.landscape #combo { position:static;grid-column:3;grid-row:1;justify-self:end;align-self:end;transform:none;display:flex;align-items:baseline;gap:4px;margin-bottom:3px; }
.landscape #combo b { font-size:11px; }.landscape #combo small { font-size:6px;letter-spacing:.04em; }
.landscape #judgement { position:static;grid-column:1;grid-row:1;justify-self:end;align-self:end;transform:none;line-height:11px;
  font-size:9px;letter-spacing:.06em;margin:0 0 3px 6px; }
.landscape #judgement small { display:inline;font-size:7px;letter-spacing:0;margin:0 0 0 4px; }
.landscape #fever-banner { position:static;grid-column:2;grid-row:1;justify-self:start;align-self:start;transform:none;font-size:10px;line-height:10px;margin-top:6px;letter-spacing:.08em; }
.landscape .fever-on #fever-banner { animation:none; }
.landscape #fever-banner::before,.landscape #fever-banner::after { display:none; }
.landscape #fever-banner span { font-size:10px;filter:drop-shadow(0 0 3px #ffae43); }
.landscape .fever-on .gauge-text small { visibility:hidden; }
.landscape .pad img { position:absolute;inset:3% 4%;width:92%;height:94%;min-height:0;max-width:none;object-fit:fill; }
.landscape #count-in b { font-size:64px; }
.landscape #overlay { padding:8px max(15px,var(--safe-r)) 8px max(15px,var(--safe-l)); }
.landscape .sheet { max-width:760px;padding:16px 22px;border-radius:12px; }
.landscape .sheet h2 { font-size:25px; }.landscape .sheet-mark { margin-bottom:6px; }
.landscape .settings-scroll { max-height:calc(var(--app-h) - 148px);display:grid;grid-template-columns:1fr 1fr;gap:0 24px;padding-right:5px; }
.landscape .setting { margin:7px 0; }.landscape .setting label,.landscape .setting>span { font-size:12px; }
.landscape .photo-setting button { min-height:38px; }.landscape .options .primary { min-height:42px;margin-top:9px; }
.landscape #pause-sheet { max-width:520px; }.landscape #pause-sheet .sheet-row { min-height:39px; }
.landscape #pause-sheet .primary { min-height:44px; }.landscape .paused-track { margin:7px 0 10px; }
.landscape .welcome { padding:12px; }.landscape .welcome-card { width:min(720px,96%);padding:16px 23px;display:grid;grid-template-columns:1fr 1fr;column-gap:26px;align-items:center; }
.landscape .welcome-brand { grid-column:1/3; }.landscape .welcome h2 { grid-column:1;grid-row:2;font-size:24px;margin:8px 0 0; }
.landscape #orientation-recommendation { grid-column:1;grid-row:3;font-size:12px; }
.landscape .orientation-choices { grid-column:2;grid-row:2/5;margin:10px 0;gap:9px; }
.landscape .orientation-choices button { min-height:121px; }.landscape .welcome-language { grid-column:1;grid-row:4; }
.landscape .welcome-note { grid-column:1/3;font-size:12px;margin:5px 0!important; }.landscape #welcome-continue { grid-column:1/3;min-height:43px;margin-top:5px; }
.landscape .result-inner { display:grid;grid-template-columns:1fr 1fr;column-gap:28px;padding:12px 4% max(16px,var(--safe-b));align-content:center; }
.landscape .section-line { grid-column:1/3; }.landscape .result-track { grid-column:1;margin:6px 0; }
.landscape .result-track h2 { font-size:19px; }.landscape .result-track img { width:44px; }
.landscape .result-verdict { grid-column:1;grid-row:3;margin:6px 0; }.landscape .result-verdict h1 { font-size:31px; }
.landscape .score-card { grid-column:2;grid-row:2/4;padding:8px 0;align-self:center; }
.landscape .score-card strong { font-size:43px; }.landscape #result-metrics { grid-column:2;grid-row:4;margin:6px 0; }
.landscape #result-counts { grid-column:2;grid-row:5;margin:5px 0; }
.landscape #result-unlock,.landscape #result-progress { grid-column:1;margin:3px 0;font-size:11px; }
.landscape #retry { grid-column:2;min-height:43px;margin-top:8px; }
.landscape #result-library { grid-column:1;min-height:43px;align-self:end;margin-top:8px; }
