:root{font-family:ui-rounded,'Trebuchet MS',system-ui,sans-serif;color:#37324e;background:#f9eecf;font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-height:100svh;isolation:isolate}.chess-backdrop{position:fixed;inset:0;z-index:-2;background-color:#f6e9c9;background-image:conic-gradient(#506777 25%,#f6e9c9 0 50%,#506777 0 75%,#f6e9c9 0);background-size:clamp(110px,16vw,230px) clamp(110px,16vw,230px)}body:before{content:'';position:fixed;inset:0;z-index:-1;background:radial-gradient(ellipse at 50% 40%,#fff9e679 15%,#fff6ddba 75%);pointer-events:none}button,a,select{-webkit-tap-highlight-color:transparent}button,input,select{font:inherit}button{border:0;cursor:pointer;color:inherit;min-height:48px;border-radius:18px;font-weight:900;background:#fffaf1;touch-action:manipulation}button:hover{filter:brightness(1.04)}button:active:not(:disabled){transform:translateY(3px)}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:4px solid #9175e4;outline-offset:4px}button:disabled{opacity:.45;cursor:default}[hidden]{display:none!important}header{display:flex;align-items:center;justify-content:space-between;gap:12px;max-width:1100px;margin:auto;padding:20px 26px}.brand{color:#37324e;font-size:29px;font-weight:1000;text-decoration:none;letter-spacing:-1px;display:flex;align-items:center;gap:9px;text-shadow:0 2px #fff7}.brand span{display:grid;place-items:center;width:48px;height:48px;background:#ffc856;border:3px solid white;border-radius:16px;font-size:35px;box-shadow:0 4px 0 #d3a13c}.header-actions{display:flex;align-items:center;gap:9px}.header-actions button{width:48px;font-size:22px;box-shadow:0 3px 0 #d6ceb9;border:2px solid white}.star-badge{display:flex;gap:7px;align-items:center;background:#fff6d8;border:3px solid white;border-radius:18px;padding:10px 16px;font-size:22px;box-shadow:0 3px 0 #dfc97d}.star-badge b{font-size:18px}main{min-height:calc(100svh - 165px);display:grid;place-items:center;padding:20px 20px 30px}.chooser{width:min(100%,650px);text-align:center;background:#fffcf4;border:5px solid white;border-radius:42px;padding:30px 42px 27px;box-shadow:0 9px 0 #c4a978,0 20px 60px #35314829;position:relative}.step-dots{display:flex;gap:9px;justify-content:center;margin:0 0 21px}.step-dots span{width:11px;height:11px;background:#ddd4bf;border-radius:50%}.step-dots .current{width:30px;border-radius:9px;background:#a088dc}.welcome-icon{display:inline-block;font-size:60px;transform:rotate(-12deg)}h1{font-size:clamp(28px,4vw,40px);letter-spacing:-1.2px;line-height:1.15;margin:16px 0 12px;font-weight:1000}.prompt{font-size:22px;margin:8px 0 27px;color:#6c637e;font-weight:700}.color-choices{display:flex;justify-content:center;gap:35px;margin:30px 0 22px}.color-choice{display:flex;flex-direction:column;align-items:center;gap:16px;background:transparent;font-size:23px;padding:8px}.color-square{width:145px;height:145px;border-radius:22px;border:5px solid #f7c658;box-shadow:0 8px 0 #dca639,0 10px 15px #3b304017;transition:transform .18s}.color-choice:hover .color-square{transform:rotate(-5deg) scale(1.04)}.white-square{background:#fffdf4}.black-square{background:#363348}.little-note{font-size:16px;font-weight:700;color:#8b7e95;margin-top:28px}.back-button{position:absolute;left:23px;top:16px;background:transparent;min-height:44px;font-size:14px;color:#7b6a92}.piece-chooser{width:min(100%,720px);padding:27px 34px}.piece-chooser h1{margin:10px 0}.piece-chooser .prompt{font-size:18px;margin:0 0 20px}.characters{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.character{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;min-height:152px;background:#f0e9ff;border:3px solid #e0d5f3;border-radius:23px;padding:8px 6px 12px;box-shadow:0 4px 0 #cbbce3}.character:nth-child(2n){background:#e5f3e9;border-color:#c9e5d1;box-shadow:0 4px 0 #acd2b8}.character:nth-child(3n){background:#fff0cf;border-color:#f4dfab;box-shadow:0 4px 0 #dbc185}.character.active{border-color:#ecae25;background:#fff0bc!important;box-shadow:0 5px 0 #d5a437!important}.character.active:after{content:'✓';position:absolute;right:8px;top:7px;background:#ffc84e;border:2px solid white;width:26px;height:26px;display:grid;place-items:center;border-radius:50%;font-size:17px}.character svg{width:94px;height:92px;filter:drop-shadow(0 4px 0 #44314718)}.character strong{display:block;font-size:16px}.character small{display:block;font-size:10px;font-weight:600;color:#776982;margin-top:3px}.selection-rule{font-size:15px;line-height:1.5;color:#766a86;min-height:44px;display:grid;place-items:center;margin:20px 0 8px}.primary{background:#ffbb43;border:3px solid #fff2b5;border-radius:20px;box-shadow:0 6px 0 #d48b29;color:#49324b;font-weight:1000;font-size:20px;padding:13px 22px;width:100%;margin:10px 0}.big-start{font-size:25px;min-height:65px;display:flex;align-items:center;justify-content:center;gap:20px}.big-start span{font-size:30px}.game{width:min(100%,650px);padding:18px 22px 14px;background:#fffdf3;border:4px solid white;border-radius:32px;box-shadow:0 7px 0 #c3aa7e,0 15px 45px #34334a24}.game-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.game-heading>div{text-align:center}.game-heading h1{font-size:22px;letter-spacing:-.6px;margin:4px 0 0}.round-button{min-width:46px;background:#ede5fa;font-size:25px;box-shadow:0 3px 0 #d2c5e7}.eyebrow{font-size:10px;letter-spacing:1.5px;font-weight:900;color:#8a749c}.treasure-bar{display:flex;align-items:center;justify-content:space-between;padding:15px 2px 11px;gap:10px}.treasure-goal{font-size:12px;color:#9988a1;font-weight:700}#treasure-progress{display:flex;align-items:center;gap:10px;font-size:25px}.treasure-slot{filter:grayscale(1);opacity:.3;transition:all .3s}.treasure-slot.found{filter:none;opacity:1;animation:treasure-pop .45s ease}.board-wrap{background:#dca758;border:4px solid #f3c577;padding:8px;border-radius:19px;box-shadow:0 5px 0 #b48042}.board-stage{position:relative;aspect-ratio:1}.board{display:grid;grid-template-columns:repeat(var(--n),1fr);width:100%;height:100%;overflow:hidden;border-radius:8px}.cell{position:relative;display:grid;place-items:center;aspect-ratio:1;min-height:0;min-width:0;padding:0;border-radius:0;background:#fff4d6}.cell.dark{background:#858ba6}.cell:active:not(:disabled){transform:none}.cell .gem{font-size:clamp(25px,5vw,49px);filter:drop-shadow(0 4px 0 #34334c20);animation:gem-float 2s ease-in-out infinite}.cell .dot{position:absolute;width:16%;height:16%;border-radius:50%;background:#6b478987;box-shadow:0 0 0 5px #f4d58440}.cell.dark .dot{background:#fff0ba}.cell.recommended{box-shadow:inset 0 0 0 5px #ffc344}.cell .coord{position:absolute;left:5px;bottom:3px;font-size:10px;color:#61566e;opacity:.7}.cell.dark .coord{color:white}.cell .guard{position:absolute;right:3px;top:3px;font-size:20px}.cell.travelled:after{content:'';width:22%;height:22%;border:3px dashed #eeb955;border-radius:50%;position:absolute}.cell.wrong{animation:wrong .3s ease;background:#f3b5a9}.actor{position:absolute;left:0;top:0;display:grid;place-items:center;pointer-events:none;z-index:3;filter:drop-shadow(0 5px 1px #302b4140)}.actor svg{width:82%;height:87%}.effects{position:absolute;inset:0;pointer-events:none;z-index:5;overflow:visible}.spark{position:absolute;width:10px;height:10px;border-radius:3px;background:var(--spark-color);box-shadow:0 0 5px #fff5}.spark:nth-child(3n){border-radius:50%}.firework-star{position:absolute;font-size:25px;line-height:1}.game-bottom{display:flex;align-items:center;gap:12px;margin-top:17px}.buddy-face{flex-shrink:0;width:52px;height:55px}.buddy-face svg{width:100%;height:100%}.speech{font-size:15px;font-weight:800;line-height:1.45;flex:1;min-width:0;min-height:50px;display:flex;align-items:center;color:#655279}.hint-button{background:#fff0bc;min-width:48px;font-size:24px;border:2px solid #f8d674;box-shadow:0 3px 0 #e9c17e}.hint-button[aria-pressed=false]{filter:grayscale(1);opacity:.65}.rule-caption{font-size:12px;line-height:1.5;text-align:center;color:#8a7a97;margin:8px 0 0}.game[data-moving=true] .cell{cursor:wait}.game[data-moving=true] .cell .dot{opacity:.2}.game[data-moving=true] .cell.recommended{box-shadow:none}footer{display:flex;align-items:center;justify-content:space-between;gap:12px;max-width:1050px;margin:auto;padding:12px 26px 20px;font-size:12px;font-weight:700;color:#6a5d75}footer button{font-size:12px;min-height:38px;padding:7px 12px;background:#fffaf1de;border:2px solid #fff8}footer>span{background:#fff6;padding:6px 10px;border-radius:12px}dialog{border:4px solid white;border-radius:30px;padding:28px;max-width:460px;width:calc(100% - 30px);color:#493e5c;background:#fffaf0;box-shadow:0 8px 0 #bd9c68,0 20px 80px #24213340}dialog::backdrop{background:#28253f77;backdrop-filter:blur(5px)}dialog p{font-size:14px;line-height:1.7;color:#7c6b87}dialog h2{font-size:26px;letter-spacing:-.5px}.close{float:right;background:#f0e7f6;min-width:44px;min-height:44px}.secondary{background:#ece2f7;padding:12px 16px;margin:6px 0;font-size:14px;width:100%}.celebrate{font-size:75px}#win{text-align:center}#win h2{font-size:31px}#win .eyebrow{display:block;margin-top:12px}label{display:flex;justify-content:space-between;gap:10px;align-items:center;font-size:14px}select{padding:10px;border:2px solid #d7c3e6;border-radius:12px;background:white;max-width:65%}input{display:block;width:100%;min-height:46px;border:2px solid #d9c9e7;border-radius:12px;padding:10px;font:inherit;margin:8px 0 18px;background:white;color:#493e5c}.narration-label{justify-content:start;margin:14px 0}.narration-label input{width:22px;min-height:22px;margin:0;accent-color:#9b79d3}#auth-error{color:#ad463a}button[hidden]{display:none}.parent-tools{margin-top:18px}@keyframes gem-float{50%{transform:translateY(-5px) rotate(5deg)}}@keyframes treasure-pop{50%{transform:scale(1.5) rotate(-10deg)}}@keyframes wrong{25%,75%{transform:translateX(-3px)}50%{transform:translateX(3px)}}@media(max-width:600px){header{padding:14px 15px;gap:8px}.brand{font-size:22px;gap:6px}.brand span{width:38px;height:40px;font-size:29px;border-radius:13px}.header-actions{gap:6px}.header-actions button{width:40px;min-height:40px;border-radius:13px;font-size:19px}.star-badge{font-size:19px;padding:7px 9px;border-radius:13px;gap:4px}.star-badge b{font-size:15px}main{min-height:calc(100svh - 140px);padding:16px 12px 22px}.chooser{padding:25px 18px 22px;border-radius:30px;border-width:4px}.welcome-icon{font-size:49px}.prompt{font-size:20px}.color-choices{gap:20px}.color-square{width:113px;height:113px;border-radius:18px}.color-choice{font-size:20px;padding:5px;gap:14px}.color-choices{margin:28px 0 16px}.little-note{font-size:14px}.piece-chooser{padding:22px 12px 20px}.piece-chooser h1{font-size:27px;margin-top:17px}.back-button{left:12px;top:10px;font-size:12px}.characters{gap:9px}.character{min-height:123px;border-radius:18px;padding:7px 2px 11px}.character svg{width:72px;height:75px}.character strong{font-size:11px}.character small{display:none}.selection-rule{font-size:13px;min-height:40px;margin:17px 7px 7px}.big-start{font-size:21px;min-height:58px}.game{padding:12px 10px 10px;border-radius:25px;border-width:3px}.game-heading h1{font-size:17px;max-width:220px}.eyebrow{font-size:8px;letter-spacing:1px}.round-button{min-width:39px;min-height:40px;border-radius:13px;font-size:23px}.treasure-bar{padding:12px 3px 9px}#treasure-progress{font-size:22px;gap:7px}.treasure-goal{font-size:10px}.board-wrap{padding:5px;border-width:3px;border-radius:14px}.board{border-radius:5px}.cell .coord{font-size:8px;left:3px;bottom:2px}.cell .guard{font-size:15px}.cell.recommended{box-shadow:inset 0 0 0 4px #ffc344}.game-bottom{gap:8px;margin-top:14px}.buddy-face{width:38px;height:45px}.speech{font-size:13px;min-height:45px}.hint-button{min-width:41px;min-height:43px;font-size:22px;border-radius:13px}.rule-caption{font-size:11px}.spark{width:7px;height:7px}footer{padding:8px 14px 15px;gap:5px;font-size:10px;flex-wrap:wrap}footer button{font-size:10px;padding:5px 9px}footer>span{font-size:10px;padding:5px}}@media(max-width:360px){.brand{font-size:19px}.header-actions{gap:4px}.header-actions button{width:36px}.star-badge{padding:6px}.color-square{width:98px;height:98px}.character strong{font-size:10px}footer>span{display:none}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}@media(min-width:900px) and (max-height:850px){main{padding-top:5px;padding-bottom:15px}.game{width:540px}.chooser{padding-top:23px;padding-bottom:20px}.piece-chooser{width:650px}.character{min-height:130px}.character svg{height:78px}.game-heading h1{font-size:19px}.speech{font-size:13px}}
