/* Arcade overlay — scoped to avoid affecting the portfolio */
.arcade-launch{position:fixed;right:20px;bottom:20px;z-index:15;border:1px solid #8e88ff80;border-radius:999px;background:linear-gradient(125deg,#253c83,#6538aa);color:white;padding:12px 19px;box-shadow:0 8px 32px #08071b99;cursor:pointer;font:700 14px system-ui;letter-spacing:.02em;transition:transform .2s}
.arcade-launch:hover{transform:translateY(-3px)}
.arcade-overlay[hidden]{display:none!important}
.arcade-overlay{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;background:#030615dc;backdrop-filter:blur(12px);padding:12px;overflow:auto}
.arcade-panel{position:relative;width:min(100%,510px);max-height:calc(100dvh - 24px);overflow-y:auto;background:linear-gradient(155deg,#111d3d,#14112e 70%,#211341);border:1px solid #758aff70;border-radius:24px;padding:20px;box-shadow:0 24px 100px #000b;color:#f5f6ff;font-family:system-ui,-apple-system,sans-serif}
.arcade-head{display:flex;align-items:start;justify-content:space-between;gap:10px;margin-bottom:12px}
.arcade-kicker{font-size:11px;letter-spacing:.22em;color:#9bb5ff;font-weight:800}
.arcade-head h2{font-size:27px;margin:2px 0;line-height:1.2;letter-spacing:-.04em}
.arcade-close{background:#ffffff13;border:1px solid #ffffff35;border-radius:12px;color:#fff;font-size:25px;cursor:pointer;width:40px;height:40px}
.arcade-stats{display:flex;gap:10px;margin-bottom:12px}
.arcade-stat{flex:1;border:1px solid #ffffff22;background:#ffffff0c;border-radius:12px;padding:9px 13px}
.arcade-stat span{display:block;color:#b4bde0;font-size:11px;text-transform:uppercase;letter-spacing:.12em}
.arcade-stat strong{font-size:22px;font-variant-numeric:tabular-nums}
.arcade-stage{position:relative;width:min(100%,390px);margin:auto;border:1px solid #778dff7a;border-radius:12px;overflow:hidden;background:#080f25;aspect-ratio:1}
#snake-board{display:block;width:100%;height:100%;touch-action:none}
.arcade-message{position:absolute;inset:0;display:grid;place-items:center;text-align:center;background:#050b1dc7;padding:20px}
.arcade-message[hidden]{display:none}
.arcade-message strong{display:block;font-size:25px;margin-bottom:8px}
.arcade-message p{margin:0;color:#d2d9f5;font-size:14px}
.arcade-controls{display:flex;justify-content:center;gap:10px;margin:13px 0}
.arcade-action,.arcade-dir{background:#25366e;color:#fff;border:1px solid #8b9aff70;border-radius:12px;font:700 14px system-ui;cursor:pointer;touch-action:manipulation}
.arcade-action{padding:11px 20px}
.arcade-action.primary{background:linear-gradient(110deg,#3865d6,#813ee0)}
.arcade-pad{display:grid;grid-template-columns:repeat(3,58px);grid-template-rows:repeat(2,48px);justify-content:center;gap:6px}
.arcade-dir{font-size:23px}
.arcade-dir[data-dir="up"]{grid-column:2;grid-row:1}
.arcade-dir[data-dir="left"]{grid-column:1;grid-row:2}
.arcade-dir[data-dir="down"]{grid-column:2;grid-row:2}
.arcade-dir[data-dir="right"]{grid-column:3;grid-row:2}
.arcade-help{font-size:12px;text-align:center;color:#a9b7dd;margin:12px 0 0}
body.arcade-open{overflow:hidden}
@media(max-height:720px){.arcade-panel{padding:12px}.arcade-head h2{font-size:21px}.arcade-stage{width:min(100%,300px)}.arcade-help{margin:6px 0}}
@media(prefers-reduced-motion:reduce){.arcade-launch{transition:none}}

/* Arcade is part of the homepage, not a modal. */
.arcade-embedded{position:relative;display:flex;justify-content:center;padding:clamp(22px,5vw,64px) 16px;max-width:1100px;margin:0 auto;z-index:1}
.arcade-embedded .arcade-panel{width:min(100%,570px);max-height:none;overflow:visible}
.arcade-embedded .arcade-stage{width:min(100%,420px)}
.arcade-embedded .arcade-head h2{font-size:clamp(24px,4vw,34px)}

/* Minimal embedded arcade */
.arcade-embedded{padding:clamp(16px,3vw,36px) 12px!important}
.arcade-embedded .arcade-panel{width:min(100%,390px);padding:14px;border-radius:16px;background:#10162a;border:1px solid #6270a14d;box-shadow:0 10px 32px #0003}
.arcade-embedded .arcade-head{margin-bottom:8px;align-items:center}
.arcade-embedded .arcade-head h2{font-size:17px;font-weight:650;letter-spacing:0;margin:0}
.arcade-embedded .arcade-stats{gap:8px;margin-bottom:9px}
.arcade-embedded .arcade-stat{padding:5px 10px;border-radius:8px;background:#ffffff08;border-color:#ffffff16;display:flex;align-items:center;justify-content:space-between}
.arcade-embedded .arcade-stat span{font-size:10px;letter-spacing:.04em;text-transform:none}
.arcade-embedded .arcade-stat strong{font-size:14px}
.arcade-embedded .arcade-stage{width:100%;border-radius:8px;border-color:#6574af50}
.arcade-embedded .arcade-message strong{font-size:19px;margin-bottom:5px}
.arcade-embedded .arcade-message p{font-size:12px}
.arcade-embedded .arcade-controls{gap:8px;margin:10px 0 8px}
.arcade-embedded .arcade-action{font-size:12px;font-weight:600;padding:7px 13px;border-radius:8px}
.arcade-embedded .arcade-pad{grid-template-columns:repeat(3,42px);grid-template-rows:repeat(2,34px);gap:4px}
.arcade-embedded .arcade-dir{font-size:18px;border-radius:8px;background:#1c2a50}
.arcade-embedded .arcade-help{font-size:10px;margin:8px 0 0;line-height:1.5}
@media(max-width:420px){.arcade-embedded .arcade-panel{padding:11px}.arcade-embedded{padding:12px 8px!important}}

.arcade-visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Compact arcade v4: score on a single line, no cards or heading */
.arcade-embedded .arcade-head{display:none!important}
.arcade-embedded .arcade-panel{width:min(100%,350px)!important;padding:10px!important;border-radius:12px!important}
.arcade-embedded .arcade-stats{display:flex!important;justify-content:flex-end!important;gap:15px!important;margin:0 0 7px!important}
.arcade-embedded .arcade-stat{flex:0 0 auto!important;display:flex!important;gap:5px!important;border:0!important;background:transparent!important;padding:0!important;border-radius:0!important}
.arcade-embedded .arcade-stat span{font-size:11px!important;color:#aeb9d4!important}
.arcade-embedded .arcade-stat strong{font-size:12px!important;color:#fff!important}
.arcade-embedded .arcade-controls{margin:8px 0!important}
.arcade-embedded .arcade-action{padding:6px 11px!important;font-size:11px!important}
.arcade-embedded .arcade-pad{grid-template-columns:repeat(3,38px)!important;grid-template-rows:repeat(2,31px)!important}
.arcade-embedded .arcade-help{font-size:10px!important}
