:root{--ink:#183c35;--muted:#728077;--cream:#f8f6ec;--green:#2e6654;--lime:#d9f27b;--line:#dddeda;--orange:#f1aa65}*{box-sizing:border-box}body{margin:0;background:var(--cream);color:var(--ink);font-family:"Trebuchet MS",Arial,sans-serif}button,input,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;border:0;color:inherit}button:disabled{opacity:.45;cursor:not-allowed}button:hover:not(:disabled){filter:brightness(1.04);transform:translateY(-1px)}button:active:not(:disabled){transform:translateY(1px)}button:focus-visible,a:focus-visible,input:focus-visible,canvas:focus-visible{outline:3px solid #f1aa65;outline-offset:4px}a{color:inherit;text-decoration:none}[hidden]{display:none!important}.app{max-width:1440px;margin:0 auto;padding:0 64px}.topbar{height:104px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{display:flex;gap:12px;align-items:center;font-size:15px;font-weight:900;letter-spacing:2px}.brand small{display:block;font-size:10px;letter-spacing:6px;margin-top:4px}.brandmark{width:43px;height:43px;border-radius:14px;background:var(--ink);color:var(--lime);display:grid;place-items:center;font-size:31px;position:relative;font-style:italic;letter-spacing:-4px}.brandmark span{font-size:12px;position:absolute;right:6px;top:3px}.top-actions{display:flex;gap:12px;align-items:center}.test-badge{font-size:10px;letter-spacing:1.4px;margin-right:12px;color:var(--muted)}.icon-btn{height:40px;width:40px;border-radius:50%;border:1px solid var(--line);background:transparent;font-size:21px}.account-btn{background:white;border:1px solid var(--line);border-radius:24px;padding:11px 18px;font-size:13px}.hero{display:grid;grid-template-columns:.9fr 1.1fr;min-height:590px;align-items:center;gap:8px;padding:45px 0 25px}.eyebrow{font-size:10px;letter-spacing:2px;font-weight:800;color:var(--green)}.hero-copy .eyebrow{display:flex;align-items:center;gap:9px}.eyebrow>span{width:6px;height:6px;background:var(--green);border-radius:50%}h1{font-size:clamp(60px,6.4vw,94px);line-height:.9;letter-spacing:-5px;margin:28px 0 22px;font-weight:900}h1>span{color:var(--green);position:relative}.title-star{font-size:38px;color:var(--orange);position:absolute;right:-46px;top:0;transform:rotate(16deg)}.hero-copy p{font-size:17px;line-height:1.65;color:#6b7d72}.primary{background:var(--ink);color:#f4f7e7;border-radius:14px;padding:14px 24px;font-weight:bold;box-shadow:0 4px 0 #0b2821}.primary.large{padding:18px 25px;font-size:16px;min-width:210px;margin:10px 0 25px;display:flex;justify-content:space-between}.primary span{color:var(--lime)}.hero-meta{display:flex;gap:20px;font-size:11px;color:var(--muted)}.hero-art{position:relative;min-width:0}.hero-art canvas{width:100%;display:block}.art-label{position:absolute;bottom:26px;left:50%;transform:translateX(-50%);white-space:nowrap;font-size:9px;letter-spacing:2px;color:var(--green)}.float-tag{position:absolute;right:6%;top:24%;padding:11px 16px;background:#fffef4;border:1px solid #e9dbc6;border-radius:15px;transform:rotate(12deg);font-weight:900;font-size:15px;box-shadow:0 6px 15px #193c3510}.float-tag b{color:var(--orange)}.adventure{padding:12px 0 36px}.section-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:28px}h2{font-size:25px;letter-spacing:-.8px;margin:10px 0}.progress-chip{border:1px solid var(--line);border-radius:24px;padding:12px 17px;font-size:12px;background:#fffef6}.progress-chip b{color:#eeb65c;margin-left:10px}.level-map{display:grid;grid-template-columns:repeat(5,1fr);gap:16px;position:relative}.level-card{border:1px solid var(--line);border-radius:20px;background:#fffef7;padding:18px 18px 16px;text-align:left;position:relative;overflow:hidden;min-height:195px;transition:transform .2s}.level-card.selected{border:2px solid var(--green);padding:17px 17px 15px}.level-card .card-top{display:flex;justify-content:space-between;color:var(--muted);font-size:9px;letter-spacing:1.2px}.level-icon{height:78px;display:flex;align-items:center;justify-content:center}.level-icon svg{width:78px;height:74px;overflow:visible}.level-card h3{font-size:14px;margin:6px 0 7px}.level-card .region{font-size:10px;color:var(--muted)}.level-card .card-bottom{display:flex;justify-content:space-between;align-items:center;margin-top:12px}.stars{color:#d5d9c8;letter-spacing:2px;font-size:16px}.stars .earned{color:#eab052}.card-arrow{font-size:20px}.adventure-foot{display:flex;justify-content:space-between;margin-top:20px;font-size:11px;color:var(--muted)}.text-btn{padding:0;background:none;font-size:11px}.text-btn span{margin-left:12px}footer{border-top:1px solid var(--line);padding:25px 0;display:flex;justify-content:space-between;font-size:10px;color:var(--muted);gap:15px}.footer-spark{color:var(--orange);margin-left:7px}.secondary{border:1px solid var(--line);background:#fffdf5;border-radius:12px;padding:11px 18px;font-size:12px}.game-top{display:flex;align-items:center;justify-content:space-between;padding:25px 0 18px}.game-top>div{text-align:center}.game-top h2{margin:4px 0}.game-layout{display:grid;grid-template-columns:minmax(150px,1fr) minmax(280px,480px) minmax(140px,1fr);gap:28px;align-items:start;max-width:1060px;margin:0 auto 30px}.board-wrap{position:relative;border:7px solid #fffdf4;border-radius:32px;overflow:hidden;box-shadow:0 16px 40px #183c3518;line-height:0}#gameCanvas{display:block;width:100%;aspect-ratio:480/680;touch-action:none}.game-sidebar,.control-sidebar{padding-top:30px}.game-sidebar h3{font-size:18px;line-height:1.5}.objective{background:#fffdf5;border:1px solid var(--line);padding:12px;border-radius:14px;margin:10px 0;font-size:12px}.objective>div{display:flex;justify-content:space-between;margin-bottom:8px}.track{height:5px;background:#e5e9d9;border-radius:5px;overflow:hidden}.track>i{display:block;height:100%;background:#5a966d;border-radius:5px}.stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:22px}.stat-grid span,.combo-card>span{display:block;font-size:9px;letter-spacing:1px;color:var(--muted)}.stat-grid b{display:block;font-size:29px;margin:5px 0}.combo-card{background:var(--lime);border-radius:16px;padding:15px;margin:18px 0}.combo-card b{font-size:18px;display:block;margin-top:7px}.hint-card{font-size:12px;line-height:1.6;margin-bottom:22px}.hint-card p,.control-sidebar p{color:var(--muted)}.control-sidebar .eyebrow{margin-bottom:20px}.aim-dial{height:90px;width:90px;border:1px dashed #93ad96;border-radius:50%;display:grid;place-items:center;font-size:48px;color:var(--green);background:#e9ecd9;margin-bottom:25px}.control-sidebar label{font-size:12px;display:flex;justify-content:space-between}.control-sidebar input{width:100%;accent-color:var(--green);margin:18px 0 24px}.control-sidebar .primary{width:100%}.control-sidebar p{font-size:11px;line-height:1.7;margin-top:20px}.legend{display:flex;flex-direction:column;gap:16px;margin-top:28px;font-size:11px}.legend span{display:flex;align-items:center;gap:10px}.dot{width:11px;height:11px;border-radius:50%;display:inline-block}.gem{background:#a78bea}.leaf{background:#76aa64}.split{background:#5cb8cb}.mult{background:#f4bc61}.fire{background:#f28d6d}.power-toast{position:absolute;top:20%;left:50%;transform:translateX(-50%);background:var(--ink);padding:18px;color:var(--lime);font-weight:bold;font-size:18px;border-radius:16px;line-height:1.2;white-space:nowrap}.mobile-controls{display:none}dialog{border:1px solid #e0decf;border-radius:26px;background:#fffef5;color:var(--ink);width:430px;max-width:calc(100vw - 28px);padding:35px;box-shadow:0 24px 90px #122f3444}dialog::backdrop{background:#173e3766;backdrop-filter:blur(5px)}.close{position:absolute;right:14px;top:12px;background:none;font-size:26px}.modal-eyebrow{font-size:10px;letter-spacing:2px;color:var(--green)}dialog h2{font-size:28px;margin:15px 0}dialog p{font-size:13px;line-height:1.7;color:var(--muted)}dialog .primary,dialog .secondary{width:100%;margin:8px 0}dialog label{display:block;font-size:12px;margin:16px 0 7px}dialog input:not([type=checkbox]):not([type=range]){width:100%;padding:13px;background:white;border:1px solid var(--line);border-radius:10px;font:inherit;color:var(--ink)}.error{color:#ab4234;font-size:12px;min-height:17px;margin-top:12px}.switch-row{display:flex;align-items:center;justify-content:space-between;margin:24px 0;font-size:14px}.switch-row label{margin:0}.switch-row input{accent-color:var(--green);width:20px;height:20px}.settings-volume{width:100%;accent-color:var(--green)}.result-icon{text-align:center;font-size:62px;margin:10px}.result-stars{font-size:38px;color:#e8ae4f;text-align:center;letter-spacing:8px}.result{text-align:center}.result-score{font-size:40px;font-weight:bold;margin:14px 0}.fine-print{font-size:10px!important}.auth-tabs{display:flex;border-bottom:1px solid var(--line);margin-bottom:20px}.auth-tabs button{flex:1;padding:12px;background:none;font-size:12px}.auth-tabs .active{border-bottom:2px solid var(--green);font-weight:bold}#notification{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:var(--ink);color:white;padding:14px 22px;border-radius:15px;z-index:20;font-size:13px;max-width:90vw;text-align:center}.mini-label{background:#edf0e2;padding:9px;border-radius:9px;font-size:11px;margin:15px 0}.save-error{color:#b04532!important}.modal-list{padding-left:20px;font-size:13px;line-height:1.8;color:var(--muted)}
@media(min-width:1450px){.hero{min-height:620px}}@media(max-width:1100px){.app{padding:0 32px}.hero{min-height:520px}.hero-meta{gap:12px}.game-layout{gap:20px}.game-sidebar h3{font-size:15px}.level-card{padding:13px}.level-card.selected{padding:12px}.level-card h3{font-size:12px}.game-layout{grid-template-columns:160px minmax(280px,440px) 150px}.test-badge{display:none}}@media(max-width:820px){.app{padding:0 22px}.topbar{height:80px}.hero{grid-template-columns:1fr 1fr;min-height:470px}h1{font-size:65px}.hero-copy .eyebrow{font-size:8px;letter-spacing:1px}.hero-copy p{font-size:14px}.hero-meta{flex-direction:column;gap:7px}.title-star{font-size:26px;right:-30px}.art-label{display:none}.level-map{gap:10px;grid-template-columns:repeat(3,1fr)}.level-card{min-height:185px}.game-layout{grid-template-columns:150px minmax(250px,440px);justify-content:center}.control-sidebar{display:none}.mobile-controls{display:flex;justify-content:center;gap:20px;align-items:center;font-size:12px;margin-bottom:24px}.hero-art{margin-right:-20px}.float-tag{font-size:11px;right:0}footer>span:nth-child(2){display:none}}@media(max-width:550px){.app{padding:0 18px}.topbar{height:72px}.brand{font-size:11px;gap:8px}.brand small{font-size:8px;letter-spacing:4px}.brandmark{width:35px;height:35px;font-size:26px}.top-actions{gap:7px}.icon-btn{width:34px;height:34px;font-size:19px}.account-btn{padding:9px 11px}.account-btn span{display:none}.hero{display:flex;flex-direction:column;align-items:stretch;padding:35px 0 0}.hero-copy{position:relative;z-index:1}h1{font-size:76px;margin:22px 0 15px}.hero-copy p{font-size:14px}.primary.large{margin:12px 0 18px;padding:15px 20px;min-width:190px;width:190px}.hero-meta{flex-direction:row;gap:15px;font-size:10px}.hero-art{margin:-25px -22px -5px 15%;pointer-events:none}.hero-art canvas{max-height:290px;width:100%}.float-tag{right:7%;top:24%}.section-heading{margin:15px 0 20px;gap:12px}.section-heading h2{font-size:19px;max-width:210px}.progress-chip{white-space:nowrap;font-size:10px;padding:10px 11px}.level-map{grid-template-columns:repeat(2,1fr);gap:12px}.level-card{padding:15px;min-height:190px}.level-card.selected{padding:14px}.level-card:last-child{grid-column:1 / -1;min-height:150px;display:grid;grid-template-columns:1fr 1fr;align-items:center}.level-card:last-child .level-icon{grid-row:1 / 5;grid-column:2}.level-card:last-child .card-bottom{margin:0}.level-card h3{font-size:14px}.adventure-foot{align-items:center;gap:15px;line-height:1.6}.adventure-foot>span{max-width:200px}.adventure{padding-bottom:28px}.game-top{padding:18px 0 14px}.game-top h2{font-size:18px}.game-top .secondary{padding:9px 12px}.game-top .eyebrow{font-size:8px}.game-layout{display:flex;flex-direction:column;gap:12px;margin-bottom:12px}.game-sidebar{padding:0;width:100%;display:flex;align-items:center;gap:10px;flex-wrap:wrap}.game-sidebar>.eyebrow,.game-sidebar>h3,.game-sidebar>.hint-card,.game-sidebar>.secondary,.combo-card,.stat-grid{display:none}#objectives{display:flex;gap:8px;width:100%;justify-content:center}.objective{margin:0;padding:9px;font-size:10px;flex:1;max-width:160px}.objective>div{gap:8px}.board-wrap{border-width:5px;border-radius:23px;width:100%;max-width:420px;align-self:center}#gameCanvas{max-height:calc(100svh - 240px);min-height:320px;width:100%;object-fit:contain}.mobile-controls{font-size:11px;gap:15px}.mobile-controls .primary{padding:11px 18px}footer{font-size:9px;padding:20px 0}dialog{padding:30px 25px}.power-toast{font-size:15px}}
@media(prefers-reduced-motion:reduce){button{transition:none}button:hover:not(:disabled){transform:none}}
/* Pocket handbook keeps navigation and the action visible while pages scroll. */
#modal.handbook-modal{width:min(620px,calc(100vw - 24px));max-height:calc(100dvh - 28px);padding:24px;background:linear-gradient(145deg,#fff9e9,#e9f8f2);border:2px solid #c6dcd3;border-radius:25px;overflow:hidden}
.handbook-modal #modal-content{height:min(700px,calc(100dvh - 82px));min-height:0;overflow:hidden}.guide-shell{height:100%;display:flex;flex-direction:column;gap:14px;min-height:0}.guide-shell header{flex:none;padding-right:18px}.guide-shell h2{margin:5px 0 8px}.guide-shell header p{margin:0 0 12px;font-size:14px}.guide-shell input{width:100%;padding:12px;border:1px solid #a4cbbd;border-radius:13px;background:#fff}.guide-tabs{display:flex;gap:7px;overflow-x:auto;margin-top:10px;padding-bottom:4px}.guide-tabs button{white-space:nowrap;border:1px solid #a4cbbd;border-radius:20px;padding:9px 12px;background:#fff;color:#245446;font-weight:700}.guide-tabs button[aria-pressed=true]{background:#245446;color:#fff}.guide-scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:1px 4px 10px 1px}.guide-card{display:flex;gap:13px;padding:17px;margin-bottom:12px;border-radius:18px;border:1px solid #d1e2d5;background:#fffdf7;box-shadow:0 4px 12px #244b4010}.guide-icon{flex:none;display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#f7db8b;color:#325744;font-size:24px}.guide-card small{font-size:10px;letter-spacing:1px;text-transform:uppercase;color:#628574}.guide-card h3{margin:4px 0 8px;color:#245446;font-size:19px}.guide-card p{margin:0;line-height:1.6;font-size:15px;color:#38594e}.guide-actions{flex:none;padding-top:10px;border-top:1px solid #c7ded1}.guide-actions button{width:100%;min-height:48px}.prepare-footer #prepare-handbook{margin-bottom:8px;width:100%}
@media(max-width:480px){#modal.handbook-modal{padding:18px 14px}.handbook-modal #modal-content{height:calc(100dvh - 76px)}.guide-card{padding:13px;gap:10px}.guide-icon{width:33px;height:33px;font-size:20px}.guide-card h3{font-size:18px}.guide-card p{font-size:14px}.guide-tabs button{padding:8px 10px}}
.guide-icon img{width:36px;height:36px;object-fit:contain}.prepare-meta #prepare-handbook{font-size:11px;white-space:nowrap;padding:5px}.guide-tabs button:focus-visible,.guide-actions button:focus-visible{outline:3px solid #e6b547;outline-offset:2px}
@media(orientation:landscape) and (max-height:500px){.guide-shell header{display:grid;grid-template-columns:1fr 1fr;gap:4px 12px}.guide-shell header h2{font-size:22px}.guide-shell header .modal-eyebrow,.guide-shell header h2{grid-column:1}.guide-shell header p{display:none}.guide-shell header input{grid-column:2;grid-row:1/3}.guide-tabs{grid-column:1/3;margin-top:3px}.guide-shell{gap:6px}.guide-actions{padding-top:6px}.guide-card p{font-size:13px}.guide-card{padding:10px}}
.guide-icon img{animation:guide-float 3.8s ease-in-out infinite}@keyframes guide-float{50%{transform:translateY(-3px) rotate(3deg)}}.reduce-motion .guide-icon img{animation:none}@media(prefers-reduced-motion:reduce){.guide-icon img{animation:none}}
