/* VBALL BY NIGHT (EPIC-009; ADR-004): the volleyball game's own screens. The tokens, the three faces, the wordmark and
   the buttons come from cartoon.css, loaded first, so the two games share one look. Menus float over the live court
   with a scrim, never over an opaque screen. */
#vapp{height:100%;display:flex;flex-direction:column}
/* as BBALL BY NIGHT's stage: the court and, under it in a game, the ticker (fit() keeps its height free) */
#vstage{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:10px 16px 4px;position:relative}
#vwrap{position:relative;width:640px;height:360px;max-width:100%;flex:none}
/* the night grade over the court (REQ-091), as in BBALL BY NIGHT: it takes no clicks */
#vwrap::after{content:"";position:absolute;inset:0;border-radius:6px;background:var(--night);pointer-events:none;z-index:1}
#vcourt{display:block;width:100%;height:100%;border-radius:6px;background:#05040b;box-shadow:0 0 0 1px #2a2350,0 20px 60px rgba(0,0,0,.6)}
#vlegend{padding-block:4px 12px;padding-inline:16px;text-align:center;font-size:17px;letter-spacing:.04em;color:var(--muted);line-height:1.15}
#vlegend b{color:var(--ink);font-weight:500}
#vlegend .p2{color:var(--cool)}

.vpage{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;z-index:5;overflow:auto;padding-inline:max(16px,env(safe-area-inset-left,0px)) max(16px,env(safe-area-inset-right,0px))}
/* the home screen, as BBALL BY NIGHT's #menu (the cards, rows and buttons are cartoon.css's) */
/* the pages: All teams, the Manual, Settings (as BBALL BY NIGHT's #roster, #manual, #settings) */
.vsheet{position:fixed;inset:0;overflow:auto;background:rgba(10,8,22,.97);z-index:7}
.vsheet .inner{max-width:1180px;margin:0 auto;padding:clamp(14px,3vh,28px) max(16px,env(safe-area-inset-right,0px)) 32px max(16px,env(safe-area-inset-left,0px));display:flex;flex-direction:column;gap:14px}
#vmanual .inner,#vsettings .inner{max-width:1100px}
.sets .mtext{font-size:20px;line-height:1.25;color:var(--ink);flex:1;min-width:0}
#vpause,#vover{background:rgba(10,8,22,.62)}
.vpage .box{background:var(--panel);border:1px solid #3a3366;border-radius:12px;padding:20px 28px 22px;display:flex;flex-direction:column;align-items:center;gap:12px;box-shadow:0 20px 60px rgba(0,0,0,.6)}
.vpage h2{margin:0;font-family:var(--f-display);font-weight:400;font-size:clamp(28px,4.4vw,44px);color:var(--gold);transform:skewX(-8deg);text-transform:uppercase}
.vpage .score{font-family:var(--f-led);font-size:44px;color:var(--ink)}
.vpage .acts{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;align-items:center}
body:has(#vmenu:not([hidden])) #vlegend,body:has(#vmenu:not([hidden])) #ticker{visibility:hidden}
@media (pointer:coarse){#vlegend,#ticker{display:none}}

/* touch: a stick area on the left, HIT and JUMP on the right, translucent over the court */
#vpad{position:fixed;inset:auto 0 0 0;display:flex;justify-content:space-between;align-items:flex-end;padding:0 max(16px,env(safe-area-inset-right,0px)) calc(16px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px));z-index:4;pointer-events:none}
#vstick{width:150px;height:150px;border-radius:50%;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.18);pointer-events:auto;touch-action:none}
#vpad .btns{display:flex;gap:14px;pointer-events:auto}
#vpad button{width:84px;height:84px;border-radius:50%;border:1px solid rgba(255,255,255,.28);background:rgba(255,255,255,.12);color:var(--ink);font:600 22px var(--f-ui);letter-spacing:.12em;touch-action:none}
#vpad #vhit{width:100px;height:100px;background:rgba(255,107,26,.28);border-color:rgba(255,107,26,.6)}
/* REQ-153 Retro (EPIC-018): upright, the pad on the body above the logo; sideways, each hand centred in a 208 px grip,
   JUMP over HIT so the grips are equal */
@media (orientation:portrait){html[data-pad="retro"] #vpad{padding-bottom:calc(112px + env(safe-area-inset-bottom,0px))}}
@media (orientation:landscape){
  html[data-pad="retro"] #vpad{top:0;align-items:center;padding:0 calc(54px + env(safe-area-inset-right,0px)) 0 calc(29px + env(safe-area-inset-left,0px))}
  html[data-pad="retro"] #vpad .btns{flex-direction:column;align-items:center}
}
