body{margin:0;background:#f5faf7;color:#263332;font-family:"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,system-ui,sans-serif;line-height:1.7}.page-shell{width:min(1120px,calc(100% - 32px));margin:12px auto 36px}.page-shell *{box-sizing:border-box}.page-shell a{color:#26755b}.breadcrumb{font-size:.88rem;color:#667572}.app-heading h1{font-size:clamp(1.5rem,3vw,2rem);margin:16px 0 4px}.app-heading p{margin:0 0 18px}.game-frame{position:relative;isolation:isolate;height:clamp(480px,78dvh,720px);overflow:hidden;background:#e4efe7;border:1px solid #d1e2d8;border-radius:14px}.game-frame canvas{position:absolute;inset:0;width:100%;height:100%;touch-action:none}.stage-ui{position:absolute;inset:8px;display:flex;flex-direction:column;gap:5px;pointer-events:none}.stage-ui>*{pointer-events:auto;flex-shrink:0}.top,.hud,.map-buttons,.dock,.speeds{display:flex;align-items:center;gap:5px;flex-wrap:wrap}.top{background:#edf5ef;border-radius:8px;padding-left:8px}.top strong{font-size:.9rem}.top #maximize{margin-left:auto}.hud{background:#eaf4ee;padding:4px 8px;border-radius:8px;font-weight:700;font-size:.82rem;font-variant-numeric:tabular-nums}.map-buttons{align-self:flex-start;background:#edf5ef;border-radius:8px;padding:3px}.stage-ui>.viewport{flex:1;pointer-events:none;min-height:30px}.game-frame button,.game-frame select{font:inherit;line-height:1.25;min-width:44px;min-height:44px;border:1px solid #bed4c7;border-radius:8px;background:#f3f8f5;color:#263332;padding:6px 9px;cursor:pointer;max-width:100%}.game-frame button:disabled{opacity:.5;cursor:default}.game-frame button:focus-visible,.game-frame select:focus-visible{outline:3px solid #2f8f70;outline-offset:1px}.game-frame .primary,.game-frame button[aria-pressed=true]{background:#2f8f70;color:white;border-color:#2f8f70}.dock{background:#eaf4ee;border:1px solid #bed4c7;border-radius:8px;padding:4px}.dock>button{flex:1}.speeds{flex-wrap:nowrap}.speeds button{font-size:.8rem;padding:4px}#status{margin:0;background:#edf5ef;border-radius:6px;padding:3px 7px;font-size:.8rem;line-height:1.35;min-height:25px;max-height:2.9em;overflow:auto}.overlay{position:absolute;inset:8px;display:flex;align-items:center;justify-content:center;padding:8px;z-index:4;background:#26333266}.menu-card{background:white;border:1px solid #bed4c7;border-radius:12px;padding:16px;width:min(420px,100%);max-height:100%;overflow:auto;text-align:center}.menu-card h2{font-size:1.13rem;margin:0 0 8px}.menu-card p{font-size:.85rem}.menu-card button{margin:3px;font-size:.9rem}.panel{position:absolute;z-index:6;top:100px;bottom:100px;right:8px;width:min(370px,calc(100% - 16px));background:white;border:1px solid #bed4c7;border-radius:12px;overflow:auto;padding:12px;box-shadow:0 5px 24px #26333230;overscroll-behavior:contain}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:6px;position:sticky;top:-12px;background:white;z-index:1;padding:4px 0}.panel h2{font-size:1.05rem;margin:0}.panel h3{font-size:.95rem;margin:14px 0 6px}.panel p{font-size:.83rem;overflow-wrap:anywhere}.panel label{display:flex;align-items:center;gap:8px;min-height:44px;font-size:.88rem;flex-wrap:wrap}.panel input{width:22px;height:22px}.panel select{width:100%}.build-list{display:grid;grid-template-columns:1fr 1fr;gap:8px}.build-list button{display:grid;text-align:left;font-size:.85rem}.build-list small{font-size:.72rem}.cancel{position:absolute;bottom:100px;left:8px;z-index:7}.confirm{z-index:8}.info-section{background:white;border:1px solid #e0eae4;border-radius:12px;padding:20px;margin-top:22px}.info-section h2{font-size:1.25rem;margin:0 0 12px}.related-links{display:flex;gap:12px 22px;flex-wrap:wrap}[hidden]{display:none!important}.game-frame.maximized{position:fixed;inset:0;width:100%;height:100dvh;border:0;border-radius:0;z-index:1000}body.game-maximized{overflow:hidden}.maximized .stage-ui{inset:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))}@media(max-width:640px){.page-shell{width:calc(100% - 24px)}.hud{font-size:.73rem}.top strong{font-size:.83rem}.dock{gap:4px}.dock>button{font-size:.8rem;padding:4px;min-width:0}.speeds{gap:3px}.speeds button{font-size:.73rem;min-width:44px;padding:3px}.panel{width:calc(100% - 16px);bottom:120px}.cancel{bottom:75px;font-size:.8rem!important}.info-section{padding:16px}.menu-card{padding:10px}}@media(max-height:500px){.panel{top:60px;bottom:70px}.hud{font-size:.72rem}.top strong{font-size:.8rem}.game-frame.maximized .map-buttons{position:absolute;right:0;top:50px}.cancel{bottom:75px}}
.description-section{margin-top:24px}.description-section h2{font-size:1.25rem}.description-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.description-grid article{background:#fff;border:1px solid #d1e2d8;border-radius:12px;padding:20px;min-width:0}.description-grid h3{font-size:1rem;margin:0 0 8px}.description-grid p,.description-grid li{font-size:1rem;line-height:1.85;overflow-wrap:anywhere}.description-grid p{margin:10px 0}.description-grid ul{margin:12px 0 0;padding-left:1.3em}.description-grid li+li{margin-top:8px}@media(max-width:640px){.description-grid{grid-template-columns:1fr;gap:14px}.description-grid article{padding:16px}}
.game-frame:fullscreen{width:100%;height:100dvh;border:0;border-radius:0}.panel{top:var(--panel-top,110px);bottom:var(--panel-bottom,100px)}.cancel{bottom:var(--cancel-bottom,100px)}.expansion{display:grid;gap:6px;margin-top:10px}.panel li{font-size:.83rem;overflow-wrap:anywhere}.hud span{white-space:nowrap}.top,.dock{min-width:0}.game-frame button{touch-action:manipulation}.speeds button[aria-pressed=true]{background:#2f8f70;color:#fff}.build-list button[aria-pressed=true]{background:#2f8f70;color:#fff}@media(max-width:420px){.dock>button{flex:1 1 40%}.speeds{width:100%;justify-content:space-between}.speeds button{flex:1}.hud{gap:3px 10px}.game-frame{height:clamp(530px,85dvh,720px)}}

.share-section a{display:inline-flex;align-items:center;min-height:44px;padding:4px 10px;border:1px solid #bed4c7;border-radius:8px}

/* Keep all game controls above the canvas, including before play starts. */
.top,.dock{position:relative;z-index:10}.dock{flex-wrap:wrap}.dock>button{flex:1 1 0;min-width:44px}.speeds{width:100%;justify-content:space-between}.speeds button{flex:1}.overlay{top:62px;bottom:var(--overlay-bottom,150px)}.stage-ui>.viewport{min-height:0}.game-frame{min-height:0;scroll-margin-top:8px}.panel input[type=checkbox]{width:44px;height:44px;flex-shrink:0}#help-panel .description-grid{grid-template-columns:1fr;gap:12px}#help-panel .description-grid article{padding:12px}#help-panel .description-grid li{font-size:.9rem;line-height:1.7}#help-panel .description-grid h3{font-size:.95rem}.panel-heading{gap:8px}.panel-heading button{flex-shrink:0}
@media(max-width:640px),(max-height:500px){.game-frame{height:min(720px,calc(100dvh - 16px));min-height:0}.dock>button{flex:1 1 0;font-size:.8rem;min-width:44px}.game-frame.maximized{height:100dvh}.panel{min-height:0}.menu-card{padding:10px}.menu-card h2{font-size:1rem}}
@media(max-height:500px) and (min-width:641px){.game-frame .map-buttons{position:absolute;right:0;top:50px}.hud{align-self:flex-start;max-width:calc(100% - 220px)}.dock{flex-wrap:nowrap}.dock>button{flex:0 1 auto}.speeds{width:auto;margin-left:auto;min-width:200px}.stage-ui{gap:4px}}
@media(max-width:640px){#selected-panel{bottom:auto;height:auto;max-height:calc(100% - var(--panel-top,110px) - var(--panel-bottom,100px))}}

.top #sound-toggle{margin-left:auto;font-size:.8rem;flex-shrink:0}.top #maximize{margin-left:0;flex-shrink:0}.panel input[type=range]{display:block;width:100%;height:44px;min-height:44px;cursor:pointer}.panel output{font-variant-numeric:tabular-nums}

#expedition-roster .expedition-member{display:grid;grid-template-columns:24px minmax(0,1fr);align-items:center;gap:8px;min-height:44px;padding:8px 4px;cursor:pointer;border-bottom:1px solid #7b846a}#expedition-roster .expedition-member input{width:20px;height:20px;margin:0}#expedition-roster .expedition-member span{min-width:0;overflow-wrap:anywhere;font-size:.86rem}
#defense-roster .defense-member{display:grid;grid-template-columns:minmax(0,1fr);gap:4px;min-height:44px;padding:8px 0;border-bottom:1px solid #7b846a}#defense-roster .defense-member span{min-width:0;overflow-wrap:anywhere;font-size:.86rem}#defense-roster select{min-height:44px;width:100%}#defense-post-list button{min-height:44px}
#rest-roster .rest-member{min-height:44px;padding:8px 0;border-bottom:1px solid #7b846a}#rest-roster .rest-member p{overflow-wrap:anywhere;font-size:.86rem}#rest-roster button{min-height:44px;width:100%}#rest-graveyard{min-height:44px}

/* Permanent guide below the game; follows the existing description cards. */
.description-section .guide-table{width:100%;border-collapse:collapse;table-layout:fixed;margin:12px 0}
.description-section .guide-table caption{text-align:left;font-size:.9rem;color:#667572;padding-bottom:6px}
.description-section .guide-table th,.description-section .guide-table td{border-bottom:1px solid #e0eae4;padding:8px 0;text-align:left;vertical-align:top;font-size:.95rem;line-height:1.75;overflow-wrap:anywhere}
.description-section .guide-table th{padding-right:12px}
.description-section .guide-table th:first-child{width:30%}

/* Constrain only this page auto-ad host; retain the full ad via horizontal scroll. */
.zombie-village-page .google-auto-placed{min-width:0;max-width:100%;overflow-x:auto}
