/* Study Quest — base.css
 * v1 tokens + the shared components (frames, windows, modals, tooltips, buttons, inputs, money, item quality colours),
 * skinned in EMBER & IRON (docs/DESIGN.md — law for every visual decision). Load order:
 *   base.css → theme.css → hud.css → panels.css → world-ui.css → music-ui.css → codex.css
 * theme.css owns the --cx-* tokens, ornaments (--cx-orn-*), materials (--cx-bg-*) and the .codex-* / .ei-* components;
 * this file maps the v1 classes (.frame .window .modal .btn .input .tooltip) onto those materials so every module that
 * still builds v1 markup gets the same forged look. Custom properties resolve where they are used, so referencing
 * theme.css tokens from here is fine even though theme.css loads after this file.
 * The button plates are the design lead's 9-slice SVGs (same generator, work/art-skin/gen/plates.mjs), scoped to
 * .btn so nothing heavy is inherited from :root.
 */

:root {
  /* Typography — v1 roles mapped onto the Ember & Iron faces (DESIGN §13) */
  --font-display: var(--cx-font-head);       /* window & section titles → Cinzel */
  --font-title: var(--cx-font-title);        /* big titles, plates, level-up, zone names → Cinzel */
  --font-ui: var(--cx-font-label);           /* buttons, tabs, labels → Cinzel 700 */
  --font-body: var(--cx-font-body);          /* reading & UI text → Alegreya */
  --font-num: var(--cx-font-num);            /* tiny HUD numbers → Alegreya Sans */
  --font-flavor: var(--cx-font-flavor);      /* epigraphs → Cormorant Garamond italic */

  /* WoW-convention text colours (gameplay information — kept) */
  --c-gold: #ffd100;          /* quest/system yellow: information only, never decoration */
  --c-gold-dim: #c9a227;
  --c-white: #ffffff;
  --c-text: #ebe4d6;          /* = --cx-text (bone) */
  --c-muted: #aea89c;         /* = --cx-text-dim (ash) */
  --c-green: #1eff00;
  --c-red: #ff2020;
  --c-orange: #ff8040;
  --c-yellow: #ffff00;
  --c-grey: #808080;
  --c-xp: #94008c;            /* normal XP bar (classic purple) */
  --c-xp-rested: #0063e0;     /* rested XP bar (classic blue) */
  --c-system: #ffff00;        /* system message yellow */
  --c-guild: #40ff40;         /* guild chat green */
  --c-say: #ffffff;
  --c-combat: #e6d5a6;
  --c-xpmsg: #b98cff;

  /* Item quality */
  --q-poor: #9d9d9d;
  --q-common: #ffffff;
  --q-uncommon: #1eff00;
  --q-rare: #0070dd;
  --q-epic: #a335ee;
  --q-legendary: #ff8000;

  /* Frames (v1 names, Ember & Iron values) */
  --frame-bg: rgba(14, 16, 19, 0.95);
  --frame-bg-solid: #0e1013;
  --frame-border: #7a5229;          /* bronze-2 */
  --frame-border-hi: #e2b56a;       /* bronze-hi */
  --frame-inner: #202328;           /* iron-2 */
  --gilt-hair: rgba(176, 122, 60, 0.62);   /* legacy name: the bronze hairline */
  --gilt-faint: rgba(138, 145, 154, 0.16); /* legacy name: the cold steel lip */
  --parchment: #eadcbc;             /* vellum-3 */
  --parchment-dark: #dccaa3;        /* vellum-2 */
  --parchment-ink: #1d140c;         /* ink-text */
  --parchment-head: #7a1d10;        /* ink-rubric */

  --radius: 3px;
  --shadow: 0 16px 38px rgba(0, 0, 0, 0.7), 0 3px 8px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #07080a;
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}
/* selected text glows like a banked ember (never the system blue) */
::selection { background: rgba(226, 84, 31, 0.42); color: #fff4e0; }
.codex-vellum ::selection, .parchment ::selection { background: rgba(122, 29, 16, 0.24); color: inherit; }

button { font-family: inherit; }
input, select, textarea { font-family: var(--font-body); user-select: text; -webkit-user-select: text; }
:focus-visible { outline: 2px solid var(--cx-torch); outline-offset: 2px; }

/* Scrollbars: an iron rod in a charcoal groove */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.4); box-shadow: inset 0 0 0 1px rgba(176, 122, 60, 0.14); }
::-webkit-scrollbar-thumb { background: linear-gradient(90deg, #15171a, #5a6068 45%, #2a2e33 70%, #15171a); border: 1px solid #000; border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(90deg, #1b1d21, #7d848c 45%, #3a3f46 70%, #1b1d21); }
::-webkit-scrollbar-corner { background: transparent; }
.parchment ::-webkit-scrollbar-track, .sqp-parch .win-body::-webkit-scrollbar-track { background: rgba(70, 40, 14, 0.14); box-shadow: inset 0 0 0 1px rgba(70, 40, 14, 0.2); }

/* ---------------------------------------------------------------- Frames
 * .frame on its own = a small forged plate: smoked steel in a bronze hairline, a soot groove, a cold steel lip and
 * four iron cap corners (no padding change, so any module can wrap a box in it). Windows, dialogs and cards (below)
 * add the full frame: a hammered iron band, a bronze inner rim and thorned corner brackets. */
.frame {
  position: relative;
  color: var(--cx-text);
  background: var(--cx-bg-smoke);
  border: 1px solid var(--cx-line);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(196, 204, 214, 0.1), inset 0 0 0 1px var(--gilt-hair), inset 0 0 0 3px rgba(5, 5, 6, 0.85),
    inset 0 0 0 4px var(--gilt-faint), var(--cx-sh-2);
}
.frame::before {
  content: '';
  position: absolute;
  inset: 1px;
  background: var(--cx-caps);
  pointer-events: none;
  z-index: 5;
}
.frame::after { content: none; }

.parchment {
  background: var(--cx-bg-vellum);
  color: var(--cx-ink-text);
  box-shadow: var(--cx-vellum-burn);
}
.parchment h1, .parchment h2, .parchment h3 { color: var(--cx-ink-rubric); font-family: var(--font-display); font-weight: 700; }

/* ---------------------------------------------------------------- Windows
 * <div class="window frame"><div class="win-header"><span class="win-title codex-banner">…</span><button class="win-close codex-close">
 * A forged iron band (the header is its drag strip), thorned corners, a bronze inner rim with the recessed shadow,
 * the riveted title plate riding the top edge, the iron close boss top-right; the body is smoked steel. */
#window-layer { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
.window {
  position: absolute;
  pointer-events: auto;
  max-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
  min-width: 260px;
}
.window.frame, .modal.frame {
  padding: 0 var(--cx-band) var(--cx-band);
  background: var(--cx-bg-oak);
  border: 1px solid var(--cx-line);
  border-radius: var(--cx-r-2);
  box-shadow: var(--cx-sh-frame);
}
.window.frame::before, .modal.frame::before {
  /* four thorned iron brackets with bronze rivets */
  inset: -6px;
  background: var(--cx-corners);
  z-index: 6;
}
.window.frame::after, .modal.frame::after {
  /* the bronze inner rim in the iron band, framing the page, with the page's recessed shadow */
  content: '';
  position: absolute;
  top: calc(var(--cx-band) - 3px); right: calc(var(--cx-band) - 3px);
  bottom: calc(var(--cx-band) - 3px); left: calc(var(--cx-band) - 3px);
  border: 1px solid rgba(176, 122, 60, 0.7);
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(0, 0, 0, 0.8), 0 -1px 0 1px rgba(196, 204, 214, 0.06);
  pointer-events: none;
  z-index: 4;
}
.win-header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  height: calc(var(--cx-band) + 22px);
  padding: 0 calc(var(--cx-corner) + 30px);
  cursor: move;
  flex: none;
  z-index: 7;
}
/* the title plate (theme.css .codex-banner draws the riveted plaque; this is the fallback + placement) */
.win-title {
  position: relative;
  top: -15px;
  max-width: 100%;
  font-family: var(--cx-font-title);
  font-weight: 700;
  font-size: var(--cx-fs-banner);
  color: var(--cx-gold-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
/* long titles take a tighter cut so they fit their plate (ui-core adds the class from the title's length) */
.win-title.sq-title--long, .modal-title.sq-title--long { font-size: max(12px, calc(var(--cx-fs-banner) - 3px)); letter-spacing: 0.08em; }
.win-title.sq-title--xlong, .modal-title.sq-title--xlong { font-size: max(12px, calc(var(--cx-fs-banner) - 4px)); letter-spacing: 0.04em; }
.win-close {
  position: absolute;
  right: calc(var(--cx-corner) - 4px); top: 6px;
  width: 24px; height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--cx-bone);
  background: radial-gradient(circle at 38% 32%, #4d5258, #17191c 70%);
  box-shadow: 0 0 0 2px var(--cx-bronze-2), 0 0 0 3px #000;
  cursor: pointer;
}
.win-close.codex-close { right: calc(var(--cx-corner) - 4px); top: 6px; background: var(--cx-orn-close) center / 100% 100% no-repeat; box-shadow: none; }
.win-close.codex-close .icon { display: none; }
.win-close .icon { width: 12px; height: 12px; }
.win-close:hover { filter: brightness(1.25) drop-shadow(0 0 4px rgba(255, 138, 61, 0.6)); }
.win-close:active { transform: translateY(1px); }
.win-close:focus-visible { outline: none; filter: drop-shadow(0 0 1px #000) drop-shadow(0 0 3px var(--cx-torch)) drop-shadow(0 0 6px rgba(255, 120, 40, 0.7)); }
.win-body {
  position: relative;
  padding: 14px 16px 14px;
  overflow: auto;
  flex: 1;
  min-height: 0;
  border-radius: 2px;
  color: var(--cx-text);
  background: var(--cx-bg-smoke);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.75), inset 0 3px 12px rgba(0, 0, 0, 0.55);
  z-index: 1;
}

/* ---------------------------------------------------------------- Modals (dialogs): a forged card, title plate */
.modal-backdrop {
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at 50% 45%, rgba(7, 8, 10, 0.45), rgba(3, 3, 4, 0.78));
  display: grid; place-items: center;
  z-index: 1000;
  animation: fadeIn var(--cx-dur-quick) ease-out;
}
.modal {
  min-width: 320px;
  max-width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  display: flex; flex-direction: column;
  animation: cx-rise var(--cx-dur-calm) var(--cx-ease) both;
}
.modal.frame { padding-top: calc(var(--cx-band) + 4px); }
.modal-title {
  /* the riveted title plate riding over the top edge (same 9-slice plaque as .codex-banner) */
  position: relative;
  z-index: 7;
  align-self: center;
  box-sizing: border-box;
  max-width: calc(100% - 2 * var(--cx-corner));
  min-width: 160px;
  height: 46px;
  margin: calc(-15px - var(--cx-band) - 4px) 0 2px;
  padding: 8px 14px 14px;
  border-style: solid;
  border-color: transparent;
  border-width: 0 40px;
  border-image-source: var(--cx-orn-ribbon);
  border-image-slice: 0 40 fill;
  border-image-width: 0 40px;
  border-image-repeat: stretch;
  font-family: var(--cx-font-title);
  font-weight: 700;
  font-size: var(--cx-fs-banner);
  line-height: 24px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  color: var(--cx-gold-text);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.8), 0 1px 0 #000, 0 0 10px rgba(255, 140, 50, 0.2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: none;
}
.modal-body {
  position: relative;
  z-index: 1;
  padding: 12px 18px;
  overflow: auto;
  line-height: 1.5;
  font-size: var(--cx-fs-body);
  border-radius: 2px;
  background: var(--cx-bg-smoke);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.75), inset 0 3px 12px rgba(0, 0, 0, 0.55);
}
.modal-body p { margin: 0.4em 0; }
.modal-footer { position: relative; z-index: 1; display: flex; gap: 8px; justify-content: flex-end; padding: 10px 2px 2px; flex-wrap: wrap; }
@media (max-width: 560px), (max-height: 420px) {
  .modal-title { height: 36px; padding: 6px 8px 10px; line-height: 20px; border-width: 0 31px; border-image-width: 0 31px; min-width: 100px; margin-top: calc(-11px - var(--cx-band) - 4px); }
}
body.sq-compact .modal-title { height: 36px; padding: 6px 8px 10px; line-height: 20px; border-width: 0 31px; border-image-width: 0 31px; min-width: 100px; margin-top: calc(-11px - var(--cx-band) - 4px); }
/* Compact: windows fill the screen and stack exactly, so only the frontmost window's title plate shows (ui-core marks
   it .is-top), and the HUD zone label steps aside while a window covers the top edge (desktop pushes windows below it). */
body.sq-compact #window-layer > .window:not(.is-top) .win-title { visibility: hidden; }
body.sq-compact:has(#window-layer > .window) #hud .zl { visibility: hidden; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- Buttons (= .codex-btn family, DESIGN §6.3)
 * .btn = blackened iron plate, steel rim, bronze groove, bone carved letters; .btn-primary = the bevelled bronze plate
 * (the ONE main action of a view); .btn-danger = oxblood enamel in iron; .btn-ghost = text only. 9-slice border-image
 * plates keep their chamfers at any width; focus = an ember glow that follows the plate. */
.btn {
  /* every plate is declared once here (scoped to buttons) so variants and modules only switch references */
  --_p-iron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='36' viewBox='0 0 160 36'%3E%3Cdefs%3E%3ClinearGradient id='rm' gradientUnits='userSpaceOnUse' x1='0' y1='0' x2='0' y2='36'%3E%3Cstop offset='0' stop-color='%238a929c'/%3E%3Cstop offset='0.3' stop-color='%23454b53'/%3E%3Cstop offset='0.7' stop-color='%2324272c'/%3E%3Cstop offset='1' stop-color='%23101114'/%3E%3C/linearGradient%3E%3ClinearGradient id='fc' gradientUnits='userSpaceOnUse' x1='0' y1='3' x2='0' y2='33'%3E%3Cstop offset='0' stop-color='%2333373d'/%3E%3Cstop offset='0.18' stop-color='%23272a2f'/%3E%3Cstop offset='0.6' stop-color='%231b1d21'/%3E%3Cstop offset='1' stop-color='%23111316'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M7,0.6 L153,0.6 L159.4,7 L159.4,29 L153,35.4 L7,35.4 L0.6,29 L0.6,7 Z' fill='url(%23rm)' stroke='%23050403' stroke-width='1.1' stroke-linejoin='round'/%3E%3Cpath d='M7.5,1.6 L152.5,1.6' stroke='%23fff' stroke-opacity='.28' stroke-width='.9'/%3E%3Cpath d='M8.5,3.6 L151.5,3.6 L156.4,8.5 L156.4,27.5 L151.5,32.4 L8.5,32.4 L3.6,27.5 L3.6,8.5 Z' fill='url(%23fc)' stroke='%23000' stroke-opacity='.9' stroke-width='1'/%3E%3Cpath d='M9.4,5.2 L150.6,5.2 L154,9 L6,9 Z' fill='%23fff' opacity='0.05'/%3E%3Cpath d='M9.6,6.2 L150.4,6.2 L153.8,9.6 L153.8,26.4 L150.4,29.8 L9.6,29.8 L6.2,26.4 L6.2,9.6 Z' fill='none' stroke='%23b07a3c' stroke-opacity='0.55' stroke-width='.8'/%3E%3Cpath d='M9,4.6 L151,4.6' stroke='%23000' stroke-opacity='.55' stroke-width='1'/%3E%3C/svg%3E");
  --_p-iron-hot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='36' viewBox='0 0 160 36'%3E%3Cdefs%3E%3ClinearGradient id='rm' gradientUnits='userSpaceOnUse' x1='0' y1='0' x2='0' y2='36'%3E%3Cstop offset='0' stop-color='%23b0b8c2'/%3E%3Cstop offset='0.3' stop-color='%235d646d'/%3E%3Cstop offset='0.7' stop-color='%232e3238'/%3E%3Cstop offset='1' stop-color='%2314161a'/%3E%3C/linearGradient%3E%3ClinearGradient id='fc' gradientUnits='userSpaceOnUse' x1='0' y1='3' x2='0' y2='33'%3E%3Cstop offset='0' stop-color='%23363a41'/%3E%3Cstop offset='0.55' stop-color='%2325282d'/%3E%3Cstop offset='1' stop-color='%2317191c'/%3E%3C/linearGradient%3E%3CradialGradient id='gl' cx='.5' cy='1.15' r='.85' %3E%3Cstop offset='0' stop-color='%23ff9a3d' stop-opacity='0.55'/%3E%3Cstop offset='0.55' stop-color='%23ff7a20' stop-opacity='0.16'/%3E%3Cstop offset='1' stop-color='%23ff7a20' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath d='M7,0.6 L153,0.6 L159.4,7 L159.4,29 L153,35.4 L7,35.4 L0.6,29 L0.6,7 Z' fill='url(%23rm)' stroke='%23050403' stroke-width='1.1' stroke-linejoin='round'/%3E%3Cpath d='M7.5,1.6 L152.5,1.6' stroke='%23fff' stroke-opacity='.28' stroke-width='.9'/%3E%3Cpath d='M8.5,3.6 L151.5,3.6 L156.4,8.5 L156.4,27.5 L151.5,32.4 L8.5,32.4 L3.6,27.5 L3.6,8.5 Z' fill='url(%23fc)' stroke='%23000' stroke-opacity='.9' stroke-width='1'/%3E%3Cpath d='M8.5,3.6 L151.5,3.6 L156.4,8.5 L156.4,27.5 L151.5,32.4 L8.5,32.4 L3.6,27.5 L3.6,8.5 Z' fill='url(%23gl)'/%3E%3Cpath d='M9.6,6.2 L150.4,6.2 L153.8,9.6 L153.8,26.4 L150.4,29.8 L9.6,29.8 L6.2,26.4 L6.2,9.6 Z' fill='none' stroke='%23e0a454' stroke-opacity='0.85' stroke-width='.8'/%3E%3Cpath d='M9,4.6 L151,4.6' stroke='%23000' stroke-opacity='.55' stroke-width='1'/%3E%3C/svg%3E");
  --_p-iron-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='36' viewBox='0 0 160 36'%3E%3Cdefs%3E%3ClinearGradient id='rm' gradientUnits='userSpaceOnUse' x1='0' y1='0' x2='0' y2='36'%3E%3Cstop offset='0' stop-color='%231a1c20'/%3E%3Cstop offset='0.5' stop-color='%233a3f46'/%3E%3Cstop offset='1' stop-color='%236a717a'/%3E%3C/linearGradient%3E%3ClinearGradient id='fc' gradientUnits='userSpaceOnUse' x1='0' y1='3' x2='0' y2='33'%3E%3Cstop offset='0' stop-color='%230e1012'/%3E%3Cstop offset='0.5' stop-color='%231a1d21'/%3E%3Cstop offset='1' stop-color='%2324272c'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M7,0.6 L153,0.6 L159.4,7 L159.4,29 L153,35.4 L7,35.4 L0.6,29 L0.6,7 Z' fill='url(%23rm)' stroke='%23050403' stroke-width='1.1' stroke-linejoin='round'/%3E%3Cpath d='M7.5,1.6 L152.5,1.6' stroke='%23fff' stroke-opacity='.28' stroke-width='.9'/%3E%3Cpath d='M8.5,3.6 L151.5,3.6 L156.4,8.5 L156.4,27.5 L151.5,32.4 L8.5,32.4 L3.6,27.5 L3.6,8.5 Z' fill='url(%23fc)' stroke='%23000' stroke-opacity='.9' stroke-width='1'/%3E%3Cpath d='M9.6,6.2 L150.4,6.2 L153.8,9.6 L153.8,26.4 L150.4,29.8 L9.6,29.8 L6.2,26.4 L6.2,9.6 Z' fill='none' stroke='%23b07a3c' stroke-opacity='0.45' stroke-width='.8'/%3E%3Cpath d='M9,4.6 L151,4.6' stroke='%23000' stroke-opacity='.55' stroke-width='1'/%3E%3C/svg%3E");
  --_p-bronze: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='36' viewBox='0 0 160 36'%3E%3Cdefs%3E%3ClinearGradient id='rm' gradientUnits='userSpaceOnUse' x1='0' y1='0' x2='0' y2='36'%3E%3Cstop offset='0' stop-color='%23ffe4a6'/%3E%3Cstop offset='0.2' stop-color='%23d49a50'/%3E%3Cstop offset='0.55' stop-color='%238a5a28'/%3E%3Cstop offset='1' stop-color='%233a240e'/%3E%3C/linearGradient%3E%3ClinearGradient id='fc' gradientUnits='userSpaceOnUse' x1='0' y1='3' x2='0' y2='33'%3E%3Cstop offset='0' stop-color='%23a8783e'/%3E%3Cstop offset='0.16' stop-color='%2380552a'/%3E%3Cstop offset='0.5' stop-color='%235a3a18'/%3E%3Cstop offset='0.86' stop-color='%233a240e'/%3E%3Cstop offset='1' stop-color='%232a1a09'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M7,0.6 L153,0.6 L159.4,7 L159.4,29 L153,35.4 L7,35.4 L0.6,29 L0.6,7 Z' fill='url(%23rm)' stroke='%23050403' stroke-width='1.1' stroke-linejoin='round'/%3E%3Cpath d='M7.5,1.6 L152.5,1.6' stroke='%23fff' stroke-opacity='.28' stroke-width='.9'/%3E%3Cpath d='M8.5,3.6 L151.5,3.6 L156.4,8.5 L156.4,27.5 L151.5,32.4 L8.5,32.4 L3.6,27.5 L3.6,8.5 Z' fill='url(%23fc)' stroke='%23000' stroke-opacity='.9' stroke-width='1'/%3E%3Cpath d='M9.4,5.2 L150.6,5.2 L154,9 L6,9 Z' fill='%23fff' opacity='0.11'/%3E%3Cpath d='M9.6,6.2 L150.4,6.2 L153.8,9.6 L153.8,26.4 L150.4,29.8 L9.6,29.8 L6.2,26.4 L6.2,9.6 Z' fill='none' stroke='%23f0c27a' stroke-opacity='0.5' stroke-width='.8'/%3E%3Cpath d='M9,4.6 L151,4.6' stroke='%23000' stroke-opacity='.55' stroke-width='1'/%3E%3C/svg%3E");
  --_p-bronze-hot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='36' viewBox='0 0 160 36'%3E%3Cdefs%3E%3ClinearGradient id='rm' gradientUnits='userSpaceOnUse' x1='0' y1='0' x2='0' y2='36'%3E%3Cstop offset='0' stop-color='%23fff0c4'/%3E%3Cstop offset='0.2' stop-color='%23eab066'/%3E%3Cstop offset='0.55' stop-color='%23a06a32'/%3E%3Cstop offset='1' stop-color='%234a2e12'/%3E%3C/linearGradient%3E%3ClinearGradient id='fc' gradientUnits='userSpaceOnUse' x1='0' y1='3' x2='0' y2='33'%3E%3Cstop offset='0' stop-color='%23bf8a46'/%3E%3Cstop offset='0.16' stop-color='%2394622e'/%3E%3Cstop offset='0.5' stop-color='%236a4520'/%3E%3Cstop offset='0.86' stop-color='%2345290f'/%3E%3Cstop offset='1' stop-color='%232e1b09'/%3E%3C/linearGradient%3E%3CradialGradient id='gl' cx='.5' cy='1.15' r='.85' %3E%3Cstop offset='0' stop-color='%23ff9a3d' stop-opacity='0.55'/%3E%3Cstop offset='0.55' stop-color='%23ff7a20' stop-opacity='0.16'/%3E%3Cstop offset='1' stop-color='%23ff7a20' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath d='M7,0.6 L153,0.6 L159.4,7 L159.4,29 L153,35.4 L7,35.4 L0.6,29 L0.6,7 Z' fill='url(%23rm)' stroke='%23050403' stroke-width='1.1' stroke-linejoin='round'/%3E%3Cpath d='M7.5,1.6 L152.5,1.6' stroke='%23fff' stroke-opacity='.28' stroke-width='.9'/%3E%3Cpath d='M8.5,3.6 L151.5,3.6 L156.4,8.5 L156.4,27.5 L151.5,32.4 L8.5,32.4 L3.6,27.5 L3.6,8.5 Z' fill='url(%23fc)' stroke='%23000' stroke-opacity='.9' stroke-width='1'/%3E%3Cpath d='M8.5,3.6 L151.5,3.6 L156.4,8.5 L156.4,27.5 L151.5,32.4 L8.5,32.4 L3.6,27.5 L3.6,8.5 Z' fill='url(%23gl)'/%3E%3Cpath d='M9.4,5.2 L150.6,5.2 L154,9 L6,9 Z' fill='%23fff' opacity='0.15'/%3E%3Cpath d='M9.6,6.2 L150.4,6.2 L153.8,9.6 L153.8,26.4 L150.4,29.8 L9.6,29.8 L6.2,26.4 L6.2,9.6 Z' fill='none' stroke='%23ffd28a' stroke-opacity='0.75' stroke-width='.8'/%3E%3Cpath d='M9,4.6 L151,4.6' stroke='%23000' stroke-opacity='.55' stroke-width='1'/%3E%3C/svg%3E");
  --_p-bronze-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='36' viewBox='0 0 160 36'%3E%3Cdefs%3E%3ClinearGradient id='rm' gradientUnits='userSpaceOnUse' x1='0' y1='0' x2='0' y2='36'%3E%3Cstop offset='0' stop-color='%236e4a22'/%3E%3Cstop offset='0.5' stop-color='%239a6a34'/%3E%3Cstop offset='1' stop-color='%23c99050'/%3E%3C/linearGradient%3E%3ClinearGradient id='fc' gradientUnits='userSpaceOnUse' x1='0' y1='3' x2='0' y2='33'%3E%3Cstop offset='0' stop-color='%2326170a'/%3E%3Cstop offset='0.5' stop-color='%234a2f15'/%3E%3Cstop offset='1' stop-color='%236a4520'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M7,0.6 L153,0.6 L159.4,7 L159.4,29 L153,35.4 L7,35.4 L0.6,29 L0.6,7 Z' fill='url(%23rm)' stroke='%23050403' stroke-width='1.1' stroke-linejoin='round'/%3E%3Cpath d='M7.5,1.6 L152.5,1.6' stroke='%23fff' stroke-opacity='.28' stroke-width='.9'/%3E%3Cpath d='M8.5,3.6 L151.5,3.6 L156.4,8.5 L156.4,27.5 L151.5,32.4 L8.5,32.4 L3.6,27.5 L3.6,8.5 Z' fill='url(%23fc)' stroke='%23000' stroke-opacity='.9' stroke-width='1'/%3E%3Cpath d='M9.6,6.2 L150.4,6.2 L153.8,9.6 L153.8,26.4 L150.4,29.8 L9.6,29.8 L6.2,26.4 L6.2,9.6 Z' fill='none' stroke='%23c99050' stroke-opacity='0.35' stroke-width='.8'/%3E%3Cpath d='M9,4.6 L151,4.6' stroke='%23000' stroke-opacity='.55' stroke-width='1'/%3E%3C/svg%3E");
  --_p-blood: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='36' viewBox='0 0 160 36'%3E%3Cdefs%3E%3ClinearGradient id='rm' gradientUnits='userSpaceOnUse' x1='0' y1='0' x2='0' y2='36'%3E%3Cstop offset='0' stop-color='%238f969f'/%3E%3Cstop offset='0.3' stop-color='%234a5058'/%3E%3Cstop offset='0.7' stop-color='%2325282d'/%3E%3Cstop offset='1' stop-color='%23101114'/%3E%3C/linearGradient%3E%3ClinearGradient id='fc' gradientUnits='userSpaceOnUse' x1='0' y1='3' x2='0' y2='33'%3E%3Cstop offset='0' stop-color='%237c2216'/%3E%3Cstop offset='0.5' stop-color='%235a160e'/%3E%3Cstop offset='1' stop-color='%23330a06'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M7,0.6 L153,0.6 L159.4,7 L159.4,29 L153,35.4 L7,35.4 L0.6,29 L0.6,7 Z' fill='url(%23rm)' stroke='%23050403' stroke-width='1.1' stroke-linejoin='round'/%3E%3Cpath d='M7.5,1.6 L152.5,1.6' stroke='%23fff' stroke-opacity='.28' stroke-width='.9'/%3E%3Cpath d='M8.5,3.6 L151.5,3.6 L156.4,8.5 L156.4,27.5 L151.5,32.4 L8.5,32.4 L3.6,27.5 L3.6,8.5 Z' fill='url(%23fc)' stroke='%23000' stroke-opacity='.9' stroke-width='1'/%3E%3Cpath d='M9.6,6.2 L150.4,6.2 L153.8,9.6 L153.8,26.4 L150.4,29.8 L9.6,29.8 L6.2,26.4 L6.2,9.6 Z' fill='none' stroke='%23e8a17a' stroke-opacity='0.5' stroke-width='.8'/%3E%3Cpath d='M9,4.6 L151,4.6' stroke='%23000' stroke-opacity='.55' stroke-width='1'/%3E%3C/svg%3E");
  --_p-blood-hot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='36' viewBox='0 0 160 36'%3E%3Cdefs%3E%3ClinearGradient id='rm' gradientUnits='userSpaceOnUse' x1='0' y1='0' x2='0' y2='36'%3E%3Cstop offset='0' stop-color='%23c0c7d0'/%3E%3Cstop offset='0.3' stop-color='%235d646d'/%3E%3Cstop offset='0.7' stop-color='%232e3238'/%3E%3Cstop offset='1' stop-color='%2314161a'/%3E%3C/linearGradient%3E%3ClinearGradient id='fc' gradientUnits='userSpaceOnUse' x1='0' y1='3' x2='0' y2='33'%3E%3Cstop offset='0' stop-color='%239a2c1c'/%3E%3Cstop offset='0.5' stop-color='%236e1c12'/%3E%3Cstop offset='1' stop-color='%233e0c07'/%3E%3C/linearGradient%3E%3CradialGradient id='gl' cx='.5' cy='1.15' r='.85' %3E%3Cstop offset='0' stop-color='%23ff9a3d' stop-opacity='0.55'/%3E%3Cstop offset='0.55' stop-color='%23ff7a20' stop-opacity='0.16'/%3E%3Cstop offset='1' stop-color='%23ff7a20' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath d='M7,0.6 L153,0.6 L159.4,7 L159.4,29 L153,35.4 L7,35.4 L0.6,29 L0.6,7 Z' fill='url(%23rm)' stroke='%23050403' stroke-width='1.1' stroke-linejoin='round'/%3E%3Cpath d='M7.5,1.6 L152.5,1.6' stroke='%23fff' stroke-opacity='.28' stroke-width='.9'/%3E%3Cpath d='M8.5,3.6 L151.5,3.6 L156.4,8.5 L156.4,27.5 L151.5,32.4 L8.5,32.4 L3.6,27.5 L3.6,8.5 Z' fill='url(%23fc)' stroke='%23000' stroke-opacity='.9' stroke-width='1'/%3E%3Cpath d='M8.5,3.6 L151.5,3.6 L156.4,8.5 L156.4,27.5 L151.5,32.4 L8.5,32.4 L3.6,27.5 L3.6,8.5 Z' fill='url(%23gl)'/%3E%3Cpath d='M9.6,6.2 L150.4,6.2 L153.8,9.6 L153.8,26.4 L150.4,29.8 L9.6,29.8 L6.2,26.4 L6.2,9.6 Z' fill='none' stroke='%23ffb38a' stroke-opacity='0.75' stroke-width='.8'/%3E%3Cpath d='M9,4.6 L151,4.6' stroke='%23000' stroke-opacity='.55' stroke-width='1'/%3E%3C/svg%3E");
  --_p-dead: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='36' viewBox='0 0 160 36'%3E%3Cdefs%3E%3ClinearGradient id='rm' gradientUnits='userSpaceOnUse' x1='0' y1='0' x2='0' y2='36'%3E%3Cstop offset='0' stop-color='%234a4d52'/%3E%3Cstop offset='0.5' stop-color='%232a2c30'/%3E%3Cstop offset='1' stop-color='%23141517'/%3E%3C/linearGradient%3E%3ClinearGradient id='fc' gradientUnits='userSpaceOnUse' x1='0' y1='3' x2='0' y2='33'%3E%3Cstop offset='0' stop-color='%231d1f22'/%3E%3Cstop offset='1' stop-color='%23141517'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M7,0.6 L153,0.6 L159.4,7 L159.4,29 L153,35.4 L7,35.4 L0.6,29 L0.6,7 Z' fill='url(%23rm)' stroke='%23050403' stroke-width='1.1' stroke-linejoin='round'/%3E%3Cpath d='M7.5,1.6 L152.5,1.6' stroke='%23fff' stroke-opacity='.28' stroke-width='.9'/%3E%3Cpath d='M8.5,3.6 L151.5,3.6 L156.4,8.5 L156.4,27.5 L151.5,32.4 L8.5,32.4 L3.6,27.5 L3.6,8.5 Z' fill='url(%23fc)' stroke='%23000' stroke-opacity='.9' stroke-width='1'/%3E%3Cpath d='M9.6,6.2 L150.4,6.2 L153.8,9.6 L153.8,26.4 L150.4,29.8 L9.6,29.8 L6.2,26.4 L6.2,9.6 Z' fill='none' stroke='%236a6660' stroke-opacity='0.3' stroke-width='.8'/%3E%3Cpath d='M9,4.6 L151,4.6' stroke='%23000' stroke-opacity='.55' stroke-width='1'/%3E%3C/svg%3E");
  --_plate: var(--_p-iron);
  --_plate-hot: var(--_p-iron-hot);
  --_plate-down: var(--_p-iron-down);
  --_edge: 9px;
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
  min-height: var(--cx-btn-h);
  margin: 0;
  padding: 2px 1.3em 0;
  font-family: var(--cx-font-label);
  font-weight: 700;
  font-size: var(--cx-fs-btn);
  line-height: 1;
  letter-spacing: 0.07em;
  color: var(--cx-text);
  text-shadow: 0 1px 0 #000, 0 0 4px rgba(0, 0, 0, 0.8);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  background: none;
  border: 0 solid transparent;
  border-radius: 0;
  border-image-source: var(--_plate);
  border-image-slice: 12 fill;
  border-image-width: var(--_edge);
  border-image-repeat: stretch;
  box-shadow: none;
  transition: color var(--cx-dur-quick) var(--cx-ease);
}
.btn::after { content: none; }
.btn:hover { border-image-source: var(--_plate-hot); color: var(--cx-gold-leaf); }
.btn:active { border-image-source: var(--_plate-down); transform: translateY(1px); }
.btn:focus { outline: none; }
.btn:focus-visible {
  border-image-source: var(--_plate-hot);
  outline: none;
  /* an ember glow that follows the chamfered plate (static filter, only on the focused element) */
  filter: drop-shadow(0 0 1px #000) drop-shadow(0 0 2px var(--cx-torch)) drop-shadow(0 0 7px rgba(255, 120, 40, 0.7));
}
.btn:disabled, .btn[aria-disabled='true'] {
  cursor: default;
  transform: none;
  color: var(--cx-text-faint);
  text-shadow: 0 1px 0 #000;
  border-image-source: var(--_p-dead);
}
.btn .icon { width: 1.05em; height: 1.05em; }
/* bevelled bronze plate — the one main action */
.btn-primary {
  --_plate: var(--_p-bronze);
  --_plate-hot: var(--_p-bronze-hot);
  --_plate-down: var(--_p-bronze-down);
  color: #f7e3b2;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.75), 0 1px 0 rgba(255, 214, 150, 0.18), 0 0 8px rgba(0, 0, 0, 0.5);
}
.btn-primary:hover { color: #fff3d2; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.75), 0 0 10px rgba(255, 150, 60, 0.55); }
.btn-primary:disabled, .btn-primary[aria-disabled='true'] { color: rgba(235, 228, 214, 0.42); }
/* oxblood enamel in iron — destructive or irreversible (wins over primary: "Delete" in a confirm dialog) */
.btn-danger, .btn-primary.btn-danger {
  --_plate: var(--_p-blood);
  --_plate-hot: var(--_p-blood-hot);
  --_plate-down: var(--_p-iron-down);
  color: #fbe8dc;
  text-shadow: 0 1px 0 #000, 0 0 4px rgba(0, 0, 0, 0.8);
}
.btn-danger:hover, .btn-primary.btn-danger:hover { color: #fff4ea; }
.btn-danger:disabled, .btn-primary.btn-danger:disabled { color: rgba(251, 232, 220, 0.45); }
/* armed (a second press confirms): the hot oxblood plate with a static ember-red glow — never a pulse */
.btn.armed { --_plate: var(--_p-blood-hot); --_plate-hot: var(--_p-blood-hot); color: #fff4ea; filter: drop-shadow(0 0 5px rgba(226, 84, 31, 0.55)); }
.btn-small { --_edge: 7px; min-height: var(--cx-btn-h-sm); padding: 1px 0.9em 0; font-size: max(var(--cx-fs-sc-min), calc(var(--cx-fs-btn) - 2px)); letter-spacing: 0.06em; }
/* ghost — tertiary text action ("Back", "Later", "Credits"): ash letters, an ember underline on hover/focus */
.btn-ghost, .btn-ghost:hover, .btn-ghost:active, .btn-ghost:focus-visible, .btn-ghost:disabled { border-image-source: none; }
.btn-ghost { color: var(--cx-text-dim); }
.btn-ghost::after {
  content: '';
  position: absolute;
  left: 0.9em;
  right: 0.9em;
  bottom: 5px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 138, 61, 0), var(--cx-torch) 30%, var(--cx-torch) 70%, rgba(255, 138, 61, 0));
  opacity: 0;
  transition: opacity var(--cx-dur-quick) var(--cx-ease);
  pointer-events: none;
}
.btn-ghost:hover, .btn-ghost:focus-visible { color: var(--cx-gold-leaf); filter: none; }
.btn-ghost:hover::after, .btn-ghost:focus-visible::after { opacity: 1; }
.btn-ghost:active { transform: translateY(1px); }
.parchment .btn-ghost, .sqp-parch .win-body .btn-ghost { color: var(--cx-ink-rubric); text-shadow: none; }
.parchment .btn-ghost::after, .sqp-parch .win-body .btn-ghost::after { background: var(--cx-ink-rubric); }

/* ---------------------------------------------------------------- Inputs: a recessed dark socket with a bronze hairline */
.input, select.input, textarea.input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-height: var(--cx-btn-h-sm);
  padding: 6px 10px;
  font: 400 var(--cx-fs-body)/1.3 var(--cx-font-body);
  color: var(--cx-text);
  caret-color: var(--cx-torch);
  background: linear-gradient(180deg, #07080a, #121417);
  border: 1px solid #000;
  border-radius: var(--cx-r-1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(176, 122, 60, 0.38), 0 1px 0 1px rgba(196, 204, 214, 0.05);
  outline: none;
  transition: box-shadow var(--cx-dur-quick) var(--cx-ease);
}
select.input {
  padding-right: 28px;
  cursor: pointer;
  background:
    linear-gradient(45deg, transparent 50%, var(--cx-bronze-hi) 50%) right 15px top 50% / 5px 5px no-repeat,
    linear-gradient(135deg, var(--cx-bronze-hi) 50%, transparent 50%) right 10px top 50% / 5px 5px no-repeat,
    linear-gradient(180deg, #07080a, #121417);
}
select.input option { background: #121417; color: var(--cx-text); }
.input::placeholder { color: var(--cx-text-faint); font-style: italic; }
.input:hover { box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(226, 181, 106, 0.6); }
.input:focus { box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.9), 0 0 0 1px var(--cx-torch), 0 0 10px rgba(255, 138, 61, 0.35); }
.input:disabled { color: var(--cx-text-faint); opacity: 0.7; }
.input.is-invalid { box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.9), 0 0 0 1px var(--cx-vermilion-hi); }
.field { display: block; margin: 8px 0; }
.field-label {
  display: block;
  margin-bottom: 4px;
  font: 700 var(--cx-fs-sc-min)/1.2 var(--cx-font-label);
  letter-spacing: 0.1em;
  color: var(--cx-text-dim);
}
/* written on parchment: a ruled ink line, an oxblood underline on focus */
.parchment .input, .sqp-parch .win-body .input {
  color: var(--cx-ink-text);
  caret-color: var(--cx-ink-rubric);
  background: rgba(255, 248, 230, 0.4);
  border: 0;
  border-bottom: 1px solid rgba(45, 28, 12, 0.6);
  border-radius: 0;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.35);
}
.parchment select.input, .sqp-parch .win-body select.input {
  background:
    linear-gradient(45deg, transparent 50%, var(--cx-ink-rubric) 50%) right 15px top 50% / 5px 5px no-repeat,
    linear-gradient(135deg, var(--cx-ink-rubric) 50%, transparent 50%) right 10px top 50% / 5px 5px no-repeat,
    rgba(255, 248, 230, 0.4);
}
.parchment .input::placeholder, .sqp-parch .win-body .input::placeholder { color: rgba(69, 51, 31, 0.62); }
.parchment .input:focus, .sqp-parch .win-body .input:focus { background-color: rgba(255, 248, 230, 0.7); box-shadow: inset 0 -2px 0 var(--cx-ink-rubric); }
.parchment .field-label, .sqp-parch .win-body .field-label { color: var(--cx-ink-text-dim); }

/* ---------------------------------------------------------------- Tooltip: a soot panel, bronze hairline, inner dark band, iron cap corners */
.tooltip {
  position: fixed;
  z-index: 5000;
  display: none;
  pointer-events: none;
  max-width: 330px;
  padding: 9px 12px 10px;
  font: 400 var(--cx-fs-small)/1.4 var(--cx-font-body);
  color: var(--cx-text);
  background: var(--cx-caps), var(--cx-bg-ink);
  border: 1px solid #000;
  border-radius: var(--cx-r-1);
  box-shadow: inset 0 1px 0 rgba(196, 204, 214, 0.1), inset 0 0 0 1px rgba(176, 122, 60, 0.7), inset 0 0 0 3px rgba(5, 5, 6, 0.9),
    inset 0 0 0 4px rgba(138, 145, 154, 0.16), 0 8px 22px rgba(0, 0, 0, 0.7);
}
.tooltip .tt-title { font: 700 calc(var(--cx-fs-small) + 2px)/1.25 var(--cx-font-body); }
.tooltip .tt-sub { color: var(--cx-text); }
.tooltip .tt-gold { color: var(--cx-gold-text); }
.tooltip .tt-green { color: var(--c-green); }
.tooltip .tt-muted { color: var(--cx-text-dim); }
.tooltip .tt-flavor { color: var(--cx-gold-3); font: italic 500 calc(var(--cx-fs-small) + 2px)/1.35 var(--cx-font-flavor); }
.tooltip .tt-row { display: flex; justify-content: space-between; gap: 16px; }
.tooltip .q-rare { color: var(--cx-q-rare-text); }
.tooltip .q-epic { color: var(--cx-q-epic-text); }

/* ---------------------------------------------------------------- Item quality (on dark; parchment uses the -ink colours) */
.q-poor { color: var(--q-poor); }
.q-common { color: var(--q-common); }
.q-uncommon { color: var(--q-uncommon); }
.q-rare { color: var(--q-rare); }
.q-epic { color: var(--q-epic); }
.q-legendary { color: var(--q-legendary); }
.item-link { font-weight: 700; }
.parchment .q-poor, .sqp-parch .win-body .q-poor { color: var(--cx-q-poor-ink); }
.parchment .q-common, .sqp-parch .win-body .q-common { color: var(--cx-q-common-ink); }
.parchment .q-uncommon, .sqp-parch .win-body .q-uncommon { color: var(--cx-q-uncommon-ink); }
.parchment .q-rare, .sqp-parch .win-body .q-rare { color: var(--cx-q-rare-ink); }
.parchment .q-epic, .sqp-parch .win-body .q-epic { color: var(--cx-q-epic-ink); }
.parchment .q-legendary, .sqp-parch .win-body .q-legendary { color: var(--cx-q-legendary-ink); }

/* ---------------------------------------------------------------- Money: struck coins */
.money { display: inline-flex; gap: 6px; align-items: center; font-family: var(--font-num); font-weight: 700; font-variant-numeric: lining-nums tabular-nums; color: var(--cx-text); }
.coin { display: inline-flex; align-items: center; gap: 2px; }
.coin::after {
  content: '';
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: inset -1px -1px 0 rgba(0, 0, 0, 0.45), inset 1px 1px 0 rgba(255, 255, 255, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.75);
}
.coin.gold::after { background: radial-gradient(circle at 38% 34%, #fff1cf, #e3b562 40%, #a8772f 70%, #6b4a20); }
.coin.silver::after { background: radial-gradient(circle at 38% 34%, #ffffff, #c4ccd6 45%, #8a919a 75%, #46505b); }
.coin.copper::after { background: radial-gradient(circle at 38% 34%, #ffd2a8, #b5643a 45%, #7a3a18 75%, #3a1a08); }
.parchment .money, .sqp-parch .win-body .money { color: var(--cx-ink-text); }

/* ---------------------------------------------------------------- Icons & misc */
.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; }
.gold-text { color: var(--cx-gold-text); }
.muted { color: var(--cx-text-dim); }
.parchment .gold-text, .sqp-parch .win-body .gold-text { color: var(--cx-ink-gold); }
.parchment .muted, .sqp-parch .win-body .muted { color: var(--cx-ink-text-dim); }
.hidden { display: none !important; }
.display { font-family: var(--font-display); }
.ui-font { font-family: var(--font-ui); }
/* key-caps: small iron keys (a parchment version on pages) */
kbd {
  display: inline-block;
  min-width: 1.55em;
  padding: 1px 4px 0;
  font: 700 11px/1.35 var(--cx-font-num);
  text-align: center;
  color: var(--cx-text);
  text-shadow: 0 1px 0 #000;
  background: linear-gradient(180deg, #3a3f46, #17191c);
  border: 1px solid #000;
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(196, 204, 214, 0.22), inset 0 -1px 0 rgba(176, 122, 60, 0.3), 0 1px 0 #050506;
  vertical-align: 0.06em;
}
.parchment kbd, .sqp-parch .win-body kbd {
  color: var(--cx-ink-text);
  text-shadow: none;
  background: linear-gradient(180deg, #f4e8cc, #cdb88c);
  border-color: rgba(45, 28, 12, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 1px 0 rgba(45, 28, 12, 0.55);
}
