:root{--ink:#5d574b;--muted:#9b927f;--green:#77976c;--dark:#5e8056;--cream:#faf5e8;--floor:#ebd7b7;--wall:#f8eedb;--dock-space:235px;--floor-y:70vh;--shadow:0 6px 22px #6953300c}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
html,body{width:100%;height:100%;height:100dvh;margin:0;overflow:hidden;background:var(--wall);font-family:'Hiragino Maru Gothic ProN','PingFang TC','Microsoft JhengHei',sans-serif;color:var(--ink)}
body{background:linear-gradient(to bottom,var(--wall) 0,var(--wall) var(--floor-y),var(--floor) var(--floor-y),var(--floor) 100%)}
button{border:0;font:inherit;color:inherit;cursor:pointer;touch-action:manipulation;-webkit-appearance:none;appearance:none}button:focus-visible{outline:4px solid #dbac64;outline-offset:4px}button:disabled{cursor:default}svg{display:block}button svg{pointer-events:none}.hidden{display:none!important}
header{position:absolute;z-index:8;inset:max(16px,env(safe-area-inset-top)) 26px auto;display:flex;justify-content:space-between;align-items:center;pointer-events:none}header>*{pointer-events:auto}.brand{display:flex;gap:10px;align-items:center}.brandmark{width:47px;height:47px;display:grid;place-items:center;border-radius:19px 17px 20px 16px;background:#faf8ed}.brand h1{margin:0;font-size:23px;letter-spacing:1px;font-weight:900}.brand p{margin:4px 0 0;font-size:10px;letter-spacing:1px;color:#a2977e}.tools{display:flex;gap:9px;align-items:center}.tool{width:47px;height:47px;display:grid;place-items:center;background:#fffaf0d9;border-radius:18px 20px 17px 19px;box-shadow:0 3px 0 #d8cbb738;transition:transform .2s,background .2s}.tool:hover{transform:translateY(-2px);background:#fffdf6}.tool svg{width:21px;height:21px}.settings-btn{width:auto;display:flex;gap:7px;padding:0 16px;font-size:12px;font-weight:700}
.phase-bar{position:absolute;z-index:7;top:18px;left:50%;transform:translateX(-50%);text-align:center;pointer-events:none}.eyebrow{font-size:10px;letter-spacing:2px;color:#a39983;margin:0 0 6px}.phase-bar h2{font-size:17px;margin:0;font-weight:700}.phase-bar h2 span{color:#78946a}.steps{display:flex;gap:6px;justify-content:center;margin-top:10px}.step{width:20px;height:5px;border-radius:4px;background:#dfd5c1}.step.active{background:#8ba37b}.step span,.step b{display:none}
.app,#play,.room-wrap{position:absolute;inset:0;margin:0;padding:0}.room-wrap{overflow:hidden}.room{position:absolute;inset:76px 0 var(--dock-space);touch-action:manipulation}.room>svg{width:100%;height:100%;overflow:visible}.room-badge{position:absolute;z-index:2;top:88px;left:28px;font-size:11px;letter-spacing:1px;color:#a79b80;pointer-events:none;display:flex;gap:7px;align-items:center}.room-badge i{width:6px;height:6px;border-radius:50%;background:#abb59b}
.location{cursor:pointer;outline:none}.zone{fill:#fff4bd;fill-opacity:0;stroke:#d8b15c;stroke-width:3;stroke-dasharray:8 7;stroke-opacity:0;transition:fill-opacity .2s,stroke-opacity .2s}.selecting .zone{fill-opacity:.28;stroke-opacity:.8;animation:glow 2s ease-in-out infinite}.location:hover .zone,.location:focus-visible .zone{fill-opacity:.48;stroke-opacity:1}.location:focus-visible .zone{stroke-width:5}.selected-zone .zone{fill-opacity:.55;stroke-opacity:1}.zone-label{pointer-events:none;transition:opacity .2s}.zone-label rect{fill:#fffaf0;stroke:#e9dfc8;stroke-width:1}.zone-label text{fill:#7b7965;font-size:20px;font-weight:700;text-anchor:middle}.selecting .zone-label rect{fill:#fff6d7;stroke:#dac393}.selecting .zone-label text{fill:#74653f}
.dock{position:absolute;z-index:5;bottom:max(18px,env(safe-area-inset-bottom));left:max(22px,calc((100vw - 1190px)/2));right:max(22px,calc((100vw - 1190px)/2));padding:13px 19px 17px;background:#fffdf4f5;border:2px solid #fffdf8;border-radius:31px 29px 33px 27px;box-shadow:0 7px 0 #b69b6720,0 10px 35px #7e6b3510;backdrop-filter:blur(10px)}
.dock-head{display:flex;align-items:center;gap:12px;min-height:24px}.helper{display:flex;align-items:center;gap:7px;font-size:11px;color:#a09882;flex:1}.helper>span:first-child{color:#d6b978}.counter{display:flex;align-items:center;gap:8px;font-size:11px;color:#899477;white-space:nowrap}.dots{display:flex;gap:5px}.dot{width:9px;height:9px;background:#ecebdc;border-radius:50%}.dot.filled{background:#9bae81}.undo{background:transparent;font-size:11px;color:#a1947b;min-height:32px;padding:0 6px}.undo:disabled{opacity:.3}
.prompt-row{display:flex;align-items:center;justify-content:center;gap:10px;min-height:58px;margin:1px 0 10px}.say-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:50%;background:#edf0df;color:#9ba888;flex-shrink:0}.sentence{font-size:25px;line-height:1.6;font-weight:700;text-align:center;letter-spacing:1px}.word{display:inline-flex;gap:5px;align-items:center;background:#eff2e3;border-radius:12px;padding:0 10px;color:#7c9366}.word svg{display:inline-block;width:34px;height:34px}.sentence.empty{font-size:18px;font-weight:500;color:#869173}.dock-controls{display:flex;gap:16px;align-items:stretch}.tray-section{flex:1;min-width:0}.tray-head{display:none}.tray{display:grid;grid-template-columns:repeat(4,1fr);gap:11px}.item-btn{position:relative;display:flex;align-items:center;justify-content:center;gap:8px;min-height:91px;width:100%;padding:6px 10px;background:#f5f0e3;border:2px solid transparent;border-radius:21px 18px 22px 18px;transition:transform .2s,background .2s,border .2s}.item-btn:nth-child(2){background:#f6efe2;border-radius:17px 23px 18px 21px}.item-btn:nth-child(3){background:#f1efe3;border-radius:23px 18px 21px 17px}.item-btn:nth-child(4){background:#f1f0e4}.item-btn svg{width:66px;height:66px;overflow:visible;flex-shrink:0}.item-btn span{font-size:16px;font-weight:700;white-space:nowrap}.item-btn:not(:disabled):hover{transform:translateY(-4px);background:#eef0de}.item-btn.active{background:#e9efda;border-color:#96ad7d;transform:translateY(-4px);box-shadow:0 4px 0 #b8c69c55}.item-btn.used{opacity:.32}.item-btn.used:after{content:'✓';position:absolute;right:10px;top:7px;color:#739466;font-size:17px}.bottom{display:flex;align-items:stretch}.primary{display:flex;align-items:center;justify-content:center;gap:10px;min-height:51px;padding:0 25px;border-radius:22px 18px 21px 18px;background:#829c70;color:#fffdf4;font-size:17px;font-weight:700;box-shadow:0 5px 0 #68825b;transition:transform .2s,background .2s}.primary:hover{background:#739162;transform:translateY(-2px)}.primary:active{transform:translateY(2px);box-shadow:0 2px 0 #68825b}.primary:disabled{opacity:.6;background:#bcc6a6;box-shadow:0 4px 0 #a7b296}.primary>span{font-size:22px}.secondary{background:#edeedc;font-size:14px;font-weight:700;padding:14px 23px;border-radius:18px}.find-status{position:absolute;z-index:4;top:90px;left:50%;transform:translateX(-50%);background:#fffdf1ee;color:#7c8265;box-shadow:var(--shadow);padding:13px 25px;border-radius:21px 25px 20px 23px;font-size:18px;font-weight:700;text-align:center;max-width:90%}.finding .dock{left:50%;right:auto;transform:translateX(-50%);width:min(580px,calc(100% - 44px));padding:12px 20px}.finding .dock-controls{display:none}.finding .prompt-row{margin:4px 0 0;min-height:40px}.finding .undo{display:none}.finding .room{bottom:130px}
.overlay{position:fixed;z-index:20;inset:0;display:flex;align-items:center;justify-content:center;padding:22px;background:#66563a4a;backdrop-filter:blur(7px)}.panel{width:490px;max-width:100%;max-height:92dvh;overflow:auto;background:#fffcf1;border:3px solid #fffef6;padding:28px;border-radius:33px 28px 35px 29px;box-shadow:0 20px 70px #58472720}.panel-top{display:flex;align-items:flex-start;justify-content:space-between}.panel h2{font-size:23px;margin:0 0 8px}.panel .sub{font-size:12px;color:#9c947e;line-height:1.7;margin:0 0 23px}.close{width:38px;height:38px;flex-shrink:0;border-radius:50%;background:#f0ebdb;color:#988b70;font-size:26px}.setting{margin-bottom:23px}.setting>label{display:block;font-size:14px;font-weight:700;margin-bottom:10px}.seg{display:flex;gap:8px}.seg button{flex:1;min-height:49px;border:2px solid transparent;border-radius:15px;background:#f2efdf}.seg button.chosen{border-color:#a0b286;background:#eaf0dc;color:#758d61;font-weight:700}.hint-options{display:flex;flex-direction:column;gap:8px}.hint-options button{min-height:60px;text-align:left;border:2px solid transparent;border-radius:17px;background:#f3efdf;padding:11px 15px;font-size:14px;font-weight:700}.hint-options button small{display:block;font-size:11px;font-weight:400;color:#a1967f;margin-top:5px}.hint-options button.chosen{background:#eaf0dc;border-color:#a0b286}.settings-foot{font-size:11px;color:#a69a83;line-height:1.8;margin:0 0 18px}.panel .primary{width:100%}
.summary{position:absolute;z-index:6;inset:85px 0 0;margin:0;padding:0 24px 24px;overflow:auto;text-align:center;background:radial-gradient(ellipse at 50% 35%,#fbf8e7,#f2eddc);border-radius:45px 45px 0 0}.summary-header{padding:20px 0 15px}.summary-header .eyebrow{color:#aaa083}.summary h2{font-size:30px;letter-spacing:2px;margin:7px 0 9px}.summary p{font-size:14px;color:#9b927d;line-height:1.7}.result-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;max-width:920px;margin:0 auto 23px}.result-card{display:flex;gap:16px;align-items:center;text-align:left;background:#fffdf2;border:2px solid #e9e5d1;border-radius:25px 22px 27px 21px;padding:16px 20px}.result-card>svg{width:90px;height:90px;flex-shrink:0;background:#f5efdf;border-radius:28px;padding:5px}.result-card strong{font-size:18px;color:#81936a}.result-card p{font-size:15px;margin:7px 0 0;color:#9c927d}.summary-actions{display:flex;gap:12px;justify-content:center;padding-bottom:7px}.toast{position:fixed;z-index:30;bottom:30px;left:50%;transform:translateX(-50%);max-width:90%;padding:13px 23px;border-radius:20px;background:#788b66;color:#fff9e8;text-align:center;font-size:13px;box-shadow:var(--shadow)}.confetti{position:fixed;pointer-events:none;z-index:25;border-radius:4px;animation:fall 2.8s ease-out both}.flying{transition:transform .85s cubic-bezier(.33,.05,.24,1);pointer-events:none}.cabinet-door{transition:transform .5s;transform-box:fill-box}.cabinet-door.left{transform-origin:left}.cabinet-door.right{transform-origin:right}.cab-open .cabinet-door{transform:scaleX(.1)}.found-item{animation:reveal .65s ease both}.fox-walk use{animation:waddle .33s infinite alternate;transform-box:fill-box;transform-origin:center bottom}.fox-search use{animation:look .65s infinite alternate;transform-box:fill-box;transform-origin:center bottom}.fox-happy use{animation:happy .5s 2;transform-box:fill-box;transform-origin:center bottom}
@keyframes glow{50%{stroke-opacity:.35;fill-opacity:.1}}@keyframes reveal{0%{opacity:0;transform:translateY(14px) scale(.5)}65%{transform:translateY(-6px) scale(1.13)}100%{opacity:1;transform:translateY(0) scale(1)}}@keyframes waddle{to{transform:translateY(-5px) rotate(3deg)}}@keyframes look{to{transform:rotate(-8deg)}}@keyframes happy{50%{transform:translateY(-24px) rotate(4deg)}}@keyframes fall{from{transform:translateY(-50px) rotate(0);opacity:1}to{transform:translateY(85vh) rotate(300deg);opacity:0}}
@media(min-width:1600px){.dock{left:8%;right:8%}.item-btn{min-height:108px}.item-btn svg{width:83px;height:83px}.item-btn span{font-size:20px}.sentence{font-size:29px}.primary{font-size:20px}}
@media(max-width:1050px){header{inset:15px 20px auto}.brand h1{font-size:20px}.brand p{font-size:9px}.phase-bar h2{font-size:15px}.settings-btn{width:47px;padding:0;justify-content:center}.settings-btn span{display:none}.dock{left:17px;right:17px;padding:10px 15px 14px}.item-btn{min-height:81px;gap:3px;padding:6px}.item-btn svg{width:57px;height:57px}.item-btn span{font-size:14px}.primary{padding:0 19px;font-size:15px}.sentence{font-size:22px}.prompt-row{min-height:54px}.dock-controls{gap:12px}}
@media(max-width:740px){header{inset:12px 13px auto}.brandmark{width:40px;height:40px}.brand h1{font-size:18px}.brand p{display:none}.tool{width:40px;height:40px;border-radius:15px}.tools{gap:6px}.phase-bar{top:68px;width:100%}.phase-bar h2{font-size:14px}.phase-bar .eyebrow{display:none}.steps{margin-top:7px}.room{top:112px}.room-badge{display:none}.dock{left:11px;right:11px;bottom:12px;padding:10px 11px 13px;border-radius:26px}.dock-head{gap:6px}.helper{font-size:10px}.undo{font-size:10px;padding:0 2px}.counter{font-size:10px;gap:5px}.dots{gap:3px}.dot{width:7px;height:7px}.prompt-row{min-height:53px;gap:6px;margin-bottom:10px}.say-icon{width:28px;height:28px}.sentence{font-size:18px;letter-spacing:0}.word{padding:0 5px;gap:2px;border-radius:9px}.word svg{width:26px;height:26px}.tray{gap:7px}.item-btn{flex-direction:column;min-height:90px;padding:4px;gap:0;border-radius:17px}.item-btn svg{width:55px;height:55px}.item-btn span{font-size:13px}.dock-controls{flex-wrap:wrap;gap:12px}.tray-section{flex-basis:100%}.bottom{width:100%;justify-content:center}.bottom .primary{width:100%;min-height:45px;border-radius:17px}.bottom .primary:disabled{min-height:38px}.find-status{top:112px;font-size:14px;padding:11px 18px}.finding .room{top:108px;bottom:123px}.finding .sentence{font-size:14px}.finding .dock{width:calc(100% - 24px);bottom:12px}.summary{inset:108px 0 0;padding:0 15px 20px;border-radius:28px 28px 0 0}.summary-header{padding:12px 0}.summary-header>svg{height:88px!important;width:69px!important}.summary h2{font-size:25px}.summary p{font-size:12px}.result-grid{gap:10px;grid-template-columns:1fr;margin-bottom:18px}.result-card{padding:10px 14px;gap:12px}.result-card>svg{width:64px;height:64px;border-radius:20px}.result-card strong{font-size:16px}.result-card p{font-size:13px;margin-top:4px}.summary-actions .primary{min-height:48px}.summary-actions .secondary{padding:12px 18px}}
@media(max-height:650px) and (min-width:741px){header{inset:10px 17px auto}.brand p{display:none}.brandmark,.tool{width:39px;height:39px}.brand h1{font-size:19px}.phase-bar{top:11px}.phase-bar .eyebrow{display:none}.steps{margin-top:8px}.room{top:58px}.room-badge{top:65px;font-size:9px}.dock{bottom:12px;padding:7px 13px 10px}.dock-head{min-height:22px}.prompt-row{min-height:39px;margin:0 0 6px}.sentence{font-size:20px}.word svg{width:28px;height:28px}.item-btn{min-height:66px}.item-btn svg{width:48px;height:48px}.helper,.counter{font-size:10px}.undo{font-size:10px;min-height:24px}.find-status{top:67px}.finding .room{top:60px;bottom:105px}.summary{top:60px}.summary-header>svg{height:70px!important;width:55px!important}.summary-header{padding:8px 0}.summary h2{font-size:24px;margin:3px 0}.summary-header p{margin:5px 0}.result-card{padding:10px 15px}.result-card>svg{width:62px;height:62px}.result-grid{gap:9px;margin-bottom:13px}}
