/* =====================================================================
   SolRPG — DARK WOOD medieval skin (Kevon: "change all UI to be somewhat
   darker... small texts are almost invisible" + approved the dark market
   preview: "Do it for all windows! that's perfect what I saw on preview").

   Layers OVER theme-cozy.css (loaded after it) and flips the parchment
   palette to dark walnut + light cream text. theme-cozy.css itself is the
   ubuntu session's file and is deliberately left untouched — every change
   lives here, so removing this one <link> restores the parchment look.

   Structure:
   §1  palette flip (vars)
   §2  panels/pills: dark walnut behind the same Kenney wood frame
   §3  chrome painted tan by cozy (tabs/slots/inputs/bars/tiles) -> dark
   §4  cozy's parchment CONTRAST REMAPS neutralized — the inline colours
       main.js writes were authored for a dark theme, so on dark wood the
       ORIGINAL values are correct again (identity restores, cascade wins)
   §5  text cozy painted dark-walnut for parchment -> light cream
   ===================================================================== */

/* 1) Palette — same warm medieval family, flipped dark */
.ps1-theme {
  --ps1-ink:      #eadfc4;   /* light cream text */
  --ps1-ink-dim:  #b6a684;   /* warm sand muted — readable on dark wood */
  --ps1-gold:     #e8b64a;   /* warm gold headings */
  --ps1-cyan:     #6fb3e0;
  --ps1-green:    #7dbb54;
  --ps1-red:      #e0596a;
  --ps1-fill:     #1e1811;   /* dark walnut panel */
  --ps1-fill2:    #171209;   /* darker inset */
  --ps1-edge-lt:  #33281a;
  --ps1-edge-dk:  #0e0a06;
  --ps1-line:     #5a442a;   /* wood outline is now LIGHTER than the fill */
  --panel:#1e1811; --border:#5a442a; --ink:#eadfc4; --accent:#7dbb54;
  --cz-wood:#4a3722; --cz-woodlt:#8a5a2b; --cz-cream:#241c12; /* "cream" IS the panel/pill fill var — flipping it flips every surface that uses it */
}

/* 2) Panels: dark walnut inside the same Kenney frame. cozy's rule uses the
   frame's `fill` slice, which paints its own parchment centre OVER the css
   background — drop `fill` so the frame stays and OUR dark fill shows. */
.ps1-theme .ps1-panel, .ps1-theme .panel,
.ps1-theme #charPanel, .ps1-theme #statsPanel, .ps1-theme #invPanel,
.ps1-theme #bankPanel, .ps1-theme #stationPanel, .ps1-theme #vendorPanel, .ps1-theme #marketPanel,
.ps1-theme #builderPanel, .ps1-theme #debugPanel, .ps1-theme #inspectPanel, .ps1-theme #partyPanel,
.ps1-theme #patchPanel, .ps1-theme #aboutPanel, .ps1-theme #settingsOverlay .panel, .ps1-theme #bugPanel,
.ps1-theme #coinDialog {
  color: var(--ps1-ink) !important;
  background:#241c12 !important;
  border-image: url(/cozy/frame-med.png) 16 / 16px / 0 stretch !important;
  box-shadow: 0 6px 0 rgba(10,6,2,.6), 0 12px 26px rgba(0,0,0,.5) !important;
}
.ps1-theme #chatBox, .ps1-theme .bbPill { background:#241c12 !important; color:var(--ps1-ink) !important; border-color:var(--cz-wood) !important; }

/* 3) Chrome cozy hardcoded TAN -> dark wood */
/* tabs */
.ps1-theme .ps1-tab, .ps1-theme .chatTab, .ps1-theme #charPanel [data-tab] {
  color:var(--ps1-ink-dim) !important; background:#171209 !important; border-color:var(--cz-wood) !important;
}
.ps1-theme .ps1-tab.active, .ps1-theme .chatTab.active, .ps1-theme #charPanel [data-tab].active {
  color:var(--ps1-gold) !important; background:#2c2213 !important; box-shadow:inset 0 -3px 0 0 var(--ps1-gold) !important;
}
/* inventory / hotbar slots */
.ps1-theme .ps1-slot, .ps1-theme .hotslot, .ps1-theme .slot, .ps1-theme .hbSlot {
  background:#2a2013 !important; border-color:#5a442a !important;
  box-shadow:inset 0 2px 0 rgba(255,224,150,.08), 0 3px 0 rgba(0,0,0,.4) !important;
}
.ps1-theme .slot.empty { border-color:#3a2c1a !important; }
.ps1-theme .slot .qty, .ps1-theme .ps1-slot .qty { color:#f0e0bd !important; text-shadow:0 1px 2px #000 !important; }
/* inputs + chat log */
.ps1-theme #chatInput, .ps1-theme .ps1-input, .ps1-theme #nameInput, .ps1-theme #bugText, .ps1-theme #chatLog {
  background:#171209 !important; color:#eadfc4 !important; border-color:var(--cz-wood) !important;
}
.ps1-theme #chatInput::placeholder { color:#8a7a5c !important; }
.ps1-theme #coinDialog input[type=number] { background:#171209 !important; color:#eadfc4 !important; border-color:var(--cz-wood) !important; }
/* progress/skill bar tracks */
.ps1-theme .ps1-bar, .ps1-theme .skbar, .ps1-theme .recipe, .ps1-theme #xptrack {
  background:#171209 !important; border-color:var(--cz-wood) !important; box-shadow:inset 0 2px 0 rgba(0,0,0,.4) !important;
}
.ps1-theme .recipe { background:#241c12 !important; }
/* tannery steppers */
.ps1-theme .tqBig { background:#2a2013 !important; color:#eadfc4 !important; border-color:#5a442a !important; box-shadow:0 3px 0 #171209 !important; }
.ps1-theme .tanMult, .ps1-theme .tqvBig { color:#eadfc4 !important; }
.ps1-theme .tanArrow { color:#e0a050 !important; }
.ps1-theme .tanTime { color:#e0a050 !important; }
.ps1-theme .tanStock.ok { color:#9fe0b0 !important; }
.ps1-theme .tanStock.low { color:#ff8a95 !important; }
.ps1-theme .tanCollect .tanMult { color:#ffd166 !important; }
.ps1-theme .tanDown { color:#9fe0b0 !important; }
/* World Builder tool tiles */
.ps1-theme .btool { background:#2a2013 !important; color:#eadfc4 !important; border-color:#5a442a !important; }
.ps1-theme .btool .bvar { background:#171209 !important; color:#d9c9a5 !important; border-color:#4a3722 !important; }
.ps1-theme .btool.active { background:var(--cz-go) !important; color:#12300a !important; border-color:var(--cz-godk) !important; }
/* gear-stat box */
.ps1-theme .gearStats { background:#171209 !important; border-color:var(--cz-wood) !important; box-shadow:inset 0 2px 0 rgba(255,224,150,.06) !important; color:#d9c9a5 !important; }
.ps1-theme .gsRole, .ps1-theme .gsOff, .ps1-theme .gsDef { color:#d9c9a5 !important; }
.ps1-theme .statChip[data-stip="dmg"], .ps1-theme .statChip[data-stip="dps"],
.ps1-theme .statChip[data-stip="bleed"], .ps1-theme .statChip[data-stip="poison"], .ps1-theme .statChip[data-stip="burn"] { color:#ff8a95 !important; }
.ps1-theme .statChip[data-stip="heal"], .ps1-theme .statChip[data-stip="hps"], .ps1-theme .statChip[data-stip="lifesteal"] { color:#9fe0b0 !important; }
.ps1-theme .gsHi { color:#9fe0b0 !important; } .ps1-theme .gsMid { color:#e8b64a !important; }
/* fish-caught popup */
.ps1-theme #catchPop .catchInner { background:#241c12 !important; color:#eadfc4 !important; }
.ps1-theme #catchPop .muted { color:#b6a684 !important; }
/* drag handle */
.ps1-theme .dragbar { background:rgba(0,0,0,.3) !important; color:#b6a684 !important; }

/* 4) NEUTRALIZE cozy's parchment remaps: identity-restore the inline colours
   (they were authored for a dark UI and are correct again on dark wood). */
.ps1-theme [style*="color:#cdd9e5"], .ps1-theme [style*="color:#cdd6e4"], .ps1-theme [style*="color:#cdd3e0"],
.ps1-theme [style*="color:#dfe6f0"], .ps1-theme [style*="color:#e6eef5"], .ps1-theme [style*="color:#e6edf5"],
.ps1-theme [style*="color:#e8ebf4"] { color:#cdd9e5 !important; }
.ps1-theme [style*="color:#e7e1ff"], .ps1-theme [style*="color:#cdd6ff"] { color:#e7e1ff !important; }
.ps1-theme [style*="color:#9aa6b2"] { color:#9aa6b2 !important; }
.ps1-theme [style*="color:#8a93a8"] { color:#9aa6b2 !important; }
.ps1-theme [style*="color:#8a93a6"] { color:#9aa6b2 !important; }
.ps1-theme [style*="color:#8a93a3"] { color:#9aa6b2 !important; }
.ps1-theme [style*="color:#7f8aa0"] { color:#9aa0b2 !important; }
.ps1-theme [style*="color:#6f7990"] { color:#8a93a6 !important; }
.ps1-theme [style*="color:#9fb4c8"] { color:#9fb4c8 !important; }
.ps1-theme [style*="color:#9ec5ff"] { color:#9ec5ff !important; }
.ps1-theme [style*="color:#b8c0cb"], .ps1-theme [style*="color:#9fb0c0"] { color:#b8c0cb !important; }
/* gold family back to light gold */
.ps1-theme .coins { color:#ffd166 !important; }
.ps1-theme [style*="color:#ffd166"], .ps1-theme [style*="color:#ffd54a"], .ps1-theme [style*="color:#ffd23d"],
.ps1-theme [style*="color:#f0cc6e"], .ps1-theme [style*="color:#ffd98a"], .ps1-theme [style*="color:#ffe08a"],
.ps1-theme [style*="color:#e0b46a"], .ps1-theme [style*="color:#ffcf5a"] { color:#ffd166 !important; }
/* rarity colours back to the bright tier language */
.ps1-theme [style*="color:#b7c0cb"] { color:#b7c0cb !important; }
.ps1-theme [style*="color:#4ee06a"] { color:#4ee06a !important; }
.ps1-theme [style*="color:#3da5ff"] { color:#3da5ff !important; }
.ps1-theme [style*="color:#b65cff"] { color:#b65cff !important; }
.ps1-theme [style*="color:#ff9d9d"] { color:#ff9d9d !important; }
.ps1-theme [style*="color:#8fd6a0"] { color:#8fd6a0 !important; }
.ps1-theme [style*="color:#9fe0b0"] { color:#9fe0b0 !important; font-weight:inherit; }
.ps1-theme [style*="color:#9be3a8"], .ps1-theme #onlineRow { text-shadow:none !important; }
/* inspect / char / station / wiki spot-fixes cozy darkened */
.ps1-theme #inspBody2 [style*="color:#cdd9e5"] { color:#cdd9e5 !important; }
.ps1-theme #inspBody2 b[style*="color:#f0cc6e"] { color:#f0cc6e !important; }
.ps1-theme #charPanel [style*="color:#8a93a8"], .ps1-theme #charPanel [style*="color:#6f7990"] { color:#9aa6b2 !important; }
.ps1-theme #charPanel [style*="background:rgba(0,0,0"] [style*="color:#8a93a8"] { color:#9aa6b2 !important; }
.ps1-theme #charPanel [style*="background:rgba(0,0,0"] [style*="color:#6f7990"] { color:#8a93a6 !important; }
.ps1-theme #stationBody [style*="color:#a3701f"] { color:#e8b64a !important; }
.ps1-theme .recipe .top b { color:#ffd166 !important; }
.ps1-theme [style*="background:rgba(0,0,0"] [style*="color:#8a93a8"], .ps1-theme [style*="background:rgba(0,0,0"] [style*="color:#9aa6b2"],
.ps1-theme [style*="background:rgba(0,0,0"] [style*="color:#cdd9e5"], .ps1-theme [style*="background:rgba(0,0,0"] [style*="color:#cdd6e4"] { color:#cdd9e5 !important; }

/* 5) Text cozy painted DARK for parchment -> light cream */
.ps1-theme h1, .ps1-theme h2, .ps1-theme h3, .ps1-theme h4, .ps1-theme .ps1-title, .ps1-theme legend {
  color:var(--ps1-gold) !important; text-shadow:0 2px 3px rgba(0,0,0,.55) !important;
}
.ps1-theme .muted, .ps1-theme .ps1-sub { color:var(--ps1-ink-dim) !important; opacity:1 !important; }
.ps1-theme #settingsPanel .setSection label { color:var(--ps1-ink) !important; }
.ps1-theme #settingsPanel .setSection .setval { color:var(--ps1-ink-dim) !important; }
.ps1-theme #settingsPanel #setVer { color:var(--ps1-ink-dim) !important; }
.ps1-theme #settingsPanel .setTab { color:var(--ps1-ink) !important; background:#171209 !important; border-color:var(--cz-wood) !important; }
.ps1-theme #settingsPanel .setTab.active { color:#fff5e2 !important; background:var(--cz-woodlt) !important; }
.ps1-theme #aboutPanel p, .ps1-theme #patchPanel li { color:#d9c9a5 !important; }
.ps1-theme #bugHint, .ps1-theme #bugStatus { color:#d9c9a5 !important; }
.ps1-theme #partyCount { color:#b6a684 !important; }
.ps1-theme #nameOverlay .panel p { color:#d9c9a5 !important; }
.ps1-theme #nameErr { color:#ff8a95 !important; }
.ps1-theme #voiceRow label { color:#d9c9a5 !important; }
.ps1-theme .patchLabel { color:#e8b64a !important; border-bottom-color:rgba(180,150,100,.3) !important; }
.ps1-theme #builderPanel .muted, .ps1-theme #debugPanel .muted { color:#b6a684 !important; }
.ps1-theme #builderPanel #bSel { color:#eadfc4 !important; }
.ps1-theme #feed .panel { color:#eadfc4 !important; }
.ps1-theme #shptext { color:#f0e0bd !important; text-shadow:0 1px 2px #000 !important; }
.ps1-theme #chatSend:disabled { color:#8a7a5c !important; }
.ps1-theme #charPanel [data-slot][style*="opacity:.5"] { opacity:.6 !important; }
