/* SlamYourJam portal: shared styles. Dark only, matches status page. */
:root {
  --fg-rgb: 255 255 255; --bg-rgb: 13 17 23; --card-rgb: 22 32 46; --accent-rgb: 92 221 139;
  --bg: #0d1117;
  --bg-glow: #1c2b3d;
  --card: rgb(var(--card-rgb) / 0.75);
  --card-solid: #16202e;
  --inset: rgb(var(--bg-rgb) / 0.6);
  --line: rgb(var(--fg-rgb) / 0.07);
  --line-strong: rgb(var(--fg-rgb) / 0.14);
  --text: #e6edf3;
  --text-2: #b9c4cf;
  --muted: #9aa7b4;
  --faint: #7d8a97;
  --accent: #5cdd8b;
  --accent-hi: #8be9ad;
  --accent-soft: rgb(var(--accent-rgb) / 0.10);
  --good: #0ca30c;
  --good-text: #6fdc6f;
  --warn: #fab219;
  --warn-text: #f5c451;
  --bad: #e5484d;
  --bad-text: #ff8a8d;
  --violet: #9085e9;
  --gold: #e0a53a;
  --radius: 16px;
  --font: 'IBM Plex Sans', system-ui, sans-serif;
  --display: 'Chakra Petch', 'IBM Plex Sans', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(1100px 520px at 50% -8%, var(--bg-glow) 0%, var(--bg) 62%) fixed, var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.wrap { max-width: none; margin: 0 auto; padding: 28px clamp(16px, 2.5vw, 64px) 48px; display: flex; flex-direction: column; gap: 28px; }
@media (max-width: 700px) { .wrap { padding: 20px 16px 40px; gap: 22px; } }

/* header */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: 0.5px; line-height: 1.1; }
.brand-sub { font-size: 13px; color: var(--muted); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip { padding: 10px 14px; border-radius: 10px; border: 1px solid rgb(var(--fg-rgb) / 0.08); background: rgb(var(--card-rgb) / 0.7); color: var(--text); font-size: 14px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.status { border-color: rgb(var(--accent-rgb) / 0.35); background: var(--accent-soft); color: var(--accent-hi); }
.chip.status.warn { border-color: rgba(250,178,25,0.4); background: rgba(250,178,25,0.10); color: var(--warn-text); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; flex-shrink: 0; }
.lang { display: flex; padding: 3px; border-radius: 10px; border: 1px solid rgb(var(--fg-rgb) / 0.08); background: rgb(var(--card-rgb) / 0.7); }
.lang button { min-height: 36px; min-width: 44px; padding: 0 10px; border: none; border-radius: 7px; background: transparent; color: var(--text-2); font-weight: 600; font-size: 13px; letter-spacing: 0.5px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--bg); }

/* layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
@media (min-width: 1400px) { .layout { grid-template-columns: minmax(0, 1fr) 460px; } }
@media (min-width: 2200px) { .layout { grid-template-columns: minmax(0, 1fr) 560px; } }
.col { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.section { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
h1, h2, h3 { margin: 0; }
.h2 { font-family: var(--display); font-weight: 600; font-size: 22px; }
.note { font-size: 13px; color: var(--muted); }
.pill-note { font-size: 12px; color: var(--muted); border: 1px dashed rgb(var(--fg-rgb) / 0.18); border-radius: 999px; padding: 3px 10px; }
.card { border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); padding: 20px; min-width: 0; }
.grid { display: grid; gap: 16px; }
.grid.servers { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid.tiles { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid.charts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.col { container-type: inline-size; }
@container (min-width: 1240px) { .grid.charts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@container (max-width: 640px) { .grid.charts { grid-template-columns: minmax(0, 1fr); } }
.grid.extras { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid.finds { grid-template-columns: 1fr; }
@media (min-width: 700px) and (max-width: 1399px) { .grid.finds { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } }

/* buttons */
.btn { min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font-weight: 500; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; text-decoration: none; }
.btn:hover { color: var(--text); border-color: rgb(var(--fg-rgb) / 0.28); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }
.btn.primary:hover { background: var(--accent-hi); color: var(--bg); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 13px; font-weight: 600; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }

/* hero */
.hero { border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(135deg, rgb(var(--accent-rgb) / 0.10) 0%, rgb(var(--card-rgb) / 0.85) 45%); padding: 28px; display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between; }
.kicker { font-size: 12px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; color: var(--accent); }
.hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; }
.hero-line { color: var(--text-2); font-size: 16px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.hero-main { display: flex; flex-direction: column; gap: 10px; flex: 999 1 420px; min-width: 0; }
.count { display: flex; gap: 12px; flex: 1 1 300px; justify-content: flex-end; flex-wrap: wrap; }
.count div { min-width: 88px; padding: 14px 12px; border-radius: 12px; background: var(--inset); border: 1px solid var(--line); text-align: center; }
.count b { display: block; font-family: var(--mono); font-size: 32px; font-weight: 500; }
.count span { font-size: 12px; color: var(--muted); }
.live-badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--accent-hi); background: var(--accent-soft); border-radius: 999px; padding: 4px 12px; }

/* server cards */
.srv { display: flex; flex-direction: column; gap: 14px; }
.srv-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.srv-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.badge { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: 16px; flex-shrink: 0; }
.srv-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: -4px; }
.srv h3 { font-size: 17px; font-weight: 600; }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.state.online { color: var(--accent-hi); background: rgb(var(--accent-rgb) / 0.10); }
.state.offline { color: var(--muted); background: rgb(var(--fg-rgb) / 0.06); }
.state.crashed { color: var(--bad-text); background: rgba(229,72,77,0.14); }
.state.unknown { color: var(--faint); background: rgb(var(--fg-rgb) / 0.04); }
.players { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.players b { font-family: var(--mono); font-size: 28px; font-weight: 500; }
.addr { display: flex; align-items: center; gap: 8px; border-radius: 10px; background: rgb(var(--bg-rgb) / 0.65); border: 1px solid rgb(var(--fg-rgb) / 0.06); padding: 6px 6px 6px 12px; }
.addr code { font-family: var(--mono); font-size: 13px; color: var(--text-2); flex-grow: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy { min-height: 36px; padding: 0 12px; border-radius: 8px; border: none; background: rgb(var(--fg-rgb) / 0.08); color: var(--text); font-weight: 600; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.copy:hover { color: var(--text); background: rgb(var(--fg-rgb) / 0.14); }
.copy.done { background: var(--accent); color: var(--bg); }

/* tiles */
.tile { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; }
.tile .v { font-family: var(--mono); font-size: 30px; font-weight: 500; line-height: 1.1; }
.meter { height: 6px; border-radius: 3px; background: rgb(var(--fg-rgb) / 0.08); overflow: hidden; }
.meter i { display: block; height: 6px; border-radius: 3px; }

/* charts */
.chart { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.chart figcaption { display: flex; flex-direction: column; gap: 2px; }
.chart-title { font-weight: 600; font-size: 16px; }
.readout { min-height: 22px; font-size: 13px; color: var(--text); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.bars { position: relative; height: 150px; border-bottom: 1px solid var(--line-strong); display: flex; align-items: flex-end; justify-content: space-around; }
.bars .gl { position: absolute; left: 0; right: 0; border-top: 1px dashed rgb(var(--fg-rgb) / 0.07); }
.bars .mx { position: absolute; right: 0; top: -9px; font-size: 11px; color: var(--faint); }
.bars button { height: 100%; width: 40px; padding: 0; border: none; background: transparent; border-radius: 6px; display: flex; align-items: flex-end; justify-content: center; gap: 2px; cursor: default; position: relative; }
.bars button:hover, .bars button:focus-visible, .bars button.on { background: rgb(var(--fg-rgb) / 0.06); }
.bars button span { width: 11px; border-radius: 4px 4px 0 0; display: block; }
.axis { display: flex; justify-content: space-around; font-size: 12px; color: var(--muted); }
.axis span { width: 40px; text-align: center; }
.axis.ends { justify-content: space-between; }
.axis.ends span { width: auto; }
.line { display: flex; flex-direction: column; gap: 4px; }
.line-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.line-box { position: relative; height: 64px; border-bottom: 1px solid var(--line-strong); }
.line-box svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.line-box .cross { position: absolute; top: 0; bottom: 0; width: 1px; background: rgb(var(--fg-rgb) / 0.45); pointer-events: none; }
.line-box .hit { position: absolute; inset: 0; display: flex; }
.line-box .hit div { flex: 1 1 0; }
.up-row { display: flex; flex-direction: column; gap: 5px; }
.up-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; }
.up-head span:first-child { min-width: 0; }
.up-head span:last-child { font-family: var(--mono); color: var(--text-2); white-space: nowrap; flex-shrink: 0; }
.cells { display: flex; gap: 2px; height: 18px; }
.cells span { flex: 1 1 0; border-radius: 3px; display: block; }
.bk { position: relative; height: 110px; border-bottom: 1px solid var(--line-strong); display: flex; align-items: flex-end; gap: 4px; }
.bk button { flex: 1 1 0; height: 100%; padding: 0; border: none; background: transparent; display: flex; align-items: flex-end; cursor: default; }
.bk button span { width: 100%; border-radius: 4px 4px 0 0; display: block; }

/* extras */
.d20 { display: flex; align-items: center; gap: 20px; }
.d20-face { width: 104px; height: 104px; flex-shrink: 0; position: relative; display: flex; align-items: center; justify-content: center; }
.d20-face svg { position: absolute; inset: 0; }
.d20-face b { position: relative; font-family: var(--display); font-weight: 700; font-size: 30px; margin-top: 10px; }
.list-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 7px 0; border-top: 1px solid rgb(var(--fg-rgb) / 0.06); }
.list-row span:last-child { color: var(--muted); text-align: right; }

/* news, finds, manage */
.news-item { display: flex; gap: 14px; align-items: flex-start; padding-top: 12px; border-top: 1px solid rgb(var(--fg-rgb) / 0.06); }
.news-date { font-family: var(--mono); font-size: 12px; color: var(--muted); min-width: 58px; padding-top: 2px; }
.find { display: flex; flex-direction: column; gap: 8px; color: var(--text); }
.find:hover { color: var(--text); border-color: var(--line-strong); }
.find-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tag { font-size: 11px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; color: var(--bg); background: var(--accent); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.host { font-size: 12px; color: var(--faint); font-family: var(--mono); }
.find-more { border: 1px dashed rgb(var(--fg-rgb) / 0.14); background: transparent; color: var(--muted); }
.mlink { display: flex; align-items: center; justify-content: space-between; padding: 14px; border-radius: 12px; background: rgb(var(--bg-rgb) / 0.55); border: 1px solid rgb(var(--fg-rgb) / 0.06); color: var(--text); }
.mlink:hover { color: var(--text); border-color: var(--line-strong); }
.mlink small { display: block; font-size: 13px; color: var(--muted); }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--faint); padding-top: 8px; border-top: 1px solid rgb(var(--fg-rgb) / 0.06); }

/* forms (termine, admin) */
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 13px; color: var(--muted); }
.input { min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid rgb(var(--fg-rgb) / 0.12); background: rgb(var(--bg-rgb) / 0.7); color: var(--text); }
.input::placeholder { color: var(--faint); }
.status-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; border-radius: 999px; padding: 8px 16px; white-space: nowrap; color: var(--accent-hi); background: rgb(var(--accent-rgb) / 0.12); }
.status-pill.closed { color: var(--warn-text); background: rgba(250,178,25,0.14); }
.vote-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.vote-col { border-radius: 12px; border: 1px solid rgb(var(--fg-rgb) / 0.06); background: rgb(var(--bg-rgb) / 0.55); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.vote-col.best { border-color: rgb(var(--accent-rgb) / 0.45); }
.vote-btns { display: flex; gap: 6px; }
.vote-btns button { flex: 1 1 0; min-height: 44px; border-radius: 8px; border: 1px solid rgb(var(--fg-rgb) / 0.10); background: rgb(var(--fg-rgb) / 0.04); color: var(--muted); font-weight: 700; font-size: 16px; cursor: pointer; }
.vote-btns button[aria-pressed="true"].y { background: rgba(12,163,12,0.30); border-color: var(--good); color: #8ff08f; }
.vote-btns button[aria-pressed="true"].m { background: rgba(250,178,25,0.24); border-color: var(--warn); color: var(--warn-text); }
.vote-btns button[aria-pressed="true"].n { background: rgb(var(--fg-rgb) / 0.10); border-color: rgb(var(--fg-rgb) / 0.35); color: var(--text); }
.vote-btns button:disabled { cursor: not-allowed; opacity: 0.6; }
.ov { overflow-x: auto; }
.ov-grid { display: grid; gap: 6px; min-width: 520px; --namecol: 200px; }
.ov-head { border-radius: 10px 10px 0 0; border: 1px solid transparent; border-bottom: none; background: rgb(var(--bg-rgb) / 0.35); padding: 10px 8px 8px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.ov-head.best { border-color: rgb(var(--accent-rgb) / 0.55); background: rgb(var(--accent-rgb) / 0.08); }
.ov-badge { font-size: 11px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--accent); min-height: 16px; }
.ov-cell { min-height: 38px; border-radius: 8px; font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.ov-cell.yes { background: rgba(12,163,12,0.25); color: var(--good-text); }
.ov-cell.maybe { background: rgba(250,178,25,0.20); color: var(--warn-text); }
.ov-cell.no, .ov-cell.none { background: rgb(var(--fg-rgb) / 0.04); color: #5b6773; }
.ov-cell.hl { box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / 0.35); }
.ov-name { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 0 4px; min-width: 0; }
.ov-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src { font-size: 10px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: #b3abf2; background: rgba(144,133,233,0.16); border-radius: 999px; padding: 1px 6px; flex-shrink: 0; }
.mini-bar { height: 5px; border-radius: 3px; background: rgb(var(--fg-rgb) / 0.08); overflow: hidden; margin-top: 4px; display: flex; }
.mini-bar i { display: block; }
.fixed-banner { border-radius: var(--radius); border: 1px solid rgb(var(--accent-rgb) / 0.45); background: var(--accent-soft); padding: 20px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.msg { font-size: 14px; }
.msg.ok { color: var(--accent-hi); }
.msg.err { color: var(--warn-text); }
.empty { color: var(--muted); font-size: 14px; padding: 8px 0; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line-strong); }
table.t td { padding: 8px; border-bottom: 1px solid rgb(var(--fg-rgb) / 0.05); vertical-align: middle; }
.opt-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: rgb(var(--bg-rgb) / 0.55); border: 1px solid rgb(var(--fg-rgb) / 0.06); flex-wrap: wrap; }
.opt-row.fixed { background: var(--accent-soft); border-color: rgb(var(--accent-rgb) / 0.45); }
.opt-row .grow { flex: 1 1 200px; min-width: 0; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; min-height: 44px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* phones */
@media (max-width: 600px) {
  .grid.tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tile { padding: 14px 16px; }
  .tile .v { font-size: 24px; }
  .ov-grid { min-width: 0; gap: 4px; --namecol: 92px; }
  .ov-head { padding: 8px 2px 6px; }
  .ov-head div { font-size: 12px !important; }
  .ov-cell { min-height: 34px; font-size: 14px; }
  .ov-name { font-size: 13px; }
  .ov-name .src { display: none; }
  .ov-badge { font-size: 9px; letter-spacing: 0; line-height: 1.2; }
  .hero { padding: 22px 20px; }
}

/* server cards: when the card is narrow, show the full address above the buttons */
.srv { container-type: inline-size; }
@container (max-width: 420px) {
  .addr { flex-wrap: wrap; }
  .addr code { white-space: normal; word-break: break-all; flex-basis: 100%; padding: 4px 0; }
}

/* icons (Material Design Icons, as on the old Homepage) */
.ico { flex-shrink: 0; display: inline-block; vertical-align: -0.2em; }
.with-ico { display: flex; align-items: center; gap: 10px; }
.chip .ico { margin-right: 2px; }
.mico { width: 40px; height: 40px; border-radius: 10px; background: rgb(var(--accent-rgb) / 0.08); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.news-link { display: inline-block; margin-top: 4px; font-size: 13.5px; font-weight: 600; color: var(--accent-hi); }

/* 1.10.0: modpacks */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text-2); }
.pill.ok { color: var(--good-text); border-color: rgba(111,220,111,.4); }
.pill.warn { color: var(--warn-text); border-color: rgba(245,196,81,.45); }
.pill.bad { color: var(--bad-text); border-color: rgba(255,138,141,.45); }
.pk-d { font-size: 14px; color: var(--text-2); } .pk-d b { color: var(--text); font-weight: 600; margin-right: 4px; }
.pk-err { white-space: pre-wrap; font-family: var(--mono); font-size: 12px; max-height: 180px; overflow: auto; margin: 6px 0 0; color: var(--bad-text); }
.pk-up { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.pk-prog { display: flex; flex-direction: column; gap: 4px; }
.pk-bar { height: 8px; border-radius: 99px; background: var(--inset); overflow: hidden; border: 1px solid var(--line); }
.pk-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }

/* 1.11.0: admin overview tiles, tabs, toast */
.adm-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.adm-tile { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); border-left: 3px solid var(--accent); min-width: 0; }
.adm-tile:hover { border-color: var(--line-strong); border-left-color: var(--accent); }
.adm-tile.on { background: var(--card-solid); box-shadow: 0 0 0 1px rgb(var(--accent-rgb) / 0.35) inset; }
.adm-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.adm-tile.warn { border-left-color: var(--warn-text); }
.adm-tile.warn .kicker { color: var(--warn-text); }
.adm-tile.bad { border-left-color: var(--bad-text); }
.adm-tile.bad .kicker { color: var(--bad-text); }
.adm-tile.mute { border-left-color: var(--line-strong); }
.adm-tile.mute .kicker { color: var(--muted); }
.adm-tile .note { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-big { font-family: var(--display); font-weight: 700; font-size: 21px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-tabs { position: sticky; top: 0; z-index: 5; display: flex; gap: 4px; overflow-x: auto; padding: 6px; margin: -8px 0 -12px; border-radius: 14px; border: 1px solid var(--line); background: rgb(var(--bg-rgb) / 0.88); backdrop-filter: blur(10px); scrollbar-width: none; }
.adm-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); font: 600 14.5px var(--font); cursor: pointer; }
.adm-tab:hover { color: var(--text); background: rgb(var(--fg-rgb) / 0.04); }
.adm-tab.on { color: var(--bg); background: var(--accent); }
.adm-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; background: rgb(var(--fg-rgb) / 0.10); color: var(--text-2); }
.adm-badge.warn { background: rgba(250,178,25,0.18); color: var(--warn-text); }
.adm-tab.on .adm-badge { background: rgb(var(--bg-rgb) / 0.22); color: var(--bg); }
.adm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.adm-dot.on { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.adm-tab.on .adm-dot { background: var(--bg); box-shadow: none; }
.adm-pane[hidden] { display: none; }
@media (min-width: 1100px) { .adm-pane.layout { grid-template-columns: minmax(0, 1fr) minmax(340px, 0.72fr); } }
@media (min-width: 2200px) { .adm-pane.layout { grid-template-columns: minmax(0, 1fr) 640px; } }
.adm-pane .col { gap: 20px; }
.h2s { font-size: 18px; }
details.adm-more { border-top: 1px solid var(--line); padding-top: 10px; }
details.adm-more > summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--text-2); list-style: none; display: flex; align-items: center; gap: 8px; }
details.adm-more > summary::before { content: '›'; font-size: 18px; line-height: 1; transition: transform .15s; color: var(--muted); }
details.adm-more[open] > summary::before { transform: rotate(90deg); }
details.adm-more[open] > summary { margin-bottom: 12px; }
details.adm-more > *:not(summary) + * { margin-top: 12px; }
.adm-toast { position: fixed; right: 20px; bottom: 20px; z-index: 20; max-width: min(460px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 12px; font-size: 14px; background: var(--card-solid); border: 1px solid rgb(var(--accent-rgb) / 0.45); color: var(--accent-hi); box-shadow: 0 10px 30px rgba(0,0,0,0.45); cursor: pointer; }
.adm-toast.err { border-color: rgba(255,138,141,0.5); color: var(--bad-text); }
@media (max-width: 700px) {
  .adm-tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .adm-tile { padding: 10px 12px; }
  .adm-tile .kicker { font-size: 10.5px; letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .adm-big { font-size: 17px; }
  .adm-tile .note { font-size: 12px; }
  .adm-tab { padding: 0 12px; }
}
.pk-up input[type=file] { min-width: 0; width: 100%; max-width: 100%; }

/* 1.12.0: header navigation bar, settings drawer, folded stats */
.navbar { display: flex; flex-wrap: wrap; align-items: center; padding: 4px; gap: 2px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
.navbar a { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 12px; border-radius: 8px; color: var(--text-2); font-size: 14px; font-weight: 500; }
.navbar a:hover { color: var(--text); background: rgb(var(--fg-rgb) / 0.06); }
.chip.gear { padding: 0; width: 46px; justify-content: center; color: var(--text-2); background: var(--card); border-color: var(--line); }
.chip.gear:hover { color: var(--accent); }
#drawer .dr-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.5); opacity: 0; transition: opacity .22s ease; z-index: 60; }
#drawer .dr { position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 92vw); z-index: 61; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 22px;
  background: var(--card-solid); border-left: 1px solid var(--line-strong); box-shadow: -20px 0 50px rgba(0,0,0,0.35); transform: translateX(105%); transition: transform .24s ease; color: var(--text); }
#drawer.open .dr-bg { opacity: 1; } #drawer.open .dr { transform: none; }
@media (prefers-reduced-motion: reduce) { #drawer .dr, #drawer .dr-bg { transition: none; } }
.dr-head { display: flex; align-items: center; justify-content: space-between; }
.dr-sec { display: flex; flex-direction: column; gap: 10px; }
.themes { display: flex; flex-direction: column; gap: 10px; }
.theme-opt { display: flex; align-items: center; gap: 14px; text-align: left; padding: 12px; border-radius: 12px; cursor: pointer; border: 1px solid var(--line-strong); background: var(--inset); color: var(--text); font: inherit; }
.theme-opt > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.theme-opt[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), inset 0 0 0 1px var(--accent); }
.theme-opt .sw { display: grid; grid-template-columns: 1fr 1fr; width: 46px; height: 46px; border-radius: 8px; overflow: hidden; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(0,0,0,0.3); }
.theme-opt .sw i { display: block; }
.dr .lang { align-self: flex-start; }
.dr .lang button { padding: 0 16px; }
details.more > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text-2); padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: '›'; font-size: 18px; line-height: 1; color: var(--muted); transition: transform .15s; }
details.more[open] > summary::before { transform: rotate(90deg); }
details.more > summary:hover { color: var(--text); border-color: var(--line-strong); }
details.more[open] > summary { margin-bottom: 16px; }
.seen-line { margin-top: -6px; }
.faint { color: var(--faint); }
aside .d20 { padding: 16px 20px; }
aside .d20 .d20-face { width: 84px; height: 84px; }
aside .d20 .d20-face svg { width: 84px; height: 84px; }
@media (max-width: 700px) {
  .top .nav { width: 100%; flex-wrap: nowrap; }
  .navbar { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .navbar::-webkit-scrollbar { display: none; }
  .navbar a { white-space: nowrap; padding: 0 10px; }
  .chip.status { font-size: 0; gap: 0; padding: 0 16px; }
}
/* 1.12.0: d20 as a small hero button */
.d20-btn { gap: 8px; padding: 0 14px; font-variant-numeric: tabular-nums; }
.d20-btn b { font-family: var(--display); font-weight: 700; min-width: 2ch; text-align: center; }
.d20-btn.nat20 { color: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.d20-btn.nat1 { color: var(--bad-text); border-color: var(--bad-text); }
.d20-btn.rolling svg { animation: d20spin .45s ease-out; }
@keyframes d20spin { from { transform: rotate(-200deg) scale(.7); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .d20-btn.rolling svg { animation: none; } }
