/* Clear foreground controls; the painted landscape and floating gold labels stay intact. */
:root{--forest:#203f32;--pine:#315744;--cream:#faf5e8;--gold:#e7c879;--farm-ink:#263d31}
button{min-height:44px;transition:background .16s,border-color .16s;touch-action:manipulation}button:focus-visible,a:focus-visible{outline:3px solid #e8c878;outline-offset:3px}button:disabled{cursor:default;opacity:.48}.topbar{background:#193429f5;border-bottom:1px solid #b9a27345}.topbar nav{gap:6px}.topbar nav button{border-radius:10px;font-size:12px}.topbar .brandmark{border-color:#bdab76;color:#edcf88}.chapter-label{font-size:11px;letter-spacing:1px}.title-copy .intro-copy{line-height:1.65}.title-actions{gap:10px}.title-actions button{border-radius:12px}.modal{border-radius:22px;border-color:#8b936a;box-shadow:0 24px 90px #081d2ab0}.modal h2{line-height:1.14}.modal .primary{background:#d6bd78;color:#1c3428;border-color:#d6bd78}.modal button{border-radius:10px}.modal .answers{gap:10px}.modal .answer{padding:17px 20px;text-align:left}.story-kind{line-height:1.5}.story-footer{gap:12px}.theme-links button{border-radius:24px;padding:6px 12px;min-height:38px}.lesson-progress{display:flex;gap:8px;margin:24px 0}.lesson-progress span{width:32px;height:32px;display:grid;place-items:center;border-radius:50%;border:1px solid #788966;color:#a5b698}.lesson-progress .done{background:#456948;color:#fff4cd}.lesson-progress .current{background:#dfc787;color:#203c2f;border-color:#dfc787}.law-wall{display:grid;gap:7px;margin:20px 0;color:#c6d4b8;font-size:13px}.chapter-list{display:grid;gap:9px;margin:22px 0}.chapter-card{display:flex;align-items:center;gap:18px;padding:16px 20px;border:1px solid #8ea08040;border-radius:13px;background:#ffffff04}.chapter-card.current{border-color:#d5bf76;background:#8d9e4920}.chapter-card.locked{opacity:.55}.chapter-number{font:28px Georgia;color:#deca88;width:34px;text-align:center}.chapter-card h3{margin:0 0 5px;font-size:18px}.chapter-card p{margin:0;font-size:12px}.chapter-card small{display:block;margin-top:8px;font-size:9px;letter-spacing:1.5px;color:#d6c586}.chapter-preview{display:flex;align-items:center;gap:24px;border:1px solid #c8b87766;padding:22px;border-radius:14px;margin:25px 0}.chapter-preview>span{font:42px Georgia;color:#dac789}.chapter-preview h3,.chapter-preview p{margin:0}.chapter-preview p{font-size:13px;margin-top:6px}
#farmWorldUI{font-family:Arial,sans-serif}#farmWorldUI button{min-height:44px;box-shadow:none;border:1px solid #bfbc9c;background:var(--cream);color:var(--farm-ink);border-radius:10px;font-size:13px}#farmWorldUI button:hover{background:#fffaf0;border-color:#5d7b55}#farmWorldUI .primary{background:var(--forest);border-color:var(--forest);color:#fff4d7}.farm-identity{display:none}.farm-resources{top:16px;left:22px;right:auto;gap:0;background:#f9f4e8f0;border:1px solid #c3bd9b;border-radius:14px;box-shadow:0 6px 22px #19372422;overflow:hidden}.farm-resources>span{min-width:95px;border:0;box-shadow:none;border-radius:0;background:none;padding:10px 15px;grid-template-columns:1fr;text-align:center;border-right:1px solid #9aab8433}.farm-resources>span:last-child{border:0}.farm-resources b{font:22px Georgia;color:#294a35}.farm-resources small{font-size:10px;margin-top:3px;color:#5e7257}.farm-resources i{display:none}.farm-resources .resource-feed,.farm-resources .resource-eggs,.farm-resources .resource-timber{display:none}.farm-goals{top:106px;left:22px;width:252px;padding:19px;background:#faf6eaf0;border:1px solid #bfbd9d;box-shadow:0 8px 30px #1b3d2826;border-radius:16px}.farm-goals .eyebrow{font-size:9px;letter-spacing:1.2px;color:#617448}.farm-goals h3{font-size:26px;line-height:1.15;color:#294531}.farm-goals>p{font-size:13px;line-height:1.6;margin:10px 0}.farm-goals>button{font-size:13px;padding:10px 14px;min-height:44px;margin-top:12px}.animal-chips{display:none}.farm-tools-bar{bottom:18px;padding:7px;gap:4px;background:#f9f4e9f5;border-color:#b5b997;border-radius:19px;box-shadow:0 10px 35px #18302044}.farm-tools-bar button{width:74px;min-height:64px;border:0!important;background:transparent!important;gap:5px}.farm-tools-bar button>b{font:24px Georgia;color:#526849}.farm-tools-bar button>small{font-size:11px}.farm-tools-bar button[aria-pressed=true]{background:#dce6c7!important;box-shadow:none!important;border-color:transparent!important}.farm-tools-bar button[aria-pressed=true]>b{color:#285036}.farm-info{bottom:102px;font-size:12px;background:#203d30e8;border-color:#d9cda750;padding:10px 18px;max-width:570px;pointer-events:none}.map-controls{top:18px;right:22px;gap:6px}.map-controls button{width:44px;height:44px;font-size:24px!important;background:#faf7ecee!important}.world-panel{top:100px;right:22px;width:320px;background:#faf6eaf7;border-color:#bbb898;border-radius:18px;padding:24px;max-height:calc(100% - 230px);overflow-y:auto;overscroll-behavior:contain}.world-panel h3{font-size:27px;color:#27452f;max-width:90%}.world-panel p{font-size:13px;line-height:1.65}.world-panel .small{font-size:11px}.world-panel>button:not(.panel-close){min-height:44px;font-size:13px;padding:11px 13px}.world-panel .panel-close{min-height:40px!important;width:40px;height:40px;font-size:25px!important}.stock-list{padding:12px;border-radius:10px;background:#e3e9d2;gap:10px}.stock-list>span{font-size:13px}.place-grid,.task-list{display:grid;grid-template-columns:1fr 1fr;gap:8px}.place-grid button,.task-list button{padding:10px;text-align:left;font-size:12px!important;line-height:1.4}.goal-checks{display:grid;gap:12px;font-size:12px;margin:17px 0}.goal-checks>div{display:flex;gap:12px;justify-content:space-between;align-items:center}.goal-checks>div>span{max-width:170px}.goal-checks .done{color:#447e42}.goal-checks b{white-space:nowrap}.evidence-list{display:grid;gap:7px}.evidence-list>button{display:flex;justify-content:space-between;padding:9px 12px;text-align:left;font-size:12px!important}.evidence-callout{border-top:1px solid #c3c7aa;margin-top:22px;padding-top:20px}.evidence-callout .primary{width:100%}.world-haul{background:#faf6eaf5;border-color:#bfb691;border-radius:17px;width:235px}.world-haul p{font-size:12px}.world-grips button{min-width:44px}.world-haul .eyebrow{font-size:9px}.world-panel .task-list{grid-template-columns:1fr}
body.tactics-mode #playShell{display:block;height:calc(100svh - 82px)}body.tactics-mode .sidebar,body.tactics-mode .controlbar,body.tactics-mode .location{display:none}body.tactics-mode .world-column,body.tactics-mode .world-frame,body.tactics-mode #world{width:100%;height:100%;max-height:none;aspect-ratio:auto}#cowshedUI{position:absolute;inset:0;pointer-events:none;color:#233e2d;font-family:Arial,sans-serif}.tactics-top{position:absolute;top:18px;left:22px;right:22px;display:flex;align-items:flex-start;justify-content:space-between;gap:25px;background:#faf6eaf2;border:1px solid #b4bd93;border-radius:16px;padding:19px 24px;box-shadow:0 5px 24px #19372220;pointer-events:auto}.tactics-top .eyebrow{color:#657745;font-size:9px}.tactics-top h2{font:28px Georgia;margin:7px 0}.tactics-top p{font-size:13px;line-height:1.5;margin:0;max-width:780px}.tactics-top button{background:#284a35;color:#f6edcc;border-color:#284a35;white-space:nowrap;border-radius:10px}.tactics-bottom{position:absolute;bottom:17px;left:50%;transform:translateX(-50%);width:min(760px,calc(100% - 32px));background:#faf6eaf5;border:1px solid #b2b795;border-radius:17px;padding:15px 20px;box-shadow:0 8px 25px #1c302e44;pointer-events:auto}.tactic-stats{display:flex;justify-content:space-between;gap:15px;font-size:12px}.tactic-stats b{color:#365c3c;margin-left:5px}.advance-track{position:relative;height:9px;margin:24px 0 25px;background:#a9b38c;border-radius:10px}.advance-track>span{position:absolute;top:-5px;height:19px;border-radius:6px;background:#e3bf62;border:1px solid #a7812e}.advance-track>i{position:absolute;top:-7px;width:5px;height:23px;border-radius:4px;background:#773e30;transform:translateX(-50%)}.advance-track>i.in-window{background:#275938;outline:3px solid #fff0ad}.advance-track small{position:absolute;top:17px;font-size:8px;letter-spacing:1.5px;left:0;color:#637344}.advance-track small:last-child{right:0;left:auto}#tacticFeedback{font-size:12px;line-height:1.5;min-height:30px}.command-cards{display:flex;gap:10px;margin-top:6px}.command-card{flex:1;display:flex;align-items:center;gap:12px;text-align:left;padding:10px 14px;border:1px solid #aab38d;border-radius:12px;background:#edf0db;color:#203b2b;min-height:72px}.command-card strong{display:block;font-size:15px}.command-card small{display:block;margin-top:5px;font-size:10px;line-height:1.4;font-weight:normal}.command-card>b{font-size:10px;margin-left:auto;white-space:nowrap}.command-card.signal-ready{border-color:#a77f20;background:#f5dfa1;box-shadow:0 0 0 2px #ddbf60}.unit-art{display:block;flex-shrink:0;width:54px;height:54px;background-image:url('assets/art/cowshed-animals.png');background-size:162px 108px;background-repeat:no-repeat}.unit-0{background-position:0 0}.unit-1{background-position:-54px 0}.unit-2{background-position:-108px 0}.unit-3{background-position:0 -54px}.unit-4{background-position:-54px -54px}#tacticResult{pointer-events:auto;position:absolute;left:50%;top:40%;transform:translate(-50%,-50%);width:min(500px,calc(100% - 30px));background:#203d31f5;color:#f5ecd0;border:1px solid #d4c17f;border-radius:20px;padding:28px;box-shadow:0 20px 100px #102b2399}#tacticResult h2{font:32px Georgia}#tacticResult p{font-size:14px;line-height:1.6}#tacticResult .primary{background:#d7be79;color:#203d2c;border-radius:10px}
@media(max-width:1000px){body.tactics-mode #playShell{height:calc(100svh - 70px)}.farm-goals{width:220px;left:15px}.world-panel{right:15px;width:285px}.farm-resources{left:15px}.chapter-label{display:none}}
@media(max-width:700px){.topbar{padding:8px 10px;gap:7px;height:65px;min-height:65px}.topbar .brand>span:last-child{font-size:11px;letter-spacing:1px}.topbar .brand small{display:none}.topbar .brandmark{display:none}.topbar nav{gap:4px}.topbar nav button{min-height:42px;font-size:10px;padding:8px}.topbar #journalCount{display:none}.title-copy{padding-top:70px}.title-copy .intro-copy{font-size:16px}.title-footer{font-size:9px}.modal{padding:24px 20px;border-radius:17px;width:calc(100% - 18px);max-height:calc(100svh - 30px)}.modal h2{font-size:28px}.story-layout{gap:12px}.story-text{font-size:16px}.modal .answer{font-size:14px;padding:14px}.chapter-card{padding:13px 12px;gap:12px}.chapter-card h3{font-size:16px}.chapter-card p{font-size:11px}.farm-resources{top:10px;left:10px;right:auto;border-radius:12px;max-width:calc(100% - 170px)}.farm-resources>span{min-width:52px;padding:8px 9px}.farm-resources b{font-size:20px}.farm-resources small{font-size:9px}.map-controls{top:13px;right:10px;flex-direction:row;gap:4px}.map-controls button{width:40px;height:44px;min-height:44px!important;font-size:22px!important}.farm-goals{top:84px;left:10px;right:10px;width:auto;padding:12px 14px;border-radius:13px;max-height:185px;overflow-y:auto;background:#faf6eaf2}.farm-goals .eyebrow{font-size:8px}.farm-goals h3{font-size:20px;margin:7px 0}.farm-goals>p{font-size:12px;line-height:1.45;margin:5px 0}.farm-goals>button{font-size:12px;min-height:42px;margin-top:6px;padding:8px 12px}.farm-goals .goal-checks{gap:6px;font-size:11px;margin:9px 0}.goal-checks>div>span{max-width:none}.farm-goals .evidence-list{display:flex;gap:5px;flex-wrap:wrap}.farm-goals .evidence-list>button{flex:1;font-size:10px!important;line-height:1.4;padding:7px!important;min-width:85px}.farm-goals .evidence-list span{display:none}.farm-tools-bar{left:8px;right:8px;bottom:max(9px,env(safe-area-inset-bottom));padding:6px;gap:2px;border-radius:15px}.farm-tools-bar button{min-height:55px;min-width:0;width:auto;flex:1;gap:5px;padding:5px 2px!important}.farm-tools-bar button>small{font-size:10px}.farm-tools-bar button>b{font-size:22px}.farm-info{bottom:84px;max-width:calc(100% - 24px);width:calc(100% - 24px);font-size:11px;padding:8px 12px;border-radius:12px}.world-panel{left:10px;right:10px;top:auto;bottom:84px;width:auto;max-height:55%;padding:20px;box-shadow:0 10px 65px #16312066;z-index:8;background:#faf6eafa}.world-panel h3{font-size:24px}.world-panel p{font-size:12px}.world-panel .eyebrow{font-size:8px}.world-panel .place-grid button{min-height:44px}.world-haul{left:auto;right:10px;bottom:132px;width:200px;padding:12px}.world-haul .small-dial{height:100px;width:100px}.world-haul p{font-size:11px}.world-haul .eyebrow{font-size:8px}.world-grips{gap:3px}.world-grips button{min-width:39px}.tactics-top{left:10px;right:10px;top:10px;gap:12px;padding:14px}.tactics-top .eyebrow{font-size:7px;letter-spacing:1px}.tactics-top h2{font-size:22px}.tactics-top p{font-size:12px}.tactics-top button{font-size:10px;padding:7px;white-space:normal;min-width:60px}.tactics-bottom{width:calc(100% - 20px);bottom:max(9px,env(safe-area-inset-bottom));padding:13px}.tactic-stats{font-size:10px;gap:8px}.tactic-stats b{margin-left:2px}.command-cards{gap:6px}.command-card{flex-wrap:wrap;gap:6px;padding:9px;min-height:85px}.command-card .unit-art{width:36px;height:36px;background-size:108px 72px}.command-card .unit-1{background-position:-36px 0}.command-card .unit-2{background-position:-72px 0}.command-card .unit-3{background-position:0 -36px}.command-card .unit-4{background-position:-36px -36px}.command-card strong{font-size:12px}.command-card small{font-size:9px;max-width:145px}.command-card>b{font-size:9px}.command-card>span:nth-child(2){flex:1}.tactics-bottom #tacticFeedback{font-size:11px;min-height:32px}body.tactics-mode #playShell{height:calc(100svh - 65px)}#tacticResult{top:43%;padding:22px}#tacticResult h2{font-size:27px}#tacticResult p{font-size:13px}}
@media(prefers-reduced-motion:reduce){button{transition:none}}
.topbar .brand,.topbar nav button{color:#f2e7c8}.topbar nav button{background:#ffffff08;border-color:#c9c09840}.topbar nav button:hover{background:#ffffff16}.topbar .chapter-label{color:#d8d7bc}.topbar #journalCount{background:#d2c28d;color:#243e2d}

#farmWorldUI .primary:hover:not(:disabled){background:#365b42;color:#fff5d7;border-color:#365b42}
@media(max-width:700px){.farm-goals{max-height:205px}.farm-goals h3{margin:4px 0}.farm-goals .goal-checks{margin:7px 0}}

/* Map targets must retain their projected size; a 44px minimum distorts small diamonds. */
#farmWorldUI .plot-hit{min-height:0;min-width:0;border-radius:0;transition:none}
#farmWorldUI .plot-hit{cursor:pointer}
.field-labels{position:absolute;inset:0;z-index:3;pointer-events:none}
.field-badge{position:absolute;transform:translate(-50%,-50%);width:63px;text-align:center;font-size:10px;font-weight:bold;color:#fff4ce;text-shadow:0 1px 3px #102616,0 1px 5px #102616;pointer-events:none}
.field-badge span{white-space:nowrap}.field-badge[data-status=ripe]{color:#fff098}.field-badge progress{display:block;width:44px;height:5px;margin:3px auto 0;accent-color:#e6ca75;border:0;border-radius:4px;overflow:hidden;background:#284231}.field-badge progress[hidden]{display:none}
progress::-webkit-progress-bar{background:#566c493b;border-radius:5px}progress::-webkit-progress-value{background:#799747;border-radius:5px}.field-badge progress::-webkit-progress-bar{background:#253a29}.field-badge progress::-webkit-progress-value{background:#f1d67d}
.crop-progress{display:block;width:100%;height:8px;margin:13px 0 8px;accent-color:#769741;border:0;border-radius:5px;overflow:hidden;background:#bdc8a4}
.hen-step-track{display:flex;gap:4px;margin:13px 0 8px}.hen-step-track span{display:grid;place-items:center;flex:1;aspect-ratio:1;border:1px solid #c7cdb4;border-radius:50%;font-size:10px;color:#81906d;max-width:23px}.hen-step-track .done{background:#dce6c8;color:#436434;border-color:#b6c69c}.hen-step-track .current{background:#31563b;color:#fff6da;border-color:#31563b}
.feed-chain{font-size:10px;color:#6e795a;margin-top:11px;text-align:center}.farm-goals .hen-step-track+p{line-height:1.55}
/* Shared fields: group actions still pay the cost of each individual field. */
.field-batch{position:absolute;z-index:6;left:50%;bottom:154px;transform:translateX(-50%);display:flex;gap:6px;pointer-events:auto}
.touch-only-pull{display:none}
@media(max-width:700px),(pointer:coarse){.touch-only-pull{display:block}.world-grips,.haul-game .grip,.haul-game .keyboard-haul-copy{display:none}.haul-game .haul-layout{display:flex;flex-direction:column}.haul-game .touch-only-pull,.world-haul .touch-only-pull{width:100%;min-height:48px;border-radius:999px}.haul-game .haul-instructions>p:first-of-type{display:none}}
#farmWorldUI .field-batch button{font:12px/1.3 Georgia,serif;background:#173c2cde;color:#fff1cc;border:1px solid #d6bd7977;border-radius:999px;padding:10px 15px;min-height:44px;white-space:nowrap}
#farmWorldUI .field-batch button:hover:not(:disabled){background:#315641}
@media(max-width:700px){.field-batch{left:12px;right:12px;bottom:135px;transform:none;gap:5px}.field-batch button{flex:1;min-width:0}#farmWorldUI .field-batch button{font-size:11px;white-space:normal;padding:9px 7px}}
/* Macbeth's light speech panels and answer capsules keep the landscape visible. */
.overlay:has(.story-modal),.overlay:has(.question-modal){background:transparent;backdrop-filter:none;padding:20px 28px;align-items:flex-end}
.overlay:has(.question-modal){justify-content:flex-end;align-items:center}
.modal.story-modal,.modal.question-modal{background:linear-gradient(110deg,#07141455,#0714142e);border:0;box-shadow:none;border-radius:24px;color:#f8f2e3;text-shadow:0 2px 3px #101a18,0 0 8px #101a18;padding:18px 22px}
.modal.story-modal{width:min(640px,100%);max-width:640px;max-height:43svh;margin-bottom:0}
.story-modal .story-layout{grid-template-columns:60px minmax(0,1fr);gap:16px}
.story-modal .portrait{height:76px}.story-modal .portrait:has(.brandmark){display:none}.story-modal .story-layout:has(.brandmark){grid-template-columns:1fr}
.story-modal h2{font:18px/1.3 Georgia;color:#ffe7a1;margin:4px 0 8px}
.story-modal .story-kind{font-size:8px;letter-spacing:1.1px;color:#c4ccb8}
.story-modal .story-text{font:18px/1.45 Georgia;color:#f8f2e3}
.story-modal .story-footer{margin-top:8px;gap:8px}.story-modal .audio-status{font-size:10px;color:#c7cfbe}
.story-modal .audio-track{margin-top:9px}
.story-modal .theme-links{margin:9px 0 4px;gap:6px}
.story-modal .theme-links button{font-size:10px;min-height:32px;padding:4px 9px;color:#ede2c4;background:#10242285;border:1px solid #d5ddbd40}
.story-modal .story-actions button,.question-modal #quizContinue{font:12px Georgia;min-height:38px;padding:8px 14px;border-radius:999px;background:#10242285;color:#f0eee0;border:1px solid #d5ddbd66}
.story-modal .story-actions .primary,.question-modal #quizContinue{background:#d7c9a6e8;color:#172821}
.modal.question-modal{width:min(480px,100%);max-height:calc(100svh - 155px);padding:20px}
.question-modal h2{font:21px/1.35 Georgia;color:#ffe7a1;margin:6px 0 9px}
.question-modal .eyebrow{font-size:8px;letter-spacing:1.3px;margin:0;color:#d8c89e}
.question-modal .small{font-size:11px;line-height:1.4;color:#d5dcc9;margin-bottom:12px}
.question-modal .answers{gap:7px;margin:12px 0}
.modal.question-modal .answer{font:15px/1.4 Georgia;padding:10px 16px;min-height:44px;border-radius:999px;background:#10242280;color:#f8f2e3;border:1px solid #d5ddbd55;text-shadow:0 1px 3px #10201b}
.question-modal .answer:hover:not(:disabled){background:#284338c0;border-color:#d2c394}
.question-modal .answer.correct{background:#3a5b3da8;border-color:#e6d19d;opacity:1}
.question-modal .answer.wrong{background:#653f3799;border-color:#e1a790}
.question-modal .feedback{font:13px/1.5 Georgia;background:#17392b85;border:1px solid #b5c99e38;border-radius:18px;padding:11px 14px;margin:12px 0;color:#f0edda}
body:has(#overlay:not([hidden]) :is(.story-modal,.question-modal)) :is(.explore-bottom,.explore-places-button,#exploreViewToggle,.explore-haul,#exploreLabels){visibility:hidden}
@media(max-width:700px){
 .overlay:has(.story-modal),.overlay:has(.question-modal){padding:12px;align-items:flex-end}
 .modal.story-modal{max-height:45svh;padding:15px 17px;width:100%}
 .story-modal .story-layout{display:block}.story-modal .portrait{display:none}
 .story-modal .story-text{font-size:16px;line-height:1.45}.story-modal h2{font-size:17px}
 .story-modal .theme-links button{min-height:38px}.story-modal .story-actions button{min-height:42px}
 .modal.question-modal{width:100%;max-height:65svh;padding:17px}
 .question-modal h2{font-size:19px}.modal.question-modal .answer{font-size:14px;padding:10px 14px}
}
@media(max-width:700px){.field-badge{font-size:10px;width:62px}.farm-goals:has(.hen-step-track){max-height:235px}.farm-goals:has(.hen-step-track) h3{font-size:20px}.hen-step-track{margin:8px 0 5px}.hen-step-track span{max-width:21px}.feed-chain{margin-top:7px}.farm-goals .crop-progress{margin:8px 0}}

.reading-learners{display:flex;flex-wrap:wrap;gap:8px;margin:20px 0}.reading-learners button{min-height:44px;font-size:14px}.reading-learners button[aria-pressed=true]{background:#224d39;color:#ffe6ab}.reading-reference{padding:16px 20px;border-left:4px solid #b19a61;background:#b49d6220;font:24px Georgia;line-height:1.5}.reading-choices{display:grid;gap:10px;margin:16px 0}.reading-choices button{font-size:16px;text-align:left;line-height:1.5;padding:15px}.reading-choices button[aria-pressed=true]{background:#254d3c;color:#ffe6ae;border-color:#b9974b}.reading-choices.tiles{display:flex;flex-wrap:wrap}.reading-choices.tiles button{min-width:60px;min-height:60px;text-align:center;font-size:23px}.reading-sequence{padding:18px 14px;background:#284e3920;border-radius:12px;font:24px Georgia;min-height:64px}#readingFeedback{padding:14px 18px;background:#cfb98528;border-radius:10px;line-height:1.6}.reading-class .buttons button{min-height:44px}.reading-class h3{line-height:1.5}
