:root{color-scheme:dark;--bg:#10112a;--surface:#1e2145;--surface2:#292d55;--white:#fff;--muted:#b4bade;--border:rgba(255,255,255,.12);--round:24px;--board-size:min(67vh,88vw,440px);--board-size:min(67svh,88vw,440px)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#10112a;color:var(--white);font-family:system-ui,-apple-system,"Segoe UI",sans-serif}body{overflow-x:hidden;touch-action:pan-y}
body::before{content:"";position:fixed;z-index:-1;inset:0;pointer-events:none;background:radial-gradient(ellipse at 12% 3%,#342768 0,transparent 38%),radial-gradient(ellipse at 98% 90%,#153c63 0,transparent 34%),#10112a}
button{-webkit-tap-highlight-color:transparent;font:inherit;cursor:pointer;border:none;color:inherit}button:focus-visible{outline:3px solid #ffe27b;outline-offset:3px}button:disabled{opacity:.45;cursor:default}
.app-shell{max-width:1120px;margin:auto;padding:14px clamp(12px,3vw,28px) 22px;min-height:100vh;min-height:100svh}
.top-bar{height:66px;display:flex;align-items:center;justify-content:space-between;gap:12px}.brand{display:flex;align-items:center;gap:10px;min-width:0}.brand-symbol{width:49px;height:49px;border-radius:17px;background:linear-gradient(145deg,#ff88ae,#916dff);display:grid;place-items:center;font-size:29px;box-shadow:0 6px 16px #08091c66}.brand-title{font-weight:900;font-size:clamp(21px,3vw,29px);letter-spacing:-.8px;white-space:nowrap}.brand-subtitle{font-size:12px;color:#c6c5ee;letter-spacing:.2px}.top-right{display:flex;align-items:center;gap:8px}.score-pill{padding:9px 12px;background:#302c56;border:1px solid #62568b;border-radius:25px;display:flex;align-items:center;gap:5px;font-size:14px;font-weight:800;white-space:nowrap}.score-word{color:#c2c5e5;font-size:12px;font-weight:600}.icon-button{width:43px;height:43px;border-radius:15px;background:#2c305b;font-size:21px;border:1px solid var(--border)}
.game-layout{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(270px,.8fr);gap:18px;margin-top:10px;align-items:start}.play-panel,.levels-panel{background:linear-gradient(160deg,#25244c,#191d3d);border:1px solid rgba(255,255,255,.10);border-radius:var(--round);box-shadow:0 15px 35px #05061780}.play-panel{padding:17px 18px 14px}.heading-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 5px 8px}.eyebrow{color:#ffc770;font-size:11px;letter-spacing:1.6px;font-weight:900;margin-bottom:2px}.heading-row h1{font-weight:900;letter-spacing:-.8px;margin:0;font-size:clamp(23px,3.2vw,32px)}.heading-row h1 span{font-size:.76em}.pair-status{border-radius:22px;background:#35375f;padding:9px 12px;color:#dcd8ff;font-size:13px;font-weight:750;white-space:nowrap}
.game-area{display:flex;flex-direction:column;align-items:center}.board-stage{width:var(--board-size);height:var(--board-size);max-width:100%;position:relative;border:7px solid #5c5e83;background:#151931;border-radius:20px;box-shadow:inset 0 0 14px #0007,0 10px 25px #06051a80;overflow:hidden}.board{height:100%;width:100%;display:grid;position:relative;touch-action:none;user-select:none;-webkit-user-select:none;cursor:crosshair;background:#111a32}.cell{background:rgba(22,39,66,.48);border-right:1px solid rgba(179,202,236,.14);border-bottom:1px solid rgba(179,202,236,.14)}.cell:nth-child(2n){background:rgba(29,47,75,.39)}.line-layer{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}.line-shadow{fill:none;stroke:#080b24;stroke-linecap:round;stroke-linejoin:round;opacity:.55}.trail-line{fill:none;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 0 1px rgba(255,255,255,.25))}.trail-dot{stroke:#fff;stroke-width:.05;filter:drop-shadow(0 .05px .05px #0009)}.trail-dot-center{fill:#fff;opacity:.38}.hint-trail{fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:.16,.15;opacity:.45;animation:hint-pulse 1s linear infinite}.hint-halo{fill:none;stroke-width:.075;opacity:.8;animation:hint-pulse 1s linear infinite}
@keyframes hint-pulse{0%,100%{opacity:.25}50%{opacity:.85}}
.win-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;background:rgba(14,15,45,.91);backdrop-filter:blur(3px);padding:16px;animation:pop-in .35s ease both;z-index:3}.win-overlay[hidden]{display:none}.win-stars{font-size:35px;animation:bounce .7s ease infinite alternate}.win-title{font-size:clamp(28px,5.4vw,39px);font-weight:950;letter-spacing:-1px;margin-top:8px;color:#ffeb98;text-shadow:0 3px 0 #8b4a89}.win-subtitle{font-size:clamp(13px,2.2vw,16px);color:#f8eaff;margin-top:4px}.super-next{margin-top:20px;min-width:190px!important;font-size:18px!important;padding:13px 18px!important}@keyframes bounce{to{transform:translateY(-9px)}}@keyframes pop-in{from{transform:scale(.94);opacity:0}to{transform:scale(1);opacity:1}}
.help-line{text-align:center;color:#e3ddfa;min-height:28px;font-size:clamp(12px,2vw,15px);margin:9px 0 3px;font-weight:700}.actions{width:min(100%,var(--board-size));display:flex;gap:8px}.action-button{min-width:0;display:flex;align-items:center;justify-content:center;gap:5px;padding:11px 9px;border-radius:16px;flex:1;font-weight:850;font-size:15px;border:1px solid #ffffff18;box-shadow:0 4px 0 #080a2370}.action-button:active:not(:disabled){transform:translateY(2px);box-shadow:0 2px 0 #080a2370}.action-button.secondary{background:#383e66;color:#fff}.action-button.hint{background:#ffe28b;color:#38264b}.action-button.primary{background:linear-gradient(135deg,#ffad76,#ff76a5);color:#302044}
.levels-panel{padding:18px;max-height:calc(100vh - 108px);max-height:calc(100svh - 108px);min-height:440px;overflow:auto;scrollbar-width:thin;scrollbar-color:#565b8d transparent}.aside-title{font-size:19px;font-weight:900;letter-spacing:-.4px}.aside-subtitle{color:#c6c6e7;font-size:13px;margin-top:2px}.pack-picker{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:16px}.pack-button{border-radius:14px;text-align:left;padding:10px;background:#34365e;border:2px solid transparent;display:flex;align-items:center;gap:8px;min-height:58px}.pack-button.selected{background:#474278;border-color:#ffdc9b}.pack-emoji{font-size:21px}.pack-info{display:flex;flex-direction:column;min-width:0}.pack-name{font-size:12px;font-weight:900}.pack-size{font-size:11px;color:#c9cbe7}.levels-header{display:flex;justify-content:space-between;align-items:center;margin:18px 2px 9px;font-weight:850;font-size:13px}.levels-header span:last-child{font-weight:750;color:#d4c8ff}.level-picker{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}.level-button{position:relative;border:2px solid transparent;background:#373c68;border-radius:13px;min-height:43px;aspect-ratio:1.15;font-size:15px;font-weight:800;display:grid;place-items:center}.level-button.active{border-color:#ffd681;background:#66558c}.level-button.done{background:#256d68;color:#eafff6}.level-check{position:absolute;right:2px;top:-3px;font-size:11px}.aside-footer{margin-top:19px;border-top:1px solid var(--border);padding-top:12px}.mode-label{font-size:13px;color:#dad7f5;font-weight:850;margin-bottom:9px}.mode-options{display:flex;gap:6px}.mode-button{border:1px solid #555a8b;background:#30345b;border-radius:12px;flex:1;line-height:1.2;padding:9px 7px;font-size:11.5px;font-weight:800}.mode-button.selected{background:#594e80;border-color:#ffd178;color:#fff4cc}.privacy-note{font-size:11px;color:#c5bcdf;line-height:1.5;padding:13px 0 0}
@media(max-width:760px){.app-shell{padding:9px 10px 24px}.top-bar{height:58px}.brand-symbol{width:43px;height:43px;font-size:25px}.game-layout{grid-template-columns:1fr;gap:13px;margin-top:5px}.play-panel{padding:13px 10px}.levels-panel{max-height:none;min-height:auto}.board-stage{border-width:5px}.heading-row{padding:2px 5px 9px}.brand-title{font-size:22px}.score-word{display:none}.score-pill{padding:7px 9px}.action-button{min-height:46px}.help-line{margin:9px 0 2px}.level-button{aspect-ratio:1.4}.levels-panel{padding:16px}}
@media(max-height:640px) and (min-width:761px){:root{--board-size:min(61vh,440px);--board-size:min(61svh,440px)}.app-shell{padding-top:6px}.top-bar{height:48px}.brand-symbol{width:38px;height:38px;border-radius:12px;font-size:22px}.brand-title{font-size:20px}.brand-subtitle{font-size:10px}.game-layout{margin-top:4px;gap:12px}.play-panel{padding:9px 14px}.heading-row h1{font-size:23px}.heading-row{padding-bottom:4px}.help-line{margin:4px 0 0;min-height:25px}.action-button{padding:7px 8px;font-size:13px}.levels-panel{max-height:calc(100vh - 65px);max-height:calc(100svh - 65px);padding:12px;min-height:auto}.aside-title{font-size:17px}.pack-picker{margin-top:9px}.pack-button{min-height:48px;padding:6px}.levels-header{margin:10px 2px 7px}.level-picker{gap:5px}.level-button{min-height:34px}.aside-footer{margin-top:10px;padding-top:8px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
