/* =====================================================================
   ASHFALL UI (loaded last). A reskin only: layout, sizes, the dock and the
   sliding sheets stay as the earlier files set them.
   Look: a ruined town decades after the bombs. Rusted, scratched steel
   and worn leather panels with rivets, stained paper labels and tape,
   monochrome CRT readouts (amber and sickly green phosphor, faint
   scanlines), hazard stripes only here and there. Night: dark vignette.
   Textures are generated SVG noise and gradients, no image files.
   Fonts: Black Ops One (stencil headings), Special Elite (typed labels),
   Share Tech Mono (readouts), Barlow Semi Condensed (body, buttons).
   ===================================================================== */
@font-face { font-family: "Black Ops One"; font-weight: 400; src: url("node_modules/@fontsource/black-ops-one/files/black-ops-one-latin-400-normal.woff2") format("woff2"); font-display: block; }
@font-face { font-family: "Special Elite"; font-weight: 400; src: url("node_modules/@fontsource/special-elite/files/special-elite-latin-400-normal.woff2") format("woff2"); font-display: block; }
@font-face { font-family: "Share Tech Mono"; font-weight: 400; src: url("node_modules/@fontsource/share-tech-mono/files/share-tech-mono-latin-400-normal.woff2") format("woff2"); font-display: block; }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 500; src: url("node_modules/@fontsource/barlow-semi-condensed/files/barlow-semi-condensed-latin-500-normal.woff2") format("woff2"); font-display: block; }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; src: url("node_modules/@fontsource/barlow-semi-condensed/files/barlow-semi-condensed-latin-600-normal.woff2") format("woff2"); font-display: block; }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 700; src: url("node_modules/@fontsource/barlow-semi-condensed/files/barlow-semi-condensed-latin-700-normal.woff2") format("woff2"); font-display: block; }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 800; src: url("node_modules/@fontsource/barlow-semi-condensed/files/barlow-semi-condensed-latin-800-normal.woff2") format("woff2"); font-display: block; }

:root {
  --stencil: "Black Ops One", "Arial Black", sans-serif;
  --type: "Special Elite", "Courier New", monospace;
  --mono: "Share Tech Mono", "Consolas", monospace;
  --title: "Barlow Semi Condensed", "Arial Narrow", sans-serif;   /* buttons and small caps labels */
  --px: "Barlow Semi Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow Semi Condensed", "Arial Narrow", sans-serif;
  --toon: "Barlow Semi Condensed", "Arial Narrow", sans-serif;

  /* palette */
  --bg: #0f0d0a;
  --panel: #1a1612;
  --panel2: #241e18;
  --line: #3e342a;
  --text: #e6dcc4;            /* sun-bleached paper */
  --dim: #9a8e76;
  --accent: #d8732a;          /* rust orange */
  --gold: #ffb23a;            /* amber phosphor */
  --toxic: #9cff5a;           /* sickly green phosphor */
  --red: #b8301e;             /* old blood / boss rust red */
  --ink: #0a0806;
  --rust: #8a4318;

  /* rarities: read on dark rust */
  --r-normal: #bdb5a2;        /* SCRAP */
  --r-magic: #8fd45a;         /* SALVAGED */
  --r-rare: #6cc0ff;          /* PRISTINE */
  --r-epic: #ffb23a;          /* PRE-WAR */

  /* frames: rusted steel, amber phosphor when active */
  --bronze: inset 0 0 0 1px #070504, inset 0 0 0 2px #5a4a3a, inset 1px 1px 0 2px #8a7458, inset 0 0 0 3px #1c1610;
  --bronze-hi: inset 0 0 0 1px #070504, inset 0 0 0 2px #ffb23a, inset 1px 1px 0 2px #ffe2a0, inset 0 0 0 3px #3a2408;

  /* textures */
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .55 0'/></filter><rect width='120' height='120' filter='url(%23n)'/></svg>");
  --blotch: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='b'><feTurbulence type='fractalNoise' baseFrequency='.03' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .8 -.25'/></filter><rect width='220' height='220' filter='url(%23b)'/></svg>");
  --rustmap: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='r'><feTurbulence type='fractalNoise' baseFrequency='.06' numOctaves='4' seed='11' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .44  0 0 0 0 .2  0 0 0 0 .07  0 0 0 1.05 -.64'/></filter><rect width='180' height='180' filter='url(%23r)'/></svg>");
  --brush: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='40'><filter id='m'><feTurbulence type='fractalNoise' baseFrequency='.012 .8' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .14 0'/></filter><rect width='160' height='40' filter='url(%23m)'/></svg>");
  /* stains for paper labels */
  --stain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='60'><filter id='s'><feTurbulence type='fractalNoise' baseFrequency='.05' numOctaves='3' seed='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .35  0 0 0 0 .22  0 0 0 0 .08  0 0 0 1.2 -.55'/></filter><rect width='140' height='60' filter='url(%23s)'/></svg>");
  --scan: repeating-linear-gradient(0deg, rgba(0, 0, 0, .32) 0 1px, rgba(0, 0, 0, 0) 1px 3px);
  --hazard: repeating-linear-gradient(-45deg, #c8901a 0 7px, #14110d 7px 14px);
  --paper: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 45%, rgba(60, 30, 0, .14)), #cbbd98;
  --rivet: #a89a86 0 1.3px, #4a3e32 1.4px 2.2px, rgba(0, 0, 0, .75) 2.3px 2.9px, transparent 3.1px;
  --rivets:
    radial-gradient(circle at 9px 13px, var(--rivet)),
    radial-gradient(circle at calc(100% - 9px) 13px, var(--rivet)),
    radial-gradient(circle at 9px calc(100% - 9px), var(--rivet)),
    radial-gradient(circle at calc(100% - 9px) calc(100% - 9px), var(--rivet));
  --btn: linear-gradient(180deg, #4a3b2d 0%, #2f251b 52%, #1c1610 100%);
  --btn-on: linear-gradient(180deg, #8e4c1e 0%, #5e2e10 55%, #361806 100%);
}

html, body { background: #0a0806; }
body { font-family: var(--body); font-weight: 600; color: var(--text); -webkit-font-smoothing: antialiased; }
button { font-family: var(--px); }
#phone { background: #0f0d0a; }
#stage { background: #0b0907; }

/* ---------------------------------------------------------------- currency marks */
/* chits: a stamped scrap-brass token with a square hole */
i.chit, .floater.coin::after {
  content: ""; display: inline-block; flex: 0 0 auto; width: 13px; height: 13px; vertical-align: -2px;
  background:
    linear-gradient(#1a1209, #1a1209) center / 4px 4px no-repeat,
    radial-gradient(circle at 38% 34%, #ffe2a0 0 12%, rgba(255, 226, 160, 0) 34%),
    radial-gradient(circle, #e0a040 0 52%, #8a5418 56% 100%);
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
  filter: drop-shadow(0 1px 0 #000);
  font-style: normal;
}
i.chit { margin: 0 2px 0 1px; }
.chip i.chit { width: 14px; height: 14px; margin: 0; }
/* tubes: a salvaged radio valve, glowing green */
.corei {
  width: 8px !important; height: 13px !important; transform: none !important; border-radius: 4px 4px 1px 1px !important;
  background: linear-gradient(#5a5c54, #5a5c54) bottom / 100% 3px no-repeat, radial-gradient(ellipse at 50% 42%, #f0ffe0 0 14%, #9cff5a 34%, #2e5a1a 78%) !important;
  box-shadow: 0 0 0 1px #000, 0 0 7px rgba(156, 255, 90, .55) !important;
  filter: none !important; flex: 0 0 auto;
}

/* ---------------------------------------------------------------- arena overlay */
#hud { background: linear-gradient(rgba(8, 6, 4, .9) 0 55%, rgba(8, 6, 4, 0)); }
#floorBox small { font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: 2px; color: #b89a5a; }
#floorBox b { font-family: var(--mono); font-weight: 400; font-size: 26px; color: var(--gold); text-shadow: 0 0 8px rgba(255, 178, 58, .55), 0 2px 0 #000; }
#status { font-family: var(--mono); background: rgba(24, 14, 6, .92); border: 0; box-shadow: inset 0 0 0 1px #000, inset 0 0 0 2px var(--accent); color: #ffd8a8; }
#toast {
  font-family: var(--px); font-weight: 700; font-size: 15px; color: var(--text); border: 0;
  background: var(--hazard) top / 100% 3px no-repeat, var(--scan), var(--grain), rgba(14, 11, 8, .96);
  box-shadow: inset 0 0 0 1px #000, inset 0 0 0 2px #5a4a3a, 0 4px 14px rgba(0, 0, 0, .7);
  padding: 12px 12px 10px;
}

/* stage progress: stays thin, glows amber phosphor */
#enemyUnit .hp { background: #070604; box-shadow: 0 0 0 1px #000, 0 0 0 2px #4a3e32, 0 0 10px rgba(0, 0, 0, .8); }
#enemyUnit .hp i {
  background: linear-gradient(90deg, #8a5410, #ffb23a 85%, #ffe8b0) !important;
  box-shadow: 0 0 6px 1px rgba(255, 178, 58, .7), 0 0 14px 2px rgba(255, 140, 20, .28);
}
.unit.xpbar.bossing .hp i {
  background: linear-gradient(90deg, #5a0e06, #c8381e 85%, #ff9a7a) !important;
  box-shadow: 0 0 6px 1px rgba(200, 56, 30, .8), 0 0 14px 2px rgba(180, 30, 10, .4);
}

/* floating numbers: condensed caps, phosphor colours */
.floater { font-family: var(--px); font-weight: 800; letter-spacing: .3px; }
.floater.dmg { color: #efe6d0; }
.floater.crit { color: var(--gold); }
.floater.hurt { color: #ff6a4a; }
.floater.heal { color: var(--toxic); }
.floater.shield, .floater.block { color: #c8c4b4; }
.floater.burn { color: #ff9a3a; }
.floater.big { font-family: var(--stencil); font-weight: 400; color: var(--gold); letter-spacing: 1px; text-shadow: 0 2px 0 #000, 0 0 10px rgba(255, 178, 58, .45); }
.floater.coin { color: var(--gold); display: inline-flex; align-items: center; gap: 2px; width: auto !important; height: auto !important; background: none !important; box-shadow: none !important; border-radius: 0 !important; }
/* the menu's .big button styles must not dress the big floating banner */
.floater.big { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; height: auto !important; min-height: 0 !important; width: auto !important; }
.floater.core { color: var(--toxic); }
.floater.loot-normal { color: var(--r-normal); }
.floater.loot-magic { color: var(--r-magic); }
.floater.loot-rare { color: var(--r-rare); }
.floater.loot-epic { color: var(--r-epic); }

/* overhead health: sickly green for you (amber when low), rust red for the boss */
.ob { background: #0c0a06; box-shadow: 0 0 0 1px #000, 0 0 0 2px #4a3e32; }
.ob i { background: linear-gradient(#b8ff7a, #4ea82a) !important; box-shadow: 0 0 6px rgba(156, 255, 90, .45) !important; }
.ob.low i { background: linear-gradient(#ffd27a, #c87a10) !important; box-shadow: 0 0 6px rgba(255, 178, 58, .5) !important; }
.ob.boss { box-shadow: 0 0 0 2px #000, 0 0 0 4px #8a2a14, 0 0 0 6px #000; }
.ob.boss i { background: linear-gradient(#d8482a, #5a0e06) !important; box-shadow: 0 0 6px rgba(200, 56, 30, .5) !important; }
.ob u { background: #d8d0bc; }

/* the dark edges of the view: night, with a faint sick-green haze */
#stage::after {
  background:
    radial-gradient(ellipse 82% 64% at 50% 50%, rgba(0, 0, 0, 0) 42%, rgba(6, 5, 3, .58) 76%, rgba(2, 2, 1, .92) 100%),
    radial-gradient(ellipse 120% 60% at 50% 100%, rgba(80, 120, 30, .08), rgba(0, 0, 0, 0) 60%);
}

/* ---------------------------------------------------------------- panels: rusted riveted plate */
#panel, #dock, .screen.solid {
  background: var(--rivets), var(--rustmap), var(--grain), var(--stone), #1a1612 !important;
  background-size: auto, auto, auto, auto, 180px 180px, 120px 120px, 192px 192px, auto !important;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat, repeat, repeat, repeat !important;
}
/* a worn steel lip along the top of the sliding sheet, a short run of hazard paint */
#panel {
  background: linear-gradient(90deg, #000 0, #000 100%) 0 5px / 100% 1px no-repeat,
    linear-gradient(180deg, #6a5a48, #2e241a) 0 0 / 100% 5px no-repeat,
    var(--hazard) 12px 0 / 72px 5px no-repeat,
    var(--rivets), var(--rustmap), var(--grain), var(--stone), #1a1612 !important;
  background-size: 100% 1px, 100% 5px, 72px 5px, auto, auto, auto, auto, 180px 180px, 120px 120px, 192px 192px, auto !important;
  background-position: 0 5px, 0 0, 12px 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0 !important;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, repeat, repeat, repeat, repeat !important;
  padding-top: 12px;
  box-shadow: 0 -8px 18px rgba(0, 0, 0, .8);
}
#dock { box-shadow: inset 0 2px 0 #5a4a3a, inset 0 3px 0 #000, 0 -6px 14px rgba(0, 0, 0, .65); }
@media (min-width: 980px) {
  .side { background: var(--rustmap), var(--grain), var(--stone), #1a1612 !important; border-color: #33291f; }
  .side h2 { font-family: var(--stencil); font-weight: 400; font-size: 15px; letter-spacing: 2px; color: var(--gold); }
  #stats { background: var(--scan), rgba(8, 7, 5, .88); font-family: var(--mono); font-weight: 400; color: var(--gold); }
  #stats dt { color: #a88a4a; }
  #log li { background: rgba(8, 7, 5, .88); font-family: var(--mono); font-weight: 400; }
  #log li.good { color: var(--toxic); }
  #log li.bad { color: #ff7a5a; }
}

/* ---------------------------------------------------------------- buttons: worn leather-and-rust plates */
#dockBtns > button, #sheetClose, .plus, .skill .equip, #attrReset, #autoSell, .chip, .acts button, .crafts button,
.opt button, .back, #itemBody .x, button.big, .sheet .row button, #nodeInfo button, #prestige button, .clsPick button {
  background: var(--brush) top / 100% 4px no-repeat, var(--rustmap), var(--grain), var(--btn) !important;
  background-size: 100% 4px, 180px 180px, 120px 120px, auto !important;
  box-shadow: var(--bronze); color: var(--text); text-shadow: 0 1px 0 #000; border: 0;
}
.dbtn.on, .skill .equip.on, .opt button.on, #upgBtn.ready, .clsPick button.on, .acts .primary, button.big.primary {
  background: var(--brush) top / 100% 4px no-repeat, var(--grain), var(--btn-on) !important;
  box-shadow: var(--bronze-hi) !important; color: #fff2dc !important; text-shadow: 0 1px 0 #2a1004;
}
button:disabled:not(.on) { filter: saturate(.4) brightness(.8); }
/* the trader button squeezes the dock: smaller labels so they never touch */
#dockBtns:has(#choiceBtn:not([hidden])) .dbtn { font-size: 13px; letter-spacing: .5px; }
.dbtn { font-family: var(--title); font-weight: 800; font-size: 15px; letter-spacing: 1.5px; }
.dbtn i { background: var(--red); font-family: var(--mono); font-weight: 400; }
#dockBtns .icon img { filter: drop-shadow(1px 1px 0 #000); }
#upgBtn.ready::after { background: var(--toxic); box-shadow: 0 0 6px var(--toxic); }
.plus { color: var(--toxic) !important; font-family: var(--mono) !important; }
.plus:disabled { color: #5a5248 !important; }

/* level badge: a riveted plate with a phosphor readout */
#lvBadge {
  background: var(--scan), var(--grain), radial-gradient(circle at 50% 40%, #2a2218, #0e0b08 75%) !important;
  box-shadow: inset 0 0 0 1px #000, inset 0 0 0 3px #6a5a46, inset 0 0 0 4px #000, inset 0 0 0 6px #2e241a, inset 0 0 14px rgba(255, 178, 58, .12);
}
#lvBadge::before {
  content: ""; position: absolute; left: 6px; right: 6px; bottom: 6px; height: 4px; pointer-events: none;
  background: var(--hazard); opacity: .8;
}
#lvBadge small { font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: 2px; color: #b89a5a; }
#lvBadge b { font-family: var(--mono); font-weight: 400; font-size: 30px; color: var(--gold); text-shadow: 0 0 8px rgba(255, 178, 58, .6), 0 2px 0 #000; margin-bottom: 4px; }
#lvBadge.on { box-shadow: inset 0 0 0 1px #000, inset 0 0 0 3px var(--gold), inset 0 0 0 4px #000, inset 0 0 0 6px #2e241a, 0 0 0 2px var(--gold); }
#lvBadge i { background: var(--red); font-family: var(--mono); font-weight: 400; }
@keyframes apBlink { 50% { background: #d8732a; } }

/* XP bar: thin, sickly green phosphor glow */
#xpBar { background: #060504; box-shadow: 0 0 0 1px #000, 0 0 0 2px #3e342a; }
#xpFill {
  background: linear-gradient(90deg, #2a5a10, #9cff5a 85%, #e8ffd0) !important;
  box-shadow: 0 0 6px 1px rgba(156, 255, 90, .7), 0 0 14px 2px rgba(110, 220, 40, .3) !important;
}

/* ---------------------------------------------------------------- sheet head: stained paper label, taped on */
#sheetTitle, .sheet h3 {
  font-family: var(--type); font-weight: 400; font-size: 16px; letter-spacing: 1px; color: #241a10; text-shadow: none;
  padding: 4px 12px 2px; background: var(--stain), var(--grain), var(--paper); transform: rotate(-1.5deg);
  box-shadow: 0 2px 3px rgba(0, 0, 0, .6); position: relative;
}
#sheetTitle::before, .sheet h3::before {
  content: ""; position: absolute; left: 50%; top: -5px; width: 34px; height: 10px; margin-left: -17px; transform: rotate(3deg);
  background: linear-gradient(180deg, rgba(255, 255, 255, .25), rgba(255, 255, 255, .05)), rgba(200, 190, 150, .55);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .3);
}
.chip { font-family: var(--mono); font-weight: 400; color: var(--gold); text-shadow: 0 0 6px rgba(255, 178, 58, .4), 0 1px 0 #000; }
#sheetClose { font-family: var(--px); font-weight: 800; }

/* ---------------------------------------------------------------- bag and paper doll */
.bayHead { font-family: var(--stencil); font-weight: 400; letter-spacing: 1px; color: var(--gold); }
.bayHead::before { background: var(--accent); box-shadow: 0 0 0 1px #000; transform: none; }
.bayHead::after { height: 3px; background: repeating-linear-gradient(90deg, #4a3e32 0 6px, transparent 6px 10px); opacity: .8; }
.bayHead i { font-family: var(--mono); font-weight: 400; color: var(--dim); }
.bayHead #autoSell { font-family: var(--px); font-weight: 700; color: var(--text); }
.bayHead #sellZone {
  font-family: var(--stencil); font-weight: 400; letter-spacing: 1px; color: #ff9a6a; text-shadow: 0 1px 0 #000;
  background: linear-gradient(#170c08, #170c08) center / calc(100% - 8px) calc(100% - 8px) no-repeat, repeating-linear-gradient(-45deg, #8a2a14 0 5px, #14110d 5px 10px) !important;
  box-shadow: inset 0 0 0 1px #000 !important;
}

#doll {
  background-image: radial-gradient(60% 70% at 50% 55%, rgba(156, 255, 90, .04), transparent 70%), var(--grain), var(--blotch) !important;
  background-color: #0e0c09 !important;
  box-shadow: 0 0 0 2px #000, 0 0 0 4px #5a4a3a, 0 0 0 6px #000;
}
#doll::before { background: radial-gradient(40% 45% at 50% 40%, rgba(220, 200, 160, .05), transparent 70%); }
#doll .slot { background: #090705; box-shadow: inset 0 0 0 1px #000, inset 0 0 0 2px #2e261e, inset 0 0 10px rgba(0, 0, 0, .9); }
#doll .slot small { font-family: var(--mono); font-weight: 400; color: #7a6e58; }
#doll .slot .ghostIcon { filter: grayscale(1); opacity: .16; }
#doll .slot.dropHint { box-shadow: inset 0 0 0 2px var(--toxic); }
/* stats card: a little CRT readout */
.dollStats {
  font-family: var(--mono); font-weight: 400; color: #e0a040; text-shadow: 0 0 5px rgba(255, 178, 58, .35);
  background: var(--scan), radial-gradient(ellipse at 50% 40%, #1a1408, #070604 80%); box-shadow: inset 0 0 0 1px #000, inset 0 0 0 2px #3a3026;
  padding-left: 6px !important; justify-content: center;
}
.dollStats b { font-family: var(--mono); font-weight: 400; color: var(--gold); letter-spacing: 1px; }

#inv {
  background-color: #090705 !important;
  background-image: linear-gradient(#241e17 1px, transparent 1px), linear-gradient(90deg, #241e17 1px, transparent 1px), var(--grain) !important;
  box-shadow: 0 0 0 2px #000, 0 0 0 4px #5a4a3a, 0 0 0 6px #000;
}
#inv .tile.bagItem { background: color-mix(in srgb, var(--rc) 10%, #100d0a); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--rc) 45%, #1a1612); }
#inv .tile.bagItem.r-normal { background: #13100c; box-shadow: inset 0 0 0 2px #2c2620; }
#doll .tile { background: color-mix(in srgb, var(--rc) 8%, #100d0a); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 40%, #241e18); }
.tile { --rc: var(--r-normal); }
.tile.r-magic { --rc: var(--r-magic); }
.tile.r-rare { --rc: var(--r-rare); }
.tile.r-epic { --rc: var(--r-epic); }
.tile.new::before { font-family: var(--px); font-weight: 800; background: var(--toxic); color: #0c1404; }
.tile.up::after { border-bottom-color: var(--toxic); }
.foot.ok { background: rgba(156, 255, 90, .18); box-shadow: inset 0 0 0 2px #7ad83a; }
.foot.bad { background: rgba(184, 48, 30, .3); box-shadow: inset 0 0 0 2px #b8301e; }

/* ---------------------------------------------------------------- rows and slots */
.skill, .attr, .opt, .sslot, .spts, .derived, .cmp, .rankList li, #nodeInfo {
  background-image: var(--grain), var(--blotch) !important;
  background-size: 120px 120px, 220px 220px !important;
}
.skill, .attr, .opt { background-color: rgba(12, 10, 7, .9) !important; box-shadow: inset 0 0 0 1px #000, inset 0 0 0 2px #2e261e; }
.skill.learned { background-color: rgba(30, 20, 10, .92) !important; box-shadow: inset 0 0 0 1px #000, inset 0 0 0 2px #4a3e32, inset 4px 0 0 var(--accent); }
.skill.worn { box-shadow: inset 0 0 0 2px var(--gold), inset 4px 0 0 var(--gold) !important; }
.sicon { background: #070604; box-shadow: inset 0 0 0 2px #4a3e32; }
.stxt b { font-family: var(--px); font-weight: 800; color: var(--text); }
.stxt em { font-family: var(--mono); font-weight: 400; color: var(--gold); }
.stxt em i { color: var(--toxic); }
.stxt span { font-family: var(--px); font-weight: 600; color: var(--dim); }
.skill .equip { font-family: var(--title); font-weight: 800; letter-spacing: 1px; }
.sslot, .spts { background-color: #0a0806 !important; box-shadow: inset 0 0 0 1px #000, inset 0 0 0 2px #4a3e32; }
.sslot small, .spts small { font-family: var(--mono); font-weight: 400; color: var(--accent); }
.sslot b { font-family: var(--px); font-weight: 800; color: var(--text); }
.sslot.empty b { color: #6a6050; }
.spts b { font-family: var(--mono); font-weight: 400; color: #5a5248; }
.spts.has b { color: var(--toxic); text-shadow: 0 0 6px rgba(156, 255, 90, .5); }
.sgroup { font-family: var(--stencil); font-weight: 400; font-size: 13px; letter-spacing: 2px; color: var(--accent); }

/* character sheet */
.clsPick b { font-family: var(--stencil); font-weight: 400; letter-spacing: 1px; color: var(--text); }
.clsPick button.on b { color: #fff2dc; }
.clsPick small { font-family: var(--px); font-weight: 600; color: #a89c84; }
.clsPick button.on small { color: #ffe0c0; }
.apHead b { font-family: var(--mono); font-weight: 400; color: #5a5248; }
.apHead.has b { color: var(--toxic); text-shadow: 0 0 8px rgba(156, 255, 90, .5); }
.apHead span { font-family: var(--stencil); font-weight: 400; letter-spacing: 1px; color: var(--accent); }
.apHead small { font-family: var(--px); color: var(--dim); }
.attr .an b { font-family: var(--title); font-weight: 800; color: var(--text); letter-spacing: .5px; }
.attr .an small { font-family: var(--px); color: var(--dim); }
.attr .av { font-family: var(--mono); font-weight: 400; color: var(--gold); text-shadow: 0 0 6px rgba(255, 178, 58, .35); }
.derived { background-color: rgba(7, 6, 4, .88) !important; box-shadow: inset 0 0 0 1px #000, inset 0 0 0 2px #2e261e; font-family: var(--mono); }
.derived::after { content: none; }
.derived dt { color: #a88a4a; font-family: var(--mono); font-weight: 400; }
.derived dd { color: var(--gold); font-family: var(--mono); font-weight: 400; text-shadow: 0 0 5px rgba(255, 178, 58, .3); }
#attrReset { font-family: var(--title); font-weight: 800; letter-spacing: .5px; }

/* ---------------------------------------------------------------- item sheet and trader */
#itemSheet { background: rgba(0, 0, 0, .74); }
.sheet {
  background: linear-gradient(180deg, #6a5a48, #2e241a) top / 100% 5px no-repeat, var(--rivets), var(--rustmap), var(--grain), var(--stone), rgba(20, 16, 12, .98) !important;
  background-size: 100% 5px, auto, auto, auto, auto, 180px 180px, 120px 120px, 192px 192px, auto !important;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, repeat, repeat, repeat, repeat !important;
  box-shadow: 0 -6px 16px rgba(0, 0, 0, .75);
  padding-top: 14px;
}
.iname { font-family: var(--title); font-weight: 800; letter-spacing: .5px; }
.iname.r-normal { color: var(--r-normal); }
.iname.r-magic { color: var(--r-magic); }
.iname.r-rare { color: var(--r-rare); }
.iname.r-epic { color: var(--r-epic); text-shadow: 0 0 8px rgba(255, 178, 58, .35); }
.ibase { font-family: var(--mono); font-weight: 400; letter-spacing: 1px; color: var(--dim); }
#itemBody ul { font-family: var(--px); font-weight: 600; }
#itemBody li { color: #9ad86a; }
#itemBody li.imp { color: var(--text); }
#itemBody h5 { font-family: var(--stencil); font-weight: 400; letter-spacing: 2px; color: var(--accent); }
#itemBody details summary { color: var(--dim); font-family: var(--mono); }
.cmp { background-color: #070604 !important; background-image: var(--scan) !important; box-shadow: inset 0 0 0 1px #000, inset 0 0 0 2px #2e261e; font-family: var(--mono); font-weight: 400; color: #a88a4a; }
.cmp .pos { color: var(--toxic); }
.cmp .neg { color: #ff6a4a; }
.acts button { font-family: var(--title); font-weight: 800; letter-spacing: 1px; display: inline-flex; align-items: center; justify-content: center; gap: 2px; }
.acts .danger {
  background: var(--brush) top / 100% 4px no-repeat, var(--grain), linear-gradient(180deg, #7a1e10, #400a06) !important;
  box-shadow: inset 0 0 0 1px #000, inset 0 0 0 2px #b8301e !important; color: #ffe0d0 !important;
}
.crafts b { font-family: var(--title); font-weight: 800; letter-spacing: .5px; color: var(--text); }
.crafts small { font-family: var(--px); font-weight: 600; color: var(--dim); }
.crafts i { font-family: var(--mono); font-weight: 400; color: var(--gold); font-style: normal; }
.crafts i i.chit { margin-right: 2px; }
#itemBody .x { font-family: var(--px); font-weight: 800; color: #ffb090; }

.sheet h3 { display: inline-block; align-self: flex-start; transform: rotate(-1deg); }
.sheet h3 small { color: #3a2a18; font-family: var(--type); font-weight: 400; }
.card { background: rgba(12, 10, 7, .92); box-shadow: inset 0 0 0 1px #000, inset 0 0 0 2px #3a3026; }
.card .price {
  font-family: var(--mono); font-weight: 400; font-size: 15px; color: var(--gold); text-shadow: 0 0 6px rgba(255, 178, 58, .45);
  background: var(--scan), #0a0806; box-shadow: inset 0 0 0 1px #000, inset 0 0 0 2px #6a5a46; border: 0;
  display: flex; align-items: center; justify-content: center; gap: 3px;
}
.card.poor .price { color: #a8584a; text-shadow: none; box-shadow: inset 0 0 0 1px #000, inset 0 0 0 2px #3a3026; }
.card.sold .price { color: var(--dim); text-shadow: none; }
.upTag { color: var(--toxic); }
#rerollBtn { display: inline-flex; align-items: center; justify-content: center; gap: 2px; }
#choiceBtn { font-family: var(--title); font-weight: 800; color: var(--text); }
#choiceBtn.has { background: var(--btn-on) !important; box-shadow: var(--bronze-hi); }
#choiceBtn.has b { background: var(--gold); color: #140c00; }
#attrReset { display: inline-flex; align-items: center; justify-content: center; gap: 0; }
.vinfo li { color: #9ad86a; font-family: var(--px); font-weight: 600; }

/* ---------------------------------------------------------------- full pages */
.screen header {
  background: var(--grain), linear-gradient(#2e261d, #14100c) !important; border-bottom: 0;
  position: relative;
}
.screen header::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(#000, #4a3e32); pointer-events: none; }
.screen header h2 { font-family: var(--stencil); font-weight: 400; letter-spacing: 2px; color: var(--gold); text-shadow: 0 2px 0 #000; }
.back { font-family: var(--title); font-weight: 800; letter-spacing: 1px; }
.note { color: var(--dim); font-family: var(--type); font-weight: 400; }
.rankList li { background-color: rgba(10, 8, 6, .9) !important; box-shadow: inset 0 0 0 1px #000, inset 0 0 0 2px #2e261e; font-family: var(--px); font-weight: 700; }
.rankList li .n { color: var(--dim); font-family: var(--mono); font-weight: 400; }
.rankList li .f { color: var(--gold); font-family: var(--mono); font-weight: 400; }
.rankList li.me { background-color: rgba(30, 44, 12, .92) !important; outline: 2px solid var(--toxic); }
.rankList li.me .who { color: var(--toxic); }
.opt label { font-family: var(--title); font-weight: 800; letter-spacing: 1px; color: var(--text); }
.opt label small { font-family: var(--px); font-weight: 600; color: var(--dim); letter-spacing: 0; }
.opt button { font-family: var(--mono); font-weight: 400; }
.volBox b { font-family: var(--mono); font-weight: 400; color: var(--gold); }
.volBox input[type=range] {
  background: linear-gradient(90deg, #6aa83a 0, var(--toxic) var(--p, 50%), #070604 var(--p, 50%));
  box-shadow: 0 0 0 1px #000, 0 0 0 2px #4a3e32, 0 0 8px rgba(156, 255, 90, .22);
}
.volBox input[type=range]::-webkit-slider-thumb {
  background: var(--brush) top / 100% 3px no-repeat, linear-gradient(180deg, #8a7a62, #4a3e32); box-shadow: 0 0 0 2px #000, inset 0 0 0 1px #b8a888, 0 2px 4px #000;
}
.volBox input[type=range]::-moz-range-thumb { background: linear-gradient(180deg, #8a7a62, #4a3e32); box-shadow: 0 0 0 2px #000; }

#tree polyline { stroke: #3a3026; }
#tree polyline.on { stroke: var(--accent); }
.branch { font-family: var(--stencil); font-weight: 400; letter-spacing: 1px; color: var(--gold); background: #1a1612; }
.node { background: #0e0b08; box-shadow: var(--bronze); }
.node img { filter: none; }
.node span { font-family: var(--mono); font-weight: 400; background: #000; color: var(--dim); }
.node.owned { box-shadow: var(--bronze-hi); }
.node.can { box-shadow: inset 0 0 0 1px #000, inset 0 0 0 2px var(--toxic), 0 0 10px rgba(156, 255, 90, .45); }
.node.maxed { box-shadow: inset 0 0 0 1px #000, inset 0 0 0 2px var(--gold); }
.node.maxed span { color: var(--gold); }
#nodeInfo { background-color: rgba(10, 8, 6, .9) !important; box-shadow: inset 0 0 0 1px #000, inset 0 0 0 2px #2e261e; }
#nodeInfo .t { font-family: var(--stencil); font-weight: 400; color: var(--text); }
#nodeInfo .t i { color: var(--gold); font-family: var(--mono); font-style: normal; }
#nodeInfo p { font-family: var(--px); font-weight: 600; }
#nodeInfo p b { color: var(--toxic); }
#nodeInfo button, #prestige button { font-family: var(--title); font-weight: 800; letter-spacing: .5px; }
#prestige p { font-family: var(--px); font-weight: 600; color: var(--dim); }
#prestige button { color: #ffd0a8; }

/* main menu */
#screen-menu { background: linear-gradient(rgba(8, 6, 4, .7) 0%, rgba(8, 6, 4, .15) 24%, rgba(8, 6, 4, 0) 36%, #0f0d0a 40%) !important; }
.menuBody { border-top: 0 !important; background: var(--grain), var(--stone), #15120e !important; box-shadow: inset 0 2px 0 #4a3e32, inset 0 3px 0 #000; }
.logo { font-family: var(--stencil); }
.logo .l0 {
  width: 54px; height: 54px; border-radius: 50%; margin-bottom: 4px;
  background: radial-gradient(circle, #8fe04a 0 14%, rgba(0, 0, 0, 0) 15%),
    conic-gradient(rgba(0, 0, 0, 0) 0 30deg, #8fe04a 30deg 90deg, rgba(0, 0, 0, 0) 90deg 150deg, #8fe04a 150deg 210deg, rgba(0, 0, 0, 0) 210deg 270deg, #8fe04a 270deg 330deg, rgba(0, 0, 0, 0) 330deg);
  -webkit-mask: radial-gradient(circle, #000 0 15%, transparent 16% 25%, #000 26% 70%, transparent 71%);
  mask: radial-gradient(circle, #000 0 15%, transparent 16% 25%, #000 26% 70%, transparent 71%);
  filter: drop-shadow(0 0 2px rgba(156, 255, 90, .6));
  text-shadow: none; opacity: .85;
}
.logo .l1 {
  font-family: var(--stencil); font-weight: 400; font-size: 52px; letter-spacing: 4px; color: #e6dcc4;
  text-shadow: 0 3px 0 #000, 0 0 16px rgba(156, 255, 90, .25), 0 0 30px rgba(0, 0, 0, .9);
}
.logo small {
  font-family: var(--type); font-weight: 400; font-size: 14px; letter-spacing: 2px; color: #241a10; text-shadow: none;
  background: var(--stain), var(--grain), var(--paper); padding: 4px 10px 2px; transform: rotate(-1.5deg); box-shadow: 0 2px 4px rgba(0, 0, 0, .7);
}
#menuInfo { font-family: var(--mono); font-weight: 400; font-size: 15px; color: #a88a4a; }
#menuInfo b { color: var(--gold); font-weight: 400; text-shadow: 0 0 6px rgba(255, 178, 58, .4); }
button.big { font-family: var(--title); font-weight: 800; letter-spacing: 2px; }
.big i { color: var(--gold); font-family: var(--mono); font-weight: 400; font-style: normal; }
.big i.can { color: #0c1404; background: var(--toxic); }
.menuBody .foot { font-family: var(--type); color: #55493a; }

/* ---------------------------------------------------------------- small phones: keep labels on one line */
@media (max-width: 380px) {
  .dbtn { font-size: 13px; letter-spacing: .5px; }
  #sheetTitle { font-size: 14px; padding: 3px 9px 2px; }
  .logo .l1 { font-size: 44px; }
}
