:root{color-scheme:dark;--bg:#0d1020;--panel:#171b2e;--border:#2c3149;--muted:#a2a8c4;--text:#f1f0fb;--violet:#b69aff;--mint:#7de2c4;--cyan:#7edbea}
*{box-sizing:border-box} [hidden]{display:none!important} html{background:var(--bg);min-height:100%}body{margin:0;min-height:100vh;color:var(--text);font:14px/1.5 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;background:radial-gradient(ellipse at 36% -25%,#282447 0,transparent 60%),var(--bg);overflow-x:hidden}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:not-allowed}button,a,summary{touch-action:manipulation}button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--cyan);outline-offset:4px}button{transition:background .16s,border-color .16s,transform .16s}button:active:not(:disabled){transform:translateY(1px)}a{color:inherit}h1,h2,h3,p{margin-top:0}.ambient{position:fixed;width:450px;height:450px;border-radius:50%;filter:blur(100px);opacity:.08;pointer-events:none}.ambient-one{background:#a169ff;top:200px;left:-290px}.ambient-two{background:#44d4d9;right:-330px;top:460px}.shell{position:relative;max-width:1460px;margin:auto;padding:0 40px}.topbar{height:100px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #ffffff0c}.brand{display:flex;gap:12px;align-items:center;text-decoration:none}.brand-logo{width:43px;height:43px;background:linear-gradient(135deg,#a97cff,#7150e9);border:1px solid #b493ff;border-radius:13px;display:grid;place-items:center;font-size:29px;box-shadow:0 5px 25px #8c62fb33}.brand strong{display:block;font-size:18px;font-weight:900;letter-spacing:1.5px;line-height:1.3}.brand em{font-style:normal;color:var(--violet)}.brand small{font-size:8px;letter-spacing:3px;color:#9499b5;font-weight:700}.topright{display:flex;gap:23px;align-items:center}.save-status{font-size:9px;font-weight:650;letter-spacing:1.2px;color:var(--muted);display:flex;align-items:center;gap:8px}.save-status i{width:5px;height:5px;border-radius:50%;background:var(--mint);box-shadow:0 0 8px #7de2c455}.icon-button{width:38px;height:38px;display:grid;place-items:center;background:#1b2036;color:var(--violet);border:1px solid #363b56;border-radius:12px;font-size:21px}.icon-button:hover{background:#2b2b49}.welcome{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:43px 0 35px}.eyebrow,.section-label{display:block;font-size:10px;letter-spacing:1.7px;font-weight:750;color:var(--muted)}.eyebrow{font-size:9px;color:var(--violet)}.welcome h1{font-size:clamp(34px,3.8vw,49px);letter-spacing:-2px;line-height:1.12;margin:12px 0}.welcome h1 span{color:var(--violet)}.welcome p{color:var(--muted);margin:0;font-size:13px}.journey-tag{display:flex;gap:15px;align-items:center}.journey-tag b{font-size:12px;display:block;font-weight:600}.journey-tag small{display:block;color:#8990af;font-size:10px;margin-top:4px}.orbit-arrow{font-size:38px;color:var(--violet);width:60px;height:60px;display:grid;place-items:center;border:1px solid #44375f;border-radius:20px;transform:rotate(-8deg);background:linear-gradient(145deg,#37305155,#14182b)}.lobby-layout{display:grid;grid-template-columns:244px minmax(0,1fr) 236px;gap:22px;align-items:start}.menu-column,.stats-column{display:grid;gap:18px}.panel{background:linear-gradient(145deg,#1b1f33dd,#15192bcc);border:1px solid var(--border);border-radius:18px;box-shadow:0 12px 40px #00000014}.mode-panel,.difficulty-panel,.stats-panel,.howto{padding:21px}.panel h2.section-label{margin:0 0 19px;font-size:9px}.mode{width:100%;display:flex;align-items:center;gap:10px;border:1px solid transparent;background:transparent;color:var(--text);border-radius:11px;padding:11px 8px;text-align:left;margin:4px 0}.mode:hover{background:#ffffff06}.mode.active{background:#8864d81b;border-color:#9470e766}.mode-icon,.stat-symbol{width:36px;height:36px;display:grid;place-items:center;border-radius:10px;font-size:22px;flex-shrink:0}.purple{background:#9166ee20;color:#b99bff}.orange{background:#e8ab5a16;color:#f4c282}.cyan{background:#6bd9e518;color:#7edbea}.mode b{display:block;font-size:12px;font-weight:650}.mode small{display:block;color:var(--muted);font-size:9px;margin-top:2px}.mode-check{color:var(--violet);margin-left:auto;font-size:12px;visibility:hidden}.mode.active .mode-check{visibility:visible}.difficulty-options{display:flex;background:#0e1224;border:1px solid #2e324b;padding:4px;border-radius:11px;gap:3px}.difficulty-options button{flex:1;min-width:0;background:none;border:1px solid transparent;border-radius:7px;color:#a4aac4;font-size:11px;font-weight:650;padding:8px 2px}.difficulty-options button.selected{background:#8a60da30;border-color:#9874dd77;color:#d6c5ff}.difficulty-options button:disabled{color:#727991;background:#ffffff03}.difficulty-options button:hover:not(:disabled){background:#6e56aa35}.difficulty-options svg{width:9px;height:9px;margin-left:3px}.muted{color:var(--muted)}.small{font-size:11px}.difficulty-panel p{margin:12px 0 0;line-height:1.7;font-size:10px}.howto summary{font-size:11px;font-weight:650;cursor:pointer;display:flex;justify-content:space-between;align-items:center;list-style:none}.howto summary::-webkit-details-marker{display:none}.howto summary span{color:var(--violet)}.howto p{color:var(--muted);font-size:11px;line-height:1.8;margin:14px 0 0}.legend{display:grid;gap:6px;font-size:10px;margin-top:14px;color:var(--mint)}.legend span+span{color:#f499b7}.level-panel{padding:25px}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:8px}.section-heading .section-label{font-size:8px;letter-spacing:1.5px}.section-heading h2{font-size:24px;line-height:1.2;letter-spacing:-.7px;margin:7px 0 0}.title-dot{color:var(--violet)}.pill{border:1px solid #5e4c8366;background:#a881e90a;border-radius:30px;padding:5px 9px;font-size:9px;color:#c4b1ee;white-space:nowrap}.journey-progress{margin:24px 0 22px}.journey-progress>div:first-child{display:flex;justify-content:space-between;color:#9aa1be;font-size:10px;margin-bottom:9px}.journey-progress b{color:var(--violet);font-weight:550}.track{height:4px;background:#2a2f48;overflow:hidden;border-radius:4px}.track>span{display:block;height:100%;background:linear-gradient(90deg,#9874ee,#77dcc9);width:0;transition:width .2s}.level-toolbar{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:15px}.range-select{color:#939bb7;font-size:8px;letter-spacing:1px;display:flex;align-items:center;gap:8px}.range-select select{background:#21263b;color:#dcdded;border:1px solid #363b54;border-radius:7px;padding:6px 8px;font-size:10px;letter-spacing:0}.text-button{border:0;background:none;padding:8px 3px;color:var(--violet);font-size:11px;font-weight:600}.text-button:hover{color:#ded0ff}.level-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}.level-card{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;min-height:73px;border:1px solid #2d334b;background:#1b2034;border-radius:11px;color:#f2edff;padding:10px 3px 8px}.level-card.unlocked:hover{border-color:#a381e9;background:#382d55;transform:translateY(-2px)}.level-card.current{border-color:#a782ec;background:linear-gradient(140deg,#7956b42e,#302344);box-shadow:inset 0 0 22px #a581eb0a}.level-card.selected{box-shadow:0 0 0 1px #b897f7}.level-card.complete{border-color:#44675f;background:#1c34352b}.level-card.locked{color:#666f8c;background:#13182b;border-color:#282e44}.level-number{font-size:17px;font-weight:700;line-height:1.1;font-variant-numeric:tabular-nums}.level-card.locked .level-number{font-size:13px;font-weight:550}.card-lock{width:11px;height:11px;margin-bottom:6px;color:#69738f}.card-pips{display:flex;gap:3px;margin-top:8px;height:4px}.card-pips i{width:4px;height:4px;border-radius:50%;background:#48506d}.card-pips i.done{background:var(--mint)}.current-indicator{position:absolute;right:5px;top:3px;font-size:11px;color:var(--violet)}.level-footer{display:flex;justify-content:space-between;gap:8px;align-items:center;margin:16px 0;font-size:9px;color:#8e98b7}.level-key{display:flex;gap:5px;align-items:center}.level-key i{width:5px;height:5px;border-radius:50%;background:var(--violet)}.level-key i.key-complete{margin-left:5px;background:var(--mint)}.level-key>span{margin-left:5px;color:#8e98b7}.level-footer>span:last-child{white-space:nowrap;font-size:8px}.page-navigation{display:flex;justify-content:space-between;align-items:center;padding-top:16px;border-top:1px solid #ffffff0a;gap:7px}.page-navigation>span{font-size:9px;color:#a2a9c1}.secondary{background:#23283f;border:1px solid #383e58;border-radius:9px;padding:9px 12px;color:#d0d2e8;font-size:11px;font-weight:600}.secondary:hover:not(:disabled){background:#323550;border-color:#696180}.secondary:disabled{opacity:.38}.page-navigation .secondary{font-size:10px;padding:8px 11px}.jump-form{display:flex;align-items:center;justify-content:center;gap:9px;margin-top:15px}.jump-form label{color:#949ebc;font-size:10px}.jump-form input{width:88px;padding:7px;background:#101527;border:1px solid #333a54;border-radius:7px;color:#ddd4f5;font-size:11px}.selection-help{margin:15px 0 0;text-align:center;font-size:9px;color:#8e97b4}.stat-row{display:flex;align-items:center;gap:11px;padding:16px 0;border-bottom:1px solid #ffffff08}.stat-row:first-of-type{padding-top:2px}.stat-symbol{width:32px;height:32px;font-size:20px}.stat-row small{display:block;color:#989fbb;font-size:8px;letter-spacing:.6px}.stat-row strong{display:block;font-size:23px;font-weight:650;line-height:1.25;margin-top:4px;letter-spacing:-.6px}.stat-row strong span{color:#727b99;font-size:11px;letter-spacing:0}.stats-summary{display:flex;justify-content:space-between;gap:5px;color:#919bb9;font-size:9px;padding-top:17px}.stats-summary b{font-weight:550;color:#cbc5e6}.daily-card{position:relative;overflow:hidden;border:1px solid #8a69d46b;background:linear-gradient(140deg,#483278,#292548);border-radius:18px;padding:24px 21px}.daily-card .section-label{position:relative;color:#cbb9ed;font-size:8px;z-index:1;letter-spacing:1.2px}.daily-card h3{font-size:24px;line-height:1.2;letter-spacing:-.6px;margin:24px 0 13px;font-weight:650}.daily-art{position:absolute;font-size:145px;color:#baa0f311;right:-17px;top:13px;line-height:1}.daily-card p{color:#bcb0dc;font-size:9px}.daily-card button{position:relative;margin-top:9px;background:#d9c8fb;border:0;border-radius:9px;color:#3a235e;padding:10px 8px;font-size:10px;font-weight:700;width:100%}.daily-card button:hover{background:#ede1ff}.device-note{text-align:center;color:#858eac;font-size:9px;line-height:1.8;margin:0}.challenge-selection{padding:35px;text-align:center;min-height:505px;display:flex;flex-direction:column;align-items:center;justify-content:center}.challenge-selection>.section-label{color:var(--violet)}.challenge-art{width:min(240px,90%);margin:20px 0 6px}.challenge-art svg{width:100%;fill:none;stroke:#ba9eff;stroke-width:4;stroke-linecap:round;stroke-linejoin:round}.challenge-art path:nth-child(2){stroke:var(--cyan)}.challenge-art path:nth-child(3){stroke:#f59dc9}.challenge-selection h2{font-size:29px;letter-spacing:-1px;margin:14px 0 12px}.challenge-selection p{color:var(--muted);font-size:12px;max-width:310px;line-height:1.8}.challenge-meta{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin:3px 0 24px;font-size:11px;color:var(--cyan)}.primary{display:inline-flex;justify-content:center;align-items:center;gap:15px;background:linear-gradient(115deg,#aa7df5,#7950dd);color:white;border:1px solid #b593f88c;border-radius:11px;padding:12px 24px;box-shadow:0 6px 22px #7552b522;font-size:13px;font-weight:750;min-height:44px}.primary:hover{background:linear-gradient(115deg,#b994fa,#8d68e4);box-shadow:0 5px 25px #9d79d733}.challenge-selection .small{font-size:10px;margin:18px 0 0}footer{display:flex;justify-content:space-between;gap:10px;border-top:1px solid #ffffff09;margin-top:40px;padding:22px 0 25px;font-size:9px;color:#77819e}
/* The board is a separate view; its engine and bend-following SVG animation are retained. */
.game-view{max-width:700px;margin:26px auto 0}.game-nav{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:15px}.game-nav>span{font-size:9px;letter-spacing:1px}.gamepanel{padding:26px;border-radius:20px;border:1px solid var(--border);background:linear-gradient(145deg,#1b2035,#14192b)}.gamebar{display:flex;justify-content:space-between;align-items:center;gap:10px}.gamebar h1{font-size:28px;letter-spacing:-.8px;margin:5px 0 13px;font-weight:700}.gamebar .section-label{color:var(--violet);font-size:9px}.hearts{color:#fa8aac;font-size:23px;letter-spacing:1px;white-space:nowrap}.shape-info{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:11px;color:var(--muted)}#difficultyLabel{color:var(--cyan)}.stagebar{display:flex;gap:8px;margin:13px 0 8px}.stage{flex:1;padding:7px 3px;text-align:center;border:1px solid #393f5b;border-radius:8px;font-size:10px;color:#989fb9;background:#21263c}.stage.completed{background:#264d402f;border-color:#41675a;color:var(--mint)}.stage.current{background:#7655b04d;border-color:#af8de9;color:#e8d7ff}.stage.locked{color:#737d9c}.stage-note{font-size:10px;color:#969fbd;margin:0 0 16px}.scoreline{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:16px}.scoreline>div{border:1px solid #2b314a;background:#101627;border-radius:9px;padding:9px 12px}.scoreline small{display:block;color:#919bb9;font-size:8px;letter-spacing:1px}.scoreline strong{font-size:20px;font-weight:650;font-variant-numeric:tabular-nums}.boardwrap{position:relative;display:flex;align-items:center;justify-content:center;min-height:260px;overflow:hidden;padding:8px;border-radius:14px;border:1px solid #353655;background:radial-gradient(circle at 50% 35%,#25254b,#11172a 75%)}.board{display:block;width:100%;max-width:560px;aspect-ratio:1;overflow:hidden;touch-action:manipulation}.maze-arrow{cursor:pointer;outline:0;--stroke:#c2afff}.maze-arrow.pink{--stroke:#ff85c1}.maze-arrow.cyan{--stroke:#72ddec}.arrow-line,.arrow-tip{fill:none;stroke:var(--stroke);stroke-width:.133;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}.arrow-tip{stroke-width:.138}.arrow-hit{stroke:transparent;stroke-width:.7;fill:none;stroke-linecap:round;stroke-linejoin:round;pointer-events:stroke;cursor:pointer}.maze-arrow:hover .arrow-line,.maze-arrow:focus-visible .arrow-line{stroke:#f5e9ff;stroke-width:.18}.maze-arrow:hover .arrow-tip,.maze-arrow:focus-visible .arrow-tip{stroke:#f5e9ff}.maze-arrow:focus-visible{filter:drop-shadow(0 0 .15px #f5e9ff)}.maze-arrow.hinted .arrow-line,.maze-arrow.hinted .arrow-tip{stroke:#81fac1;stroke-width:.20;filter:drop-shadow(0 0 .15px #75ffc4)}.maze-arrow.blocked .arrow-line,.maze-arrow.blocked .arrow-tip{stroke:#ff607e;filter:drop-shadow(0 0 .15px #ff607e)}.maze-arrow.sliding{pointer-events:none;opacity:1!important;transition:none!important}.maze-arrow.sliding .arrow-hit{pointer-events:none}.impact-ring{pointer-events:none;fill:none;stroke:#ff85c1;stroke-width:.15;opacity:0;animation:arrow-impact .36s ease-out forwards}@keyframes arrow-impact{0%{opacity:1;stroke-width:.15}100%{opacity:0;stroke-width:.025;r:.58}}.boardstate{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:22px;text-align:center;background:#101426f2;backdrop-filter:blur(8px)}.resulticon{font-size:42px}.boardstate h2{font-size:26px;margin:6px 0 0}.boardstate p{color:#afb6d1;max-width:300px;font-size:12px;margin:12px 0}.resultpoints{font-size:26px;font-weight:750;color:var(--mint);margin:4px 0 20px}.boardstate .text-button{margin-top:10px}.progress{display:flex;justify-content:space-between;gap:8px;color:#939ebc;font-size:10px;margin:13px 0 8px}.gameactions{display:flex;gap:10px;margin-top:19px}.gameactions button{font-size:11px;padding:11px 12px}.gameactions .share{flex:1;background:#c2a5f5;border:0;border-radius:9px;color:#2b1748;font-weight:700}.share:hover{background:#dbc7fa}.board-progress{height:5px}
/* Native dialog gives keyboard focus management, Escape, and an inert background. */
.play-dialog{position:fixed;width:min(420px,calc(100% - 30px));max-height:calc(100dvh - 36px);overflow:auto;margin:auto;padding:33px 30px 23px;border:1px solid #61537e;border-radius:22px;background:radial-gradient(ellipse at 50% 0,#373054,#171c30 70%);color:var(--text);text-align:center;box-shadow:0 30px 100px #0009}.play-dialog::backdrop{background:#060a18bf;backdrop-filter:blur(6px)}.dialog-close{position:absolute;right:13px;top:13px;background:transparent;border:0;width:30px;height:30px;color:#a9a1bb}.play-dialog>.section-label{font-size:9px;color:var(--violet)}.preview-mark{margin:23px auto 17px;width:66px;height:66px;border-radius:19px;border:1px solid #9f7cda88;background:#a77fe92a;display:grid;place-items:center;font-size:42px;color:#ceb6fa}.play-dialog h2{font-size:31px;line-height:1.15;letter-spacing:-1px;margin:0 0 11px}.play-dialog .muted{font-size:12px;margin-bottom:21px}.preview-note{color:#a9a4bf;font-size:10px;margin:12px 0 19px;min-height:30px}.preview-stats{display:grid;grid-template-columns:repeat(3,1fr);border:1px solid #34384e;background:#0e152333;border-radius:11px;padding:12px 5px;margin-bottom:22px}.preview-stats>div+div{border-left:1px solid #34384e}.preview-stats small{display:block;color:#9198b2;font-size:8px;letter-spacing:1px}.preview-stats b{font-weight:650;font-size:15px;display:block;margin-top:5px;color:#e4d5fa}.preview-stats>div:first-child b{color:#f998b6}.preview-stats>div:last-child b{color:var(--mint);font-size:12px}.play-button{width:100%;justify-content:space-between;padding:12px 20px}.play-dialog>.text-button{margin-top:9px}.toast{position:fixed;z-index:20;bottom:20px;left:50%;transform:translate(-50%,25px);opacity:0;pointer-events:none;padding:11px 18px;background:#e6dafa;color:#342147;border-radius:11px;font-size:12px;max-width:90vw;box-shadow:0 10px 30px #0004;transition:.2s;text-align:center}.toast.show{opacity:1;transform:translate(-50%,0)}
@media(min-width:1550px){.shell{max-width:1460px}.level-card{min-height:80px}}
@media(max-width:1190px){.shell{padding:0 25px}.lobby-layout{grid-template-columns:220px minmax(0,1fr);gap:18px}.stats-column{grid-column:1/-1;grid-template-columns:1.6fr 1fr;align-items:start}.stats-panel{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.stats-panel h2{grid-column:1/-1;margin-bottom:0!important}.stat-row{display:block;padding:5px 0!important;border:0}.stat-row small{margin-top:9px}.stats-summary{grid-column:1/-1;border-top:1px solid #ffffff0a;padding-top:13px}.daily-card{padding:21px}.daily-card h3{margin:15px 0 9px;font-size:22px}.daily-card h3 br{display:none}.daily-card p{margin-bottom:5px}.daily-card button{margin-top:5px}.device-note{grid-column:1/-1}.welcome{padding:34px 0 28px}}
@media(max-width:720px){.shell{padding:0 16px}.topbar{height:76px}.brand strong{font-size:16px}.brand-logo{width:37px;height:37px;border-radius:11px;font-size:26px}.brand small{font-size:7px;letter-spacing:2.5px}.topright{gap:8px}.save-status{font-size:0;gap:0}.save-status i{width:6px;height:6px}.welcome{padding:29px 0 25px}.welcome h1{font-size:37px;letter-spacing:-1.6px}.welcome p{font-size:11px;max-width:250px;line-height:1.7}.eyebrow{font-size:8px;letter-spacing:1.3px}.journey-tag{display:none}.lobby-layout{grid-template-columns:minmax(0,1fr);gap:16px}.menu-column{gap:12px}.mode-panel{padding:16px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.mode-panel h2{grid-column:1/-1;margin-bottom:5px!important}.mode{display:flex;flex-direction:column;text-align:center;padding:10px 2px;gap:6px;margin:0}.mode b{font-size:10px}.mode small{font-size:8px;max-width:90px}.mode-check{display:none}.mode-icon{width:31px;height:31px;font-size:21px}.difficulty-panel{display:grid;grid-template-columns:auto 1fr;align-items:center;column-gap:19px;padding:14px 16px}.difficulty-panel h2{margin:0!important}.difficulty-panel p{grid-column:1/-1;margin-top:9px;font-size:9px}.difficulty-options button{font-size:10px;padding:7px 2px}.howto{padding:13px 16px}.level-panel{padding:20px 16px}.section-heading h2{font-size:24px}.journey-progress{margin:20px 0}.level-grid{gap:8px}.level-card{min-height:67px;border-radius:9px;padding:9px 2px}.level-number{font-size:16px}.level-card.locked .level-number{font-size:12px}.level-footer{font-size:8px}.pill{font-size:8px}.stats-column{grid-template-columns:minmax(0,1fr);gap:16px}.stats-panel{padding:20px 16px;gap:9px}.stat-row strong{font-size:21px}.stat-row small{font-size:7px}.daily-card{padding:21px}.daily-card h3{font-size:25px}.daily-card h3 br{display:block}.daily-art{font-size:180px;top:-10px;right:7px}.daily-card p{font-size:10px}.daily-card button{margin-top:14px;padding:12px;font-size:11px}.device-note{font-size:9px}.challenge-selection{padding:30px 20px;min-height:480px}.challenge-selection h2{font-size:28px}.game-view{margin-top:18px}.gamepanel{padding:15px}.gamebar h1{font-size:23px}.hearts{font-size:18px;letter-spacing:0}.shape-info{font-size:10px}.boardwrap{padding:3px;min-height:235px}.game-nav>span{display:none}.scoreline>div{padding:8px}.scoreline small{font-size:7px;letter-spacing:.4px}.scoreline strong{font-size:18px}.gameactions{gap:7px}.gameactions button{font-size:10px;padding:11px 8px}.progress{font-size:9px}.gamebar .section-label{font-size:8px}footer{margin-top:29px;flex-direction:column;text-align:center;gap:6px;padding:22px 0}.play-dialog{padding:32px 22px 20px}.play-dialog .difficulty-options button{padding:9px 2px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
/* Keep small control icons aligned at every width. */
.difficulty-options button{white-space:nowrap}.difficulty-options .card-lock,.stage .card-lock{display:inline-block;width:8px;height:9px;margin:0 0 0 3px;vertical-align:-1px}.icon-button svg{width:18px;height:18px}#levelLabel{outline:none}.level-key>svg{margin-left:5px}

/* v9: a readable silhouette guide and scrollable 1x–3x board zoom for dense puzzles. */
.boardwrap{display:block;min-height:0}.board-viewport{width:100%;aspect-ratio:1;overflow:auto;overscroll-behavior:contain;touch-action:pan-x pan-y;scrollbar-width:thin;scrollbar-color:#766399 #171c31}.board-viewport .board{display:block;max-width:none;width:100%;height:auto;aspect-ratio:1;flex-shrink:0}.board-viewport:focus-visible{outline:1px solid #7edbea;outline-offset:2px}.shape-silhouette{fill:#bc9bff;fill-opacity:.055;stroke:#b89ae8;stroke-opacity:.20;stroke-width:.045;pointer-events:none}.arrow-line,.arrow-tip{stroke-width:.16}.arrow-hit{stroke-width:.8}.board-tools{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:1px 0 9px}.board-tools>span{color:#959fbc;font-size:10px}.zoom-controls{display:flex;gap:4px;align-items:center}.zoom-controls>.secondary{width:32px;height:30px;padding:0;font-size:17px}.zoom-controls .text-button{min-width:46px;font-size:10px}.zoom-controls>.secondary:disabled{opacity:.4}.boardstate{z-index:3}

.hint-shop{margin-top:16px;display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap}.hint-shop span{font-size:11px;color:#b5bcd5}.hint-shop button{font-size:10px;padding:8px 10px}

/* Full-screen play area. Menu and store retain their normal scrolling. */
.shop-panel,.session-panel{padding:20px}.shop-panel .section-label,.session-panel .section-label{margin:0 0 12px}.shop-panel .hint-shop{margin:0;justify-content:flex-start}.session-panel p{color:var(--muted);font-size:11px}.session-actions{display:flex;flex-wrap:wrap;gap:8px}.session-actions .primary{font-size:11px;padding:8px 12px;min-height:38px}
body.playing{height:100vh;height:100dvh;overflow:hidden}body.playing .ambient,body.playing .topbar,body.playing footer{display:none}body.playing .shell{padding:0;max-width:none;height:100%;overflow:hidden}body.playing main{height:100%;overflow:hidden}.playing .game-view{height:100%;max-width:none;margin:0;display:flex;flex-direction:column;padding:max(4px,env(safe-area-inset-top)) max(4px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-left));gap:4px}.playing .game-nav{flex:0 0 auto;margin:0;min-height:38px}.game-timer{display:flex;align-items:center;gap:8px;color:var(--text);padding:0 10px}.game-timer small{font-size:9px;letter-spacing:1px;color:var(--muted)}.game-timer strong{font-size:17px;font-variant-numeric:tabular-nums}.playing .gamepanel{padding:0;border:0;background:none;min-height:0;flex:1;display:flex;flex-direction:column;gap:4px}.playing .gamebar,.playing .shape-info,.playing .stagebar,.playing .stage-note,.playing .scoreline,.playing .board-tools,.playing .progress,.playing .board-progress,.playing #restartBtn{display:none}.playing .boardwrap{padding:0;flex:1;min-height:0;display:flex;align-items:center;justify-content:center;border:0;background:radial-gradient(circle at 50% 45%,#25254b,#11172a 75%)}.playing .board-viewport{width:min(100%,calc(100dvh - 104px));max-height:100%;height:auto;aspect-ratio:1;overflow:hidden}.playing .board{height:100%;width:100%}.playing .gameactions{flex:0 0 auto;margin:0;gap:6px}.playing .gameactions button{min-height:40px;padding:8px 12px;font-size:11px}.playing .gameactions #hintBtn{min-width:88px}.playing .boardstate{padding:8px}.playing .boardstate h2{font-size:clamp(16px,3vh,26px)}.playing .resulticon{font-size:clamp(20px,4vh,42px)}.playing .boardstate p{margin:4px 0;font-size:11px}.playing .resultpoints{margin:3px 0;font-size:20px}.playing .boardstate .text-button{margin-top:2px}

.player-profile{padding:20px}.profile-head{display:flex;align-items:center;gap:10px}.profile-head .section-label{margin:0 0 4px}.profile-head>div{min-width:0;flex:1}.profile-head strong{display:block;overflow-wrap:anywhere}.profile-avatar{display:grid;place-items:center;flex:none;width:46px;height:46px;background:#302b50;border-radius:14px;font-size:26px}.profile-dialog{width:min(92vw,460px);max-height:90vh;overflow:auto;border:1px solid #4b426b;border-radius:20px;background:#171c30;color:#f2edff;padding:24px}.profile-dialog::backdrop{background:#080b18d9}.profile-dialog h2{margin:0 0 16px}.profile-dialog label,.profile-dialog p{display:block;color:#b9bfda;font-size:12px;margin:12px 0 6px}.profile-dialog input{width:100%;border:1px solid #484d6c;border-radius:8px;background:#101627;color:white;padding:10px}.avatar-choices{display:grid;grid-template-columns:repeat(6,1fr);gap:6px}.avatar-choices button{font-size:23px;min-height:44px;border:1px solid #343a55;background:#22273d;border-radius:9px}.avatar-choices button.selected{border-color:#bd98ff;background:#49346e}.profile-actions{display:flex;gap:8px;margin-top:18px}

.leader-status{color:var(--muted);font-size:10px;margin:14px 0}.leader-open{width:100%;font-size:11px;min-height:40px}.leader-dialog{width:min(94vw,560px)}.leader-tabs{display:flex;gap:5px;margin:12px 0}.leader-tabs button{flex:1;min-height:40px;border:1px solid #343a55;border-radius:9px;background:#22273d;color:#d0d2e8;font-size:11px}.leader-tabs button.selected{background:#49346e;border-color:#bd98ff;color:white}.leader-row{display:grid;grid-template-columns:40px 32px minmax(0,1fr) auto;align-items:center;gap:5px;padding:9px 8px;border-bottom:1px solid #ffffff12}.leader-row.self{background:#8864d820}.leader-medal{font-size:16px}.leader-name{overflow-wrap:anywhere}.leader-row strong{font-variant-numeric:tabular-nums}.leader-own{margin:14px 0;color:#c6b3f8}.leader-rows{max-height:45vh;overflow:auto}
.profile-public-note{color:var(--muted);font-size:10px;line-height:1.5;margin:13px 0 0}

/* Board controls stay on screen; only the zoomed puzzle itself can pan. */
.playing #restartBtn{display:block}.playing .game-nav .zoom-controls{display:flex;flex:0 0 auto}.playing .game-nav{gap:2px}.playing .game-nav .secondary{padding:7px 8px}.playing .game-nav .zoom-controls .secondary{width:30px;height:32px;padding:0}.playing .game-nav .zoom-controls .text-button{min-width:39px}.playing .game-timer{padding:0 4px;margin-left:auto}.playing .board-viewport{overflow:auto;touch-action:pan-x pan-y;overscroll-behavior:contain}.playing .board-viewport .board{max-width:none;touch-action:pan-x pan-y}.playing .gameactions #hintBtn{min-width:0;flex:1}.playing .gameactions .share{flex:1.3}.playing .gameactions button{padding:8px 5px;font-size:10px}.shop-panel .hint-shop p{margin:2px 0;color:var(--muted);font-size:10px}.playing .arrow-hit{stroke-width:.65}

.playing .game-nav .hearts{flex:0 0 auto;font-size:16px;letter-spacing:0;padding:0 3px;line-height:1;white-space:nowrap}@media(max-width:360px){.playing .game-nav .hearts{font-size:13px}.playing .game-timer small{display:none}.playing .game-nav .zoom-controls .text-button{min-width:34px}.playing .game-nav .secondary{padding:7px 5px}}

.challenge-open{display:block;width:100%;margin-top:7px}.challenge-list{display:grid;gap:8px;margin:12px 0;max-height:52vh;overflow:auto}.challenge-card{padding:12px;background:#22273d;border:1px solid #343a55;border-radius:10px}.challenge-card strong{display:block;overflow-wrap:anywhere;padding-right:5px}.challenge-card p{margin:6px 0;font-size:11px;color:#b9bfda}.challenge-card button{margin-top:4px}.challenge-status{display:inline-block;font-size:9px;letter-spacing:.8px;color:#d8bcff}.challenge-status.accepted{color:#83dfbc}.challenge-status.rejected{color:#f490aa}

/* Player profile is a separate page, opened from the avatar. */
.top-profile{display:grid;place-items:center;width:42px;height:42px;padding:0;border:1px solid #7c6baa;border-radius:13px;background:#30294c;color:white;font-size:23px}.top-profile:hover{background:#423761}.profile-page{max-width:1050px;margin:32px auto 0}.profile-page-nav{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.profile-page-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;align-items:start}.profile-page-details{display:grid;gap:18px}.profile-page .stats-panel{display:block}.profile-page .stat-row{display:flex;padding:16px 0!important;border-bottom:1px solid #ffffff08}.profile-page .stats-panel h2{margin-bottom:19px!important}.profile-page .stats-summary{border:0;padding-top:17px}.menu-column .session-panel{padding:18px}.menu-column .session-actions{display:grid}.menu-column .session-actions button{width:100%}@media(max-width:720px){.top-profile{width:37px;height:37px;font-size:21px}.topright{gap:7px}.profile-page{margin-top:18px}.profile-page-grid{grid-template-columns:minmax(0,1fr);gap:14px}.profile-page-details{gap:14px}.profile-page-nav .section-label{font-size:8px;letter-spacing:1px}.menu-column .session-actions{display:flex}.menu-column .session-actions button{width:auto;flex:1}.profile-page .stats-panel{display:block}.profile-page .stat-row small{font-size:8px}}
