*{box-sizing:border-box}[hidden]{display:none!important}html,body{margin:0;background:#07071a;color:#f8f6ff;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;overflow:hidden}.game{min-height:700px;padding:16px;background:radial-gradient(circle at 15% 15%,#2c175a88,transparent 30%),radial-gradient(circle at 90% 20%,#123c6a77,transparent 28%),#07071a}header,.panel{max-width:850px;margin:auto}header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}header p{margin:0;color:#bba2ff;font-size:10px;letter-spacing:.2em;font-weight:900}h1{margin:3px 0 0}header div:last-child{display:flex;gap:6px}header span,header button{padding:8px 10px;border:1px solid #ffffff1b;border-radius:999px;background:#ffffff0b;color:#ddd7ff;font-size:11px;font-weight:800}.panel{border:1px solid #b38cff28;border-radius:26px;background:#0d0e26e8;padding:18px;box-shadow:0 25px 80px #0008}.intro,.done{min-height:580px;display:grid;place-content:center;text-align:center;justify-items:center}.sky{font-size:72px;letter-spacing:18px;color:#bca8ff;text-shadow:0 0 28px #7c5cff}.intro h2,.done h2{font-size:40px;margin:18px 0 8px}.intro p{max-width:640px;color:#9895ba}.intro button,.done button{margin-top:16px;padding:14px 24px;border:0;border-radius:14px;background:linear-gradient(135deg,#ba9cff,#65dfff);font-weight:950;color:#101326}.hud{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-bottom:14px}.hud span{padding:8px 12px;border:1px solid #ffffff18;border-radius:999px;color:#999abb;background:#ffffff08;font-size:12px}.hud b{color:#fff;margin-left:4px}.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;max-width:620px;margin:auto}.card{aspect-ratio:1;border:1px solid #8d7cff2d;border-radius:18px;background:linear-gradient(145deg,#171632,#0c1025);position:relative;transform-style:preserve-3d;transition:transform .36s;cursor:pointer}.card.revealed,.card.matched{transform:rotateY(180deg)}.face{position:absolute;inset:0;display:grid;place-items:center;backface-visibility:hidden;border-radius:inherit}.back{color:#514c80;font-size:34px}.front{transform:rotateY(180deg);font-size:42px;background:radial-gradient(circle,#2d2e69,#141633 65%);color:var(--c);text-shadow:0 0 22px var(--c)}.card.matched .front{box-shadow:inset 0 0 0 2px #78f9d3,0 0 20px #6fffd044}.card.matched{pointer-events:none}.card.wrong{animation:shake .3s}#msg{text-align:center;color:#8e91b5;font-size:12px}.done .const{font-size:100px;color:#ffd67a;text-shadow:0 0 40px #ff8df0}.done strong{font-size:38px;color:#8cf7ff}.done small{margin-top:8px;color:#a7a8c8}@keyframes shake{50%{transform:rotateY(180deg) translateX(7px)}}@media(max-width:560px){.game{padding:9px}.panel{padding:11px}.grid{gap:7px}.card{border-radius:13px}.front{font-size:34px}.intro h2,.done h2{font-size:31px}}

/* 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}
}
