@charset "UTF-8";
:root{--page:#e3e8dc;--surface:#f7f8f0;--inset:#edf0e4;--ink:#2c4738;--muted:#687b67;--green:#385e46;--green-hover:#294c37;--line:#dbe2d2;--gold:#976d31;--warn:#a65d42;--shadow:0 14px 42px #263e2820;--r:16px;font-family:"Microsoft YaHei UI","Microsoft YaHei",system-ui,sans-serif;color:var(--ink);background:var(--page);font-size:14px;font-synthesis:none}
*{box-sizing:border-box}body{margin:0;overflow:hidden}button,input,select{font:inherit}button{cursor:pointer;color:inherit;border:1px solid var(--line);border-radius:10px;background:var(--surface);min-height:40px;padding:8px 13px;transition:background .15s,transform .12s,border-color .15s}button:hover{background:#e8eddc;border-color:#bacbb2}button:active{transform:translateY(1px) scale(.985)}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #81a169;outline-offset:2px}button:disabled{cursor:not-allowed;opacity:.45}button.primary{background:var(--green);color:#f4f5e8;border-color:var(--green)}button.primary:hover{background:var(--green-hover)}button.danger{color:var(--warn)}input,select{color:var(--ink);background:var(--surface);border:1px solid #bfcdb6;border-radius:8px;min-height:38px;padding:6px 8px}input[type=number]{width:80px}h1,h2,h3,p{margin:0}p{line-height:1.7}small{color:var(--muted)}[hidden]{display:none!important}
.topbar{height:86px;display:flex;align-items:center;padding:12px 30px;gap:28px;background:#f5f7ed;border-bottom:1px solid #d2dbc7;position:relative;z-index:10}.brand{display:flex;align-items:center;gap:14px;text-decoration:none;color:var(--ink);min-width:180px}.brand strong{display:block;font-size:26px;font-weight:900;letter-spacing:4px;line-height:1.15}.brand small{font-size:10px;letter-spacing:2px;display:block;margin-top:6px}.grass-logo{width:38px;height:36px;background:#916d48;display:block;border:4px solid #6e573c;border-top:12px solid #749957;box-shadow:inset -8px 0 #785b3e,3px 3px #d9ddcb;transform:rotate(-6deg)}.grass-logo i{width:8px;height:5px;background:#b79a62;display:block;margin:5px}.season{display:flex;gap:8px;align-items:center;color:var(--muted);font-size:13px}.sun-icon{font-size:25px;color:#b99b4a}.resources{display:flex;gap:25px;margin-left:auto;align-items:center}.resource{display:flex;gap:12px;align-items:center;min-width:112px;border:0;background:transparent;padding:0;min-height:45px;text-align:left}.resource small{display:block;font-size:10px;letter-spacing:.5px}.resource strong{display:block;margin-top:4px;font-size:20px;font-variant-numeric:tabular-nums;font-weight:800}.money strong{color:var(--gold)}.emerald{width:18px;height:25px;background:#6eaa73;clip-path:polygon(25% 0,75% 0,100% 28%,100% 75%,50% 100%,0 75%,0 28%);box-shadow:inset -6px -3px #478260,inset 4px 4px #a3c38c}.mini-icon{font-size:26px;color:#7b9471}.icon-btn{border:0;background:var(--inset);width:42px;height:42px;font-size:21px;padding:0}
#stage{position:absolute;top:101px;bottom:96px;left:18px;right:18px;border-radius:24px;overflow:hidden;background:#dbe2d4;transition:right .25s cubic-bezier(.2,.8,.2,1);box-shadow:inset 0 0 0 1px #cbd6c5;touch-action:none}body.drawer-open #stage{right:449px}#farmCanvas{display:block;width:100%;height:100%;outline:none;touch-action:none}#sceneLabels{position:absolute;inset:0;pointer-events:none}.world-label{position:absolute;left:0;top:0;font-size:11px;background:#faf9edee;border:1px solid #cfd7c1;min-height:24px;padding:4px 11px;border-radius:6px;box-shadow:0 3px 10px #384d2720;font-weight:700;color:#526446}.world-label:after{content:'';position:absolute;bottom:-4px;left:45%;width:6px;height:6px;background:#faf9ed;transform:rotate(45deg)}.scene-heading{position:absolute;top:24px;left:24px;display:flex;align-items:center;gap:10px;font-weight:800}.scene-heading small{font-weight:400;font-size:12px;margin-left:6px}.live-dot{width:7px;height:7px;border-radius:50%;background:#60835b;box-shadow:0 0 0 4px #61875b16}.scene-controls{position:absolute;right:17px;top:17px;display:flex;gap:5px}.scene-controls button{width:35px;min-height:35px;padding:2px;background:#f5f7ebdb;border-color:#ccd7bf;font-size:18px}.scene-tip{position:absolute;bottom:93px;left:25px;font-size:11px;color:#617153;background:#f2f4e4d6;padding:7px 12px;border-radius:7px;max-width:calc(100% - 50px);pointer-events:none}.toolbelt{position:absolute;bottom:16px;left:50%;transform:translateX(-50%);display:flex;gap:4px;padding:7px;background:#f7f7ecf2;border:1px solid #cdd6be;border-radius:16px;box-shadow:0 7px 24px #33482418;max-width:calc(100% - 30px)}.toolbelt button{border:1px solid transparent;background:transparent;min-width:60px;min-height:53px;padding:5px 10px;font-size:11px;white-space:nowrap}.toolbelt button span{display:block;font-size:21px;line-height:26px;color:#688454}.toolbelt button.selected{background:#dde7cb;border-color:#bbcfa1;color:#36523b;font-weight:700}.toolbelt button.selected span{color:#3c693e}.back-scene{position:absolute;top:68px;left:24px}.context-strip{position:absolute;left:50%;transform:translateX(-50%);bottom:88px;display:flex;gap:6px;max-width:95%;overflow:auto}.context-strip:empty{display:none}.context-strip button{background:#f6f7eeed;font-size:12px;white-space:nowrap;min-height:33px;padding:5px 10px}
.bottom-nav{position:fixed;bottom:18px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:10px;background:#f6f8ed;border:1px solid #d2dcc8;border-radius:18px;padding:8px 16px;box-shadow:0 4px 20px #3c573014;z-index:15;max-width:calc(100% - 24px)}.bottom-nav button{border:0;background:transparent;min-width:70px;display:flex;align-items:center;justify-content:center;gap:7px;font-size:13px;position:relative;padding:9px 12px}.bottom-nav button>span:first-child{font-size:22px;color:#829674}.bottom-nav button.nav-active{background:#e0e9d3;font-weight:800;color:#355738}.bottom-nav button.nav-active>span:first-child{color:#4c7248}.nav-dot{width:5px;height:5px;border-radius:50%;background:#b7844e;position:absolute;top:8px;right:6px}
#drawer{position:absolute;right:18px;top:101px;bottom:96px;width:414px;background:var(--surface);border:1px solid #d3ddc6;border-radius:22px;box-shadow:var(--shadow);z-index:20;display:flex;flex-direction:column;animation:drawerIn .22s ease-out;overflow:hidden}.drawer-head{display:flex;align-items:center;justify-content:space-between;padding:24px 24px 18px;border-bottom:1px solid var(--line);background:var(--surface);flex-shrink:0}.drawer-head small{font-size:10px;letter-spacing:2px}.drawer-head h1{font-size:23px;margin-top:5px}.close-btn{font-size:23px;border:0;background:var(--inset);width:34px;min-height:34px;line-height:30px;padding:0}.drawer-head h1 span{font-size:12px;color:var(--muted)}#panelBody{overflow:auto;overscroll-behavior:contain;padding:20px 23px 26px;scrollbar-width:thin;scrollbar-color:#bcccac transparent}#panelBody h2{font-size:15px;margin:24px 0 12px}#panelBody h2:first-child{margin-top:0}.subtext{font-size:12px;color:var(--muted);line-height:1.7;margin-bottom:16px}.stats-row{display:flex;gap:12px;margin-bottom:17px}.stat-tile{background:var(--inset);border-radius:12px;padding:13px 15px;flex:1}.stat-tile small{font-size:10px;display:block}.stat-tile strong{display:block;font-size:23px;margin-top:6px;font-variant-numeric:tabular-nums}.item-row{display:flex;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid var(--line)}.item-row:first-child{padding-top:0}.item-row>div.grow{flex:1;min-width:0}.item-row strong{font-size:14px}.item-row small{display:block;font-size:11px;margin-top:4px;line-height:1.5}.item-icon{width:43px;height:43px;flex-shrink:0;background:#e4ead6;border:1px solid #d2ddc5;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:23px}.crop-swatch{display:block;width:18px;height:22px;background:var(--crop-color,#c79f63);box-shadow:inset -5px -3px #263e2824;position:relative}.crop-swatch:before{content:'';position:absolute;width:8px;height:8px;background:#789754;top:-5px;left:4px;transform:rotate(-20deg)}.item-row .price{font-size:12px;color:var(--gold);white-space:nowrap;font-weight:700}.small-btn{font-size:12px;padding:6px 10px;min-height:33px}.row-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:11px}.row-actions button{flex:1;font-size:12px;white-space:nowrap}.notice{padding:12px 14px;background:#e9eedc;border-radius:10px;color:#5b724a;font-size:12px;line-height:1.7;margin-bottom:16px}.notice.warn{background:#f2ead8;color:#91613f}.empty{padding:26px 14px;text-align:center;color:var(--muted);font-size:13px;line-height:1.8;border:1px dashed #ccd7bd;border-radius:12px}.card{padding:16px;background:#eff2e7;border:1px solid #dfe5d5;border-radius:12px;margin-bottom:12px}.card-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:9px}.card-head strong{font-size:15px}.pill{display:inline-block;font-size:10px;color:#607744;background:#dfe8ce;border-radius:5px;padding:3px 7px;white-space:nowrap}.pill.gold{color:#886634;background:#eee3c6}.pill.warn{color:#97543d;background:#f1ded0}.bar{height:6px;border-radius:4px;background:#dce3cf;overflow:hidden;margin:9px 0}.bar i{display:block;height:100%;background:#8da878;border-radius:4px;transition:width .3s}.progress-label{display:flex;justify-content:space-between;font-size:11px;color:var(--muted)}.field-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:11px 0;font-size:12px}.field-row label{flex:1}.field-row input{width:72px}.tabs{display:flex;gap:5px;margin-bottom:17px;background:#e8eddd;padding:4px;border-radius:10px}.tabs button{flex:1;font-size:12px;border:0;background:transparent;min-height:34px}.tabs button.active{background:var(--surface);box-shadow:0 1px 4px #2c473815;font-weight:700}.total-line{display:flex;justify-content:space-between;font-size:13px;padding:9px 0;border-bottom:1px solid var(--line)}.total-line.emphasis{font-weight:800;font-size:16px;border:0;padding-top:15px}.log{list-style:none;margin:0;padding:0;font-size:12px}.log li{padding:9px 0;border-bottom:1px solid var(--line);line-height:1.6}.log time{font-size:10px;color:var(--muted);display:block}.shift-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:5px;margin-top:10px}.shift-cell{min-width:0}.shift-cell small{font-size:9px;display:block;text-align:center;margin:3px}.shift-cell select{font-size:10px;width:100%;min-height:31px;padding:2px}.avatar{width:38px;height:43px;position:relative;background:#85958c;border-radius:6px;overflow:hidden;flex-shrink:0}.avatar:before{content:'';position:absolute;width:20px;height:22px;left:9px;top:8px;background:#d4b18d;border-top:6px solid #66543c;box-shadow:0 16px #70948d}.avatar:after{content:'··';font-size:18px;letter-spacing:5px;position:absolute;left:11px;top:7px;color:#404a38}.expense-note{font-size:11px;color:var(--muted);margin-top:8px;line-height:1.6}.check-line{display:flex;align-items:center;gap:8px;font-size:12px;margin-top:12px;cursor:pointer}.check-line input{min-height:0;accent-color:var(--green)}
#toast{position:fixed;bottom:99px;left:50%;transform:translate(-50%,8px);background:#304f3c;color:#f5f5e8;border-radius:11px;padding:12px 21px;box-shadow:var(--shadow);font-size:13px;z-index:70;opacity:0;pointer-events:none;max-width:90%;transition:opacity .16s,transform .16s}#toast.show{opacity:1;transform:translate(-50%,0)}#toast.error{background:#86563d}dialog{border:1px solid #cfdbc2;border-radius:22px;background:var(--surface);padding:32px;width:min(430px,90vw);color:var(--ink);box-shadow:0 30px 100px #24372540}dialog::backdrop{background:#2e423b66;backdrop-filter:blur(3px)}dialog h2{font-size:24px;margin:8px 0 13px}dialog p{font-size:13px;white-space:pre-line;margin-bottom:20px}dialog button{width:100%;margin-top:15px}progress{width:100%;height:8px;accent-color:#729259}.offline-icon{font-size:30px;color:#789364}#fatal{position:fixed;inset:120px 12%;padding:35px;background:var(--surface);z-index:100;border-radius:20px;white-space:pre-wrap;line-height:1.8}a{color:var(--green)}
@keyframes drawerIn{from{transform:translateX(20px);opacity:0}to{transform:none;opacity:1}}
@media(min-width:1600px){#drawer{width:455px}body.drawer-open #stage{right:490px}.topbar{padding-left:36px;padding-right:36px}.brand{min-width:210px}}
@media(max-width:1000px){.topbar{gap:12px;padding:12px 18px}.season{display:none}.resources{gap:15px}.resource{min-width:96px}.brand{min-width:155px}.scene-heading small{display:none}.bottom-nav{gap:2px}.bottom-nav button{min-width:60px;padding:8px 10px}body.drawer-open #stage{right:400px}#drawer{width:368px}.toolbelt button{min-width:48px;padding:5px 7px}}
@media(max-width:720px){.topbar{height:73px;padding:10px 14px;gap:10px}.brand{min-width:0;gap:9px}.brand strong{font-size:21px;letter-spacing:2px}.brand small{display:none}.grass-logo{width:29px;height:30px;border-top-width:9px}.resources{gap:10px}.resource{min-width:0;gap:5px}.resource small{font-size:9px}.resource strong{font-size:15px}.mini-icon{display:none}.resources .resource:last-child{display:none}.emerald{width:13px;height:19px}.icon-btn{width:32px;height:32px;min-height:32px;font-size:18px}#stage{top:82px;left:8px;right:8px;bottom:91px;border-radius:17px}body.drawer-open #stage{right:8px}.scene-heading{top:18px;left:17px;font-size:12px}.scene-controls{top:12px;right:12px}.scene-controls button{min-height:31px;width:30px}.bottom-nav{bottom:max(12px,env(safe-area-inset-bottom));padding:6px 7px;border-radius:15px;width:calc(100% - 16px);gap:1px;justify-content:space-around}.bottom-nav button{flex-direction:column;gap:0;min-width:0;font-size:10px;padding:3px 5px;min-height:48px}.bottom-nav button>span:first-child{font-size:22px}.toolbelt{gap:0;padding:5px;bottom:12px;max-width:calc(100% - 16px);width:max-content}.toolbelt button{min-width:46px;padding:3px 6px;font-size:10px;min-height:49px}.toolbelt button span{font-size:20px}.scene-tip{left:14px;bottom:82px;font-size:10px;max-width:calc(100% - 28px)}.context-strip{bottom:110px}.world-label{font-size:9px;padding:3px 7px;min-height:20px}#drawer{inset:100px 8px 90px;width:auto;border-radius:18px;box-shadow:0 8px 50px #2b422b35;background:#f7f8f0fc}#panelBody{padding:17px 19px}.drawer-head{padding:18px 19px 15px}.drawer-head h1{font-size:21px}#toast{bottom:89px;font-size:12px;padding:10px 14px;white-space:normal;width:max-content}.scene-tip:has(+.toolbelt){max-width:85%}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}

.takeover-notice{position:fixed;top:88px;left:50%;transform:translateX(-50%);z-index:80;background:#eee0c3;color:#7c5933;box-shadow:var(--shadow);width:max-content;max-width:95vw}

/* 第30轮：固定场景，抽屉独立过渡，像素世界使用清楚的直角控件。 */
:root{--page:#d0dbc7;--surface:#f2f0e2;--inset:#e5e5d5;--ink:#303c2c;--muted:#68705c;--green:#4d6c3b;--line:#c9cbb5;--shadow:4px 5px 0 #4b573827}
button,input,select{border-radius:3px}button{transition:background .12s,border-color .12s;box-shadow:inset 0 1px #ffffff70}button:active{transform:translateY(1px)}.card,.stat-tile,.notice,.empty{border-radius:4px}.pill{border-radius:3px}.avatar{border-radius:0}.brand strong{letter-spacing:2px}.grass-logo{transform:none;border-radius:0}.topbar{height:70px;background:#f2f0e2;box-shadow:0 2px 0 #73805b28}
#stage,body.drawer-open #stage{top:70px;left:0;right:0;bottom:0;border-radius:0;transition:none;box-shadow:none}
#drawer{top:85px;bottom:97px;right:18px;width:390px;border-radius:5px;box-shadow:5px 5px 0 #394e3538;animation:drawerIn .15s ease-out;contain:layout paint}
.bottom-nav{border-radius:4px;padding:5px;bottom:14px;background:#f2f0e2;box-shadow:3px 4px 0 #4b573827}.bottom-nav button{border-radius:2px}.toolbelt{bottom:88px;border-radius:3px;padding:4px;background:#f2f0e2;box-shadow:3px 4px 0 #4b573827}.toolbelt button{min-width:54px;min-height:48px}.scene-tip{bottom:158px;left:20px;border-radius:2px}.context-strip{bottom:148px}.scene-controls{right:18px;top:16px}.scene-heading{top:18px;left:20px}.world-label{border-radius:2px;font-size:11px;padding:3px 7px;min-height:20px;box-shadow:2px 2px 0 #26392225;will-change:transform;transition:none}.world-label:after{border-radius:0}.drawer-head{padding:18px 20px}.drawer-head h1{font-size:21px}#panelBody{padding:18px 20px}.toolbelt button.selected{box-shadow:inset 0 -3px #759252}.back-scene{top:55px}.scene-controls button{border-radius:2px}
@media(max-width:720px){.topbar{height:62px}#stage,body.drawer-open #stage{top:62px;left:0;right:0;bottom:0}.bottom-nav{bottom:10px}.toolbelt{bottom:81px;max-width:calc(100% - 12px)}.toolbelt button{min-width:44px}.scene-tip{bottom:145px;font-size:10px}.context-strip{bottom:142px}.scene-heading{left:12px;font-size:11px}.scene-controls{right:12px}#drawer{inset:74px 8px 81px;width:auto}.world-label{font-size:9px}.brand strong{font-size:20px}}

.work-table{font-size:12px}.work-head,.work-row{display:grid;grid-template-columns:78px repeat(4,minmax(0,1fr));gap:5px;align-items:center}.work-head{color:var(--muted);font-size:11px;padding:8px 0;border-bottom:1px solid var(--line);text-align:center}.work-row{padding-top:13px}.work-row select{width:100%;padding:4px;min-height:38px;font-size:12px}.work-row small{display:block;text-align:center;font-size:10px;padding-top:4px}.work-row>div small{text-align:left}.worker-status{display:flex;align-items:center;justify-content:space-between;font-size:11px;color:var(--muted);padding:6px 0 12px;border-bottom:1px solid var(--line)}.worker-status button{min-height:30px;padding:3px 9px}.schedule-box{padding:10px;background:var(--inset);margin:6px 0 14px}.shift-cell button{width:100%;padding:4px 1px}.work-cell{background:#c9d8b8}.rest-cell{background:#e5dfcb}.skill-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:14px 0;font-size:11px}.skill-strip span{background:var(--inset);padding:8px 4px;text-align:center}.skill-strip b{display:block;font-size:18px;margin-top:4px}.candidate>small{display:block;margin-top:9px}.candidate .primary{width:100%}.cost-details{margin-top:20px;font-size:12px}.cost-details summary{cursor:pointer;padding:12px 0}.candidate .card-head .pill{margin-left:auto}

/* 第31轮：场外入口与直接搬运提示，不占用地图内建筑位置。 */
:root{--page:#e4e8d8}.town-label{padding:9px 12px!important;font-size:12px!important;border:1px solid #c0c6ac;background:#f3f0df;box-shadow:3px 3px 0 #7e8c632b;cursor:pointer}.town-label:after{display:none}.tool-help{padding:8px 10px;background:#f2f0e2;color:#566947;border-radius:3px;font-size:11px}.context-strip{align-items:center}.world-label{background:#f4f2e3e8}.scene-heading small{color:#738062}#farmCanvas{touch-action:none}

/* 操作反馈浮在场景上方，不再盖住底部工具。 */
#toast{top:128px;bottom:auto;pointer-events:none;max-width:min(520px,calc(100vw - 32px));white-space:normal}.toolbelt button>span{display:flex;align-items:center;justify-content:center;height:26px}.toolbelt button{min-height:53px}.toolbelt svg{shape-rendering:geometricPrecision}.town-label{min-height:40px!important}@media(max-width:720px){#toast{top:121px;bottom:auto;font-size:12px}.toolbelt button{min-height:52px}.town-label{min-height:36px!important}}

/* 选种栏自己的浅色背景不能覆盖选中状态。 */
.context-strip button.primary{background:#4d6c3b;color:#fffbed;border-color:#405b32;box-shadow:inset 0 -2px #304d26}.context-strip button.primary:hover{background:#405b32}.context-strip button:not(.primary){color:#35482e}.worker-status>span{line-height:1.5;max-width:265px}

.town-badge{white-space:nowrap;min-height:35px;font-size:12px;background:#e1e8cc;color:#476038;font-weight:700;padding:6px 10px}.town-hero{display:flex;flex-direction:column;gap:6px;margin-bottom:18px}.town-hero strong{font-size:30px}.town-hero span{color:var(--muted)}.current-town{border-color:#789b55;background:#e9efd9}.refresh-row{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;margin-bottom:10px}[data-countdown],[data-deadline]{font-variant-numeric:tabular-nums}.card [data-unlock-level]{white-space:normal}.total-line h2{margin:0}.topbar{gap:18px}@media(max-width:720px){.topbar{gap:7px}.town-badge{font-size:10px;padding:4px 6px;min-height:32px}.brand strong{font-size:17px}.resources{gap:7px}.grass-logo{display:none}.refresh-row{align-items:flex-start;flex-direction:column}}

/* 村民头像沿用方头、连眉、长鼻和长袍轮廓。 */
.avatar{background:#a7b393;border-radius:2px}.avatar:before{width:23px;height:26px;left:8px;top:7px;background:linear-gradient(#76583b 0 4px,#b88762 4px);border:0;box-shadow:0 22px #775a3e}.avatar:after{content:"";left:17px;top:22px;width:6px;height:11px;background:#946b4e;box-shadow:-5px -6px 0 -1px #397653,5px -6px 0 -1px #397653,-6px -10px 0 -1px #493629,0 -10px 0 -1px #493629,6px -10px 0 -1px #493629}

.context-strip:has(.layout-status){flex-direction:column;background:#f4f1e5;border:1px solid #abbc97;padding:10px;min-width:280px;max-width:calc(100% - 24px);border-radius:3px;overflow:visible}.layout-status{font-size:12px;line-height:1.5;color:#3e5533}.layout-status small{display:block;color:#6d7e5e}.layout-actions{display:flex;gap:6px}.layout-actions button{flex:1;min-height:44px}.layout-actions .primary{background:#4d6c3b;color:#fffbed}.layout-actions button:disabled{opacity:.5}

.context-strip .layout-actions button.primary{background:#4d6c3b;color:#fffbed;border-color:#405b32}.context-strip .layout-actions button.primary:disabled{background:#d6d9c6;color:#6d765f}

body.layout-active #stage{transition:none!important}

/* 采集合并为一列，窄屏仍可直接调整每位村民的多项工作。 */
.work-head,.work-row{grid-template-columns:60px repeat(5,minmax(0,1fr));gap:4px}.skill-strip{grid-template-columns:repeat(5,1fr)}.work-row select{min-height:44px;padding:3px 1px}.resource-card .row-actions button{min-height:44px}.selected-resource{border:2px solid #77955e;background:#edf0df}.resource-card .subtext{margin:8px 0}.work-row>div strong{overflow-wrap:anywhere}
@media(max-width:420px){.work-head,.work-row{grid-template-columns:48px repeat(5,minmax(0,1fr));gap:3px}.work-row select{font-size:11px}.work-row small{font-size:9px}.toolbelt button{min-width:44px}}
/* 手机抽屉从下方轻移，避免横向进入的20像素位移撑出页面。 */
@keyframes drawerMobileIn{from{transform:translateY(10px);opacity:0}to{transform:none;opacity:1}}
@media(max-width:720px){#drawer{animation-name:drawerMobileIn}}

.work-head,.work-row{grid-template-columns:48px repeat(6,minmax(0,1fr))}.skill-strip{grid-template-columns:repeat(3,1fr)}.build-materials{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}.build-materials>div{background:#e6e9d7;padding:9px}.build-materials small{display:block;line-height:1.7;margin-top:6px}.build-site-card .row-actions{flex-wrap:wrap}.build-site-card button{min-height:44px}.work-name{display:none}
@media(max-width:720px){.work-head{display:none}.work-row{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.work-row>div:first-child{grid-column:1/-1}.work-row select{font-size:13px}.work-name{display:block!important;text-align:left!important;font-size:12px!important}.work-row>div{min-width:0}}

/* 加工配方的操作入口保持触屏尺寸，与施工卡一致。 */
[data-recipe-card] button{min-height:44px}

.execution-reason{display:block;margin-top:6px;line-height:1.5;max-width:36em;color:var(--muted,#65725c)}
.worker-life-detail{display:grid;gap:4px;margin-top:8px;font-variant-numeric:tabular-nums}.worker-life-detail small{line-height:1.6}.life-warning:not(:empty){padding:8px 10px;border-left:3px solid #ad7149;background:#f0e1c7;color:#754a30}.life-warning:empty{display:none}[data-worker-mood],[data-worker-stamina]{display:block;white-space:nowrap;font-variant-numeric:tabular-nums}
.village-panel h3{margin:22px 0 12px}.village-regions,.village-slots,.village-buildings{display:grid;gap:12px}.village-card{padding:16px;border:1px solid #cbd1b9;border-radius:12px;background:#f2f1e5}.village-card h4{margin:0 0 10px;color:#344632;overflow-wrap:anywhere}.village-card p{font-size:13px;line-height:1.7;margin:8px 0}.village-card small{display:block;margin-top:8px;line-height:1.6;color:#6c705e}.village-card button{margin:4px 8px 4px 0;min-height:38px}.village-card button:disabled{opacity:.5}
@media(min-width:721px){.work-head,.work-row{grid-template-columns:70px repeat(6,minmax(0,1fr))}.worker-status>div:first-child{min-width:0}.worker-life-detail{max-width:34em}}
.schedule-box [data-action="autoRestSchedule"],.worker-status button{min-height:44px}

/* 工具配方分行，制作与购置按钮保留足够的触控范围。 */
.tool-recipe strong,.tool-recipe small{display:block}.tool-recipe small{margin-top:6px}button[data-action="queueTool"],button[data-action="buyTool"],button[data-action="cancelTool"]{min-height:44px}
/* 引导卡与移动端底部面板：保留上半屏观察村民自动执行。 */
.tutorial-card{position:fixed;z-index:12;top:80px;left:18px;display:flex;align-items:center;gap:16px;max-width:min(540px,calc(100vw - 460px));padding:12px 14px;background:#f4f1df;border:1px solid #a7b68e;box-shadow:3px 4px 0 #4b573827}.tutorial-copy{min-width:0}.tutorial-copy small,.tutorial-copy strong{display:block}.tutorial-copy small{font-size:10px;margin-bottom:4px}.tutorial-copy strong{font-size:14px}.tutorial-copy p{font-size:11px;margin-top:4px;line-height:1.55}.tutorial-card button{flex-shrink:0;max-width:140px;white-space:normal;min-height:44px}.tutorial-active .scene-heading{display:none}.worker-tools h2{margin-top:20px}.worker-tools .total-line{gap:12px;flex-wrap:wrap}.worker-tools b{font-variant-numeric:tabular-nums}.pond-panel .stats-row{flex-wrap:wrap}.pond-panel .stat-tile{min-width:120px}.pond-panel .row-actions button{white-space:normal}.work-table{--work-count:7}.work-head,.work-row{grid-template-columns:60px repeat(var(--work-count),minmax(0,1fr))}.work-row small{overflow-wrap:anywhere}.work-row>label{min-width:0}
@media(max-width:1000px) and (min-width:721px){.tutorial-card{max-width:calc(100vw - 420px);gap:8px;align-items:stretch;flex-direction:column}.tutorial-card button{max-width:none}}
@media(max-width:720px){
 html,body{width:100%;max-width:100%;overflow-x:hidden}.topbar{padding:8px;gap:6px}.topbar>*{min-width:0}.resources{gap:6px}.resource strong{font-size:14px}.resource small{font-size:9px}.resource{gap:4px}.brand strong{font-size:16px;letter-spacing:0}.icon-btn,.town-badge,.close-btn,.scene-controls button{min-width:44px;min-height:44px}.topbar .icon-btn{flex-shrink:0}.scene-controls{top:8px;right:8px;gap:3px}.scene-controls button{width:44px}.scene-heading{top:60px}.tutorial-card{top:68px;left:8px;right:8px;max-width:none;padding:9px 10px;gap:10px}.tutorial-copy strong{font-size:12px}.tutorial-copy p{font-size:10px}.tutorial-copy small{font-size:9px}.tutorial-card button{font-size:11px;max-width:95px;padding:7px}.tutorial-active .scene-controls{top:125px}.tutorial-active .back-scene{top:125px}
 #drawer{top:auto;left:6px;right:6px;bottom:calc(76px + env(safe-area-inset-bottom));width:auto;height:52dvh;max-height:calc(100dvh - 210px);border-radius:12px 12px 4px 4px;contain:layout paint}.drawer-head{padding:9px 12px;min-height:64px}.drawer-head h1{font-size:18px}.drawer-head small{font-size:9px;letter-spacing:1px}#panelBody{min-height:0;padding:12px 14px 24px;touch-action:pan-y;overflow-x:hidden;overflow-wrap:anywhere;-webkit-overflow-scrolling:touch}.drawer-head:before{content:'';position:absolute;top:4px;left:calc(50% - 18px);width:36px;height:3px;background:#b4bca2;border-radius:3px}
 #panelBody button,#panelBody select,#panelBody input:not([type=checkbox]){min-height:44px}#panelBody button{white-space:normal;max-width:100%}.work-head{display:none}.work-row{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.work-row>div:first-child{grid-column:1/-1}.stats-row{gap:8px;flex-wrap:wrap}.stat-tile{min-width:0;padding:10px;flex-basis:40%}.stat-tile strong{font-size:19px}.field-row{flex-wrap:wrap}.tabs{flex-wrap:wrap}.tabs button{flex-basis:25%}.total-line{gap:8px;align-items:center}.total-line>span{min-width:0;overflow-wrap:anywhere}.row-actions button{flex-basis:40%}.bottom-nav{bottom:calc(8px + env(safe-area-inset-bottom));width:calc(100% - 12px)}.bottom-nav button{min-width:44px;min-height:48px;padding:3px}.toolbelt{bottom:calc(81px + env(safe-area-inset-bottom))}.toolbelt button{min-width:44px;min-height:48px}body.drawer-open .toolbelt,body.drawer-open .context-strip,body.drawer-open .scene-tip{display:none}.shift-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.check-line{min-height:44px}.check-line input{width:22px;height:22px}#toast{top:185px}
}
@media(max-width:720px){.resources button.resource{min-width:44px}#sceneLabels button.world-label[tabindex="0"]{min-height:44px!important;min-width:44px;display:flex;align-items:center;justify-content:center}dialog button{min-height:44px}}

/* 面板展开时给场景自己的可视矩形，村民不会落在抽屉背后。 */
@media(max-width:720px){body.drawer-open #stage{bottom:calc(min(52dvh,100dvh - 210px) + 76px + env(safe-area-inset-bottom))}body.drawer-open .scene-heading{display:none}body.drawer-open .scene-controls{top:8px}.tutorial-active.drawer-open .scene-controls{display:none}}
@media(max-width:720px){body.drawer-open #sceneLabels{display:none}.cost-details summary{min-height:44px}}
