:root{--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px);--safe-left:env(safe-area-inset-left,0px);--safe-right:env(safe-area-inset-right,0px);--navbar:48px;--bg:#12324a;--bg-deep:#0b2233;--text:#fff;--muted:#a9c0d1;--accent:#ffc83d;--danger:#ff6b5e;--ink:#1b2b38;--primary:var(--accent);--on-primary:var(--ink);--surface:#ffffff1f;--surface-strong:#ffffff38;--surface-weak:#ffffff14;--line:#ffffff14;--track:#ffffff26;--switch-off:#ffffff40;--body:#ffffffdb;--overlay:#050c14db;--card:#fff;--card-muted:#4b5b68;--card-button:#e8edf1;--toast-bg:#000000bf;--toast-text:#fff;word-break:keep-all;overflow-wrap:anywhere;color:var(--text);background:var(--bg-deep);font-family:system-ui,-apple-system,Apple SD Gothic Neo,Noto Sans KR,sans-serif}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{overscroll-behavior:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:manipulation;height:100%;margin:0;overflow:hidden}#app{height:100%;padding:calc(var(--safe-top) + var(--navbar)) calc(var(--safe-right) + 12px) calc(var(--safe-bottom) + 12px) calc(var(--safe-left) + 12px);background:linear-gradient(var(--bg), var(--bg-deep));flex-direction:column;display:flex}button{font:inherit;color:inherit;cursor:pointer;border:0}.screen{flex-direction:column;flex:1;gap:12px;min-height:0;display:flex}.screen[hidden]{display:none}#title{text-align:center;justify-content:center;align-items:center;gap:20px}.brand img{border-radius:28px;width:112px;height:112px;box-shadow:0 8px 24px #0000004d}.brand img.hero{aspect-ratio:1;object-fit:contain;width:min(56vw,220px,26vh);height:auto;box-shadow:none;border-radius:0}.brand h1{letter-spacing:.02em;margin:16px 0 4px;font-size:34px}.brand p,#best{color:var(--muted);margin:0}#best{min-height:1.5em;color:var(--accent);font-weight:700}.menu{flex-direction:column;gap:10px;width:min(100%,300px);display:flex}.menu button{background:var(--surface);border-radius:14px;min-height:52px;font-size:17px;font-weight:700}.menu button.primary{background:var(--primary);color:var(--on-primary)}.menu button[hidden]{display:none}.notice{color:var(--muted);flex-direction:column;align-items:center;gap:8px;font-size:12px;display:flex}.notice p{margin:0}#rating{color:#3ecf6e;border:1.5px solid #3ecf6e;border-radius:999px;padding:2px 10px;font-weight:700}#page header{align-items:center;gap:4px;display:flex}#page h2{margin:0;font-size:20px}#back{background:0 0;width:44px;height:44px;margin-left:-8px;font-size:32px;line-height:1}#page .body{overscroll-behavior:contain;-webkit-user-select:text;user-select:text;min-height:0;color:var(--body);flex:1;font-size:15px;line-height:1.65;overflow-y:auto}#page .body h3{color:var(--text);margin:24px 0 4px;font-size:16px}#page .body p{margin:0 0 8px}#page .body ul{margin:0 0 8px;padding-left:20px}#page .body .small{color:var(--muted);font-size:12px}.group{background:var(--surface-weak);border-radius:14px;margin-bottom:16px;overflow:hidden}.item{text-align:left;width:100%;min-height:52px;color:var(--text);background:0 0;justify-content:space-between;align-items:center;gap:12px;padding:0 16px;font-size:16px;display:flex}.item+.item{border-top:1px solid var(--line)}.item span{color:var(--muted);text-align:right;font-size:14px}.item.link:after{content:"›";color:var(--muted);font-size:22px}.switch{background:var(--switch-off);border-radius:14px;flex:none;width:48px;height:28px;transition:background .15s;position:relative}.switch:after{content:"";background:#fff;border-radius:50%;width:22px;height:22px;transition:transform .15s;position:absolute;top:3px;left:3px}[aria-checked=true] .switch{background:var(--primary)}[aria-checked=true] .switch:after{transform:translate(20px)}#page .body h3.chapter:first-child{margin-top:0}#page .body h3.chapter{margin-bottom:8px}#page .body .chapter-note{color:var(--muted);font-size:13px}.levels{grid-template-columns:repeat(2,1fr);gap:10px;padding-bottom:8px;display:grid}.level{background:var(--surface-weak);min-height:96px;box-shadow:inset 0 0 0 1px var(--line);text-align:left;font-variant-numeric:tabular-nums;color:var(--text);border-radius:14px;flex-direction:column;align-items:flex-start;gap:2px;padding:12px 14px;line-height:1.4;display:flex}.level b{font-size:17px}.level span{color:var(--muted);font-size:13px}.level .rec{color:var(--accent);margin-top:auto;font-weight:600}.level.next{box-shadow:inset 0 0 0 2px var(--primary)}.level:disabled{opacity:.45;cursor:default}.level:disabled .rec{color:var(--muted);font-weight:400}#hud .row{font-variant-numeric:tabular-nums;justify-content:space-between;align-items:baseline;gap:12px;font-weight:700;display:flex}#hud .row>:first-child{font-size:18px}#hud .row>:last-child{color:var(--accent);font-size:16px}#timebar{background:var(--track);border-radius:4px;height:8px;margin-top:8px;overflow:hidden}#timebar i{background:var(--accent);transform-origin:0;border-radius:4px;width:100%;height:100%;display:block}#tools{grid-auto-columns:1fr;grid-auto-flow:column;gap:8px;display:grid}#tools button{background:var(--surface);border-radius:12px;min-height:48px;font-size:15px;font-weight:600}#tools button:disabled{opacity:.4}#tools button:active:not(:disabled){background:var(--surface-strong)}#toast{left:50%;bottom:calc(var(--safe-bottom) + 84px);background:var(--toast-bg);max-width:calc(100% - 32px);color:var(--toast-text);text-align:center;z-index:20;border-radius:20px;padding:10px 16px;font-size:14px;position:fixed;transform:translate(-50%)}#modal{background:var(--overlay);z-index:30;place-items:center;padding:24px;display:grid;position:fixed;inset:0}#modal[hidden],#toast[hidden]{display:none}#modal .card{background:var(--card);width:min(100%,340px);color:var(--ink);text-align:center;border-radius:20px;padding:28px 20px 20px;animation:.24s ease-out rise}@keyframes rise{0%{opacity:0;transform:translateY(8px)}}#modal .face{object-fit:contain;width:104px;height:104px;margin:-84px auto 4px;display:block}#modal .face[hidden]{display:none}#modal h2{margin:0 0 8px;font-size:22px}#modal p{color:var(--card-muted);white-space:pre-line;margin:0 0 20px;font-size:15px;line-height:1.5}#modal .actions{gap:8px;display:flex}#modal .actions.col{flex-direction:column}#modal .actions button{background:var(--card-button);min-height:50px;color:var(--ink);border-radius:12px;flex:1;padding:0 8px;font-size:16px;font-weight:700}#modal .actions button.primary{background:var(--primary);color:var(--on-primary)}@media (height<=760px){#title{gap:12px}.brand h1{margin-top:8px}}@media (prefers-reduced-motion:reduce){.switch,.switch:after{transition:none}#modal .card{animation:none}}:root{--bg:#12324a;--bg-deep:#0b2233;--text:#f6f0e4;--muted:#b9c4c9;--accent:#f2c46b;--ink:#1e2a33;--primary:#f2c46b;--on-primary:#1e2a33;--surface:#0b2233bd;--surface-strong:#0b2233e6;--surface-weak:#f6f0e412;--line:#f6f0e41a;--track:#f6f0e42e;--switch-off:#f6f0e447;--body:#f6f0e4db;--overlay:#0b2233e0;--card:#f6f0e4;--card-muted:#55606a;--card-button:#e7decb;--toast-bg:#1e2a33eb;--toast-text:#f6f0e4}#modal{--primary:#12324a;--on-primary:#fff}#app{isolation:isolate;background:var(--bg-deep) url(./bg-DLqlOka2.webp) center / cover no-repeat;position:relative}#app:before{content:"";z-index:-1;opacity:var(--dawn,0);background:url(./bg-sunrise-DmtmBxgH.webp) 50%/cover no-repeat;transition:opacity 2.4s;position:absolute;inset:0}.brand p{max-width:250px;margin:0 auto;line-height:1.45}.brand,#best,#hud{text-shadow:0 1px 6px var(--bg-deep)}.menu button,#tools button{box-shadow:inset 0 0 0 1px var(--line)}.menu button.primary{box-shadow:none}.notice{background:var(--surface);border-radius:14px;padding:6px 14px}#rating{color:#9ed4a0;border-color:#9ed4a0}#clock{text-align:center;font-variant-numeric:tabular-nums;color:var(--muted);margin:6px 0 0;font-size:14px;font-weight:600}#page{background:#0b2233f0;border-radius:20px;padding:12px}#boardWrap{flex:1;place-items:center;min-height:0;margin:0 -8px;display:grid}#board{isolation:isolate;display:grid;position:relative}#board:before{content:"";z-index:-1;background:#0b22338c;border-radius:14px;position:absolute;inset:-6px}#board>svg{pointer-events:none;filter:drop-shadow(0 0 3px #f2c46bb3);width:100%;height:100%;position:absolute;inset:0}#board polyline{fill:none;stroke:var(--accent);stroke-width:.09px;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;animation:.42s ease-out forwards thread}@keyframes thread{0%{stroke-dashoffset:1px}45%{stroke-dashoffset:0;opacity:1}to{stroke-dashoffset:0;opacity:0}}.tile{--face:#f6f0e4;--side:#d8ccb4;background:var(--face);box-shadow:0 3px 0 var(--side), 0 4px 6px #0b223359;border-radius:6px;place-items:center;margin:1px;padding:0;transition:transform .2s ease-out,box-shadow .2s ease-out;display:grid}.tile[data-tint=r]{--face:#f4c4ba;--side:#d49a8e}.tile[data-tint=o]{--face:#f6d2a2;--side:#d6ac78}.tile[data-tint=y]{--face:#f3e08e;--side:#d1bc62}.tile[data-tint=g]{--face:#cce4b3;--side:#9fbf86}.tile[data-tint=b]{--face:#c3daed;--side:#95b3cb}.tile[data-tint=p]{--face:#dac7ee;--side:#b39ccf}.tile[data-tint=n]{--face:#dfc3a3;--side:#b8946f}.wall{--wall:#6e7b85;background:repeating-linear-gradient(-45deg, #00000029 0 3px, transparent 3px 8px), var(--wall);border-radius:6px;margin:1px;box-shadow:inset 0 0 0 2px #00000038,inset 0 3px #0000002e}.wall[data-tint=r]{--wall:#c9786b}.wall[data-tint=o]{--wall:#c98a4f}.wall[data-tint=y]{--wall:#c7a53f}.wall[data-tint=g]{--wall:#6f9a58}.wall[data-tint=b]{--wall:#6a8fae}.wall[data-tint=p]{--wall:#8d74b3}.wall[data-tint=n]{--wall:#8a6444}.wall[data-tint=w]{--wall:#c4b8a2}.tile img{pointer-events:none;width:82%;height:82%}.tile.selected{z-index:1;box-shadow:0 0 0 2px var(--ink), 0 0 0 5px var(--accent), 0 6px 0 3px var(--side);transform:translateY(-3px)}.tile.hint{z-index:1;box-shadow:0 3px 0 var(--side), 0 0 0 4px #b5523b;animation:.4s ease-out nudge}@keyframes nudge{50%{transform:translateY(-3px)}}.tile.slid{animation:.24s ease-out slide}@keyframes slide{0%{transform:translate(var(--dx), var(--dy))}}#board.mixing .tile{animation:.36s ease-out mix}@keyframes mix{0%{transform:rotateY(90deg)scale(.85)}}@media (prefers-reduced-motion:reduce){#app:before,.tile{transition:none}#board polyline,.tile.slid,.tile.hint,#board.mixing .tile{animation:none}}
