/* Night palette is the default; theme choice is local to this browser. */
:root[data-theme=dark]{color-scheme:dark;--ink:#dde5e6;--muted:#98a9af;--green:#95d2b2;--green-soft:#243932;--lime:#add8a3;--bg:#11181e;--paper:#1a242c;--line:#32424b;--gold:#e2bb75;--danger:#efaa99}
[data-theme=dark] body{background:var(--bg);color:var(--ink)}
[data-theme=dark] .sidebar{background:#141e25;border-color:var(--line)}
[data-theme=dark] :is(.panel,.catalog-card,.plan-card,.breed-tile,.owned-tile,.buff-summary,.buff-trigger,.drawer,.collection-card.lit){background:var(--paper);color:var(--ink)}
[data-theme=dark] :is(input,select,textarea,button){background:#202d36;color:var(--ink);border-color:#42565e}
[data-theme=dark] :is(.text-button,.plain,.breed-hit){background:transparent;color:var(--green)}
[data-theme=dark] :is(button.primary,.primary){background:#96cfb2;color:#14291f;border-color:#96cfb2}
[data-theme=dark] :is(.sidebar nav a[aria-current=page],.tabs button[aria-pressed=true],.badge,.notice,.recommend-reason,.metric,.tile-picture,.item-visual,.breed-tile.complete){background:#263932;color:var(--ink);border-color:#4c6859}
[data-theme=dark] .notice.warning{background:#352e26;border-color:#716047;color:#eadcc7}
[data-theme=dark] .profile-strip{background:#1c2932;border-color:var(--line)}
[data-theme=dark] :is(th,thead){background:#213039;color:#c9d7db}
[data-theme=dark] :is(td,th,.kv,.form-section,.passive-row){border-color:var(--line)}
[data-theme=dark] .collection-card{background:#1c252c;color:#99a7ae;border-color:var(--line)}
[data-theme=dark] .collection-card.lit{border-color:#9cca8c}
[data-theme=dark] .collection-card.lit .collection-state{color:#b2da9d}
[data-theme=dark] :is(.config-save,.sticky-actions){background:#11181eef;border-color:var(--line)}
[data-theme=dark] .drawer::backdrop{background:#060c10bb}
[data-theme=dark] :is(.level-chart,.comparison-chart) text{fill:#acbbc1}
[data-theme=dark] .level-chart polyline{stroke:#9cd9b2}
[data-theme=dark] .level-chart circle{fill:#9cd9b2}
[data-theme=dark] .comparison-chart path[stroke="#174b36"],[data-theme=dark] .comparison-chart polyline[stroke="#174b36"]{stroke:#a7dcb5}
[data-theme=dark] :is(.why-button,.theme-toggle):hover{background:#345243}
[data-theme=dark] a{color:#a8d9c0}
[data-theme=dark] .toast{background:#dae8df;color:#182920}
.theme-toggle{margin-left:auto;white-space:nowrap;font-size:.85rem;min-height:42px}
.page-header{gap:12px}.page-header>.profile-trigger{margin-left:0}
.schedule-table{min-width:880px;font-size:.82rem;table-layout:fixed;width:100%}.schedule-table th:first-child{width:105px}.schedule-table td{vertical-align:top;overflow-wrap:anywhere}.schedule-table td p{margin:0 0 8px}.schedule-table small{display:block;color:var(--muted)}
.region-heading{margin:32px 0 16px;display:flex;gap:12px;align-items:center;flex-wrap:wrap}.region-heading span{font-size:.85rem;color:var(--muted)}
.tradeoff{border-left:3px solid var(--gold);padding:10px 14px;margin:12px 0;background:var(--green-soft)}
.plan-controls:has(#goal){grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
.inventory-row{display:grid;grid-template-columns:1fr 1fr;gap:16px}.inventory-row input{width:100%}
@media(max-width:560px){.theme-toggle{font-size:.75rem;padding:5px 8px}.page-header{gap:6px;flex-wrap:wrap}.page-header h1{font-size:1.35rem}.profile-trigger{font-size:.75rem;padding:5px 8px}.inventory-row{grid-template-columns:1fr}}

.fert-table{min-width:670px;width:100%;font-size:.88rem}.fert-table td,.fert-table th{vertical-align:top}.fert-table small{display:block;font-weight:normal;color:var(--muted);margin-top:5px}.fert-table th{min-width:130px}#fert-results details p{line-height:1.7}

.fert-winner{display:flex;align-items:center;gap:14px}.fert-winner .item-visual{width:64px;height:64px;flex:0 0 64px}.fert-winner h2{margin:0;font-size:1.18rem}
/* Compact progress map and productive investment cards. */
.mine-grid{display:grid!important;grid-template-columns:repeat(9,minmax(0,1fr));grid-template-rows:repeat(9,minmax(0,1fr));gap:3px;width:min(100%,324px);aspect-ratio:1;margin:16px auto;padding:6px;border:1px solid var(--line);border-radius:10px;background:var(--surface,#14241f)}
.mine-grid .mine-cell{display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;width:100%;height:100%;padding:0;aspect-ratio:1;border-radius:3px;font-size:12px;line-height:1;border:1px solid #53645d;background:#26342e;color:#a5b1a9;touch-action:manipulation}
.mine-grid .mine-cell.dug{background:#111a17;color:#72d9ac;border-color:#2f7958}.mine-grid .mine-cell.ore{background:#425356;color:#c0d9d7}.mine-grid .mine-cell.soil{background:#5d4835;color:#e6c8a6}
.mine-grid .mine-cell:focus-visible{outline:2px solid #dfbd70;outline-offset:1px;z-index:1}.mine-brush{flex-wrap:wrap;gap:6px}.mine-brush button{padding:7px 10px;font-size:13px}.mine-brush [aria-pressed=true]{background:#296348;color:#fff}
.investment-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr));gap:14px;margin-top:16px}.investment-card{padding:18px;border:1px solid var(--line);border-radius:12px;min-width:0}.investment-card h3{margin:10px 0}.investment-card p{font-size:14px;line-height:1.7}.investment-card details{margin-top:12px}
.suit-card .tile-picture{width:100%;height:auto;aspect-ratio:16/9;border-radius:9px;overflow:hidden}.suit-card .tile-picture img{width:100%;height:100%;object-fit:cover}.suit-grid{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}
.quality-label{font-size:12px;font-weight:600}.quality-label.q3{color:#c1a0ef}.quality-label.q2{color:#83bce9}.quality-label.q1{color:#87c59d}
@media(max-width:560px){.mine-grid{width:min(100%,288px);gap:2px;padding:4px}.mine-grid .mine-cell{font-size:11px}.suit-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.suit-card{min-width:0}.suit-card select{max-width:100%}}

.mine-tools{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.mine-tools span{font-size:.8rem;color:var(--muted)}.mine-tools button{padding:7px 10px;font-size:.8rem}.mine-grid{touch-action:none;user-select:none}.mine-grid .mine-cell.untouched{background:#2b3639;border-color:#69777a}.mine-grid .mine-cell.partial{background:linear-gradient(to top,#415e4f var(--remaining),#15221c var(--remaining));color:#b7dec8;font-size:10px}.mine-grid .mine-cell.drag-selected{background:#498d6d;outline:1px solid #bad9a6}.mine-grid .mine-cell.hard{border-color:#d7ab65}.mine-grid .mine-cell.soft{border-color:#7caabc}.mine-cell-menu{width:min(92vw,340px);border:1px solid var(--line);border-radius:14px;background:var(--paper);color:var(--ink);padding:20px}.mine-cell-menu::backdrop{background:#060c10aa}.mine-stage-list{display:grid;gap:8px;margin:14px 0}.mine-cell-menu form{margin:0}.mine-stage-list button{text-align:left}.investment-options{display:flex;justify-content:flex-start!important;gap:12px 24px;flex-wrap:wrap}
.library-links{display:flex;gap:12px 24px;flex-wrap:wrap;padding:18px 0}.formula{font-family:ui-monospace,monospace;line-height:1.9;padding:16px;border-radius:10px;background:var(--surface-2,#14221e);border:1px solid var(--border,#34433c);overflow-wrap:anywhere}.score-selected{background:rgba(108,176,139,.12)}.score-list{display:flex;flex-wrap:wrap;gap:10px 22px;padding:15px 0}.item-visual[role=button]{cursor:pointer}.item-visual[role=button]:focus-visible{outline:2px solid #a7dcbc;outline-offset:2px}.item-hover{position:fixed;z-index:1000;pointer-events:none;width:min(340px,calc(100vw - 20px));padding:16px;border:1px solid #48635a;border-radius:14px;background:#192720;color:#e3ece7;box-shadow:0 10px 40px #0008;font-size:13px;line-height:1.6}.item-hover p{margin:7px 0}.item-hover small{color:#acbfb4}.item-hover-top{display:flex;align-items:center;gap:12px;margin-bottom:12px}.item-hover-top img{width:68px;height:68px;object-fit:contain}.item-hover-top b{font-size:17px}.item-hover .kv{padding:5px 0}.item-hover .economic-tag{display:block}.investment-options label.check{flex:0 1 auto;margin:0!important}
[data-theme=dark] tbody tr:hover{background:#263a40;color:#edf3f4}[data-theme=dark] :is(button:not(.primary),.catalog-card,.owned-tile,.breed-tile):hover{border-color:#789b8d}[data-theme=dark] :is(.text-button,.plain,.breed-hit):hover{color:#c7efd8;background:#294037}[data-theme=dark] :is(.collection-card,.breed-tile,.catalog-card):focus-within{background:#22332f;color:var(--ink)}[data-theme=dark] option,[data-theme=dark] optgroup{color:var(--ink);background:#202d36}.mineral-grade-row{display:flex;gap:6px;flex-wrap:wrap;margin:10px 0}.catalog-card .kv{gap:8px;font-size:.84rem}.catalog-card .kv span:last-child{text-align:right}.recipe-list{margin-top:12px}.custom-goal-row{display:grid;grid-template-columns:36px minmax(130px,1fr) minmax(160px,1.8fr) auto;gap:12px;align-items:end;padding:16px 0;border-bottom:1px solid var(--line)}.custom-goal-controls{display:flex;gap:5px}.custom-goal-controls button{padding:6px 10px}.score-bar{display:inline-block;min-width:70px;color:var(--gold);font-weight:700}.goal-sequence{display:grid;gap:8px}@media(max-width:700px){.custom-goal-row{grid-template-columns:25px 1fr}.custom-goal-row>label:last-of-type{grid-column:2}.custom-goal-controls{grid-column:2}}
/* A compact decision layer; calculations remain in progressive disclosures. */
.decision-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.decision-card,.decision-choice{display:flex;flex-direction:column;gap:12px;min-width:0}.decision-card.panel+.panel{margin:0}.decision-choice{padding:18px;border:1px solid var(--line);border-radius:12px;background:var(--bg)}.decision-number{font-size:1.5rem;font-weight:650;color:var(--green);font-variant-numeric:tabular-nums}.decision-card .text-button{align-self:flex-start;margin-top:auto}.decision-tabs{gap:6px}.plan-settings{margin:0}.plan-settings>summary{font-weight:600}.plan-settings form{margin-top:18px}.custom-goal-row{display:grid;grid-template-columns:30px minmax(130px,1fr) minmax(180px,2fr) auto;gap:12px;align-items:end;margin:14px 0}.owned-tile{transition:border-color .15s,background .15s}.owned-tile:not(.owned-active) .tile-picture{filter:grayscale(1);opacity:.5}.owned-tile.owned-active{border-color:#68b593;background:var(--green-soft)}.owned-active .tile-picture{filter:none;opacity:1}.breed-tile{background:linear-gradient(0deg,var(--green-soft) var(--breed-progress),var(--paper) var(--breed-progress))!important;border-bottom:3px solid var(--green)}.breed-tile .tile-picture img{filter:grayscale(var(--breed-gray));opacity:calc(1 - var(--breed-gray)*.4)}.collection-card.q3{border-left:4px solid #a58be0}.collection-card.q2{border-left:4px solid #72a9db}.collection-card.q1{border-left:4px solid #78b98f}.collection-card.q3.lit{background:#efe6ff;color:#36244b}.collection-card.q2.lit{background:#e0f0ff;color:#203c52}.collection-card.q1.lit{background:#e2f3df;color:#253f2a}
[data-theme=dark] tbody tr:hover{background:#23383d;color:#edf3f4}[data-theme=dark] .text-button:hover,[data-theme=dark] button:not(.primary):hover{background:#2a4143;color:#edf3f4}[data-theme=dark] .collection-card.q3.lit{background:#3d2e51;color:#f2eaff}[data-theme=dark] .collection-card.q2.lit{background:#263f59;color:#e8f4ff}[data-theme=dark] .collection-card.q1.lit{background:#2c4636;color:#efffeb}[data-theme=dark] .collection-card.lit .muted{color:#c2d0cc}[data-theme=dark] .owned-tile.owned-active{background:#244139}[data-theme=dark] .breed-hit:hover{background:transparent!important}[data-theme=dark] .breed-tile .tile-picture{background:transparent}
@media(max-width:650px){.decision-grid{grid-template-columns:1fr}.custom-goal-row{grid-template-columns:24px minmax(0,1fr)}.custom-goal-row>label:nth-of-type(2),.custom-goal-row>.row{grid-column:2}.decision-tabs button{padding:.4rem .6rem}.plan-settings{padding:14px}}

.release-info{display:flex;flex-direction:column;gap:5px;line-height:1.6}.schedule-continue{color:var(--muted);font-size:.85rem;white-space:nowrap}.schedule-empty{opacity:.45}.schedule-legend{line-height:1.8}
