/* =====================================================================================================================
   The workshop (ART_STYLE.md section 9): riveted iron plates, Rye and Rubik, potion green accent, hazard-stripe primary.
   Linked after every other stylesheet, so it wins ties: it re-points the site's colour tokens at the workshop palette
   and re-skins the shared pieces every window is built from (buttons, chips, windows, headings, fields, the home HUD).
   workshop-panels.css does the floating bits round the page, workshop-arena.css Goblin Arena's menus.
   Fonts: Rye and Rubik (both SIL Open Font License), self-hosted in /fonts, latin only.
   ===================================================================================================================== */
@font-face { font-family: "Rye"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/rye-latin.woff2") format("woff2"); }
@font-face { font-family: "Rubik"; font-style: normal; font-weight: 300 900; font-display: swap; src: url("/fonts/rubik-latin.woff2") format("woff2"); }

:root {
  /* the workshop's own tokens */
  --wk-ink: #0a0612; --wk-iron: #2a2e36; --wk-iron2: #3a4048; --wk-deep: #15181e; --wk-well: #1a1e26;
  --wk-brass: #f2b632; --wk-potion: #7aff2a; --wk-cyan: #2ae0ff; --wk-magenta: #ff3ac0; --wk-red: #ff3a1a; --wk-amber: #ff9a2a; --wk-paper: #f0ece0;
  /* a plate is case-hardened iron: a soft sheen, the faint mottled metal tile, then the iron gradient (ART_STYLE 9) */
  --wk-sheen: linear-gradient(115deg, transparent 15%, rgba(255, 255, 255, 0.08) 38%, rgba(255, 255, 255, 0.02) 46%, rgba(255, 255, 255, 0.056) 55%, transparent 80%);
  --wk-metal: url("/img/metal-plate.svg");
  --wk-plate: var(--wk-sheen), var(--wk-metal), linear-gradient(170deg, var(--wk-iron2), var(--wk-iron));
  --wk-drop: inset 0 2px 0 rgba(255, 255, 255, 0.12), 0 6px 0 var(--wk-ink);
  --wk-drop-sm: inset 0 2px 0 rgba(255, 255, 255, 0.1), 0 4px 0 var(--wk-ink);
  --wk-rivet: radial-gradient(circle at 35% 35%, #c8c8c8, #5a5a5a);
  --wk-rivet-dot: radial-gradient(circle at 40% 40%, #d8d8d8 0, #5a5a5a 3.6px, var(--wk-ink) 4px 5.6px, transparent 6px);
  --wk-hazard: repeating-linear-gradient(135deg, var(--wk-brass) 0 14px, var(--wk-ink) 14px 22px);
  --wk-stripes: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.02) 0 2px, transparent 2px 14px);
  --f-head: "Rye", serif;
  --f-ui: "Rubik", system-ui, sans-serif;
  /* the site's older tokens, pointed at the workshop (so every file above follows without being rewritten) */
  --swamp-0: #0e1016; --swamp-1: #15181e; --swamp-2: #2a2e36;
  --skin: #9ad86a; --skin-dark: #3a4048; --bile: var(--wk-potion); --torch: var(--wk-amber); --gold: var(--wk-brass);
  --ink: var(--wk-paper); --ink-dim: rgba(240, 236, 224, 0.62); --ink-soft: rgba(240, 236, 224, 0.78);
  --grease: linear-gradient(90deg, var(--wk-potion), var(--wk-potion));
  --surface: var(--wk-plate); --surface-2: rgba(255, 255, 255, 0.04); --surface-3: rgba(10, 6, 18, 0.45);
  --line: rgba(10, 6, 18, 0.9); --line-soft: rgba(255, 255, 255, 0.08); --line-strong: var(--wk-brass);
  --glow: var(--wk-drop); --lift: 0 4px 0 var(--wk-ink);
}

/* ---------- the page: dark iron with faint stripes, no swamp ---------- */
body { font-family: var(--f-ui); font-weight: 500; color: var(--wk-paper); background: #0e1016 var(--wk-stripes); }
.cave { background: radial-gradient(ellipse at 50% -20%, rgba(255, 154, 42, 0.1), transparent 55%), radial-gradient(ellipse at 50% 120%, rgba(42, 224, 255, 0.05), transparent 60%), #0e1016 var(--wk-stripes); }
.cave::after { display: none; }
.torch { background: radial-gradient(circle, rgba(255, 154, 42, 0.14), rgba(255, 154, 42, 0.04) 40%, transparent 70%); }
.slime { display: none; }
::selection { background: rgba(122, 255, 42, 0.35); color: #fff; }
a { color: var(--wk-brass); }

/* ---------- the masthead ---------- */
header { padding-top: 34px; }
h1 {
  font-family: var(--f-head); font-weight: 400; font-size: clamp(40px, 9vw, 96px); letter-spacing: 0.01em;
  background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--wk-potion); animation: none;
  filter: none; text-shadow: 0 0 22px rgba(122, 255, 42, 0.45), 4px 4px 0 var(--wk-ink); transform: rotate(-2deg);
}
.subtitle { border-radius: 8px; border: 3px solid var(--wk-ink); background: var(--wk-plate); box-shadow: var(--wk-drop-sm); color: #9aa8b8; font-weight: 500; letter-spacing: 0.04em; }
.subtitle b { color: var(--wk-brass); font-weight: 800; }
.ticker { border-top: 3px dashed var(--wk-ink); border-bottom: 3px dashed var(--wk-ink); }
.ticker span { color: var(--wk-brass); font-weight: 800; letter-spacing: 0.12em; }
footer { color: #9aa8b8; border-top-color: var(--wk-ink); }

/* ---------- headings: Rye in brass with a dashed ink rule ---------- */
.shopcard h2, .gate h2, #homeboard h3, .bellcard h3, .gu-head h2, #soundboard .sbhead h2, #modes .sbhead h2 {
  font-family: var(--f-head); font-weight: 400; color: var(--wk-brass); text-shadow: 3px 3px 0 var(--wk-ink);
}
.shopcard h2 { font-size: clamp(26px, 5vw, 38px); padding-bottom: 8px; margin-bottom: 12px; border-bottom: 3px dashed var(--wk-ink); }
.shopcard h3 { color: var(--wk-brass); font-weight: 800; }
.shopcard h4 { color: #c8cfd8; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; font-size: 13px; }

/* ---------- the plate: every window, card and chip ---------- */
.shopcard, .gate, .bellcard, #homeboard .hbcard, #whoami.hud {
  background: var(--wk-plate), var(--wk-iron); border: 3px solid var(--wk-ink); border-radius: 10px; box-shadow: var(--wk-drop); position: relative;
}
.shopcard::before { display: none; }
/* (a rivet in each top corner) */
.shopcard::after, .gate::after, #whoami.hud::after, #homeboard .hbcard::after {
  content: ""; position: absolute; top: 7px; left: 7px; right: 7px; height: 12px; pointer-events: none; z-index: 1;
  background: var(--wk-rivet-dot) left center / 12px 12px no-repeat, var(--wk-rivet-dot) right center / 12px 12px no-repeat;
}
.shopcard { padding: 26px 22px 24px; }
.shopclose {
  width: 40px; height: 40px; border-radius: 8px; border: 3px solid var(--wk-ink); background: var(--wk-plate); color: var(--wk-paper);
  box-shadow: var(--wk-drop-sm); font-weight: 800; top: 14px; right: 26px;
}
.shopclose:hover { color: var(--wk-ink); background: var(--wk-brass); border-color: var(--wk-ink); transform: rotate(-3deg); }

/* ---------- buttons: iron plates, uppercase, a degree off square; the primary is hazard stripes ---------- */
.gob {
  font-family: var(--f-ui); font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--wk-paper);
  font-size: var(--fs, 14px); min-height: 44px; border-radius: 10px; border: 3px solid var(--wk-ink);
  background: var(--wk-plate); box-shadow: var(--wk-drop-sm), inset 5px 0 0 var(--edge, var(--wk-brass));
  text-shadow: 1px 1px 0 var(--wk-ink); rotate: calc(var(--tilt, 0deg) * 0.4);
}
.gob::before { display: none; }
.gob:hover { filter: brightness(1.12); transform: translateY(-2px); animation: none; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.12), 0 6px 0 var(--wk-ink), inset 5px 0 0 var(--edge, var(--wk-brass)); }
.gob:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--wk-ink), inset 5px 0 0 var(--edge, var(--wk-brass)); }
.gob:focus-visible { outline: 3px solid var(--wk-potion); outline-offset: 3px; }
.gob.fresh { outline: 3px solid var(--wk-potion); }
/* (the label rides on an iron pill in the middle of the stripes) */
.gob.hoard, a.gob.hoard {
  --edge: var(--wk-ink); color: var(--wk-paper); text-shadow: none; padding: 12px 24px; box-shadow: var(--wk-drop-sm);
  background: linear-gradient(var(--wk-well), var(--wk-well)) center / calc(100% - 22px) calc(100% - 14px) no-repeat, var(--wk-hazard);
}
.gob.hoard:hover { box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.12), 0 6px 0 var(--wk-ink); }
.gob.hoard:active { box-shadow: 0 1px 0 var(--wk-ink); }
.gob .trinket { filter: none; }
#channels .gob.active { outline: 3px solid var(--wk-potion); outline-offset: 2px; box-shadow: 0 0 18px rgba(122, 255, 42, 0.45), 0 4px 0 var(--wk-ink), inset 5px 0 0 var(--wk-potion); }
#channels .gob.active::before { display: none; }

.chip {
  font-family: var(--f-ui); font-weight: 800; letter-spacing: 0.5px; color: var(--wk-paper); min-height: 40px; padding: 8px 14px;
  border-radius: 8px; border: 3px solid var(--wk-ink); background: var(--wk-plate); box-shadow: var(--wk-drop-sm);
}
.chip:not(.locked):not(:disabled):hover { border-color: var(--wk-ink); transform: translateY(-1px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.12), 0 5px 0 var(--wk-ink); filter: brightness(1.12); }
.chip:not(.locked):not(:disabled):active { transform: translateY(3px); box-shadow: 0 1px 0 var(--wk-ink); }
.chip.on, .chip.hoard { background: var(--wk-potion); color: var(--wk-ink); border-color: var(--wk-ink); text-shadow: none; }
.chip.hoard { color: var(--wk-paper); text-shadow: none; padding: 10px 22px; background: linear-gradient(var(--wk-well), var(--wk-well)) center / calc(100% - 18px) calc(100% - 12px) no-repeat, var(--wk-hazard); }
.chip.hoard:disabled { filter: grayscale(1); }
.chip.worn { outline: 3px solid var(--wk-potion); background: rgba(122, 255, 42, 0.14); }
.chip:disabled { opacity: 0.45; }
button:focus-visible, .chip:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--wk-potion); outline-offset: 2px; }

/* segmented tabs: an ink well with the picked one lit green */
.mkttabs, .htabs, .invtabs, .chaltabs { border-radius: 10px; border: 3px solid var(--wk-ink); background: var(--wk-deep); padding: 4px; }
.mkttabs button, .htabs .chip, .invtabs button, .chaltabs button { border: 0; background: transparent; box-shadow: none; color: #c8cfd8; font-weight: 800; border-radius: 6px; }
.mkttabs button.on, .htabs .chip.on, .invtabs button.on, .chaltabs button.on { background: var(--wk-potion); color: var(--wk-ink); box-shadow: none; }

/* fields: dark wells with an ink rim */
input[type="number"], input[type="text"]:not(#search), select, textarea {
  font-family: var(--f-ui); font-weight: 500; border-radius: 8px; border: 3px solid var(--wk-ink); background: var(--wk-deep); color: var(--wk-paper);
  box-shadow: inset 0 0 0 2px #444a55; min-height: 40px;
}
input[type="number"]:focus, input[type="text"]:not(#search):focus, select:focus, textarea:focus { border-color: var(--wk-ink); box-shadow: inset 0 0 0 2px var(--wk-potion); }
#search { font-family: var(--f-ui); font-weight: 500; text-transform: none; color: var(--wk-paper); border-radius: 10px; border: 3px solid var(--wk-ink); background: var(--wk-deep); box-shadow: inset 0 0 0 2px #444a55, 0 4px 0 var(--wk-ink); }
#search::placeholder { color: #7a8494; font-family: var(--f-ui); }
#search:focus { border-color: var(--wk-ink); box-shadow: inset 0 0 0 2px var(--wk-potion), 0 4px 0 var(--wk-ink); }
#count b { color: var(--wk-brass); }

/* rules between rows; notes */
.hnote { color: #aab4c2; }
.odds { color: #9aa8b8; }
hr { border: 0; border-top: 3px dashed var(--wk-ink); }

/* bars (XP and friends): segmented green on an ink well */
.xpbar, .qbar { border: 3px solid var(--wk-ink); border-radius: 4px; background: var(--wk-deep); }
.xpfill, .qbar div { background: repeating-linear-gradient(90deg, var(--wk-potion) 0 10px, #4a9a2a 10px 14px); }
.xptext { color: var(--wk-paper); font-weight: 800; text-shadow: 1px 1px 0 var(--wk-ink); }
/* (the bar grows to fit its words inside the thick ink border, so they're never cut off) */
.xpbar { height: auto; min-height: 18px; }
.xptext { font-size: 11px; line-height: 16px; padding: 0 6px; white-space: nowrap; }
.bigxp .xpbar { height: auto; }
.bigxp .xptext { font-size: 13px; line-height: 22px; }
#whoami .hud-info .xpbar { height: auto; }

/* ---------- the login gate and the loader ---------- */
.gate { border-radius: 10px; padding: 34px 24px 30px; }
.gate .lock { filter: drop-shadow(3px 3px 0 var(--wk-ink)); }
.gate p { font-family: var(--f-ui); font-size: 17px; color: #aab4c2; }
/* (yer name in the HUD wraps rather than trailing off: a long one is all there to read) */
#whoami .hud-info .gname { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; line-height: 1.1; }
