/* 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: #17120c;
  --panel: #221a11;
  --panel-2: #2c2217;
  --line: #3a2e1f;
  --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: 26px; height: 26px; border-radius: 7px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 14px; }
.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); }

.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: 88px; height: 88px; border-radius: 22px; background: var(--panel-2); border: 1px solid var(--line-strong); 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%; }
.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; }
.side { position: sticky; top: 76px; }

.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 .item { margin: 14px 0 10px; }
.note .item-label { display: flex; align-items: baseline; gap: 14px; margin-bottom: 2px; }
.note .item-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; }
  .side { position: static; }
}
@media (max-width: 720px) {
  .nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; }
  .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; }

.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; }
  .krow-top .arrow { display: none; }
}
.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: 52px; height: 52px; border-radius: 12px; font-size: 26px; }
.signin-note { color: var(--warn) !important; }
.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; }

