:root{color-scheme:light;--ink:#244c3d;--green:#326a50;--cream:#faf8ee;--line:#dde5d7;--props:url('assets/props.webp');font-family:"Microsoft YaHei","PingFang SC",system-ui,sans-serif;font-synthesis:none}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#f3f5ec;color:var(--ink)}body{overscroll-behavior:none}button{font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;color:inherit}button:focus-visible,.stage:focus-visible{outline:3px solid #de9640;outline-offset:3px}button{touch-action:manipulation}button:disabled{cursor:wait}button[hidden],[hidden]{display:none!important}
.game-shell{max-width:1540px;margin:0 auto;min-height:100svh;height:100dvh;display:flex;flex-direction:column;padding:0 max(26px,env(safe-area-inset-right)) 0 max(26px,env(safe-area-inset-left))}
.topbar{display:flex;align-items:center;gap:20px;min-height:102px;flex-shrink:0}.brand{display:flex;gap:12px;align-items:center;flex:1}.brand-face{display:grid;place-items:center;font-size:33px;width:56px;height:56px;background:#e6ebdc;border-radius:20px;transform:rotate(-6deg)}h1{font-size:23px;line-height:1.4;letter-spacing:1px;margin:0;font-weight:800}.brand p{font-size:12px;margin:4px 0 0;color:#70816c;letter-spacing:1px}.places{display:flex;gap:6px;align-items:center;padding:6px;border:1px solid var(--line);border-radius:50px;background:#e9eee2}.place{font-size:14px;font-weight:700;white-space:nowrap;display:flex;gap:8px;align-items:center;padding:11px 18px;border:0;border-radius:30px;background:transparent;color:#65765d;transition:background .18s,color .18s}.place span{font-size:19px}.place.selected{background:var(--green);color:white;box-shadow:0 3px 6px #244b3c13}.utilities{display:flex;gap:8px;flex:1;justify-content:flex-end}.icon-button{width:44px;height:44px;display:grid;place-items:center;font-size:23px;border:1px solid #dbe2d2;border-radius:50%;background:#fffef5}.icon-button[aria-pressed=true]{background:#e1e7d8;color:#82917b}.stage{position:relative;min-height:190px;flex:1;border-radius:28px;overflow:hidden;isolation:isolate;background:#c8e3a5;box-shadow:0 0 0 1px #507e3712,0 9px 24px #2756320c;touch-action:none;user-select:none;-webkit-user-select:none}.stage canvas{position:absolute;inset:0;width:100%;height:100%;display:block}.scene-badge{position:absolute;top:22px;left:23px;display:flex;gap:8px;align-items:center;background:#ffffefdc;border:1px solid #ffffffa1;padding:9px 15px;border-radius:28px;font-size:13px;color:#43644b;pointer-events:none}.scene-badge>span:first-child{font-size:17px}.speech{position:absolute;top:18%;left:50%;transform:translateX(-50%);max-width:min(84%,360px);padding:14px 22px;border:2px solid #fff;border-radius:23px;background:#fffef3f5;box-shadow:0 4px 0 #87985f17;font-size:17px;font-weight:700;text-align:center;z-index:3;pointer-events:none;white-space:normal;transition:opacity .2s}.speech:after{content:"";position:absolute;bottom:-11px;left:calc(50% - 10px);border-left:10px solid transparent;border-right:10px solid transparent;border-top:12px solid #fffef3}.speech.quiet{opacity:0}.hint{position:absolute;bottom:15px;left:50%;transform:translateX(-50%);background:#fffef0df;border-radius:30px;padding:8px 18px;max-width:92%;text-align:center;font-size:13px;color:#59704d;pointer-events:none;white-space:nowrap}.targets{position:absolute;inset:0}.target{position:absolute;border:0;background:transparent;border-radius:40%;padding:0;touch-action:none;cursor:grab}.target:active{cursor:grabbing}.target:focus-visible{outline:3px dashed #4c7c54;outline-offset:0}.target[data-kind=bubble]{border-radius:50%;cursor:pointer}.loading{position:absolute;inset:0;background:#e6efce;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:16px;z-index:10;color:#456249}.loading-panda{font-size:64px;animation:wait 1.5s ease-in-out infinite}.loading strong{font-size:20px}.loading>span:last-of-type{font-size:14px}.loading button{background:var(--green);color:white;border:0;border-radius:20px;padding:10px 28px}.playbar{display:flex;gap:26px;align-items:center;min-height:122px;flex-shrink:0;padding:16px 2px 9px}.playbar-intro{min-width:95px;display:flex;flex-direction:column;gap:7px;padding-left:10px}.playbar-intro>span{font-size:18px;font-weight:800}.playbar-intro small{font-size:12px;color:#829079}.actions{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:12px;width:100%}.action{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:2px;border:1px solid #e0e5d4;border-bottom:4px solid #dfe5d1;border-radius:20px;background:#fffef6;height:91px;min-width:0;font-size:14px;font-weight:700;transition:transform .12s,background .12s;user-select:none;-webkit-user-select:none}.action:hover{background:#f0f5e3}.action:active,.action.active{background:#e7f0d6;transform:translateY(2px);border-bottom-width:2px}.action-art{display:block;width:46px;height:46px;background-image:var(--props);background-size:300% 200%;background-repeat:no-repeat}.action-art.bamboo{background-position:0 0}.action-art.ball{background-position:50% 0}.action-art.bush{background-position:50% 100%}.action-art.brush{background-position:0 100%}.action-emoji{display:grid;place-items:center;font-size:31px;height:46px;line-height:1}footer{display:flex;justify-content:space-between;align-items:center;min-height:32px;padding:0 4px max(8px,env(safe-area-inset-bottom));font-size:11px;color:#8a947e;letter-spacing:.5px}footer span span{color:#bb9871}.version{font-size:10px;color:#a6af9b!important;margin-left:8px}
.action-art.roll{background-image:url('assets/panda.webp');background-position:50% 100%}.bubble-icon{display:grid;place-items:center;height:46px}.bubble-icon svg{max-height:100%}
@keyframes wait{50%{transform:translateY(-8px) rotate(4deg)}}
@media(min-width:1500px){.game-shell{padding-top:8px;padding-bottom:10px}.topbar{min-height:112px}.playbar{min-height:136px}}
@media(max-width:1100px){.brand p{display:none}h1{font-size:19px}.brand-face{width:46px;height:46px;font-size:28px}.topbar{gap:12px;min-height:86px}.place{padding:10px 13px}.utilities{flex:0}.playbar-intro{display:none}.actions{gap:9px}}
@media(max-width:760px) and (min-height:501px){.game-shell{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}.topbar{min-height:122px;display:grid;grid-template-columns:1fr auto;gap:0 10px;padding:12px 2px 10px}.brand{gap:8px}.brand-face{font-size:26px;width:39px;height:39px;border-radius:15px}h1{font-size:19px;letter-spacing:0}.utilities{gap:6px}.icon-button{width:36px;height:36px;font-size:21px}.places{grid-row:2;grid-column:1/-1;justify-content:center;justify-self:center;padding:4px;gap:3px;margin-top:9px}.place{font-size:13px;padding:8px 15px;gap:5px}.place span{font-size:17px}.stage{border-radius:23px}.scene-badge{top:14px;left:14px;padding:7px 11px;font-size:11px}.scene-badge>span:first-child{font-size:14px}.speech{font-size:15px;padding:11px 15px;top:21%;width:max-content;max-width:88%}.hint{bottom:13px;font-size:11px;padding:8px 10px;max-width:96%}.playbar{min-height:168px;padding:12px 0 6px}.actions{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.action{height:72px;border-radius:16px;font-size:12px;gap:0}.action-art{width:40px;height:40px}.action-emoji{height:40px;font-size:27px}footer{min-height:28px;font-size:10px;letter-spacing:0}.version{display:none}}
@media(max-width:360px) and (min-height:501px){h1{font-size:16px}.brand-face{width:32px;height:36px;font-size:23px}.place{padding:8px 10px;font-size:12px}.topbar{min-height:112px}.action{height:63px}.action-art{height:34px;width:34px}.action-emoji{height:34px;font-size:25px}.playbar{min-height:148px}.hint{font-size:10px}.speech{font-size:13px}}
@media(max-height:620px) and (min-height:501px){.playbar{min-height:140px}.action{height:59px}.action-art{width:32px;height:32px}.action-emoji{height:32px;font-size:24px}.hint{display:none}.scene-badge{top:10px;left:10px;font-size:10px}.speech{top:22%;padding:8px 14px;font-size:13px}footer{min-height:22px}}
@media(max-height:500px){.game-shell{display:grid;grid-template-columns:minmax(0,1fr) 145px;grid-template-rows:56px minmax(0,1fr);gap:0 10px;padding:0 max(10px,env(safe-area-inset-right)) max(9px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))}.topbar{grid-column:1/-1;min-height:0;gap:10px}.brand{flex:1;gap:7px}.brand-face{font-size:24px;width:33px;height:33px;border-radius:12px}h1{font-size:16px;letter-spacing:0}.brand p{display:none}.places{padding:3px;gap:2px}.place{padding:7px 10px;font-size:12px;gap:3px}.place span{font-size:14px}.icon-button{width:32px;height:32px;font-size:19px}.utilities{gap:5px}.stage{min-height:0;border-radius:19px}.scene-badge{top:10px;left:10px;font-size:10px;padding:5px 10px}.scene-badge>span:first-child{font-size:13px}.speech{font-size:13px;padding:8px 14px;top:20%}.hint{display:none}.playbar{min-height:0;padding:0;align-items:stretch}.actions{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(4,minmax(0,1fr));gap:6px}.action{height:auto;min-height:0;gap:0;border-radius:13px;font-size:11px}.action-art{width:32px;height:32px}.action-emoji{height:32px;font-size:25px}.playbar-intro,footer{display:none}}
@media(max-height:500px) and (max-width:680px){.game-shell{grid-template-columns:minmax(0,1fr) 123px;gap:0 7px}.brand-face{display:none}h1{font-size:14px}.place{padding:6px 8px;font-size:11px}.place span{display:none}.utilities{gap:3px}.icon-button{width:29px;height:29px}.topbar{gap:5px}.actions{gap:4px}.action-art{width:28px;height:28px}.action-emoji{font-size:21px;height:28px}}
@media(max-width:760px){.bubble-icon{height:40px}}@media(max-height:620px){.bubble-icon{height:32px}.bubble-icon svg{width:32px}}@media(max-width:360px){.bubble-icon{height:34px}.bubble-icon svg{width:34px}}@media(max-height:500px) and (max-width:680px){.bubble-icon{height:28px}.bubble-icon svg{width:28px}}
@media(max-height:500px){.scene-badge{display:none}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
/* v0.2: six locations, scrollable on small screens; scene tools stay below the panda. */
.topbar{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:60px 48px;min-height:118px;gap:0 14px;padding:4px 0 8px}.brand{grid-row:1;grid-column:1}.utilities{grid-row:1;grid-column:2}.places{grid-row:2;grid-column:1/-1;justify-self:center;max-width:100%;min-width:0;overflow-x:auto;overflow-y:hidden;justify-content:flex-start;scrollbar-width:none;touch-action:pan-x;padding:4px;margin:0;scroll-behavior:smooth}.places::-webkit-scrollbar{display:none}.place{flex:0 0 auto;padding:8px 18px}.targets{z-index:2}.speech{z-index:30}.hint{z-index:30}.scene-badge{z-index:30}.scene-actions{position:absolute;left:50%;bottom:13px;transform:translateX(-50%);z-index:40;display:flex;gap:7px;max-width:96%;white-space:nowrap}.scene-actions:empty{display:none}.scene-actions button{border:1px solid #c0d0af;border-bottom:3px solid #b3c59f;border-radius:20px;padding:7px 15px;background:#fffff0ef;font-size:13px;font-weight:700;color:#3a604c;min-height:34px;white-space:nowrap}.scene-actions button:active{transform:translateY(1px);background:#e6f2d2}.scene-loading{position:absolute;top:12px;left:50%;transform:translateX(-50%);background:#fffceb;box-shadow:0 4px 16px #27492c22;border:1px solid #e2dec0;border-radius:18px;display:flex;align-items:center;gap:7px;padding:9px 12px;z-index:80;max-width:94%;font-size:13px}.scene-loading button{border:0;border-radius:14px;padding:7px 10px;background:#e4edce;white-space:nowrap}.stage[data-scene=night] .speech{background:#fff9dc}.stage[data-scene=night] .scene-badge{background:#ffffeadc}
@media(max-width:760px) and (min-height:501px){.topbar{grid-template-rows:48px 53px;min-height:122px;padding:7px 1px 8px}.places{width:100%;justify-self:stretch;margin:0}.place{font-size:12px;padding:8px 13px;gap:5px}.scene-actions button{font-size:12px;padding:7px 13px}.scene-loading{font-size:12px;padding:8px;gap:5px}.scene-loading button{padding:6px 8px}.brand p{display:none}}
@media(max-width:360px) and (min-height:501px){.topbar{min-height:115px;grid-template-rows:44px 50px}.place{padding:8px 11px}.scene-actions{gap:5px}.scene-actions button{font-size:11px;padding:6px 11px;min-height:28px}}
@media(max-height:620px){.scene-badge{display:none}.scene-actions{bottom:8px}.scene-actions button{font-size:11px;padding:5px 11px;min-height:28px}}
@media(max-height:500px){.game-shell{grid-template-rows:80px minmax(0,1fr)}.topbar{grid-template-rows:33px 39px;min-height:0;padding:3px 0 5px;gap:0 8px}.places{grid-row:2;grid-column:1/-1;width:auto;max-width:100%;justify-self:center;gap:3px;padding:3px}.place{padding:6px 12px;font-size:11px}.place span{display:none}.scene-actions{bottom:5px;gap:5px}.scene-actions button{font-size:11px;padding:4px 10px;min-height:26px}.scene-loading{top:5px;font-size:11px;padding:6px}.brand-face{display:none}.brand h1{font-size:14px}.utilities .icon-button{width:29px;height:29px}.speech{font-size:12px;padding:6px 12px}}
@media(prefers-reduced-motion:reduce){.places{scroll-behavior:auto}}

/* Compact volume controls, separate from the play surface. */
.topbar{position:relative}.sound-panel{position:absolute;right:0;top:59px;z-index:150;width:340px;max-width:100%;padding:16px 18px;background:#fffdf0;border:1px solid #d7ddc6;border-radius:22px;box-shadow:0 12px 35px #234d3e35}.sound-panel-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.sound-panel button{border:1px solid #cbd7ba;background:#edf3df;border-radius:16px;padding:7px 12px;min-height:36px;font-size:12px}.sound-panel label{display:grid;grid-template-columns:64px minmax(0,1fr) 35px;align-items:center;gap:10px;min-height:45px;font-size:13px}.sound-panel input{width:100%;min-width:0;height:32px;accent-color:#3c7855;touch-action:pan-x}.sound-panel output{text-align:right;font-size:11px;color:#738569}.sound-presets{display:flex;justify-content:flex-end;gap:8px;margin-top:8px}.scene-actions button{min-height:34px}
@media(max-width:360px){.utilities{gap:4px}.utilities .icon-button{width:31px;height:31px;font-size:19px}.sound-panel{top:49px;padding:12px}.sound-panel label{gap:6px;grid-template-columns:64px minmax(0,1fr) 31px}}
@media(max-height:500px){.sound-panel{top:34px;padding:9px 14px;width:330px}.sound-panel label{min-height:37px}.sound-panel-title{margin-bottom:1px}.sound-presets{margin-top:2px}.scene-actions button{min-height:28px}}
