#practice[hidden],body:not(.in-game) #practice {display:none}
#practice {
 position:absolute;inset:0;z-index:1;pointer-events:none;
 color:#fff;font-family:system-ui,sans-serif;
}
#practice-players {position:absolute;inset:0}
#practice-players button {
 position:absolute;top:var(--card-top);left:var(--card-left);
 width:var(--card-width);height:var(--card-height);
 padding:0;border:0;border-radius:0;background:none;box-shadow:none;
}
#practice-players button:enabled {pointer-events:auto;box-shadow:inset 0 0 0 1px #fff9;cursor:pointer}
#practice-players button:disabled {opacity:1}
#practice-players button[aria-pressed="true"]::after {
 position:absolute;content:'✓';top:2px;right:3px;width:1.2em;aspect-ratio:1;
 display:grid;place-items:center;border-radius:50%;background:#f5ffe9;color:#15452f;
 font:bold clamp(.54rem,2.3vmin,.85rem)/1 system-ui;box-shadow:0 1px 3px #0009;
}
#practice-players button:focus-visible {outline:2px solid #ffed8d;outline-offset:2px}

#practice-guide {display:none}
body.in-game:has(#practice:not([hidden])) {
 --guide-inset:max(8px,env(safe-area-inset-left),env(safe-area-inset-right));
 --guide-top:max(var(--guide-inset),env(safe-area-inset-top));
 --guide-bottom:max(var(--guide-inset),env(safe-area-inset-bottom));
 --guide-width:clamp(214px,34vw,390px);
 --practice-space:calc(var(--app-width,100vw) - var(--guide-width) - 3 * var(--guide-inset));
 --practice-width:min(var(--practice-space),calc((var(--app-height,100dvh) - var(--guide-top) - var(--guide-bottom)) * 1.7777778));
 --practice-height:calc(var(--practice-width) * .5625);
 --practice-x:calc(var(--guide-inset) + (var(--practice-space) - var(--practice-width)) / 2);
 --practice-y:calc(var(--guide-top) + (var(--app-height,100dvh) - var(--guide-top) - var(--guide-bottom) - var(--practice-height)) / 2);
}
body.in-game:has(#practice:not([hidden])) :is(#arena,#mobile-controls) {
 inset:var(--practice-y) auto auto var(--practice-x);
 width:var(--practice-width);height:var(--practice-height);
}
body.in-game:has(#practice:not([hidden])) #arena {
 border-radius:10px;
 box-shadow:0 0 0 1px #ffffff30;
}
body.in-game:has(#practice:not([hidden])) #game-bar {
 left:calc(var(--practice-x) + var(--practice-width) / 2);
}
body.in-game:has(#practice:not([hidden])) #mobile-controls .mobile-stick {
 width:clamp(44px,15vmin,98px);height:clamp(44px,15vmin,98px);
 bottom:8px;
}
body.in-game:has(#practice:not([hidden])) #practice-guide {
 position:fixed;z-index:3;display:flex;flex-direction:column;
 top:var(--guide-top);right:var(--guide-inset);bottom:var(--guide-bottom);
 width:var(--guide-width);
 color:#17382c;background:#fff9ea;border:1px solid #9d805a;
 border-radius:14px;box-shadow:0 5px 18px #050c0a44;
 overflow:hidden;font-family:system-ui,sans-serif;
}
.practice-guide-header,.practice-guide-footer {
 flex:none;background:#174535;color:#f4faee;
 padding:clamp(7px,1.35vmin,13px) clamp(10px,2.3vmin,18px);
 font-size:clamp(.7rem,2.7vmin,.95rem);
}
.practice-guide-header {
 display:flex;align-items:center;justify-content:space-between;gap:7px;
}
#practice-label {font-weight:800;line-height:1.15}
#practice-time {
 white-space:nowrap;line-height:1;flex:none;padding:.4em .55em;
 border-radius:6px;color:#21352a;background:#ffdfa0;font-weight:750;
}
#practice-seconds {font-variant-numeric:tabular-nums;font-weight:900}
.practice-guide-content {
 min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;
 padding:clamp(8px,2vmin,17px);
 scrollbar-color:#6b8d7b #fff9ea;scrollbar-width:thin;
}
.practice-guide-content:focus-visible {outline:2px solid #327659;outline-offset:-3px}
#practice-title {
 color:#183b2d;font-size:clamp(1.08rem,4.8vmin,2.15rem);
 letter-spacing:-.025em;line-height:1.07;margin:0 0 .45em;overflow-wrap:anywhere;
}
.practice-visual {position:relative;margin:0 0 clamp(7px,1.7vmin,13px)}
#practice-illustration {display:block;width:100%;height:auto;aspect-ratio:30/11;border-radius:8px;background:#162a40}
#practice-duration {
 color:#fff7d9;background:#162634;
 position:absolute;right:4px;bottom:4px;padding:2px 5px;border-radius:3px;
 font-size:clamp(.61rem,2.25vmin,.78rem);font-weight:800;
}
#practice-duration:empty {display:none}
.practice-objective {
 padding:clamp(6px,1.4vmin,12px);margin:0 0 clamp(7px,1.7vmin,12px);
 border-inline-start:3px solid #36815d;background:#e3efe1;border-radius:4px;
}
.practice-guide-content h2 {
 font-size:clamp(.71rem,2.7vmin,.93rem);font-weight:900;letter-spacing:.012em;line-height:1.25;margin:0 0 .2em;
}
#practice-goal {font-weight:740}
#practice-goal,#practice-rules,#practice-stakes {
 font-size:clamp(.72rem,2.9vmin,1.03rem);line-height:1.3;margin:0;
}
#practice-rules {padding-inline-start:1.25em}
#practice-rules li + li {margin-top:.35em}
#practice-rules li::marker {color:#337857}
#practice-stakes {color:#734117;font-weight:800;margin-top:.6em}
.practice-guide-footer p {font-weight:700;line-height:1.2;margin:0}
#practice-rotate {display:none}
@media (orientation:portrait) {
 body.in-game:has(#practice:not([hidden])) {
  --practice-width:min(calc(var(--app-width,100vw) - 2 * var(--guide-inset)),calc(var(--app-height,100dvh) * .62));
  --practice-x:calc((var(--app-width,100vw) - var(--practice-width)) / 2);
  --practice-y:var(--guide-top);
 }
 body.in-game:has(#practice:not([hidden])) #practice-guide {
  top:calc(var(--practice-y) + var(--practice-height) + var(--guide-inset));
  inset-inline:var(--guide-inset);width:auto;
 }
 .practice-visual {max-width:30rem}
 body.in-game:has(#practice:not([hidden])) #game-bar {
  top:calc(var(--practice-y) + var(--practice-height) - 46px);bottom:auto;
 }
 body.in-game.portrait-phone:has(#practice:not([hidden])) #rotate-phone,body.portrait-phone #practice-remaining {display:none}
 body.portrait-phone #practice-rotate {display:block}
}
@media (orientation:landscape) and (max-height:440px) {
 .practice-guide-header,.practice-guide-footer {padding-block:5px}
 .practice-guide-content {padding-block:6px}
 #practice-title {margin-bottom:5px}
 .practice-visual,.practice-objective {margin-bottom:6px}
 .practice-objective {padding-block:5px}
 #practice-illustration {max-height:clamp(48px,15dvh,66px);object-fit:contain}
 #practice-rules li + li {margin-top:3px}
}
