:root{--sky-top:#050817;--sky-mid:#0b1433;--sky-bottom:#1a2452;--fg:#e6ebff;--muted:#9aa5cf;--panel:#0c1434b8;--panel-border:#96aaff38;--star-dim:#8090c0;--star-lit:#f4f6ff;--star-start:#ffe08a;--star-current:#fff;--line:#bcd0ff;--line-glow:#8caaff59;--accent:#ffd36b;--accent-fg:#1a1530;--gap:clamp(2px, .8vw, 4px);--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;color:var(--fg);background:var(--sky-top);-webkit-text-size-adjust:100%;font-family:system-ui,-apple-system,Hiragino Sans,Hiragino Kaku Gothic ProN,Noto Sans JP,sans-serif}*{box-sizing:border-box}html,body{min-height:100%;margin:0}body{min-height:100dvh;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);background:radial-gradient(1px 1px at 12% 18%, #ffffff73, transparent 60%), radial-gradient(1px 1px at 78% 9%, #ffffff59, transparent 60%), radial-gradient(1px 1px at 91% 36%, #ffffff4d, transparent 60%), radial-gradient(1px 1px at 6% 62%, #ffffff4d, transparent 60%), radial-gradient(1px 1px at 34% 88%, #ffffff59, transparent 60%), radial-gradient(1px 1px at 66% 74%, #ffffff40, transparent 60%), radial-gradient(1.5px 1.5px at 52% 4%, #c8d7ff66, transparent 60%), radial-gradient(1.5px 1.5px at 96% 92%, #c8d7ff59, transparent 60%), linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 55%, var(--sky-bottom) 100%);background-attachment:fixed}#app{flex-direction:column;gap:10px;max-width:560px;margin:0 auto;padding:12px 12px 20px;display:flex}.app-header{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;display:flex}.app-title{letter-spacing:.1em;color:var(--star-lit);text-shadow:0 0 10px #b4c8ff99;margin:0;font-size:1.4rem}.level-nav{align-items:center;gap:6px;display:flex}.level-label{text-align:center;font-variant-numeric:tabular-nums;min-width:7.5em;font-weight:600}.app-main{flex-direction:column;align-items:center;gap:12px;display:flex}.status{color:var(--muted);font-variant-numeric:tabular-nums;margin:0}.status.cleared{color:var(--accent);text-shadow:0 0 10px #ffd36b99;font-weight:700}.board-wrap{justify-content:center;width:100%;display:flex}.board{--cols:4;--rows:3;width:min(100%, max(200px, calc((100vh - 230px) * var(--cols) / var(--rows))));width:min(100%, max(200px, calc((100dvh - 230px) * var(--cols) / var(--rows))));aspect-ratio:var(--cols) / var(--rows);box-shadow:0 0 0 1px var(--panel-border), 0 8px 30px #00000073;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;cursor:pointer;background:radial-gradient(at 50% 40%,#121c46 0%,#080d26 100%);border-radius:16px;position:relative}.board.locked{cursor:default}.cells{grid-template-columns:repeat(var(--cols), 1fr);grid-template-rows:repeat(var(--rows), 1fr);gap:var(--gap);display:grid;position:absolute;inset:0}.cell{justify-content:center;align-items:center;display:flex;position:relative}.cell.wall{background:0 0}.star{aspect-ratio:1;background:var(--star-dim);opacity:.75;border-radius:50%;width:18%;transition:width .15s ease-out,background-color .15s,box-shadow .15s,opacity .15s;box-shadow:0 0 4px 1px #8090c059}.cell.visited .star{background:var(--star-lit);opacity:1;width:28%;box-shadow:0 0 6px 2px #dce6ffbf,0 0 16px 4px #8caaff66}.cell.start .star{background:var(--star-start);opacity:1;width:30%;box-shadow:0 0 0 .25em #080d26, 0 0 0 calc(.25em + 2px) var(--star-start), 0 0 14px 4px #ffe08a73}.start-label{color:var(--star-start);opacity:.85;pointer-events:none;font-size:clamp(.6rem,2.6vw,.85rem);font-weight:700;line-height:1;position:absolute;top:6%;left:8%}.cell.current .star{background:var(--star-current);opacity:1;width:38%;animation:1.8s ease-in-out infinite twinkle;box-shadow:0 0 8px 3px #ffffffe6,0 0 24px 8px #aac3ff8c}.cell.start.current .star{box-shadow:0 0 0 .25em #080d26, 0 0 0 calc(.25em + 2px) var(--star-start), 0 0 24px 8px #fff0be99}@keyframes twinkle{50%{filter:brightness(1.25);transform:scale(1.08)}}.board.locked .cell.visited .star{animation:.6s ease-out both constellation-flash;animation-delay:calc(var(--order,0) * 45ms);background:#fff6d8;box-shadow:0 0 8px 3px #ffecaad9,0 0 22px 6px #ffd36b73}.board.locked .path-line{stroke:#ffe9a8}.board.locked .path-glow{stroke:#ffd36b66}.board.locked .path-head{display:none}@keyframes constellation-flash{40%{filter:brightness(1.6);transform:scale(1.6)}}.path-layer{pointer-events:none;width:100%;height:100%;position:absolute;inset:0;overflow:visible}.path-glow,.path-line{fill:none;stroke-linecap:round;stroke-linejoin:round;transition:stroke .4s}.path-glow{stroke:var(--line-glow);stroke-width:.2px}.path-line{stroke:var(--line);stroke-width:.05px}.path-head{fill:#aac3ff29}.controls{justify-content:center;gap:12px;width:100%;display:flex}.btn{font:inherit;min-height:44px;color:var(--fg);cursor:pointer;touch-action:manipulation;background:#141e48bf;border:1.5px solid #aabeff8c;border-radius:999px;padding:8px 18px;font-weight:600;transition:background-color .15s,box-shadow .15s}.btn:not(:disabled):active{background:#283878e6}.btn:focus-visible,.level-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.btn:disabled{opacity:.35;cursor:default}.btn-small{min-height:36px;padding:4px 12px;font-size:.9rem}.btn-primary{background:var(--accent);border-color:var(--accent);color:var(--accent-fg);box-shadow:0 0 14px #ffd36b73}.btn-primary:not(:disabled):active{background:#ffe08a}.btn-link{color:var(--muted);background:0 0;border-color:#0000;text-decoration:underline}.btn-link:not(:disabled):active{color:var(--fg);background:0 0}.controls .btn{flex:1;max-width:180px}.modal{z-index:10;background:#02041099;justify-content:center;align-items:center;padding:24px;display:flex;position:fixed;inset:0}.modal[hidden]{display:none}.modal-body{border:1px solid var(--panel-border);text-align:center;background:linear-gradient(#17224f 0%,#0c1333 100%);border-radius:16px;flex-direction:column;gap:10px;width:min(100%,320px);padding:28px 20px 16px;animation:.25s ease-out pop;display:flex;position:relative;box-shadow:0 0 40px #7896ff40}.modal-body:before{content:"";filter:drop-shadow(0 0 4px #ffd36bcc);background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 24'%3E%3Cpolyline points='6,18 36,6 66,16' fill='none' stroke='%23ffe9a8' stroke-width='1.5' stroke-linecap='round'/%3E%3Ccircle cx='6' cy='18' r='3' fill='%23ffd36b'/%3E%3Ccircle cx='36' cy='6' r='4' fill='%23fff6d8'/%3E%3Ccircle cx='66' cy='16' r='3' fill='%23ffd36b'/%3E%3C/svg%3E") 50%/contain no-repeat;width:72px;height:24px;margin:0 auto 2px;display:block}.modal-title{color:var(--accent);text-shadow:0 0 12px #ffd36b8c;margin:0;font-size:1.5rem}.modal-msg{color:var(--fg);margin:0 0 6px}.modal-body .btn[hidden]{display:none}@keyframes pop{0%{opacity:0;transform:scale(.9)}}@media (prefers-reduced-motion:reduce){.modal-body,.cell.current .star,.board.locked .cell.visited .star{animation:none}.star,.btn,.path-glow,.path-line{transition:none}}[hidden]{display:none!important}.level-select{flex-direction:column;gap:10px;display:flex}.select-head{justify-content:space-between;align-items:center;gap:8px;display:flex}.select-title{margin:0;font-size:1.2rem}.select-summary{color:var(--muted);font-variant-numeric:tabular-nums;margin:0}.level-grid{grid-template-columns:repeat(5,1fr);gap:8px;margin:0;padding:0;list-style:none;display:grid}.level-btn{aspect-ratio:1;width:100%;font:inherit;font-variant-numeric:tabular-nums;color:var(--fg);cursor:pointer;touch-action:manipulation;background:#141e48bf;border:1.5px solid #aabeff8c;border-radius:50%;font-size:1rem;font-weight:700}.level-btn.cleared{border-color:var(--accent);color:var(--accent);background:radial-gradient(circle,#ffe08a59 0%,#1e2450d9 75%);box-shadow:0 0 10px #ffd36b59}.level-btn.locked{color:#9aa5cf8c;cursor:default;background:#0a0e2499;border-style:dashed;border-color:#8291c84d;font-size:.85rem}.level-btn.current{box-shadow:0 0 0 3px var(--sky-top), 0 0 0 5px var(--star-lit)}
