/* ==========================================================================
   New World Mafia - 2026 UI
   One stylesheet for the whole game. Legacy pages still output the original
   <table class="content"><tr><td class="contenthead|contentcontent"> markup;
   the "Legacy content" section below turns that into modern cards.
   ========================================================================== */

@view-transition { navigation: auto; }

:root {
  --accent: #d8a54a;
  --bg: #09090b;
  --bg-2: #0f0f12;
  --panel: rgba(24, 24, 28, .72);
  --panel-solid: #16161a;
  --panel-2: #1c1c21;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --text: #eeece8;
  --muted: #a3a09a;
  --dim: #6d6b66;
  --good: #3dd68c;
  --bad: #ff5d5d;
  --warn: #ffb547;
  --info: #6fb7ff;
  --hp: #ff5d6c;
  --energy: #ffc53d;
  --awake: #7aa2ff;
  --nerve: #c77dff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 40px -24px rgba(0,0,0,.8);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Instrument Serif", "Playfair Display", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --sidebar: 256px;
  --rail-w: 300px;
  --accent-soft: color-mix(in oklab, var(--accent) 16%, transparent);
  --accent-line: color-mix(in oklab, var(--accent) 40%, transparent);
  color-scheme: dark;
}

/* ---------- themes (Site Theme page) ---------- */
.theme-havana {
  --bg: #120d09; --bg-2: #18110c; --panel: rgba(36, 26, 19, .72); --panel-solid: #22180f; --panel-2: #2a1e14;
  --line: rgba(255, 220, 180, .08); --line-2: rgba(255, 220, 180, .14); --text: #f4e9dc; --muted: #bfa98f; --dim: #86705a;
}
.theme-miami {
  --bg: #0b0716; --bg-2: #120a22; --panel: rgba(28, 16, 48, .7); --panel-solid: #1a1030; --panel-2: #22153d;
  --line: rgba(255, 110, 220, .1); --line-2: rgba(120, 230, 255, .16); --text: #f5ecff; --muted: #b9a6d8; --dim: #7c6a9c;
  --display: "Inter", system-ui, sans-serif;
}
.theme-daylight {
  --bg: #f4f2ee; --bg-2: #ebe8e2; --panel: rgba(255, 255, 255, .8); --panel-solid: #ffffff; --panel-2: #f7f5f1;
  --line: rgba(20, 16, 10, .08); --line-2: rgba(20, 16, 10, .14); --text: #1b1914; --muted: #5f5a50; --dim: #8e887c;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 16px 32px -24px rgba(40,30,10,.35);
  color-scheme: light;
}
.theme-daylight .topbar { background: color-mix(in oklab, var(--bg) 82%, transparent); }
/* A love letter to 2007. Grey boxes, yellow links, Arial 11px. */
.theme-classic {
  --bg: #000; --bg-2: #1e1e1e; --panel: #333; --panel-solid: #333; --panel-2: #2a2a2a;
  --line: #444; --line-2: #555; --text: #ddd; --muted: #bdbdbd; --dim: #888; --accent: #ffcc00 !important;
  --radius: 0px; --radius-sm: 0px; --shadow: none;
  --font: Arial, Helvetica, sans-serif; --display: "Trebuchet MS", Verdana, sans-serif;
}
.theme-classic .page { font-size: 12px; }
.theme-classic .vital__fill { background: #ffff00 !important; box-shadow: none !important; }
.theme-classic .sidebar, .theme-classic .topbar { backdrop-filter: none; background: #333; }
.theme-classic .rail { backdrop-filter: none; background: #333; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text);
  font: 14px/1.55 var(--font); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(1200px 600px at 110% -10%, color-mix(in oklab, var(--accent) 9%, transparent), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(120, 60, 200, .06), transparent 60%);
  background-attachment: fixed;
}
body::before { /* film grain, very subtle */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.theme-classic body::before, body.theme-classic::before { display: none; }
a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: color-mix(in oklab, var(--accent) 70%, white); }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: -.01em; line-height: 1.1; margin: 0 0 .4em; }
h1 { font-size: clamp(30px, 4vw, 44px); }
h2 { font-size: 28px; }
h3 { font-size: 21px; }
b, strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
code, kbd { font-family: var(--mono); font-size: .85em; }
kbd { padding: 2px 6px; border: 1px solid var(--line-2); border-radius: 6px; color: var(--muted); }
::selection { background: var(--accent); color: #111; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.ico { width: 18px; height: 18px; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
font[color="green"], font[color="#00FF00"], .good { color: var(--good) !important; }
font[color="red"], font[color="#FF0000"], .bad { color: var(--bad) !important; }
font[color="blue"] { color: var(--info) !important; }
font[size] { font-size: inherit; }
font[face] { font-family: inherit; }
s { color: var(--dim); }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr) var(--rail-w); min-height: 100dvh; }
.app > .sidebar { grid-column: 1; grid-row: 1; }
.app > .main { grid-column: 2; grid-row: 1; }
.app > .rail { grid-column: 3; grid-row: 1; }
.main { min-width: 0; display: flex; flex-direction: column; }
.page { width: 100%; max-width: 1180px; margin: 0 auto; padding: 20px clamp(14px, 3vw, 32px) 40px; flex: 1; }

/* ---------- sidebar ---------- */
.sidebar {
  position: sticky; top: 0; height: 100dvh; overflow-y: auto; overscroll-behavior: contain;
  border-right: 1px solid var(--line); background: color-mix(in oklab, var(--bg-2) 85%, transparent);
  backdrop-filter: blur(18px); padding: 18px 12px 24px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
  view-transition-name: sidebar;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand__mark { width: 34px; height: 34px; color: var(--accent); flex: none; display: grid; }
.brand__mark svg { width: 100%; height: 100%; }
.brand__name { font-family: var(--display); font-size: 22px; line-height: 1; letter-spacing: -.01em; }
.nav__group { margin-bottom: 14px; }
.nav__label { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); padding: 6px 12px; font-weight: 600; }
.nav__item {
  position: relative; display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 10px;
  color: var(--muted); font-weight: 500; font-size: 13.5px; transition: background .15s, color .15s;
}
.nav__item .ico { width: 17px; height: 17px; opacity: .85; }
.nav__item > span:not(.badge) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav__item:hover { background: var(--line); color: var(--text); }
.nav__item.is-active { background: var(--accent-soft); color: var(--text); }
.nav__item.is-active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav__item.is-active .ico { color: var(--accent); opacity: 1; }
.nav__item--quiet { color: var(--dim); }
.badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #111;
  font: 700 11px/20px var(--mono); text-align: center; flex: none;
}
.badge.badge--count, .theme-family .badge.badge--count, .theme-file .badge.badge--count { background: transparent; color: var(--good); border: 1px solid color-mix(in oklab, var(--good) 45%, transparent); line-height: 18px; font-family: var(--mono); }
.badge--new { background: transparent; color: var(--accent); border: 1px solid var(--accent-line); font-family: var(--font); text-transform: uppercase; letter-spacing: .06em; font-size: 9.5px; line-height: 18px; }
.scrim { display: none; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 18px;
  padding: 12px clamp(14px, 3vw, 32px); border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg) 78%, transparent); backdrop-filter: blur(18px) saturate(1.3);
  view-transition-name: topbar;
}
.me { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.me:hover { color: var(--text); }
.me__ring { --p: 0; position: relative; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--line-2) 0); }
.me__ring .avatar { --s: 38px !important; }
.me__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.me__name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.me__meta { color: var(--muted); font-size: 12px; white-space: nowrap; }
.vitals { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; min-width: 0; }
.vital { display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; align-items: center; color: var(--muted); font-size: 11.5px; min-width: 0; }
a.vital:hover { color: var(--text); }
.vital__label { display: flex; align-items: center; gap: 5px; white-space: nowrap; overflow: hidden; }
.vital__label .ico { width: 13px; height: 13px; }
/* When the HUD gets tight, drop the words and keep the icons rather than showing half a word. */
.vital { container-type: inline-size; }
@container (max-width: 160px) { .vital__txt { display: none; } }
.vital__max { font-style: normal; }
@container (max-width: 62px) { .vital__max { display: none; } }   /* too tight for "5000/5000": the bar shows the max */
.vital__num { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.vital__num b { color: var(--text); font-weight: 700; white-space: nowrap; }
.vital__track { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.vital__fill { --p: 0%; display: block; height: 100%; width: var(--p); border-radius: inherit; transition: width .9s cubic-bezier(.2,.8,.2,1);
  background: linear-gradient(90deg, color-mix(in oklab, var(--c) 70%, black), var(--c)); box-shadow: 0 0 12px -2px var(--c); }
.vital--hp { --c: var(--hp); } .vital--energy { --c: var(--energy); } .vital--awake { --c: var(--awake); } .vital--nerve { --c: var(--nerve); }
.vital--hp .ico { color: var(--hp); } .vital--energy .ico { color: var(--energy); } .vital--awake .ico { color: var(--awake); } .vital--nerve .ico { color: var(--nerve); }
.vital.is-bump .vital__num b { animation: bump .6s; }
@keyframes bump { 40% { color: var(--c); transform: scale(1.15); } }
.wallet { display: flex; align-items: center; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); font-family: var(--mono); font-size: 12.5px; white-space: nowrap;
}
.chip:hover { border-color: var(--line-2); color: var(--text); }
.chip .ico { width: 15px; height: 15px; }
.chip--money .ico { color: var(--good); }
.chip--points .ico { color: var(--info); }
/* Money and Gems never get squeezed: the box grows to fit the whole number, including while it rolls. */
.wallet .chip--money, .wallet .chip--points { flex: none; width: auto; max-width: none; overflow: visible; }
.chip--money > span, .chip--points > span { display: inline-flex; align-items: baseline; white-space: nowrap; }
.chip--money [data-v], .chip--points [data-v] { font-variant-numeric: tabular-nums; white-space: nowrap; }
.chip--fx { height: 28px; font-size: 11.5px; color: var(--nerve); }
.iconbtn {
  position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; padding: 0;
}
.iconbtn:hover { color: var(--text); border-color: var(--line-2); }
.iconbtn .badge { position: absolute; top: -6px; right: -6px; height: 18px; min-width: 18px; line-height: 18px; font-size: 10px; padding: 0 4px; }
.only-mobile { display: none; }
.effects-row { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 clamp(14px, 3vw, 32px); max-width: 1180px; margin: 12px auto 0; width: 100%; }
.effects-row:empty { display: none; }

/* ---------- ticker (was <marquee>) ---------- */
.ticker { overflow: hidden; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, var(--accent-soft), transparent 40%, transparent 60%, var(--accent-soft));
  font-size: 12.5px; color: var(--muted); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker__track { display: flex; width: max-content; animation: ticker 40s linear infinite; }
/* app.js takes over and drives it itself, so browser/OS "reduce motion" settings can't freeze it. */
.ticker__track.is-js { animation: none !important; will-change: transform; }
.ticker__track span { padding: 7px 60px 7px 0; white-space: nowrap; }
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ==========================================================================
   Legacy content: <table class="content"> -> stacked cards
   ========================================================================== */
table.content, table.content > tbody, table.content > tbody > tr, table.content > tr { display: block; width: 100%; }
table.content { border-spacing: 0; }
table.content > tbody > tr > td, table.content > tr > td { display: block; width: auto !important; }
td.contenthead {
  margin-top: 22px; padding: 16px 20px 12px; background: var(--panel); border: 1px solid var(--line); border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0; font-family: var(--display); font-size: 22px; font-weight: 400; color: var(--text);
  letter-spacing: -.01em; backdrop-filter: blur(10px);
}
tr:first-child > td.contenthead { margin-top: 0; }
td.contentcontent {
  padding: 14px 20px; background: var(--panel); border: 1px solid var(--line); border-top: 1px solid var(--line);
  border-bottom: 0; color: var(--text); font-size: 13.5px; backdrop-filter: blur(10px); overflow-x: auto;
}
tr:has(> td.contenthead) + tr > td.contentcontent { border-top: 0; padding-top: 4px; }
/* round the last body row of each card */
tr:has(> td.contentcontent):not(:has(+ tr > td.contentcontent)) > td.contentcontent {
  border-bottom: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); padding-bottom: 18px; margin-bottom: 4px;
}
/* a body row with no heading above it (e.g. after an alert) gets full rounding */
tr:not(:has(> td.contenthead)):not(:has(> td.contentcontent)) + tr > td.contentcontent,
table.content > tbody > tr:first-child > td.contentcontent { border-top: 1px solid var(--line); border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); margin-top: 14px; }
tr:has(> td.contenthead):not(:has(+ tr > td.contentcontent)) > td.contenthead { border-bottom: 1px solid var(--line); border-radius: var(--radius); }

/* tables inside cards */
td.contentcontent table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
td.contentcontent table td, td.contentcontent table th { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; text-align: left; }
td.contentcontent table tr:last-child > td { border-bottom: 0; }
td.contentcontent table tr:hover > td { background: rgba(255,255,255,.02); }
td.contentcontent table td[align="center"], td.contentcontent table td[align=center] { text-align: center; }
td.contentcontent table table td { border-bottom: 0; padding: 4px 6px; }
td.contentcontent img { border-radius: 10px; }
td.contentcontent ul { padding-left: 18px; }
td.contentcontent li { margin: 4px 0; }
td.contentcontent > b:first-child, td.contentcontent td > b:only-child { color: var(--muted); font-weight: 600; }
/* old "[do]" style action links -> pills */
td.contentcontent a[href*="?"]:not(.uname):not(.gtag):not(.btn):not(.card-link) { font-weight: 500; }

/* ---------- alerts (Message()) ---------- */
td.ma-alert, .ma-alert {
  display: flex !important; gap: 14px; align-items: flex-start; margin: 0 0 14px; padding: 14px 18px;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(10px);
  animation: rise .35s cubic-bezier(.2,.8,.2,1);
}
.ma-alert__icon { width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--c, var(--info)); box-shadow: 0 0 0 5px color-mix(in oklab, var(--c, var(--info)) 20%, transparent); flex: none; }
.ma-alert__body { flex: 1; min-width: 0; }
.ma-alert--good { --c: var(--good); border-color: color-mix(in oklab, var(--good) 30%, var(--line)); background: color-mix(in oklab, var(--good) 7%, var(--panel)); }
.ma-alert--bad { --c: var(--bad); border-color: color-mix(in oklab, var(--bad) 30%, var(--line)); background: color-mix(in oklab, var(--bad) 7%, var(--panel)); }
.ma-alert--info { --c: var(--info); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* ---------- jail / hospital lock-out ---------- */
td.lockout { text-align: center; padding: 48px 20px 40px; border-radius: 24px; border: 1px solid var(--line); background: var(--panel); position: relative; overflow: hidden; }
td.lockout::before { content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none; }
.lockout--jail::before { background: repeating-linear-gradient(90deg, transparent 0 46px, rgba(0,0,0,.55) 46px 58px), radial-gradient(400px 260px at 50% 0%, rgba(255,210,120,.12), transparent); }
.lockout--hosp::before { background: radial-gradient(400px 260px at 50% 0%, rgba(255,90,110,.18), transparent); }
.lockout--travel::before { background: radial-gradient(400px 260px at 50% 0%, rgba(216,165,74,.16), transparent); }
.lockout > * { position: relative; }
.lockout__icon { width: 64px; height: 64px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 20px; background: var(--line); color: var(--accent); }
.lockout__icon .ico { width: 30px; height: 30px; }
.lockout__timer { font: 700 56px/1 var(--mono); letter-spacing: -.02em; margin: 18px 0; color: var(--text); }

/* ---------- forms ---------- */
input[type=text], input[type=password], input[type=email], input[type=number], input[type=url], input[type=search], input:not([type]), select, textarea {
  font: inherit; font-size: 14px; color: var(--text); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 9px 12px; min-height: 38px; max-width: 100%; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 110px; width: 100%; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[size] { width: auto; }
input[type=submit], input[type=button], button.btn, .btn, button[type=submit]:not(.iconbtn) {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 13.5px/1 var(--font); cursor: pointer;
  min-height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; color: #121212;
  background: linear-gradient(180deg, color-mix(in oklab, var(--accent) 88%, white), var(--accent));
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 8px 20px -10px var(--accent); transition: transform .1s, filter .15s;
}
input[type=submit]:hover, .btn:hover, button[type=submit]:hover { filter: brightness(1.08); color: #121212; }
input[type=submit]:active, .btn:active { transform: translateY(1px); }
.btn.btn--ghost { background: var(--panel); color: var(--text); border-color: var(--line-2); box-shadow: none; }
.btn.btn--ghost:hover { color: var(--text); border-color: var(--accent-line); }
.btn--danger { background: linear-gradient(180deg, #ff7676, var(--bad)); box-shadow: 0 8px 20px -10px var(--bad); }
.btn--sm { min-height: 30px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn[disabled], .btn.is-disabled { opacity: .4; pointer-events: none; }
input[type=radio], input[type=checkbox] { accent-color: var(--accent); }
label { cursor: pointer; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 12px; color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; }

/* ==========================================================================
   New components
   ========================================================================== */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); backdrop-filter: blur(10px); position: relative; }
.card + .card { margin-top: 16px; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card__title { font-family: var(--display); font-size: 22px; margin: 0; }
.card__sub { color: var(--muted); font-size: 12.5px; }
.eyebrow { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .02em; border: 1px solid var(--line-2); color: var(--muted); }
.pill--on { color: var(--good); border-color: color-mix(in oklab, var(--good) 40%, transparent); }
.pill--on::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px var(--good); }
.pill--off { color: var(--dim); }
.pill--accent { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.dot--on { background: var(--good); box-shadow: 0 0 10px var(--good); }

.stat { padding: 16px 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); min-width: 0; }
.stat__label { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.stat__label .ico { width: 14px; height: 14px; color: var(--accent); }
.stat__value { font: 700 22px/1.2 var(--mono); margin-top: 6px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat__foot { color: var(--dim); font-size: 11.5px; margin-top: 4px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.progress { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress > span { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: linear-gradient(90deg, color-mix(in oklab, var(--accent) 60%, black), var(--accent)); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.empty { text-align: center; padding: 30px 10px; color: var(--muted); }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }

/* hero header used by rebuilt pages */
.hero { position: relative; padding: 26px 26px 22px; border-radius: 22px; border: 1px solid var(--line); overflow: hidden; margin-bottom: 18px;
  background: radial-gradient(600px 200px at 100% 0%, var(--accent-soft), transparent), var(--panel); }
.hero h1 { margin: 6px 0 6px; }
.hero p { color: var(--muted); margin: 0; max-width: 60ch; }

/* tiers */
.tier--bronze { --t: #d08b5b; } .tier--silver { --t: #c9d1dc; } .tier--gold { --t: #f2c14e; } .tier--legendary { --t: #ff9f2e; }
.tierchip { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 99px; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--t); background: color-mix(in oklab, var(--t) 14%, transparent); border: 1px solid color-mix(in oklab, var(--t) 35%, transparent); }

/* ---------- usernames + gang tags (used on every list in the game) ---------- */
.uname { font-weight: 600; color: var(--text); }
.uname:hover { color: var(--accent); }
.uname--rm { color: #7de3a4; }
.uname--admin { color: #7fb4ff; }
.uname--staff { color: #9fd3ff; }
.uname--president, .uname--congress { color: #ff8a8a; }
.gtag { display: inline-block; margin-right: 5px; padding: 0 5px; border-radius: 5px; font: 700 10px/16px var(--mono); vertical-align: 1px; color: var(--muted); border: 1px solid var(--line-2); letter-spacing: .04em; }
.gtag--lead { color: var(--accent); border-color: var(--accent-line); }
.gang-link { font-weight: 600; }

/* ---------- avatar + frames (fx.css has the fancy frames) ---------- */
.avatar { --s: 96px; position: relative; display: inline-grid; place-items: center; grid-template: 100% / 100%; width: var(--s); height: var(--s); border-radius: 50%; flex: none; }
/* The picture is always a square the size of its box, whatever shape the file is: a tall or wide one is cropped to the
   middle, never stretched or allowed to spill out (the grid row used to grow to the picture's own height). */
.avatar img { width: var(--s); height: var(--s); min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; aspect-ratio: 1; border-radius: 50%; object-fit: cover; background: var(--panel-2); display: block; }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: grid; gap: 10px; width: min(380px, calc(100vw - 36px)); }
.toast { display: flex; gap: 12px; padding: 14px 16px; border-radius: 16px; background: color-mix(in oklab, var(--panel-solid) 94%, transparent); border: 1px solid var(--line-2);
  box-shadow: 0 24px 50px -20px rgba(0,0,0,.8); backdrop-filter: blur(16px); animation: toast-in .5s cubic-bezier(.2,.9,.2,1.2); font-size: 13.5px; }
.toast.is-out { animation: toast-out .35s forwards; }
.toast__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--line); color: var(--accent); }
.toast--ach { border-color: color-mix(in oklab, var(--t) 45%, transparent); background: radial-gradient(260px 120px at 0 0, color-mix(in oklab, var(--t) 22%, transparent), transparent), color-mix(in oklab, var(--panel-solid) 95%, transparent); }
.toast--ach .toast__icon { color: var(--t); background: color-mix(in oklab, var(--t) 16%, transparent); animation: ach-pop 1s .2s both; }
.toast__title { font-weight: 700; }
.toast__kicker { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--t, var(--accent)); font-weight: 700; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }
@keyframes ach-pop { 0% { transform: scale(.4) rotate(-20deg); } 60% { transform: scale(1.15) rotate(6deg); } }

/* ---------- command palette + modal ---------- */
dialog { padding: 0; border: 0; background: transparent; color: var(--text); max-width: none; max-height: none; }
dialog::backdrop { background: rgba(5, 5, 8, .6); backdrop-filter: blur(6px); }
.palette[open] { position: fixed; inset: 12vh 0 auto; margin: 0 auto; width: min(560px, calc(100vw - 24px)); animation: rise .2s; }
.palette__box { border-radius: 18px; border: 1px solid var(--line-2); background: var(--panel-solid); box-shadow: 0 40px 80px -30px #000; overflow: hidden; }
.palette__search { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.palette__search input { flex: 1; border: 0; background: transparent; box-shadow: none !important; padding: 0; font-size: 16px; min-height: 0; }
.palette__list { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.palette__list li { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.palette__list li small { color: var(--dim); font-size: 11px; }
.palette__list li[aria-selected=true] { background: var(--accent-soft); }
.modal[open] { position: fixed; inset: 0; margin: auto; width: min(460px, calc(100vw - 24px)); height: min(560px, calc(100dvh - 40px)); animation: rise .2s; }
.modal__box { position: relative; height: 100%; border-radius: 18px; border: 1px solid var(--line-2); background: var(--panel-solid); overflow: hidden; }
.modal__box iframe { width: 100%; height: 100%; border: 0; background: var(--panel-solid); }
.modal__x { position: absolute; top: 10px; right: 10px; z-index: 2; }

/* ---------- footer + tab bar ---------- */
.foot { border-top: 1px solid var(--line); padding: 18px clamp(14px, 3vw, 32px) 26px; color: var(--dim); font-size: 12px; display: grid; gap: 10px; }
.foot__stats { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot__stats a { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.foot__stats b { color: var(--text); font-family: var(--mono); }
.foot__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.foot__perf { font-family: var(--mono); }
.tabbar { display: none; }

/* ---------- responsive ---------- */
/* Between widescreen and the 2x2 tablet layout the top bar is crowded: drop the name under the avatar first. */
@media (max-width: 1340px) { .me__text { display: none; } }
@media (max-width: 1180px) {
  .vitals { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
  .me__text { display: none; }
}
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .app > .main { grid-column: 1; }
  .sidebar { position: fixed; z-index: 90; left: 0; top: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .3s cubic-bezier(.2,.8,.2,1); background: var(--bg-2); }
  body.nav-open .sidebar { transform: none; box-shadow: 30px 0 60px -20px #000; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.55); backdrop-filter: blur(3px); }
  .only-mobile { display: inline-grid; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  body { font-size: 14px; }
  .topbar { flex-wrap: wrap; gap: 10px 12px; padding-top: 10px; padding-bottom: 10px; }
  .vitals { order: 3; flex-basis: 100%; }
  .wallet { margin-left: auto; }
  .wallet .iconbtn[data-palette] { display: none; }
  .me__ring { width: 40px; height: 40px; }
  .me__ring .avatar { --s: 33px !important; }
  .chip { height: 32px; padding: 0 10px; font-size: 12px; }
  .page { padding-bottom: 110px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  td.contenthead { font-size: 20px; padding: 14px 16px 10px; }
  td.contentcontent { padding: 12px 14px; }
  td.contentcontent table td { padding: 8px 6px; }
  .foot { padding-bottom: 100px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(6, 1fr); position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 60;
    border-radius: 20px; border: 1px solid var(--line-2); background: color-mix(in oklab, var(--panel-solid) 88%, transparent); backdrop-filter: blur(18px);
    box-shadow: 0 20px 40px -12px #000; padding: 6px; view-transition-name: tabbar;
  }
  .tabbar a, .tabbar button { display: grid; justify-items: center; gap: 2px; padding: 6px 0; color: var(--dim); font: 500 10.5px var(--font); background: none; border: 0; border-radius: 14px; cursor: pointer; }
  .tabbar .is-active { color: var(--accent); background: var(--accent-soft); }
  .toasts { bottom: 92px; right: 10px; width: calc(100vw - 20px); }
  .hero { padding: 20px; border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  /* Ripping a card pack open is left alone: it always plays in full (Brad, Oct 4). */
  :not(.cx-reveal, .cx-reveal *), :not(.cx-reveal, .cx-reveal *)::before, :not(.cx-reveal, .cx-reveal *)::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  /* The news ticker is how the page reads, not decoration: keep it moving (slower) even with animations turned off. */
  .ticker__track { animation-duration: 60s !important; animation-iteration-count: infinite !important; }
  @view-transition { navigation: none; }
}

/* ==========================================================================
   Body: content + Playerstats/Timers rail (IG layout)
   ========================================================================== */
.body { display: block; width: 100%; max-width: 1240px; margin: 0 auto; flex: 1; }
.body .page { max-width: none; }
/* Right column = mirror of the menu on the left: same panel, same labels, same rows. */
.rail {
  position: sticky; top: 0; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column;
  padding: 18px 12px 24px; border-left: 1px solid var(--line); background: color-mix(in oklab, var(--bg-2) 85%, transparent);
  backdrop-filter: blur(18px); scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
/* header lines up with the brand block on the left */
.rail__head { height: 34px; box-sizing: content-box; padding: 4px 10px 18px; display: flex; flex-direction: column; justify-content: center; gap: 9px; flex: none; }
.rail__rank { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.rail__rankname { font-family: var(--display); font-size: 22px; line-height: 1; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail__pct { font: 700 11.5px var(--mono); color: var(--accent); flex: none; }
.rail__head .progress { height: 4px; }
.rail__head { height: auto; min-height: 34px; gap: 6px; }
.rail__sub { font-size: 11.5px; color: var(--muted); line-height: 1.2; }
.rail__sub b { color: var(--text); font-weight: 600; }
.rail__lvl { display: flex; align-items: center; gap: 8px; font: 600 11px var(--mono); color: var(--muted); margin-top: 2px; }
.rail__lvl .progress { flex: 1; height: 3px; }
.rail__lvl .progress > span { background: var(--muted); }
.rail__group { flex: none; }
.rail__item b { flex: none; max-width: 130px; margin-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; font-size: 12.5px; color: var(--text); font-variant-numeric: tabular-nums; }
.rail__item--static, .rail__item--static:hover { background: none; color: var(--muted); cursor: default; }
.rail__group.chat { flex: 1 0 auto; display: flex; flex-direction: column; min-height: 300px; margin-bottom: 0; }
.rail .chat__log { flex: 1; height: auto; min-height: 200px; padding: 4px 12px 10px; }
.rail .chat__form { padding: 10px 0 0; }
.nav__label .dot { display: inline-block; vertical-align: middle; margin-left: 6px; }
.t-ok { color: var(--good); font-weight: 700; }
.t-no { color: var(--bad); font-weight: 600; }
.t-cd { color: var(--warn); font-variant-numeric: tabular-nums; }
@media (max-width: 1280px) { .app { --rail-w: 0px; } .rail { display: none; } }

/* ==========================================================================
   Theme: INFAMOUS (default) - the Omerta / InfamousGangsters look, 2026 cut.
   Gunmetal bevelled panels with angled title tabs, navy section bars,
   damask-navy backdrop, blood-red accents.
   ========================================================================== */
.theme-infamous {
  --accent: #e0443e;
  --bg: #0c111c; --bg-2: #10151f;
  --panel: rgba(44, 46, 52, .82); --panel-solid: #2a2c31; --panel-2: #33353b;
  --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .15);
  --text: #eef0f4; --muted: #a9aebb; --dim: #717786;
  --navy: #0b1250; --navy-2: #1a2a8a; --navy-text: #9fb0ff;
  --radius: 6px; --radius-sm: 4px;
  --display: "Inter", system-ui, sans-serif;
  --bevel: inset 1px 1px 0 rgba(255,255,255,.14), inset -1px -1px 0 rgba(0,0,0,.6), 0 0 0 1px #0a0b0e, 0 18px 40px -22px #000;
}
body.theme-infamous {
  background-color: #141414;
  background-image:
    radial-gradient(1100px 600px at 50% -10%, rgba(224, 68, 62, .10), transparent 70%),
    linear-gradient(90deg, rgba(0,0,0,.5), rgba(0,0,0,.1) 30%, rgba(0,0,0,.1) 70%, rgba(0,0,0,.5)),
    linear-gradient(rgba(8, 8, 9, .30), rgba(8, 8, 9, .45)),
    url("../img/damask-black.jpg");
  background-size: auto, auto, auto, 420px 420px;
  background-attachment: fixed;
}
/* optional: graffiti poster wall */
body.theme-wall {
  background-color: #0b0a09;
  background-image: radial-gradient(1100px 600px at 50% -10%, rgba(224, 68, 62, .12), transparent 70%), linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,.15) 30%, rgba(0,0,0,.15) 70%, rgba(0,0,0,.55)), linear-gradient(rgba(10, 9, 8, .52), rgba(10, 9, 8, .68)), url("../img/wall.jpg");
  background-size: auto, auto, auto, cover; background-position: center top; background-attachment: fixed;
}
/* optional: the navy/gold damask parlour */
body.theme-damask {
  background-color: #0c111c;
  background-image: linear-gradient(90deg, rgba(0,0,0,.35), transparent 18%, transparent 82%, rgba(0,0,0,.35)), linear-gradient(rgba(9, 12, 22, .78), rgba(9, 12, 22, .78)), url("../img/damask.jpg");
  background-size: auto, auto, 185px 185px; background-attachment: fixed;
}
/* panels get the gunmetal bevel + angled title tab */
.theme-infamous .rail__card, .theme-infamous .card, .theme-infamous .stat, .theme-infamous .hero,
.theme-infamous td.contentcontent, .theme-infamous td.contenthead, .theme-infamous td.ma-alert, .theme-infamous td.lockout {
  background: linear-gradient(180deg, #34363c, #2a2c31); box-shadow: var(--bevel); border-color: #4a4d55;
}
.theme-infamous td.contenthead {
  position: relative; margin-top: 34px; padding: 10px 16px; font: 600 12px/1.2 var(--font); letter-spacing: .12em; text-transform: uppercase;
  color: var(--navy-text); background: linear-gradient(180deg, #16207a, var(--navy)); border: 1px solid #25307e; border-radius: 4px 4px 0 0;
  box-shadow: inset 0 1px 0 rgba(160,180,255,.18);
}
.theme-infamous td.contenthead::before { /* the angled tab with //// grips */
  content: "////"; position: absolute; left: -1px; top: -22px; height: 22px; padding: 0 28px 0 12px; display: flex; align-items: center;
  font: 700 10px/1 var(--mono); letter-spacing: .1em; color: #8a8f9c;
  background: linear-gradient(180deg, #45484f, #33353b); border: 1px solid #50535b; border-bottom: 0;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 100%, 0 100%); border-radius: 4px 0 0 0;
}
.theme-infamous tr:first-child > td.contenthead { margin-top: 22px; }
.theme-infamous td.contentcontent { border-radius: 0; }
.theme-infamous tr:has(> td.contentcontent):not(:has(+ tr > td.contentcontent)) > td.contentcontent { border-radius: 0 0 6px 6px; }
.theme-infamous td.contentcontent table tr:first-child > td > b:only-child { color: var(--navy-text); }
.theme-infamous .sidebar { background: linear-gradient(180deg, rgba(34,36,41,.86), rgba(24,25,29,.9)); backdrop-filter: blur(14px); border-right: 1px solid #4a4d55; box-shadow: inset -1px 0 0 rgba(255,255,255,.05); }
.theme-infamous .rail { background: linear-gradient(180deg, rgba(34,36,41,.86), rgba(24,25,29,.9)); backdrop-filter: blur(14px); border-left: 1px solid #4a4d55; box-shadow: inset 1px 0 0 rgba(255,255,255,.05); }
.theme-infamous .nav__label {
  margin: 0 0 4px; padding: 6px 12px; border-radius: 3px; color: var(--navy-text); letter-spacing: .12em;
  background: linear-gradient(90deg, #16207a, var(--navy) 70%, transparent); box-shadow: inset 0 1px 0 rgba(160,180,255,.15);
}
.theme-infamous .nav__item { border-radius: 4px; padding: 6px 12px; font-size: 13px; color: #d9dce3; }
.theme-infamous .nav__item.is-active { background: rgba(224, 68, 62, .14); }
.theme-infamous .brand__name { font-family: "Instrument Serif", Georgia, serif; font-size: 23px; text-transform: none; }
.theme-infamous .topbar { background: rgba(14, 18, 30, .8); border-bottom: 1px solid #2c3243; }
.theme-infamous .rail__card { padding-top: 34px; margin-top: 26px; }
.theme-infamous .rail__card h4 {
  position: absolute; top: -22px; left: -1px; margin: 0; height: 22px; display: flex; align-items: center; padding: 0 30px 0 12px;
  background: linear-gradient(180deg, #45484f, #33353b); border: 1px solid #50535b; border-bottom: 0; color: #e7e9ee; letter-spacing: .08em;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 100%, 0 100%); border-radius: 4px 0 0 0; font-size: 10.5px;
}
.theme-infamous .rail__card::after { content: ""; position: absolute; left: 12px; right: 12px; top: 10px; height: 14px; border-radius: 2px; background: linear-gradient(90deg, #16207a, var(--navy)); opacity: .9; }
.theme-infamous .rank__name { font-family: "Instrument Serif", Georgia, serif; }
.theme-infamous input[type=submit], .theme-infamous .btn:not(.btn--ghost), .theme-infamous button[type=submit]:not(.iconbtn):not(.btn--ghost) {
  background: linear-gradient(180deg, #ef5a52, #b92b27); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 8px 18px -10px #e0443e; border-radius: 5px;
}
.theme-infamous input[type=submit]:hover, .theme-infamous .btn:not(.btn--ghost):hover { color: #fff; }
.theme-infamous h1, .theme-infamous h2, .theme-infamous .card__title { font-family: "Instrument Serif", Georgia, serif; }
.theme-infamous .ticker { background: linear-gradient(90deg, rgba(22,32,122,.55), rgba(11,18,80,.2) 40%, rgba(11,18,80,.2) 60%, rgba(22,32,122,.55)); color: var(--navy-text); }

/* ---------- Noir (the original gold 2026 look, now optional) ---------- */
.theme-noir { --accent: #d8a54a; }
.theme-havana { --accent: #e0914a; }
.theme-miami { --accent: #ff5fb4; }
.theme-daylight { --accent: #b3261e; }
/* derived accent tokens must be (re)computed where the theme sets --accent */
body, .profile { --accent-soft: color-mix(in oklab, var(--accent) 16%, transparent); --accent-line: color-mix(in oklab, var(--accent) 40%, transparent); }

/* ==========================================================================
   Rebuilt pages
   ========================================================================== */
td.bare { padding: 0; background: none; border: 0; }
.grid > .card + .card, .grid > .card { margin-top: 0; }
.progress--thin { height: 5px; }
.theme-infamous .rail__card::after { display: none; }

/* dashboard */
.dash-hero { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; padding: 26px; border-radius: var(--radius); margin-bottom: 16px; border: 1px solid var(--line);
  background: radial-gradient(500px 220px at 0% 0%, var(--accent-soft), transparent 70%), var(--panel); box-shadow: var(--shadow); }
.theme-infamous .dash-hero { background: radial-gradient(500px 220px at 0% 0%, rgba(224,68,62,.16), transparent 70%), linear-gradient(180deg, #34363c, #2a2c31); box-shadow: var(--bevel); border-color: #4a4d55; }
.dash-hero h1 { margin: 6px 0 14px; }
.dash-hero h1 .dim { font-size: .5em; font-family: var(--font); letter-spacing: 0; }
.dash-hero__prog { display: grid; gap: 8px; max-width: 460px; font-size: 13px; }
.dash-hero__prog .progress { height: 10px; }
.quick { display: grid; grid-template-columns: repeat(4, 96px); gap: 10px; }
.quick__btn { display: grid; justify-items: center; gap: 4px; padding: 14px 8px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text); text-align: center; transition: transform .15s, border-color .15s; }
.quick__btn:hover { color: var(--text); border-color: var(--accent-line); transform: translateY(-2px); }
.quick__btn .ico { width: 22px; height: 22px; color: var(--accent); }
.quick__btn span { font-weight: 600; font-size: 13px; }
.quick__btn small { color: var(--dim); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.attr { margin-bottom: 12px; }
.attr__name { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.attr__name .ico { width: 15px; height: 15px; }
.attr .progress { margin-top: 6px; }
.rings { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ring { position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; }
.ring svg { width: 116px; height: 116px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3.2; }
.ring__bg { stroke: var(--line-2); }
.ring__fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dasharray 1s; }
.ring__txt { position: absolute; top: 34px; display: grid; }
.ring__txt b { font: 700 22px/1 var(--mono); }
.ring__txt span { font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.ring__sub { font-size: 12px; color: var(--dim); }
.nextach { display: flex; gap: 12px; padding: 10px; margin: 0 -10px; border-radius: 12px; color: var(--text); }
.nextach:hover { background: var(--line); color: var(--text); }
.nextach__icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; color: var(--t); background: color-mix(in oklab, var(--t) 14%, transparent); border: 1px solid color-mix(in oklab, var(--t) 30%, transparent); }
.nextach__body { flex: 1; min-width: 0; display: grid; gap: 5px; font-size: 13px; }
.feed li { align-items: flex-start; font-size: 13px; }
.feed li > span { flex: 1; min-width: 0; }
.feed time { color: var(--dim); font-size: 11.5px; white-space: nowrap; }
@media (max-width: 1100px) { .dash-hero { grid-template-columns: 1fr; } .quick { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 720px) { .quick { grid-template-columns: repeat(2, 1fr); } .dash-hero { padding: 20px; } .dash-stats { grid-template-columns: 1fr 1fr !important; } .stat__value { font-size: 17px; } }

/* profile */
.profile { display: grid; gap: 16px; }
.pbanner { position: relative; min-height: 330px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line-2); display: flex; align-items: flex-end; box-shadow: 0 30px 60px -30px #000; }
.pbanner__inner { position: relative; z-index: 5; display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: end; padding: 28px; width: 100%; }
.pbanner .avatar { box-shadow: 0 16px 40px -10px #000; }
.ptitle { display: inline-block; font: 700 11px/1 var(--font); letter-spacing: .2em; text-transform: uppercase; color: var(--accent); padding: 6px 10px; border-radius: 99px; background: rgba(0,0,0,.45); border: 1px solid var(--accent-line); backdrop-filter: blur(6px); }
.pname { font-family: var(--display) !important; font-size: clamp(38px, 5vw, 60px); line-height: 1; margin: 10px 0 12px; text-shadow: 0 4px 30px rgba(0,0,0,.6); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pname .uname { font-weight: 400; color: #fff; }
.pname .gtag { font-size: 14px; line-height: 22px; padding: 0 8px; background: rgba(0,0,0,.45); color: #fff; }
.pmeta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.pmeta .pill { background: rgba(0,0,0,.4); backdrop-filter: blur(6px); }
.pmotto { margin: 12px 0 0; font-family: var(--quote, var(--display)); font-style: italic; font-size: 20px; color: rgba(255,255,255,.85); max-width: 60ch; }
.pbanner__side { display: flex; gap: 10px; }
.pcount { display: grid; justify-items: center; min-width: 78px; padding: 12px 10px; border-radius: 14px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(8px); }
.pcount b { font: 700 22px/1 var(--mono); color: #fff; }
.pcount span { font-size: 11px; color: rgba(255,255,255,.65); margin-top: 4px; letter-spacing: .06em; text-transform: uppercase; }
.pbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pbar form { margin: 0; }
.pbar .btn .ico { width: 16px; height: 16px; }
.pbar__hint { margin-left: auto; font-size: 12.5px; }
.pbio { font-size: 14.5px; line-height: 1.7; color: var(--text); white-space: normal; overflow-wrap: anywhere; }
.showcase { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.medal { position: relative; }
.medal--big { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid color-mix(in oklab, var(--t) 35%, transparent);
  background: radial-gradient(160px 80px at 0 50%, color-mix(in oklab, var(--t) 20%, transparent), transparent), var(--panel); overflow: hidden; }
.medal--big::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 40%, rgba(255,255,255,.1) 50%, transparent 60%); background-size: 250% 100%; animation: sheen 6s ease-in-out infinite; pointer-events: none; }
.medal__disc { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #111;
  background: radial-gradient(circle at 35% 30%, #fff 0%, var(--t) 45%, color-mix(in oklab, var(--t) 50%, black) 100%);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--t) 40%, transparent), 0 8px 20px -6px color-mix(in oklab, var(--t) 60%, transparent); }
.medal__disc .ico { width: 24px; height: 24px; stroke-width: 2; }
.medal__name { font-weight: 700; margin-bottom: 4px; }
.cabinet { display: flex; flex-wrap: wrap; gap: 8px; }
.medal--mini { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #111;
  background: radial-gradient(circle at 35% 30%, #fff, var(--t) 50%, color-mix(in oklab, var(--t) 45%, black)); box-shadow: 0 0 0 2px color-mix(in oklab, var(--t) 35%, transparent); }
.medal--mini .ico { width: 17px; height: 17px; stroke-width: 2; }
.medal--mini.is-locked { background: var(--bg-2); color: var(--dim); box-shadow: 0 0 0 1px var(--line-2); }
@keyframes sheen { 0% { background-position: 120% 0; } 100% { background-position: -120% 0; } }
@media (max-width: 900px) {
  .pbanner__inner { grid-template-columns: 1fr; justify-items: start; }
  .pbanner__side { order: 3; }
  .showcase { grid-template-columns: 1fr; }
}

/* customise */
.cz { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 18px; align-items: start; }
.cz__sticky { position: sticky; top: 90px; display: grid; gap: 12px; }
.pbanner--mini { min-height: 250px; border-radius: 16px; }
.pbanner--mini .pbanner__inner { grid-template-columns: auto 1fr; gap: 16px; padding: 18px; }
.pbanner--mini .pname { font-size: 36px; margin: 8px 0 4px; }
.pbanner--mini .pmotto { font-size: 16px; margin-top: 6px; }
.cz__actions { display: flex; gap: 8px; }
.cz__actions .btn { flex: 1; }
.cz__note { font-size: 12.5px; margin: 0; }
.cz__options { display: grid; gap: 16px; min-width: 0; }
.cz__options .card + .card { margin-top: 0; }
.opt { position: relative; display: grid; gap: 6px; cursor: pointer; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt-grid { display: grid; gap: 12px; }
.opt-grid--bg { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.opt__thumb { position: relative; display: block; height: 92px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); transition: transform .15s, box-shadow .15s; }
.opt:hover .opt__thumb { transform: translateY(-2px); }
.opt input:checked + .opt__thumb, .opt input:checked ~ .avatar { box-shadow: 0 0 0 2px var(--panel-solid), 0 0 0 4px var(--accent); }
.opt input:focus-visible + .opt__thumb { outline: 2px solid var(--accent); outline-offset: 3px; }
.opt__name { font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.opt__name .ico { width: 13px; height: 13px; }
.opt__req { font-size: 11px; color: var(--dim); margin-top: -4px; }
.opt.is-locked { cursor: not-allowed; }
.opt.is-locked .opt__thumb > .pbg, .opt.is-locked .avatar, .opt.is-locked .opt__fxname { filter: grayscale(.9) brightness(.45); }
.opt__lock { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; color: #fff; }
.opt__lock .ico { width: 22px; height: 22px; filter: drop-shadow(0 2px 6px #000); }
.opt-grid--fx, .opt-grid--frame { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.opt--chip { justify-items: center; text-align: center; padding: 14px 10px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); }
.opt--chip:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: var(--accent-soft); }
.opt__fxname { font-family: var(--display); font-size: 26px; line-height: 1.1; white-space: nowrap; overflow: hidden; max-width: 100%; }
.opt--chip .opt__name { color: var(--muted); font-weight: 500; }
.opt--chip .avatar { margin: 6px 0 4px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; cursor: pointer; }
.swatch input[type=radio] { position: absolute; opacity: 0; }
.swatch span { display: block; width: 34px; height: 34px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); transition: transform .15s; }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--panel-solid), 0 0 0 4px var(--c); transform: scale(1.05); }
.swatch.is-locked span { opacity: .25; }
.swatch.is-locked::after { content: ""; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Crect x='6' y='11' width='12' height='9' rx='2'/%3E%3Cpath d='M9 11V8a3 3 0 0 1 6 0v3'/%3E%3C/svg%3E") center/14px no-repeat; }
.swatch--custom input[type=color] { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); cursor: pointer; }
.swatch--custom input[type=color]::-webkit-color-swatch-wrapper { padding: 3px; }
.swatch--custom input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pickchip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 99px; border: 1px solid var(--line-2); font-size: 13px; font-weight: 500; cursor: pointer; }
.pickchip input { position: absolute; opacity: 0; }
.pickchip .medal--mini { width: 28px; height: 28px; }
.pickchip .medal--mini .ico { width: 14px; height: 14px; }
.pickchip:has(input:checked) { border-color: var(--t); background: color-mix(in oklab, var(--t) 14%, transparent); }
@media (max-width: 980px) { .cz { grid-template-columns: 1fr; } .cz__sticky { position: static; } }

/* achievements */
.ach-summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.section-title { font-size: 12px !important; font-family: var(--font) !important; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 26px 0 10px; font-weight: 600; }
.theme-infamous .section-title { color: var(--navy-text); padding: 7px 12px; border-radius: 4px; background: linear-gradient(90deg, #16207a, var(--navy) 60%, transparent); }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.ach { padding: 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); display: grid; gap: 12px; align-content: start; scroll-margin-top: 100px; }
.theme-infamous .ach { background: linear-gradient(180deg, #34363c, #2a2c31); box-shadow: var(--bevel); border-color: #4a4d55; }
.ach.is-done { border-color: color-mix(in oklab, var(--t) 40%, transparent); background: radial-gradient(240px 90px at 0 0, color-mix(in oklab, var(--t) 14%, transparent), transparent), var(--panel); }
.theme-infamous .ach.is-done { background: radial-gradient(240px 90px at 0 0, color-mix(in oklab, var(--t) 18%, transparent), transparent), linear-gradient(180deg, #34363c, #2a2c31); }
.ach:target { outline: 2px solid var(--t); outline-offset: 2px; }
.ach__top { display: flex; gap: 12px; align-items: flex-start; }
.ach__top .medal--mini .ico { width: 22px; height: 22px; }
.ach__head { flex: 1; min-width: 0; display: grid; gap: 3px; }
.ach__prog { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; font-size: 12px; }
.ach__done { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--good); flex-wrap: wrap; }
.ach__done .ico { width: 16px; height: 16px; }
.ach__rewards { display: flex; flex-wrap: wrap; gap: 6px; }
.reward { font-size: 11.5px; padding: 3px 8px; border-radius: 6px; background: var(--bg-2); color: var(--muted); border: 1px solid var(--line); }
.reward b { color: var(--text); font-weight: 600; }
.opt.is-locked .opt__thumb > .pbg, .opt.is-locked .avatar, .opt.is-locked .opt__fxname { filter: grayscale(.7) brightness(.62); }

/* crimes */
.hero--compact { padding: 22px 24px; }
.theme-infamous .hero { background: radial-gradient(600px 200px at 100% 0%, rgba(224,68,62,.14), transparent), linear-gradient(180deg, #34363c, #2a2c31); box-shadow: var(--bevel); border-color: #4a4d55; border-radius: 8px; }
.nerve-meter { display: grid; justify-items: end; gap: 4px; }
.nerve-meter b { font-size: 34px; line-height: 1; color: var(--nerve); }
.nerve-meter b .dim { font-size: 16px; }
.crime-list { display: grid; gap: 8px; }
.crime { display: grid; grid-template-columns: 1fr auto 130px; gap: 16px; align-items: center; padding: 14px 18px; border-radius: 8px; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); transition: transform .12s, border-color .12s, background .12s; }
.theme-infamous .crime { background: linear-gradient(180deg, #33353b, #2b2d32); box-shadow: inset 1px 1px 0 rgba(255,255,255,.08); border-color: #43464e; }
.crime:hover { color: var(--text); border-color: var(--accent-line); transform: translateX(3px); }
.crime.is-off { opacity: .55; }
.crime__name { font-weight: 600; }
.crime__meta { display: flex; gap: 14px; align-items: center; font: 500 12.5px var(--mono); color: var(--muted); }
.crime__meta > span { display: inline-flex; align-items: center; gap: 5px; }
.crime__meta .ico { width: 14px; height: 14px; }
.crime__go { text-align: right; font-size: 12.5px; }
.risk { padding: 2px 8px; border-radius: 99px; font-size: 11px; }
.risk--low { color: var(--good); background: rgba(61,214,140,.1); }
.risk--med { color: var(--warn); background: rgba(255,181,71,.1); }
.risk--high { color: var(--bad); background: rgba(255,93,93,.1); }
.crime-result { position: relative; padding: 20px 22px; margin-bottom: 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); overflow: hidden; animation: rise .35s cubic-bezier(.2,.8,.2,1); }
.crime-result p { margin: 8px 0 14px; font-size: 15px; max-width: 70ch; }
.crime-result__stamp { display: inline-block; font: 700 13px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; padding: 8px 12px; border: 2px solid currentColor; border-radius: 4px; transform: rotate(-2deg); animation: stamp .45s cubic-bezier(.2,1.6,.4,1); }
.crime-result--good { border-color: rgba(61,214,140,.35); background: radial-gradient(400px 140px at 0 0, rgba(61,214,140,.14), transparent), var(--panel); } .crime-result--good .crime-result__stamp { color: var(--good); }
.crime-result--bad { border-color: rgba(255,93,93,.4); background: radial-gradient(400px 140px at 0 0, rgba(255,93,93,.16), transparent), var(--panel); } .crime-result--bad .crime-result__stamp { color: var(--bad); }
.crime-result--warn { border-color: rgba(255,181,71,.35); background: radial-gradient(400px 140px at 0 0, rgba(255,181,71,.12), transparent), var(--panel); } .crime-result--warn .crime-result__stamp { color: var(--warn); }
@keyframes stamp { from { transform: scale(2.2) rotate(-12deg); opacity: 0; } }
@media (max-width: 720px) { .crime { grid-template-columns: 1fr; gap: 8px; } .crime__go { text-align: left; } .crime__meta { flex-wrap: wrap; gap: 10px; } }

/* tabs, boards, podium */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.tab { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 500; background: var(--bg-2); }
.tab .ico { width: 15px; height: 15px; }
.tab:hover { color: var(--text); border-color: var(--line-2); }
.tab.is-active { color: var(--text); border-color: var(--accent-line); background: var(--accent-soft); }
.tab.is-active .ico { color: var(--accent); }
table.board { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.board th { text-align: left; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); font-weight: 600; padding: 12px 12px 8px; }
.board td { padding: 10px 12px; border-top: 1px solid var(--line); }
.board .r { text-align: right; }
.board tbody tr:hover td { background: rgba(255,255,255,.025); }
.board tr.is-me td { background: var(--accent-soft); }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 12px; align-items: end; margin-bottom: 16px; }
.podium__spot { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; padding: 22px 14px 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.theme-infamous .podium__spot { background: linear-gradient(180deg, #34363c, #2a2c31); box-shadow: var(--bevel); border-color: #4a4d55; }
.podium__spot--1 { padding-top: 34px; border-color: rgba(242,193,78,.45); background: radial-gradient(200px 120px at 50% 0, rgba(242,193,78,.18), transparent), var(--panel); }
.theme-infamous .podium__spot--1 { background: radial-gradient(200px 120px at 50% 0, rgba(242,193,78,.2), transparent), linear-gradient(180deg, #34363c, #2a2c31); }
.podium__place { position: absolute; top: -14px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 700 13px var(--mono); color: #111; background: #c9d1dc; }
.podium__spot--1 .podium__place { background: #f2c14e; }
.podium__spot--3 .podium__place { background: #d08b5b; }
.podium__name { font-size: 15px; margin-top: 4px; }
.podium__val { font-size: 18px; font-weight: 700; color: var(--accent); }
@media (max-width: 720px) { .podium { grid-template-columns: 1fr; } .board th:nth-child(3), .board td:nth-child(3), .board th:nth-child(5), .board td:nth-child(5) { display: none; } }

.feed li > span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.podium:has(> :only-child) { grid-template-columns: minmax(0, 320px); justify-content: center; }

/* theme picker */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.theme-card { display: grid; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); transition: transform .15s, border-color .15s; }
.theme-card:hover { color: var(--text); transform: translateY(-3px); border-color: var(--accent-line); }
.theme-card.is-on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.theme-card__mock { position: relative; height: 130px; background: var(--b); }
.theme-card__mock i { position: absolute; display: block; border-radius: 4px; }
.m-side { left: 0; top: 0; bottom: 0; width: 22%; background: var(--a); border-radius: 0 !important; }
.m-top { left: 26%; right: 4%; top: 8%; height: 10%; background: var(--a); }
.m-card { left: 26%; width: 44%; top: 26%; height: 60%; background: var(--a); box-shadow: inset 0 3px 0 var(--c); }
.m-card--2 { left: 74%; width: 22%; }
.m-btn { left: 30%; top: 70%; width: 16%; height: 9%; background: var(--c); }
.theme-card__body { padding: 12px 14px 14px; display: grid; gap: 4px; }
.theme-card__body small { color: var(--muted); font-size: 12.5px; }

/* city */
.city-hero h1 { font-size: clamp(40px, 5vw, 60px); }
.districts { columns: 2 300px; column-gap: 16px; }
.district { break-inside: avoid; margin-bottom: 16px; padding: 16px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); }
.theme-infamous .district { background: linear-gradient(180deg, #34363c, #2a2c31); box-shadow: var(--bevel); border-color: #4a4d55; }
.district__title { display: flex; align-items: center; gap: 8px; font: 600 11.5px/1 var(--font) !important; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.theme-infamous .district__title { color: var(--navy-text); padding: 8px 10px; border-radius: 4px; background: linear-gradient(90deg, #16207a, var(--navy)); }
.district__title .ico { width: 15px; height: 15px; }
.district__places { display: grid; }
.place { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 6px; color: var(--text); font-size: 13.5px; }
.place:hover { background: var(--line); color: var(--text); }
.place > .ico:first-child { width: 16px; height: 16px; color: var(--accent); }
.place span { flex: 1; }
.place__go { width: 14px; height: 14px; opacity: 0; transform: translateX(-4px); transition: .15s; color: var(--dim); }
.place:hover .place__go { opacity: 1; transform: none; }

/* events */

.ev { display: grid; grid-template-columns: 34px 1fr auto 36px; gap: 12px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.ev:last-child { border-bottom: 0; }

.pager { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }

/* gym */
@keyframes pump { 40% { transform: scale(1.02); } }

.dmg { font-family: var(--mono); }
@media (max-width: 720px) { .fight { grid-template-columns: 1fr; } .ev { grid-template-columns: 30px 1fr 30px; } }
.packs { margin-top: 4px; }
.pack { display: grid; gap: 10px; align-content: start; position: relative; }
.pack--hot { border-color: var(--accent) !important; }
.pack__tag { position: absolute; top: -11px; right: 14px; background: var(--panel-solid); }
.pack__price { font-size: 28px; font-weight: 700; }
.pack__list { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.pack__list li { display: flex; gap: 8px; align-items: center; }
.pack__list .ico { width: 15px; height: 15px; color: var(--good); }

/* ==========================================================================
   Cars: theft, garage, workshop, street racing
   ========================================================================== */
/* crime-style rows that are real <button>s inside POST forms */
button.crime { width: 100%; font: inherit; text-align: left; cursor: pointer; background: var(--panel); border: 1px solid var(--line); }
button.crime:disabled { cursor: not-allowed; }
.crime__name small { display: block; margin-top: 3px; font: 400 12.5px/1.4 var(--font); letter-spacing: 0; text-transform: none; color: var(--muted); }
.gta-meter b { font-size: 26px; }
.gta-meter .btn .ico { width: 14px; height: 14px; }
.gta-links { margin: -4px 0 14px; }
.gta-links .ico, .car__actions .ico, .build__foot .ico, .picker .ico { width: 14px; height: 14px; }

.vclass { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 4px; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; border: 1px solid currentColor; }
.vclass--banger { color: #9a9486; } .vclass--saloon { color: #8fb3d9; } .vclass--muscle { color: #e5734d; }
.vclass--prestige { color: #d4ae5a; } .vclass--exotic { color: #c58cff; } .vclass--supercar { color: #ff5c7a; } .vclass--rare { color: #6fe3cf; }
.plate { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 4px; background: #f3efe4; color: #1b1a17; font: 700 11.5px/1 var(--mono); letter-spacing: .12em; box-shadow: inset 0 0 0 1.5px #1b1a17, inset 0 0 0 3px #f3efe4, inset 0 0 0 4px rgba(0,0,0,.35); white-space: nowrap; }
.plate--sm { height: 18px; font-size: 10px; padding: 0 6px; vertical-align: 1px; }

.cars { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.car { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.car::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: currentColor; opacity: .7; z-index: 1; }
.car--banger { color: #9a9486; } .car--saloon { color: #8fb3d9; } .car--muscle { color: #e5734d; } .car--prestige { color: #d4ae5a; } .car--exotic { color: #c58cff; }
.car--exotic { box-shadow: 0 0 0 1px rgba(197,140,255,.25), 0 12px 40px -18px rgba(197,140,255,.5); }
.car--supercar { color: #ff5c7a; box-shadow: 0 0 0 1px rgba(255,92,122,.28), 0 12px 40px -18px rgba(255,92,122,.55); }
.car--rare { color: #6fe3cf; box-shadow: 0 0 0 1px rgba(111,227,207,.35), 0 14px 46px -16px rgba(111,227,207,.6); }
.car--supercar .car__top .vclass { color: #ff5c7a; } .car--rare .car__top .vclass { color: #6fe3cf; }
/* Car photos: a studio shot on a backdrop lit in the class colour. */
.carpic { --tint: 154,148,134; position: relative; margin: 0; aspect-ratio: 2 / 1; overflow: hidden;
  background: radial-gradient(ellipse 70% 60% at 50% 72%, rgba(var(--tint), .22), transparent 70%), linear-gradient(180deg, #1d1c19, #0e0d0b); }
.carpic img { display: block; width: 100%; height: 100%; object-fit: contain; }
.carpic figcaption { position: absolute; right: 6px; bottom: 3px; max-width: 80%; font-size: 9px; line-height: 1.3; color: rgba(255,255,255,.38); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carpic figcaption a { color: inherit; text-decoration: none; } .carpic figcaption a:hover { color: rgba(255,255,255,.75); }
.carpic--none { display: grid; place-items: center; color: rgba(var(--tint), .6); } .carpic--none .ico { width: 42px; height: 42px; }
.carpic--saloon { --tint: 143,179,217; } .carpic--muscle { --tint: 229,115,77; } .carpic--prestige { --tint: 212,174,90; }
.carpic--exotic { --tint: 197,140,255; } .carpic--supercar { --tint: 255,92,122; } .carpic--rare { --tint: 111,227,207; }
.car > .carpic { margin: -16px -16px 0; border-bottom: 1px solid var(--line); }
.car__tags { display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.car .vclass, .carpic ~ * .vclass{ white-space: nowrap; }
.car__top { flex-wrap: wrap; row-gap: 6px; }
.carstyle { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 2px; white-space: nowrap; }
.sr-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.sr-tabs button { height: 30px; padding: 0 12px; font: 600 12px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 2px; cursor: pointer; }
.sr-tabs button:hover { color: var(--text); } .sr-tabs button.is-on { color: var(--text); border-color: var(--accent); background: var(--panel-2, var(--panel)); }
.sr-class { margin: 0 0 22px; } .sr-class[hidden] { display: none; }
.sr-class__h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.sr-class__h .vclass { height: 24px; font-size: 11px; }
.sr-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.sr-car .car__name { font-size: 17px; }
.sr-car:not(.is-owned) .carpic img { filter: saturate(.85); }
.sr-rarity { font-size: 11px; color: var(--muted); }
.sr-parts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.sr-parts > span { display: grid; gap: 3px; font-size: 10.5px; }
.sr-parts i { font-style: normal; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.sr-parts .progress { height: 4px; }
.sr-parts > span { grid-template-columns: 1fr auto; align-items: center; column-gap: 6px; }
.sr-parts > span > i { grid-column: 1 / -1; }
.sr-parts em { font-style: normal; font-family: var(--mono, monospace); font-size: 10.5px; color: var(--text); min-width: 2ch; text-align: right; }
.carspec { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 11.5px; color: var(--muted); margin: -2px 0 6px; line-height: 1.35; }
.carspec b { font-weight: 600; color: var(--text); white-space: nowrap; }
.carspec i { font-style: normal; flex-basis: 100%; color: var(--muted); }
.car > * { color: var(--text); }
.car__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.car__top .vclass { color: inherit; }
.car--banger .car__top .vclass { color: #9a9486; } .car--saloon .car__top .vclass { color: #8fb3d9; } .car--muscle .car__top .vclass { color: #e5734d; }
.car--prestige .car__top .vclass { color: #d4ae5a; } .car--exotic .car__top .vclass { color: #c58cff; }
.car__name { margin: 2px 0 0; font-size: 19px; line-height: 1.15; }
.car__cond { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.car__bar { height: 5px; }
.car__val { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.car__val b { font-size: 20px; font-variant-numeric: tabular-nums; }
.car__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: auto; }
.car__actions form, .car__actions .btn { width: 100%; }
.car__actions .btn { justify-content: center; gap: 5px; }

.empty-state { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 48px 20px; border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty-state > .ico { width: 34px; height: 34px; color: var(--accent); }
.empty-state h3 { margin: 4px 0 0; }
.empty-state p { margin: 0 0 8px; max-width: 46ch; }

/* part grades */
.grade { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 3px; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; vertical-align: 1px; }
.grade--junk { color: #8a8478; background: rgba(138,132,120,.12); }
.grade--stock { color: #b9b2a2; background: rgba(185,178,162,.12); }
.grade--sport { color: #6fc3ff; background: rgba(111,195,255,.12); }
.grade--race { color: #4fe0a0; background: rgba(79,224,160,.12); }
.grade--elite { color: #f1d690; background: rgba(241,214,144,.14); }
.grade--legendary { color: #fff; background: linear-gradient(90deg, #b04cff, #ff5c8a, #ffb347); box-shadow: 0 0 14px rgba(255,92,138,.45); }

/* builds */
.builds { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; margin-bottom: 18px; }
.build { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.build__head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.build__name { margin: 6px 0 4px; font-size: 22px; line-height: 1.1; }
.build__rec { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.build__rating { display: grid; justify-items: center; min-width: 76px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--accent-line); background: var(--accent-soft); }
.build__rating b { font-size: 34px; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.build__rating span { font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.build__slots { display: grid; gap: 2px; padding: 8px 0; }
.slot { display: grid; grid-template-columns: 30px minmax(0, 1fr) 34px auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.slot:last-child { border-bottom: 0; }
.slot__ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.slot__ico .ico { width: 15px; height: 15px; }
.slot__body { display: grid; gap: 4px; min-width: 0; }
.slot__label { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.slot__part { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot__bar { height: 4px; }
.slot__q { font-size: 18px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.slot--empty .slot__ico { background: var(--line); color: var(--dim); }
.build__foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); }

.bin .card__head { display: flex; align-items: center; gap: 10px; }
.bin__slot { display: flex; align-items: center; gap: 8px; margin: 18px 0 8px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.bin__slot .ico { width: 15px; height: 15px; }
.bin__list { display: grid; gap: 6px; }
.part { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.part--legendary { border-color: rgba(255,92,138,.5); background: linear-gradient(90deg, rgba(176,76,255,.08), rgba(255,179,71,.06)); }
.part__q { font-size: 20px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.part__name { font-size: 13.5px; min-width: 0; }
.part__acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.part__fit { display: flex; gap: 6px; }
.part__fit select { min-height: 30px; font-size: 12.5px; max-width: 200px; }

/* racing */
.picker { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 6px; }
.picker > .muted { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; margin-right: 4px; }

.lane { display: grid; grid-template-columns: minmax(0, 180px) 1fr 40px; gap: 12px; align-items: center; font-size: 13px; }

.lane b { text-align: right; font-variant-numeric: tabular-nums; }

@keyframes lane-run { from { width: 0; } }

@media (max-width: 720px) {

  .builds { grid-template-columns: 1fr; }
  .part { grid-template-columns: 36px minmax(0, 1fr); }
  .part__acts { grid-column: 1 / -1; justify-content: flex-start; }
  .lane { grid-template-columns: 90px 1fr 32px; }
}
.gta-meter b { color: var(--gold, var(--accent)); }
.car__actions .btn { white-space: nowrap; font-size: 11px; letter-spacing: .06em; padding: 0 8px; }

/* car card: one clear primary (Sell), three quiet secondaries underneath */
.car__actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.car__actions form:first-child { grid-column: 1 / -1; }
.car__actions form:not(:first-child) .btn { font: 600 12px/1 var(--font); letter-spacing: 0; text-transform: none; padding: 0 6px; }
.car__actions:not(:has(form:nth-child(4))) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.car__actions form:not(:first-child) button.btn.btn--ghost { font: 600 12px/1 var(--font); letter-spacing: 0; text-transform: none; padding: 0 6px; }

/* ==========================================================================
   Sides: police, heat, precinct, most wanted
   ========================================================================== */
.small { font-size: 12.5px; line-height: 1.5; }
.sidebadge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px 0 7px; border-radius: 4px; font: 700 10.5px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; }
.sidebadge .ico { width: 13px; height: 13px; }
.sidebadge--cop { color: #cfe3ff; background: linear-gradient(180deg, #1d3f7a, #132b56); border: 1px solid #3d6bb8; box-shadow: 0 0 14px rgba(61,107,184,.35); }
.sidetxt--cop { color: #8fb8ff; }
.heat { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; font-weight: 700; }
.heat i { position: relative; display: block; width: 70px; height: 5px; border-radius: 99px; background: var(--line); overflow: hidden; }
.heat i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--h); border-radius: inherit; background: currentColor; }
.heat--ok { color: var(--good); } .heat--warn { color: var(--warn); } .heat--bad { color: var(--bad); }
.heat--mini i { width: 40px; }
.precinct { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.precinct__side { display: grid; gap: 12px; }
.precinct__side .card { padding: 16px; }
.precinct__side .card__head { margin-bottom: 10px; }
.section-more { float: right; font-size: 11px; letter-spacing: .1em; }
.suspect { cursor: default; }
.suspect:hover { transform: none; }

.kvrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.kvrow:last-of-type { margin-bottom: 10px; }
.offer { padding: 10px 0; border-top: 1px solid var(--line); }
.offer:first-of-type { border-top: 0; }

.contact { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); }
.contact input { min-height: 30px; font-size: 13px; }
.wiretap { margin-bottom: 16px; border-color: rgba(143,184,255,.35); }
.wiretap .card__title .ico { width: 16px; height: 16px; vertical-align: -2px; }
.tap { padding: 10px 12px; margin-bottom: 6px; border-left: 2px solid #3d6bb8; background: rgba(61,107,184,.06); font-family: var(--mono); font-size: 12.5px; }
.tap__meta { color: var(--muted); font-size: 11.5px; margin-bottom: 4px; }
.tap__subj { font-weight: 700; }
.tap__body { white-space: pre-wrap; overflow-wrap: anywhere; }
.crossline { max-width: 620px; margin: 30px auto; padding: 34px; text-align: center; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--panel); }
.crossline h2 { margin: 12px 0 8px; font-size: 32px; }
.crossline p { color: var(--muted); margin: 0 auto 18px; max-width: 48ch; }
.crossline .row { justify-content: center; }
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.sidepick { border: 0; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.sidepick legend { font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 6px; }
.sidepick__opt { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; padding: 12px; border: 1px solid var(--line-2); border-radius: 8px; cursor: pointer; }
.sidepick__opt:has(input:checked) { border-color: var(--gold, var(--accent)); background: rgba(212,174,90,.07); }
.sidepick__opt:has(input[value=cop]:checked) { border-color: #3d6bb8; background: rgba(61,107,184,.1); }
.sidepick__opt input { margin-top: 3px; accent-color: var(--gold, var(--accent)); }
.sidepick__opt b { display: block; font-size: 14px; }
.sidepick__opt small { display: block; color: var(--muted); font-size: 12px; line-height: 1.45; margin-top: 2px; }
@media (max-width: 1100px) { .precinct { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .sides { grid-template-columns: 1fr; } }
.crime.suspect { grid-template-columns: minmax(0, 1fr) auto auto; }

/* ==========================================================================
   Comms: chat tabs, phone, burner
   ========================================================================== */
.chat__head { display: flex; align-items: center; gap: 8px; }
.chat__tabs { margin-left: auto; display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; }
.chat__tab { all: unset; cursor: pointer; padding: 3px 8px; border-radius: 4px; font: 600 9.5px/1.2 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.chat__tab.is-active { background: var(--accent-soft); color: var(--gold-hi, var(--accent)); }
.chat__tab:focus-visible { outline: 1px solid var(--accent); }
.chat__why { margin: 0 12px 8px; font-size: 12px; color: var(--muted); line-height: 1.45; }
.chat__form input:disabled { opacity: .5; }
.chat__msg { position: relative; }
.chat__cop { color: #8fb8ff; margin-right: 4px; font-size: 11px; }
.chat__acts { position: absolute; right: 0; top: -2px; display: none; gap: 4px; }
.chat__msg:hover .chat__acts, .chat__msg:focus-within .chat__acts { display: inline-flex; }
.chat__acts button { all: unset; cursor: pointer; font-size: 10.5px; color: var(--dim); padding: 1px 5px; border-radius: 3px; background: var(--bg-2); border: 1px solid var(--line); }
.chat__acts button:hover { color: var(--bad); }

.phonetab--burner.is-active { border-color: #3fbf8f; background: rgba(63,191,143,.08); }
.phone { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 520px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.phone__list { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-right: 1px solid var(--line); min-width: 0; }
.phone__new { display: flex; gap: 6px; }
.phone__new input { flex: 1; min-width: 0; min-height: 32px; font-size: 13px; }
.phone__threads { display: grid; gap: 4px; overflow-y: auto; max-height: 440px; }
.thread { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 10px; border-radius: 8px; font-size: 13px; }
.thread:hover { background: var(--line); }
.thread.is-active { background: var(--accent-soft); }
.thread b { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread > span:not(.badge) { grid-column: 1 / -1; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread time { grid-column: 1 / -1; font-size: 10.5px; color: var(--dim); }
.phone__thread { display: flex; flex-direction: column; min-width: 0; }
.phone__head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); min-height: 52px; }
.phone__head b { font-size: 15px; }
.phone__tapped, .phone__secure { display: flex; align-items: center; gap: 8px; padding: 7px 16px; font-size: 11.5px; border-bottom: 1px solid var(--line); }
.phone__tapped { color: var(--warn); background: rgba(255,181,71,.05); }
.phone__secure { color: #3fbf8f; background: rgba(63,191,143,.06); }
.phone__tapped .ico, .phone__secure .ico { width: 13px; height: 13px; }
.phone__msgs { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 16px; overflow-y: auto; max-height: 420px; }
.bubble { align-self: flex-start; max-width: 72%; padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: var(--line); }
.bubble p { margin: 0; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.bubble time { display: block; margin-top: 3px; font-size: 10px; color: var(--dim); }
.bubble--me { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: color-mix(in oklab, var(--gold, var(--accent)) 22%, var(--panel)); }
.bubble--bad p { color: var(--dim); font-style: italic; }
.phone__compose { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.phone__compose input { flex: 1; min-width: 0; }
.burner__me { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px dashed rgba(63,191,143,.45); border-radius: 8px; }
.burner__me b { font: 700 16px var(--mono); letter-spacing: .06em; color: #3fbf8f; flex: 1; }
.burner__burn { margin-top: auto; }
.burner__nick { max-width: 180px; min-height: 28px; font-size: 12.5px; margin-left: auto; }
.burner__buy, .burner__lost { display: grid; grid-template-columns: 180px 1fr; gap: 28px; align-items: center; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.burner__lost { grid-template-columns: 1fr; }
.burner__buy h2, .burner__lost h2 { margin: 0 0 8px; }
.burner__buy p, .burner__lost p { color: var(--muted); margin: 0 0 12px; }
.burner__facts { margin: 0 0 18px; padding-left: 18px; color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.burner__phone { justify-self: center; width: 110px; height: 190px; border-radius: 18px; background: linear-gradient(160deg, #2b2e33, #15171a); border: 2px solid #3a3d44; box-shadow: inset 0 0 0 6px #111, 0 20px 40px -18px #000; display: grid; place-items: start center; padding-top: 34px; }
.burner__phone span { display: block; width: 78px; padding: 10px 0; text-align: center; background: #0d2a1f; color: #3fbf8f; font: 700 12px var(--mono); border-radius: 4px; box-shadow: 0 0 18px rgba(63,191,143,.25); }
@media (max-width: 860px) {
  .phone { grid-template-columns: 1fr; }
  .phone__list { border-right: 0; border-bottom: 1px solid var(--line); }
  .phone__threads { max-height: 200px; }
  .burner__buy { grid-template-columns: 1fr; }
}
.burner [hidden], .phone [hidden] { display: none !important; }
.burner__me b { white-space: nowrap; font-size: 15px; }

/* ==========================================================================
   Economy: markets, traders, travel
   ========================================================================== */
.mtabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.mtab { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.mtab span { font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
.mtab.is-active { color: var(--text); border-color: var(--gold, var(--accent)); background: var(--accent-soft); }
.mtab--sort { margin-left: auto; border-style: dashed; }
.listings { display: grid; gap: 8px; }
.listing { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.listing.is-mine { border-style: dashed; }
.listing__ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: var(--accent-soft); color: var(--gold, var(--accent)); }
.listing__ico .ico { width: 18px; height: 18px; }
.listing__body h3 { margin: 0 0 3px; font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.listing__who { margin-top: 4px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.listing__who .ico { width: 13px; height: 13px; }
.listing__buy { display: grid; justify-items: end; gap: 6px; }
.listing__buy b { font-size: 18px; font-variant-numeric: tabular-nums; }
.listing__buy .ico { width: 13px; height: 13px; }
.fence__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.fence__item:first-of-type { border-top: 0; }
.fence__item > div { display: grid; gap: 3px; min-width: 0; }
.fence__item select { margin-top: 4px; min-height: 30px; font-size: 12.5px; max-width: 100%; }
.sting { border-color: rgba(61,107,184,.5); }
.sting .card__title .ico { width: 15px; height: 15px; vertical-align: -2px; color: #8fb8ff; }
.sellbox .field, .sting .field { margin-bottom: 10px; }
.sellbox select, .sting select { width: 100%; }
.pill--hot { color: #ff8a70; border-color: rgba(255,120,90,.4); background: rgba(255,93,93,.08); }

.cities { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }

@media (max-width: 720px) { .listing { grid-template-columns: 40px minmax(0, 1fr); } .listing__buy { grid-column: 1 / -1; justify-items: start; grid-auto-flow: column; align-items: center; } }

/* ---------- Player profile body (BBCode) ---------- */
.pbody { margin: 16px 0; padding: 20px 22px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pbio { line-height: 1.6; overflow-wrap: anywhere; }
.pbio .bb-img { max-width: 100%; height: auto; vertical-align: middle; }
.bb-center { text-align: center; } .bb-left { text-align: left; } .bb-right { text-align: right; }
.bb-size1 { font-size: 10px; } .bb-size2 { font-size: 12px; } .bb-size3 { font-size: 15px; } .bb-size4 { font-size: 19px; } .bb-size5 { font-size: 25px; } .bb-size6 { font-size: 33px; line-height: 1.2; } .bb-size7 { font-size: 44px; line-height: 1.1; }
.bb-font-serif, .bb-font-display { font-family: var(--display); } .bb-font-mono { font-family: var(--mono); } .bb-font-script { font-family: "Brush Script MT", "Segoe Script", cursive; } .bb-font-sans { font-family: var(--font); }
.bb-glow { text-shadow: 0 0 6px var(--g), 0 0 14px var(--g); }
.bb-shadow { text-shadow: 2px 2px 0 #000; }
.bb-quote { margin: 10px 0; padding: 8px 14px; border-left: 3px solid var(--accent); background: rgba(0, 0, 0, .25); }
.bb-quote cite { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.bb-hr { border: 0; border-top: 1px solid var(--line-2); margin: 14px 0; }
.bb-list { margin: 6px 0; padding-left: 22px; }
.bb-spoiler summary { cursor: pointer; color: var(--muted); }
.bbed__bar { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.bbed__bar button { font: 600 12px/1 var(--font); padding: 6px 9px; background: rgba(0, 0, 0, .3); color: var(--text); border: 1px solid var(--line-2); cursor: pointer; border-radius: 4px; }
.bbed__bar button:hover { border-color: var(--accent); }
.bbed textarea { font-family: var(--mono); font-size: 13px; }
.bbed__foot { display: flex; gap: 12px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.bbed__preview { margin-top: 10px; padding: 14px; border: 1px dashed var(--line-2); max-height: 600px; overflow: auto; }

/* ---------- Hover player cards (api/card.php + app.js) ---------- */
.pcard-pop { position: fixed; z-index: 90; width: 330px; opacity: 0; transform: translateY(4px); transition: opacity .14s ease, transform .14s ease; pointer-events: none; }
.pcard-pop.is-on { opacity: 1; transform: none; pointer-events: auto; }
.pcard { --pf-box: color-mix(in srgb, var(--pf-box-c, #14120e) 95%, #000); color: var(--pf-text, #efe8d8); font-family: var(--pf-body-font, var(--font));
  background: var(--pf-box); border: max(var(--pf-edge-w, 1px), 1px) solid var(--pf-edge-c, #2f291e); border-radius: min(var(--pf-radius, 0px), 16px); overflow: hidden; box-shadow: 0 24px 50px -16px #000; }
.pcard__cover { position: relative; height: 84px; overflow: hidden; }
.pcard__cover .pbg { filter: hue-rotate(var(--pf-cv-hue, 0deg)) saturate(var(--pf-cv-sat, 100%)) brightness(var(--pf-cv-bri, 100%)) sepia(var(--pf-cv-sepia, 0%)); }
.pcard__body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 0 14px; align-items: end; }
.pcard__av { margin-top: -30px; position: relative; }
.pcard__av .avatar img { box-shadow: 0 0 0 3px var(--pf-box-c, #14120e); }
.pcard.pf--av-rounded .pcard__av .avatar img { border-radius: 22% !important; }
.pcard.pf--av-square .pcard__av .avatar img { border-radius: 0 !important; }
.pcard.pf--av-hex .pcard__av .avatar img { border-radius: 0 !important; box-shadow: none; clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); }
.pcard.pf--av-diamond .pcard__av .avatar img { border-radius: 0 !important; box-shadow: none; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.pcard:not(.pf--av-circle) .pcard__av .avatar::before, .pcard:not(.pf--av-circle) .pcard__av .avatar::after { display: none; }
.pcard__id { padding-top: 8px; min-width: 0; }
.pcard__title { display: inline-block; font: 600 10.5px/1 var(--font); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); padding: 3px 6px; margin-bottom: 4px; }
.pcard__name { display: flex; align-items: center; gap: 8px; font-family: var(--pf-name-font); font-weight: var(--pf-name-w, 700); font-style: var(--pf-name-style, normal); letter-spacing: var(--pf-name-track, 0);
  font-size: 26px; line-height: 1.1; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; filter: drop-shadow(0 0 calc(var(--pf-name-glow, 0px) * .6) var(--pf-name-glow-c, transparent)); }
.pcard.pf--ncase-upper .pcard__name { text-transform: uppercase; }
.pcard__name .uname:not(.nfx) { color: #fff; }
.pcard.pf--nmode-solid .pcard__name .uname { background: none !important; color: var(--pf-name-c1) !important; -webkit-text-fill-color: var(--pf-name-c1) !important; animation: none !important; filter: none !important; }
.pcard.pf--nmode-gradient .pcard__name .uname { background: linear-gradient(var(--pf-name-angle), var(--pf-name-c1), var(--pf-name-c2)) !important; -webkit-background-clip: text !important; background-clip: text !important; color: transparent !important; -webkit-text-fill-color: transparent !important; animation: none !important; filter: none !important; }
.pcard__tag { font: 700 10px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; padding: 4px 5px; border: 1px solid var(--pf-edge-c, #2f291e); color: var(--pf-text, #efe8d8); font-style: normal; filter: none; }
.pcard__meta { display: flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 12px; color: var(--pf-muted, #a2998a); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard__dot { width: 7px; height: 7px; border-radius: 50%; background: #5b5448; flex: none; }
.pcard__dot.is-on { background: #3dd68c; }
.pcard__motto { margin: 10px 14px 0; font-family: var(--pf-motto-font, serif); font-style: italic; font-size: 15px; color: var(--pf-text, #efe8d8); opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard__stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 12px 14px 0; border-top: 1px solid color-mix(in srgb, var(--pf-text, #fff) 9%, transparent); padding-top: 10px; }
.pcard__stats div { display: grid; justify-items: center; gap: 2px; min-width: 0; }
.pcard__stats b { font: 700 14px var(--pf-head-font, var(--font)); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard__stats span { font-size: 10px; color: var(--pf-muted, #a2998a); text-transform: uppercase; letter-spacing: .07em; }
.pcard__act { display: flex; gap: 6px; padding: 12px 14px 14px; }
.pcard__act .btn { flex: 1; justify-content: center; }

/* ---------- Hit list ---------- */
.hit { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 14px; }
.hit__post { grid-row: span 3; }
.hit__form { display: grid; gap: 10px; }
.hit__anon { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.hit__anon small { color: var(--muted); }
.hit__board .section-title { margin-top: 0; }
.hit__list { display: grid; border: 1px solid var(--line); background: var(--panel); }
.hit__row { display: grid; grid-template-columns: 26px 40px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.hit__row:first-child { border-top: 0; }
.hit__rank { font: 700 14px var(--mono); color: var(--muted); text-align: center; }
.hit__av img { width: 40px; height: 40px; object-fit: cover; clip-path: circle(50%); display: block; }
.hit__who b { font-size: 15px; }
.hit__who small { display: block; color: var(--muted); font-size: 12px; }
.hit__amt { font: 700 17px var(--font); color: #e5484d; font-variant-numeric: tabular-nums; }
.hit__mine { display: grid; }
.hit__minerow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.hit__minerow:first-child { border-top: 0; }
.hit__minerow span { flex: 1; }
.hit__minerow form { margin: 0; }
@media (max-width: 900px) { .hit { grid-template-columns: 1fr; } .hit__post { grid-row: auto; } .hit__row { grid-template-columns: 22px 36px minmax(0, 1fr) auto; } .hit__row .btn { grid-column: 3 / -1; justify-self: start; } }
.pcard__bounty { display: flex; align-items: center; gap: 8px; margin: 12px 14px 0; padding: 7px 10px; font-size: 12.5px; color: #ffd9d9; background: rgba(229, 72, 77, .14); border: 1px solid rgba(229, 72, 77, .45); }
.pcard__bounty .ico { width: 14px; height: 14px; color: #ff6b6b; }
.pcard__bounty b { margin-left: auto; color: #fff; }

/* ---------- shared summary chips in heroes ---------- */
.fr-sum { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.fr-sum > div { display: grid; text-align: right; }
.fr-sum b { font: 700 22px var(--font); font-variant-numeric: tabular-nums; }
.fr-sum b small { font-size: 14px; color: var(--muted); }
.fr-sum span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.fr-sum form { margin: 0; }
/* Phones: stack the hero stats under the blurb instead of squeezing them into a thin column beside it. */
@media (max-width: 720px) {
  .hero--compact > .spread { flex-direction: column; align-items: stretch !important; gap: 14px; }
  .hero--compact > .spread > .fr-sum { justify-content: flex-start; gap: 10px 26px; }
  .hero--compact > .spread > .fr-sum > div { text-align: left; }
  .hero--compact > .spread > .nerve-meter { justify-items: start !important; padding-left: 0 !important; border-left: 0 !important; }
}

/* ---------- Fronts ---------- */

.fr { display: grid; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.fr.is-closed { border-color: rgba(229, 72, 77, .5); }

 .bs__bar { height: 6px; background: rgba(255, 255, 255, .07); overflow: hidden; }
 .bs__bar span { display: block; height: 100%; background: var(--accent); }

.fr-shop { display: grid; border: 1px solid var(--line); background: var(--panel); }
.fr-buy { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.4fr) auto auto; gap: 14px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); margin: 0; }
.fr-buy:first-child { border-top: 0; }
.fr-buy.is-off { opacity: .55; }
.fr-buy__main b { font-size: 15px; }
.fr-buy__main small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.fr-buy__stats { display: flex; gap: 14px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.fr-buy__stats small { color: var(--muted); }
.fr-buy input { width: 170px; }
.fr-buy__tag { grid-column: span 2; justify-self: end; font-size: 12.5px; color: var(--muted); }
@media (max-width: 900px) { .fr-buy { grid-template-columns: 1fr; } .fr-buy input { width: 100%; } .fr-buy__tag { justify-self: start; } }

/* ---------- Hideout ---------- */
.bs { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; margin-top: 14px; align-items: start; }
.bs__main, .bs__side { display: grid; gap: 14px; }
.bs__bar { height: 10px; margin: 4px 0 10px; }

.bs__log { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.bs__log:first-of-type { border-top: 0; }
.bs__log time { color: var(--muted); font-size: 12px; white-space: nowrap; }
@media (max-width: 900px) { .bs { grid-template-columns: 1fr; } }

/* ---------- Missions ---------- */
.dash-mission { display: grid; grid-template-columns: auto minmax(0, 1fr) 180px auto; gap: 16px; align-items: center; margin: 14px 0 0; padding: 12px 18px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent); color: var(--text) !important; text-decoration: none !important; }
.dash-mission:hover { border-color: var(--accent); }
.dash-mission__k { font-size: 11.5px; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.dash-mission b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-mission__bar { height: 5px; background: rgba(255, 255, 255, .08); }
.dash-mission__bar i { display: block; height: 100%; background: var(--accent); }
.dash-mission__go { font-size: 13px; color: var(--gold-hi, var(--accent)); white-space: nowrap; }
@media (max-width: 720px) { .dash-mission { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- Crew wars ---------- */
.war { display: grid; gap: 14px; margin-top: 14px; }

.war__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 14px; align-items: start; }
.war .dim { color: var(--muted); }
@media (max-width: 760px) {

  .war__cols { grid-template-columns: 1fr; }
}

/* ---------- Crafting ---------- */
.cr-lvl { min-width: 240px; display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); background: rgba(0, 0, 0, .3); }
.cr-lvl__top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cr-lvl__top b { font-size: 17px; color: var(--accent); }
.cr-lvl__top span, .cr-lvl small { color: var(--muted); font-size: 12px; }
.cr-lvl .bs__bar { margin: 0; height: 7px; }
.cr { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 16px; margin-top: 10px; align-items: start; }
.cr__side { display: grid; gap: 14px; }
.cr__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 14px; }
.cr__card { display: grid; gap: 8px; align-content: start; padding: 14px; border: 1px solid var(--line); background: var(--panel); }
.cr__card.is-ready { border-color: color-mix(in oklab, var(--accent) 55%, var(--line)); }
.cr__card.is-locked { opacity: .5; }
.cr__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cr__head b { font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }
.cr__hot { color: #e5484d; display: inline-flex; }
.cr__hot .ico { width: 15px; height: 15px; }
.cr__card p { margin: 0; font-size: 12.5px; color: var(--muted); }
.cr__in { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.cr__in li { font-size: 12px; padding: 3px 7px; border: 1px solid var(--line-2, var(--line)); color: #e8a3a3; }
.cr__in li.ok { color: #7fd6a0; }
.cr__in small { color: var(--muted); }
.cr__card form { margin: 0; display: flex; align-items: center; gap: 8px; }
.cr__rebuild { flex-wrap: wrap; }
.cr__rebuild select { flex: 1 1 100%; min-width: 0; }
.cr__stash { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); margin: 0; }
.cr__stash:first-of-type { border-top: 0; }
.cr__stash > div { flex: 1; display: grid; min-width: 0; }
.cr__stash b small { color: var(--accent); }
.cr__stash select { max-width: 110px; }
@media (max-width: 900px) { .cr { grid-template-columns: 1fr; } .cr-lvl { min-width: 0; } }

/* ---------- Organised crime ---------- */
.oc-invite { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; padding: 12px 14px; border: 1px solid var(--accent); background: color-mix(in oklab, var(--accent) 10%, var(--panel)); }
.oc-invite > span { display: inline-flex; align-items: center; gap: 8px; }
.oc-invite form { margin: 0; display: flex; gap: 6px; }

.war__cols > .card { margin: 0 !important; }

/* ---------- Dashboard pulse: streak + city event ---------- */
.dash-pulse { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px; margin: 14px 0; }
.streak, .cityev { border: 1px solid var(--line); background: var(--panel); padding: 14px 16px; }
.streak { display: grid; gap: 12px; }
.streak__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.streak__top small, .cityev small { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.streak__top b { font-size: 22px; }
.streak__top form { margin: 0; }
.streak__days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.streak__days li { display: grid; gap: 1px; text-align: center; padding: 7px 2px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); }
.streak__days span { font-size: 10.5px; color: var(--muted); }
.streak__days b { font-size: 13px; font-variant-numeric: tabular-nums; }
.streak__days small { font-size: 9.5px; color: var(--accent); }
.streak__days li.is-done { opacity: .45; }
.streak__days li.is-done b { text-decoration: line-through; }
.streak__days li.is-now { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 14%, transparent); box-shadow: 0 0 0 1px var(--accent) inset; }
.streak__days li:last-child b { color: var(--accent); }
.cityev { position: relative; display: flex; gap: 12px; align-items: flex-start; padding-bottom: 30px; }
.cityev__icon { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); color: var(--muted); }
.cityev.is-on .cityev__icon { border-color: var(--accent); color: var(--accent); background: color-mix(in oklab, var(--accent) 12%, transparent); }
.cityev__icon .ico { width: 20px; height: 20px; }
.cityev b { display: block; font-size: 18px; margin-top: 2px; }
.cityev.is-on b { color: var(--accent); }
.cityev p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.cityev__next { position: absolute; left: 16px; bottom: 9px; font-style: normal; font-size: 11.5px; color: var(--muted); }
.ticker__ev { color: var(--accent); letter-spacing: .06em; }
@media (max-width: 900px) { .dash-pulse { grid-template-columns: 1fr; } .streak__days small { display: none; } }

/* ---------- Turf ---------- */
.tf-cities { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 10px; }
.tf-cities a { padding: 7px 12px; border: 1px solid var(--line); color: var(--muted); font-size: 13px; text-decoration: none; }
.tf-cities a.is-on { color: var(--text, #eee); border-color: var(--accent); background: color-mix(in oklab, var(--accent) 12%, transparent); }
.tf-cities small { color: var(--accent); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; }
.tf-map { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tf { display: grid; gap: 10px; align-content: start; padding: 14px; border: 1px solid var(--line); background: var(--panel);
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .015) 0 8px, transparent 8px 16px); }
.tf.is-held { border-color: rgba(229, 72, 77, .45); }
.tf.is-ours { border-color: #7fd6a0; box-shadow: inset 0 3px 0 #7fd6a0; }
.tf__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tf__head h3 { margin: 0; font-size: 17px; }
.tf__head b { color: #7fd6a0; font-variant-numeric: tabular-nums; }
.tf__head small { color: var(--muted); font-weight: 400; }
.tf__owner { display: flex; align-items: center; gap: 6px; font-size: 13.5px; min-height: 20px; }
.tf__owner .ico { width: 15px; height: 15px; color: var(--accent); }
.tf__owner small { color: var(--muted); margin-left: auto; font-size: 11.5px; }
.tf__inf { display: grid; gap: 6px; }
.tf__row { display: grid; grid-template-columns: minmax(0, 1fr) 70px 34px; gap: 8px; align-items: center; font-size: 12.5px; }
.tf__row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf__row .bs__bar { margin: 0; height: 5px; }
.tf__row em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.tf__row.is-us em, .tf__row.is-us > span { color: #7fd6a0; }
.tf form { margin: 0; }
@media (max-width: 900px) { .tf-map { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .tf-map { grid-template-columns: 1fr; } }

/* ---------- Murder / witnesses / obituaries / Swiss / tomb ---------- */
.kl-target { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 14px 0 10px; padding: 12px 14px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); }
.kl-target b { display: block; font-size: 16px; }
.kl-target small { color: var(--muted); font-size: 12px; }
.kl-need { text-align: right; display: grid; }
.kl-need b { font: 700 24px var(--font); color: #e5484d; font-variant-numeric: tabular-nums; }
.kl-shoot form.row { gap: 8px; flex-wrap: wrap; }
.kl-guard { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 10px; padding: 10px 12px; border: 1px solid rgba(229, 72, 77, .45); background: rgba(229, 72, 77, .08); font-size: 13.5px; }
.kl-guard > svg { flex: none; width: 20px; height: 20px; color: #e5484d; margin-top: 1px; }
.kl-guard small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.kl-guard__men { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.kl-guard__men span { padding: 2px 7px; border: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.kl-guard__men span.is-front { border-color: #e5484d; color: #fff; background: rgba(229, 72, 77, .25); }
.kl-case { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 8px; }
.kl-case > svg { width: 16px; height: 16px; }
.kl-fac { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-bottom: 8px; }
.kl-fac small { display: block; font-size: 11.5px; color: var(--muted); }
.kl-fac b { font-size: 20px; font-variant-numeric: tabular-nums; }
.kl-fac form { margin: 0 0 0 auto; }
.ws { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-top: 14px; }

.ob { display: grid; gap: 8px; }

.sw { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.sw__box { display: grid; gap: 10px; margin: 0 !important; }
@media (max-width: 700px) { .sw { grid-template-columns: 1fr; } .ws { grid-template-columns: 1fr; } }
.tomb { padding: 40px 16px !important; text-align: center; }
.tomb__stone { max-width: 460px; margin: 0 auto 22px; padding: 34px 28px 26px; background: linear-gradient(180deg, #4a4a4f, #2c2c30); border: 1px solid #5b5b61; border-radius: 160px 160px 6px 6px !important; color: #e4e4e8; box-shadow: 0 30px 60px rgba(0, 0, 0, .5); }
.tomb__cross { font-size: 40px; color: #c9c9cf; }
.tomb__stone small { text-transform: uppercase; letter-spacing: .3em; font-size: 11px; color: #b0b0b8; }
.tomb__stone h2 { margin: 6px 0; font-size: 34px; color: #fff; }
.tomb__dates { margin: 0 0 10px; font-size: 13px; color: #b0b0b8; letter-spacing: .08em; }
.tomb__stone p { color: #cfcfd6; }
.tomb__estate { max-width: 560px; margin: 0 auto 22px; padding: 18px; border: 1px solid var(--accent); background: var(--panel); }
.tomb__estate > small { color: var(--muted); text-transform: uppercase; letter-spacing: .14em; font-size: 11px; }
.tomb__code { margin: 8px 0 14px; font: 700 30px/1.1 "Courier New", monospace; letter-spacing: .12em; color: var(--accent); user-select: all; }
.tomb__items { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.tomb__items span { display: grid; font-weight: 700; font-variant-numeric: tabular-nums; }
.tomb__items i { font-style: normal; font-weight: 400; font-size: 11.5px; color: var(--muted); }
@media (max-width: 560px) { .tomb__items { grid-template-columns: 1fr 1fr; } .tomb__code { font-size: 22px; } }

/* ---------- Family HQ ---------- */

.hq-head__id { display: flex; align-items: center; gap: 14px; }
.hq-tag { display: grid; place-items: center; min-width: 58px; height: 58px; padding: 0 8px; border: 2px solid var(--accent); color: var(--accent); font: 800 20px var(--display, var(--font)); letter-spacing: .06em; background: rgba(0, 0, 0, .5); }

.hq-mem { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-top: 0; background: var(--panel); }
 .card .hq-mem:first-of-type { border-top: 1px solid var(--line); }
.card .hq-mem { border-left: 0; border-right: 0; background: none; padding: 9px 0; }
.hq-mem__dot { width: 8px; height: 8px; border-radius: 50% !important; background: rgba(255, 255, 255, .15); }
.hq-mem__dot.is-on { background: #7fd6a0; }
.hq-mem__who { display: grid; min-width: 0; }
.hq-mem__who small { color: var(--muted); font-size: 12px; }
.hq-mem__stats { display: flex; gap: 12px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hq-mem__stats span { display: inline-flex; align-items: center; gap: 4px; }
.hq-mem__stats .ico { width: 13px; height: 13px; }
.hq-mem__acts { display: flex; gap: 4px; justify-content: flex-end; }
.hq-mem__acts form { margin: 0; }
.hq-mem__acts .btn { min-width: 34px; }
.hq-rank { font-size: 11.5px; padding: 3px 8px; border: 1px solid var(--line); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.hq-rank--5 { color: #1a1406; background: var(--accent); border-color: var(--accent); }
.hq-rank--4 { color: var(--accent); border-color: var(--accent); }
.hq-rank--3 { color: #b8a6ff; border-color: rgba(184, 166, 255, .5); }
.hq-rank--2 { color: #7fd6a0; border-color: rgba(127, 214, 160, .45); }
.vg-quote { margin: 12px 0; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--panel); font-style: italic; color: #e2d9c6; }
@media (max-width: 760px) {

  .hq-mem { grid-template-columns: 10px minmax(0, 1fr) auto; }
  .hq-mem__stats { display: none; }
}
.hq-mem__acts .btn { font-size: 15px; line-height: 1; }

/* ---------- Lab ---------- */

/* ---------- Casino ---------- */
.cs-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 14px 0; }
.cs-game { display: grid; gap: 4px; padding: 16px; border: 1px solid var(--line); background: radial-gradient(circle at 50% 0, rgba(46, 125, 80, .35), transparent 70%), var(--panel); text-decoration: none; color: inherit; }
.cs-game:hover { border-color: var(--accent); }
.cs-game__art { font: 700 26px/1.2 var(--display, serif); color: var(--accent); letter-spacing: .08em; }
.cs-game b { font-size: 17px; }
.cs-game small { color: var(--muted); font-size: 12.5px; }
@media (max-width: 800px) { .cs-games { grid-template-columns: 1fr 1fr; } }
.rl-result { display: flex; align-items: center; gap: 14px; margin: 14px 0; padding: 14px 18px; border: 1px solid var(--line); background: var(--panel); }
.rl-result--win { border-color: #7fd6a0; }
.rl-result--lose { border-color: rgba(229, 72, 77, .5); }
.rl-result b { display: block; font-size: 18px; }
.rl-result small { color: var(--muted); }
.rl-ball { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50% !important; font: 800 24px var(--font); color: #fff; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .3); animation: rl-spin .6s ease-out; }
@keyframes rl-spin { from { transform: rotate(-540deg) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.rl-ball--red, .rl-n--red { background: #b3202b; }
.rl-ball--black, .rl-n--black { background: #17171a; }
.rl-ball--green, .rl-n--green { background: #1d7a44; }
.rl-table { margin-top: 14px; padding: 16px; border: 1px solid var(--line); background: radial-gradient(ellipse at center, #1f4d33, #102a1c); }
.rl-bet { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; color: #e8f2ea; }
.rl-bet input { width: 140px; margin-left: 6px; }
.rl-chips { display: flex; gap: 6px; }
.rl-chip { width: 44px; height: 44px; border-radius: 50% !important; border: 3px dashed rgba(255, 255, 255, .6); background: #b8912f; color: #1a1406; font-weight: 800; font-size: 12px; cursor: pointer; }
.rl-grid { display: grid; grid-template-columns: 50px repeat(12, minmax(0, 1fr)); grid-template-rows: repeat(3, 44px); grid-auto-flow: column; gap: 3px; }
.rl-zero { grid-row: 1 / 4; }
.rl-n { border: 1px solid rgba(255, 255, 255, .25); color: #fff; font: 700 15px var(--font); cursor: pointer; }
.rl-n:hover, .rl-o:hover { outline: 2px solid var(--accent); outline-offset: -2px; }
.rl-outside { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 3px; margin-top: 3px; }
.rl-o { padding: 8px 4px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(0, 0, 0, .25); color: #fff; font: 600 12.5px var(--font); cursor: pointer; display: grid; }
.rl-o small { font-weight: 400; opacity: .6; font-size: 10.5px; }
.rl-o--red { background: #b3202b; }
.rl-o--black { background: #17171a; }
.rl-table > p { color: rgba(255, 255, 255, .6); margin: 10px 0 0; }
@media (max-width: 700px) {
  .rl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: 40px repeat(12, 36px); grid-auto-flow: row; }
  .rl-zero { grid-row: auto; grid-column: 1 / -1; }
  .rl-outside { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.bj-table { margin-top: 14px; padding: 24px 20px; border: 1px solid var(--line); background: radial-gradient(ellipse at center 30%, #1f4d33, #0f261a); color: #eef5ef; display: grid; gap: 18px; justify-items: center; }
.bj-row { display: grid; gap: 8px; justify-items: center; }
.bj-row small { text-transform: uppercase; letter-spacing: .14em; font-size: 11.5px; opacity: .75; }
.bj-hand { display: flex; gap: 8px; min-height: 104px; }
.bj-card { width: 70px; height: 100px; border-radius: 7px !important; background: #fbfaf6; color: #15151a; display: grid; grid-template-rows: auto 1fr; padding: 6px 8px; box-shadow: 0 6px 14px rgba(0, 0, 0, .4); animation: bj-in .25s ease-out; }
.bj-card b { font: 700 18px var(--font); }
.bj-card i { font-style: normal; font-size: 34px; align-self: center; justify-self: center; line-height: 1; }
.bj-card.is-red { color: #c0212d; }
.bj-card--back { background: repeating-linear-gradient(45deg, #7c1d25 0 6px, #5d141b 6px 12px); border: 3px solid #fbfaf6; }
@keyframes bj-in { from { transform: translateY(-20px) rotate(-6deg); opacity: 0; } to { transform: none; opacity: 1; } }
.bj-acts, .bj-deal { display: flex; gap: 8px; margin: 0; }
.bj-deal input { width: 140px; }
.bj-msg { font-size: 18px; padding: 8px 16px; background: rgba(0, 0, 0, .35); }
.bj-msg--win b { color: #7fd6a0; }
.bj-msg--lose b { color: #ff8a8f; }

/* ---------- Seasons ---------- */

/* ---------- Jail ---------- */

/* ---------- The Evening Ledger ---------- */
.np { margin-top: 4px; padding: 26px 30px 30px; background: #efe8d8; color: #1d1a14; font-family: "Cormorant Garamond", Georgia, serif; box-shadow: 0 20px 50px rgba(0, 0, 0, .45); }
.np a { color: #6a1d18; }
.np__mast { text-align: center; border-bottom: 3px double #1d1a14; padding-bottom: 10px; display: grid; gap: 4px; }
.np__mast small { font: 600 11px var(--font); text-transform: uppercase; letter-spacing: .18em; color: #5c5447; }
.np__mast h1 { margin: 0; font: 900 clamp(34px, 7vw, 64px)/1 "UnifrakturMaguntia", "Playfair Display", Georgia, serif; color: #111; letter-spacing: .01em; }
.np__lead { text-align: center; padding: 18px 0 16px; border-bottom: 1px solid #1d1a14; }
.np__lead h2 { margin: 0; font: 900 clamp(26px, 5vw, 46px)/1.05 "Playfair Display", Georgia, serif; color: #111; text-transform: uppercase; }
.np__sub { margin: 10px auto 0; max-width: 640px; font-style: italic; font-size: 17px; }
.np__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 14px; }
.np__cols section { padding: 0 16px; border-left: 1px solid rgba(29, 26, 20, .35); }
.np__cols section:first-child { border-left: 0; padding-left: 0; }
.np__cols h3 { margin: 12px 0 6px; font: 800 13px var(--font); text-transform: uppercase; letter-spacing: .16em; border-bottom: 1px solid #1d1a14; padding-bottom: 4px; color: #111; }
.np__cols p { margin: 0 0 8px; font-size: 15.5px; line-height: 1.45; }
.np__cols em { color: #7b7262; font-size: 12px; }
@media (max-width: 760px) { .np { padding: 18px; } .np__cols { grid-template-columns: 1fr; } .np__cols section { border-left: 0; padding: 0; } }
.np a, .np a:visited { color: #7a1f18 !important; text-decoration: underline; text-decoration-color: rgba(122, 31, 24, .35); }
.np .np__mast h1 { font-family: "UnifrakturMaguntia", "Playfair Display", Georgia, serif !important; font-weight: 400 !important; text-transform: none !important; letter-spacing: 0 !important; }
.np .np__lead h2 { font-family: "Playfair Display", Georgia, serif !important; color: #111 !important; }
.np h3 { color: #111 !important; }

/* ---------- Underworld admin ---------- */
.aw-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 14px; }
.aw-stats div { display: grid; padding: 12px; border: 1px solid var(--line); background: var(--panel); }
.aw-stats b { font-size: 18px; font-variant-numeric: tabular-nums; }
.aw-stats span { font-size: 11.5px; color: var(--muted); }
.aw-f { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 8px; }
.aw-f input, .aw-f select { flex: 1 1 110px; min-width: 0; }
.aw-f span { flex: 1; }

/* ---------- Dog track ---------- */

/* ---------- Kennel ---------- */
.cs-game__art svg { width: 100%; height: 100%; }
.cs-game__art svg { width: 36px; height: 36px; }

/* ---------- Playbook ---------- */
.gd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; margin-bottom: 16px; }
.gd-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); background: var(--panel); text-decoration: none; color: inherit; }
.gd-item:hover { border-color: var(--accent); }
.gd-item__ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); color: var(--accent); }
.gd-item__ic .ico { width: 18px; height: 18px; }
.gd-item b { display: block; font-size: 14.5px; }
.gd-item small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }

/* ---------- City Hall ---------- */
.ch-cand { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 200px) auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.ch-cand:first-of-type { border-top: 0; }
.ch-cand.is-lead .ch-cand__who a { color: var(--accent); }
.ch-cand__who { display: grid; min-width: 0; }
.ch-cand__who small { color: var(--muted); font-size: 12px; }
.ch-cand__who em { font-size: 12.5px; color: #e2d9c6; }
.ch-cand__bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.ch-cand__bar .bs__bar { margin: 0; height: 8px; }
.ch-cand__bar b { font-variant-numeric: tabular-nums; }
.ch-cand form { margin: 0; }
@media (max-width: 640px) { .ch-cand { grid-template-columns: 1fr auto; } .ch-cand__bar { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- Contracts ---------- */
.ct-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.ct-row:first-of-type { border-top: 0; }
.ct-row__who { display: grid; min-width: 0; }
.ct-row__who small { color: var(--muted); font-size: 12px; }
.ct-row__who em { font-size: 12.5px; color: #e2d9c6; }
.ct-row__amt { display: grid; text-align: right; }
.ct-row__amt b { font: 700 18px var(--font); color: #e5484d; font-variant-numeric: tabular-nums; }
.ct-row__amt small { color: var(--muted); font-size: 11.5px; }

/* ---------- Auction house ---------- */
.au-lots { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 14px; }
.au-lot { position: relative; display: grid; gap: 10px; align-content: start; padding: 18px 16px 16px; border: 1px solid var(--line); background: var(--panel); }
.au-lot--legend { border-color: #b98cff; background: radial-gradient(circle at 50% 0, rgba(185, 140, 255, .16), transparent 65%), var(--panel); box-shadow: 0 0 24px rgba(185, 140, 255, .12); }
.au-lot.is-top { box-shadow: inset 0 3px 0 #7fd6a0; }
.au-lot__tag { position: absolute; top: -1px; right: -1px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; padding: 3px 8px; background: var(--line); color: var(--muted); }
.au-lot--legend .au-lot__tag { background: #b98cff; color: #1a1030; font-weight: 700; }
.au-lot h3 { margin: 0; font-size: 19px; }
.au-lot--legend h3 { color: #d7c0ff; }
.au-lot p { margin: 0; font-size: 13px; color: var(--muted); }
.au-lot__bid { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.au-lot__bid small { display: block; font-size: 11px; color: var(--muted); }
.au-lot__bid b { font: 700 20px var(--font); color: #7fd6a0; font-variant-numeric: tabular-nums; }
.au-lot__bid em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }
.au-lot__time { text-align: right; }
.au-lot__time b { color: var(--text, #eee); font-size: 16px; }
.au-lot form { margin: 0; gap: 6px; }
.au-lot form input { flex: 1; min-width: 0; }

/* ---------- Fight Night ---------- */
.tn-card { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tn-seat { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); }
.tn-seat span { font-size: 11px; color: var(--accent); }
.tn-seat small { color: var(--muted); font-size: 11.5px; }
.tn-seat.is-empty em { color: var(--muted); font-size: 13px; }
.tn-bracket { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: center; }
.tn-round { display: grid; gap: 8px; }
.tn-round > small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.tn-bout { display: grid; border: 1px solid var(--line); }
.tn-bout span { padding: 6px 9px; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-bout span + span { border-top: 1px solid var(--line); }
.tn-bout span.is-w { color: var(--text, #eee); font-weight: 700; background: color-mix(in oklab, var(--accent) 12%, transparent); }
.tn-bout em { font-style: normal; font-size: 10.5px; padding: 3px 9px; color: var(--accent); border-top: 1px solid var(--line); }
.tn-belt { display: grid; justify-items: center; gap: 6px; padding: 16px 8px; border: 1px solid var(--accent); background: color-mix(in oklab, var(--accent) 10%, transparent); text-align: center; }
.tn-belt .ico { width: 30px; height: 30px; color: var(--accent); }
.tn-belt b { font-size: 16px; }
@media (max-width: 760px) { .tn-card { grid-template-columns: 1fr 1fr; } .tn-bracket { grid-template-columns: 1fr; } }

/* ---------- Property ---------- */

.pr { display: grid; grid-template-columns: 110px minmax(0, 1fr); border: 1px solid var(--line); background: var(--panel); }
.pr.is-burnt { border-color: rgba(229, 72, 77, .5); }

/* ---------- Hangar ---------- */

.hg-dests { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.hg-dest { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, .2); margin: 0; }
.hg-dest.is-off { opacity: .5; }
/* Travel: bus, car and plane on one page */

.hg-dest small { color: var(--muted); font-size: 12px; }
.hg-dest .btn { justify-self: start; margin-top: 4px; }

/* ---------- Crack the Safe ---------- */

/* Syndicate panels indent everything inside a card by 14px; inline margins on new pages shouldn't undo that. */
.theme-syndicate.ux-panels.theme-family .card > :not(.card__head)[style*="margin"] { margin-left: 14px !important; margin-right: 14px !important; }

/* ---------- Calling card designer ---------- */
.cc { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 22px; align-items: start; margin: 14px 0; padding: 18px; border: 1px solid var(--line); background: var(--panel); }
.cc__card { position: relative; aspect-ratio: 5 / 7; display: grid; place-items: center; padding: 14px; background: linear-gradient(160deg, #f7f1e3, #e4dac4); color: #151210; border-radius: 10px !important; box-shadow: 0 16px 34px rgba(0, 0, 0, .55), inset 0 0 0 5px #f7f1e3, inset 0 0 0 6px #8c1c1c; transform: rotate(-3deg); }
.cc__card.is-blank { opacity: .5; }
.cc__big { font-size: 74px; line-height: 1; color: #8c1c1c; }
.cc__corner { position: absolute; top: 12px; left: 14px; font-size: 20px; color: #8c1c1c; line-height: 1; }
.cc__corner--b { top: auto; left: auto; bottom: 12px; right: 14px; transform: rotate(180deg); }
.cc__name { position: absolute; left: 12px; right: 12px; bottom: 30px; text-align: center; font: 700 15px/1.2 "Playfair Display", Georgia, serif; color: #151210; }
.cc__form { display: grid; gap: 8px; margin: 0; }
.cc__form h3 { margin: 0; font-size: 20px; }
.cc__form p { margin: 0 0 4px; }
.cc__lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-top: 4px; }
.cc__lbl small { text-transform: none; letter-spacing: 0; color: var(--muted); font-size: 11.5px; margin-left: 6px; }
.cc__syms { display: flex; flex-wrap: wrap; gap: 4px; }
.cc__syms label { position: relative; cursor: pointer; }
.cc__syms input { position: absolute; opacity: 0; }
.cc__syms span { display: grid; place-items: center; width: 38px; height: 38px; font-size: 19px; border: 1px solid var(--line-2, var(--line)); background: rgba(0, 0, 0, .3); }
.cc__syms small { position: absolute; right: 2px; bottom: 0; font-size: 8.5px; color: var(--muted); pointer-events: none; }
.cc__syms input:checked + span { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 22%, transparent); color: var(--accent); }
.cc__presets { display: flex; flex-wrap: wrap; gap: 5px; }
.cc__presets button { padding: 4px 9px; font: 12px var(--font); color: var(--muted); background: none; border: 1px solid var(--line); cursor: pointer; }
.cc__presets button:hover { color: var(--text, #eee); border-color: var(--accent); }
@media (max-width: 640px) { .cc { grid-template-columns: 1fr; } .cc__card { width: 160px; justify-self: center; } }
/* ---- The Calling Card page (callingcard.php) ------------------------------------------------ */
.ccp { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 34px; align-items: center; margin: 14px 0 18px; padding: 28px 30px;
  border: 1px solid var(--line); background: radial-gradient(ellipse 60% 90% at 18% 50%, rgba(140,28,28,.22), transparent 70%), linear-gradient(180deg, #16120f, #0d0b09); }
.ccp__stage { display: grid; justify-items: center; gap: 16px; }
.ccp__tilt { perspective: 900px; width: 240px; }
.ccp__card { position: relative; aspect-ratio: 5 / 7; width: 100%; border-radius: 12px !important; overflow: hidden; color: #1a1411;
  background: radial-gradient(ellipse at 30% 20%, #fffaf0, #efe5cf 60%, #e0d2b4); transform: rotateX(var(--rx, 4deg)) rotateY(var(--ry, -10deg)) rotate(-2deg);
  transition: transform .25s ease-out; box-shadow: 0 30px 50px -18px rgba(0,0,0,.85), 0 0 0 1px rgba(0,0,0,.4), inset 0 0 0 7px #f6eedc, inset 0 0 0 8px #8c1c1c, inset 0 0 0 11px #f6eedc, inset 0 0 0 12px rgba(140,28,28,.45); }
.ccp.is-owned .ccp__card:not(.ccp__card--back)::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2px rgba(201,162,74,.55); pointer-events: none; }
.ccp__card.is-blank .ccp__face, .ccp__card.is-blank .ccp__idx { opacity: .45; }
.ccp__card.is-home { filter: grayscale(.8) brightness(.7); }
.ccp__idx { position: absolute; top: 18px; left: 18px; display: grid; justify-items: center; font-size: 26px; line-height: 1; color: #8c1c1c; }
.ccp__idx--b { top: auto; left: auto; bottom: 18px; right: 18px; transform: rotate(180deg); }
.ccp__idx i { font-style: normal; }
.ccp__face { position: absolute; inset: 0; display: grid; place-items: center; grid-template-rows: 1fr auto auto; padding: 40px 26px 44px; text-align: center; }
.ccp__big { align-self: center; font-size: 104px; line-height: 1; color: #8c1c1c; text-shadow: 0 2px 0 rgba(255,255,255,.6), 0 -1px 0 rgba(0,0,0,.15); }
.ccp__name { font: 700 19px/1.15 "Playfair Display", Georgia, serif; letter-spacing: .01em; color: #1a1411; word-break: break-word; }
.ccp__tag { margin: 0 0 5px; font: italic 11px/1 Georgia, serif; color: #7a6a58; letter-spacing: .08em; }
.ccp__shine { position: absolute; inset: -40%; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.55) 50%, transparent 60%);
  transform: translateX(calc(var(--sx, 30%) - 50%)); mix-blend-mode: soft-light; pointer-events: none; transition: transform .2s ease-out; }
.ccp__card--back { background: #3a0c0c; box-shadow: 0 30px 50px -18px rgba(0,0,0,.85), inset 0 0 0 7px #f3e8d2, inset 0 0 0 9px #8c1c1c; }
.ccp__back { position: absolute; inset: 12px; display: grid; place-items: center; align-content: center; gap: 6px; color: #e7cf8f;
  background: repeating-linear-gradient(45deg, rgba(231,207,143,.12) 0 2px, transparent 2px 14px), repeating-linear-gradient(-45deg, rgba(231,207,143,.12) 0 2px, transparent 2px 14px), radial-gradient(circle at 50% 50%, #5a1414, #2a0808 75%); }
.ccp__back b { font: 700 86px/1 "Playfair Display", Georgia, serif; text-shadow: 0 3px 12px rgba(0,0,0,.6); }
.ccp__back .ico { width: 26px; height: 26px; opacity: .8; }
body .ccp.ccp button.ccp__switch.ccp__switch[type] { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 8px; font: 600 13px var(--font); color: var(--muted); background: rgba(0,0,0,.35); border: 1px solid var(--line); cursor: pointer; }
.ccp__switch i { position: relative; width: 34px; height: 18px; background: #2a2622; border: 1px solid var(--line); }
.ccp__switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; background: #6b645c; transition: transform .2s, background .2s; }
.ccp__switch.is-on { color: var(--text); } .ccp__switch.is-on i::after { transform: translateX(16px); background: #b83232; }
.ccp__h { margin: 0 0 6px; font-size: 26px; }
.ccp__side > p { margin: 0 0 14px; max-width: 58ch; }
.ccp__perks { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 10px; }
.ccp__perks li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 14px; color: var(--muted); }
.ccp__perks li b { color: var(--text); } .ccp__perks .ico { width: 18px; height: 18px; color: #c9a24a; margin-top: 2px; }
.ccp__buy { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.ccp__buy form { margin: 0; }
.ccp__or { align-self: center; font: italic 14px Georgia, serif; color: var(--muted); }
body .ccp.ccp button.ccp__price.ccp__price[type], body .ccp.ccp button.ccp__switch.ccp__switch[type] { height: auto; min-height: 0; text-transform: none; letter-spacing: 0; box-shadow: none; line-height: 1.2; font-family: var(--font); font-weight: 600; }
body .ccp.ccp button.ccp__price.ccp__price[type] { width: 100%; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 12px; align-items: center; text-align: left;
  padding: 14px 16px; color: var(--text); background: linear-gradient(180deg, rgba(201,162,74,.14), rgba(201,162,74,.04)); border: 1px solid rgba(201,162,74,.55); cursor: pointer; transition: border-color .15s, background .15s; }
body .ccp.ccp button.ccp__price.ccp__price[type]:hover:not(:disabled) { border-color: #e2c071; background: linear-gradient(180deg, rgba(201,162,74,.24), rgba(201,162,74,.08)); }
.ccp__price:disabled { opacity: .5; cursor: not-allowed; }
.ccp__price .ico { grid-row: 1 / 4; width: 26px; height: 26px; color: #c9a24a; }
.ccp__price--gems .ico { color: #5fd3c1; }
.ccp__price b { display: block; font: 800 24px/1.05 var(--display, var(--font)); font-variant-numeric: tabular-nums; }
.ccp__price span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.ccp__price small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.ccp__form { display: grid; gap: 8px; margin: 0; }
.ccp__form p { margin: 0 0 4px; }
.ccp__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.ccp__actions .ico { width: 14px; height: 14px; }
.ccp-legend { font-size: 18px !important; }
.ccp-note { display: flex; gap: 8px; align-items: center; margin: 10px 0 0; color: var(--muted); } .ccp-note .ico { width: 15px; height: 15px; }
.ccp-work__sym { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; font-size: 13px; color: #8c1c1c; background: #efe5cf; }
/* The little link on the Murder page */
.cc-link { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; margin: 14px 0; padding: 12px 16px; color: var(--text); text-decoration: none; border: 1px solid var(--line); background: var(--panel); }
.cc-link:hover { border-color: var(--accent); }
.cc-link__card { display: grid; place-items: center; width: 44px; height: 60px; font-size: 24px; color: #8c1c1c; background: linear-gradient(160deg, #f7f1e3, #e4dac4); border-radius: 5px !important; box-shadow: inset 0 0 0 3px #f7f1e3, inset 0 0 0 4px #8c1c1c; transform: rotate(-4deg); }
.cc-link__card.is-blank { opacity: .5; }
.cc-link__txt { display: grid; gap: 2px; } .cc-link__txt small { color: var(--muted); }
.cc-link__go .ico { width: 18px; height: 18px; color: var(--accent); }
@media (max-width: 760px) { .ccp { grid-template-columns: 1fr; padding: 22px 16px; gap: 22px; } .ccp__tilt { width: 200px; } .ccp__big { font-size: 84px; } }

/* ---------- Informants ---------- */

/* ---------- Sidebar folding groups ---------- */
.nav__toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; box-sizing: border-box; text-align: left; cursor: pointer; border: 0; background: none; font: inherit; }
.theme-syndicate.theme-family .nav__toggle { background: var(--bar); border-top: 1px solid #2d281f; border-bottom: 1px solid #0a0907; }
.nav__toggle:hover { color: #fff; }
.nav__toggle:focus-visible { outline: 1px solid var(--accent); outline-offset: -1px; }
.nav__chev { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); opacity: .6; transition: transform .15s; flex: none; }
.nav__fold.is-closed .nav__chev { transform: rotate(-45deg); }
.nav__fold.is-closed .nav__items { display: none; }
.nav__fold.is-closed.has-badge .nav__toggle::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #d64545; margin: 0 8px 0 auto; order: 1; }
.nav__fold.is-closed.has-badge .nav__chev, .nav__fold.is-closed.has-new .nav__chev { order: 2; }
.nav__fold.is-closed.has-new:not(.has-badge) .nav__toggle::after { content: "new"; margin: 0 8px 0 auto; order: 1; font-size: 9px; letter-spacing: .08em; padding: 1px 5px; color: #1a1408; background: var(--accent); }
/* Fold or open every menu section at once */
.nav__foldall { flex: none; display: grid; place-items: center; width: 26px; height: 26px; margin-right: -6px; border: 0; background: none; color: var(--dim); cursor: pointer; }
.nav__foldall:hover { color: var(--text); }
.nav__foldall .nav__chev { transform: rotate(-135deg) translate(-1px, -1px); }
.nav__foldall.is-all-shut .nav__chev { transform: rotate(45deg) translate(-2px, -2px); }
/* Who's online chip in the topbar */
.chip--online { color: var(--muted, #aaa); }
.chip--online b { color: var(--text); }
@media (max-width: 720px) { .chip--online span:last-child { font-size: 0; } .chip--online b { font-size: 12px; } }

/* The NWM wordmark (replaces the hat icon + text brand) */
.brand--logo { display: flex; align-items: center; justify-content: center; }
.brand__logo { display: block; width: 100%; max-width: 220px; height: auto; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .55)); }
.auth-top .brand__logo { width: auto; height: 52px; max-width: none; }
@media (max-width: 760px) { .auth-top .brand__logo { height: 38px; } }

/* ---- Chat drawer: slides in from the right, opened by the chat button next to the bell -------- */
.chatdrawer { position: fixed; inset: 0; z-index: 150; pointer-events: none; }
.chatdrawer__scrim { position: absolute; inset: 0; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .25s ease; }
.chatdrawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(400px, 100vw); display: flex; flex-direction: column;
  background: var(--bg-2, #111); border-left: 1px solid var(--line-2, var(--line)); box-shadow: -24px 0 60px -20px rgba(0,0,0,.8);
  transform: translateX(104%); transition: transform .32s cubic-bezier(.2,.8,.2,1); }
.chatdrawer.is-open { pointer-events: auto; }
.chatdrawer.is-open .chatdrawer__scrim { opacity: 1; }
.chatdrawer.is-open .chatdrawer__panel { transform: none; }
.chatdrawer__head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px 18px; border-bottom: 1px solid var(--line); }
.chatdrawer__title { display: inline-flex; align-items: center; gap: 8px; font: 800 18px/1 var(--display, var(--font)); letter-spacing: .04em; text-transform: uppercase; color: var(--text); }
.chatdrawer__title .ico { width: 18px; height: 18px; color: var(--accent); }
.chatdrawer__head .chat__tabs { margin-left: auto; }
.chatdrawer__head .chat__tab { padding: 5px 10px; font-size: 10.5px; }
.chatdrawer__x { all: unset; cursor: pointer; display: grid; place-items: center; width: 32px; height: 32px; color: var(--muted); border: 1px solid var(--line); }
.chatdrawer__head > .chatdrawer__x { margin-left: auto; }
.chatdrawer__x:hover { color: var(--text); border-color: var(--line-2, var(--line)); }
.chatdrawer__x .ico { width: 16px; height: 16px; }
.chatdrawer .chat__log { flex: 1; height: auto; min-height: 0; padding: 14px 18px; gap: 10px; }
.chatdrawer .chat__why { margin: 0 18px 8px; }
.chatdrawer .chat__form { padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); margin: 0; border-top: 1px solid var(--line); background: rgba(0,0,0,.2); }
.chatdrawer .chat__form input { min-height: 40px; font-size: 14px; }
.chatdrawer .chat__msg { font-size: 13.5px; }
.chatdrawer .chat__msg.is-new { animation: chatNew 2.4s ease-out 1; }
@keyframes chatNew { 0%, 30% { background: color-mix(in oklab, var(--accent) 16%, transparent); } 100% { background: transparent; } }
.chat-open.is-on { color: var(--accent); border-color: var(--accent); }
.chat-open__n { background: var(--accent); color: #17130a; }
html.chat-lock { overflow: hidden; }
@media (max-width: 700px) { .chatdrawer__panel { width: 100vw; border-left: 0; } }
@media (prefers-reduced-motion: reduce) { .chatdrawer__panel, .chatdrawer__scrim { transition: none; } }

/* ---------- in-game ask box (window.maAsk in app.js): replaces the browser's confirm/prompt popups ---------- */
.ask[open] { position: fixed; inset: 0; margin: auto; width: min(420px, calc(100vw - 32px)); height: fit-content; animation: rise .16s; }
.ask__box { margin: 0; background: var(--panel-solid, #16140f); border: 1px solid var(--line-2, #3a3326); border-top: 3px solid var(--gold, var(--accent)); border-radius: 0; box-shadow: 0 24px 60px -20px rgba(0,0,0,.8); }
.ask__title { padding: 12px 18px 11px; background: var(--bar, rgba(255,255,255,.04)); border-bottom: 1px solid var(--line, #2a251c); color: var(--gold-hi, var(--text)); font: 800 16px/1 var(--poster, var(--font)); letter-spacing: .05em; text-transform: uppercase; }
.ask__text { margin: 0; padding: 16px 18px 4px; color: var(--text); font-size: 14.5px; line-height: 1.55; white-space: pre-line; }
.ask__input { display: block; width: calc(100% - 36px); margin: 12px 18px 0; box-sizing: border-box; }
.ask__input[hidden] { display: none; }
.ask__row { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 18px 16px; }
.ask__row .btn { border-radius: 0; min-width: 96px; justify-content: center; }
.ask__row .btn[hidden] { display: none; }
.ask::backdrop { background: rgba(5, 5, 4, .7); backdrop-filter: blur(3px); }

/* ---------- messages drawer: tabs row, texts and letters panes ---------- */
.chat__tabs--wide { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 0; padding: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.chatdrawer .chat__tabs--wide .chat__tab { text-align: center; padding: 11px 4px; font-size: 11px; border-radius: 0; border-bottom: 2px solid transparent; display: flex; align-items: center; justify-content: center; gap: 6px; }
.chatdrawer .chat__tabs--wide .chat__tab.is-active { background: none; border-bottom-color: var(--accent); color: var(--gold-hi, var(--text)); }
.chat__n { font-style: normal; min-width: 16px; height: 16px; line-height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 8px; background: var(--bad, #d64545); color: #fff; font-size: 10px; font-weight: 700; text-align: center; letter-spacing: 0; }
.chat__n[hidden] { display: none; }
.chat__pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat__pane[hidden] { display: none; }
.cx__list, .cx__thread { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.cx__list[hidden], .cx__thread[hidden] { display: none; }
.cx__new { display: flex; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); margin: 0; }
.cx__new input { flex: 1; min-width: 0; }
.cx__links { display: flex; gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 13px; }
.cx__rows { flex: 1; overflow-y: auto; }
.cx__row { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; width: 100%; padding: 11px 18px; border-bottom: 1px solid var(--line); }
.cx__row:hover { background: rgba(255, 255, 255, .03); }
.cx__row b { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; white-space: nowrap; }
.cx__row small { grid-column: 1 / -1; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx__row time { color: var(--dim); font-size: 11.5px; grid-row: 1; grid-column: 2; }
.cx__row.is-unread b { color: var(--gold-hi, var(--text)); }
.cx__row.is-unread { box-shadow: inset 3px 0 0 var(--accent); }
.cx__subj { color: var(--text); font-weight: 600; }
.cx__bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.cx__bar b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx__back { all: unset; cursor: pointer; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); font-size: 16px; }
.cx__back:hover { border-color: var(--accent); }
.cx__full { font-size: 12.5px; }
.cx__msg { max-width: 82%; padding: 8px 11px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); align-self: flex-start; }
.cx__msg.is-me { align-self: flex-end; background: var(--accent-soft, rgba(216, 165, 74, .12)); border-color: transparent; }
.cx__msg time { display: block; font-size: 10.5px; color: var(--dim); margin-bottom: 2px; }
.cx__msg p { margin: 0; }
.cx__letter { flex: 1; overflow-y: auto; padding: 14px 18px; font-size: 14px; line-height: 1.55; }
.cx__from { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.cx__reply { display: grid; gap: 8px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); margin: 0; }
.cx__reply textarea { resize: vertical; min-height: 64px; }
.cx__reply .btn { justify-self: end; }

/* ---------- wealth bands (lib/wealth.php): nobody sees exact figures, only these ---------- */
.wealth { font-weight: 700; white-space: nowrap; }
.wealth--0, .wealth--1 { color: var(--dim); font-weight: 600; }
.wealth--2 { color: var(--muted); }
.wealth--3 { color: #c9ced6; }
.wealth--4 { color: #9fd6a8; }
.wealth--5 { color: #6fd08a; }
.wealth--6 { color: #e6c77f; }
.wealth--7 { color: #f0c05a; text-shadow: 0 0 10px rgba(240, 192, 90, .25); }
.wealth--8 { color: #ffd76a; text-shadow: 0 0 12px rgba(255, 215, 106, .45); letter-spacing: .02em; }

/* ---------- workshop: photos of the project car and of every part's donor car ---------- */
.build__photo { margin: -18px -18px 14px; border-bottom: 1px solid var(--line); }
.build__photo .carpic { aspect-ratio: 2.6 / 1; }
.part { grid-template-columns: 44px 72px minmax(0, 1fr) auto; }
.part__thumb { width: 72px; height: 36px; object-fit: contain; display: block; }
.part__thumb--none { display: grid; place-items: center; color: var(--dim); }
.part__thumb--none .ico { width: 18px; height: 18px; }
.slot__ico--car { width: 64px !important; background: none !important; border: 0 !important; }
.slot__ico--car .part__thumb { width: 64px; height: 32px; }
@media (max-width: 640px) { .part { grid-template-columns: 36px 56px minmax(0, 1fr); } .part__thumb { width: 56px; height: 28px; } .part__acts { grid-column: 1 / -1; } }
.build .slot { grid-template-columns: 64px minmax(0, 1fr) 34px auto; }
/* letters in the drawer: a conversation, both sides */
.cx__count { font-weight: 500; font-size: 11px; color: var(--dim); }
.cx__row[disabled] { cursor: default; opacity: .6; }
.cx__letter { display: flex; flex-direction: column; gap: 10px; }
.cx__lt { max-width: 88%; align-self: flex-start; padding: 10px 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.cx__lt.is-me { align-self: flex-end; background: var(--accent-soft, rgba(216, 165, 74, .12)); border-color: color-mix(in oklab, var(--accent, #d8a54a) 30%, transparent); }
.cx__lt header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-bottom: 6px; font-size: 12px; }
.cx__lt header b { font-size: 12.5px; }
.cx__lsub { color: var(--text); font-weight: 600; }
.cx__lt time { color: var(--dim); font-size: 11px; margin-left: auto; }
.cx__lt .cx__text { font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
/* inventory button in the top bar (label shows when there's room) */
.iconbtn__lbl { display: none; }
.iconbtn--inv { color: var(--accent); border-color: color-mix(in oklab, var(--accent) 40%, var(--line)); }
.iconbtn--inv.is-on { background: var(--accent-soft); }
@media (min-width: 1500px) {
  .iconbtn--inv { width: auto; display: inline-flex; gap: 6px; padding: 0 11px; font: 600 12.5px var(--font); }
  .iconbtn--inv .iconbtn__lbl { display: inline; }
}
/* workshop: project cars parked in the garage */
@media (max-width: 640px) { .parked__row { grid-template-columns: 90px minmax(0, 1fr); } .parked__act { grid-column: 1 / -1; justify-content: flex-start; } }
@media (max-width: 1500px) { .wallet .chip--online { display: none; } }
@media (max-width: 1600px) { .wallet .iconbtn[data-palette] { display: none; } }
/* The top bar drops its extras by how much room it really has, not by the window's width: app.js adds tb-fit1, tb-fit2...
   one at a time until the wallet sits inside the bar, so it can never run over the right bar whatever the numbers are. */
.topbar.tb-fit1 .wallet .chip--online, .topbar.tb-fit1 .wallet [data-palette], .topbar.tb-fit1 .chip--heat .chip__lbl,
.topbar.tb-fit1 .chip--heat .heat i, .topbar.tb-fit1 .iconbtn--inv .iconbtn__lbl { display: none; }
.topbar.tb-fit1 .iconbtn--inv { padding: 0; aspect-ratio: 1; }
.topbar.tb-fit2 .me__text { display: none; }
.topbar.tb-fit3 .wallet .era-switch { display: none; }
.topbar.tb-fit4 .vitals { min-width: 200px; }
.topbar.tb-fit5 .vitals { min-width: 120px; }
.topbar.tb-fit6 .wallet .iconbtn--inv { display: none; }
/* jail / hospital: "while you wait" shortcuts */
.lk-idle { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0; }
.lk-idle__lbl { font: 600 11.5px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.lk-idle__a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text); text-decoration: none; font-size: 13px; }
.lk-idle__a:hover { border-color: var(--accent); }
.lk-idle__a .ico { width: 15px; height: 15px; color: var(--accent); }
.lk-idle__a.is-hot { border-color: var(--accent); background: var(--accent-soft); }
.lk-idle__n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 2px; background: var(--accent); color: #111; font-size: 11px; }
/* @mentions */
a.mention { font-weight: 600; color: var(--accent); text-decoration: none; background: var(--accent-soft); padding: 0 3px; }
a.mention:hover { text-decoration: underline; }
.mention--all { font-weight: 700; color: #111; background: var(--accent); padding: 0 4px; }
.mention-pick { position: absolute; z-index: 120; display: grid; min-width: 180px; max-width: 220px; padding: 4px; background: var(--panel-solid, #15130f); border: 1px solid var(--line-2); box-shadow: 0 16px 36px -10px #000; }
.mention-pick button { all: unset; cursor: pointer; padding: 7px 10px; font-size: 13.5px; color: var(--text); }
.mention-pick button.is-on, .mention-pick button:hover { background: var(--accent-soft); color: #fff; }
/* showroom: buy new */
.sr-buy { margin: 8px 0 2px; }
.sr-buy .btn { width: 100%; justify-content: center; }
/* chat drawer with the Crew tab: five across */
.chat__tabs--wide.chat__tabs--5 { grid-template-columns: repeat(5, 1fr); }
/* fights: clean hits */
/* sidebar search */
.nav__search { position: sticky; top: -18px; z-index: 2; display: flex; align-items: center; gap: 8px; margin: 0 2px 12px; padding: 0 10px; height: 36px; border: 1px solid var(--line); background: var(--bg-2, #111); }
.nav__search .ico { width: 15px; height: 15px; color: var(--dim); flex: none; }
.nav__search input { all: unset; flex: 1; min-width: 0; font-size: 13px; color: var(--text); }
.nav__search input::placeholder { color: var(--dim); }
.nav__search:focus-within { border-color: var(--accent); }
.sidebar.is-searching .nav__fold.is-closed .nav__items { display: block !important; }
.sidebar.is-searching .nav__chev { visibility: hidden; }
.nav__none { margin: 6px 12px; font-size: 12.5px; color: var(--dim); }
.nav__item[hidden] { display: none !important; }
.sidebar.is-searching .ops-logout { display: none; }

/* Staff crew badge and the owner's Hall of Fame pin */
.staffcrew { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 1px 7px; border-radius: 0; font: 700 10px/16px var(--font); letter-spacing: .08em; text-transform: uppercase; vertical-align: 2px; color: #1a1408; background: linear-gradient(180deg, #e8c46a, #b88a2c); border: 1px solid #f3d98f; white-space: nowrap; }
.staffcrew svg { width: 11px; height: 11px; }
.hof-boss { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 0; font: 700 11px/18px var(--font); letter-spacing: .08em; text-transform: uppercase; color: #1a1408; background: linear-gradient(180deg, #e8c46a, #b88a2c); border: 1px solid #f3d98f; white-space: nowrap; }
.hof-boss svg { width: 12px; height: 12px; }
tr.is-boss td { background: rgba(232, 196, 106, .07); }

.gz-staff .gz-n svg { width: 13px; height: 13px; color: #e8c46a; }
.hq-mem__who b svg { width: 13px; height: 13px; color: #e8c46a; vertical-align: -2px; }

/* ---------- Tune Up, Mechanic, race courses (v69) ---------- */
.tn-routes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 12px 0 10px; }
.tn-route { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 4px 6px; padding: 8px 10px; border: 1px solid var(--line); background: var(--panel-2); }
.tn-route span { grid-column: 1 / -1; display: flex; align-items: center; gap: 5px; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); min-width: 0; white-space: nowrap; overflow: hidden; }
.tn-route span .ico { width: 13px; height: 13px; flex: none; color: var(--accent); }
.tn-route b { font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; order: 3; }
.tn-route small { font-size: 11px; order: 2; }
.tn-route.is-hi { border-color: var(--accent-line); background: var(--accent-soft); }
.tn-dyno { border: 1px solid var(--line); padding: 8px 10px; margin-bottom: 4px; font-size: 13px; }
.tn-dyno__h, .tn-dyno__r { display: grid; grid-template-columns: 1fr 90px 90px; gap: 8px; align-items: baseline; }
.tn-dyno__h { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); padding-bottom: 4px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.tn-dyno__h span:not(:first-child), .tn-dyno__r > :not(:first-child) { text-align: right; }
.tn-dyno__r { padding: 2px 0; }
.tn-dyno__eng { font-size: 11.5px; padding-top: 5px; margin-top: 4px; border-top: 1px solid var(--line); }
.tn-bar { position: relative; display: block; height: 5px; background: var(--line); overflow: hidden; }
.tn-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--p); background: color-mix(in oklab, var(--accent) 55%, transparent); }
.tn-bar em { position: absolute; top: 0; bottom: 0; left: var(--a); width: var(--p); background: var(--good); }
.build .tn-slot { grid-template-columns: 30px minmax(0, 1fr) 34px; }
.build .tn-slot .slot__act { grid-column: 2 / -1; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tn-slot .slot__label { display: flex; align-items: center; gap: 6px; }
.tn-slot .slot__part { white-space: normal; font-size: 12.5px; line-height: 1.35; }
.tn-fit { display: flex; gap: 6px; }
.tn-fit select { min-height: 30px; font-size: 12.5px; }
.tn-kit .part__q { font-size: 16px; }
.tn-kit__from { display: block; margin-top: 2px; font-size: 11.5px; }
.tn-what { font-size: 10px; letter-spacing: 0; text-transform: none; margin-left: 6px; }

.mech-car { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 16px; align-items: start; padding: 14px; margin: 8px 0 14px; }
.mech-car__pic .carpic { aspect-ratio: 2 / 1; }
.mech-car .tn-routes { margin-top: 8px; }
.mech { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; margin-bottom: 12px; }
.mech__slot { padding: 14px; scroll-margin-top: 80px; }
.mech__slot .card__title { display: flex; align-items: center; gap: 8px; }
.mech__now { font-size: 13px; margin: 4px 0 10px; }
.mech__list { display: grid; gap: 6px; }
.mech__row { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); }
.mech__row.is-owned { opacity: .55; }
.mech__info { display: grid; gap: 3px; min-width: 0; font-size: 13px; }
.mech__info small { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.mech__buy { text-align: right; }
.cr__combine { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.cr__combine:first-of-type { border-top: 0; }
@media (max-width: 720px) {
  .mech-car { grid-template-columns: 1fr; }
  .mech { grid-template-columns: 1fr; }
  .mech__row { grid-template-columns: 1fr auto; }
  .mech__st { grid-column: 1 / -1; }
  .tn-dyno__h, .tn-dyno__r { grid-template-columns: 1fr 76px 76px; }
  .tn-route { grid-template-columns: 1fr auto; padding: 7px 8px; }
  .tn-route span { grid-column: 1 / -1; letter-spacing: .06em; font-size: 10px; }
  .tn-route b { grid-row: auto; font-size: 18px; order: 3; }
  .tn-route small { order: 2; align-self: center; }
}

/* ---------- Tune Up (one page) ---------- */

/* ---------- Police overhaul: HQ strip, radio calls, posts, case files, Kingpin, court, Family Night ---------- */

.incident { margin: 12px 0; border-left: 4px solid #e5484d; }

.incident p { margin: 6px 0 10px; }

.fn-card { margin: 12px 0; }
.fn-card.is-live { border-color: #e5484d; box-shadow: 0 0 0 1px rgba(229, 72, 77, .35) inset; }
.fn-card__head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.fn-card__head b { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; }
.fn-card__head b svg { width: 16px; height: 16px; color: #e5484d; }
.fn-card p { margin: 6px 0; }
.fn-card__score { display: flex; align-items: center; gap: 14px; margin: 8px 0; }
.fn-card__score > span { color: var(--muted); font-size: 12px; }
.fn-side { flex: 1; padding: 8px 12px; border: 1px solid var(--line); text-align: center; }
.fn-side small { display: block; font-size: 11px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.fn-side b { font-size: 22px; font-variant-numeric: tabular-nums; }
.fn-side--cop b { color: #7fb4ff; }
.fn-side--crim b { color: #ecc877; }
.fn-card__top { display: flex; flex-wrap: wrap; gap: 5px; }
.fn-chip { padding: 2px 8px; border: 1px solid var(--line); font-size: 11.5px; }
.fn-chip--cop { border-color: rgba(127, 180, 255, .45); }
.fn-chip--crim { border-color: rgba(236, 200, 119, .45); }

/* ---------- Turf: the map itself lives in p-turf.css ---------- */
.tf-cities em { font-style: normal; margin-left: 4px; padding: 0 5px; font-size: 11px; background: var(--c); color: #111; }
.tm-hero p { max-width: 520px; }

/* ---------- Pre-alpha tag ---------- */
.brand--logo { position: relative; }
.prealpha { position: absolute; right: 14px; bottom: 10px; padding: 2px 7px; background: #b3261e; color: #fff; font: 800 10px/1.4 var(--font); letter-spacing: .14em; text-transform: uppercase; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); transform: rotate(-4deg); pointer-events: auto; }
.prealpha--inline { position: static; display: inline-block; transform: none; box-shadow: none; padding: 0 6px; font-size: 10px; vertical-align: 1px; }
.auth-top .brand--logo { gap: 10px; }
.auth-top .prealpha { position: static; transform: rotate(-3deg); flex: none; }
.prealpha--top { position: static; transform: none; align-self: center; font-size: 9px; padding: 1px 6px; }

/* medal tier colours (Trophy Room and anything else that wants them) */
.tier--bronze { --tc: #d08a4e; } .tier--silver { --tc: #c9d0d9; } .tier--gold { --tc: #e8b947; } .tier--legendary { --tc: #ff9f2e; }

/* Right bar: New activity (lib/activity.php). A row: icon tile, small gold kind, headline with its number in gold, how fresh it is,
   then the player's userbar and what they want. The whole row is the link. */
.act { --g1: #f6dc9a; --g2: #d8a54a; --g3: #8a6220; --act-hd: "Big Shoulders Display", "Oswald", Impact, sans-serif; }
.act .act__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.act__live { display: inline-flex; align-items: center; gap: 7px; font: 700 9.5px/1 var(--font); letter-spacing: .16em; text-transform: uppercase; color: var(--g2); }
.act__live i { width: 6px; height: 6px; background: var(--g1); transform: rotate(45deg); box-shadow: 0 0 6px rgba(246, 220, 154, .7); animation: act-live 2.4s ease-in-out infinite; }
@keyframes act-live { 50% { opacity: .35; box-shadow: none; } }
.act__list { display: grid; }
.act__it { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; column-gap: 10px; row-gap: 7px; align-items: center; padding: 9px 16px 10px;
  color: var(--muted); text-decoration: none; border-top: 1px solid rgba(255, 255, 255, .045); border-bottom: 1px solid rgba(0, 0, 0, .5); transition: background .15s; }
.act__it:first-child { border-top-color: transparent; }
.act__it::before { content: ""; position: absolute; left: 0; top: -1px; bottom: -1px; width: 2px; background: transparent; }
.act__it.is-new { background: linear-gradient(90deg, rgba(216, 165, 74, .09), rgba(216, 165, 74, 0) 62%); }
.act__it.is-new::before { background: linear-gradient(180deg, var(--g1), var(--g2) 55%, var(--g3)); }
.act__it:hover, .act__it:focus-visible { background: linear-gradient(90deg, rgba(216, 165, 74, .16), rgba(216, 165, 74, .04)); color: var(--text); outline: 0; }
.act__it:hover::before, .act__it:focus-visible::before { background: var(--g2); }
.act__ic { display: grid; place-items: center; width: 30px; height: 30px; color: var(--g2); border: 1px solid var(--line-2, #3a342a); background: linear-gradient(180deg, #231f18, #14120e); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 1px 2px rgba(0, 0, 0, .5); }
.act .act__ic .ico { display: block; width: 16px; height: 16px; margin: 0; opacity: 1; }
.act__it.is-new .act__ic { color: var(--g1); border-color: var(--g3); background: linear-gradient(180deg, #33290f, #1a150b); }
.act__tx { display: grid; gap: 3px; min-width: 0; }
.act__k { font: 700 9.5px/1 var(--font); letter-spacing: .16em; text-transform: uppercase; color: var(--g2); white-space: nowrap; }
.act__t { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.act__t b { min-width: 0; margin: 0; font: 600 13.5px/1.2 var(--font); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act__t em { flex: none; font: 800 15.5px/1 var(--act-hd); font-style: normal; letter-spacing: .03em; color: var(--g1); font-variant-numeric: tabular-nums; white-space: nowrap; }
.act__age { align-self: start; display: inline-flex; align-items: center; gap: 5px; padding-top: 1px; font: 600 10.5px/1 var(--mono); font-style: normal; font-variant-numeric: tabular-nums; color: var(--dim); white-space: nowrap; }
.act__age b { padding: 2px 4px 2px 5px; font: 800 8.5px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: #15110a; background: linear-gradient(180deg, var(--g1), var(--g2)); }
.act__it.is-new .act__age { color: var(--g2); }
.act__who { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.act__who .ub, .act__crew { flex: none; }
.act__who small { flex: 1; min-width: 0; font: 500 11.5px/1.3 var(--font); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act__k { display: flex; align-items: center; gap: 7px; }
.act__you { flex: none; margin: -2px 0; padding: 2px 4px 2px 5px; font: 800 8.5px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--g1); border: 1px solid var(--g3); }
.act__go { flex: none; display: grid; color: var(--dim); opacity: .7; transition: transform .15s, color .15s, opacity .15s; }
.act .act__go .ico { display: block; width: 13px; height: 13px; margin: 0; opacity: 1; }
.act__it:hover .act__go, .act__it:focus-visible .act__go { color: var(--g1); opacity: 1; transform: translateX(3px); }
.act__crew, .actbar .act__crew { display: inline-block; box-sizing: border-box; width: 132px; height: 18px; padding: 0 6px; font: 800 11.5px/16px var(--act-hd, "Big Shoulders Display", Impact, sans-serif); letter-spacing: .07em; text-transform: uppercase; text-align: center; color: #f6dc9a; border: 1px solid #8a6220; background: #17140f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act__none { display: flex; align-items: center; gap: 11px; margin: 10px 16px 12px; padding: 11px 12px; color: var(--dim); border: 1px dashed var(--line-2, #3a342a); background: rgba(0, 0, 0, .18); }
.act .act__none .ico { display: block; flex: none; width: 18px; height: 18px; color: var(--g3); opacity: 1; }
.act__none b { display: block; font: 600 13px/1.25 var(--font); color: var(--muted); }
.act__none small { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.3; color: var(--dim); }
.act__it.is-in { animation: act-in .9s ease-out; }
@keyframes act-in { from { background-color: var(--accent-soft); transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .act__it.is-in, .act__live i { animation: none; } .act__it, .act__go { transition: none; } .act__it:hover .act__go { transform: none; } }

/* New activity on screens with no right bar: a one-line strip under the top bar (only when something is new), and the full list on Home. */
.actbar, .act-home { display: none; }
@media (max-width: 1280px) {
  .actbar:not([hidden]) { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: stretch; margin: 8px 0 0; border: 1px solid rgba(216, 165, 74, .45); background: linear-gradient(180deg, #1c1912, #12100c); box-shadow: 0 2px 8px rgba(0, 0, 0, .35); animation: actbar-in .35s ease-out; }
  .actbar__k { display: flex; align-items: center; gap: 6px; padding: 0 12px; font: 800 11px/1 var(--font); letter-spacing: .16em; text-transform: uppercase; color: #15110a; background: linear-gradient(180deg, #f6dc9a, #d8a54a 58%, #b98a35); }
  .actbar__k i { font: 800 15px/1 "Big Shoulders Display", "Oswald", Impact, sans-serif; font-style: normal; letter-spacing: 0; }
  .actbar__k i:empty { display: none; }
  .actbar__list { position: relative; min-width: 0; height: 44px; overflow: hidden; }
  .actbar__it { position: absolute; inset: 0; display: flex; align-items: center; gap: 11px; padding: 0 12px; color: var(--text); text-decoration: none; opacity: 0; transform: translateY(100%); transition: transform .35s ease, opacity .35s ease, background .15s; pointer-events: none; }
  .actbar__it.is-on { opacity: 1; transform: none; pointer-events: auto; }
  .actbar__it:hover { background: rgba(216, 165, 74, .08); }
  .actbar__ic { flex: none; display: grid; place-items: center; width: 28px; height: 28px; color: #f6dc9a; border: 1px solid #8a6220; background: linear-gradient(180deg, #33290f, #1a150b); }
  .actbar__ic .ico { width: 15px; height: 15px; }
  .actbar__tx { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
  .actbar__t, .actbar__who { display: contents; }
  .actbar__kind { flex: none; font: 700 9.5px/1 var(--font); font-style: normal; letter-spacing: .16em; text-transform: uppercase; color: #d8a54a; }
  .actbar__t b { flex: 0 1 auto; min-width: 0; font: 700 14px/1.15 var(--font); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .actbar__amt { flex: none; font: 800 17px/1 "Big Shoulders Display", "Oswald", Impact, sans-serif; font-style: normal; letter-spacing: .03em; color: #f6dc9a; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .actbar__who .ub, .actbar__who .act__crew { flex: none; margin-left: 6px; }
  .actbar__who small { flex: 0 1 auto; min-width: 0; font: 500 12px/1.2 var(--font); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .actbar__t > i { flex: none; order: 9; margin-left: auto; padding-left: 4px; font: 600 10.5px/1 var(--mono); font-style: normal; color: #d8a54a; }
  .actbar__x { display: grid; place-items: center; width: 44px; min-height: 44px; padding: 0; color: var(--muted); border: 0; border-left: 1px solid var(--line); background: none; cursor: pointer; }
  .actbar__x:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
  .actbar__x .ico { width: 15px; height: 15px; }
  .act-home { display: block; margin: 12px 0; border: 1px solid var(--line); background: var(--panel); }
  .act-home .nav__group { margin: 0; padding: 0; }
  .act-home .act__head { padding: 9px 12px 8px; color: var(--accent); }
  .act-home .act__it { padding-left: 12px; padding-right: 12px; }
  .act-home .act__none { margin: 10px 12px 12px; }
}
/* phones: the headline on top, the userbar and what they want under it */
@media (max-width: 720px) {
  .actbar__k { flex-direction: column; justify-content: center; gap: 4px; padding: 0 9px; font-size: 10px; letter-spacing: .12em; }
  .actbar__list { height: 54px; }
  .actbar__it { gap: 9px; padding: 0 9px; }
  .actbar__tx { flex-direction: column; align-items: stretch; justify-content: center; gap: 5px; }
  .actbar__t { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
  .actbar__who { display: flex; align-items: center; gap: 8px; min-width: 0; }
  .actbar__who .ub, .actbar__who .act__crew { margin-left: 0; }
  .actbar__kind { display: none; }
}
@media (max-width: 480px) { .actbar__ic { display: none; } }
@keyframes actbar-in { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .actbar:not([hidden]) { animation: none; } .actbar__it { transition: none; } }

/* ---------- "Here this hour": who has been on this page lately (lib/beenhere.php) ---------- */
.seen { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 4px; min-height: 22px; margin: 0 0 8px; }
.seen__k { margin-right: 4px; font: 700 9.5px/1 var(--font); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.seen__d { display: block; width: 22px; height: 22px; border-radius: 50%; overflow: hidden; border: 1px solid var(--line-2, var(--line)); background: var(--bg-2); opacity: .8; transition: opacity .15s, transform .15s, border-color .15s; }
.seen__d img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.seen__d:hover, .seen__d:focus-visible { opacity: 1; transform: scale(1.25); border-color: var(--accent); }
.seen__more { margin-left: 2px; font: 700 10.5px/1 var(--mono); color: var(--muted); }
@media (max-width: 760px) { .seen { justify-content: flex-start; margin: 0 0 6px; } .seen__d:nth-of-type(n+9) { display: none; } }

/* ---------- big moments: corner pop-ups when somebody hits something big (lib/moments.php) ---------- */
.moms { position: fixed; left: 18px; bottom: 18px; z-index: 190; display: grid; gap: 8px; width: min(380px, calc(100vw - 36px)); pointer-events: none; }
.mom { pointer-events: auto; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; color: var(--text); border: 1px solid #8a6220; background: linear-gradient(100deg, rgba(216, 165, 74, .16), transparent 55%), #14110c; box-shadow: 0 18px 40px -16px #000, inset 3px 0 0 #d8a54a; opacity: 0; transform: translateX(-18px); transition: opacity .25s, transform .25s; }
.mom.is-in { opacity: 1; transform: none; }
.mom__face { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; border: 1px solid #8a6220; background: #0c0a07; color: #f6dc9a; }
.mom__face img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.mom__face .ico { width: 18px; height: 18px; }
.mom__tx small { display: block; margin-bottom: 3px; font: 700 9.5px/1 var(--font); letter-spacing: .18em; text-transform: uppercase; color: #d8a54a; }
.mom__tx p { margin: 0; font-size: 13.5px; line-height: 1.3; font-weight: 600; overflow-wrap: anywhere; }
.mom__go { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.mom__go .rx__go { min-height: 28px; border-color: rgba(216, 165, 74, .5); color: #f6dc9a; background: rgba(216, 165, 74, .08); }
.mom .mom__go a.mom__link { display: inline-flex; align-items: center; min-height: 28px; margin-left: auto; padding: 0 12px; font: 700 10.5px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: #15110a; border: 1px solid #8a6220; background: linear-gradient(180deg, #f6dc9a, #d8a54a); }
.mom .mom__go a.mom__link:hover { background: #f6dc9a; color: #15110a; }
.mom__x { all: unset; display: grid; place-items: center; width: 24px; height: 24px; color: var(--dim); cursor: pointer; }
.mom__x:hover { color: var(--text); }
.mom__x .ico { width: 13px; height: 13px; }
@media (max-width: 900px) { .moms { left: 10px; right: 10px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); width: auto; } }

/* ---------- challenges (lib/duels.php): the pop-up when you're called out, and the dialog for calling someone out ---------- */
.moms--duel { bottom: auto; top: 96px; left: auto; right: 18px; z-index: 195; }
.mom--duel { grid-template-columns: auto minmax(0, 1fr); align-items: start; padding: 12px; }
.mom--duel .mom__tx p a { color: #f6dc9a; text-decoration: none; }
.mom--duel .mom__tx p b { color: #f6dc9a; }
.mom--duel .mom__tx em { display: block; margin-top: 4px; font-size: 12px; font-style: normal; line-height: 1.35; color: var(--muted); }
.mom__acts { display: flex; gap: 6px; margin-top: 9px; }
.mom__acts .btn { flex: 1; justify-content: center; }
.duel__games { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 12px 18px 0; }
.duel__games button { all: unset; box-sizing: border-box; display: grid; gap: 3px; padding: 10px; text-align: center; cursor: pointer; border: 1px solid var(--line-2, #3a3326); background: rgba(255, 255, 255, .03); }
.duel__games button b { font: 800 16px/1 var(--poster, var(--font)); letter-spacing: .04em; text-transform: uppercase; color: var(--text); }
.duel__games button small { font-size: 11px; line-height: 1.25; color: var(--muted); }
.duel__games button.is-on { border-color: #d8a54a; background: rgba(216, 165, 74, .14); }
.duel__games button.is-on b { color: #f6dc9a; }
.duel__stake { display: block; margin: 12px 0 0; }
.duel__stake span { display: block; margin: 0 18px -6px; font: 700 10.5px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 900px) { .moms--duel { top: auto; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); left: 10px; right: 10px; } .duel__games { grid-template-columns: 1fr; } }

/* ---------- The Score is on: the bar across every page (lib/scores.php) ---------- */
.scorebar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 10px; padding: 10px 14px; color: var(--text); text-decoration: none; border: 1px solid #d8a54a; background: linear-gradient(100deg, rgba(216, 165, 74, .22), rgba(216, 165, 74, .05) 60%), #14110c; }
.scorebar .ico { width: 18px; height: 18px; color: #f6dc9a; }
.scorebar b { font-size: 14px; color: #f6dc9a; }
.scorebar span { font-size: 13px; color: var(--muted); }
.scorebar i { margin-left: auto; font: 700 14px/1 var(--mono); font-style: normal; color: var(--text); }
.scorebar em { padding: 6px 12px; font: 800 13px/1 var(--font); font-style: normal; letter-spacing: .08em; text-transform: uppercase; color: #15110a; background: #d8a54a; }
.scorebar:hover em { background: #f6dc9a; }
.badge--live { color: #fff; background: #c0392b; animation: live-blink 1.4s ease-in-out infinite; }
@keyframes live-blink { 50% { opacity: .55; } }
@media (max-width: 760px) { .scorebar span { display: none; } }

/* ---------- pings: a pop-up with one button (lib/pings.php, assets/js/live.js) ---------- */
.mom--ping { border-color: #8a6220; }
.mom--ping .mom__tx p { font-weight: 600; }
.mom--ping .mom__acts a.btn { text-decoration: none; text-align: center; }
.mom--ping.mom--chase, .mom--ping.mom--backup { border-color: #c0392b; box-shadow: 0 0 0 1px rgba(192, 57, 43, .35), 0 12px 34px rgba(0, 0, 0, .55); }
.mom--ping.mom--chase .mom__tx small, .mom--ping.mom--backup .mom__tx small { color: #ff8a7a; }

/* ---------- smilies and GIFs in chat, the forum and profile comments (lib/gifs.php, gifs.js) ---------- */
.smi { display: inline-block; width: 15px; height: 15px; margin: 0 1px; vertical-align: -3px; border: 0; border-radius: 0; image-rendering: pixelated; }
.smi--big { width: 30px; height: 30px; vertical-align: -9px; }
.bb-code { display: block; margin: 8px 0; padding: 8px 10px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .35); font: 12.5px/1.5 var(--mono, monospace); white-space: pre-wrap; overflow-wrap: anywhere; }
/* a GIF: a "GIF" tag until it plays, then the picture, never wider than its column */
.gifx { display: block; width: fit-content; max-width: min(var(--gw, 200px), 100%); margin: 5px 0 2px; line-height: 0; text-decoration: none; cursor: zoom-in; }
.gifx__tag { display: inline-block; padding: 5px 8px 4px; border: 1px solid #8a6220; background: rgba(216, 165, 74, .1); color: #f6dc9a; font: 700 10px/1 var(--font); font-style: normal; letter-spacing: .14em; text-transform: uppercase; }
.gifx:not(.is-on) { cursor: pointer; }
.gifx:not(.is-on):hover .gifx__tag, .gifx:focus-visible .gifx__tag { background: #d8a54a; color: #15110a; }
.gifx.is-on .gifx__tag { display: none; }
.gifx.is-bad { cursor: default; }
.gifx.is-bad .gifx__tag { border-color: var(--line-2); background: none; color: var(--dim); }
.gifx img, .gifx video { display: block; max-width: 100%; max-height: var(--gh, 150px); width: auto; height: auto; border: 1px solid var(--line-2); border-radius: 0; background: #000; }
.gifx.is-on:hover img, .gifx.is-on:hover video, .gifx.is-on:focus-visible img, .gifx.is-on:focus-visible video { border-color: #d8a54a; }
.dock__tx .gifx__tag { padding: 3px 5px 2px; font-size: 9.5px; vertical-align: 1px; }
.gifx__mini { display: inline-block; height: 22px; width: auto; max-width: 60px; vertical-align: middle; border: 1px solid var(--line-2); background: #000; }
.gifx__tag--alt { display: none; }
.ui-nogifs .gifx__mini { display: none; } .ui-nogifs .gifx__tag--alt { display: inline-block; }
.dock__tx .smi { vertical-align: -3px; }
/* a GIF opened bigger */
.gifbox { padding: 0; border: 0; background: none; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow: visible; }
.gifbox::backdrop { background: rgba(5, 5, 4, .86); }
.gifbox__in { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.gifbox__pic img, .gifbox__pic video { display: block; min-width: min(240px, 80vw); max-width: calc(100vw - 32px); max-height: calc(100vh - 96px); border: 1px solid #8a6220; border-radius: 0; background: #000; box-shadow: 0 24px 60px -10px #000; cursor: zoom-out; }
.gifbox__x { border-radius: 0; min-width: 96px; min-height: 36px; justify-content: center; }
/* the two buttons beside a text box */
.gft { display: inline-flex; flex: none; gap: 4px; align-items: stretch; }
.gft__b { all: unset; box-sizing: border-box; display: grid; place-items: center; flex: none; min-width: 34px; min-height: 34px; padding: 0 6px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .3); color: var(--muted); font: 800 10.5px/1 var(--font); letter-spacing: .08em; cursor: pointer; }
.gft__b .smi { margin: 0; vertical-align: 0; }
.gft__b:hover, .gft__b[aria-expanded="true"] { border-color: #8a6220; background: rgba(216, 165, 74, .12); color: #f6dc9a; }
.gft__b:focus-visible { outline: 1px solid #d8a54a; outline-offset: 1px; }
.chatdrawer .gft__b { min-width: 40px; min-height: 40px; }
.fm-bb .gft { display: contents; }
.brd .fm-bb .gft__b { min-width: 36px; min-height: 32px; height: 32px; margin-right: -1px; padding: 0 10px; border-bottom: 0; }
.fm-bb .gft__b { min-height: 26px; min-width: 30px; }
.pf__sign .gft { flex-direction: column; }
.pf__sign .gft__b { flex: 1; min-height: 20px; border-color: var(--pf-edge, var(--line-2)); }
/* the panel a button opens: floats over the page, opens upward when there's room */
.gfp { position: fixed; z-index: 2000; left: 8px; top: 8px; box-sizing: border-box; width: min(334px, calc(100vw - 16px)); padding: 10px 12px 12px; border: 1px solid #8a6220; border-top: 3px solid #d8a54a; background: linear-gradient(180deg, #211b11, #12100b); box-shadow: 0 16px 40px rgba(0, 0, 0, .7), 0 0 0 1px rgba(0, 0, 0, .5); color: var(--text); outline: 0; }
.gfp[hidden] { display: none; }
.gfp__h { margin: 0 0 8px; color: #d8a54a; font: 700 10px/1 var(--font); letter-spacing: .18em; text-transform: uppercase; }
/* the smiley box: small pictures, packed close, and only as wide as the nine columns need */
.gfp.gfp--smi { width: auto; max-width: calc(100vw - 16px); padding: 8px 9px 9px; }
.gfp--smi .gfp__h { margin-bottom: 5px; }
.gfp__smi { display: grid; grid-template-columns: repeat(9, 26px); gap: 0; }
.gfp__s { all: unset; box-sizing: border-box; display: grid; place-items: center; width: 26px; height: 26px; cursor: pointer; border: 1px solid transparent; }
@media (max-width: 760px) { .gfp__smi { grid-template-columns: repeat(9, 32px); } .gfp__s { width: 32px; height: 32px; } }
.gfp__s img { display: block; width: 15px; height: 15px; image-rendering: pixelated; }
.gfp__s:hover, .gfp__s:focus-visible { border-color: #8a6220; background: rgba(216, 165, 74, .14); }
.gfp__q, .gfp__url { box-sizing: border-box; width: 100%; min-width: 0; min-height: 38px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 0; background: rgba(0, 0, 0, .4); color: var(--text); font: 14px var(--font); }
.gfp__q:focus, .gfp__url:focus { outline: 0; border-color: #d8a54a; }
.gfp__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; max-height: 232px; margin-top: 8px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.gfp__grid:empty { display: none; }
.gfp__g { all: unset; box-sizing: border-box; display: block; height: 74px; border: 1px solid var(--line-2); background: #000; cursor: pointer; overflow: hidden; }
.gfp__g img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gfp__g:hover, .gfp__g:focus-visible { border-color: #f6dc9a; box-shadow: inset 0 0 0 1px #f6dc9a; }
.gfp__msg { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.gfp__msg:empty { display: none; }
.gfp__say { margin: 0 0 10px; color: var(--text); font-size: 13.5px; line-height: 1.5; }
.gfp__l { display: block; margin: 12px 0 5px; color: var(--muted); font: 700 9.5px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; }
.gfp__add { display: flex; gap: 6px; margin: 0; }
.gfp__add .btn { flex: none; min-height: 38px; border-radius: 0; }
.gfp__err { margin: 8px 0 0; color: #ff8a7a; font-size: 12.5px; line-height: 1.45; }
.gfp__err[hidden] { display: none; }
.gfp__by { margin: 10px 0 0; color: var(--dim); font: 700 9px/1 var(--font); letter-spacing: .16em; text-transform: uppercase; text-align: right; }
@media (pointer: coarse), (max-width: 700px) {
  .gft__b, .chatdrawer .gft__b, .fm-bb .gft__b, .brd .fm-bb .gft__b { min-width: 44px !important; min-height: 44px !important; height: auto; }
  .brd .fm-bb:has(.gft) { align-items: stretch; }
  .brd .fm-bb:has(.gft) button { height: 44px; }
  form.pf__sign { flex-wrap: wrap; }
  form.pf__sign textarea { flex: 1 1 100%; }
  form.pf__sign .gft { flex-direction: row; margin-right: auto; }
  form.pf__sign .gft__b { flex: none; }
  .gfp__q, .gfp__url, .gfp__add .btn { min-height: 44px; font-size: 16px; }
  .gfp__add .btn { font-size: 13px; }
}
@media (max-width: 420px) { .gfp:not(.gfp--smi) { width: calc(100vw - 16px); } }
