.fg-profile-controls{display:flex;align-items:center;justify-content:center;gap:9px;width:100%}
button.fg-theme-toggle{display:inline-flex!important;visibility:visible!important;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;min-height:44px;min-width:44px;padding:10px;border:1px solid #c8d8c4;border-radius:13px;background:#edf4e7;color:#234f38;cursor:pointer;line-height:1;box-shadow:none}
.fg-theme-toggle svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.fg-theme-toggle:focus-visible{outline:3px solid #bf8b2a;outline-offset:3px}.fg-theme-toggle .theme-sun{display:none}
html[data-theme=dark]{color-scheme:dark;--cream:#111d19;--paper:#192a22;--ink:#e6eddf;--dark:#163d2b;--green:#397e52;--muted:#b0c0ab;--line:#384d3d;--portal-paper:#1b2b22;--portal-border:#3a503e}
html[data-theme=dark] body,html[data-theme=dark] .workspace{background:#111d19;color:#e6eddf}
html[data-theme=dark] :is(.topbar,.portal-header,.sidebar,dialog,#mobile-nav,.portal-card,.wallet-item,.card,.panel,.stock-card,.farm-stats,.compact-stock,.crop-card,.animal-card,.workshop-card,.machine-card,.inventory-card,.shop-card,.mission-card,.coop-member,.coop-details,.coop-inline,.coop-toplinks a,.coop-tabs a,.coop-management-links a){background:#1b2b22!important;color:#e6eddf!important;border-color:#3a503e!important}
html[data-theme=dark] :is(.portal-card,.topbar,.sidebar,dialog,#main,.portal-main) :is(h2,h3,h4,label,.section-label,.muted,.coop-muted,.coop-own-progress,.header-profile>strong,.header-profile>small){color:#e0ead7}
html[data-theme=dark] :is(.portal-card p,.portal-card small,.coop-member small,.coop-activity,.coop-activity small,.coop-tabs a small,.wallet-item small,.weather,.breadcrumb){color:#b9c9b1}
html[data-theme=dark] :is(.portal-card a,.coop-toplinks a,.coop-pages a,.coop-inline a,.portal-footer a,.site-footer a){color:#bbdfa4}
html[data-theme=dark] :is(input,textarea,select){background:#132219!important;color:#e6eddf!important;border-color:#50674c!important}
html[data-theme=dark] :is(.coop-tabs,.coop-metrics>div,.coop-chat-bubble,.portal-card th,.menu-grid a,.menu-grid button,.nav-item,.btn.secondary){background:#263b2c;color:#e2ecda;border-color:#486044}
html[data-theme=dark] :is(.coop-tabs a[aria-current],.nav-item.active){background:#3b6546!important;color:#fff!important}
html[data-theme=dark] :is(.portal-card td,.portal-card details){border-color:#3a503e}
html[data-theme=dark] :is(.portal-footer,.site-footer){background:#16241c;color:#b9c9b1;border-color:#3a503e}
html[data-theme=dark] .fg-theme-toggle{background:#314733;color:#ffe0a1;border-color:#667a55}
html[data-theme=dark] .fg-theme-toggle .theme-moon{display:none}html[data-theme=dark] .fg-theme-toggle .theme-sun{display:block}
@media(max-width:760px){.topbar .fg-profile-controls{gap:10px}.portal-header nav .fg-theme-toggle{margin:2px 0}.header-profile .fg-profile-controls .account-badge{width:42px;height:42px}}

html[data-theme=dark] :is(.page-heading h1,.page-header h1,.portal-hero h1,#main>h1,.mobile-brand,.portal-brand,.fg-logo-wordmark){color:#e8f2df}
html[data-theme=dark] :is(.seedlist button,.inventory span,.tabs button,.detail-stats>div,.pill,.tip,.page-note,.close,.icon-button){background:#293e2b;color:#dce9d0;border-color:#506547}
html[data-theme=dark] :is(.text-button,.btn.outline,.activity-card .btn){color:#bcdda9}
html[data-theme=dark] :is(#mobile-nav button,#nav button){color:#c1d2b8}
html[data-theme=dark] :is(#mobile-nav button.active,#nav button.active,.tabs button.selected){background:#3f6740;color:#fff}
html[data-theme=dark] .header-profile>strong,html[data-theme=dark] .header-profile>small{color:#dce9d0}
html[data-theme=dark] :is(.return-bonus,.farm-tutorial,.return-day,.production-status,.animal-batch,.animal-level-locked,.workshop-ingredients,.boost-status547,.fertilizer-reserve547,.crop-premium-times,.chat-shell,.chat-list,.chat-bubble,.chat-composer,.chat-bubble blockquote,#chat-reply){background:#213727!important;color:#dce9d0!important;border-color:#4a6143!important}
html[data-theme=dark] :is(.return-day.current,.return-day.claimed,.chat-mine .chat-bubble){background:#365338!important;border-color:#8b9f60!important}
html[data-theme=dark] :is(.chat-bubble p,.chat-bubble strong,.chat-bubble small,.return-day strong,.return-day small){color:#dce9d0!important}
html[data-theme=dark] .fg-brand .fg-brand-name{color:#e4efd8}html[data-theme=dark] .fg-brand .fg-brand-tagline{color:#b5c9a8}
html[data-theme=dark] .workspace>.fg-footer,html[data-theme=dark] .fg-footer{background:#17271e;color:#bacdb0;border-color:#3e543b}
html[data-theme=dark] :is(.fg-footer .footer-links a,.fg-footer-bottom){color:#c1d3b8}
html[data-theme=dark] #dialog .seedlist button{background:#293e2b;color:#dce9d0;border-color:#506547}

/* v6.05: coordinated dark surfaces and readable foregrounds. */
html[data-theme=dark]{--night-bg:#101c18;--night-surface:#1b3027;--night-raised:#294336;--night-text:#f0f6eb;--night-muted:#c2d3c5;--night-line:#536c5b;--night-link:#c2efa1;--ink:var(--night-text);--muted:var(--night-muted);--line:var(--night-line);--portal-border:var(--night-line)}
html[data-theme=dark] :is(.heading,.portal-hero,.page-heading,.page-header,.chat-hero) :is(h1,h2,p,.eyebrow){color:var(--night-text)!important}
html[data-theme=dark] :is(#main,.portal-main,dialog) :is(h2,h3,h4){color:var(--night-text)!important}
html[data-theme=dark] :is(.payment-banner,.diamond-exchange,.payment-row,.payment-notice,.payment-form,.warehouse-banner,.storage-summary,.storage-totals,.premium-tools,.instant-panel546,.daily-order545,.daily-orders574,.daily-offer574,.order-card574,.farm-today584,.today-tile584,.today-order584,.decor-collection,.decor-owned-card,.guide-tip,.guide-trio>article,.guide-item-grid article,.guide-premium,.guide-intro,.guide-index,.trophy587,.exchange-panel,.balance,.withdraw-item,.referral-hero,.sale-product593,.instant-tier-grid label){background:var(--night-surface)!important;color:var(--night-text)!important;border-color:var(--night-line)!important;box-shadow:none!important}
html[data-theme=dark] :is(.payment-banner,.diamond-exchange,.premium-tools,.instant-panel546,.warehouse-banner,.daily-order545,.decor-collection,.guide-tip,.guide-premium,.referral-hero,.farm-today584,.trophy587,.payment-row,.withdraw-item) :is(p,small,strong,b,label,h2,h3,span){color:var(--night-text)!important}
html[data-theme=dark] :is(.payment-muted,.payment-kicker,.section-label,.shop-group-title,.stock-category,.stock-count,.stock-name small,.stock-details,.production-card>p,.page-note,.decor-explanation,.decor-active,.decor-owned-copy p,.guide-caption,.guide-note,.rank-pages,.chat-rules,.chat-hint,.chat-status,.chat-empty,.chat-farm,.chat-compose-actions small,.chat-bubble time,.chat-bubble header small,.chat-bubble .chat-meta,.chat-heading small,.chat-conversation .button-row small,#chat-status,.coop-chat-meta,.coop-chat-tools small){color:var(--night-muted)!important}
html[data-theme=dark] :is(.card,.panel,.portal-card,.chat-shell,dialog) :is(p,small){color:var(--night-muted)}
html[data-theme=dark] #main .production-card .production-details>span,
html[data-theme=dark] #main .production-card.machine-card .production-details>.machine-total604{background:var(--night-raised)!important;color:var(--night-text)!important;border-color:var(--night-line)!important}
html[data-theme=dark] #main .production-card .production-details :is(span,b){color:var(--night-text)!important}
html[data-theme=dark] :is(.production-card>.tag,.stock-empty-label,.stock-art,.decor-shop-perk,.decor-total,.crop-premium-times,.reward,.cash-prize,.payment-status,.premium-status,.boost-status547,.fertilizer-reserve547,.return-day,.coop-chip,.coop-own-progress,.coop-contributions span,.guide-intro>span){background:var(--night-raised)!important;color:var(--night-text)!important;border-color:var(--night-line)!important}
html[data-theme=dark] :is(.production-status,.crop-premium-times,.boost-status547,.fertilizer-reserve547,.return-day,.coop-chip,.coop-own-progress) :is(span,p,small,strong,b){color:var(--night-text)!important}
html[data-theme=dark] :is(.instant-slot545,.instant-slot545 small,.instant-slot545 b,.decor-shop-link,.warehouse-banner a,.stock-card a,.chat-bubble header a,.chat-bubble .chat-meta button,.chat-history,.chat-peer,.chat-heading a,.coop-chat-bubble a,.coop-chat-meta button,.guide542 a:not(.btn),.portal-card a:not(.btn),.account-links600 a){color:var(--night-link)!important}
html[data-theme=dark] :is(.chat-pin,.chat-rules,.chat-emojis button,.chat-peer.selected,.chat-peer:hover,.chat-bubble.mine,.chat-mine .chat-bubble,.coop-chat-bubble){background:var(--night-raised)!important;color:var(--night-text)!important;border-color:var(--night-line)!important}
html[data-theme=dark] :is(.chat-pin,.chat-rules,.chat-bubble,.coop-chat-bubble) :is(p,b,strong,blockquote){color:var(--night-text)!important}
html[data-theme=dark] :is(.chat-label,.chat-premium){background:#375e43!important;color:#fff4c8!important}
html[data-theme=dark] :is(.chat-peer,.chat-history,.chat-heading) :is(span,strong){color:var(--night-text)!important}
html[data-theme=dark] :is(.rank-personal,.rank-awards,.rank-award,.ranking-awards,.rank-cash,.rank-me,.rank-premium,.notification.unread,.return-day.current,.return-day.claimed,.today-tile584.is-ready){background:var(--night-raised)!important;color:var(--night-text)!important;border-color:#88a875!important}
html[data-theme=dark] :is(.rank-personal,.rank-awards,.rank-award,.ranking-awards,.rank-me,.rank-premium) :is(strong,small,span,a){color:var(--night-text)!important}
html[data-theme=dark] :is(#main,.portal-main,dialog) :is(table,th,td){border-color:var(--night-line)!important;color:var(--night-text)}
html[data-theme=dark] :is(#main,.portal-main,dialog) th{background:var(--night-raised)!important;color:var(--night-muted)!important}
html[data-theme=dark] :is(#main,.portal-main,dialog) input::placeholder,
html[data-theme=dark] :is(#main,.portal-main,dialog) textarea::placeholder{color:#b4c7b9!important;opacity:1}
html[data-theme=dark] :is(#main,.portal-main,dialog) .btn{background:#346b49;color:#fff!important;border-color:#789f70;box-shadow:none}
html[data-theme=dark] :is(#main,.portal-main,dialog) .btn.secondary{background:var(--night-raised)!important;color:var(--night-text)!important;border-color:#75916f!important}
html[data-theme=dark] :is(#main,.portal-main,dialog) .btn.gold{background:#e8c568!important;color:#30260d!important;border-color:#e8c568!important}
html[data-theme=dark] :is(#main,.portal-main,dialog) .btn:disabled{opacity:1!important;background:#2c3b33!important;color:#bfcbc0!important;border-color:#627268!important;cursor:not-allowed;filter:none!important}
html[data-theme=dark] :is(#main,.portal-main,dialog) .btn.instant-button:disabled{background:#393245!important;color:#dfd4ef!important;border-color:#83718d!important}
html[data-theme=dark] :is(.instant-panel546,.premium-tools)>.btn:not(:disabled):hover{filter:brightness(1.12)}
html[data-theme=dark] :is(.package-old595,.item-price del){color:var(--night-muted)!important;opacity:1!important}
html[data-theme=dark] :is(.package-off595,.sale-badge){background:#355f3e!important;color:#f4ffe6!important}
html[data-theme=dark] :is(.portal-notice,.error,.payment-notice.error){background:#44332b!important;color:#ffe5cf!important;border-color:#a68268!important}
html[data-theme=dark] :is(a,button,input,textarea,summary):focus-visible{outline:3px solid #e8cf7b!important;outline-offset:3px}
html[data-theme=dark] :is(#main,.portal-main,dialog) .btn.gold:not(:disabled) :is(span,small,b,strong){color:#30260d!important}
html[data-theme=dark] :is(#main,.portal-main,dialog) .btn:disabled :is(span,small,b,strong){color:inherit!important;opacity:1!important}

html[data-theme=dark] :is(.public-plot,.public-units article,.metric-card,.package-form,.status-badge,.profile-totals>span,.granary-products574 article){background:var(--night-surface)!important;color:var(--night-text)!important;border-color:var(--night-line)!important}
html[data-theme=dark] :is(.public-plot,.public-units article,.metric-card,.package-form,.profile-totals,.guide-steps,.guide-item-grid) :is(strong,b,small,li,span){color:var(--night-text)!important}
html[data-theme=dark] :is(.farmer-bio,.public-back,.chat-empty-state p,.guide-steps,.chat-deleted){color:var(--night-muted)!important}
html[data-theme=dark] :is(.chat-bubble>b,.chat-bubble time,.order-card574 small){opacity:1}
html[data-theme=dark] #chat-reply button{color:var(--night-text)!important}
