/* Generala — a sunny Buenos Aires café scorepad. Art never encodes game state. */
*{box-sizing:border-box}
html{background:#d4c7b5}
body{margin:0;color:#211b18;background:#d4c7b5;font-family:Georgia,'Times New Roman',serif;line-height:1.3}
main{max-width:none;min-height:0;margin:0;padding:0}
#gl-scene{--u:min(1px,calc(100vw / 390),calc(100svh / 844));position:relative;width:calc(390 * var(--u));height:calc(844 * var(--u));margin:0 auto;background:#f7e2be url('../assets/play/generala/cafe.webp') center/100% 100% no-repeat;isolation:isolate;box-shadow:0 0 70px #3d2d192a}
#gl-scene h1{position:absolute;inset:calc(2 * var(--u)) calc(6 * var(--u)) auto;margin:0;height:calc(95 * var(--u));line-height:1}
#gl-scene h1 img{display:block;width:100%;height:100%;object-fit:contain}
#gl-turn{position:absolute;top:calc(96 * var(--u));left:calc(92 * var(--u));width:calc(206 * var(--u));height:calc(30 * var(--u));display:grid;place-items:center;padding-bottom:calc(3 * var(--u));background:url('../assets/play/generala/ribbon.webp') center/100% 100% no-repeat;color:#fff0d1;font:900 calc(16 * var(--u))/1 'Arial Black','Arial Rounded MT Bold',sans-serif;letter-spacing:calc(.4 * var(--u))}
.hud{position:absolute;top:calc(132 * var(--u));left:calc(25 * var(--u));width:calc(340 * var(--u));height:calc(35 * var(--u));display:grid;grid-template-columns:repeat(4,1fr);align-items:center;border:calc(1.5 * var(--u)) solid #241b15;border-radius:calc(8 * var(--u));background:#ffedcd url('../assets/play/generala/paper.webp') center/180px;font:600 calc(10 * var(--u))/1.1 system-ui,sans-serif;text-align:center}
.hud>div+div{border-left:1px solid #5b473780}.hud b{display:block;color:#17130f;font:900 calc(17 * var(--u))/1.05 Georgia,serif;font-variant-numeric:tabular-nums}
.stage{position:absolute;top:calc(166 * var(--u));left:calc(14 * var(--u));width:calc(362 * var(--u));height:calc(132 * var(--u));filter:drop-shadow(0 calc(5 * var(--u)) calc(3 * var(--u)) #40221040);touch-action:none}
#gl-canvas{display:block;width:100%;height:100%;cursor:pointer;touch-action:none;border-radius:calc(22 * var(--u))}
#gl-over{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:calc(9 * var(--u));border:calc(3 * var(--u)) solid #2d251e;border-radius:calc(22 * var(--u));background:#fff0d9f5;text-align:center;padding:calc(12 * var(--u));z-index:3}
#gl-over[hidden]{display:none}#gl-over p{font-size:calc(17 * var(--u));font-weight:900;max-width:32ch;color:#231b16;margin:0}
button{font:inherit;cursor:pointer;touch-action:manipulation}
button:disabled{cursor:default}
button:focus-visible,a:focus-visible{outline:3px solid #b6004c;outline-offset:3px}
.toolbar{touch-action:none;position:absolute;left:calc(17 * var(--u));top:calc(299 * var(--u));width:calc(356 * var(--u));height:calc(49 * var(--u));display:grid;grid-template-columns:1.2fr 1fr;gap:calc(7 * var(--u))}
.toolbar>button:not(.egm-juice-mute),#gl-over-btn{height:100%;min-width:0;border:0;border-radius:calc(24 * var(--u));padding:0 calc(10 * var(--u)) calc(5 * var(--u));background:url('../assets/play/generala/button-cream.webp') center/100% 100% no-repeat;color:#1b1712;font:900 calc(19 * var(--u))/1 'Arial Black','Arial Rounded MT Bold',sans-serif;text-transform:uppercase;text-shadow:0 1px #fff5d7;white-space:nowrap}
.toolbar>#gl-roll,#gl-over-btn{background-image:url('../assets/play/generala/button-raspberry.webp');color:#fff4d9;text-shadow:0 2px 1px #650022}
.toolbar>#gl-roll:disabled{filter:saturate(.45);font-size:calc(12 * var(--u));color:#f7e4ce}
.toolbar>button:not(:disabled):active,#gl-over-btn:active{transform:translateY(calc(2 * var(--u)))}
#gl-over-btn{height:calc(42 * var(--u));min-width:calc(140 * var(--u));font-size:calc(18 * var(--u))}
.toolbar>.egm-juice-mute{position:absolute;right:0;top:calc(507 * var(--u));width:calc(100 * var(--u));height:calc(35 * var(--u));border:0;border-radius:20px;background:#fff2d7d9;color:#342b22;font:700 calc(11 * var(--u))/1 system-ui,sans-serif}
#gl-status{position:absolute;left:calc(24 * var(--u));top:calc(350 * var(--u));width:calc(342 * var(--u));height:calc(25 * var(--u));margin:0;display:flex;align-items:center;justify-content:center;text-align:center;color:#2e251e;font:600 calc(11 * var(--u))/1.35 system-ui,sans-serif}
.scoreboard{position:absolute;left:calc(13 * var(--u));top:calc(385 * var(--u));width:calc(364 * var(--u));height:calc(420 * var(--u));padding:calc(19 * var(--u)) calc(16 * var(--u)) calc(14 * var(--u));background:url('../assets/play/generala/clipboard.webp') center/100% 100% no-repeat;filter:drop-shadow(0 calc(3 * var(--u)) calc(2 * var(--u)) #4b2d2340)}
.scoreboard h2{position:absolute;top:calc(-11 * var(--u));left:calc(130 * var(--u));width:calc(104 * var(--u));height:calc(31 * var(--u));margin:0;background:url('../assets/play/generala/clip.webp') center/100% 100% no-repeat;font:900 calc(10 * var(--u))/1 Georgia,serif;color:#fff0d5;display:flex;align-items:flex-end;justify-content:center;padding-bottom:calc(6 * var(--u));text-shadow:0 1px #660327}
.sheet{width:100%;height:100%;border-collapse:collapse;table-layout:fixed;background:transparent;border:calc(1.2 * var(--u)) solid #4e3b2e;color:#241b15;font-variant-numeric:tabular-nums}
.sheet th,.sheet td{border-bottom:calc(1 * var(--u)) solid #60493680;padding:0 calc(6 * var(--u));vertical-align:middle;text-align:left}
.sheet th{width:50%}.sheet thead{height:calc(25 * var(--u))}.sheet thead th{font:900 calc(13 * var(--u))/1 Georgia,serif;color:#201a14}
.sheet thead th+th{width:25%;border-left:1px solid #60493680}.sheet td.v{width:25%;height:calc(30 * var(--u));text-align:center;border-left:1px solid #60493680;font:900 calc(16 * var(--u))/1 Georgia,serif}
.sheet .nm{display:block;font:900 calc(15 * var(--u))/1.05 'Arial Black','Arial Rounded MT Bold',sans-serif}
.sheet .ht{display:block;margin-top:calc(1 * var(--u));font:500 calc(8.5 * var(--u))/1.1 system-ui,sans-serif;color:#725943}
.sheet tr.gl-split th,.sheet tr.gl-split td{border-top:calc(2 * var(--u)) solid #4e3b2e}
.sheet td.cpu{color:#58483c}.sheet td.done-you{color:#8d0035;background:#d6236612}
.sheet td.v button{display:block;width:100%;height:calc(26 * var(--u));min-height:0;margin:0;padding:0;border:calc(1 * var(--u)) solid #50784e;border-radius:calc(5 * var(--u));background:linear-gradient(#eff7d8,#d0e1b1);color:#263d26;font:900 calc(15 * var(--u))/1 Georgia,serif}
.sheet td.v button.zero{border-color:#a3907a;background:#fae7c480;color:#8a7662;font:600 calc(11 * var(--u))/1 system-ui,sans-serif}
.sheet td.v button.top{border-color:#950638;background:#bb0849;color:#fff2d3;box-shadow:inset 0 1px #f56991}
.sheet tr.last td.v{box-shadow:inset 0 0 0 calc(1.5 * var(--u)) #bb084955}
.sheet tfoot{height:calc(30 * var(--u))}.sheet tfoot th,.sheet tfoot td{font-size:calc(18 * var(--u));font-weight:900;border-top:calc(2 * var(--u)) solid #35261b;border-bottom:0}
.record{position:absolute;left:calc(26 * var(--u));top:calc(817 * var(--u));max-width:calc(245 * var(--u));color:#4d3b2c;font:600 calc(11 * var(--u))/1.2 system-ui,sans-serif}.record b{font-weight:800}
.instructions{max-width:690px;margin:28px auto 0;padding:24px;color:#3c2d22;background:#fff2dc;border-radius:16px;font:15px/1.65 system-ui,sans-serif}
.instructions h2{font:900 25px/1.2 Georgia,serif;margin:24px 0 12px;color:#322318}.instructions p{margin:0 0 16px}.legend{padding-left:22px}.legend li{margin:8px 0}
header{max-width:690px;margin:0 auto;padding:24px;font:14px/1.5 system-ui,sans-serif;text-align:center}header a{color:#803044}
@media(max-width:600px){.instructions{margin:16px 12px 0;padding:20px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
