/* One farm, one visual language. Loaded after the historic game shell. */
:root{--fg-hud-edge:132px;--fg-dock-space:112px;--fg-edge:18px}
body.fg-stage{background:#151b23;font-family:'Bricolage Grotesque','DM Sans','Segoe UI',sans-serif}
body.fg-stage.fg-playing{--avi-bg:#151b23;--avi-panel:rgba(22,29,34,.95);--avi-panel2:rgba(246,239,227,.055);--avi-line:rgba(246,239,227,.16);--avi-ink:#f6efe3;--avi-ink2:#c1b7a5;--avi-accent:#f6b23c;--avi-gold:#f6b23c;--avi-accent2:#4d9768;--avi-ok:#89d3a0;--avi-chip:rgba(246,239,227,.07);--avi-field-bg:#11191d;--avi-field-ink:#f6efe3;--avi-shadow:0 12px 35px #08101330}
body.fg-stage.fg-playing.fg-theme-light{--avi-panel:rgba(250,246,237,.97);--avi-panel2:rgba(71,56,31,.05);--avi-line:rgba(71,56,31,.17);--avi-ink:#202824;--avi-ink2:#655e50;--avi-accent:#a56107;--avi-gold:#f6b23c;--avi-accent2:#37744d;--avi-ok:#2e7147;--avi-chip:rgba(71,56,31,.07);--avi-field-bg:#fffdf7;--avi-field-ink:#202824}
body.fg-stage :is(button,a,input,select,textarea):focus-visible{outline:3px solid #f6b23c!important;outline-offset:3px}
body.fg-stage button{touch-action:manipulation}
body.fg-stage.fg-playing .fg-world #fg-world-canvas{filter:none!important}
body.fg-stage.fg-playing .fg-hud{top:var(--fg-edge);left:var(--fg-edge);right:var(--fg-edge);gap:9px 18px;padding:13px 16px!important;border-radius:8px!important;box-shadow:var(--avi-shadow);pointer-events:auto;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
body.fg-stage.fg-playing .fg-hud-brand{min-width:190px;max-width:24vw;flex:0 1 220px;border-left:3px solid var(--avi-gold);padding-left:12px;order:1}
body.fg-stage.fg-playing .fg-hud-brand span{font-size:9px;letter-spacing:.12em;color:var(--avi-ink2)!important}
body.fg-stage.fg-playing .fg-hud-brand strong{font-size:14px;line-height:1.6;letter-spacing:-.02em}
body.fg-stage.fg-playing .fg-hud-metrics{flex:1 1 260px;gap:22px!important;order:2}
body.fg-stage.fg-playing .fg-hud-metrics>div{padding-left:14px!important}
body.fg-stage.fg-playing .fg-hud-metrics strong{font-size:15px;line-height:1.5;white-space:nowrap}
body.fg-stage.fg-playing .fg-hud-metrics span{font-size:8px;line-height:1.6;white-space:nowrap}
body.fg-stage.fg-playing .fg-hud-metrics>div:nth-child(4){display:none}
body.fg-stage.fg-playing .fg-hud-metrics>div:nth-child(5){display:none}
body.fg-stage.fg-playing #fg-avi-menubar{flex:0 1 auto;gap:5px;flex-wrap:wrap;order:4;justify-content:flex-end}
body.fg-stage.fg-playing #fg-avi-menubar button{border-radius:5px!important;font-size:10px!important;padding:7px 8px!important;min-height:32px;line-height:1.25}
body.fg-stage.fg-playing #fg-avi-speeds{padding:2px;background:var(--avi-panel2);border:1px solid var(--avi-line);border-radius:5px;gap:1px}
body.fg-stage.fg-playing #fg-avi-speeds button{border:0!important;min-width:30px;min-height:28px;padding:5px!important;font-family:var(--avi-mono)!important}
body.fg-stage.fg-playing #fg-avi-speeds button.on{background:#f6b23c!important;color:#251b0c!important}
#fg-shared-time{order:3;flex:0 0 auto;font-family:var(--avi-mono);border-left:1px solid var(--avi-line);padding-left:14px;line-height:1.5}
#fg-shared-time span{display:block;font-size:8px;color:var(--avi-ink2);letter-spacing:.06em}
#fg-shared-time strong{font-size:12px;font-weight:600;color:var(--avi-ink);white-space:nowrap}
body.fg-stage.fg-playing .fg-hud #fg-resources{gap:0;border-top:1px solid var(--avi-line);padding-top:9px;margin:0!important}
body.fg-stage.fg-playing .fg-resource{background:transparent!important;border:0!important;border-left:1px solid var(--avi-line)!important;border-radius:0!important;padding:0 13px!important;gap:3px 8px}
body.fg-stage.fg-playing .fg-resource:first-child{border-left:0!important;padding-left:0!important}
body.fg-stage.fg-playing .fg-resource:last-child{padding-right:0!important}
body.fg-stage.fg-playing .fg-resource span{font-size:8px;text-transform:uppercase;letter-spacing:.07em}
body.fg-stage.fg-playing .fg-resource strong{font-size:12px;font-weight:500}
body.fg-stage.fg-playing .fg-resource i{height:3px!important;opacity:.75;border-radius:0!important}
body.fg-stage.fg-playing .fg-resource.fg-rupture{background:rgba(194,81,56,.2)!important}
body.fg-stage.fg-playing.fg-theme-light .fg-resource.fg-rupture :is(span,strong){color:#9a3328!important}
body.fg-stage.fg-playing .fg-scene-cam-bar{left:var(--fg-edge);top:var(--fg-hud-edge);max-width:calc(100vw - 400px);gap:5px}
body.fg-stage.fg-playing .fg-scene-cam-bar button{min-height:35px;font-size:10px!important;border-radius:5px!important;box-shadow:var(--avi-shadow)!important;padding:8px 11px!important}
body.fg-stage.fg-playing .fg-scene-status{top:var(--fg-hud-edge)!important;right:var(--fg-edge)!important;border-radius:6px!important;max-width:280px;width:auto!important;padding:10px 12px!important}
body.fg-stage.fg-playing .fg-scene-status :is(strong,span,small){font-size:10px!important;line-height:1.55}
#fg-field-context{position:absolute;left:var(--fg-edge);bottom:128px;z-index:5;display:flex;flex-direction:column;gap:4px;pointer-events:none;color:#fffcf1;text-shadow:0 1px 5px #142019,0 1px 12px #142019;font-family:var(--avi-mono);padding-left:16px}
#fg-field-context strong{font-size:11px;font-weight:500}
#fg-field-context>span:last-child{font-size:9px;color:#f1ead7}
.fg-context-light{position:absolute;left:0;top:4px;width:6px;height:6px;background:#99d49c;border-radius:50%;box-shadow:0 0 0 3px #17382750}
#fg-field-journal{position:absolute;z-index:8;left:var(--fg-edge);top:calc(var(--fg-hud-edge) + 51px);width:286px;max-height:calc(100dvh - var(--fg-hud-edge) - var(--fg-dock-space) - 63px);overflow:auto;scrollbar-width:thin;padding:15px 17px 14px;border:1px solid var(--avi-line);border-radius:7px;background:var(--avi-panel);color:var(--avi-ink);box-shadow:var(--avi-shadow);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
#fg-field-journal header{display:flex;align-items:center;justify-content:space-between;gap:8px;border-bottom:1px solid var(--avi-line);padding-bottom:10px;margin-bottom:14px}
.fg-journal-eyebrow{font:600 8px var(--avi-mono);letter-spacing:.12em;color:var(--avi-ink2)}
#fg-guidance-toggle{border:1px solid var(--avi-line);border-radius:4px;background:transparent;color:var(--avi-ink);width:26px;height:26px;line-height:1;font-size:18px}
#fg-guidance-phase{font:600 8px/1.6 var(--avi-mono);letter-spacing:.05em;color:var(--avi-accent);margin:0 0 9px}
#fg-guidance-title{font-size:24px;line-height:1.05;letter-spacing:-.045em;margin:0 0 12px;font-weight:600;color:var(--avi-ink)}
#fg-guidance-text{font-size:12px;line-height:1.65;margin:0 0 15px;color:var(--avi-ink2)}
#fg-guidance-evidence{font:500 10px/1.5 var(--avi-mono);border-left:2px solid var(--avi-accent2);padding:6px 0 6px 9px;margin-bottom:13px;color:var(--avi-ink);background:var(--avi-panel2)}
#fg-guidance-action{width:100%;text-align:left;border:0;border-radius:5px;background:#f6b23c;color:#251b0c;padding:12px;font:700 11px var(--avi-font);min-height:40px;transition:background .15s}
#fg-guidance-action:hover{background:#ffca6d}
#fg-guidance-consequence{font-size:10px;line-height:1.55;color:var(--avi-ink2);margin:10px 0 0}
#fg-field-journal.collapsed{width:236px;padding:10px 13px}
#fg-field-journal.collapsed header{border:0;margin:0;padding:0}
#fg-field-journal.collapsed #fg-guidance-body{display:none}
body.fg-stage.fg-playing .fg-sidebar{top:var(--fg-hud-edge);bottom:112px;right:var(--fg-edge);width:374px;border-radius:8px!important;border-left:1px solid var(--avi-line)!important;z-index:11;max-height:none}
body.fg-stage.fg-playing .fg-sidebar-header{padding:14px 16px!important;gap:10px}
body.fg-stage.fg-playing .fg-sidebar-header button{border-radius:5px!important;box-shadow:none!important;font-size:10px!important;min-height:32px;padding:8px 10px!important;background:#f6b23c!important}
body.fg-stage.fg-playing #fg-panel-close{background:var(--avi-chip)!important;color:var(--avi-ink)!important;border:1px solid var(--avi-line)!important}
body.fg-stage.fg-playing .fg-tabs{border-radius:0;margin:0;padding:8px 12px;border-bottom:1px solid var(--avi-line)!important;background:transparent;gap:4px!important}
body.fg-stage.fg-playing .fg-tabs button{padding:9px 10px!important;min-height:34px;font-size:11px!important;border-radius:4px!important}
body.fg-stage.fg-playing .fg-tabs button.active{background:#f6b23c!important;color:#251b0c!important}
body.fg-stage.fg-playing .fg-sidebar-body{padding:16px!important;scrollbar-width:thin;scrollbar-color:#8d826c55 transparent}
body.fg-stage.fg-playing .fg-sidebar-body :is(h3,h4){letter-spacing:-.025em}
body.fg-stage.fg-playing .fg-sidebar :is(.fg-product,.fg-task-grid button,.fg-tech,.fg-lot,.fg-stock,.fg-crew-card,.avi-card,.avi-breed){border-radius:6px!important}
body.fg-stage.fg-playing .fg-sidebar :is(.fg-lot button,.fg-stock button,.fg-product button,.fg-tech button,.fg-crew-actions button,.fg-supply button,.fg-alert button,.avi-panel .btn.primary){background:#f6b23c!important;border-radius:5px!important;box-shadow:none!important;color:#251b0c!important}
body.fg-stage.fg-playing .fg-sidebar button{min-height:34px}
body.fg-stage.fg-playing .fg-sidebar :is(.fg-filter-note,.fg-market-rate,.fg-telemetry,.fg-selected-lot,.fg-rail-story,.fg-care-note){background:var(--avi-panel2)!important;border:1px solid var(--avi-line)!important;border-radius:5px!important;color:var(--avi-ink2)!important}
body.fg-stage.fg-playing :is(.fg-product,.fg-tech)>div:first-child>span{background:var(--avi-chip)!important;color:var(--avi-accent)!important;border-radius:5px!important}
body.fg-stage.fg-playing .fg-progress{background:var(--avi-chip)!important}
body.fg-stage.fg-playing .fg-progress i{background:var(--avi-accent2)!important}
body.fg-stage.fg-playing .fg-sidebar input[type=range]{accent-color:#bd8530;background:transparent!important;padding:0!important}
body.fg-stage.fg-playing .fg-sidebar-footer{font-size:11px!important;padding:12px 16px!important}
body.fg-stage.fg-playing .fg-dock{left:var(--fg-edge)!important;right:var(--fg-edge)!important;bottom:var(--fg-edge)!important;border-radius:7px!important;padding:10px 12px!important;gap:8px!important;min-height:70px;box-shadow:var(--avi-shadow)}
body.fg-stage.fg-playing .fg-dock-buttons{gap:8px;scrollbar-width:thin;scrollbar-color:#8d826c55 transparent;padding-bottom:2px}
body.fg-stage.fg-playing .fg-dock-group{border:0!important;border-right:1px solid var(--avi-line)!important;border-radius:0;background:transparent;padding:0 8px 0 0;gap:3px}
body.fg-stage.fg-playing .fg-dock-group:last-child{border:0!important}
body.fg-stage.fg-playing .fg-dock-label{writing-mode:vertical-rl;transform:rotate(180deg);font-size:7px;padding:0 4px;letter-spacing:.12em;opacity:.75}
body.fg-stage.fg-playing .fg-dock-group button{min-height:35px;padding:9px 10px!important;border-radius:4px!important;font-size:11px!important;white-space:nowrap}
body.fg-stage.fg-playing .fg-dock-group button.fg-hint{background:#f6b23c!important;color:#251b0c!important}
body.fg-stage.fg-playing .fg-dock-group button[data-quick=week]{background:var(--avi-accent2)!important}
body.fg-stage.fg-playing #fg-instruction{font-size:10px;line-height:1.4;color:var(--avi-ink2);flex:1 0 auto;max-width:65%;white-space:normal}
body.fg-stage.fg-playing #fg-active-farmer{margin-left:auto;font-size:9px;max-width:30%;color:var(--avi-ink2)}
body.fg-stage.fg-playing #fg-cmd{top:auto;left:var(--fg-edge);bottom:183px;border-radius:6px;max-height:calc(100dvh - var(--fg-hud-edge) - 150px);z-index:10;width:286px}
body.fg-stage.fg-playing #fg-cmd.collapsed{width:auto;bottom:183px}
body.fg-stage.fg-playing #fg-cmd.collapsed .fg-cmd-head{padding:8px 11px}
body.fg-stage.fg-playing #fg-cmd .fg-cmd-head strong{font-size:11px;font-weight:500}
body.fg-stage.fg-playing #fg-cmd .fg-cmd-head button{min-height:28px;padding:0;text-align:center}
body.fg-stage.fg-playing #fg-cmd button{border-radius:4px;min-height:34px}
body.fg-stage.fg-playing .fg-mini-map{left:auto!important;right:var(--fg-edge)!important;bottom:126px!important;width:86px!important;border-radius:5px!important;background:rgba(20,28,27,.8)!important;border-color:#f6efe366!important}
body.fg-stage.fg-playing .fg-mini-map canvas{width:78px!important;height:78px!important}
body.fg-stage.fg-playing #fg-live.fg-panel-open .fg-mini-map{visibility:hidden}
body.fg-stage.fg-playing .fg-mini-map span{font-size:6px;letter-spacing:.05em;white-space:nowrap}
body.fg-stage.fg-playing .fg-world-tooltip{left:50%!important;right:auto!important;bottom:124px!important;transform:translateX(-50%);max-width:40vw;font-size:10px!important;padding:8px 12px!important;border-radius:4px!important;text-overflow:ellipsis;white-space:nowrap}
body.fg-stage.fg-playing #fg-avi-toasts{top:auto;bottom:72px;width:min(340px,70vw);z-index:8}
body.fg-stage.fg-playing #fg-avi-toasts .avi-toast{font-size:11px;border-radius:6px;padding:5px 10px}
body.fg-stage.fg-playing.fg-dossier .fg-bottom-grid{bottom:112px;border-radius:7px;z-index:12;max-height:50vh}
body.fg-avi-immersive :is(#fg-field-journal,#fg-field-context){visibility:hidden!important;pointer-events:none!important}

/* Entry is a considered choice, with the same materials as the instruments. */
body.fg-stage:not(.fg-playing) #fg-avi-menubar{top:20px;right:28px;max-width:calc(100vw - 200px)}
body.fg-stage:not(.fg-playing) #fg-avi-menubar button{background:#f6efe30f!important;color:#f6efe3!important;border-color:#f6efe335!important;border-radius:5px!important;min-height:34px;padding:7px 10px!important}
body.fg-stage #fg-setup{justify-items:stretch;align-content:start;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:48px max(34px,calc((100vw - 1160px)/2)) 72px;gap:0;background:linear-gradient(90deg,#151b23f2 0%,#151b23ed 48%,#151b23a3 100%),url('/assets/farm-photo.jpg') center 55%/cover;color:#f6efe3!important;font-family:'Bricolage Grotesque','DM Sans',sans-serif}
body.fg-stage #fg-setup :is(.fg-setup-head,.fg-setup-grid,.fg-setup-footer){width:100%;max-width:none}
body.fg-stage #fg-setup .fg-setup-head{max-width:760px;padding-bottom:18px}
body.fg-stage #fg-setup .fg-overline{color:#f6b23c;letter-spacing:.18em;font:600 10px var(--avi-mono,'JetBrains Mono',monospace)}
body.fg-stage #fg-setup h3{font-size:clamp(36px,4.5vw,64px);font-weight:500;letter-spacing:-.055em;line-height:1.02;margin:18px 0 15px;color:#f6efe3!important}
body.fg-stage #fg-setup .fg-setup-head p{font-size:13px;line-height:1.7;max-width:580px;color:#c8c0b1!important;margin:0}
body.fg-stage #fg-setup .fg-setup-grid{gap:36px;margin:12px 0 0}
body.fg-stage #fg-setup legend{font:500 10px var(--avi-mono,'JetBrains Mono',monospace);letter-spacing:.12em;color:#d2c9b7;margin-bottom:14px}
body.fg-stage #fg-setup .fg-choice{border:1px solid #f6efe328!important;border-radius:6px!important;background:#182126db!important;min-height:102px;padding:12px 15px 12px 12px;gap:15px;margin-bottom:10px;box-shadow:none;transition:border-color .15s,background .15s;backdrop-filter:blur(8px)}
body.fg-stage #fg-setup .fg-choice:has(input:checked){border-color:#f6b23c!important;background:#f6b23c12!important;box-shadow:inset 3px 0 #f6b23c!important}
body.fg-stage #fg-setup .fg-choice:hover{transform:none;border-color:#f6b23c80!important}
body.fg-stage #fg-setup .fg-choice:focus-within{outline:2px solid #f6b23c;outline-offset:3px}
body.fg-stage #fg-setup .fg-choice input{opacity:1;right:14px;top:16px;pointer-events:auto;width:14px;height:14px;accent-color:#f6b23c}
body.fg-stage #fg-setup .fg-choice img{width:100px;height:76px;flex:0 0 auto;border-radius:3px;filter:saturate(.7);object-fit:cover}
body.fg-stage #fg-setup .fg-choice:has(input:checked) img{filter:saturate(.9)}
body.fg-stage #fg-setup .fg-choice strong{font-size:15px;font-weight:600;line-height:1.4;color:#f6efe3!important}
body.fg-stage #fg-setup .fg-choice small{font-size:11px;color:#beb7a9!important;line-height:1.5}
body.fg-stage #fg-setup .fg-choice b{font:500 10px var(--avi-mono,'JetBrains Mono',monospace);color:#e2be77!important;margin-top:2px}
body.fg-stage #fg-setup .fg-model{padding-left:19px;min-height:102px}
body.fg-stage #fg-setup .fg-model span{display:grid;grid-template-columns:24px 1fr;gap:2px 12px;align-items:center}
body.fg-stage #fg-setup .fg-model i{grid-row:1/3;font-style:normal;font-size:25px;color:#cfb070;line-height:1}
body.fg-stage #fg-setup .fg-model small{grid-column:2;max-width:380px}
body.fg-stage #fg-setup .fg-setup-footer{border-top:1px solid #f6efe32b;padding-top:22px;margin-top:15px;gap:20px;align-items:end}
body.fg-stage #fg-setup .fg-setup-footer label{flex:1;font-size:9px;letter-spacing:.1em;color:#bfb7a6!important;gap:9px}
body.fg-stage #fg-farm-name{width:100%;max-width:400px;min-width:0;background:#10171bb0!important;border:1px solid #f6efe33b!important;border-radius:5px;color:#f6efe3!important;padding:13px 15px;font-size:14px;letter-spacing:0}
body.fg-stage #fg-start{min-height:48px;border-radius:5px;background:#f6b23c;color:#251b0c;padding:0 26px;font-size:13px;box-shadow:none;white-space:nowrap}
body.fg-stage #fg-start:hover{transform:none;background:#ffca6d}
body.fg-stage #fg-setup [data-leave]{color:#c8c0b1;font-size:10px;font-weight:500;border-bottom:1px solid #f6efe34d;padding-bottom:3px;align-self:end;margin-bottom:14px}

body.fg-stage.fg-playing #fg-instruction{padding:0;border:0;background:transparent;box-shadow:none}
body.fg-stage.fg-playing .fg-sidebar{bottom:var(--fg-dock-space)}
body.fg-stage.fg-playing .fg-mini-map{bottom:calc(var(--fg-dock-space) + 8px)!important}
body.fg-stage.fg-playing .fg-world-tooltip{bottom:calc(var(--fg-dock-space) + 8px)!important}
body.fg-stage.fg-playing #fg-cmd,body.fg-stage.fg-playing #fg-cmd.collapsed{bottom:calc(var(--fg-dock-space) + 70px)}
@media(max-width:1350px){body.fg-stage.fg-playing #fg-active-farmer{display:none!important}}
@media(max-height:720px) and (min-width:761px){#fg-field-journal{padding:11px 14px}#fg-field-journal header{padding-bottom:7px;margin-bottom:8px}#fg-guidance-title{font-size:21px;margin-bottom:8px}#fg-guidance-text{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.45;font-size:11px;margin-bottom:10px}#fg-guidance-evidence{display:none}#fg-guidance-consequence{display:none}#fg-guidance-phase{margin-bottom:6px}#fg-guidance-action{min-height:35px;padding:10px}body.fg-stage #fg-setup{padding-top:65px;padding-bottom:22px;align-content:start}body.fg-stage #fg-setup h3{font-size:38px;margin-top:10px;margin-bottom:10px}body.fg-stage #fg-setup .fg-setup-head{padding-bottom:4px}body.fg-stage #fg-setup .fg-setup-head p{font-size:12px}body.fg-stage #fg-setup .fg-choice,body.fg-stage #fg-setup .fg-model{min-height:80px}body.fg-stage #fg-setup .fg-choice img{height:56px}body.fg-stage #fg-setup legend{margin-bottom:10px}body.fg-stage #fg-setup .fg-setup-footer{padding-top:12px}}
@media(min-width:1550px){body.fg-stage.fg-playing .fg-hud-metrics>div:nth-child(5){display:block}}
@media(max-width:1250px){body.fg-stage.fg-playing .fg-hud-brand{min-width:150px;max-width:22vw;flex-basis:170px}body.fg-stage.fg-playing .fg-hud-metrics{flex-basis:200px;gap:12px!important}body.fg-stage.fg-playing .fg-hud-metrics>div:nth-child(3){display:none}body.fg-stage.fg-playing #fg-avi-menubar{max-width:43%}body.fg-stage.fg-playing #fg-avi-menubar #fg-avi-theme{display:none}body.fg-stage.fg-playing #fg-avi-menubar button{padding:6px!important;font-size:9px!important}#fg-shared-time{padding-left:10px}body.fg-stage.fg-playing .fg-hud{gap:8px 12px}body.fg-stage.fg-playing .fg-sidebar{width:350px}}
@media(max-height:790px) and (min-width:761px){body.fg-stage #fg-setup{padding-top:50px;padding-bottom:25px}body.fg-stage #fg-setup h3{font-size:44px;margin-top:12px}body.fg-stage #fg-setup .fg-setup-head{padding-bottom:7px}body.fg-stage #fg-setup .fg-choice,body.fg-stage #fg-setup .fg-model{min-height:88px;padding-top:8px;padding-bottom:8px}body.fg-stage #fg-setup .fg-choice img{height:65px}body.fg-stage #fg-setup .fg-setup-footer{padding-top:16px;margin-top:7px}#fg-field-journal{padding:12px 15px}#fg-guidance-text{font-size:11px;margin-bottom:10px}#fg-guidance-title{font-size:22px}#fg-guidance-consequence{display:none}}
@media(max-width:1000px){:root{--fg-edge:12px}body.fg-stage.fg-playing .fg-hud{padding:10px 12px!important}body.fg-stage.fg-playing #fg-avi-menubar{max-width:none;flex-basis:100%;order:7;justify-content:flex-start;margin-left:0;flex-wrap:nowrap}body.fg-stage.fg-playing .fg-hud-brand{max-width:40vw;flex-basis:220px}body.fg-stage.fg-playing .fg-hud-metrics{flex:1;justify-content:flex-end}#fg-shared-time{order:3}body.fg-stage.fg-playing #fg-avi-menubar #fg-avi-speeds{margin-left:auto}body.fg-stage.fg-playing .fg-hud #fg-resources{grid-template-columns:repeat(6,minmax(0,1fr))!important;order:6}body.fg-stage.fg-playing .fg-resource{padding:0 8px!important;gap:4px}body.fg-stage.fg-playing .fg-resource span{font-size:7px}body.fg-stage.fg-playing .fg-resource strong{font-size:10px}body.fg-stage.fg-playing .fg-scene-cam-bar{top:var(--fg-hud-edge);max-width:calc(100vw - 245px)}body.fg-stage.fg-playing .fg-scene-status{top:var(--fg-hud-edge)!important;max-width:220px}#fg-field-journal{width:255px}body.fg-stage.fg-playing .fg-sidebar{top:var(--fg-hud-edge);bottom:110px;left:auto;width:min(390px,60vw);max-height:none}body.fg-stage.fg-playing #fg-cmd{max-height:45vh}body.fg-stage.fg-playing #fg-active-farmer{max-width:35%}body.fg-stage.fg-playing #fg-instruction{display:block;max-width:60%}body.fg-stage.fg-playing .fg-dock-label{display:none}body.fg-stage.fg-playing .fg-dock{min-height:72px}}
@media(max-width:760px){body.fg-stage #fg-setup{align-content:start;padding:76px 22px 26px;background:linear-gradient(180deg,#151b23f0,#151b23eb),url('/assets/farm-photo.jpg') center/cover}body.fg-stage #fg-setup .fg-setup-grid{grid-template-columns:1fr;gap:20px}body.fg-stage #fg-setup h3{font-size:44px}body.fg-stage #fg-setup .fg-setup-head{padding-bottom:17px}body.fg-stage #fg-setup .fg-setup-head p{font-size:12px}body.fg-stage #fg-setup .fg-choice{min-height:94px}body.fg-stage #fg-setup .fg-model{min-height:90px}body.fg-stage #fg-setup .fg-setup-footer{flex-wrap:wrap;gap:18px}body.fg-stage #fg-setup .fg-setup-footer label{flex:1 0 100%}body.fg-stage #fg-farm-name{max-width:none}body.fg-stage #fg-start{flex:1}body.fg-stage #fg-setup [data-leave]{align-self:center;margin:0}body.fg-stage:not(.fg-playing) #fg-avi-menubar{top:17px;left:22px;right:22px;justify-content:flex-start;max-width:none}body.fg-stage:not(.fg-playing) #fg-avi-menubar button{font-size:9px!important;padding:6px 8px!important}#fg-field-journal{top:auto;bottom:106px;left:var(--fg-edge);width:min(300px,calc(100vw - 24px));padding:10px 13px}#fg-field-journal header{padding-bottom:8px;margin-bottom:9px}#fg-guidance-title{font-size:20px;margin-bottom:7px}#fg-guidance-phase{margin-bottom:5px;font-size:7px}#fg-guidance-text{font-size:11px;line-height:1.5;margin-bottom:9px}#fg-guidance-evidence{font-size:9px;margin-bottom:8px;padding:4px 0 4px 8px}#fg-guidance-consequence{display:none}#fg-guidance-action{padding:9px 10px;min-height:36px;font-size:10px}#fg-field-context{display:none}body.fg-stage.fg-playing .fg-sidebar{left:var(--fg-edge);right:var(--fg-edge);width:auto;top:var(--fg-hud-edge);bottom:108px;max-height:none}body.fg-stage.fg-playing #fg-live.fg-panel-open #fg-field-journal{visibility:hidden}body.fg-stage.fg-playing .fg-scene-status{display:none!important}body.fg-stage.fg-playing .fg-scene-cam-bar{max-width:calc(100vw - 24px);gap:4px}body.fg-stage.fg-playing .fg-scene-cam-bar button{min-height:32px;font-size:9px!important;padding:7px 9px!important}body.fg-stage.fg-playing .fg-mini-map{display:none!important}body.fg-stage.fg-playing .fg-world-tooltip{display:none}body.fg-stage.fg-playing #fg-cmd,body.fg-stage.fg-playing #fg-cmd.collapsed{bottom:auto;top:calc(var(--fg-hud-edge) + 42px);max-height:calc(100dvh - var(--fg-hud-edge) - 155px);width:min(286px,calc(100vw - 24px))}body.fg-stage.fg-playing #fg-cmd.collapsed{width:auto}body.fg-stage.fg-playing #fg-cmd.show:not(.collapsed){z-index:15}body.fg-stage.fg-playing .fg-dock{min-height:72px;padding:9px 10px!important;gap:5px!important}body.fg-stage.fg-playing .fg-dock-group button{min-height:37px;font-size:10px!important}body.fg-stage.fg-playing #fg-active-farmer{font-size:8px;max-width:100%}body.fg-stage.fg-playing #fg-instruction{font-size:9px;line-height:1.4;max-width:62%}body.fg-stage.fg-playing #fg-avi-toasts{top:calc(var(--fg-hud-edge) + 40px);z-index:30}}
@media(max-width:560px){:root{--fg-edge:9px}body.fg-stage.fg-playing .fg-hud{padding:9px 10px!important;gap:8px 10px}body.fg-stage.fg-playing .fg-hud-brand{flex:1;min-width:0;max-width:48%;padding-left:8px}body.fg-stage.fg-playing .fg-hud-brand span{font-size:7px}body.fg-stage.fg-playing .fg-hud-brand strong{font-size:11px}body.fg-stage.fg-playing .fg-hud-metrics{flex:0;gap:0!important}body.fg-stage.fg-playing .fg-hud-metrics>div:first-child{display:none}body.fg-stage.fg-playing .fg-hud-metrics strong{font-size:12px}body.fg-stage.fg-playing .fg-hud-metrics span{font-size:7px}#fg-shared-time{border:0;flex:1;text-align:right;padding-left:0}#fg-shared-time span{font-size:6px}#fg-shared-time strong{font-size:9px}body.fg-stage.fg-playing .fg-hud #fg-resources{grid-template-columns:repeat(3,minmax(0,1fr))!important;row-gap:9px;padding-top:8px}body.fg-stage.fg-playing .fg-resource{padding:0 9px!important}body.fg-stage.fg-playing .fg-resource:nth-child(4){border-left:0!important;padding-left:0!important}body.fg-stage.fg-playing .fg-resource span{font-size:6px}body.fg-stage.fg-playing .fg-resource strong{font-size:9px}body.fg-stage.fg-playing #fg-avi-menubar{width:100%;gap:4px;flex-wrap:nowrap;justify-content:flex-start}body.fg-stage.fg-playing #fg-avi-menubar button{font-size:8px!important;padding:5px!important;min-height:31px}body.fg-stage.fg-playing #fg-avi-menubar #fg-reset{display:none}body.fg-stage.fg-playing #fg-avi-menubar #fg-avi-speeds{margin-left:auto;gap:0}body.fg-stage.fg-playing #fg-avi-menubar #fg-avi-speeds button{font-size:9px!important;min-width:25px;min-height:27px;padding:4px!important}body.fg-stage.fg-playing #fg-instruction{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex-basis:100%}body.fg-stage.fg-playing #fg-active-farmer{display:none}body.fg-stage.fg-playing .fg-sidebar-header{padding:10px 12px!important}body.fg-stage.fg-playing .fg-sidebar-body{padding:12px!important}body.fg-stage.fg-playing .fg-tabs{display:flex!important;padding:6px 9px;gap:3px!important}body.fg-stage.fg-playing .fg-tabs button{font-size:10px!important;min-height:31px;padding:8px!important}body.fg-stage.fg-playing .fg-sidebar-footer{font-size:10px!important;padding:9px 12px!important}body.fg-stage.fg-playing .fg-sidebar-footer .fg-selected-lot{font-size:9px}}
@media(max-width:560px){body.fg-stage.fg-playing .fg-hud-brand{max-width:none;flex:1 1 110px;min-width:0}body.fg-stage.fg-playing .fg-hud-brand strong{max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis}body.fg-stage.fg-playing .fg-hud-metrics{flex:0 0 auto;min-width:104px}body.fg-stage.fg-playing .fg-hud-metrics>div{padding-left:8px!important}#fg-shared-time{flex:0 0 69px;min-width:0}#fg-shared-time strong{font-size:8px}body.fg-stage.fg-playing .fg-hud-metrics strong{font-size:11px}body.fg-stage.fg-playing .fg-dock-buttons{border-right:2px solid var(--avi-accent);padding-right:9px}}
@media(max-width:360px){body.fg-stage.fg-playing .fg-hud-brand{flex-basis:88px}body.fg-stage.fg-playing .fg-hud-metrics{min-width:94px}body.fg-stage.fg-playing .fg-hud-metrics strong{font-size:10px}#fg-shared-time{flex-basis:62px}body.fg-stage.fg-playing #fg-avi-menubar #fg-avi-speeds button{min-width:23px}body.fg-stage.fg-playing #fg-avi-menubar button{font-size:7px!important}}
@media(max-width:560px){body.fg-stage.fg-playing .fg-resource{grid-template-columns:1fr;gap:2px!important}body.fg-stage.fg-playing .fg-resource span{font-size:7px;line-height:1.25}body.fg-stage.fg-playing .fg-resource strong{font-size:11px;line-height:1.3}body.fg-stage.fg-playing .fg-resource i{margin-top:3px}body.fg-stage.fg-playing .fg-hud-brand span{font-size:8px}body.fg-stage.fg-playing .fg-hud-metrics span{font-size:8px}#fg-shared-time span{font-size:7px}#fg-shared-time strong{font-size:9px}}
@media(max-height:680px) and (max-width:760px){#fg-field-journal{width:250px}#fg-guidance-text,#fg-guidance-evidence{display:none}#fg-field-journal header{margin-bottom:7px;padding-bottom:5px}#fg-guidance-title{font-size:18px}body.fg-stage.fg-playing .fg-hud #fg-resources{padding-top:5px;row-gap:6px}body.fg-stage.fg-playing .fg-resource i{display:none!important}}
#fg-manage{display:none}
@media(max-width:760px){
  body.fg-stage.fg-playing .fg-sidebar{bottom:var(--fg-dock-space)}
  #fg-field-journal{bottom:var(--fg-dock-space)}
  body.fg-stage.fg-playing .fg-sidebar[data-section=produce] #fg-alert:not(.warn),
  body.fg-stage.fg-playing .fg-sidebar[data-section=produce] #fg-depth-chips{display:none!important}
  body.fg-stage.fg-playing .fg-sidebar[data-section=produce] .fg-tab-heading h3{font-size:19px;margin:0 0 8px;line-height:1.15}
  body.fg-stage.fg-playing .fg-sidebar[data-section=produce] .fg-tab-heading>p{display:none}
  body.fg-stage.fg-playing .fg-sidebar[data-section=produce] .fg-filter-note{font-size:10px;padding:6px 8px;margin:0 0 8px;line-height:1.3}
  body.fg-stage.fg-playing .fg-sidebar[data-section=produce] .fg-product{display:flex;flex-direction:column;padding:10px;gap:0}
  body.fg-stage.fg-playing .fg-sidebar[data-section=produce] .fg-product>div:first-child{order:0;gap:8px}
  body.fg-stage.fg-playing .fg-sidebar[data-section=produce] .fg-product>div:first-child>span{width:28px;height:28px;font-size:16px}
  body.fg-stage.fg-playing .fg-sidebar[data-section=produce] .fg-product>div:first-child strong{font-size:14px;line-height:1.25}
  body.fg-stage.fg-playing .fg-sidebar[data-section=produce] .fg-product small{font-size:10px;line-height:1.3}
  body.fg-stage.fg-playing .fg-sidebar[data-section=produce] .fg-product>p{order:1;font-size:11px;line-height:1.4;margin:7px 0}
  body.fg-stage.fg-playing .fg-sidebar[data-section=produce] .fg-product>div:last-child{order:2;display:flex;align-items:center;justify-content:space-between;gap:8px}
  body.fg-stage.fg-playing .fg-sidebar[data-section=produce] .fg-product>div:last-child :is(a,button){font-size:11px;min-height:36px;display:inline-flex;align-items:center}
  body.fg-stage.fg-playing .fg-sidebar[data-section=produce] .fg-product>.fg-fiche{order:3;margin-top:8px;font-size:10px}
  body.fg-stage.fg-playing #fg-manage{display:block;order:2;flex:0 0 auto;min-height:36px;padding:8px 12px;font-size:11px;font-weight:700;border:0;border-radius:4px;background:#f6b23c;color:#251b0c}
  body.fg-stage.fg-playing #fg-instruction{order:1;flex:1 1 0;max-width:none;white-space:normal;font-size:9px}
  body.fg-stage.fg-playing .fg-dock-buttons{order:3;flex:1 0 100%;border-right:0;padding-right:0}
  body.fg-stage.fg-playing .fg-dock-buttons::after{content:'Glisser → Marché / Équipe';font:500 9px var(--avi-mono);color:var(--avi-ink2);padding:8px;white-space:nowrap}
  body.fg-stage.fg-playing .fg-dock-group:first-child::before{content:'GESTES ↔';font:600 8px var(--avi-mono);color:var(--avi-accent);padding-right:5px;white-space:nowrap}
}
@media(max-width:560px){
  body.fg-stage.fg-playing .fg-resource span{font-size:8px;line-height:1.2;letter-spacing:0}
  #fg-shared-time span{font-size:8px;letter-spacing:0}
  body.fg-stage.fg-playing #fg-avi-menubar #fg-avi-speeds button{min-height:36px;min-width:31px;font-size:10px!important}
  body.fg-stage.fg-playing #fg-avi-menubar>button{min-height:36px;font-size:9px!important;padding:5px 7px!important}
  body.fg-stage.fg-playing .fg-tabs button{min-height:36px;padding:8px 9px!important;font-size:10px!important}
  body.fg-stage.fg-playing .fg-tabs{gap:3px!important}
  body.fg-stage.fg-playing .fg-sidebar-header button{min-height:36px}
}
@media(prefers-reduced-motion:reduce){body.fg-stage *,body.fg-stage *::before,body.fg-stage *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@supports(padding:max(0px)){body.fg-stage.fg-playing .fg-hud{top:max(var(--fg-edge),env(safe-area-inset-top))}body.fg-stage.fg-playing .fg-dock{bottom:max(var(--fg-edge),env(safe-area-inset-bottom))!important}}

/* Essential game controls stay legible in the page, farm and immersive room. */
#fg-avi-menubar{display:flex;visibility:visible;opacity:1;gap:6px;flex-wrap:wrap}
body #fg-avi-menubar > :is(#fg-export,#fg-reset,#fg-quit){display:block!important;background:#f7eddb!important;color:#202824!important;border:1px solid #9a825a!important;min-height:38px;padding:8px 10px!important;font:700 12px 'Bricolage Grotesque',system-ui,sans-serif!important;line-height:1.25!important;white-space:nowrap;opacity:1;visibility:visible}
body #fg-avi-menubar > #fg-export{background:#f6b23c!important;color:#251b0c!important;border-color:#bd821d!important}
body.fg-stage.fg-playing #fg-panel-close,#fg-avi-overlay #fg-avi-close{display:inline-flex!important;align-items:center;justify-content:center;min-height:40px;min-width:72px;padding:8px 12px!important;background:#f6b23c!important;color:#251b0c!important;border:1px solid #bd821d!important;border-radius:6px;font-size:12px!important;font-weight:750!important;opacity:1;visibility:visible;flex-shrink:0}
body.fg-avi-immersive #fg-avi-menubar{display:flex!important;position:static;max-width:none;flex:1 1 auto;margin:0;justify-content:flex-end;z-index:auto}
body.fg-avi-immersive #fg-avi-menubar :is(#fg-avi-open,#fg-avi-theme,#fg-avi-speeds){display:none!important}
#fg-avi-overlay .fg-avi-overlay-bar{gap:8px;padding:8px 12px}
#fg-avi-overlay .fg-avi-overlay-bar>span{display:none}
@media(max-width:1000px){body.fg-stage.fg-playing #fg-avi-menubar{flex-wrap:wrap;min-width:0}body.fg-stage.fg-playing #fg-avi-menubar #fg-avi-speeds{margin-left:0}}
@media(max-width:560px){body.fg-stage.fg-playing #fg-avi-menubar{gap:5px}body #fg-avi-menubar > :is(#fg-export,#fg-reset,#fg-quit){min-height:40px;padding:7px 8px!important;font-size:11px!important}body.fg-stage.fg-playing #fg-avi-menubar #fg-avi-speeds{flex-basis:100%;justify-content:flex-start}#fg-avi-overlay .fg-avi-overlay-bar{padding:7px 8px}#fg-avi-overlay .fg-avi-overlay-bar>strong{display:none}body.fg-avi-immersive #fg-avi-menubar{flex-basis:100%;justify-content:flex-start}body.fg-stage:not(.fg-playing) #fg-setup{padding-top:126px}body.fg-stage.fg-playing .fg-sidebar-header{flex-wrap:wrap;gap:7px}body.fg-stage.fg-playing .fg-sidebar-header-actions{flex-wrap:wrap}}

/* Un seul menu : commandes dans le panneau de droite, bandeau libre. */
body.fg-stage.fg-playing .fg-hud-metrics{display:flex;align-items:center;flex-wrap:nowrap;min-width:0;overflow:hidden;gap:10px 12px!important}
body.fg-stage.fg-playing .fg-hud-metrics>div{flex:0 0 auto}
body.fg-stage.fg-playing .fg-hud-metrics #fg-shared-time{order:6;flex:0 0 auto;border-left:1px solid var(--avi-line);padding-left:12px;text-align:left}
body.fg-stage.fg-playing .fg-sidebar{overflow:hidden!important}
body.fg-stage.fg-playing #fg-side-menu{flex:0 0 auto;display:flex;flex-wrap:wrap;align-items:center;gap:4px;padding:8px 12px;border-bottom:1px solid var(--avi-line);position:relative;z-index:2}
body.fg-stage.fg-playing .fg-sidebar #fg-avi-menubar{position:static!important;display:flex!important;flex:1 1 auto!important;flex-basis:auto!important;flex-wrap:wrap!important;width:auto!important;max-width:none!important;margin:0!important;order:0!important;gap:4px!important}
body.fg-stage.fg-playing .fg-sidebar #fg-avi-menubar button{min-height:28px!important;padding:4px 7px!important;font-size:10px!important;white-space:nowrap;flex:0 0 auto}
body.fg-stage.fg-playing .fg-sidebar #fg-avi-speeds{display:flex;flex:0 0 auto;margin:0!important;width:auto!important;flex-basis:auto!important}
body.fg-stage.fg-playing .fg-tabs{position:relative!important;top:auto!important;z-index:1;max-height:none!important;overflow:visible!important;flex:0 0 auto}
body.fg-stage.fg-playing .fg-sidebar-body{flex:1 1 auto;min-height:0;overflow:auto!important}

/* Carnet : plan de toute la ferme, étapes cochées, résultats, difficultés. */
#fg-field-journal{width:min(340px,calc(100vw - 36px))}
#fg-field-journal #fg-guidance-title{font-size:16px;line-height:1.15;margin:0 0 8px}
#fg-plan-kicker{margin:0 0 4px;font:600 9px/1.4 var(--avi-mono);letter-spacing:.04em;color:var(--avi-ink2)}
#fg-plan-figures{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:0 0 8px}
#fg-plan-figures div{display:flex;flex-direction:column;gap:2px;min-width:0}
#fg-plan-figures span{font:600 7px/1.3 var(--avi-mono);letter-spacing:.06em;text-transform:uppercase;color:var(--avi-ink2)}
#fg-plan-figures strong{font-size:11px;line-height:1.25}
.fg-wbs{display:grid;grid-template-columns:16px 32px minmax(0,1fr);gap:1px 6px;align-items:start;padding:5px 0;border-bottom:1px solid var(--avi-line)}
.fg-wbs input{margin:2px 0 0;accent-color:#4d9768}
.fg-wbs b{font:600 10px/1.3 var(--avi-mono)}
.fg-wbs strong{font-size:11px;font-weight:600;line-height:1.3}
.fg-wbs small{grid-column:2 / -1;font-size:9px;line-height:1.35;color:var(--avi-ink2)}
.fg-wbs .fg-gantt{grid-column:1 / -1;position:relative;height:5px;margin-top:2px;background:rgba(255,255,255,.08)}
.fg-wbs .fg-gantt i{position:absolute;top:0;bottom:0;background:#d4652f}
.fg-wbs.mile .fg-gantt i{background:#f0c14a}
.fg-wbs.done .fg-gantt i{background:#4d9768}
.fg-wbs.sum strong{font-weight:800}
.fg-wbs.now{background:rgba(246,178,60,.12)}
.fg-plan-block{margin:10px 0 0}
.fg-plan-block h3{margin:0 0 4px;font:700 9px/1.4 var(--avi-mono);letter-spacing:.08em;text-transform:uppercase;color:var(--avi-accent)}
.fg-plan-block ul{margin:0;padding-left:16px}
.fg-plan-block li{font-size:11px;line-height:1.4;margin:0 0 3px}
#fg-plan-issues li{color:#f0c9a2}
.fg-plan-export{display:flex;gap:6px;margin:10px 0 12px}
.fg-plan-export button{flex:1;min-height:32px;border:0;border-radius:5px;background:#f6b23c;color:#251b0c;font:700 10px 'Bricolage Grotesque',system-ui,sans-serif;cursor:pointer}
#fg-guidance-phase{margin-top:4px}
