:root{--cream:#f4f1e9;--ink:#203b3c;--teal:#176467;--gold:#cf9c42;--muted:#6a7771;--line:#d9dfd6;--screen-w:100vw;--screen-h:100dvh;font-family:Arial,Helvetica,sans-serif;color:var(--ink);background:var(--cream);font-synthesis:none}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}button{font:inherit;cursor:pointer;color:inherit;-webkit-tap-highlight-color:transparent}button:disabled{opacity:.35;cursor:default}button:focus-visible,canvas:focus-visible{outline:3px solid #c58e2e;outline-offset:3px}button,svg,img{-webkit-user-select:none;user-select:none}button{touch-action:manipulation}button svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}button[aria-pressed=true]{background:#e0e9df;border-color:var(--teal)}[hidden]{display:none!important}
#app{width:var(--screen-w);height:var(--screen-h);display:flex;flex-direction:column;background:radial-gradient(ellipse at 100% 0,#e8eadb 0,transparent 45%),var(--cream);padding:0 max(22px,env(safe-area-inset-right)) 0 max(22px,env(safe-area-inset-left));overflow:hidden;position:relative}#app.layout-rotate{position:fixed;left:50%;top:50%;width:var(--screen-h);height:var(--screen-w);transform:translate(-50%,-50%) rotate(90deg)}
.topbar{height:92px;flex-shrink:0;width:100%;max-width:1400px;margin:0 auto;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:20px}.brand{height:78px;width:220px;padding:0;border:0;background:transparent;display:flex;align-items:center;justify-content:flex-start}.brand img{width:100%;height:100%;object-fit:contain}.topnote{font-size:13px;color:var(--muted);margin-left:auto}.header-actions{display:flex;gap:8px}.icon-button{width:42px;height:42px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line);background:#ffffff65;border-radius:12px;flex-shrink:0;font-size:25px}.icon-button:hover{background:#e5e9df}.home{width:100%;max-width:1280px;margin:auto;display:flex;flex-direction:column;flex:1;min-height:0;padding-top:clamp(12px,2.7vh,28px)}.intro{flex-shrink:0;margin-bottom:clamp(12px,2.2vh,24px);position:relative}.eyebrow{font-size:10px;letter-spacing:2.5px;color:var(--teal);font-weight:700}h1{font-family:Georgia,'Times New Roman',serif;font-size:clamp(27px,3.5vw,47px);line-height:1.08;font-weight:400;letter-spacing:-1px;margin:9px 0 0}h1 em{color:var(--teal);font-weight:400}.desktop-break{display:none}.intro p{position:absolute;bottom:0;right:0;max-width:300px;margin:0;color:var(--muted);line-height:1.6;font-size:14px}.home-content{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(300px,1fr);gap:clamp(24px,4vw,58px);min-height:0;flex:1;align-items:center}.scene-preview{position:relative;min-height:0;align-self:stretch;max-height:540px;overflow:hidden;border-radius:22px;background:#dee4d8;border:6px solid #fff;box-shadow:0 8px 30px #243e3410}.scene-preview>img{width:100%;height:100%;object-fit:contain;display:block;background:#e4e9dd}.preview-caption{position:absolute;bottom:0;left:0;right:0;padding:45px 23px 22px;background:linear-gradient(transparent,#163c37dd);color:white}.preview-caption span{font-size:11px;letter-spacing:2px;opacity:.8}.preview-caption h2{font-family:Georgia,serif;font-weight:400;font-size:25px;margin:6px 0 0}.preview-stamp{position:absolute;top:16px;left:16px;background:#fff8e9ef;border:1px solid #fff8;padding:9px 12px;border-radius:30px;font-size:9px;letter-spacing:1.5px;font-weight:bold}.setup{display:flex;flex-direction:column;gap:14px;min-height:0;max-height:100%}.section-label{display:flex;align-items:center;gap:9px}.section-label h2{font-size:14px;font-weight:600;margin:0}.step{width:22px;height:22px;display:grid;place-items:center;border-radius:50%;background:#e3e9df;font-size:11px;color:var(--teal)}.scene-choices{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-bottom:12px}.scene-choice{border:2px solid transparent;background:transparent;padding:3px;border-radius:12px;min-width:0;text-align:left;position:relative}.scene-choice img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:7px;display:block}.scene-choice span{font-size:10px;display:block;white-space:nowrap;text-align:center;padding-top:7px}.scene-choice[aria-pressed=true]{border-color:var(--teal);background:#e3ebe0}.scene-choice .done{position:absolute;top:6px;right:6px;background:var(--teal);border:1px solid #fff;color:white;font-size:9px;padding:3px;border-radius:100%}.levels{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.levels button{border:1px solid var(--line);background:#ffffff60;border-radius:12px;min-height:77px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px}.levels strong{font-size:24px;font-weight:500}.levels small{font-size:10px;color:var(--muted)}.levels button[aria-pressed=true]{border:2px solid var(--teal);background:#e3ebe0}.primary{border:0;border-radius:12px;background:var(--teal);color:#fff;padding:16px 21px;font-weight:600;display:flex;align-items:center;justify-content:center;gap:15px}.primary:hover{background:#124f52}.start-button{margin-top:7px;justify-content:space-between;min-height:54px}.start-button span{font-size:23px;font-weight:400}.setup-note{color:var(--muted);font-size:11px;text-align:center;margin:0;min-height:13px}.home-footer{flex-shrink:0;display:flex;justify-content:space-between;align-items:center;font-size:10px;letter-spacing:.4px;color:var(--muted);min-height:55px}
.game{flex:1;min-height:0;display:flex;flex-direction:column;width:100%;max-width:1500px;margin:auto}.game-heading{display:flex;align-items:center;gap:20px;height:63px;flex-shrink:0}.text-button{border:0;background:transparent;font-size:14px;padding:10px 0}.game-title{display:flex;gap:13px;align-items:center;font-weight:600;font-size:14px}.game-title small{font-size:10px;font-weight:400;color:var(--muted);background:#e4e9df;padding:5px 9px;border-radius:8px}.stats{margin-left:auto;display:flex;gap:18px;font-size:14px;font-variant-numeric:tabular-nums}.stats strong{color:var(--teal)}.progress-track{height:3px;background:#dfe6dc;border-radius:3px;flex-shrink:0;overflow:hidden}.progress-track>div{height:100%;width:0;background:var(--teal);transition:width .25s}.canvas-wrap{flex:1;min-height:0;position:relative;background:radial-gradient(#cbd5c250 .8px,transparent .8px);background-size:13px 13px;border-radius:18px;margin-top:8px}#puzzle{display:block;width:100%;height:100%;touch-action:pinch-zoom;cursor:grab;outline-offset:-3px}#puzzle:active{cursor:grabbing}.game-tools{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-shrink:0;padding-top:5px}.tool-group{display:flex;gap:7px}.tool-button{display:flex;gap:6px;align-items:center;border:1px solid var(--line);border-radius:10px;padding:9px 12px;background:#ffffff70;font-size:12px;min-height:40px}.pagination{display:flex;align-items:center;gap:10px;font-size:12px;font-variant-numeric:tabular-nums}.pagination .icon-button{height:37px;width:35px}.play-help{font-size:11px;color:var(--muted);text-align:center;margin:10px 0 13px;flex-shrink:0}.loading{position:absolute;inset:0;display:grid;place-items:center;background:var(--cream);border-radius:18px;font-size:14px}
.modal{position:absolute;inset:0;background:#173a3ab5;backdrop-filter:blur(6px);z-index:50;display:flex;align-items:center;justify-content:center;padding:18px}.modal-card{background:#faf8f0;border-radius:24px;padding:30px;position:relative;width:min(540px,100%);max-height:95%;overflow:auto;box-shadow:0 20px 80px #0002;text-align:center}.modal-close{position:absolute;top:10px;right:10px;z-index:1;background:#fff}.modal h2{font-family:Georgia,serif;font-weight:400;font-size:32px;margin:14px 0 10px}.modal p{font-size:14px;line-height:1.6;color:var(--muted)}.modal .reference-img{width:100%;height:auto;max-height:57vh;object-fit:contain;border-radius:14px;display:block;margin-top:20px}.modal .completed-img{width:min(260px,100%);max-height:180px;object-fit:contain;border-radius:12px}.modal .win-kicker{display:block;font-size:11px;color:var(--teal);letter-spacing:2px;margin-top:12px}.modal .result-stats{display:flex;justify-content:center;gap:22px;padding:10px 0;color:var(--teal);font-weight:600;font-size:13px}.modal .primary{width:100%;margin-top:15px}.secondary{border:1px solid var(--line);padding:12px;border-radius:10px;background:transparent;margin-top:10px;width:100%}.modal .logo-win{width:180px;max-height:70px;object-fit:contain}.toast{position:absolute;bottom:75px;left:50%;transform:translate(-50%,12px);max-width:85%;background:#183b3ced;color:white;padding:12px 18px;border-radius:14px;font-size:12px;text-align:center;z-index:70;pointer-events:none;opacity:0;transition:.2s}.toast.visible{opacity:1;transform:translate(-50%,0)}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}#confetti{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:60}.confetti-piece{position:absolute;top:-20px;width:8px;height:13px;animation:fall 2.8s ease-in forwards}@keyframes fall{to{transform:translateY(110vh) rotate(680deg);opacity:0}}
#app.compact{padding-left:14px;padding-right:14px}#app.compact .topbar{height:67px}#app.compact .brand{height:58px;width:168px}#app.compact .topnote{display:none}#app.compact .header-actions{margin-left:auto}#app.compact .home{padding-top:14px}#app.compact .intro{margin-bottom:13px}#app.compact .intro h1{font-size:31px}#app.compact .intro p{position:static;font-size:12px;line-height:1.4;max-width:100%;margin-top:8px}#app.compact .home-content{display:flex;flex-direction:column;gap:15px;align-items:stretch}#app.compact .scene-preview{flex:1;min-height:90px;width:100%;border-radius:15px;border-width:4px}#app.compact .setup{flex-shrink:0;gap:8px}#app.compact .scene-choices{gap:6px;margin-bottom:3px}#app.compact .scene-choice img{aspect-ratio:1.5}#app.compact .scene-choice span{font-size:9px;padding-top:4px}#app.compact .section-label h2{font-size:12px}#app.compact .levels{gap:7px}#app.compact .levels button{min-height:54px;border-radius:9px;gap:3px}#app.compact .levels strong{font-size:21px}#app.compact .levels small{font-size:9px}#app.compact .start-button{min-height:45px;padding:10px 15px;margin-top:2px}#app.compact .home-footer{min-height:31px;font-size:8px}#app.compact .preview-caption{padding:30px 14px 12px}#app.compact .preview-caption h2{font-size:20px}#app.compact .preview-stamp{top:10px;left:10px;font-size:8px;padding:6px 9px}#app.compact .game-heading{height:53px;gap:12px}#app.compact .game-title{font-size:12px;display:block}#app.compact .game-title small{display:block;background:none;padding:4px 0 0;font-size:9px}#app.compact .stats{font-size:12px;gap:9px}#app.compact .text-button{font-size:12px}#app.compact .tool-group{gap:5px}#app.compact .tool-button{padding:8px;min-height:38px}#app.compact .tool-button span{display:none}#app.compact .pagination{gap:7px;font-size:10px}#app.compact .play-help{font-size:10px;line-height:1.3;margin:8px 0 10px}
#app.short .topbar{height:57px}#app.short .brand{height:50px;width:148px}#app.short .home{padding-top:10px}#app.short .intro{margin-bottom:9px}#app.short .intro h1{font-size:28px;margin-top:4px}#app.short .intro p{font-size:11px}#app.short .eyebrow{font-size:8px}#app.short .setup{gap:7px}#app.short .section-label h2{font-size:12px}#app.short .scene-choices{margin-bottom:0;gap:4px}#app.short .scene-choice img{aspect-ratio:1.5}#app.short .levels button{min-height:52px}#app.short .levels strong{font-size:21px}#app.short .start-button{min-height:40px;padding:9px 13px;margin-top:0}#app.short .home-footer{min-height:28px}#app.short .setup-note{font-size:9px}#app.short .game-heading{height:44px}#app.short .play-help{margin:5px 0 7px;font-size:10px}#app.short .tool-button{padding:7px 10px;min-height:35px}#app.short .canvas-wrap{margin-top:4px}#app.short .home-content{gap:24px}#app.short.compact .intro p{display:none}#app.short.compact .intro h1{font-size:25px}#app.short.compact .home-content{gap:8px}#app.short.compact .section-label{display:none}#app.short.compact .home-footer{min-height:24px}#app.short.compact .setup-note{display:none}
#app.tiny .intro{display:none}#app.tiny .topbar{height:48px}#app.tiny .brand{height:44px;width:137px}#app.tiny .home-footer{min-height:20px}#app.tiny .section-label{display:none}#app.tiny .setup{gap:5px}#app.tiny .levels button{min-height:44px}#app.tiny .setup-note{display:none}#app.tiny .scene-choice span{font-size:9px}#app.tiny .home-content{gap:18px}#app.tiny .game-heading{height:37px}#app.tiny .play-help{display:none}#app.tiny .game-tools{padding-bottom:7px}#app.tiny .modal-card{padding:16px}#app.tiny .modal h2{font-size:25px;margin:8px}#app.tiny .modal .completed-img{max-height:95px;width:auto;max-width:100%}#app.tiny .modal p{font-size:12px;margin:7px}#app.tiny .modal .result-stats{padding:0}#app.tiny .modal .primary{margin-top:10px;padding:10px}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}.confetti-piece{display:none}}
