:root{
    --bg:#050607; --ink:#e9f0f1; --accent:#3dff7a; --haz:#ffcc00; --danger:#ff4d4d; --iso:#4be3ff;
    --bevel-top:rgba(255,255,255,.1); --bevel-bottom:rgba(0,0,0,.5);
  }
  *{box-sizing:border-box}
  html,body{height:100%; margin:0; overflow:hidden;}
  body{
    min-height:100dvh; background:var(--bg); color:var(--ink);
    font-family:"Doto",system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial;
  }
  
  /* Header — fixed, left-aligned, no movement */
  .header{
    position:fixed; left:0; right:0; top:0;
    display:flex; align-items:center; justify-content:flex-start; gap:16px;
    padding:8px 10px;
    border-bottom:1px solid rgba(255,255,255,.08);
    background:linear-gradient(180deg,#12161a,#0a0d10);
    z-index:5;
  }
  .header-spacer{ height:44px; } /* keep layout from sliding under bar */
  
  /* Mobile stacked header: stack brand, title and controls to avoid cropping */
  @media(max-width:600px){
    .header{ flex-direction:column; align-items:stretch; gap:6px; padding:10px; }
    .header .brand{ align-items:center; display:flex; justify-content:flex-start; }
    .header .brand .brand-top, .header .brand .brand-bottom{ text-align:center; }
    .title{ white-space:normal; overflow:visible; text-align:center; font-size:16px }
    .controls{ width:100%; display:flex; justify-content:space-between; gap:8px }
    .controls .mini-btn{ flex:1; margin:0; }
    .header-spacer{ height:96px; }
  }
  
  .brand{ font-weight:800; letter-spacing:.08em; opacity:.9; font-size: 18px; text-transform:uppercase }
  .brand{ display:flex; flex-direction:column; line-height:1; }
  .brand-top{ font-weight:800; letter-spacing:.08em; opacity:.95; font-size:14px; text-transform:uppercase }
  .brand-bottom{ font-weight:900; letter-spacing:.06em; opacity:.95; font-size:20px; text-transform:uppercase }
  .title{ font-weight:800; letter-spacing:.06em; text-transform:uppercase; font-size:18px; opacity:.95; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; flex:1; text-align:center; }
  .controls{ margin-left:auto; display:flex; gap:8px; align-items:center; flex-shrink:0 }
  .mini-btn{
    -webkit-appearance:none; appearance:none; border:0; cursor:pointer;
    padding:8px 12px; border-radius:10px; color:var(--ink); font-weight:900; letter-spacing:.06em; text-transform:uppercase; font-size:12px;
    background:linear-gradient(145deg,rgba(255,255,255,.08),rgba(0,0,0,.35));
    box-shadow:inset 2px 2px 0 var(--bevel-top), inset -2px -2px 0 var(--bevel-bottom);
  }
  
  /* Screen */
  .screen{ display:grid; place-items:center; padding:8px; }
  canvas{
    display:block; width:100%; height:100%;
    max-width:min(96vmin, 100vw - 16px);
    max-height:calc(100vh - 120px);
    aspect-ratio:1/1;
    background:#050607; border-radius:10px;
    image-rendering:pixelated;
    box-shadow:inset 0 0 0 2px rgba(255,255,255,.06);
    transition:box-shadow .25s ease, filter .25s ease;
  }
  /* Cabinet glow while IsoSpark is active */
  canvas.glow{
    animation:cabGlow 1.4s ease-in-out infinite alternate;
    box-shadow:
      0 0 14px rgba(75,227,255,.45),
      0 0 44px rgba(75,227,255,.35),
      inset 0 0 0 2px rgba(255,255,255,.12),
      inset 0 0 22px rgba(75,227,255,.15);
    filter: saturate(1.25);
  }
  @keyframes cabGlow{
    0%{ box-shadow:0 0 10px rgba(75,227,255,.35),0 0 28px rgba(75,227,255,.25),inset 0 0 0 2px rgba(255,255,255,.12),inset 0 0 14px rgba(75,227,255,.10) }
    100%{ box-shadow:0 0 22px rgba(75,227,255,.55),0 0 60px rgba(75,227,255,.45),inset 0 0 0 2px rgba(255,255,255,.12),inset 0 0 24px rgba(75,227,255,.18) }
  }
  
  /* Joystick */
  .stick-wrap{ display:none; padding:10px }
  @media (hover:none) and (pointer:coarse){ /* joystick removed on mobile */ .stick-wrap{ display:none !important; } }
  .stick{
    width:min(56vw,220px); aspect-ratio:1/1; border-radius:50%;
    background:radial-gradient(120px 120px at 50% 45%, rgba(255,255,255,.06), rgba(0,0,0,.55));
    box-shadow: inset 2px 2px 0 rgba(255,255,255,.07), inset -2px -2px 0 rgba(0,0,0,.6), 0 8px 18px rgba(0,0,0,.35);
    position:relative; touch-action:none;
  }
  .stick::before{ content:""; position:absolute; inset:12%; border-radius:50%; border:1px dashed rgba(255,255,255,.18) }
  .stick::after{ content:""; position:absolute; left:50%; top:50%; width:34%; aspect-ratio:1/1; border-radius:50%;
    transform:translate(-50%,-50%); background:linear-gradient(145deg, rgba(255,255,255,.08), rgba(0,0,0,.55));
    box-shadow: inset 2px 2px 0 rgba(255,255,255,.08), inset -2px -2px 0 rgba(0,0,0,.6);
  }
  
  /* Overlays */
  .veil{ position:fixed; inset:0; background:rgba(0,0,0,.65); display:none; backdrop-filter:saturate(.8) blur(2px); z-index:98 }
  .cta{
    position:fixed; left:50%; top:50%; transform:translate(-50%,-50%) scale(.92);
    text-align:center; z-index:99; width:min(92%,560px); padding: clamp(20px, 6vw, 36px) 8px;
  }
  .cta .title{
    font-family:"Sixtyfour Convergence",system-ui; font-weight:800; font-size:clamp(38px,6vw,40px);
    line-height:1.06; letter-spacing:.04em; text-transform:uppercase; text-align: center;
  }
  /* Overlay stacked words on small screens */
  @media(max-width:520px){
    /* Make overlay hero text larger on small screens (approx twice the previous size) */
    .cta.overlay-hero .title{ font-size:clamp(40px,16vw,56px); }
    .cta.overlay-hero .title .overlay-word{ display:block; line-height:1; }
  }
  /* Stack the menu title words on separate lines on all viewports */
  .cta .title .menu-top,
  .cta .title .menu-bottom{
    display:block; font-family:"Sixtyfour Convergence",system-ui; line-height:1; text-align:center;
  }
  .cta .title .menu-top{ font-weight:800; font-size:clamp(36px,8vw,56px); letter-spacing:.04em }
  .cta .title .menu-bottom{ font-weight:900; font-size:clamp(56px,12vw,88px); letter-spacing:.04em; margin-top:-8px }
  .cta .subtitle{ opacity:.95; margin-top:10px; font-size:clamp(12px,3.6vw,16px); line-height:1.35; text-align:center }
  .btn{
    display:inline-block; padding:12px 18px; min-height:44px; border-radius:12px; font-size:18px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:var(--ink);
    background:linear-gradient(145deg,rgba(255,255,255,.08),rgba(0,0,0,.35));
    box-shadow:inset 2px 2px 0 var(--bevel-top), inset -2px -2px 0 var(--bevel-bottom);
    text-decoration:none;
  }
  .btn-row{ display:flex; gap:10px; justify-content:center; margin-top:12px; flex-wrap:wrap }
  
  .countdown{ position:fixed; inset:0; display:none; align-items:center; justify-content:center; pointer-events:none; z-index:100 }
  .countdown .num{ font:900 64px/1 "Doto",system-ui; letter-spacing:.06em; text-shadow:0 0 18px rgba(255,211,77,.45) }
  
  /* Map modal */
  .cta.cta--map{ width:min(96vw,900px); max-height:86vh; overflow:auto; text-align:left; background:#000; border:1px solid rgba(255,255,255,.12); padding:0 8px }
  .mapwrap{ padding:12px 0 6px; background:#000 }
  .maphead{ display:flex; align-items:center; justify-content:space-between; gap:12px; position:sticky; top:0; background:#000; padding:10px 6px 8px; border-bottom:1px solid rgba(255,255,255,.16); z-index:1 }
  .maptitle{ font-family:"Sixtyfour Convergence",system-ui; font-weight:800; font-size:18px; letter-spacing:.06em; text-transform:uppercase }
  .maptable{ width:100%; border-collapse:collapse; font-size:14px; background:#000; table-layout:fixed }
  .maptable th{ text-align:left; font-weight:900; letter-spacing:.06em; text-transform:uppercase; opacity:.85; padding:10px 12px; font-size:12px; border-bottom:1px solid rgba(255,255,255,.16) }
  .mapcell{ padding:10px 12px; vertical-align:top; border-bottom:1px solid rgba(255,255,255,.08); overflow-wrap:anywhere; word-break:break-word }
  .maprank{ width:3.5ch; font-weight:900; text-align:center } .mapdanger{ width:7ch } .maploc{ font-weight:800 } .mapnotes{ opacity:.92 }
  
  /* Footer */
  .siteFooter{
    position:fixed; left:50%; bottom:max(10px, calc(8px + env(safe-area-inset-bottom, 0px)));
    transform:translateX(-50%); z-index:100; display:none;
  }
  .siteFooter a{
    display:inline-flex; align-items:center; gap:10px; padding:8px 12px; border-radius:999px; text-decoration:none; color:var(--ink);
    font-weight:800; letter-spacing:.02em; background:linear-gradient(145deg,rgba(255,255,255,.06),rgba(0,0,0,.35));
    box-shadow:inset 2px 2px 0 var(--bevel-top), inset -2px -2px 0 var(--bevel-bottom);
    backdrop-filter:blur(4px) saturate(1.1);
  }
  .siteFooter span{ font-size:12px; white-space:nowrap }
  
  /* Hidden live regions */
  #status{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
  