*{box-sizing:border-box}[hidden]{display:none!important}:root{color-scheme:dark;--bg:#100b1e;--ink:#fbf8ff;--muted:#b5a7c9;--line:rgba(255,255,255,.12);--violet:#a987ff;--pink:#ff7dd1;--cyan:#6fe7ff;--green:#6ff0b5;--red:#ff718e}html,body{margin:0;min-height:100%;overflow:hidden;background:var(--bg)}body{font-family:Pretendard,"Noto Sans KR",system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--ink)}button,input{font:inherit}.game{min-height:660px;padding:16px;background:radial-gradient(circle at 12% -5%,rgba(120,88,255,.22),transparent 36%),radial-gradient(circle at 90% 12%,rgba(255,96,194,.12),transparent 31%),linear-gradient(180deg,#140d27,#0d0919)}.topbar{max-width:980px;margin:0 auto 12px;display:flex;align-items:center;justify-content:space-between;gap:12px}.eyebrow{margin:0 0 2px;color:#a795c2;font-size:10px;font-weight:950;letter-spacing:.18em}h1{margin:0;font-size:clamp(21px,3vw,28px);letter-spacing:-.04em}.top-actions{display:flex;gap:7px}.mode,.sound{min-height:34px;padding:7px 10px;border-radius:999px;border:1px solid var(--line);background:rgba(255,255,255,.055);color:#ede6f8;font-size:11px;font-weight:850}.sound{cursor:pointer}.stage{position:relative;overflow:hidden;isolation:isolate;max-width:980px;min-height:492px;margin:0 auto;padding:25px 20px 27px;border:1px solid rgba(169,135,255,.22);border-radius:30px;background:linear-gradient(160deg,#17102b,#100b1e);box-shadow:0 24px 70px rgba(0,0,0,.34);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;text-align:center}.glow{position:absolute;z-index:-1;width:480px;height:480px;border-radius:50%;background:radial-gradient(circle,rgba(148,109,255,.17),transparent 68%);filter:blur(4px);animation:breathe 5s ease-in-out infinite}.levelbar{position:absolute;left:20px;right:20px;top:18px;display:flex;justify-content:space-between;gap:10px;color:#bba9d4;font-size:11px;font-weight:850}.levelbar span{padding:6px 9px;border-radius:999px;background:rgba(169,135,255,.1);border:1px solid rgba(169,135,255,.17)}.copy{max-width:690px}.state{margin:0 0 6px;color:#b79cff;font-size:11px;font-weight:950;letter-spacing:.15em}.copy h2{margin:0;font-size:clamp(28px,4.8vw,44px);letter-spacing:-.055em;line-height:1.12;word-break:keep-all}.copy p:last-child{margin:10px auto 0;max-width:610px;color:var(--muted);font-size:13px;line-height:1.62;word-break:keep-all}.number-card{width:min(780px,100%);padding:18px 17px 12px;border:1px solid rgba(169,135,255,.2);border-radius:22px;background:rgba(7,5,16,.48);box-shadow:inset 0 0 40px rgba(169,135,255,.04)}.digits{display:flex;justify-content:center;flex-wrap:wrap;gap:7px;min-height:72px}.digit{min-width:48px;height:62px;padding:0 11px;border:1px solid rgba(255,255,255,.12);border-radius:13px;background:linear-gradient(160deg,rgba(169,135,255,.23),rgba(255,125,209,.08));display:grid;place-items:center;font-size:35px;font-weight:950;box-shadow:0 8px 25px rgba(37,19,78,.25);animation:flip .34s cubic-bezier(.2,.8,.2,1) both}.digit:nth-child(3n+2){animation-delay:.04s}.digit:nth-child(3n){animation-delay:.08s}.time{height:5px;margin-top:12px;border-radius:999px;background:#231838;overflow:hidden}.time i{display:block;width:100%;height:100%;transform-origin:left;background:linear-gradient(90deg,var(--violet),var(--pink),var(--cyan));box-shadow:0 0 16px rgba(169,135,255,.4)}.answer{display:grid;grid-template-columns:1fr auto;gap:9px;width:min(560px,100%);text-align:left}.answer label{grid-column:1/-1;color:#a999bf;font-size:11px;font-weight:850}.answer input{min-width:0;height:54px;padding:10px 14px;border:1px solid rgba(169,135,255,.28);border-radius:14px;background:#0b0716;color:#fff;font-size:23px;font-weight:850;letter-spacing:.05em;outline:none}.answer input:focus{border-color:#a987ff;box-shadow:0 0 0 3px rgba(169,135,255,.14)}.answer button,.action{min-height:52px;padding:11px 24px;border:0;border-radius:15px;background:linear-gradient(135deg,#a987ff,#ff7dd1);color:#160a22;font-weight:950;cursor:pointer}.wrong{display:grid;grid-template-columns:1fr 1fr;gap:9px;width:min(600px,100%)}.wrong>div{min-width:0;padding:11px;border:1px solid rgba(255,255,255,.1);border-radius:14px;background:rgba(6,4,13,.4)}.wrong span{display:block;color:#9c8cac;font-size:10px}.wrong strong{display:block;margin-top:4px;overflow-wrap:anywhere;font-size:16px}.hint{margin:-4px 0 0;color:#806e96;font-size:11px}.summary{max-width:980px;margin:12px auto 0;display:grid;grid-template-columns:170px 150px 1fr;gap:10px}.summary article{min-height:90px;padding:15px;border:1px solid var(--line);border-radius:18px;background:rgba(9,6,18,.78)}.summary article>span,.progress>div:first-child span{color:#a392bb;font-size:11px;font-weight:850}.summary article>strong{display:block;margin-top:9px;font-size:20px}.progress>div:first-child{display:flex;justify-content:space-between;gap:8px}.progress small{color:#806c99}.steps{display:grid;grid-template-columns:repeat(6,1fr);gap:6px;margin-top:14px}.steps i{height:9px;border-radius:999px;background:#241938}.steps i.on{background:linear-gradient(90deg,#a987ff,#ff7dd1);box-shadow:0 0 14px rgba(202,114,230,.3)}.confetti{position:absolute;inset:0;pointer-events:none}.confetti i{position:absolute;width:7px;height:12px;border-radius:2px;background:hsl(var(--h) 90% 68%);animation:confetti .75s ease-out forwards}.state-wrong{border-color:rgba(255,113,142,.38)}.state-correct{border-color:rgba(111,240,181,.38)}@keyframes breathe{50%{transform:scale(1.15);opacity:.72}}@keyframes flip{from{transform:translateY(10px) rotateX(55deg);opacity:0}to{transform:none;opacity:1}}@keyframes confetti{to{transform:translate(var(--x),var(--y)) rotate(260deg);opacity:0}}@media(max-width:700px){.game{padding:11px}.stage{min-height:510px;padding:52px 15px 24px;border-radius:24px}.copy h2{font-size:33px}.digit{min-width:40px;height:54px;font-size:30px}.summary{grid-template-columns:1fr 1fr}.progress{grid-column:1/-1}.top-actions{gap:5px}.mode,.sound{padding:6px 8px}}@media(max-width:390px){.game{padding:9px}.stage{min-height:505px}.copy h2{font-size:29px}.copy p:last-child{font-size:12px}.digit{min-width:34px;height:48px;padding:0 8px;font-size:26px}.answer{grid-template-columns:1fr}.answer label{grid-column:auto}.answer button{min-height:48px}.summary article{padding:12px;min-height:80px}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}


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