/* San Marino Audit: components. Every colour, size and duration comes from tokens.css. See logpanel/DESIGN.md. */

/* ==== base =========================================================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0; min-height: 100%; background: var(--bg-app); color: var(--text-1);
  font: 400 var(--text-sm)/1.5 var(--font-sans);
  font-feature-settings: "cv11", "ss03", "calt"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
code, pre, .mono { font-family: var(--font-mono); font-size: 0.94em; font-feature-settings: "zero"; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-xs); }
::selection { background: var(--accent-soft); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: var(--icon); height: var(--icon); flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.i-sm { width: var(--icon-sm); height: var(--icon-sm); }
/* duotone, like the server's own menu icons: a soft filled shape under the lines. These rules match the drawings in
   the sprite; the colours arrive through inheritance from wherever the icon is used. */
.sprite .f { fill: var(--icon-fill, currentColor); fill-opacity: var(--icon-fill-opacity, 0.22); stroke: none; }
.sprite .g24 > * { stroke-width: 2.2; }
.sprite .logo-a { fill: var(--logo-ink); stroke: none; }
.sprite .logo-b { fill: var(--logo-brand); stroke: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.wrap { overflow-wrap: anywhere; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skip { position: absolute; left: var(--space-4); top: -60px; z-index: var(--z-toast); background: var(--bg-overlay); padding: var(--space-4) var(--space-5); border-radius: var(--radius-sm); }
.skip:focus { top: var(--space-4); }
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }

/* ==== shell =========================================================================================================== */
.app { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns var(--dur-base) var(--ease-out); }
html[data-sidebar="collapsed"] .app { grid-template-columns: var(--sidebar-rail) minmax(0, 1fr); }

.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; min-width: 0;
  background: var(--bg-sidebar); border-right: 1px solid var(--border-subtle); z-index: var(--z-sidebar);
}
.brand { display: flex; align-items: center; gap: var(--space-5); height: var(--topbar-height); padding: 0 var(--space-6); color: var(--text-1); flex: none; }
.brand:hover { color: var(--text-1); }
.brand-logo { width: 28px; height: 25px; flex: none; }
.brand-text { font-family: var(--font-num); font-weight: 500; font-size: 15px; letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; }
.brand-text small { font-family: var(--font-sans); font-weight: 400; font-size: var(--text-sm); letter-spacing: 0; color: var(--text-3); margin-left: 7px; }
.nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: var(--space-4) var(--space-4) var(--space-6); }
.nav-group + .nav-group { margin-top: var(--space-7); }
.nav-label { display: block; padding: 0 var(--space-4) var(--space-3); font-size: var(--text-2xs); font-weight: 500; color: var(--text-3); letter-spacing: 0.02em; white-space: nowrap; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: var(--space-5); height: 30px; padding: 0 var(--space-4);
  border-radius: var(--radius-sm); color: var(--text-2); font-weight: 450; white-space: nowrap;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.nav-item + .nav-item { margin-top: 1px; }
.nav-item:hover { background: var(--bg-hover); color: var(--text-1); }
.nav-item .i { color: var(--text-2); --icon-fill: var(--accent-fill); --icon-fill-opacity: 0.75; transition: color var(--dur-fast); }
.nav-item:hover .i { color: var(--text-1); }
.nav-item.is-active { background: var(--bg-selected); color: var(--text-1); font-weight: 550; }
.nav-item.is-active .i { color: var(--text-1); --icon-fill-opacity: 1; }
.nav-item.is-active::before { content: ""; position: absolute; left: calc(-1 * var(--space-4)); top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav-text { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.nav-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-full); display: inline-grid; place-items: center; font-size: var(--text-2xs); font-weight: 600; font-variant-numeric: tabular-nums; background: var(--bg-active); color: var(--text-2); }
.nav-badge.is-alert { background: var(--critical-soft); color: var(--critical); }
.sidebar-foot { flex: none; padding: var(--space-4); border-top: 1px solid var(--border-subtle); display: flex; align-items: center; gap: var(--space-3); }
.pipe-chip { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--space-4); height: 30px; padding: 0 var(--space-4); border-radius: var(--radius-sm); color: var(--text-2); font-size: var(--text-xs); white-space: nowrap; overflow: hidden; }
.pipe-chip:hover { background: var(--bg-hover); color: var(--text-1); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--text-3); }
.status-dot.is-ok { background: var(--positive); box-shadow: 0 0 0 3px var(--positive-soft); }
.status-dot.is-bad { background: var(--negative); box-shadow: 0 0 0 3px var(--negative-soft); }
.status-dot.is-warn { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-soft); }
html[data-sidebar="collapsed"] .brand { padding: 0; justify-content: center; }
html[data-sidebar="collapsed"] .brand-text, html[data-sidebar="collapsed"] .nav-text, html[data-sidebar="collapsed"] .nav-label,
html[data-sidebar="collapsed"] .nav-badge, html[data-sidebar="collapsed"] .pipe-chip span:not(.status-dot) { display: none; }
html[data-sidebar="collapsed"] .nav-item { justify-content: center; padding: 0; }
html[data-sidebar="collapsed"] .nav-group + .nav-group { margin-top: var(--space-5); padding-top: var(--space-5); border-top: 1px solid var(--border-subtle); }
html[data-sidebar="collapsed"] .sidebar-foot { flex-direction: column; }
html[data-sidebar="collapsed"] .pipe-chip { flex: none; padding: 0; width: 30px; justify-content: center; }

.frame { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: var(--z-header); height: var(--topbar-height); flex: none;
  display: flex; align-items: center; gap: var(--space-5); padding: 0 var(--space-6) 0 var(--space-5);
  background: color-mix(in srgb, var(--bg-app) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}
.crumbs { display: flex; align-items: center; gap: var(--space-3); min-width: 0; color: var(--text-3); font-size: var(--text-sm); white-space: nowrap; }
.crumbs a { color: var(--text-3); }
.crumbs a:hover { color: var(--text-1); }
.crumbs .i { width: 12px; height: 12px; color: var(--text-disabled); }
.crumbs [aria-current] { color: var(--text-1); font-weight: 550; overflow: hidden; text-overflow: ellipsis; }
.topbar-space { flex: 1; }
.search-trigger {
  display: flex; align-items: center; gap: var(--space-4); width: min(380px, 34vw); height: var(--control-height); padding: 0 var(--space-4) 0 var(--space-5);
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-3); text-align: left;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.search-trigger:hover { border-color: var(--border-strong); color: var(--text-2); }
.search-trigger span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kbd { font: 500 var(--text-2xs)/1 var(--font-sans); padding: 3px 5px; border-radius: var(--radius-xs); border: 1px solid var(--border); background: var(--bg-raised); color: var(--text-3); white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: var(--space-2); }

.icon-btn { display: inline-grid; place-items: center; width: var(--control-height); height: var(--control-height); flex: none; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-2); position: relative; transition: background var(--dur-fast), color var(--dur-fast); }
.icon-btn:hover { background: var(--bg-hover); color: var(--text-1); }
.icon-btn .count { position: absolute; top: 2px; right: 1px; min-width: 14px; height: 14px; padding: 0 3px; border-radius: var(--radius-full); background: var(--critical); color: #fff; font-size: 9.5px; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.theme-light, html[data-theme="light"] .theme-dark { display: none; }
html[data-theme="light"] .theme-light { display: block; }
@media (prefers-color-scheme: light) { html:not([data-theme="dark"]) .theme-dark { display: none; } html:not([data-theme="dark"]) .theme-light { display: block; } }

/* ---- menus and popovers (a <details> with a floating panel) ---- */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-panel {
  position: absolute; z-index: var(--z-pop); top: calc(100% + 6px); left: 0; min-width: 220px; max-width: min(380px, 92vw);
  background: var(--bg-overlay); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-pop); padding: var(--space-2);
}
.menu.is-right .menu-panel { left: auto; right: 0; }
.menu[open] > .menu-panel { animation: pop-in var(--dur-base) var(--ease-out); }
.menu-head { padding: var(--space-4) var(--space-4) var(--space-3); font-size: var(--text-xs); color: var(--text-3); font-weight: 500; }
.menu-item { display: flex; align-items: center; gap: var(--space-4); width: 100%; min-height: 30px; padding: var(--space-3) var(--space-4); border: 0; border-radius: var(--radius-xs); background: none; color: var(--text-1); text-align: left; font-size: var(--text-sm); }
.menu-item:hover, .menu-item:focus-visible, .menu-item.is-current { background: var(--bg-hover); color: var(--text-1); outline: none; }
.menu-item .i { color: var(--text-3); }
.menu-item .end { margin-left: auto; color: var(--text-3); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.menu-item.is-selected { color: var(--accent); }
.menu-item.is-selected .i { color: var(--accent); }
.menu-sep { height: 1px; background: var(--border-subtle); margin: var(--space-2) calc(-1 * var(--space-2)); }
.menu-form { padding: var(--space-4); display: grid; gap: var(--space-5); min-width: 260px; }
.menu-list { max-height: 320px; overflow-y: auto; }
.user-btn { display: flex; align-items: center; gap: var(--space-4); height: var(--control-height); padding: 0 var(--space-3) 0 var(--space-2); border-radius: var(--radius-full); color: var(--text-2); }
.user-btn:hover { background: var(--bg-hover); color: var(--text-1); }
.user-card { padding: var(--space-4); display: flex; gap: var(--space-5); align-items: center; }
.user-card strong { display: block; font-weight: 550; }

/* ==== page ============================================================================================================ */
.page { flex: 1; min-width: 0; padding: var(--space-8) var(--page-pad) var(--space-10); }
.page:focus { outline: none; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-5) var(--space-8); margin-bottom: var(--space-8); }
.page-heading { flex: 1; min-width: 240px; }
.page-title { font-size: var(--text-xl); font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.page-sub { color: var(--text-2); margin-top: var(--space-2); max-width: 72ch; }
.page-actions { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.section-title { font-size: var(--text-md); font-weight: 600; letter-spacing: -0.005em; }
.section-sub { font-size: var(--text-xs); color: var(--text-3); font-weight: 400; margin-left: var(--space-4); }
.stack { display: grid; gap: var(--space-6); }
.stack-sm { display: grid; gap: var(--space-4); }
.row { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.grid { display: grid; gap: var(--space-6); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-main { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
.tabs { display: flex; gap: var(--space-2); box-shadow: inset 0 -1px 0 var(--border-subtle); margin-bottom: var(--space-7); overflow-x: auto; overflow-y: hidden; }
.tab { position: relative; display: inline-flex; align-items: center; gap: var(--space-3); height: 34px; padding: 0 var(--space-5); color: var(--text-2); font-weight: 500; white-space: nowrap; border: 0; background: none; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.tab:hover { color: var(--text-1); background: var(--bg-hover); }
.tab[aria-selected="true"], .tab.is-active { color: var(--text-1); }
.tab[aria-selected="true"]::after, .tab.is-active::after { content: ""; position: absolute; left: var(--space-4); right: var(--space-4); bottom: 0; height: 2px; border-radius: 2px 2px 0 0; background: var(--accent); }
.tab .count { font-size: var(--text-2xs); color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ==== controls ======================================================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-3); height: var(--control-height); padding: 0 var(--space-5);
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-surface); color: var(--text-1);
  font-size: var(--text-sm); font-weight: 500; white-space: nowrap; transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast);
}
.btn:hover { background: var(--bg-hover); border-color: var(--border-strong); color: var(--text-1); }
.btn:active { background: var(--bg-active); }
.btn .i { color: var(--text-3); }
.btn-primary { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--accent-contrast); font-weight: 600; }
.btn-primary:hover { background: var(--accent-fill-hover); border-color: var(--accent-fill-hover); color: var(--accent-contrast); }
.btn-primary .i { color: inherit; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-hover); border-color: transparent; }
.btn-danger { color: var(--negative); }
.btn-danger:hover { border-color: var(--negative); background: var(--negative-soft); color: var(--negative); }
.btn-sm { height: var(--control-height-sm); padding: 0 var(--space-4); font-size: var(--text-xs); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.btn.has-value { border-color: var(--accent-border); background: var(--accent-soft); color: var(--text-1); }
.btn.has-value .i { color: var(--accent); }
.btn .val { color: var(--accent); font-weight: 550; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent); font-size: inherit; }
.link-btn:hover { color: var(--accent-hover); text-decoration: underline; }

.field { display: grid; gap: var(--space-2); min-width: 0; }
.field > span, .label { font-size: var(--text-xs); font-weight: 500; color: var(--text-2); }
.hint { font-size: var(--text-xs); color: var(--text-3); }
.input, .select {
  width: 100%; height: var(--control-height); padding: 0 var(--space-4); min-width: 0;
  background: var(--bg-inset); color: var(--text-1); border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.input::placeholder { color: var(--text-3); opacity: 1; }
.input:hover, .select:hover { border-color: var(--border-strong); }
.input:focus-visible, .select:focus-visible { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--accent-soft); }
.select { appearance: none; padding-right: 28px; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 14px) 13px, calc(100% - 10px) 13px; background-size: 4px 4px, 4px 4px; background-repeat: no-repeat; }
.input-icon { position: relative; }
.input-icon .i { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-icon .input { padding-left: 30px; }
.check { display: flex; align-items: center; gap: var(--space-4); font-size: var(--text-sm); color: var(--text-1); cursor: pointer; min-height: 26px; }
.check input { width: 15px; height: 15px; accent-color: var(--accent); flex: none; margin: 0; }
.segmented { display: inline-flex; padding: 2px; gap: 2px; border-radius: var(--radius-sm); background: var(--bg-inset); border: 1px solid var(--border); }
.segmented a, .segmented button { height: 24px; padding: 0 var(--space-5); display: inline-flex; align-items: center; border: 0; border-radius: var(--radius-xs); background: none; color: var(--text-2); font-size: var(--text-xs); font-weight: 500; white-space: nowrap; }
.segmented a:hover, .segmented button:hover { color: var(--text-1); }
.segmented [aria-current="true"], .segmented [aria-pressed="true"] { background: var(--bg-active); color: var(--text-1); box-shadow: 0 0 0 1px var(--border); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; font-size: var(--text-xs); font-weight: 600; color: var(--text-1); margin-bottom: var(--space-4); }

/* ==== small parts ====================================================================================================== */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: var(--radius-xs); font-size: var(--text-2xs); font-weight: 600; white-space: nowrap; background: var(--bg-active); color: var(--text-2); vertical-align: middle; }
.badge .i { width: 11px; height: 11px; stroke-width: 2; }
.badge-success { background: var(--positive-soft); color: var(--positive); }
.badge-danger { background: var(--negative-soft); color: var(--negative); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-critical { background: var(--critical-soft); color: var(--critical); }
.badge-info { background: var(--accent-soft); color: var(--accent); }
.badge-outline { background: none; box-shadow: inset 0 0 0 1px var(--border); color: var(--text-2); }
.level { display: inline-flex; align-items: center; height: 16px; padding: 0 5px; margin-left: 6px; border-radius: 3px; font-size: 10px; font-weight: 650; letter-spacing: 0.01em; color: var(--area-staff); background: color-mix(in srgb, var(--area-staff) 14%, transparent); vertical-align: 1px; white-space: nowrap; }
.avatar { display: inline-grid; place-items: center; width: 20px; height: 20px; flex: none; border-radius: 50%; font-size: 9.5px; font-weight: 650; letter-spacing: 0.01em; color: var(--text-1); background: var(--bg-active); }
.avatar-lg { width: 44px; height: 44px; font-size: var(--text-lg); }
.avatar-md { width: 28px; height: 28px; font-size: var(--text-2xs); }
.avatar-t1 { background: color-mix(in srgb, var(--area-money) 24%, var(--bg-surface)); } .avatar-t2 { background: color-mix(in srgb, var(--area-items) 24%, var(--bg-surface)); }
.avatar-t3 { background: color-mix(in srgb, var(--area-players) 24%, var(--bg-surface)); } .avatar-t4 { background: color-mix(in srgb, var(--area-world) 26%, var(--bg-surface)); }
.avatar-t5 { background: color-mix(in srgb, var(--area-staff) 24%, var(--bg-surface)); } .avatar-t6 { background: color-mix(in srgb, var(--area-system) 26%, var(--bg-surface)); }
.person { display: inline-flex; align-items: center; gap: 7px; min-width: 0; max-width: 100%; color: var(--text-1); vertical-align: middle; }
a.person:hover .person-name { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.person-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.person-system { color: var(--text-3); }
.person-system .i { width: 14px; height: 14px; margin: 0 3px; }
.person-system .person-name { font-weight: 400; }
.cat-icon { display: inline-grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: var(--radius-xs); color: var(--area); background: color-mix(in srgb, var(--area) 14%, transparent); }
.cat-icon .i { width: 14px; height: 14px; --icon-fill-opacity: 0.3; }
/* a picture of the item itself, from the game's own image host; the box icon shows under it until (or unless) it loads */
.item-pic { position: relative; display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: var(--radius-xs); background: var(--bg-raised); border: 1px solid var(--border-subtle); color: var(--text-3); overflow: hidden; vertical-align: middle; }
.item-pic .i { width: 13px; height: 13px; }
.item-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 2px; background: var(--bg-raised); }
.item-pic.is-lg { width: 56px; height: 56px; border-radius: var(--radius-md); }
.item-pic.is-lg .i { width: 22px; height: 22px; }
.item-pic.is-lg img { padding: 5px; }
.item-name { display: inline-flex; align-items: center; gap: var(--space-4); min-width: 0; }
.area-money { --area: var(--area-money); } .area-items { --area: var(--area-items); } .area-players { --area: var(--area-players); }
.area-world { --area: var(--area-world); } .area-staff { --area: var(--area-staff); } .area-system { --area: var(--area-system); }
.amt { font-variant-numeric: tabular-nums; font-weight: 550; white-space: nowrap; }
.amt-in { color: var(--positive); }
.amt-out { color: var(--negative); }
.unit { color: var(--text-3); font-size: var(--text-xs); font-weight: 400; margin-left: 4px; }
.id-text { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-2); font-feature-settings: "zero"; }
.token { display: inline-flex; align-items: center; height: 24px; max-width: 100%; border-radius: var(--radius-xs); background: var(--bg-active); border: 1px solid var(--border); font-size: var(--text-xs); white-space: nowrap; overflow: hidden; }
.token-key { padding: 0 6px 0 8px; color: var(--text-3); }
.token-val { padding-right: 4px; color: var(--text-1); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.token-x { display: inline-grid; place-items: center; width: 22px; height: 22px; color: var(--text-3); border-left: 1px solid var(--border); }
.token-x:hover { background: var(--negative-soft); color: var(--negative); }
.token-x .i { width: 12px; height: 12px; }

.notice { display: flex; gap: var(--space-5); align-items: flex-start; padding: var(--space-5) var(--space-6); border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--bg-surface); margin-bottom: var(--space-6); }
.notice > .i { margin-top: 2px; }
.notice-ok { border-color: color-mix(in srgb, var(--positive) 40%, var(--border)); } .notice-ok > .i { color: var(--positive); }
.notice-warn { border-color: color-mix(in srgb, var(--warning) 45%, var(--border)); } .notice-warn > .i { color: var(--warning); }
.notice-bad { border-color: color-mix(in srgb, var(--negative) 45%, var(--border)); } .notice-bad > .i { color: var(--negative); }
.notice p + p { margin-top: var(--space-2); }
.secret { font-family: var(--font-mono); font-size: var(--text-md); letter-spacing: 0.04em; user-select: all; padding: 2px 6px; border-radius: var(--radius-xs); background: var(--bg-inset); border: 1px solid var(--border); }
.empty { display: grid; justify-items: center; text-align: center; gap: var(--space-4); padding: var(--space-10) var(--space-8); }
.empty-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-md); background: var(--bg-raised); border: 1px solid var(--border); color: var(--text-3); }
.empty-icon .i { width: 18px; height: 18px; }
.empty-title { font-size: var(--text-md); font-weight: 600; }
.empty-text { color: var(--text-2); max-width: 46ch; }
.empty-actions { display: flex; gap: var(--space-4); margin-top: var(--space-3); }
.skeleton { border-radius: var(--radius-xs); background: linear-gradient(90deg, var(--bg-raised) 25%, var(--bg-hover) 37%, var(--bg-raised) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; height: 12px; }
.toasts { position: fixed; z-index: var(--z-toast); right: var(--space-7); bottom: var(--space-7); display: grid; gap: var(--space-4); }
.toast { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-6); border-radius: var(--radius-md); background: var(--bg-overlay); border: 1px solid var(--border); box-shadow: var(--shadow-pop); animation: pop-in var(--dur-base) var(--ease-out); }
.toast .i { color: var(--positive); }

/* ==== cards, stats ====================================================================================================== */
.card { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); min-width: 0; }
.card-head { display: flex; align-items: center; gap: var(--space-5); min-height: 44px; padding: var(--space-4) var(--space-6); border-bottom: 1px solid var(--border-subtle); }
.card-head .section-title { flex: 1; min-width: 0; }
.card-body { padding: var(--space-6); }
.card-body.is-flush { padding: 0; }
.card-foot { padding: var(--space-4) var(--space-6); border-top: 1px solid var(--border-subtle); font-size: var(--text-xs); color: var(--text-3); display: flex; align-items: center; gap: var(--space-5); }
.stats { display: flex; flex-wrap: wrap; gap: 1px; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--border-subtle); overflow: hidden; }
.stat { position: relative; flex: 1 1 172px; padding: var(--space-6); display: grid; gap: var(--space-2); align-content: start; min-width: 0; color: var(--text-1); background: var(--bg-surface); transition: background var(--dur-fast); }
a.stat:hover { background: var(--bg-hover); color: var(--text-1); }
.stat-label { font-size: var(--text-xs); color: var(--text-2); font-weight: 500; display: flex; align-items: center; gap: var(--space-3); }
.stat-value { font-family: var(--font-num); font-size: var(--text-2xl); font-weight: 500; letter-spacing: 0; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-note { font-size: var(--text-xs); color: var(--text-3); }
.stat .spark { position: absolute; right: var(--space-6); bottom: var(--space-6); }
.spark polyline { fill: none; stroke: var(--text-3); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.kv { display: grid; grid-template-columns: minmax(104px, max-content) minmax(0, 1fr); gap: var(--space-4) var(--space-7); align-items: baseline; }
.kv dt { color: var(--text-3); font-size: var(--text-xs); }
.kv dd { min-width: 0; overflow-wrap: anywhere; }
.kv dd .act { margin-left: var(--space-4); opacity: 0; transition: opacity var(--dur-fast); }
.kv dd:hover .act, .kv dd .act:focus-visible { opacity: 1; }
.list-rows > li { display: flex; align-items: center; gap: var(--space-5); min-height: 40px; padding: var(--space-3) var(--space-6); border-bottom: 1px solid var(--border-subtle); }
.list-rows > li:last-child { border-bottom: 0; }
.list-rows a.row-link { color: var(--text-1); font-weight: 500; }
.list-rows a.row-link:hover { color: var(--accent); }
.list-rows .end { margin-left: auto; color: var(--text-3); font-size: var(--text-xs); white-space: nowrap; }
.meter { display: block; width: 100%; height: 6px; border-radius: 3px; background: var(--bg-active); overflow: hidden; }
.meter rect { fill: var(--area, var(--accent)); }

/* ==== tables ============================================================================================================ */
.table-wrap { overflow: auto; }
.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.table th, .table td { text-align: left; padding: 0 var(--space-5); height: var(--row-height); border-bottom: 1px solid var(--border-subtle); white-space: nowrap; }
.table th:first-child, .table td:first-child { padding-left: var(--space-6); }
.table th:last-child, .table td:last-child { padding-right: var(--space-6); }
.table thead th { height: 32px; font-size: var(--text-xs); font-weight: 500; color: var(--text-3); background: var(--bg-surface); position: sticky; top: 0; z-index: var(--z-sticky); }
.table tbody tr:last-child td, .table tbody tr:last-child th { border-bottom: 0; }
.table tbody th { font-weight: 500; }
.table tbody tr:hover { background: var(--bg-hover); }
.table .right { text-align: right; }
.table td.wrap { white-space: normal; padding-top: var(--space-4); padding-bottom: var(--space-4); height: auto; }
.table .is-failed td:first-child { box-shadow: inset 2px 0 0 var(--negative); }
.table tr.is-off { color: var(--text-3); }
.sort { display: inline-flex; align-items: center; gap: 4px; color: inherit; }
.sort:hover { color: var(--text-1); }
.sort .i { width: 12px; height: 12px; opacity: 0.55; }
th[aria-sort] .sort { color: var(--text-1); }
th[aria-sort] .sort .i { opacity: 1; color: var(--accent); }

/* ---- the event grid ---- */
.data { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: var(--text-sm); }
.data col.c-rail { width: 14px; } .data col.c-time { width: 92px; } .data col.c-event { width: 216px; } .data col.c-who { width: 264px; }
.data col.c-amount { width: 140px; } .data col.c-origin { width: 190px; }
@media (min-width: 1400px) { .data col.c-who { width: 300px; } }
@media (min-width: 1600px) { .data col.c-event { width: 236px; } .data col.c-who { width: 330px; } .data col.c-amount { width: 150px; } }
.data th, .data td { height: var(--row-height); padding: 0 var(--space-5); border-bottom: 1px solid var(--border-subtle); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.data thead th { position: sticky; top: 0; z-index: var(--z-sticky); height: 32px; background: var(--bg-surface); font-size: var(--text-xs); font-weight: 500; color: var(--text-3); border-bottom: 1px solid var(--border); }
.data .right { text-align: right; }
.data td.c-rail, .data th.c-rail { padding: 0; position: relative; overflow: visible; }
.data tr.ev { cursor: default; transition: background var(--dur-fast); }
.data tr.ev:hover, .data tr.ev.is-op-hover { background: var(--bg-hover); }
.data tr.ev.is-selected { background: var(--accent-soft); }
.data tr.ev.is-selected td.c-rail::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent); }
.data tr.day th { height: 30px; position: sticky; top: 32px; z-index: 9; background: var(--bg-raised); color: var(--text-2); font-size: var(--text-xs); font-weight: 550; border-bottom: 1px solid var(--border-subtle); padding-left: var(--space-6); }
.data tr.day .faint { font-weight: 400; margin-left: var(--space-4); }
.ev-time { display: block; color: var(--text-2); font-variant-numeric: tabular-nums; }
a.ev-time:hover { color: var(--accent); }
.ev-what { display: flex; align-items: center; gap: var(--space-4); min-width: 0; }
.ev-name { overflow: hidden; text-overflow: ellipsis; font-weight: 550; }
.ev-who { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.ev-who .to { color: var(--text-disabled); flex: none; display: inline-flex; }
.ev-who .to .i { width: 12px; height: 12px; }
.ev-sum { color: var(--text-1); }
.ev-meta { color: var(--text-3); margin-left: var(--space-5); }
.ev-origin { color: var(--text-3); font-size: var(--text-xs); }
/* the operation rail: rows written by one operation are joined in the gutter */
.op { position: absolute; left: 6px; top: 0; bottom: -1px; width: 2px; background: var(--border-strong); border-radius: 1px; }
.op-start { top: 50%; } .op-end { bottom: 50%; }
.op-start::before, .op-end::before, .op-mid::before { content: ""; position: absolute; left: -2px; top: calc(50% - 3px); width: 6px; height: 6px; border-radius: 50%; background: var(--bg-surface); border: 2px solid var(--border-strong); }
.op-start::before { top: -3px; } .op-end::before { top: auto; bottom: -3px; }
tr.ev:hover .op, tr.ev.is-op-hover .op, tr.ev.is-selected .op { background: var(--accent); }
tr.ev:hover .op::before, tr.ev.is-op-hover .op::before, tr.ev.is-selected .op::before { border-color: var(--accent); }

/* ==== explorer ========================================================================================================== */
.page.is-fill { flex: none; display: flex; flex-direction: column; height: calc(100vh - var(--topbar-height)); padding-top: var(--space-6); padding-bottom: 0; overflow: hidden; }
.page.is-fill > .notice { flex: none; margin-bottom: var(--space-5); }
.query-row { display: flex; align-items: stretch; gap: var(--space-4); flex: none; }
.query-row > .query { flex: 1; min-width: 0; }
.query-row > .menu > .btn, .query-row > .btn { height: 38px; border-radius: var(--radius-md); }
.page.is-fill > .page-head { margin-bottom: var(--space-6); flex: none; }
.query { position: relative; display: flex; align-items: stretch; gap: var(--space-4); flex: none; }
.query-box {
  flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); min-height: 38px; padding: 5px var(--space-4) 5px var(--space-5);
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md); transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.query-box:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px var(--accent-soft); }
.query-box > .i { color: var(--text-3); margin-right: var(--space-2); }
.query-box > .kbd { margin-left: auto; }
.query-clear { flex: none; padding: 0 var(--space-3); color: var(--text-3); font-size: var(--text-xs); white-space: nowrap; }
.query-clear:hover { color: var(--text-1); }
.query-clear + .kbd { margin-left: 0; }
.menu-form > .btn { justify-self: start; }
.menu-item .i-blank { visibility: hidden; }
.query-input { flex: 1; min-width: 180px; height: 26px; border: 0; background: transparent; color: var(--text-1); outline: none; font-size: var(--text-md); }
.query-input::placeholder { color: var(--text-3); }
.query .btn { height: 38px; border-radius: var(--radius-md); }
.suggest { position: absolute; z-index: var(--z-pop); top: calc(100% + 6px); left: 0; right: 0; max-height: min(420px, 60vh); overflow-y: auto; background: var(--bg-overlay); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-pop); padding: var(--space-2); }
.suggest-group { padding: var(--space-4) var(--space-4) var(--space-2); font-size: var(--text-2xs); font-weight: 500; color: var(--text-3); }
.suggest-item { display: flex; align-items: center; gap: var(--space-5); width: 100%; min-height: 32px; padding: var(--space-3) var(--space-4); border: 0; border-radius: var(--radius-xs); background: none; color: var(--text-1); text-align: left; }
.suggest-item:hover, .suggest-item[aria-selected="true"] { background: var(--bg-hover); color: var(--text-1); }
.suggest-item .i { color: var(--text-3); }
.suggest-item .hint { margin-left: auto; white-space: nowrap; }
.suggest-item mark { background: none; color: var(--accent); font-weight: 600; }
.filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); margin: var(--space-4) 0 var(--space-5); flex: none; }
.filterbar .spacer { flex: 1; }
.result-meta { color: var(--text-2); font-size: var(--text-sm); white-space: nowrap; }
.result-meta strong { color: var(--text-1); font-weight: 600; font-variant-numeric: tabular-nums; }
.explorer { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-bottom: 0; border-radius: var(--radius-md) var(--radius-md) 0 0; overflow: hidden; }
.histo { flex: none; padding: var(--space-4) var(--space-5) var(--space-2); border-bottom: 1px solid var(--border-subtle); }
.histo-ends { display: flex; justify-content: space-between; align-items: center; gap: var(--space-5); margin-top: 3px; color: var(--text-3); font-size: 10.5px; line-height: 16px; font-variant-numeric: tabular-nums; }
.histo-ends .result-meta { font-size: var(--text-xs); }
.data-wrap { flex: 1; min-height: 0; overflow: auto; }
.pager-bar { flex: none; display: flex; align-items: center; gap: var(--space-5); height: 44px; padding: 0 var(--space-6); border-top: 1px solid var(--border-subtle); background: var(--bg-surface); color: var(--text-2); font-size: var(--text-xs); }
.pager-bar .spacer { flex: 1; }
.pop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2) var(--space-5); min-width: 340px; }
.range { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--space-4); align-items: center; }

/* ==== drawer =========================================================================================================== */
.drawer { position: fixed; z-index: var(--z-drawer); top: 0; right: 0; bottom: 0; width: min(var(--drawer-width), 100vw); display: flex; flex-direction: column; background: var(--bg-surface); box-shadow: var(--shadow-drawer); }
.drawer.is-open { animation: drawer-in var(--dur-slow) var(--ease-out); }
.drawer-bar { flex: none; display: flex; align-items: center; gap: var(--space-2); height: var(--topbar-height); padding: 0 var(--space-5); border-bottom: 1px solid var(--border-subtle); }
.drawer-bar .spacer { flex: 1; }
.drawer-bar .pos { font-size: var(--text-xs); color: var(--text-3); font-variant-numeric: tabular-nums; margin: 0 var(--space-3); }
.drawer-body { flex: 1; min-height: 0; overflow-y: auto; }
.drawer-body:focus { outline: none; }
.drawer-pad { padding: var(--space-7); display: grid; gap: var(--space-4); }
.sheet .drawer-body { padding: var(--space-7); }
.sheet-foot { flex: none; display: flex; gap: var(--space-4); justify-content: flex-end; padding: var(--space-5) var(--space-7); border-top: 1px solid var(--border-subtle); }
.sheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5) var(--space-6); }
.sheet-grid .wide { grid-column: 1 / -1; }
.sheet fieldset + fieldset { margin-top: var(--space-8); padding-top: var(--space-7); border-top: 1px solid var(--border-subtle); }
.scrim { position: fixed; inset: 0; z-index: calc(var(--z-drawer) - 1); background: var(--scrim); animation: fade-in var(--dur-base) ease-out; }

.ev-head { padding: var(--space-7) var(--space-7) var(--space-6); display: grid; gap: var(--space-5); }
.ev-head-top { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.ev-head-top .cat-icon { width: 28px; height: 28px; border-radius: var(--radius-sm); }
.ev-head-top .cat-icon .i { width: 16px; height: 16px; }
.ev-title { font-size: var(--text-lg); font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }
.ev-line { color: var(--text-2); font-size: var(--text-md); overflow-wrap: anywhere; }
.ev-when { display: flex; align-items: center; gap: var(--space-4); color: var(--text-3); font-size: var(--text-xs); flex-wrap: wrap; }
.ev-when time { color: var(--text-2); }
.flow { display: flex; align-items: stretch; gap: 0; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); overflow: hidden; }
.flow-side { flex: 1; min-width: 0; padding: var(--space-5) var(--space-6); display: grid; gap: var(--space-2); }
.flow-side + .flow-side { border-left: 1px solid var(--border-subtle); }
.flow-label { font-size: var(--text-2xs); color: var(--text-3); font-weight: 500; }
.flow-arrow { display: grid; place-items: center; width: 28px; flex: none; color: var(--text-disabled); background: var(--bg-raised); border-left: 1px solid var(--border-subtle); }
.delta { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--space-6); padding: var(--space-6); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--bg-raised); }
.delta-side { display: grid; gap: 2px; min-width: 0; }
.delta-side.is-after { text-align: right; }
.delta-num { font-family: var(--font-num); font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }
.delta-side.is-before .delta-num { color: var(--text-2); }
.delta-mid { display: grid; justify-items: center; gap: 2px; }
.delta-mid .amt { font-family: var(--font-num); font-size: 24px; font-weight: 500; letter-spacing: 0; }
.dtabs { position: sticky; top: 0; z-index: 2; display: flex; gap: var(--space-2); padding: 0 var(--space-6); background: var(--bg-surface); box-shadow: inset 0 -1px 0 var(--border-subtle); overflow-x: auto; overflow-y: hidden; }
.pane { padding: var(--space-7); display: grid; gap: var(--space-7); align-content: start; }
.pane h3 { font-size: var(--text-xs); font-weight: 600; color: var(--text-2); margin-bottom: var(--space-4); display: flex; align-items: center; gap: var(--space-4); }
.pane h3 .faint { font-weight: 400; }
.no-js-pane + .no-js-pane { border-top: 1px solid var(--border-subtle); }
.diff { width: 100%; border-collapse: collapse; font-size: var(--text-sm); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); overflow: hidden; }
.diff th, .diff td { text-align: left; padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border-subtle); vertical-align: top; overflow-wrap: anywhere; }
.diff tr:last-child th, .diff tr:last-child td { border-bottom: 0; }
.diff thead th { font-size: var(--text-xs); font-weight: 500; color: var(--text-3); background: var(--bg-raised); }
.diff tbody th { font-weight: 500; color: var(--text-2); white-space: nowrap; width: 28%; }
.diff .was { color: var(--negative); background: var(--negative-soft); }
.diff .now { color: var(--positive); background: var(--positive-soft); }
.timeline { position: relative; display: grid; }
.timeline li { position: relative; display: grid; grid-template-columns: 78px 22px minmax(0, 1fr) auto; align-items: center; gap: var(--space-4); min-height: 40px; padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); }
.timeline li::before { content: ""; position: absolute; left: calc(78px + var(--space-4) + var(--space-4) + 10px); top: 0; bottom: 0; width: 1px; background: var(--border); }
.timeline li:first-child::before { top: 50%; } .timeline li:last-child::before { bottom: 50%; }
.timeline li.is-current { background: var(--accent-soft); }
.timeline li:hover { background: var(--bg-hover); }
.timeline .cat-icon { position: relative; z-index: 1; box-shadow: 0 0 0 3px var(--bg-surface); background: color-mix(in srgb, var(--area) 18%, var(--bg-surface)); }
.timeline .tl-main { min-width: 0; display: grid; }
.timeline .tl-main a { color: var(--text-1); font-weight: 550; }
.timeline .tl-main a:hover { color: var(--accent); }
.timeline .tl-main span { color: var(--text-3); font-size: var(--text-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline time { color: var(--text-3); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.raw { margin: 0; padding: var(--space-6); border-radius: var(--radius-md); background: var(--bg-inset); border: 1px solid var(--border-subtle); font-size: var(--text-xs); line-height: 1.6; overflow: auto; max-height: 560px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }
.raw .k { color: var(--accent); } .raw .s { color: var(--positive); } .raw .n { color: var(--warning); } .raw .z { color: var(--text-3); }

/* ==== charts =========================================================================================================== */
.chart { position: relative; }
.chart-plot { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: var(--space-4); }
.chart-plot.is-bare { grid-template-columns: minmax(0, 1fr); }
.chart-yaxis { display: flex; flex-direction: column; justify-content: space-between; margin: -7px 0; text-align: right; color: var(--text-3); font-size: 10.5px; line-height: 14px; font-variant-numeric: tabular-nums; }
.chart-svg { display: block; width: 100%; height: 200px; }
.chart-svg.chart-sm { height: 132px; }
.chart-svg.chart-xs { height: 44px; }
.chart-xaxis { display: flex; height: 14px; margin: var(--space-3) 0 0 calc(34px + var(--space-4)); color: var(--text-3); font-size: 10.5px; line-height: 14px; font-variant-numeric: tabular-nums; }
.chart-xaxis span { flex: 1 1 0; min-width: 0; display: flex; justify-content: center; white-space: nowrap; }
.chart-xaxis.is-ends { justify-content: space-between; }
.chart-xaxis.is-ends span { flex: none; }
.chart-xaxis.is-flush { margin-left: 0; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 1.75; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart-area { fill: var(--accent); opacity: 0.1; }
.chart-grid { stroke: var(--border-subtle); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-base { stroke: var(--border-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-hit { fill: transparent; }
.chart-bar:hover .chart-hit, .chart-bar:focus-visible .chart-hit { fill: var(--bg-hover); }
.chart-bar:focus-visible { outline: none; }
.s1 { fill: var(--area-money); background: var(--area-money); } .s2 { fill: var(--area-items); background: var(--area-items); } .s3 { fill: var(--area-players); background: var(--area-players); }
.s4 { fill: var(--area-world); background: var(--area-world); } .s5 { fill: var(--area-staff); background: var(--area-staff); } .s6 { fill: var(--area-system); background: var(--area-system); }
.s-in { fill: var(--positive); background: var(--positive); } .s-out { fill: var(--negative); background: var(--negative); }
.s-neutral { fill: var(--text-3); background: var(--text-3); } .s-accent { fill: var(--accent); background: var(--accent); }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; max-width: 340px; padding: 5px 9px; border-radius: var(--radius-sm); background: var(--text-1); color: var(--bg-app); font-size: var(--text-xs); font-weight: 500; box-shadow: var(--shadow-pop); }
.legend { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-7); font-size: var(--text-xs); color: var(--text-2); }
.legend li { display: flex; align-items: center; gap: var(--space-3); }
.legend a { color: var(--text-2); } .legend a:hover { color: var(--text-1); }
.legend .num { color: var(--text-3); }
.swatch { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.as-table > summary { cursor: pointer; color: var(--text-3); font-size: var(--text-xs); width: fit-content; }
.as-table > summary:hover { color: var(--text-1); }
.as-table[open] > summary { margin-bottom: var(--space-4); }
.bars { display: grid; gap: var(--space-5); }
.bars li { display: grid; grid-template-columns: minmax(96px, 150px) minmax(0, 1fr) auto; align-items: center; gap: var(--space-5); font-size: var(--text-sm); }
.bars .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-1); }
.bars a.name:hover { color: var(--accent); }
.bars .num { color: var(--text-2); font-size: var(--text-xs); }

/* ==== command palette ===================================================================================================== */
.palette { position: fixed; inset: 0; z-index: var(--z-palette); display: grid; justify-items: center; align-content: start; padding-top: 12vh; background: var(--scrim); animation: fade-in var(--dur-fast) ease-out; }
.palette-box { width: min(620px, 92vw); background: var(--bg-overlay); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); overflow: hidden; animation: pop-in var(--dur-base) var(--ease-out); }
.palette-input { display: flex; align-items: center; gap: var(--space-5); padding: 0 var(--space-6); height: 50px; border-bottom: 1px solid var(--border-subtle); }
.palette-input .i { color: var(--text-3); width: 18px; height: 18px; }
.palette-input input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--text-1); font-size: var(--text-lg); }
.palette-input input::placeholder { color: var(--text-3); }
.palette-list { max-height: min(430px, 56vh); overflow-y: auto; padding: var(--space-2); }
.palette-foot { display: flex; gap: var(--space-6); padding: var(--space-4) var(--space-6); border-top: 1px solid var(--border-subtle); font-size: var(--text-2xs); color: var(--text-3); }
.palette-foot span { display: inline-flex; align-items: center; gap: var(--space-3); }

/* ==== findings (suspicious activity) ======================================================================================= */
.finding { display: grid; gap: var(--space-5); padding: var(--space-6); border-bottom: 1px solid var(--border-subtle); position: relative; }
.finding:last-child { border-bottom: 0; }
.finding::before { content: ""; position: absolute; left: 0; top: var(--space-6); bottom: var(--space-6); width: 3px; border-radius: 0 3px 3px 0; background: var(--sev, var(--border-strong)); }
.finding.sev-critical { --sev: var(--critical); } .finding.sev-high { --sev: var(--negative); } .finding.sev-medium { --sev: var(--warning); } .finding.sev-low { --sev: var(--accent); }
.finding-head { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.finding-title { font-size: var(--text-md); font-weight: 600; letter-spacing: -0.005em; flex: 1; min-width: 220px; }
.finding-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-5) var(--space-8); }
.finding-body h4 { font-size: var(--text-xs); font-weight: 500; color: var(--text-3); margin-bottom: var(--space-2); }
.finding-body p { color: var(--text-2); max-width: 70ch; }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.chip-link { display: inline-flex; align-items: center; gap: var(--space-3); height: 24px; padding: 0 var(--space-4); border-radius: var(--radius-xs); border: 1px solid var(--border); background: var(--bg-raised); color: var(--text-1); font-size: var(--text-xs); font-weight: 500; white-space: nowrap; }
.chip-link:hover { border-color: var(--accent-border); background: var(--accent-soft); color: var(--text-1); }
.chip-link .i { width: 12px; height: 12px; color: var(--text-3); }
.steps { display: grid; gap: var(--space-3); counter-reset: step; }
.steps li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: var(--space-4); color: var(--text-2); }
.steps li::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--bg-active); color: var(--text-2); font-size: 10px; font-weight: 650; margin-top: 1px; }
.signal { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: var(--space-5); align-items: center; padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--border-subtle); color: var(--text-1); }
.signal:last-child { border-bottom: 0; }
a.signal:hover { background: var(--bg-hover); color: var(--text-1); }
.signal-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--radius-sm); background: var(--bg-raised); border: 1px solid var(--border-subtle); color: var(--text-3); }
.signal.is-hot .signal-icon { color: var(--sev); border-color: color-mix(in srgb, var(--sev) 40%, var(--border)); background: color-mix(in srgb, var(--sev) 10%, transparent); }
.signal-main { min-width: 0; display: grid; }
.signal-main strong { font-weight: 550; }
.signal-main span { color: var(--text-3); font-size: var(--text-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signal-num { font-family: var(--font-num); font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }
.signal-num.is-zero { color: var(--text-disabled); font-weight: 500; }

/* ==== profile header, checks =============================================================================================== */
.profile { display: flex; align-items: center; gap: var(--space-6); flex-wrap: wrap; margin-bottom: var(--space-7); }
.profile-main { flex: 1; min-width: 240px; display: grid; gap: var(--space-2); }
.profile-name { font-size: var(--text-xl); font-weight: 600; letter-spacing: -0.02em; display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.profile-meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); color: var(--text-2); font-size: var(--text-sm); }
.profile-meta span { display: inline-flex; align-items: center; gap: var(--space-3); }
.profile-meta .i { color: var(--text-3); width: 14px; height: 14px; }
.checks > li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: var(--space-5); align-items: center; padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--border-subtle); }
.checks > li:last-child { border-bottom: 0; }
.checks .i.ok { color: var(--positive); } .checks .i.bad { color: var(--negative); } .checks .i.warn { color: var(--warning); }
.checks strong { font-weight: 550; display: block; }
.checks span.sub { color: var(--text-3); font-size: var(--text-xs); }

/* ==== sign-in ============================================================================================================= */
body.bare { display: grid; place-items: center; padding: var(--space-8); min-height: 100vh; }
.door { width: min(380px, 100%); display: grid; gap: var(--space-8); }
.door-brand { display: flex; align-items: center; gap: var(--space-5); justify-content: center; }
.door-brand .brand-logo { width: 40px; height: 36px; }
.door-brand .brand-text { font-size: 19px; }
.door-brand .brand-text small { font-size: var(--text-md); }
.door-card { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-8); display: grid; gap: var(--space-6); }
.door-card h1 { font-size: var(--text-lg); font-weight: 600; letter-spacing: -0.015em; }
.door-card .btn { height: 34px; }
.door-card .form > .btn-primary { justify-self: stretch; }
.door-note .i { vertical-align: -2px; }
.door-note { text-align: center; color: var(--text-3); font-size: var(--text-xs); }
.form { display: grid; gap: var(--space-6); max-width: 440px; }
.card-narrow .form, .door-card .form { max-width: none; }
.form .btn { justify-self: start; }

/* ==== frame details ========================================================================================================== */
.spacer { flex: 1; }
.center { text-align: center !important; }
.nav-open { display: none; }
.user-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; font-size: var(--text-sm); }
.user-card > div { display: grid; min-width: 0; }
.user-card .faint { font-size: var(--text-xs); }
.menu-panel form { margin: 0; }
.menu-note { padding: var(--space-4); color: var(--text-3); font-size: var(--text-xs); max-width: 280px; }
.menu-panel.views { width: 320px; }
.menu-panel.views .menu-list { max-height: min(46vh, 380px); }
.menu-panel.alerts { width: 340px; }
.alerts-none { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-5) var(--space-4) var(--space-6); color: var(--text-2); }
.alerts-none .i { color: var(--positive); }
.alert-item { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--space-5); padding: var(--space-4); border-radius: var(--radius-sm); color: var(--text-1); }
.alert-item:hover { background: var(--bg-hover); color: var(--text-1); }
.alert-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-sm); color: var(--tone); background: color-mix(in srgb, var(--tone) 13%, transparent); }
.alert-item.is-danger { --tone: var(--negative); } .alert-item.is-warning { --tone: var(--warning); } .alert-item.is-critical { --tone: var(--critical); }
.alert-text { display: grid; gap: 1px; min-width: 0; }
.alert-text strong { font-weight: 550; }
.alert-text span { color: var(--text-3); font-size: var(--text-xs); }
.person-note { margin-left: 6px; color: var(--text-3); font-size: var(--text-xs); white-space: nowrap; }
.change { display: inline-flex; align-items: center; gap: 2px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.change .i { width: 11px; height: 11px; stroke-width: 2; }
.stat-value.is-text { font-family: var(--font-sans); font-weight: 600; font-size: var(--text-lg); letter-spacing: -0.01em; line-height: 1.6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-label .i { color: var(--text-3); }
.title-note { font-size: var(--text-md); font-weight: 400; color: var(--text-3); letter-spacing: 0; margin-left: var(--space-3); }
.search-field { width: min(340px, 60vw); }
.cell-wide { max-width: 260px; }
.row-end { justify-content: flex-end; flex-wrap: nowrap; }
.row-tight { gap: var(--space-3); flex-wrap: nowrap; }
.select-sm { height: var(--control-height-sm); width: auto; padding-right: 26px; font-size: var(--text-xs); background-position: calc(100% - 13px) 10px, calc(100% - 9px) 10px; }
.card-head .row .input, .card-head .row .select { width: auto; }
.card-head .row .input-icon .input { width: 170px; }
.card-head .status-dot { display: inline-block; margin-right: var(--space-3); vertical-align: 1px; }
.card-narrow { max-width: 760px; }
.card-gap { margin-top: var(--space-6); }
.card > .empty { padding-top: var(--space-9); padding-bottom: var(--space-9); }
.table-menus { overflow: visible; }
.col-meter { width: 160px; }
.act-cell { display: inline-flex; align-items: center; gap: var(--space-3); }
.act-cell .i { color: var(--text-3); }
.matrix th.center, .matrix td.center { width: 96px; }
.i.ok { color: var(--positive); } .i.warn { color: var(--warning); } .i.bad { color: var(--negative); } .i.off { color: var(--text-disabled); }
.role-name { width: 76px; flex: none; font-weight: 550; }
.checks > li > div { min-width: 0; }
.checks > li.is-no strong { color: var(--text-3); font-weight: 400; }
.checks-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.checks-cols > li:last-child { border-bottom: 1px solid var(--border-subtle); }
.token.is-plain .token-val { padding-right: 8px; }
.saved-table th[scope="row"] { width: 30%; white-space: normal; }
.empty-foot { display: flex; justify-content: center; align-items: center; gap: var(--space-3); padding-bottom: var(--space-8); color: var(--text-3); font-size: var(--text-xs); }
.empty-page { min-height: 56vh; align-content: center; }
.empty-code { font: 600 var(--text-xs)/1 var(--font-mono); color: var(--text-3); letter-spacing: 0.06em; }
.working { display: flex; gap: var(--space-5); align-items: flex-start; }
.working .status-dot { margin-top: 6px; animation: pulse 1.4s ease-in-out infinite; }
.review-summary { display: grid; gap: var(--space-4); max-width: 92ch; border-bottom: 1px solid var(--border-subtle); }
.review-summary > p:first-child { font-size: var(--text-md); line-height: 1.6; }
.signal.sev-critical { --sev: var(--critical); } .signal.sev-high { --sev: var(--negative); } .signal.sev-medium { --sev: var(--warning); }
.signal.is-hot .signal-num { color: var(--sev); }
.finding .chips { padding-top: var(--space-2); }
.steps li > span { min-width: 0; }

/* ---- lists inside cards ---- */
.feed > li { align-items: center; padding-top: var(--space-4); padding-bottom: var(--space-4); }
.feed-main { flex: 1; min-width: 0; display: grid; }
.feed-main strong, .feed-main .row-link { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-main span { color: var(--text-3); font-size: var(--text-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-end { display: flex; align-items: center; gap: var(--space-4); margin-left: auto; white-space: nowrap; font-size: var(--text-xs); }
.bars.is-people li { grid-template-columns: minmax(120px, 1.2fr) minmax(0, 1fr) auto; }
.bars.is-wide li { grid-template-columns: minmax(120px, 230px) minmax(0, 1fr) auto; }
.bars .name .person { max-width: 100%; }
.kv-cols { grid-template-columns: minmax(150px, max-content) minmax(0, 1fr); }

/* ---- pipeline stages ---- */
.pipe { display: flex; align-items: stretch; gap: 0; }
.pipe-stage { flex: 1 1 0; min-width: 0; display: grid; gap: 2px; align-content: start; padding: var(--space-6); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--bg-raised); }
.pipe-stage.is-warn { border-color: color-mix(in srgb, var(--warning) 50%, var(--border)); }
.pipe-icon { display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: var(--space-4); border-radius: var(--radius-sm); color: var(--area); background: color-mix(in srgb, var(--area) 14%, transparent); }
.pipe-label { color: var(--text-2); font-size: var(--text-xs); font-weight: 500; }
.pipe-num { font-family: var(--font-num); font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1.3; }
.pipe-note { color: var(--text-3); font-size: var(--text-xs); }
.pipe-arrow { display: grid; place-items: center; width: 40px; flex: none; color: var(--text-disabled); }

/* ---- explorer details ---- */
.data.is-static thead th, .data.is-static tr.day th { position: static; }
.data.is-static { border-radius: 0 0 var(--radius-md) var(--radius-md); }
.data.is-static tbody tr:last-child td { border-bottom: 0; }
.data.is-dated col.c-time { width: 138px; }
.data col.c-sum { width: auto; }
.data tr.ev.is-refused .ev-name { color: var(--text-2); }
.ev-who > .person { flex: 0 1 auto; }
.ev-who > .level, .ev-who > .person-note { flex: none; margin-left: 0; }
.ev-who.people { flex-wrap: wrap; gap: var(--space-2) var(--space-5); }
.pager-keys { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--text-3); }
.pager-keys .kbd { margin-left: var(--space-3); }
.pager-window { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pager-bar > span { display: inline-flex; align-items: center; gap: var(--space-2); min-width: 0; }
.pager-bar > span:first-child { color: var(--text-1); flex: none; }
.pager-bar .segmented a { height: 22px; padding: 0 var(--space-4); }
html[data-density="compact"] { --row-height: 30px; }
html[data-density="compact"] .data .cat-icon { width: 18px; height: 18px; }
html[data-density="compact"] .data .avatar { width: 16px; height: 16px; font-size: 8px; }
.sheet-form { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sheet-title { font-size: var(--text-md); font-weight: 600; margin-left: var(--space-3); }
.sheet .hint.wide { margin-top: calc(-1 * var(--space-2)); }

/* ---- the investigation panel ---- */
.ev-page { max-width: 880px; overflow: hidden; }
.ev-kind { color: var(--text-2); font-weight: 500; }
.ev-summary { display: grid; gap: var(--space-5); padding: 0 var(--space-7) var(--space-7); }
.flow-side .person { font-size: var(--text-md); }
.flow-side .person .avatar { width: 24px; height: 24px; font-size: 10.5px; }
.flow-sub { color: var(--text-3); font-size: var(--text-xs); }
.flow-thing { font-size: var(--text-md); font-weight: 500; color: var(--text-1); }
.flow-thing:hover { color: var(--accent); }
.flow-side > .level, .flow-side > .person-note { margin-left: 0; justify-self: start; }
.delta.is-single { grid-template-columns: minmax(0, 1fr); justify-items: start; gap: var(--space-3); }
.delta.is-single .delta-mid { justify-items: start; }
.delta-mid .unit { margin-left: 0; }
.delta-note { color: var(--text-3); font-size: var(--text-xs); max-width: 60ch; }
.delta-num.was { color: var(--text-2); }
.pane h3 .pane-link { margin-left: auto; font-weight: 500; font-size: var(--text-xs); }
.tl-amount { text-align: right; white-space: nowrap; }
.timeline .tl-main strong { font-weight: 600; }
.kv dd .act { display: inline-flex; vertical-align: -2px; color: var(--text-3); }
.kv dd .act:hover { color: var(--accent); text-decoration: none; }
.skeleton.sk-1 { width: 38%; } .skeleton.sk-2 { width: 72%; height: 18px; } .skeleton.sk-3 { width: 55%; } .skeleton.sk-4 { width: 88%; }
.skeleton.sk-5 { width: 80%; } .skeleton.sk-6 { width: 66%; } .skeleton.sk-7 { width: 74%; } .skeleton.sk-8 { width: 48%; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---- investigations: a player's sections, an item's path, a storage place, a transaction's steps ---- */
.tabs a.tab .i { width: 14px; height: 14px; color: var(--text-3); }
.tabs a.tab.is-active .i { color: var(--accent); }
.profile-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: var(--radius-md); background: var(--bg-raised); border: 1px solid var(--border); color: var(--text-2); --icon-fill: var(--accent-fill); --icon-fill-opacity: 0.55; }
.profile-icon .i { width: 22px; height: 22px; }
.profile-name .badge { font-family: var(--font-sans); letter-spacing: 0; }
.profile-meta .person { vertical-align: -3px; }
.c-sum .item-pic { width: 22px; height: 22px; margin-right: var(--space-4); }
.path { display: grid; }
.path > li { position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: var(--space-5); align-items: center; padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--border-subtle); }
.path > li::before { content: ""; position: absolute; left: calc(var(--space-6) + 12px); top: 0; bottom: 0; width: 1px; background: var(--border); }
.path > li:first-child::before { top: 50%; }
.path > li:last-child::before { bottom: 50%; }
.path > li:last-child { border-bottom: 0; }
.path-n, .step-n { position: relative; z-index: 1; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--bg-raised); border: 1px solid var(--border); color: var(--text-2); font: 500 var(--text-xs)/1 var(--font-num); font-variant-numeric: tabular-nums; }
.path > li.is-current .path-n { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--accent-contrast); }
.path > li.is-end .path-n { background: var(--negative-soft); border-color: transparent; color: var(--negative); }
.path-main { display: grid; gap: 3px; min-width: 0; justify-items: start; }
.path-sub { color: var(--text-3); font-size: var(--text-xs); display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.path-sub .person { font-size: var(--text-xs); color: var(--text-2); }
.path-sub .avatar { width: 16px; height: 16px; font-size: 8px; }
.path-when { font-size: var(--text-xs); white-space: nowrap; font-variant-numeric: tabular-nums; }
.path-when a { color: var(--text-2); }
.path-when a:hover { color: var(--accent); }
.timeline.is-steps { padding: var(--space-3); }
.timeline.is-steps li { grid-template-columns: 26px 22px minmax(0, 1fr) auto; }
.timeline.is-steps li::before { left: calc(26px + var(--space-4) + var(--space-4) + 10px); }
.timeline.is-steps li.is-aside .tl-main a { font-weight: 450; color: var(--text-2); }
.timeline.is-steps li.is-aside .step-n { background: none; border-style: dashed; }
.ledger > li { align-items: center; }
.ledger .feed-end.chips { flex-wrap: nowrap; }
.ledger .feed-main > span { white-space: normal; }
.moved > li { flex-wrap: wrap; row-gap: var(--space-3); }
.moved .feed-end.chips { flex-wrap: wrap; flex-basis: 100%; margin-left: 0; }
.delta-mid.is-item { display: flex; align-items: center; gap: var(--space-5); justify-items: start; }
.delta-mid.is-item > div { display: grid; gap: 2px; min-width: 0; }
.delta-mid.is-item .amt { font-family: var(--font-sans); font-size: var(--text-lg); font-weight: 600; color: var(--text-1); }
.delta-mid.is-item .amt:hover { color: var(--accent); }
.tech { border-top: 1px solid var(--border-subtle); padding-top: var(--space-5); }
.tech > summary { cursor: pointer; width: fit-content; font-size: var(--text-xs); font-weight: 600; color: var(--text-2); list-style: none; display: flex; align-items: center; gap: var(--space-3); }
.tech > summary::-webkit-details-marker { display: none; }
.tech > summary::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform var(--dur-fast); margin-right: 2px; }
.tech[open] > summary::before { transform: rotate(45deg); }
.tech > summary:hover { color: var(--text-1); }
.tech > summary .faint { font-weight: 400; }
.tech[open] > summary { margin-bottom: var(--space-5); }
.rules { display: grid; gap: var(--space-4); padding: var(--space-5) var(--space-6) var(--space-6); border-top: 1px solid var(--border-subtle); }
.rules li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: var(--space-4); color: var(--text-2); font-size: var(--text-xs); }
.rules li .i { width: 14px; height: 14px; color: var(--text-3); margin-top: 2px; }
.rules strong { color: var(--text-1); font-weight: 550; }
.sheet details.fgroup { border-top: 1px solid var(--border-subtle); }
.sheet details.fgroup:first-of-type { border-top: 0; }
.sheet details.fgroup > summary { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-5) 0; cursor: pointer; list-style: none; font-size: var(--text-sm); font-weight: 600; }
.sheet details.fgroup > summary::-webkit-details-marker { display: none; }
.sheet details.fgroup > summary::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-right: 1.5px solid var(--text-3); border-bottom: 1.5px solid var(--text-3); transform: rotate(45deg); transition: transform var(--dur-fast); }
.sheet details.fgroup[open] > summary::after { transform: rotate(-135deg); }
.sheet details.fgroup > summary .badge { font-weight: 600; }
.sheet details.fgroup > .sheet-grid { padding-bottom: var(--space-7); }
.cov { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--border-subtle); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.cov > div { background: var(--bg-surface); padding: var(--space-5) var(--space-6); display: grid; gap: 2px; }
.cov strong { font: 500 20px/1.2 var(--font-num); font-variant-numeric: tabular-nums; }
.cov span { color: var(--text-3); font-size: var(--text-xs); }
.ev-item { flex: none; display: inline-flex; border-radius: var(--radius-sm); }
.ev-item:hover .item-pic, .ev-item:focus-visible .item-pic { box-shadow: 0 0 0 1px var(--accent); }
.cov > a.cov-cell { background: var(--bg-surface); padding: var(--space-5) var(--space-6); display: grid; gap: 2px; color: inherit; text-decoration: none; transition: background var(--dur-fast); }
.cov > a.cov-cell:hover { background: var(--bg-hover); }
.cov > a.cov-cell.is-active { background: var(--bg-selected); box-shadow: inset 0 -2px 0 var(--accent); }
.cov .cov-name { color: var(--text-1); font-size: var(--text-sm); font-weight: 550; }
.cell-sub { display: block; color: var(--text-3); font-size: var(--text-xs); font-family: var(--font-sans); font-weight: 400; margin-top: 1px; }
.table-cov { table-layout: fixed; min-width: 900px; }
.table-cov th, .table-cov td { white-space: normal; height: auto; padding-top: var(--space-4); padding-bottom: var(--space-4); vertical-align: top; overflow-wrap: anywhere; }
.table-cov thead th:nth-child(1) { width: 204px; }
.table-cov thead th:nth-child(2) { width: 27%; }
.table-cov thead th:nth-child(3) { width: 19%; }
.table-cov thead th:nth-child(4) { width: 17%; }
.table-cov td { color: var(--text-2); }
.table-cov td:first-child { white-space: nowrap; }
.table-cov td:nth-child(4) { font-size: var(--text-xs); }
.filter-inline { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-left: auto; }
.filter-inline .input-icon { width: 200px; }
.input-sm { height: var(--control-height-sm); font-size: var(--text-xs); }
.rules-box { padding: var(--space-4) var(--space-6); }
.rules-box[open] { padding-bottom: 0; }
.rules-box > .rules { margin: 0 calc(-1 * var(--space-6)); list-style: none; }
details.fold > summary { cursor: pointer; list-style: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary .fold-mark { margin-left: auto; width: 7px; height: 7px; border-right: 1.5px solid var(--text-3); border-bottom: 1.5px solid var(--text-3); transform: rotate(45deg); transition: transform var(--dur-fast); }
details.fold[open] > summary .fold-mark { transform: rotate(-135deg); }
details.fold:not([open]) > summary { border-bottom: 0; }
@media (max-width: 900px) { .filter-inline { margin-left: 0; width: 100%; } .filter-inline .input-icon { flex: 1; width: auto; } }
/* two cards side by side need about 480 px each for their tables: under that they stack (a tablet held upright) */
@media (max-width: 960px) { .grid.stack-narrow, .grid.cols-2 { grid-template-columns: minmax(0, 1fr); } }

/* ==== poker and casino ====================================================================================================== */
/* Cards, the felt and chips are things, not chrome: they keep their own colours in both themes (a card is white paper
   wherever it lies). A four-colour deck, as poker tools use: spades ink, hearts red, diamonds blue, clubs green. A suit
   is never told by colour alone: the pip is always drawn and every card has a spoken name. */
:root {
  --pk-face: #F7F8FC; --pk-face-muck: #E1E4EF; --pk-edge: rgba(18, 20, 42, 0.18); --pk-muck-line: #5C6389;
  --pk-s: #171A2C; --pk-h: #CF2E3A; --pk-d: #2460C8; --pk-c: #17734A;
  --pk-back: var(--indigo-700); --pk-back-line: rgba(255, 255, 255, 0.3);
  --pk-felt: #20255C; --pk-rail: #2D3380; --pk-felt-line: rgba(255, 255, 255, 0.1);
  --pk-on-felt: #EEF0FF; --pk-on-felt-2: #B4B9E8; --pk-win: var(--positive); --pk-bubble: rgba(9, 11, 28, 0.84);
}

/* ---- a card: its width is --w, everything on it is a share of that ---- */
.pk-cards { display: inline-flex; gap: 3px; flex: none; vertical-align: middle; }
.pk-cards-xs { gap: 2px; } .pk-cards-md { gap: 4px; } .pk-cards-lg { gap: 6px; }
.pk-card { --w: 30px; position: relative; display: inline-block; flex: none; width: var(--w); height: calc(var(--w) * 1.4); border-radius: calc(var(--w) * 0.13); background: var(--pk-face); color: var(--pk-s); box-shadow: inset 0 0 0 1px var(--pk-edge); line-height: 1; user-select: none; }
.pk-card.pk-xs { --w: 21px; } .pk-card.pk-md { --w: 44px; } .pk-card.pk-lg { --w: 60px; }
.pk-card.pk-h { color: var(--pk-h); } .pk-card.pk-d { color: var(--pk-d); } .pk-card.pk-c { color: var(--pk-c); }
.pk-idx { position: absolute; left: calc(var(--w) * 0.1); top: calc(var(--w) * 0.1); display: grid; justify-items: center; gap: calc(var(--w) * 0.04); }
.pk-rank { font: 700 calc(var(--w) * 0.45)/0.9 var(--font-num); letter-spacing: -0.03em; }
.pk-pip, .pk-big { display: block; fill: currentColor; }
.pk-pip { width: calc(var(--w) * 0.28); height: calc(var(--w) * 0.28); }
.pk-big { position: absolute; right: calc(var(--w) * 0.09); bottom: calc(var(--w) * 0.1); width: calc(var(--w) * 0.46); height: calc(var(--w) * 0.46); }
.pk-xs .pk-big { display: none; }
.pk-xs .pk-idx { inset: 0; align-content: center; gap: 1px; }
.pk-xs .pk-rank { font-size: 12px; }
.pk-xs .pk-pip { width: 9px; height: 9px; }
.pk-card.is-dim { opacity: 0.4; }
.pk-card.is-win { box-shadow: inset 0 0 0 1px var(--pk-edge), 0 0 0 2px var(--pk-win); }
.pk-card.is-muck { background: var(--pk-face-muck); box-shadow: none; outline: 1.5px dashed var(--pk-muck-line); outline-offset: -1.5px; }
.pk-card.is-back { display: inline-grid; place-items: center; background: var(--pk-back); box-shadow: inset 0 0 0 1px var(--pk-edge), inset 0 0 0 calc(var(--w) * 0.08) var(--pk-back), inset 0 0 0 calc(var(--w) * 0.08 + 1px) var(--pk-back-line); }
.pk-card.is-back .pk-mark { width: 54%; height: 54%; --logo-ink: #FFFFFF; --logo-brand: var(--indigo-200); }
.pk-card.is-slot { background: none; box-shadow: none; border: 1.5px dashed var(--border-strong); }
.pk-chips { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.pk-chips .i { width: 14px; height: 14px; color: var(--warning); --icon-fill: var(--warning); --icon-fill-opacity: 0.3; }
.pk-chips .num { font-family: var(--font-num); font-weight: 500; }
.pk-chips.is-pot .num { font-size: var(--text-lg); }
.pk-role { display: inline-grid; place-items: center; flex: none; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; font: 700 10px/1 var(--font-sans); text-decoration: none; cursor: help; }
.pk-role-d { background: var(--pk-face); color: var(--pk-s); box-shadow: inset 0 0 0 1px var(--pk-edge); }
.pk-role-sb, .pk-role-bb { color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border-strong); }

/* ---- the list of hands: who held what, the board, the pot; the whole line opens the hand ---- */
.pk-filter { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; color: var(--text-2); }
.pk-hands { display: grid; }
.pk-hand { position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr) auto 118px; grid-template-areas: "meta seats board pot"; align-items: center; gap: var(--space-4) var(--space-7); padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--border-subtle); transition: background var(--dur-fast); }
.pk-hand:last-child { border-bottom: 0; }
.pk-hand:hover { background: var(--bg-hover); }
.pk-hand-meta { grid-area: meta; display: grid; gap: 1px; min-width: 0; font-size: var(--text-xs); }
.pk-hand-id { font-size: var(--text-sm); font-weight: 600; color: var(--text-1); }
.pk-hand-id::after { content: ""; position: absolute; inset: 0; }
.pk-hand:hover .pk-hand-id { color: var(--accent); text-decoration: none; }
.pk-hand-id:focus-visible { outline: none; }
.pk-hand-id:focus-visible::after { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: var(--radius-sm); }
.pk-hand-where { color: var(--text-2); }
.pk-hand-seats { grid-area: seats; display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-8); min-width: 0; }
.pk-hseat { display: flex; align-items: center; gap: var(--space-4); min-width: 0; flex: 1 1 200px; max-width: 280px; }
.pk-hseat-who { display: grid; gap: 1px; min-width: 0; }
.pk-hseat-who .person { position: relative; z-index: 1; width: fit-content; }   /* above the line's own link: a name opens the player */
.pk-hseat-note { display: flex; align-items: baseline; gap: var(--space-3); padding-left: 27px; font-size: var(--text-xs); white-space: nowrap; }
.pk-hseat.is-winner .person-name { font-weight: 650; }
.pk-hand-board { grid-area: board; display: flex; }
.pk-hand-pot { grid-area: pot; display: grid; justify-items: end; gap: 2px; font-size: var(--text-xs); }
.pk-hand-tags { display: flex; gap: var(--space-2); margin-top: 2px; }
.pk-stat-cards { overflow: visible; white-space: normal; line-height: 1; padding: 3px 0 2px; }
.pk-stat-cards .pk-cards { flex-wrap: wrap; }

/* ---- one hand at the table. The moments are radio buttons: the one that is checked shows its picture. ---- */
.pk-replay { position: relative; }
.pk-step { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.pk-bar { display: flex; align-items: center; gap: var(--space-5); flex-wrap: wrap; padding: var(--space-4) var(--space-6); border-bottom: 1px solid var(--border-subtle); }
.pk-steps { display: inline-flex; max-width: 100%; padding: 2px; gap: 2px; overflow-x: auto; border-radius: var(--radius-sm); background: var(--bg-inset); border: 1px solid var(--border); }
.pk-steps label { display: inline-flex; align-items: center; height: 26px; padding: 0 var(--space-5); border-radius: var(--radius-xs); color: var(--text-2); font-size: var(--text-xs); font-weight: 500; white-space: nowrap; cursor: pointer; }
.pk-steps label:hover { color: var(--text-1); }
.pk-play { margin-left: auto; }
.pk-play[hidden] { display: none; }
.pk-play[aria-pressed="true"] { border-color: var(--accent-border); color: var(--accent); }
.pk-step:nth-of-type(1):checked ~ .pk-bar label:nth-of-type(1), .pk-step:nth-of-type(2):checked ~ .pk-bar label:nth-of-type(2), .pk-step:nth-of-type(3):checked ~ .pk-bar label:nth-of-type(3),
.pk-step:nth-of-type(4):checked ~ .pk-bar label:nth-of-type(4), .pk-step:nth-of-type(5):checked ~ .pk-bar label:nth-of-type(5), .pk-step:nth-of-type(6):checked ~ .pk-bar label:nth-of-type(6) { background: var(--bg-active); color: var(--text-1); box-shadow: 0 0 0 1px var(--border); }
.pk-step:nth-of-type(1):focus-visible ~ .pk-bar label:nth-of-type(1), .pk-step:nth-of-type(2):focus-visible ~ .pk-bar label:nth-of-type(2), .pk-step:nth-of-type(3):focus-visible ~ .pk-bar label:nth-of-type(3),
.pk-step:nth-of-type(4):focus-visible ~ .pk-bar label:nth-of-type(4), .pk-step:nth-of-type(5):focus-visible ~ .pk-bar label:nth-of-type(5), .pk-step:nth-of-type(6):focus-visible ~ .pk-bar label:nth-of-type(6) { outline: 2px solid var(--focus); outline-offset: 1px; }
.pk-frames { container: pk / inline-size; padding: var(--space-6); }
.pk-frame { display: none; }
.pk-step:nth-of-type(1):checked ~ .pk-frames > .pk-frame:nth-child(1), .pk-step:nth-of-type(2):checked ~ .pk-frames > .pk-frame:nth-child(2), .pk-step:nth-of-type(3):checked ~ .pk-frames > .pk-frame:nth-child(3),
.pk-step:nth-of-type(4):checked ~ .pk-frames > .pk-frame:nth-child(4), .pk-step:nth-of-type(5):checked ~ .pk-frames > .pk-frame:nth-child(5), .pk-step:nth-of-type(6):checked ~ .pk-frames > .pk-frame:nth-child(6) { display: block; }
.pk-table { --pk-win: #2FB277; position: relative; height: 520px; max-width: 980px; margin: 0 auto; }
.pk-felt { position: absolute; inset: 95px 13%; display: grid; place-content: center; justify-items: center; gap: var(--space-5); border-radius: 999px; background: var(--pk-felt); box-shadow: inset 0 0 0 9px var(--pk-rail), inset 0 0 0 10px var(--pk-felt-line); color: var(--pk-on-felt); }
.pk-pot { display: flex; align-items: baseline; gap: var(--space-4); }
.pk-pot-label { font-size: var(--text-xs); color: var(--pk-on-felt-2); }
.pk-pot-num { font: 500 24px/1.1 var(--font-num); letter-spacing: 0.01em; }
.pk-board { display: flex; }
.pk-board .pk-card { --w: clamp(34px, 12.5cqw, 60px); }
.pk-felt .pk-card.is-slot { border-color: rgba(255, 255, 255, 0.24); }
.pk-felt::after { content: ""; position: absolute; inset: 26px; border-radius: 999px; border: 1px solid var(--pk-felt-line); pointer-events: none; }
.pk-felt-name { display: inline-flex; align-items: center; gap: 7px; font-size: var(--text-xs); font-weight: 500; letter-spacing: 0.04em; color: var(--pk-on-felt-2); opacity: 0.8; }
.pk-felt-logo { width: 16px; height: 14px; --logo-ink: var(--pk-on-felt-2); --logo-brand: var(--pk-on-felt-2); }
.pk-seat { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 5px; width: clamp(132px, 18cqw, 176px); }
.pk-seat.is-top { flex-direction: column-reverse; }
.pk-p0 { left: 50%; top: 85%; } .pk-p1 { left: 30%; top: 80.3%; } .pk-p2 { left: 15.4%; top: 67.5%; } .pk-p3 { left: 10%; top: 50%; }
.pk-p4 { left: 15.4%; top: 32.5%; } .pk-p5 { left: 30%; top: 19.7%; } .pk-p6 { left: 50%; top: 15%; } .pk-p7 { left: 70%; top: 19.7%; }
.pk-p8 { left: 84.6%; top: 32.5%; } .pk-p9 { left: 90%; top: 50%; } .pk-p10 { left: 84.6%; top: 67.5%; } .pk-p11 { left: 70%; top: 80.3%; }
.pk-seat-cards { position: relative; z-index: 1; display: flex; }
.pk-seat-say { order: -1; display: flex; justify-content: center; min-height: 24px; max-width: 100%; }
.pk-bubble { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1px 6px; max-width: 100%; min-height: 24px; padding: 4px 10px; border-radius: 12px; background: var(--pk-bubble); color: #EEF0FF; font-size: var(--text-xs); font-weight: 500; line-height: 16px; white-space: nowrap; }
.pk-bubble .pk-chips .i { color: #E7B23C; --icon-fill: #E7B23C; }
.pk-bubble .pk-won { color: #4CD18F; font: 500 var(--text-sm)/1 var(--font-num); }
.pk-bubble .pk-late { color: #E7B23C; }
.pk-plate { position: relative; z-index: 1; display: grid; gap: 2px; justify-items: center; width: 100%; padding: 6px 10px 7px; border-radius: var(--radius-md); background: var(--bg-raised); border: 1px solid var(--border); }
.pk-plate-who { display: flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; }
.pk-plate-stack { display: flex; align-items: baseline; gap: 6px; font: 500 var(--text-md)/1.2 var(--font-num); }
.pk-plate-seat { font: 400 var(--text-2xs)/1 var(--font-sans); color: var(--text-3); }
.pk-seat.is-winner .pk-plate { border-color: var(--pk-win); box-shadow: 0 0 0 1px var(--pk-win); }
.pk-seat.is-folded .pk-plate { opacity: 0.62; }
/* seven or more players: smaller seats, so twelve places still do not touch */
.pk-table.is-crowded .pk-seat { width: clamp(108px, 13.5cqw, 136px); gap: 3px; }
.pk-table.is-crowded .pk-seat-cards .pk-card { --w: 32px; }
.pk-table.is-crowded .pk-plate { padding: 4px 6px 5px; }
.pk-table.is-crowded .pk-plate-stack { font-size: var(--text-sm); }
.pk-table.is-crowded .pk-plate-seat { display: none; }
/* no room for a table (a phone), or more players than it has places: the felt on top, the seats as a list under it */
.pk-table.is-list { display: grid; gap: var(--space-5); height: auto; }
.pk-table.is-list .pk-felt { position: relative; inset: auto; padding: var(--space-7) var(--space-5); border-radius: 36px; }
.pk-table.is-list .pk-felt::after { inset: 13px; border-radius: 24px; }
.pk-table.is-list .pk-seat { position: static; transform: none; width: auto; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "cards plate" "cards say"; align-items: center; gap: var(--space-2) var(--space-5); }
.pk-table.is-list .pk-seat-cards { grid-area: cards; }
.pk-table.is-list .pk-plate { grid-area: plate; justify-items: start; }
.pk-table.is-list .pk-seat-say { grid-area: say; justify-content: flex-start; min-height: 0; }
@container pk (max-width: 760px) {
  .pk-table { display: grid; gap: var(--space-5); height: auto; }
  .pk-felt { position: relative; inset: auto; padding: var(--space-7) var(--space-5); border-radius: 36px; }
  .pk-felt::after { inset: 13px; border-radius: 24px; }
  .pk-pot { flex-direction: column; align-items: center; gap: 0; }
  .pk-seat, .pk-seat.is-top { position: static; transform: none; width: auto; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "cards plate" "cards say"; align-items: center; gap: var(--space-2) var(--space-5); }
  .pk-seat-cards { grid-area: cards; }
  .pk-plate { grid-area: plate; justify-items: start; }
  .pk-seat-say { grid-area: say; justify-content: flex-start; min-height: 0; }
}

/* ---- the actions of a hand street by street, and what each player ended with ---- */
.pk-log { display: grid; }
.pk-street { padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--border-subtle); }
.pk-street:last-child { border-bottom: 0; }
.pk-street-head { display: flex; align-items: center; gap: var(--space-4); margin-bottom: var(--space-3); font-size: var(--text-sm); font-weight: 600; }
.pk-street-pot { margin-left: auto; font-size: var(--text-xs); font-weight: 400; color: var(--text-3); white-space: nowrap; }
.pk-street-pot .num { font-family: var(--font-num); font-weight: 500; color: var(--text-2); }
.pk-street-none { color: var(--text-3); font-size: var(--text-xs); }
.pk-acts { display: grid; }
.pk-act { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(64px, auto) minmax(84px, auto); align-items: center; gap: var(--space-4); min-height: 32px; font-size: var(--text-sm); }
.pk-act-who { min-width: 0; display: flex; }
.pk-act-what { color: var(--text-2); }
.pk-act-amount, .pk-act-stack { text-align: right; font-family: var(--font-num); white-space: nowrap; }
.pk-act-stack { color: var(--text-3); }
.pk-act-raise .pk-act-what, .pk-act-bet .pk-act-what, .pk-act-allin .pk-act-what { color: var(--text-1); font-weight: 600; }
.pk-act-fold .pk-act-what, .pk-act-check .pk-act-what { color: var(--text-3); }
.pk-act-uncalled .pk-act-amount { color: var(--positive); }
.pk-results { display: grid; }
.pk-result { display: grid; gap: var(--space-5); padding: var(--space-6); border-bottom: 1px solid var(--border-subtle); }
.pk-result:last-child { border-bottom: 0; }
.pk-result-top { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.pk-result-top .person { margin-right: var(--space-2); }
.pk-result-net { margin-left: auto; font: 500 var(--text-lg)/1.2 var(--font-num); }
.pk-result-cards { display: flex; align-items: center; gap: var(--space-6); flex-wrap: wrap; }
.pk-result-hand { display: grid; gap: var(--space-3); justify-items: start; }
.pk-result-name { font-weight: 600; }
.pk-result-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.pk-result-nums dt { font-size: var(--text-xs); color: var(--text-3); }
.pk-result-nums dd { font: 500 var(--text-md)/1.4 var(--font-num); }
.pk-flags { display: grid; }
.pk-flags.is-scroll { max-height: 520px; overflow-y: auto; }
.pk-flags > li { display: grid; gap: var(--space-3); padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--border-subtle); }
.pk-flags > li:last-child { border-bottom: 0; }
.pk-flag-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); font-size: var(--text-xs); }
.pk-flag-text { color: var(--text-2); font-size: var(--text-xs); overflow-wrap: anywhere; }
.pk-flag-links { display: flex; gap: var(--space-5); font-size: var(--text-xs); }
.pk-flags.is-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.pk-flags.is-grid > li { border-bottom: 0; box-shadow: 1px 0 0 var(--border-subtle), 0 1px 0 var(--border-subtle); }
.pk-legend { display: grid; gap: var(--space-3); padding: var(--space-5) var(--space-6); border-top: 1px solid var(--border-subtle); font-size: var(--text-xs); }
.pk-legend > div { display: grid; grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); gap: var(--space-5); }
.pk-legend dt { color: var(--text-2); font-weight: 600; }
.pk-legend dd { color: var(--text-3); }

/* ---- the other casino games: a small picture of what a round came to ---- */
.cz-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1px; border-radius: 0 0 var(--radius-md) var(--radius-md); overflow: hidden; }
.cz-game { display: grid; grid-template-columns: 108px minmax(0, 1fr); align-items: center; gap: var(--space-6); padding: var(--space-6); color: var(--text-1); box-shadow: 1px 0 0 var(--border-subtle), 0 1px 0 var(--border-subtle); transition: background var(--dur-fast); }
a.cz-game:hover { background: var(--bg-hover); color: var(--text-1); text-decoration: none; }
.cz-game.is-active { background: var(--bg-selected); box-shadow: inset 0 -2px 0 var(--accent); }
.cz-emblem { display: flex; align-items: center; justify-content: center; gap: 3px; height: 64px; border-radius: var(--radius-md); background: var(--pk-felt); box-shadow: inset 0 0 0 3px var(--pk-rail); color: var(--pk-on-felt); }
.cz-emblem .cz-pocket { width: 24px; height: 24px; font-size: 11px; }
.cz-game-main { display: grid; gap: 2px; min-width: 0; }
.cz-game-name { font-size: var(--text-md); font-weight: 600; }
.cz-game-sub { color: var(--text-3); font-size: var(--text-xs); }
.cz-game-nums { display: flex; gap: var(--space-6); margin-top: var(--space-3); color: var(--text-3); font-size: var(--text-xs); }
.cz-game-nums > span { display: grid; }
.cz-game-nums strong { font: 500 var(--text-md)/1.3 var(--font-num); color: var(--text-1); }
.cz-game-nums strong.amt-in { color: var(--positive); } .cz-game-nums strong.amt-out { color: var(--negative); }
.cz-pic { display: inline-flex; align-items: center; gap: var(--space-4); vertical-align: middle; }
.cz-pic-text { color: var(--text-2); font-size: var(--text-xs); }
.cz-pocket { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; color: #FFFFFF; font: 700 13px/1 var(--font-num); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.24); }
.cz-red { background: var(--pk-h); } .cz-green { background: var(--pk-c); }
.cz-black { background: var(--pk-s); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.24), 0 0 0 1px var(--border-strong); }
.cz-reels { display: inline-flex; gap: 2px; padding: 2px; border-radius: 6px; background: var(--bg-inset); box-shadow: inset 0 0 0 1px var(--border); }
.cz-reel { display: inline-grid; place-items: center; width: 20px; height: 24px; border-radius: 4px; background: var(--pk-face); color: var(--pk-s); font: 700 13px/1 var(--font-num); }
.cz-totals { display: inline-flex; align-items: center; gap: 5px; }
.cz-total { display: inline-grid; place-items: center; min-width: 28px; height: 26px; padding: 0 5px; border-radius: 5px; background: var(--bg-active); color: var(--text-1); font: 700 13px/1 var(--font-num); }
.cz-total.is-house { background: none; box-shadow: inset 0 0 0 1px var(--border-strong); }
.cz-total.is-own { box-shadow: inset 0 0 0 1.5px var(--accent); }
.cz-total.is-bust { color: var(--negative); text-decoration: line-through; }
.cz-vs { color: var(--text-3); font-size: var(--text-xs); }
.cz-when { color: var(--text-2); }
.cz-when:hover { color: var(--accent); }
.cz-rounds td, .cz-rounds th { height: 44px; }
.cz-bet-label { display: none; }
@media (max-width: 1180px) {
  .pk-hand { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "meta pot" "seats board"; }
  .pk-hand-pot { grid-auto-flow: column; align-items: baseline; gap: var(--space-4); }
}
@media (max-width: 760px) {
  .pk-hand { grid-template-areas: "meta pot" "seats seats" "board board"; }
  .pk-hseat { flex-basis: 100%; max-width: none; }
  .pk-hand-pot { grid-auto-flow: row; gap: 2px; }
  .pk-legend > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pk-act { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  .pk-act-stack { display: none; }
  .pk-result-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pk-frames { padding: var(--space-5); }
  .pk-steps { display: flex; flex: 1 1 100%; }
  .pk-steps label { flex: 1 1 auto; justify-content: center; padding: 0 var(--space-2); }
  .pk-play { margin-left: 0; }
  .cz-game { grid-template-columns: 100px minmax(0, 1fr); gap: var(--space-5); }
  /* a round becomes a small card: who and the result, the picture, then the game, the time and the bet */
  .cz-rounds, .cz-rounds tbody { display: block; }
  .cz-rounds thead { display: none; }
  .cz-rounds tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who res" "pic pic" "game bet" "when when"; align-items: center; gap: var(--space-3) var(--space-5); padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--border-subtle); }
  .cz-rounds tbody tr:last-child { border-bottom: 0; }
  .cz-rounds tbody td, .cz-rounds tbody th { display: block; height: auto; padding: 0; border: 0; white-space: normal; }
  .cz-rounds tbody tr > .c-when, .cz-rounds tbody tr > .c-res { padding: 0; }
  .cz-rounds .c-who { grid-area: who; min-width: 0; } .cz-rounds .c-res { grid-area: res; } .cz-rounds .c-pic { grid-area: pic; }
  .cz-rounds .c-game { grid-area: game; font-size: var(--text-xs); } .cz-rounds .c-bet { grid-area: bet; font-size: var(--text-xs); color: var(--text-2); }
  .cz-rounds .c-when { grid-area: when; font-size: var(--text-xs); }
  .cz-bet-label { display: inline; color: var(--text-3); }
}

/* ==== motion =============================================================================================================== */
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes drawer-in { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; } }

/* ==== responsive ============================================================================================================ */
@media (max-width: 1500px) { .data col.c-origin { width: 1px; } .data th.c-origin, .data td.c-origin { display: none; } }
@media (max-width: 1280px) { :root { --page-pad: var(--space-7); } .data col.c-who { width: 220px; } .data col.c-event { width: 200px; } .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) {
  .app, html[data-sidebar="collapsed"] .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; width: var(--sidebar-width); transform: translateX(-102%); transition: transform var(--dur-slow) var(--ease-out); box-shadow: var(--shadow-pop); }
  html[data-nav="open"] .sidebar { transform: none; }
  html[data-nav="open"] .frame::after { content: ""; position: fixed; inset: 0; z-index: calc(var(--z-sidebar) - 1); background: var(--scrim); animation: fade-in var(--dur-base) ease-out; }
  html[data-sidebar="collapsed"] .brand-text, html[data-sidebar="collapsed"] .nav-text, html[data-sidebar="collapsed"] .nav-label { display: revert; }
  html[data-sidebar="collapsed"] .nav-item { justify-content: flex-start; padding: 0 var(--space-4); }
  html[data-sidebar="collapsed"] .brand { padding: 0 var(--space-6); justify-content: flex-start; }
  .cols-main, .cols-3 { grid-template-columns: minmax(0, 1fr); }
  .search-trigger { width: auto; flex: 0 1 220px; }
  .nav-open { display: inline-grid; }
  .sidebar-toggle { display: none; }
  .pager-keys, .pager-window { display: none; }
}
@media (max-width: 900px) {
  /* the event grid becomes a list: time and event on one line, people and the summary under it */
  .data, .data tbody, .data tr, .data td { display: block; }
  .data colgroup, .data thead { display: none; }
  .data tr.ev { position: relative; padding: var(--space-4) var(--space-6) var(--space-4) var(--space-7); border-bottom: 1px solid var(--border-subtle); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--space-5); }
  .data tr.ev td { height: auto; padding: 0; border: 0; }
  .data tr.ev td.c-rail { position: absolute; left: 0; top: 0; bottom: 0; width: 14px; }
  .data tr.ev td.c-time { grid-column: 2; grid-row: 1; }
  .data tr.ev td.c-event { grid-column: 1; grid-row: 1; }
  .data tr.ev td.c-who, .data tr.ev td.c-sum { grid-column: 1 / -1; }
  .data tr.ev td.c-sum { white-space: normal; overflow-wrap: anywhere; }   /* a card has the room to say all of it */
  .data tr.ev td.c-amount { grid-column: 1 / -1; text-align: left; }
  .data tr.day th { display: block; position: static; }
  .page.is-fill { height: auto; overflow: visible; }
  .explorer { overflow: visible; }
  .data-wrap { overflow: visible; }
  .pager-bar { height: auto; flex-wrap: wrap; padding-top: var(--space-4); padding-bottom: var(--space-4); }
  /* the search field takes the room: only where we are is said, not the way there */
  .crumbs a, .crumbs .i, .crumbs > span:not([aria-current]) { display: none; }
}
@media (max-width: 760px) {
  :root { --page-pad: var(--space-6); --row-height: 44px; }
  .cols-2, .cols-4 { grid-template-columns: minmax(0, 1fr); }
  .search-trigger span, .search-trigger .kbd { display: none; }
  .search-trigger { flex: none; width: var(--control-height); padding: 0; justify-content: center; border-color: transparent; background: none; }
  .user-name { display: none; }
  .query-row { flex-wrap: wrap; }
  .query-row > .query { flex: 1 1 100%; }
  .pipe { flex-direction: column; }
  .pipe-arrow { width: auto; height: 28px; transform: rotate(90deg); }
  .page-head { align-items: stretch; }
  .search-field { width: 100%; }
  .drawer { width: 100vw; }
  .stat { flex-basis: 140px; padding: var(--space-5); }
  .stat-value { font-size: var(--text-xl); }
  .query-input { min-width: 0; flex: 1 1 110px; }
  .query-box > .kbd { display: none; }
  .sheet-grid, .pop-grid { grid-template-columns: minmax(0, 1fr); min-width: 0; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 0; } .kv dd { margin-bottom: var(--space-4); }
  .delta { grid-template-columns: minmax(0, 1fr); } .delta-side.is-after { text-align: left; }
  .timeline li { grid-template-columns: 54px 22px minmax(0, 1fr); } .timeline li > .amt { grid-column: 3; }
  .timeline li::before { left: calc(54px + var(--space-4) + var(--space-4) + 10px); }
  /* who did it and to whom, one above the other: side by side their names were cut to a few letters */
  .flow { flex-direction: column; }
  .flow-side + .flow-side { border-left: 0; }
  .flow-arrow { width: auto; height: 24px; border-left: 0; border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
  .flow-arrow .i { transform: rotate(90deg); }
  /* a check's one-line explanation, and a list row's second line, are read here, not skimmed: they wrap */
  .signal-main span, .feed-main span { white-space: normal; overflow: visible; }
  /* a card's title keeps a readable width; what stood beside it (a note, a badge) goes under it when there is no room */
  .card-head { flex-wrap: wrap; row-gap: var(--space-2); }
  .card-head .section-title { flex: 1 1 14em; }
  /* the item's path: the time goes under the place instead of squeezing it */
  .path > li { grid-template-columns: 26px minmax(0, 1fr); row-gap: var(--space-2); }
  .path-when { grid-column: 2; }
  /* on a phone a step's line is what the page is for: it wraps instead of being cut */
  .timeline.is-steps li { align-items: start; }
  .timeline.is-steps li::before { left: calc(26px + var(--space-4) + var(--space-4) + 10px); }
  .timeline.is-steps .tl-main span { white-space: normal; overflow: visible; overflow-wrap: anywhere; }
}
@media print {
  .sidebar, .topbar, .filterbar, .query, .pager-bar, .drawer-bar, .page-actions { display: none !important; }
  .app { display: block; } .page.is-fill { height: auto; overflow: visible; } .data-wrap { overflow: visible; }
  .drawer { position: static; width: auto; box-shadow: none; }
}

/* ==== kills ========================================================================================================== */
/* the complaint look-up: the two things a complaint gives (an in-game id, a rough time) come first and stay on one row */
.lookup { display: grid; grid-template-columns: 96px minmax(170px, 1.5fr) repeat(4, minmax(116px, 1fr)) auto; gap: var(--space-5); align-items: end; }
.lookup-go { display: flex; gap: var(--space-3); }
.sid { display: inline-block; margin-left: 6px; padding: 2px 5px; border-radius: var(--radius-xs); border: 1px solid var(--border-subtle); background: var(--bg-raised); color: var(--text-2); font: 500 var(--text-2xs)/1.2 var(--font-mono); font-feature-settings: "zero"; white-space: nowrap; vertical-align: middle; }
.weapon { display: inline-flex; align-items: center; gap: var(--space-3); }
.weapon .i { color: var(--text-3); }
.weapon-vehicle .i { color: var(--warning); }
.weapon-heavy .i, .weapon-thrown .i { color: var(--critical); }
.weapon-sniper .i { color: var(--accent); }
a.plain { color: inherit; }
a.plain:hover { color: var(--accent); }
.table tbody tr.is-current, .table tbody tr.is-current:hover { background: var(--accent-soft); }
.table tbody tr.is-current td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
.kill-note { font-size: var(--text-xs); margin-top: var(--space-2); }
.check-line { display: flex; align-items: baseline; gap: var(--space-4); }
.check-line .badge { flex: none; }
@media (max-width: 1280px) {
  .lookup { grid-template-columns: 96px repeat(3, minmax(0, 1fr)); }
  .lookup-name { grid-column: span 3; }
  .lookup-go { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .lookup { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lookup-name { grid-column: auto; }
}

/* ==== ask the logs =================================================================================================== */
/* a chat that fills the window: the thread scrolls inside its card, the question box stays where the hand is */
.page.is-fill > .ask { flex: 1; min-height: 0; margin-bottom: var(--space-6); }
.ask { display: grid; grid-template-columns: minmax(0, 1fr) 312px; gap: var(--space-6); align-items: stretch; }
.ask-main { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.ask-main > .card-foot { flex: none; }
.ask-thread { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: var(--space-7); padding: var(--space-7) var(--space-7) var(--space-6); }
.ask-thread:focus { outline: none; }
.ask-hello { margin: auto; display: grid; justify-items: center; text-align: center; gap: var(--space-4); max-width: 680px; padding: var(--space-7) 0; }
.ask-hello .empty-icon { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-border); }
.ask-examples { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); margin-top: var(--space-5); }
.ask-examples .chip-link { height: auto; min-height: 28px; padding: var(--space-2) var(--space-5); white-space: normal; text-align: left; line-height: 1.4; }

.ask-msg { display: flex; gap: var(--space-5); min-width: 0; }
.ask-msg.is-new { animation: pop-in var(--dur-base) both; }
.ask-user { flex-direction: column; align-items: flex-end; gap: var(--space-2); }
.ask-bubble { max-width: min(80%, 640px); padding: var(--space-4) var(--space-6); border: 1px solid var(--accent-border); border-radius: var(--radius-lg) var(--radius-lg) var(--radius-xs) var(--radius-lg); background: var(--accent-soft); white-space: pre-wrap; overflow-wrap: anywhere; }
.ask-at { font-size: var(--text-2xs); color: var(--text-3); font-variant-numeric: tabular-nums; }
.ask-mark { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-full); border: 1px solid var(--accent-border); background: var(--accent-soft); color: var(--accent); }
.ask-mark .i { width: 14px; height: 14px; }
.ask-mark.is-bad { border-color: color-mix(in srgb, var(--negative) 45%, var(--border)); background: var(--negative-soft); color: var(--negative); }
.ask-body { flex: 1; min-width: 0; display: grid; gap: var(--space-4); padding-top: 3px; }

.ask-answer { line-height: 1.6; overflow-wrap: anywhere; }
.ask-answer > p, .ask-answer > ul, .ask-answer > ol, .ask-answer > h3 { max-width: 84ch; }
.ask-answer > * + * { margin-top: var(--space-4); }
.ask-answer ul, .ask-answer ol { display: grid; gap: var(--space-2); padding-left: var(--space-7); }
.ask-answer ul { list-style: disc; }
.ask-answer ol { list-style: decimal; }
.ask-answer li::marker { color: var(--text-3); }
.ask-answer code { padding: 1px 5px; border: 1px solid var(--border-subtle); border-radius: var(--radius-xs); background: var(--bg-inset); }
.ask-answer .person { vertical-align: baseline; }
.ask-answer .sid { margin-left: 4px; }
.ask-h { font-size: var(--text-md); font-weight: 600; letter-spacing: -0.005em; }
.ask-error { color: var(--negative); }
.ask-table { max-width: 100%; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); }
/* a cell wraps between words, never inside a time or a name; a table that is still too wide scrolls sideways */
.ask-table .table th, .ask-table .table td { height: auto; padding-top: var(--space-3); padding-bottom: var(--space-3); white-space: normal; overflow-wrap: normal; vertical-align: top; }
.ask-table .table td:first-child { white-space: nowrap; }
.ask-table .table thead th { position: static; white-space: nowrap; background: var(--bg-raised); }
.ask-ref { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px; margin: 0 1px; border: 1px solid var(--accent-border); border-radius: var(--radius-xs); background: var(--accent-soft); font-size: var(--text-2xs); font-weight: 600; white-space: nowrap; vertical-align: 1px; transition: border-color var(--dur-fast); }
.ask-ref:hover { border-color: var(--accent); }
.ask-ref .i { width: 11px; height: 11px; stroke-width: 2; }
.ask-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-5); font-size: var(--text-xs); color: var(--text-3); }
.ask-foot .link-btn { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); }
.ask-foot .link-btn:hover { color: var(--accent); text-decoration: none; }

/* what it looked up: live while it works, folded away under the finished answer */
.ask-looked > summary { display: inline-flex; align-items: center; gap: var(--space-3); cursor: pointer; list-style: none; user-select: none; font-size: var(--text-xs); color: var(--text-3); }
.ask-looked > summary::-webkit-details-marker { display: none; }
.ask-looked > summary:hover { color: var(--text-1); }
.ask-looked[open] > summary { margin-bottom: var(--space-3); }
.ask-steps { display: grid; gap: var(--space-2); font-size: var(--text-xs); color: var(--text-2); }
.ask-steps li { display: flex; align-items: flex-start; gap: var(--space-3); }
.ask-steps li .i { margin-top: 3px; color: var(--positive); }
.ask-steps.is-live li:last-child { color: var(--text-1); }
.ask-wait { display: flex; align-items: center; gap: var(--space-4); color: var(--text-2); }
.ask-dots { display: inline-flex; gap: 4px; }
.ask-dots i { width: 6px; height: 6px; border-radius: var(--radius-full); background: var(--accent); animation: ask-dot 1.2s ease-in-out infinite both; }
.ask-dots i:nth-child(2) { animation-delay: 0.15s; }
.ask-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes ask-dot { 0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); } 40% { opacity: 1; transform: none; } }

.ask-form { flex: none; display: flex; align-items: flex-end; gap: var(--space-4); padding: var(--space-5) var(--space-6); border-top: 1px solid var(--border-subtle); background: var(--bg-surface); }
.ask-input { flex: 1; height: auto; min-height: 54px; max-height: 190px; padding: var(--space-4) var(--space-5); line-height: 1.5; resize: none; }
.ask-form .btn { height: 36px; padding: 0 var(--space-6); }
.ask-form.is-busy .btn { opacity: 0.45; pointer-events: none; }
.ask-noscript { flex: none; padding: 0 var(--space-6) var(--space-5); }
.ask-problem { flex: none; margin: 0 var(--space-6) var(--space-4); }

.ask-side { display: grid; gap: var(--space-6); align-content: start; min-height: 0; overflow-y: auto; }
.ask-chats > li { gap: var(--space-4); padding-right: var(--space-4); }
.ask-chats > li.is-current { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.ask-chats .row-link { flex: 1; min-width: 0; font-weight: 400; }
.ask-chats > li.is-current .row-link { font-weight: 500; }
.ask-chats form { display: flex; }
.ask-chats .act { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: var(--radius-xs); background: none; color: var(--text-3); opacity: 0; transition: opacity var(--dur-fast), background var(--dur-fast); }
.ask-chats > li:hover .act, .ask-chats .act:focus-visible { opacity: 1; }
.ask-chats .act:hover { background: var(--negative-soft); color: var(--negative); }
.ask-about p { display: flex; align-items: flex-start; gap: var(--space-4); font-size: var(--text-xs); line-height: 1.5; color: var(--text-2); }
.ask-about p .i { margin-top: 2px; color: var(--text-3); }
@media (hover: none) { .ask-chats .act { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ask-dots i { animation: none; opacity: 0.6; } }
/* no room for two columns: the page scrolls as a whole and the question box follows the bottom of the window */
@media (max-width: 1100px) {
  .page.is-fill.is-ask { height: auto; overflow: visible; padding-bottom: var(--space-10); }
  .ask { grid-template-columns: minmax(0, 1fr); }
  .ask-main { overflow: visible; }
  .ask-thread { overflow: visible; min-height: 300px; }
  .ask-form { position: sticky; bottom: 0; z-index: 1; }
  .ask-side { overflow: visible; }
}
@media (max-width: 760px) {
  .ask-thread { padding: var(--space-6) var(--space-5); }
  .ask-bubble { max-width: 92%; }
  .ask-form { padding: var(--space-4) var(--space-5); }
}
@media print {
  .ask-form, .ask-side, .ask-foot .link-btn { display: none !important; }
  .ask { display: block; } .ask-main, .ask-thread { overflow: visible; }
}

/* ---- staff: worth a look, player reports (2026-12-04) ---------------------------------------------------------- */
.watch-list > li { align-items: flex-start; }
.watch-list .badge { flex: none; margin-top: 2px; }
.watch-main { display: grid; gap: 2px; min-width: 0; }
.watch-main .watch-who { margin-right: var(--space-2); }
.watch-detail { font-size: var(--text-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 72ch; }
.stats.stats-inline { border: 0; background: transparent; gap: var(--space-4); }
.stats.stats-inline .stat { padding: 0; background: transparent; flex: 1 1 120px; }
.stats.stats-inline .stat-value { font-size: var(--text-xl); }
.stat-value.is-warn, .text-warn { color: var(--warning); }
.sub-title { font-size: var(--text-sm); font-weight: 600; color: var(--text-2); }


/* ---- complaint cases (2026-12-04) --------------------------------------------------------------------------------- */
.search-inline { display: flex; }
.search-inline .input { width: 240px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
.form-grid .field-wide { grid-column: 1 / -1; }
.field-label { font-size: var(--text-xs); font-weight: 500; color: var(--text-2); }
.case-new > summary { cursor: pointer; list-style: none; }
.case-new > summary::-webkit-details-marker { display: none; }
.case-new:not([open]) > summary { border-bottom: 0; }
.case-add { display: flex; gap: var(--space-4); align-items: flex-start; }
.case-add .input { flex: 1 1 auto; }
.case-kills > li { flex-wrap: wrap; }
.case-kills .plain { flex: 1 1 320px; min-width: 0; }
.case-remove > summary { cursor: pointer; font-size: var(--text-xs); }
.case-notes > li { align-items: flex-start; }
.case-notes > li > strong { flex: none; min-width: 90px; }
.case-note-text { min-width: 0; overflow-wrap: anywhere; }
.case-notes > li.is-system { color: var(--text-2); font-size: var(--text-sm); }
.case-summary { margin: 0; white-space: pre-wrap; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-2); line-height: 1.6; }
.case-delete { display: flex; justify-content: flex-end; }
@media (max-width: 760px) {
  .form-grid { grid-template-columns: 1fr; }
  .search-inline .input { width: 100%; }
  .case-add { flex-direction: column; align-items: stretch; }
}


/* ---- kill map (2026-12-04) ---------------------------------------------------------------------------------------- */
.kill-map-wrap { padding: var(--space-5); }
.kill-map { display: block; width: 100%; max-height: 125vh; height: auto; border-radius: var(--radius-sm); }
.km-sea { fill: var(--bg-sunken, var(--bg-raised)); }
.km-grid { stroke: var(--border-subtle); stroke-width: 1; vector-effect: non-scaling-stroke; }
.km-place circle { fill: var(--text-3); }
.km-place text { fill: var(--text-3); font-size: 9px; font-family: var(--font-sans); }
.km-dot { stroke: var(--bg-surface); stroke-width: 1; opacity: 0.85; cursor: pointer; }
.km-dot:hover { opacity: 1; stroke: var(--text-1); }
.chip-link.is-on { border-color: var(--accent-border); background: var(--accent-soft); }

/* ---- daily digest (2026-12-04) ------------------------------------------------------------------------------------ */
.digest-text { margin: 0; white-space: pre-wrap; font-family: var(--font-mono, monospace); font-size: 13px; line-height: 1.55; color: var(--text-2); }

/* ---- language switch (2026-12-04) --------------------------------------------------------------------------------- */
.lang-switch { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); flex-wrap: wrap; }
.lang-switch .faint { margin-right: auto; }
.lang-switch .chip-link { cursor: pointer; font: inherit; }

/* ---- watch and report pages (2026-12-04): phone, linked accounts, vehicles, restarts, evidence --------------------- */
.filter-row { display: flex; flex-wrap: wrap; gap: var(--space-5); align-items: end; }
.filter-row .field { min-width: 200px; }
.phone-thread > li { align-items: flex-start; }
.phone-who { flex: none; width: 170px; min-width: 0; }
.phone-text { flex: 1; min-width: 0; overflow-wrap: anywhere; color: var(--text-1); }
.phone-thread > li.from-b { background: var(--bg-raised); }
.links-cluster { display: block; }
.restart-doing { display: grid; gap: 2px; margin-top: var(--space-2); font-size: var(--text-xs); }
.door.door-wide { width: min(860px, 100%); }
.evidence-list { margin: 0; padding-left: 1.4em; display: grid; gap: var(--space-3); line-height: 1.5; }
.evidence-id { display: block; font-size: var(--text-2xs); }
/* Forbes (2026-12-04): what each character owns, one line per house / business / car, price on the right */
.fb-owns { min-width: 260px; }
.fb-asset { display: flex; align-items: center; gap: var(--space-2); line-height: 1.7; }
.fb-asset .num { margin-left: auto; padding-left: var(--space-4); }
.fb-kind { display: inline-flex; color: var(--text-3); }
.fb-more > summary { cursor: pointer; list-style: none; font-size: var(--text-xs); }
.fb-more > summary::-webkit-details-marker { display: none; }
/* Report chats (2026-12-04): a player report as a conversation - player on the left, admin on the right, events centred */
.rc-head { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); align-items: center; justify-content: space-between; }
.rc-title, .rc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); }
.rc-meta { font-size: var(--text-xs); }
.rc-thread { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5) var(--space-6) var(--space-6); }
.rc-msg { max-width: min(640px, 78%); padding: var(--space-3) var(--space-4); border-radius: var(--radius-lg); border: 1px solid var(--border-subtle); }
.rc-player { align-self: flex-start; background: var(--bg-raised); border-bottom-left-radius: var(--radius-xs); }
.rc-admin { align-self: flex-end; background: var(--accent-soft); border-color: var(--accent-border); border-bottom-right-radius: var(--radius-xs); }
.rc-from { display: flex; align-items: baseline; gap: var(--space-3); font-size: var(--text-xs); font-weight: 600; color: var(--text-2); margin-bottom: 2px; }
.rc-text { color: var(--text-1); line-height: 1.5; overflow-wrap: anywhere; white-space: normal; }
.rc-time { margin-left: auto; font-weight: 400; font-size: var(--text-2xs); color: var(--text-3); font-variant-numeric: tabular-nums; }
.rc-time:hover { color: var(--text-1); }
.rc-note { align-self: center; display: flex; align-items: center; gap: var(--space-2); max-width: 90%; padding: 2px var(--space-4); border-radius: var(--radius-full); background: var(--bg-inset); font-size: var(--text-xs); color: var(--text-2); }
.rc-note .rc-time { margin-left: var(--space-3); }
.rc-note.rc-close { color: var(--positive); background: var(--positive-soft); }
.rc-note.rc-release { color: var(--warning); background: var(--warning-soft); }
.rc-note.rc-faint { background: transparent; color: var(--text-3); }
/* Online now, punishments, money watch, player file, admin time, Forbes risers (2026-12-04) */
.pn-groups { margin-left: auto; }
.pf-title { display: flex; align-items: center; gap: var(--space-4); font-size: var(--text-lg); font-weight: 600; margin-bottom: var(--space-4); }
.pf-facts { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-8); margin: 0; }
.pf-facts dt, .pf-list dt { font-size: var(--text-xs); color: var(--text-3); }
.pf-facts dd, .pf-list dd { margin: 0; }
.pf-list { display: grid; gap: var(--space-3); margin: 0; }
.pf-list > div { display: flex; justify-content: space-between; gap: var(--space-5); align-items: baseline; }
.pf-list > div dd { text-align: right; }
.pf-report { padding: var(--space-3) var(--space-4); border-left: 3px solid var(--border); background: var(--bg-inset); border-radius: var(--radius-sm); display: grid; gap: 2px; overflow-wrap: anywhere; }
.at-table td.at-zero { color: var(--text-disabled); }
.at-online { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--positive); margin-left: var(--space-2); vertical-align: middle; }
@media print {
  .no-print, .crumbs, .skip { display: none !important; }
  .pf .card { break-inside: avoid; box-shadow: none; }
  .pf .grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .pf a { color: inherit; text-decoration: none; }
}
/* Staff team (2026-12-04) */
/* ---- staff team: one list grouped by rank, names in the rank colour (2026-12-04) ---- */
.tm-r-founder { --tm-c: var(--gold-300); }
.tm-r-developer { --tm-c: var(--indigo-400); }
.tm-r-tech { --tm-c: var(--area-money); }
.tm-r-chief { --tm-c: var(--red-400); }
.tm-r-deputy { --tm-c: var(--summer-400); }
.tm-r-curator { --tm-c: var(--area-players); }
.tm-r-senior { --tm-c: var(--rose-400); }
.tm-r-lead { --tm-c: var(--green-400); }
.tm-table .tm-group td { padding-top: var(--space-6); font-weight: 600; color: var(--text-1); background: var(--bg-inset); }
.tm-table .tm-group .faint { font-weight: 400; margin-left: var(--space-2); }
.tm-table tbody:first-of-type .tm-group td { padding-top: var(--space-4); }
.tm-name { font-weight: 600; white-space: nowrap; color: color-mix(in srgb, var(--tm-c) 80%, var(--text-1)); }
.tm-warned { color: var(--warning); }
.tm-max { color: var(--negative); font-weight: 600; }
.tm-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--space-5); align-items: end; }
.tm-form-actions { display: flex; gap: var(--space-3); }
.tm-edit-more { display: flex; justify-content: space-between; align-items: center; gap: var(--space-5); flex-wrap: wrap; margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--border-subtle); }
.tm-warn-form { display: inline-flex; align-items: center; gap: var(--space-3); }
.tm-warn-form > span { margin-right: var(--space-3); }
.tm-table tr.is-selected td { background: var(--accent-soft); }

/* ---- crash map, new players, peak online, admin coverage, money totals, donations (2026-12-04) ---- */
.nowrap { white-space: nowrap; }
.np-bar { width: 32%; min-width: 90px; }
.drop-report > summary { cursor: pointer; color: var(--accent); white-space: nowrap; }
.drop-report pre { margin-top: var(--space-3); max-width: 760px; max-height: 340px; overflow: auto; font-size: var(--text-2xs); white-space: pre; }
.oh-grid th, .oh-grid td { padding-left: var(--space-3); padding-right: var(--space-3); }
.oh-grid td.oh-l1 { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.oh-grid td.oh-l2 { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.oh-grid td.oh-l3 { background: color-mix(in srgb, var(--accent) 26%, transparent); }
.oh-grid td.oh-l4 { background: color-mix(in srgb, var(--accent) 38%, transparent); }
.oh-grid td.oh-l5 { background: color-mix(in srgb, var(--accent) 52%, transparent); color: var(--text-1); font-weight: 600; }
.tm-reason { width: 220px; }
.tm-log { margin-top: var(--space-5); }
