@font-face{font-family:'DM Sans';src:url('fonts/dm-sans.ttf') format('truetype');font-weight:100 1000;font-display:swap}
:root{--paper:#f7f5ee;--ink:#2d4036;--muted:#7a8675;--line:#e0e2d7;--orange:#e87550;--green:#dce6ce;--white:#fffef8;--stage:#edf0e5;--stage-muted:#74846c;font-family:'DM Sans','PingFang SC','Microsoft YaHei',sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none;color-scheme:light}
*{box-sizing:border-box}body{margin:0}button,a,canvas,select{-webkit-tap-highlight-color:transparent}button,select{font:inherit;color:inherit}button{cursor:pointer;border:0}button:focus-visible,a:focus-visible,canvas:focus-visible,select:focus-visible{outline:3px solid var(--orange);outline-offset:3px}button:disabled{cursor:default}[hidden]{display:none!important}button:hover:not(:disabled){filter:brightness(.96)}button:active:not(:disabled){transform:translateY(1px)}.app{max-width:1256px;padding:0 40px;margin:auto}.header{height:118px;display:flex;align-items:center;gap:16px}.brand{display:flex;align-items:center;gap:14px;font-size:26px;font-weight:800;letter-spacing:1px;color:var(--ink)}.brand small{display:block;font-size:9px;font-weight:600;letter-spacing:3.4px;margin-top:5px}.brand-icon{width:43px;height:49px;position:relative;display:block;transform:rotate(-6deg)}.brand-icon i{position:absolute;border:1.5px solid var(--ink);border-radius:5px;width:34px;height:15px;bottom:0;left:3px;background:#a9c3a4}.brand-icon i:nth-child(2){background:#f0c86b;bottom:16px;left:8px;width:28px}.brand-icon i:nth-child(3){background:#ef8b70;bottom:32px;left:4px;width:24px}.header-note{font-size:12px;margin-left:auto;display:flex;align-items:center;gap:20px}.header-note span{font-size:9px;letter-spacing:1.8px;color:var(--muted)}.icon-button{display:inline-grid;place-items:center;width:44px;height:44px;background:transparent;border:1px solid var(--line);border-radius:50%;font-size:19px;flex-shrink:0}.icon-button svg{width:18px;height:18px}.game-shell{border:1px solid #d9ddcf;border-radius:20px;overflow:hidden;background:var(--white);box-shadow:0 12px 38px #35472b06}.game-toolbar{height:68px;padding:0 22px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.mode-tabs{display:flex;gap:6px}.mode{background:transparent;color:#73816c;padding:12px 18px;border-radius:9px;font-size:12px;font-weight:600;display:flex;align-items:center;gap:9px;min-height:44px;white-space:nowrap}.mode.active{background:var(--ink);color:var(--white);box-shadow:0 2px 2px #23322212}.dot{width:5px;height:5px;background:var(--orange);border-radius:50%}.tools{display:flex;gap:5px}.tools .icon-button{border:0;color:#68795f}.game-layout{display:grid;grid-template-columns:minmax(0,1fr) 270px;height:620px}.play-area{position:relative;background:var(--stage);overflow:hidden;touch-action:none;min-width:0;isolation:isolate;transition:background .45s}.play-area:before{content:'';position:absolute;inset:0;background-image:radial-gradient(var(--stage-muted) .65px,transparent .65px);background-size:21px 21px;opacity:.19;pointer-events:none;z-index:-1}#game{display:block;position:absolute;height:100%;width:auto;max-width:none;left:50%;transform:translateX(-50%);touch-action:none;cursor:grab}#game:active{cursor:grabbing}.stage-label{position:absolute;top:24px;left:26px;font-size:11px;letter-spacing:.3px;display:flex;gap:9px;align-items:center;pointer-events:none;color:var(--stage-muted)}.live-dot{width:6px;height:6px;background:currentColor;border-radius:50%;box-shadow:0 0 0 4px #8eae7b16}.stage-caption{position:absolute;bottom:22px;left:26px;right:26px;display:flex;justify-content:space-between;align-items:center;color:var(--stage-muted);font-size:10px;pointer-events:none}.stage-caption span:first-child{font-size:9px;letter-spacing:1.8px}.stage-hint{position:absolute;top:42%;left:0;width:100%;display:flex;justify-content:center;gap:13px;align-items:center;font-size:14px;font-weight:500;pointer-events:none;color:var(--stage-muted);transition:opacity .25s}.stage-hint small{display:block;font-size:10px;font-weight:400;margin-top:8px;opacity:.8}.drag-icon{font-size:34px;font-weight:400}.sidebar{padding:28px 25px 20px;border-left:1px solid var(--line);display:flex;flex-direction:column;gap:20px}.eyebrow{font-size:9px;letter-spacing:1.6px;font-weight:600;color:var(--muted)}.score-label{font-size:12px;margin-top:14px}.score-number{display:flex;gap:13px;align-items:baseline}.score-number #score{font-size:78px;font-weight:500;letter-spacing:-5px;line-height:1.2;font-variant-numeric:tabular-nums}.score-unit{font-size:12px;color:var(--muted)}.best-line{display:flex;align-items:center;justify-content:space-between;font-size:11px;padding-top:13px;margin-top:8px;border-top:1px solid var(--line)}.best-line>span{display:flex;gap:6px;align-items:center;color:var(--muted)}.best-line svg{width:15px;height:15px;color:#b48e4b}.best-line strong{font-weight:600;font-size:13px}.next-panel{border:1px solid var(--line);border-radius:12px;padding:14px 15px 12px;background:#f8f8ef}.section-label{display:flex;align-items:center;justify-content:space-between;font-size:11px}.section-label .eyebrow{font-size:8px}#next{display:block;width:100%;height:84px;object-fit:contain}.next-name{font-size:10px;text-align:center;color:var(--muted)}.goal-heading{display:flex;gap:8px;align-items:center}.tiny-flag{font-size:22px;line-height:1;color:#82956e}.goal-heading strong{font-size:11px;font-weight:600}.goal-panel p{font-size:10px;color:var(--muted);margin:10px 0 15px}.progress-track{height:5px;border-radius:4px;background:#e8ecdf;overflow:hidden}.progress-track>div{height:100%;width:0;background:#8aa77a;border-radius:4px;transition:width .4s}.progress-caption{display:flex;justify-content:space-between;font-size:9px;color:var(--muted);margin-top:9px;gap:5px}.sidebar-bottom{margin-top:auto}.drop-button{width:100%;display:flex;align-items:center;justify-content:space-between;background:var(--orange);color:#fffdf7;padding:15px 18px;border-radius:10px;font-size:12px;font-weight:600;min-height:48px;box-shadow:0 3px 0 #c45b3920;transition:background .15s}.drop-button:disabled{background:#eceee3;color:#929b86;box-shadow:none}.drop-button span{font-size:20px;line-height:1}.sidebar-bottom p{font-size:9px;color:var(--muted);text-align:center;margin:13px 0 0}.mobile-goal,.thumb-dock{display:none}footer{display:flex;justify-content:space-between;font-size:10px;color:var(--muted);padding:14px 1px 20px}footer>span{display:flex;gap:8px;align-items:center}.footer-dot{width:5px;height:5px;background:#9ba68e;border-radius:50%}.footer-actions{gap:8px}.footer-actions button{background:none;min-height:44px;padding:8px 12px;font-size:11px;color:#63765a}.footer-actions button+button{position:relative}.footer-actions button+button:before{content:'';position:absolute;left:0;height:12px;top:16px;border-left:1px solid var(--line)}.milestone,.placement-feedback{position:absolute;left:0;width:100%;text-align:center;font-weight:600;pointer-events:none;opacity:0;transform:translateY(8px);transition:opacity .25s,transform .3s}.milestone{top:68px;font-size:18px;color:var(--orange);z-index:2}.placement-feedback{top:35%;font-size:13px;color:var(--stage-muted)}.milestone.show,.placement-feedback.show{opacity:1;transform:translateY(0)}.overlay{position:absolute;inset:0;display:grid;place-items:center;background:#e8eddcb0;backdrop-filter:blur(8px);z-index:5;padding:20px;animation:appear .22s ease}.result-card{background:var(--white);border:1px solid #d5dccb;box-shadow:0 14px 50px #263a2918;border-radius:18px;max-width:340px;width:100%;padding:28px;text-align:center}.result-card .eyebrow{color:#ba724b;font-size:9px}h2{font-size:23px;font-weight:700;letter-spacing:-.7px;margin:12px 0}p{line-height:1.8}.result-card p{font-size:11px;color:var(--muted);margin:0}.result-score{font-size:72px;font-weight:550;line-height:1.15;letter-spacing:-4px;margin:15px 0 0}.result-score span{font-size:12px;margin-left:10px;letter-spacing:0}.result-best{font-size:10px;color:var(--muted);margin-top:5px}.result-details{display:grid;grid-template-columns:1fr 1fr;margin:18px 0 20px;padding:13px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.result-details>div+div{border-left:1px solid var(--line)}.result-details span{display:block;font-size:9px;color:var(--muted)}.result-details strong{display:block;font-size:18px;font-weight:500;margin-top:5px}.result-actions{display:flex;align-items:center;justify-content:space-around;gap:5px}.primary-button{width:100%;background:var(--ink);color:var(--white);padding:14px 17px;border-radius:10px;font-size:12px;min-height:46px;display:flex;align-items:center;justify-content:space-between;font-weight:500}.primary-button span{font-size:18px}.text-button{font-size:10px;background:transparent;color:#627657;padding:12px 4px;min-height:44px}.secondary-button{width:100%;background:transparent;border:1px solid var(--line);font-size:12px;border-radius:10px;min-height:46px;margin-top:10px}.toast{position:fixed;bottom:calc(22px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);padding:13px 20px;border-radius:10px;background:var(--ink);color:var(--white);z-index:100;font-size:12px;width:max-content;max-width:90vw;text-align:center;box-shadow:0 5px 25px #0002}.revive-button{display:flex;align-items:center;justify-content:space-between;width:100%;background:#e6eedc;color:#4f6b44;min-height:46px;padding:12px 15px;font-size:11px;border-radius:10px;margin:0 0 6px}.revive-note{font-size:9px!important;margin:0 0 13px!important}
/* Quiet, focused sheets; all controls retain comfortable touch targets. */
dialog{background:var(--white);color:var(--ink);border:1px solid var(--line);border-radius:18px;max-width:430px;width:calc(100% - 32px);padding:32px;max-height:calc(100dvh - 32px);overflow:auto;box-shadow:0 20px 100px #21381b25}dialog::backdrop{background:#263e3066;backdrop-filter:blur(5px)}dialog h2{padding-right:10px}dialog p,dialog li{font-size:12px;line-height:1.9;color:#748169}dialog li{padding:8px 0}dialog li strong{color:var(--ink);font-weight:600}dialog ol{padding-left:20px}.dialog-close{position:absolute;right:10px;top:10px}.help-note{font-size:10px!important;margin:16px 0;line-height:1.9}.setting-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:20px 0;border-bottom:1px solid var(--line);font-size:13px}.setting-row small{display:block;font-size:10px;color:var(--muted);margin-top:7px}.toggle{width:44px;height:44px;border-radius:15px;background:transparent;position:relative;flex-shrink:0}.toggle:before{content:'';position:absolute;width:42px;height:25px;left:1px;top:9px;border-radius:15px;background:#dce1d1}.toggle:after{content:'';width:19px;height:19px;border-radius:50%;background:#fffdf7;position:absolute;left:4px;top:12px;transition:transform .18s}.toggle[aria-checked=true]:before{background:#7f9b76}.toggle[aria-checked=true]:after{transform:translateX(17px)}.setting-link{display:block;background:transparent;font-size:11px;color:#607254;text-decoration:none;padding:13px 0;min-height:44px}.setting-row select{background:#f3f5eb;border:1px solid var(--line);border-radius:9px;padding:10px;font-size:12px;min-height:44px}.stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;border-bottom:1px solid var(--line);padding:16px 0 24px}.stat-grid div{text-align:center}.stat-grid strong{display:block;font-size:32px;font-weight:500;letter-spacing:-1px}.stat-grid span{font-size:10px;color:var(--muted)}.record-heading{font-size:11px;font-weight:500;margin-top:23px}.history-row{display:flex;justify-content:space-between;padding:12px 0;border-bottom:1px solid #e9ecdf;font-size:11px}.history-row strong{font-weight:500}.history-row .not-played{color:#939e87;font-size:10px}#challenge-form label{display:block;font-size:11px;margin:24px 0 9px}#challenge-code{display:block;width:100%;border:1px solid #bbc7b0;border-radius:9px;background:#f6f6ed;color:var(--ink);padding:14px;font:500 17px 'DM Sans',sans-serif;letter-spacing:2px;margin-bottom:15px}#challenge-code:focus-visible{outline:2px solid var(--orange);outline-offset:2px}.form-error{font-size:10px!important;color:#a94f39!important}#ad-status-panel{padding:13px 15px;background:#f3f4e9;border-radius:9px;margin:8px 0}#ad-status-panel p{margin:0;font-size:11px;color:#68775b}#ad-status-panel small{font-size:10px;color:var(--muted)}#ad-status-panel button{padding-bottom:0}.scene-list{display:flex;flex-direction:column;gap:9px;margin-top:12px}.scene-card{display:flex;align-items:center;gap:14px;padding:13px;border:1px solid var(--line);border-radius:11px}.scene-swatch{width:52px;height:47px;display:grid;place-items:center;border-radius:8px;border:1px solid #35472b12;font-size:22px;color:#718569}.scene-info{flex:1}.scene-info strong{display:block;font-size:12px;font-weight:600}.scene-info small{display:block;margin-top:5px;font-size:10px;color:var(--muted)}.scene-card button{min-width:65px;min-height:44px;background:#e8eedf;color:#526d44;border-radius:8px;font-size:11px;padding:8px}.scene-card button:disabled{background:#f2f3ea;color:#96a28b}.collection-heading{display:flex;justify-content:space-between;margin-top:27px}.piece-collection{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.collected-piece{border:1px solid var(--line);border-radius:9px;min-height:89px;text-align:center;background:#f8f9f0;padding:5px}.collected-piece canvas{display:block;width:100%;height:49px;object-fit:contain}.collected-piece span{font-size:9px;color:#76886a;display:block}.collected-piece.unknown{opacity:.45}.collected-piece.unknown canvas{filter:grayscale(1)}#score-card-preview{display:block;width:100%;max-height:50dvh;object-fit:contain;margin:17px 0;border-radius:10px}.native-app,.native-app body{overscroll-behavior:none}.native-app body{user-select:none;-webkit-user-select:none}.native-app input{user-select:text;-webkit-user-select:text}.bump{animation:bump .28s ease}@keyframes bump{50%{transform:scale(1.09);color:var(--orange)}}@keyframes appear{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@media(min-width:1400px){.app{padding-top:12px}.header{height:126px}}
@media(max-width:1050px) and (min-width:851px){.app{padding:0 24px}.header{height:92px}.game-layout{grid-template-columns:minmax(0,1fr) 235px}.sidebar{padding:24px 19px}.header-note span{display:none}}
@media(max-width:850px){
  .app{padding:0 12px;max-width:480px;display:flex;flex-direction:column;min-height:100svh;min-height:100dvh;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
  .header{height:77px;flex-shrink:0;gap:7px}.brand{font-size:22px;gap:9px}.brand small{font-size:7px;letter-spacing:2.5px}.brand-icon{transform:scale(.84) rotate(-6deg);width:38px}.header-note{display:none}.header .settings-trigger{margin-left:auto}.header>.icon-button{width:44px;height:44px}.game-shell{border-radius:17px;display:flex;flex-direction:column;flex:1;min-height:0}.game-toolbar{height:59px;padding:0 8px;flex-shrink:0}.mode-tabs{gap:0}.mode{font-size:11px;padding:10px 12px;gap:6px}.tools{gap:0}.tools .icon-button{width:40px;height:44px}.tools .icon-button svg{width:17px}.game-layout{display:flex;flex-direction:column;height:auto;flex:1;min-height:0}.sidebar{order:1;display:grid;grid-template-columns:1fr 110px;border-left:0;padding:13px 19px 12px;gap:0;flex-shrink:0}.score-panel{position:relative}.score-panel>.eyebrow{display:none}.score-label{font-size:10px;margin:0}.score-number{display:inline-flex;gap:8px}.score-number #score{font-size:43px;letter-spacing:-2.8px;line-height:1.14}.score-unit{font-size:10px}.best-line{position:absolute;left:99px;bottom:5px;border:0;padding:0;margin:0;display:block;font-size:9px}.best-line>span{font-size:9px;gap:4px}.best-line svg{width:13px;height:13px}.best-line strong{display:block;font-size:15px;margin:3px 0 0 17px}.next-panel{height:65px;padding:8px 10px;position:relative;border-radius:9px}.section-label{font-size:9px}.section-label .eyebrow{display:none}#next{height:39px}.next-name,.goal-panel,.sidebar-bottom{display:none}.mobile-goal{display:grid;grid-column:1/-1;grid-template-columns:1fr auto;gap:6px;font-size:9px;color:#7d8d70;padding-top:11px}.mobile-goal>div{grid-column:1/-1;height:3px;background:#edf0e4;border-radius:3px;overflow:hidden}.mobile-goal i{display:block;height:100%;width:0;background:#a0b98d;border-radius:3px;transition:width .3s}.play-area{order:2;width:100%;border-top:1px solid var(--line);flex:1;min-height:325px;height:calc(100dvh - 330px);max-height:700px}.stage-label{font-size:10px;top:19px;left:19px}.stage-caption{bottom:15px;left:19px;right:19px;font-size:8px}.stage-caption span:first-child{font-size:7px;letter-spacing:1.2px}.stage-hint{font-size:12px;gap:10px;top:40%}.stage-hint small{font-size:9px}.drag-icon{font-size:30px}.milestone{top:55px;font-size:15px}.placement-feedback{font-size:12px}.thumb-dock{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:12px 16px;background:var(--white);border-top:1px solid var(--line);flex-shrink:0}.thumb-dock>span{font-size:10px;color:var(--muted);max-width:40%;line-height:1.6}.thumb-dock .drop-button{width:165px;font-size:12px;min-height:48px}.overlay{padding:13px}.result-card{max-width:300px;padding:22px}.result-card h2{font-size:21px}.result-score{font-size:59px;margin-top:9px}.result-details{margin:13px 0 15px;padding:10px 0}.result-card p{font-size:10px}.result-actions{gap:0}.result-actions .text-button{font-size:10px}.result-card .eyebrow{font-size:8px}.revive-note{margin-bottom:9px!important}footer{padding:0;flex-shrink:0;height:52px;align-items:center;justify-content:center}footer>span:first-child{display:none}.footer-actions{width:100%;gap:0;justify-content:space-around}.footer-actions button{flex:1;font-size:11px;padding:10px 7px}.footer-actions button+button:before{top:16px}.native-app .header{height:68px}.native-app .app{height:100dvh;overflow:hidden}.native-app .play-area{height:auto;min-height:260px;max-height:none}dialog{padding:28px}.dialog-close{right:8px;top:8px}.stat-grid strong{font-size:30px}
}
@media(max-height:760px) and (max-width:850px){.header{height:63px}.native-app .header{height:61px}.sidebar{padding-top:9px;padding-bottom:8px}.mobile-goal{padding-top:7px}.score-number #score{font-size:36px}.next-panel{height:58px}#next{height:33px}.play-area{min-height:280px}.thumb-dock{padding:8px 14px}.thumb-dock .drop-button{min-height:44px}.stage-caption{bottom:12px}.result-card{padding:17px}.result-score{font-size:44px}.result-details{margin:10px 0;padding:7px 0}.result-card h2{font-size:18px;margin:8px 0}.result-card p{font-size:9px}.result-best{font-size:9px}.result-details strong{font-size:15px}.result-details span{font-size:8px}.result-actions .text-button{font-size:9px;min-height:40px;padding:8px 2px}.primary-button,.revive-button{min-height:42px;padding:11px 14px}.revive-note{font-size:8px!important;margin-bottom:7px!important}footer{height:46px}}
@media(max-width:360px){.app{padding-left:8px;padding-right:8px}.brand{font-size:19px}.brand small{letter-spacing:1.7px}.mode{padding-left:9px;padding-right:9px;font-size:10px}.tools .icon-button{width:36px}.best-line{left:85px}.sidebar{padding-left:15px;padding-right:15px}.thumb-dock .drop-button{width:154px}.thumb-dock>span{font-size:9px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
html[lang=en] .brand>span:last-child{font-size:21px;letter-spacing:-.6px}html[lang=en] .brand small{font-size:8px;letter-spacing:2.2px}
@media(max-width:850px){.overlay{position:fixed;inset:0;z-index:20;padding:20px}.score-label{font-size:11px}.section-label{font-size:10px}.mobile-goal{font-size:10px}.footer-actions button{font-size:12px}html[lang=en] .brand>span:last-child{font-size:16px}html[lang=en] .brand small{font-size:6px;letter-spacing:2px}}
@media(max-height:650px) and (max-width:850px){.play-area{min-height:220px}.native-app .play-area{min-height:210px}.mobile-goal{font-size:9px}#collection-dialog{max-height:calc(100dvh - 20px)}}
@media(max-width:360px){html[lang=en] .mode{font-size:9px;padding:8px 7px}}
.stage-label,.stage-caption,.placement-feedback{transition:color .45s,opacity .25s,transform .3s}
@media(max-width:360px){.footer-actions button{white-space:nowrap;font-size:11px}}
@media(max-height:650px) and (max-width:850px){.stage-label{top:12px}.stage-caption span:last-child{display:none}}
.overlay{position:fixed;inset:0;z-index:40}
/* Transient feedback must never intercept play or footer controls. */
.toast{pointer-events:none}
/* Illustrated scene selector and three themed collections. */
.scene-picker{position:absolute;top:12px;right:14px;z-index:2;display:flex;align-items:center;gap:10px;min-height:44px;padding:8px 13px;border:1px solid #8d9c7d35;border-radius:20px;background:#fff9ebd9;color:#53634b;font-size:11px;box-shadow:0 2px 6px #4c5b2b06;backdrop-filter:blur(8px)}
.scene-picker>span:last-child{font-size:15px}.stage-label{max-width:calc(100% - 180px);line-height:1.6}.stage-label>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.play-area:before{display:none}.stage-hint{font-size:12px;text-shadow:0 1px 10px #fff7e6}.stage-hint small{font-size:9px}.stage-caption{font-weight:500;text-shadow:0 1px 5px #fff8e577}
html[data-scene=night] .stage-hint,html[data-scene=night] .stage-caption{text-shadow:0 1px 8px #263d50}.milestone{text-shadow:0 1px 5px #fff8e9}
#collection-dialog{width:790px;max-width:calc(100vw - 28px);padding:32px;max-height:calc(100dvh - 40px);color:var(--ink)}
#collection-dialog h2{font-size:24px;margin-bottom:8px}.collection-intro{margin:0 0 22px!important;font-size:12px!important;color:var(--muted)}
.scene-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.scene-card{display:flex;flex-direction:column;gap:0;padding:0;background:#f8f6ef;border:1px solid #dddccd;border-radius:13px;overflow:hidden;align-items:stretch;position:relative}
.scene-card.selected{border-color:#8ba17c;box-shadow:0 0 0 1px #8ba17c}.scene-artwork{position:relative;overflow:hidden;background:#e7eddf}.scene-preview{display:block;width:100%;height:auto;aspect-ratio:16/10;object-fit:cover}.scene-tag{position:absolute;top:9px;left:9px;font-size:7px;font-weight:600;letter-spacing:1.3px;background:#fff7e5bf;border-radius:3px;padding:4px 6px;color:#56634e}
.scene-info{padding:14px;display:flex;flex-direction:column;gap:0;min-width:0;flex:1}.scene-info strong{font-size:15px;line-height:1.5}.scene-info p{font-size:10px;line-height:1.7;margin:6px 0 12px;flex:1;color:#7b836e}.scene-info small{font-size:9px;line-height:1.5;color:#7b836e;margin:0 0 10px}.scene-info button{min-height:44px;padding:10px 12px;font-size:11px;background:#e8ecdf;color:#53634c;border-radius:7px;margin:0;width:100%}.scene-card.selected button{background:#617554;color:#fff9e9}.scene-card.locked button{background:#eeede4;color:#9c9e90}.scene-card.locked .scene-preview{filter:saturate(.7)}
.collection-heading{margin-top:30px}.piece-collection{display:block}.album-group+.album-group{margin-top:24px}.album-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:12px;border-bottom:1px solid #dedfd2;padding-bottom:10px;margin-bottom:10px}.album-heading span{font-family:'DM Sans',sans-serif;font-size:10px;color:#8a947e}.album-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.collected-piece{display:flex;flex-direction:column;align-items:center;padding:4px 3px 9px;border:1px solid #e1e2d6;border-radius:10px;background:#fffdf6;min-width:0;position:relative}.collected-piece canvas{width:100%;height:auto;aspect-ratio:200/128;max-width:124px}.collected-piece>span{font-size:10px;color:#627057;line-height:1.4;text-align:center;min-height:14px}.collected-piece>small{font-size:8px;color:#a3aa96;margin-top:4px}.collected-piece.found{border-color:#b5c4a5;background:#f0f3e7}.collected-piece.found>small{color:#768d60}.collected-piece.undiscovered canvas{opacity:.6;filter:saturate(.75)}
@media(max-width:850px){.scene-picker{top:10px;right:12px;padding:8px 11px;font-size:10px;gap:6px}.stage-label{left:16px;top:22px;max-width:calc(100% - 160px);font-size:9px}.stage-hint{font-size:11px}.stage-hint small{font-size:8px}.stage-caption{left:18px;right:18px;font-size:9px}#collection-dialog{padding:26px 20px;max-height:calc(100dvh - 24px)}#collection-dialog h2{font-size:21px}.scene-list{grid-template-columns:1fr;gap:11px}.scene-card{display:grid;grid-template-columns:42% 1fr;min-height:156px}.scene-artwork{height:100%}.scene-preview{width:100%;height:100%;aspect-ratio:auto;object-fit:cover}.scene-tag{font-size:6px;letter-spacing:1px;left:7px;top:8px;padding:4px}.scene-info{padding:12px}.scene-info strong{font-size:14px}.scene-info p{font-size:9px;margin:4px 0 6px;line-height:1.6}.scene-info small{font-size:8px;margin-bottom:7px}.scene-info button{min-height:44px;font-size:10px;padding:8px}.album-grid{gap:6px}.collected-piece>span{font-size:9px}.collected-piece>small{font-size:7px}.album-heading{font-size:11px}}
@media(max-width:360px){.scene-picker{font-size:9px;right:8px;padding:8px 10px}.stage-label{font-size:8px;left:12px;max-width:calc(100% - 143px)}#collection-dialog{padding-left:14px;padding-right:14px}.scene-info{padding:10px}.scene-info strong{font-size:12px}.scene-tag{font-size:5px}.collected-piece>span{font-size:8px}.scene-card{grid-template-columns:40% 1fr}}
.scene-backdrop{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
/* Quiet, readable labels over the painted environments. */
.stage-label{padding:5px 9px;border-radius:12px;background:#fff8e8d9;color:#4a5e43;backdrop-filter:blur(5px)}
.stage-caption>span{padding:3px 6px;border-radius:4px;background:#fff8e8c9;color:#4a5a40;text-shadow:none}
html[data-scene=night] .stage-label{background:#263d50cc;color:#f1e4c3}html[data-scene=night] .stage-caption{text-shadow:none}
.collected-piece.undiscovered canvas{opacity:.84;filter:saturate(.92)}
@media(max-width:850px){.stage-label{top:15px;left:12px;font-size:8px;max-width:calc(100% - 155px)}.stage-caption>span{padding:3px 4px}.stage-caption span:last-child{font-size:8px}}
@media(prefers-reduced-motion:reduce){.bump,.placement-feedback,.milestone{animation:none!important}}
/* v0.6: the playfield owns the screen; controls and the ad reservation have fixed bounds. */
.app,.native-app .app{width:100%;max-width:1120px;height:100dvh;min-height:0;padding:0 12px 8px;margin:auto;display:flex;flex-direction:column;gap:0;overflow:hidden}
.header,.native-app .header{height:54px;min-height:54px;gap:7px;flex-shrink:0}.brand{gap:8px;font-size:18px;letter-spacing:.5px;margin-right:auto}.brand small{font-size:6px;letter-spacing:2px;margin-top:3px}.brand-icon{width:29px;height:35px;transform:rotate(-6deg) scale(.72);transform-origin:left center;margin-right:-6px}.header-note{display:none}.header>.icon-button{width:44px;height:44px;font-size:17px;border-color:transparent}
html[lang=en] .brand>span:last-child{font-size:16px;letter-spacing:-.5px}html[lang=en] .brand small{font-size:5px;letter-spacing:1.5px}
.game-shell{display:flex;flex-direction:column;flex:1;min-height:0;border-radius:17px;box-shadow:0 7px 20px #35472b05;position:relative}.game-toolbar{height:46px;min-height:46px;padding:0 10px;gap:10px}.mode-tabs{gap:3px}.mode{font-size:11px;padding:8px 18px;min-height:38px;border-radius:9px;gap:5px}.tools{gap:0}.tools .icon-button{width:42px;height:44px}.tools .icon-button svg{width:17px;height:17px}
.game-layout{height:auto;display:block;flex:1;min-height:0;position:relative}.play-area,.native-app .play-area{position:relative;width:100%;height:100%;min-height:0;max-height:none;order:initial;flex:initial;isolation:isolate;border-top:0}.scene-backdrop{z-index:0}#game{z-index:1}.stage-hint{z-index:2;top:40%;font-size:12px;gap:9px}.stage-hint small{font-size:9px}.stage-label{display:none}.scene-picker{z-index:3;top:auto;bottom:12px;left:12px;right:auto;min-height:40px;padding:8px 12px;font-size:10px;background:#fff9ebe8}.stage-caption{z-index:2;bottom:17px;left:auto;right:12px;font-size:8px}.stage-caption span:first-child{display:none}.stage-caption span:last-child{font-size:8px;background:#fff8e8c9}
.sidebar{display:contents}.sidebar .score-panel{position:absolute;left:14px;top:10px;z-index:3;width:77px;padding:7px 9px 6px;background:#fff9ebe8;border:1px solid #fff6df99;border-radius:13px;box-shadow:0 2px 10px #35472b05;pointer-events:none}.score-panel>.eyebrow,.score-label,.score-unit{display:none}.score-number{gap:0;display:block;line-height:1}.score-number #score{font-size:36px;line-height:1;letter-spacing:-2px}.score-panel .best-line{position:static;left:auto;top:auto;display:flex;align-items:center;gap:4px;justify-content:space-between;margin:5px 0 0;padding:0;border:0;font-size:9px}.best-line>span{font-size:0}.best-line svg{display:none}.best-line>span:after{content:'BEST';font-size:7px;letter-spacing:1px}.best-line strong{font-size:10px}
.sidebar .next-panel{position:absolute;top:10px;right:12px;z-index:3;width:88px;height:70px;padding:7px 3px 2px;background:#fff9ebe8;border:1px solid #fff6df99;border-radius:13px;pointer-events:none}.next-panel .section-label{display:block;text-align:center;font-size:8px;margin:0}.next-panel .eyebrow,.next-name{display:none}#next{display:block;width:80px;height:43px;object-fit:contain;margin:auto}.goal-panel,.sidebar-bottom,.mobile-goal{display:none}
.mission-hud{position:absolute;top:13px;left:100px;right:110px;z-index:3;text-align:center;pointer-events:none;color:#344a36}.mission-title{pointer-events:auto;max-width:100%;font-size:12px;line-height:1.4;font-weight:650;background:#fff8e7e8;border:1px solid #fff7e0b3;border-radius:20px;padding:6px 12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-height:32px}.mission-title:after{content:'⌄';margin-left:6px;font-size:10px;color:#819070}#mission-meta{font-size:9px;line-height:1.7;margin-top:3px;color:#5d7052;background:#fff9e8c9;border-radius:8px;display:table;padding:0 7px;margin-left:auto;margin-right:auto;white-space:nowrap}#mission-meta.urgent{color:#a75034;background:#fff0dde8}#mission-progress{height:3px;max-width:110px;background:#d9dfcb99;border-radius:4px;margin:4px auto 0;overflow:hidden}#mission-progress i{display:block;background:#829d69;height:100%;width:0;transition:width .2s}
.thumb-dock{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;gap:10px;padding:8px 12px;border-top:1px solid var(--line);background:var(--white);min-height:60px}.thumb-dock>span{font-size:10px;max-width:43%;line-height:1.5;color:#7e8c74}.thumb-dock .drop-button{width:190px;min-height:44px;font-size:12px;padding:12px 16px;border-radius:12px}.placement-feedback{z-index:2;top:43%;font-size:12px}.milestone{z-index:3;top:90px;font-size:14px}
.banner-slot{height:64px;min-height:64px;display:flex;align-items:center;justify-content:center;padding:8px 0 0;flex-shrink:0}.banner-placeholder{width:320px;max-width:100%;height:50px;display:flex;align-items:center;justify-content:center;gap:12px;background:#eeeee5;border:1px dashed #cbd0c0;border-radius:7px;color:#8b9480;font-size:10px;user-select:none;pointer-events:none}.banner-placeholder>span:first-child{font-size:8px;letter-spacing:1px;border:1px solid #c3caba;border-radius:3px;padding:2px 4px}.banner-placeholder small{font:9px 'DM Sans',sans-serif;color:#a4ac9b}
#levels-dialog{width:760px;max-width:calc(100vw - 24px);padding:28px;max-height:calc(100dvh - 24px)}.level-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.level-dialog-head h2{margin:8px 0 0}.level-dialog-head .dialog-close{position:static;flex-shrink:0}.campaign-summary{display:flex;justify-content:space-between;align-items:center;margin-top:22px;font-size:11px;color:var(--muted)}.campaign-summary strong{font-size:18px;color:var(--ink)}.level-world{margin-top:24px}.level-world-title{display:flex;justify-content:space-between;font-size:12px;padding-bottom:9px;border-bottom:1px solid var(--line);margin-bottom:10px}.level-world-title span{font:9px 'DM Sans',sans-serif;color:#8c967f;letter-spacing:1px}.level-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.level-card{padding:0;overflow:hidden;border:1px solid #dce0d1;border-radius:12px;background:#fffdf5;text-align:left;position:relative;color:#4c6044;min-height:142px}.level-cover{height:64px;background-size:cover;background-position:center 50%;position:relative}.level-number{position:absolute;left:8px;top:7px;border-radius:7px;background:#fff9e6dd;padding:3px 6px;font-size:12px;font-weight:650}.level-badge{position:absolute;right:7px;bottom:7px;background:#fff7e5e0;border-radius:5px;font-size:8px;padding:3px 5px}.level-copy{padding:9px}.level-copy strong{display:block;font-size:11px;line-height:1.4}.level-copy small{display:block;font-size:8px;line-height:1.6;color:#8b967f;margin-top:5px}.level-card:disabled{opacity:.56;filter:saturate(.5)}.level-card.completed{border-color:#a8bb93}.level-card.completed .level-badge{background:#5b7651;color:#fff9e5}.level-card.current{box-shadow:0 0 0 1px #93aa7b;border-color:#93aa7b}.result-card .secondary-button{margin-bottom:9px}.result-card .primary-button{margin-bottom:0}
@media(min-width:851px){.app{max-width:1120px;padding-left:20px;padding-right:20px}.header{height:58px;min-height:58px}.brand{font-size:20px}.game-toolbar{height:48px;min-height:48px;padding:0 16px}.mode{padding-left:22px;padding-right:22px}.thumb-dock{padding:9px 16px}.score-number #score{font-size:41px}.sidebar .score-panel{width:90px}.sidebar .next-panel{width:100px;height:76px}.mission-hud{left:130px;right:140px}.mission-title{font-size:13px}#mission-meta{font-size:10px}#next{width:90px;height:48px}.stage-hint{font-size:13px}}
@media(max-width:850px){html[lang=en] .brand>span:last-child{font-size:14px}html[lang=en] .brand small{font-size:5px;letter-spacing:1px}.app,.native-app .app{padding-left:8px;padding-right:8px}.game-toolbar{padding-left:7px;padding-right:5px;gap:3px}.mode{padding:8px 14px;font-size:10px}.tools .icon-button{width:40px}.header{gap:3px}.header>.icon-button{width:40px}.brand{font-size:17px}.banner-slot{height:62px;min-height:62px}.thumb-dock{min-height:58px;padding:7px 10px}.mission-hud{left:97px;right:105px}.scene-picker{bottom:10px;left:10px;top:auto;font-size:9px}.stage-caption{bottom:17px;right:10px}.stage-caption span:last-child{font-size:7px}#levels-dialog{padding:22px 17px}.level-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.level-cover{height:76px}.level-card{min-height:150px}.level-copy strong{font-size:12px}.level-copy small{font-size:9px}}
@media(max-width:360px){.header,.native-app .header{height:48px;min-height:48px}.brand{font-size:15px;gap:5px}.brand-icon{transform:rotate(-6deg) scale(.65);width:25px;margin-right:-5px}.header>.icon-button{width:38px;height:44px}.mode{padding-left:10px;padding-right:10px;font-size:9px}.tools .icon-button{width:36px}.sidebar .score-panel{left:9px;top:9px;width:66px;padding:7px}.score-number #score{font-size:31px}.sidebar .next-panel{top:9px;right:8px;width:72px;height:64px}#next{width:67px;height:38px}.mission-hud{left:82px;right:86px;top:11px}.mission-title{font-size:10px;padding:5px 8px}#mission-meta{font-size:8px}.thumb-dock>span{font-size:8px}.thumb-dock .drop-button{width:168px;font-size:11px}.banner-slot{height:60px;min-height:60px}}

/* The tools live outside the physics canvas, keeping the whole table tappable. */
.level-tools{display:flex;align-items:center;justify-content:center;gap:7px;padding:5px 10px;min-height:54px;flex-shrink:0;background:#f1f3e9;border-top:1px solid #dfe4d5}.tool-button{display:flex;align-items:center;justify-content:center;gap:7px;min-width:90px;max-width:190px;flex:1;min-height:44px;border:1px solid #c9d5ba;background:#fffdf3;border-radius:10px;padding:6px 10px;font-size:11px;font-weight:600;color:#486345;box-shadow:0 2px 0 #d5dec9}.tool-icon{font-size:23px;font-weight:400;line-height:1;color:#819c6d}.tool-button small{font-size:9px;white-space:nowrap;color:#91a17f}.tool-button:disabled{background:#e9ede1;border-color:#dce2d3;box-shadow:none;color:#7c8974}.tool-button:disabled .tool-icon{opacity:.45}.tool-button.armed{background:#dff2ed;border-color:#9accc2}.tool-button.armed .tool-icon{color:#63a49b;opacity:1}.tool-button.armed small{color:#468f83}.mechanism-chip{position:absolute;z-index:3;top:97px;left:13px;pointer-events:none;max-width:132px;padding:7px 9px;border-radius:9px;color:#506d49;background:#fff9e9e8;border:1px solid #fff9e9b3;box-shadow:0 2px 8px #34462c06}.mechanism-chip strong{display:block;font-size:10px;font-weight:650;letter-spacing:.3px}.mechanism-chip span{display:block;font-size:9px;margin-top:4px;color:#7c8f6d;font-variant-numeric:tabular-nums}.stage-hint{padding:0 22px;text-align:center;max-width:100%;line-height:1.9}.stage-hint>span:last-child{max-width:310px}.stage-hint small{line-height:1.7}.level-tip{display:block;margin-top:7px;font-size:9px;line-height:1.6;color:#77866c}.level-cover{height:86px}.level-card{min-height:196px}#level-undo-result{margin-bottom:12px}html[lang=en] .tool-name{font-size:10px}
@media(max-width:850px){.tool-button{padding:5px 8px;font-size:10px;gap:5px}.level-card{min-height:189px}.level-cover{height:76px}.level-tip{font-size:9px}.mechanism-chip{top:92px;left:12px;max-width:120px}.mechanism-chip strong{font-size:9px}.mechanism-chip span{font-size:8px}.stage-hint{font-size:11px}}
@media(max-width:360px){.tool-button{min-width:0;padding:5px;font-size:9px;gap:4px}.tool-icon{font-size:19px}.tool-button small{font-size:8px}.level-tools{gap:5px;padding:5px 7px}.mechanism-chip{left:9px;top:82px;max-width:104px;padding:6px}.mechanism-chip strong{font-size:8px}.mechanism-chip span{font-size:7px}.stage-hint{font-size:10px}.stage-hint small{font-size:8px}}
/* Short phones keep the current piece visible between the score and preview. */
@media(max-width:850px) and (max-height:700px){.mission-hud{top:83px;left:10px;right:auto;width:112px;text-align:left}.mission-title{font-size:9px;min-height:26px;padding:4px 8px;max-width:112px}#mission-meta{font-size:8px;line-height:1.6;margin-left:0;padding-left:5px;padding-right:5px;white-space:normal}#mission-progress{max-width:90px;margin-left:3px}.mechanism-chip{top:85px;left:auto;right:10px;max-width:111px}.stage-hint{top:53%;font-size:10px}.stage-hint small{font-size:8px}}

#mission-height{padding-top:5px;border-top:1px solid #d5decb;margin-top:6px;color:#8c6343;font-size:9px;font-weight:600;font-variant-numeric:tabular-nums}#upgrade-level{margin-bottom:12px}.level-copy small{line-height:1.7}.level-badge{font-size:8px}

.result-card{max-height:calc(100dvh - 26px);overflow-y:auto;scrollbar-width:thin}

#mission-sides{padding-top:4px;margin-top:4px;border-top:1px solid #d5decb;color:#597e65;font-size:9px;font-weight:600;font-variant-numeric:tabular-nums}.mechanism-chip strong{line-height:1.45}.level-badge{max-width:calc(100% - 14px);white-space:normal;text-align:right}
@media(max-width:850px) and (max-height:700px){.stage-hint{display:none}.mechanism-chip{max-width:118px}#mission-height,#mission-sides{font-size:8px}}
/* The kitten's floor controls stay separate from the aiming surface and ad slot. */
.pet-controls{display:flex;gap:5px;flex-shrink:0}.pet-controls button{min-width:53px;min-height:44px;padding:6px 9px;border:1px solid #e0d9c3aa;border-radius:18px;background:#fff8e8df;color:#8a725c;font-size:10px;box-shadow:0 2px 5px #563e2910}.pet-controls button:disabled{opacity:.4}.pet-controls button:focus-visible{outline:2px solid #d9a487;outline-offset:1px}.pet-feedback{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.stage-caption{display:none}#drop-status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(max-width:360px){.pet-controls{gap:4px}.pet-controls button{min-width:44px;padding:5px 6px;font-size:9px}}

/* A visible next reward, with no additional row taken from the play field. */
#mission-reward{position:absolute;z-index:3;top:92px;left:13px;display:table;margin:0;max-width:116px;padding:6px 8px;border:1px solid #e8d8af;border-radius:7px;background:#fff5dce8;color:#876339;font-size:9px;line-height:1.35;overflow-wrap:anywhere;box-shadow:0 2px 5px #6e583b08}
.preaim-active{border-color:#86b6a7!important;background:#eef7e9f5!important}.preaim-active .section-label{color:#426f64}
.placement-feedback{left:50%;width:max-content;max-width:85%;padding:7px 12px;border-radius:20px;background:#fff9e8ed;border:1px solid #fffdf1;transform:translate(-50%,8px);box-shadow:0 3px 12px #4f5c3320;line-height:1.5}.placement-feedback.show{transform:translate(-50%,0)}
.placement-feedback[data-tier=precise],.placement-feedback[data-tier=streak]{color:#426b4e;background:#edf7e5f5;border-color:#b6cea5}.placement-feedback[data-tier=save]{color:#956632;background:#fff1d4f5;border-color:#dec28b;font-weight:750}.placement-feedback[data-tier=record]{color:#9a573a;background:#fff1d7f7;border-color:#dfac73;font-size:15px;font-weight:750}
.result-card .result-insight{margin:13px 0;padding:10px 12px;text-align:left;border-radius:10px;background:#f1f2e7;color:#67775b;font-size:11px;line-height:1.7;border-left:3px solid #b0bf93}.result-level-link{display:block;margin:5px auto 0}.result-card .result-actions{border-top:1px solid #e4e6d8;margin-top:4px}
.sound-invite{position:absolute;z-index:4;right:10px;bottom:10px;display:flex;align-items:center;border-radius:12px;background:#fff9ecf5;border:1px solid #d9cdb5;box-shadow:0 3px 12px #4d4e2420;max-width:calc(100% - 142px)}.sound-invite button{min-height:44px;background:transparent;color:#796341;font-size:10px;padding:6px 9px}.sound-invite #sound-invite-dismiss{font-size:16px;min-width:44px;padding:6px}.sound-invite button:focus-visible{outline-offset:-3px;border-radius:10px}
@media(max-width:360px){#mission-reward{font-size:8px;padding:5px 7px;top:82px;left:9px;max-width:104px}.sound-invite{right:7px;max-width:calc(100% - 128px)}.sound-invite button{font-size:9px;padding:5px 7px}.placement-feedback[data-tier=record]{font-size:13px}}
@media(max-width:850px) and (max-height:700px){#mission-reward{top:143px;left:10px;font-size:8px;max-width:112px}}
@media(prefers-reduced-motion:reduce){.placement-feedback{transition:none}}
html[data-reduced-motion=true] .placement-feedback{transition:none}

/* A rematch is the main result action; the next attempt is always visible. */
.replay-next{font-size:11px!important;line-height:1.6!important;color:#6b7f60!important;margin:10px 0!important}.round-discovery{font-size:10px!important;color:#8b7045!important;padding:7px 10px;background:#f9efd9;border-radius:8px;margin:8px 0!important}.result-card .fresh-set-button{margin:8px 0 0;min-height:44px;border:1px solid #d7decc;background:#f0f2e8;color:#627854;width:100%;padding:10px 15px;font-size:12px}.overlay[data-replay=true] .result-card{padding:26px 28px;max-width:420px;width:100%}.overlay[data-replay=true] .result-score{font-size:64px;margin:8px 0 0}.overlay[data-replay=true] .result-card h2{font-size:23px;margin:10px 0}.overlay[data-replay=true] .result-details{display:none}.overlay[data-replay=true] .result-card .result-insight{font-size:11px;margin:10px 0;padding:8px 10px}.overlay[data-replay=true] #result-description{display:none}.overlay[data-replay=true] .result-actions{margin-top:8px;padding-top:7px}.overlay[data-replay=true] .result-actions button{font-size:10px;min-height:38px}
@media(max-height:650px){.overlay[data-replay=true]{padding:10px}.overlay[data-replay=true] .result-card{padding:18px 22px}.overlay[data-replay=true] .result-score{font-size:48px}.overlay[data-replay=true] .result-card h2{font-size:20px}.overlay[data-replay=true] .result-card .result-insight{font-size:10px}.overlay[data-replay=true] .round-discovery{margin:5px 0!important;padding:5px 8px}.overlay[data-replay=true] .replay-next{font-size:10px!important;margin:6px 0!important}}

/* Earned accents stand out; routine landings stay quiet. */
.placement-feedback[data-tier=goal]{color:#825920;background:#fff1cff5;border-color:#e0bb68;font-weight:750}
.placement-feedback[data-tier=streak]{font-weight:750;box-shadow:0 3px 16px #78a87435}

#reserve-button{display:flex;align-items:center;gap:4px;min-height:46px;max-width:145px;padding:2px 9px;background:#edf2e4;color:#496744;border:1px solid #c8d6b7;border-radius:12px;font-size:10px;font-weight:650;flex-shrink:0}#reserve-preview{width:47px;height:34px}#reserve-button:disabled{opacity:.6}#reserve-label{max-width:75px;line-height:1.3}#reserve-button[hidden],.pet-controls[hidden]{display:none!important}
@media(max-width:360px){#reserve-button{padding:2px 5px;max-width:125px;font-size:9px}#reserve-preview{width:38px}#reserve-button~.drop-button{width:auto;flex:1}}

/* Title screen: a little woodland toy theatre. */
#home-dialog{position:fixed;inset:0;width:100%;height:100%;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;color:#354e40;background:#f4efdd url('scenes/garden-v5.webp') center/cover no-repeat;overflow:auto;box-shadow:none}
#home-dialog::backdrop{background:#f4efdd}
#home-dialog:before{content:"";position:fixed;inset:0;background:linear-gradient(180deg,#fff8e9ed 0%,#fff8e9ad 35%,#f5efdd90 60%,#f8f1dff5 88%);pointer-events:none}
.home-inner{position:relative;max-width:460px;min-height:100%;margin:auto;padding: max(14px,env(safe-area-inset-top)) 28px max(18px,env(safe-area-inset-bottom));display:flex;flex-direction:column;align-items:stretch;box-sizing:border-box}
.home-top{display:flex;justify-content:space-between;align-items:center;min-height:42px;font-size:10px;letter-spacing:3px;font-weight:700;color:#667962}
.home-top .icon-button{background:#fffaf0b0;border:1px solid #b6bd9e70;border-radius:50%;width:42px;height:42px;font-size:21px}
.home-heading{text-align:center;margin-top:15px}.home-kicker{font-size:12px;letter-spacing:5px;color:#788264;margin:0 0 12px}
#home-title{margin:0;font-size:64px;line-height:1.18;letter-spacing:-4px;font-weight:900;color:#385541;text-shadow:0 3px 0 #fff7de;font-family:inherit;white-space:nowrap}#home-title span{color:#df8054}#home-title i{font-style:normal;color:#d3a449;font-size:.8em}
#home-tagline{margin:14px 0 0;font-size:13px;letter-spacing:2px;color:#64745a}
.home-art{position:relative;flex:1;min-height:200px;max-height:380px;display:flex;justify-content:center;align-items:center;margin:-18px -24px -30px}
#home-scene{width:100%;height:100%;max-height:380px;object-fit:contain;filter:drop-shadow(0 10px 12px #6c745015)}
.home-stamp{position:absolute;right:26px;top:39%;font-size:11px;line-height:1.7;transform:rotate(10deg);color:#7b785a;border:1px solid #b3ad8a;border-radius:50%;padding:12px 10px;background:#fbf6e4b0;text-align:center}.home-stamp b{font-weight:600;font-size:14px;letter-spacing:2px}
.home-actions{position:relative;margin-top:auto;text-align:center}#home-progress{font-size:12px;color:#69765b;margin:0 0 13px}
.home-play{width:100%;min-height:60px;display:flex;align-items:center;justify-content:center;gap:30px;background:#3e6048;color:#fff9e9;font:700 20px inherit;font-size:20px;font-weight:700;border:1px solid #31533c;border-radius:18px;box-shadow:0 5px 0 #294730,0 10px 20px #36533b20;cursor:pointer}.home-play span{font-size:25px;font-weight:400}.home-play:active{transform:translateY(3px);box-shadow:0 2px 0 #294730}
.home-modes{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:22px}.home-modes button{position:relative;min-height:75px;text-align:left;padding:14px 10px 12px 44px;border:1px solid #b8bf9f;border-radius:14px;background:#fffbefc9;color:#40553f;cursor:pointer}.home-modes button>span{position:absolute;left:14px;top:20px;font-size:23px;color:#a88543}.home-modes strong{display:block;font-size:14px}.home-modes small{display:block;margin-top:6px;color:#7a806a;font-size:10px}
.home-instruction{font-size:10px;letter-spacing:2px;color:#7d816a;margin:22px 0 0}#home-open{cursor:pointer}.home-play:focus-visible,.home-modes button:focus-visible,#home-open:focus-visible{outline:3px solid #c5843e;outline-offset:5px}
@media(min-width:700px){.home-inner{padding-top:24px;padding-bottom:24px}.home-heading{margin-top:18px}#home-title{font-size:74px}.home-art{max-height:430px}#home-scene{max-height:430px}}
@media(max-height:700px){.home-inner{padding-top:8px;padding-bottom:12px}.home-heading{margin-top:0}.home-kicker{margin-bottom:6px}#home-title{font-size:49px}#home-tagline{margin-top:8px;font-size:11px}.home-art{min-height:150px;max-height:240px;margin-top:-24px;margin-bottom:-24px}#home-scene{max-height:240px}.home-play{min-height:50px}.home-modes{margin-top:16px}.home-modes button{min-height:65px}.home-instruction{margin-top:14px}}
@media(prefers-reduced-motion:no-preference){.home-heading{animation:home-arrive .45s ease-out}.home-actions{animation:home-arrive .6s ease-out}@keyframes home-arrive{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}}
html[lang=en] #home-title{font-size:46px;letter-spacing:1px;line-height:1}html[lang=en] #home-tagline{letter-spacing:0}html[lang=en] .home-modes button{padding-left:36px}html[lang=en] .home-modes strong{font-size:12px}html[lang=en] .home-modes small{font-size:9px}
@media(max-height:700px){html[lang=en] #home-title{font-size:32px}.home-stamp{right:16px;font-size:9px;padding:8px}}
@media(max-height:700px){.home-art{margin:4px -24px 8px;min-height:120px;max-height:190px}#home-scene{max-height:190px}.home-stamp{top:30%;right:10px;font-size:8px;padding:7px}.home-stamp b{font-size:11px;letter-spacing:0}.home-actions #home-progress{margin-bottom:9px}}
@media(max-height:700px){.home-art{max-height:155px}#home-scene{height:155px;max-height:155px}.home-modes button{padding-top:10px;padding-bottom:10px}.home-instruction{letter-spacing:1px;margin-top:12px}}
.home-utilities{display:flex;gap:8px}.home-top #home-music{font-size:20px;letter-spacing:0}#home-music[aria-pressed=false]{opacity:.6}
.home-leaves{position:absolute;inset:0;overflow:hidden;pointer-events:none}.home-leaves i{position:absolute;top:-30px;left:12%;width:15px;height:8px;border-radius:0 90% 0 90%;background:#92a77366;animation:home-leaf 12s linear infinite;animation-delay:-4s}.home-leaves i:nth-child(2){left:83%;animation-duration:17s;animation-delay:-9s;background:#c6a45e66}.home-leaves i:nth-child(3){left:4%;animation-duration:15s;animation-delay:-12s}.home-leaves i:nth-child(4){left:90%;animation-duration:13s;animation-delay:-2s}.home-leaves i:nth-child(5){left:68%;animation-duration:20s;animation-delay:-17s;background:#b2af7466}
@keyframes home-leaf{0%{transform:translate(0,-20px) rotate(0);opacity:0}10%,80%{opacity:.8}50%{transform:translate(22px,45vh) rotate(180deg)}100%{transform:translate(-20px,100vh) rotate(360deg);opacity:0}}
@media(prefers-reduced-motion:no-preference){.home-stamp{animation:home-stamp 5s ease-in-out infinite}.home-art{animation:home-arrive .7s ease-out}.home-play span{animation:home-arrow 3.5s ease-in-out infinite}@keyframes home-stamp{50%{transform:rotate(5deg) translateY(-3px)}}@keyframes home-arrow{0%,75%,100%{transform:translateX(0)}85%{transform:translateX(5px)}}}
html[data-reduced-motion=true] #home-dialog *,html[data-reduced-motion=true] #home-dialog *:before{animation:none!important}html[data-reduced-motion=true] .home-leaves{display:none}
@media(prefers-reduced-motion:reduce){.home-leaves{display:none}#home-dialog *{animation:none!important}}
/* Fullscreen gameplay keeps controls below the cutout without restoring a status-bar strip. */
.native-app .app{padding-top:max(12px,calc(env(safe-area-inset-top,0px) + 6px),calc(var(--safe-area-inset-top,0px) + 6px));padding-left:max(8px,env(safe-area-inset-left,0px),var(--safe-area-inset-left,0px));padding-right:max(8px,env(safe-area-inset-right,0px),var(--safe-area-inset-right,0px))}
/* A small, unboxed flourish follows the placed piece, outside its silhouette. */
#placement-feedback{left:0;top:0;width:max-content;max-width:160px;display:flex;align-items:baseline;gap:5px;padding:0;border:0;border-radius:0;background:none;box-shadow:none;text-align:center;line-height:1.4;color:#3e7058;font-size:15px;font-weight:700;letter-spacing:.5px;pointer-events:none;transform:none;text-shadow:0 1px 0 #fff9e9,1px 0 0 #fff9e9,-1px 0 0 #fff9e9,0 -1px 0 #fff9e9,0 2px 4px #43563826;transition:opacity .12s ease-out}
#placement-feedback strong{font:inherit}#placement-feedback .landing-count{font-size:12px;font-weight:700;color:#a07733;letter-spacing:0}
#placement-feedback[data-tier=precise],#placement-feedback[data-tier=streak]{background:none;border:0;box-shadow:none;color:#3e7058}
#placement-feedback[data-tier=streak],#placement-feedback[data-tier=record]{font-size:17px}
#placement-feedback[data-tier=save],#placement-feedback[data-tier=goal],#placement-feedback[data-tier=record]{background:none;border:0;box-shadow:none;color:#9a6c30}
#placement-feedback.show{opacity:1;transform:none;animation:landing-ink .85s ease-out both}
#placement-feedback.show[data-tier=streak],#placement-feedback.show[data-tier=record],#placement-feedback.show[data-tier=save],#placement-feedback.show[data-tier=goal]{animation-duration:1.05s}
@keyframes landing-ink{0%{opacity:0;filter:blur(1px)}15%,65%{opacity:1;filter:blur(0)}100%{opacity:0;filter:blur(0)}}
html[data-reduced-motion=true] #placement-feedback{animation:none!important;transition:none;filter:none}
@media(prefers-reduced-motion:reduce){#placement-feedback{animation:none!important;transition:none;filter:none}}

/* Optional skill goals stay in the level map and results, outside the play field. */
.level-craft{display:block;font-size:11px;line-height:1.6;color:#626f59;margin-top:7px;padding-top:7px;border-top:1px solid #d5decc}
.craft-results{list-style:none;padding:8px 11px;margin:10px 0;text-align:left;background:#f1f3e9;border-radius:8px;color:#697461;font-size:12px;line-height:1.65}
.craft-results .earned{color:#3c7258}
#retry-skill{min-height:44px;color:#486953}

/* Three explicit entries preserve classic progress beside Contact Party. */
.home-modes{grid-template-columns:repeat(3,minmax(0,1fr))}.home-modes button{min-width:0}.home-modes strong{font-size:12px}.home-modes small{font-size:9px}

.home-modes button,html[lang=en] .home-modes button{padding:10px 6px;text-align:center}.home-modes button>span{position:static;display:block;font-size:20px;margin-bottom:4px}.home-modes strong,html[lang=en] .home-modes strong{font-size:11px}.home-modes small{margin-top:4px}
html[lang=en] .home-kicker{font-size:10px;letter-spacing:1.4px}
@media(max-height:620px){.home-art{min-height:112px;max-height:125px}#home-scene{height:125px;max-height:125px}.home-modes{gap:8px}.home-modes small{font-size:8px}.home-modes button{padding-top:7px;padding-bottom:7px}}
