/* The patch notes' look (patch_notes_pages.py): warm dark ground, parchment
   ink, brass -- Cinzel for headings, EB Garamond for reading, Spectral for
   commands. The fonts are Majordomo's card fonts, served from /fonts/. */
@font-face { font-family: "Cinzel"; src: url("/fonts/Cinzel-SemiBold.ttf"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("/fonts/Cinzel-Bold.ttf"); font-weight: 700; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("/fonts/EBGaramond-Regular.ttf"); font-weight: 400; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("/fonts/EBGaramond-Italic.ttf"); font-style: italic; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("/fonts/EBGaramond-SemiBold.ttf"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("/fonts/Spectral-SemiBold.ttf"); font-weight: 600; font-display: swap; }

:root {
  --bg: #120e09;
  --panel: #1b150d;
  --panel-2: #241b11;
  --line: #2c2217;
  --line-strong: #5a4930;
  --text: #ede3cc;
  --muted: #b9a57f;
  --faint: #8a7856;
  --accent: #d6a64e;
  --accent-ink: #1d1409;
  --accent-soft: rgba(214, 166, 78, 0.14);
  --good: #8cc46e;
  --good-soft: rgba(140, 196, 110, 0.14);
  --warn: #e0b04e;
  --warn-soft: rgba(224, 176, 78, 0.14);
  --bad: #e07a62;
  --bad-soft: rgba(224, 122, 98, 0.14);
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --display: "Cinzel", Georgia, serif;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --cmd: "Spectral", Georgia, serif;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #efe6d2;
    --panel: #fbf6ea;
    --panel-2: #f3ead7;
    --line: #dccdb0;
    --line-strong: #c4ae86;
    --text: #2b2115;
    --muted: #6f5a3c;
    --faint: #97835f;
    --accent: #9c7327;
    --accent-ink: #fff8ea;
    --accent-soft: rgba(156, 115, 39, 0.12);
    --good: #3f7a2a;
    --good-soft: rgba(63, 122, 42, 0.12);
    --warn: #8a6410;
    --warn-soft: rgba(180, 130, 20, 0.14);
    --bad: #b04a32;
    --bad-soft: rgba(176, 74, 50, 0.1);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, .button {
  font: inherit;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
button:hover, .button:hover { border-color: var(--faint); text-decoration: none; }
.button.primary, button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.button.primary:hover, button.primary:hover { filter: brightness(1.06); }
.button.small, button.small { padding: 3px 10px; font-size: 13px; }
.hidden { display: none !important; }

/* ---- top bar ---- */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 5;
}
.brand { font-family: var(--display); font-weight: 700; color: var(--text); letter-spacing: 0.2px; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand-mark { width: 30px; height: 30px; object-fit: contain; flex: none; }   /* the guild's shield */
.spacer { flex: 1; }
.me { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.me img { width: 30px; height: 30px; border-radius: 50%; }
.me form { margin: 0; }

.picker { position: relative; }
.picker-button { min-width: 200px; justify-content: space-between; }
.guild-icon { width: 22px; height: 22px; border-radius: 6px; background: var(--panel); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--muted); overflow: hidden; flex: none; }
.guild-icon img { width: 100%; height: 100%; }
.picker-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 260px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.picker-menu button { width: 100%; background: none; border: 0; justify-content: flex-start; padding: 8px; }
.picker-menu button:hover, .picker-menu button.on { background: var(--panel-2); }
.picker-menu .grow { flex: 1; text-align: left; }

.badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); color: var(--muted); text-transform: capitalize; white-space: nowrap; }
.badge.officer { background: var(--accent-soft); color: var(--accent); }
.badge.admin { background: var(--bad-soft); color: var(--bad); }

/* ---- page ---- */
main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 24px; flex: 1; }
.page-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--display); font-size: 24px; margin: 0; }
.page-head .sub { color: var(--muted); font-size: 14px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-size: 26px; font-weight: 700; margin-top: 2px; }
.stat .value small { font-size: 14px; color: var(--muted); font-weight: 500; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; min-width: 0; }
.card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.card-head h2 { font-family: var(--display); font-size: 15px; letter-spacing: 0.3px; margin: 0; }
.card-head .tag { margin-left: auto; font-size: 11px; color: var(--faint); }
.card-head .icon { width: 18px; height: 18px; color: var(--accent); flex: none; }
.empty { color: var(--faint); font-size: 14px; padding: 8px 0 2px; }

.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); min-width: 0; }
.rows li:first-child { border-top: 0; }
.rows .main { flex: 1; min-width: 0; }
.rows .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; color: var(--text); }
.rows a.title:hover { color: var(--accent); text-decoration: none; }
.rows .meta { color: var(--muted); font-size: 13px; }
.rows .num { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.rows .place { width: 22px; color: var(--faint); font-variant-numeric: tabular-nums; }
.rows li.you .title { color: var(--accent); }
.rows li.wrap .title { white-space: normal; }

.pill { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.quiet { background: var(--panel-2); color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--faint); }
.dot.good { background: var(--good); }
.dot.bad { background: var(--bad); }
.bar { height: 4px; border-radius: 4px; background: var(--panel-2); margin-top: 5px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); }
.bar span.bad { background: var(--bad); }
.grid.cols { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.cols .col { display: grid; gap: 16px; align-content: start; min-width: 0; }
.card.audit .rows { max-height: 372px; overflow-y: auto; padding-right: 4px; }   /* about six changes; the rest scroll */
.card.audit .rows .title { overflow-wrap: anywhere; }
.bar span.warn { background: var(--warn); }
.stat.bad { border-color: var(--bad); }
.stat.bad .value { color: var(--bad); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.chip { font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
.chip.on { border-color: var(--accent); background: var(--accent-soft); }
.chip .swatch { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.actions { display: flex; gap: 8px; align-items: center; }

.notice { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; text-align: center; color: var(--muted); }
.notice h2 { color: var(--text); margin: 0 0 6px; font-size: 18px; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--line); padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 10; }
.toast.bad { border-color: var(--bad); }

footer { color: var(--faint); font-size: 13px; text-align: center; padding: 20px; display: flex; gap: 16px; justify-content: center; }
footer a { color: var(--muted); }

/* ---- Terms and Privacy ---- */
.doc { max-width: 760px; margin: 0 auto; padding: 32px 24px 48px; }
.doc h1 { font-family: var(--display); font-size: 30px; margin: 0 0 4px; }
.doc .updated { color: var(--faint); font-size: 13px; margin-bottom: 24px; }
.doc h2 { font-family: var(--display); font-size: 18px; margin: 28px 0 8px; }
.doc p, .doc li { color: var(--muted); font-family: var(--serif); font-size: 18px; }
.doc strong { color: var(--text); }

@media (max-width: 720px) {
  .topbar { padding: 10px 16px; gap: 10px; flex-wrap: wrap; }
  .picker { order: 3; width: 100%; }
  .picker-button { width: 100%; }
  .me .name { display: none; }
  main { padding: 16px; }
  .grid { grid-template-columns: 1fr; }
}

/* ---- the front page ---- */
a.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 8px; align-items: center; margin-left: 6px; }
.nav a, .nav-dash { font-family: var(--display); font-size: 14px; font-weight: 700; letter-spacing: 0.8px; color: var(--text);
  padding: 7px 15px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--panel-2); white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background 0.15s; display: inline-flex; align-items: center; gap: 7px; }
.nav a:hover, .nav-dash:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.nav a.on, .nav-dash.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.nav .lock { width: 13px; height: 13px; flex: none; }
.nav a.backroom:not(.on) { background: #0e0a07; border-color: #3b2c1c; color: #b49a74; }
.nav a.backroom:not(.on):hover { border-color: var(--accent); color: var(--accent); }
.account { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.account img { width: 28px; height: 28px; border-radius: 50%; }

.banner { border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--panel) 0%, var(--bg) 100%); }
.banner-inner { max-width: 1180px; margin: 0 auto; padding: 36px 24px 22px; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.server { display: flex; align-items: flex-start; gap: 20px; flex: 1; min-width: 280px; }
.server-icon { width: 96px; height: 96px; display: grid; place-items: center; overflow: hidden; font-family: var(--display); font-size: 28px; color: var(--accent); flex: none; }
.server-icon img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5)); }
.server-text { min-width: 0; }
.eyebrow { font-family: var(--display); font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.eyebrow.recruiting { color: var(--good); }
.dot.pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 var(--good-soft); } 50% { box-shadow: 0 0 0 6px var(--good-soft); } }
.banner h1 { font-family: var(--display); font-size: 36px; line-height: 1.15; margin: 4px 0 8px; }
.recruit { font-family: var(--serif); font-size: 20px; line-height: 1.45; margin: 0 0 12px; max-width: 640px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags .tag { font-size: 13px; padding: 3px 11px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--text); }
.join { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 220px; }
.button.big { font-size: 17px; padding: 13px 28px; font-family: var(--display); letter-spacing: 0.5px; }
.counts { color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; font-size: 14px; }
.counts b { color: var(--text); font-variant-numeric: tabular-nums; }
.quiet-link { font-size: 13px; color: var(--muted); }
.ticker { max-width: 1180px; margin: 0 auto; padding: 0 24px 18px; display: flex; gap: 10px 22px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.ticker span { display: inline-flex; align-items: center; gap: 7px; }
.ticker b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.up { color: var(--good); }
.down { color: var(--bad); }
.login-note { max-width: 1180px; margin: 0 auto; padding: 0 24px 14px; color: var(--warn); font-size: 14px; }

.front { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; align-content: start; }
.guild-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.guild-grid .wide { grid-column: 1 / -1; }

.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.kv div { min-width: 0; }
.kv .k { color: var(--muted); font-size: 12px; }
.kv .v { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.guild-name { font-family: var(--display); font-size: 18px; margin: 0 0 12px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.tag-alliance { font-family: var(--cmd); color: var(--accent); font-size: 14px; }
.gold-now { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.gold-now .v { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.spark { width: 100%; height: 70px; margin-top: 10px; display: block; }
.spark polyline { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.spark polygon { fill: var(--accent-soft); stroke: none; }
.range { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.source { color: var(--faint); font-size: 12px; margin-top: 10px; }
.notice.wide, .source.wide { grid-column: 1 / -1; }

.tabs { display: flex; gap: 4px; margin: -2px 0 8px; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 6px 12px; color: var(--muted); font-family: var(--display); font-size: 13px; letter-spacing: 0.4px; }
.tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.board .name-line { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.board .name-line .title { flex: 0 1 auto; }
.board .bar { margin-top: 6px; }

.weapon { width: 42px; height: 42px; flex: none; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); }
.who { display: flex; flex-direction: column; min-width: 0; flex: 0 1 190px; }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .ours { color: var(--accent); font-weight: 600; }
.who .theirs { font-weight: 600; }
.who .ip { color: var(--muted); font-size: 12px; }
.arrow { color: var(--faint); font-size: 18px; }
.kill-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; color: var(--muted); font-size: 12px; text-align: right; flex: 0 1 260px; min-width: 0; }
.kill-meta .fame { color: var(--text); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.kill-meta .helpers { color: var(--faint); }

/* bot updates: a short list; an entry opens in full */
.filters { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 6px; }
.filters button { font-size: 12px; padding: 2px 10px; border-radius: 999px; }
.filters button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.updates { list-style: none; margin: 0; padding: 0; }
.updates li { border-top: 1px solid var(--line); }
.updates li:first-child { border-top: 0; }
.update { width: 100%; background: none; border: 0; border-radius: 0; padding: 10px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }
.update:hover .update-title { color: var(--accent); }
.update-date { font-family: var(--display); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.update-title { font-family: var(--serif); font-size: 17px; line-height: 1.3; color: var(--text); }
.update-bots { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.bot-chip { font-size: 11px; padding: 0 7px; border-radius: 999px; background: var(--panel-2); color: var(--muted); }
.more { width: 100%; justify-content: center; padding: 8px; margin-top: 6px; font-family: var(--display); letter-spacing: 0.5px; font-size: 13px; }

.note-dialog { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--panel); color: var(--text); }
.note-dialog::backdrop { background: rgba(10, 7, 4, 0.72); }
.note-dialog .close { position: sticky; top: 10px; float: right; margin: 10px 10px 0 0; font-size: 20px; line-height: 1; padding: 4px 10px; z-index: 1; }

/* one patch-notes entry, laid out like the Discord pictures */
.note { padding: 26px 30px 24px; font-family: var(--serif); font-size: 18px; line-height: 1.55; }
.note .date { font-family: var(--display); font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--muted); }
.note h3.title { font-family: var(--display); font-size: 28px; line-height: 1.2; margin: 6px 0 10px; color: var(--text); }
.note .intro p { margin: 0 0 10px; font-size: 19px; }
.note .double-rule { border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); height: 4px; margin: 16px 0 6px; }
.note section { padding-top: 16px; }
.note section + section { border-top: 1px solid var(--line); margin-top: 16px; }
.note h4 { margin: 0 0 8px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.note h4 .bot { font-family: var(--display); font-size: 22px; font-weight: 700; color: var(--text); }
.note h4 .topic { font-style: italic; font-weight: 400; color: var(--muted); font-size: 19px; }
.note p { margin: 0 0 10px; color: var(--text); }
.note ul { margin: 0 0 10px; padding-left: 22px; }
.note li { margin: 3px 0; }
.note li::marker { color: var(--line-strong); }
.note strong { font-weight: 600; }
.note .cmd { font-family: var(--cmd); font-weight: 600; color: var(--accent); font-size: 0.92em; }
.note .key { font-family: var(--cmd); font-weight: 600; font-size: 0.8em; padding: 2px 10px; border-radius: 7px; background: var(--panel-2); border: 1px solid var(--line-strong); white-space: nowrap; }
.note .note-row { margin: 14px 0 10px; }
.note .note-row-label { display: flex; align-items: baseline; gap: 14px; margin-bottom: 2px; }
.note .note-row-label .aside { font-family: var(--display); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.note figure { margin: 12px 0 14px; background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: 10px; padding: 14px 18px; }
.note figcaption { font-family: var(--display); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.note table { width: 100%; border-collapse: collapse; }
.note td { padding: 6px 0; border-top: 1px dotted var(--line-strong); }
.note tr:first-child td { border-top: 0; }
.note tr.rule td { border-top: 1px solid var(--muted); }
.note tr.total td:first-child { font-weight: 600; }
.note td:last-child { text-align: right; font-family: var(--cmd); font-weight: 600; }
.note tr.last td:last-child { color: var(--accent); }
.note figure p { color: var(--muted); font-size: 16px; margin: 8px 0 0; }

@media (max-width: 1040px) {
  .front { grid-template-columns: 1fr; }
}
@media (max-width: 1120px) {  /* the menu gets a row of its own before the top bar runs out of room */
  .topbar { flex-wrap: wrap; }
  .nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; }
}
@media (max-width: 720px) {
  .nav a { flex: 1; text-align: center; padding: 8px 10px; font-size: 13px; }
  .banner-inner { padding: 24px 16px 18px; }
  .banner h1 { font-size: 26px; }
  .recruit { font-size: 18px; }
  .server-icon { width: 60px; height: 60px; }
  .join { width: 100%; }
  .join .button.big { width: 100%; justify-content: center; }
  .ticker, .login-note { padding: 0 16px 16px; }
  .guild-grid { grid-template-columns: 1fr; }
  .kill-meta { align-items: flex-start; text-align: left; flex-basis: 100%; }
  .note { padding: 20px 18px; font-size: 17px; }
  .note h3.title { font-size: 23px; }
}

/* ---- the killboard ---- */
.kb-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.kb-head h1, .kill-head h1 { font-family: var(--display); font-size: 30px; margin: 2px 0 2px; }
.kb .meta { color: var(--muted); font-size: 13px; }
.kb .stats .stat.good .value { color: var(--good); }
.kb .stats .stat.bad .value { color: var(--bad); }
.tabs.small button { font-size: 12px; padding: 5px 10px; }
.back { display: inline-block; margin-bottom: 12px; font-size: 14px; color: var(--muted); }

.activity { margin-bottom: 16px; }
.activity .card-head .legend { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 8px; }
.sw.k, .bar-k { background: var(--good); }
.sw.d, .bar-d { background: var(--bad); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 110px; }
.day { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; min-width: 0; }
.pair { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.pair span { width: 42%; max-width: 16px; border-radius: 3px 3px 0 0; min-height: 1px; opacity: 0.85; }
.day-label { font-size: 11px; color: var(--faint); height: 14px; }

.kb-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.kb-side { display: flex; flex-direction: column; gap: 16px; }
.kb-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.kb-filters .tabs { margin: 0; border: 0; }
select { font: inherit; font-size: 13px; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; max-width: 200px; }

.kb-feed { list-style: none; margin: 0; padding: 0; }
.kb-row { border-top: 1px solid var(--line); }
.kb-row:first-child { border-top: 0; }
.kb-link { display: flex; align-items: center; gap: 10px; padding: 9px 6px 9px 10px; color: var(--text); border-left: 3px solid transparent; flex-wrap: wrap; }
.kb-row.kill .kb-link { border-left-color: var(--good); }
.kb-row.death .kb-link { border-left-color: var(--bad); }
.kb-link:hover { background: var(--panel-2); text-decoration: none; }
.kind { font-family: var(--display); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; flex: none; }
.kind.kill { background: var(--good-soft); color: var(--good); }
.kind.death { background: var(--bad-soft); color: var(--bad); }
.kb-link .who { flex: 1 1 130px; }
.kb-link .kill-meta { flex: 0 1 190px; margin-left: auto; }
.weapon { position: relative; display: inline-block; vertical-align: middle; }
.weapon img { width: 100%; height: 100%; display: block; }
.weapon.small { width: 30px; height: 30px; }

.highlight { display: flex; align-items: center; gap: 10px; color: var(--text); }
.highlight:hover { text-decoration: none; }
.highlight .who { flex: 1; }
.weapon-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.weapon-cell { display: grid; grid-template-columns: 42px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; min-width: 0; }
.weapon-cell .weapon { grid-row: span 2; }
.weapon-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.weapon-cell .num { font-size: 12px; color: var(--muted); font-weight: 500; }

.kb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.kb-table th { text-align: left; font-weight: 500; color: var(--faint); font-size: 12px; padding: 0 6px 6px; }
.kb-table td { padding: 7px 6px; border-top: 1px solid var(--line); vertical-align: middle; }
.kb-table td.num, .kb-table th:nth-child(n+3) { text-align: right; }
.kb-table .place { color: var(--faint); width: 20px; }
.good-text { color: var(--good); text-align: right; }
.bad-text { color: var(--bad); text-align: right; }
.parts td:nth-child(4) { min-width: 130px; }
.parts .bar { margin-top: 4px; }
.parts .ours-row td:nth-child(2) > div:first-child { color: var(--accent); font-weight: 600; }

.kill-head { display: grid; grid-template-columns: auto 1fr auto; column-gap: 14px; align-items: center; margin-bottom: 18px; }
.kill-head .kind { grid-row: span 2; }
.kill-head h1 .ours, .kb .ours { color: var(--accent); }
.kill-head .meta { grid-column: 2; }
.kill-fame { grid-row: 1 / span 2; grid-column: 3; font-family: var(--display); font-size: 24px; color: var(--accent); }
.versus { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; margin-bottom: 16px; }
.vs { font-family: var(--display); font-size: 22px; color: var(--faint); }
.gear-card.killer { border-top: 3px solid var(--good); }
.gear-card.victim { border-top: 3px solid var(--bad); }
.gear-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.gear-name { font-family: var(--display); font-size: 18px; color: var(--text); }
.gear-ip { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.gear-grid { display: grid; grid-template-columns: repeat(3, 72px); gap: 8px; justify-content: center; }
.item { width: 72px; height: 72px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); position: relative; display: block; }
.item img { width: 100%; height: 100%; display: block; }
.item.blank { background: none; border: 0; }
.item.empty-slot { opacity: 0.5; }
.item .count { position: absolute; right: 4px; bottom: 2px; font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000; }
.inventory { display: grid; grid-template-columns: repeat(auto-fill, 64px); gap: 6px; }
.inventory .item { width: 64px; height: 64px; }

@media (max-width: 1040px) {
  .kb-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .versus { grid-template-columns: 1fr; }
  .vs { text-align: center; }
  .gear-grid { grid-template-columns: repeat(3, 64px); }
  .gear-grid .item { width: 64px; height: 64px; }
  .kill-head { grid-template-columns: 1fr; }
  .kill-head .kind, .kill-fame { grid-row: auto; grid-column: auto; justify-self: start; }
  .kb-link .kill-meta { align-items: flex-start; text-align: left; flex-basis: 100%; margin-left: 0; }
}

/* ---- a kill: the parchment card (the patch notes' ink and brass on paper) ---- */
.kcard {
  --pa-paper: #ebdfc2;
  --pa-slot: rgba(110, 88, 56, 0.12);
  --pa-slot-edge: rgba(110, 88, 56, 0.28);
  --pa-ink: #2a1f12;
  --pa-soft: #6e5838;
  --pa-faint: #9c8660;
  --pa-brass: #9c7327;
  --pa-rule: #b89c6c;
  --pa-red: #a4452f;
  --pa-green: #4f7a2f;
  color: var(--pa-ink);
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255, 250, 235, 0.55) 0%, rgba(255, 250, 235, 0) 60%),
    radial-gradient(ellipse at 50% 50%, #eee3c7 0%, #e6d6b1 65%, #d6c094 100%);
  border: 1px solid #b89c6c;
  border-radius: 6px;
  padding: 10px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), inset 0 0 60px rgba(120, 90, 40, 0.18);
  font-family: var(--serif);
}
.kcard-inner { border: 1px solid var(--pa-rule); outline: 1px solid rgba(184, 156, 108, 0.45); outline-offset: -5px; border-radius: 3px; padding: 26px 28px 14px; }
.kcard-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.kcard-top .back { margin: 0; }
.kstyle { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; margin-right: 10px; font-size: 13px; color: var(--muted); }
.kstyle select { padding: 4px 8px; font-size: 13px; }
/* (the card in another dress: the Hellgate's fire and stone under one warm veil, nothing boxed -- a soft light behind
   each block of writing, the rows of who was there on darker bands: as its picture is drawn, kill_image.py) */
.kcard.th-hell {
  --pa-paper: #ecdec4; --pa-ink: #24160c; --pa-soft: #40281a; --pa-faint: #5c3e28; --pa-brass: #763c0e; --pa-rule: rgba(150, 104, 64, 0.8);
  --pa-red: #a4321e; --pa-green: #3a6822; --pa-slot: rgba(169, 145, 111, 0.78); --pa-slot-edge: rgba(150, 100, 60, 0.45);
  background: radial-gradient(ellipse at 50% 45%, rgba(191, 175, 147, 0.7) 0%, rgba(191, 175, 147, 0.6) 100%),
    url('/static/themes/hell.jpg') center / cover no-repeat, #b09678;
  border-color: #b08054;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), inset 0 0 70px rgba(120, 50, 20, 0.22);
}
.kcard.th-hell .kside, .kcard.th-hell .kcentre, .kcard.th-hell .kbag, .kcard.th-hell .kbag-value {
  background: radial-gradient(ellipse closest-side at center, rgba(191, 175, 147, 0.6) 0%, rgba(191, 175, 147, 0.42) 60%, rgba(191, 175, 147, 0) 100%);
}
.kcard.th-hell .kside, .kcard.th-hell .kcentre { padding: 14px 8px; }
.kcard.th-hell .ksection { color: var(--pa-brass); font-size: 13px; text-shadow: 0 0 10px rgba(191, 175, 147, 0.9); }
.kcard.th-hell .kpart { background: rgba(60, 24, 10, 0.26); }
.kcard.th-hell .final { color: var(--pa-ink); border-color: var(--pa-brass); background: rgba(191, 175, 147, 0.45); }
.kcard.th-hell .kpart.ours { background: rgba(110, 60, 14, 0.34); }
.kcard.th-hell .kbar { background: rgba(60, 24, 10, 0.22); }
.kcard.th-hell .kshare { color: var(--pa-ink); }
.kcard.th-hell .kfoot { color: var(--pa-soft); }
@media (max-width: 1000px) {   /* (a narrow card is a long one: the painting across its head, going over into warm paper) */
  .kcard.th-hell {
    background: linear-gradient(rgba(191, 175, 147, 0.58), rgba(191, 175, 147, 0.58)),
      linear-gradient(to bottom, rgba(176, 150, 120, 0) 0, rgba(176, 150, 120, 0) 460px, #b09678 800px),
      url('/static/themes/hell.jpg') center top / auto 800px no-repeat, #b09678;
  }
}

/* (...and in a third: the isles in the sky under a veil of night -- light writing on dark) */
.kcard.th-isles {
  --pa-paper: #141c2c; --pa-ink: #f0ead8; --pa-soft: #c4ccd8; --pa-faint: #a0acbe; --pa-brass: #e2b868; --pa-rule: rgba(132, 152, 182, 0.7);
  --pa-red: #f07c64; --pa-green: #84ce70; --pa-slot: rgba(34, 44, 64, 0.82); --pa-slot-edge: rgba(132, 152, 182, 0.4);
  background: radial-gradient(ellipse at 50% 45%, rgba(12, 18, 30, 0.72) 0%, rgba(12, 18, 30, 0.58) 100%),
    url('/static/themes/isles.jpg') center / cover no-repeat, #141c2c;
  border-color: #8498b6;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6), inset 0 0 70px rgba(0, 0, 0, 0.35);
}
.kcard.th-isles .kside, .kcard.th-isles .kcentre, .kcard.th-isles .kbag, .kcard.th-isles .kbag-value {
  background: radial-gradient(ellipse closest-side at center, rgba(12, 18, 30, 0.6) 0%, rgba(12, 18, 30, 0.42) 60%, rgba(12, 18, 30, 0) 100%);
}
.kcard.th-isles .kside, .kcard.th-isles .kcentre { padding: 14px 8px; }
.kcard.th-isles .ksection { color: var(--pa-brass); font-size: 13px; text-shadow: 0 0 10px rgba(12, 18, 30, 0.9); }
.kcard.th-isles .kpart { background: rgba(0, 0, 0, 0.36); }
.kcard.th-isles .kpart.ours { background: rgba(226, 184, 104, 0.16); }
.kcard.th-isles .kpart.ours .kpname { color: #f2d28c; }
.kcard.th-isles .kbar { background: rgba(255, 255, 255, 0.16); }
.kcard.th-isles .kbar.dmg span { background: linear-gradient(90deg, #c8523a, #f08a6c); }
.kcard.th-isles .kbar.heal span { background: linear-gradient(90deg, #5aa046, #9ad884); }
.kcard.th-isles .final { color: var(--pa-brass); border-color: var(--pa-brass); background: rgba(12, 18, 30, 0.5); }
.kcard.th-isles .kfoot { color: var(--pa-soft); }
.kcard.th-isles .silhouette { fill: rgba(255, 255, 255, 0.05); }
.kcard.th-isles .slot.empty { background: rgba(255, 255, 255, 0.05); }
.kcard.th-isles .slot .glyph { stroke: rgba(196, 204, 216, 0.45); }
.kcard.th-isles .ip-diff.up { background: rgba(132, 206, 112, 0.2); } .kcard.th-isles .ip-diff.down { background: rgba(240, 124, 100, 0.2); }
.kcard.th-isles .mark.fame { fill: rgba(240, 124, 100, 0.2); }
@media (max-width: 1000px) {
  .kcard.th-isles {
    background: linear-gradient(rgba(12, 18, 30, 0.62), rgba(12, 18, 30, 0.62)),
      linear-gradient(to bottom, rgba(20, 28, 44, 0) 0, rgba(20, 28, 44, 0) 460px, #141c2c 800px),
      url('/static/themes/isles.jpg') center top / auto 800px no-repeat, #141c2c;
  }
}

.kversus { display: grid; grid-template-columns: 1fr 230px 1fr; gap: 12px; align-items: start; }
.kside { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.krole { font-family: var(--display); font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--pa-faint); }
.kname { font-family: var(--display); font-weight: 700; font-size: 26px; color: var(--pa-ink); line-height: 1.15; margin-top: 2px; overflow-wrap: anywhere; }
.kname:hover { color: var(--pa-brass); text-decoration: none; }
.kguild { color: var(--pa-soft); font-size: 16px; }
.kip { display: flex; align-items: baseline; gap: 4px; margin: 2px 0 12px; }
.kip b { font-family: var(--cmd); font-size: 22px; }
.kip > span { font-size: 12px; color: var(--pa-soft); }
.ip-diff { font-family: var(--font); font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 5px; margin-left: 6px; align-self: center; }
.ip-diff.up { background: rgba(79, 122, 47, 0.16); color: var(--pa-green); }
.ip-diff.down { background: rgba(164, 69, 47, 0.14); color: var(--pa-red); }

.doll { position: relative; padding: 4px 0; }
.silhouette { position: absolute; left: 50%; top: 50%; width: 250px; height: 330px; transform: translate(-50%, -50%); fill: rgba(110, 88, 56, 0.07); }
.doll-grid { position: relative; display: grid; grid-template-columns: repeat(3, 70px); gap: 8px 14px; }
.slot { width: 70px; height: 70px; border-radius: 8px; background: var(--pa-slot); border: 1px solid var(--pa-slot-edge); position: relative; display: inline-grid; place-items: center; }
.slot img { width: 100%; height: 100%; display: block; }
.no-icon { display: grid; place-items: center; width: 100%; height: 100%; padding: 4px; font-family: var(--font); font-size: 9px; line-height: 1.15; text-align: center; color: var(--pa-soft); overflow: hidden; }
.kstrip .no-icon { width: 34px; height: 34px; font-size: 6px; border-radius: 5px; background: var(--pa-slot); }
.slot.blank { background: none; border: 0; }
.slot.empty { background: rgba(110, 88, 56, 0.07); border-style: dashed; }
.slot .glyph { width: 30px; height: 30px; fill: none; stroke: rgba(110, 88, 56, 0.4); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.slot .count { position: absolute; right: 5px; bottom: 3px; font-family: var(--font); font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000; }
.kbuild { margin-top: 12px; display: flex; flex-direction: column; align-items: center; }
.kbuild span { font-family: var(--display); font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--pa-faint); }
.kbuild b { font-family: var(--cmd); font-size: 20px; }
.recovered { margin-top: 8px; font-family: var(--display); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--pa-brass); border: 1px dashed var(--pa-rule); padding: 3px 8px; border-radius: 4px; }

.kcentre { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 6px; }
.emblem { width: 112px; height: 112px; display: block; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35)); }
.kkind { font-family: var(--display); font-weight: 700; font-size: 34px; letter-spacing: 1px; margin-top: 12px; line-height: 1; }
.kwhen { font-family: var(--display); font-size: 12px; letter-spacing: 1.5px; color: var(--pa-soft); margin-top: 6px; }
.kfigure { display: flex; flex-direction: column; align-items: center; margin-top: 18px; }
.kfigure b { font-family: var(--cmd); font-size: 28px; line-height: 1.1; }
.kfigure span { font-family: var(--display); font-size: 10.5px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--pa-soft); margin-top: 2px; }
.mark { width: 30px; height: 30px; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; margin-bottom: 2px; }
.mark.fame { fill: rgba(164, 69, 47, 0.2); stroke: var(--pa-red); }
.mark.silver { fill: none; stroke: var(--pa-soft); }
.karea { margin-top: 16px; font-size: 14px; color: var(--pa-soft); font-style: italic; }

.ksection { display: flex; align-items: center; gap: 14px; margin: 26px 0 12px; font-family: var(--display); font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--pa-ink); }
.ksection::before, .ksection::after { content: ''; flex: 1; height: 1px; background: var(--pa-rule); }
.kbag { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.kbag .slot { width: 60px; height: 60px; }
.kbag-value { text-align: center; margin-top: 8px; color: var(--pa-soft); font-size: 15px; }
.kbag-value b { font-family: var(--cmd); color: var(--pa-ink); }
.kempty { text-align: center; color: var(--pa-faint); font-style: italic; margin: 0; }

.kparts { margin-top: 4px; }
.kpart { display: grid; grid-template-columns: 26px auto minmax(140px, 1fr) minmax(90px, 160px) 52px 104px; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 6px; background: rgba(110, 88, 56, 0.07); margin-bottom: 6px; }
.kpart.ours { background: rgba(156, 115, 39, 0.14); box-shadow: inset 3px 0 0 var(--pa-brass); }
.kcard .ours, .kcard .kpart.ours { color: var(--pa-ink); }
.kcard .kpart.ours .kpname { color: #6b4a12; }
.kpos { font-family: var(--display); font-weight: 700; color: var(--pa-soft); text-align: center; }
.kstrip { display: flex; gap: 3px; }
.kstrip img { width: 34px; height: 34px; border-radius: 5px; background: var(--pa-slot); }
.kwho { display: flex; flex-direction: column; min-width: 0; }
.kpname { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpmeta { color: var(--pa-soft); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role { width: 16px; height: 16px; flex: none; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.role.dmg { stroke: var(--pa-red); }
.role.heal { stroke: var(--pa-green); fill: rgba(79, 122, 47, 0.25); }
.final { font-family: var(--display); font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--pa-brass); border: 1px solid var(--pa-rule); border-radius: 3px; padding: 0 5px; }
.kbar { height: 9px; border-radius: 5px; background: rgba(110, 88, 56, 0.15); overflow: hidden; }
.kbar span { display: block; height: 100%; border-radius: 5px; }
.kbar.dmg span { background: linear-gradient(90deg, #8e3522, #c0573b); }
.kbar.heal span { background: linear-gradient(90deg, #3d6424, #6b9a45); }
.kshare { font-family: var(--cmd); font-weight: 600; text-align: right; }
.kamount { color: var(--pa-soft); font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; }
.kfoot { display: flex; justify-content: space-between; margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--pa-rule); font-family: var(--display); font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--pa-faint); }

@media (max-width: 1000px) {
  .kversus { grid-template-columns: 1fr 1fr; }
  .kcentre { grid-column: 1 / -1; grid-row: 1; }
  .kpart { grid-template-columns: 22px minmax(0, 1fr) 52px; }
  .kpart .kstrip, .kpart .kbar { display: none; }
  .kpart .kamount { grid-column: 2 / -1; text-align: left; }
}
@media (max-width: 640px) {
  .kcard-inner { padding: 18px 12px 10px; }
  .kversus { grid-template-columns: 1fr; }
  .doll-grid { grid-template-columns: repeat(3, 60px); gap: 6px 10px; }
  .slot { width: 60px; height: 60px; }
  .silhouette { width: 210px; height: 290px; }
}

/* ---- the killboard, round two: emblems, silver, previews, battles ---- */
.emblem-img { width: 34px; height: 34px; flex: none; }
.kb-row.assist .kb-link { border-left-color: #8fb35a; }
.worth { color: var(--accent); }
.worth.lost { color: var(--bad); }
.ipd { margin-left: 6px; font-size: 11px; font-weight: 700; padding: 0 5px; border-radius: 4px; white-space: nowrap; }
.kb-link .kill-meta { flex: 0 1 270px; }
.ipd.up { background: var(--good-soft); color: var(--good); }
.ipd.down { background: var(--bad-soft); color: var(--bad); }
.kb-tiles { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat .sub { color: var(--faint); font-size: 12px; margin-top: 2px; }
.stat .value.good { color: var(--good); }
.stat .value.bad { color: var(--bad); }
.stat.with-emblem { display: flex; align-items: center; gap: 14px; }
.tile-emblem { width: 52px; height: 52px; flex: none; }
.sw.a, .bar-a { background: #8fb35a; }
.pair span { width: 30%; }
.assist-text { color: #8fb35a; text-align: right; }
.highlight .num small { color: var(--muted); font-weight: 500; font-size: 12px; }
.karea a { color: var(--pa-brass); font-style: normal; font-family: var(--display); font-size: 12px; letter-spacing: 1px; }

/* ---- a kill, opened over the page ---- */
.kill-dialog { width: min(1180px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); margin: 16px auto;
  padding: 0; border: 0; background: transparent; overflow: auto; overscroll-behavior: contain; }
.kill-dialog::backdrop { background: rgba(10, 7, 4, 0.78); backdrop-filter: blur(2px); }
.kill-dialog .kcard-top { justify-content: flex-end; gap: 8px; margin-bottom: 10px; }
.kill-dialog .notice { background: var(--panel); }
body:has(.kill-dialog[open]) { overflow: hidden; }

/* ---- the killboard, round three: bigger rows, weapons, rivals ---- */
.kb-link.big { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 10px 12px 12px; }
.row-emblem { width: 46px; height: 46px; }
.krow-main { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.krow-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.krow-who { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1 1 0; }
.krow-who .who { flex: 1; }
.krow-gear { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.krow-gear .strip { display: flex; gap: 3px; padding-right: 4px; }
.krow-gear .strip img { width: 32px; height: 32px; border-radius: 5px; background: var(--panel-2); }
.chip-part { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.chip-part b { color: var(--text); font-weight: 600; }
.chip-part.killer { background: var(--good-soft); }
.chip-part.assist { background: rgba(143, 179, 90, 0.14); }
.chip-part.victim { background: var(--bad-soft); }
.krow-nums { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; min-width: 150px; }
.krow-silver { font-size: 19px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.krow-silver.lost { color: var(--bad); }
.krow-silver small, .krow-fame small { font-size: 12px; font-weight: 500; color: var(--muted); }
.krow-fame { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.krow-meta { color: var(--muted); font-size: 12px; }
.kb-row .krow-meta .ipd { display: inline-block; margin-top: 3px; }
.more { margin-top: 10px; }

.weapons { list-style: none; margin: 0; padding: 0; }
.weapons li { display: flex; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); }
.weapons li:first-child { border-top: 0; }
.weapon-icon { width: 44px; height: 44px; border-radius: 8px; background: var(--panel-2); flex: none; }
.weapons .main { flex: 1; min-width: 0; }
.weapon-line { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.weapons .weapon-name { font-size: 14px; }
.weapons .num { font-size: 12px; white-space: nowrap; }
.weapons .bar { margin-top: 4px; }
.weapons .bar.against span { background: var(--bad); }
.weapons .meta { font-size: 12px; margin-top: 2px; }
.rivals td:nth-child(2), .rivals td:nth-child(3) { text-align: right; }

@media (max-width: 720px) {
  .kb-link.big { grid-template-columns: 38px minmax(0, 1fr); }
  .row-emblem { width: 38px; height: 38px; }
  .krow-nums { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 10px; min-width: 0; }
  .krow-top { flex-wrap: wrap; }
}
.card-note { color: var(--muted); font-size: 13px; margin: -4px 0 10px; }
.kbuild.kept b { color: var(--pa-faint); text-decoration: line-through; text-decoration-thickness: 1px; }
.kept-note { color: var(--pa-soft); }
.kept-explain { margin-top: 10px; max-width: 220px; font-size: 13px; line-height: 1.35; color: var(--pa-soft); font-style: italic; }

/* ---- awakened weapons: the soul, its traits and their rolls ---- */
.awakened-slot { box-shadow: 0 0 0 2px #c79a3a, 0 0 10px 2px rgba(214, 166, 78, 0.55); border-color: #c79a3a !important; }
.awakened { margin-top: 12px; width: 100%; max-width: 290px; text-align: left; border: 1px solid var(--pa-rule); border-radius: 8px; padding: 10px 12px; background: rgba(156, 115, 39, 0.08); }
.aw-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.aw-title { font-family: var(--display); font-size: 10.5px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--pa-brass); }
.aw-attune { font-size: 13px; color: var(--pa-soft); }
.aw-attune b { font-family: var(--cmd); font-size: 20px; color: var(--pa-ink); }
.aw-points { font-size: 11.5px; color: var(--pa-faint); }
.aw-quality { display: flex; flex-direction: column; align-items: center; font-family: var(--display); font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--pa-soft); }
.gauge { width: 46px; height: 46px; }
.gauge-track { fill: none; stroke: rgba(110, 88, 56, 0.18); stroke-width: 5; }
.gauge-arc { fill: none; stroke: var(--pa-brass); stroke-width: 5; stroke-linecap: round; }
.gauge-text { font-family: var(--cmd); font-size: 11px; font-weight: 600; text-anchor: middle; fill: var(--pa-ink); }
.traits { list-style: none; margin: 10px 0 6px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.trait { display: flex; gap: 9px; align-items: flex-start; }
.trait-badge { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 1px solid currentColor; background: rgba(255, 255, 255, 0.35); }
.trait-icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.trait-main { flex: 1; min-width: 0; }
.trait-line { display: flex; align-items: baseline; gap: 5px; font-size: 14px; line-height: 1.2; }
.trait-line b { font-family: var(--cmd); font-weight: 600; }
.trait-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trait-roll { font-family: var(--cmd); font-size: 12px; font-weight: 600; }
.trait-roll.great { color: var(--pa-green); }
.trait-roll.fair { color: var(--pa-brass); }
.trait-roll.low { color: var(--pa-red); }
.roll-track { position: relative; height: 7px; margin-top: 4px; border-radius: 4px; overflow: hidden;
  background: rgba(110, 88, 56, 0.15) repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), rgba(110, 88, 56, 0.35) calc(25% - 1px) 25%); }
.roll-fill { display: block; height: 100%; border-radius: 4px; background: currentColor; opacity: 0.85; }
.roll-ends { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--pa-faint); margin-top: 1px; }
.awakened .offense { color: #a4452f; }
.awakened .defense { color: #52657a; }
.awakened .healing { color: #4f7a2f; }
.awakened .energy { color: #2f6fa4; }
.awakened .utility { color: #9c7327; }
.trait-line, .roll-ends { color: var(--pa-ink); }
.roll-ends { color: var(--pa-faint); }
.aw-meta { font-size: 12px; color: var(--pa-soft); font-style: italic; }
.trait-art { width: 30px; height: 30px; flex: none; filter: drop-shadow(0 1px 1px rgba(60, 40, 20, 0.35)); }

/* ---- the front page: kills of the week ---- */
.kills-week .quiet-link { display: inline-block; margin-top: 10px; }
.kw-main { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px;
  border-radius: 10px; color: var(--text); background: linear-gradient(90deg, var(--accent-soft), transparent 70%); border: 1px solid var(--line); }
.kw-main:hover, .kw-runner:hover { text-decoration: none; border-color: var(--accent); }
.kw-emblem { width: 76px; height: 76px; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4)); }
.kw-emblem.small { width: 34px; height: 34px; }
.kw-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.kw-eyebrow { font-family: var(--display); font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--accent); }
.kw-fight { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 16px; }
.kw-fight b { font-weight: 600; }
.kw-ours { color: var(--accent); }
.kw-arrow { color: var(--faint); }
.kw-guild { color: var(--muted); font-size: 13px; }
.kw-weapon { width: 36px; height: 36px; border-radius: 7px; background: var(--panel-2); }
.kw-weapon.awakened { box-shadow: 0 0 0 2px #c79a3a, 0 0 8px 1px rgba(214, 166, 78, 0.5); }
.kw-gear { display: flex; gap: 3px; flex-wrap: wrap; }
.kw-gear img { width: 34px; height: 34px; border-radius: 6px; background: var(--panel-2); }
.kw-meta { color: var(--muted); font-size: 13px; }
.kw-worth { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.kw-silver { font-size: 28px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1.1; }
.kw-silver small { font-size: 13px; font-weight: 500; color: var(--muted); }
.kw-silver.small { font-size: 17px; }
.kw-fame { color: var(--muted); font-size: 14px; }
.kw-runners { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; margin-top: 10px; }
.kw-runner { display: grid; grid-template-columns: auto 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px;
  border-radius: 10px; border: 1px solid var(--line); color: var(--text); }
.kw-runner .kw-fight { font-size: 14px; flex-wrap: nowrap; overflow: hidden; }
.kw-runner .kw-fight b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kw-runner .kw-meta { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kw-place { font-family: var(--display); font-weight: 700; color: var(--faint); }
@media (max-width: 720px) {
  .kw-main { grid-template-columns: 52px minmax(0, 1fr); }
  .kw-emblem { width: 52px; height: 52px; }
  .kw-worth { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 12px; }
}

/* ---- the dashboard's tabs, and the Bot Hub ---- */
.subnav { display: flex; gap: 6px; margin: -6px 0 18px; border-bottom: 1px solid var(--line); }
.subnav a { font-family: var(--display); font-size: 14px; font-weight: 700; letter-spacing: 0.6px; color: var(--muted);
  padding: 8px 16px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subnav a:hover { color: var(--text); text-decoration: none; }
.subnav a.on { color: var(--accent); border-bottom-color: var(--accent); }
.hub-intro { color: var(--muted); margin: 0 0 16px; }
.hub-bots { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 26px; }
.hub-bot { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; border-radius: var(--radius); background: var(--panel);
  border: 1px solid var(--line); color: var(--text); transition: border-color 0.15s, transform 0.15s; }
.hub-bot:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); }
.hub-bot-head { display: flex; align-items: center; gap: 10px; }
.hub-bot-head h2 { font-family: var(--display); font-size: 22px; margin: 0; }
.hub-about { color: var(--muted); margin: 0; font-size: 14px; }
.hub-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.hub-progress .bar { margin-top: 4px; }
.hub-open { margin-top: auto; font-family: var(--display); font-size: 13px; color: var(--accent); }
.hub-subhead { font-family: var(--display); font-size: 18px; margin: 0 0 12px; }
.hub-bot-title h2 { font-family: var(--display); font-size: 26px; margin: 6px 0 2px; }
.hub-bot-title { margin-bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.hub-notice { margin-bottom: 16px; }
.hub-grid { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
.hub-section.wide { grid-column: 1 / -1; }
.hub-section .card-note { margin-top: -4px; }
.settings { list-style: none; margin: 0; padding: 0; }
.settings li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 16px; padding: 10px 0; border-top: 1px solid var(--line); align-items: center; }
.settings li:first-child { border-top: 0; }
.setting-name { display: flex; flex-direction: column; min-width: 0; }
.setting-name b { font-weight: 600; font-size: 14px; }
.setting-name .meta { font-size: 12px; }
.setting-value { justify-self: end; text-align: right; min-width: 0; }
.setting-issue { grid-column: 1 / -1; color: var(--bad); font-size: 13px; }
.settings li.has-issue { background: linear-gradient(90deg, var(--bad-soft), transparent 60%); }
.vchip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); white-space: nowrap; }
.vchip .hash { color: var(--faint); font-weight: 700; }
.vchip.category { text-transform: uppercase; font-size: 12px; letter-spacing: 0.5px; }
.vchip.gone { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.vchip .swatch { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); }
.vchips { display: inline-flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.vtext { margin: 0; text-align: left; font-family: var(--serif); font-size: 15px; color: var(--text); background: var(--panel-2);
  border-left: 3px solid var(--line-strong); padding: 6px 10px; border-radius: 0 6px 6px 0; white-space: pre-wrap;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.vnum { font-variant-numeric: tabular-nums; font-weight: 600; }
.unset { color: var(--faint); font-style: italic; font-size: 13px; }
.rows li.inactive { opacity: 0.55; }
.role-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.role-col { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.role-col-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-family: var(--display); font-size: 13px; }
.role-col-list { display: flex; flex-wrap: wrap; gap: 5px; }
.role-chip { font-size: 12.5px; padding: 3px 9px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); }
@media (max-width: 720px) {
  .hub-grid { grid-template-columns: 1fr; }
  .settings li { grid-template-columns: 1fr; }
  .setting-value { justify-self: start; text-align: left; }
  .vchips { justify-content: flex-start; }
}
.default-tag { margin-left: 6px; font-size: 11px; color: var(--faint); font-style: italic; }

/* ---- the Bot Hub, round two: setup paths, the step rail, pictures ---- */
.step-dots { display: flex; gap: 4px; margin-top: 6px; }
.step-dot { flex: 1; height: 6px; border-radius: 3px; background: var(--panel-2); }
.step-dot.done { background: var(--good); }
.step-dot.partial { background: var(--warn); }
.step-dot.problem { background: var(--bad); }
.step-dot.off { background: var(--line); }
.hub-next { font-size: 13px; color: var(--muted); }
.hub-next b { color: var(--text); }

.setup-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
.step-rail { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 2px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.step-rail a { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; color: var(--text); font-size: 14px; }
.step-rail a:hover { background: var(--panel-2); text-decoration: none; }
.step-rail a .meta { margin-left: auto; font-size: 11px; }
.steps { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.step-num { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font-family: var(--display);
  font-weight: 700; font-size: 15px; background: var(--panel-2); border: 2px solid var(--line-strong); color: var(--muted); }
.step-num.small { width: 24px; height: 24px; font-size: 12px; border-width: 1.5px; }
.step-num.done { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.step-num.partial { border-color: var(--warn); color: var(--warn); }
.step-num.problem { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.step-num.off { border-style: dashed; }
.step { scroll-margin-top: 80px; }
.step.problem { border-color: var(--bad); }
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.step-titles { flex: 1; min-width: 0; }
.step-titles h2 { font-family: var(--display); font-size: 19px; margin: 0; }
.step-about { margin: 0 0 8px; color: var(--text); font-size: 15px; line-height: 1.5; }
.step-how { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.step-how code { font-family: var(--cmd); font-size: 13px; color: var(--accent); background: var(--panel-2); padding: 2px 8px; border-radius: 6px; }
.step-note { background: var(--bad-soft); color: var(--bad); border-radius: 8px; padding: 8px 12px; font-size: 14px; margin-bottom: 10px; }
.req { color: var(--accent); }
.step-list { margin-top: 10px; }
.step-list-title { font-family: var(--display); font-size: 13px; letter-spacing: 0.5px; color: var(--muted); margin-bottom: 4px; }
.vchips.left { justify-content: flex-start; }

/* pictures: Discord as it looks */
.pic { margin: 6px 0 14px; }
.pic figcaption { font-size: 12px; color: var(--faint); margin-top: 6px; }
.dc-sidebar { background: #2b2d31; border-radius: 10px; padding: 10px 8px; max-width: 520px; font-family: var(--font); color: #949ba4; }
.dc-cat { margin-bottom: 8px; }
.dc-cat-name { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; padding: 4px 6px; }
.dc-cat-name.used { color: #dbdee1; }
.dc-chan { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 14px; border-radius: 5px; font-size: 14px; opacity: 0.55; }
.dc-chan.used { opacity: 1; color: #dbdee1; background: rgba(79, 84, 92, 0.32); }
.dc-mark { width: 14px; text-align: center; color: #80848e; }
.dc-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-tag { font-size: 11px; font-weight: 600; text-transform: none; letter-spacing: 0; color: #1d1409; background: var(--accent); padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.dc-chat { background: #313338; border-radius: 10px; padding: 14px 16px; max-width: 620px; font-family: var(--font); color: #dbdee1; }
.dc-msg { display: flex; gap: 14px; }
.dc-avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--accent); color: #1d1409; display: grid; place-items: center; font-weight: 700; font-family: var(--display); }
.dc-body { min-width: 0; flex: 1; }
.dc-head { display: flex; align-items: baseline; gap: 6px; margin-bottom: 2px; }
.dc-head b { color: #f2f3f5; font-weight: 600; }
.dc-bot { font-size: 10px; font-weight: 700; background: #5865f2; color: #fff; padding: 0 4px; border-radius: 3px; }
.dc-time { font-size: 12px; color: #949ba4; }
.dc-text { font-size: 15px; line-height: 1.4; white-space: pre-wrap; }
.dc-mention { background: rgba(88, 101, 242, 0.3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; font-weight: 500; }
.dc-embed { background: #2b2d31; border-left: 4px solid #e67e22; border-radius: 4px; padding: 10px 14px; margin-top: 4px; max-width: 480px; }
.dc-embed-title { font-weight: 700; color: #f2f3f5; margin-bottom: 4px; }
.dc-buttons { margin-top: 8px; }
.dc-button { display: inline-block; background: #5865f2; color: #fff; font-size: 14px; font-weight: 500; padding: 7px 16px; border-radius: 4px; }

@media (max-width: 900px) {
  .setup-layout { grid-template-columns: 1fr; }
  .step-rail { position: static; flex-direction: row; overflow-x: auto; }
  .step-rail a span:not(.step-num) { display: none; }
}

/* ---- the front page: our bots ---- */
.bots-section { grid-column: 1 / -1; margin-top: 8px; }
.bots-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.bots-head h2 { font-family: var(--display); font-size: 22px; margin: 0; }
.bots-head p { margin: 0; color: var(--muted); font-family: var(--serif); font-size: 17px; font-style: italic; }
.bot-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bot-card { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.bot-head { display: flex; align-items: center; gap: 14px; }
.bot-avatar { width: 56px; height: 56px; flex: none; border-radius: 50%; border: 2px solid var(--accent); object-fit: cover;
  display: grid; place-items: center; background: var(--panel-2); color: var(--accent); font-family: var(--display); font-size: 24px; }
.bot-head h3 { font-family: var(--display); font-size: 21px; margin: 0; letter-spacing: 0.3px; }
.bot-tagline { color: var(--accent); font-family: var(--serif); font-style: italic; font-size: 16px; }
.bot-about { margin: 0; font-size: 15px; line-height: 1.5; }
.bot-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.bot-features li { display: flex; gap: 9px; align-items: baseline; }
.bot-features li::before { content: "\25C6"; color: var(--accent); font-size: 9px; flex: none; transform: translateY(-1px); }
.bot-actions { margin-top: auto; padding-top: 6px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.link-button { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--muted); cursor: pointer; }
.link-button:hover { color: var(--accent); }
@media (max-width: 900px) {
  .bot-cards { grid-template-columns: 1fr; }
}

/* ---- pages still in the works (the Party builder) ---- */
.soon { max-width: 1080px; }
.soon-hero { padding: 18px 0 22px; }
.soon-hero h1 { font-family: var(--display); font-size: 34px; margin: 6px 0 10px; }
.soon-lead { font-family: var(--serif); font-size: 21px; line-height: 1.45; margin: 0; max-width: 720px; }
.soon-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.soon-card h2 { font-family: var(--display); font-size: 17px; margin: 0 0 8px; }
.soon-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.soon-note { color: var(--faint); font-size: 14px; margin: 18px 0 0; }
.dot.warn { background: var(--warn); }

/* ---- The Backroom: always dark, whatever the theme ---- */
body.backroom-page { background: radial-gradient(ellipse at 50% 30%, #1d150d 0%, #0b0806 60%, #050403 100%); color: #d9c9ab;
  --bg: #0b0806; --panel: #120d09; --panel-2: #1a130c; --line: #2c2116; --line-strong: #3b2c1c;
  --text: #e6d6b8; --muted: #a8916c; --faint: #7a6649; }
.backroom { display: grid; place-items: center; }
.door { max-width: 460px; text-align: center; padding: 56px 32px 48px; margin: 40px auto; border: 1px solid #3b2c1c;
  border-radius: 14px 14px 4px 4px; background: linear-gradient(180deg, #16100a 0%, #0c0906 100%);
  box-shadow: 0 0 80px rgba(227, 169, 79, 0.06), inset 0 1px 0 rgba(227, 169, 79, 0.08); }
.door-lock { width: 46px; height: 46px; color: #c89a52; margin-bottom: 14px; }
.door h1 { font-family: var(--display); font-size: 32px; letter-spacing: 1px; margin: 0 0 6px; color: #eadbbd; }
.door-lead { font-family: var(--serif); font-style: italic; font-size: 20px; color: #c89a52; margin: 0 0 16px; }
.door p { line-height: 1.55; }
.door-small { font-size: 14px; color: #8a7456; margin-top: 18px; }
.backroom-page footer a { color: #8a7456; }

@media (max-width: 900px) {
  .soon-grid { grid-template-columns: 1fr; }
}

/* the Backroom's door: signing in and codes */
.door-note { color: #c89a52; font-size: 15px; }
.door-action { margin-top: 22px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.door-action p { margin: 0; color: var(--muted); font-size: 15px; }
.code-form { display: flex; gap: 8px; }
.code-input, .invite-link, .room-select { background: #080604; color: var(--text); border: 1px solid var(--line-strong);
  border-radius: 8px; padding: 8px 12px; font: inherit; font-size: 15px; }
.code-input { width: 150px; text-align: center; letter-spacing: 2px; text-transform: uppercase; font-family: var(--cmd, monospace); }
.code-input:focus, .invite-link:focus, .room-select:focus { outline: none; border-color: var(--accent); }
.door-lock { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* the Backroom, inside */
.backroom .room { width: 100%; max-width: 1000px; align-self: start; }
.room-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 8px 0 20px; }
.room-head h1 { font-family: var(--display); font-size: 32px; letter-spacing: 1px; margin: 0; color: #eadbbd; }
.room-status { margin: 6px 0 0; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.room-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.room-panel { background: linear-gradient(180deg, #15100a 0%, #0f0b07 100%); border: 1px solid var(--line-strong);
  border-radius: 12px; padding: 18px 20px; min-width: 0; }
.room-panel + .room-panel, .room-grid + .room-panel { margin-top: 16px; }
.room-grid .room-panel { margin-top: 0; }
.room-panel h2 { font-family: var(--display); font-size: 17px; margin: 0 0 10px; color: #eadbbd; }
.room-note { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0 0 14px; }
.room-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.room-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.room-avatar { width: 32px; height: 32px; border-radius: 50%; flex: none; }
.invite-fresh { margin: 14px 0 4px; padding: 12px 14px; border: 1px dashed var(--accent); border-radius: 10px; background: rgba(227, 169, 79, 0.05); }
.invite-fresh-head { font-size: 13px; color: var(--accent); margin-bottom: 8px; }
.invite-fresh .meta { margin-top: 8px; font-size: 13px; color: var(--muted); }
.invite-link { flex: 1; min-width: 0; font-size: 13px; }
.invite-code { font-family: var(--cmd, monospace); letter-spacing: 1px; color: var(--text); }
.invite-rows { margin-top: 12px; }
.invite-hint { font-family: var(--cmd, monospace); color: var(--faint); font-size: 13px; width: 86px; flex: none; }
.invite-open { color: var(--accent) !important; }
.invite-expired, .invite-revoked { color: var(--faint) !important; }
button.danger { border-color: var(--bad); color: var(--bad); background: transparent; }
button.danger:hover { background: var(--bad-soft); }
.room-status .dot { display: inline-block; }

@media (max-width: 800px) {
  .room-grid { grid-template-columns: 1fr; }
}

/* the Backroom's chat: bottom left, like the game's */
.chat { position: fixed; left: 16px; bottom: 16px; width: 400px; max-width: calc(100vw - 32px); z-index: 20;
  display: flex; flex-direction: column; background: rgba(6, 4, 3, 0.82); border: 1px solid rgba(200, 154, 82, 0.35);
  border-radius: 6px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55); font-family: var(--font); backdrop-filter: blur(3px); }
.chat-tabs { display: flex; align-items: flex-end; gap: 2px; padding: 4px 6px 0; border-bottom: 1px solid rgba(200, 154, 82, 0.25); }
.chat-tab { font-size: 12px; font-weight: 600; letter-spacing: 0.3px; padding: 4px 12px 5px; border-radius: 4px 4px 0 0;
  color: #b49a74; background: rgba(255, 255, 255, 0.04); }
.chat-tab.on { color: #f0dcb4; background: rgba(200, 154, 82, 0.18); }
.chat-toggle { margin-left: auto; background: none; border: 0; color: #b49a74; font-size: 14px; padding: 2px 6px 4px; cursor: pointer; }
.chat-toggle:hover { color: #f0dcb4; }
.chat-lines { height: 220px; overflow-y: auto; padding: 6px 10px; font-size: 13.5px; line-height: 1.45;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.8); scrollbar-width: thin; scrollbar-color: rgba(200, 154, 82, 0.35) transparent; }
.chat-line { color: #eee3cf; overflow-wrap: anywhere; }
.chat-time { color: #7a6649; font-size: 11.5px; margin-right: 6px; font-variant-numeric: tabular-nums; }
.chat-chan { color: #e8b75a; margin-right: 5px; }
.chat-chan.host { color: #f07a4a; font-weight: 600; }
.chat-name { font-weight: 600; margin-right: 5px; }
.chat-line.system { color: #c9b38c; font-style: italic; }
.chat-line.note { color: #8a7456; font-size: 12.5px; }
.chat-form { padding: 6px 8px 8px; }
.chat-say { width: 100%; box-sizing: border-box; background: rgba(0, 0, 0, 0.55); color: #f0e4cc; border: 1px solid rgba(200, 154, 82, 0.3);
  border-radius: 4px; padding: 6px 9px; font: inherit; font-size: 13.5px; }
.chat-say:focus { outline: none; border-color: #c89a52; }
.chat.min .chat-lines, .chat.min .chat-form { display: none; }
.chat.min .chat-tabs { border-bottom: 0; padding-bottom: 4px; }
.chat.min .chat-tab { border-radius: 4px; }
body.backroom-page main { padding-bottom: 300px; }  /* room to scroll everything clear of the chat */

@media (max-width: 720px) {
  .chat { left: 8px; bottom: 8px; max-width: calc(100vw - 16px); }
  .chat-lines { height: 160px; }
}

/* the Backroom's chips */
.chips-pill { font-family: var(--cmd); font-weight: 600; font-size: 14px; color: #f0d27a; background: rgba(240, 210, 122, 0.08);
  border: 1px solid rgba(240, 210, 122, 0.3); border-radius: 999px; padding: 2px 10px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cashier-form { margin-bottom: 6px; }
.amount-input { width: 110px; letter-spacing: 0.5px; text-transform: none; }
.cashier-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted); }
.cashier-foot b { color: #f0d27a; font-family: var(--cmd); }
.my-chips { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.my-chips span { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.my-chips b { font-family: var(--cmd); font-size: 28px; color: #f0d27a; line-height: 1; }
.my-chips small { font-size: 12px; color: var(--muted); }
.chips-pill small { font-family: var(--font); font-weight: 400; font-size: 11px; color: var(--muted); margin-left: 6px; }
.room-panel.owed { border-color: rgba(240, 122, 74, 0.5); margin-bottom: 16px; }

/* the Backroom's tables */
.table-form { margin: 4px 0 14px; }
.stake-worth { font-size: 13px; color: var(--muted); }
.rules b { color: #eadbbd; }
.table-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.table-card { border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px 14px; background: rgba(0, 0, 0, 0.25);
  display: flex; flex-direction: column; gap: 10px; }
.table-card.open { border-style: dashed; }
.table-card.playing { border-color: rgba(232, 183, 90, 0.6); box-shadow: 0 0 24px rgba(232, 183, 90, 0.07); }
.table-card.mine { background: rgba(232, 183, 90, 0.05); }
.table-card.done { opacity: 0.85; }
.table-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.table-head > b { font-family: var(--display); font-size: 16px; color: #eadbbd; }
.table-pot { margin-left: auto; font-size: 13px; color: #f0d27a; font-family: var(--cmd); }
.table-players { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; }
.table-player { padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line-strong); }
.table-player.turn { border-color: #e8b75a; color: #f0d27a; box-shadow: 0 0 10px rgba(232, 183, 90, 0.35); }
.table-player.won { border-color: var(--good); color: var(--good); }
.table-player.lost { border-color: var(--bad); color: var(--bad); text-decoration: line-through; }
.table-player.empty-seat { border-style: dashed; color: var(--faint); }
.table-vs { font-size: 12px; color: var(--faint); font-style: italic; }
.rolls { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rolls li { display: flex; align-items: baseline; gap: 5px; font-size: 12px; padding: 3px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.04); }
.rolls li b { font-family: var(--cmd); font-size: 15px; color: #eadbbd; }
.rolls li small { color: var(--faint); }
.rolls .roll-name { color: var(--muted); }
.rolls li.one { background: var(--bad-soft); }
.rolls li.one b { color: var(--bad); }
.table-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.roll-button { font-size: 16px; padding: 8px 18px; }
.countdown { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.table-result { font-family: var(--serif); font-size: 17px; color: var(--good); }
.room > .room-panel.tables-full { margin-top: 16px; }

/* the sign-in page, while the site is members only */
.signin { display: grid; place-items: center; }
.signin-card { max-width: 440px; text-align: center; padding: 44px 32px 36px; margin: 48px auto; background: var(--panel);
  border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.signin-card h1 { font-family: var(--display); font-size: 26px; margin: 4px 0 0; }
.signin-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.brand-mark.big { width: 96px; height: 96px; }
.signin-note { color: var(--warn) !important; }
.signin-code { margin-top: 6px; text-align: left; font-size: 14px; color: var(--muted); }
.signin-code summary { cursor: pointer; color: var(--faint); text-align: center; }
.signin-code p { margin: 10px 0 8px; }
.signin-code form, .code-make { display: flex; gap: 8px; flex-wrap: wrap; }
.signin-code input, .code-make input { flex: 1 1 180px; padding: 8px 12px; border-radius: 8px; font-size: 14px; }
.signin-code input { text-transform: uppercase; letter-spacing: 1px; }
.links-code { min-height: 22px; margin: 8px 0; font-size: 14px; color: var(--accent); }
.links-body .rows li { gap: 6px; }
.signin-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; text-align: left; color: var(--muted); font-size: 14.5px; line-height: 1.4; }
.signin-list b { color: var(--text); }
.welcome { max-width: 1180px; width: 100%; margin: 0 auto; padding: 22px 24px 0; display: grid; gap: 14px; box-sizing: border-box; }
.welcome-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.welcome-head h2 { font-family: var(--display); font-size: 22px; margin: 0; }
.welcome-head p { margin: 0; color: var(--muted); font-family: var(--serif); font-size: 17px; font-style: italic; flex: 1 1 240px; }
.welcome-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.welcome-card { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; margin: 0; text-decoration: none; color: inherit; }
a.welcome-card:hover { border-color: var(--accent); }
.welcome-card h3 { font-family: var(--display); font-size: 16px; margin: 0; color: var(--accent); }
.welcome-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; flex: 1; }
.welcome-small { margin: 0; font-size: 13px; color: var(--faint); }
@media (max-width: 1000px) { .welcome-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .welcome-cards { grid-template-columns: 1fr; } }
.signin-small { font-size: 13px; color: var(--faint) !important; }

/* picking people (dashboard managers, Backroom hosts) */
.people .person-mark { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--panel-2); border: 1px solid var(--line-strong); font-family: var(--display); font-size: 13px; color: var(--accent); }
.people-add { position: relative; margin-top: 10px; }
.people-search { width: 100%; box-sizing: border-box; background: var(--panel-2); color: var(--text); border: 1px solid var(--line-strong);
  border-radius: 8px; padding: 8px 12px; font: inherit; font-size: 14px; }
.people-search:focus { outline: none; border-color: var(--accent); }
.people-results { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.people-results .empty { padding: 4px 2px; }
.people-pick { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 6px 10px; }
.people-pick img { width: 24px; height: 24px; border-radius: 50%; }
.people-add-mark { margin-left: auto; font-size: 12px; color: var(--accent); }
.invite-code-box { font-family: var(--cmd, monospace); font-size: 22px; letter-spacing: 3px; text-align: center; color: #f0d27a; max-width: 240px; }

/* a fight's page: alliance against alliance */
.vs-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; }
.vs-us { color: var(--good); }
.vs-them { color: var(--bad); }
.vs-word { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--faint); text-transform: lowercase; }
.vs-more { font-size: 16px; color: var(--faint); }
.sides { margin-bottom: 16px; }
.sides-head { display: flex; justify-content: space-between; font-family: var(--display); font-size: 17px; margin-bottom: 6px; }
.side-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) 90px; align-items: center; gap: 12px; padding: 6px 0; }
.side-us-n { color: var(--good); font-size: 18px; font-variant-numeric: tabular-nums; }
.side-them-n { color: var(--bad); font-size: 18px; text-align: right; font-variant-numeric: tabular-nums; }
.side-mid { display: flex; flex-direction: column; gap: 4px; }
.side-label { text-align: center; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); }
.side-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--panel-2); }
.side-bar-us { background: var(--good); }
.side-bar-them { background: var(--bad); }
.mvps { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.mvp { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); padding: 12px 14px; }
.mvp-title { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); }
.mvp-name { display: block; font-family: var(--display); font-size: 17px; color: var(--text); margin: 4px 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mvp-value { font-size: 20px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.mvp-damage { border-top-color: var(--bad); }
.mvp-healing { border-top-color: var(--good); }
.kb-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.kb-main .more { width: 100%; }
.kb-main .kb-feed:not(.hidden) { margin-top: 12px; }
.mvp-unit { font-size: 13px; font-weight: 400; color: var(--muted); }
.mvp-detail { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.mvp-detail:hover { color: var(--accent); }
.mvp-kill_value { border-top-color: var(--good); }
.mvp-death_value { border-top-color: var(--faint); }
.best-mark { color: var(--accent); }
.best-row td { background: rgba(227, 169, 79, 0.08); }
/* between killer and victim: who killed whom, in words */
.arrow.killed, .kw-arrow { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--muted); white-space: nowrap; }

/* the Backroom: who's connected right now, and leaving */
.avatar-wrap { position: relative; flex: none; display: inline-flex; }
.online-dot { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%;
  background: #4a3d2c; border: 2px solid #120d09; }
.online-dot.on { background: var(--good); box-shadow: 0 0 6px var(--good); }
.guest-corner { display: flex; align-items: flex-end; gap: 14px; }
.leave.locked { opacity: 0.5; }

body.backroom-page main, body.backroom-page header, body.backroom-page footer { position: relative; z-index: 1; }

.rolls li.rolling b { color: var(--accent); }
.rolls li.landed { animation: roll-land 0.35s ease-out; }
.rolls li.one.landed { animation: roll-one 0.6s ease-out; }
@keyframes roll-land { 0% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes roll-one {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-6px) scale(1.25); } 30% { transform: translateX(6px); }
  45% { transform: translateX(-4px); } 60% { transform: translateX(4px); } 75% { transform: translateX(-2px); }
}
.table-card.just-won { animation: won-glow 1.4s ease-in-out 2; }
@keyframes won-glow { 50% { box-shadow: 0 0 34px rgba(126, 201, 106, 0.45); border-color: var(--good); } }
.table-result { animation: won-pop 0.5s ease-out; }
@keyframes won-pop { 0% { transform: scale(0.8); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .rolls li.landed, .rolls li.one.landed, .table-card.just-won, .table-result { animation: none; }
}

.history { background: rgba(6, 4, 3, 0.82); border: 1px solid rgba(200, 154, 82, 0.35); border-radius: 6px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55); backdrop-filter: blur(3px); }
.history.min .history-list { display: none; }
.history-list { list-style: none; margin: 0; padding: 6px 10px 8px; max-height: 220px; overflow-y: auto; font-size: 13px; }
.history-list li { display: flex; align-items: baseline; gap: 8px; padding: 4px 0; border-top: 1px solid rgba(200, 154, 82, 0.12); color: #e6d6b8; }
.history-list li:first-child { border-top: 0; }
.history-time { color: #7a6649; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.history-what { flex: 1; min-width: 0; }
.history-what b { color: var(--good); }
.history-pot { color: #f0d27a; font-family: var(--cmd); white-space: nowrap; }

/* the tables: dark felt ringed in gold */
.table-card { background: radial-gradient(ellipse at 50% 35%, #1d1610 0%, #110c08 58%, #0a0705 100%);
  border: 1px solid rgba(201, 154, 72, 0.45); border-radius: 18px;
  box-shadow: inset 0 0 0 5px rgba(201, 154, 72, 0.06), inset 0 0 40px rgba(0, 0, 0, 0.6); }
.table-card.open { border-style: dashed; }
.table-rules summary { cursor: pointer; color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.table-extra { display: contents; }
.table-call { margin: 0; font-family: var(--serif); font-style: italic; color: var(--muted); }
.rolls li.roll-round { background: none; color: var(--accent); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }

/* the coin: flips in 3D and lands */
.coin-stage { display: grid; place-items: center; perspective: 700px; padding: 8px 0 4px; }
.coin { width: 150px; height: 150px; position: relative; transform-style: preserve-3d; }  /* big enough to read HEADS / TAILS */
.coin-face { position: absolute; inset: 0; width: 100%; height: 100%; backface-visibility: hidden; border-radius: 50%;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.6)); }
/* it turns about its own axis (--ax, --ay: upright, sideways or cornerwise), and rests heads or tails up (--rest) */
.coin-face.tails { transform: rotate3d(var(--ax, 0), var(--ay, 1), 0, 180deg); }
.coin { transform: rotate3d(var(--ax, 0), var(--ay, 1), 0, var(--rest, 0deg)); }
.coin.flipping { animation: 3.6s both; }
/* three ways down: a high lob that drops and settles; a quick snap that spins itself out on the felt; a toss that bounces */
.coin.flipping.flight-lob { animation-name: coin-lob; animation-timing-function: cubic-bezier(0.3, 0.6, 0.4, 1); }
.coin.flipping.flight-snap { animation-name: coin-snap; animation-timing-function: cubic-bezier(0.15, 0.7, 0.2, 1); }
.coin.flipping.flight-bounce { animation-name: coin-bounce; animation-timing-function: ease-out; }
@keyframes coin-lob {
  0% { transform: translate(0, 0) rotateZ(0deg) rotate3d(var(--ax), var(--ay), 0, 0deg) scale(1); }
  40% { transform: translate(var(--dx), var(--peak)) rotateZ(var(--lean)) rotate3d(var(--ax), var(--ay), 0, var(--mid)) scale(1.2); }
  80% { transform: translate(0, 0) rotateZ(0deg) rotate3d(var(--ax), var(--ay), 0, calc(var(--end) - 200deg)) scale(1); }
  88% { transform: translate(0, -12px) rotate3d(var(--ax), var(--ay), 0, calc(var(--end) - 50deg)); }
  95% { transform: translate(0, 0) rotate3d(var(--ax), var(--ay), 0, calc(var(--end) + 12deg)); }
  100% { transform: translate(0, 0) rotate3d(var(--ax), var(--ay), 0, var(--end)); }
}
@keyframes coin-snap {
  0% { transform: translate(0, 0) rotate3d(var(--ax), var(--ay), 0, 0deg) scale(1); }
  18% { transform: translate(var(--dx), calc(var(--peak) * 0.55)) rotateZ(var(--lean)) rotate3d(var(--ax), var(--ay), 0, calc(var(--end) * 0.3)) scale(1.1); }
  42% { transform: translate(0, 0) rotate3d(var(--ax), var(--ay), 0, calc(var(--end) * 0.62)) scale(1); }
  100% { transform: translate(0, 0) rotate3d(var(--ax), var(--ay), 0, var(--end)) scale(1); }
}
@keyframes coin-bounce {
  0% { transform: translate(0, 0) rotate3d(var(--ax), var(--ay), 0, 0deg) scale(1); }
  30% { transform: translate(var(--dx), var(--peak)) rotateZ(var(--lean)) rotate3d(var(--ax), var(--ay), 0, var(--mid)) scale(1.18); }
  60% { transform: translate(calc(var(--dx) * -0.5), 0) rotate3d(var(--ax), var(--ay), 0, calc(var(--end) - 620deg)) scale(1); }
  72% { transform: translate(calc(var(--dx) * -0.2), calc(var(--peak) * 0.3)) rotate3d(var(--ax), var(--ay), 0, calc(var(--end) - 330deg)); }
  84% { transform: translate(0, 0) rotate3d(var(--ax), var(--ay), 0, calc(var(--end) - 110deg)); }
  91% { transform: translate(0, calc(var(--peak) * 0.08)) rotate3d(var(--ax), var(--ay), 0, calc(var(--end) - 20deg)); }
  100% { transform: translate(0, 0) rotate3d(var(--ax), var(--ay), 0, var(--end)); }
}
@media (prefers-reduced-motion: reduce) {
  .coin.flipping { animation: none; }
}

/* the Backroom's looks: the crest banner, large and faded, behind everything */
body.backroom-page::before { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: url("/static/backroom/banner.jpg") center 30% / cover no-repeat; opacity: 0.2; filter: saturate(0.85); }
body.backroom-page::after { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 35%, rgba(5, 4, 3, 0) 0%, rgba(5, 4, 3, 0.55) 55%, rgba(5, 4, 3, 0.92) 100%); }
body.backroom-page main, body.backroom-page header, body.backroom-page footer { position: relative; z-index: 1; }
.room-panel { background: linear-gradient(180deg, rgba(21, 16, 10, 0.88) 0%, rgba(12, 9, 6, 0.9) 100%); backdrop-filter: blur(2px); }
body.backroom-page main.backroom { max-width: 1760px; }  /* big screens: the room uses the width */
.backroom .room { max-width: 100%; }
.room-grid { grid-template-columns: minmax(0, 1fr) clamp(300px, 24vw, 440px); }
.room-grid .rows li { flex-wrap: wrap; }
.room-grid .rows .main { flex: 1 1 140px; }
@media (max-width: 860px) { .room-grid { grid-template-columns: 1fr; } }

/* the games: black and gold cards, one per game */
.game-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.game-pick { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  padding: 16px 14px 14px; border-radius: 16px; cursor: pointer; color: #d9c9ab; font: inherit;
  background: radial-gradient(ellipse at 50% 30%, #211910 0%, #0f0b07 62%, #070504 100%);
  border: 1px solid rgba(201, 154, 72, 0.35);
  box-shadow: inset 0 0 0 4px rgba(201, 154, 72, 0.05), inset 0 0 30px rgba(0, 0, 0, 0.7);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; }
.game-pick::before { content: ""; position: absolute; inset: 7px; border-radius: 11px; border: 1px solid rgba(201, 154, 72, 0.14);
  pointer-events: none; }
.game-pick:hover { transform: translateY(-2px); border-color: rgba(232, 193, 112, 0.7); }
.game-pick.on { border-color: #e8c170; box-shadow: inset 0 0 0 4px rgba(232, 193, 112, 0.12), 0 0 26px rgba(232, 183, 90, 0.22); }
.game-pick:focus-visible { outline: 2px solid #e8c170; outline-offset: 2px; }
.game-art { height: 92px; display: grid; place-items: center; margin-bottom: 4px; }
.art-coin { width: 86px; height: 86px; border-radius: 50%; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.7)); transform: rotate(-8deg); }
.game-pick:hover .art-coin, .game-pick.on .art-coin { animation: art-coin-spin 1.2s ease-in-out; }
@keyframes art-coin-spin { 50% { transform: rotateY(180deg) rotate(-8deg); } }
.art-dice { width: 132px; height: 92px; overflow: visible; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.7)); }
.die-body { fill: #0c0906; stroke: #d4a64f; stroke-width: 4; }
.pip { fill: #e8c170; }
.pip-one { fill: #d8412f; filter: drop-shadow(0 0 6px rgba(216, 65, 47, 0.8)); }
.game-name { font-family: var(--display); font-size: 18px; letter-spacing: 0.5px; color: #f0dfbd; }
.game-line { font-size: 13px; line-height: 1.4; color: #bca987; }
.game-meta { font-size: 11.5px; letter-spacing: 0.6px; text-transform: uppercase; color: #c89a52; margin-top: 2px; }
.challenge-bar { border: 1px solid rgba(201, 154, 72, 0.25); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px;
  background: rgba(0, 0, 0, 0.3); }
.game-rules { margin: 0 0 10px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.game-rules b { color: #eadbbd; }
.challenge { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.seg { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.seg-label { font-size: 12px; letter-spacing: 0.6px; text-transform: uppercase; color: #8a7456; margin-right: 2px; }
.seg-b { min-width: 34px; padding: 5px 10px; border-radius: 999px; border: 1px solid rgba(201, 154, 72, 0.35); background: rgba(0, 0, 0, 0.35);
  color: #d9c9ab; cursor: pointer; font: inherit; font-size: 14px; }
.seg-b:hover { border-color: #e8c170; }
.seg-b.on { background: linear-gradient(180deg, #e8c170, #b8862f); color: #1a1208; border-color: #e8c170; font-weight: 600; }
.challenge .amount-input { width: 92px; }
/* the stake chips: poker chips -- a striped rim, a face, a thin ring (the 100 in our black and gold) */
.chip-quick { --base: #d9c7a0; --edge: #f7efdc; --face: #e9dcc0; --ring: rgba(58, 42, 20, 0.35); --ink: #3a2a14;
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; padding: 0; border: 0; border-radius: 50%; cursor: pointer; font: inherit;
  font-size: 12px; font-weight: 800; letter-spacing: -0.2px; color: var(--ink);
  background: radial-gradient(circle, var(--face) 0 47%, var(--ring) 48% 51%, var(--face) 52% 58%, transparent 59%),
    repeating-conic-gradient(var(--edge) 0 15deg, var(--base) 15deg 45deg);
  box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.35), 0 3px 8px rgba(0, 0, 0, 0.55);
  transition: transform 0.12s ease, box-shadow 0.12s ease; }
.chip-quick.chip-5 { --base: #b3322a; --edge: #f4ead6; --face: #c23b30; --ring: rgba(255, 255, 255, 0.45); --ink: #fff; }
.chip-quick.chip-25 { --base: #256b41; --edge: #f4ead6; --face: #2e7d4f; --ring: rgba(255, 255, 255, 0.45); --ink: #fff; }
.chip-quick.chip-100 { --base: #0f0c09; --edge: #e8c170; --face: #16120d; --ring: rgba(232, 193, 112, 0.75); --ink: #f0d27a; }
.chip-quick:hover { transform: translateY(-2px); }
.chip-quick.on { transform: translateY(-2px); box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.35), 0 0 0 2px #e8c170, 0 0 14px rgba(232, 183, 90, 0.55); }
.challenge-go { margin-left: auto; }

/* the hosts' tools: buttons up top, the rest in a drawer from the right */
.host-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.host-tool { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; cursor: pointer; font: inherit;
  font-size: 14px; color: #eadbbd; background: rgba(12, 9, 6, 0.8); border: 1px solid rgba(201, 154, 72, 0.4); }
.host-tool:hover, .host-tool.on { border-color: #e8c170; color: #f0dfbd; background: rgba(232, 183, 90, 0.12); }
.host-tool.warn { border-color: rgba(240, 122, 74, 0.6); }
.tool-badge { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: rgba(232, 183, 90, 0.18); color: #f0d27a; }
.host-tool.warn .tool-badge { background: rgba(240, 122, 74, 0.2); color: #f4a37f; }
.drawer-wrap { position: fixed; inset: 0; z-index: 30; }
.drawer-shade { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.45); animation: shade-in 0.2s ease-out; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); overflow-y: auto; padding: 18px 16px 24px;
  box-sizing: border-box; background: linear-gradient(180deg, #16100a, #0b0806); border-left: 1px solid rgba(201, 154, 72, 0.45);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.6); animation: drawer-in 0.22s ease-out; }
.drawer .room-panel { background: none; border: 0; padding: 0; box-shadow: none; backdrop-filter: none; margin: 0; }
.drawer-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  background: none; border: 1px solid rgba(201, 154, 72, 0.35); color: #d9c9ab; font-size: 20px; line-height: 1; }
.drawer-close:hover { border-color: #e8c170; color: #f0dfbd; }
@keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes shade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .drawer, .drawer-shade, .game-pick:hover .art-coin, .game-pick.on .art-coin { animation: none; } }

/* the lounge radio: our own buttons; YouTube's video kept dim behind the name */
.radio-screen { position: relative; height: 64px; overflow: hidden; background: #050403; border-bottom: 1px solid rgba(200, 154, 82, 0.2);
  transition: height 0.25s ease; }
.radio-player { position: absolute; left: 0; top: 50%; width: 100%; aspect-ratio: 16 / 9; transform: translateY(-50%); border: 0;
  opacity: 0.16; filter: blur(1.5px) saturate(0.6); pointer-events: none; transition: opacity 0.25s ease, filter 0.25s ease; }
.radio-now { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 6px 40px 6px 12px;
  font-size: 12px; line-height: 1.35; color: #bca987; background: linear-gradient(90deg, rgba(5, 4, 3, 0.85), rgba(5, 4, 3, 0.2)); }
.radio-now b { color: #f0dfbd; font-size: 14px; font-weight: 600; }
.radio-now span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radio-now em { color: #c89a52; }
.radio.on-air .radio-now b::before { content: "\25CF  "; color: #d8412f; font-size: 10px; vertical-align: 2px; }
.radio-controls { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
.radio-play, .radio-mute { flex: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 12px; line-height: 1;
  border: 1px solid rgba(200, 154, 82, 0.5); background: rgba(0, 0, 0, 0.4); color: #f0dfbd; }
.radio-play { background: linear-gradient(180deg, #e8c170, #b8862f); color: #1a1208; border-color: #e8c170; }
.radio-mute { font-size: 14px; }
.radio-volume { flex: 1; min-width: 60px; height: 4px; margin: 0; padding: 0; border: 0; border-radius: 999px; box-shadow: none;
  -webkit-appearance: none; appearance: none; cursor: pointer; outline: none;
  background: linear-gradient(to right, #e8c170 var(--v, 40%), rgba(255, 255, 255, 0.14) var(--v, 40%)); }
.radio-volume::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: #f0d27a; border: 2px solid #1a1208; box-shadow: 0 0 0 1px rgba(232, 193, 112, 0.6); }
.radio-volume::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #f0d27a; border: 2px solid #1a1208; }
.radio-volume::-moz-range-track { background: transparent; }
.radio-volume:focus-visible { box-shadow: 0 0 0 2px rgba(232, 193, 112, 0.5); }
.radio-pick { flex: none; max-width: 118px; font-size: 12.5px; padding: 4px 6px; border-radius: 6px; background: rgba(0, 0, 0, 0.5);
  color: #eadbbd; border: 1px solid rgba(200, 154, 82, 0.35); }
.radio-search { padding: 0 10px 8px; }
.radio-q { width: 100%; box-sizing: border-box; font-size: 13px; padding: 6px 10px; border-radius: 6px; background: rgba(0, 0, 0, 0.5);
  color: #f0e4cc; border: 1px solid rgba(200, 154, 82, 0.3); }
.radio-q:focus { outline: none; border-color: #c89a52; }
.radio-results { list-style: none; margin: 0; padding: 0 6px 6px; max-height: 190px; overflow-y: auto; overflow-x: hidden; }
.radio-results button > * { max-width: 100%; }
.radio-results:empty { display: none; }
.radio-results button { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; gap: 1px; padding: 6px 8px; cursor: pointer;
  background: none; border: 0; border-radius: 6px; color: #e6d6b8; font: inherit; font-size: 12.5px; }
.radio-results button:hover { background: rgba(232, 183, 90, 0.1); }
.radio-results b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radio-results small { color: #8a7456; }
.radio-note { padding: 6px 8px; font-size: 12.5px; color: #8a7456; }
.radio.min .radio-body { display: none; }

/* cashing out: the queue beside who's here, our own dialog */
.room-side { display: grid; gap: 16px; align-content: start; }
.room-side .room-panel { margin-top: 0; }
.cash-queue li.queue-asked { box-shadow: inset 3px 0 0 #e8b75a; padding-left: 10px; }
.cash-queue li.queue-paid { box-shadow: inset 3px 0 0 var(--good); padding-left: 10px; }
.cash-queue .meta { font-size: 12.5px; }
.wants-out { margin-left: 8px; font-size: 11px; letter-spacing: 0.4px; text-transform: uppercase; padding: 1px 7px; border-radius: 999px;
  color: #f0d27a; background: rgba(232, 183, 90, 0.16); vertical-align: 1px; }
.cash-me.asked { border-color: #e8b75a; color: #f0d27a; }
button[disabled] { opacity: 0.45; cursor: not-allowed; }
.ask-wrap { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.ask-shade { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); animation: shade-in 0.15s ease-out; }
.ask { position: relative; width: min(420px, 100%); box-sizing: border-box; padding: 22px 22px 18px; border-radius: 14px;
  background: radial-gradient(ellipse at 50% 0%, #22190f 0%, #110c08 70%); border: 1px solid rgba(201, 154, 72, 0.55);
  box-shadow: inset 0 0 0 4px rgba(201, 154, 72, 0.06), 0 24px 60px rgba(0, 0, 0, 0.7); color: #d9c9ab; animation: won-pop 0.18s ease-out; }
.ask h2 { font-family: var(--display); font-size: 20px; margin: 0 0 8px; color: #f0dfbd; }
.ask p { margin: 0 0 10px; line-height: 1.5; }
.ask-lines { margin: 0 0 12px; padding-left: 18px; color: #f0d27a; line-height: 1.6; }
.ask-buttons { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
@media (prefers-reduced-motion: reduce) { .ask, .ask-shade { animation: none; } }

/* the radio and recent games: in the right column. The radio floats over a spot kept for it there */
.radio { position: absolute; z-index: 5; box-sizing: border-box; background: rgba(6, 4, 3, 0.86);
  border: 1px solid rgba(200, 154, 82, 0.35); border-radius: 10px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45); overflow: hidden; }
.radio-spot { min-height: 34px; }
.room-side .history { border-radius: 10px; }

/* the chat fades when nobody's using it: only the "Say something" bar stays */
.chat { transition: background-color 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease, backdrop-filter 0.6s ease; }
.chat .chat-lines, .chat .chat-tabs { transition: opacity 0.6s ease; }
.chat.faded { background-color: transparent; border-color: transparent; box-shadow: none; backdrop-filter: none; pointer-events: none; }
.chat.faded .chat-lines, .chat.faded .chat-tabs { opacity: 0; }
.chat.faded .chat-form { pointer-events: auto; }
.chat.faded .chat-say { background: rgba(0, 0, 0, 0.7); box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5); }
.chat-pin { background: none; border: 0; color: #7a6649; font-size: 12px; padding: 2px 4px 4px; cursor: pointer; margin-left: auto; }
.chat-pin.on { color: #e8b75a; }
.chat-pin:hover { color: #f0dcb4; }
.chat-pin + .chat-toggle { margin-left: 0; }
@media (prefers-reduced-motion: reduce) { .chat, .chat .chat-lines, .chat .chat-tabs { transition: none; } }

/* Blackjack: Majordomo's deck, and black-and-gold playing cards */
.art-card { fill: #0c0906; stroke: #d4a64f; stroke-width: 2.5; }
.art-rank { fill: #e8c170; font: 700 15px var(--display, serif); }
.art-suit { fill: #e8c170; font-size: 30px; }
.art-rank.red, .art-suit.red { fill: #d8412f; }
.table-list > .table-card { grid-column: 1 / -1; }  /* the whole row: every game's a table */
.bj-table { position: relative; width: 100%; max-width: 760px; margin: 58px auto 10px; aspect-ratio: 2 / 1; min-height: 300px; }
.bj-felt { position: absolute; inset: 0; border-radius: 0 0 50% 50% / 0 0 100% 100%;
  background: radial-gradient(ellipse at 50% 20%, #1f1a14 0%, #100c09 55%, #070504 100%);
  box-shadow: 0 0 0 7px #b8862f, 0 0 0 9px #3a2a14, 0 0 0 10px #d9b061, 0 18px 40px rgba(0, 0, 0, 0.6),
    inset 0 0 70px rgba(0, 0, 0, 0.85), inset 0 0 0 16px rgba(201, 154, 72, 0.05); }
.bj-felt::after { content: ""; position: absolute; left: 50%; top: 56%; width: 44px; height: 44px; transform: translate(-50%, -50%) rotate(45deg);
  background: rgba(201, 154, 72, 0.07); border: 1px solid rgba(201, 154, 72, 0.12); }  /* our diamond, faint in the felt */
.bj-print { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.bj-print-text { fill: rgba(232, 193, 112, 0.45); font: 700 4.6px var(--display, serif); letter-spacing: 0.6px; }
.bj-dealer-spot { position: absolute; left: 50%; top: 0; transform: translate(-50%, -62%); display: flex; flex-direction: column;
  align-items: center; gap: 4px; z-index: 2; }
.bj-dealer-face { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; background: #0c0906;
  border: 3px solid #d4a64f; box-shadow: 0 0 0 2px #3a2a14, 0 8px 22px rgba(0, 0, 0, 0.7); }
.bj-dealer-face.none { display: grid; place-items: center; font: 700 34px var(--display); color: #e8c170; }
.bj-dealer-name { font-size: 12px; color: #bca987; background: rgba(8, 6, 4, 0.85); padding: 2px 10px; border-radius: 999px;
  border: 1px solid rgba(201, 154, 72, 0.35); white-space: nowrap; }
.bj-dealer-name b { color: #f0dfbd; font-family: var(--display); letter-spacing: 0.4px; }
.bj-says { position: absolute; left: 50%; top: 20%; transform: translateX(-50%); max-width: 70%; text-align: center; z-index: 2;
  font-family: var(--serif); font-style: italic; font-size: 16px; color: #f0dfbd; text-shadow: 0 2px 6px #000; }
.bj-shoe { position: absolute; left: 80%; top: 7%; width: 40px; height: 54px; z-index: 1; }
.bj-shoe span { position: absolute; inset: 0; border-radius: 5px; border: 1px solid #c89a52;
  background: repeating-linear-gradient(45deg, #1f160d 0 5px, #0c0906 5px 10px); box-shadow: 0 3px 6px rgba(0, 0, 0, 0.6); }
.bj-shoe span:nth-child(2) { transform: translate(3px, -3px); }
.bj-shoe span:nth-child(3) { transform: translate(6px, -6px); }
.bj-seat { position: absolute; transform: translate(-50%, -20%); display: flex; flex-direction: column; align-items: center; gap: 6px;
  z-index: 1; }
.bj-spot { width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid rgba(201, 154, 72, 0.5); display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.25); }
.bj-seat.empty .bj-spot { border-style: dashed; opacity: 0.6; }
.bj-chip { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #f0d27a;
  background: radial-gradient(circle, #16120d 0 47%, rgba(232, 193, 112, 0.75) 48% 51%, #16120d 52% 58%, transparent 59%),
    repeating-conic-gradient(#e8c170 0 15deg, #0f0c09 15deg 45deg); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6); }
.bj-plate { display: flex; flex-direction: column; align-items: center; font-size: 12px; line-height: 1.3; padding: 3px 10px; border-radius: 8px;
  background: rgba(8, 6, 4, 0.85); border: 1px solid rgba(201, 154, 72, 0.3); white-space: nowrap; color: #bca987; }
.bj-plate b { color: #eadbbd; font-weight: 600; }
.bj-total { color: #f0d27a; font-family: var(--cmd); }
.bj-seat.turn .bj-spot { border-color: #e8c170; box-shadow: 0 0 16px rgba(232, 183, 90, 0.6); }
.bj-seat.turn .bj-plate { border-color: #e8c170; }
.bj-seat.mine .bj-plate { background: rgba(40, 30, 16, 0.92); }
.bj-seat.bust { opacity: 0.55; }
.bj-seat.bust .bj-total { color: var(--bad); }
.bj-seat.won .bj-spot, .bj-seat.won .bj-plate { border-color: var(--good); box-shadow: 0 0 18px rgba(126, 201, 106, 0.45); }
.bj-seat.won .bj-total { color: var(--good); }
/* each seat's cards, fanned above its spot */
.bj-pile { position: absolute; inset: 0; z-index: 3; pointer-events: none; }  /* the whole table: cards fly from the shoe */
.bj-pile .pcard { position: absolute; left: calc(var(--sx) + (var(--k) - (var(--n) - 1) / 2) * 19px - 20px); top: calc(var(--sy) - 70px);
  transform: rotate(calc((var(--k) - (var(--n) - 1) / 2) * 4deg)); pointer-events: auto; }
.bj-pile .pcard.deal { animation-name: card-fly; animation-duration: 0.75s; animation-timing-function: cubic-bezier(0.2, 0.7, 0.25, 1); }
/* thrown from Majordomo's hands, spinning as it crosses the felt */
@keyframes card-fly { from { left: calc(50% - 20px); top: 2%; opacity: 0; transform: rotate(var(--spin, -200deg)) scale(0.6); }
  15% { opacity: 1; } 70% { transform: rotate(12deg) scale(1.05); } }
@media (max-width: 640px) {
  .bj-table { min-height: 260px; margin-top: 50px; }
  .bj-dealer-face { width: 68px; height: 68px; }
  .bj-says { font-size: 13px; top: 17%; }
  .bj-pile .pcard { width: 30px; height: 42px; top: calc(var(--sy) - 52px); left: calc(var(--sx) + (var(--k) - (var(--n) - 1) / 2) * 14px - 15px); }
  .bj-pile .pc-corner b { font-size: 11px; }
  .bj-pile .pc-corner i { font-size: 9px; }
  .bj-pile .pc-mid { font-size: 14px; right: 3px; bottom: 3px; }
  .bj-plate { font-size: 11px; padding: 2px 6px; }
  .bj-spot { width: 34px; height: 34px; }
  .bj-chip { width: 24px; height: 24px; font-size: 9px; }
}
.pcard { position: relative; width: 40px; height: 56px; border-radius: 5px; box-sizing: border-box; display: inline-block;
  line-height: 1; color: #e8c170; background: linear-gradient(160deg, #1b140d, #0a0705);
  border: 1px solid #c89a52; box-shadow: -2px 2px 6px rgba(0, 0, 0, 0.6); }
.pc-corner { position: absolute; left: 3px; top: 3px; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.pc-corner b { font-family: var(--display); font-size: 13px; }
.pc-corner i { font-style: normal; font-size: 11px; }
.pc-mid { position: absolute; right: 5px; bottom: 5px; font-size: 20px; }
.pcard.red { color: #e0513d; }
.pcard.back { background: repeating-linear-gradient(45deg, #1f160d 0 5px, #0c0906 5px 10px); }
.pcard.back::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px;
  transform: translate(-50%, -50%) rotate(45deg); background: #c89a52; opacity: 0.8; }
.pcard.deal { animation: card-deal 0.35s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
.pcard.reveal { animation: card-reveal 0.5s ease-out both; }
@keyframes card-deal { from { opacity: 0; transform: translate(-40px, -30px) rotate(-18deg) scale(0.8); } to { opacity: 1; transform: none; } }
@keyframes card-reveal { 0% { transform: rotateY(90deg); } 100% { transform: rotateY(0); } }
@media (prefers-reduced-motion: reduce) { .pcard.deal, .pcard.reveal { animation: none; } }
.chat-chan.dealer { color: #8fc7e8; font-weight: 600; }
.chat-line.dealer .chat-name { color: #f0d27a; }
.chat-line.dealer .chat-text { color: #e6d6b8; font-style: italic; }

/* chips as stacks: a column per colour, each chip seen from the side -- its edge striped */
.chip-stack { display: inline-flex; align-items: flex-end; gap: 2px; vertical-align: middle; }
.chip-col { display: inline-flex; flex-direction: column-reverse; }
.stack-chip { --base: #e9dcc0; --edge: #b89a64; width: 22px; height: 5px; box-sizing: border-box; border-radius: 3px / 2px;
  background: repeating-linear-gradient(90deg, var(--base) 0 3px, var(--edge) 3px 5px);
  border: 1px solid rgba(0, 0, 0, 0.5); }
.chip-col .stack-chip:last-child { height: 11px; border-radius: 50%;  /* the top chip: its face, rim and inlay */
  background: radial-gradient(ellipse, var(--base) 0 38%, var(--edge) 42% 52%, var(--base) 56% 68%, transparent 70%),
    repeating-conic-gradient(var(--edge) 0 20deg, var(--base) 20deg 45deg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.chip-col .stack-chip:last-child:not(:first-child) { margin-bottom: -3px; }
.stack-chip.c5 { --base: #c23b30; --edge: #f4ead6; }
.stack-chip.c25 { --base: #2e7d4f; --edge: #f4ead6; }
.stack-chip.c100 { --base: #16120d; --edge: #e8c170; border-color: rgba(232, 193, 112, 0.7); }  /* black on black felt: a gold outline */
.stack-chip.c500 { --base: #6b3fa0; --edge: #f4ead6; }
.stack-chip.c1000 { --base: #d4a64f; --edge: #16120d; }
.chip-stack.small .stack-chip { width: 17px; height: 4px; }
.chip-stack.small .chip-col .stack-chip:last-child { height: 9px; }
.table-pot { display: inline-flex; align-items: center; gap: 6px; }
.bj-spot .chip-stack { transform: translateY(2px); }
.bj-spot .chip-col + .chip-col { margin-left: -8px; }  /* a cluster in the betting circle */

/* Blackjack's jackpot: on the game's card, in the middle of the felt */
.jackpot-badge { position: absolute; top: 8px; right: 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.4px; padding: 2px 8px;
  border-radius: 999px; color: #1a1208; background: linear-gradient(180deg, #f0d27a, #b8862f); box-shadow: 0 0 12px rgba(232, 183, 90, 0.5);
  animation: jackpot-glow 2.4s ease-in-out infinite; }
.bj-jackpot { position: absolute; left: 50%; top: 29%; transform: translateX(-50%); z-index: 2; display: flex; flex-direction: row;
  align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; white-space: nowrap; background: rgba(8, 6, 4, 0.7);
  border: 1px solid rgba(232, 193, 112, 0.55); box-shadow: 0 0 18px rgba(232, 183, 90, 0.25); animation: jackpot-glow 2.4s ease-in-out infinite; }
.bj-jackpot-label { font-family: var(--display); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: #e8c170; }
.bj-jackpot b { font-size: 13px; color: #f0d27a; font-family: var(--cmd); }
@keyframes jackpot-glow { 50% { box-shadow: 0 0 26px rgba(232, 183, 90, 0.55); } }
.table-result.jackpot-won { color: #f0d27a; text-shadow: 0 0 12px rgba(232, 183, 90, 0.6); }
.jackpot-return { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px;
  padding: 10px 12px; border: 1px solid rgba(232, 193, 112, 0.4); border-radius: 10px; background: rgba(232, 183, 90, 0.06); font-size: 14px; }
.jackpot-return b { color: #f0d27a; }
@media (prefers-reduced-motion: reduce) { .jackpot-badge, .bj-jackpot { animation: none; } }
.table-actions .suspense { font-style: italic; color: #e8c170; animation: suspense-pulse 1.1s ease-in-out infinite; }
@keyframes suspense-pulse { 50% { opacity: 0.45; } }
.coin-stage { padding-top: 40px; }  /* room for the toss */

.table-again { margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(201, 154, 72, 0.3); }

/* the dice on the felt: thrown from the roller's seat, tumbling, landing -- a 1 lands blood red */
.die-throw { position: absolute; left: calc(50% + var(--ox, 0%)); top: calc(47% + var(--oy, 0%)); z-index: 4; width: 78px; height: 78px;
  transform: translate(-50%, -50%) rotate(var(--tilt, 0deg)); }
.die-face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 16px; background: linear-gradient(145deg, #231a11, #0a0705); border: 2px solid #d4a64f;
  box-shadow: inset 0 0 0 4px rgba(212, 166, 79, 0.12), 0 10px 22px rgba(0, 0, 0, 0.7); }
.die-face b { font: 700 26px var(--display); color: #f0d27a; line-height: 1; }
.die-face small { font-size: 10px; color: #bca987; margin-top: 4px; }
.die-throw.thrown { animation: die-slide 1.1s cubic-bezier(0.2, 0.75, 0.3, 1) both; }
.die-throw.thrown.throw-lob { animation-name: die-lob; animation-timing-function: ease-out; }
/* skimmed across the felt, overshooting and settling back */
@keyframes die-slide { from { left: var(--fx); top: var(--fy); transform: translate(-50%, -50%) rotate(var(--rot)) scale(0.55); }
  58% { left: calc(50% + var(--ox) * 1.9); top: calc(47% + var(--oy) * 1.9); transform: translate(-50%, -50%) rotate(calc(var(--rot) * -0.05)) scale(1.08); }
  80% { transform: translate(-50%, -50%) rotate(calc(var(--tilt) * -1.2)) scale(0.98); } }
/* lobbed: up, down, and two bounces */
@keyframes die-lob { from { left: var(--fx); top: var(--fy); transform: translate(-50%, -50%) rotate(var(--rot)) scale(0.55); }
  35% { transform: translate(-50%, -130%) rotate(calc(var(--rot) * 0.45)) scale(1.25); }
  62% { left: calc(50% + var(--ox)); top: calc(47% + var(--oy)); transform: translate(-50%, -50%) rotate(calc(var(--rot) * 0.1)) scale(1); }
  76% { transform: translate(-50%, -78%) rotate(calc(var(--tilt) * 2.5)) scale(1.06); }
  88% { transform: translate(-50%, -50%) rotate(calc(var(--tilt) * -1)) scale(1); }
  94% { transform: translate(-50%, -58%) rotate(var(--tilt)) scale(1.02); } }
.die-throw.rolling .die-face { animation: die-tumble var(--tumble, 0.34s) ease-in-out infinite; }
@keyframes die-tumble { 25% { transform: rotate(-7deg); } 75% { transform: rotate(7deg); } }
.die-throw.landed .die-face { animation: die-land 0.4s ease-out; }
@keyframes die-land { 0% { transform: scale(1.25); } 100% { transform: scale(1); } }
.die-throw.one .die-face { border-color: #d8412f; box-shadow: 0 0 34px rgba(216, 65, 47, 0.75), inset 0 0 0 4px rgba(216, 65, 47, 0.2); }
.die-throw.one .die-face b { color: #ff6b55; }
.die-throw.one.landed .die-face { animation: die-one 0.7s ease-out; }
@keyframes die-one { 0%, 100% { transform: translateX(0); } 15% { transform: translateX(-8px) scale(1.3); } 30% { transform: translateX(8px); }
  45% { transform: translateX(-5px); } 60% { transform: translateX(5px); } }
.die-throw.idle { opacity: 0.55; }
/* the coin: resting in front of Majordomo, then tossed up past him and landing on the felt */
.coin-rest { position: absolute; left: 50%; top: 40%; width: 58px; height: 58px; transform: translate(-50%, -50%) rotate(-12deg); z-index: 2;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.7)); border-radius: 50%; }
.felt-coin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; }
.felt-coin .coin-stage { padding-top: 0; }
.felt-coin .coin { width: 120px; height: 120px; }
.bj-table.seats-2 { max-width: 620px; }
@media (prefers-reduced-motion: reduce) {
  .die-throw.thrown, .die-throw.thrown.throw-lob, .die-throw.rolling .die-face, .die-throw.landed .die-face, .die-throw.one.landed .die-face { animation: none; }
}
@media (max-width: 640px) {
  .die-throw { width: 60px; height: 60px; }
  .die-face b { font-size: 20px; }
  .felt-coin .coin { width: 90px; height: 90px; }
}
.felt-print { position: absolute; left: 50%; top: 64%; transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  font: 700 12px var(--display, serif); letter-spacing: 2px; color: rgba(232, 193, 112, 0.42); }
@media (max-width: 640px) { .felt-print { font-size: 9px; letter-spacing: 1px; } }
.bj-table.has-coin .felt-print { opacity: 0; }

/* Blackjack: Majordomo's own hand, in front of him; what he says, below it */
.felt-blackjack .bj-says { top: 37%; }
.felt-blackjack .bj-jackpot { left: 19%; top: 9%; }
.bj-pile.dealer-pile .pcard { top: calc(var(--sy) + 62px); }
.bj-dealer-total { position: absolute; left: calc(50% + 62px); top: 80px; z-index: 4; font-family: var(--cmd); font-size: 13px;
  padding: 2px 9px; border-radius: 999px; color: #f0d27a; background: rgba(8, 6, 4, 0.88); border: 1px solid rgba(201, 154, 72, 0.4); }
.bj-dealer-total.bust { color: var(--bad); border-color: var(--bad); }
.felt-blackjack.bj-table { min-height: 370px; }
.table-result.no-win { color: #d9c9ab; }
@media (max-width: 640px) {
  .bj-pile.dealer-pile .pcard { top: calc(var(--sy) + 48px); }
  .bj-dealer-total { left: calc(50% + 46px); top: 58px; }
  .felt-blackjack.bj-table { min-height: 320px; }
  .felt-blackjack .bj-jackpot { left: 20%; top: 4%; }
}
/* fair play: the seal before, the seeds after, and Verify */
.fair-line { margin-top: 10px; font-size: 12.5px; color: #8a7456; }
.fair-line summary { cursor: pointer; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fair-line summary .small { padding: 2px 10px; }
.fair-result.ok { color: var(--good); }
.fair-result.bad { color: var(--bad); }
.fair-seeds { margin: 8px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; }
.fair-seeds dt { color: #bca987; }
.fair-seeds dd { margin: 0; font-family: var(--cmd, monospace); overflow-wrap: anywhere; color: #d9c9ab; }
@media (max-width: 640px) { .fair-seeds { grid-template-columns: 1fr; } }
.kb-note { margin: 10px 2px 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }

/* ---- poker: a real table -- a long oval of felt in a padded rail, Majordomo dealing, eight seats ---- */
.art-chip { fill: #16120d; stroke: #e8c170; stroke-width: 2; }
.art-chip.top { fill: #241b11; }
.pk-table { position: relative; width: calc(100% - 60px); max-width: 940px; margin: 74px auto 66px; aspect-ratio: 2.05 / 1; min-height: 330px; }
.pk-rail { position: absolute; inset: -18px; border-radius: 999px;  /* the padded rail: dark leather, a gold trim */
  background: linear-gradient(180deg, #33261a 0%, #1b140d 45%, #0d0906 100%);
  box-shadow: 0 0 0 2px #b8862f, 0 0 0 4px #3a2a14, 0 26px 60px rgba(0, 0, 0, 0.7), inset 0 3px 5px rgba(255, 225, 160, 0.14),
    inset 0 -10px 18px rgba(0, 0, 0, 0.65); }
.pk-felt { position: absolute; inset: 0; border-radius: 999px;
  background: radial-gradient(ellipse at 50% 38%, #251d14 0%, #130e0a 58%, #080605 100%);
  box-shadow: inset 0 0 0 2px #d9b061, inset 0 0 0 4px rgba(0, 0, 0, 0.5), inset 0 0 90px rgba(0, 0, 0, 0.85); }
.pk-felt::after { content: ""; position: absolute; inset: 14% 7%; border-radius: 999px; border: 1px solid rgba(201, 154, 72, 0.22); }  /* the betting line */
.pk-print { position: absolute; left: 50%; top: 72%; transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  font: 700 12px var(--display, serif); letter-spacing: 3px; color: rgba(232, 193, 112, 0.34); }
.pk-dealer { top: -18px; }
.pk-says { position: absolute; left: 50%; top: 17%; transform: translateX(-50%); max-width: 44%; text-align: center; z-index: 2;
  font-family: var(--serif); font-style: italic; font-size: 15px; color: #f0dfbd; text-shadow: 0 2px 6px #000; }
.pk-pot { position: absolute; left: 50%; top: 32%; transform: translate(-50%, -50%); z-index: 2; display: flex; align-items: center; gap: 8px;
  padding: 3px 12px; border-radius: 999px; background: rgba(8, 6, 4, 0.75); border: 1px solid rgba(232, 193, 112, 0.45); white-space: nowrap; }
.pk-pot b { font-family: var(--cmd); font-size: 13px; color: #f0d27a; }
.pk-board { position: absolute; left: 50%; top: 51%; transform: translate(-50%, -50%); display: flex; gap: 6px; z-index: 2; }
.pk-board .pcard { width: 46px; height: 64px; }
.pk-board .pc-corner b { font-size: 15px; }
.pk-board .pc-mid { font-size: 24px; }
.pcard.slot { background: none; border: 1px dashed rgba(201, 154, 72, 0.22); box-shadow: none; }
.pk-seat { position: absolute; transform: translate(-50%, -50%); z-index: 4; display: flex; flex-direction: column; align-items: center; }
.pk-plate { min-width: 96px; display: flex; flex-direction: column; align-items: center; padding: 5px 12px; border-radius: 10px; font-size: 12px;
  line-height: 1.35; white-space: nowrap; color: #bca987; background: rgba(8, 6, 4, 0.94); border: 1px solid rgba(201, 154, 72, 0.42);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6); }
.pk-plate b { color: #eadbbd; font-weight: 600; }
.pk-plate.empty { min-width: 58px; border-style: dashed; opacity: 0.4; }
.pk-stack { color: #f0d27a; font-family: var(--cmd); }
.pk-under { font-size: 11px; letter-spacing: 0.3px; }
.pk-won { color: var(--good); font-weight: 700; font-family: var(--cmd); }
.pk-plate .countdown { font-size: 11px; color: #e8c170; }
.pk-sit { padding: 7px 18px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 13px; color: #e8c170;
  border: 1px dashed #c89a52; background: rgba(8, 6, 4, 0.9); }
.pk-sit:hover { border-style: solid; background: rgba(232, 183, 90, 0.14); }
.pk-seat.turn .pk-plate { border-color: #e8c170; box-shadow: 0 0 18px rgba(232, 183, 90, 0.65); }
.pk-seat.mine .pk-plate { background: rgba(44, 33, 18, 0.96); }
.pk-seat.folded { opacity: 0.5; }
.pk-seat.won .pk-plate { border-color: var(--good); box-shadow: 0 0 20px rgba(126, 201, 106, 0.55); }
.pk-cards { position: absolute; transform: translate(-50%, -50%); display: flex; gap: 3px; z-index: 3; }
.pk-cards .pcard { width: 34px; height: 48px; }
.pk-cards.fly { animation: pk-fly 0.6s cubic-bezier(0.2, 0.7, 0.25, 1) both; }
@keyframes pk-fly { from { left: 50%; top: 8%; opacity: 0; transform: translate(-50%, -50%) rotate(var(--spin, -150deg)) scale(0.5); } 20% { opacity: 1; } }
.pk-bet { position: absolute; transform: translate(-50%, -50%); z-index: 3; display: flex; align-items: center; gap: 5px;
  font-size: 12px; font-family: var(--cmd); color: #f0d27a; text-shadow: 0 1px 3px #000; }
.pk-button { position: absolute; right: -9px; top: -9px; z-index: 3; width: 22px; height: 22px; border-radius: 50%; display: grid;
  place-items: center; font-size: 11px; font-weight: 800; color: #1a1208; background: radial-gradient(circle at 35% 30%, #fff8e6, #d9c7a0);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7); }
.pk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.pk-raise { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px;
  border: 1px solid rgba(201, 154, 72, 0.25); background: rgba(0, 0, 0, 0.3); }
.pk-raise .amount-input { width: 84px; }
.pk-slide { width: 150px; accent-color: #e8c170; }
.pk-tools { margin-top: 10px; }
.pk-closed { margin-top: 16px; }
.pk-closed h3 { font-family: var(--display); font-size: 15px; margin: 0 0 6px; color: #eadbbd; }
.ask-field { display: flex; align-items: center; gap: 10px; margin: 6px 0 4px; }
@media (prefers-reduced-motion: reduce) { .pk-cards.fly { animation: none; } }
@media (max-width: 700px) {
  .pk-table { width: calc(100% - 44px); aspect-ratio: 1.15 / 1; margin: 64px auto 60px; }
  .pk-plate { min-width: 70px; padding: 3px 7px; font-size: 10.5px; }
  .pk-board .pcard { width: 32px; height: 46px; }
  .pk-board .pc-corner b { font-size: 11px; }
  .pk-board .pc-mid { font-size: 15px; }
  .pk-cards .pcard { width: 26px; height: 37px; }
  .pk-cards .pc-corner b { font-size: 10px; }
  .pk-cards .pc-corner i, .pk-cards .pc-mid { font-size: 9px; }
  .pk-says { font-size: 12px; max-width: 60%; }
  .pk-print { font-size: 8px; letter-spacing: 1.5px; }
  .pk-slide { width: 100%; }
}

/* the hosts' drawer, redrawn by a live update: it's open already -- no sliding in again */
.drawer-wrap.still .drawer, .drawer-wrap.still .drawer-shade { animation: none; }
.table-foot { margin-top: 8px; font-size: 12.5px; color: #8a7456; font-style: italic; }
.pk-tip { display: flex; gap: 8px; align-items: baseline; margin: 10px 0 2px; padding: 8px 12px; border: 1px solid rgba(212, 175, 55, .28);
  border-radius: 10px; background: rgba(212, 175, 55, .07); color: #d9c9a3; font-size: 13.5px; }
.pk-tip b { color: #f0d98a; font-weight: 600; }
.pk-tip-mark { flex: none; }
.pk-queued { font-size: 12.5px; color: #d9c9a3; }
.pk-tools { flex-wrap: wrap; }
.pk-tips-toggle { margin-left: auto; opacity: .75; }
button.linkish { background: none; border: 0; padding: 0; color: #f0d98a; text-decoration: underline; cursor: pointer; font: inherit; }

/* ---- the Party builder (party.html, party.js) ---- */
/* The party in the middle, as Muster would post it; the weapons round it, by role; the search above. */
main.pb { max-width: 1680px; padding-top: 16px; padding-bottom: 16px; }
.pb > .pb-stage { display: none; }
.pb.ready > .pb-stage { display: grid; }
.pb-loading { color: var(--muted); font-family: var(--serif); font-size: 19px; }
.pb .role-tank { --role: #5b8fd6; }
.pb .role-healer { --role: #6fbf73; }
.pb .role-melee { --role: #d9695a; }
.pb .role-ranged { --role: #e0a44e; }
.pb .role-support { --role: #a884d8; }
.pb .role-other { --role: #8d8578; }

.pb-stage { grid-template-columns: minmax(250px, 340px) minmax(420px, 1fr) minmax(300px, 420px); gap: 14px; height: calc(100vh - 150px); min-height: 560px; }
.pb-side { display: grid; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; min-height: 0; min-width: 0; }
.pb-dps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; min-height: 0; }
.pb-center { display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 0 4px 4px; }

/* a side list */
.pb-list { display: flex; flex-direction: column; min-height: 0; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--role);
  border-radius: var(--radius); }
.pb-list header { display: flex; align-items: center; gap: 7px; padding: 9px 12px 7px; }
.pb-list header b { font-family: var(--display); font-size: 14px; letter-spacing: 0.4px; }
.pb-list-n { margin-left: auto; min-width: 22px; text-align: center; padding: 1px 7px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: var(--role); color: #14100a; }
.pb-chips { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 5px;
  align-content: start; padding: 2px 8px 8px; }
.pb-chip { position: relative; display: grid; justify-items: center; align-content: start; gap: 2px; padding: 5px 3px 4px; border-radius: 8px;
  background: var(--panel-2); border: 1px solid var(--line); font-size: 10.5px; line-height: 1.15; color: var(--text); cursor: grab; min-width: 0; }
.pb-chip:hover { border-color: var(--accent); }
.pb-chip:active { cursor: grabbing; transform: scale(0.97); }
.pb-chip img { width: 44px; height: 44px; display: block; pointer-events: none; }
.pb-chip span { text-align: center; overflow-wrap: anywhere; }
.pb-chip.any { cursor: pointer; border-style: dashed; }
.pb-chip-mark { width: 44px; height: 44px; display: grid; place-items: center; font-size: 22px; }
.pb-chip.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pb-chip i { position: absolute; top: 2px; left: 4px; font-size: 9.5px; font-style: normal; font-weight: 700; color: var(--muted); }
.pb-chip .pb-noicon, .pb-pip .pb-noicon { font-size: 8px; color: var(--faint); overflow: hidden; }

/* the search */
.pb-search-wrap { position: sticky; top: 0; z-index: 6; background: var(--bg); padding-bottom: 2px; }
.pb .pb-search { width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; color: var(--text); background: var(--panel); border: 1px solid var(--line-strong);
  border-radius: 10px; padding: 10px 14px; }
.pb .pb-search:focus { outline: none; border-color: var(--accent); }
.pb-found { position: absolute; left: 0; right: 0; top: 100%; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45); padding: 5px; display: grid; gap: 2px; max-height: 60vh; overflow-y: auto; }
.pb-hit { display: flex; align-items: center; gap: 10px; text-align: left; padding: 4px 8px; border: 0; border-radius: 7px; background: none; font-size: 14px; cursor: grab; }
.pb-hit img { width: 34px; height: 34px; pointer-events: none; }
.pb-hit.on, .pb-hit:hover { background: var(--accent-soft); }
.pb-hit-name { flex: 1; min-width: 0; }
.pb-hit-kind { font-size: 12px; color: var(--role, var(--faint)); white-space: nowrap; }
.pb-found-none { margin: 6px 8px; color: var(--faint); font-size: 13.5px; }

/* the post: a Discord message with an embed (Discord's own dark colours, whatever the site's theme) */
.pb-post { display: flex; gap: 14px; padding: 14px 16px 16px; border-radius: 12px; background: #17110a; color: #ede3cc; border: 2px solid transparent;
  font-size: 15px; line-height: 1.4; transition: border-color 0.12s; }
.pb-post.aim { border-color: #5a4930; border-style: dashed; }
.pb-post.drop { border-color: var(--accent); border-style: solid; }
.dc-avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.dc-avatar.none { display: grid; place-items: center; background: #5865f2; color: #fff; font-weight: 700; }
.dc-body { flex: 1; min-width: 0; }
.dc-head { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; flex-wrap: wrap; }
.dc-head b { color: #f6ecd4; font-weight: 600; }
.dc-app { background: #5865f2; color: #fff; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; transform: translateY(-1px); }
.dc-when { color: #b9a57f; font-size: 12px; }
.dc-embed { position: relative; max-width: 620px; background: #241b11; border-left: 4px solid #d6a64e; border-radius: 4px; padding: 12px 16px 14px 12px; display: grid; gap: 8px; }
.pb .dc-embed input[type="text"] { font: inherit; color: #f6ecd4; background: transparent; border: 1px dashed transparent; border-radius: 4px; padding: 2px 5px; margin-left: -6px;
  box-sizing: border-box; min-width: 0; }
.pb .dc-embed input[type="text"]:hover { border-color: #5a4930; }
.pb .dc-embed input[type="text"]:focus { outline: none; border-color: #b9a57f; border-style: solid; background: #120d07; }
.pb .dc-embed input::placeholder { color: #8a7856; }
.pb .dc-embed .pb-title { font-size: 16px; font-weight: 600; width: calc(100% - 76px); }
.dc-desc { font-size: 14px; display: grid; gap: 10px; padding-right: 76px; }
.dc-progress { display: inline-flex; gap: 2px; margin-right: 8px; vertical-align: -2px; }
.dc-progress i { width: 15px; height: 15px; border-radius: 3px; background: #e6e7e8; display: block; }
.dc-mention { color: #c9cdfb; background: rgba(88, 101, 242, 0.3); border-radius: 3px; padding: 0 2px; font-weight: 500; }
.dc-inline { display: flex; gap: 40px; }
.dc-field { display: grid; gap: 2px; font-size: 14px; min-width: 0; }
.dc-field-name { color: #f6ecd4; font-weight: 600; }
.dc-ghost { color: #8a7856; font-style: italic; }
.pb .dc-embed .pb-objective { width: 100%; font-size: 14px; color: #ede3cc; }

.pb-row { border-radius: 4px; padding: 2px 4px 2px 5px; margin: 0 -6px; cursor: pointer; border: 1px solid transparent; }
.pb-row:hover { background: rgba(255, 255, 255, 0.045); }
.pb-row.on { background: rgba(255, 255, 255, 0.06); border-color: #5a4930; }
.pb-row.drop { border-color: var(--accent); background: rgba(214, 166, 78, 0.12); }
.pb-row:focus-visible { outline: 2px solid #5865f2; }
.pb-row.flash { animation: pb-flash 0.9s ease-out; }
@keyframes pb-flash { from { background: rgba(214, 166, 78, 0.35); } to { background: transparent; } }
.pb-row-line { display: flex; align-items: center; gap: 10px; }
.pb-row-text { flex: 1; min-width: 0; }
.pb-row-text b { color: #f6ecd4; font-weight: 700; }
.pb-row-text i { color: #cbb992; }
.pb-row-kit { font-size: 12.5px; color: #b9a57f; padding-left: 26px; }
.pb-pips { display: inline-flex; gap: 3px; flex: none; }
.pb-pip { width: 18px; height: 18px; border-radius: 4px; border: 1px dashed #6b5a3e; box-sizing: border-box; display: block; overflow: hidden; }
.pb-pip.has { border: 0; background: #120d07; }
.pb-pip img { width: 100%; height: 100%; display: block; }
.pb-row-x { flex: none; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 4px; background: none; color: #b9a57f; font-size: 16px; line-height: 1; opacity: 0; }
.pb-row:hover .pb-row-x, .pb-row.on .pb-row-x, .pb-row-x:focus-visible { opacity: 1; }
.pb-row-x:hover { color: #f23f42; background: rgba(242, 63, 66, 0.12); }
.pb-empty { display: grid; gap: 4px; padding: 18px 14px; border: 1px dashed #5a4930; border-radius: 6px; color: #b9a57f; font-size: 14px; text-align: center; }
.pb-empty b { color: #ede3cc; }
.pb-post-more { display: flex; gap: 8px; margin-top: 2px; }
.pb-post-more button { background: #3a2e1f; border-color: #5a4930; color: #ede3cc; }

/* an open line: the builder's own tools, set into the post */
.pb-edit { margin: 2px -6px 6px; padding: 10px; border-radius: 8px; background: #120d07; border: 1px solid #5a4930; display: grid; gap: 10px; cursor: default; }
.pb-edit-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pb .pb-edit input[type="text"] { margin: 0; background: #241b11; border: 1px solid #5a4930; border-radius: 6px; padding: 6px 9px; font-size: 14px; }
.pb .pb-edit .pb-label { flex: 1 1 150px; font-weight: 600; }
.pb .pb-edit .pb-slot-note { width: 100%; font-size: 13px; color: #ede3cc; }
.pb-edit select, .pb-edit button { background: #241b11; border-color: #5a4930; color: #ede3cc; }
.pb-edit button.danger { color: #f0868a; border-color: #7a3a3d; }
.pb-count { display: inline-flex; align-items: center; gap: 3px; }
.pb-count b { min-width: 26px; text-align: center; font-size: 15px; color: #f6ecd4; }
.pb-count button { width: 26px; height: 26px; padding: 0; border-radius: 6px; font-size: 15px; line-height: 1; display: inline-grid; place-items: center; }
.pb-count .pb-any { margin-left: 3px; }
.pb-count .pb-any.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pb-kit { display: flex; flex-wrap: wrap; gap: 8px; }
.pb-piece-box { display: grid; justify-items: center; gap: 3px; font-size: 10.5px; color: #b9a57f; }
.pb-piece { width: 46px; height: 46px; padding: 0; border-radius: 8px; background: #241b11; border: 1px dashed #6b5a3e; display: grid; place-items: center; overflow: hidden; }
.pb-piece.has { border-style: solid; border-color: #5a4930; }
.pb-piece img { width: 100%; height: 100%; display: block; pointer-events: none; }
.pb-piece-mark { font-size: 19px; filter: grayscale(1); opacity: 0.45; }
.pb-piece.on { border: 1px solid var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.pb-kit-hint { margin: 0; font-size: 12.5px; color: #b9a57f; }
.pb-picker { border-top: 1px solid #3a2e1f; padding-top: 8px; display: grid; gap: 8px; }
.pb-picker-head { display: flex; align-items: baseline; gap: 8px; font-size: 13.5px; }
.pb-picker-head b { color: #f6ecd4; }
.pb-picker-head span { color: #b9a57f; font-size: 12px; }
.pb-picker-head button { margin-left: auto; }
.pb-picker-list { max-height: 300px; overflow-y: auto; display: grid; gap: 8px; padding-right: 4px; }
.pb-picker-group h4 { margin: 0 0 4px; font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: #b9a57f; font-weight: 600; }
.pb-picker-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 5px; }
.pb-picker .pb-chip { background: #241b11; border-color: #3a2e1f; color: #ede3cc; cursor: pointer; }
.pb-picker .pb-chip.on, .pb-picker .pb-chip:hover { border-color: var(--accent); }

/* under the post */
.pb-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pb-bar select { font-size: 14px; padding: 7px 10px; max-width: none; }
.pb-state { flex: 1; min-width: 120px; font-size: 12.5px; color: var(--faint); }
.pb-kept-group h3 { font-size: 11.5px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); margin: 10px 0 6px; font-weight: 600; }
.pb-kept { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pb-kept-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; text-align: left; padding: 8px 12px; }
.pb-kept.on .pb-kept-open { border-color: var(--accent); }
.pb-kept-roles { display: inline-flex; gap: 9px; font-size: 13px; color: var(--muted); }
.pb-kept-role { display: inline-flex; align-items: center; gap: 4px; }
.pb-kept-role i { width: 9px; height: 9px; border-radius: 50%; background: var(--role); display: inline-block; }
.pb-kept-by { margin-left: auto; font-size: 12.5px; color: var(--faint); }
.pb-saved-none { margin: 0; color: var(--faint); font-size: 13.5px; }

/* its own dialog */
.pb-ask-wrap { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.pb-ask-shade { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); }
.pb-ask { position: relative; width: min(420px, 100%); box-sizing: border-box; padding: 22px 22px 18px; border-radius: 14px; background: var(--panel);
  border: 1px solid var(--line-strong); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45); }
.pb-ask.wide { width: min(620px, 100%); }
.pb-ask h2 { font-family: var(--display); font-size: 20px; margin: 0 0 8px; }
.pb-ask p { margin: 0 0 10px; line-height: 1.5; color: var(--muted); }
.pb-ask-buttons { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.pb-text { width: 100%; box-sizing: border-box; font: 13px/1.45 ui-monospace, Consolas, monospace; color: var(--text); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px; resize: vertical; }

/* from the fight database: what the open line's weapon is commonly built with */
.pb-built { border-top: 1px solid #3a2e1f; padding-top: 8px; display: grid; gap: 5px; }
.pb-built-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13.5px; margin-bottom: 2px; }
.pb-built-head b { color: #f6ecd4; }
.pb-built-head span { color: #b9a57f; font-size: 12px; }
.pb-built-row { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.pb-built-place { width: 62px; flex: none; font-size: 12px; color: #b9a57f; }
.pb-edit .pb-built-item { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 3px; border-radius: 7px; font-size: 12.5px; }
.pb-built-item img { width: 26px; height: 26px; display: block; }
.pb-built-item i { font-style: normal; color: #b9a57f; font-size: 11.5px; }
.pb-edit .pb-built-item.on, .pb-edit .pb-built-item:hover { border-color: var(--accent); }
.pb-base { margin: 0; font-size: 12px; color: var(--faint); }
.pb-base.stuck { color: var(--bad); }

/* a line: numbered, short */
.pb-row-n { flex: none; min-width: 26px; text-align: right; color: #b9a57f; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pb-row.dragging { opacity: 0.4; }
.pb-row { cursor: grab; }
.pb-row-text .pb-row-kit { padding-left: 0; font-size: 13px; color: #cbb992; }
.dc-lines { display: grid; gap: 2px; padding-right: 76px; }
.pb .dc-embed .dc-lines .pb-objective { width: 100%; }
.pb-chip.more { cursor: pointer; border-style: dashed; color: var(--muted); }
.pb-chip.more .pb-chip-mark { font-size: 20px; color: var(--accent); }
/* the picker's sub-menus and search */
.pb-picker-head { flex-wrap: wrap; }
.pb-picker-tabs { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.pb-edit .pb-picker-tabs button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.pb .pb-edit input.pb-picker-search { flex: 1 1 120px; min-width: 100px; font: inherit; font-size: 13px; color: #ede3cc; background: #241b11; border: 1px solid #5a4930;
  border-radius: 6px; padding: 4px 8px; }
.pb .pb-edit input.pb-picker-search:focus { outline: none; border-color: var(--accent); }
.pb-picker-head button { margin-left: 0; }

/* a line's kit as pictures, the size of an emoji */
.pb-pip { width: 22px; height: 22px; }
.pb-row-note { color: #b9a57f; font-size: 13px; }

/* ---- the builder, brought to life ---- */
@media (prefers-reduced-motion: no-preference) {
  .pb-chip { transition: transform 0.12s ease, border-color 0.12s, box-shadow 0.12s; }
  .pb-list .pb-chip:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--role); border-color: var(--role); }
  .pb-row.flash { animation: pb-flash 0.9s ease-out, pb-slide 0.25s ease-out; }
  @keyframes pb-slide { from { transform: translateX(-10px); opacity: 0; } to { transform: none; opacity: 1; } }
  .pb-edit { animation: pb-open 0.18s ease-out; }
  @keyframes pb-open { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }
  .pb-piece.pop img { animation: pb-pop 0.35s cubic-bezier(0.2, 1.6, 0.4, 1); }
  @keyframes pb-pop { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }
  .pb-piece.on { animation: pb-ring 1.6s ease-in-out infinite; }
  @keyframes pb-ring { 50% { box-shadow: 0 0 0 3px var(--accent), 0 0 18px rgba(214, 166, 78, 0.55); } }
  .pb-built-item u { transition: width 0.4s ease-out; }
}
/* the side lists: a wash of the role's colour, and how much each weapon is played */
.pb-list { background: linear-gradient(180deg, color-mix(in srgb, var(--role) 13%, var(--panel)) 0, var(--panel) 90px); }
.pb-list header b { text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4); }
.pb-chip.played::after { content: ""; position: absolute; left: 6px; bottom: 2px; height: 2px; width: calc(var(--played) - 12px); min-width: 3px; border-radius: 2px;
  background: var(--role); opacity: 0.85; }
.pb-chip.played { padding-bottom: 7px; }

/* an open line: a character sheet */
.pb-edit { border-color: color-mix(in srgb, var(--role) 55%, #5a4930); background: linear-gradient(180deg, color-mix(in srgb, var(--role) 9%, #120d07) 0, #120d07 120px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); padding: 12px; gap: 12px; }
.pb-edit-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; }
.pb-doll { display: grid; grid-template-columns: repeat(3, 68px); grid-auto-rows: 78px; gap: 7px; padding: 10px; border-radius: 12px;
  background: radial-gradient(120% 90% at 50% 0, #3a2f22 0, #241d15 60%, #1b1611 100%); border: 1px solid #5a4930;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5), inset 0 14px 30px rgba(255, 215, 140, 0.05); }
.pb-doll-gap { display: block; }
.pb-piece { position: relative; width: 68px; height: 78px; padding: 3px 3px 0; border-radius: 9px; display: grid; grid-template-rows: 58px auto; justify-items: center;
  align-content: start; overflow: visible; background: linear-gradient(180deg, #2c241a, #1c1711); border: 1px solid #4a3c28; color: #b9a57f;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.55), inset 0 0 14px rgba(0, 0, 0, 0.6); }
.pb-piece:hover { border-color: var(--accent); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.55), 0 0 12px rgba(214, 166, 78, 0.35); }
.pb-piece.has { border-style: solid; border-color: #8a6f3c; background: linear-gradient(180deg, #3a2f20, #231c14); }
.pb-piece img { width: 58px; height: 58px; }
.pb-piece-mark { width: 58px; height: 58px; display: grid; place-items: center; font-size: 26px; filter: grayscale(1); opacity: 0.28; }
.pb-piece.locked { opacity: 0.4; }
.pb-piece.locked .pb-piece-mark { filter: none; font-size: 15px; font-weight: 700; letter-spacing: 1px; }
.pb-piece-name { font-size: 9.5px; line-height: 1.2; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #8f7f62; text-transform: uppercase; letter-spacing: 0.5px; }
.pb-piece.has .pb-piece-name { color: #e7d3a5; text-transform: none; letter-spacing: 0; font-size: 10.5px; }
.pb-piece.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), 0 0 12px rgba(214, 166, 78, 0.4); }
.pb-piece-x { position: absolute; top: -6px; right: -6px; width: 17px; height: 17px; border-radius: 50%; background: #c2493c; color: #fff; font-size: 13px; line-height: 17px;
  text-align: center; display: none; cursor: pointer; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); }
.pb-piece:hover .pb-piece-x, .pb-piece:focus-visible .pb-piece-x { display: block; }

/* beside it: the search, and what goes in the chosen place */
.pb-picker { border-top: 0; padding-top: 0; min-width: 0; }
.pb-picker-head { display: flex; align-items: center; gap: 8px; background: #241b11; border: 1px solid #5a4930; border-radius: 9px; padding: 2px 10px; flex-wrap: nowrap; }
.pb-picker-head:focus-within { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pb-kit-glass { font-size: 13px; opacity: 0.7; }
.pb .pb-edit input.pb-kit-search { flex: 1; min-width: 0; font: inherit; font-size: 14px; color: #f6ecd4; background: none; border: 0; padding: 7px 0; }
.pb .pb-edit input.pb-kit-search:focus { outline: none; }
.pb-picker-head b { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
.pb-picker-list { max-height: 252px; }

/* commonly built with: each choice with how common it is */
.pb-built { border-top: 1px solid #3a2e1f; padding-top: 10px; gap: 8px; }
.pb-built-head b { font-family: var(--display); letter-spacing: 0.3px; color: #f0dfbd; }
.pb-edit .pb-built-all { margin-left: auto; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.pb-built-rows { display: grid; gap: 5px; }
.pb-built-row { display: grid; grid-template-columns: 62px repeat(3, minmax(0, 1fr)); gap: 6px; align-items: stretch; }
.pb-edit .pb-built-item { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 3px 9px 6px 4px;
  border-radius: 8px; font-size: 12.5px; text-align: left; overflow: hidden; }
.pb-built-item img { width: 30px; height: 30px; }
.pb-built-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-built-item i { font-size: 12px; color: #cbb992; font-variant-numeric: tabular-nums; }
.pb-built-item u { position: absolute; left: 0; bottom: 0; height: 3px; background: #6b5a3e; text-decoration: none; }
.pb-built-item.top u { background: var(--accent); }
.pb-built-item.top i { color: var(--accent); font-weight: 600; }
.pb-edit .pb-built-item.on { border-color: var(--accent); background: rgba(214, 166, 78, 0.12); }
@media (max-width: 760px) {
  .pb-edit-body { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .pb-picker { width: 100%; }
  .pb-built-row { grid-template-columns: minmax(0, 1fr); }
}

/* the post, in the site's own colours (no Discord grey: this is where a party is put together) */
.pb-post { background: radial-gradient(120% 80% at 50% 0, #2a1f12 0, #17110a 70%); border: 1px solid #5a4930; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 220, 150, 0.06); }
.pb-post.aim { border-color: #8a6f3c; border-style: dashed; }
.dc-avatar { border: 1px solid #8a6f3c; }
.dc-avatar.none { background: var(--accent); color: var(--accent-ink); }
.dc-head b { font-family: var(--display); letter-spacing: 0.5px; color: #f0dfbd; }
.dc-embed { max-width: 700px; background: linear-gradient(180deg, #2a2014, #1e170e); border: 1px solid #4a3c28; border-left: 4px solid var(--accent); border-radius: 8px; padding: 14px 16px 14px 14px; gap: 10px; }
.dc-field-name { font-family: var(--display); font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; color: #e7d3a5; padding-bottom: 3px; margin-bottom: 2px; border-bottom: 1px solid #3a2e1f; }
.pb .dc-embed .pb-title { font-family: var(--display); font-size: 20px; letter-spacing: 0.4px; margin: 0; padding: 8px 12px; width: 100%; color: #f6ecd4;
  background: rgba(0, 0, 0, 0.28); border: 1px solid #5a4930; border-radius: 8px; }
.pb .dc-embed .pb-title:hover { border-color: #8a6f3c; }
.pb .dc-embed .pb-title:focus { border-color: var(--accent); background: rgba(0, 0, 0, 0.4); box-shadow: 0 0 0 1px var(--accent); }
.pb .dc-embed .pb-title::placeholder { color: #8a7856; font-style: italic; }
.pb-row-text i { font-style: normal; color: var(--accent); font-weight: 600; }
.pb-row-x { opacity: 1; color: #e07a62; font-size: 17px; display: inline-flex; align-items: center; justify-content: center; line-height: 0; padding-bottom: 2px; box-sizing: border-box; }
.pb-row-x:hover { color: #fff; background: #c2493c; }
.pb-post-more button { background: #2c2217; border-color: #5a4930; color: #ede3cc; }
/* the open line's head: what it is, how many */
.pb-edit-name { font-family: var(--display); font-size: 16px; letter-spacing: 0.3px; color: #f6ecd4; }
.pb-edit-role { font-size: 11px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--role); border: 1px solid var(--role); border-radius: 999px; padding: 1px 8px; margin-right: auto; }

/* which kind of content: small scale or ZvZ, each with its colour */
.pb .scale-few { --scale: #7fb86a; }
.pb .scale-small { --scale: #4fb3a5; }
.pb .scale-zvz { --scale: #d9695a; }
.pb-scales { display: grid; gap: 7px; padding-top: 8px; }
.pb-scales-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* the party frame: twenty places, in the three groups' colours */
.pb-frame { display: inline-flex; gap: 3px; padding: 4px 6px 19px; border-radius: 9px; background: var(--panel); border: 1px solid var(--line); }
.pb-place { position: relative; width: 17px; height: 22px; padding: 0; border-radius: 4px; border: 1px solid color-mix(in srgb, var(--scale) 35%, var(--line)); background: transparent;
  opacity: 0.45; transition: transform 0.1s, opacity 0.1s, background 0.1s; }
.pb-place:nth-child(5n):not(:last-child) { margin-right: 7px; }   /* in fives: the groups a party of twenty splits into */
.pb-place:hover:not(:disabled) { opacity: 1; transform: translateY(-2px); border-color: var(--scale); }
.pb-place.open { opacity: 1; border-color: var(--scale); }
.pb-place.in { opacity: 1; background: var(--scale); border-color: var(--scale); }
.pb-place.size { box-shadow: 0 0 0 2px var(--accent), 0 0 10px rgba(214, 166, 78, 0.5); opacity: 1; }
.pb-place:disabled { opacity: 0.25; cursor: default; }
/* its number, under it: which place is being clicked */
.pb-place::after { content: attr(data-n); position: absolute; left: 50%; top: calc(100% + 3px); transform: translateX(-50%);
  font-size: 11px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--text); pointer-events: none; }
.pb-place:hover:not(:disabled)::after, .pb-place.size::after { color: var(--accent); font-weight: 700; }
.pb-frame-count { font-size: 13px; color: var(--muted); margin-left: 4px; }
.pb-frame-count b { font-family: var(--display); font-size: 17px; color: var(--accent); }
.pb-frame-count small { color: var(--faint); font-size: 12px; }
.pb-frame-count.over b { color: var(--bad); }
.pb-alike-item.last { border-style: dashed; opacity: 0.85; }
.pb-scales:empty { display: none; }
.pb-size-hint { font-size: 13px; color: var(--accent); font-weight: 600; margin-left: 6px; }
.pb-size-hint.set { color: var(--faint); font-weight: 400; }
.pb-size-row.unset { padding: 6px 8px; margin: 0 -8px; border: 1px dashed var(--accent); border-radius: 8px; background: var(--accent-soft); }
.pb-scales-label { font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--faint); margin-right: 2px; }
.pb-scale { padding: 4px 12px; font-size: 13px; border-radius: 999px; border-color: color-mix(in srgb, var(--scale) 45%, var(--line)); color: var(--muted); }
.pb-scale::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--scale); margin-right: 7px; }
.pb-scale.on { background: color-mix(in srgb, var(--scale) 22%, var(--panel)); border-color: var(--scale); color: var(--text); font-weight: 600; box-shadow: 0 0 0 1px var(--scale); }
.pb-built-head .pb-scale-tag { font-size: 11px; letter-spacing: 1.1px; text-transform: uppercase; color: var(--scale); border: 1px solid var(--scale); border-radius: 999px; padding: 1px 8px; }

/* spells, by their pictures: the rows an item shows in the game, one picked a row */
.pb-spells { border-top: 1px solid #3a2e1f; padding-top: 10px; display: grid; gap: 7px; }
.pb-spell-row { display: grid; grid-template-columns: 62px minmax(0, 1fr); align-items: center; gap: 8px; }
.pb-spell-key { justify-self: start; min-width: 30px; text-align: center; font-family: var(--display); font-size: 12px; letter-spacing: 0.6px; color: #e7d3a5;
  border: 1px solid #5a4930; border-radius: 6px; padding: 2px 7px; background: #241b11; }
.pb-spell-set { display: grid; grid-template-columns: repeat(5, minmax(0, 44px)); gap: 7px; padding: 5px 8px; border-radius: 10px; background: rgba(0, 0, 0, 0.22); border: 1px solid #3a2e1f; }
.pb-edit .pb-spell { width: 100%; height: auto; aspect-ratio: 1; padding: 0; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: #1b1611;
  border: 2px solid #4a3c28; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6); opacity: 0.55; filter: saturate(0.5); transition: opacity 0.12s, filter 0.12s, transform 0.12s; }
.pb-spell img { width: 100%; height: 100%; display: block; }
.pb-edit .pb-spell:hover { opacity: 1; filter: none; transform: scale(1.08); border-color: #8a6f3c; }
.pb-edit .pb-spell.on { opacity: 1; filter: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), 0 0 14px rgba(214, 166, 78, 0.55); }
.pb-edit .pb-spell.only { opacity: 1; filter: none; cursor: default; border-style: solid; border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent), 0 0 10px rgba(214, 166, 78, 0.35); }
.pb-edit .pb-spell.only:hover { transform: none; border-color: var(--accent); }
.pb-spell-none { font-size: 11px; color: #8a7856; }
.pb-row-code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: #cbb992; }
.pb-edit .pb-spell { position: relative; overflow: visible; }
.pb-spell img { border-radius: 50%; }
.pb-spell i { position: absolute; right: -4px; bottom: -4px; min-width: 15px; height: 15px; border-radius: 50%; background: #120d07; border: 1px solid #5a4930;
  color: #cbb992; font-size: 10px; font-style: normal; line-height: 14px; text-align: center; }
.pb-edit .pb-spell.on i { border-color: var(--accent); color: var(--accent); }
.pb-text-spells { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); cursor: pointer; }

/* for the whole party: what parties like this one usually also bring */
.pb-alike-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }

.pb-alike-item { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 4px; border-radius: 9px; font-size: 13px; background: var(--panel-2); }
.pb-alike-item:hover { border-color: var(--accent); }
.pb-alike-item img { width: 30px; height: 30px; display: block; }
.pb-alike-item b { color: var(--accent); font-weight: 600; }
.pb-alike-item i { font-style: normal; font-size: 12px; color: var(--faint); }

/* for the whole party: what it's low on, and the pieces that would cover it */
.pb-low-why { font-size: 13px; color: var(--muted); }
.pb-low-more { font-size: 12.5px; color: var(--faint); }

/* the bar (where it's filed, New, Copy, Keep) heads the party: in one place however long the list gets */
.pb-party { display: grid; grid-template-columns: minmax(0, 1fr); }
.pb-party .pb-bar { padding: 8px 12px; border: 1px solid #5a4930; border-bottom: 0; border-radius: 12px 12px 0 0; background: #2a1f12; }
.pb-party .pb-post { border-top-left-radius: 0; border-top-right-radius: 0; background: linear-gradient(180deg, #2a1f12 0, #17110a 140px); }
.pb-party .pb-bar .pb-state { color: #b9a57f; min-width: 0; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pb-party .pb-bar { flex-wrap: nowrap; }
.pb-party .pb-bar > :not(.pb-state) { flex: none; }
@media (max-width: 620px) { .pb-party .pb-bar { flex-wrap: wrap; } }

/* a kept party in a list: its weapons as pictures; the whole of it in a tooltip */
.pb-kept-open { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 7%, var(--panel-2)) 0, var(--panel-2) 220px); }
.pb-kept-open:hover { border-color: var(--accent); }
.pb-kept-open b { font-family: var(--display); font-size: 15px; letter-spacing: 0.3px; }
.pb-kept-weps { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pb-kept-wep { position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 7px;
  background: rgba(0, 0, 0, 0.25); border-bottom: 2px solid var(--role); }
.pb-kept-wep img { width: 32px; height: 32px; display: block; }
.pb-kept-wep i { position: absolute; right: -3px; bottom: -3px; min-width: 15px; padding: 0 3px; border-radius: 8px; font-style: normal; font-size: 10.5px;
  font-weight: 700; line-height: 15px; text-align: center; color: var(--accent-ink); background: var(--accent); }
.pb-kept-any { font-size: 16px; }
.pb-kept-rest { font-size: 12.5px; color: var(--faint); margin-left: 2px; }
.pb-tip-party { width: min(300px, calc(100vw - 16px)); }
.pb-tip-head.plain { grid-template-columns: minmax(0, 1fr); }
.pb-tip-role { margin-top: 8px; padding-top: 6px; border-top: 1px solid #3a2e1f; }
.pb-tip-role h4 { margin: 0 0 3px; font-size: 11px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--role); }
.pb-tip-line { display: grid; grid-template-columns: 38px 24px minmax(0, 1fr) auto; align-items: center; gap: 7px; font-size: 13px; padding: 1px 0; }
.pb-tip-line img { width: 24px; height: 24px; display: block; border: 0; border-radius: 0; }
.pb-tip-n { color: #b9a57f; font-variant-numeric: tabular-nums; text-align: right; }
.pb-tip-line i { font-style: normal; color: var(--accent); }

/* a spell's tooltip, after the game's own */
.pb-tip { position: fixed; z-index: 60; width: min(340px, calc(100vw - 16px)); box-sizing: border-box; padding: 12px 14px; border-radius: 10px; pointer-events: none;
  background: linear-gradient(180deg, #2a1f12 0, #17110a 100%); border: 1px solid #8a6f3c; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6); color: #ede3cc; }
.pb-tip-head { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; align-items: center; }
.pb-tip-head img, .pb-tip-head .pb-spell-none { width: 48px; height: 48px; border-radius: 50%; border: 2px solid #8a6f3c; display: grid; place-items: center; }
.pb-tip-head b { display: block; font-family: var(--display); font-size: 16px; letter-spacing: 0.3px; color: var(--accent); }
.pb-tip-head span { font-size: 12px; color: #b9a57f; }
.pb-tip dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 14px; margin: 10px 0 0; padding-top: 8px; border-top: 1px solid #3a2e1f; font-size: 13px; }
.pb-tip dt { color: #b9a57f; }
.pb-tip dd { margin: 0; text-align: right; color: #f6ecd4; font-variant-numeric: tabular-nums; }
.pb-tip p { margin: 10px 0 0; padding-top: 8px; border-top: 1px solid #3a2e1f; font-size: 13px; line-height: 1.45; color: #d9ccae; }

/* the guild's permissions: which Discord roles do what */
.pb-guild .card-head { flex-wrap: wrap; }
.pb-scales-row .pb-manage { order: 9; margin-left: auto; border-color: var(--accent); color: var(--accent); }
.pb-perms { max-height: calc(100vh - 60px); overflow-y: auto; }
.pb-perm { margin: 0 0 12px; padding: 10px 12px 12px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.pb-perm legend { padding: 0 6px; font-family: var(--display); font-size: 15px; color: var(--accent); }
.pb-perm p { margin: 0 0 8px; font-size: 13px; }
.pb-perm-roles { display: flex; flex-wrap: wrap; gap: 6px; max-height: 132px; overflow-y: auto; }
.pb-perm-roles label { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 7px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 13px; cursor: pointer; background: var(--panel-2); }
.pb-perm-roles label:has(input:checked) { border-color: var(--accent); }
.pb-perm.off { opacity: 0.5; }
.pb-perm.off label { cursor: not-allowed; }
.pb-kept .pb-push { border-color: var(--accent); color: var(--accent); }

/* posting the party as an event: its date, time and channel */
.pb-event { display: grid; gap: 10px; }
.pb-event label { display: grid; gap: 4px; }
.pb-event label span { font-size: 11px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--muted); }
.pb-event-clock { color: var(--accent); font-weight: 600; letter-spacing: 0.5px; }
.pb-event textarea { font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  width: 100%; box-sizing: border-box; resize: vertical; }
.pb-event textarea:focus { outline: none; border-color: var(--accent); }
.pb-event input, .pb-event select { font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  max-width: none; width: 100%; box-sizing: border-box; color-scheme: dark; }
.pb-event input:focus, .pb-event select:focus { outline: none; border-color: var(--accent); }
.pb-bar .pb-push { border-color: var(--accent); color: var(--accent); }
.pb-bar .pb-push:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }

/* what the party's low on: one strip; a click opens the pieces that would cover it */
.pb-low { display: grid; gap: 8px; padding: 8px 12px; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--warn) 40%, var(--line)); background: var(--panel); }
.pb-low-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pb-low-label { font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; font-weight: 600; color: var(--warn); margin-right: 4px; }
.pb-low-chip { display: inline-flex; align-items: baseline; gap: 7px; padding: 3px 11px; border-radius: 999px; font-size: 13px; background: transparent;
  border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
.pb-low-chip i { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--warn); }
.pb-low-chip:hover, .pb-low-chip.on { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 13%, transparent); }
.pb-low-row { display: block; border-top: 1px solid var(--line); padding-top: 8px; }

/* a line open on a wide page: its kit takes the left corner, its spells the right; the party stays whole between them */
.pb-stage.editing { grid-template-columns: minmax(340px, 500px) minmax(420px, 1fr) minmax(330px, 392px); }
.pb-stage.editing .pb-side { grid-template-rows: minmax(0, 1fr); }
.pb-edit.side { margin: 0; padding: 12px; min-height: 0; overflow-y: auto; align-content: start; gap: 12px; border-radius: var(--radius); color: #ede3cc;
  border-top: 3px solid var(--role); }
.pb-edit.side .pb-doll { justify-self: center; }
.pb-edit.side .pb-picker { width: 100%; }
.pb-edit.side .pb-picker-list { max-height: none; }
.pb-edit.side .pb-spells:first-child { border-top: 0; padding-top: 0; }
.pb-edit.side .pb-spells ~ .pb-spells .pb-spells-hint { display: none; }   /* said once, on the first */
.pb-edit.side .pb-spells.on .pb-built-head b { color: var(--accent); }
.pb-edit.side .pb-built-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pb-edit.side .pb-built-place { grid-column: 1 / -1; width: auto; }
.pb-edit .pb-edit-done { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.pb-side-note { display: grid; gap: 4px; border-top: 1px solid #3a2e1f; padding-top: 10px; }
.pb-side-note span { font-size: 11px; letter-spacing: 1.3px; text-transform: uppercase; color: #b9a57f; }

/* ---- a kept party's page (/p/...): to look at -- every line, what it wears, the spells picked ---- */
main.pv { max-width: 1020px; display: grid; gap: 18px; align-content: start; }
.pv-head { display: grid; gap: 8px; }
.pv-head h1 { margin: 0; font-family: var(--display); font-size: 30px; letter-spacing: 0.5px; color: var(--accent); }
.pv-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pv-by { font-size: 13px; color: var(--faint); }
.pv-note { margin: 0; color: var(--muted); font-family: var(--serif); font-size: 17px; }
.pv-until { margin: 0; font-size: 13px; color: var(--warn); }
.pv-jump { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.pv-search { flex: 1 1 260px; max-width: 420px; }
.pv-chip { padding: 4px 12px; border-radius: 999px; font-size: 13px; text-decoration: none; color: var(--text);
  border: 1px solid color-mix(in srgb, var(--role) 55%, var(--line)); background: color-mix(in srgb, var(--role) 12%, transparent); }
.pv-chip:hover { border-color: var(--role); }
.pv-role { display: grid; gap: 8px; scroll-margin-top: 12px; }
.pv-role h2 { margin: 0; font-family: var(--display); font-size: 16px; letter-spacing: 0.6px; color: var(--role); display: flex; align-items: baseline; gap: 6px; }
.pv-role h2 i { font-style: normal; font-size: 12.5px; padding: 1px 8px; border-radius: 999px; color: var(--text); background: color-mix(in srgb, var(--role) 28%, transparent); }
.pv-line { display: grid; grid-template-columns: 58px 64px minmax(150px, 1fr) minmax(0, 2.4fr); gap: 6px 14px; align-items: center; padding: 10px 14px;
  border-radius: var(--radius); background: linear-gradient(90deg, color-mix(in srgb, var(--role) 10%, var(--panel)) 0, var(--panel) 240px);
  border: 1px solid var(--line); border-left: 4px solid var(--role); }
.pv-n { font-family: var(--display); font-size: 19px; color: var(--accent); text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pv-weapon { width: 64px; height: 64px; display: block; }
.pv-weapon.none, .pv-piece.none, .pv-spell-icon.none { display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 8px; color: var(--faint); font-size: 11px; }
.pv-who h3 { margin: 0; font-size: 18px; color: var(--text); }
.pv-who h3 i { font-style: normal; color: var(--accent); font-size: 15px; }
.pv-full { font-size: 12.5px; color: var(--faint); }
.pv-said { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.pv-said span { font-size: 12.5px; padding: 1px 9px; border-radius: 999px; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--line)); }
.pv-kit { display: flex; flex-wrap: wrap; gap: 8px; }
.pv-kit figure { margin: 0; width: 68px; text-align: center; }
.pv-piece { width: 52px; height: 52px; display: block; margin: 0 auto; }
.pv-kit figcaption { display: grid; line-height: 1.2; }
.pv-kit figcaption b { font-size: 12px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-kit figcaption span { font-size: 10px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--faint); }
.pv-open { margin: 0; font-size: 13px; color: var(--faint); }
.pv-spells { grid-column: 3 / -1; display: flex; flex-wrap: wrap; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.pv-spell { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 3px; border-radius: 999px; font-size: 12.5px; color: var(--muted);
  background: var(--panel-2); border: 1px solid var(--line); cursor: help; }
.pv-spell:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pv-spell kbd { font: inherit; font-size: 10.5px; font-weight: 700; min-width: 20px; text-align: center; padding: 1px 5px; border-radius: 999px; color: var(--accent-ink); background: var(--accent); }
.pv-spell-icon { width: 26px; height: 26px; border-radius: 50%; display: block; }
.pv-none { color: var(--muted); }
@media (max-width: 760px) {
  .pv-line { grid-template-columns: 44px 52px minmax(0, 1fr); }
  .pv-weapon { width: 52px; height: 52px; }
  .pv-kit, .pv-spells, .pv-open { grid-column: 1 / -1; }
  .pv-head h1 { font-size: 24px; }
}

@media (max-width: 1150px) {  /* no room for the corners: the post first, the lists under it */
  .pb.ready > .pb-stage { grid-template-columns: minmax(0, 1fr); height: auto; }
  .pb-center { order: -1; overflow: visible; padding: 0; }
  .pb-side { grid-template-rows: none; }
  .pb-list { max-height: 300px; }
  .pb-search-wrap { position: static; }
  .pb-found { position: static; margin-top: 4px; }
}

/* ---- the alliance: its guilds, what each is and did, a door to its Discord ---- */
main.al { max-width: 1180px; display: grid; gap: 16px; align-content: start; justify-items: center; }
/* the arena: the alliance in the middle, its guilds seated round it, each tied to the centre */
.al-arena { position: relative; width: min(100%, 1040px); aspect-ratio: 1.3; margin-top: 4px; }
.al-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.al-lines * { vector-effect: non-scaling-stroke; }
.al-lines .tier { fill: none; stroke: var(--line); stroke-width: 1px; stroke-dasharray: 3 6; }
.al-lines .tier.main { stroke: color-mix(in srgb, var(--accent) 45%, var(--line)); stroke-width: 1.5px; stroke-dasharray: none; }
.al-lines .tie { stroke: color-mix(in srgb, var(--accent) 30%, var(--line)); stroke-width: 1.5px; }
.al-lines .tie.ours { stroke: color-mix(in srgb, var(--accent) 70%, var(--line)); }
.al-lines .tie.on { stroke: var(--accent); stroke-width: 3px; }
.al-core { position: absolute; left: 50%; top: 50%; width: 30%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  display: grid; align-content: center; justify-items: center; gap: 2px; text-align: center; padding: 6%; box-sizing: border-box;
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--accent) 22%, var(--panel)) 0, var(--panel) 70%);
  border: 2px solid var(--accent); box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 10%, transparent), 0 0 60px rgba(214, 166, 78, 0.22); }
.al-core-eyebrow { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--muted); }
.al-core strong { font-family: var(--display); font-size: clamp(26px, 5.4vw, 46px); line-height: 1; letter-spacing: 1px; color: var(--accent); }
.al-core em { font-style: normal; font-family: var(--serif); font-size: 15px; color: var(--muted); }
.al-core-big { display: grid; line-height: 1; margin-top: 6px; }
.al-core-big b { font-family: var(--display); font-size: clamp(24px, 4.6vw, 40px); color: var(--text); font-variant-numeric: tabular-nums; }
.al-core-big span { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--faint); }
.al-core-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 12px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.al-core-row b { color: var(--text); font-variant-numeric: tabular-nums; }
.al-core-row .good b { color: var(--good); }
.al-core-row .bad b { color: var(--bad); }
.al-core small { font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--faint); }
.al-core-founded { margin: 6px 0 0; font-family: var(--serif); font-size: clamp(11px, 1.5vw, 13.5px); color: var(--muted); line-height: 1.2; }
/* a guild's plaque: its name, what it is, what it did this week */
.al-seat { position: absolute; transform: translate(-50%, -50%); border-radius: 12px; padding: 9px 10px 10px; box-sizing: border-box;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; justify-items: center; align-content: start; height: auto; text-align: center; cursor: pointer;
  background: linear-gradient(180deg, var(--panel-2) 0, var(--panel) 100%); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-top: 3px solid color-mix(in srgb, var(--accent) 55%, var(--line)); color: var(--text);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35); transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s; }
.al-seat b { width: 100%; font-family: var(--display); font-size: clamp(10px, 1.25vw, 15px); line-height: 1.15; letter-spacing: 0.3px; overflow-wrap: break-word; }
.al-seat-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 1px 9px; }
.al-seat-row.week { padding-top: 5px; border-top: 1px solid var(--line); width: 100%; }
.al-seat-n { font-size: clamp(8.5px, 0.95vw, 11.5px); color: var(--faint); font-variant-numeric: tabular-nums; line-height: 1.25; white-space: nowrap; }
.al-seat-n u { text-decoration: none; color: var(--text); font-weight: 600; }
.al-seat-n.good u { color: var(--good); }
.al-seat-n.bad u { color: var(--bad); }
.al-seat-marks { display: block; width: 100%; line-height: 1; }
.al-seat-marks .al-seat-flag { display: inline-block; margin: 0 2px; vertical-align: middle; }
.al-seat-flag { flex: none; line-height: 1.5; white-space: nowrap; font-size: clamp(7.5px, 0.8vw, 9.5px); letter-spacing: 1px; text-transform: uppercase; color: var(--accent-ink);
  background: var(--accent); border-radius: 999px; padding: 1px 7px; font-weight: 700; }
.al-seat-flag.door { background: #5865f2; color: #fff; }
.al-seat:hover, .al-seat:focus-visible { transform: translate(-50%, -50%) scale(1.05); border-color: var(--accent); outline: none; z-index: 2; }
.al-seat.ours { border-color: var(--accent); border-top-color: var(--accent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 20%, var(--panel)) 0, var(--panel) 100%); }
.al-seat.on { border-color: var(--accent); border-top-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), 0 0 24px rgba(214, 166, 78, 0.45); }
/* the guild the alliance's founder is in: the one to ask about joining */
.al-seat.leads { border-top-color: #e8c66a; }
.al-seat-crown { position: absolute; left: 50%; top: 0; transform: translate(-50%, -62%); white-space: nowrap; padding: 1px 9px; border-radius: 999px;
  font-size: clamp(8px, 0.85vw, 10.5px); font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--accent-ink);
  background: linear-gradient(180deg, #f1d684 0, var(--accent) 100%); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); }
.al-lines .tie.leads { stroke: #e8c66a; stroke-width: 2.5px; stroke-dasharray: 7 5; }
.al-lead-tag { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.al-lead-note { margin: 0; font-size: 13.5px; color: var(--accent); }
.al-recruit { border-top: 1px solid var(--line); padding-top: 10px; }
.al-recruit h3 { margin: 0 0 6px; font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.al-recruit p { margin: 0; white-space: pre-line; line-height: 1.5; font-family: var(--serif); font-size: 16px; color: var(--text); }
.al-ask label { display: grid; gap: 4px; margin-bottom: 10px; }
.al-ask label span { font-size: 11px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--muted); }
.al-ask textarea { font: inherit; width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); resize: vertical; }
.al-founded { margin: 0; font-size: 13px; color: var(--faint); text-align: center; }
.al-open { width: min(100%, 620px); }
.al-grid { display: none; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; align-items: start; width: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .al-seat { animation: al-seat-in 0.5s both; animation-delay: calc(var(--i) * 45ms); }
  @keyframes al-seat-in { from { opacity: 0; transform: translate(-50%, -50%) scale(0.6); } }
}
@media (max-width: 760px) {   /* no room for an arena: the alliance on top, its guilds in a list */
  .al-arena { aspect-ratio: auto; }
  .al-lines, .al-seat, .al-open, .al-founded { display: none; }
  .al-core { position: static; transform: none; width: min(100%, 320px); margin: 0 auto; }
  .al-grid { display: grid; }
}
.al-figs { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.al-fig { display: grid; line-height: 1.2; }
.al-fig b { font-family: var(--display); font-size: 20px; color: var(--text); font-variant-numeric: tabular-nums; }
.al-fig span { font-size: 11px; letter-spacing: 1.1px; text-transform: uppercase; color: var(--faint); }
.al-fig.good b { color: var(--good); }
.al-fig.bad b { color: var(--bad); }
.al-guild { display: grid; gap: 12px; }
.al-guild.ours { border-color: var(--accent); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 8%, var(--panel)) 0, var(--panel) 130px); }
.al-guild header { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.al-guild h2 { margin: 0; font-family: var(--display); font-size: 19px; letter-spacing: 0.3px; }
.al-about { margin: 0; font-size: 13.5px; color: var(--muted); }
.al-week { border-top: 1px solid var(--line); padding-top: 10px; }
.al-week h3 { margin: 0 0 8px; font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.al-quiet { margin: 0; font-size: 13px; color: var(--faint); }
.al-guild footer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.al-guild footer:empty { display: none; }
.al-ask input { font: inherit; width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); }

/* ---- the killboard's guilds: ours, and the ones this person tracks ---- */
.kb-guilds { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.kb-guilds:empty { display: none; }
.kb-guild { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); overflow: hidden; }
.kb-guild a { padding: 5px 12px; color: var(--text); text-decoration: none; font-size: 14px; }
.kb-guild.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--panel)); }
.kb-guild.on a { color: var(--accent); font-weight: 600; }
.kb-guild button { border: 0; border-left: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--bad); padding: 5px 9px; font-size: 15px; line-height: 1; }
.kb-guild button:hover { background: color-mix(in srgb, var(--bad) 16%, transparent); }
.kb-track-wrap { position: relative; flex: 0 1 340px; margin-left: auto; }
.kb-track { width: 100%; box-sizing: border-box; padding: 6px 12px; border-radius: 999px; font-size: 14px; }
.kb-found { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; display: grid; gap: 2px; padding: 6px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--accent); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5); }
.kb-found-hit { text-align: left; border: 0; background: transparent; padding: 6px 9px; border-radius: 7px; font-size: 14px; }
.kb-found-hit:hover { background: var(--panel-2); color: var(--accent); }
.kb-guilds-note { font-size: 12.5px; color: var(--faint); }
.kb-guilds-note.bad { color: var(--bad); }
.mvp-guild { font-size: 12px; color: var(--faint); }
.kb-table tr.ours td:first-child { box-shadow: inset 3px 0 0 var(--accent); padding-left: 9px; }
.kb-table tr.alliance-row td { font-family: var(--display); letter-spacing: 0.4px; color: var(--bad); border-top: 1px solid var(--line); padding-top: 9px; }
.kb-table tr.alliance-row.ours-side td:first-child { color: var(--good); }
.kb-table tr.alliance-row td.good-text, .kb-table tr.alliance-row td.bad-text, .kb-table tr.alliance-row td.num { font-family: inherit; }
.kb-table tr.in-alliance td:first-child { padding-left: 14px; }

/* a big fight's side: its best few, then its guilds -- each opens to its players */
.side-card { display: grid; gap: 8px; }
.side-sort { display: flex; align-items: center; gap: 10px; }
.side-sort .tabs { margin: 0; border-bottom: 0; }
.side-fold { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.side-fold.mine { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.side-fold.top { border-color: color-mix(in srgb, var(--good) 40%, var(--line)); }
.side-fold-head { width: 100%; display: grid; grid-template-columns: 14px auto 1fr auto; align-items: baseline; gap: 9px; padding: 8px 12px; border: 0; border-radius: 0;
  background: var(--panel-2); text-align: left; }
.side-fold-head:hover b { color: var(--accent); }
.side-fold.mine .side-fold-head b { color: var(--accent); }
.side-fold-mark { color: var(--faint); font-size: 12px; }
.side-fold-n { display: inline-flex; gap: 14px; font-variant-numeric: tabular-nums; font-size: 14px; }
.side-fold-n span { min-width: 22px; text-align: right; opacity: 0.6; }
.side-fold-n span.sorted { opacity: 1; font-weight: 700; }
.side-list { padding: 4px 12px 10px; }
.side-list .kb-table th.sorted { color: var(--accent); }
.side-more { margin-top: 8px; }
.side-list .kb-table th:nth-last-child(-n+3), .side-list .kb-table td:nth-last-child(-n+3) { width: 46px; text-align: right; }
.kb-found-hit { display: grid; grid-template-columns: minmax(58px, auto) minmax(0, 1fr) auto; align-items: baseline; gap: 8px; }
.kb-found-tag { color: var(--accent); font-weight: 600; font-size: 13px; }
.kb-found-tag.none { color: var(--faint); font-weight: 400; font-size: 11.5px; }
.kb-found-hit i { font-style: normal; font-size: 12px; color: var(--faint); white-space: nowrap; }
.nav-out { margin: 0 0 0 8px; }
.nav-out button { white-space: nowrap; }

/* today in Albion: the day's production bonus, and the events running */
.daily-card { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, var(--panel)), var(--panel) 70%); border-color: var(--line-strong); }
.daily-card .card-head .tag { font-size: 12.5px; color: var(--muted); }
.daily-card .card-head .tag .daily-left { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.daily-card .card-head .daily-stale { color: var(--warn); }
.daily-body { display: grid; gap: 16px; }
.daily-col.events { display: flex; flex-wrap: wrap; gap: 10px; }
.daily-col.events .daily-h { flex: 1 0 100%; margin-bottom: -2px; }
.daily-h { font-family: var(--display); font-size: 11.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.daily-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.daily-tile { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: grid; gap: 10px; }
.daily-tile.over { opacity: 0.55; }
.daily-top { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.daily-icon { width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45)); }
.daily-icon.none { border: 1px dashed var(--line-strong); border-radius: 10px; }
.daily-name { min-width: 0; }
.daily-name b { display: block; font-family: var(--display); font-size: 16px; letter-spacing: 0.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.daily-name span { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.daily-name em { font-style: normal; color: var(--accent); font-weight: 600; }
.daily-plus { font-family: var(--display); font-size: 19px; font-weight: 700; color: var(--accent-ink); background: var(--accent); border-radius: 9px; padding: 4px 10px; line-height: 1.1; }
.daily-bar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.daily-bar span { display: grid; place-items: center; min-width: 30px; color: var(--accent-ink); }
.daily-bar .d-base, .daily-legend .d-base::before { background: #8a7856; }
.daily-bar .d-city, .daily-legend .d-city::before { background: #b98f43; }
.daily-bar .d-day, .daily-legend .d-day::before { background: var(--accent); }
.daily-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12px; color: var(--muted); margin-top: -4px; }
.daily-legend span::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.daily-legend b { margin-left: auto; color: var(--text); font-size: 13px; }
.daily-back { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.daily-back > div { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; display: grid; gap: 1px; }
.daily-back span { font-size: 11.5px; color: var(--faint); }
.daily-back b { font-size: 19px; font-variant-numeric: tabular-nums; }
.daily-back .focus b { color: var(--good); }
.daily-back .else { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; background: transparent; border-style: dashed; padding: 5px 10px; }
.daily-back .else b { font-size: 13px; font-weight: 600; color: var(--muted); }
.daily-note { margin: 0; font-size: 13px; color: var(--muted); }
.daily-event { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; flex: 1 1 260px; }
.daily-event b { display: block; font-family: var(--display); font-size: 15px; }
.daily-event span { font-size: 12.5px; color: var(--muted); }
.daily-until { text-align: right; white-space: nowrap; }
.daily-until .daily-left { display: block; color: var(--accent); font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.daily-card .source { margin-top: 12px; }

/* the companion page */
.cp { max-width: 760px; margin: 0 auto; padding: 22px 18px 40px; display: grid; gap: 16px; align-content: start; }
.cp .notice { padding: 18px; }
.cp-what p { margin: 10px 0 0; }
.cp-claim { text-align: center; display: grid; gap: 10px; justify-items: center; border-color: var(--accent); padding: 26px 20px; }
.cp-claim h2 { margin: 0; font-family: var(--display); }
.cp-claim p { margin: 0; max-width: 46ch; }
.cp-code { font-family: var(--display); font-size: 40px; letter-spacing: 8px; color: var(--accent); padding: 6px 18px 6px 26px; border: 1px dashed var(--line-strong); border-radius: 12px; }
.cp-done { border-color: var(--good); }
.cp-what ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--muted); font-size: 14px; }
.cp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cp-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; }
.cp .meta { font-size: 12.5px; color: var(--faint); }

/* the Marketplace: a member's own listings */
.mk { max-width: 1240px; margin: 0 auto; padding: 22px 18px 40px; display: grid; gap: 16px; align-content: start; }
.mk-head h1 { font-family: var(--display); font-size: 26px; margin: 2px 0 4px; }
.mk .meta { font-size: 13px; color: var(--faint); margin: 0; }
.mk-body { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; }
.mk-side { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 14px; position: sticky; top: 76px; }
.mk-search { width: 100%; box-sizing: border-box; padding: 8px 12px; border-radius: 999px; font-size: 14px; }
.mk-h { font-family: var(--display); font-size: 11.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.mk-group { display: grid; gap: 2px; }
.mk-pick { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; width: 100%; text-align: left; border: 0; background: transparent; padding: 5px 9px; border-radius: 7px; font-size: 14px; color: var(--text); }
.mk-pick:hover { background: var(--panel-2); }
.mk-pick.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.mk-pick i, .mk-check i { font-style: normal; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.mk-check { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); padding: 2px 9px; }
.mk-main { display: grid; gap: 12px; min-width: 0; }
.mk-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.mk-tiles .stat.warn { border-color: var(--warn); }
.mk-tiles .stat.warn .value { color: var(--warn); }
.mk-sub { font-size: 12px; color: var(--faint); margin-top: 2px; }
.mk-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.mk-table { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mk-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 130px 70px 90px 100px 96px; gap: 12px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--line); }
.mk-row.head { border-top: 0; background: var(--panel-2); font-family: var(--display); font-size: 11.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); padding: 9px 14px; }
.mk-row:not(.head):hover { background: color-mix(in srgb, var(--accent) 5%, var(--panel)); }
.mk-row.buy { box-shadow: inset 3px 0 0 var(--good); }
.mk-icon { width: 44px; height: 44px; object-fit: contain; }
.mk-name b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-name i { font-style: normal; font-size: 12.5px; color: var(--faint); }
.mk-city { font-size: 13.5px; color: var(--muted); }
.mk-row .num { text-align: right; font-variant-numeric: tabular-nums; }
.mk-row .strong { font-weight: 700; color: var(--accent); }
.mk-left.soon { color: var(--warn); font-weight: 700; }
.mk-left.over { color: var(--bad); }
.mk-intro p { max-width: 62ch; margin: 0 auto 14px; }
@media (max-width: 900px) {
  .mk-body { grid-template-columns: 1fr; }
  .mk-side { position: static; }
  .mk-row { grid-template-columns: 40px minmax(0, 1fr) 70px 90px; }
  .mk-row > :nth-child(3), .mk-row > :nth-child(4), .mk-row > :nth-child(5) { display: none; }
}
.daily-history { margin-top: 12px; }
.daily-history summary { cursor: pointer; font-family: var(--display); font-size: 11.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--faint); }
.daily-history summary:hover { color: var(--accent); }
.daily-past { margin-top: 8px; display: grid; }
.daily-past-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 54px 70px 96px; gap: 10px; padding: 5px 10px; font-size: 13.5px; border-top: 1px solid var(--line); align-items: baseline; }
.daily-past-row span { color: var(--muted); }
.daily-past-row i { font-style: normal; color: var(--faint); text-align: right; font-variant-numeric: tabular-nums; }
.daily-past-row.now b, .daily-past-row.now i { color: var(--accent); }
.cp-get ol { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 6px; color: var(--muted); font-size: 14px; }
.cp-first { margin: 14px 0 0; }
.cp-download { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cp-download input { padding: 8px 12px; border-radius: 8px; font-size: 14px; min-width: 200px; }
.cp-note { margin-top: 8px !important; }
.cp-get ol { margin-top: 6px; }
.cp-get button[disabled] { opacity: 0.55; cursor: default; }
.mk-get { float: right; margin-top: 6px; }
.mk-each i { display: block; font-style: normal; font-size: 11.5px; color: var(--good); }
.mk-each i.under { color: var(--warn); }
.mk-look { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px 24px; border-color: var(--warn); }
.mk-look-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 4px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.mk-look-row .mk-icon { width: 30px; height: 30px; }
.mk-look-row .num { color: var(--warn); font-variant-numeric: tabular-nums; text-align: right; }
.mk-flip-row { display: grid; grid-template-columns: 38px minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) 100px 70px; gap: 12px; align-items: center; padding: 6px 14px; border-top: 1px solid var(--line); }
.mk-flip-row.head { border-top: 0; background: var(--panel-2); font-family: var(--display); font-size: 11.5px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--faint); padding: 9px 14px; }
.mk-flip-row:not(.head):hover { background: color-mix(in srgb, var(--accent) 5%, var(--panel)); }
.mk-flip-row .num { text-align: right; font-variant-numeric: tabular-nums; }
.mk-flip-row .strong { font-weight: 700; color: var(--good); }
.mk-flip-side { display: grid; line-height: 1.3; font-size: 13.5px; }
.mk-flip-side i { font-style: normal; font-size: 11.5px; color: var(--good); }
.mk-flip-side i.age-old { color: var(--warn); }
.mk-flip-side i.mk-live { font-size: 8px; }
.mk-flip-bar .mk-flip-least { flex: 0 1 150px; }
.mk-flip-bar .mk-premium { margin-left: auto; }
.nav a .nav-mark { display: inline-block; min-width: 16px; margin-left: 6px; padding: 0 4px; border-radius: 999px; background: var(--warn); color: #1a1208; font-size: 11px; font-weight: 700; line-height: 16px; text-align: center; font-family: var(--font); letter-spacing: 0; }
@media (max-width: 900px) { .mk-flip-row { grid-template-columns: 38px minmax(0, 1fr) 90px; } .mk-flip-row.head span:nth-child(n+3), .mk-flip-row .mk-flip-side, .mk-flip-row .num:last-child { display: none; } .mk-flip-row .mk-flip-side:nth-of-type(2) { display: grid; } }
.dash-tabs { margin: 4px 0 14px; }
.grid.cols.one { grid-template-columns: minmax(0, 760px); }
.grid.cols.one .card.audit .rows { max-height: 62vh; }
.grid.cols .col .card > div > button.small { margin-top: 10px; }
.mk-tabs { margin: 0; }
.mk-section { display: flex; align-items: baseline; gap: 12px; margin-top: 6px; }
.mk-section h2 { font-family: var(--display); font-size: 17px; margin: 0; }
.mk-section.request h2 { color: var(--good); }
.mk-fee-row { display: grid; gap: 10px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--line); }
.mk-fee-row.head { border-top: 0; background: var(--panel-2); font-family: var(--display); font-size: 11.5px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--faint); }
.mk-fee-row .num { text-align: right; font-variant-numeric: tabular-nums; }
.mk-fee-row .num b { display: block; font-weight: 600; }
.mk-fee-row .num i, .mk-fee-row.head i { display: block; font-style: normal; font-size: 11px; color: var(--faint); text-transform: none; letter-spacing: 0; font-family: var(--body, inherit); }
.mk-fee-row .num.best b { color: var(--accent); }
.mk-fee-row .num.none { color: var(--faint); }
.mk-fees { overflow-x: auto; }
.mk-fee-row { min-width: 860px; }
.mk-price-search { max-width: 420px; }
.mk-price-row { display: grid; gap: 10px; align-items: center; padding: 7px 14px; border-top: 1px solid var(--line); min-width: 760px; cursor: pointer; }
.mk-price-row.head { border-top: 0; background: var(--panel-2); font-family: var(--display); font-size: 11.5px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--faint); cursor: default; }
.mk-price-row:not(.head):hover, .mk-price-row.open { background: color-mix(in srgb, var(--accent) 6%, var(--panel)); }
.mk-price-row .num { text-align: right; font-variant-numeric: tabular-nums; }
.mk-price-row .num b { display: block; font-weight: 600; }
.mk-price-row .num i { display: block; font-style: normal; font-size: 11.5px; color: var(--faint); min-height: 15px; }
.mk-price-row .num b.best { color: var(--good); }
.mk-price-row .num i.best { color: var(--accent); }
.mk-price-row .num.none { color: var(--faint); }
.mk-price-more { padding: 10px 14px 14px; border-top: 1px dashed var(--line); background: var(--panel-2); }
.mk-chart { width: 100%; max-width: 680px; height: auto; display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.mk-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.mk-line.c0, .mk-chart-key .c0::before { stroke: #d6a64e; background: #d6a64e; }
.mk-line.c1, .mk-chart-key .c1::before { stroke: #8cc46e; background: #8cc46e; }
.mk-line.c2, .mk-chart-key .c2::before { stroke: #6ea8c4; background: #6ea8c4; }
.mk-line.c3, .mk-chart-key .c3::before { stroke: #c46e8c; background: #c46e8c; }
.mk-line.c4, .mk-chart-key .c4::before { stroke: #b08cd6; background: #b08cd6; }
.mk-line.c5, .mk-chart-key .c5::before { stroke: #d68c5a; background: #d68c5a; }
.mk-chart-key { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.mk-chart-key span::before { content: ''; display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.mk-chart-key i { font-style: normal; color: var(--faint); margin-left: auto; }
.mk-fee-row .num.pick { cursor: pointer; border-radius: 6px; padding: 2px 4px; }
.mk-fee-row .num.pick:hover, .mk-fee-row .num.pick.open { background: var(--accent-soft); }
.mk-map-card { margin-top: 4px; }
.mk-map { width: 100%; max-width: 760px; height: auto; display: block; margin: 0 auto; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; }
.mk-map rect.off { fill: #3a2e1f; stroke: #5a4930; stroke-width: 0.6; }
.mk-map rect.on { fill: #b98f43; stroke: #1d1409; stroke-width: 0.8; }
.mk-map rect.best { fill: #8cc46e; stroke: #fff; stroke-width: 1.4; }
.mk-map rect.lm { fill: #6ea8c4; stroke: #1d1409; stroke-width: 0.8; }
.mk-map text { font-size: 14px; text-anchor: middle; fill: var(--text); paint-order: stroke; stroke: #17120c; stroke-width: 2.5px; font-family: var(--display); }
.mk-map text.best { fill: #8cc46e; font-size: 19px; font-weight: 700; }
.mk-map text.lm { fill: #9cc6dc; }
.mk-chart-key .k-best::before { background: #8cc46e; height: 9px; width: 9px; }
.mk-chart-key .k-on::before { background: #b98f43; height: 9px; width: 9px; }
.mk-chart-key .k-off::before { background: #5a4930; height: 9px; width: 9px; }
.mk-map polygon.frame { fill: color-mix(in srgb, var(--accent) 5%, var(--panel)); stroke: var(--line-strong); stroke-width: 2; }
.mk-map text.compass { font-size: 24px; fill: var(--faint); stroke: none; font-weight: 700; }
.mk-map { max-width: 640px; background: transparent; border: 0; }

/* the Marketplace, compact: columns that sort, the fees beside their map, prices laid out like a market window */
.mk-sort { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
.mk-sort.num { justify-content: flex-end; }
.mk-sort:hover, .mk-sort.on { color: var(--accent); }
.mk-sort i { font-style: normal; font-size: 9px; width: 9px; }
.mk-more { display: block; width: 100%; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: var(--panel-2); padding: 8px; font-size: 13px; color: var(--muted); }
.mk-more:hover { color: var(--accent); }
.mk-row { padding: 5px 14px; }
.mk-icon { width: 38px; height: 38px; }
.mk-row { grid-template-columns: 38px minmax(0, 1fr) 130px 70px 90px 100px 96px; }

.mk-fees-wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.mk-fees-list { min-width: 0; }
.mk-fee-row { min-width: 0; gap: 4px; padding: 4px 10px; font-size: 13.5px; }
.mk-fee-row.head { font-size: 10.5px; letter-spacing: 0.3px; padding: 7px 10px; }
.mk-fee-row.open { background: color-mix(in srgb, var(--accent) 5%, var(--panel)); }
.mk-fee-row .mk-name b { font-weight: 600; font-size: 13.5px; }
.mk-fee-row .num.pick { padding: 3px 4px; font-weight: 600; }
.mk-fee-row .num.pick.on { background: var(--accent); color: var(--accent-ink); }
.mk-fee-row .num.best { color: var(--good); }
.mk-fee-row .num.pick.on.best { color: var(--accent-ink); }
.mk-fee-row .age-old { color: var(--warn); }
.mk-fee-row .age-none { color: var(--bad); }
.mk-fee-row .age-gap { color: var(--faint); }
.mk-fee-row.head .age-fresh { color: var(--good); }
.mk-age-key { margin: 8px 2px 0; }
.mk-chart-key .k-fresh::before { background: var(--good); height: 9px; width: 9px; }
.mk-chart-key .k-old::before { background: var(--warn); height: 9px; width: 9px; }
.mk-chart-key .k-none::before { background: var(--bad); height: 9px; width: 9px; }
.mk-map-card { margin: 0; position: sticky; top: 76px; }
.mk-map { max-width: 100%; }

.mk-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.mk-filters .mk-price-search { flex: 1 1 180px; max-width: 260px; }
.mk-filter { border-radius: 999px; padding: 6px 12px; font-size: 13.5px; }
.mk.wide { max-width: 1560px; }
.mk-prices-wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, 1fr) 232px; gap: 16px; align-items: start; }
.mk-price-side { top: 76px; }
.mk-price-side .mk-filter { width: 100%; max-width: none; border-radius: 8px; }
.mk-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.mk-chip { border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; cursor: pointer; line-height: 1.3; }
.mk-chips.tight { display: grid; grid-template-columns: repeat(4, 1fr); }
.mk-chips.tight.five { grid-template-columns: repeat(5, 1fr); }
.mk-chips.tight .mk-chip { text-align: center; padding: 4px 2px; }
.mk-chip:hover { border-color: var(--line-strong); color: var(--text); }
.mk-chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.mk-spans { display: flex; gap: 6px; flex-wrap: wrap; }
.mk-chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.mk-chart-head .mk-h { margin: 0; }
.mk-average { font-size: 13px; color: var(--muted); }
.mk-average b { color: var(--accent); font-size: 15px; }
.mk-chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
.mk-chart .axis { fill: var(--faint); font-size: 11px; text-anchor: middle; font-family: var(--font); }
.mk-chart .axis.y { text-anchor: end; }
.mk-chart .vol { fill: var(--line-strong); opacity: 0.55; }
.mk-dot { stroke: var(--panel); stroke-width: 1; }
.mk-dot.c0 { fill: #d6a64e; } .mk-dot.c1 { fill: #8cc46e; } .mk-dot.c2 { fill: #6ea8c4; } .mk-dot.c3 { fill: #c46e8c; }
.mk-dot.c4 { fill: #b08cd6; } .mk-dot.c5 { fill: #d68c5a; } .mk-dot.c6 { fill: #7fd0c0; } .mk-dot.c7 { fill: #c9c9c9; }
.mk-line.c6, .mk-chart-key .c6::before { stroke: #7fd0c0; background: #7fd0c0; }
.mk-line.c7, .mk-chart-key .c7::before { stroke: #c9c9c9; background: #c9c9c9; }
.mk-live { font-style: normal; font-size: 8px; color: var(--good); margin-left: 4px; vertical-align: middle; }
.mk-chart-key .k-live::before { background: var(--good); height: 7px; width: 7px; border-radius: 50%; }
.mk-unopened { margin: 0; padding: 8px 12px; font-size: 14px; border-color: var(--warn); flex: none; }
.mk-premium { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.mk-row.tax { grid-template-columns: 38px minmax(0, 1fr) 120px 60px 84px 92px 92px 100px 90px; }
.mk-taken { color: var(--faint); }
@media (max-width: 1280px) {
  .mk-prices-wrap { grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr); }
  .mk-price-side { grid-column: 1 / -1; grid-row: 1; position: static; }
}
.mk-pl-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) 110px 110px; gap: 10px; align-items: center; padding: 5px 14px; border-top: 1px solid var(--line); cursor: pointer; }
.mk-pl-row.head { border-top: 0; background: var(--panel-2); font-family: var(--display); font-size: 11.5px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--faint); cursor: default; padding: 8px 14px; }
.mk-pl-row:not(.head):hover { background: color-mix(in srgb, var(--accent) 5%, var(--panel)); }
.mk-pl-row.open { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.mk-pl-row .num { text-align: right; font-variant-numeric: tabular-nums; }
.mk-pl-row .num b { display: block; font-weight: 600; }
.mk-pl-row .num i { display: block; font-style: normal; font-size: 11.5px; color: var(--faint); min-height: 14px; }
.mk-pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px; border-top: 1px solid var(--line); background: var(--panel-2); font-size: 13px; color: var(--muted); }
.mk-pager i { font-style: normal; color: var(--faint); margin-left: 8px; }
.mk-pager button[disabled] { opacity: 0.35; }
.mk-price-card { margin: 0; position: sticky; top: 76px; display: grid; gap: 12px; }
.mk-price-head { display: flex; align-items: center; gap: 12px; }
.mk-price-head h2 { margin: 0; font-family: var(--display); font-size: 18px; }
.mk-icon.big { width: 60px; height: 60px; }
.mk-city-prices { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.mk-cp-row { display: grid; grid-template-columns: minmax(0, 1.3fr) 1fr 1fr 1fr; gap: 8px; padding: 5px 12px; border-top: 1px solid var(--line); font-size: 14px; align-items: baseline; }
.mk-cp-row.head { border-top: 0; background: var(--panel-2); font-family: var(--display); font-size: 11px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--faint); }
.mk-cp-row .num { text-align: right; font-variant-numeric: tabular-nums; }
.mk-cp-row .best { color: var(--good); font-weight: 700; }
.mk-cp-row .bestbuy { color: var(--accent); font-weight: 700; }
.mk-cp-row .seen { font-size: 12px; color: var(--good); }
.mk-cp-row.age-old .seen { color: var(--warn); }
.mk-cp-row.age-none .seen { color: var(--bad); }
.mk-cp-row.age-none { color: var(--faint); }
@media (max-width: 1000px) {
  .mk-fees-wrap, .mk-prices-wrap { grid-template-columns: 1fr; }
  .mk-map-card, .mk-price-card { position: static; }
}

/* ---- the Marketplace as one window: an auction house's -- its name along the top, the kinds of thing down the left,
   the tabs hanging under it (and staying at the foot of the screen). Its colours are the site's own, light or dark ---- */
.ah { --ah-trim: color-mix(in srgb, var(--accent) 55%, var(--line)); --ah-wood: var(--panel); --ah-deep: var(--bg);
  --ah-lit: color-mix(in srgb, var(--accent) 26%, var(--panel));
  position: relative; border: 1px solid var(--ah-trim); border-radius: 10px; background: var(--ah-wood);
  box-shadow: 0 0 0 3px var(--ah-deep), 0 0 0 4px color-mix(in srgb, var(--accent) 35%, var(--line)), 0 18px 40px rgba(0, 0, 0, 0.3); }
.ah-title { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; padding: 8px 16px; border-bottom: 1px solid var(--ah-trim);
  background: linear-gradient(color-mix(in srgb, var(--accent) 18%, var(--panel)), var(--panel)); border-radius: 9px 9px 0 0; }
.ah-title h1 { grid-column: 2; margin: 0; font-family: var(--display); font-size: 20px; letter-spacing: 2px; color: var(--accent); }
.ah-title .ah-now { grid-column: 1; grid-row: 1; font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--muted); }
.ah-title .button { grid-column: 3; justify-self: end; }
.ah-body { padding: 12px 14px 22px; display: grid; gap: 10px; align-content: start; min-height: 420px; background: var(--ah-deep); border-radius: 0 0 9px 9px; }
.ah-note { margin: 0 !important; }
.ah-tabs { position: sticky; bottom: 0; z-index: 6; display: flex; gap: 4px; margin: -13px 0 0; padding: 0 14px 12px;
  background: linear-gradient(transparent, var(--bg) 55%); pointer-events: none; }
.ah-tabs button { pointer-events: auto; position: relative; border: 1px solid var(--line-strong); border-top: 0; border-radius: 0 0 9px 9px; background: var(--panel-2);
  color: var(--muted); font-family: var(--display); font-size: 13.5px; letter-spacing: 0.6px; padding: 7px 16px 8px; cursor: pointer; }
.ah-tabs button:hover { color: var(--text); }
.ah-tabs button.on { background: linear-gradient(var(--ah-deep), var(--ah-lit)); border-color: var(--ah-trim); color: var(--accent); padding-bottom: 11px; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3); }
.ah-tabs .nav-mark { display: inline-block; min-width: 16px; margin-left: 7px; padding: 0 4px; border-radius: 999px; background: var(--warn); color: #1a1208; font-size: 11px;
  font-weight: 700; line-height: 16px; text-align: center; font-family: var(--font); letter-spacing: 0; }
.ah-bar { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 7px 10px; background: var(--ah-wood); border: 1px solid var(--line); border-radius: 8px; }
.ah-bar .mk-price-search { flex: 1 1 200px; max-width: 280px; padding: 6px 12px; }
.ah-bar .mk-filter { border-radius: 8px; padding: 5px 8px; }
.ah-pick { display: flex; align-items: center; gap: 3px; }
.ah-pick-h { font-size: 12.5px; color: var(--faint); margin-right: 4px; }
/* (a tier and an enchantment each in the game's own colour for it: the number in the middle of its square) */
.ah-pick .mk-chip { --c: var(--muted); display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0; border-radius: 6px;
  font-size: 13px; font-weight: 700; line-height: 1; color: var(--c); border-color: color-mix(in srgb, var(--c) 55%, var(--line)); background: color-mix(in srgb, var(--c) 10%, var(--panel-2)); }
.ah-pick .mk-chip:hover { border-color: var(--c); color: var(--c); }
.ah-pick .mk-chip.on { background: var(--c); border-color: var(--c); color: #17120c; }
.mk-chip.t1 { --c: #9a968c; } .mk-chip.t2 { --c: #b58a5c; } .mk-chip.t3 { --c: #5fae5a; } .mk-chip.t4 { --c: #4f95d8; }
.mk-chip.t5 { --c: #d0524a; } .mk-chip.t6 { --c: #e58f3a; } .mk-chip.t7 { --c: #e3cf45; } .mk-chip.t8 { --c: #d9d9d9; }
.mk-chip.e0 { --c: #9a968c; } .mk-chip.e1 { --c: #5fae5a; } .mk-chip.e2 { --c: #4f95d8; } .mk-chip.e3 { --c: #a468d8; } .mk-chip.e4 { --c: #e3b93c; }
.ah-browse { display: grid; grid-template-columns: 176px minmax(0, 1.15fr) minmax(340px, 1fr); gap: 12px; align-items: start; }
.ah-browse.two { grid-template-columns: 176px minmax(0, 1fr); }
.ah-rail { display: grid; gap: 0; padding: 6px; background: var(--ah-wood); border: 1px solid var(--line); border-radius: 8px; position: sticky; top: 76px; }
.ah-rail-h { font-family: var(--display); font-size: 12.5px; letter-spacing: 1px; color: var(--accent); padding: 1px 8px 5px; border-bottom: 1px solid var(--line); margin-bottom: 3px; }
.ah-cat { text-align: left; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--text); font-size: 13.5px; line-height: 1.25; padding: 3px 8px; cursor: pointer; }
.ah-cat .ah-open { font-style: normal; display: inline-block; width: 12px; color: var(--faint); font-size: 10px; }
.ah-cat.sub { padding-left: 22px; font-size: 13px; }
.ah-cat.part { padding-left: 42px; font-size: 13px; color: var(--muted); }
.ah-cat:hover { background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
.ah-cat.on { background: linear-gradient(90deg, var(--ah-lit), var(--panel)); border-color: var(--ah-trim); color: var(--accent); font-weight: 600; }
.ah .mk-table, .ah .mk-side, .ah .card, .ah .stat { background: var(--ah-wood); }
.ah .mk-price-card { top: 76px; }
.ah .mk-pl-row.open { background: linear-gradient(90deg, var(--ah-lit), var(--panel)); }
/* (more to a screen: a listing's row, a category's, a choice's -- each a little lower, and still plainly one thing to click) */
.ah .mk-icon { width: 30px; height: 30px; }
.ah .mk-icon.big { width: 56px; height: 56px; }
.ah .mk-row { grid-template-columns: 30px minmax(0, 1fr) 130px 70px 90px 100px 96px; padding: 2px 12px; gap: 10px; }
.ah .mk-row.tax { grid-template-columns: 30px minmax(0, 1fr) 120px 60px 84px 92px 92px 100px 90px; }
.ah .mk-row.head, .ah .mk-pl-row.head, .ah .mk-flip-row.head { padding-top: 6px; padding-bottom: 6px; }
.ah .mk-pl-row { grid-template-columns: 30px minmax(0, 1fr) 100px 100px; padding: 2px 12px; }
.ah .mk-flip-row { grid-template-columns: 30px minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) 100px 70px; padding: 2px 12px; }
.ah .mk-name { line-height: 1.2; }
.ah .mk-name b { font-size: 14px; }
.ah .mk-name i { font-size: 11.5px; }
.ah .mk-pl-row .num i { min-height: 0; font-size: 11px; }
.ah .mk-pl-row .num { line-height: 1.2; }
.ah .mk-pick { padding: 2px 8px; font-size: 13.5px; }
.ah .mk-side { padding: 10px; gap: 9px; }
.ah .mk-group { gap: 0; }
.ah .mk-fee-row { padding: 4px 12px; }
.ah .mk-cp-row { padding: 3px 12px; }
.ah .mk-tiles .stat { padding-top: 8px; padding-bottom: 8px; }
.ah .mk-look-row { padding: 2px 0; }
@media (max-width: 1280px) {
  .ah-browse { grid-template-columns: 170px minmax(0, 1fr); }
  .ah-browse > .mk-price-card { grid-column: 1 / -1; position: static; }
}
@media (max-width: 760px) {
  .ah-browse, .ah-browse.two { grid-template-columns: 1fr; }
  .ah-rail { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .ah-rail-h { display: none; }
  .ah-title { grid-template-columns: 1fr auto; }
  .ah-title h1 { grid-column: 1; }
  .ah-title .ah-now { display: none; }
  .ah-title .button { grid-column: 2; }
  .ah-tabs { flex-wrap: wrap; padding: 6px 4px 8px; margin: -8px 0 0; background: var(--bg); }
}

/* The window stands still and fits the screen, whatever its size: the page itself doesn't scroll -- the lists inside the
   window do, each on its own. (On a phone, or a very low screen, it's an ordinary page again: one column, scrolled.) */
@media (min-width: 761px) and (min-height: 520px) {
  body.market-page { height: 100vh; height: 100dvh; overflow: hidden; }
  body.market-page main.mk { flex: 1 1 0; min-height: 0; max-width: 1640px; padding: 12px 18px 0; display: flex; flex-direction: column; gap: 0; }
  body.market-page footer { padding: 6px 20px 8px; }
  .market-page .ah { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
  .market-page .ah-title { flex: none; }
  .market-page .ah-body { flex: 1 1 0; min-height: 0; overflow: auto; padding-bottom: 12px; }
  .market-page .ah-tabs { position: static; flex: none; margin: 4px 0 0; padding: 0 14px 4px; background: none; }
  /* (three of the tabs are columns side by side: each column scrolls by itself, the bar over them stays) */
  .market-page .ah-body.tab-prices, .market-page .ah-body.tab-flips, .market-page .ah-body.tab-mine { overflow: hidden; display: flex; flex-direction: column; }
  .market-page .ah-body > .ah-note, .market-page .ah-body > .ah-bar { flex: none; }
  .market-page .ah-browse, .market-page .ah-body > .mk-body { flex: 1 1 0; min-height: 0; grid-template-rows: minmax(0, 1fr); align-items: stretch; }
  .market-page .ah-browse > *, .market-page .ah-body > .mk-body > * { min-height: 0; max-height: 100%; overflow: auto; position: static; align-self: start; }
  .market-page .ah-browse > .mk-table, .market-page .ah-body > .mk-body > .mk-main { align-self: stretch; }
  .market-page .mk-table .head { position: sticky; top: 0; z-index: 2; }
  .market-page .mk-table .mk-pager { position: sticky; bottom: 0; z-index: 2; }
  .market-page .ah-body { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
  .market-page .ah-body * { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
}
@media (min-width: 761px) and (min-height: 520px) and (max-width: 1280px) {
  .market-page .ah-browse { grid-template-rows: minmax(0, 1.2fr) minmax(0, 1fr); }
  .market-page .ah-browse.two { grid-template-rows: minmax(0, 1fr); }
}

/* My listings: each part a box of its own, scrolled inside and pulled taller or lower by its corner */
.mk-sec { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mk-sec > .mk-section { margin: 0; flex: none; }
.mk-section.warn h2 { color: var(--warn); }
.mk-scroll { overflow: auto; resize: vertical; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent; }
.mk-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.mk-scroll > .mk-table { border: 0; border-radius: 0; overflow: visible; background: none; }
.mk-scroll .mk-row.head { position: sticky; top: 0; z-index: 2; }
.mk-scroll .mk-look-row { padding-left: 10px; padding-right: 10px; }
.mk-scroll .mk-look-row:first-child { border-top: 0; }
.mk-look { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 10px 14px; border: 0; }
@media (min-width: 761px) and (min-height: 520px) {
  .market-page .ah-body > .mk-body > .mk-main { display: flex; flex-direction: column; gap: 10px; overflow: auto; }
  .market-page .mk-main > * { flex: none; }
  .market-page .mk-main > .mk-sec.fill { flex: 1 1 0; min-height: 175px; }
  .market-page .mk-main > .mk-sec.fill > .mk-scroll { flex: 1 1 0; min-height: 0; }
}
@media (max-width: 760px) {
  .mk-scroll { resize: none; max-height: 60vh; }
}

/* My listings, as its member arranges it */
.mk-custom-open { width: 100%; }
.mk-custom { width: min(640px, calc(100vw - 32px)); padding: 20px 22px 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel); color: var(--text); }
.mk-custom::backdrop { background: rgba(10, 7, 4, 0.7); }
.mk-custom h2 { font-family: var(--display); font-size: 19px; margin: 0 0 4px; }
.mk-custom .meta { margin: 0 0 12px; font-size: 13px; color: var(--faint); }
.mk-custom-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.mk-custom-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px; align-items: center; padding: 3px 0; border-top: 1px solid var(--line); }
.mk-custom-row label, .mk-custom-grouped { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.mk-custom-row.off span { color: var(--faint); text-decoration: line-through; }
.mk-custom-row button { padding: 2px 7px; font-size: 10px; line-height: 1.6; }
.mk-custom-row button[disabled] { opacity: 0.3; }
.mk-custom-grouped { margin-top: 12px; }
.mk-custom-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.mk-row.group { grid-template-columns: 1fr auto !important; padding-top: 3px !important; padding-bottom: 3px !important; background: var(--panel-2); font-family: var(--display); font-size: 12.5px; letter-spacing: 0.6px; color: var(--accent); }
.mk-row.group i { font-style: normal; color: var(--faint); font-family: var(--font); }
.mk-row.group:hover { background: var(--panel-2); }
@media (max-width: 560px) { .mk-custom-cols { grid-template-columns: 1fr; } }

/* ---- a bot's guide: how to use it, with pictures ---- */
.guide { max-width: 860px; }
.guide-nav { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.guide-nav a { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; font-family: var(--display); font-size: 13.5px; letter-spacing: 0.5px;
  color: var(--muted); text-decoration: none; }
.guide-nav a:hover { color: var(--text); border-color: var(--line-strong); }
.guide-nav a.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.guide .guide-lead { font-size: 21px; line-height: 1.45; color: var(--text); margin: 6px 0 14px; }
.guide h2 { font-size: 21px; margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); }
.guide ol, .guide ul { padding-left: 22px; display: grid; gap: 6px; }
.guide code { font-family: var(--cmd, ui-monospace, monospace); font-size: 0.86em; color: var(--accent); background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 5px; padding: 1px 6px; white-space: nowrap; }
.guide .gbtn { display: inline-block; font-family: var(--font); font-size: 0.78em; font-weight: 600; color: #f2f3f5; background: #4e5058; border-radius: 4px;
  padding: 1px 8px; white-space: nowrap; }
.guide-shot { margin: 16px 0 20px; }
.guide-shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line-strong); border-radius: 10px; }
.guide-shot.small img { max-width: 520px; }
.guide-shot figcaption, .guide .guide-note { font-family: var(--font); font-size: 13.5px; color: var(--faint); margin-top: 6px; }
.guide-mock { margin: 16px 0 6px; max-width: 640px; }
.guide-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.guide-buttons .gbtn { font-size: 13px; padding: 5px 12px; }
.guide .button { text-decoration: none; }

/* the day's bonus to one's own Discord */
.daily-hook { margin-top: 8px; justify-self: start; }
.hook-steps { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 4px; color: var(--muted); font-size: 14px; }
.hook-form { display: flex; gap: 8px; flex-wrap: wrap; }
.hook-form input { flex: 1 1 260px; padding: 8px 12px; border-radius: 8px; font-size: 14px; }
.hook-say { min-height: 20px; margin: 8px 0; font-size: 14px; color: var(--accent); }
.hook-dialog .mk-custom-row { grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; }
/* the Party builder's server: which Discord server the guild's parties and events are for */
.pb-server { order: 8; margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.pb-server select { font-size: 13px; padding: 4px 8px; max-width: 220px; }
.pb-server b { color: var(--accent); font-weight: 600; }
.pb-server .link-button { font-size: 12px; color: var(--faint); }
.pb-scales-row .pb-server + .pb-manage { margin-left: 8px; }

/* ---- trades between players (a tab of the Marketplace) ---- */
.tr-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.tr-bar .tr-search { flex: 1 1 240px; width: auto; }
.tr-top { display: flex; gap: 10px; align-items: center; }
.tr-what { flex: 1; min-width: 0; }
.tr-what h2 { margin: 0 0 2px; font-family: var(--display); font-size: 17px; letter-spacing: 0.4px; }
.tr-traits { display: flex; flex-direction: column; gap: 7px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(0, 0, 0, 0.18); }
.tr-est { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding-top: 6px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--muted); }
.tr-est b { color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; }
.tr-note { margin: 0; padding: 8px 12px; border-left: 3px solid var(--line-strong); font-style: italic; font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.tr-who { color: var(--text); text-decoration: none; }
.tr-who:hover b { text-decoration: underline; }
.tr-who i { font-style: normal; color: var(--faint); margin-left: 5px; font-size: 12.5px; }
.tr-offers { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.tr-offers p { margin: 0; }
.tr-offer { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: center; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(0, 0, 0, 0.18); font-size: 13.5px; }
.tr-offer.is-accepted { border-color: var(--good); }
.tr-offer-do { display: flex; gap: 6px; }
.tr-offer > b { min-width: 62px; font-variant-numeric: tabular-nums; }
.tr-offer-by { flex: 1 1 120px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-offer-note { flex: 1 1 100%; margin: 2px 0 0; font-size: 12.5px; font-style: italic; color: var(--muted); overflow-wrap: anywhere; }
.tr-offer-state { font-size: 12px; color: var(--faint); }
.tr-offer.is-accepted .tr-offer-state { color: var(--good); font-weight: 600; }
.tr-offer.is-denied { opacity: 0.6; }
.tr-dialog { display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 40px); overflow: auto; }
.tr-dialog:not([open]) { display: none; }
.tr-dialog h2 { margin: 0; }
.tr-dialog p { margin: 0; }
.tr-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.tr-field input, .tr-field select { width: 100%; box-sizing: border-box; max-width: none; }
.tr-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tr-hits { display: flex; flex-direction: column; max-height: 220px; overflow: auto; }
.tr-hit { display: flex; gap: 8px; align-items: center; text-align: left; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; padding: 4px 6px; cursor: pointer; color: var(--text); }
.tr-hit:hover { background: var(--panel-2); }
.tr-hit span { flex: 1; }
.tr-hit i { font-style: normal; color: var(--faint); }
.tr-hit .mk-icon, .tr-picked .mk-icon { width: 34px; height: 34px; }
.tr-picked { display: flex; gap: 10px; align-items: center; }
.tr-picked:empty, .tr-soul:empty, .tr-worth:empty, .tr-error:empty { display: none; }
.tr-soul { display: flex; flex-direction: column; gap: 8px; }
.tr-agree { display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--warn); border-radius: var(--radius); font-size: 13.5px; }
.tr-agree input { margin-top: 3px; flex: none; }
.tr-error { color: var(--warn); font-size: 13.5px; }
.tr-buttons { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 700px) {
}
@media (min-width: 901px) and (min-height: 560px) {
  .market-page .ah-body.tab-trade { overflow: hidden; display: flex; flex-direction: column; }
  .market-page .ah-body.tab-trade > .tr-bar { flex: none; }
  .market-page .ah-body.tab-trade > .tr-board { flex: 1 1 0; min-height: 0; grid-template-rows: minmax(0, 1fr); }
  .market-page .ah-body.tab-trade > .tr-board > * { min-height: 0; max-height: 100%; overflow: auto; }
}

/* a trait, as the game writes it: its number, its name, and a bar for how far its roll is -- coloured by its kind */
.kind-offense { --k: #e0705a; } .kind-defense { --k: #6fa3d8; } .kind-healing { --k: #8cc46e; } .kind-energy { --k: #b08ae0; } .kind-utility { --k: #d6a64e; }
.tr-badge { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--k, var(--line-strong));
  background: color-mix(in srgb, var(--k, var(--accent)) 16%, var(--panel)); }
.tr-badge img { width: 19px; height: 19px; object-fit: contain; }
.tr-line { display: flex; gap: 9px; align-items: center; }
.tr-line-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; font-family: var(--cmd); font-size: 14.5px; line-height: 1.15; }
.tr-line-main b { color: var(--k); font-weight: 600; }
.tr-meter { display: block; height: 4px; border-radius: 3px; background: var(--line); overflow: hidden; }
.tr-meter i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, color-mix(in srgb, var(--k) 55%, transparent), var(--k)); }
.tr-pct { flex: none; min-width: 38px; text-align: right; font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--muted); }
/* the form */
.tr-post { width: min(600px, calc(100vw - 32px)); }
.tr-find { width: 100%; box-sizing: border-box; padding: 10px 14px; border-radius: 999px; font-size: 14.5px; }
.tr-hero { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: linear-gradient(135deg, var(--ah-lit, var(--panel-2)), var(--panel) 70%); }
.tr-hero:empty { display: none; }
.tr-hero-icon { width: 84px; height: 84px; object-fit: contain; flex: none; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5)); }
.tr-hero-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tr-hero-main h3 { margin: 0; font-family: var(--display); font-size: 17px; letter-spacing: 0.4px; }
.tr-quality { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.tr-quality .mk-chip { --c: var(--muted); padding: 3px 9px; font-size: 12px; }
.tr-quality .mk-chip:hover { border-color: var(--c); color: var(--c); }
.tr-quality .mk-chip.on { background: var(--c); border-color: var(--c); color: #17120c; }
.mk-chip.q1 { --c: #a9a294; } .mk-chip.q2 { --c: #c9c2b0; } .mk-chip.q3 { --c: #c98f52; } .mk-chip.q4 { --c: #cfd3d6; } .mk-chip.q5 { --c: #e3b93c; }
.tr-count { flex: none; display: flex; align-items: center; gap: 4px; }
.tr-count b { min-width: 34px; text-align: center; font-size: 18px; font-variant-numeric: tabular-nums; }
.tr-count button { width: 28px; padding: 3px 0; }
.tr-rest { display: flex; flex-direction: column; gap: 10px; }
.tr-rest[hidden] { display: none; }
.tr-soul-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; justify-content: space-between; }
.tr-trait { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border: 1px solid var(--line); border-left: 3px solid var(--k); border-radius: 9px; background: rgba(0, 0, 0, 0.18); }
.tr-trait .tr-badge { margin-top: 2px; }
.tr-trait-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.tr-trait-line { display: flex; gap: 4px; align-items: center; font-family: var(--cmd); font-size: 16px; }
.tr-sign { color: var(--k); font-weight: 600; }
.tr-trait-line .tr-value { width: 92px; padding: 3px 6px; font: inherit; font-weight: 600; color: var(--k); text-align: right; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line); border-radius: 6px; }
.tr-trait-line .tr-value.off { border-color: var(--bad); color: var(--bad); }
.tr-trait-line select { flex: 1; min-width: 0; margin-left: 6px; font: inherit; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; color: var(--text); padding: 2px 0; cursor: pointer; }
.tr-trait-line select option { background: var(--panel); color: var(--text); font-family: var(--font); }
.tr-trait-bar { display: flex; gap: 8px; align-items: center; }
.tr-trait-bar input[type=range] { --fill: 50%; flex: 1; min-width: 0; height: 8px; margin: 4px 0; -webkit-appearance: none; appearance: none; border-radius: 5px; cursor: pointer;
  background: linear-gradient(90deg, color-mix(in srgb, var(--k) 55%, transparent), var(--k)) 0 / var(--fill) 100% no-repeat, var(--line); }
.tr-trait-bar input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--text); border: 2px solid var(--k); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); }
.tr-trait-bar input[type=range]::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: var(--text); border: 2px solid var(--k); }
.tr-trait-bar .tr-pct { color: var(--k); font-weight: 600; font-size: 13.5px; }
.tr-hint { font-size: 11.5px; color: var(--faint); }
.tr-x { flex: none; width: 26px; padding: 2px 0; }
.tr-add { align-self: flex-start; border: 1px dashed var(--line-strong); background: none; color: var(--muted); border-radius: 9px; padding: 7px 14px; cursor: pointer; }
.tr-add:hover { color: var(--accent); border-color: var(--accent); }
.tr-worth { display: flex; flex-direction: column; gap: 4px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: rgba(0, 0, 0, 0.18); }
.tr-worth-top { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.tr-worth-label { display: block; font-family: var(--display); font-size: 11.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); }
.tr-worth-top b { font-size: 17px; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tr-span { position: relative; height: 6px; margin-top: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--line), var(--accent), var(--line)); }
.tr-span i { position: absolute; top: -4px; width: 4px; height: 14px; margin-left: -2px; border-radius: 2px; background: var(--text); box-shadow: 0 0 0 2px var(--panel-2); }
.tr-span-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tr-span-ends span:nth-child(2) { color: var(--faint); }
.tr-ask { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-end; }
.tr-ask .tr-field { flex: 0 1 240px; }
.tr-price-wrap { display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: rgba(0, 0, 0, 0.25); }
.tr-price-wrap:focus-within { border-color: var(--accent); }
.tr-price-wrap .tr-price-in { flex: 1; min-width: 0; border: 0; background: none; outline: 0; padding: 8px 0; font-size: 20px; font-weight: 600; color: var(--accent); }
.tr-price-wrap i { font-style: normal; font-size: 12px; color: var(--faint); }
.tr-priced { padding-bottom: 10px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* the board: the listings as rows, and the one looked at beside them */
.tr-views { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: rgba(0, 0, 0, 0.25); }
.tr-view { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); border-radius: 999px; padding: 5px 13px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.tr-view:hover { color: var(--text); }
.tr-view.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.tr-view i { font-style: normal; font-size: 11.5px; opacity: 0.75; font-variant-numeric: tabular-nums; }
.tr-view .nav-mark { min-width: 16px; padding: 0 4px; border-radius: 999px; background: var(--bad); color: #1a1208; font-size: 11px; font-weight: 700; text-align: center; }
.tr-gap { flex: 1; }
.tr-board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); gap: 12px; align-items: start; }
.tr-row { display: grid; grid-template-columns: 34px minmax(140px, 1.3fr) minmax(0, 1.2fr) 96px 78px 84px; gap: 10px; align-items: center; padding: 5px 12px; border-top: 1px solid var(--line); cursor: pointer; }
.tr-row.head { position: sticky; top: 0; z-index: 2; border-top: 0; background: var(--panel-2); font-family: var(--display); font-size: 11.5px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--faint); cursor: default; padding: 7px 12px; }
.tr-row:not(.head):hover { background: color-mix(in srgb, var(--accent) 5%, var(--panel)); }
.tr-row.open { background: linear-gradient(90deg, var(--ah-lit, var(--accent-soft)), var(--panel)); box-shadow: inset 3px 0 0 var(--accent); }
.tr-row.over { opacity: 0.6; }
.tr-row .num { text-align: right; font-variant-numeric: tabular-nums; font-size: 13.5px; white-space: nowrap; }
.tr-row .strong { font-weight: 700; color: var(--accent); font-size: 14.5px; }
.tr-row .mk-icon { width: 34px; height: 34px; }
.tr-row-offers b { font-weight: 600; color: var(--muted); }
.tr-row-offers b.hot { color: var(--bad); }
.tr-row-offers b.is-accepted { color: var(--good); }
.tr-row-offers b.is-denied { color: var(--faint); font-weight: 400; }
.tr-minis { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.tr-mini { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px 1px 3px; border: 1px solid color-mix(in srgb, var(--k) 45%, var(--line)); border-radius: 999px;
  background: color-mix(in srgb, var(--k) 10%, transparent); color: var(--k); font-family: var(--cmd); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.tr-mini img { width: 15px; height: 15px; object-fit: contain; }
.tr-detail { margin: 0; display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.tr-detail-icon { width: 76px; height: 76px; object-fit: contain; flex: none; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5)); }
.tr-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tr-fact { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(0, 0, 0, 0.18); min-width: 0; }
.tr-fact > span { font-family: var(--display); font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); }
.tr-fact > b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-fact .tr-who i { display: none; }
.tr-asking { font-size: 20px; color: var(--accent); font-variant-numeric: tabular-nums; }
.tr-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tr-actions .primary { flex: 1 1 auto; }
.tr-nohit { padding: 8px 4px; }
/* what's typed into, in the dialogs: one look */
.tr-dialog input[type=text], .tr-dialog input[type=search], .tr-dialog input[type=number], .tr-bar .tr-search {
  font: inherit; font-size: 14px; color: var(--text); background: rgba(0, 0, 0, 0.28); border: 1px solid var(--line-strong); border-radius: 9px; padding: 9px 12px; outline: 0;
  transition: border-color 0.12s, box-shadow 0.12s; }
.tr-dialog input::placeholder, .tr-bar .tr-search::placeholder { color: var(--faint); }
.tr-dialog input[type=text]:focus, .tr-dialog input[type=search]:focus, .tr-bar .tr-search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tr-dialog .tr-find, .tr-bar .tr-search { border-radius: 999px; padding-left: 16px; }
.tr-dialog .tr-price-wrap .tr-price-in, .tr-dialog .tr-price-wrap .tr-price-in:focus { border: 0; background: none; box-shadow: none; padding: 8px 0; font-size: 20px; }
.tr-dialog .tr-trait-line .tr-value { padding: 3px 6px; font: inherit; font-weight: 600; border-radius: 6px; border-color: var(--line); }
.tr-dialog .tr-trait-line .tr-value:focus { border-color: var(--k); box-shadow: 0 0 0 3px color-mix(in srgb, var(--k) 18%, transparent); }
.tr-field > span:first-child { font-family: var(--display); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); }
.tr-hits { border: 1px solid var(--line); border-radius: 9px; background: rgba(0, 0, 0, 0.2); }
.tr-hits:empty { display: none; }
.tr-hit:first-child { border-top: 0; }
@media (max-width: 1100px) {
  .tr-board { grid-template-columns: 1fr; }
  .tr-row { grid-template-columns: 34px minmax(0, 1fr) 78px 84px; }
  .tr-row > :nth-child(3), .tr-row > :nth-child(4) { display: none; }
}
.tr-board.alone { grid-template-columns: minmax(0, 1fr); }
.tr-detail { position: relative; }
.tr-close { position: absolute; top: 10px; right: 10px; width: 26px; padding: 2px 0; }
/* what the same thing goes for at the markets, under the form's price */
.tr-market { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: rgba(0, 0, 0, 0.18); }
.tr-market:empty { display: none; }
.tr-market b { font-size: 18px; color: var(--text); font-variant-numeric: tabular-nums; }
.tr-market i { font-style: normal; font-size: 12.5px; color: var(--muted); }
/* loot tabs: their pictures, in the form and on the card */
.tr-shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tr-shot { position: relative; aspect-ratio: 4 / 3; border: 1px solid var(--line-strong); border-radius: 9px; overflow: hidden; background: rgba(0, 0, 0, 0.3); display: grid; place-items: center; font-size: 12.5px; color: var(--muted); }
.tr-shot img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.tr-shot-x { position: absolute; top: 5px; right: 5px; width: 24px; padding: 1px 0; background: rgba(0, 0, 0, 0.7); }
.tr-shot.add { border-style: dashed; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); padding: 6px; text-align: center; }
.tr-shot.add:hover { border-color: var(--accent); color: var(--accent); }
.tr-shot.add b { font-size: 26px; line-height: 1; font-weight: 400; }
.tr-shot.add i { font-style: normal; font-size: 11px; color: var(--faint); }
.tr-check { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.tr-field[hidden] { display: none; }
.tr-cuts { display: flex; flex-direction: column; gap: 6px; }
.tr-cuts .mk-chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tr-sum-row { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: flex-end; }
.tr-sum-part { display: flex; flex-direction: column; gap: 1px; }
.tr-sum-part span { font-family: var(--display); font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); }
.tr-sum-part b { font-size: 17px; font-variant-numeric: tabular-nums; }
.tr-sum-part.less b { color: var(--muted); }
.tr-sum-part.asking { margin-left: auto; text-align: right; }
.tr-sum-part.asking b { font-size: 26px; line-height: 1.1; color: var(--accent); }
.tr-row .tr-thumb { object-fit: cover; border-radius: 6px; border: 1px solid var(--line-strong); }
.tr-gallery { display: flex; flex-direction: column; gap: 6px; }
.tr-gallery-big { width: 100%; max-height: 300px; object-fit: contain; border: 1px solid var(--line-strong); border-radius: 9px; background: rgba(0, 0, 0, 0.35); cursor: zoom-in; }
.tr-gallery-thumbs { display: flex; gap: 6px; }
.tr-gallery-thumbs button { width: 64px; height: 48px; padding: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: none; cursor: pointer; opacity: 0.65; }
.tr-gallery-thumbs button.on { border-color: var(--accent); opacity: 1; }
.tr-gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.tr-lightbox { max-width: 96vw; max-height: 96vh; padding: 0; border: 1px solid var(--line-strong); border-radius: 10px; background: #000; cursor: zoom-out; }
.tr-lightbox::backdrop { background: rgba(5, 3, 2, 0.88); }
.tr-lightbox img { display: block; max-width: 96vw; max-height: 96vh; }
.tr-detail > .tr-top { padding-right: 30px; }
.tr-detail > .tr-gallery + .tr-top { padding-right: 0; }
.tr-detail > .tr-gallery { margin-right: 34px; }
@media (min-width: 901px) and (min-height: 560px) {
  .market-page .ah-body.tab-loot { overflow: hidden; display: flex; flex-direction: column; }
  .market-page .ah-body.tab-loot > .tr-bar { flex: none; }
  .market-page .ah-body.tab-loot > .tr-board { flex: 1 1 0; min-height: 0; grid-template-rows: minmax(0, 1fr); }
  .market-page .ah-body.tab-loot > .tr-board > * { min-height: 0; max-height: 100%; overflow: auto; }
}
.tr-sum-part.tr-up b { color: var(--k, #b08ae0); }
.ah-tabs button.public { margin-left: auto; }
@media (max-width: 900px) { .ah-tabs button.public { margin-left: 0; } }
.tr-strain-row { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(0, 0, 0, 0.18); font-size: 13.5px; }
.tr-strain-row i { font-style: normal; font-size: 12px; color: var(--faint); }
.tr-dialog .tr-strain-row .tr-strain { width: 96px; padding: 4px 8px; font-weight: 600; color: var(--accent); }
.tr-sum.tr-worth { padding: 12px 14px; border-color: var(--accent); background: linear-gradient(160deg, var(--accent-soft), transparent 70%), var(--panel-2); }
/* station fees: a city's colour down its column (the game's own colours); how lately it was seen is a dot by its name,
   and the cheapest of a row is marked -- a colour means one thing only */
.city-thetford { --city: #b684e8; } .city-lymhurst { --city: #7cc46a; } .city-bridgewatch { --city: #e89a4a; } .city-martlock { --city: #5aa4ea; }
.city-fortsterling { --city: #ececec; } .city-caerleon { --city: #e3574b; } .city-brecilien { --city: #f0a3cc; }
.mk-fees .mk-fee-row .num[class*="city-"] { background: color-mix(in srgb, var(--city) 7%, transparent); color: var(--text); border-radius: 0; padding: 4px 8px; margin: -4px 0; }
.mk-fees .mk-fee-row.head .num[class*="city-"] { color: var(--city); font-weight: 700; white-space: nowrap; margin: -7px 0; padding: 7px 5px; letter-spacing: 0; background: color-mix(in srgb, var(--city) 14%, transparent);
  box-shadow: inset 0 -2px 0 var(--city); }
.mk-fees .mk-fee-row .mk-seen { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: var(--good); vertical-align: 1px; }
.mk-fees .mk-fee-row .mk-seen.age-old { background: var(--warn); }
.mk-fees .mk-fee-row .mk-seen.age-none { background: var(--bad); }
.mk-fees .mk-fee-row .num.age-old:not(.none) { color: var(--muted); font-weight: 400; }
.mk-fees .mk-fee-row .num.none { color: var(--faint); }
.mk-fees .mk-fee-row .num.best { color: var(--text); font-weight: 800; }
.mk-fees .mk-fee-row .num.best::before { content: "\25C6"; margin-right: 5px; font-size: 8px; vertical-align: 2px; color: var(--city); }
.mk-fees .mk-fee-row .num.pick:hover { background: color-mix(in srgb, var(--city) 22%, transparent); }
.mk-fees .mk-fee-row .num.pick.on { background: var(--city); color: #17120c; }
.mk-fees .mk-fee-row .num.pick.on.best::before { color: #17120c; }
.mk-age-key .k-best::before { content: "\25C6"; background: none; width: auto; height: auto; font-size: 9px; color: var(--accent); }
.mk-slow { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 50; max-width: calc(100vw - 32px); padding: 9px 16px;
  border: 1px solid var(--warn); border-radius: 999px; background: var(--panel); color: var(--text); font-size: 14px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5); }
.mk-sold { font-style: normal; color: var(--good); font-weight: 600; }
.mk-sold.out { color: var(--accent); }
/* a private station on the city's map: crossed out */
.mk-map rect.shut { fill: #2a211a; stroke: #6b3a30; stroke-width: 0.6; }
.mk-map rect.shut.mine { fill: #3a2420; stroke: var(--bad); stroke-width: 0.9; }
.mk-map line.shut { stroke: #8a4a3c; stroke-width: 1.4; stroke-linecap: round; pointer-events: none; }
.mk-map line.shut.mine { stroke: var(--bad); stroke-width: 2.4; }
.mk-chart-key .k-shut::before { content: '\2715'; background: none; width: auto; height: auto; color: var(--bad); font-size: 11px; }
/* a station nearly out of food: on the map dashed and dim, in the table struck through where every one of them is */
.mk-map rect.on.dry { fill: #5a4a30; stroke: #b98f43; stroke-width: 0.9; stroke-dasharray: 2.5 2; }
.mk-map g.stop circle { fill: #c0392b; stroke: #fff; stroke-width: 0.9; opacity: 0.8; }
.mk-map g.stop rect { fill: #fff; opacity: 0.9; }
.mk-map g.stop.mine circle { opacity: 1; stroke-width: 1.4; }
.mk-map text.short { font-size: 15px; stroke: none; }
.mk-chart-key .k-stop::before { background: #c0392b; height: 9px; width: 9px; border-radius: 50%; }
/* a heading with a second thing to sort by under it (Each, and undercut) */
.mk-row.head .mk-two { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.mk-row.head .mk-sort.sub { font-size: 9.5px; letter-spacing: 0.4px; opacity: 0.85; }
.mk-row.head .mk-sort.sub.on { color: var(--warn); opacity: 1; }
/* the killboard's webhooks: the dialog (the trades' form's looks) and the list of what's connected */
.kb-hooks { width: min(600px, calc(100vw - 32px)); }
.kb-hook-list { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.kb-hook-list:empty { display: none; }
.kb-hook { display: flex; gap: 8px; align-items: center; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(0, 0, 0, 0.18); }
.kb-hook-what { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.kb-hook-what i { font-style: normal; font-size: 12.5px; color: var(--faint); overflow-wrap: anywhere; }
.kb-hooks .tr-error.bad { color: var(--bad); }
.kb-hooks .tr-error:not(.bad) { color: var(--good); }

/* ---- the crafting calculator (static/craft.js): a tab of the Marketplace ---- */
.cr-bar .cr-h { font-family: var(--display); font-size: 13px; letter-spacing: 1px; color: var(--accent); }
.cr-find { position: relative; flex: 1 1 220px; max-width: 300px; }
.cr-find .mk-search { max-width: none; width: 100%; }
.cr-hits { position: absolute; z-index: 8; top: calc(100% + 4px); left: 0; right: 0; min-width: 320px; max-height: 340px; overflow: auto; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 9px; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4); }
.cr-hits:empty { display: none; }
.cr-hits .tr-hit:first-child { border-top: 0; }
.cr-none { padding: 10px 12px; color: var(--muted); font-size: 13.5px; }
.cr-row, .cr-city { all: unset; box-sizing: border-box; width: 100%; display: grid; gap: 12px; align-items: center; padding: 6px 14px; border-top: 1px solid var(--line); cursor: pointer; }
.cr-row { grid-template-columns: 38px minmax(0, 1.5fr) minmax(0, 1fr) 76px minmax(0, 1fr) 88px 64px 88px 70px; }
.cr-city { grid-template-columns: minmax(0, 1.5fr) 78px 86px 90px minmax(0, 1fr) 104px 104px 70px; padding: 8px 14px; }
.cr-row.head, .cr-city.head { border-top: 0; cursor: default; background: var(--panel-2); font-family: var(--display); font-size: 11.5px; letter-spacing: 0.8px; text-transform: uppercase;
  color: var(--faint); padding: 9px 14px; }
.cr-row:not(.head):hover, .cr-city:not(.head):hover { background: color-mix(in srgb, var(--accent) 6%, var(--panel)); }
.cr-row:focus-visible, .cr-city:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.cr-city.on { background: color-mix(in srgb, var(--accent) 13%, var(--panel)); box-shadow: inset 3px 0 0 var(--accent); }
.cr-row .num, .cr-city .num, .cr-mrow .num, .cr-mat .num { text-align: right; font-variant-numeric: tabular-nums; }
.cr-city .num i, .cr-mrow .num i, .cr-mat .num i { display: block; font-style: normal; font-size: 12px; color: var(--faint); }
.cr-row .strong, .cr-city .strong, .cr-mat .strong { font-weight: 700; }
.cr-row .good, .cr-city .good, .cr-mrow .good, .cr-sum.good b, .cr-own.good { color: var(--good); }
.cr-row .bad, .cr-city .bad, .cr-sum.bad b { color: var(--bad); }
.cr-where { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.cr-where b { font-size: 15px; }
.cr-tag, .cr-chip, .cr-today { font-style: normal; font-size: 11px; line-height: 1; padding: 3px 7px; border-radius: 999px; white-space: nowrap; font-weight: 600; }
.cr-tag { background: var(--good-soft); color: var(--good); border: 1px solid color-mix(in srgb, var(--good) 45%, transparent); }
.cr-tag.focus { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.cr-chip { background: var(--panel-2); color: var(--muted); border: 1px solid var(--line-strong); }
.cr-today { background: var(--warn-soft); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); margin-left: 6px; }
.cr-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 10px 14px; background: var(--ah-wood); border: 1px solid var(--line); border-radius: 8px; }
.cr-title { flex: 0 1 auto; min-width: 0; } .cr-head .cr-chips { margin-left: 18px; } .cr-head .cr-fields { margin-left: auto; } .cr-head .cr-fields .cr-num { min-width: 150px; }
.cr-title h2 { margin: 0; font-family: var(--display); font-size: 20px; letter-spacing: 0.6px; color: var(--text); }
.cr-title p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.cr-fields { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.cr-field { display: grid; gap: 3px; }
.cr-field > span:first-child { font-family: var(--display); font-size: 10.5px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--faint); }
.cr-num { width: 92px; box-sizing: border-box; font: inherit; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--text); background: var(--panel-2); border: 1px solid var(--line-strong);
  border-radius: 8px; padding: 6px 9px; }
.cr-num:focus { outline: none; border-color: var(--accent); }
.cr-two { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 12px; align-items: start; }
.cr-side { display: grid; gap: 12px; align-content: start; }
.cr-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 14px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18); }
.cr-panel h3 { margin: 0 0 8px; font-family: var(--display); font-size: 14px; letter-spacing: 1px; color: var(--accent); }
.cr-panel .meta { margin: 8px 0 0; font-size: 12.5px; }
.cr-detail header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.cr-detail header h3 { margin: 0; font-size: 16px; }
.cr-detail .cr-bonus { margin: 4px 0 10px; font-size: 13.5px; }
.cr-toggle { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; }
.cr-toggle button { border: 0; border-radius: 0; background: transparent; color: var(--muted); font-size: 13px; padding: 5px 14px; cursor: pointer; }
.cr-toggle button.on { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.cr-mats { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.cr-mat { display: grid; grid-template-columns: 38px minmax(0, 1fr) 76px 110px 92px; gap: 12px; align-items: center; padding: 7px 12px; border-top: 1px solid var(--line); background: var(--panel-2); }
.cr-mat:first-child { border-top: 0; }
.cr-buy b { font-size: 16px; }
.cr-own { all: unset; display: block; cursor: pointer; font-size: 12.5px; color: var(--muted); text-decoration: underline dotted; text-underline-offset: 3px; }
.cr-own:hover { color: var(--accent); }
.cr-sums { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; margin-top: 12px; }
.cr-sum { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px dotted var(--line); font-size: 14px; }
.cr-sum span { color: var(--muted); }
.cr-sum b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cr-sum.total { border-bottom: 0; border-top: 1px solid var(--line-strong); margin-top: 2px; padding-top: 7px; font-size: 16px; }
.cr-sum.total span { color: var(--text); font-family: var(--display); font-size: 12.5px; letter-spacing: 0.8px; text-transform: uppercase; align-self: center; }
.cr-sum.soft { font-size: 13px; border-bottom: 0; }
.cr-way { display: grid; grid-template-columns: minmax(0, 1fr) auto 76px; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px dotted var(--line); font-size: 14px; }
.cr-way:first-of-type { border-top: 0; }
.cr-way b { font-variant-numeric: tabular-nums; }
.cr-way.best b { color: var(--good); }
.cr-way .cr-tag { margin-left: 8px; }
.cr-way > i, .cr-mrow .num i { font-style: normal; font-size: 12px; text-align: right; }
.cr-mrow { display: grid; grid-template-columns: minmax(0, 1fr) 84px 96px 70px; gap: 10px; align-items: center; padding: 5px 0; border-top: 1px dotted var(--line); font-size: 14px; }
.cr-mrow.head { border-top: 0; font-family: var(--display); font-size: 10.5px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--faint); }
.cr-back { align-self: center; }
@media (max-width: 1100px) {
  .cr-two { grid-template-columns: 1fr; }
  .cr-row { grid-template-columns: 38px minmax(0, 1.4fr) minmax(0, 1fr) 84px 84px; }
  .cr-row > :nth-child(4), .cr-row > :nth-child(5), .cr-row > :nth-child(7), .cr-row > :nth-child(9) { display: none; }
  .cr-city { grid-template-columns: minmax(0, 1.3fr) 70px 96px 96px; }
  .cr-city > :nth-child(3), .cr-city > :nth-child(4), .cr-city > :nth-child(5), .cr-city > :nth-child(8) { display: none; }
}
@media (max-width: 640px) {
  .cr-sums { grid-template-columns: 1fr; }
  .cr-mat { grid-template-columns: 34px minmax(0, 1fr) 64px 84px; }
  .cr-mat > :nth-child(4) { display: none; }
}
.tab-craft .age-old { color: var(--warn); }
.tab-craft .age-fresh { color: var(--faint); }
.cr-doubt { font-style: normal; font-size: 11px; line-height: 1; padding: 2px 6px; margin-left: 6px; border-radius: 999px; font-weight: 600; white-space: nowrap;
  background: var(--bad-soft); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 45%, transparent); }
.cr-warn { margin: 4px 0; padding: 6px 9px; border-radius: 8px; font-size: 13px; background: var(--bad-soft); color: var(--bad); }
.ah-body.tab-craft { grid-auto-rows: max-content; }
.cr-approx { color: var(--muted); }
/* (the plan: every step from what's bought to what's sold) */
.cr-chips { display: grid; gap: 4px; }
.cr-sumline { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 8px 14px; cursor: pointer; background: var(--panel-2); }
.cr-sumline b { font-family: var(--display); font-size: 13px; letter-spacing: 1px; color: var(--accent); }
.cr-sumline span { font-size: 12.5px; color: var(--faint); }
.cr-cities:not([open]) .cr-sumline { border-radius: var(--radius); }
.cr-cities[open] .cr-city.head { border-top: 1px solid var(--line); }
.cr-plan header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cr-plan header h3 { margin: 0; font-size: 16px; }
.cr-plan > .meta { margin: 4px 0 10px; }
.cr-step { display: grid; grid-template-columns: minmax(0, 1.5fr) 132px minmax(0, 1.1fr) 168px 84px; gap: 10px; align-items: center; padding: 7px 10px; border: 1px solid var(--line); border-top: 0;
  background: var(--panel-2); }
.cr-step.head { background: none; border: 0; border-bottom: 1px solid var(--line); padding: 4px 10px; font-family: var(--display); font-size: 10.5px; letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--faint); }
.cr-step.make { background: color-mix(in srgb, var(--accent) 7%, var(--panel-2)); }
.cr-step.d0 { border-top: 1px solid var(--line); box-shadow: inset 3px 0 0 var(--accent); }
.cr-step:last-child { border-radius: 0 0 9px 9px; }
.cr-what { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cr-what .mk-name { min-width: 0; }
.cr-step.d1 .cr-what { padding-left: 18px; } .cr-step.d2 .cr-what { padding-left: 36px; } .cr-step.d3 .cr-what { padding-left: 54px; }
.cr-step.d4 .cr-what { padding-left: 72px; } .cr-step.d5 .cr-what { padding-left: 90px; } .cr-step.d6 .cr-what { padding-left: 108px; }
.cr-step .num { text-align: right; font-variant-numeric: tabular-nums; }
.cr-how { display: grid; gap: 2px; min-width: 0; }
.cr-how > i, .cr-how > i i { font-style: normal; font-size: 12px; color: var(--faint); }
.cr-how .mk-filter, .cr-how .cr-num { width: 100%; max-width: 170px; box-sizing: border-box; padding: 4px 8px; font-size: 13.5px; }
.cr-num.mine { border-color: var(--accent); color: var(--accent); }
.cr-num.tiny { width: 66px; padding: 3px 6px; font-size: 12.5px; }
.cr-toggle.small button { padding: 4px 9px; font-size: 12.5px; white-space: nowrap; }
.cr-toggle { max-width: 100%; } .cr-step .cr-toggle { justify-self: start; }
.cr-toggle.cr-all button { padding: 6px 12px; font-size: 13px; }
.cr-trip { margin: 4px 0 12px; }
.cr-look { display: grid; gap: 14px; padding: 18px 20px 20px; }
.lite select.mk-filter { display: none; }
.cr-look h3 { margin: 4px 0 -6px; }
.cr-look-big { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 18px; justify-items: start; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.cr-look-big > span, .cr-look-big > b, .cr-look-big > i { grid-column: 1; }
.cr-look-big > i.cr-each { font-size: 17px; font-weight: 700; color: var(--text); }
.cr-look-many { grid-column: 2; grid-row: 1 / span 3; align-self: center; justify-self: end; display: grid; gap: 5px; justify-items: end; }
.cr-look-many span { font-family: var(--display); font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--accent); }
.cr-look-many .cr-num { width: 120px; font-size: 20px; font-weight: 700; padding: 8px 10px; text-align: center; }
@media (max-width: 760px) { .cr-look-big { grid-template-columns: 1fr; } .cr-look-many { grid-column: 1; grid-row: auto; justify-self: start; justify-items: start; margin-top: 8px; } }
.cr-look-big span { font-family: var(--display); font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--faint); }
.cr-look-big b { font-family: var(--cmd); font-size: 40px; line-height: 1.05; color: var(--text); } .cr-look-big.good b { color: var(--good); } .cr-look-big.bad b { color: var(--bad); }
.cr-look-big.shaky b { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; } .cr-look-big.shaky span { color: var(--bad); }
.cr-way-n.shaky, .cr-way-n.shaky.good, .cr-way-n.shaky.bad { color: var(--muted); }
.cr-look-big i { font-style: normal; font-size: 14px; color: var(--muted); }
.cr-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cr-tile { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); min-width: 0; }
.cr-tile span { font-size: 12px; color: var(--faint); } .cr-tile b { font-family: var(--cmd); font-size: 22px; } .cr-tile i { font-style: normal; font-size: 12.5px; color: var(--muted); } .cr-tile em { font-style: normal; color: var(--good); }
.cr-short { margin: 0; padding-left: 22px; display: grid; gap: 7px; font-size: 14.5px; line-height: 1.4; } .cr-short b { color: var(--text); }
.cr-look-go { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding-top: 6px; }
.cr-go { font-size: 16px; padding: 12px 22px; }
.cr-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.cr-tab { border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); font-size: 14px; padding: 7px 14px; cursor: pointer; }
.cr-tab:hover { color: var(--text); border-color: var(--line); } .cr-tab.on { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.cr-tabs-back { margin-right: 6px; } .cr-tabs-sum { margin-left: auto; padding: 0 8px; font-family: var(--cmd); font-weight: 700; } .cr-tabs-sum.good { color: var(--good); } .cr-tabs-sum.bad { color: var(--bad); }
.cr-run-body { display: grid; gap: 12px; }
.cr-trip-two { display: grid; grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr); gap: 12px; align-items: start; }
.cr-trip-two.alone { grid-template-columns: 1fr; }
.cr-trip-left { display: grid; gap: 12px; align-content: start; min-width: 0; }
/* (the map stays in sight while the stops are read down -- and is never taller than the window has room for) */
.cr-trip-map { position: sticky; top: 0; display: grid; gap: 8px; padding: 10px 12px 12px; }
.cr-trip-map .cr-trip-head { margin-bottom: 0; }
.cr-trip-map .cr-map-svg { width: auto; max-width: 100%; max-height: calc(100vh - 330px); min-height: 280px; margin: 0 auto; }
.cr-trip-left .cr-run { padding: 8px 12px; gap: 6px 12px; align-items: center; }
.cr-trip-left .cr-run .cr-pie img { width: 30px; height: 30px; } .cr-trip-left .cr-run .cr-run-can { flex-basis: 100%; }
.cr-stops { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cr-stop { display: grid; gap: 4px; padding-left: 14px; border-left: 2px solid var(--line-strong); }
.cr-stop-h { display: flex; align-items: center; gap: 9px; margin-left: -27px; font-size: 15.5px; }
.cr-stop-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-family: var(--cmd); font-weight: 700; font-size: 13px; flex: none; }
.cr-stop-do { font-size: 13.5px; line-height: 1.4; color: var(--muted); } .cr-stop-do i { font-style: normal; font-family: var(--display); font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); }
.cr-ride { margin: 4px 0 2px; padding: 7px 10px; border: 1px dashed var(--line-strong); border-radius: 8px; font-size: 13.5px; }
.cr-ride.on { border-style: solid; border-color: rgba(127, 224, 138, 0.55); background: rgba(127, 224, 138, 0.06); } .cr-ride.none { color: var(--faint); }
.cr-ride-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; } .cr-ride-h i { font-style: normal; font-size: 12.5px; }
.cr-hops { list-style: none; margin: 5px 0 0; padding: 0; display: grid; gap: 1px; }
.cr-hops-more summary { cursor: pointer; margin-top: 4px; font-size: 12.5px; color: var(--accent); }
.cr-ride .cr-now { margin: 6px 0 2px; padding: 5px 8px; font-size: 13.5px; }
@media (max-width: 980px) { .cr-trip-two { grid-template-columns: 1fr; } }
.cr-risk { margin: 0; padding: 9px 12px; border-radius: 9px; font-size: 13.5px; line-height: 1.45; border: 1px solid var(--line-strong); background: var(--panel-2); }
.cr-risk.on { border-color: color-mix(in srgb, var(--bad) 55%, transparent); background: color-mix(in srgb, var(--bad) 10%, transparent); } .cr-risk.on b { color: var(--bad); }
.cr-risk .link-button { text-decoration: underline; padding: 0; }
.cr-ways { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cr-way-pick { display: grid; gap: 4px; text-align: left; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--text); cursor: pointer; font: inherit; }
.cr-way-pick:hover { border-color: var(--accent); }
.cr-way-pick.safe.on { border-color: var(--good); box-shadow: inset 0 0 0 1px var(--good); background: var(--good-soft); }
.cr-way-pick.risky { border-style: dashed; } .cr-way-pick.risky.on { border-style: solid; border-color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.cr-way-h { display: flex; align-items: baseline; gap: 8px; } .cr-way-h b { font-family: var(--display); font-size: 14px; letter-spacing: 0.8px; text-transform: uppercase; }
.cr-way-h i { font-style: normal; font-size: 12px; color: var(--faint); } .cr-way-pick.safe .cr-way-h i { color: var(--good); } .cr-way-pick.risky .cr-way-h b, .cr-way-pick.risky .cr-way-h i { color: var(--bad); }
.cr-way-n { font-family: var(--cmd); font-size: 24px; font-weight: 700; } .cr-way-n.good { color: var(--good); } .cr-way-n.bad { color: var(--bad); }
.cr-way-s { font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.cr-way-pick.patient { border-style: dashed; } .cr-way-pick.patient.on { border-style: solid; border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cr-way-pick.patient .cr-way-h b, .cr-way-pick.patient .cr-way-h i { color: var(--accent); }
.cr-worth { display: grid; gap: 4px; padding: 8px 10px; margin-bottom: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); font-size: 13.5px; }
.cr-worth label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; } .cr-worth .cr-num { width: 96px; padding: 4px 8px; } .cr-worth p { margin: 0; }
.mk-wait { font-style: normal; font-size: 12px; color: var(--accent); }
.cr-ifs h3 { margin: 0 0 8px; } .cr-ifs .cr-tile b { font-size: 20px; } .cr-ifs .cr-tile.good b { color: var(--good); } .cr-ifs .cr-tile.bad b { color: var(--bad); }
.cr-backed { font-style: normal; font-size: 11px; margin-left: 6px; white-space: nowrap; }
.cr-backed-note { margin: 4px 0; padding: 6px 9px; border-radius: 8px; font-size: 13px; background: var(--good-soft); color: var(--good); }
.mk-vip { border-color: var(--accent); }
.mk-flip-row .mk-name > i { display: block; } .mk-flip-row .mk-name > i.mk-wait { margin-top: 1px; }
.mk-vip-go { border-color: var(--accent); color: var(--accent); font-weight: 700; text-decoration: none; } .mk-vip-add { margin-left: 8px; }
.vip-list { margin: 10px 0; padding: 14px 16px; border: 1px solid var(--accent); } .vip-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 8px; }
.vip-head h2 { margin: 0; font-family: var(--display); font-size: 17px; color: var(--accent); } .vip-head label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; } .vip-margin { width: 64px; padding: 4px 6px; }
.vip-total { margin-left: auto; font-size: 14px; color: var(--muted); }
.vip-row { display: grid; grid-template-columns: 38px minmax(0, 1.3fr) 80px minmax(0, 1fr) minmax(0, 1.1fr) auto; gap: 12px; align-items: center; padding: 8px 4px; border-top: 1px solid var(--line); }
.vip-many { width: 76px; padding: 5px 6px; text-align: center; } .vip-fact { display: grid; gap: 1px; font-size: 14px; } .vip-fact i { font-style: normal; font-size: 12px; color: var(--muted); }
.vip-do { display: inline-flex; gap: 6px; } .vip-do .on { border-color: var(--accent); color: var(--accent); }
.vip-snipe { padding: 10px 12px 12px 54px; background: var(--panel-2); border-radius: 0 0 10px 10px; font-size: 14px; } .vip-snipe p { margin: 0 0 8px; }
.vip-cities { display: grid; gap: 4px; margin-bottom: 8px; } .vip-city { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 10px; font-size: 13.5px; }
.vip-city i { font-style: normal; color: var(--muted); } .vip-city i.good { color: var(--good); } .vip-city i.bad { color: var(--bad); }
@media (max-width: 900px) { .vip-row { grid-template-columns: 38px minmax(0, 1fr) 80px; } .vip-city { grid-template-columns: 1fr; } .vip-snipe { padding-left: 12px; } }
.mk-flip-row.opens { cursor: pointer; } .mk-flip-row.opens.on { background: color-mix(in srgb, var(--accent) 10%, var(--panel)); box-shadow: inset 3px 0 0 var(--accent); }
.bm-open { margin: 10px 0; padding: 14px 16px; border: 1px solid var(--accent); }
.bm-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; } .bm-head h2 { margin: 0; font-family: var(--display); font-size: 18px; } .bm-head button { margin-left: auto; }
.bm-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; } .bm-side { display: grid; gap: 10px; }
.bm-chart { width: 100%; height: auto; background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; }
.bm-grid { stroke: var(--line); stroke-width: 1; } .bm-axis { fill: var(--faint); font-size: 11px; } .bm-bar { fill: color-mix(in srgb, var(--accent) 28%, transparent); }
.bm-line { fill: none; stroke: var(--accent); stroke-width: 2; } .bm-dot { fill: var(--accent); }
.bm-now { stroke: var(--good); stroke-width: 1.5; stroke-dasharray: 6 4; } .bm-now-t { fill: var(--good); font-size: 11.5px; font-weight: 700; }
.bm-load { display: flex; align-items: center; gap: 10px; font-weight: 700; } .bm-load .bm-many { width: 110px; font-size: 17px; padding: 6px 9px; text-align: center; }
.bm-cities { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .bm-open .cr-tile.good b { color: var(--good); } .bm-open .cr-tile.bad b { color: var(--bad); }
@media (max-width: 900px) { .bm-body { grid-template-columns: 1fr; } }
.cr-wheres { display: inline-flex; gap: 0; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; }
.cr-wheres .cr-where { border: 0; border-radius: 0; margin: 0; padding: 6px 14px; background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: 13.5px; }
.cr-wheres .cr-where.on { background: var(--accent); color: var(--bg, #14100b); font-weight: 700; } .cr-wheres .cr-where:not(.on):hover { color: var(--text); }
.cr-way-pick.black { border-style: dashed; } .cr-way-pick.black .cr-way-h b { color: var(--accent); }
.cr-way-pick.black.on { border-style: solid; border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cr-risky { display: block; font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--bad); }
@media (max-width: 760px) { .cr-ways { grid-template-columns: 1fr; } }
.cr-many { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 4px 0 10px; }
.cr-many label { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; } .cr-many .cr-num { width: 110px; font-size: 16px; padding: 7px 10px; }
.cr-path { padding: 10px 12px; border-radius: 9px; font-size: 14px; line-height: 1.45; margin-bottom: 8px; }
.cr-path.on { background: var(--good-soft); border: 1px solid color-mix(in srgb, var(--good) 45%, transparent); } .cr-path.on b { color: var(--good); }
.cr-path.off { background: color-mix(in srgb, var(--bad) 12%, transparent); border: 1px solid color-mix(in srgb, var(--bad) 55%, transparent); } .cr-path.off b { color: var(--bad); }
.cr-path.off button { margin-left: 10px; }
.cr-off { display: block; margin-top: 2px; font-size: 12.5px; color: var(--bad); font-weight: 600; }
.cr-off-undo { font-size: 12.5px; text-decoration: underline; color: var(--text); padding: 0; }
.cr-step.off-path { box-shadow: inset 3px 0 0 var(--bad); }
select.mk-filter.off-path { border-color: var(--bad); color: var(--bad); }
.cr-next { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 14px; }
.cr-help-1 { margin: 0 0 8px; }
@media (max-width: 760px) { .cr-tiles { grid-template-columns: 1fr; } .cr-look-big b { font-size: 32px; } }
.cr-trip-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.cr-map { border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(242, 210, 140, 0.12); }
.cr-map-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.cr-map-svg { display: block; width: 100%; height: auto; }
.cr-map-swell { fill: none; stroke: rgba(150, 200, 235, 0.07); stroke-width: 2; }
.cr-map-land { stroke: rgba(20, 16, 10, 0.34); stroke-width: 1.2; stroke-linejoin: round; transition: filter 0.15s; }
.cr-map-land:hover { filter: brightness(1.18); }
.cr-map-land.on { stroke: rgba(255, 236, 190, 0.5); stroke-width: 1.6; }
.cr-map-land.painted { fill: transparent; stroke: none; } .cr-map-land.painted:hover { fill: rgba(255, 255, 255, 0.16); filter: none; }
.cr-map-land.painted.on { fill: rgba(255, 240, 200, 0.1); stroke: rgba(255, 244, 214, 0.75); stroke-width: 1.6; }
.cr-map-dot.safe { fill: #58a03c; }
.cr-map-tint { pointer-events: none; stroke: rgba(10, 8, 6, 0.55); stroke-width: 1.4; stroke-linejoin: round; }
.cr-map-tint.red { fill: rgba(214, 40, 28, 0.36); } .cr-map-tint.yellow { fill: rgba(246, 206, 50, 0.26); } .cr-map-tint.blue { fill: rgba(50, 120, 235, 0.2); }
.cr-map-tint.on { stroke: rgba(255, 244, 214, 0.85); stroke-width: 1.8; }
.cr-map-tints.off .cr-map-tint { fill: transparent; stroke: rgba(10, 8, 6, 0.3); }
.cr-map-over { pointer-events: none; mix-blend-mode: soft-light; }
.cr-map-road { stroke: rgba(46, 30, 14, 0.42); stroke-width: 1.6; stroke-dasharray: 5 5; pointer-events: none; }
.cr-map-bed { fill: none; stroke: rgba(12, 8, 4, 0.82); stroke-width: 9; stroke-linejoin: round; stroke-linecap: round; pointer-events: none; }
.cr-map-way { fill: none; stroke: #f0c660; stroke-width: 5; stroke-linejoin: round; stroke-linecap: round; pointer-events: none; }
.cr-map-way.lead { stroke: #7fe08a; }
.cr-map-run { fill: none; stroke: rgba(255, 255, 255, 0.9); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 3 26; pointer-events: none; animation: cr-run 1.6s linear infinite; }
@keyframes cr-run { to { stroke-dashoffset: -29; } }
.cr-map-dot { stroke: #14100a; stroke-width: 2; fill: #5b8fd6; } .cr-map-dot.yellow { fill: #e2c04e; } .cr-map-dot.red { fill: #e0553e; }
.cr-map-name { font-size: 13px; fill: #fff6df; paint-order: stroke; stroke: rgba(12, 8, 4, 0.9); stroke-width: 3.5px; pointer-events: none; }
.cr-map-keep { fill: #efe2c0; stroke: #1a1208; stroke-width: 1.6; } .cr-map-city.on .cr-map-keep { fill: #f6d27a; }
.cr-map-banner { fill: rgba(18, 12, 6, 0.86); stroke: rgba(242, 210, 140, 0.55); stroke-width: 1.2; }
.cr-map-label { font-family: var(--display); font-size: 15px; font-weight: 700; letter-spacing: 0.8px; fill: #efe2c0; } .cr-map-city.on .cr-map-label { fill: #f6d27a; }
.cr-map-stop { fill: #f0c660; stroke: #1a1208; stroke-width: 2; } .cr-map-stop-t { font-family: var(--cmd); font-size: 16px; font-weight: 700; fill: #1a1208; }
.cr-map-here { fill: #7fe08a; stroke: #0c1a0e; stroke-width: 2.5; } .cr-map-here-t { font-size: 15px; font-weight: 700; fill: #9cf0a6; paint-order: stroke; stroke: rgba(8, 14, 8, 0.92); stroke-width: 4px; }
.cr-map-pulse { fill: none; stroke: #7fe08a; stroke-width: 3; transform-box: fill-box; transform-origin: center; animation: cr-pulse 1.8s ease-out infinite; }
@keyframes cr-pulse { from { transform: scale(0.5); opacity: 1; } to { transform: scale(2.4); opacity: 0; } }
.cr-map-rose circle { fill: rgba(12, 18, 28, 0.6); stroke: rgba(242, 210, 140, 0.5); stroke-width: 1.5; } .cr-map-rose path { fill: #f0c660; } .cr-map-rose path.thin { fill: rgba(240, 198, 96, 0.5); }
.cr-map-rose text { font-family: var(--display); font-size: 15px; font-weight: 700; fill: #f0c660; }
.cr-map-key rect { fill: rgba(12, 18, 28, 0.7); stroke: rgba(242, 210, 140, 0.35); } .cr-map-key text { font-size: 13px; fill: #e8dcc0; }
.cr-map-title { font-family: var(--display); font-size: 20px; letter-spacing: 3px; text-transform: uppercase; fill: rgba(240, 222, 180, 0.8); paint-order: stroke; stroke: rgba(6, 12, 20, 0.7); stroke-width: 4px; }
.cr-map-dialog { width: min(96vw, 980px); max-height: 94vh; padding: 14px; overflow: auto; }
.cr-map-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
@media (prefers-reduced-motion: reduce) { .cr-map-run, .cr-map-pulse { animation: none; } }
.cr-legs { margin: 8px 0 0; font-size: 13.5px; display: grid; gap: 4px; } .cr-legs i { font-style: normal; }
.cr-leg { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; } .cr-leg summary { cursor: pointer; }
.cr-leg ol { list-style: none; margin: 6px 0 2px; padding: 0; display: grid; gap: 2px; }
.cr-hop { display: grid; grid-template-columns: 52px 12px auto 1fr; gap: 8px; align-items: center; padding: 2px 4px; border-radius: 5px; }
.cr-hop.here { background: rgba(127, 224, 138, 0.14); }
.cr-hop-dir { font-family: var(--cmd); font-weight: 700; color: var(--accent); white-space: nowrap; }
.cr-hop-dot { width: 10px; height: 10px; border-radius: 50%; background: #5b8fd6; } .cr-hop-dot.yellow { background: #d9b84a; } .cr-hop-dot.red { background: #d6604a; } .cr-hop-dot.city { background: #e8dcc0; }
.cr-hop i { color: var(--faint); font-size: 12px; } .cr-hop.red i { color: #d6604a; }
.cr-now { margin: 0 0 8px; padding: 8px 10px; border-radius: 8px; background: rgba(127, 224, 138, 0.1); border: 1px solid rgba(127, 224, 138, 0.35); font-size: 14px; }
.cr-map-way.lead { stroke: #7fe08a; stroke-dasharray: 6 5; }
.cr-focus.over { display: grid; gap: 1px; font-size: 12px; color: var(--faint); line-height: 1.25; } .cr-focus.over i { font-style: normal; font-weight: 700; color: var(--bad, #d9715c); }
.cr-toggle button i { font-style: normal; font-size: 9px; margin-left: 4px; vertical-align: 1px; }
.cr-focus { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.cr-focus.on { color: var(--accent); }
.cr-focus span i { font-style: normal; font-size: 11.5px; color: var(--good); margin-left: 5px; }
.cr-total .cr-sum { align-items: center; }
.cr-total .cr-num { width: 120px; text-align: right; }
.cr-shop { padding: 6px 0; border-top: 1px dotted var(--line); }
.cr-shop:first-of-type { border-top: 0; padding-top: 0; }
.cr-shop-h { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 3px; }
.cr-shop-h b { font-size: 15px; }
.cr-shop-h span { font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.cr-shop-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 2px 0; font-size: 14px; }
.cr-shop-row .mk-icon { width: 28px; height: 28px; }
.cr-shop-row .num { font-variant-numeric: tabular-nums; color: var(--muted); }
.cr-route { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.cr-route li b { display: block; }
.cr-route li span { display: block; color: var(--muted); font-size: 13.5px; }
.cr-route li span i { font-style: normal; font-family: var(--display); font-size: 10.5px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--accent); }
@media (max-width: 1100px) {
  .cr-step { grid-template-columns: minmax(0, 1fr) 132px 84px; }
  .cr-step > :nth-child(3), .cr-step > :nth-child(4) { grid-column: 1 / -1; grid-row: 2; }
  .cr-step > :nth-child(4) { grid-row: 3; }
  .cr-step.head > :nth-child(3), .cr-step.head > :nth-child(4) { display: none; }
}
.ah-pick .mk-chip.cr-refine-b { width: auto; gap: 5px; padding: 0 9px 0 4px; font-size: 12.5px; font-weight: 600; color: var(--text); }
.cr-refine-b img { width: 22px; height: 22px; }
.cr-levels.on { color: var(--good); }
/* (the plan, put simply: the levels that count, the steps, and on the side the summary and the cities) */
.cr-spec { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 14px; background: var(--ah-wood); border: 1px solid var(--line); border-radius: 8px; font-size: 13.5px; }
.cr-spec > b { font-family: var(--display); font-size: 12px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--accent); }
.cr-spec.off > span { color: var(--muted); }
.cr-level { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-strong); }
.cr-level i { font-style: normal; font-weight: 700; min-width: 22px; text-align: center; padding: 1px 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.cr-level.none { opacity: 0.6; } .cr-level.none i { background: var(--line-strong); color: var(--text); }
.cr-spec-sum { margin-left: auto; color: var(--muted); } .cr-spec-sum b { color: var(--good); font-size: 15px; }
.cr-spec-at { font-style: normal; font-size: 12px; color: var(--faint); }
.cr-help { margin: 6px 0 10px; padding-left: 20px; display: grid; gap: 2px; font-size: 13.5px; color: var(--muted); }
.cr-only { font-size: 12.5px; color: var(--faint); padding-left: 10px; }
.cr-fcell { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.cr-focus span i { display: block; margin-left: 0; }
.cr-step { grid-template-columns: minmax(0, 1.5fr) 132px minmax(0, 1.1fr) 190px 78px; }
.cr-crow { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 76px 84px; gap: 10px; align-items: center; padding: 5px 6px; border-top: 1px dotted var(--line);
  font-size: 14px; cursor: pointer; border-radius: 6px; }
.cr-crow.head { cursor: default; border-top: 0; font-family: var(--display); font-size: 10.5px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--faint); }
.cr-crow:not(.head):hover { background: color-mix(in srgb, var(--accent) 7%, var(--panel)); }
.cr-crow.on { background: color-mix(in srgb, var(--accent) 14%, var(--panel)); box-shadow: inset 3px 0 0 var(--accent); }
.cr-crow:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.cr-crow .num { text-align: right; font-variant-numeric: tabular-nums; }
.cr-crow .strong { font-weight: 700; } .cr-crow .good { color: var(--good); } .cr-crow .bad { color: var(--bad); }
.cr-crow .cr-where b { font-size: 14px; }
.cr-panel.cr-cities { overflow: visible; }
.cr-panel.cr-cities > .meta { margin: 0 0 6px; }
/* (the asker's focus: at the right of the bar, always in sight) */
.cr-have { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 5px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, var(--panel-2)); border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--line)); font-size: 13.5px; color: var(--muted); }
.cr-have-h { font-family: var(--display); font-size: 11px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--accent); }
.cr-have b { color: var(--text); font-size: 16px; font-variant-numeric: tabular-nums; }
.cr-have.none { background: var(--panel-2); border-color: var(--line); } .cr-have.none b { font-size: 13.5px; font-weight: 400; color: var(--faint); }
.cr-have-bar { width: 90px; height: 8px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 999px; overflow: hidden; background: var(--line-strong); }
.cr-have-bar::-webkit-progress-bar { background: var(--line-strong); } .cr-have-bar::-webkit-progress-value { background: var(--accent); }
.cr-have-bar::-moz-progress-bar { background: var(--accent); }
.cr-have-use { font-size: 12.5px; } .cr-have-use.bad { color: var(--bad); }
.cr-quality { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-strong); }
.cr-quality h4 { margin: 0 0 2px; font-family: var(--display); font-size: 12.5px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--accent); }
.cr-quality .meta { margin: 4px 0 6px; }
.cr-qrow { display: grid; grid-template-columns: minmax(0, 1fr) 70px 90px; gap: 10px; padding: 2px 0; font-size: 13.5px; }
.cr-qrow.head { font-family: var(--display); font-size: 10.5px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--faint); }
.cr-qrow .num { text-align: right; font-variant-numeric: tabular-nums; }
.cr-field .cr-food { max-width: 250px; }
/* (whole numbers everywhere on the Crafting tab: room for them, and the ones in boxes in the middle of their box) */
.cr-num, .cr-total .cr-num { text-align: center; }
.cr-num::placeholder { text-align: center; }
.cr-step { grid-template-columns: minmax(0, 1.5fr) 132px minmax(0, 1.1fr) 196px 96px; }
.cr-crow { grid-template-columns: minmax(0, 1fr) 92px 96px; }
.cr-row { grid-template-columns: 38px minmax(0, 1.5fr) minmax(0, 1fr) 96px minmax(0, 1fr) 100px 64px 100px 70px; }
.cr-qrow { grid-template-columns: minmax(0, 1fr) 60px 100px; }
.cr-how .cr-num { max-width: 150px; }
.cr-focus span { text-align: center; }
/* ---- tick boxes, everywhere on the site: a clear box, filled gold with a dark tick when it's ticked ---- */
input[type="checkbox"] { -webkit-appearance: none; appearance: none; flex: none; position: relative; width: 20px; height: 20px; margin: 0; vertical-align: middle; cursor: pointer;
  border: 2px solid var(--muted); border-radius: 5px; background: var(--bg); transition: background 0.12s, border-color 0.12s; }
input[type="checkbox"]:hover { border-color: var(--accent); }
input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
input[type="checkbox"]:checked::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid var(--accent-ink); border-width: 0 3px 3px 0;
  transform: rotate(45deg); }
input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type="checkbox"]:disabled { opacity: 0.45; cursor: default; }
.cr-carry > div { display: flex; gap: 6px; align-items: center; }
.cr-load { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; font-size: 14px; color: var(--muted); }
.cr-load b { color: var(--text); } .cr-load.over b, .cr-load.over i { color: var(--bad); font-style: normal; }
.cr-load.over .cr-have-bar::-webkit-progress-value { background: var(--bad); } .cr-load.over .cr-have-bar::-moz-progress-bar { background: var(--bad); }
/* (a full trip: what can be carried, the pie for it, and the button) */
.cr-run { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 16px; padding: 10px 14px; border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 9%, var(--panel)); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); }
.cr-run-h { align-self: center; font-family: var(--display); font-size: 15px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent); }
.cr-run .cr-num { width: 110px; }
.cr-run-can { align-self: center; font-size: 14px; color: var(--muted); } .cr-run-can b { color: var(--text); font-size: 16px; }
.cr-run-go { align-self: center; border: 0; border-radius: 8px; padding: 8px 18px; font-family: var(--display); font-size: 13.5px; letter-spacing: 0.8px; font-weight: 700; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); }
.cr-run-go:hover { filter: brightness(1.08); } .cr-run-go[disabled] { opacity: 0.4; cursor: default; }
.cr-run-now { align-self: center; margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.cr-run-now.over { color: var(--bad); }
.cr-run-now.over .cr-have-bar::-webkit-progress-value { background: var(--bad); } .cr-run-now.over .cr-have-bar::-moz-progress-bar { background: var(--bad); }
/* ---- what's used on the site (static/usage.js): the admin's own page ---- */
.us { max-width: 1100px; margin: 0 auto; padding: 22px 18px 40px; display: grid; gap: 16px; align-content: start; }
.us-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 16px; }
.us-panel header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.us-panel h2 { margin: 0; font-family: var(--display); font-size: 17px; letter-spacing: 1px; color: var(--accent); }
.us-here { margin-left: auto; color: var(--muted); font-size: 14px; }
.us-table { margin-top: 10px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.us-row, .us-qrow { display: grid; gap: 12px; align-items: center; padding: 7px 12px; border-top: 1px solid var(--line); font-size: 14.5px; }
.us-row { grid-template-columns: minmax(0, 1fr) 70px 80px 70px 70px 112px; }
.us-qrow { grid-template-columns: minmax(0, 1fr) 70px repeat(5, 96px); }
.us-row.head, .us-qrow.head { border-top: 0; background: var(--panel-2); font-family: var(--display); font-size: 11px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--faint); }
.us-row .num, .us-qrow .num { text-align: right; font-variant-numeric: tabular-nums; }
.us-row .strong, .us-qrow .strong { font-weight: 700; color: var(--accent); }
.us-qrow .num i { display: block; font-style: normal; font-size: 12px; color: var(--faint); }
.us-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.us-tile { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); }
.us-tile span { font-family: var(--display); font-size: 11px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--faint); }
.us-tile b { font-family: var(--cmd); font-size: 22px; color: var(--accent); } .us-tile i { font-style: normal; font-size: 12.5px; color: var(--muted); }
.us-srow { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(6, minmax(0, 1fr)); gap: 12px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 14.5px; }
.us-srow.head { border-top: 0; background: var(--panel-2); font-family: var(--display); font-size: 11px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--faint); }
.us-srow .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; } .us-srow .strong { font-weight: 700; color: var(--accent); }
.us-srow .num i { display: block; font-style: normal; font-size: 12px; color: var(--faint); }
@media (max-width: 760px) { .us-srow { grid-template-columns: repeat(3, minmax(0, 1fr)); } .us-srow > span:first-child { grid-column: 1 / -1; } }
.us-vrow { display: grid; grid-template-columns: minmax(0, 1.2fr) 80px 110px minmax(0, 1.4fr); gap: 12px; align-items: center; padding: 7px 12px; border-top: 1px solid var(--line); font-size: 14.5px; }
.us-vrow.head { background: var(--panel-2); font-family: var(--display); font-size: 11px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--faint); }
.us-vrow i { display: block; font-style: normal; font-size: 12px; color: var(--faint); } .us-vrow .num { text-align: right; font-variant-numeric: tabular-nums; }
.us-vrow .strong.good { color: var(--good); } .us-vrow .strong.bad { color: var(--bad); }
@media (max-width: 760px) { .us-vrow { grid-template-columns: minmax(0, 1fr) 70px; } .us-vrow > span:nth-child(n+3) { display: none; } }
.us-in-add { display: flex; gap: 8px; margin-top: 10px; max-width: 420px; } .us-in-said p { margin: 6px 0 0; color: var(--bad); }
.us-inrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 12px; border-top: 1px solid var(--line); font-size: 14.5px; }
.us-inrow:first-child { border-top: 0; } .us-inrow i { display: block; font-style: normal; font-size: 12px; color: var(--faint); }
/* The hive: the picture, and each worker set into its column of it (places in percent of the picture) */
.hv { max-width: 1100px; padding-bottom: 0; }
.hv-stage { position: relative; width: 100%; max-width: 900px; margin: 0 auto; aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-strong); container-type: inline-size; }
.hv-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* (a chamber holds two workers, one above the other) */
.hv-ch { position: absolute; display: grid; grid-template-rows: 1fr 1fr; gap: 0.5cqw; }
.hv-box { position: absolute; }
.hv-col, .hv-box { display: grid; align-content: center; justify-items: center; gap: 0.35cqw; text-align: center; color: #eaf6ff; text-shadow: 0 1px 3px #000, 0 0 8px #000; min-height: 0; }
.hv-col { padding: 0.5cqw; border-radius: 1.1cqw; background: rgba(4, 10, 24, 0.66); border: 1px solid rgba(255, 196, 90, 0.55); }
.hv-ch.c1 { left: 15.6%; width: 8.7%; top: 11%; height: 23.3%; } .hv-ch.c2 { left: 75.7%; width: 8.7%; top: 11%; height: 23.3%; }
.hv-ch.c3 { left: 3%; width: 8.2%; top: 30.5%; height: 22.8%; } .hv-ch.c4 { left: 88.8%; width: 8.2%; top: 30.5%; height: 22.8%; }
.hv-ch.c5 { left: 15.7%; width: 8.8%; top: 58.5%; height: 27%; } .hv-ch.c6 { left: 75.5%; width: 9%; top: 58.5%; height: 27%; }
.hv-col b { font-family: var(--display); font-size: 1.22cqw; letter-spacing: 0; color: #ffd98a; line-height: 1.1; }
.hv-col i { font-style: normal; font-size: 1.1cqw; color: #bfe3ff; line-height: 1.1; } .hv-col em { font-style: normal; font-size: 1.05cqw; color: #fff; line-height: 1.1; }
.hv-dot { width: 1.2cqw; height: 1.2cqw; border-radius: 50%; background: #4a5a70; box-shadow: 0 0 0 1px #000; }
.hv-col.awake { border-color: #ffc45a; box-shadow: 0 0 2.2cqw rgba(255, 190, 80, 0.7), inset 0 0 1.6cqw rgba(255, 190, 80, 0.25); animation: hv-glow 2.4s ease-in-out infinite; }
.hv-col.awake .hv-dot { background: #6dff9b; box-shadow: 0 0 1.4cqw #6dff9b; animation: hv-blink 1.2s ease-in-out infinite; }
.hv-col.asleep b { color: #9fb2c9; } .hv-col.empty { background: rgba(4, 10, 24, 0.4); border-style: dashed; border-color: rgba(120, 190, 255, 0.4); } .hv-col.empty b { color: #8fa4bd; } .hv-col.empty i { font-size: 1cqw; }
.hv-box { left: 36%; width: 28%; padding: 0.8cqw 1cqw; border-radius: 1.2cqw; background: rgba(3, 8, 20, 0.84); border: 1px solid rgba(120, 190, 255, 0.45); box-shadow: 0 0 2cqw rgba(60, 140, 255, 0.35); }
.hv-box.proc { top: 9.2%; left: 35.5%; width: 29%; height: 9.8%; } .hv-box.brain { top: 51.5%; background: rgba(20, 8, 0, 0.6); border-color: rgba(255, 196, 90, 0.4); box-shadow: 0 0 2cqw rgba(255, 170, 60, 0.3); } .hv-box.mem { top: 76.4%; left: 36.5%; width: 27%; height: 9.8%; }
.hv-box b { font-family: var(--cmd, var(--display)); font-size: 2.2cqw; color: #fff; } .hv-box.brain b { font-size: 3.6cqw; color: #ffe2a6; } .hv-box i { font-style: normal; font-size: 1.25cqw; color: #cfe8ff; }
.hv-two { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; margin-top: 10px; } .hv-two h3 { margin: 0 0 8px; font-size: 14px; color: var(--accent); }
.hv-hours { width: 100%; height: auto; background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; } .hv-bar { fill: var(--bad); } .hv-tick { fill: var(--faint); font-size: 10px; }
.hv-lost { display: grid; grid-template-columns: 30px minmax(0, 1fr) 60px; gap: 10px; align-items: center; padding: 5px 10px; border-top: 1px solid var(--line); font-size: 14px; }
.hv-lost.two { grid-template-columns: minmax(0, 1fr) 60px; } .hv-two h3.gap { margin-top: 14px; } .hv-two { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); }
.hv-lost:first-child { border-top: 0; } .hv-lost img { width: 30px; height: 30px; } .hv-lost i { display: block; font-style: normal; font-size: 12px; color: var(--faint); } .hv-lost .num { text-align: right; font-weight: 700; color: var(--accent); }
@media (max-width: 760px) { .hv-two { grid-template-columns: 1fr; } }
.hv-brow { display: grid; grid-template-columns: minmax(0, 1fr) 60px 70px 90px 100px; gap: 12px; padding: 7px 12px; border-top: 1px solid var(--line); font-size: 14.5px; }
.hv-brow.head { border-top: 0; background: var(--panel-2); font-family: var(--display); font-size: 11px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--faint); } .hv-brow .num { text-align: right; }
.hv-pipe { width: 6px; height: 26px; margin: -16px auto 0; border-radius: 3px; background: linear-gradient(#ffb347, #49b6ff); box-shadow: 0 0 14px #49b6ff; }
.hv-out { max-width: 900px; margin: 0 auto; padding: 14px 16px 16px; border-radius: 18px; color: #eaf6ff; border: 1px solid rgba(80, 220, 190, 0.55);
  background: radial-gradient(120% 140% at 50% 0%, rgba(20, 90, 110, 0.55), rgba(3, 8, 20, 0.96) 62%); box-shadow: 0 0 26px rgba(40, 200, 170, 0.28), inset 0 0 30px rgba(40, 160, 220, 0.16); }
.hv-out header { display: grid; justify-items: center; gap: 2px; margin-bottom: 12px; } .hv-out h2 { margin: 0; font-family: var(--display); font-size: 17px; letter-spacing: 3px; color: #fff; text-shadow: 0 0 10px #39d8c0; }
.hv-out header span { font-size: 10.5px; letter-spacing: 3px; color: #8fe9dc; }
.hv-outs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.hv-o { display: grid; gap: 3px; padding: 10px 12px; border-radius: 12px; background: rgba(4, 14, 28, 0.78); border: 1px solid rgba(80, 220, 190, 0.35); }
.hv-o span { font-family: var(--display); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: #8fe9dc; } .hv-o b { font-family: var(--cmd, var(--display)); font-size: 21px; color: #fff; }
.hv-o i { font-style: normal; font-size: 12.5px; color: #bcd6e6; } @media (max-width: 760px) { .hv-outs { grid-template-columns: 1fr 1fr; } }
@keyframes hv-glow { 50% { box-shadow: 0 0 3.4cqw rgba(255, 190, 80, 0.95), inset 0 0 2cqw rgba(255, 190, 80, 0.35); } }
@keyframes hv-blink { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .hv-col.awake, .hv-col.awake .hv-dot { animation: none; } }
.hv-row { display: grid; grid-template-columns: 110px minmax(0, 1.3fr) 100px minmax(0, 1.5fr) 60px; gap: 12px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 14.5px; }
.hv-row.head { border-top: 0; background: var(--panel-2); font-family: var(--display); font-size: 11px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--faint); }
.hv-row.awake b { color: var(--accent); } .hv-row .num { text-align: right; }
@media (max-width: 760px) { .hv-row { grid-template-columns: 1fr 1fr; } }
.us-prow, .us-mrow, .us-nrow { display: grid; gap: 12px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 14.5px; }
.us-prow { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) 150px; } .us-prow i { display: block; font-style: normal; font-size: 12.5px; color: var(--muted); }
.us-mrow { grid-template-columns: minmax(0, 1fr) 80px 70px 160px; } .us-nrow { grid-template-columns: 100px 80px repeat(3, minmax(0, 1fr)) 150px; }
.us-prow.head, .us-mrow.head, .us-nrow.head { border-top: 0; background: var(--panel-2); font-family: var(--display); font-size: 11px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--faint); }
.us-prow .strong, .us-mrow .strong { font-weight: 700; color: var(--accent); } .us-mrow .num, .us-nrow .num { text-align: right; font-variant-numeric: tabular-nums; }
.us-bar { appearance: none; -webkit-appearance: none; border: 0; width: 100%; height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.us-bar::-webkit-progress-bar { background: var(--line); } .us-bar::-webkit-progress-value { background: var(--accent); } .us-bar::-moz-progress-bar { background: var(--accent); }
@media (max-width: 760px) { .us-tiles { grid-template-columns: 1fr 1fr; } .us-prow, .us-nrow { grid-template-columns: 1fr 1fr; } .us-mrow { grid-template-columns: minmax(0, 1fr) 60px 50px; } .us-mrow .us-bar { display: none; } }
.us-what { display: grid; gap: 4px; }
.us-what progress, .us-day { appearance: none; -webkit-appearance: none; border: 0; background: var(--line); border-radius: 999px; overflow: hidden; }
.us-what progress { width: 100%; height: 5px; }
.us-what progress::-webkit-progress-bar, .us-day::-webkit-progress-bar { background: var(--line); }
.us-what progress::-webkit-progress-value, .us-day::-webkit-progress-value { background: var(--accent); }
.us-what progress::-moz-progress-bar, .us-day::-moz-progress-bar { background: var(--accent); }
.us-week { display: flex; gap: 3px; align-items: flex-end; }
.us-day { width: 12px; height: 26px; border-radius: 3px; writing-mode: vertical-lr; direction: rtl; }
@media (max-width: 800px) { .us-row { grid-template-columns: minmax(0, 1fr) 60px 60px; } .us-row > :nth-child(3), .us-row > :nth-child(4), .us-row > :nth-child(6) { display: none; }
  .us-qrow { grid-template-columns: minmax(0, 1fr) 56px repeat(5, 62px); font-size: 13px; } }
.cr-pies { display: flex; gap: 6px; }
.cr-pie { display: grid; justify-items: center; gap: 0; min-width: 52px; padding: 2px 4px 3px; border-radius: 8px; border: 2px solid var(--line-strong); background: var(--panel-2); color: var(--muted);
  cursor: pointer; }
.cr-pie img { width: 40px; height: 40px; object-fit: contain; }
.cr-pie b { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.cr-pie.none { align-content: center; min-height: 62px; }
.cr-pie:hover { border-color: var(--accent); color: var(--text); }
.cr-pie.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 22%, var(--panel-2)); color: var(--accent); }
.cr-step.head .cr-focus-all { font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--faint); } .cr-step.head .cr-focus-all.on { color: var(--accent); }
/* ---- the front page, about the tools and the game (not one guild): the headline, the servers, the day ---- */
.fp-hero { max-width: 1180px; margin: 0 auto; padding: 34px 24px 6px; text-align: center; }
.fp-shield { display: block; width: 92px; height: auto; margin: 0 auto 12px; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.5)); }
.fp-kicker { margin: 0 0 10px; font-family: var(--display); font-size: 13px; letter-spacing: 3px; text-transform: uppercase; color: var(--accent); }
.fp-hero h1 { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(26px, 3.4vw, 42px); line-height: 1.12; letter-spacing: 0.8px; }
.fp-lead { margin: 12px auto 0; max-width: 40em; font-family: var(--serif); font-size: 20px; line-height: 1.45; color: var(--muted); }
.fp-here { justify-content: center; padding: 14px 0 0; max-width: none; }
.fp-servers { max-width: 1180px; width: 100%; box-sizing: border-box; margin: 0 auto; padding: 16px 24px 4px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.fp-server { display: grid; grid-template-columns: 12px 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.fp-server b { font-family: var(--display); font-size: 18px; letter-spacing: 1.5px; text-transform: uppercase; }
.fp-says { font-size: 14px; font-weight: 600; color: var(--good); } .fp-server.down .fp-says { color: var(--bad); } .fp-server.unknown .fp-says { color: var(--faint); }
.fp-server em { grid-column: 2 / -1; font-style: normal; font-size: 13px; color: var(--faint); }
.fp-server .dot:not(.good):not(.bad) { background: var(--line-strong); }
.fp-side-top { display: grid; gap: 16px; margin-bottom: 16px; }
.fp-side-top:empty { display: none; }
.fp-gold .gold-now .v { font-size: 28px; } .fp-gold .spark { height: 46px; }
.fp-eco { display: grid; grid-template-columns: 160px 1fr; gap: 1px 14px; padding: 9px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.fp-eco:first-of-type { border-top: 0; }
.fp-eco span { grid-row: span 2; align-self: center; font-size: 13px; color: var(--faint); } .fp-eco b { font-size: 15.5px; } .fp-eco em { font-style: normal; font-size: 13.5px; color: var(--good); }
.fp-eco:hover b { color: var(--accent); }
.fp-news a.update { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-decoration: none; color: inherit; }
@media (max-width: 760px) { .fp-servers { grid-template-columns: 1fr; } .fp-eco { grid-template-columns: 1fr; } .fp-eco span { grid-row: auto; } }
.fp-more { margin: 8px 0 0; }
.fp-economy .quiet-link { display: inline-block; margin-top: 8px; }
/* ---- the bar on top of every page: each way in a picture, a name and a line on what it leads to; the search ---- */
.topbar:has(.nav.rich) .brand { display: none; }
.topbar:has(.nav.rich) { gap: 12px; padding: 9px 20px; }
.nav.rich { gap: 7px; margin-left: 0; flex: 0 1 auto; min-width: 0; }
.nav.rich a { gap: 9px; padding: 6px 13px 6px 8px; border-radius: 12px; }
.nav.rich a img { width: 32px; height: 32px; object-fit: contain; flex: none; }
.nav-caret { width: 18px; height: 18px; margin: 0 -4px 0 2px; flex: none; position: relative; border-radius: 5px; }
.nav-caret::after { content: ''; position: absolute; left: 5px; top: 4px; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); opacity: 0.7; }
.nav a[aria-expanded="true"] { border-color: var(--accent); }
.nav-sub { position: fixed; z-index: 60; min-width: 270px; padding: 6px; display: grid; gap: 2px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(242, 210, 140, 0.08); }
.nav-sub a { display: flex; align-items: center; gap: 10px; padding: 7px 12px 7px 8px; border-radius: 9px; color: var(--text); text-decoration: none; border: 1px solid transparent; }
.nav-sub a:hover, .nav-sub a:focus { background: var(--panel-2); border-color: var(--accent); outline: none; }
.nav-sub a img { width: 30px; height: 30px; object-fit: contain; flex: none; }
.nav-sub a span { display: grid; line-height: 1.2; } .nav-sub a b { font-family: var(--display); font-size: 14px; letter-spacing: 0.6px; } .nav-sub a i { font-style: normal; font-size: 12.5px; color: var(--faint); }
.nav.rich a b { display: block; font-size: 13px; letter-spacing: 0.8px; text-transform: uppercase; }
.nav.rich a i { display: block; font-family: var(--font); font-style: normal; font-weight: 400; font-size: 11.5px; letter-spacing: 0; color: var(--muted); }
.nav.rich a.on i { color: var(--accent-ink); opacity: 0.75; }
.nav.rich a.backroom { padding: 10px 14px; }
.nav-region { flex: none; font: inherit; font-size: 13.5px; padding: 6px 8px; border-radius: 8px; color: var(--text); background: var(--bg); border: 1px solid var(--line); cursor: pointer; }
.nav-region:hover, .nav-region:focus { border-color: var(--accent); outline: none; }
.top-find { position: relative; flex: 1 1 200px; min-width: 150px; max-width: 320px; }
.top-find-box { position: relative; }
.top-find-box input { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; color: var(--text); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 999px; padding: 9px 16px 9px 38px; }
.top-find-box input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.lens, .glass i { position: relative; display: block; width: 13px; height: 13px; border: 2px solid var(--muted); border-radius: 50%; }
.lens::after, .glass i::after { content: ""; position: absolute; left: 10px; top: 10px; width: 7px; height: 2px; background: var(--muted); border-radius: 2px; transform: rotate(45deg); transform-origin: left center; }
.lens { position: absolute; left: 14px; top: 50%; margin-top: -8px; pointer-events: none; }
.glass { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0 3px 3px 0; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--panel-2); cursor: pointer; }
.glass:hover, .top-find.open .glass { border-color: var(--accent); } .glass:hover i, .top-find.open .glass i { border-color: var(--accent); }
.glass:hover i::after, .top-find.open .glass i::after { background: var(--accent); }
.top-find-hits { position: absolute; z-index: 9; left: 0; right: 0; top: calc(100% + 6px); min-width: 300px; max-height: 70vh; overflow: auto; display: grid; padding: 6px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line-strong); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); }
.top-find-hits:empty { display: none; }
.top-hit-h { font-family: var(--display); font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--faint); padding: 6px 8px 2px; }
.top-hit { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14.5px; }
.top-hit:hover, .top-hit:focus { background: var(--panel-2); color: var(--accent); text-decoration: none; }
.top-hit img { width: 30px; height: 30px; } .top-hit b { font-weight: 600; } .top-hit i { font-style: normal; font-size: 12.5px; color: var(--faint); margin-left: auto; }
.top-hit-none { padding: 10px; color: var(--muted); font-size: 14px; }
/* (what each button leads to is said where there's room for it; the search is a glass until there's room for a box) */
@media (max-width: 2150px) {
  .top-find { flex: none; min-width: 0; max-width: none; }
  .glass { display: inline-flex; }
  .top-find-box { display: none; position: absolute; z-index: 8; right: 0; top: calc(100% + 10px); width: min(440px, 92vw); padding: 10px; border-radius: 14px;
    background: var(--panel-2); border: 1px solid var(--accent); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55); }
  .top-find.open .top-find-box { display: block; }
  .top-find-box .lens { left: 24px; }
  .top-find-box input { border-radius: 10px; font-size: 16px; padding-top: 11px; padding-bottom: 11px; }
  .top-find-hits { position: static; margin-top: 8px; border: 0; box-shadow: none; padding: 0; background: none; min-width: 0; }
}
@media (max-width: 1900px) { .nav.rich a i { display: none; } .nav.rich a { padding: 6px 11px 6px 7px; } .nav.rich a img { width: 28px; height: 28px; } }
@media (max-width: 1500px) { .nav.rich { gap: 5px; } .nav.rich a b { font-size: 12px; letter-spacing: 0.4px; } .nav.rich a { padding: 5px 9px 5px 6px; gap: 6px; } .nav.rich a img { width: 24px; height: 24px; } }
@media (max-width: 1180px) { .nav.rich { overflow-x: auto; scrollbar-width: none; } .nav.rich a img { display: none; } .nav.rich a { padding: 7px 10px; } }
.nav.rich { overflow-x: auto; scrollbar-width: none; } .nav.rich::-webkit-scrollbar { display: none; }   /* (a bar too full slides: nothing sits on top of anything) */
.nav.rich a { flex: none; }
@media (max-width: 2150px) { .top-find-box .lens { top: 25px; margin-top: 0; } }
/* (the front page's cards in the dress of the page that was chosen for it: two columns, the right one roomy; headings in
   gold capitals with no picture before them; the gold price as bars) */
.front-page main.front { max-width: 1240px; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); padding-top: 14px; }
.front-page .fp-hero, .front-page .fp-servers { max-width: 1240px; }
.front-page .guild-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
.front-page .card { border-radius: 16px; padding: 18px 20px; }
.front-page .card-head { margin-bottom: 12px; align-items: baseline; }
.front-page .card-head .icon { display: none; }
.front-page .card-head h2 { font-size: 14.5px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--accent); }
.front-page .card-head .tag { font-size: 13px; }
.front-page .side { gap: 20px; display: grid; }
.front-page .fp-side-top { gap: 20px; margin-bottom: 0; }
.fp-bars { display: flex; align-items: flex-end; gap: 3px; height: 64px; margin: 10px 0 6px; }
.fp-bars i { flex: 1; min-height: 6px; border-radius: 2px 2px 0 0; background: linear-gradient(var(--accent), color-mix(in srgb, var(--accent) 45%, var(--panel))); }
.fp-gold .gold-now .v { font-size: 30px; }
.front-page footer { flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 22px; }
.fp-legal { flex-basis: 100%; font-size: 12.5px; color: var(--faint); }
@media (max-width: 1000px) { .front-page main.front { grid-template-columns: minmax(0, 1fr); } }
/* (the front page: a warm glow behind the top right, as on the page it was drawn from; the bar's few extra buttons and
   the search at its right end) */
body.front-page { background: radial-gradient(1200px 620px at 72% -8%, #3a2a12 0%, transparent 62%), var(--bg); }
.nav-dash.backroom:not(.on) { background: #0e0a07; border-color: #3b2c1c; color: #b49a74; }
.nav-dash.backroom:not(.on):hover { border-color: var(--accent); color: var(--accent); }
.nav-dash .lock { width: 13px; height: 13px; flex: none; }
.cr-focus.over { display: block; cursor: default; color: var(--faint); font-size: 12.5px; } .cr-focus.over i { display: block; font-style: normal; color: var(--warn); }
.cr-focus span i.cr-enough { color: var(--warn); }
.fp-companion { background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 14%, var(--panel)), var(--panel) 60%); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.fp-companion p { margin: 0 0 8px; font-family: var(--serif); font-size: 18px; color: var(--text); }
.fp-companion ul { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; font-size: 14.5px; color: var(--muted); }
.fp-companion li::before { content: "◆"; color: var(--accent); font-size: 8px; margin-right: 9px; vertical-align: 2px; }
.kb-grid.solo { grid-template-columns: minmax(0, 1fr); max-width: 980px; margin-left: auto; margin-right: auto; }
