/* The frame (src/frame.js decides; docs/aspect/solution.md): two layouts only, every other shape gets bars.
   #frame wraps #stage, #hud and #screens and is SIZED, never transformed: `contain: layout paint` makes it the containing block of
   their position:fixed boxes (so their left/top 50 % and main.js / screens.js fits are frame-relative), `container-type: size` gives
   cqw / cqh. A transform here would add a frame-sized compositor layer (~12 MB at 390×844 @3).
   The bars are the page outside the frame: plain navy (#0c1020, the colour they always had) unless the UI v2 kit's Dusk Gilt bar
   class is on <html> (.k-bars, room ui-kit). When the frame fills the screen there are no bars and nothing here paints. */
#frame{position:fixed;left:var(--fx,0px);top:var(--fy,0px);width:var(--fw,100vw);height:var(--fh,100vh);z-index:1;contain:layout paint;container-type:size}
/* the landscape-phone card: over everything but the boot card (z 100), outside the frame */
#pk-rotate{position:fixed;inset:0;z-index:95;display:grid;place-items:center;padding:24px;background:#0c1020;color:#f6ead2;
  font:500 16px/1.45 Anuphan,Prompt,"Leelawadee UI",Thonburi,sans-serif;text-align:center}
#pk-rotate[hidden]{display:none}
#pk-rotate .pk-rot-in{display:grid;justify-items:center;gap:10px;max-width:360px}
#pk-rotate svg{width:72px;height:72px;fill:none;stroke:#e9c97c;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;animation:pk-rot 2.4s cubic-bezier(.65,0,.35,1) infinite}
#pk-rotate b{font:700 24px/1.3 Anuphan,Prompt,sans-serif;color:#fbf7ee}
#pk-rotate span{color:#ddd7f2}
@keyframes pk-rot{0%,30%{transform:rotate(90deg)}60%,100%{transform:rotate(0deg)}}
@media (prefers-reduced-motion:reduce){#pk-rotate svg{animation:none}}
html.still #pk-rotate svg{animation:none}

/* ---------- short portrait menus (ORC, 19 Nov 2026: keep the 3:5 floor, make the screens fit) ----------
   The portrait menus lay out 390 px wide and frameH × 390 / frameW tall: 650 at the frame's 3:5 floor, ~650 on an iPhone SE with
   its browser bars, 694 on an iPhone SE, 844 on today's phones. The phone team and summon screens were stacked for ~844 (team: the
   bench at 584…695 under the go block at H − 134; summon: the rates panel at 432…749 over the buttons at H − 80), so below that the
   bench went under the buttons and got cut, and the rates got cut. Only on such SHORT layouts (#frame aspect > 390 / 835, a
   container query: nothing changes on a 390 × 844 / 360 × 780 / 430 × 932 phone):
     team    the foe names and the bench's label go (the faces stay, ≥ 40 px taps), so the foe panel is 112 tall and the bench 84;
             the stack keeps its old top places while they fit and is pushed up from the go block when they don't (top =
             min(old, H − x)), and the diorama takes what is left (its old 250 at most, 120 at least): at H 650 the diorama is
             56…230, plates 236, foes 304, bench 422…506, go 516; from H 726 up only the foes and the bench sit higher than before
     summon  the rates panel ends 12 px above the buttons and scrolls inside itself
   #frame in front of each rule: these sit in frame.css (loaded before screens.css / gilt.css) and must win over their rules. */
@container (min-aspect-ratio: 390 / 835) {
  #frame #screens .va-team.tm5--m .tm5-host{height:min(250px, 100% - 476px);min-height:120px}
  #frame #screens .tm5--m .va-plates{top:min(312px, 100% - 414px)}
  #frame #screens .tm5--m .va-tm-panel{top:min(380px, 100% - 346px);gap:8px}
  #frame #screens .tm5--m .va-foe small{display:none}
  #frame #screens .tm5--m .va-bench{top:min(498px, 100% - 228px)}
  #frame #screens .tm5--m .va-bench .va-lab{display:none}
  #frame #screens .tm5--m .va-bl{margin-top:0}
  #frame #screens[data-gilt] .va-sum--m .g-sum-rates{bottom:92px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
}
