/* Shared surfaces stay readable in the trade window, craft basket and dialogs. */
:root{color-scheme:light}
:root[data-theme="dark"]{color-scheme:dark;--bg:#111916;--panel:#1a2420;--ink:#edf1e9;--muted:#a1b1a2;--green:#326348;--deep:#0c1712;--gold:#cfb573;--line:#34463a;--pale:#24382b;--danger:#f3a18d;--shadow:0 8px 30px #0003}
:root[data-theme="dark"] a,:root[data-theme="dark"] .boot strong{color:#acd1a5}
:root[data-theme="dark"] input::placeholder,:root[data-theme="dark"] textarea::placeholder{color:#8f9e90}
:root[data-theme="dark"] input:focus,:root[data-theme="dark"] select:focus,:root[data-theme="dark"] textarea:focus{border-color:#98b78b;box-shadow:0 0 0 3px #98b78b26}
:root[data-theme="dark"] .eyebrow,:root[data-theme="dark"] .field label,:root[data-theme="dark"] .segmented button,:root[data-theme="dark"] .catalog-top span,:root[data-theme="dark"] .filters button,:root[data-theme="dark"] .amount-preview,:root[data-theme="dark"] .basket-bottom p,:root[data-theme="dark"] .draft-line,:root[data-theme="dark"] .draft-line button,:root[data-theme="dark"] .empty,:root[data-theme="dark"] .note,:root[data-theme="dark"] .sub,:root[data-theme="dark"] .asset-mini small,:root[data-theme="dark"] .timeline small,:root[data-theme="dark"] .history-meta,:root[data-theme="dark"] .history-card .memo,:root[data-theme="dark"] .auth-form .muted,:root[data-theme="dark"] .auth-footer,:root[data-theme="dark"] .dialog-inner p,:root[data-theme="dark"] .dialog-inner ul,:root[data-theme="dark"] .dialog-top button,:root[data-theme="dark"] .slot-label,:root[data-theme="dark"] .details-list dt,:root[data-theme="dark"] .footer,:root[data-theme="dark"] .stat small{color:var(--muted)}
:root[data-theme="dark"] .user-chip,:root[data-theme="dark"] .segmented,:root[data-theme="dark"] th,:root[data-theme="dark"] .craft-tabs{background:#23332a;color:#c0d0ba}
:root[data-theme="dark"] .segmented button.active,:root[data-theme="dark"] .craft-tabs button.active{background:#354a3a;color:var(--ink)}
:root[data-theme="dark"] .filters button.active,:root[data-theme="dark"] .item-card.selected{background:#2d4131;border-color:#728a62;color:#d9e8cc}
:root[data-theme="dark"] .item-card:hover,:root[data-theme="dark"] .gear-slot:hover,:root[data-theme="dark"] .craft-choice:hover{background:#28382c;border-color:#698360}
:root[data-theme="dark"] .item-card.selected:after,:root[data-theme="dark"] .enchant{color:#d2c28c}
:root[data-theme="dark"] .adena-field{background:#212c23}
:root[data-theme="dark"] .qty,:root[data-theme="dark"] .history-item{background:#233028}
:root[data-theme="dark"] .basket-row,:root[data-theme="dark"] td,:root[data-theme="dark"] .craft-step{border-color:var(--line)}
:root[data-theme="dark"] .placeholder-icon{color:#9cb18c;border-color:#586a4e}
:root[data-theme="dark"] .positive{color:#acd491}
:root[data-theme="dark"] .negative{color:#f0ac95}
:root[data-theme="dark"] .pill{color:#bdcdb0;background:#26352a;border-color:#43553a}
:root[data-theme="dark"] .pill.cp{background:#2d402b;color:#c0d7a2}
:root[data-theme="dark"] .pill.personal{background:#3b3327;color:#dfc99f}
:root[data-theme="dark"] .paperdoll{background:radial-gradient(ellipse at center,#2a3b2e 0%,#202e24 55%,#1a2420 100%)}
:root[data-theme="dark"] .gear-slot{background:#1a2420e8;border-color:#41533a}
:root[data-theme="dark"] .notice,:root[data-theme="dark"] .auth-demo,:root[data-theme="dark"] .demo-banner{background:#353020;border-color:#605534;color:#e0cc94}
:root[data-theme="dark"] .notice.success{background:#263c29;border-color:#456342;color:#bcd99e}
:root[data-theme="dark"] .notice.error,:root[data-theme="dark"] .dialog-error{background:#3b2823;border-color:#68483d;color:var(--danger)}
:root[data-theme="dark"] .button.danger{border-color:#735045}
:root[data-theme="dark"] dialog::backdrop{background:#030906b8}
:root[data-theme="dark"] .pin{color:#89987c}
:root[data-theme="dark"] .pin.pinned,:root[data-theme="dark"] .pin:hover{color:#d2bc7d}
:root[data-theme="dark"] .craft-tabs button,:root[data-theme="dark"] .craft-expand,:root[data-theme="dark"] .craft-choice small,:root[data-theme="dark"] .craft-row-controls label,:root[data-theme="dark"] .craft-cart-row .item-name small,:root[data-theme="dark"] .craft-step small,:root[data-theme="dark"] .craft-results .item-name small,:root[data-theme="dark"] #craftForwardResult .item-name small,:root[data-theme="dark"] .craft-footnote,:root[data-theme="dark"] .craft-outcome span{color:var(--muted)}
:root[data-theme="dark"] .craft-tabs button span{background:#3c5035;color:#d4e2c4}
:root[data-theme="dark"] .craft-choice b,:root[data-theme="dark"] .craft-steps summary,:root[data-theme="dark"] .craft-step a{color:#bed3a5}
:root[data-theme="dark"] .craft-outcome{background:#322f21;border-color:#b99d60}
:root[data-theme="dark"] .craft-outcome.ready{background:#283b29;border-color:#91b17c}
:root[data-theme="dark"] .craft-materials tr.shortage{background:#30291f}
.theme-toggle{flex:none}
.auth-form-wrap{position:relative}
.auth-theme{position:absolute;right:24px;top:22px}
.trade-guide{border:1px solid var(--line);border-radius:10px;background:var(--panel);padding:14px 17px;margin-bottom:20px}
.trade-guide summary{cursor:pointer;font-size:12px;font-weight:600}
.trade-guide ol{padding-left:20px;font-size:12px;color:var(--muted);margin:12px 0}
.trade-guide li{margin:6px 0}
.trade-guide .store-tools{margin-top:13px}
.stock-item-link{display:flex;align-items:center;gap:10px;text-align:left;padding:0}
.stock-item-link:hover strong{text-decoration:underline}
.stock-item-link strong{font-weight:500}
.cash-balance{font-size:12px;border:1px solid var(--line);border-radius:7px;padding:10px 12px;margin-bottom:15px;background:var(--pale)}
@media(max-width:850px){.top-actions{flex-wrap:wrap;justify-content:flex-end}.theme-toggle span{display:none}}
@media(max-width:650px){.topbar{align-items:flex-start}.top-actions{gap:5px;max-width:52%}.top-actions .button{padding:8px}.auth-theme{position:static;align-self:flex-end;margin-bottom:20px}.auth-form-wrap{flex-direction:column}.trade-guide{padding:12px}.trade-guide .button{white-space:normal}}
