/* Local supplement, loaded by theme.js. Select surfaces rather than repainting every child. */
.local-theme-control p{margin:0 0 10px;text-align:center;font:12px/1.5 Interface,sans-serif;color:#69755e}
.local-theme-control .vg-comfort-opt{justify-items:center;gap:7px;padding:12px 8px}
.theme-swatch{display:block;width:42px;height:24px;border:1px solid #97a1a0;border-radius:8px;box-shadow:inset 0 0 0 3px #ffffff18}
.theme-swatch.is-light{background:linear-gradient(135deg,#fffaf0 50%,#efe5c9 50%)}
.theme-swatch.is-dark{background:linear-gradient(135deg,#253347 50%,#182231 50%)}
.chat-theme-switch{display:none!important}

html.local-dark-screen{color-scheme:dark}
html.local-dark-screen :is(.vg-vitals-body,.vg-vitals-tab){background:#1d2a3cf5!important;border-color:#536981!important;box-shadow:0 3px 12px #07101b44!important;color:#cbdcf2!important}
html.local-dark-screen .vg-vital-main>small{color:#c6d3e2!important}
html.local-dark-screen .vg-vital-main>b{color:#edf1f7!important}
html.local-dark-screen .vg-vital.is-res b{color:#edcc95!important}
html.local-dark-screen .vg-vital.is-mana b{color:#b4d7f0!important}
html.local-dark-screen .vg-vital-bar{background:#121e2c!important;border-color:#41516a!important}
/* Important declarations in a named layer outrank unlayered !important rules. */
@layer chat-appearance {
 html.local-dark-screen.chat-dark #chat-dock{background:#182231!important;border-color:#41516a!important;color:#cbdcf2!important;box-shadow:none!important}
 html.local-dark-screen.chat-dark #chat-dock :is(.chat-dock-copy,.chat-dock-copy>strong,.chat-dock-copy>span,.chat-dock-person){color:#cbdcf2!important}
 html.local-dark-screen.chat-dark #chat-dock .chat-dock-icon{color:#b4c8dd!important}
}

/* Community sheets sit outside modal-root. */
html.local-dark-screen :is(.vg-sheet,.vg-comfort,.admin-modal,.character-select-modal,.friends-panel){background:#1d2a3c!important;color:#edf1f7!important;border-color:#61758f!important;border-image:none!important;box-shadow:0 8px 32px #07101b66!important}
html.local-dark-screen :is(.vg-sheet-heading,.vg-comfort-head,.admin-console-title){border-color:#41516a!important;color:#edf1f7!important}
html.local-dark-screen :is(.vg-sheet-heading h2,.vg-sheet-heading h3,.vg-sheet>h2,.vg-comfort-head strong,.admin-console-title h3){color:#edf1f7!important;text-shadow:none!important}
html.local-dark-screen .vg-sheet :is(h1,h2,h3,h4){color:#edf1f7!important;text-shadow:none!important}
html.local-dark-screen :is(.vg-note,.vg-updated,.vg-empty,.vg-sheet-body>p,.vg-comfort .vg-pv-note,.vg-comfort small){color:#b8c6da!important}
html.local-dark-screen :is(.vg-input,.vg-search,.vg-search input,.vg-sheet textarea,.vg-sheet select,.admin-modal input,.admin-modal select){background:#253347!important;color:#edf1f7!important;border-color:#536981!important;box-shadow:none!important;caret-color:#edcc95}
html.local-dark-screen :is(.vg-input,.vg-search input,.vg-sheet textarea,.admin-modal input)::placeholder{color:#aabed2!important;opacity:1}
html.local-dark-screen :is(.vg-close,.vg-comfort-x,.vg-sheet .secondary,.admin-modal .secondary){background:#30435d!important;color:#edf1f7!important;border-color:#6981a2!important;box-shadow:none!important}
html.local-dark-screen :is(.vg-tabs,.vg-fold,.vg-comfort-group,.admin-tabs,.admin-search,.admin-section,.admin-fields,.admin-reward-preview){background:#253347!important;color:#dce7f2!important;border-color:#41516a!important;box-shadow:none!important}
html.local-dark-screen :is(.vg-tabs button,.vg-fold-head,.admin-tabs button){color:#cbdcf2!important;background:transparent!important;border-color:#41516a!important;text-shadow:none!important}
html.local-dark-screen :is(.vg-tabs button.active,.vg-tabs button[aria-selected=true],.admin-tabs button.active){background:#354b65!important;color:#f1e4cc!important;border-color:#89a1be!important}
html.local-dark-screen :is(.vg-fold-body,.vg-fold-body p,.vg-comfort label,.vg-comfort output){color:#cbd7e5!important}
html.local-dark-screen .vg-fold-head{font-weight:700}
html.local-dark-screen :is(.vg-comfort-badge,.vg-comfort-opt,.vg-pv-panel,.vg-pv-back,.vg-pv-btn,.vg-pv-legend>span){background:#293b52!important;color:#dce7f2!important;border-color:#536981!important;box-shadow:none!important}
html.local-dark-screen .vg-comfort-opt[aria-pressed=true]{background:#36536a!important;border-color:#9bb6cb!important;box-shadow:inset 0 0 0 1px #8fb2c533!important}
html.local-dark-screen .vg-comfort-opt strong{color:#edf1f7!important}
html.local-dark-screen :is(.vg-comfort-group h4,.local-theme-control p){color:#b8c6da!important}
html.local-dark-screen .vg-comfort-group h4::before{background:linear-gradient(90deg,transparent,#536981)!important}
html.local-dark-screen .vg-comfort-group h4::after{background:linear-gradient(90deg,#536981,transparent)!important}
html.local-dark-screen .vg-pv-head{border-color:#536981!important;color:#dce7f2!important}
html.local-dark-screen .vg-pv-head b{color:#dce7f2!important;text-shadow:none!important}
html.local-dark-screen .vg-comfort .vg-turn-face{--turn-top:#4d7456;--turn-base:#36583f;--turn-edge:#2b4933}
html.local-dark-screen .vg-comfort .vg-turn-face.is-enemy{--turn-top:#895947;--turn-base:#6d4434;--turn-edge:#59372d}
html.local-dark-screen .vg-pv-line>span{background:#41516a!important}
html.local-dark-screen .vg-comfort input{accent-color:#8fb2db}

/* Friends and account heroes: these are interface cards, not item rarity faces. */
html.local-dark-screen #modal-root :is(.friends-tabs,.friend-row,.character-account-card,.character-add-card,.character-card,.character-tile,.account-character,.character-choice){background:#253347!important;border-color:#536981!important;color:#dce7f2!important;box-shadow:none!important}
html.local-dark-screen #modal-root :is(.friends-tabs button,.friend-copy strong,.friend-copy small,.friend-status){color:#cbdcf2!important}
html.local-dark-screen #modal-root .friends-tabs [aria-selected=true]{background:#354b65!important;color:#f1e4cc!important;border-color:#89a1be!important;box-shadow:none!important}
html.local-dark-screen #modal-root :is(.friend-icon,.friends-close){background:#30435d!important;color:#dce7f2!important;border-color:#6981a2!important}
html.local-dark-screen #modal-root :is(.friend-actions button[data-friend-action=remove],.friend-actions .is-danger){color:#e9a293!important}
html.local-dark-screen #modal-root .character-modal button:not(.icon-button){background:#293b52!important;border-color:#536981!important;color:#dce7f2!important;box-shadow:none!important}
html.local-dark-screen #modal-root .character-modal :is(strong,h2,h3){color:#edf1f7!important}
html.local-dark-screen #modal-root .character-modal :is(button.active,button[aria-pressed=true]){background:#36536a!important;border-color:#9bb6cb!important}
html.local-dark-screen #modal-root .character-modal .character-roster-row.selected{background:#36536a!important;border-color:#9bb6cb!important}
html.local-dark-screen #modal-root .character-modal img{border-radius:8px}
html.local-dark-screen #modal-root .character-new-symbol{color:#edcc95!important;border-color:#6981a2!important}
html.local-dark-screen #modal-root :is(.character-modal img,.friend-portrait){background:#35465a!important;border-color:#6981a2!important}

/* Admin / moderation never inherit the pale paper their tabs used to have. */
html.local-dark-screen :is(.admin-modal,.vg-sheet) :is(.admin-player,.admin-player-row,.admin-player-card,.admin-player-summary,.vg-player,.vg-card,.vg-report,.vg-trace,.vg-poll,.vg-task,.vg-quest,.vg-quest-card){background:#253347!important;color:#dce7f2!important;border-color:#536981!important;box-shadow:none!important}
html.local-dark-screen .admin-modal :is(h2,h3,h4,label,summary,.admin-section-head){color:#dce7f2!important}
html.local-dark-screen .admin-modal :is(.icon-button,.admin-tabs button){background:#30435d!important;color:#dce7f2!important;border-color:#6981a2!important;box-shadow:none!important}
html.local-dark-screen .admin-modal :is(small,.hint,.admin-target-note,.admin-build-status){color:#b8c6da!important}
html.local-dark-screen .admin-modal :is(.admin-tabs,.admin-search,.admin-section)::before,
html.local-dark-screen .admin-modal :is(.admin-tabs,.admin-search,.admin-section)::after{box-shadow:none!important;background-image:none!important}

/* Tooltips: title/value contrast, with original element/rarity icons left intact. */
html.local-dark-screen :is(#valgard-effect-note,.effect-note,.hero-stat-note,.combat-tooltip){background:#253347!important;color:#dce7f2!important;border-color:#6981a2!important;box-shadow:0 6px 24px #07101b66!important}
html.local-dark-screen :is(#valgard-effect-note,.effect-note,.hero-stat-note,.combat-tooltip) :is(h2,h3,strong,.effect-note-text,p){color:#dce7f2!important;text-shadow:none!important}
html.local-dark-screen :is(#valgard-effect-note,.effect-note,.hero-stat-note,.combat-tooltip) :is([data-close],.icon-button){background:#30435d!important;color:#edf1f7!important;border-color:#6981a2!important}
html.local-dark-screen #valgard-effect-note::after{background:#253347!important;border-color:#6981a2!important}

/* Item detail is still native paper and rarity artwork, just as in the bag. */
html.local-dark-screen #modal-root .modal.item-detail{filter:brightness(.80)!important;color-scheme:light}
html.local-dark-screen #modal-root .item-detail .relic-card{filter:none!important}
html.local-dark-screen #modal-root .item-detail :is(h2,h3){color:#345d50!important}

/* World neutral cards must not keep cream backgrounds with pale inherited labels. */
html.world-dark-screen #world :is(.world-empty,.world-gate,.world-gate-card,.world-travel-card,.world-arrival-card,.world-preview-card,.world-not-here,.world-chapter-card,.world-shop-choice,.city-shop-choice){background:#253347!important;color:#dce7f2!important;border-color:#536981!important;box-shadow:none!important;border-image:none!important}
html.world-dark-screen #world :is(.world-empty,.world-gate-card,.world-preview-card,.city-shop-choice) :is(strong,p,small){color:#cbd7e5!important}
html.world-dark-screen #world .world-choice :is(strong,small){color:#dce7f2!important}
html.world-dark-screen #world #location-actions-home{border-radius:0 0 20px 20px;overflow:hidden}

/* Settings: rounded groups on a continuous page; no rectangular underlay or icon boxes. */
html.settings-dark-screen #settings .vs-panel{background:transparent!important;border:0!important;box-shadow:none!important;border-radius:20px!important;padding-bottom:8px;overflow:hidden}
html.settings-dark-screen #settings .vs-ic{border:0!important;outline:0!important;background:transparent!important;box-shadow:none!important}
html.settings-dark-screen #settings .vs-group{border-radius:18px!important;overflow:hidden}
html.settings-dark-screen #settings .vs-footer{background:transparent!important;border-radius:14px!important;margin-bottom:0}

/* Merchant item/skin cards keep their own ink; avoid white headings on pale paper. */
html.local-dark-screen #modal-root :is(.city-product,.city-skin-card,.city-privilege-item,.city-donation-item){filter:brightness(.80);color:#345d50!important;color-scheme:light}
html.local-dark-screen #modal-root :is(.city-product,.city-skin-card,.city-privilege-item,.city-donation-item) :is(h2,h3,strong){color:#345d50!important}
html.local-dark-screen #modal-root :is(.city-tabs,.city-balance,.city-wardrobe-link){background:#253347!important;color:#cbdcf2!important;border-color:#536981!important}
html.local-dark-screen #modal-root .city-tabs button{color:#cbdcf2!important}
html.local-dark-screen #modal-root .city-tabs button.active{color:#f1e4cc!important;border-color:#edcc95!important}
html.local-dark-screen #modal-root .city-tabs button[aria-selected=true]{color:#f1e4cc!important;border-color:#edcc95!important}
html.local-dark-screen #modal-root :is(.city-wallet,.city-owned-open){background:#253347!important;color:#cbdcf2!important;border-color:#536981!important;box-shadow:none!important}
html.local-dark-screen #modal-root .city-owned-open :is(strong,small){color:#cbdcf2!important}
html.local-dark-screen #modal-root .city-wallet b{color:#edcc95!important}
html.local-dark-screen .vg-sheet :is(.vg-quest-head,.vg-quest-line,.vg-ref-stats,.vg-ref-visibility,.vg-fold-body strong){color:#cbd7e5!important}
html.local-dark-screen .vg-sheet :is(.vg-quest-mark,.vg-ref-visibility){background:#30435d!important;border-color:#6981a2!important}
html.local-dark-screen .vg-sheet .vg-quest-line{background:#293b52!important;border-color:#536981!important}
html.local-dark-screen .vg-sheet .vg-quest-bar{background:#142131!important}
html.local-dark-screen .vg-sheet :is(.vg-quest-head strong,.vg-ref-stats b,.vg-quest-line em){color:#cbdcf2!important}
html.local-dark-screen #world :is(.location-preview,.world-chapter-pass,.city-service-tile){background:#253347!important;color:#dce7f2!important;border-color:#536981!important;border-image:none!important;box-shadow:none!important}
html.local-dark-screen #world :is(.location-preview,.world-chapter-pass,.city-service-tile) :is(strong,p,small){color:#cbd7e5!important}
html.local-dark-screen #modal-root .city-offer{filter:brightness(.80);color:#345d50!important;color-scheme:light}
html.local-dark-screen #modal-root .city-offer :is(h2,h3,strong){color:#345d50!important}
html.local-dark-screen #modal-root :is(.city-owned-skins-link,.city-wardrobe-open,.identity-owned-skin){background:#253347!important;color:#cbdcf2!important;border-color:#536981!important}
html.local-dark-screen #modal-root .city-offer .city-offer-description{color:#77745c!important}
html.local-dark-screen #modal-root .city-offer .primary{color:#fffdf0!important}
html.local-dark-screen :is(button,input,textarea,summary):focus-visible{outline:2px solid #edcc95;outline-offset:2px}

/* Dialogs owned by the dungeon UI are native <dialog>, outside modal-root. */
html.local-dark-screen :is(.dungeon-dialog,.pass-sheet-panel,#nearby-battles,.presence-panel){background:#1d2a3c!important;color:#dce7f2!important;border-color:#61758f!important;border-image:none!important;box-shadow:0 8px 32px #07101b66!important}
html.local-dark-screen .dungeon-dialog::backdrop{background:#07101b99!important}
html.local-dark-screen #modal-root>.modal-shade,
html.local-dark-screen :is(.vg-sheet-shade,.vg-comfort-shade,.battle-inspection-shade){background:#07101b99!important}
html.local-dark-screen :is(.vs-ic>img,.dungeon-help-emblem>img,.vg-comfort-badge>img){filter:brightness(.80)}
html.local-dark-screen :is(.dungeon-dialog,.pass-sheet-panel,#nearby-battles,.presence-panel) :is(header,h2,h3,h4){color:#edf1f7!important;border-color:#536981!important;text-shadow:none!important}
html.local-dark-screen :is(.dungeon-dialog,.pass-sheet-panel,#nearby-battles,.presence-panel) :is(p,li,label,small,.hint){color:#c4d2e3!important}
html.local-dark-screen :is(.dungeon-dialog,.pass-sheet-panel,#nearby-battles,.presence-panel) button:not(.dungeon-primary):not(.primary){background:#30435d!important;color:#dce7f2!important;border-color:#6981a2!important;box-shadow:none!important}
html.local-dark-screen :is(.dungeon-settings-row,.guard-pass-card,.guard-pass-choice,.dungeon-lobby-card,.dungeon-group-member,.dungeon-groups-empty,.dungeon-help-rules,.dungeon-group-sheet,.dungeon-group-seat,.nearby-battle,.presence-roster-row){background:#253347!important;color:#dce7f2!important;border-color:#536981!important;box-shadow:none!important}
html.local-dark-screen :is(.dungeon-settings-row,.guard-pass-card,.dungeon-lobby-card,.dungeon-group-member,.dungeon-groups-empty) :is(strong,b,span){color:#dce7f2!important}
html.local-dark-screen :is(.guard-pass-label,.guard-pass-stat,.guard-pass-stat>span,.dungeon-group-title small,.dungeon-lobby-head small,.dungeon-group-wait,.dungeon-settings-note){color:#c4d2e3!important}
html.local-dark-screen .guard-pass-stat>b{color:#edcc95!important}
html.local-dark-screen .dungeon-pass-level{background:#30435d!important;color:#edcc95!important;border-color:#6981a2!important;box-shadow:none!important}
html.local-dark-screen :is(.guard-pass-risks,.guard-pass-rewards,.guard-pass-conditions){background:transparent!important;border-color:#536981!important}
html.local-dark-screen :is(.dungeon-dialog,.pass-sheet-panel,.vg-sheet,.vg-comfort)::before,
html.local-dark-screen :is(.dungeon-dialog,.pass-sheet-panel,.vg-sheet,.vg-comfort)::after{background-image:none!important;border-image:none!important;box-shadow:none!important}
html.local-dark-screen .vg-sheet table :is(th,td){color:#c4d2e3!important;background:transparent!important;border-color:#536981!important}
html.local-dark-screen #modal-root .party-modal :is(.party-tools,.party-tools summary,.party-sheet-head,.party-sheet-subtitle,.party-empty-intro>strong){color:#dce7f2!important}
html.local-dark-screen #modal-root .party-modal :is(.party-sheet-join,.party-sheet-code,.party-member,.party-tools input,.party-tools select){background:#253347!important;color:#dce7f2!important;border-color:#536981!important}
html.local-dark-screen #modal-root .party-modal :is(.party-sheet-head button,.party-tools button,.party-tools summary){background:#30435d!important;color:#dce7f2!important;border-color:#6981a2!important}
html.local-dark-screen #modal-root .party-modal :is(.party-sheet-title,h2,h3){color:#edf1f7!important}
html.local-dark-screen :is(.world-guardian-dialogue,.guard-dialogue,.guard-speech,.guard-answer,.dungeon-choice,.guard-intro){background:#253347!important;color:#dce7f2!important;border-color:#536981!important;box-shadow:none!important}
html.local-dark-screen :is(.world-guardian-dialogue,.guard-dialogue,.guard-speech,.guard-answer,.guard-intro) :is(p,strong,small){color:#dce7f2!important}
html.local-dark-screen :is(.city-product,.city-offer) .secondary{color:#345d50!important}
html.local-dark-screen .vg-sheet :is(.vg-player,.vg-row,.vg-player-body,.vg-identity,.vg-account-link){background:#253347!important;color:#dce7f2!important;border-color:#536981!important;box-shadow:none!important}
html.local-dark-screen .vg-sheet :is(.vg-player,.vg-row) :is(strong,b){color:#dce7f2!important}
html.local-dark-screen .vg-sheet :is(.vg-player,.vg-row,.vg-identity) :is(small,summary,code){color:#c4d2e3!important}
html.local-dark-screen .vg-sheet .vg-identity-row{background:#293b52!important;border-color:#536981!important}
html.local-dark-screen .vg-sheet .vg-identity-row button{background:#30435d!important;color:#dce7f2!important;border-color:#6981a2!important}
html.local-dark-screen .vg-sheet-heading>small{color:#edcc95!important}
html.local-dark-screen #modal-root .party-empty-intro>.primary{background:linear-gradient(#3f7568,#2e5e52)!important;color:#fff8ec!important}
html.settings-dark-screen #settings :is(.vs-panel,.vs-group)::before,
html.settings-dark-screen #settings :is(.vs-panel,.vs-group)::after{background-image:none!important;border-image:none!important;box-shadow:none!important}
html.local-dark-screen #modal-root :is(.city-patron-expiry,.city-privilege-foot>p,.city-wallet .vg-seals small){color:#b8c6da!important}
html.local-dark-screen #modal-root .city-tabs{border-radius:11px!important;overflow:hidden}
html.local-dark-screen :is(.winter-sugrobych-name,.log-entry .winter-boss-ink):not(:where(.battle-unit *,.world-encounter-card *,.item-detail *)){background-image:linear-gradient(108deg,#7dc5f2 13%,#99def4 34%,#d9f6ff 47%,#82cdf4 59%,#8dbde9 81%)!important;filter:none!important}

/* Expanded/empty states reported during the owner's walkthrough. */
html.local-dark-screen #modal-root .character-modal button.character-sheet-grip,
html.local-dark-screen #modal-root .ref-grip{background:transparent!important;border:0!important;box-shadow:none!important;border-radius:12px!important}
html.local-dark-screen body .vg-sheet>header{background:#1d2a3c!important;border-color:#536981!important;box-shadow:none!important}
html.local-dark-screen body .vg-sheet>header .vg-close,
html.local-dark-screen #modal-root .modal:not(.item-detail) :is(.friends-close,.icon-button[data-close],.modal-header [data-close]){width:32px!important;height:32px!important;min-width:32px;min-height:32px;padding:0!important;display:grid;place-items:center;background:#30435d!important;color:#e5edf5!important;-webkit-text-fill-color:#e5edf5!important;border:1px solid #6981a2!important;border-radius:9px!important;box-shadow:none!important}
html.local-dark-screen .vg-sheet .vg-row p{color:#c4d2e3!important}
html.local-dark-screen #modal-root .friends-panel :is(.friends-empty,.friends-empty strong,.friends-empty p){color:#c4d2e3!important}
html.local-dark-screen #modal-root .friend-actions>.friend-icon{box-sizing:border-box;width:32px!important;height:32px!important;min-width:32px;padding:4px!important;display:grid;place-items:center;border:1px solid #6981a2!important;border-radius:9px!important;box-shadow:none!important}
html.local-dark-screen #modal-root .referral-dialog :is(.ref-sheet,.ref-party,.ref-totals,.ref-friends,.ref-friends>li,.ref-friends>article,.ref-friend-body){background:#253347!important;color:#c4d2e3!important;border-color:#536981!important;box-shadow:none!important}
html.local-dark-screen #modal-root .referral-dialog :is(p,small,.ref-stages,.ref-locked,.ref-friend-title,.ref-friend-title strong,.ref-growth,.ref-marks){color:#c4d2e3!important}
html.local-dark-screen #modal-root .referral-dialog :is(.ref-totals b,.ref-locked b){color:#edcc95!important}
html.local-dark-screen #modal-root .referral-dialog :is(.ref-community,.vg-ref-visibility){background:#30435d!important;color:#e5edf5!important;border-color:#6981a2!important;box-shadow:none!important}
html.local-dark-screen #modal-root .referral-dialog .ref-track{background:#142131!important}
html.local-dark-screen #modal-root .referral-dialog .ref-marks>span{background:#30435d!important;color:#b8c6da!important}
html.local-dark-screen #modal-root .referral-dialog .ref-marks>.is-paid{background:#36536a!important;color:#d4ead6!important}
html.local-dark-screen #modal-root .referral-dialog .ref-friend-title>span{color:#b8c6da!important}
html.local-dark-screen #modal-root .referral-dialog .ref-marks>b{background:#30435d!important;color:#c4d2e3!important}
html.local-dark-screen #modal-root .referral-dialog .ref-marks>b.is-paid{background:#36536a!important;color:#d4ead6!important}
html.local-dark-screen :is(.resist-budget,.resist-list,.resist-choice,.resist-step,.resistance-open){background:#253347!important;color:#c4d2e3!important;border-color:#536981!important;box-shadow:none!important}
html.local-dark-screen :is(.resist-name,.resist-budget>span,.resistance-open>span){color:#dce7f2!important}
html.local-dark-screen :is(.resist-step output,.resist-budget strong){color:#edcc95!important}
html.local-dark-screen .resist-step button{background:#30435d!important;color:#dce7f2!important;border-color:#6981a2!important;box-shadow:none!important}
html.local-dark-screen .resist-editor [data-save-resist]:disabled{background:#293b52!important;color:#b8c6da!important;border-color:#536981!important;opacity:.7}
html.local-dark-screen #presence-panel .presence-drawer{background:#1d2a3c!important;color:#dce7f2!important;border-color:#61758f!important;box-shadow:0 6px 24px #102e4144!important}
html.local-dark-screen #presence-panel :is(header,.presence-location,.presence-scope,.presence-person){background:#253347!important;color:#c4d2e3!important;border-color:#536981!important;box-shadow:none!important}
html.local-dark-screen #presence-panel :is(h2,.presence-name,.presence-name strong){color:#dce7f2!important}
html.local-dark-screen #presence-panel :is(small,.presence-level,.presence-class,[data-presence-place],[data-presence-count]){color:#b8c6da!important}
html.local-dark-screen #presence-panel .presence-scope>span{color:#c4d2e3!important}
html.local-dark-screen #presence-panel button{background:#30435d!important;color:#dce7f2!important;border-color:#6981a2!important;box-shadow:none!important}
html.local-dark-screen #presence-panel [data-presence-close]{box-sizing:border-box;width:28px;height:28px;padding:0;border-radius:8px}
html.local-dark-screen #bag .bulk-discard-heading{background:#3e3338!important;border-color:#916b65!important;color:#efc0ac!important;box-shadow:none!important}
html.local-dark-screen #bag .bulk-discard-heading :is(strong,p,small){color:#efc0ac!important}
html.local-dark-screen #bag .bulk-discard-actions{background:#1d2a3c!important;border-color:#536981!important;box-shadow:0 -4px 16px #07101b44!important}
html.local-dark-screen #bag .bulk-discard-actions button{background:#30435d!important;color:#dce7f2!important;border-color:#6981a2!important;box-shadow:none!important}
html.local-dark-screen #bag .bulk-discard-actions button:disabled{background:#253347!important;color:#a8bbd0!important;opacity:.7}
html.local-dark-screen #modal-root .item-detail :is(.item-lock-toggle,.item-chat-link-toggle,[data-close]){box-sizing:border-box;width:34px!important;height:34px!important;min-width:34px;padding:6px!important;border-radius:9px!important;background:#f1eddd!important;color:#345d50!important;border:1px solid #b1b8a0!important;box-shadow:none!important}
html.local-dark-screen #modal-root .item-detail .item-lock-toggle svg{color:#345d50!important;stroke:currentColor!important}
html.local-dark-screen #modal-root .item-detail .item-lock-toggle:disabled{opacity:.55}
html.local-dark-screen .location-eye{background:transparent!important;box-shadow:none!important;border:0!important;border-radius:12px!important;overflow:hidden}
html.local-dark-screen .location-eye :is(img,video){background:transparent!important;border-radius:12px!important;mix-blend-mode:normal;filter:none}
html.local-dark-screen .location-eye>video{display:none!important}
html.local-dark-screen .location-eye>img{opacity:1!important}
html.local-dark-screen :is(.guard-message,.guard-bubble,.quest-bubble,.hunter-bubble,.dungeon-settings-choice){background:#293d53!important;color:#dce7f2!important;border-color:#536981!important;box-shadow:none!important}
html.local-dark-screen :is(.guard-speaker,.guard-bubble p,.dungeon-settings-choice strong){color:#c4d2e3!important}
html.local-dark-screen :is(.mentor-message,.mentor-message.is-self){background:#293d53!important;color:#dce7f2!important;border-color:#536981!important;box-shadow:none!important}
html.local-dark-screen .mentor-message :is(p,small){color:#dce7f2!important;background:transparent!important}
.local-theme-control>p{display:none}
.arena-leader-caption{display:none}
html.local-dark-screen :is(.guard-message,.guard-bubble)::before,
html.local-dark-screen :is(.guard-message,.guard-bubble)::after{background-image:none!important;box-shadow:none!important;border-color:transparent!important}
html.local-dark-screen .dungeon-help-rules{background:transparent!important;border:0!important;box-shadow:none!important}
html.local-dark-screen .dungeon-dialog::backdrop{background:rgba(38,89,112,.38)!important}
html.local-dark-screen #modal-root>.modal-shade,
html.local-dark-screen :is(.vg-sheet-shade,.vg-comfort-shade,.battle-inspection-shade){background:rgba(31,72,93,.38)!important}
html.hero-dark-screen #hero :is(.hero-stats-body,.v13-combat-numbers){background:transparent!important;box-shadow:none!important;border-color:#41516a!important}
html.hero-dark-screen #hero .hero-elemental-resistances{background:transparent!important;box-shadow:none!important;border-color:#41516a!important;border-image:none!important}
html.local-dark-screen #modal-root .modal:not(.item-detail) [data-close]>.icon{color:#e5edf5!important;-webkit-text-fill-color:#e5edf5!important}
html.local-dark-screen #modal-root .combat-result>.result-heading .result-loss-text{color:#ed9e88!important;}
html.local-dark-screen .resistance-icon{background:transparent!important;box-shadow:none!important;border:0!important;border-radius:8px;overflow:hidden}
html.local-dark-screen .resistance-icon img{mix-blend-mode:normal!important;background:transparent!important;filter:none!important}
html.local-dark-screen #presence-panel :is(header,.presence-location){background:transparent!important;border:0!important;box-shadow:none!important}

/* December walkthrough: keep paper-specific colours local to paper surfaces. */
html.local-dark-screen #modal-root>.modal-shade{backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);background:rgba(31,72,93,.38)!important}
html.hero-dark-screen #hero [data-hero-stat]:not([aria-expanded=true]){background:transparent!important;border-color:transparent!important;box-shadow:none!important}
html.local-dark-screen .resistance-icon img{width:100%;height:100%;object-fit:contain;opacity:1!important}
html.local-dark-screen #world :is(.world-chapter-pass,.world-journey,.journey-mini,.journey-card){background:#253347!important;color:#cbd6e2!important;border-color:#536981!important;box-shadow:none!important}
html.local-dark-screen #world .world-chapter-pass :is(strong,p,small){color:#cbd6e2!important;background:transparent!important;border-color:#536981!important}
html.local-dark-screen #world .world-chapter-pass>small{display:inline-block;padding:4px 10px;border:1px solid #536981!important;border-radius:8px;color:#d8dfce!important}
html.local-dark-screen #world :is(.mentor-paths,.mentor-professions) button{background:#293b52!important;color:#d2dce7!important;border-color:#60758d!important;box-shadow:none!important}
html.local-dark-screen #world :is(.mentor-paths,.mentor-professions) button :is(strong,small){color:#d2dce7!important}
html.local-dark-screen #world .mentor-paths button:disabled{opacity:1!important;background:#304b58!important;border-color:#81a79a!important}
html.local-dark-screen #world .mentor-message{border-radius:12px!important}
html.local-dark-screen #world .mentor-message::before{border-color:#718598!important;box-shadow:none!important}
html.local-dark-screen #world [data-world-favourite][aria-pressed=true]{background:#4b493c!important;border-color:#c8b07b!important;color:#f0d496!important}
html.local-dark-screen #world [data-world-favourite][aria-pressed=true] img{filter:brightness(1.3) saturate(1.15)}
html.local-dark-screen #presence-panel img{filter:none!important;opacity:1!important;object-fit:cover;object-position:center top;image-rendering:auto}
html.local-dark-screen #valgard-effect-note{color:#cbd6e2!important}
html.local-dark-screen #valgard-effect-note :is(p,.effect-note-text){color:#cbd6e2!important}
html.local-dark-screen #valgard-effect-note button{background:#30435d!important;color:#d7e1eb!important;border-color:#6981a2!important;box-shadow:none!important}
html.local-dark-screen :is(.modal:not(.item-detail),.vg-sheet,.vg-comfort,.dungeon-dialog) :is(.icon-button[data-close],.vg-close,.vg-comfort-x) .icon[data-glyph=close]{position:relative;display:inline-block;width:16px;height:16px;font-size:0!important;color:#dce7f2!important}
html.local-dark-screen :is(.modal:not(.item-detail),.vg-sheet,.vg-comfort,.dungeon-dialog) :is(.icon-button[data-close],.vg-close,.vg-comfort-x) .icon[data-glyph=close]::before,
html.local-dark-screen :is(.modal:not(.item-detail),.vg-sheet,.vg-comfort,.dungeon-dialog) :is(.icon-button[data-close],.vg-close,.vg-comfort-x) .icon[data-glyph=close]::after{content:'';position:absolute;left:1px;top:7px;width:14px;height:2px;background:#dce7f2;border-radius:2px;transform:rotate(45deg)}
html.local-dark-screen :is(.modal:not(.item-detail),.vg-sheet,.vg-comfort,.dungeon-dialog) :is(.icon-button[data-close],.vg-close,.vg-comfort-x) .icon[data-glyph=close]::after{transform:rotate(-45deg)}
html.local-dark-screen .hero-rename-modal :is(.rename-hero,.rename-price,.rename-field){background:#253347!important;color:#cbd6e2!important;border-color:#536981!important;box-shadow:none!important}
html.local-dark-screen .hero-rename-modal :is(label,.rename-field>span){color:#cbd6e2!important}
html.local-dark-screen .hero-rename-modal input{background:#293b52!important;color:#dce7f2!important;border-color:#637b90!important}
html.local-dark-screen .city-shop-balance{background:#253347!important;color:#cbd6e2!important;border-color:#536981!important}
.city-product .city-purchase-controls{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(96px,112px);grid-template-areas:'quantity quantity' 'price buy';gap:9px;align-items:center}
.city-product .city-purchase-controls>[data-qty-price]{grid-area:price;min-width:0}
.city-product .city-purchase-controls>.city-product-quantity{grid-area:quantity;display:flex;justify-content:space-between;align-items:center;gap:8px;min-width:0}
.city-product .city-purchase-controls>[data-city-buy]{grid-area:buy;width:100%;margin:0;min-width:0}
.city-product .city-purchase-controls:not(:has(.city-product-quantity)){grid-template-areas:'price buy'}
.city-product.local-ammo-product{grid-template-columns:74px minmax(0,1fr)!important;align-items:start}
.local-ammo-product>.city-product-art{display:flex!important;flex-direction:column;justify-content:start;align-items:center;gap:7px;min-height:0;height:auto!important;width:74px!important;padding:5px!important;box-sizing:border-box}
.local-ammo-product>.city-product-art>img{width:60px!important;height:60px!important;object-fit:contain}
.local-ammo-product .city-product-pack{display:grid;gap:3px;margin:0;text-align:center;font-size:10px;color:#625b48!important}
.local-ammo-product .city-product-pack b{font-size:12px;color:#345d50}
.local-ammo-product>.city-product-copy{min-width:0}
.local-ammo-product .city-product-copy>strong{display:block;overflow-wrap:anywhere;line-height:1.25}
html.local-dark-screen .party-modal :is(.party-same-place,.party-card,.party-card-empty,.party-card-art,.party-card-foot){background:#293b52!important;color:#cbd6e2!important;border-color:#60758d!important;box-shadow:none!important}
html.local-dark-screen .party-modal :is(.party-card-name,.party-card-name strong,.party-card-copy strong,.party-auto-ready,.party-card-status,.party-card-level,.party-card-place){color:#cbd6e2!important}
html.local-dark-screen .party-modal :is(.party-card-class,.party-card-role,.party-card-empty small,.party-card-empty strong){color:#b8c6da!important}
html.local-dark-screen .party-modal .party-card-meter-value{color:#263e36!important;text-shadow:none!important}
html.local-dark-screen .party-modal .party-tools{background:transparent!important;border-color:#536981!important;box-shadow:none!important}
html.local-dark-screen .party-modal .party-auto-ready i{background:#41516a!important;border-color:#718598!important}

html.world-dark-screen #world .opponent-card:not(.is-boss):not(.is-wandering){filter:brightness(.88);color-scheme:light;}
html.world-dark-screen #world .world-travel-status{background:#253347!important;color:#cbd6e2!important;border-color:#536981!important;box-shadow:none!important;}
html.world-dark-screen #world .world-travel-status :is(strong,small){color:#cbd6e2!important;}
html.local-dark-screen .winter-gift-dialog{filter:brightness(.88);color-scheme:light;}
html.local-dark-screen #world .winter-native-conversation .mentor-message:not(.is-self){background:#293d53!important;border-color:#536981!important;box-shadow:none!important;}
html.local-dark-screen #world .winter-native-conversation .mentor-message :is(p,small){color:#cbd6e2!important;}
html.world-dark-screen #world .world-choice .world-choice-caption{background:#293b52!important;color:#cbd6e2!important;border-color:#637b90!important;box-shadow:none!important;}
html.world-dark-screen #world .world-choice .world-choice-caption-text{color:#cbd6e2!important;}
html.world-dark-screen #world .destination-heading .eyebrow{color:#b8c6da!important;}
html.winter-preview.world-dark-screen #world .destination-divider>i{background:transparent!important;background-image:url('art/ui/winter-decor-20261122/divider-20261203.svg')!important;background-position:center!important;background-size:contain!important;background-repeat:no-repeat!important;font-size:0!important;color:transparent!important;border:0!important;border-image:none!important;box-shadow:none!important;outline:0!important;padding:0!important;border-radius:0!important;transform:none!important;width:12px!important;height:12px!important;}
html.winter-preview.world-dark-screen #world .destination-divider>i::before,html.winter-preview.world-dark-screen #world .destination-divider>i::after{content:none!important;}
html.local-dark-screen #world #location-inline-panel .quest-conversation[data-speaker] .mentor-message:not(.is-self){background:#293d53!important;color:#cbd6e2!important;border:1px solid #718598!important;box-shadow:none!important;border-radius:12px!important;}
html.local-dark-screen #world #location-inline-panel .quest-conversation[data-speaker] .mentor-message :is(p,small){color:#cbd6e2!important;}
html.local-dark-screen #world :is(.quest-conversation,.hunter-conversation,.winter-native-conversation) .mentor-answers button{background:#293b52!important;color:#cbd6e2!important;border-color:#637b90!important;box-shadow:none!important;}
html.winter-preview.world-dark-screen #world .world-choice{background:#253347!important;border-color:transparent!important;}
html.winter-preview.world-dark-screen #world .world-choice::before,html.winter-preview.world-dark-screen #world .world-choice::after{filter:brightness(.62) saturate(.8);}
.local-theme-beta{box-sizing:border-box;width:min(360px,calc(100vw - 32px));padding:22px;border:1px solid #acbaa8;border-radius:18px;background:#f6f1e4;color:#34564c;box-shadow:0 12px 40px #173a4d44;font-family:Interface,sans-serif;}
.local-theme-beta h3{margin:0 0 12px;font-size:19px;color:#34564c;}
.local-theme-beta p{font-size:13px;line-height:1.55;color:#53675d;margin:0 0 18px;}
.local-theme-beta>div{display:grid;gap:8px;}.local-theme-beta button{width:100%;min-height:40px;border-radius:10px;}
.local-theme-beta::backdrop{background:rgba(38,89,112,.38);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);}

/* Second walkthrough: pair every neutral surface with its own readable ink. */
html.local-dark-screen :is(.winter-native-day,.winter-day-slot,.party-empty-intro,.party-invite-code-line,.dungeon-member,.dungeon-seat,.city-equipment-row,.city-forge-selected,.city-forge-preview,.city-costs,.city-vault-meter,.vg-vault-coins,.city-picker-panel,.rune-workbench,.buyer-row,.vg-dice-host,.vg-dice-rules>li){background:#253347!important;color:#dce7f2!important;border-color:#536981!important;box-shadow:none!important;border-radius:12px;--ink:#dce7f2;--muted:#b8c6da;}
html.local-dark-screen :is(.winter-native-day,.winter-day-slot,.party-empty-intro,.party-invite-code-line,.dungeon-member,.dungeon-seat,.city-equipment-row,.city-forge-selected,.city-forge-preview,.city-vault-meter,.rune-workbench,.buyer-row,.vg-dice-host) :is(strong,h3,b){color:#dce7f2!important;text-shadow:none!important;}
html.local-dark-screen :is(.winter-native-day,.winter-day-slot,.party-empty-intro,.party-invite-code-line,.dungeon-member,.dungeon-seat,.city-equipment-row,.city-forge-selected,.city-forge-preview,.city-vault-meter,.rune-workbench,.buyer-row,.vg-dice-host) :is(p,small,label){color:#b8c6da!important;text-shadow:none!important;}
html.local-dark-screen .winter-native-day :is(.winter-reward-link,.winter-day-news,.winter-pending-link){color:#cbdcf2!important;background:transparent!important;border-color:#536981!important;}
html.local-dark-screen :is(.winter-vitals-track,.winter-vitals-music-copy){color:#dce7f2!important;}
html.local-dark-screen .winter-vitals-music-copy :is(strong,b){color:#dce7f2!important;}
html.local-dark-screen .winter-vitals-music-copy :is(small,span){color:#bac9dc!important;}
html.local-dark-screen .winter-vitals-time{color:#edcc95!important;}
html.local-dark-screen :is(.potion-effect-name,.potion-effect-row time){color:#edcc95!important;background:transparent!important;}
html.local-dark-screen .potion-effect-row .potion-property{background:#30465b!important;color:#c3dfcb!important;border-color:#718b83!important;}
html.local-dark-screen .potion-effect-row .potion-property b{color:#d0e7d5!important;}
html.local-dark-screen #modal-root .party-modal .party-card-meter-value{color:#203c35!important;text-shadow:none!important;font-weight:800;}
html.local-dark-screen #modal-root .party-modal .party-empty-intro{background:#253347!important;padding:16px 10px;border-radius:14px;}
html.local-dark-screen #modal-root .party-modal .party-empty-intro :is(strong,p){color:#d2dce7!important;}
html.local-dark-screen #modal-root .party-modal .party-invite-code-line{background:#253347!important;border-color:#536981!important;}
html.local-dark-screen #modal-root .party-modal .party-invite-code-line>strong{color:#edcc95!important;}
html.local-dark-screen :is(.dungeon-group-title,.dungeon-lobby-head){background:transparent!important;color:#dce7f2!important;}
html.local-dark-screen :is(.dungeon-group-title>b,.dungeon-lobby-card header>b){background:#30465b!important;color:#c7d9c7!important;border-color:#647a87!important;}
html.local-dark-screen :is(.dungeon-group-title,.dungeon-lobby-head) :is(strong,small){color:#cbd6e2!important;}
html.local-dark-screen :is(.dungeon-member,.dungeon-seat) :is(strong,small,em,.dungeon-leader-label){color:#d2dce7!important;}
html.local-dark-screen :is(.ranking-search,.ranking-filter,.ranking-class-menu,.ranking-pages button){background:#253347!important;color:#dce7f2!important;border-color:#60758c!important;box-shadow:none!important;}
html.local-dark-screen .ranking-search input{background:transparent!important;color:#dce7f2!important;}
html.local-dark-screen .ranking-search input::placeholder{color:#b8c6da!important;opacity:1;}
html.local-dark-screen :is(.ranking-level,.ranking-level small){color:#edcc95!important;}
html.local-dark-screen .ranking-class-menu button{color:#dce7f2!important;background:transparent!important;}
html.local-dark-screen #world #location-inline-panel .guard-answers .guard-answer{background:#293b52!important;color:#d2dce7!important;border-color:#637b90!important;box-shadow:none!important;}
html.local-dark-screen #modal-root :is(.city-picker-panel,.city-forge-selected,.city-equipment-row) :is(strong,h2,h3){color:#dce7f2!important;}
html.local-dark-screen #modal-root .city-picker-panel>header{background:transparent!important;color:#dce7f2!important;}
html.local-dark-screen #modal-root :is(.vg-pick-tabs button,.city-forge-ladder>span,.forge-step-button){background:#30465b!important;color:#d2dce7!important;border-color:#60758c!important;box-shadow:none!important;}
html.local-dark-screen #modal-root :is(.city-forge-chance,.city-forge-chance strong,.vg-forge-odds){color:#acd4b2!important;}
html.local-dark-screen #modal-root :is(.city-hint,.city-rune-candidates button[data-item-preview],.city-rune-candidates button[data-item-preview] span){color:#c4d2e3!important;}
html.local-dark-screen #modal-root .city-forge-option{filter:brightness(.80);color:#315a50!important;color-scheme:light;}
html.local-dark-screen #modal-root .city-forge-option :is(.vg-pick-copy strong,.vg-pick-copy small){color:#315a50!important;}
html.local-dark-screen #modal-root .vg-vault-card{filter:brightness(.80);color:rgb(48,76,72);color-scheme:light;}
html.local-dark-screen #modal-root .vg-vault-card .relic-card{filter:none!important;}
html.local-dark-screen #modal-root .vg-vault-card :is(.vg-qty input,.vg-qty-value,[data-qty-value]){color:#315a50!important;-webkit-text-fill-color:#315a50!important;}
html.local-dark-screen .buyer-tabs button{background:#293b52!important;color:#d2dce7!important;border-color:#60758c!important;}
html.local-dark-screen .buyer-tabs button.active{background:#365c54!important;color:#e2f0dd!important;}
html.local-dark-screen :is(.buyer-price,.buyer-purse){color:#edcc95!important;background:transparent!important;}
html.local-dark-screen #world .vg-dice-host :is(strong,p,small){color:#d2dce7!important;}
html.local-dark-screen .vg-dice-rules>li b{color:#edcc95!important;}
html.local-dark-screen .vg-dice-rules>li span{color:#b8c6da!important;}
html.local-dark-screen :is(.hearth-game,.hearth-header,.hearth-wallet,.hearth-controls,.hearth-rules){background:#1d2a3c!important;color:#d2dce7!important;border-color:#60758c!important;}
html.local-dark-screen :is(.hearth-header h2,.hearth-header small,.hearth-message strong,.hearth-rules h3){color:#dce7f2!important;}
html.local-dark-screen :is(.hearth-message p,.hearth-loss,.hearth-rules p,.hearth-rules li,.hearth-rules th){color:#bdccdf!important;}
html.local-dark-screen :is(.hearth-wallet b,.hearth-rules td,.hearth-payout b){color:#edcc95!important;}
html.local-dark-screen :is(.hearth-stakes button,.hearth-rules .icon-button,.hearth-header .icon-button){background:#30465b!important;color:#dce7f2!important;border-color:#6981a2!important;box-shadow:none!important;}
html.local-dark-screen .hearth-stakes button[aria-pressed=true]{background:#36564f!important;color:#e0eddc!important;border-color:#91ad94!important;}
html.local-dark-screen :is(.hearth-payout,.hearth-payout>span){background:transparent!important;border-color:#536981!important;}
html.local-dark-screen :is(.trade-detail-author,.trade-detail-seller,.trade-seller,.trade-offer-seller,.trade-lot-seller){color:#d2dce7!important;}
html.local-dark-screen :is(.trade-detail-author,.trade-detail-seller,.trade-seller,.trade-offer-seller,.trade-lot-seller) :is(b,strong,small){color:#c5d4e5!important;}
html.local-dark-screen :is(.trade-chip,.trade-chip-gold,.trade-detail-note,.trade-detail-note-input){background:#293b52!important;color:#d2dce7!important;border-color:#637b90!important;}
html.local-dark-screen .trade-detail-note-input::placeholder{color:#b8c6da!important;opacity:1;}
html.local-dark-screen #notice-root .notice[data-kind=journey],html.local-dark-screen #notice-root .notice.is-journey{background:#253347!important;color:#d2dce7!important;border-color:#60758c!important;}

/* December audit: ink and surface belong together, including nested controls. */
html.local-dark-screen #modal-root .city-modal :is(.vg-forge-head,.city-upgrade-diff>div,.rune-count){background:#253347!important;color:#dce7f2!important;border-color:#536981!important;box-shadow:none!important;}
html.local-dark-screen #modal-root .city-modal .vg-forge-head strong{color:#dce7f2!important;}
html.local-dark-screen #modal-root .city-modal .vg-forge-head small{color:#edcc95!important;}
html.local-dark-screen #modal-root .city-modal .vg-forge-head em{color:#bdcfe3!important;}
html.local-dark-screen #modal-root .city-modal :is(.city-forge-chance,.vg-forge-odds) :is(b,.is-good){color:#acd4b2!important;}
html.local-dark-screen #modal-root .city-modal :is(.city-forge-chance,.vg-forge-odds)>span{color:#b8c6da!important;}
html.local-dark-screen #modal-root .city-modal .city-forge-ladder i{background:#30465b!important;color:#dce7f2!important;}
html.local-dark-screen #modal-root .city-modal .city-forge-ladder i.done{background:#3e6156!important;color:#e3f0e2!important;}
html.local-dark-screen #modal-root .city-modal .city-upgrade-diff>div{border:0!important;background:transparent!important;}
html.local-dark-screen #modal-root .city-modal .city-upgrade-diff :is(b,b i){color:#c6e5d0!important;}
html.local-dark-screen #modal-root .city-modal .city-price:not(:where(.city-product *,.relic-card *,.vg-pick *,.vg-vault-card *)){color:#edcc95!important;}
html.local-dark-screen #modal-root .city-modal :is(.city-hint,.city-empty,.vg-picker>header>small){color:#bacbdd!important;}
html.local-dark-screen #modal-root .city-modal .city-error{color:#f0b29f!important;}
html.local-dark-screen #modal-root .city-modal button.primary:not(:where(.relic-card *,.vg-vault-card *)){background:linear-gradient(#3d7465,#305e52)!important;color:#fff8ec!important;border-color:#7c9e8c!important;}
html.local-dark-screen #modal-root .party-modal .party-slot-add{background:#30485a!important;color:#d4e5e3!important;border-color:#718d94!important;box-shadow:none!important;}
html.local-dark-screen #modal-root .party-modal .party-leave{background:#744a59!important;color:#fff5e8!important;border-color:#ad8794!important;}

/* Local generated replacement: compact patron shield, same chat box as staff. */
.player-identity-badge.badge-patron,.city-patron-badge{content:url('art/ui/city-20261107/patron-badge-v2-20261203.webp')!important;object-fit:contain!important;}
#shore-messages .player-identity-badge.badge-patron{filter:none!important;opacity:1!important;}
html.local-dark-screen #modal-root .city-modal .city-upgrade-diff{background:transparent!important;box-shadow:none!important;border-color:#536981!important;}
html.local-dark-screen #modal-root .city-picker-panel>header p{color:#bacbdd!important;}
html.local-dark-screen .ranking-search>span{color:#c3d4e5!important;}
html.local-dark-screen .winter-calendar-expand span{color:#fff1ce!important;}
html.local-dark-screen .hearth-game .primary,.local-theme-beta .primary,
html.local-dark-screen [data-hearth-dice-open]{background:linear-gradient(#3d7465,#305e52)!important;color:#fff8ec!important;border-color:#7c9e8c!important;}
html.local-dark-screen #modal-root .city-modal .city-upgrade-diff :is(span,small){color:#bacbdd!important;}
html.local-dark-screen #modal-root .hero-rename-modal .rename-hero strong{color:#dce7f2!important;}
html.local-dark-screen #modal-root .hero-rename-modal :is(.rename-hero small,#rename-count){color:#bacbdd!important;}
html.local-dark-screen #settings .vg-audio-options>summary>i{color:#c3d4e5!important;}
html.local-dark-screen #modal-root .city-modal .identity-owned-skin small{color:#bacbdd!important;}
html.local-dark-screen #modal-root .city-modal .city-skin-active{background:#304d45!important;color:#d9ebd8!important;}
html.local-dark-screen #modal-root .party-modal .party-card-kick{background:#30465b!important;color:#e3c4ba!important;border:1px solid #718598!important;box-shadow:none!important;}
html.local-dark-screen #modal-root .party-modal .party-card-kick span{color:inherit!important;}
/* Icon-font gradients otherwise retain an olive close glyph on the dark button. */
html.local-dark-screen #modal-root .modal:not(.item-detail) .icon-button[data-close] .icon[data-glyph=close]{font-size:0!important;background:none!important;-webkit-text-fill-color:transparent!important;}
html.local-dark-screen #modal-root .modal:not(.item-detail) .icon-button[data-close] .icon[data-glyph=close]::before,
html.local-dark-screen #modal-root .modal:not(.item-detail) .icon-button[data-close] .icon[data-glyph=close]::after{background:#dce7f2!important;background-clip:border-box!important;-webkit-background-clip:border-box!important;box-shadow:none!important;}
html.local-dark-screen #modal-root .modal:not(.item-detail) .icon-button[data-close]{position:relative!important;}
html.local-dark-screen #modal-root .modal:not(.item-detail) .icon-button[data-close] .icon[data-glyph=close]{display:none!important;}
html.local-dark-screen #modal-root .modal:not(.item-detail) .icon-button[data-close]::before,
html.local-dark-screen #modal-root .modal:not(.item-detail) .icon-button[data-close]::after{content:''!important;position:absolute;left:50%;top:50%;width:14px;height:2px;background:#dce7f2!important;border:0!important;border-radius:2px;box-shadow:none!important;mask:none!important;transform:translate(-50%,-50%) rotate(45deg);pointer-events:none;}
html.local-dark-screen #modal-root .modal:not(.item-detail) .icon-button[data-close]::after{transform:translate(-50%,-50%) rotate(-45deg);}
/* Preserve the winter rim, without painting its light centre beneath pale ink. */
html.winter-preview.world-dark-screen #world .world-choice::before{border-image:var(--winter-tile-rim) var(--winter-tile-slice,80) / var(--winter-tile-width) / 0 round!important;}
html.winter-preview.world-dark-screen #world .world-choice .world-choice-scene{border-color:#536981!important;}
/* Post UI is mounted beside modal-root. Its painted letter keeps native paper. */
html.local-dark-screen :is(.winter-mail-shade,.winter-mail-gift-shade){background:rgba(31,72,93,.38)!important;backdrop-filter:blur(5px);}
html.local-dark-screen :is(.winter-mail-sheet,.winter-mail-gift-sheet){background:#1d2a3c!important;color:#dce7f2!important;border-color:#61758f!important;box-shadow:0 8px 32px #07101b66!important;}
html.local-dark-screen :is(.winter-mail-sheet,.winter-mail-gift-sheet)>header{background:#253347!important;color:#dce7f2!important;border-color:#536981!important;}
html.local-dark-screen :is(.winter-mail-sheet,.winter-mail-gift-sheet) :is(h2,h3){color:#dce7f2!important;}
html.local-dark-screen :is(.winter-mail-row,.winter-mail-recipients>button,.winter-mail-gift-option,.winter-mail-attachment-chosen,.winter-mail-add,.winter-mail-address,.winter-mail-gift-search){background:#253347!important;color:#dce7f2!important;border-color:#536981!important;box-shadow:none!important;}
html.local-dark-screen :is(.winter-mail-row,.winter-mail-gift-option,.winter-mail-attachment-chosen) strong{color:#dce7f2!important;}
html.local-dark-screen :is(.winter-mail-row small,.winter-mail-gift-option small,.winter-mail-counter,.winter-mail-help,.winter-mail-empty,.winter-mail-label,.winter-mail-gift-empty,.winter-mail-recipient,.winter-mail-recipients small,.winter-mail-add small){color:#bdccdf!important;}
html.local-dark-screen :is(.winter-mail-label input,.winter-mail-gift-search input,.winter-mail-writing textarea){background:transparent!important;color:#dce7f2!important;caret-color:#edcc95!important;}
html.local-dark-screen :is(.winter-mail-label input,.winter-mail-gift-search input,.winter-mail-writing textarea)::placeholder{color:#b8c6da!important;opacity:1;}
html.local-dark-screen .winter-mail-writing{background:repeating-linear-gradient(#253347 0 32px,#53698166 32px 33px)!important;border-color:#536981!important;box-shadow:none!important;}
html.local-dark-screen :is(.winter-mail-sheet,.winter-mail-gift-sheet) :is([data-winter-mail-close],[data-gift-close],.secondary,.winter-mail-attachment-chosen button){background:#30465b!important;color:#dce7f2!important;border-color:#6981a2!important;box-shadow:none!important;}
html.local-dark-screen :is(.winter-mail-sheet,.winter-mail-gift-sheet) .primary{background:linear-gradient(#3d7465,#305e52)!important;color:#fff8ec!important;border-color:#7c9e8c!important;}
html.local-dark-screen .winter-letter-paper{filter:brightness(.85);color:#355b50;--ink:#355b50;color-scheme:light;}
html.local-dark-screen .winter-mail-error{color:#f0b29f!important;}
html.local-dark-screen :is(.winter-mail-address>span,.winter-mail-gift-search>span){color:#c3d4e5!important;}
html.local-dark-screen .winter-letter-salutation{color:#765d35;}
/* A var() URL is resolved at its use site, which here is /__dev/*.css. */
html.winter-preview.world-dark-screen #world .world-choice{--winter-tile-rim:url('art/ui/winter-decor-20261122/choice-mentor.webp');}
html.winter-preview.world-dark-screen #world .world-choice.choice-enemies{--winter-tile-rim:url('art/ui/winter-decor-20261122/choice-enemies-rim.webp');}
html.winter-preview.world-dark-screen #world .world-choice.choice-pit{--winter-tile-rim:url('art/ui/winter-decor-20261122/choice-pit-rim.webp');}
html.winter-preview.world-dark-screen #world .world-choice::before{filter:brightness(.85) saturate(.9);}
html.winter-preview.world-dark-screen #world .world-choice::after{display:none!important;}
html.local-dark-screen #modal-root .modal:not(.item-detail) .icon-button[data-close]::before,
html.local-dark-screen #modal-root .modal:not(.item-detail) .icon-button[data-close]::after{left:50%!important;top:50%!important;right:auto!important;bottom:auto!important;width:14px!important;height:2px!important;margin:0!important;padding:0!important;transform:translate(-50%,-50%) rotate(45deg)!important;}
html.local-dark-screen #modal-root .modal:not(.item-detail) .icon-button[data-close]::after{transform:translate(-50%,-50%) rotate(-45deg)!important;}
/* Small ink on native combat paper needs contrast as well as dimmed brightness. */
html.battle-night-screen #battle-root .battle-clock-time strong{color:#896025!important;}
html.battle-night-screen #battle-root .combat-player-name>small{color:#59614d!important;}
html.battle-night-screen #battle-root .battle-log-toggle small{color:#536349!important;}

/* Screenshot follow-up: native winter paper, not blue inserts over its art. */
html.winter-preview.world-dark-screen #world .world-choice{
 --winter-tile-paper:var(--winter-tile-rim);background:#f6f5e9!important;color:#315c52!important;filter:brightness(.84);border-color:transparent!important;
}
html.winter-preview.world-dark-screen #world .world-choice.choice-enemies{--winter-tile-paper:url('art/ui/winter-decor-20261122/choice-enemies.webp');background:#e0edf2!important;}
html.winter-preview.world-dark-screen #world .world-choice.choice-pit{--winter-tile-paper:url('art/ui/winter-decor-20261122/choice-pit.webp');background:#f2eadb!important;}
html.winter-preview.world-dark-screen #world .world-choice::before{border-image:var(--winter-tile-paper) var(--winter-tile-slice,80) fill / var(--winter-tile-width) / 0 round!important;filter:none!important;}
html.winter-preview.world-dark-screen #world .world-choice .world-choice-scene{background:transparent!important;border-color:transparent!important;box-shadow:none!important;}
html.winter-preview.world-dark-screen #world .world-choice>strong{background:transparent!important;color:#315c52!important;text-shadow:none!important;}
html.winter-preview.world-dark-screen #world .world-choice .world-choice-footer{background:transparent!important;}
html.winter-preview.world-dark-screen #world .world-choice .world-choice-caption{background:linear-gradient(#fafffa,#e6f0ee)!important;color:#3c6258!important;border-color:#a9c1b6!important;}
html.winter-preview.world-dark-screen #world .world-choice.choice-pit .world-choice-caption{background:linear-gradient(#fcf6e9,#f2ead7)!important;border-color:#c8b994!important;}
html.winter-preview.world-dark-screen #world .world-choice :is(.world-choice-caption-text,.world-choice-caption-text small){color:#3c6258!important;}

html.local-dark-screen #modal-root .party-modal .party-card-portrait{border:0!important;box-shadow:none!important;outline:0!important;background:transparent!important;}
html.local-dark-screen #modal-root .party-modal .party-card-art{border:0!important;background:transparent!important;box-shadow:none!important;}

/* A locked offer has one row, without the empty quantity row. */
html #modal-root .city-modal .city-product .city-purchase-controls:not(:has(.city-product-quantity)){grid-template-areas:'price buy'!important;grid-template-rows:auto!important;align-items:center!important;}
html #modal-root .city-modal .city-product .city-purchase-controls:not(:has(.city-product-quantity))>[data-qty-price]{grid-column:1!important;grid-row:1!important;align-self:center!important;}
html #modal-root .city-modal .city-product .city-purchase-controls:not(:has(.city-product-quantity))>[data-city-buy]{grid-column:2!important;grid-row:1!important;align-self:center!important;}

/* The notification rail draws its paper with SVG; tint the actual paint vars. */
html.local-dark-screen #app #toast.top-notice{--notice-paper-top:#293b52!important;--notice-paper-bottom:#1d2a3c!important;--notice-outline:#718598!important;--notice-accent:#88ad9a!important;--notice-ring:#536981!important;color:#dce7f2!important;}
html.local-dark-screen #app #toast.top-notice :is(.notice-copy,.notice-copy strong,.notice-title,.notice-detail,.notice-copy>small){color:#d2dfec!important;text-shadow:none!important;}
html.local-dark-screen #app #toast.top-notice .notice-meta{background:#30465b!important;color:#edcc95!important;border-color:#718598!important;}
html.local-dark-screen #app #toast.top-notice .notice-progress{background:#41516a!important;}
html.local-dark-screen #app #toast.top-notice .notice-handle{background:#9eafbf!important;}
html.local-dark-screen #app #toast.top-notice.notice-error{--notice-outline:#be8f80!important;}

/* Profile paper stays familiar; nested equipment is not dimmed twice. */
html.local-dark-screen .battle-inspection{filter:none;background:#d9dad0;color-scheme:light;box-shadow:0 8px 30px #10233155,inset 0 0 0 3px #cdd1c5;}
html.local-dark-screen .battle-inspection .relic-card{filter:brightness(.80)!important;}
html.local-dark-screen .battle-inspection :is(.inspection-facts>span,.inspection-attributes>span,.inspection-vitals>span,.inspection-gear:not(:has(.relic-card))){background:#dce1d2;border-color:#b3bfa8;}
html.local-dark-screen #valgard-effect-note img[src$="patron.png"],
html.local-dark-screen #valgard-effect-note img[src$="patron-badge.png"]{content:url('art/ui/city-20261107/patron-badge-v2-20261203.webp');background:transparent!important;border:0!important;object-fit:contain;}

/* Workshop confirmation, allocation, and the separately mounted result sheet. */
html.local-dark-screen #modal-root .city-modal :is(.city-risk,.forge-attributes){background:#253347!important;color:#dce7f2!important;border-color:#60758c!important;box-shadow:none!important;}
html.local-dark-screen #modal-root .city-modal .city-risk{color:#edcc95!important;}
html.local-dark-screen #modal-root .city-modal .forge-attributes :is(header,strong,small,span,b,input){color:#d2dfec!important;border-color:#60758c!important;}
html.local-dark-screen #modal-root .city-modal .forge-attributes :is(.forge-step,input){background:#30465b!important;}
html.local-dark-screen #modal-root .city-modal :is(.city-forge-confirm-actions .secondary,.city-equipment-row footer .secondary){background:#233247!important;color:#d2dfec!important;border-color:#60758c!important;box-shadow:inset 0 2px 4px #07101b55,inset 0 -1px 0 #9ab4cb22!important;}
html.local-dark-screen #city-result{background:rgba(31,72,93,.38)!important;backdrop-filter:blur(5px);}
html.local-dark-screen #city-result .city-result-block{background:#1d2a3c!important;color:#dce7f2!important;border-color:#718598!important;box-shadow:0 12px 36px #07101b66!important;}
html.local-dark-screen #city-result .city-result-block>header{border-color:#536981!important;}
html.local-dark-screen #city-result .city-result-block>header>strong{color:#bee0c9!important;}
html.local-dark-screen #city-result .city-result-block.is-bad>header>strong{color:#f0b29f!important;}
html.local-dark-screen #city-result :is(.city-result-block>p,header>small){color:#bacbdd!important;}
html.local-dark-screen #city-result .city-result-item-row{background:#253347!important;border-color:#536981!important;}
html.local-dark-screen #city-result .city-result-item-row b{color:#dce7f2!important;}
html.local-dark-screen #city-result .city-result-step{background:#304d45!important;color:#d6ead7!important;}
html.local-dark-screen #city-result .city-result-art{background:transparent!important;}

/* Coin controls are ordinary dark form surfaces, not another nested panel. */
html.local-dark-screen #modal-root .city-modal .vg-vault-coins{background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;}
html.local-dark-screen #modal-root .city-modal .vg-coins-row{background:#253347!important;border-color:#60758c!important;color:#d2dfec!important;}
html.local-dark-screen #modal-root .city-modal .vg-coins-row .city-price{color:#edcc95!important;}
html.local-dark-screen #modal-root .city-modal :is(.vg-coins-amount>span,.vg-coins-note){color:#bacbdd!important;}
html.local-dark-screen #modal-root .city-modal .vg-coins-amount input{background:#253347!important;color:#dce7f2!important;border-color:#60758c!important;}
html.local-dark-screen #modal-root .city-modal :is(.vg-coins-quick button,.vg-coins-actions .secondary){background:#30465b!important;color:#d2dfec!important;border-color:#718598!important;box-shadow:inset 0 1px 0 #afc8dd22!important;}

/* Extend the native flip-card paper and contour behind its transfer controls. */
html #modal-root .modal.city-modal .vg-vault-card{--vault-action-height:52px;position:relative;background:transparent!important;border:0!important;box-shadow:none!important;justify-content:flex-start!important;}
html #modal-root .modal.city-modal .vg-vault-card:has(>footer>.vg-qty){--vault-action-height:96px;}
html #modal-root .modal.city-modal .vg-vault-face{height:calc(190px + var(--vault-action-height) + max(0px,(var(--valgard-text-scale,1) - 1) * 70px))!important;}
html #modal-root .modal.city-modal .vg-vault-face .inventory-card,
html #modal-root .modal.city-modal .vg-vault-face .relic-back{padding-bottom:calc(10px + var(--vault-action-height))!important;}
html #modal-root .modal.city-modal .vg-vault-card>footer{position:absolute;left:0;right:0;bottom:0;z-index:3;box-sizing:border-box;height:var(--vault-action-height);padding:8px!important;background:transparent!important;border:0!important;}

html.local-dark-screen #world .buyer-list{background:transparent!important;border-color:#536981!important;box-shadow:none!important;}
html.local-dark-screen #modal-root .combat-result>.result-heading h2:not(.result-loss-text){color:#bee0c9!important;}
html.local-dark-screen #modal-root .combat-result .result-item{filter:brightness(.82);color-scheme:light;}

/* Preview before consent, every time light switches to dark. */
.local-theme-beta{background:linear-gradient(145deg,#2c4056,#1d2a3c);color:#e5edf5;border:1px solid #718598;box-shadow:0 20px 60px #10233166,inset 0 1px 0 #c0d8ec33;padding:24px;border-radius:20px;}
.local-theme-beta>header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;}
.local-theme-beta>header img{width:46px;height:46px;object-fit:contain;}
.local-theme-beta-tag{font:700 10px/1.2 Interface,sans-serif;letter-spacing:.5px;padding:6px 9px;border:1px solid #8e937e;border-radius:20px;color:#edcc95;background:#40505b;}
.local-theme-beta h3{color:#edf1f7;font-size:21px;margin-bottom:10px;}
.local-theme-beta p{color:#c6d5e5;font-size:13px;line-height:1.55;}
.local-theme-beta .primary{box-shadow:inset 0 1px 0 #d9e8ca44,0 3px 0 #172f2b,0 5px 10px #08161c44!important;}
.local-theme-beta .secondary{background:#25364b!important;color:#dce7f2!important;border:1px solid #60758c!important;box-shadow:inset 0 2px 4px #07101b55!important;}
.local-theme-beta button:active{transform:translateY(1px);}
html.local-dark-screen #world #location-inline-panel button[data-fountain-choice]{background:#293b52!important;color:#d2dfec!important;border-color:#60758c!important;box-shadow:inset 0 1px 0 #afc8dd22!important;}
html.local-dark-screen #app #toast.top-notice{background:linear-gradient(#293b52,#1d2a3c)!important;border-color:#718598!important;box-shadow:0 6px 16px #07101b44,inset 0 1px 0 #afc8dd22!important;}
html.local-dark-screen #app #toast.top-notice .notice-text{color:#dce7f2!important;}
html.local-dark-screen #app #toast.top-notice.notice-error .notice-text{color:#f0b29f!important;}
html.local-dark-screen #app #toast.top-notice .notice-emblem{background:radial-gradient(#415b6e,#293b52)!important;box-shadow:inset 0 0 0 1px #718598!important;}
html.local-dark-screen #app #toast.top-notice .notice-actions button{background:#30465b!important;color:#dce7f2!important;border-color:#718598!important;}
html.local-dark-screen #level-root{background:rgba(31,72,93,.38)!important;backdrop-filter:blur(5px);}
html.local-dark-screen #level-root .level-card{background:linear-gradient(#293b52,#1d2a3c)!important;color:#dce7f2!important;border-color:#8e9f9e!important;box-shadow:0 12px 36px #07101b66!important;}
html.local-dark-screen #level-root :is(h2,h3,.level-point span){color:#dce7f2!important;}
html.local-dark-screen #level-root :is(.level-gain,.level-point,.level-discovery,.level-unlocked-technique,.level-benefits>span){background:#30465b!important;border-color:#60758c!important;color:#d2dfec!important;}
html.local-dark-screen #level-root :is(.level-gain small,.level-point small,.level-discovery small,.level-unlocked-technique small){color:#bdccdf!important;}
html.local-dark-screen #level-root :is(.level-gain b,.level-point b){color:#edcc95!important;}
html.local-dark-screen #level-root .level-actions .secondary{background:#25364b!important;color:#dce7f2!important;border-color:#60758c!important;box-shadow:inset 0 2px 4px #07101b55!important;}

/* Advent art belongs to the ready parcel, not to the neutral day container. */
html.local-dark-screen #world .winter-native-day.winter-advent-parcel{background:#233b2d url('art/events/winter-2026/advent-parcel.webp') center/100% 100% no-repeat!important;filter:brightness(.88);border-color:#b89857!important;border-radius:7px;}
html.local-dark-screen #world .winter-native-day.is-taken{background:#253347!important;border-color:#60758c!important;border-radius:10px;}
html.local-dark-screen #world .winter-native-day .winter-day-line{gap:10px;align-items:center;}
html.local-dark-screen #world .winter-native-day .winter-day-copy>strong{font:700 13px/1.3 Interface,sans-serif!important;color:#dce7f2!important;}
html.local-dark-screen #world .winter-native-day .winter-earned{background:transparent!important;border-color:#536981!important;gap:6px;padding:8px 0!important;}
html.local-dark-screen #world .winter-native-day .winter-earned .winter-reward-link{background:#30465b!important;color:#d2dfec!important;border:1px solid #536981!important;border-radius:7px!important;padding:6px!important;min-height:44px;}
html.local-dark-screen #world .winter-native-day .winter-earned .winter-reward-link :is(small,strong,span){color:#d2dfec!important;text-shadow:none!important;}
@layer chat-appearance{
 html.local-dark-screen #chat-dock :is(.online-unread,.chat-dock-badge,.chat-dock-unread,.chat-unread){background:#355d4d!important;color:#fff4d8!important;-webkit-text-fill-color:#fff4d8!important;border:1px solid #93ad98!important;font-weight:800;opacity:1!important;}
}
html.local-dark-screen #world #location-inline-panel .winter-dialogue-actions .winter-dialogue-card{background:#52605d var(--reply-art) center/cover!important;border-color:#718598!important;color:#edf1f7!important;}
html.local-dark-screen #world #location-inline-panel .winter-dialogue-card :is(strong,small){color:#edf1f7!important;text-shadow:0 1px 3px #102331;}
html #modal-root .modal.city-modal .vg-vault-card{min-height:calc(190px + var(--vault-action-height) + max(0px,(var(--valgard-text-scale,1) - 1) * 70px))!important;}
html #modal-root .modal.city-modal .vg-vault-face{position:absolute;inset:0;width:100%;height:100%!important;}
html.local-dark-screen #world .buyer-list{border:0!important;}
html.local-dark-screen #world .buyer-pick>img{background:transparent!important;border:0!important;box-shadow:none!important;}
html.local-dark-screen #world .buyer-row+.buyer-row{border-top-color:#41516a!important;}
html.local-dark-screen #world .buyer-check{background-color:#30465b!important;border-color:#718598!important;}
html.local-dark-screen #world .is-picked .buyer-check{background-color:#527f60!important;border-color:#93ad98!important;}
html.local-dark-screen #world .buyer-tabs small{background:#41566b!important;color:#edf1f7!important;}
html.local-dark-screen #world .buyer-foot .secondary{background:#30465b!important;color:#edcc95!important;border-color:#718598!important;box-shadow:inset 0 2px 4px #07101b44!important;}
html.local-dark-screen #modal-root .combat-result .metric-coins .result-metric-value strong:not(.result-loss-text){color:#79541c!important;}
html.local-dark-screen #modal-root .combat-result .metric-xp .result-metric-value strong{color:#345d80!important;}
html.local-dark-screen #modal-root .combat-result .result-metric>span{color:#4f5c4b!important;}
html.local-dark-screen #modal-root .combat-result .result-section>span{color:#bdccdf!important;}
html.local-dark-screen #modal-root .combat-result .result-item :is(.result-item-footer,.result-item-footer span,.result-item-footer small,.result-item-meta>span:last-child){color:#4b5845!important;}
html.local-dark-screen #modal-root .combat-result .result-item .result-item-meta>span:first-child{color:#665b45!important;}
html.local-dark-screen #modal-root .combat-result .result-item.rarity-uncommon .result-item-meta>span:first-child{color:#456646!important;}
html.local-dark-screen #modal-root .combat-result .result-item.rarity-rare .result-item-meta>span:first-child{color:#35617c!important;}
html.local-dark-screen #modal-root .combat-result .result-item.rarity-epic .result-item-meta>span:first-child{color:#70547e!important;}
html.local-dark-screen #modal-root .combat-result .result-item.rarity-legendary .result-item-meta>span:first-child{color:#79541c!important;}
html.local-dark-screen .battle-inspection.winter-masquerade-profile>header{background:linear-gradient(108deg,#d9ded3,#ced7ca);}
html.local-dark-screen .battle-inspection :is(.winter-trail-kept,.winter-trail,.winter-hearth,.winter-riddle,.winter-hearth-closed){filter:brightness(.85);color-scheme:light;}

/* Trading tray is mounted beside the bag, outside modal-root. */
html.local-dark-screen #app .trade-select{--tr-ink:#dce7f2;background:linear-gradient(#293b52,#1d2a3c)!important;color:#dce7f2!important;border-color:#718598!important;box-shadow:0 -8px 26px #07101b55,inset 0 1px 0 #afc8dd22!important;}
html.local-dark-screen .trade-select .ts-grip{background:transparent!important;}
html.local-dark-screen .trade-select .ts-grip::before,
html.local-dark-screen .trade-select .ts-grip::after{background-color:#9eafbf!important;}
html.local-dark-screen .trade-select .ts-head>b{color:#edf1f7!important;white-space:normal!important;text-wrap:balance;line-height:1.25;}
html.local-dark-screen .trade-select :is(.ts-help,.ts-close,.ts-count){background:#30465b!important;color:#dce7f2!important;border-color:#718598!important;box-shadow:inset 0 1px 0 #afc8dd22!important;}
html.local-dark-screen .trade-select .ts-count i{color:#edcc95!important;}
html.local-dark-screen .trade-select .ts-hint{background:#253347!important;color:#bdccdf!important;border-color:#60758c!important;}
html.local-dark-screen .trade-select :is(.ts-form label>span,.ts-qty-label){color:#d2dfec!important;}
html.local-dark-screen .trade-select :is(.ts-form em,.ts-qty-label em){color:#b8c6da!important;}
html.local-dark-screen .trade-select :is(input,textarea,.ts-money,.ts-step){background:#253347!important;color:#dce7f2!important;border-color:#60758c!important;caret-color:#edcc95;}
html.local-dark-screen .trade-select :is(input,textarea)::placeholder{color:#afc2d7!important;opacity:1;}
html.local-dark-screen .trade-select :is(.ts-money input,.ts-step input){background:transparent!important;box-shadow:none!important;-webkit-text-fill-color:#dce7f2!important;}
html.local-dark-screen .trade-select .ts-step button{background:#30465b!important;color:#dce7f2!important;border-color:#718598!important;box-shadow:inset 0 1px 0 #afc8dd22!important;}
html.local-dark-screen .trade-select .ts-foot button[data-ts=cancel],
html.local-dark-screen #world .trade-mini-actions .trade-cancel{background:linear-gradient(#8b4849,#6d363d)!important;color:#fff4ed!important;border-color:#b58083!important;text-shadow:none!important;}
html.local-dark-screen .trade-select .ts-foot .trade-buy{background:linear-gradient(#3d7465,#305e52)!important;color:#fff8ec!important;border-color:#7c9e8c!important;box-shadow:inset 0 1px 0 #d9e8ca33!important;}
html.local-dark-screen .trade-select .ts-card .relic-card{filter:brightness(.80)!important;color-scheme:light;}
html.local-dark-screen .trade-select .ts-remove{background:#30465b!important;border-color:#718598!important;}
html.local-dark-screen .trade-select .ts-remove i::before,
html.local-dark-screen .trade-select .ts-remove i::after{background:#f0b29f!important;}

/* Own offers, incoming proposals and returned items share the same surfaces. */
html.local-dark-screen #world :is(.trade-mini,.trade-proposal){background:#253347!important;color:#dce7f2!important;border-color:#60758c!important;box-shadow:none!important;}
html.local-dark-screen #world :is(.trade-mini-copy,.trade-mini-actions){background:transparent!important;color:#d2dfec!important;border-color:#536981!important;}
html.local-dark-screen #world :is(.trade-mini-copy .trade-lot-note-text,.trade-proposal p,.trade-proposal-head,.trade-inline-head h4,.trade-deals-empty b){color:#d2dfec!important;}
html.local-dark-screen #world :is(.trade-proposal-head small,.trade-deals-empty p,.trade-inline-head small){color:#bdccdf!important;}
html.local-dark-screen #world .trade-meta-item{background:#30465b!important;border-color:#60758c!important;color:#c4ddcb!important;}
html.local-dark-screen #world .trade-meta-item.is-price{color:#edcc95!important;}
html.local-dark-screen #world .trade-meta-item b{color:inherit!important;}
html.local-dark-screen #world .trade-mini .trade-lot-art{filter:brightness(.80);}
html.local-dark-screen #world .trade-mini .trade-lot-art .relic-card{filter:none!important;}
html.local-dark-screen #world .trade-inline-head .trade-count{background:#30465b!important;color:#edcc95!important;border-color:#60758c!important;}
html.local-dark-screen .trade-select .ts-tip{background:#253347!important;color:#dce7f2!important;border-color:#718598!important;box-shadow:0 6px 20px #07101b55!important;}
html.local-dark-screen .trade-select .ts-tip :is(b,p){color:#d2dfec!important;}
html.local-dark-screen .trade-select .ts-tip::before,
html.local-dark-screen .trade-select .ts-tip::after{background-color:#253347!important;border-color:#718598!important;}

/* Local exchange: surfaces follow the theme; native item paper is dimmed once. */
html.local-dark-screen #modal-root .trade-exchange-sheet :is(.xc-side,.xc-item,.xc-edit){background:#253347!important;border-color:#61788f!important;color:#dce7f2!important;}
html.local-dark-screen #modal-root .trade-exchange-sheet :is(.xc-side h4,.xc-item>b){color:#e0e9f2!important;}
html.local-dark-screen #modal-root .trade-exchange-sheet :is(.xc-ok,.xc-empty,.xc-status,.xc-gold small){color:#becbd9!important;}
html.local-dark-screen #modal-root .trade-exchange-sheet .xc-side.is-ok{border-color:#85b799!important;box-shadow:0 0 0 1px #85b79955!important;}
html.local-dark-screen #modal-root .trade-exchange-sheet .xc-side.is-ok .xc-ok{color:#b9dfc5!important;}
html.local-dark-screen #modal-root .trade-exchange-sheet .xc-fan{background:radial-gradient(ellipse at 50% 100%,#3b4e60,#293a4f 70%)!important;}
html.local-dark-screen #modal-root .trade-exchange-sheet :is(.xc-gold-edit,.xc-icon-btn,.xc-x,.num-step,.num-step button){background:#30445c!important;border-color:#718598!important;color:#dce7f2!important;}
html.local-dark-screen #modal-root .trade-exchange-sheet :is(.xc-gold-edit input,.num-step input){background:transparent!important;color:#f0d39a!important;}
html.local-dark-screen #modal-root .trade-exchange-sheet :is(.xc-interest,.xc-lot-row){background:linear-gradient(#2c4054,#253747)!important;border-color:#728978!important;color:#dce7f2!important;}
html.local-dark-screen #modal-root .trade-exchange-sheet :is(.xc-interest-copy>small,.xc-lot-copy>b){color:#dce7f2!important;}
html.local-dark-screen #modal-root .trade-exchange-sheet :is(.xc-coins,.xc-gold){color:#efcc89!important;}
html.local-dark-screen #modal-root .trade-exchange-sheet .xc-coins{background:#374a59!important;border-color:#8f876e!important;}
html.local-dark-screen #modal-root .trade-exchange-sheet .xc-lot-meta small{color:#becbd9!important;}
html.local-dark-screen #modal-root .trade-exchange-sheet .xc-foot{background:#1d2b3d!important;}
html.local-dark-screen #modal-root .trade-exchange-sheet .trade-cancel{background:linear-gradient(#a65049,#783b38)!important;color:#fff0e9!important;border-color:#bb8279!important;}
html.local-dark-screen #modal-root .trade-exchange-sheet .trade-buy{background:linear-gradient(#427969,#2b594f)!important;color:#fff8e7!important;border-color:#80aa96!important;}
html.local-dark-screen #modal-root .trade-exchange-sheet .xc-sheet{background:linear-gradient(#293b52,#1d2a3c)!important;border-color:#718598!important;color:#dce7f2!important;color-scheme:dark;}
html.local-dark-screen #modal-root .trade-exchange-sheet :is(.xc-sheet-title,.xc-sheet-close,.trade-none){color:#dce7f2!important;}
html.local-dark-screen #modal-root .trade-exchange-sheet .xc-sheet-close{background:#30445c!important;border-color:#718598!important;}
html.local-dark-screen #modal-root .trade-exchange-sheet .xc-sheet-grip{background:transparent!important;}
html.local-dark-screen #modal-root .trade-exchange-sheet .xc-sheet-grip::before{background:#a7bacb!important;}
html.local-dark-screen #modal-root .trade-exchange-sheet .xc-lot-row.is-on{background:linear-gradient(#365a54,#29453f)!important;border-color:#8bbca4!important;}
html.local-dark-screen #modal-root .trade-exchange-sheet .xc-lot-state{background:#427467!important;color:#edf8ef!important;}
html.local-dark-screen #modal-root .trade-exchange-sheet .relic-card{filter:brightness(.80)!important;}
html.local-dark-screen #modal-root .trade-exchange-sheet :is(.mini-real,.lot-fan-card,.xc-interest-anim,.xc-lot-anim){filter:none!important;}
html.local-dark-screen #modal-root .trade-exchange-sheet .xc-card-x{background:#30445c!important;border-color:#718598!important;}
html.local-dark-screen #modal-root .trade-exchange-sheet .xc-card-x i::before,html.local-dark-screen #modal-root .trade-exchange-sheet .xc-card-x i::after{background:#efb6a8!important;}

/* Every explicit dark-theme selection gets the same calm, animated beta preview. */
.local-theme-beta{width:min(360px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow-y:auto;animation:local-beta-appear .28s cubic-bezier(.2,.8,.2,1) both;}
.local-theme-beta::backdrop{animation:local-beta-backdrop .28s ease both;}
.local-theme-beta .theme-beta-preview{position:relative;display:block;height:82px;border:1px solid #7691a3;border-radius:12px;margin:0 0 17px;background:linear-gradient(130deg,#d9d4c2 0 46%,#344b63 47% 100%);box-shadow:inset 0 1px 5px #0e1e2b44;overflow:hidden;}
.theme-beta-preview>i,.theme-beta-preview>span,.theme-beta-preview>b,.theme-beta-preview>em{position:absolute;display:block;border-radius:5px;left:15px;right:15px;height:7px;top:17px;background:linear-gradient(90deg,#4a665a 46%,#d1e1ea 47%);opacity:.85;}
.theme-beta-preview>span{top:33px;right:40%;height:5px;}.theme-beta-preview>b{top:48px;left:15px;right:53%;height:20px;background:#486b5c;}.theme-beta-preview>em{top:48px;left:53%;right:15px;height:20px;background:#527c79;}
.theme-beta-preview::after{content:'';position:absolute;inset:0;background:linear-gradient(110deg,transparent 30%,#e0f3ff22 48%,transparent 65%);transform:translateX(-100%);animation:local-beta-shimmer 1.8s .25s ease both;pointer-events:none;}
@keyframes local-beta-appear{from{opacity:0;transform:translateY(12px) scale(.97)}to{opacity:1;transform:none}}
@keyframes local-beta-backdrop{from{opacity:0}to{opacity:1}}
@keyframes local-beta-shimmer{to{transform:translateX(100%)}}
@media(prefers-reduced-motion:reduce){.local-theme-beta,.local-theme-beta::backdrop,.theme-beta-preview::after{animation:none!important;}}
.reduced-motion .local-theme-beta,.reduced-motion .theme-beta-preview::after{animation:none!important;}
