@font-face{
   font-family:'Press Start 2P';
   src:url('../images/PressStart2P-Regular.ttf') format('truetype');
   font-display:swap;
  }
  :root{
   --bg:#05030f;
   --bg-glow:#2b1f66;
   --panel:#1a1336;
   --panel-alt:#291e58;
   --panel-soft:#241a4a;
   --ink:#f4f1ff;
   --muted:#b9b2ff;
   --accent:#64ff9a;
   --accent-dark:#155e34;
   --warn:#ffdc73;
   --danger:#ff4f7a;
   --border:#000;
   --safe-area-top:env(safe-area-inset-top, 0px);
   --safe-area-right:env(safe-area-inset-right, 0px);
   --safe-area-bottom:env(safe-area-inset-bottom, 0px);
   --safe-area-left:env(safe-area-inset-left, 0px);
   --viewport-h:100vh;
   --viewport-safe-h:calc(var(--viewport-h) - var(--safe-area-top) - var(--safe-area-bottom));
  }
  @supports (height:100svh){
   :root{
    --viewport-h:min(100svh, 100dvh);
    --viewport-safe-h:calc(var(--viewport-h) - var(--safe-area-top) - var(--safe-area-bottom));
   }
  }
  *{box-sizing:border-box;}
  html,body{margin:0;min-height:100%;}
  body{
   min-height:var(--viewport-h);
   overflow-y:auto;
   touch-action:auto;
   -webkit-overflow-scrolling:touch;
   font-family:'Courier New',monospace;
   background:
    radial-gradient(circle at top,var(--bg-glow) 0%,rgba(10,8,32,0.92) 42%,rgba(4,2,17,0.98) 100%),
    repeating-linear-gradient(180deg,rgba(255,255,255,0.04) 0,rgba(255,255,255,0.04) 1.5px,transparent 1.5px,transparent 4.5px);
   color:var(--ink);
   letter-spacing:0.02em;
   display:flex;
   align-items:center;
   justify-content:center;
   line-height:1.5;
  }
  button{font-family:inherit;}
  .sr-only{
   position:absolute;
   width:1px;
   height:1px;
   padding:0;
   margin:-1px;
   overflow:hidden;
   clip:rect(0,0,0,0);
   white-space:nowrap;
   border:0;
  }
  .hidden{display:none !important;}
  .noscript-message{
   margin:24px;
   padding:18px 20px;
   background:var(--panel);
   border:3px solid var(--border);
   border-radius:16px;
   box-shadow:0 8px 24px rgba(0,0,0,0.45),0 0 0 3px rgba(255,255,255,0.08) inset;
   color:var(--ink);
   text-align:center;
   letter-spacing:0.04em;
  }
  a{color:inherit;text-decoration:none;}
  body.app-shell{
   width:100%;
   min-height:var(--viewport-h);
   display:flex;
   align-items:center;
   justify-content:center;
  }
  .app-stage{
   position:relative;
   min-height:var(--viewport-h);
   width:100%;
   display:grid;
   place-items:center;
   padding:0;
   margin:0;
  }
  .app-root{
   width:100%;
   height:100%;
   min-width:0;
   display:flex;
   align-items:center;
   justify-content:center;
  }
  .stage{
   width:clamp(240px, 100vw, 500px);
   height:clamp(420px, var(--viewport-safe-h), 880px);
   max-width:100%;
   max-height:100%;
   aspect-ratio:9/16;
   background:linear-gradient(180deg,#2c2264 0%,#1c1440 40%,#140d2b 100%);
   border:4px solid var(--border);
   border-radius:22px;
   box-shadow:0 0 0 4px rgba(255,255,255,0.1) inset,0 32px 90px rgba(0,0,0,0.85);
   display:flex;
   flex-direction:column;
   position:relative;
   overflow:hidden;
   isolation:isolate;
   padding:var(--safe-area-top) var(--safe-area-right) var(--safe-area-bottom) var(--safe-area-left);
  }
  @media (max-height:600px){
   body,
   body.app-shell,
   .app-root{
    align-items:flex-start;
   }
   .app-stage{
    place-items:start center;
   }
   .stage{
    margin-top:16px;
    margin-bottom:16px;
   }
  }
  .stage::before{
   content:'';
   position:absolute;
   inset:0;
   background:
    linear-gradient(180deg,rgba(255,255,255,0.08) 0,rgba(0,0,0,0.55) 100%),
    repeating-linear-gradient(180deg,rgba(255,255,255,0.04) 0,rgba(255,255,255,0.04) 1px,transparent 1px,transparent 3px);
   pointer-events:none;
   mix-blend-mode:soft-light;
   z-index:0;
  }
  header{
   z-index:2;
   padding:20px 22px 14px;
   display:flex;
   align-items:center;
   justify-content:space-between;
   gap:18px;
   background:linear-gradient(180deg,#201153 0%,rgba(17,11,37,0.92) 100%);
   border-bottom:3px solid var(--border);
  }
  .header-left{display:flex;align-items:center;gap:12px;}
  .home-link{
   width:36px;
   height:36px;
   display:block;
   color:#ffffff;
   transition:filter 0.2s ease, transform 0.2s ease;
  }
  .home-link:hover{filter:brightness(1.08);}
  .home-link:active{transform:translateY(1px);}
  .home-link svg{
   width:100%;
   height:100%;
   display:block;
   shape-rendering:crispEdges;
   filter:drop-shadow(0 2px 0 #031c10);
  }
  .nav-avatar{
   width:46px;
   height:46px;
   image-rendering:pixelated;
   display:block;
   border:3px solid var(--border);
   border-radius:30px;
   background:#000;
   object-fit:cover;
  }
  .brand{display:flex;flex-direction:column;gap:1px;}
  .brand .title{
   font-size:16px;
   text-transform:uppercase;
   color:var(--ink);
   font-family:'Press Start 2P','Courier New',monospace;
  }
  .brand .subtitle{
   font-size:14px;
   color:var(--muted);
  }
  .header-right{display:flex;align-items:flex-start;justify-content:flex-end;flex:1;gap:12px;flex-wrap:wrap;}
  .chip{
   display:inline-flex;
   align-items:center;
   justify-content:center;
   padding:10px 14px;
   min-width:120px;
   background:linear-gradient(180deg,var(--panel) 0%,var(--panel-alt) 100%);
   border:3px solid var(--border);
   border-radius:12px;
   box-shadow:0 0 0 3px rgba(255,255,255,0.1) inset,0 8px 0 rgba(0,0,0,0.35);
   color:var(--ink);
   font-size:12px;
   text-transform:uppercase;
   letter-spacing:0.04em;
   text-align:center;
  }
  .chip-score{
   min-width:0;
   padding:10px 16px;
   color:#f7f6ff;
   font-size:16px;
   text-shadow:0 2px 0 rgba(0,0,0,0.7),0 0 10px rgba(126,255,184,0.4);
  }
  .status-strip{
   margin:10px 18px 0;
   padding:0;
   display:flex;
   align-items:stretch;
   justify-content:space-between;
   gap:12px;
  }
  .tired-toast{
   display:none;
   position:absolute;
   top:200px;
   left:50%;
   transform:translateX(-50%);
   padding:8px 18px;
   border:3px solid var(--border);
   border-radius:12px;
   background:linear-gradient(180deg,#ff4f7a 0%,#a5143c 100%);
   color:#ffe8f1;
   font-size:10px;
   letter-spacing:0.06em;
   text-transform:uppercase;
   font-family:'Press Start 2P','Courier New',monospace;
   box-shadow:0 6px 0 rgba(0,0,0,0.45),0 0 0 3px rgba(255,255,255,0.1) inset;
   text-shadow:0 2px 0 rgba(0,0,0,0.6);
   text-align:center;
   z-index:190;
  }
  .tired-toast:not([hidden]){
   display:inline-flex;
   align-items:center;
   justify-content:center;
  }
  .stage-toast{
   position:absolute;
   left:50%;
   bottom:36px;
   transform:translateX(-50%);
   display:inline-flex;
   align-items:center;
   justify-content:center;
   padding:12px 18px;
   background:linear-gradient(180deg,var(--panel) 0%,var(--panel-alt) 100%);
   border:3px solid var(--border);
   border-radius:14px;
   box-shadow:0 6px 0 rgba(0,0,0,0.45),0 0 0 3px rgba(255,255,255,0.08) inset;
   font-family:'Press Start 2P','Courier New',monospace;
   font-size:12px;
   letter-spacing:0.05em;
   text-transform:uppercase;
   color:var(--ink);
   pointer-events:none;
   z-index:190;
  }
  .status-card{
   flex:1;
   display:flex;
   flex-direction:column;
   gap: 2px;
   padding:14px 16px 12px;
   text-transform:uppercase;
   letter-spacing:0.03em;
   color:var(--muted);
   min-width:0;
   background:linear-gradient(180deg,var(--panel) 0%,var(--panel-alt) 100%);
   border:3px solid var(--border);
   border-radius:13px;
   box-shadow:0 6px 0 rgba(0,0,0,0.45),0 0 0 2px rgba(255,255,255,0.08) inset;
  }
  .status-title{
   margin:0;
   font-size:11px;
   display:flex;
   align-items:center;
   justify-content:space-between;
   gap:8px;
   color:var(--muted);
  }
  .status-value{
   font-size:12px;
   color:#f7f6ff;
  }
  .status-meter{
   position:relative;
   height:16px;
   border:3px solid var(--border);
   border-radius:11px;
   background:#0d0520;
   box-shadow:0 0 0 3px rgba(255,255,255,0.08) inset;
   overflow:hidden;
  }
  .status-fill{
   position:absolute;
   inset:0;
   width:100%;
   background:linear-gradient(90deg,#64ff9a 0%,#28c56a 100%);
   box-shadow:0 0 12px rgba(100,255,154,0.45);
   transition:width 0.16s ease;
  }
  .status-card--stamina.status-card--low .status-fill{
   background:linear-gradient(90deg,#ff9ab9 0%,#ff4f7a 100%);
   box-shadow:0 0 12px rgba(255,79,122,0.45);
  }
  .status-card--stamina.status-card--pulse{
   animation:meterPulse 0.35s ease;
  }
  .status-card--stamina.status-card--boost .status-fill{
   background:linear-gradient(90deg,#9efcff 0%,#49a8ff 100%);
   box-shadow:0 0 14px rgba(90,180,255,0.45);
  }
  .status-card--coverage .status-fill{
   background:linear-gradient(90deg,#64ffea 0%,#3ad1bf 100%);
   box-shadow:0 0 12px rgba(100,255,234,0.35);
  }
  .status-card--danger .status-fill{
   background:linear-gradient(90deg,#ff4f7a 0%,#d61f51 100%);
   box-shadow:0 0 12px rgba(255,79,122,0.4);
  }
  .status-card--danger .status-title{
   color:#ffd4df;
  }
  .status-card--danger .status-value{
   color:#ffe0ea;
  }
  .status-meter-label{
   position:absolute;
   right:10px;
   top:50%;
   transform:translateY(-50%);
   font-size:10px;
   letter-spacing:0.04em;
   color:var(--ink);
   text-shadow:0 1px 0 rgba(0,0,0,0.8);
   pointer-events:none;
  }
  main{
   flex:1;
   position:relative;
   display:flex;
   align-items:stretch;
   justify-content:center;
   padding:0;
   z-index:1;
   width:100%;
   min-height:0;
   height:100%;
   overflow:hidden;
  }
  canvas{
   width:100%;
   height:100%;
   max-width:none;
   max-height:none;
   image-rendering:pixelated;
   position:relative;
   z-index:40;
   background:transparent;
   display:block;
  }
  .floor-hud{
   position:absolute;
   bottom:30px;
   left:50%;
   transform:translateX(-50%);
   display:flex;
   align-items:center;
   justify-content:center;
   gap:0;
   z-index:120;
  pointer-events:none;
 }
  .timer-pill{
   display:inline-flex;
   align-items:center;
   justify-content:center;
   gap:6px;
   padding:10px 16px;
   background:linear-gradient(180deg,var(--panel) 0%,var(--panel-alt) 100%);
   border:3px solid var(--border);
   border-radius:999px;
   box-shadow:0 8px 0 rgba(0,0,0,0.35),0 0 0 3px rgba(255,255,255,0.1) inset;
   font-family:'Press Start 2P','Courier New',monospace;
   font-size:16px;
   color:#f7f6ff;
   letter-spacing:0.04em;
   text-transform:uppercase;
   pointer-events:none;
  }
  .timer-suffix{
   font-size:10px;
   color:var(--muted);
   letter-spacing:0.06em;
  }
  .flash-layer{
   position:absolute;
   top:90px;
   left:0;
   right:0;
   display:flex;
   flex-direction:column;
   gap:10px;
   align-items:center;
   pointer-events:none;
   z-index:200;
  }
  .flash-message{
   padding:10px 18px;
   border:3px solid var(--border);
   border-radius:14px;
   box-shadow:0 8px 0 rgba(0,0,0,0.45),0 0 0 3px rgba(255,255,255,0.1) inset;
   font-family:'Press Start 2P','Courier New',monospace;
   font-size:14px;
   letter-spacing:0.05em;
   text-transform:uppercase;
   animation:flashPop 0.9s ease forwards;
  }
  .flash-message--good{
   background:linear-gradient(180deg,#215338 0%,#183729 100%);
   color:#bfffd5;
  }
  .flash-message--bad{
   background:linear-gradient(180deg,#4a1326 0%,#2e0a16 100%);
   color:#ffe0e9;
  }
  @keyframes flashPop{
   0%{transform:translateY(20px) scale(0.92);opacity:0;}
   35%{transform:translateY(0) scale(1);opacity:1;}
   100%{transform:translateY(-15px) scale(0.96);opacity:0;}
  }
  .control-pad{
   display:grid;
   grid-template-columns:repeat(3,64px);
   grid-template-rows:repeat(2,64px);
   grid-template-areas:
    ". up ."
    "left down right";
   gap:2px;
   pointer-events:auto;
  }
  .control-btn{
   width:64px;
   height:64px;
   border:3px solid var(--border);
   border-radius:14px;
   background:linear-gradient(180deg,var(--panel) 0%,var(--panel-alt) 100%);
   box-shadow:0 6px 0 rgba(0,0,0,0.45),0 0 0 3px rgba(255,255,255,0.08) inset;
   color:var(--ink);
   font-family:'Press Start 2P','Courier New',monospace;
   font-size:18px;
   line-height:1;
   display:inline-flex;
   align-items:center;
   justify-content:center;
   text-shadow:0 2px 0 rgba(0,0,0,0.7),0 0 12px rgba(126,255,184,0.25);
   cursor:pointer;
   transition:transform 0.1s ease, filter 0.2s ease;
   touch-action:manipulation;
  }
  .control-btn span{
   transform:translateY(-1px);
  }
  .control-btn:active{
   transform:translateY(2px);
  }
  .control-btn--up{grid-area:up;}
  .control-btn--left{grid-area:left;}
  .control-btn--down{grid-area:down;}
  .control-btn--right{grid-area:right;}
  .control-btn:focus-visible{
   outline:3px solid var(--accent);
   outline-offset:3px;
  }
  .control-btn:hover{
   filter:brightness(1.08);
  }
  .bonus-queue{
   position:absolute;
   left:50%;
   transform:translateX(-50%);
   bottom:96px;
   z-index:130;
   display:none;
   flex-direction:column;
   gap:10px;
   width:calc(100% - 56px);
  }
  .bonus-card{
   display:flex;
   align-items:center;
   justify-content:space-between;
   gap:12px;
   padding:12px 16px;
   background:linear-gradient(180deg,var(--panel) 0%,var(--panel-alt) 100%);
   border:3px solid var(--border);
   border-radius:12px;
   box-shadow:0 8px 0 rgba(0,0,0,0.4),0 0 0 3px rgba(255,255,255,0.1) inset;
   color:var(--ink);
   font-size:12px;
   letter-spacing:0.04em;
   text-transform:uppercase;
   pointer-events:auto;
  }
  .bonus-card strong{color:var(--accent);}
  .bonus-card button{
   font-family:'Press Start 2P','Courier New',monospace;
   font-size:11px;
   text-transform:uppercase;
   padding:10px 14px;
   border:3px solid var(--border);
   border-radius:10px;
   background:linear-gradient(180deg,#49f48a 0%,#1ca458 60%,#0d6a37 100%);
   color:#ffffff;
   cursor:pointer;
   box-shadow:0 6px 0 rgba(0,0,0,0.45),0 0 0 3px rgba(255,255,255,0.1) inset;
  }
  .bonus-card button:active{
   transform:translateY(2px);
   box-shadow:0 3px 0 rgba(0,0,0,0.45);
  }
  .boss{
   position:absolute;
   left:18px;
   right:18px;
   top:18px;
   padding:16px 18px;
   background:linear-gradient(180deg,var(--panel-alt) 0%,var(--panel) 100%);
   border:3px solid var(--border);
   border-radius:14px;
   box-shadow:0 8px 0 rgba(0,0,0,0.45),0 0 0 3px rgba(255,255,255,0.08) inset;
   font-size:14px;
   text-transform:uppercase;
  letter-spacing:0.04em;
  text-align:center;
  color:var(--ink);
  pointer-events:none;
  z-index:130;
  transition:background 0.25s ease,color 0.25s ease;
  }
  .boss.boss--good{
   color:#d7ffe7;
   background:linear-gradient(180deg,#1b3f2b 0%,#0e2418 100%);
  }
  .boss.boss--warn{
   color:#ffe8b5;
   background:linear-gradient(180deg,#3e3218 0%,#2a1d07 100%);
  }
  .boss.boss--bad{
   color:#ffd4df;
   background:linear-gradient(180deg,#4a1326 0%,#2e0a16 100%);
  }
  .flow-screen{
   position:absolute;
   inset:0;
   display:flex;
   flex-direction:column;
   gap:18px;
   padding:32px 24px 28px;
   background:linear-gradient(180deg,rgba(32,17,83,0.94) 0%,rgba(12,6,32,0.94) 45%,rgba(5,2,16,0.92) 100%);
   color:var(--ink);
   overflow:hidden;
   z-index:150;
  }
  .flow-screen.hidden{
   display:none !important;
  }
  .flow-screen--preview{
   justify-content:center;
   align-items:center;
   text-align:center;
   gap:18px;
  }
  .preview-callout{
   font-size:26px;
   text-transform:uppercase;
   letter-spacing:0.08em;
   color:var(--accent);
  }
  .preview-body{
   display:flex;
   justify-content:center;
   width:100%;
  }
  .preview-artbox{
   padding:16px;
   box-shadow:0 10px 0 rgba(0,0,0,0.45),0 0 0 4px rgba(255,255,255,0.08) inset;
  }
  .preview-timer{
   margin-top:12px;
   font-size:20px;
   font-family:'Press Start 2P','Courier New',monospace;
   letter-spacing:0.05em;
  }
  .flow-hero{
   display:flex;
   flex-direction:column;
   align-items:center;
   gap:12px;
   text-align:center;
  }
  .flow-title{
   margin:0;
   font-size:28px;
   text-transform:uppercase;
  }
  .flow-copy{
   margin:0;
   color:var(--muted);
   font-size:18px;
   line-height:1.6;
   font-family:'Courier New',monospace;
  }
  .flow-body{
   flex:1;
   display:flex;
   flex-direction:column;
   gap:16px;
   overflow-y:auto;
   padding-bottom:140px;
   width:100%;
  }
  .flow-metrics{
   display:flex;
   flex-wrap:wrap;
   justify-content:center;
   gap:12px;
  }
  .flow-actions{
   position:absolute;
   left:0;
   right:0;
   bottom:0;
   display:flex;
   justify-content:center;
   gap:12px;
   padding:16px;
   background:rgba(12,8,28,0.82);
   backdrop-filter:blur(12px);
   box-shadow:0 10px 28px rgba(0,0,0,0.45);
  }
  .panel{
   width:min(92%,440px);
   max-height:90%;
   background:linear-gradient(180deg,var(--panel) 0%,var(--panel-alt) 100%);
   border:3px solid var(--border);
   border-radius:18px;
   box-shadow:0 14px 0 rgba(0,0,0,0.55),0 0 0 4px rgba(255,255,255,0.08) inset;
   padding:28px 24px 24px;
   text-align:center;
   color:var(--ink);
   display:flex;
   flex-direction:column;
   gap:18px;
  }
  .panel h1{
   margin:0;
   font-size:30px;
   text-transform:uppercase;
  }
  .panel--round-start{
   max-width:360px;
   gap:16px;
  }
  .panel--round-start .stack{
   align-items:center;
  }
  .round-start__title{
   margin:0;
   font-size:28px;
   text-transform:uppercase;
  }
  .round-start__copy{
   margin:0;
   font-size:18px;
   color:var(--muted);
   line-height:1.6;
  }
  .round-start__btn{
   min-width:160px;
  }
  .panel-body{
   display:flex;
   flex-direction:column;
   align-items:center;
   gap:14px;
   width:100%;
   text-align:center;
  }
  .panel-body p{
   width:100%;
   margin:0 0 8px;
   color:var(--muted);
   font-size:18px;
   line-height:1.75;
   letter-spacing:0.01em;
   font-family:'Courier New',monospace;
  }
  .panel-body .metrics{
   width:100%;
  }
  .metrics{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;}
  .list{
   display:flex;
   flex-direction:column;
   gap:12px;
   width:100%;
   padding:3px;
  }
  .story{
   display:flex;
   flex-direction:column;
   gap:0;
   align-items:stretch;
   padding:14px 16px;
   border-radius:12px;
   background:linear-gradient(180deg,#3b2c78 0%,#241f56 100%);
   border:3px solid var(--border);
   box-shadow:0 6px 0 rgba(0,0,0,0.35),0 0 0 3px rgba(255,255,255,0.08) inset;
   cursor:pointer;
   transition:transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s ease;
  }
  .story:hover{
   transform:translateY(-2px);
  }
  .story.sel{
   outline:3px solid var(--accent);
   box-shadow:0 12px 0 rgba(0,0,0,0.45),0 0 0 3px rgba(126,255,184,0.22) inset;
  }
  .story--cut{
   opacity:0.28;
   box-shadow:0 6px 0 rgba(0,0,0,0.35),0 0 0 3px rgba(255,255,255,0.05) inset;
   outline:none;
  }
  .story--estimate{
   background:linear-gradient(180deg,#31266a 0%,#1c1440 100%);
  }
  .story-header{
   display:flex;
   align-items:center;
   justify-content:space-between;
   gap:12px;
   width:100%;
  }
  .story-points{
   padding:4px 8px;
   background:linear-gradient(180deg,#4a1326 0%,#2e0a16 100%);
   border:2px solid var(--border);
   border-radius:10px;
   font-size:12px;
   text-transform:uppercase;
   letter-spacing:0.06em;
   color:#fff;
   box-shadow:0 3px 0 rgba(0,0,0,0.4);
  }
  .story--estimate.story--cut .story-points{
   background:linear-gradient(180deg,#241f56 0%,#140d2b 100%);
   color:var(--muted);
  }
  .story .tag{
   font-size:16px;
   color:var(--ink);
   font-weight:700;
   letter-spacing:0.03em;
  }
  .story .desc{
   color:var(--muted);
   font-size:18px;
   line-height:1.55;
  }
  .badge{
   display:inline-flex;
   align-items:center;
   justify-content:center;
   min-width:120px;
   padding:12px 18px;
   background:linear-gradient(180deg,var(--panel) 0%,var(--panel-alt) 100%);
   border:3px solid var(--border);
   border-radius:12px;
   box-shadow:0 0 0 3px rgba(255,255,255,0.1) inset,0 8px 0 rgba(0,0,0,0.35);
   font-size:12px;
   text-align:center;
   text-transform:uppercase;
   letter-spacing:0.04em;
   line-height:1.4;
   font-family:'Press Start 2P','Courier New',monospace;
  }
  .badge--over{
   background:linear-gradient(180deg,#4a1326 0%,#2e0a16 100%);
   color:#ffd4df;
   box-shadow:0 0 0 3px rgba(255,121,150,0.18) inset,0 8px 0 rgba(0,0,0,0.45);
  }
  .cards{
   display:flex;
   flex-direction:column;
   gap:12px;
   width:100%;
   max-height:360px;
   overflow-y:auto;
  }
  .card{
   background:linear-gradient(180deg,#251b4c 0%,#1a1236 100%);
   border:3px solid var(--border);
   border-radius:12px;
   padding:14px;
   text-align:left;
   box-shadow:0 8px 0 rgba(0,0,0,0.45),0 0 0 3px rgba(255,255,255,0.08) inset;
   color:var(--ink);
   display:flex;
   flex-direction:column;
   gap:10px;
   cursor:pointer;
   transition:transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s ease;
  }
  .card:hover{
   transform:translateY(-2px);
  }
  .card.card--cut{
   opacity:0.25;
   box-shadow:0 6px 0 rgba(0,0,0,0.35),0 0 0 3px rgba(255,255,255,0.05) inset;
  }
  .card-title{
   font-size:13px;
   font-weight:700;
   color:var(--ink);
   letter-spacing:0.03em;
   text-transform:uppercase;
  }
  .reason{
   color:var(--muted);
   font-size:11px;
   line-height:1.5;
  }
  .panel--failure .badge{
   background:linear-gradient(180deg,#5a1b2f 0%,#3a0e1f 100%);
   color:#ffe0e9;
   box-shadow:0 0 0 3px rgba(255,121,150,0.18) inset,0 8px 0 rgba(0,0,0,0.45);
  }
  .panel--success .badge{
   background:linear-gradient(180deg,#215338 0%,#183729 100%);
   color:#bfffd5;
   box-shadow:0 0 0 3px rgba(126,255,184,0.22) inset,0 8px 0 rgba(0,0,0,0.45);
  }
  .panel--techdebt .badge{
   background:linear-gradient(180deg,#4a36a3 0%,#2b1f66 100%);
   color:#efe5ff;
   box-shadow:0 0 0 3px rgba(186,168,255,0.2) inset,0 8px 0 rgba(0,0,0,0.45);
  }
  .panel.panel--failure{
   background:linear-gradient(180deg,#4a1326 0%,#2e0a16 100%);
   color:#ffd4df;
   box-shadow:0 14px 0 rgba(0,0,0,0.55),0 0 0 4px rgba(255,121,150,0.18) inset;
  }
  .panel.panel--failure p{
   color:#ffe0e9;
  }
  .panel.panel--success{
   background:linear-gradient(180deg,#1b3f2b 0%,#0e2418 100%);
   color:#ffffff;
   box-shadow:0 14px 0 rgba(0,0,0,0.55),0 0 0 4px rgba(126,255,184,0.18) inset;
  }
  .panel.panel--success p{
   color:#ffffff;
  }
  .panel.panel--techdebt{
   background:linear-gradient(180deg,#38266f 0%,#241449 100%);
   color:#efe5ff;
   box-shadow:0 14px 0 rgba(0,0,0,0.55),0 0 0 4px rgba(186,168,255,0.2) inset;
  }
  .panel.panel--techdebt p{
   color:#d8ccff;
  }
  .stack{display:flex;flex-direction:column;gap:12px;}
  .btn{
   cursor:pointer;
   user-select:none;
   padding:18px 26px;
   font-size:18px;
   font-weight:700;
   letter-spacing:0.05em;
   text-transform:uppercase;
   font-family:'Press Start 2P','Courier New',monospace;
   background:linear-gradient(180deg,#49f48a 0%,#1ca458 60%,#0d6a37 100%);
   border:4px solid var(--border);
   border-radius:16px;
   box-shadow:0 12px 0 rgba(0,0,0,0.5),0 0 0 4px rgba(255,255,255,0.12) inset;
   color:#ffffff;
   transition:transform 0.15s ease, filter 0.2s ease;
   text-shadow:0 2px 0 rgba(0,0,0,0.7),0 0 8px rgba(255,255,255,0.25);
  }
  .btn:hover{filter:brightness(1.1);}
  .btn:active{transform:translateY(3px);box-shadow:0 6px 0 rgba(0,0,0,0.5);}
  .btn[disabled]{
   opacity:0.45;
   cursor:not-allowed;
   filter:grayscale(0.4);
   box-shadow:0 8px 0 rgba(0,0,0,0.4),0 0 0 4px rgba(255,255,255,0.05) inset;
  }
.btn-secondary{
 background:linear-gradient(180deg,var(--panel-alt) 0%,var(--panel) 100%);
 color:var(--muted);
 box-shadow:0 8px 0 rgba(0,0,0,0.45),0 0 0 4px rgba(255,255,255,0.1) inset;
}
.btn-secondary:hover{filter:brightness(1.06);}
.btn-secondary:active{transform:translateY(3px);}
.btn-danger{
 background:linear-gradient(180deg,#ff718f 0%,#c9244e 65%,#7a0f2f 100%);
 color:#fff0f3;
 box-shadow:0 10px 0 rgba(82,4,20,0.8),0 0 0 4px rgba(255,255,255,0.08) inset,0 0 22px rgba(255,113,143,0.4);
}
.btn-danger:hover{filter:brightness(1.08);}
.btn-danger:active{transform:translateY(3px);box-shadow:0 6px 0 rgba(82,4,20,0.8),0 0 0 4px rgba(255,255,255,0.08) inset;}
  .pix{
   font-family:'Press Start 2P','Courier New',monospace;
   text-shadow:0 1px 0 #000,0 -1px 0 #000,1px 0 0 #000,-1px 0 0 #000;
   letter-spacing:0.03em;
  }
  .designRow{
   display:flex;
   justify-content:center;
   align-items:center;
   gap:12px;
   flex-wrap:wrap;
  }
  .artbox{
   background:linear-gradient(180deg,var(--panel-alt) 0%,var(--panel) 100%);
   border:3px solid var(--border);
   border-radius:12px;
   padding:10px;
   box-shadow:0 8px 0 rgba(0,0,0,0.45),0 0 0 3px rgba(255,255,255,0.08) inset;
  }
  .artbox canvas{
   image-rendering:pixelated;
   image-rendering:crisp-edges;
  }
  .choices-grid{
   display:grid;
   grid-template-columns:repeat(2,minmax(140px,1fr));
   gap:2px;
   justify-items:center;
   width:100%;
   padding:4px 2px 24px;
  }
  .choice-btn{
   appearance:none;
   border:none;
   background:none;
   padding:0;
   display:flex;
   flex-direction:column;
   align-items:center;
   gap:12px;
   font-family:'Press Start 2P','Courier New',monospace;
   color:var(--muted);
   cursor:pointer;
   transition:transform 0.15s ease, filter 0.2s ease;
  }
  .choice-btn:hover{
   transform:translateY(-4px);
  }
  .choice-btn:active{
   transform:translateY(0);
  }
  .choice-btn[disabled]{
   cursor:default;
   transform:none;
  }
  .choice-btn[disabled]:hover{
   transform:none;
  }
  .choice-btn--correct .artbox,
  .choice-btn--answer .artbox{
   outline:3px solid var(--accent);
   box-shadow:0 0 0 3px rgba(100,255,154,0.28) inset,0 0 18px rgba(100,255,154,0.45);
  }
  .choice-btn--incorrect .artbox{
   opacity:0.35;
   filter:grayscale(0.5);
  }
  .choice-label{
   font-size:12px;
   text-transform:uppercase;
   letter-spacing:0.04em;
   color:var(--ink);
   background:linear-gradient(180deg,var(--panel-alt) 0%,var(--panel) 100%);
   border:2px solid var(--border);
   border-radius:8px;
   padding:6px 12px;
   box-shadow:0 6px 0 rgba(0,0,0,0.35),0 0 0 3px rgba(255,255,255,0.08) inset;
  }
  .choice-btn canvas{
   width:100%;
   height:auto;
   image-rendering:pixelated;
   image-rendering:crisp-edges;
  }
  #choicesScreen .flow-hero{
   gap:10px;
  }
  #choicesScreen .flow-body{
   padding-bottom:40px;
  }
  #choicesScreen .choices-grid{
   gap:0;
  }
  .spinner{
   position:absolute;
   inset:0;
   display:flex;
   align-items:center;
   justify-content:center;
   padding:24px;
   background:rgba(6,3,18,0.86);
   backdrop-filter:blur(2px);
   z-index:240;
  }
  .spinner[hidden]{
   display:none;
  }
  .spinner.hidden{
   display:none;
  }
  .spin-box{
   background:linear-gradient(180deg,var(--panel) 0%,var(--panel-alt) 100%);
   border:3px solid var(--border);
   border-radius:16px;
   box-shadow:0 14px 0 rgba(0,0,0,0.55),0 0 0 4px rgba(255,255,255,0.08) inset;
   padding:22px 24px;
   display:flex;
   flex-direction:column;
   gap:12px;
   align-items:center;
   width:min(88%,380px);
   text-align:center;
   color:var(--ink);
   transform:translateY(-40px);
  }
  .spin{
   width:42px;
   height:42px;
   border-radius:50%;
   border:6px solid rgba(126,255,184,0.2);
   border-top-color:var(--accent);
   animation:rot 1s linear infinite;
  }
  .spin-quips{
   color:var(--muted);
   font-size:16px;
   line-height:1.5;
  }
  @keyframes rot{
   to{transform:rotate(360deg);}
  }
  .splash-loader{
   position:absolute;
   inset:0;
   z-index:300;
   background:radial-gradient(circle at center,#2d1f66 0%,rgba(5,3,18,0.95) 65%);
   display:flex;
   flex-direction:column;
   align-items:center;
   justify-content:center;
   gap:0;
   transition:opacity 0.5s ease;
  }
  .splash-loader.splash-hidden{
   opacity:0;
   pointer-events:none;
  }
  .splash-logo{
   width:220px;
   max-width:70%;
   image-rendering:pixelated;
   filter:drop-shadow(0 0 12px rgba(98,255,154,0.45));
   animation:logoFloat 2.4s ease-in-out infinite;
  }
  .splash-meter{
   width:200px;
   max-width:80%;
   height:16px;
   border:3px solid var(--border);
   border-radius:12px;
   background:rgba(0,0,0,0.55);
   box-shadow:0 0 0 3px rgba(255,255,255,0.08) inset;
   overflow:hidden;
   position:relative;
   margin-top:-28px;
  }
  .splash-meter::after{
   content:'';
   position:absolute;
   inset:2px;
   background:linear-gradient(90deg,rgba(79,255,155,0.2) 0%,rgba(79,255,155,0.8) 50%,rgba(79,255,155,0.2) 100%);
   animation:sweep 1.6s ease-in-out infinite;
  }
  .overlay{
   position:absolute;
   left:0;
   right:0;
   top:87px;
   bottom:0;
   display:flex;
   flex-direction:column;
   align-items:center;
   justify-content:center;
   padding:24px;
   background:rgba(6,3,18,0.8);
   backdrop-filter:blur(1px);
   z-index:200;
   width:100%;
   height:auto;
   overflow-y:auto;
   transition:opacity 0.25s ease;
  }

  .overlay.hidden{
   opacity:0;
   pointer-events:none;
  }
  .stage--intro .status-strip,
  .stage--intro .bonus-queue,
  .stage--intro .floor-hud,
  .stage--intro .flash-layer,
  .stage--briefing .status-strip,
  .stage--briefing .bonus-queue,
  .stage--briefing .floor-hud,
  .stage--briefing .flash-layer{
   visibility:hidden;
   opacity:0;
   pointer-events:none;
  }
  .stage--intro canvas,
  .stage--briefing canvas{
   visibility:hidden;
  }
  .stage--intro main,
  .stage--briefing main{
   visibility:hidden;
  }
  .stage--intro .overlay,
  .stage--briefing .overlay{
   top:87px;
   bottom:0;
   padding:24px 24px 30px;
  }
  .intro-screen{
   display:none;
   position:absolute;
   left:0;
   right:0;
   top:73px;
   bottom:0;
   min-height:calc(100% - 96px);
   padding:68px 28px 48px;
   background:linear-gradient(180deg,#201153 0%,#150a37 60%,#0a041d 100%);
   color:var(--ink);
   text-align:center;
   overflow-y:auto;
  }
  .stage--intro .intro-screen{
   display:flex;
   flex-direction:column;
   align-items:center;
   gap:18px;
   justify-content:flex-start;
  }
  .stage--briefing .intro-screen{
   display:none !important;
  }
  .intro-screen__avatar{
   width:92px;
   height:92px;
   border:4px solid var(--border);
   border-radius:50px;
   background:#000;
   box-shadow:0 12px 0 rgba(0,0,0,0.55),0 0 0 3px rgba(255,255,255,0.08) inset;
   image-rendering:pixelated;
  }
  .intro-screen__title{
   font-size:30px;
   margin:0 0 8px;
  }
  .intro-screen__copy{
   font-size:18px;
   line-height:1.7;
   color:var(--muted);
   margin:0 auto;
   max-width:420px;
   font-family:'Courier New',monospace;
  }
  .intro-screen__grid{
   display:flex;
   flex-direction:column;
   align-items:center;
   gap:18px;
   width:100%;
   max-width:320px;
   margin:16px 0 12px;
  }
  .intro-card{
   width:100%;
   padding:12px 18px;
   display:flex;
   align-items:center;
   justify-content:center;
   background:linear-gradient(180deg,var(--panel) 0%,var(--panel-alt) 100%);
   border:3px solid var(--border);
   border-radius:12px;
   box-shadow:0 0 0 3px rgba(255,255,255,0.1) inset,0 8px 0 rgba(0,0,0,0.35);
  }
  .intro-card__text{
   position:relative;
   font-size:12px;
   letter-spacing:0.07em;
   line-height:1.5;
   text-transform:uppercase;
   display:block;
   color:#f7f6ff;
   text-shadow:0 2px 0 rgba(0,0,0,0.6);
   text-align:center;
   font-family:'Press Start 2P','Courier New',monospace;
  }
  .intro-screen__actions{
   display:flex;
   flex-direction:column;
   align-items:center;
   gap:10px;
   margin-top:6px;
   position:relative;
  }
  .intro-screen__actions::after{
   content:'';
   position:absolute;
   bottom:-22px;
   left:50%;
   transform:translateX(-50%);
   width:120px;
   height:6px;
   opacity:0.2;
   background:radial-gradient(circle at center,#000 0%,transparent 70%);
  }
  .intro-screen .btn{
   min-width:220px;
  }
  @keyframes meterPulse{
   0%{box-shadow:0 6px 0 rgba(0,0,0,0.45),0 0 0 3px rgba(255,255,255,0.08) inset;}
   50%{box-shadow:0 10px 14px rgba(255,79,122,0.4),0 0 0 3px rgba(255,255,255,0.18) inset;}
   100%{box-shadow:0 6px 0 rgba(0,0,0,0.45),0 0 0 3px rgba(255,255,255,0.08) inset;}
  }
  @keyframes sweep{
   0%{transform:translateX(-60%);}
   50%{transform:translateX(0%);}
   100%{transform:translateX(60%);}
  }
  @keyframes logoFloat{
   0%,100%{transform:translateY(0);}
   50%{transform:translateY(-8px);}
  }
  /* Arcade home */
  body.arcade-home{
   font-family:'Press Start 2P','Courier New',monospace;
   letter-spacing:0.035em;
  }
  body.arcade-home .stage-wrap{
   position:fixed;
   inset:0;
   display:grid;
   place-items:center;
   padding:0;
   margin:0;
  }
body.arcade-home .stage{
   width:clamp(240px, calc(100vw - (var(--safe-area-left) + var(--safe-area-right))), 500px);
   height:clamp(420px, calc(100dvh - (var(--safe-area-top) + var(--safe-area-bottom))), 880px);
   max-width:100%;
   max-height:100%;
   aspect-ratio:9/16;
   background:linear-gradient(180deg,#201153 0%,#150a37 60%,#0a041d 100%);
   border:4px solid var(--border);
   border-radius:22px;
   box-shadow:0 0 0 4px rgba(255,255,255,0.1) inset,0 32px 90px rgba(0,0,0,0.85);
   display:flex;
   flex-direction:column;
   position:relative;
   overflow:hidden;
   isolation:isolate;
   padding:var(--safe-area-top) var(--safe-area-right) var(--safe-area-bottom) var(--safe-area-left);
 }
  body.arcade-home .stage::before{
   content:'';
   position:absolute;
   inset:0;
   background:
    linear-gradient(180deg,rgba(255,255,255,0.08) 0,rgba(0,0,0,0.55) 100%),
    repeating-linear-gradient(180deg,rgba(255,255,255,0.04) 0,rgba(255,255,255,0.04) 1px,transparent 1px,transparent 3px);
   pointer-events:none;
   mix-blend-mode:soft-light;
   z-index:0;
  }
  body.arcade-home .stage--locked header,
  body.arcade-home .stage--locked main{
   filter:blur(2px) saturate(0.85);
   pointer-events:none;
  }
  body.arcade-home header{
   z-index:2;
   margin:25px 0 0;
   padding:26px 20px 0;
   display:flex;
   flex-direction:column;
   align-items:center;
   gap:12px;
   text-align:center;
   background:none;
   border-bottom:0;
  }
  body.arcade-home .header-logo{
   width:200px;
   max-width:80%;
   filter:drop-shadow(0 0 12px rgba(98,255,154,0.35));
  }
  body.arcade-home .header-text{
   margin:0;
   font-size:14px;
   color:white;
   letter-spacing:0.04em;
  }
  body.arcade-home main{
   flex:1;
   position:relative;
   display:flex;
   flex-direction:column;
   gap:18px;
   padding:22px 24px 28px;
   z-index:1;
  }
  body.arcade-home .grid-wrap{
   flex:1;
   min-height:0;
   position:relative;
  }
 body.arcade-home .grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  width:100%;
  margin:15px auto 0;
  padding:4px 0 4px;
  overflow:visible;
 }
 @media (max-width:420px){
  body.arcade-home main{
   padding:18px 16px 22px;
   gap:14px;
  }
  body.arcade-home header{
   margin:18px 0 0;
   padding:20px 16px 0;
  }
  body.arcade-home .header-text {
    font-size: 11px;
  }
  body.arcade-home .grid{
   gap:9px;
  }
 }
  body.arcade-home .grid::-webkit-scrollbar{width:8px;}
  body.arcade-home .grid::-webkit-scrollbar-thumb{
   background:rgba(255,255,255,0.18);
   border-radius:8px;
  }
  body.arcade-home .grid{
   scrollbar-width:thin;
   scrollbar-color:rgba(255,255,255,0.18) transparent;
  }
  body.arcade-home .tile{
   position:relative;
   aspect-ratio:1/1;
   border:3px solid var(--border);
   border-radius:16px;
   background:linear-gradient(180deg,var(--panel-alt) 0%,var(--panel) 100%);
   box-shadow:0 12px 0 rgba(0,0,0,0.55),0 0 0 4px rgba(255,255,255,0.08) inset;
   display:flex;
   align-items:flex-end;
   justify-content:center;
   color:var(--ink);
   cursor:pointer;
   transition:transform 0.18s ease,box-shadow 0.18s ease,border-color 0.18s ease;
   text-align:center;
   isolation:isolate;
   overflow:visible;
   margin-bottom:12px;
   padding:0;
  }
  body.arcade-home .tile::before{
   content:'';
   position:absolute;
   inset:0;
   background:radial-gradient(circle at 50% 30%,rgba(100,255,154,0.18),transparent 55%);
   opacity:0;
   transition:opacity 0.2s ease;
  }
  body.arcade-home .tile .img{
   position:absolute;
   inset:0;
   background-size:cover;
   background-position:center;
   background-repeat:no-repeat;
   filter:saturate(0.85) brightness(0.92);
   transition:transform 0.18s ease,filter 0.18s ease;
   z-index:1;
   border-radius:17px;
  }
  body.arcade-home .tile-label{
   position:absolute;
   left:50%;
   bottom:-14px;
   transform:translateX(-50%);
   z-index:2;
   display:inline-flex;
   padding:8px 12px 6px;
   background:rgba(8,4,24,0.9);
   border:2px solid rgba(255,255,255,0.12);
   border-radius:12px;
   text-transform:uppercase;
   font-size:10px;
   letter-spacing:0.08em;
   line-height:1.4;
   box-shadow:0 6px 0 rgba(0,0,0,0.55);
  }
  body.arcade-home .tile:hover,
  body.arcade-home .tile:focus-visible{
   transform:translateY(-4px);
   border-color:var(--accent);
   box-shadow:0 14px 0 rgba(0,0,0,0.55),0 0 0 4px rgba(100,255,154,0.22) inset,0 24px 40px rgba(0,0,0,0.6);
  }
  body.arcade-home .tile:hover::before,
  body.arcade-home .tile:focus-visible::before{
   opacity:1;
  }
  body.arcade-home .tile:hover .img,
  body.arcade-home .tile:focus-visible .img{
   filter:saturate(1.05) brightness(1.05);
  }
  body.arcade-home .tile:focus-visible{outline:none;}
 body.arcade-home .secret-unlock{
   position:absolute;
   top:18px;
   right:18px;
   z-index:4;
   display:flex;
   justify-content:flex-end;
  }
 body.arcade-home .secret-unlock[hidden]{
   display:none;
  }
  body.arcade-home .bug-bash-btn{
   display:inline-flex;
   align-items:center;
   justify-content:center;
   padding:8px;
   border:3px solid var(--accent);
   border-radius:10px;
   background:linear-gradient(180deg,rgba(100,255,154,0.18) 0%,rgba(12,44,28,0.85) 100%);
   color:var(--ink);
   font-size:11px;
   letter-spacing:0.09em;
   text-transform:uppercase;
   box-shadow:0 10px 0 rgba(0,0,0,0.6),0 0 16px rgba(100,255,154,0.28);
   transition:transform 0.18s ease, box-shadow 0.18s ease;
  }
  body.arcade-home .bug-bash-btn:hover,
  body.arcade-home .bug-bash-btn:focus-visible{
   outline:none;
   transform:translateY(-3px);
   box-shadow:0 16px 0 rgba(0,0,0,0.6),0 0 22px rgba(100,255,154,0.45);
  }
  body.arcade-home .footer-credit{
   margin-top:auto;
   text-align:center;
   font-size:9px;
   color:rgba(235,229,255,0.6);
   letter-spacing:0.08em;
   text-transform:uppercase;
  }
 body.arcade-home .stage-menu-btn{
   position:absolute;
   top:18px;
   left:18px;
   z-index:4;
   padding:12px 18px;
   border:2px solid rgba(255,255,255,0.18);
   border-radius:10px;
   background:rgba(12,6,32,0.82);
   color:var(--ink);
   font-size:11px;
   letter-spacing:0.08em;
   text-transform:uppercase;
   cursor:pointer;
   box-shadow:0 6px 0 rgba(0,0,0,0.55);
   transition:transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  }
  body.arcade-home .stage-menu-btn:focus-visible,
  body.arcade-home .stage-menu-btn:hover{
   outline:none;
   transform:translateY(-2px);
   border-color:var(--accent);
   box-shadow:0 8px 0 rgba(0,0,0,0.55),0 0 0 3px rgba(100,255,154,0.18) inset;
  }
  body.arcade-home .splash-loader{
   gap:24px;
  }
  body.arcade-home .splash-meter{
   margin-top:0;
  }
  body.arcade-home .splash-copy{
   font-size:10px;
   letter-spacing:0.04em;
  }
  body.arcade-home .overlay--menu{
   position:absolute;
   inset:0;
   display:flex;
   align-items:stretch;
   justify-content:center;
   padding:0;
   background:rgba(5,3,18,0.82);
   backdrop-filter:blur(4px);
   z-index:400;
  }
  body.arcade-home .overlay--menu.hidden{
   opacity:0;
   pointer-events:none;
  }
  body.arcade-home .overlay--menu .panel{
   width:100%;
   height:100%;
    max-height: 100%;
   padding:88px 32px 42px;
   gap:24px;
   position:relative;
   border-radius:0;
   border:0;
   box-shadow:none;
   overflow-y:auto;
  }
  body.arcade-home .panel--menu .panel-title{
   margin:0;
   font-size:18px;
   letter-spacing:0.08em;
   text-transform:uppercase;
  }
  body.arcade-home .overlay--menu .panel-body{
   gap:16px;
  }
  body.arcade-home .overlay--menu .panel-body .intro-screen__copy{
   margin:0 auto;
   text-align:center;
  }
  body.arcade-home .overlay--menu .info-list{
   margin:10px 0 0;
   padding:0;
   list-style:none;
   display:grid;
   gap:8px;
   text-align:left;
  }
  body.arcade-home .overlay--menu .info-list strong{
   color:var(--ink);
  }
  body.arcade-home .overlay--menu .info-list span{
   color:var(--muted);
  }
  body.arcade-home .overlay--menu .menu-close{
   position:absolute;
   top:12px;
   right:12px;
   background:rgba(15,10,38,0.85);
   border:2px solid rgba(255,255,255,0.16);
   border-radius:50%;
   width:34px;
   height:34px;
   display:grid;
   place-items:center;
   color:var(--ink);
   cursor:pointer;
   transition:transform 0.18s ease, border-color 0.18s ease;
   font-size:18px;
  }
  body.arcade-home .overlay--menu .menu-close:hover,
  body.arcade-home .overlay--menu .menu-close:focus-visible{
   outline:none;
   transform:rotate(10deg);
   border-color:var(--accent);
  }
  body.arcade-home .overlay--menu .modal-actions{
   width:100%;
   gap:12px;
  }
  body.arcade-home .overlay--menu .modal-actions .btn{
   width:100%;
   font-size:14px;
   padding:12px 16px;
  }
  body.arcade-home .overlay--menu .modal-tip{
   margin:0;
   color:rgba(235,229,255,0.7);
   letter-spacing:0.04em;
   text-align:center;
  }
  body.arcade-home .overlay--menu .menu-crew{
   margin:8px auto 0;
   max-width:240px;
   width:100%;
   height:auto;
  }
  body.arcade-home .overlay--menu .intro-screen__copy{
   text-align:center;
  }
  body.arcade-home .overlay--confirm{
   position:absolute;
   inset:0;
   display:flex;
   align-items:center;
   justify-content:center;
   padding:0 28px;
   background:rgba(5,3,18,0.86);
   backdrop-filter:blur(4px);
   z-index:450;
  }
  body.arcade-home .confirm-panel{
   width:min(360px, 100%);
   background:linear-gradient(180deg,var(--panel) 0%,var(--panel-alt) 100%);
   border:3px solid var(--border);
   border-radius:18px;
   box-shadow:0 24px 48px rgba(0,0,0,0.65),0 0 0 4px rgba(255,255,255,0.12) inset;
   padding:28px 26px 24px;
   display:flex;
   flex-direction:column;
   gap:18px;
   text-align:center;
  }
  body.arcade-home .confirm-title{
   margin:0;
   font-size:18px;
   letter-spacing:0.08em;
   text-transform:uppercase;
  }
  body.arcade-home .confirm-copy{
   margin:0 auto;
   max-width:280px;
  }
  body.arcade-home .confirm-actions{
   display:flex;
   flex-direction:column;
   gap:12px;
  }
  body.arcade-home .confirm-actions .btn{
   width:100%;
   font-size:14px;
   padding:12px 18px;
  }
  @media (max-width:540px){
   body.arcade-home{
    font-size:10px;
    line-height:1.4;
   }
   body.arcade-home .stage{
    height: 100%;
    max-width:100%;
    max-height:100%;
    border: none;
    border-radius:0;
    border-width:2px;
    box-shadow:none;
   }
   body.arcade-home .stage::before{display:none;}
   body.arcade-home header{
    padding:20px 16px 0;
   }
   body.arcade-home main{
    padding:0 18px 24px;
    gap:16px;
   }
   body.arcade-home .overlay--menu{
    padding:0;
   }
   body.arcade-home .overlay--menu .panel{
    padding:72px 18px 28px;
    gap:20px;
   }
   body.arcade-home .overlay--menu .modal-actions{
    gap:10px;
   }
   body.arcade-home .overlay--menu .modal-actions .btn{
    font-size:13px;
   }
   body.arcade-home .overlay--menu .menu-crew{
    max-width:200px;
   }
   body.arcade-home .overlay--confirm{
    padding:0 18px;
   }
   body.arcade-home .confirm-panel{
    padding:24px 20px 20px;
    gap:16px;
   }
   body.arcade-home .confirm-actions .btn{
    font-size:13px;
   }
  }
  @media (max-width:360px){
   body.arcade-home .grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:4px;
   }
  }
  @media (max-width:540px){
   body{font-size:15px;}
   .intro-screen__title {font-size:20px;}
   .intro-screen__avatar {width:72px;height:72px;}
   .intro-screen__copy {font-size: 15px;line-height: 1.3;}
   .intro-card__text {font-size:10px;}
   .brand .title {font-size: 14px;}
   .stage-wrap{display:block;width:100vw;min-height:100dvh;height:100svh;}
   .stage{width:100%;height:100%;max-width:none;max-height:none;border-radius:0;border:0;box-shadow:none;overflow:hidden;}
   .stage::before{border-radius:0;}
   .overlay{top:72px;}
   header{padding:14px 14px 12px;gap:12px;border-radius:0;margin:0;}
   .nav-avatar{width:42px;height:42px;}
   .chip{padding:8px 10px;font-size:10px;}
   .chip-score{font-size:14px;}
   .status-strip{margin:8px 14px 0;gap:10px;}
   .tired-toast{
    top:170px;
    margin:8px 14px 0;
    max-width:calc(100% - 28px);
    min-width:240px;
    padding:10px 22px;
   }
   .stage-toast{bottom:24px;padding:10px 14px;font-size:10px;}
   .intro-screen{padding:28px 16px 32px;min-height:calc(100% - 88px);}
   .intro-screen__grid{max-width:100%;}
   .bonus-queue{bottom:90px;width:calc(100% - 28px);}
   .floor-hud{bottom:16px;}
   .timer-pill{
    padding:8px 12px;
    font-size:14px;
   }
   .timer-suffix{
    font-size:9px;
   }
   .control-pad{
    grid-template-columns:repeat(3,58px);
    grid-template-rows:repeat(2,58px);
    gap:2px;
   }
   .control-btn{
    width:58px;
    height:58px;
    font-size:16px;
   }
   .stage--intro .overlay, .stage--briefing .overlay{top:72px;padding:16px;}
   .panel{padding:24px 18px;}
   .panel h1{font-size: 20px;line-height: 1.2;}
   .panel-body p{font-size:15px;line-height:1.4;}
   .btn{font-size:15px;padding:16px 20px;}
   .badge{font-size:10px;}
   .boss{left:14px;right:14px;top:14px;padding:14px 12px;font-size:12px;}
   .flow-screen{padding:24px 16px 22px;gap:14px;}
   .flow-title{font-size:20px;}
   .flow-copy{font-size:15px;line-height:1.4;}
   .flow-body{gap:12px;padding-bottom:120px;}
   .flow-actions{left:16px;right:16px;bottom:12px;padding:12px;}
   .list{gap:10px;}
   .story{padding:12px 14px;}
   .story .tag{font-size:16px;}
   .story .desc{font-size:14px;}
   .story-points{font-size:12px;padding:5px 10px;}
   .spin-box{padding:20px 18px;}
   .choices-grid{
    grid-template-columns:repeat(2,minmax(120px,1fr));
    gap:12px;
    padding:0 0 18px;
   }
   .choice-label{
    font-size:10px;
    padding:6px 10px;
   }
   #choicesScreen .flow-hero{
    gap:6px;
   }
   #choicesScreen .flow-body{
    padding-bottom:24px;
   }
   #choicesScreen .choices-grid{
    gap:10px;
   }
   #choicesScreen .choice-btn{
    gap:6px;
  }
  #choicesScreen .artbox{
   padding:6px;
  }
  #choicesScreen .choice-btn canvas{
   max-width:120px;
  }
 }
  .legacy-module{
   position:relative;
   display:flex;
   width:100%;
   height:100%;
  }
  .legacy-module .stage-wrap,
  .legacy-module[data-module] > .stage-wrap{
   width:100%;
   height:100%;
   display:flex;
  }
  .legacy-module .stage{
   width:100%;
   height:100%;
   max-width:none;
   max-height:none;
   border:0;
   border-radius:inherit;
   box-shadow:none;
   background:transparent;
   padding:0;
  }
  .legacy-module .stage::before{
   display:none;
  }
  .game-host{
   position:relative;
   flex:1;
   width:100%;
   height:100%;
   display:flex;
   align-items:center;
   justify-content:center;
  }
  .game-host__content{
   flex:1;
   width:100%;
   height:100%;
   border-radius:inherit;
   display:flex;
   flex-direction:column;
   overflow:hidden;
  }
  .game-host__loader{
   position:absolute;
   inset:0;
   display:flex;
   align-items:center;
   justify-content:center;
   background:rgba(9,6,25,0.92);
   color:#f4f1ff;
   font-family:'Press Start 2P','Courier New',monospace;
   font-size:12px;
   letter-spacing:0.08em;
   text-transform:uppercase;
   z-index:10;
   transition:opacity 0.3s ease;
  }
  .game-host__loader--hidden{
   opacity:0;
   pointer-events:none;
  }
