*{box-sizing:border-box}[hidden]{display:none!important}html,body{margin:0;background:#050816;color:#f4f8ff;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;overflow:hidden}.game{min-height:680px;padding:16px;background:radial-gradient(circle at 20% 10%,#102d4a 0,transparent 33%),radial-gradient(circle at 90% 20%,#321356 0,transparent 28%),#050816}header,.panel{max-width:900px;margin:auto}header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}header p{margin:0;color:#66f6ff;font-size:10px;letter-spacing:.2em;font-weight:900}h1{margin:3px 0 0;font-size:26px}header div:last-child{display:flex;gap:7px;align-items:center}header span,header button{border:1px solid #ffffff1d;border-radius:999px;background:#ffffff0d;color:#dbe9ff;padding:8px 10px;font-size:11px;font-weight:800}.panel{border:1px solid #62f7ff30;border-radius:26px;background:linear-gradient(160deg,#091426ee,#080b18ee);box-shadow:0 28px 90px #0008;padding:18px}.intro,.done{text-align:center;min-height:560px;display:grid;place-content:center;justify-items:center}.portal,.burst{width:140px;height:140px;border-radius:50%;display:grid;place-items:center;font-size:64px;background:radial-gradient(circle,#65f9ff 0 8%,#2854d0 22%,#461d8c 45%,#080b18 68%);box-shadow:0 0 70px #4cefff55;animation:pulse 2s ease-in-out infinite}.intro h2,.done h2{font-size:42px;margin:24px 0 8px}.intro p{max-width:650px;color:#90a7c7}.intro button,.done button{margin-top:18px;border:0;border-radius:15px;padding:14px 26px;background:linear-gradient(135deg,#61f8ff,#8b6cff);font-weight:950;color:#07101c}.hud{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}.hud span{padding:8px 13px;border-radius:999px;background:#ffffff0b;border:1px solid #ffffff17;color:#8ea5c3;font-size:12px}.hud strong{color:#fff;margin-left:4px}canvas{display:block;width:min(100%,660px);height:auto;aspect-ratio:1;margin:auto;border-radius:20px;background:#040811;box-shadow:inset 0 0 0 1px #78eaff22,0 0 45px #1b8cff18}.pad{margin:12px auto 0;width:190px;display:grid;justify-items:center;gap:5px}.pad>div{display:flex;gap:5px}.pad button{width:56px;height:46px;border:1px solid #62f7ff35;border-radius:12px;background:#10233d;color:#dfffff;font-size:18px;font-weight:900}#msg{text-align:center;color:#8097b5;font-size:12px}.done strong{font-size:38px;color:#66f6ff}.done small{margin-top:8px;color:#9db0c9}.burst{font-size:54px;background:radial-gradient(circle,#fff7ad,#ff6bd6 28%,#5a38ff 52%,#0b0d20 70%)}@keyframes pulse{50%{transform:scale(1.05);filter:brightness(1.18)}}@media(max-width:600px){.game{padding:9px;min-height:720px}.panel{padding:11px}.intro h2,.done h2{font-size:32px}.portal,.burst{width:110px;height:110px}.pad button{height:44px}}

/* v0.9.7 universal mobile compact */
@media(max-width:700px){
  html,body{min-height:0!important;max-width:100%!important;overflow-x:hidden!important}
  .game{min-height:0!important;padding:6px!important;max-width:100%!important;overflow-x:hidden!important}
  .topbar,.top,main.game>header{min-height:30px!important;margin-bottom:5px!important;padding:0!important;display:flex!important;align-items:center!important}
  .topbar>div:first-child,.top>div:first-child,main.game>header>div:first-child{display:none!important}
  .top-actions,.topbar>.actions,.top>.top-actions,main.game>header>div:last-child{width:100%!important;display:flex!important;justify-content:flex-end!important;align-items:center!important;gap:4px!important;margin:0!important}
  .mode,.sound,.pill,.top-actions>*,main.game>header>div:last-child>*{min-height:27px!important;padding:4px 7px!important;font-size:9px!important;line-height:1.1!important}
  .intro,.done,.result,.complete{min-height:0!important;padding:15px 11px!important;border-radius:18px!important}
  .intro h2,.done h2,.result h2,.complete h2{font-size:clamp(24px,7vw,31px)!important;line-height:1.15!important;margin-top:5px!important;margin-bottom:6px!important;word-break:keep-all}
  .intro>p:not(.state),.intro .desc,.intro .description,.copy p:last-child,.done>p:not(.state),.result>p:not(.state){font-size:10.5px!important;line-height:1.45!important;margin:6px auto 12px!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important;max-width:96%!important}
  .stage{border-radius:18px!important;padding-left:9px!important;padding-right:9px!important}
  .meteor-logo,.cosmos,.hero-heart,.portal,.demo,.sky,.galaxy,.done-heart,.pulse,.const{transform:scale(.72);transform-origin:center;margin-top:-14px!important;margin-bottom:-13px!important}
  .evolution{margin:9px 0!important;gap:4px!important;max-width:100%;overflow:hidden}.evolution em{width:34px!important;height:34px!important;font-size:16px!important;flex:0 0 auto}.evolution b{font-size:10px!important}
  .primary,.action,.intro button,.done button,.result button{min-height:43px!important;padding:9px 17px!important;border-radius:12px!important;font-size:12px!important}
  .help,.message,.note{font-size:9px!important;line-height:1.35!important}
}
@media(max-width:390px){
  .game{padding:5px!important}
  .intro h2,.done h2,.result h2,.complete h2{font-size:24px!important}
  .mode,.sound,.pill,.top-actions>*,main.game>header>div:last-child>*{font-size:8.5px!important;padding:4px 6px!important}
}


/* v0.9.7 mobile idle/gameplay compaction */
@media(max-width:700px){
  .arena.state-idle,.stage.state-idle{min-height:min(430px,calc(100dvh - 145px))!important;padding:12px 10px!important}
  .arena.state-idle .copy h2,.stage.state-idle .copy h2,.stage .copy h2{font-size:clamp(22px,6.5vw,29px)!important;line-height:1.15!important;margin:5px 0 6px!important;word-break:keep-all}
  .arena.state-idle .copy>p:not(.state),.stage.state-idle .copy>p:not(.state),.stage .copy>p:not(.state){font-size:10.5px!important;line-height:1.4!important;margin:5px auto 9px!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important}
  .hint,.typing-note{font-size:9px!important;line-height:1.3!important;margin-top:5px!important}
  .mode-card,.start-panel{padding:10px!important;margin-bottom:7px!important;border-radius:15px!important}
  .summary{min-height:0!important;padding:11px 9px!important}
}

/* v0.10.0 common fullscreen bridge */
html.host-fullscreen,html.host-fullscreen body{width:100%!important;height:100%!important;min-height:100%!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;-webkit-overflow-scrolling:touch!important}
html.host-fullscreen .game{width:100%!important;min-height:100dvh!important;height:auto!important;max-height:none!important;overflow:visible!important;padding:6px!important}
@media(max-width:700px){
 html.host-fullscreen .topbar,html.host-fullscreen .top,html.host-fullscreen main.game>header{display:none!important}
 html.host-fullscreen .intro,html.host-fullscreen .done,html.host-fullscreen .result,html.host-fullscreen .complete,html.host-fullscreen .stage,html.host-fullscreen .arena,html.host-fullscreen .panel{min-height:0!important;max-height:none!important}
 html.host-fullscreen .summary{display:none!important}
 html.host-fullscreen .intro,html.host-fullscreen .done{padding-top:10px!important;padding-bottom:10px!important}
 html.host-fullscreen .help,html.host-fullscreen .hint,html.host-fullscreen .legend{max-height:34px;overflow:hidden}
}
