/* The ERP's look (from the Idle Adventure dashboard, 2026-11-06), the same for every game (dark only). The login splash
   is the game's own (--erp-splash, set from /api/brand).
   Series colours are fixed: iOS / App Store blue, Android / Google Play green, registered orange, guests purple. */
:root {
  --bg: #0a1020;
  --chrome: #070c19;
  --panel: #15213a;
  --panel-2: #1f2e4d;
  --panel-3: #2a3b60;
  --line: #364a74;
  --line-soft: #27375a;
  --text: #e8ecf4;
  --text-2: #b4bdd0;
  --muted: #8592ab;
  --dim: #6f7c96;
  --gold: #f2c14e;
  --gold-2: #ffd978;
  --gold-soft: #f2c14e1f;
  --s1: #3987e5;
  --s2: #d95926;
  --s3: #199e70;
  --s4: #c98500;
  --s5: #d55181;
  --apple: var(--s1);
  --google: var(--s3);
  /* Registered players: aqua for Idle Adventure (2026-11-06: orange read as danger; blue and green are the stores, purple
     the guests); a game's own colour (ErpOptions.RegisteredColor) replaces it at start-up */
  --registered: #22c3d6;
  --guest: #9085e9;
  --green: #2fbf71;
  --red: #ff6b6b;
  --amber: #f0a33a;
  /* Incident kinds (as Champions' --k-*) */
  --k-strike: #f0a33a;
  --k-ban: #c2364f;
  --k-unban: #2fbf71;
  --k-other: #8592ab;
  --k-warning: #f2c14e;
  --blue: #5aa9ff;
  --purple: #a78bfa;
  --radius: 14px;
  --radius-sm: 9px;
  --gutter: 16px;
  --shadow: 0 1px 0 #ffffff08 inset, 0 10px 30px -18px #000c;
  --header-height: 60px;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); }
body { font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  background: var(--bg); min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
button, input, select { touch-action: manipulation; }
input, select, textarea { font: inherit; color: var(--text); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.good { color: var(--green); } .warn { color: var(--amber); } .bad { color: var(--red); }


/* --- Sign in --- */
/* The game's loading screen behind it, its logo kept bright at the top, the box below it */
.login-container { min-height: 100vh; min-height: 100dvh; display: flex; align-items: flex-end; justify-content: center; padding: var(--gutter) var(--gutter) max(10vh, 32px);
  background: var(--login-fade), var(--erp-splash, none) center top / cover; --login-fade: linear-gradient(rgba(10, 16, 32, .05), rgba(10, 16, 32, .12) 28%, rgba(10, 16, 32, .86) 55%, rgba(10, 16, 32, .95)); }
/* A desktop shows the whole loading screen as a column, its logo at the top */
@media (min-width: 861px) { .login-container { background: var(--login-fade), var(--erp-splash, none) center top / auto 100% no-repeat, var(--bg); } }
.login-box { width: 100%; max-width: 360px; background: var(--panel); border: 1px solid var(--gold-soft); border-radius: 18px; padding: 32px; text-align: center; box-shadow: var(--shadow); }
.login-mascot { display: block; width: 84px; height: 84px; border-radius: 20px; margin: 0 auto 14px; object-fit: cover; }
.login-box h1 { color: var(--gold); font-size: 20px; }
.login-box p { color: var(--muted); margin: 4px 0 20px; }
.login-box input { width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); margin-bottom: 14px; outline: none; }
.login-box input:focus { border-color: var(--gold); }
.login-box button { width: 100%; padding: 12px; border: 0; border-radius: 10px; background: var(--gold); color: #1a1405; font-weight: 700; }
.login-error { color: var(--red); margin: -8px 0 12px; display: none; }
.login-box .login-passkey { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px; font-size: 15px; }
.login-box .login-passkey[hidden], .login-or[hidden] { display: none; }
.login-box .login-passkey:disabled { opacity: .6; }
.login-or { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; color: var(--muted); font-size: 12px; }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* The one app's landing (js/core/games.js): the Dashboard's mark, the games as big cards (each its splash and icon, the
   first thing on the screen), the open game's sign-in beside them (desktop) or under them (phone). No game splash behind:
   the app's own glow. */
.one-app .login-container { display: block; padding: 0;
  background: radial-gradient(55% 45% at 15% 0%, rgba(242, 193, 78, .16), transparent 70%), radial-gradient(45% 45% at 100% 100%, rgba(34, 195, 214, .12), transparent 70%), var(--bg); }
.landing { min-height: 100vh; min-height: 100dvh; max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column;
  padding: max(env(safe-area-inset-top), 28px) 40px max(env(safe-area-inset-bottom), 32px); }
.landing-top { display: flex; align-items: center; gap: 14px; }
.landing-icon { width: 52px; height: 52px; border-radius: 13px; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.landing-top b { display: block; color: var(--gold); font-size: 22px; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.landing-top span { color: var(--muted); font-size: 13px; }
.landing-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: center; padding-top: 28px; }
.landing-pick h2 { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.pick-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.pick-card { display: flex; flex-direction: column; padding: 0; font: inherit; width: 100%; border-radius: 22px; overflow: hidden; text-align: left; cursor: pointer;
  background: var(--panel); border: 2px solid var(--line); color: var(--text); box-shadow: var(--shadow); transition: transform .18s, border-color .18s, box-shadow .18s; }
.pick-card:hover { transform: translateY(-3px); border-color: rgba(242, 193, 78, .5); }
.pick-card.on { border-color: var(--gold); cursor: default; transform: none; box-shadow: 0 0 0 4px rgba(242, 193, 78, .14), var(--shadow); }
.pick-art { aspect-ratio: 16 / 10; background: var(--panel-2) center top / cover no-repeat; image-rendering: pixelated; position: relative; }
.pick-art.smooth { image-rendering: auto; }
.pick-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, var(--panel)); }
.pick-body { display: flex; align-items: flex-end; gap: 14px; padding: 0 18px 18px; margin-top: -44px; position: relative; }
.pick-icon { width: 88px; height: 88px; border-radius: 22px; flex: none; background: var(--panel-2); border: 3px solid var(--panel); box-shadow: 0 8px 20px rgba(0, 0, 0, .45); }
.pick-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding-bottom: 4px; }
.pick-text b { font-size: 18px; font-weight: 800; line-height: 1.2; }
.pick-state { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; color: var(--muted); background: rgba(255, 255, 255, .06); }
.pick-state.on { color: #1a1405; background: var(--gold); }
.pick-state.in { color: var(--green); background: rgba(46, 204, 113, .12); }
.login-box.landing-signin { max-width: none; text-align: left; border-color: var(--line); padding: 28px; }
.signin-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.signin-head .login-mascot { width: 48px; height: 48px; border-radius: 13px; margin: 0; }
.signin-head span { color: var(--muted); font-size: 12px; }
.signin-head h1 { color: var(--text); font-size: 18px; line-height: 1.2; }
@media (max-width: 960px) {
  .landing { padding: max(env(safe-area-inset-top), 18px) var(--gutter) max(env(safe-area-inset-bottom), 24px); }
  .landing-icon { width: 44px; height: 44px; border-radius: 11px; }
  .landing-top b { font-size: 19px; }
  .landing-main { grid-template-columns: 1fr; gap: 22px; align-items: start; padding-top: 22px; }
  .pick-cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .pick-card { border-radius: 18px; }
  .pick-body { flex-direction: column; align-items: flex-start; gap: 8px; padding: 0 12px 14px; margin-top: -34px; }
  .pick-icon { width: 64px; height: 64px; border-radius: 16px; }
  .pick-text b { font-size: 14px; }
  .login-box.landing-signin { padding: 22px; }
}

/* --- Shell: the top bar (brand, nav, actions), the page, the phone's bottom nav --- */
/* As Champions' (translucent, its own blur): with a solid bar iOS Safari blurred the bar's contents under the status bar */
.topbar { position: sticky; top: 0; z-index: 100; display: flex; align-items: center; gap: 20px; padding: 10px var(--gutter);
  padding-top: calc(10px + env(safe-area-inset-top)); background: rgba(10, 16, 32, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; color: var(--gold); white-space: nowrap; letter-spacing: .01em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
/* The one app (js/core/games.js): the brand opens the games */
.one-app .brand { cursor: pointer; }
.game-switch { font-size: 14px; color: var(--muted); font-weight: 700; }
.game-rows { display: flex; flex-direction: column; gap: 8px; }
.game-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 12px; background: var(--panel-2, rgba(255,255,255,.04)); border: 1px solid var(--line, rgba(255,255,255,.08)); color: var(--text); text-align: left; cursor: pointer; }
.game-row.on { border-color: var(--gold); cursor: default; }
.game-row b { flex: 1; min-width: 0; font-size: 15px; }
.game-art { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.game-state { font-size: 12.5px; color: var(--muted); }
.game-row.on .game-state { color: var(--gold); }
.nav { display: flex; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 9px; color: var(--muted); font-weight: 500; }
.nav a svg { width: 16px; height: 16px; }
.nav a.active { color: var(--text); background: var(--panel-2); }
.nav a:hover { color: var(--text); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.icon-btn, .ghost-btn { white-space: nowrap; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 6px 11px; line-height: 1; color: var(--text); }
.icon-btn { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover, .ghost-btn:hover { border-color: var(--gold); }
.ghost-btn { height: 34px; }
.last-updated { color: var(--muted); font-size: 12px; }
.page { max-width: 1280px; margin: 0 auto; padding: 22px var(--gutter) 48px; }
.bottom-nav { display: none; }
@media (max-width: 1180px) { .last-updated { display: none; } .nav a { padding: 7px 9px; } .topbar { gap: 12px; } }
@media (max-width: 860px) {
  input, select, textarea { font-size: 16px !important; }
.nav, .last-updated, .signout-btn { display: none; }
.page { padding: 14px 12px calc(84px + env(safe-area-inset-bottom)); }
  .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 150; background: rgba(13, 20, 37, .94);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 7px; font-size: 10.5px; color: var(--muted); }
  .bottom-nav a svg { width: 21px; height: 21px; }
  .bottom-nav a.active { color: var(--gold); }
}

/* --- Page header, segmented controls, tabs --- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 16px; }
.page-head h1 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.page-head .controls { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; max-width: 100%; }
@media (max-width: 860px) { .page-head h1 { font-size: 19px; } .page-head .controls { margin-left: 0; width: 100%; } }
.seg { display: inline-flex; flex-wrap: wrap; background: var(--chrome); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; max-width: 100%; }
.seg button { border: 0; background: none; padding: 6px 11px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--panel-3); color: var(--gold); box-shadow: inset 0 0 0 1px #f2c14e66; }
.tabs { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 16px; }
.tabs button, .tabs a { flex: none; background: none; border: 0; padding: 8px 14px; border-radius: 9px; color: var(--muted); white-space: nowrap; font-weight: 650; }
.tabs button:hover, .tabs a:hover { color: var(--text); }
.tabs button.active, .tabs a.active { background: var(--panel-3); color: var(--gold); box-shadow: 0 1px 0 #ffffff0d inset; }
/* The older tab bars (leaderboards, event / season boards) wear the same look. */

/* --- Sections and cards --- */
h2.section-title, .section > h2{ font-size: 16px; font-weight: 750; color: var(--text); display: flex; align-items: center; gap: 8px; }
h2.section-title::before, .section > h2::before{ content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--gold); flex: none; }
h2.section-title { margin: 36px 0 14px; padding-bottom: 10px; background: linear-gradient(90deg, #f2c14eb3, #f2c14e2e 45%, transparent) bottom / 100% 1px no-repeat; flex-wrap: wrap; }
.page-head + h2.section-title, .dash-view > h2.section-title:first-child { margin-top: 0; }
h2.section-title .aside { color: var(--muted); font-weight: 500; font-size: 12px; }
h2.section-title .section-controls { margin-left: auto; }
.section { margin-bottom: 32px; }

.section > h2 { margin-bottom: 14px; padding-bottom: 10px; border: 0; background: linear-gradient(90deg, #f2c14eb3, #f2c14e2e 45%, transparent) bottom / 100% 1px no-repeat; }
.section-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; font-size: 13px; color: var(--muted); }
.panel { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); min-width: 0; overflow: hidden; }
.panel h3 { font-size: 13px; color: var(--text-2); font-weight: 650; }
.panel-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head .hint { color: var(--muted); font-size: 12px; }
.panel-head .right { margin-left: auto; }
.more { color: var(--gold); font-size: 13px; font-weight: 600; white-space: nowrap; }
.more:hover { color: var(--gold-2); }
.grid { display: grid; gap: 14px; }
.grid > * { min-width: 0; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* A panel across the whole grid (All time's Monthly revenue, as Champions') */
.grid > .panel.full { grid-column: 1 / -1; }
.month-box { position: relative; height: 280px; }
@media (max-width: 600px) { .month-box { height: 240px; } }

@media (max-width: 860px) { .grid.cols-2 { grid-template-columns: minmax(0, 1fr) !important; } }
.empty-panel { color: var(--muted); padding: 22px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }

/* --- Loading --- */
/* Loading: faded shapes with a light sweeping across them, in the place of what is coming (no spinners). .loading is a
   generic block of lines (any list or panel body); .skel takes the shape of the element it sits on (a .kpi tile, a .panel,
   a .chart); .reloading lays the same sweep over content being replaced, so nothing jumps. Each element loads on its own. */
:root { --skel: #ffffff0d; --skel-shine: #ffffff12; }
@keyframes skel { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.loading, .mini-loading { position: relative; display: block; min-height: 96px; margin: 14px; overflow: hidden; color: transparent; font-size: 0;
  background: linear-gradient(var(--skel) 0 0) 0 4px / 64% 14px no-repeat, linear-gradient(var(--skel) 0 0) 0 32px / 92% 14px no-repeat,
    linear-gradient(var(--skel) 0 0) 0 60px / 78% 14px no-repeat, linear-gradient(var(--skel) 0 0) 0 88px / 40% 8px no-repeat; }
.loading > *, .mini-loading > * { display: none !important; }
.loading::after, .mini-loading::after, .skel::after, .reloading::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(100deg, transparent 25%, var(--skel-shine) 50%, transparent 75%) 0 0 / 200% 100%; animation: skel 1.4s ease-in-out infinite; }
.page-loading { min-height: 60vh; margin: 0; }
.skel { position: relative; overflow: hidden; }
.kpi.skel { min-height: 132px; background: var(--panel) linear-gradient(var(--skel) 0 0) 14px 16px / 38% 10px no-repeat; }
.kpi.skel::before { content: ""; position: absolute; left: 14px; right: 30%; top: 44px; height: 30px; border-radius: 8px; background: var(--skel); }
.skel.chart { min-height: 230px; background-color: var(--panel); }
.skel.chart::before { content: ""; position: absolute; inset: 56px 16px 16px; border-radius: 8px;
  background: repeating-linear-gradient(90deg, var(--skel) 0 7%, transparent 7% 12%); -webkit-mask: linear-gradient(transparent 0 20%, #000 20%); mask: linear-gradient(transparent 0 20%, #000 20%); }
.panel .skel.chart { background-color: transparent; min-height: 200px; }
.panel .skel.chart::before { inset: 10px 0 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Server pills (Render + MongoDB) --- */
.health { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line-soft); font-size: 12px; white-space: nowrap; }
.pill .k { color: var(--muted); }
.pill b { font-weight: 650; font-variant-numeric: tabular-nums; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.pill.ok .dot { background: var(--green); box-shadow: 0 0 0 3px #2fbf7126; }
.pill.warn .dot { background: var(--amber); }
.pill.crit .dot { background: var(--red); }
.pill.crit b { color: var(--red); }
.pill.group { color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .06em; font-size: 10.5px; background: none; border-color: transparent; padding-right: 2px; }
@media (max-width: 860px) { .health { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px 14px; padding: 0 12px; } .health::-webkit-scrollbar { display: none; } }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--green); font-weight: 650; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 #2fbf7188; } 70% { box-shadow: 0 0 0 7px #2fbf7100; } 100% { box-shadow: 0 0 0 0 #2fbf7100; } }

/* --- KPI tiles: label, value, the change against the span before, a sparkline --- */
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.kpis.hero { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) { .kpis.hero { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpis { gap: 10px; } }
.kpi { position: relative; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 14px 14px 12px; min-width: 0;
  box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.kpi .label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.kpi .label i { width: 7px; height: 7px; border-radius: 50%; background: var(--tone, var(--muted)); flex: none; }
.kpi .value { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: filter .2s; }
.kpi .value .guests { color: var(--guest); font-size: 15px; font-weight: 700; }
.kpi .value.sm { font-size: 22px; }
.kpi .meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-top: 4px; font-size: 12px; color: var(--muted); min-height: 18px; }
.kpi .meta b { color: var(--text-2); font-weight: 650; font-variant-numeric: tabular-nums; }
.kpi .spark { margin: auto -14px -12px; padding-top: 10px; height: 48px; }
.kpi .spark svg { display: block; width: 100%; height: 38px; }
.kpi.tap { cursor: pointer; transition: border-color .15s, background .15s; }
.kpi.tap:hover { border-color: #f2c14e66; }
.kpi.tap.open { border-color: var(--gold); background: var(--panel-2); }

@media (max-width: 860px) {
.kpi { padding: 12px 12px 10px; }
.kpi .value { font-size: 22px; }
.kpi .value.sm { font-size: 18px; }
.kpi .spark { margin: auto -12px -10px; height: 40px; }
.kpi .spark svg { height: 30px; }
.kpi .label { font-size: 11px; }
}
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; font-size: 12px; padding: 1px 6px; border-radius: 6px; white-space: nowrap; }
.delta.up { color: var(--green); background: #2fbf711a; }
.delta.down { color: var(--red); background: #ff6b6b1a; }
.delta.flat { color: var(--muted); background: #ffffff0a; }
/* Older tiles (Payouts, player page) */

/* --- Tables --- */

/* --- Controls --- */
.btn { padding: 8px 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel-2); font-weight: 600; font-size: 13px; color: var(--text); }
.btn:hover:not(:disabled) { border-color: var(--gold); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #1a1405; }
.btn.danger { border-color: #ff6b6b66; color: var(--red); }
.btn.small { padding: 5px 10px; font-size: 12px; }
.select{ background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; font-size: 13px; min-height: 34px; max-width: 100%; }

.search { flex: 1; min-width: 200px; width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); outline: none; }
.search:focus { border-color: var(--gold); }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 650; border-radius: 6px; padding: 2px 7px; border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; line-height: 1.4; }
.badge.bad { border-color: #ff6b6b55; color: var(--red); background: #ff6b6b12; }
.badge.good { border-color: #2fbf7155; color: var(--green); background: #2fbf7112; }
.badge.gold { border-color: #f2c14e44; color: var(--gold); background: var(--gold-soft); }

/* --- Dropdown --- */

/* --- Dialogs (modal-overlay / modal-box) --- */

@keyframes pop { from { opacity: 0; transform: scale(.97); } }

@keyframes rise { from { transform: translateY(20px); opacity: 0; } }

/* --- Search results --- */

/* --- Phone alerts (js/alerts.js): the top bar button (green when on), and its drawer: a big on/off card, the Home Screen
   steps on an iPhone, a preview of an alert --- */
.alerts-btn { position: relative; }
.alerts-btn .alerts-dot { display: none; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--green); border: 2px solid var(--bg); }
.alerts-btn.on { color: var(--green); border-color: #2fbf7166; }
.alerts-btn.on .alerts-dot { display: block; }
.al-head-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); flex: none; }
.al-state { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; margin-bottom: 10px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); color: var(--text); text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.al-state:hover { border-color: #f2c14e66; }
.al-state.on { background: color-mix(in srgb, var(--green) 10%, var(--panel)); border-color: #2fbf7166; }
.al-state-icon { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--panel-3); color: var(--muted); }
.al-state.on .al-state-icon { background: #2fbf7124; color: var(--green); box-shadow: 0 0 0 5px #2fbf7114; }
.al-state-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.al-state-main b { font-size: 16px; } .al-state.on .al-state-main b { color: var(--green); } .al-state-main small { font-size: 12.5px; color: var(--muted); }
.al-state:disabled { cursor: default; opacity: 1; }
.al-devices { color: var(--gold); cursor: pointer; }
.pk-note { text-align: center; margin-top: 10px; }
.dev-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--panel-3); color: var(--text-2); }
.lcard .dev-empty { border: 0; border-radius: 0; }
.pk-no { width: 100%; }
.al-test { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 11px; margin-bottom: 12px; }
.al-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.al-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px 12px; border-radius: 12px; background: var(--panel-2); text-align: center; }
.al-step-no { position: absolute; top: 8px; left: 8px; width: 20px; height: 20px; border-radius: 50%; background: var(--gold); color: #1a1405; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.al-step-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--panel-3); color: var(--blue); }
.al-step-icon img { width: 36px; height: 36px; border-radius: 9px; }
.al-step b { font-size: 12.5px; } .al-step small { font-size: 11px; color: var(--muted); }
.al-preview { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--radius); background: var(--panel); border: 1px dashed var(--line); }
.al-preview-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.al-note { display: flex; gap: 10px; padding: 11px 12px; border-radius: 16px; background: rgba(240, 242, 248, .1); backdrop-filter: blur(10px); box-shadow: 0 6px 20px -8px #000a; }
.al-note img { width: 36px; height: 36px; border-radius: 9px; flex: none; }
.al-note > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 12.5px; }
.al-note-top { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; } .al-note-top b { color: var(--text-2); font-weight: 650; }
.al-note > div > span { color: var(--text-2); overflow-wrap: anywhere; }
.al-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.al-kinds span { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; background: var(--panel-2); font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.al-kinds svg { color: var(--s5); } .al-kinds .muted { background: none; color: var(--muted); }
.al-msg { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--gold-soft); color: var(--gold); font-size: 13px; font-weight: 600; }

/* --- Tools: config forms and job cards --- */

.tool-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.tool-head h2 { font-size: 16px; font-weight: 750; display: flex; align-items: center; gap: 8px; }
.tool-head h2::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--gold); }
.tool-head .right { margin-left: auto; display: flex; gap: 8px; }
.tool-head .hint { color: var(--muted); font-size: 12px; flex-basis: 100%; }
.jobs { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.job { display: flex; flex-direction: column; gap: 8px; }

.job p { color: var(--muted); font-size: 13px; flex: 1; }
.job .btn { align-self: flex-start; }

/* --- Job logs (IAP reconciliation, receipt backfill, leaderboard sync): a sheet at the bottom --- */

/* --- Player / audit pages: the same top bar, the page's own title row under it --- */

.tool-head > button, .tool-head > .btn { margin-left: auto; }

/* --- Trays and card header strips (as on the Champions dashboard) --- */
:root { --tray-line: #2b3c61; }
.page-head .controls, .lcard-bar { background: var(--chrome); border: 1px solid var(--tray-line); border-radius: 12px; padding: 6px; box-shadow: inset 0 1px 4px #000a; }
.page-head .controls { gap: 6px; }
.page-head .controls .seg, .lcard-bar .seg, .lcard-foot .seg { background: var(--panel-2); }
.panel > .panel-head:first-child { margin: -16px -16px 14px; padding: 11px 16px; border-bottom: 1px solid #f2c14e55; background: var(--chrome); border-radius: var(--radius) var(--radius) 0 0; }
.panel > .panel-head:first-child h3 { color: var(--text); font-size: 13.5px; font-weight: 700; }
/* The leaderboards' tab bars are switches */

/* --- List cards: the search and filters in a tray, the rows, the pager in the footer --- */
.lcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.lcard-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border: 0; border-bottom: 1px solid #f2c14e55; border-radius: 0; padding: 10px 12px; box-shadow: none; }
.lcard-bar .search { flex: 1 1 260px; width: auto; }
.lcard .feed { border: 0; border-radius: 0; box-shadow: none; }
.lcard > .loading, .lcard > div > .loading { padding: 26px; }
.lcard-foot:empty { display: none; }
.lcard-foot { border-top: 1px solid var(--line); background: var(--chrome); padding: 8px 12px; }
.selects { display: flex; gap: 8px; min-width: 0; flex-wrap: wrap; }
.pager-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.pager .group { display: flex; gap: 8px; align-items: center; }
.page-no { min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }
.size-pick { display: inline-flex; align-items: center; gap: 8px; }
.size-pick .seg button { padding: 5px 10px; }

/* --- The purchases feed: one row per purchase, newest first --- */
.feed { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.feed-row { display: grid; grid-template-columns: auto minmax(0, 1.4fr) minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.feed-row:last-child { border-bottom: 0; }
.feed-row:hover { background: #ffffff05; }
.feed-row .what b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-row .what span { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; }
.feed-row .who-col { min-width: 0; font-size: 13px; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; }
.feed-row .who-col a { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; max-width: 100%; }
.feed-row .who-col a + span { white-space: nowrap; }
.feed-row .who-col a + span::before { content: "· "; }
.feed-row .who-col a:hover { color: var(--gold); }
.feed-row .who-col span { color: var(--muted); font-size: 12px; }
.feed-row .amount { text-align: right; }
.feed-row .amount b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.feed-row .amount b.muted { color: var(--muted); }
.feed-row .amount span { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.feed-row .amount b.refunded { color: var(--red); }
.feed-row .st { justify-self: end; }
.feed-empty { padding: 26px; text-align: center; color: var(--muted); }
@media (max-width: 860px) {
.feed-row { grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; padding: 11px 12px; }
.feed-row .p-art { grid-row: span 2; }
.feed-row .who-col { grid-column: 2; grid-row: 2; }
.feed-row .amount { grid-column: 3; grid-row: 1; }
.feed-row .st { grid-column: 3; grid-row: 2; }
}
.p-art { position: relative; width: 44px; height: 44px; border-radius: 11px; background: radial-gradient(circle at 50% 35%, #2a3b63, #172238 70%); display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; }
.p-art img { width: 82%; height: 82%; object-fit: contain; }
.p-art.sm { width: 36px; height: 36px; border-radius: 9px; }
.store-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.store-chip i { width: 8px; height: 8px; border-radius: 50%; }
.badge.warn { border-color: #f0a33a55; color: var(--amber); background: #f0a33a12; }
.badge.purple { border-color: #a78bfa55; color: var(--purple); background: #a78bfa12; }
.badge.blue { border-color: #5aa9ff55; color: var(--blue); background: #5aa9ff12; }

/* --- Money and people cards, stores side by side, products --- */
.kpis.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpis.two .kpi .value { font-size: 32px; }
.kpis.two .kpi .meta { display: block; }
@media (max-width: 860px) { .kpis.two { grid-template-columns: minmax(0, 1fr); } .kpis.two .kpi .value { font-size: 26px; } }
.kpi .value .unit { font-size: 15px; font-weight: 600; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.kpi-stack { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 4px; }
.kpi-line { font-size: 12px; color: var(--muted); }
.kpi-line.bad b { color: var(--red); }
.kpi-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.kpi-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-soft); font-size: 12px; color: var(--muted); }
.kpi-pill i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.kpi-pill b { color: var(--text); font-variant-numeric: tabular-nums; }
.kpi-pill.bad { border-color: #ff6b6b55; background: #ff6b6b12; } .kpi-pill.bad b { color: var(--red); }
.stores { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.store-card { border-top: 3px solid var(--tone); }
.store-card .panel-head { align-items: center; }
.store-card .share { font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; color: var(--text); }
.store-card .share small { font-size: 11px; font-weight: 600; color: var(--muted); }
.store-net { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-bottom: 10px; }
.store-net small { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.footnote { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); font-size: 11.5px; color: var(--muted); line-height: 1.5; }

/* --- Rows: art, a title over one muted line, the key figure on the right --- */
.prow { position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line-soft); min-width: 0; }
.prow:last-child { border-bottom: 0; }
.prow.link { cursor: pointer; }
.prow.link:hover { background: #ffffff07; }
.prow-art { flex: none; display: flex; }
.prow-main { flex: 1; min-width: 0; }
.prow-title { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 14.5px; font-weight: 650; }
.prow-title .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow-sub { display: flex; align-items: center; margin-top: 3px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; min-width: 0; }
.prow-sub .sep { margin: 0 6px; opacity: .5; }
.prow-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; }
.prow-side > b { font-size: 14px; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.prow-note { font-size: 11.5px; color: var(--muted); white-space: nowrap; font-weight: 600; }
@media (min-width: 861px) { .prow { padding: 11px 16px; gap: 12px; } .prow-title { font-size: 15px; } .prow .pavatar { width: 40px; height: 40px; } }
.pavatar { position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%; padding: 2px; background: var(--guest); }
.pavatar.apple { background: var(--apple); }
.pavatar.google { background: var(--google); }
.pavatar .face { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: radial-gradient(circle at 50% 35%, #2a3b63, #172238 70%); color: var(--text); font-size: 13px; font-weight: 800; }
.pavatar .online { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--green); border: 2px solid var(--panel); }

/* --- Donut + legend, ranked bars --- */
.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut { position: relative; width: 132px; height: 132px; flex: none; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut .center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.donut .center b { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.donut .center span { font-size: 11px; color: var(--muted); }
.donut-legend { flex: 1; min-width: 190px; display: flex; flex-direction: column; gap: 8px; }
.donut-legend .row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; font-size: 13px; }
.donut-legend .row i { width: 10px; height: 10px; border-radius: 3px; }
.donut-legend .row .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donut-legend .row b { font-variant-numeric: tabular-nums; }
.donut-legend .row .p { color: var(--muted); font-size: 12px; min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }
.rank-bars { display: flex; flex-direction: column; gap: 10px; }
.rb { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; }
.rb .body { min-width: 0; }
.rb .name { display: flex; gap: 6px; align-items: baseline; font-size: 13px; font-weight: 600; }
.rb .name span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb .name .sub { color: var(--muted); font-weight: 500; font-size: 12px; white-space: nowrap; }
/* What the product does, after its sold count; the part that gives way (ellipsis) when the line is short of room. */
.rb .name span:first-child, .rb .name .sub { flex: none; }
.rb .track { height: 7px; margin-top: 5px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.rb .fill { height: 100%; border-radius: 4px; }
.rb .val { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; font-size: 13px; }

/* --- Health: one line (app.js loadHealth): the state, then CPU · RAM · DB; connections and size only on wide screens --- */
.health-strip { width: 100%; display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 9px 12px; border-radius: 12px; text-align: left;
  background: var(--panel); border: 1px solid var(--line-soft); color: var(--text); font: inherit; cursor: pointer; }
.health-strip:hover { border-color: #f2c14e66; }
.hs-state { --v: var(--muted); display: inline-flex; align-items: center; gap: 8px; flex: none; font-size: 13px; }
.hs-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--v); box-shadow: 0 0 0 3px color-mix(in srgb, var(--v) 22%, transparent); }
.hs-state.ok { --v: var(--green); } .hs-state.warn { --v: var(--amber); } .hs-state.crit { --v: var(--red); }
.hs-state.crit b { color: var(--red); } .hs-state.warn b { color: var(--amber); }
.hs-stats { flex: 1; min-width: 0; display: flex; justify-content: flex-end; gap: 14px; overflow: hidden; }
.hs { display: inline-flex; align-items: baseline; gap: 5px; font-size: 12.5px; white-space: nowrap; }
.hs em { font-style: normal; color: var(--muted); }
.hs b { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-2); }
.hs.warn b { color: var(--amber); } .hs.crit b { color: var(--red); }
.health-strip .nav-chev { flex: none; margin-left: 0; }
@media (max-width: 860px) {
  .hs-wide { display: none; }
  .hs-stats { gap: 10px; }
  .hs { font-size: 12px; }
}

/* --- Players now: the registered / guests bar, the Active tile's two numbers, the builds, today's revenue --- */
.cbar { display: flex; height: 6px; border-radius: 99px; overflow: hidden; background: var(--panel-3); }
.cbar i { display: block; height: 100%; transition: width .4s ease; }
.clabels { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.clabels b { font-weight: 700; font-variant-numeric: tabular-nums; }
.clabels .n { margin-left: auto; }
.kpi .meta .kpi-pills { margin-top: 2px; }
.kpi-pill.tap { cursor: pointer; font: inherit; font-size: 12px; }
.kpi-pill.tap:hover { border-color: var(--gold); color: var(--text); }
.kpi-pill.warn { border-color: #f0a33a55; background: #f0a33a12; } .kpi-pill.warn b { color: var(--amber); }
.kpi-pill.open { border-color: var(--gold); color: var(--text); }
.kpi .value .aw2 { display: flex; align-items: baseline; gap: 14px; }
.aw2-n { display: inline-flex; align-items: baseline; gap: 5px; padding: 0; border: 0; background: none; color: var(--text); font: inherit; cursor: pointer;
  border-bottom: 2px solid transparent; }
.aw2-n:hover, .aw2-n.open { border-bottom-color: var(--gold); }
.aw2-n small { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.aw2-n small.live { color: var(--green); }
.aw2-n small.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 1.8s infinite; }
/* The Active tile's new players: today and this week, each with its change, opening those players */
.new-rows { display: flex; flex-direction: column; gap: 5px; width: 100%; margin-top: 4px; }
.new-row { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 5px 8px; border-radius: 8px; background: var(--panel-2);
  border: 1px solid var(--line-soft); color: var(--muted); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.new-row .k { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.new-row b { color: var(--text); font-variant-numeric: tabular-nums; }
.new-row .delta { font-size: 11px; padding: 1px 5px; }
.new-row:hover, .new-row.open { border-color: var(--gold); color: var(--text); }

/* The minimum build per platform, beside the Overview title */
.build-pill { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 999px; background: var(--panel);
  border: 1px solid var(--line-soft); color: var(--muted); font: inherit; font-size: 12px; font-weight: 650; white-space: nowrap; cursor: pointer; }
.build-pill:empty { display: none; }
.build-pill:hover { border-color: var(--gold); }
.build-pill .bp-k { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.bp-item { display: inline-flex; align-items: center; gap: 5px; }
.bp-item i { width: 7px; height: 7px; border-radius: 50%; background: var(--tone); flex: none; }
.bp-item b { color: var(--text); font-variant-numeric: tabular-nums; }

/* --- An opened tile: its player table, filters on top --- */
.drill:not(:empty) { margin-top: 14px; padding: 12px; border: 1px solid #f2c14e44; border-radius: var(--radius);
  background: linear-gradient(#f2c14e0b, transparent 140px), var(--bg); }

.lcard-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fchips { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.seg.filter { flex: none; }
@media (max-width: 860px) {
.lcard-bar .search { flex: 1 1 100%; min-width: 0; }
.fchips { flex: 1 1 100%; }
.seg.filter { flex: 0 1 auto; max-width: 100%; flex-wrap: wrap; }
.seg.filter button { padding: 8px 12px; font-size: 13.5px; }
}

/* --- Rows in a list card; Linked Accounts' people, opened for their accounts --- */
.table-wrap.rows { overflow: hidden; }
.pavatar.both { background: linear-gradient(135deg, var(--apple) 50%, var(--google) 50%); }
.lgroup { border-bottom: 1px solid var(--line-soft); overflow: hidden; }
.lgroup:last-child { border-bottom: 0; }
.lgroup.open { background: #ffffff03; }
.lgroup-head { border-bottom: 0; }
.lgroup-head .arrow { flex: none; color: var(--muted); font-size: 14px; transition: transform .15s; }
.lgroup.open .lgroup-head .arrow { transform: rotate(180deg); }
.lgroup .table-wrap.rows { border-top: 1px dashed var(--line); background: var(--panel-2); }
.lgroup .table-wrap.rows .prow { padding-left: 28px; }

/* A section redrawing for a new range: what was there stays, dimmed, until the new figures land. */
.reloading { position: relative; opacity: .6; pointer-events: none; transition: opacity .15s; }

/* --- Popups, notices and their fields (ui.js askDialog / notify), the Champions dashboard's --- */
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

.field { width: 100%; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); outline: none; }
.field:focus { border-color: var(--gold); }

.dlg-back { position: fixed; inset: 0; background: #000a; z-index: 300; animation: fade .15s; }
.dlg { position: fixed; z-index: 301; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100vw - 32px)); background: var(--panel);
  border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: 0 30px 60px -20px #000; display: flex; flex-direction: column; gap: 14px; animation: pop .16s ease-out;
  /* A tall popup (a long letter's preview) scrolls inside, so its buttons are never pushed off the screen */
  max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -48%) scale(.97); } }
.dlg-title { display: flex; align-items: center; gap: 10px; font-size: 17px; }

.dlg-text { display: flex; flex-direction: column; gap: 8px; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.dlg textarea.field { resize: vertical; font: inherit; }
.dlg-error { color: var(--red); font-size: 13px; background: #ff6b6b12; border: 1px solid #ff6b6b44; border-radius: 8px; padding: 8px 10px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; }
.dlg-actions .btn { min-width: 96px; padding: 10px 16px; }
.btn.danger-solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger-solid:hover:not(:disabled) { border-color: #ff8a8a; }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 310; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 380px; padding: 10px 12px; border-radius: 12px; background: var(--panel-2);
  border: 1px solid var(--line); box-shadow: 0 16px 30px -12px #000; font-size: 14px; animation: rise .2s ease-out; }
.toast-icon { width: 22px; height: 22px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 12px;
  background: #5aa9ff22; color: var(--blue); }
.toast.good .toast-icon { background: #2fbf7122; color: var(--green); }
.toast.bad .toast-icon { background: #ff6b6b22; color: var(--red); }

@keyframes rise { from { transform: translateY(20px); opacity: 0; } }
@media (max-width: 860px) {
  /* Above the on-screen keyboard (js/ui.js aboveKeyboard sets --kb / --vh), scrolling inside when it doesn't fit. */
.dlg { left: 0; right: 0; top: auto; bottom: var(--kb, 0px); transform: none; width: 100%; border-radius: 18px 18px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
    max-height: calc(var(--vh, 100dvh) - 12px); overflow-y: auto; overscroll-behavior: contain; animation: rise .2s ease-out; transition: bottom .15s ease-out; }
.dlg-actions { flex-direction: column-reverse; }
.dlg-actions .btn { width: 100%; padding: 13px; font-size: 15px; }
.toasts { left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); align-items: stretch; }
.toast { max-width: none; }
}
@keyframes fade { from { opacity: 0; } }

/* --- Retention (views/retention.js, 2026-11-06, game-agnostic): payers against everyone else --- */
.pv { display: flex; flex-direction: column; gap: 10px; }
.pv-row { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: center; }
.pv-day { font-weight: 700; color: var(--text-2); }
.pv-bars { display: flex; flex-direction: column; gap: 4px; }
.pv-bars > div { display: grid; grid-template-columns: 1fr 44px; gap: 8px; align-items: center; }
.pv-bars b { font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.pv-track { height: 8px; border-radius: 99px; background: var(--panel-3); overflow: hidden; display: block; }
.pv-track i { display: block; height: 100%; border-radius: 99px; }
.bad-text { color: var(--red); }

/* Bars without a picture (Retention's lifespans, Monitor's ban reasons), each a tap for its players. */
.rb.noart { grid-template-columns: minmax(0, 1fr) auto; }
.rb.link { cursor: pointer; border-radius: 8px; padding: 2px 4px; margin: -2px -4px; }
.rb.link:hover { background: #ffffff07; }

/* Last seen: a column a bucket, green (today) to red (gone for months), its count over it and its share under it. */
.colbars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; align-items: end; }
.cb { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 2px; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; cursor: pointer; min-width: 0; }
.cb:hover { background: #ffffff07; }
.cb-n { font-size: 12.5px; font-weight: 750; font-variant-numeric: tabular-nums; }
.cb-col { display: flex; align-items: flex-end; width: 100%; max-width: 46px; height: 150px; border-radius: 8px; background: var(--panel-2); overflow: hidden; }
.cb-col i { display: block; width: 100%; border-radius: 8px 8px 0 0; }
.cb-l { font-size: 11px; color: var(--text-2); font-weight: 600; text-align: center; line-height: 1.2; min-height: 2.4em; }
.cb-p { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .colbars { gap: 3px; } .cb-col { height: 120px; } .cb-l { font-size: 10px; } }

.table-scroll { overflow-x: auto; }

/* --- Players → leaderboards: medals for the top three, their rows lit gold, silver and bronze (the Champions dashboard's) --- */
.medal { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 7px; border-radius: 999px; font-size: 12.5px; font-weight: 800;
  font-variant-numeric: tabular-nums; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line-soft); }
.medal.m1 { background: linear-gradient(160deg, #ffe7a0, #e0a91f 60%, #a8740a); color: #2a1d00; border-color: #ffd97888; }
.medal.m2 { background: linear-gradient(160deg, #f4f7fb, #b9c3d2 60%, #7f8ba0); color: #1d2430; border-color: #e6ecf588; }
.medal.m3 { background: linear-gradient(160deg, #f6c39a, #c77a3e 60%, #8a4a1f); color: #2a1306; border-color: #f0b07a88; }
.prow.top1 { background: linear-gradient(90deg, #f2c14e1a, transparent 70%); }
.prow.top2 { background: linear-gradient(90deg, #b9c3d214, transparent 70%); }
.prow.top3 { background: linear-gradient(90deg, #c77a3e14, transparent 70%); }
.prow.top1 .prow-side > b, .prow.top2 .prow-side > b, .prow.top3 .prow-side > b { color: var(--gold); font-weight: 750; }

/* --- The event and season tiles: status and time left, a timeline (the run blue, the reward window gold, a marker for now),
   who's taking part, the rules as chips with their resource's picture --- */
.ev-tile { --tone: var(--muted); display: flex; flex-direction: column; gap: 10px; cursor: pointer; border-top: 3px solid var(--tone);
  background: linear-gradient(180deg, color-mix(in srgb, var(--tone) 10%, transparent), transparent 120px), var(--panel); transition: border-color .15s; }
.ev-tile.ev-live { --tone: var(--green); } .ev-tile.ev-soon { --tone: var(--blue); } .ev-tile.ev-reward { --tone: var(--gold); } .ev-tile.ev-over { --tone: var(--dim); }
.ev-tile:hover { border-color: #f2c14e66; border-top-color: var(--tone); }
.ev-tile.open { border-color: var(--gold); border-top-color: var(--tone); }
.ev-tile.idle { cursor: default; }
.ev-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ev-kind { font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.ev-status { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 750;
  color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); border: 1px solid color-mix(in srgb, var(--tone) 40%, transparent); }
.ev-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ev-status.ev-live i { animation: pulse 1.8s infinite; }
.ev-left { margin-left: auto; font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.ev-title { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.ev-desc { font-size: 13px; color: var(--text-2); line-height: 1.45; }
.ev-empty { color: var(--muted); font-size: 13px; padding: 18px 0 8px; }
.ev-line { position: relative; height: 8px; border-radius: 99px; background: var(--panel-3); overflow: visible; }
.ev-run, .ev-after { position: absolute; top: 0; bottom: 0; }
.ev-run { border-radius: 99px 0 0 99px; background: linear-gradient(90deg, var(--s1), #6fb1ff); }
.ev-after { border-radius: 0 99px 99px 0; background: repeating-linear-gradient(135deg, #f2c14ecc 0 4px, #f2c14e66 4px 8px); }
.ev-now { position: absolute; top: -4px; width: 4px; height: 16px; margin-left: -2px; border-radius: 3px; background: #fff; box-shadow: 0 0 0 2px var(--panel), 0 0 10px #ffffffaa; }
.ev-dates { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.ev-facts { display: flex; gap: 8px; flex-wrap: wrap; }
.ev-fact { display: flex; flex-direction: column; gap: 1px; padding: 8px 12px; border-radius: 10px; background: var(--panel-2); min-width: 92px; }
.ev-fact b { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ev-fact span { font-size: 11px; color: var(--muted); font-weight: 600; }
.ev-fact.bad b { color: var(--red); }
.mod-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mod-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 4px 5px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-soft); font-size: 12px; color: var(--text-2); }
.mod-chip img { width: 18px; height: 18px; image-rendering: pixelated; }
.mod-chip b { color: var(--text); font-variant-numeric: tabular-nums; }
.mod-chip.off { opacity: .45; }

/* --- Drawers (a purchase's: views/purchases.js openPurchase), the Champions dashboard's: from the right on a desktop, from the
   bottom on a phone; a hero card with the net and a stripe of the store's colour, the money as a flow, facts as tiles, what
   happened as a dotted line, the ids folded away --- */
.sheet-back { position: fixed; inset: 0; background: #0009; z-index: 300; animation: fade .15s; }
.sheet { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: var(--panel); border-left: 1px solid var(--line); z-index: 301; overflow-y: auto;
  padding: 18px 18px calc(24px + env(safe-area-inset-bottom)); animation: slide .2s ease-out; box-shadow: -20px 0 50px -20px #000; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
@media (max-width: 860px) {
/* Above the on-screen keyboard too (js/ui.js aboveKeyboard) */
.sheet { top: auto; left: 0; bottom: var(--kb, 0px); width: 100%; max-height: min(88vh, calc(var(--vh, 100dvh) - 12px)); border-left: 0; border-top: 1px solid var(--line);
  border-radius: 18px 18px 0 0; animation: rise .22s ease-out; transition: bottom .15s ease-out; }
  @keyframes rise { from { transform: translateY(40px); opacity: 0; } }
}
.sheet-head { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.sheet-head .t { min-width: 0; }
.sheet-head .t b { display: block; font-size: 17px; }
.sheet-head .t span { color: var(--muted); font-size: 12px; }
.sheet-head .icon-btn { margin-left: auto; }
.sheet .money { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.sheet .money b { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sheet h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 8px; }
.sheet { background: var(--bg); }
.sheet .panel { padding: 14px; margin-bottom: 12px; }
.sheet .panel > h3:first-child { margin: -14px -14px 12px; padding: 10px 14px; }
.sheet-hero { border-top: 3px solid var(--tone); display: flex; flex-direction: column; gap: 12px; }
.sheet-hero .money { margin: 0; }

.sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.sure { align-self: flex-start; font-size: 12.5px; font-weight: 650; padding: 5px 10px; border-radius: 8px; }
.sure.exact { color: var(--green); background: #2fbf7114; border: 1px solid #2fbf7144; }
.sure.est { color: var(--amber); background: #f0a33a14; border: 1px dashed #f0a33a66; }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.flow > i { font-style: normal; color: var(--muted); }
.flow-chip { display: inline-flex; flex-direction: column; padding: 5px 10px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line); line-height: 1.25; }
.flow-chip small { font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.flow-chip b { font-size: 14px; font-variant-numeric: tabular-nums; }
.flow-chip.minus b { color: var(--red); }
.flow-chip.net { border-color: #2fbf7166; background: #2fbf7114; }
.flow-chip.net b { color: var(--green); }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fcell { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); }
.fcell.wide { grid-column: 1 / -1; }
.fcell > span { font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.fcell > b { font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.steps { display: flex; flex-direction: column; }
.step-ev { position: relative; display: flex; gap: 12px; padding-bottom: 14px; }
.step-ev:last-child { padding-bottom: 0; }
.step-ev:not(:last-child)::before { content: ""; position: absolute; left: 5px; top: 18px; bottom: 2px; width: 2px; background: var(--line); }
.step-ev > i { flex: none; width: 12px; height: 12px; margin-top: 4px; border-radius: 50%; background: var(--panel-3); border: 2px solid var(--gold); }
.step-ev.good > i { background: var(--green); border-color: var(--green); }
.step-ev.warn > i { background: var(--amber); border-color: var(--amber); }
.step-ev.bad > i { background: var(--red); border-color: var(--red); }
.step-ev b { font-size: 13.5px; }
.step-ev small { display: block; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.sheet .panel h4 { margin: 16px 0 10px; }
.tech-list { display: flex; flex-direction: column; }
.tech-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.tech-row:first-child { padding-top: 0; }
.tech-row:last-child { border-bottom: 0; padding-bottom: 0; }
.tech-row > span { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.mono-val { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; overflow-wrap: anywhere; min-width: 0; }
.mono-val pre.raw { margin: 0; max-height: 260px; background: var(--chrome); }
/* A copyable id: a chip with a copy mark, the whole chip copies. */
.tech-row .copy { display: inline-flex; align-items: flex-start; gap: 8px; max-width: 100%; padding: 4px 8px; border-radius: 7px; border: 1px solid var(--line);
  background: var(--chrome); word-break: break-all; }
.tech-row .copy::after { content: "⧉"; flex: none; color: var(--gold); }
.tech-row .copy:hover { border-color: var(--gold); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.copy { cursor: pointer; border-bottom: 1px dotted var(--muted); }
.p-art.lg { width: 64px; height: 64px; border-radius: 14px; }
.sheet-player-row { display: flex; align-items: center; gap: 12px; }
.sheet-player-row .who { min-width: 0; flex: 1; }
.sheet-player-row .who b { display: block; font-size: 15px; }
.sheet-player-row .who span { color: var(--muted); font-size: 12.5px; }
.sheet .effect { color: var(--text-2); font-size: 13px; }
.sure.bad { color: var(--red); background: #ff6b6b14; border: 1px solid #ff6b6b44; }

/* --- Filter dropdowns (the Purchases list's type and product), the Champions dashboard's: the phone's own picker styled like
   the switches beside it, gold once set to anything but its first option --- */
.fselect { flex: none; max-width: 100%; height: 36px; padding: 0 30px 0 12px; border-radius: 11px; border: 1px solid var(--line); background-color: var(--panel-2);
  color: var(--text-2); font-weight: 600; font-size: 13px; cursor: pointer; appearance: none; -webkit-appearance: none; outline: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.fselect:hover { border-color: #f2c14e66; }
.fselect.on { border-color: var(--gold); color: var(--gold); background-color: var(--gold-soft); }
@media (max-width: 860px) { .selects { flex: 1 1 100%; flex-wrap: nowrap; } .selects .fselect { flex: 1 1 0; min-width: 0; } }

/* --- Flagged (views/flagged.js): reason and audit-area chips in their group's colour, a flag's full text, the audit's checks
   (suspicious red, warning amber) with what was expected against what the save holds --- */
.rchips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.rchip { --c: var(--muted); display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.rchip.more { --c: var(--muted); }
.flag-reason { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.flag-reason .muted { overflow-wrap: anywhere; }

.audit-vs { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.audit-vs b { color: var(--text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* A modal list (ui.js openListSheet): the page under it stays still; its card fills the sheet's width. */
body.sheet-open { overflow: hidden; }
.sheet .lcard { margin: 0; }
.sheet-head .t span.ls-count { display: block; }

/* --- The drawer's audit (views/incidents.js auditHtml): every area a tile (green passes, amber warns, red suspicious), then
   each failing check as a card — its plain title and meaning, the bound against the save as two bars, how far apart, the raw
   check folded away; a flag's sentence with its numbers in bold --- */
.flag-detail { font-size: 13px; color: var(--text-2); line-height: 1.5; overflow-wrap: anywhere; }
.flag-detail b { color: var(--text); font-variant-numeric: tabular-nums; }
.audit-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 860px) { .audit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.audit-tile { --tone: var(--green); display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); border-top: 3px solid var(--tone); }
.audit-tile.warn { --tone: var(--amber); } .audit-tile.bad { --tone: var(--red); }
.audit-tile b { font-size: 13px; }
.audit-tile span { font-size: 11.5px; font-weight: 650; color: var(--tone); }
.audit-clean { margin-top: 12px; padding: 12px; border-radius: 10px; text-align: center; font-weight: 700; color: var(--green); background: #2fbf7112; border: 1px solid #2fbf7144; }
.audit-card { --tone: var(--red); margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: linear-gradient(90deg, color-mix(in srgb, var(--tone) 10%, transparent), transparent 60%), var(--panel-2);
  border: 1px solid color-mix(in srgb, var(--tone) 35%, transparent); display: flex; flex-direction: column; gap: 6px; }
.audit-card.warning { --tone: var(--amber); }
.ac-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ac-sev { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--tone); }
.ac-title { font-size: 15px; }
.ac-meaning { font-size: 13px; color: var(--text-2); line-height: 1.45; }
.cmp { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; padding: 10px; border-radius: 10px; background: var(--chrome); }
.cmp-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.cmp-row .k { font-size: 11px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cmp-row .bar { height: 10px; border-radius: 99px; background: var(--panel-3); overflow: hidden; }
.cmp-row .bar i { display: block; height: 100%; border-radius: 99px; }
.cmp-row .bar i.bound { background: var(--s1); }
.cmp-row .bar i.val { background: var(--tone); }
.cmp-row b { font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.cmp-diff { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 12px; }
.cmp-diff .d { font-weight: 800; color: var(--tone); }
.ac-raw { font-size: 12px; color: var(--muted); }
.ac-raw summary { cursor: pointer; font-weight: 650; }
.ac-raw > div { margin-top: 4px; overflow-wrap: anywhere; }
.audit-tile.waived { --tone: var(--blue); }
.audit-card.waived { --tone: var(--blue); }
.audit-sub { margin: 16px 0 0; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* --- Tools → Mail (tools/mail.js), the Champions dashboard's: the composer in numbered steps beside a live preview of the letter
   as the game's mailbox shows it, the send bar (fixed over the tab bar on a phone), the sent letters as rows --- */
.composer { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.composer-form { display: flex; flex-direction: column; gap: 4px; padding: 18px; }
.composer-title { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.composer-title img { width: 40px; height: 40px; }
.composer-title h2 { font-size: 17px; font-weight: 800; }
.composer-side { position: sticky; top: 76px; }
.composer-form .lcard-bar, .composer-form .seg { background: var(--panel-2); }
.step { padding: 16px 0 6px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 12px; }
.step:first-of-type { border-top: 0; }
.step-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.step-head h3 { font-size: 14px; color: var(--text); font-weight: 750; }
.step-n { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800;
  background: var(--gold-soft); color: var(--gold); border: 1px solid #f2c14e55; }
.reach { display: flex; flex-direction: column; gap: 2px; }
.reach-count { font-size: 13px; color: var(--text-2); }
.reach-count b { font-size: 20px; color: var(--gold); font-variant-numeric: tabular-nums; margin-right: 2px; }
.reach-inline { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--panel-2); border: 1px solid var(--line-soft); }

.picker { display: flex; flex-direction: column; gap: 8px; }
.search-results { display: flex; flex-direction: column; gap: 4px; }
.search-results:empty { display: none; }
.search-results .result { display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 10px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--panel-2); min-height: 44px; }
.search-results .result:hover:not(:disabled) { border-color: var(--gold); }
.search-results .result:disabled { opacity: .45; }
.search-results .result .muted { margin-left: auto; }
.player-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 4px 4px 4px; border-radius: 999px; background: var(--panel-3); border: 1px solid var(--line); font-weight: 600; font-size: 13px; }
.pchip i { font-style: normal; color: var(--muted); font-size: 11px; }
.pchip button { border: 0; background: var(--panel); width: 24px; height: 24px; border-radius: 50%; color: var(--muted); }
.pchip button:hover { color: var(--red); }
.pchip-face { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none;
  background: linear-gradient(135deg, #2a3d66, #1a2744); color: var(--gold); font-weight: 800; font-size: 12px; }

.ranges { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.range { display: flex; align-items: center; gap: 8px; }
.range .form-label { flex: 1; }

.lang { position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
.lang i { font-style: normal; font-size: 10px; color: var(--amber); text-transform: uppercase; letter-spacing: .04em; }
.lang.done { color: var(--text); }
.lang.done::before { content: "✓"; color: var(--green); font-weight: 800; }
.lang.done i { display: none; }
.lang.on { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
.counter { float: right; text-transform: none; letter-spacing: 0; font-weight: 500; }
.mail-body { resize: vertical; min-height: 120px; line-height: 1.5; font: inherit; }
textarea.field { font: inherit; color: var(--text); }
.rt-tools { display: flex; gap: 6px; flex-wrap: wrap; }

.reward-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.reward-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: var(--radius-sm); border: 1px solid var(--line-soft);
  background: var(--panel-2); font-size: 11px; font-weight: 600; color: var(--text-2); line-height: 1.2; text-align: center; min-height: 78px; }
.reward-tile:hover { border-color: var(--gold); color: var(--text); transform: translateY(-1px); }
.reward-tile .r-icon { width: 36px; height: 36px; }
.r-icon { width: 28px; height: 28px; object-fit: contain; flex: none; }
.picked-rewards { display: flex; flex-direction: column; gap: 6px; }
.picked { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--radius-sm); background: var(--panel-2); border: 1px solid var(--line); flex-wrap: wrap; }
.picked-name { flex: 1; min-width: 100px; font-weight: 650; }
.picked .amount { width: 110px; padding: 8px 10px; }
.picked .seg { flex: 1 1 100%; }
.send-bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: var(--radius); background: var(--panel);
  border: 1px solid #f2c14e33; box-shadow: var(--shadow); position: sticky; bottom: 12px; z-index: 5; }
.send-info { flex: 1; min-width: 0; }
.send-btn { padding: 12px 22px; font-size: 14px; }
/* The letter as the game's mailbox shows it. */
.letter-wrap { display: flex; flex-direction: column; gap: 8px; }
.preview-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.letter { border-radius: 16px; padding: 16px; background: radial-gradient(120% 90% at 50% 0%, #2b3f6e 0%, #16223d 55%, #0f182c 100%);
  border: 2px solid #b48a3c; box-shadow: 0 0 0 1px #000 inset, 0 12px 30px -16px #000; color: #f3ead6; }
.letter-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.letter-seal { width: 32px; height: 32px; border-radius: 8px; }
.letter-title { flex: 1; font-weight: 800; font-size: 16px; color: #ffd978; text-shadow: 0 1px 0 #0008; overflow-wrap: anywhere; }
.letter-exp { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: #0006; color: #e9dcbc; }
.letter-body { font-size: 14px; line-height: 1.5; padding: 10px 12px; border-radius: 10px; background: #0b1222aa; border: 1px solid #ffffff12; min-height: 70px; overflow-wrap: anywhere; }
.letter-rewards { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.letter-reward { width: 62px; height: 66px; border-radius: 10px; background: linear-gradient(#24365c, #17243f); border: 1px solid #b48a3c88;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-weight: 800; font-size: 12px; }
.letter-reward .r-icon { width: 34px; height: 34px; }
.letter-claim { margin: 12px auto 0; width: 60%; text-align: center; padding: 9px; border-radius: 10px; font-weight: 800; color: #1c3a12;
  background: linear-gradient(#8fe36a, #4cae3a); border: 1px solid #2e6d22; box-shadow: 0 2px 0 #1f4b17; }

.dlg .letter { margin: 4px 0 6px; }
/* Sent letters: the seal on each row. */

.mini-rewards { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--text-2); }
.mini-rewards span { display: inline-flex; align-items: center; gap: 3px; }
.mini-rewards .r-icon { width: 18px; height: 18px; }

@media (max-width: 1060px) { .composer { grid-template-columns: minmax(0, 1fr); } .composer-side { position: static; order: 2; } .send-bar { order: 3; }  }
@media (max-width: 860px) {
.composer-form { padding: 14px; }
.kpis.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.send-bar { position: fixed; left: 0; right: 0; bottom: calc(58px + env(safe-area-inset-bottom)); border-radius: 16px 16px 0 0; border-left: 0; border-right: 0;
    padding: 10px 12px; background: rgba(17, 26, 46, .97); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.send-btn { padding: 12px 16px; }
.send-bar.away { display: none; }

.composer { padding-bottom: 72px; }

.reward-grid { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
.picked-name { flex: 1 1 calc(100% - 40px); }
.picked .amount { flex: 1; width: auto; min-width: 90px; }

}
.rt-center { display: block; text-align: center; }
.mail-sent .prow-art img { width: 34px; height: 34px; border-radius: 9px; }
.edit-banner { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: #5aa9ff14; border: 1px solid #5aa9ff44; color: var(--text-2); font-size: 13px; }
.edit-banner .btn { margin-left: auto; }
.prow.idle { opacity: .55; }

/* --- Revenue → Payouts (views/payouts.js, 2026-11-06): the hero (still owed, ring, total bar, a bar per store), owed at each
   month's end as stacked columns, the payouts as dated rows --- */
.po-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 11.5px; color: var(--muted); }
.po-legend span { display: inline-flex; align-items: center; gap: 6px; }
.po-legend i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.panel-head .po-legend { margin-top: 0; }
.po-bar { height: 12px; border-radius: 99px; overflow: hidden; background: repeating-linear-gradient(135deg, #f2c14e55 0 6px, #f2c14e22 6px 12px); }
.po-bar i { display: block; height: 100%; border-radius: 99px; background: var(--tone); }
.po-bar.gold i { background: linear-gradient(90deg, var(--s3), var(--green)); }
.po-hero { display: grid; gap: 16px; padding: 18px; border-color: #f2c14e44;
  background: radial-gradient(120% 140% at 0% 0%, #f2c14e1c, transparent 55%), var(--panel); }
.po-hero.clear { border-color: #2fbf7144; background: radial-gradient(120% 140% at 0% 0%, #2fbf711c, transparent 55%), var(--panel); }
.poh-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.poh-owed { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.poh-k { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.poh-owed > b { font-size: 38px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; color: var(--gold); font-variant-numeric: tabular-nums; }
.po-hero.clear .poh-owed > b { color: var(--green); }
.po-hero.short .poh-owed > b { color: var(--muted); }
.poh-why { font-size: 12px; color: var(--muted); }
.poh-ends .poh-gone, .poh-ends .poh-gone b { color: var(--muted); opacity: .75; }
.poh-ring { width: 72px; height: 72px; flex: none; }
.poh-ring circle { fill: none; stroke-width: 7; }
.poh-ring .bg { stroke: #f2c14e33; }
.poh-ring .fg { stroke: var(--green); stroke-linecap: round; }
.poh-ring text { fill: var(--text); font-size: 14px; font-weight: 800; text-anchor: middle; font-family: inherit; }
.poh-total { display: grid; gap: 7px; }
.poh-total .po-bar { height: 14px; }
.poh-ends { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.poh-ends span { display: inline-flex; align-items: center; gap: 5px; }
.poh-ends b { color: var(--text); font-variant-numeric: tabular-nums; }
.poh-ends .k-paid { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.poh-stores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.poh-store { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: #00000026; border: 1px solid var(--line-soft); min-width: 0; }
.poh-srow { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.poh-srow b { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.poh-srow b.owe { color: var(--gold); } .poh-srow b.clear { color: var(--green); font-size: 13.5px; }
.poh-store .po-bar { height: 8px; }
.poh-last { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.poh-last svg { width: 13px; height: 13px; flex: none; }
.poh-last b { color: var(--text-2); font-variant-numeric: tabular-nums; }
.po-months { margin-top: 14px; }
.po-cols .cb { cursor: default; }
.po-cols .cb-col { flex-direction: column; justify-content: flex-end; max-width: 52px; }
.po-cols .cb-col i { border-radius: 0; flex: none; }
.po-cols .cb-col i:first-child { border-radius: 8px 8px 0 0; }
.po-coin { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: #1a1405; background: var(--gold); font-style: normal; }
.po-coin svg { width: 11px; height: 11px; }
.po-coin.none { visibility: hidden; }
.po-legend .po-coin { width: 15px; height: 15px; } .po-legend .po-coin svg { width: 9px; height: 9px; }
.po-rows { display: flex; flex-direction: column; }
.po-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.po-row:last-child { border-bottom: 0; }
.po-row:hover { background: #ffffff05; }
.po-day { flex: none; width: 46px; padding: 5px 0 4px; border-radius: 10px; text-align: center; background: var(--panel-2); box-shadow: inset 0 3px 0 var(--tone); }
.po-day b { display: block; font-size: 18px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.po-day span { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.po-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.po-main b { font-size: 16px; font-weight: 750; font-variant-numeric: tabular-nums; }
.po-row.adj .po-main b { color: var(--red); }
.po-main span { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.po-main span i { width: 7px; height: 7px; border-radius: 50%; background: var(--tone); flex: none; }
.po-cols .cb.tap { cursor: pointer; }
.po-cols .cb.tap:hover { background: #ffffff07; }
/* A month's drawer: the bridge (start, + earned, − paid, = end) on one scale, each store's flow */
.bridge { display: grid; gap: 10px; margin-top: 4px; }
.bridge-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) 62px; gap: 10px; align-items: center; }
.br-k { font-size: 12px; font-weight: 650; color: var(--text-2); }
.br-track { position: relative; height: 18px; border-radius: 6px; background: #ffffff07; }
.br-bar { position: absolute; top: 0; bottom: 0; display: flex; gap: 2px; border-radius: 6px; overflow: hidden; min-width: 3px; }
.br-bar i { display: block; height: 100%; }
.br-v { text-align: right; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.bridge-row.earn .br-v { color: var(--green); }
.bridge-row.paid .br-bar { opacity: .55; background: repeating-linear-gradient(135deg, #ffffff33 0 4px, transparent 4px 8px); }
.bridge-row.paid .br-v { color: var(--red); }
.bridge-row.end { padding-top: 10px; border-top: 1px dashed var(--line); }
.bridge-row.end .br-k, .bridge-row.end .br-v { color: var(--gold); font-weight: 800; }
.om-stores { display: grid; gap: 8px; }
.om-store { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); box-shadow: inset 3px 0 0 var(--tone); flex-wrap: wrap; }
.om-flow { display: flex; align-items: baseline; gap: 8px; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); }
.om-flow em { font-style: normal; font-weight: 700; } .om-flow .up { color: var(--green); } .om-flow .down { color: var(--red); }
.om-flow b { color: var(--gold); font-size: 15px; }
.delta.warnish { color: var(--amber); background: #f0a33a1a; }
.sheet-rows .po-row { padding-left: 0; padding-right: 0; }
@media (max-width: 860px) {
  .bridge-row { grid-template-columns: 78px minmax(0, 1fr) 54px; gap: 8px; }
  .br-k { font-size: 11px; }
}
@media (max-width: 860px) {
  .po-hero { padding: 16px; gap: 14px; }
  .poh-owed > b { font-size: 32px; }
  .poh-ring { width: 62px; height: 62px; }
  .poh-stores { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .po-months .panel-head { flex-wrap: wrap; }
  .po-months .panel-head .po-legend { margin-left: 0; width: 100%; }
  .po-cols .cb-n { font-size: 10.5px; }
  .po-row { padding: 10px 12px; }
}
.kpi-pill.gold { border-color: #f2c14e55; background: var(--gold-soft); } .kpi-pill.gold b { color: var(--gold); }
.prow.toned { box-shadow: inset 3px 0 0 var(--tone); }

/* --- Game tuning, sealed inside the Minimum build popup (views/overview.js tuningHtml): a dashed strip with a lock until
   unlocked, then four tiles with steppers; a changed one glows gold with what it was --- */
.tuning { border-radius: 12px; border: 1px dashed var(--line); background: var(--panel-2); overflow: hidden; transition: border-color .2s; }
.tuning.open { border-style: solid; border-color: #f2c14e55; }
.tune-seal { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; background: none; color: var(--text); text-align: left; cursor: pointer; }
.tune-seal:hover .tune-cta { border-color: var(--gold); color: var(--gold); }
.tune-lock { font-size: 18px; transition: transform .3s; }
.tuning.open .tune-lock { transform: rotate(-20deg) scale(.9); filter: grayscale(1); opacity: .5; }
.tune-what { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tune-what b { font-size: 14px; }
.tune-what span { font-size: 12px; color: var(--muted); }
.tune-cta { flex: none; font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); }
.tuning.open .tune-cta { display: none; }
.tuning.open .tune-seal { cursor: default; pointer-events: none; padding-bottom: 6px; }
.tune-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.tune-body > * { overflow: hidden; }
.tuning.open .tune-body { grid-template-rows: 1fr; }
.tune-body > div:first-child { min-height: 0; }
.tune-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 4px 12px 0; }
.tune-tile { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line-soft); transition: border-color .15s, box-shadow .15s; }
.tune-tile.changed { border-color: var(--gold); box-shadow: 0 0 0 3px #f2c14e1f; }
.tune-top { display: flex; gap: 8px; align-items: flex-start; }
.tune-top img { width: 26px; height: 26px; image-rendering: pixelated; flex: none; }
.tune-top b { display: block; font-size: 12.5px; }
.tune-top small { display: block; font-size: 11px; color: var(--muted); line-height: 1.3; }
.tune-step { display: grid; grid-template-columns: 32px minmax(0, 1fr) 32px; gap: 4px; }
.tune-step button { height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-size: 16px; font-weight: 700; }
.tune-step button:hover { border-color: var(--gold); color: var(--gold); }
.tune-step input { min-width: 0; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); text-align: center; font-weight: 700; font-size: 14px !important; outline: none; }
.tune-step input:focus { border-color: var(--gold); }
.tune-foot { display: flex; justify-content: space-between; font-size: 11px; }
.tune-was { color: var(--gold); font-weight: 700; }
.tune-sum { margin: 10px 12px 12px; font-size: 12px; color: var(--muted); }
.tune-sum.on { color: var(--gold); font-weight: 650; }
.tuning:not(.open) .tune-sum { display: none; }
@media (max-width: 420px) { .tune-grid { grid-template-columns: minmax(0, 1fr); } }

/* --- The Add payout popup (tools/payouts.js): store tiles with what each still owes, a big € amount, quick chips, what is
   still owed after it --- */
.po-form { display: flex; flex-direction: column; gap: 12px; }
.po-picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.po-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2);
  color: var(--text); text-align: left; cursor: pointer; border-top: 3px solid transparent; transition: border-color .15s, box-shadow .15s; }
.po-pick:hover { border-color: #f2c14e66; }
.po-pick.on { border-color: var(--tone); border-top-color: var(--tone); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone) 22%, transparent); }
.po-owed { font-size: 12px; color: var(--muted); }
.po-owed b { color: var(--text); font-variant-numeric: tabular-nums; }
.po-type { align-self: flex-start; }
.po-amount { display: flex; align-items: center; gap: 6px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); }
.po-amount:focus-within { border-color: var(--gold); }
.po-amount span { font-size: 22px; font-weight: 800; color: var(--muted); }
.po-amount input { flex: 1; min-width: 0; height: 54px; border: 0; background: none; color: var(--text); font-size: 26px !important; font-weight: 800; outline: none; font-variant-numeric: tabular-nums; }
.po-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.po-quick:empty { display: none; }
.po-after { padding: 10px 12px; border-radius: 10px; background: var(--chrome); font-size: 13px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.po-after b { font-variant-numeric: tabular-nums; }
.po-arrow { color: var(--muted); }
/* Chips one tap away (quick fills, a picked filter), the Champions dashboard's. */
.fchip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.fchip:hover { border-color: #f2c14e66; color: var(--text); }
.fchip.on { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }

/* --- Tools → Configs (tools/configs.js): cards for when, theme, rewards, rules, missions and shop; a timeline with its status;
   templates as pickable cards; rank tiers with currency icons; rows that open to edit with on/off switches; the save bar that
   floats in once anything changed --- */
.cfg-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cfg-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-left: 4px; vertical-align: middle; }
.cfg-card { margin-bottom: 14px; }
.cfg-card > div[id^="cfg-"] { display: flex; flex-direction: column; gap: 14px; }
.cfg-row { display: flex; flex-wrap: wrap; gap: 14px 24px; }
.cfg-in.bad { border-color: var(--red); }
.cfg-step { display: grid; grid-template-columns: 36px minmax(70px, 120px) 36px; gap: 4px; }
.cfg-step button { height: 38px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-size: 17px; font-weight: 700; cursor: pointer; }
.cfg-step button:hover { border-color: var(--gold); color: var(--gold); }
.cfg-step .field { text-align: center; font-weight: 700; padding: 8px 6px; }
.cfg-timeline { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: var(--chrome); }
.cfg-tl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.cfg-moments { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.cfg-moments .po-quick { margin-top: 6px; }
.cfg-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.cfg-theme { display: flex; flex-direction: column; gap: 8px; text-align: left; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); cursor: pointer;
  transition: border-color .15s, box-shadow .15s; }
.cfg-theme:hover { border-color: #f2c14e66; }
.cfg-theme.on { border-color: var(--gold); box-shadow: 0 0 0 3px #f2c14e1f; background: linear-gradient(#f2c14e0d, transparent 80px), var(--panel-2); }
.cfg-theme-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cfg-theme-top b { font-size: 15px; }
.cfg-theme-desc { font-size: 12.5px; color: var(--text-2); line-height: 1.45; }
.cfg-notes { display: flex; flex-wrap: wrap; gap: 6px; }
.cfg-notes span { font-size: 12px; font-weight: 650; color: var(--amber); padding: 4px 10px; border-radius: 999px; background: #f0a33a12; border: 1px solid #f0a33a44; }
.cfg-tiers { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.cfg-tier { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line-soft); }
.cfg-tier.m1 { background: linear-gradient(90deg, #f2c14e14, transparent 70%), var(--panel-2); }
.cfg-tier.m2 { background: linear-gradient(90deg, #b9c3d212, transparent 70%), var(--panel-2); }
.cfg-tier.m3 { background: linear-gradient(90deg, #c77a3e12, transparent 70%), var(--panel-2); }
.cfg-tier-head { display: flex; align-items: center; gap: 8px; }
.cfg-tier-head .medal { min-width: 46px; }
.cfg-range { display: flex; align-items: center; gap: 6px; flex: 1; font-size: 12px; color: var(--muted); }
.cfg-range .field { width: 76px; padding: 7px 8px; text-align: center; font-weight: 700; }
.cfg-amounts { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.cfg-amount { display: grid; grid-template-columns: 22px auto; grid-template-rows: auto auto; column-gap: 6px; align-items: center; padding: 6px 8px; border-radius: 9px; background: var(--panel); border: 1px solid var(--line-soft); }
.cfg-amount img { width: 22px; height: 22px; image-rendering: pixelated; grid-row: span 2; }
.cfg-amount span { font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cfg-amount .field { padding: 4px 6px; border: 0; background: none; font-weight: 750; font-size: 15px; }
.cfg-amount:focus-within { border-color: var(--gold); }
.cfg-add { padding: 12px; border-radius: 12px; border: 1px dashed var(--line); background: none; color: var(--text-2); font-weight: 650; cursor: pointer; min-height: 60px; }
.cfg-add:hover { border-color: var(--gold); color: var(--gold); }
.cfg-rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.cfg-rule { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); border-top: 3px solid var(--line); }
.cfg-rule.tier-0, .cfg-thresholds .tier-0 .field { border-top-color: #c77a3e; } .cfg-rule.tier-1 { border-top-color: #b9c3d2; } .cfg-rule.tier-2 { border-top-color: #e0a91f; }
.cfg-list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.cfg-rows { display: flex; flex-direction: column; border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; }
.cfg-item { border-bottom: 1px solid var(--line-soft); }
.cfg-item:last-child { border-bottom: 0; }
.cfg-item.off .cfg-item-main, .cfg-item.off .cfg-tierchips { opacity: .5; }
.cfg-item.open { background: #ffffff04; }
.cfg-item-head { display: flex; align-items: center; gap: 12px; padding: 10px 12px; cursor: pointer; }
.cfg-item-head:hover { background: #ffffff06; }
.cfg-item-head .arrow { color: var(--muted); transition: transform .15s; }
.cfg-item.open .cfg-item-head .arrow { transform: rotate(180deg); }
.cfg-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cfg-item-main b { font-size: 14px; }
.cfg-item-main span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfg-tierchips { display: flex; gap: 4px; }
.cfg-tierchips span { font-size: 11px; font-weight: 750; padding: 2px 7px; border-radius: 999px; font-variant-numeric: tabular-nums; background: var(--panel-2); border: 1px solid var(--line); }
.cfg-tierchips .tier-0 { color: #e8a26a; } .cfg-tierchips .tier-1 { color: #d4dbe6; } .cfg-tierchips .tier-2 { color: #f2c14e; }
.cfg-item-body { display: flex; flex-direction: column; gap: 10px; padding: 4px 12px 14px 60px; }
.cfg-pair { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; }
.cfg-thresholds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cfg-thresholds .field { border-top-width: 3px; }
.cfg-thresholds .tier-1 .field { border-top-color: #b9c3d2; } .cfg-thresholds .tier-2 .field { border-top-color: #e0a91f; }
.cfg-medal { width: 26px; height: 26px; image-rendering: pixelated; }
.cfg-price { display: flex; flex-direction: column; align-items: flex-end; }
.cfg-price b { font-size: 15px; color: var(--gold); font-variant-numeric: tabular-nums; }
.cfg-price span { font-size: 11px; color: var(--muted); }
.switch { position: relative; flex: none; width: 40px; height: 24px; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--panel-3); border: 1px solid var(--line); transition: background .15s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.switch input:checked + i { background: #2fbf7144; border-color: var(--green); }
.switch input:checked + i::after { transform: translateX(16px); background: var(--green); }
.cfg-bar { margin-top: 14px; }
.cfg-bar .send-info b { color: var(--gold); }
@media (max-width: 860px) {
.cfg-pair, .cfg-thresholds { grid-template-columns: minmax(0, 1fr); }
.cfg-item-body { padding-left: 12px; }
.cfg-tierchips { display: none; }
.cfg-tiers { grid-template-columns: minmax(0, 1fr); }
.cfg-bar { position: fixed; left: 0; right: 0; bottom: calc(58px + env(safe-area-inset-bottom)); margin: 0; border-radius: 16px 16px 0 0; z-index: 140; }
}
/* "hidden" always hides, whatever display a class gives (the save bars, a switch that steps aside). */
[hidden] { display: none !important; }

/* --- Tools → Jobs (tools/jobs.js): a card per job — what it does, a three-step strip of how, when to run it, its last run —
   and its drawer: the phase and a progress bar while it runs, the figures as tiles, the summary in sentences, what it changed --- */
.job-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
@media (max-width: 860px) { .job-cards { grid-template-columns: minmax(0, 1fr); } }
.job-card { display: flex; flex-direction: column; gap: 12px; border-top: 3px solid var(--tone); }
.job-head { display: flex; gap: 12px; align-items: flex-start; }
.job-head h3 { font-size: 16px; margin: 0 0 4px; }
.job-head p { font-size: 13px; color: var(--text-2); line-height: 1.45; margin: 0; }
.job-icon { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--tone);
  background: color-mix(in srgb, var(--tone) 16%, transparent); border: 1px solid color-mix(in srgb, var(--tone) 40%, transparent); }
.job-head p { font-size: 13px; color: var(--muted); }
.job-flow { display: flex; align-items: flex-start; gap: 4px; padding: 12px 6px; border-radius: 12px; background: var(--panel-2); }
.job-node { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.job-node span { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--tone);
  background: color-mix(in srgb, var(--tone) 16%, transparent); border: 1px solid color-mix(in srgb, var(--tone) 40%, transparent); }
.job-node b { font-size: 11.5px; line-height: 1.25; color: var(--text-2); }
.job-arrow { flex: none; width: 18px; height: 2px; margin-top: 17px; background: color-mix(in srgb, var(--tone) 55%, transparent); position: relative; }
.job-arrow::after { content: ""; position: absolute; right: -1px; top: -3px; border: 4px solid transparent; border-left: 5px solid color-mix(in srgb, var(--tone) 80%, transparent); border-right: 0; }
.job-when { display: flex; flex-wrap: wrap; gap: 6px; }
.job-when span { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; background: var(--chrome); color: var(--text-2); font-size: 11.5px; font-weight: 600; }
.job-when svg { color: var(--muted); }
.job-last { display: flex; flex-direction: column; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--chrome); font-size: 12.5px; }
.job-last-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.job-last-head b { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-last .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.job-last .dot.good { background: var(--green); } .job-last .dot.bad { background: var(--red); }
.job-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.job-stats span { display: flex; flex-direction: column; padding: 6px 8px; border-radius: 8px; background: var(--panel); font-size: 11px; color: var(--muted); font-weight: 600; }
.job-stats b { font-size: 17px; color: var(--text); font-weight: 800; font-variant-numeric: tabular-nums; }
.job-mini { height: 6px; border-radius: 99px; background: var(--panel-3); overflow: hidden; }
.job-mini i { display: block; height: 100%; background: var(--green); transition: width .4s; }
.job-actions { display: flex; gap: 8px; margin-top: auto; }
.job-hero { display: flex; flex-direction: column; gap: 10px; }
.job-phase { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.job-phase b { font-size: 16px; }
.job-bar { height: 12px; border-radius: 99px; background: var(--panel-3); overflow: hidden; position: relative; }
.job-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--tone), color-mix(in srgb, var(--tone) 60%, #fff)); transition: width .5s ease; }
.job-bar.busy i { position: absolute; animation: jobbusy 1.4s ease-in-out infinite; }
@keyframes jobbusy { 0% { left: -30%; } 100% { left: 100%; } }
.job-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.job-tile { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); }
.job-tile b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.job-tile span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.job-feed { display: flex; flex-direction: column; max-height: 420px; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.job-ev { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.job-ev:last-child { border-bottom: 0; }
.job-ev .badge { flex: none; }
.job-ev-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.job-ev-main a, .job-ev-main b { font-weight: 700; font-size: 13.5px; color: var(--text); }
.job-ev-main a:hover { color: var(--gold); }
.job-ev-main span { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }

/* --- A finished job (tools/jobs.js): a verdict, then a row per number that matters; the run popup's choice cards --- */
.job-verdict { display: flex; align-items: center; gap: 14px; }
.job-verdict-icon { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: var(--tone);
  background: color-mix(in srgb, var(--tone) 16%, transparent); border: 2px solid color-mix(in srgb, var(--tone) 50%, transparent); }
.job-verdict div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.job-verdict b { font-size: 18px; color: var(--tone); }
.job-verdict span { font-size: 12px; color: var(--muted); }
.job-note { display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.4; color: var(--text-2); }
.job-note svg { flex: none; margin-top: 1px; }
.job-note.warn { background: #f0a33a14; border: 1px solid #f0a33a44; } .job-note.warn svg, .job-note.warn b { color: var(--amber); }
.job-note.bad { background: #ff6b6b14; border: 1px solid #ff6b6b44; } .job-note.bad svg { color: var(--red); }
.job-rows { display: flex; flex-direction: column; }
.job-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.job-row-icon { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); }
.job-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.job-row-main > div { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.job-row-main b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.job-row-main > div span { font-size: 13px; color: var(--text-2); font-weight: 600; }
.job-row-main small { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.job-dot { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.job-dot i { width: 7px; height: 7px; border-radius: 50%; background: var(--tone); }
.job-split { display: flex; gap: 2px; height: 7px; border-radius: 99px; overflow: hidden; background: var(--panel-3); }
.job-split i { display: block; min-width: 3px; }
.run-form { display: flex; flex-direction: column; gap: 12px; }
.run-choices { display: grid; gap: 8px; }
.run-choices.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 480px) { .run-choices.two { grid-template-columns: minmax(0, 1fr); } }
.run-choice { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; border-radius: 12px; text-align: left;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text); transition: border-color .15s, box-shadow .15s; }
.run-choices.two .run-choice { cursor: pointer; }
.run-choices.two .run-choice:hover { border-color: color-mix(in srgb, var(--tone) 60%, transparent); }
.run-choice.on, .run-choices:not(.two) .run-choice { border-color: var(--tone); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone) 22%, transparent); }
.run-choice-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--tone); background: color-mix(in srgb, var(--tone) 16%, transparent); }
.run-choice b { font-size: 14px; }
.run-choice b em { font-style: normal; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 99px; margin-left: 4px; color: var(--green); background: #2fbf7118; vertical-align: 2px; }
.run-choice > span:last-of-type { font-size: 12px; color: var(--muted); line-height: 1.4; }
.run-radio { position: absolute; top: 14px; right: 14px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); }
.run-choice.on .run-radio { border-color: var(--tone); background: radial-gradient(circle, var(--tone) 0 4px, transparent 5px); }
.run-range { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 12px; background: var(--chrome); }
.run-dates { display: flex; align-items: flex-end; gap: 8px; }
.run-dates label { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.run-dates .job-arrow { margin: 0 0 17px; }
.run-will { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.run-will svg { flex: none; color: var(--green); }
.run-last { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.dlg:has(.run-form) { width: min(540px, calc(100vw - 32px)); }

/* --- A player's profile (player.html + js/player.js): the hero card, the sticky chip tabs, cards of editable tiles, item
   grids, drawers' forms and the save bar. Phone first: one column, two-up tiles, thumb-size targets. --- */
.badge.pink { border-color: #d5518155; color: var(--s5); background: #d5518112; }
.badge.cyan { border-color: #22c8d055; color: #3ad4dc; background: #22c8d012; }
.pp-back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.pp-back:hover { color: var(--gold); }
.pp-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); min-width: 0; }
.pp-stat b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-stat span { font-size: 11.5px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-stat.tap { cursor: pointer; } .pp-stat.tap:hover { background: var(--panel-3); }
/* The hero (2026-11-06): avatar with the standing as a badge, name + flag, one quiet line, icon actions; a tint only when
   something is wrong */
.ph { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px 16px; align-items: center; padding: 16px 18px; }
.ph.amber, .ph.red { border-color: color-mix(in srgb, var(--tone) 40%, var(--line-soft));
  background: radial-gradient(120% 160% at 0% 0%, color-mix(in srgb, var(--tone) 14%, transparent), transparent 55%), var(--panel); }
.ph-face { position: relative; display: flex; padding: 0; border: 0; background: none; }
.ph-face .pavatar { width: 60px; height: 60px; padding: 3px; }
.ph-face .pavatar .face { font-size: 24px; font-weight: 800; }
.ph-mark { position: absolute; left: -3px; bottom: -3px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--tone);
  color: #0b1222; font-size: 13px; font-weight: 900; border: 2px solid var(--panel); }
.ph-main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ph-main h1 { font-size: 24px; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-flag { margin-left: 8px; font-size: 21px; font-weight: 400; }
.ph-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; font-size: 12.5px; color: var(--muted); }
.ph-kind { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.ph-kind::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--registered); }
.ph-kind.guest::before { background: var(--guest); }
.ph-state { font-weight: 800; color: var(--tone); text-transform: uppercase; letter-spacing: .05em; font-size: 11.5px; }
.ph-acts { display: flex; gap: 6px; }
.ph-mail { color: #1a1405; background: var(--gold); border-color: var(--gold); }
.ph-mail:hover { background: var(--gold-2); color: #1a1405; }
.ph-sources { grid-column: 1 / -1; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); justify-self: start; min-width: 280px; }
.ph-sources button { padding: 5px 12px; font-size: 12.5px; }
@media (max-width: 640px) {
  /* Phone: one row, the three icon buttons stay small at the right (a full-width bar with one icon looked empty) */
  .ph { grid-template-columns: auto minmax(0, 1fr) auto; padding: 12px; gap: 10px; }
  .ph-face .pavatar { width: 48px; height: 48px; }
  .ph-main h1 { font-size: 19px; }
  .ph-meta { gap: 4px 10px; font-size: 12px; }
  .ph-acts { gap: 4px; align-self: start; }
  .ph-acts .icon-btn { min-width: 32px; width: 32px; height: 32px; padding: 0; }
  .ph-sources { justify-self: stretch; min-width: 0; }
}

/* The profile's sections use Monitor's icon bar (.mon-tabs); a little room above it under the hero */

.pp-dot { background: var(--amber); } .pp-dot.red { background: #c62828; }
.pp-tab { display: flex; flex-direction: column; gap: 14px; }
.pp-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.pp-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (max-width: 1000px) { .pp-cols { grid-template-columns: minmax(0, 1fr); } }
.pp-card { display: flex; flex-direction: column; gap: 12px; }
.pp-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pp-card-head h3 { margin: 0; font-size: 15px; }
.pp-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-card-actions .btn { display: inline-flex; align-items: center; gap: 6px; }
.pp-empty { color: var(--muted); padding: 18px; text-align: center; border: 1px dashed var(--line); border-radius: 12px; font-size: 13px; }
.pp-sub { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 4px 0 -4px; }
.pp-note-line { margin: -4px 0 0; }
.px { image-rendering: pixelated; }
/* A game with painted art (api/brand's pixelArt false): every picture scaled smooth, the pixelated rules and inline styles too */
.smooth-art img, .smooth-art image, .smooth-art .px { image-rendering: auto !important; }
.pp-ico { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }

/* Editable values: a tile with an icon, the value, its label and a pen; gold when waiting to be saved */
.pp-vals { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pp-vals.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pp-coins { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
@media (max-width: 480px) { .pp-vals, .pp-coins { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pp-val { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-soft); background: var(--panel-2);
  color: var(--text); text-align: left; min-width: 0; transition: border-color .15s, background .15s; }
.pp-val:hover { border-color: color-mix(in srgb, var(--tone) 55%, transparent); }
.pp-val-icon { flex: none; width: 30px; height: 30px; display: grid; place-items: center; }
.pp-val-icon img { width: 26px; height: 26px; object-fit: contain; }
.pp-val-icon svg { color: var(--tone); }
.pp-val-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.pp-val-main > b { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-val-main > span { font-size: 11px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-val-main > small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-pen { position: absolute; top: 7px; right: 8px; color: var(--dim); opacity: .7; display: flex; }
.pp-val:hover .pp-pen, .pp-special:hover .pp-pen { color: var(--gold); opacity: 1; }
.pp-val.edited, .pp-special.edited, .pp-ach.edited, .pp-world.edited, .pp-switch-row.edited{ border-color: var(--gold); background: color-mix(in srgb, var(--gold) 9%, var(--panel-2)); box-shadow: 0 0 0 2px #f2c14e33; }
.pp-val.edited > .pp-val-main > small, .pp-val.edited > .pp-val-main > b { color: var(--gold); }
.pp-medal { font-size: 22px; line-height: 1; }

/* Switches */
.pp-switches { display: flex; flex-direction: column; gap: 8px; }
.pp-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-soft); background: var(--panel-2); color: var(--text); text-align: left; width: 100%; cursor: pointer; }
.pp-switch-row > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pp-switch-row b { font-size: 13.5px; } .pp-switch-row small { font-size: 11.5px; color: var(--muted); }
.pp-switch { flex: none; position: relative; width: 42px; height: 24px; border-radius: 99px; background: var(--panel-3); transition: background .15s; }
.pp-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #c8d0e0; transition: transform .15s; }
.pp-switch.on { background: var(--green); } .pp-switch.on::after { transform: translateX(18px); background: #fff; }
.pp-switch.sm { width: 32px; height: 18px; } .pp-switch.sm::after { width: 12px; height: 12px; } .pp-switch.sm.on::after { transform: translateX(14px); }
.pp-check { width: 22px; height: 22px; accent-color: var(--green); flex: none; }

/* Integrity */
.pp-integrity { border-top: 3px solid var(--tone, var(--line)); }
.pp-int { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: color-mix(in srgb, var(--tone) 10%, var(--panel-2)); border: 1px solid color-mix(in srgb, var(--tone) 35%, transparent); }
.pp-int > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pp-int b { font-size: 16px; color: var(--tone); } .pp-int span { font-size: 12.5px; color: var(--text-2); }
.pp-int-icon { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--tone); background: color-mix(in srgb, var(--tone) 18%, transparent); }
.pp-int-icon.sm { width: 36px; height: 36px; }
.pp-reasons { display: flex; flex-direction: column; gap: 6px; }
.pp-reasons .btn { align-self: flex-start; }
.pp-wl { display: flex; flex-direction: column; gap: 6px; }
.pp-wl > div { display: flex; flex-wrap: wrap; gap: 5px; }

/* Progress: the world track */
.pp-track { display: flex; align-items: center; padding: 4px 2px; }
.pp-track > i { flex: 1; height: 2px; background: var(--line); min-width: 4px; }
.pp-node { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 800; background: var(--panel-2); color: var(--muted); border: 2px solid var(--line); }
.pp-node.done { background: color-mix(in srgb, var(--gold) 22%, var(--panel-2)); color: var(--gold); border-color: #f2c14e66; }
.pp-node.now { background: var(--gold); color: #1a1405; border-color: var(--gold); box-shadow: 0 0 0 4px #f2c14e2e; }
.pp-node:last-child { width: auto; padding: 0 7px; border-radius: 99px; }
@media (max-width: 420px) { .pp-node { width: 24px; height: 24px; font-size: 10.5px; } }

/* Rows, devices, timeline */
.pp-rows { display: flex; flex-direction: column; margin: 0 -16px; border-top: 1px solid var(--line-soft); }
.sheet .pp-rows { margin: 0 -14px -14px; }
.pp-rows .prow { padding-left: 16px; padding-right: 16px; color: var(--text); }
.pp-more { align-self: flex-start; }
.pp-devices { display: flex; flex-direction: column; gap: 8px; }
.pp-device { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); }
.pp-device-icon { flex: none; color: var(--tone); padding-top: 2px; }
.pp-device-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pp-device-main b { font-size: 14px; } .pp-device-main > span { font-size: 12px; color: var(--text-2); }
.pp-device-facts { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11.5px; color: var(--muted); }
.pp-device-facts .copy { font-size: 11px; }
.pp-timeline { display: flex; flex-direction: column; }
.pp-tl { position: relative; display: flex; gap: 12px; padding: 0 0 14px 2px; }
.pp-tl:last-child { padding-bottom: 0; }
.pp-tl > i { flex: none; width: 12px; height: 12px; margin-top: 3px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone) 22%, transparent); }
.pp-tl:not(:last-child)::before { content: ""; position: absolute; left: 7px; top: 18px; bottom: 0; width: 2px; background: var(--line-soft); }
.pp-tl > div { display: flex; flex-direction: column; gap: 1px; } .pp-tl b { font-size: 13.5px; } .pp-tl span { font-size: 12px; color: var(--muted); }

/* Purchases: money, passes, item grids */
.pp-money { display: flex; flex-direction: column; gap: 12px; border-top: 3px solid var(--s3); }
.pp-money-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pp-money-top > div { display: flex; flex-direction: column; gap: 2px; }
.pp-money-top b { font-size: 32px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.pp-storefront { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; background: var(--panel-2); font-size: 12.5px; font-weight: 650; color: var(--purple); }
.pp-split { display: flex; gap: 2px; height: 10px; border-radius: 99px; overflow: hidden; background: var(--panel-3); }
.pp-split.tall { height: 14px; }
.pp-split i { display: block; min-width: 3px; }
.pp-split-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); }
.pp-split-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pp-split-legend i { width: 8px; height: 8px; border-radius: 50%; }
.pp-split-legend b { color: var(--text); font-variant-numeric: tabular-nums; }
.pp-money-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-chip { display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 10px; border-radius: 99px; background: var(--panel-2); font-size: 12px; color: var(--muted); }
.pp-chip b { color: var(--text); font-variant-numeric: tabular-nums; }
.pp-chip.bad b { color: var(--red); } .pp-chip.purple b { color: var(--purple); } .pp-chip.blue b { color: var(--blue); }
.pp-chip.good b { color: var(--green); } .pp-chip.gold b { color: var(--gold); } .pp-chip.warn b { color: var(--amber); }
/* The money panel's foot: how much is exact, when the stores were last asked, and the button that asks them */
.pp-reconcile { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.pp-reconcile b { color: var(--text); }
.pp-passes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.pp-pass { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-soft); background: var(--panel-2); color: var(--text); text-align: left; min-width: 0; }
.pp-pass:hover { border-color: #f2c14e66; }
.pp-pass.on { border-color: #2fbf7155; background: color-mix(in srgb, var(--green) 7%, var(--panel-2)); }
.pp-pass img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.pp-pass-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; } .pp-pass-main b { font-size: 14px; } .pp-pass-main span { font-size: 12px; color: var(--muted); }
.pp-pass-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; } .pp-pass-side small { font-size: 11px; color: var(--muted); }
.pp-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
@media (max-width: 480px) { .pp-items { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; } }
.pp-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 10px; border-radius: 12px; border: 1px solid var(--line-soft); background: var(--panel-2);
  color: var(--text); text-align: center; min-width: 0; transition: border-color .15s, transform .1s; }
button.pp-item:hover { border-color: #f2c14e66; }
button.pp-item:active { transform: scale(.97); }
.pp-item.on { border-color: #f2c14e88; background: color-mix(in srgb, var(--gold) 8%, var(--panel-2)); }
.pp-item > b { font-size: 12.5px; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-eff { font-size: 10.5px; color: var(--muted); line-height: 1.25; max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.pp-item .badge { font-size: 10px; padding: 1px 6px; }
.pp-art { position: relative; width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; background: radial-gradient(circle at 50% 35%, #2a3b63, #172238 70%); }
.pp-art > img:first-child { width: 82%; height: 82%; object-fit: contain; image-rendering: pixelated; }
.pp-art em { position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 99px; background: var(--gold); color: #1a1405; white-space: nowrap; }
.pp-art em.bad { background: var(--red); color: #fff; }
.pp-mini-badge { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; object-fit: contain; }
.pp-stars { font-size: 11px; color: var(--gold); font-weight: 700; }
.pp-item.add { border-style: dashed; color: var(--muted); }
.pp-item.add .pp-art { background: var(--panel); color: var(--gold); }
.pp-item.refunded { opacity: .8; } .pp-item.refunded .pp-art > img:first-child { filter: grayscale(.7); }
.pp-item.refunded .btn { margin-top: 2px; }
.pp-items.pick { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.pp-tab > h2.pp-section { margin: 10px 0 -2px; }
.pp-tab .lcard-bar .muted { margin-left: auto; }
.lcard .pp-feed { border: 0; border-radius: 0; box-shadow: none; }
.pp-feed .feed-row { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.pp-feed .feed-row .who-col { display: none; }
@media (max-width: 480px) { .pp-feed .feed-row { grid-template-columns: auto minmax(0, 1fr) auto; } .pp-feed .feed-row .st { display: none; } }

/* Drawer actions and forms */
.pp-acts { display: flex; flex-direction: column; gap: 8px; }
.pp-act { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line-soft); background: var(--panel-2); color: var(--text); text-align: left; }
.pp-act:hover { border-color: #f2c14e66; }
.pp-act b { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; } .pp-act span { font-size: 12px; color: var(--muted); }
.pp-act.danger b { color: var(--red); } .pp-act.danger:hover { border-color: #ff6b6b66; }
.pp-num { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--panel-3); font-weight: 800; font-size: 13px; color: var(--gold); }
.pp-num.lg { width: 48px; height: 48px; font-size: 18px; border-radius: 12px; flex: none; }
.pp-form { display: flex; flex-direction: column; gap: 12px; }
.pp-field { display: flex; flex-direction: column; gap: 5px; }
.pp-field > span { font-size: 11.5px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; display: flex; align-items: center; }
.pp-field .field, .pp-date { width: 100%; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 15px; }
.pp-date { height: 34px; font-size: 13px; padding: 0 8px; }
.pp-pair { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 8px; }
.pp-stepper { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 6px; }
.pp-stepper button { height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--gold); font-size: 20px; font-weight: 700; }
.pp-stepper button:active { background: var(--panel-3); }
.pp-stepper .field { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.pp-tierpick { display: grid; grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); text-align: left; }
.pp-tierpick > img, .pp-tierpick > .pp-tier-basic { grid-row: span 2; width: 36px; height: 36px; object-fit: contain; }
.pp-tierpick small { color: var(--muted); font-size: 11.5px; }
.pp-tiers { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; max-height: 52vh; overflow-y: auto; margin: 4px 0 8px; }
.pp-tier { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: 10px; border: 1px solid var(--line-soft); background: var(--panel-2); color: var(--text-2); font-size: 11px; font-weight: 650; }
.pp-tier img { width: 34px; height: 34px; object-fit: contain; }
.pp-tier.on { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, var(--panel-2)); color: var(--gold); box-shadow: 0 0 0 2px #f2c14e33; }
.pp-tier-basic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-3); color: var(--muted); font-weight: 800; font-size: 13px; }
.pp-sheet-save { position: sticky; bottom: 0; justify-content: space-between; padding: 12px 0 calc(4px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); }
.pp-sheet-save .btn { display: inline-flex; align-items: center; gap: 6px; min-width: 110px; justify-content: center; padding: 11px 18px; }
.pp-sheet-save .btn.primary { margin-left: auto; }
.pp-preview { padding: 10px 12px; border-radius: 10px; background: var(--chrome); font-size: 13px; color: var(--muted); margin-top: 4px; }
.pp-preview b { color: var(--gold); font-size: 16px; margin-left: 4px; }
.pp-note { width: 100%; min-height: 120px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; resize: vertical; }
.pp-temp { padding: 14px; border-radius: 12px; background: var(--chrome); text-align: center; margin: 4px 0 8px; }
.pp-temp .copy { font-size: 20px; font-weight: 800; color: var(--gold); }

/* Team */
.pp-herocard { display: flex; align-items: center; gap: 16px; border-top: 3px solid var(--gold); }
.pp-hero-art { position: relative; flex: none; width: 96px; height: 96px; border-radius: 18px; display: grid; place-items: center; background: radial-gradient(circle at 50% 35%, #2a3b63, #172238 70%); }
.pp-hero-art > img:first-child { width: 84%; height: 84%; object-fit: contain; image-rendering: pixelated; }
.pp-hero-badge { position: absolute; right: -8px; bottom: -8px; width: 38px; height: 38px; object-fit: contain; }
.pp-hero-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 480px) { .pp-herocard { flex-direction: column; align-items: stretch; } .pp-hero-art { align-self: center; } }
.pp-lineup { display: flex; gap: 8px; overflow-x: auto; padding: 6px 2px 4px; scrollbar-width: thin; }
.pp-slot { position: relative; flex: none; width: 92px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 6px 8px; border-radius: 12px; border: 1px solid #f2c14e55; background: color-mix(in srgb, var(--gold) 6%, var(--panel-2)); color: var(--text); }
.pp-slot > img.px { width: 48px; height: 48px; object-fit: contain; }
.pp-slot .pp-mini-badge { top: 4px; right: 4px; width: 20px; height: 20px; }
.pp-slot b { font-size: 12.5px; } .pp-slot span:last-child { font-size: 11px; color: var(--muted); }
.pp-slot-no { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); width: 20px; height: 20px; border-radius: 50%; background: var(--gold); color: #1a1405; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.pp-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.pp-preset { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line-soft); }
.pp-preset.on { border-color: #f2c14e66; }
.pp-preset > span { font-size: 12px; font-weight: 700; color: var(--text-2); }
.pp-preset > div { display: flex; gap: 4px; flex-wrap: wrap; } .pp-preset img { width: 32px; height: 32px; object-fit: contain; border-radius: 8px; background: var(--panel); }
.pp-feats { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.pp-feat { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 10px; align-items: center; padding: 10px; border-radius: 12px; background: var(--panel-2); }
.pp-feat img { grid-row: span 2; width: 40px; height: 40px; object-fit: contain; }
.pp-feat b { font-size: 17px; font-variant-numeric: tabular-nums; } .pp-feat span { font-size: 11.5px; color: var(--muted); }

/* Items: gear */
.pp-gears { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.pp-gear { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--line-soft); background: var(--panel-2); color: var(--text); text-align: left; }
.pp-gear:hover { border-color: #f2c14e66; } .pp-gear.on { border-color: #f2c14e88; }
.pp-gear.add { flex-direction: row; align-items: center; justify-content: center; border-style: dashed; color: var(--muted); min-height: 90px; }
.pp-gear.add svg { color: var(--gold); }
.pp-gear-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .pp-gear-head b { font-size: 14px; } .pp-gear-head .muted { margin-left: auto; }
.pp-gear-slots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.pp-gear-slots > span { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.pp-gear-slots img { width: 28px; height: 28px; object-fit: contain; }
.pp-gear-slots b { font-size: 12px; font-variant-numeric: tabular-nums; }
/* Gear enchants: a summary strip, a chip per piece (effect icon ringed in its rarity, stars under it), the drawer's piece rows */
.pp-ench-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.pp-ench-stats .pp-stat b small { font-size: 12px; color: var(--muted); font-weight: 700; }
@media (max-width: 560px) { .pp-ench-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pp-ench { position: relative; width: 34px; height: 34px; margin-top: 4px; border-radius: 10px; display: grid; place-items: center; background: radial-gradient(circle at 50% 35%, #2a3b63, #172238 70%); box-shadow: inset 0 0 0 2px var(--rar); }
.pp-ench img, .pp-gear-slots .pp-ench img { width: 22px; height: 22px; object-fit: contain; image-rendering: pixelated; }
.pp-piece-ench .pp-ench { width: 40px; height: 40px; } .pp-piece-ench .pp-ench img { width: 28px; height: 28px; }
.pp-ench em { position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 9.5px; font-weight: 800; padding: 0 4px; border-radius: 99px; background: var(--rar); color: #12141c; white-space: nowrap; }
.pp-ench.empty { box-shadow: none; border: 1px dashed var(--line-soft); background: none; }
.pp-ench.off { opacity: .45; filter: grayscale(.6); }
.pp-ench-dot { position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px var(--panel-2); }
.pp-gear-slots > span { padding-bottom: 6px; }
.pp-set-ability { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 12px; border-radius: 12px; background: var(--panel-2); font-size: 13px; }
.pp-set-ability img { width: 26px; height: 26px; image-rendering: pixelated; }
.pp-pieces { display: flex; flex-direction: column; gap: 8px; }
.pp-piece { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 12px; background: var(--panel-2); }
.pp-piece-top { display: flex; align-items: center; gap: 8px; }
.pp-piece-top .pp-ico { width: 26px; height: 26px; margin: 0; }
.pp-piece-name { display: flex; flex-direction: column; min-width: 0; flex: 1; } .pp-piece-name b { font-size: 13.5px; } .pp-piece-name span { font-size: 11.5px; color: var(--muted); }
.pp-piece-lvl { width: 64px; text-align: center; }
.pp-piece-ench { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px 10px; border-radius: 10px; border: 1px solid var(--line-soft); background: var(--panel); color: var(--text); text-align: left; cursor: pointer; }
.pp-piece-ench:hover { border-color: var(--rar, #f2c14e66); }
.pp-piece-ench.empty { border-style: dashed; color: var(--muted); } .pp-piece-ench.empty svg { color: var(--gold); }
.pp-piece-ench .pp-ench { margin-top: 0; flex: none; }
.pp-piece-ench-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pp-piece-ench-main b { font-size: 13px; } .pp-piece-ench-main b em { font-style: normal; color: var(--rar, var(--gold)); }
.pp-piece-ench-main > span { font-size: 11.5px; color: var(--muted); } .pp-piece-ench-main i { font-style: normal; font-weight: 700; }
.pp-ench-pending { color: var(--gold) !important; font-weight: 600; }
.pp-piece-ench.off .pp-piece-ench-main { opacity: .6; }
.pp-ench-remove { width: 100%; justify-content: center; margin-top: 4px; }

/* Bars, pips, rings */
.pp-bar { display: block; width: 100%; height: 6px; border-radius: 99px; background: var(--panel-3); overflow: hidden; }
.pp-bar i { display: block; height: 100%; border-radius: 99px; background: var(--gold); }
.pp-pips { display: inline-flex; gap: 3px; flex-wrap: wrap; }
.pp-pips i { width: 12px; height: 12px; border-radius: 4px; background: var(--panel-3); border: 1px solid var(--line); }
.pp-pips i.on { background: var(--gold); border-color: var(--gold); }
.pp-ring { width: 46px; height: 46px; flex: none; }
.pp-ring circle { fill: none; stroke: var(--panel-3); stroke-width: 4; }
.pp-ring circle.on { stroke: var(--green); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }
.pp-ring text { fill: var(--text); font-size: 10px; font-weight: 800; text-anchor: middle; }

/* Quests */
.pp-dailies { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.pp-daily { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; border: 1px solid var(--line-soft); background: var(--panel-2); color: var(--text); text-align: left; }
.pp-daily:hover { border-color: #f2c14e66; } .pp-daily.done { border-color: #2fbf7144; }
.pp-daily-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; } .pp-daily-top b { font-size: 13.5px; }
.pp-daily-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.pp-reward { display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); font-weight: 650; } .pp-reward img { width: 16px; height: 16px; }
.pp-worlds { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
@media (max-width: 480px) { .pp-worlds { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pp-world { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 12px; border: 1px solid var(--line-soft); background: var(--panel-2); color: var(--text); }
.pp-world:hover { border-color: #f2c14e66; } .pp-world b { font-size: 12.5px; } .pp-world span { font-size: 11px; color: var(--muted); }
.pp-world.full .pp-ring circle.on { stroke: var(--gold); }
.pp-qlist { display: flex; flex-direction: column; gap: 6px; }
.pp-achs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.pp-ach { display: flex; flex-direction: column; gap: 7px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-soft); background: var(--panel-2); color: var(--text); text-align: left; }
.pp-ach:hover { border-color: #f2c14e66; }
.pp-ach > span { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; } .pp-ach b { font-size: 13px; } .pp-ach small { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pp-ach.full small { color: var(--gold); font-weight: 700; }
.pp-tuts { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-tut { padding: 6px 11px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); font-size: 12.5px; font-weight: 600; }
.pp-tut.done { border-color: #2fbf7155; color: var(--green); background: #2fbf7110; }
.pp-tut.edited { border-color: var(--gold); box-shadow: 0 0 0 2px #f2c14e33; }

/* Shop, specials, Void, masteries, Trials */
.pp-shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pp-shopitem { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); }
.pp-shopitem img { grid-row: span 3; width: 26px; height: 26px; }
.pp-shopitem b { font-size: 16px; font-variant-numeric: tabular-nums; } .pp-shopitem span { font-size: 12.5px; font-weight: 650; } .pp-shopitem small { font-size: 11px; color: var(--muted); }
.pp-shopitem:not(:has(img)) { grid-template-columns: minmax(0, 1fr); }
.pp-specials { display: flex; flex-direction: column; gap: 8px; }
.pp-special { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 34px 11px 12px; border-radius: 12px; border: 1px solid var(--line-soft); background: var(--panel-2); color: var(--text); text-align: left; }
.pp-special > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .pp-special b { font-size: 13.5px; } .pp-special small { font-size: 11.5px; color: var(--muted); }
.pp-special .pp-bar { width: 90px; flex: none; }
.pp-special .pp-pen { top: 50%; transform: translateY(-50%); }
.pp-void { display: flex; flex-direction: column; gap: 12px; border-top: 3px solid var(--purple); }
.pp-void-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pp-void-top > div, .pp-trials > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); min-width: 0; }
.pp-void-top b, .pp-trials b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-void-next { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 12px; background: color-mix(in srgb, var(--purple) 10%, var(--panel-2)); border: 1px solid #a78bfa44; }
.pp-void-next b { font-size: 22px; color: var(--purple); font-variant-numeric: tabular-nums; }
.pp-void-split { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted); } .pp-void-split b { color: var(--text); }
@media (max-width: 480px) { .pp-void-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pp-void-top > div:last-child { grid-column: 1 / -1; } }
.pp-upgrades { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.pp-upgrade { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 10px; row-gap: 6px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); }
.pp-upgrade img { width: 26px; height: 26px; object-fit: contain; }
.pp-upgrade > span { display: flex; flex-direction: column; gap: 1px; min-width: 0; } .pp-upgrade b { font-size: 13px; } .pp-upgrade small { font-size: 11.5px; color: var(--muted); }
.pp-upgrade .pp-bar { grid-column: 1 / -1; }
.pp-upgrade.full small { color: var(--gold); }
.pp-tree-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 760px) { .pp-tree-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; } .pp-tree-tile { flex-direction: column; text-align: center; padding: 10px 6px; gap: 6px; } .pp-tree-tile span { display: none; } .pp-tree-tile > img { width: 34px; height: 34px; } }
.pp-tree-tile { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line-soft); color: var(--text); text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.pp-tree-tile:hover { border-color: color-mix(in srgb, var(--tone) 55%, transparent); }
.pp-tree-tile.on { background: color-mix(in srgb, var(--tone) 12%, var(--panel)); border-color: var(--tone); box-shadow: 0 0 0 2px color-mix(in srgb, var(--tone) 30%, transparent); }
.pp-tree-tile.edited::after { content: "●"; color: var(--gold); margin-left: auto; font-size: 12px; }
.pp-tree-tile > img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.pp-tree-tile > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pp-tree-tile b { font-size: 16px; color: var(--tone); } .pp-tree-tile span { font-size: 12px; color: var(--muted); }
.pp-trials { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 10px; align-items: stretch; border-top: 3px solid var(--gold); }
.pp-trials .btn { align-self: center; display: inline-flex; align-items: center; gap: 6px; }
.pp-trials b.gold { color: var(--gold); } .pp-trials b.good { color: var(--green); } .pp-trials b.muted { color: var(--muted); }
@media (max-width: 640px) { .pp-trials { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pp-trials .btn { grid-column: 1 / -1; justify-content: center; } }
.pp-missions { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.pp-mission { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line-soft); }
.pp-mission.full { border-color: #f2c14e55; }
.pp-mission-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .pp-mission-top b { font-size: 13px; }
.pp-mission-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pp-mission-foot .gold { color: var(--gold); font-weight: 650; }
.pp-settings { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
.pp-setting { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); font-size: 12.5px; }

/* The save bar: floating at the bottom (above the phone's nav) while changes wait */
.pp-save { position: fixed; left: 0; right: 0; bottom: 16px; z-index: 200; display: flex; justify-content: center; padding: 0 12px; pointer-events: none; animation: ppRise .2s ease; }
.pp-save-in { pointer-events: auto; display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 16px; background: rgba(21, 33, 58, .96); border: 1px solid #f2c14e88; box-shadow: 0 12px 40px -8px #000c, 0 0 0 4px #f2c14e1f;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); max-width: 100%; }
.pp-save-count { display: flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--text-2); padding: 0 8px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pp-save-count b { min-width: 26px; height: 26px; padding: 0 7px; border-radius: 99px; background: var(--gold); color: #1a1405; display: grid; place-items: center; font-weight: 800; }
.pp-save-in .btn { padding: 9px 16px; }
@keyframes ppRise { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 860px) { .pp-save { bottom: calc(68px + env(safe-area-inset-bottom)); } .pp-save-in { width: 100%; } .pp-save-count { flex: 1; } }
body.pp-saving .page { padding-bottom: 120px; }
@media (max-width: 860px) { body.pp-saving .page { padding-bottom: calc(150px + env(safe-area-inset-bottom)); } }
.pp-chgs { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; margin: 4px 0 10px; }
.pp-chg { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: baseline; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); font-size: 13px; }
.pp-chg span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pp-chg s { color: var(--muted); } .pp-chg b { color: var(--gold); }
.pp-page .loading { min-height: 40vh; }

/* The mastery board: the game's tree on a dark board, nodes placed as in the game, lines behind them, the detail under it */
.pp-mpanel { display: flex; flex-direction: column; gap: 12px; border-top: 3px solid var(--tone); }
.pp-mhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pp-mtitle { font-size: 15px; font-weight: 750; color: var(--tone); }
.pp-tomes { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; background: #c0392b26; border: 1px solid #e0605066; font-weight: 800; font-variant-numeric: tabular-nums; }
.pp-tomes img { width: 18px; height: 18px; } .pp-tomes small { color: var(--muted); font-weight: 600; font-size: 11px; }
.pp-mboard { position: relative; width: 100%; max-width: 760px; margin: 0 auto; aspect-ratio: 820 / 548; padding: 0; border-radius: 14px; background: #2b3346; border: 3px solid #3d4760; box-shadow: inset 0 0 0 3px #232a3a, inset 0 4px 18px #0006; }
.pp-mlines { position: absolute; inset: 0; width: 100%; height: 100%; }
.pp-mlines polyline { fill: none; stroke: #16181f; stroke-width: 7; stroke-linecap: square; vector-effect: non-scaling-stroke; }
.pp-mnode { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6% 4% 0; border-radius: 10%; background: #56607a; border: 3px solid #6b7593; box-shadow: inset 0 0 0 2px #3f4860, 0 3px 0 #1c2130;
  color: var(--text); overflow: visible; transition: transform .1s, border-color .15s; }
.pp-mnode:hover { border-color: #9aa6c6; } .pp-mnode:active { transform: scale(.96); }
.pp-mnode > img { width: 68%; height: 62%; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 2px 0 #0005); }
.pp-mnode:not(.has) > img { filter: grayscale(.35) brightness(.85); }
.pp-mnode-lv { position: absolute; left: 6%; right: 6%; bottom: 6%; padding: 1px 0; border-radius: 4px; background: #1f2433d9; font-size: clamp(9px, 1.6vw, 13px); font-weight: 800; text-align: center; white-space: nowrap; color: #e8ecf4; }
.pp-mnode-lv i { font-style: normal; color: var(--green); margin-left: 3px; }
.pp-mnode em { position: absolute; top: 4%; left: 0; right: 0; text-align: center; font-style: normal; font-size: clamp(9px, 1.5vw, 12px); font-weight: 800; color: #5dff7a; text-shadow: 0 1px 0 #000; }
.pp-mnode.maxed { border-color: #5dff7a88; }
.pp-mnode.has:not(.maxed) { border-color: #4f9cf0; box-shadow: inset 0 0 0 2px #3f4860, 0 3px 0 #1c2130, 0 0 0 2px #4f9cf033; }
.pp-mnode.edited { border-color: var(--gold); box-shadow: inset 0 0 0 2px #3f4860, 0 0 0 3px #f2c14e55; }
.pp-mnode.sel { border-color: #fff; box-shadow: inset 0 0 0 2px #3f4860, 0 0 0 4px color-mix(in srgb, var(--tone) 70%, transparent); z-index: 2; }
.pp-mnode.none { opacity: .45; }
@media (max-width: 480px) { .pp-mboard { border-width: 2px; } .pp-mnode { border-width: 2px; } .pp-mlines polyline { stroke-width: 4; } }
.pp-mdetail { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line-soft); }
.pp-mdetail.empty { justify-content: center; color: #e8b27a; font-weight: 650; font-size: 13px; border-left-width: 1px; min-height: 74px; }
.pp-mdetail > img { width: 56px; height: 56px; object-fit: contain; flex: none; }
.pp-mdetail-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pp-mdetail-main > b { font-size: 16px; } .pp-mdetail-main > span { font-size: 12.5px; color: var(--text-2); }
.pp-mdetail-lv { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 12px; color: var(--muted); }
.pp-mdetail-lv b { font-size: 18px; color: var(--text); font-variant-numeric: tabular-nums; }
.pp-mdetail-lv .good { color: var(--green); } .pp-mdetail-lv .gold { color: var(--gold); }
.pp-mdetail .btn { display: inline-flex; align-items: center; gap: 6px; flex: none; }
@media (max-width: 560px) { .pp-mdetail { flex-wrap: wrap; } .pp-mdetail .btn { width: 100%; justify-content: center; } }

/* The audit drawer's way to the full audit page */
.pp-audit-link { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 12px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line-soft); color: var(--text); }
.pp-audit-link:hover { border-color: #f2c14e88; }
.pp-audit-link > svg { color: var(--gold); flex: none; }
.pp-audit-link span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; } .pp-audit-link b { font-size: 14px; } .pp-audit-link small { font-size: 12px; color: var(--muted); }
.pp-audit-link i { font-style: normal; color: var(--gold); font-weight: 800; }

/* --- The audit page (audit.html + js/audit.js): the hero with its ring of checks, a tile per area, the area's check cards and
   passing rows, the in-and-out bars and the ranked sources and sinks. --- */
.au-kicker { font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; color: var(--gold); }
/* Audit's hero: the profile's (.ph) with the verdict at the right and the states bar under it */
.au-verdict { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.au-verdict b { font-size: 18px; font-weight: 800; color: var(--tone); }
.au-verdict span { font-size: 12px; color: var(--muted); }
.au-states { grid-column: 1 / -1; display: grid; gap: 8px; }
.au-sbar { display: flex; gap: 3px; height: 12px; border-radius: 99px; overflow: hidden; background: var(--panel-3); }
.au-sbar i { display: block; min-width: 4px; }
.au-slegend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted); }
.au-slegend span { display: inline-flex; align-items: center; gap: 6px; }
.au-slegend i { width: 8px; height: 8px; border-radius: 50%; background: var(--tone); }
.au-slegend b { color: var(--text); font-variant-numeric: tabular-nums; }
.au-flag { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 12px; background: #ff6b6b10; border: 1px solid #ff6b6b44; }
.au-flag > b { color: var(--red); font-size: 13.5px; }
@media (max-width: 640px) { .au-verdict { grid-column: 1 / -1; flex-direction: row; align-items: baseline; justify-content: space-between; } }

/* The areas: a sticky strip, all nine in a row on a wide screen, swiped on a phone */
.au-areas { position: sticky; top: calc(55px + env(safe-area-inset-top)); z-index: 80; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px;
  margin: 14px 0; padding: 6px; border-radius: 14px; background: var(--chrome); border: 1px solid var(--line-soft); }
@media (max-width: 980px) { .au-areas { display: flex; overflow-x: auto; scrollbar-width: none; margin: 12px -12px; border-radius: 0; border-left: 0; border-right: 0; padding: 6px 12px; }
  .au-areas::-webkit-scrollbar { display: none; } .au-areas .au-area { flex: 0 0 84px; } }
.au-area { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px 10px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line-soft); border-top: 3px solid var(--tone); color: var(--text); text-align: center; transition: background .15s, border-color .15s; }
.au-area:hover { background: var(--panel-2); }
.au-area img { width: 28px; height: 28px; object-fit: contain; }
.au-area b { font-size: 13px; } .au-area span { font-size: 11px; color: var(--tone); font-weight: 700; white-space: nowrap; }
.au-area.on { background: color-mix(in srgb, var(--tone) 12%, var(--panel)); border-color: var(--tone); box-shadow: 0 0 0 2px color-mix(in srgb, var(--tone) 30%, transparent); }
.au-area.edited::after { content: ""; position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
@media (max-width: 480px) { .au-area { padding: 9px 4px 8px; } .au-area img { width: 24px; height: 24px; } .au-area span { font-size: 10px; } }

.au-body { display: flex; flex-direction: column; gap: 14px; }
.au-cards { display: flex; flex-direction: column; gap: 10px; }
.au-cards .audit-card { margin: 0; }
.au-wl { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.au-passes { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 6px; }
@media (max-width: 480px) { .au-passes { grid-template-columns: minmax(0, 1fr); } }
.au-pass { border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line-soft); }
.au-pass summary { list-style: none; display: grid; grid-template-columns: 22px minmax(0, 1fr) 70px 28px; align-items: center; gap: 10px; padding: 8px 10px; cursor: pointer; }
.au-pass summary::-webkit-details-marker { display: none; }
.au-pass summary > i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #2fbf7120; color: var(--green); font-style: normal; font-weight: 800; font-size: 12px; }
.au-pass-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.au-pass-main b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .au-pass-main small { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-mini { height: 6px; border-radius: 99px; background: var(--panel-3); overflow: hidden; } .au-mini i { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.au-wl-mini { min-width: 28px; height: 28px; padding: 0; color: var(--muted); opacity: .6; } .au-wl-mini:hover { opacity: 1; color: var(--blue); }
.au-pass[open] summary { border-bottom: 1px solid var(--line-soft); }
.au-pass-more { padding: 10px 12px; font-size: 12.5px; color: var(--text-2); display: flex; flex-direction: column; gap: 8px; }

.au-flow { display: flex; flex-direction: column; gap: 10px; border-top: 3px solid var(--tone); }
.au-flow .pp-card-head h3, .pp-card-head h3 .au-ico { display: inline-flex; align-items: center; gap: 8px; }
.au-ico { width: 20px; height: 20px; object-fit: contain; vertical-align: -4px; margin-right: 6px; }
.au-flow-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.au-flow-row > span:first-child { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.au-flow-bar { height: 14px; border-radius: 99px; background: var(--panel-3); overflow: hidden; } .au-flow-bar i { display: block; height: 100%; border-radius: 99px; transition: width .4s; }
.au-flow-row > b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 80px; text-align: right; }
@media (max-width: 480px) { .au-flow-row { grid-template-columns: 70px minmax(0, 1fr) auto; gap: 8px; } .au-flow-row > b { min-width: 0; font-size: 13px; } }
.au-over { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: #ff6b6b14; border: 1px solid #ff6b6b44; color: var(--text-2); font-size: 12.5px; }
.au-over svg { color: var(--red); flex: none; } .au-over b { color: var(--red); }
.au-total { font-size: 15px; font-weight: 800; color: var(--tone, var(--text)); font-variant-numeric: tabular-nums; }
.au-rank { display: flex; flex-direction: column; gap: 6px; }
.au-rank-row { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid transparent; color: var(--text); text-align: left; width: 100%; }
.au-rank-row.tap { cursor: pointer; border-color: var(--line-soft); } .au-rank-row.tap:hover { border-color: #f2c14e66; }
.au-rank-row.edited { border-color: var(--gold); box-shadow: 0 0 0 2px #f2c14e33; }
.au-rank-top { display: flex; align-items: center; gap: 8px; padding-right: 18px; } .au-rank-top b { font-size: 13px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-rank-top em { font-style: normal; font-size: 13.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.au-rank-top .pp-pen { top: 9px; right: 8px; }
.au-rank-bar { height: 6px; border-radius: 99px; background: var(--panel-3); overflow: hidden; } .au-rank-bar i { display: block; height: 100%; border-radius: 99px; }
.au-rank-row small { font-size: 11px; }
.au-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
@media (max-width: 480px) { .au-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.au-tile { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line-soft); color: var(--text); text-align: left; min-width: 0; }
.au-tile.tap { cursor: pointer; } .au-tile.tap:hover { border-color: #f2c14e66; }
.au-tile.edited { border-color: var(--gold); box-shadow: 0 0 0 2px #f2c14e33; }
.au-tile b { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.au-tile span { font-size: 11.5px; color: var(--muted); font-weight: 650; } .au-tile small { font-size: 11px; color: var(--muted); }
.au-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; }
.au-legend > div { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; align-items: baseline; gap: 8px; padding: 7px 10px; border-radius: 10px; background: var(--panel-2); font-size: 12.5px; }
.au-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--tone); align-self: center; }
.au-legend b { font-variant-numeric: tabular-nums; } .au-legend small { color: var(--muted); font-size: 11px; }
.au-wipes { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.au-wipe { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 6px; border-radius: 12px; background: var(--panel-2); text-align: center; }
.au-wipe img { width: 24px; height: 24px; } .au-wipe b { font-size: 14px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; } .au-wipe span { font-size: 11px; color: var(--muted); }

/* Temple tab + Rune pouches on the profile */
.pp-rune-ico { width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; }
.pp-rune-art { width: 34px; height: 34px; object-fit: contain; }
.pp-rune-amt { color: #c79bff; }
.pp-temple-path { margin-top: 12px; }
.pp-temple-path h4 { margin: 0 0 8px; font-size: 13px; color: var(--tone); text-transform: uppercase; letter-spacing: .06em; }
.pp-altar.off .pp-art > img:first-child { filter: grayscale(.85) brightness(.55); }
.pp-altar.sanct .pp-art { box-shadow: inset 0 0 0 2px #b77cff88; }
.pp-altar .pp-art em { background: var(--tone, var(--gold)); }

/* ── Purchases → Needs a look (as Champions'): setup warnings, issue chips that open their list, all clear ── */
.alerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.note-box { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--radius-sm); background: #5aa9ff10; border: 1px solid #5aa9ff40; color: var(--text-2); font-size: 13px; }
.note-box b { color: var(--blue); }
.issues { display: flex; flex-wrap: wrap; gap: 8px; }
.issue { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text-2); font-size: 13px; cursor: pointer; }
.issue:disabled { cursor: default; opacity: .6; }
.issue b { font-variant-numeric: tabular-nums; }
.issue.bad { border-color: #ff6b6b55; background: #ff6b6b10; }
.issue.bad b { color: var(--red); }
.issue.warn { border-color: #f0a33a55; background: #f0a33a10; }
.issue.warn b { color: var(--amber); }
.issue.plain b { color: var(--text); }
.all-clear { display: inline-flex; align-items: center; gap: 8px; color: var(--green); font-weight: 600; font-size: 13px; padding: 9px 12px; border-radius: 10px;
  border: 1px solid #2fbf7140; background: #2fbf710d; }
.issues-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ── Reconcile report (player page): net before → after, how exact before → after, what happened as filter tiles, then
   each purchase before → after ── */
.pp-reconcile a { cursor: pointer; color: var(--blue); }
.rc-hero { display: flex; flex-direction: column; gap: 12px; }
.rc-money { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.rc-money > div { display: flex; flex-direction: column; gap: 2px; }
.rc-money small { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
.rc-money b { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.rc-money b.muted { color: var(--text-2); font-size: 20px; }
.rc-money > i { color: var(--muted); font-style: normal; font-size: 20px; padding-bottom: 4px; }
.rc-delta { margin-left: auto; align-self: center; padding: 4px 10px; border-radius: 99px; background: var(--panel-2); font-size: 12.5px; font-weight: 700; color: var(--muted); }
.rc-delta.up { color: var(--green); background: #2fbf7118; } .rc-delta.down { color: var(--red); background: #ff6b6b18; }
.rc-sure { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 4px 10px; font-size: 12px; color: var(--muted); }
.rc-sure b { color: var(--text); font-variant-numeric: tabular-nums; }
.rc-sure small { grid-column: 2 / 4; margin-top: -2px; }
.rc-bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--panel-2); }
.rc-bar i.exact { background: var(--green); }
.rc-bar i.est { background: repeating-linear-gradient(135deg, #f0a33a55 0 4px, #f0a33a22 4px 8px); }
.rc-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.rc-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 10px; border-radius: var(--radius-sm); border: 1px solid var(--line-soft);
  background: var(--panel-2); color: var(--muted); font: inherit; font-size: 11.5px; text-align: left; cursor: pointer; min-width: 0; }
.rc-tile i { font-style: normal; font-size: 13px; opacity: .8; }
.rc-tile b { font-size: 18px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.rc-tile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.rc-tile.good b, .rc-tile.good i { color: var(--green); } .rc-tile.gold b, .rc-tile.gold i { color: var(--gold); }
.rc-tile.bad b, .rc-tile.bad i { color: var(--red); } .rc-tile.warn b, .rc-tile.warn i { color: var(--amber); }
.rc-tile.none { opacity: .45; cursor: default; }
.rc-tile:not(.none):hover { border-color: var(--line); }
.rc-meta { margin-top: -2px; }
.rc-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.rc-filter { padding: 5px 11px; border-radius: 99px; border: 1px solid var(--line-soft); background: transparent; color: var(--text-2); font: inherit; font-size: 12.5px; cursor: pointer; }
.rc-filter b { color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 2px; }
.rc-filter.on { background: var(--panel-3); border-color: var(--line); color: var(--text); }
.rc-filter.on b { color: var(--text); }
.rc-filter.gold.on { border-color: var(--gold); } .rc-filter.red.on { border-color: var(--red); } .rc-filter.amber.on { border-color: var(--amber); } .rc-filter.green.on { border-color: var(--green); }
.rc-row .prow-sub .badge { font-size: 10.5px; }
.rc-arrow { font-style: normal; color: var(--muted); margin: 0 3px; }
.rc-row s { color: var(--dim); }
.rc-verdict { margin-top: 3px; font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.rc-verdict i { font-style: normal; font-weight: 800; width: 16px; height: 16px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 10px; background: var(--panel-3); color: var(--text-2); }
.rc-verdict.good i { background: #2fbf7126; color: var(--green); } .rc-verdict.bad i { background: #ff6b6b26; color: var(--red); }
.rc-verdict.warn i { background: #f0a33a26; color: var(--amber); } .rc-verdict.cyan i { background: #5aa9ff26; color: var(--blue); }
.rc-nets small { font-size: 11px; }

/* ── Exact vs estimated (as Champions'): the stores' own figures green, the estimate striped amber ── */
.certainty { width: 100%; display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.cbar { display: flex; height: 6px; border-radius: 99px; overflow: hidden; background: var(--panel-3); }
.cbar i { display: block; height: 100%; transition: width .4s ease; }
.cbar i.exact { background: linear-gradient(90deg, var(--s3), #3fd39b); }
.cbar i.est { background: repeating-linear-gradient(135deg, #f0a33acc 0 4px, #f0a33a66 4px 8px); }
.clabels { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.clabels b { font-weight: 700; font-variant-numeric: tabular-nums; }
.clabels .exact b { color: var(--green); }
.clabels .est b { color: var(--amber); }
.clabels .n { margin-left: auto; }

/* ── Reconcile, live: the step in progress pulses, with how far through it is ── */
.rc-live-now > i { animation: rcPulse 1.2s ease-in-out infinite; }
@keyframes rcPulse { 50% { opacity: .35; } }
.rc-live-bar { display: block; height: 4px; margin: 6px 0 2px; border-radius: 99px; background: var(--panel-3); overflow: hidden; max-width: 260px; }
.rc-live-bar i { display: block; height: 100%; background: var(--amber); transition: width .5s ease; }

/* ── Tools → Jobs → Exact amounts: its card, options popup and live report ── */
.ej-card { border-top: 3px solid var(--s3); }
.job-last .dot.warn, .ej-past .dot.warn { background: var(--amber); }
.ej-past .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.ej-past .dot.good { background: var(--green); }
.ej-older { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.ej-past { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; border: 0; background: none; color: var(--text-2); font-size: 12.5px; cursor: pointer; text-align: left; }
.ej-past:hover { background: var(--panel-3); }
.ej-past b { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--text); }
.ej-form { display: flex; flex-direction: column; gap: 12px; margin: 4px 0 2px; }
.ej-field { display: grid; grid-template-columns: 82px 1fr; gap: 10px; align-items: center; }
.ej-field > span { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.ej-field .seg { flex-wrap: wrap; }
.ej-field .fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.ej-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.ej-preview { padding: 12px; border-radius: var(--radius-sm); background: var(--panel-2, #101a30); border: 1px solid var(--line); font-size: 13px; min-height: 46px; }
.ej-preview-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 10px; }
.ej-preview-figs div { display: flex; flex-direction: column; gap: 2px; }
.ej-preview-figs b { font-size: 18px; font-variant-numeric: tabular-nums; }
.ej-preview-figs span { font-size: 11.5px; color: var(--muted); }
.ej-note { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--muted); margin: 0; }
.ej-note svg { flex: none; margin-top: 1px; color: var(--green); }
.ej-progress { border-left: 3px solid var(--tone); }
.ej-progress-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ej-progress-head .right { margin-left: auto; display: flex; gap: 6px; }
.ej-bignum { display: flex; align-items: baseline; gap: 10px; margin: 14px 0 8px; flex-wrap: wrap; }
.ej-bignum b { font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.ej-bignum span { color: var(--muted); font-size: 13px; }
.ej-bignum em { margin-left: auto; font-style: normal; font-weight: 700; color: var(--tone); font-variant-numeric: tabular-nums; }
.ej-bar { height: 10px; border-radius: 99px; background: var(--panel-3); overflow: hidden; }
.ej-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--s3), #3fd39b); transition: width .6s ease; }
.ej-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.ej-facts span { display: inline-flex; align-items: center; gap: 5px; }
.ej-now { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--text-2); }
.ej-now i { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); animation: rcPulse 1.2s ease-in-out infinite; }
.ej-progress .note-box { margin-top: 10px; }
.ej-feed summary { cursor: pointer; }
.ej-feed .steps { margin-top: 10px; }
.pp-certainty { margin-top: 12px; }
.pp-stat .certainty { margin-top: 6px; gap: 5px; }
.pp-stat .clabels { font-size: 11.5px; }
.sheet.refreshing > * { opacity: .55; transition: opacity .2s; pointer-events: none; }

/* ── Spenders (Overview): ranked rows, a store split bar under each net, and the spender drawer ── */
.sp-row { grid-template-columns: 28px auto minmax(0, 1fr) auto; }
.sp-row .what, .sp-row .amount { grid-row: auto; grid-column: auto; }
.sp-row .amount { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.sp-rank { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; text-align: center; font-size: 13px; }
.sp-rank.medal { width: 24px; height: 24px; line-height: 24px; border-radius: 50%; color: #1a1300; font-size: 12px; }
.sp-rank.m1 { background: var(--gold); } .sp-rank.m2 { background: #c9d2e3; } .sp-rank.m3 { background: #d08a4e; }
/* A spender's lifeline (spenders.js lifelineHtml): joined → now, the buying span gold, the last-seen dot */
.sp-row .what .life { display: flex; align-items: center; gap: 7px; margin-top: 5px; overflow: visible; }
.life em { flex: none; display: inline-flex; align-items: center; gap: 3px; font-style: normal; font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--muted); }
.life em svg { width: 11px; height: 11px; }
.life-track { position: relative; flex: 1; min-width: 48px; max-width: 260px; height: 6px; border-radius: 99px;
  background: repeating-linear-gradient(90deg, #ffffff14 0 3px, transparent 3px 6px); }
.life-active { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--panel-3); }
.life-buy { position: absolute; top: 0; bottom: 0; border-radius: 99px; background: linear-gradient(90deg, #f2c14e99, var(--gold)); }
.life-seen { position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--lt); border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--lt); }
.life { --lt: var(--dim); }
.life.on { --lt: var(--green); } .life.idle { --lt: var(--amber); }
.life .life-s { color: var(--lt); min-width: 26px; }
.life.gone .life-s { color: var(--dim); }
.life-key { display: flex; gap: 12px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.life-key > span { display: inline-flex; align-items: center; gap: 5px; }
.life-key i { display: inline-block; }
.life-key .k-j { width: 14px; height: 5px; border-radius: 99px; background: var(--panel-3); }
.life-key .k-buy { width: 14px; height: 5px; border-radius: 99px; background: var(--gold); }
.life-key .k-seen { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.sp-flag { margin-left: 6px; font-size: 13px; font-weight: 400; font-style: normal; }
.sp-buys { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 650; color: var(--muted); font-variant-numeric: tabular-nums; }
.sp-buys svg { width: 11px; height: 11px; }
@media (max-width: 860px) { .life-key { gap: 8px; font-size: 11px; } .life-track { max-width: none; } }
.sp-split { display: flex; gap: 2px; width: 64px; height: 5px; border-radius: 99px; overflow: hidden; background: var(--panel-3); }
.sp-months { display: flex; gap: 6px; align-items: flex-end; overflow-x: auto; padding-bottom: 2px; }
.sp-month { flex: 1 0 44px; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 44px; }
.sp-month b { font-size: 10.5px; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sp-month i { width: 70%; max-width: 34px; border-radius: 5px 5px 2px 2px; background: var(--gold); opacity: .85; }
.sp-month i.neg { background: var(--red); }
.sp-month span { font-size: 10.5px; color: var(--muted); }
.sp-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 520px) { .sp-products { grid-template-columns: minmax(0, 1fr); } }
.sp-product { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); min-width: 0; }
.sp-product > div:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sp-product b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-product span { font-size: 11.5px; color: var(--muted); }
.sp-product em { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.sp-buy { grid-template-columns: auto minmax(0, 1fr) auto; }
.sp-buy .what, .sp-buy .amount { grid-row: auto; grid-column: auto; }
.sp-buy .what span { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sp-buy .amount { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
#spList.refreshing { opacity: .55; transition: opacity .2s; }
/* Registered orange, guests purple (as the Champions dashboard) */
.badge.guest { border-color: #a879f055; color: #b994f5; background: #a879f012; }
.badge.registered { border-color: color-mix(in srgb, var(--registered) 33%, transparent); color: color-mix(in srgb, var(--registered) 70%, #fff); background: color-mix(in srgb, var(--registered) 7%, transparent); }

/* Products as tiles inside their panel (All time: skins, pets, passes, rune pouches) */
.prod-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
@media (max-width: 520px) { .prod-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.prod-tile { display: flex; flex-direction: column; gap: 3px; padding: 10px; border-radius: 12px; background: var(--panel-2); min-width: 0; }
.pt-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 4px; }
.prod-tile .art { width: 40px; height: 40px; border-radius: 10px; background: var(--panel-3); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.prod-tile .art img { width: 100%; height: 100%; object-fit: contain; }
.prod-tile .art.none img { display: none; }
.pt-rank { font-size: 11px; font-weight: 700; color: var(--muted); min-width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 50%; background: var(--panel-3); }
.pt-rank.m1 { background: var(--gold); color: #1a1300; } .pt-rank.m2 { background: #c9d2e3; color: #1a1f29; } .pt-rank.m3 { background: #d08a4e; color: #1f1206; }
.pt-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-val { font-size: 17px; font-weight: 750; font-variant-numeric: tabular-nums; }
.pt-sub { font-size: 11.5px; color: var(--muted); }
.pt-track { display: flex; height: 4px; margin-top: 4px; background: var(--panel-3); border-radius: 3px; overflow: hidden; }
.pt-track > div { height: 100%; border-radius: 3px; }
.pt-fx { margin-top: 4px; font-size: 11px; color: var(--dim); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* The buyer's country beside the name on the profile */
.pp-country { display: inline-flex; align-items: center; margin-left: 10px; padding: 3px 10px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--text-2); vertical-align: middle; white-space: nowrap; }
/* Slow requests (Incidents) */
.slow-row { grid-template-columns: minmax(0, 1fr) auto; }
.slow-row .what, .slow-row .amount { grid-row: auto; grid-column: auto; }
.slow-row .amount { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.slow-row .mono-val { font-size: 11px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; }
/* A chart column's drawer: a month's days as tappable columns */
.colbars .cb.tap { cursor: pointer; border-radius: 6px; }
.colbars .cb.tap:hover { background: #ffffff08; }
.period-days .cb-col { height: 90px; }
.period-days .cb-l { font-size: 9.5px; }

/* ── Guilds tab ── */
.gbanner { display: block; border-radius: 8px; background: var(--panel-2); object-fit: contain; image-rendering: auto; }
.grank { flex: none; width: 34px; text-align: center; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.gtiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gtile { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--panel-2); border-radius: var(--radius-sm); }
.gtile img { width: 28px; height: 28px; }
.gtile b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.gtile span { font-size: 12px; color: var(--muted); }
.ghead { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.ghead-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ghead-title { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gexp { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.gexp .track { height: 7px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.gexp .fill { height: 100%; background: var(--blue); border-radius: 4px; }
.gback { display: flex; flex-direction: column; gap: 14px; }
.gback-row { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; align-items: center; }
.gback-l { font-size: 13px; font-weight: 600; }
.gback-bars { display: flex; flex-direction: column; gap: 5px; }
.gback-bars > div { display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 8px; align-items: center; }
.gback-bars .track { height: 9px; background: var(--panel-2); border-radius: 5px; overflow: hidden; }
.gback-bars .fill { height: 100%; border-radius: 5px; }
.gback-bars b { font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.gback-key { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; font-size: 12px; }
.gback-key i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.cb-col.gpair { gap: 3px; }
.cb-col.gpair i { flex: 1; width: auto; }
.gweek { flex: none; display: flex; align-items: flex-end; gap: 2px; height: 26px; }
.gweek i { width: 5px; border-radius: 2px; background: var(--panel-3); }

/* ── Player page, Guild tab (player.js gp*, rebuilt 2026-11-05): banner card, chest tracks, activity tiles. Phone first;
   every chest, tick and pill sits inside its own box. ── */
.gp { display: flex; flex-direction: column; gap: 14px; }
.gp > h2.section-title { margin: 4px 0 -4px; }
.gp-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; background: var(--panel-2); font-size: 12px; font-weight: 650; color: var(--text-2); white-space: nowrap; }
.gp-chip img { width: 15px; height: 15px; object-fit: contain; }
.gp-chip b { color: var(--text); font-variant-numeric: tabular-nums; }
.gp-chip.gold { color: var(--gold); background: var(--gold-soft); } .gp-chip.blue { color: var(--blue); background: color-mix(in srgb, var(--blue) 14%, transparent); }
.gp-chip.good, .gp-chip.good b { color: var(--green); } .gp-chip.warn { color: var(--amber); background: color-mix(in srgb, var(--amber) 12%, transparent); }
.gp-hero { display: flex; gap: 14px; align-items: center; cursor: pointer; }
.gp-hero:hover { border-color: #f2c14e55; }
.gp-hero .gbanner { flex: none; }
.gp-hero-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.gp-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.gp-name b { font-size: 18px; font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-go { margin-left: auto; flex: none; display: grid; color: var(--muted); }
.gp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gp-exp { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.gp-exp .track { height: 7px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.gp-exp .track i { display: block; height: 100%; background: var(--blue); border-radius: 4px; }
.gp-none { display: flex; gap: 14px; align-items: center; }
.gp-none-art { width: 56px; height: 56px; flex: none; image-rendering: pixelated; opacity: .75; }
.gp-none > div { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.gp-none b { font-size: 16px; }
.gp-today-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; align-items: end; }
.gp-today-row + .gp-today-row { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.gp-big { display: flex; align-items: center; gap: 6px; padding-bottom: 2px; min-width: 0; }
.gp-big img { width: 28px; height: 28px; image-rendering: pixelated; }
.gp-big b { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.gp-big span { color: var(--muted); font-size: 13px; font-weight: 650; }
.gp-big.sm { flex-direction: column; align-items: flex-start; gap: 3px; }
.gp-big.sm b { font-size: 20px; }
.gp-big .gp-lbl { color: var(--text-2); font-size: 12px; }
.gp-track-wrap { padding: 0 16px; min-width: 0; }
.gp-marks { position: relative; height: 46px; }
.gp-mark { position: absolute; bottom: 4px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 1px; }
.gp-mark > img:first-child { width: 30px; height: 30px; object-fit: contain; }
.gp-mark small { font-size: 10.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1; }
.gp-mark.shut > img:first-child { filter: grayscale(.8) brightness(.75); }
.gp-mark.ready > img:first-child { filter: drop-shadow(0 0 6px #f2c14e99); }
.gp-mark.ready small { color: var(--gold); }
.gp-mark.claimed > img:first-child { opacity: .5; }
.gp-mark.claimed small { color: var(--green); }
.gp-tick { position: absolute; top: 14px; right: 0; width: 16px; height: 16px; }
.gp-track { height: 10px; background: var(--panel-2); border-radius: 5px; overflow: hidden; }
.gp-track i { display: block; height: 100%; border-radius: 5px; }
.gp-note { font-size: 12px; margin-top: 8px; }
.gp-note.warn { color: var(--amber); }
.gp-acts { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.gp-act { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 10px 10px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line-soft); min-width: 0; }
.gp-act-art { width: 44px; height: 44px; object-fit: contain; image-rendering: pixelated; }
.gp-act:not(.full):not(.part) .gp-act-art { filter: grayscale(.6) brightness(.8); }
.gp-act > b { font-size: 12.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-act-bar { width: 100%; height: 6px; background: var(--panel); border-radius: 3px; overflow: hidden; }
.gp-act-bar i { display: block; height: 100%; background: var(--gold); border-radius: 3px; }
.gp-act-n { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gp-pts { position: absolute; top: 6px; right: 6px; font-size: 10.5px; font-weight: 800; color: var(--gold); background: var(--gold-soft); padding: 1px 6px; border-radius: 99px; }
.gp-act-tick { position: absolute; top: 6px; left: 6px; width: 18px; height: 18px; }
.gp-act.full { border-color: color-mix(in srgb, var(--green) 45%, transparent); background: color-mix(in srgb, var(--green) 7%, var(--panel-2)); }
.gp-act.full .gp-act-bar i { background: var(--green); }
.gp-act.full .gp-act-n { color: var(--green); }
.gp-week .cb { cursor: default; }
.gp-week .cb:hover { background: none; }
.gp-week .cb-col { height: 90px; }
.gp-week .cb-l { min-height: 0; }
.gp-paid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.gp-res { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 6px; border-radius: 12px; background: var(--panel-2); min-width: 0; }
.gp-res img { width: 30px; height: 30px; image-rendering: pixelated; }
.gp-res b { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.gp-res span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
@media (max-width: 600px) {
  .gp-hero .gbanner { width: 60px !important; height: 60px !important; }
  .gp-name b { font-size: 16px; }
  .gp-today-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .gp-week .cb-col { height: 70px; }
  .gp-paid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.inc-btn { position: relative; }
/* Count badges (the bell, Monitor's tabs): a deep red with a dark ring so the white digit reads (user, 2026-11-05) */
.inc-btn .inc-badge { display: none; position: absolute; top: -7px; right: -7px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: #c62828; color: #fff; font-size: 11px; font-weight: 800; line-height: 15px; text-align: center; border: 2px solid #070c19; box-shadow: 0 0 0 1px #ff6b6b66; }
.inc-btn.has .inc-badge { display: block; }
.inc-btn.on { border-color: var(--gold); color: var(--gold); }

/* --- Incidents, the Champions way (views/incidents.js, the bell in core.js) --- */
.prow.toned { box-shadow: inset 3px 0 0 var(--tone); }
.kind-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; color: var(--kc); white-space: nowrap;
  padding: 2px 8px; border-radius: 6px; background: color-mix(in srgb, var(--kc) 14%, transparent); border: 1px solid color-mix(in srgb, var(--kc) 40%, transparent); }
.kind-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--kc); }
.prow-title .kind-chip, .prow-sub .kind-chip { flex: none; font-size: 10.5px; padding: 1px 6px; }
.kind-mark { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; font-weight: 900; color: var(--kc);
  background: color-mix(in srgb, var(--kc) 16%, transparent); border: 1px solid color-mix(in srgb, var(--kc) 45%, transparent); }
.who { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.kpis.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpis.two .kpi .value { font-size: 32px; }
.kpis.two .kpi .meta { display: block; }
.kpi-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.kpi-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-soft); font-size: 12px; color: var(--muted); }
.kpi-pill b { color: var(--text); font-variant-numeric: tabular-nums; }
.kpi-pill.tap { cursor: pointer; font: inherit; font-size: 12px; }
.kpi-pill.tap:hover { border-color: var(--gold); color: var(--text); }
.kpi-pill.bad { border-color: #ff6b6b55; background: #ff6b6b12; } .kpi-pill.bad b { color: var(--red); }
.kpi-pill.warn { border-color: #f0a33a55; background: #f0a33a12; } .kpi-pill.warn b { color: var(--amber); }
.all-clear { display: inline-flex; align-items: center; gap: 8px; color: var(--green); font-weight: 600; font-size: 13px; padding: 9px 12px; border-radius: 10px;
  border: 1px solid #2fbf7140; background: #2fbf710d; }
@media (max-width: 860px) { .kpis.two.keep-two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpis.two.keep-two .kpi .value { font-size: 24px; } .kpis.two.keep-two .kpi-pill { padding: 3px 8px; } }
.flag-reason.link { cursor: pointer; }
.flag-reason.link:hover { background: #ffffff07; }
.reason-line { display: inline-block; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); vertical-align: bottom; }
.bell-list { display: flex; flex-direction: column; border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; }
.bell-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); }
.bell-row:last-child { border-bottom: 0; }
.bell-open { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; text-align: left; background: none; border: 0; padding: 0; color: inherit; cursor: pointer; font: inherit; }
.bell-open:hover b { color: var(--gold); }
.bell-open .reason-line { max-width: 100%; font-size: 12.5px; }
@media (max-width: 860px) { .reason-line { max-width: 70vw; } }

/* --- A story (the Server log's issues, as Champions' incident stories): the verdict, then numbered steps --- */
.verdict { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); }
.verdict > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.verdict b { font-size: 16px; }
.verdict span:not(.verdict-mark) { font-size: 12.5px; color: var(--text-2); }
.verdict-mark { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 16px; }
.verdict.good { background: #2fbf7112; border-color: #2fbf7155; } .verdict.good b { color: var(--green); } .verdict.good .verdict-mark { background: var(--green); color: #052012; }
.verdict.warn { background: #f0a33a12; border-color: #f0a33a55; } .verdict.warn b { color: var(--amber); } .verdict.warn .verdict-mark { background: var(--amber); color: #2a1a02; }
.verdict.bad { background: #ff6b6b12; border-color: #ff6b6b55; } .verdict.bad b { color: var(--red); } .verdict.bad .verdict-mark { background: var(--red); color: #fff; }
.story-steps { display: flex; flex-direction: column; gap: 12px; }
.ss { position: relative; display: flex; gap: 12px; }
.ss:not(:last-of-type)::before { content: ""; position: absolute; left: 12px; top: 28px; bottom: -10px; width: 2px; background: var(--line); }
.ss-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800;
  background: #f2c14e1f; color: var(--gold); border: 1px solid #f2c14e66; position: relative; z-index: 1; }
.ss > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ss-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ss-label em { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 500; }
.ss p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }
.tech-row pre.raw { margin: 0; max-height: 320px; overflow: auto; white-space: pre-wrap; font-size: 11.5px; }
@media (max-width: 860px) { .tech-row { grid-template-columns: 1fr; gap: 4px; } }

/* A deploy changed the dashboard while something was in progress (core.js checkDashVersion) */
.dash-updated { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; max-width: calc(100vw - 32px);
  padding: 10px 16px; border-radius: 999px; border: 1px solid var(--gold); background: var(--panel); color: var(--gold); font: inherit; font-size: 13px; font-weight: 700;
  box-shadow: 0 10px 30px -10px #000; cursor: pointer; }


/* --- Monitor (views/monitor.js, 2026-11-05 redesign): status hero, Needs you, tiles, What happened, Explore; phone first --- */
.mon-live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.mon-live:empty { display: none; }
.mon-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 #2fbf7188; animation: monPulse 2s infinite; }
@keyframes monPulse { 0% { box-shadow: 0 0 0 0 #2fbf7188; } 70% { box-shadow: 0 0 0 7px #2fbf7100; } 100% { box-shadow: 0 0 0 0 #2fbf7100; } }

.mon-hero { --tone: var(--green); position: relative; border-radius: 18px; padding: 20px; border: 1px solid color-mix(in srgb, var(--tone) 35%, var(--line-soft));
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--tone) 16%, transparent), transparent 55%), var(--panel); box-shadow: var(--shadow); overflow: hidden; }
.mon-hero.warn { --tone: var(--amber); }
.mon-hero.bad { --tone: var(--red); }
.mon-hero.skel { min-height: 196px; }
.mh-top { display: flex; align-items: center; gap: 14px; }
.mh-mark { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: var(--tone, var(--green));
  background: color-mix(in srgb, var(--tone, var(--green)) 18%, transparent); border: 1.5px solid color-mix(in srgb, var(--tone, var(--green)) 55%, transparent); }
.mh-mark svg { width: 26px; height: 26px; }
.mh-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mh-text b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--text); line-height: 1.15; }
.mh-text span { font-size: 13.5px; color: var(--text-2); }
.mh-cta { flex: none; padding: 10px 16px; }
.mh-story { margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; background: #0000002e; border: 1px solid var(--line-soft); font-size: 14px; line-height: 1.5; color: var(--text-2); }
.mh-story b { color: var(--text); }
.mh-vitals { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.vital { --v: var(--green); display: flex; flex-direction: column; gap: 2px; padding: 9px 11px; border-radius: 11px; background: var(--panel-2); border: 1px solid var(--line-soft); min-width: 0; }
.vital.warn { --v: var(--amber); border-color: #f0a33a55; } .vital.bad { --v: var(--red); border-color: #ff6b6b66; background: #ff6b6b10; }
.vital span { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.vital span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--v); flex: none; }
.vital b { font-size: 15px; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vital.warn b { color: var(--amber); } .vital.bad b { color: var(--red); }

/* Needs you and What happened: one row per incident or server issue */
.mon-list { overflow: hidden; }
.mrow { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-bottom: 1px solid var(--line-soft); min-width: 0;
  transition: opacity .25s, transform .25s; }
.mrow:last-child { border-bottom: 0; }
.mrow.link { cursor: pointer; }
.mrow.link:hover { background: #ffffff07; }
.mrow.done { opacity: 0; transform: translateX(24px); }
.mrow-ic { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: var(--tone);
  background: color-mix(in srgb, var(--tone) 15%, transparent); border: 1px solid color-mix(in srgb, var(--tone) 40%, transparent); }
.mrow-ic svg { width: 19px; height: 19px; }
.mrow-main { flex: 1; min-width: 0; }
.mrow-title { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 14.5px; font-weight: 650; }
.mrow-title .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.mrow-sub { margin-top: 3px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mrow-sub b { color: var(--tone); font-weight: 700; }
.mrow-sub .sep { margin: 0 6px; opacity: .5; }
.mrow-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; }
.mrow-side > b { font-size: 13px; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mrow-ok { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted);
  transition: color .15s, border-color .15s, background .15s; }
.mrow-ok svg { width: 18px; height: 18px; }
.mrow-ok:hover:not(:disabled) { color: var(--green); border-color: var(--green); background: #2fbf7114; }
.mrow-ok:disabled { opacity: .4; }
.tl-day { position: sticky; top: 0; z-index: 1; padding: 7px 12px; font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: var(--gold);
  background: var(--chrome); border-bottom: 1px solid var(--line-soft); }
.mon-zero { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 20px; text-align: center; }
.mon-zero .mh-mark { --tone: var(--green); margin-bottom: 4px; }
.mon-zero b { font-size: 17px; color: var(--green); }
.mon-zero span:not(.mh-mark) { font-size: 13px; color: var(--muted); max-width: 380px; }
.mon-more { width: 100%; display: flex; justify-content: center; gap: 8px; background: none; border: 0; }

/* The tiles: a short line under the number, then the pills */
.mon-tiles .kpi .meta { display: block; }
.mon-tiles .tile-line { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mon-tiles .kpi-pills { gap: 5px; }
.mon-tiles .kpi .meta .delta { float: right; }
.inc-chart { margin-top: 14px; }

/* The page tabs: Overview · Incidents · Flagged · Server · Speed, sticky under the top bar, each its waiting count */
.mon-tabs { position: sticky; top: calc(55px + env(safe-area-inset-top)); z-index: 90; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); width: 100%;
  margin: -4px 0 18px; padding: 4px; gap: 4px; background: var(--chrome); }
/* Solid, no backdrop blur: on iPhones a sticky blurred bar made Safari draw the top bar blurred (user, 2026-11-05) */
.mon-tabs button { position: relative; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 6px; min-width: 0; font-size: 13.5px; }
.mon-tabs button svg { width: 17px; height: 17px; flex: none; }
.mon-tabs button span { overflow: hidden; text-overflow: ellipsis; }
.mt-badge { font-style: normal; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: #c62828; color: #fff; font-size: 11px; font-weight: 800;
  line-height: 15px; text-align: center; flex: none; border: 2px solid #070c19; box-shadow: 0 0 0 1px #ff6b6b66; }
.mt-badge:empty { display: none; }
.mon-subbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.mon-subbar .right { margin-left: auto; }
.mon-subbar .hint, .mon-subbar .seg + .hint { color: var(--muted); font-size: 12.5px; }
.mon-panels { margin-top: 14px; }
.nav-chev { display: inline-flex; margin-left: auto; color: var(--muted); }
.nav-chev svg { width: 15px; height: 15px; }
.mon-tiles .kpi .label { width: 100%; }
.mon-tiles .kpi.tap:hover .nav-chev { color: var(--gold); }
/* Overview's cards, all read the same way: number + what it counts, one breakdown line, one status chip, the trend */
.glance .value { display: flex; align-items: baseline; gap: 8px; }
.glance .value small { font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-line { margin-top: 4px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-chip { align-self: flex-start; display: inline-flex; margin-top: 8px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 650; border: 1px solid; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-chip.ok { color: var(--green); border-color: #2fbf7155; background: #2fbf7112; }
.g-chip.warn { color: var(--amber); border-color: #f0a33a55; background: #f0a33a12; }
.g-chip.bad { color: var(--red); border-color: #ff6b6b55; background: #ff6b6b12; }
.g-chip.info { color: var(--muted); border-color: var(--line); background: var(--panel-2); }
.kpi .spark.flat { display: flex; align-items: flex-end; }
.kpi .spark.flat i { display: block; width: 100%; height: 2px; margin-bottom: 4px; background: var(--line); }
.kpis.hero.glance-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg:empty { display: none; }
/* Guilds (views/guilds.js): Needs a look as filter chips over the list; insights folded one per row */
.gu-watch:empty { display: none; }
.gu-watch { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
.wlabel { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-right: 2px; }
.wchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--amber); background: #f0a33a12; border: 1px solid #f0a33a55; cursor: pointer; }
.wchip b { font-variant-numeric: tabular-nums; }
.wchip.good { color: var(--green); background: #2fbf7112; border-color: #2fbf7155; }
.wchip.on { color: #1a1405; background: var(--gold); border-color: var(--gold); }
.gu-fold { padding: 0; margin-bottom: 10px; }
.gu-fold summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 13px 14px; }
.gu-fold summary::-webkit-details-marker { display: none; }
.gu-fold summary::after { content: "›"; margin-left: auto; font-size: 20px; color: var(--muted); transition: transform .15s; }
.gu-fold[open] summary::after { transform: rotate(90deg); }
.gu-fold summary > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gu-fold summary b { font-size: 14.5px; }
.gu-fold summary span { font-size: 12.5px; color: var(--muted); }
.gu-fold-body { padding: 0 14px 14px; }
.gu-fold-body > .prow { padding-left: 0; padding-right: 0; }
.gold-t { color: var(--gold); font-weight: 650; }
.gu-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; }
.sheet-body .sheet-hero { margin-bottom: 14px; }
/* Speed's When chart: a bar holding a deploy is blue with ▲ over its count */
.dep-key { color: var(--blue); font-size: 9px; margin-right: 2px; }
.cb.dep .cb-n { color: var(--blue); }
.dep-note { margin-top: 8px; }
/* Why they're banned: every bar the same length (the counts in a fixed column), the picked one marked */
.mon-ranks .rb .val { min-width: 36px; text-align: right; }
.mon-ranks .rb.on { background: var(--gold-soft); border-radius: 8px; box-shadow: inset 0 0 0 1px #f2c14e55; }
/* Rows' status at the right: a dot and a word, no pill */
.st-dot { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 650; color: var(--muted); white-space: nowrap; }
.st-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-dot.warn { color: var(--amber); } .st-dot.good { color: var(--green); }
.prow-sub.why-line { color: var(--text-2); }
/* A check in a sheet: its colour, its name, what the detail adds */
.why-row { display: flex; gap: 10px; padding: 9px 11px; border-radius: 10px; background: var(--panel-2); }
.why-row > i { flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; }
.why-row > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.why-row b { font-size: 13.5px; }
.why-row span { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.vet-row.end { justify-content: flex-end; }
/* The Anti-cheat list's switch: Strikes and bans · Banned players · Whitelisted */
.lcard-switch { padding: 10px 12px 0; }
.lcard-switch .seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }

/* The sheets: the verdict row's chips and resolve button; a story step's list; How often; folded technical details */
.vet-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.kind-mark svg { width: 22px; height: 22px; }
.ss-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.ss-list .flag-reason { padding: 8px 10px; border-radius: 10px; background: var(--panel-2); border: 0; }
.ho-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ho-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); min-width: 0; }
.ho-stat b { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ho-stat span { font-size: 11.5px; color: var(--muted); }
.ho-bars { margin-top: 12px; gap: 2px; }
.ho-bars .cb-col { height: 56px; }
.ho-axis { display: flex; justify-content: space-between; margin-top: 4px; }
.tech-fold summary { cursor: pointer; font-weight: 700; color: var(--text-2); list-style: none; display: flex; align-items: center; gap: 8px; }
.tech-fold summary::-webkit-details-marker { display: none; }
.tech-fold summary::before { content: "›"; font-size: 18px; line-height: 1; color: var(--muted); transition: transform .15s; }
.tech-fold[open] summary::before { transform: rotate(90deg); }
.tech-fold[open] summary { margin-bottom: 8px; }
.panel .tech-fold { margin-top: 12px; }
.inc-chart .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .mon-hero { padding: 16px; border-radius: 16px; }
  .mh-top { flex-wrap: wrap; }
  .mh-mark { width: 44px; height: 44px; } .mh-mark svg { width: 22px; height: 22px; }
  .mh-text b { font-size: 20px; }
  .mh-cta { width: 100%; }
  .mh-vitals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mh-vitals .vital:last-child { grid-column: 1 / -1; }
  .mrow { gap: 10px; padding: 10px; }
  .mrow-ic { width: 32px; height: 32px; border-radius: 10px; }
  .mon-tiles .kpi .value { font-size: 26px; }
  .mon-tiles .kpi-pill { padding: 3px 8px; font-size: 11.5px; }
  .lcard-bar .search { flex: 1 1 100%; }
  /* Phone: the page tabs as an icon bar (icon over a short label, the count on the icon), thumb-sized */
  /* Edge to edge: max-width none undoes .seg's 100% cap, which left the bar 24px short on the right */
  .mon-tabs { top: calc(55px + env(safe-area-inset-top)); margin: -2px -12px 14px; width: calc(100% + 24px); max-width: none; border-radius: 0; border-left: 0; border-right: 0; padding: 4px 6px; gap: 2px; }
  .mon-tabs button { flex-direction: column; gap: 3px; padding: 7px 2px 6px; font-size: 11px; }
  .mon-tabs button svg { width: 20px; height: 20px; }
  .mt-badge { position: absolute; top: 0; left: calc(50% + 5px); min-width: 18px; height: 18px; line-height: 14px; font-size: 10.5px; padding: 0 4px; }
  .mon-panels .colbars.mon-weeks .cb-l { font-size: 9px; }
  .ho-stat b { font-size: 16px; }
  .vet-row > span { width: 100%; }
  .vet-row > span .btn.primary { width: 100%; padding: 11px; }
  /* Overview's three cards stack, compact: no trend line */
  .kpis.hero.glance-3 { grid-template-columns: minmax(0, 1fr); }
  .glance-3 .kpi .spark { display: none; }
  .lcard-switch .seg button { padding: 7px 4px; font-size: 12.5px; }
  /* Guilds on a phone: the four cards in two columns, compact; the drawer's numbers two by two */
  .gu-cards .kpi .value { font-size: 22px; flex-wrap: wrap; row-gap: 0; }
  .gu-cards .g-line { white-space: normal; }
  .gu-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── Estimate vs exact (Purchases): a sale's estimate (≈) beside the store's own figure, and the range's estimates judged ──
   Tones by how far off: close within 2% (green), near within 10% (amber), far beyond (red) */
.gchip.close, .gv.close, .ea .close, .gchip.gain, .gv.gain, .ea .gain { --gt: var(--green); --gt-bg: #2fbf7116; --gt-line: #2fbf7145; }
.gchip.near, .gv.near, .ea .near { --gt: var(--amber); --gt-bg: #f0a33a16; --gt-line: #f0a33a45; }
.gchip.far, .gv.far, .ea .far { --gt: var(--red); --gt-bg: #ff6b6b16; --gt-line: #ff6b6b45; }

/* The list rows' estimate under the price: quiet (no pill), the estimate crossed out, then how far off it was in its tone */
.gchip { display: inline-flex; align-items: baseline; gap: 4px; line-height: 16px; }
.feed-row .amount .gchip, .gchip { font-size: 11px; }
.gchip s { color: var(--dim); text-decoration-color: #6f7c9699; font-variant-numeric: tabular-nums; }
.gchip b { color: var(--gt); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 11px; display: inline; }
.sp-buy .amount .gchip { margin-right: 6px; }
/* A purchase's time beside its store (the price column keeps only the money) */
.feed-row .what .when { color: var(--muted); font-size: 12px; white-space: nowrap; }
.feed-row .what .when::before { content: "· "; color: var(--dim); }
.sp-buy .amount > span { display: inline-flex; align-items: center; }

/* The drawer: two bars on one scale */
.gv { display: grid; gap: 9px; padding: 12px 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--gt-line); box-shadow: inset 3px 0 0 var(--gt); }
.gv-head { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.gv-verdict { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; color: var(--text); }
.gv-verdict i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; color: var(--gt); background: var(--gt-bg); border: 1px solid var(--gt-line); }
.gv-delta { color: var(--gt); font-size: 15px; font-variant-numeric: tabular-nums; }
.gv-row { display: grid; grid-template-columns: 62px minmax(0, 1fr) 70px; gap: 10px; align-items: center; }
.gv-row span { color: var(--muted); font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
.gv-row b { text-align: right; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.gv-track { height: 12px; border-radius: 6px; background: #ffffff09; overflow: hidden; }
.gv-track i { display: block; height: 100%; border-radius: 6px; }
.gv-row.est i { background: repeating-linear-gradient(135deg, #8592ab88 0 4px, #8592ab33 4px 8px); }
.gv-row.est b { color: var(--text-2); }
.gv-row.exact i { background: linear-gradient(90deg, color-mix(in srgb, var(--tone) 70%, transparent), var(--tone)); }
.gv-foot { font-size: 11.5px; color: var(--muted); line-height: 1.45; }

/* Revenue → Exact: how far off */
.ea { display: grid; gap: 18px; }
.ea-spread { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; align-items: end; }
.ea-col { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 0; border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; }
.ea-col:disabled { cursor: default; }
.ea-col b { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--gt); }
.ea-col.none b { color: var(--dim); }
.ea-bar { width: 100%; height: 84px; display: flex; align-items: flex-end; border-radius: 8px; background: #ffffff06; overflow: hidden; }
.ea-bar i { display: block; width: 100%; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--gt), color-mix(in srgb, var(--gt) 45%, transparent)); transition: height .5s ease; }
.ea-col:not(:disabled):hover .ea-bar { background: #ffffff0d; }
.ea-col small { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.ea-col.close small { color: var(--green); font-weight: 700; }
.ea-col.gain .ea-bar i { background: linear-gradient(180deg, var(--s3), color-mix(in srgb, var(--s3) 45%, transparent)); }
.ea-axis { display: flex; justify-content: space-between; color: var(--dim); font-size: 11px; margin-top: -10px; }
.ea-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; }
.ea-groups h4 { margin: 0 0 6px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 650; }
.ea-group { width: 100%; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(60px, 1fr) auto; gap: 12px; align-items: center; padding: 9px 4px; border: 0; border-top: 1px solid var(--line-soft); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ea-group:hover { background: #ffffff05; }
.ea-glabel { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 13px; font-weight: 650; }
.ea-glabel small { color: var(--muted); font-size: 11px; font-weight: 500; }
.ea-way { display: inline-flex; align-items: center; gap: 6px; }
.ea-way::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--gold); }
.ea-way.learned-all::before { background: var(--s1); }
.ea-way.table::before { background: var(--muted); }
.ea-bias { position: relative; height: 10px; border-radius: 5px; background: #ffffff09; }
.ea-bias::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--line); }
.ea-bias i { position: absolute; top: 0; bottom: 0; border-radius: 5px; background: var(--gt); }
.ea-gnum { text-align: right; }
.ea-gnum b { display: block; font-size: 14px; color: var(--gt); font-variant-numeric: tabular-nums; }
.ea-gnum small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.ea-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 11.5px; }
.ea-legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.ea-legend span::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--gt); }
.ea-legend .btn { margin-left: auto; }
.ea-empty { display: flex; align-items: center; gap: 14px; }
.ea-empty > i { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-style: normal; font-size: 20px; font-weight: 700; color: var(--amber); background: #f0a33a14; border: 1px dashed #f0a33a66; }
.ea-empty b { display: block; font-size: 14px; }
.ea-empty span { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; line-height: 1.45; }
@media (max-width: 760px) {
  .ea-groups { grid-template-columns: minmax(0, 1fr); }
  .ea-bar { height: 68px; }
}
.ea-way.price-share::before { background: var(--green); }
.ea-way.price-vat::before { background: var(--amber); }

/* ── Revenue (views/revenue.js, 2026-11-06): Monitor's page tabs (.mon-tabs) over five pages ── */
.contents { display: contents; }
.delta small { font-weight: 550; opacity: .75; font-size: 11px; margin-left: 3px; }
.kpis.pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ea-t.close, .ea-t.gain { color: var(--green); } .ea-t.near { color: var(--amber); } .ea-t.far { color: var(--red); }
.prod-tile.tap { cursor: pointer; transition: background .15s, box-shadow .15s; }
.prod-tile.tap:hover { background: var(--panel-3); box-shadow: inset 0 0 0 1px #f2c14e55; }
.kind-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: 1px; }
/* Products: the range's mix by kind, one bar and a tile per kind */
.mix { display: grid; gap: 14px; }
.mix-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mix-total b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.mix-total span { font-size: 12.5px; color: var(--muted); }
.mix-bar { display: flex; gap: 3px; height: 14px; border-radius: 8px; overflow: hidden; background: var(--panel-3); }
.mix-bar i { display: block; min-width: 3px; }
.mix-bar.empty i { flex: 1; background: transparent; }
.mix-kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mix-kind { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line-soft);
  box-shadow: inset 0 3px 0 var(--tone); text-align: left; min-width: 0; transition: background .15s; }
.mix-kind:hover { background: var(--panel-3); }
.mix-kind.none { opacity: .55; }
.mk-name { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); white-space: nowrap; }
.mk-name i { width: 8px; height: 8px; border-radius: 2px; background: var(--tone); flex: none; }
.mix-kind > b { font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mk-sub { display: flex; gap: 8px; font-size: 12px; color: var(--muted); }
.mk-sub em { font-style: normal; font-weight: 700; color: var(--tone); }
.mix-legend { margin-top: -4px; }
@media (max-width: 860px) {
  .mix-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mix-total b { font-size: 26px; }
}

/* --- Retention (views/retention.js, 2026-11-06): six plain questions, one picture each, phone first --- */
.rt-back { display: grid; gap: 16px; }
.rt-story { font-size: 17px; line-height: 1.45; color: var(--text-2); }
.rt-story b { color: var(--text); font-size: 20px; font-weight: 800; }
.rt-mark { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.rt-mk-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rt-mk-head > b { font-size: 14px; font-weight: 700; min-width: 104px; }
.rt-pct { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rt-mark.good .rt-pct { color: var(--green); } .rt-mark.ok .rt-pct { color: var(--amber); } .rt-mark.bad .rt-pct { color: var(--red); }
.rt-people { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; max-width: 360px; }
.pp { position: relative; aspect-ratio: 3 / 4; background: var(--panel-3); overflow: hidden;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2032%27%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%277%27%20r%3D%276.5%27/%3E%3Cpath%20d%3D%27M0%2032c0-8%205.4-13%2012-13s12%205%2012%2013z%27/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2032%27%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%277%27%20r%3D%276.5%27/%3E%3Cpath%20d%3D%27M0%2032c0-8%205.4-13%2012-13s12%205%2012%2013z%27/%3E%3C/svg%3E") center / contain no-repeat; }
.pp i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--tone); }
.rt-mk-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.rt-mk-foot .g-chip { margin-top: 0; }
.rt-health { display: grid; gap: 14px; }
.rt-hbar { display: flex; gap: 3px; height: 30px; border-radius: 10px; overflow: hidden; background: var(--panel-3); }
.rt-hbar i { display: flex; align-items: center; justify-content: center; min-width: 4px; }
.rt-hbar em { font-style: normal; font-size: 12px; font-weight: 800; color: #0b1222; }
.rt-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rt-group, .rt-side { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--panel-2);
  border: 1px solid var(--line-soft); box-shadow: inset 0 3px 0 var(--tone); text-align: left; min-width: 0; transition: background .15s; }
.rt-group:hover, .rt-side:hover { background: var(--panel-3); }
.rg-k { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.rg-k i { width: 8px; height: 8px; border-radius: 50%; background: var(--tone); }
.rt-group > b, .rt-side > b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rt-side > b small { font-size: 13px; font-weight: 600; color: var(--muted); }
.rg-sub { font-size: 11.5px; color: var(--muted); }
.rg-sub em { font-style: normal; font-weight: 700; color: var(--tone); margin-right: 5px; }
.rt-weeks { padding: 6px 0; }
.rw-row { width: 100%; display: grid; grid-template-columns: minmax(96px, 1.1fr) repeat(3, minmax(0, 1fr)); gap: 12px; align-items: center; padding: 9px 16px;
  border: 0; border-bottom: 1px solid var(--line-soft); background: none; color: var(--text); font: inherit; text-align: left; }
.rw-row:last-child { border-bottom: 0; }
button.rw-row { cursor: pointer; } button.rw-row:hover { background: #ffffff05; }
.rw-headrow span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.rw-week { display: flex; flex-direction: column; min-width: 0; }
.rw-week b { font-size: 14px; } .rw-week small { font-size: 11.5px; color: var(--muted); }
.rw-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rw-track { flex: 1; height: 8px; border-radius: 99px; background: var(--panel-3); overflow: hidden; }
.rw-track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--s3), var(--green)); }
.rw-cell em { font-style: normal; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.rw-cell.new em { color: var(--dim); font-weight: 500; text-align: left; }
.rt-lead { font-size: 13px; color: var(--text-2); margin-bottom: 12px; }
.rt-lead b { color: var(--text); }
.rt-lead.big { font-size: 18px; } .rt-lead.big b { color: var(--gold); font-size: 22px; }
.rt-vs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.rt-note { margin-top: 10px; font-size: 11.5px; color: var(--dim); }
.rt-pair > div > h2.section-title { margin-top: 36px; }
@media (max-width: 860px) {
  .rt-story { font-size: 15px; } .rt-story b { font-size: 18px; }
  .rt-pct { font-size: 21px; }
  .rt-mk-head > b { min-width: 0; }
  .rt-people { gap: 4px; max-width: none; }
  .rt-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rw-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; padding: 10px 12px; }
  .rw-row .rw-week, .rw-headrow span:first-child { grid-column: 1 / -1; }
  .rw-headrow span:first-child { display: none; }
  .rw-week { flex-direction: row; align-items: baseline; gap: 8px; }
  .rw-cell { gap: 5px; } .rw-cell em { min-width: 28px; font-size: 11.5px; }
  .rt-pair > div > h2.section-title { margin-top: 28px; }
}

/* --- Overview (2026-11-06 pass): conversion as 100 dots, players by build as bars --- */
.conv { display: grid; gap: 12px; }
.conv-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.conv-top b { font-size: 32px; font-weight: 800; color: var(--s3); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.conv-top span { font-size: 13px; color: var(--muted); }
.conv-dots { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 4px; max-width: 320px; }
.conv-dots i { aspect-ratio: 1; border-radius: 50%; background: var(--panel-3); }
.conv-dots i.on { background: var(--s3); box-shadow: 0 0 6px #199e7088; }
.ver-bars { display: grid; gap: 2px; }
.ver-row { display: grid; grid-template-columns: minmax(84px, 120px) minmax(0, 1fr) 82px; gap: 12px; align-items: center; padding: 8px 6px; border: 0; border-radius: 8px;
  background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ver-row:hover { background: #ffffff07; }
.ver-name { display: flex; flex-direction: column; min-width: 0; }
.ver-name b { font-size: 14px; font-variant-numeric: tabular-nums; }
.ver-name small { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--amber); }
.ver-row.old .ver-name b { color: var(--muted); }
.ver-track { height: 12px; border-radius: 99px; background: var(--panel-3); overflow: hidden; }
.ver-track i { display: block; height: 100%; border-radius: 99px; }
.ver-n { display: flex; align-items: baseline; justify-content: flex-end; gap: 6px; font-variant-numeric: tabular-nums; }
.ver-n b { font-size: 14px; } .ver-n em { font-style: normal; font-size: 12px; color: var(--muted); min-width: 32px; text-align: right; }
@media (max-width: 860px) { .ver-row { grid-template-columns: 74px minmax(0, 1fr) 72px; gap: 8px; } .conv-top b { font-size: 28px; } }

/* --- Player profile (js/player.js, 2026-11-06): hero facts, the Overview hub (glance cards, currencies strip, game modules),
   the module launcher and strip, the Safety verdict --- */
.pp-glances { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pp-glance { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line-soft);
  box-shadow: inset 0 3px 0 var(--tone); text-align: left; min-width: 0; transition: background .15s; }
.pp-glance:hover { background: var(--panel-2); }
.pg-k { display: flex; align-items: center; gap: 7px; width: 100%; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.pg-k i { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: color-mix(in srgb, var(--tone) 16%, transparent); color: var(--tone); font-style: normal; }
.pg-k i img { width: 18px; height: 18px; image-rendering: pixelated; }
.pg-k .nav-chev { font-size: 18px; line-height: 1; }
.pp-glance > b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pg-sub { font-size: 12px; color: var(--muted); }
.pp-wallet { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-coin { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px 7px 8px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line-soft); }
.pp-coin img { width: 20px; height: 20px; image-rendering: pixelated; }
.pp-coin b { font-size: 14px; font-variant-numeric: tabular-nums; }
.pp-modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.pp-module { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line-soft); text-align: left; min-width: 0;
  transition: background .15s, border-color .15s; }
.pp-module:hover { background: var(--panel-2); border-color: #f2c14e55; }
.pm-art { flex: none; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 35%, #2a3b63, #172238 70%); }
.pm-art img { width: 78%; height: 78%; object-fit: contain; image-rendering: pixelated; }
.pm-art.sm { width: 24px; height: 24px; border-radius: 7px; }
.pm-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pm-text b { font-size: 15px; }
.pm-text small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-modstrip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; margin-top: -4px; }
.pp-modstrip::-webkit-scrollbar { display: none; }
.pp-modstrip button { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 5px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel);
  color: var(--muted); font-size: 13px; font-weight: 650; white-space: nowrap; }
.pp-modstrip button:hover { color: var(--text); }
.pp-modstrip button.on { color: #1a1405; background: var(--gold); border-color: var(--gold); }
.pp-verdict { display: flex; align-items: center; gap: 14px; border-color: color-mix(in srgb, var(--tone) 40%, var(--line-soft));
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--tone) 16%, transparent), transparent 55%), var(--panel); }
.pp-verdict-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pp-verdict-text b { font-size: 20px; font-weight: 800; }
.pp-verdict-text span { font-size: 13px; color: var(--text-2); }
.pp-inc-list { margin: 0 -16px; border-top: 1px solid var(--line-soft); }
.pp-inc-list + .pp-more { margin-top: 10px; }
@media (max-width: 860px) {
  .pp-glances { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pp-glance { padding: 12px; } .pp-glance > b { font-size: 19px; }
  .pp-modules { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pp-module { flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px; }
  .pm-art { width: 42px; height: 42px; }
  .pp-verdict { flex-wrap: wrap; } .pp-verdict .btn { width: 100%; justify-content: center; }
  .pp-coin { padding: 5px 10px 5px 6px; } .pp-coin b { font-size: 13px; }
  .pp-inc-list { margin: 0 -14px; }
}

/* --- Player → Temple (js/player.js tabTemple): the game's star map, what each path holds --- */
.tm-mix { display: flex; gap: 3px; height: 12px; margin: 14px 0 8px; border-radius: 99px; overflow: hidden; background: var(--panel-3); }
.tm-mix i { display: block; min-width: 3px; }
.tm-paths { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.tm-path { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 2px 6px; padding: 7px 10px; border-radius: 10px; background: var(--panel-2); }
.tm-path.none { opacity: .5; }
.tm-path i { width: 8px; height: 8px; border-radius: 2px; background: var(--tone); align-self: center; }
.tm-path b { font-size: 12.5px; } .tm-path em { font-style: normal; font-size: 12.5px; font-weight: 800; color: var(--tone); }
.tm-path small { grid-column: 2 / -1; font-size: 11px; color: var(--muted); }
.tm-scroll { margin: 14px -16px 0; overflow: auto; border-radius: 12px; background: radial-gradient(circle at 50% 50%, #241a40, #0d0a1a 70%); max-height: 78vh; }
.tm-map { display: block; width: 100%; min-width: 680px; height: auto; }
.tm-ring { fill: none; stroke: #9e80d924; stroke-width: 10; }
.tm-disc { fill: #160f2a; stroke-width: 9; }
.tm-plate { fill: #0f0b1e; stroke-width: 6; }
.tm-lv { fill: #fff; font: 800 44px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; text-anchor: middle; }
.tm-lv.off { fill: #6f6890; }
.tm-name { font: 800 52px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; text-anchor: middle; letter-spacing: 4px; }
.tm-node { cursor: pointer; }
.tm-node:hover .tm-disc { fill: #251a44; }
@media (max-width: 860px) { .tm-scroll { margin: 12px -14px 0; } .tm-map { min-width: 760px; } }

/* The profile's icon bar: room under the hero (Monitor's bar sits right under its title) */
.mon-tabs.pp-tabs { margin-top: 14px; }
@media (max-width: 860px) { .mon-tabs.pp-tabs { margin-top: 12px; } }

/* Revenue → Sales: the one tile's sales and paying players, side by side, each with its change (2026-11-06) */
.kpis.one { grid-template-columns: minmax(0, 1fr); }
.kpis.one .kpi .value { font-size: 32px; }
.kpis.one .kpi .meta { display: block; }
.rv-counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0 8px; }
.rv-count { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.rv-count i { width: 8px; height: 8px; border-radius: 50%; background: var(--tone); flex: none; }
.rv-count b { font-size: 18px; color: var(--text); font-variant-numeric: tabular-nums; }
.rv-count span { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.rv-count .delta { margin-left: auto; font-size: 11px; padding: 1px 5px; flex: none; }
@media (max-width: 860px) { .kpis.one .kpi .value { font-size: 26px; } }

/* --- Retention: what a game adds (played each day, where players stop) --- */
.rt-group.static { cursor: default; }
.jr-bar { display: flex; height: 7px; margin-top: 5px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.jr-bar i, .jr-key i { display: block; height: 100%; }
.jr-bar .playing, .jr-key .playing { background: var(--s1); }
.jr-bar .stopped, .jr-key .stopped { background: repeating-linear-gradient(135deg, #ff6b6b, #ff6b6b 3px, #c2364f 3px, #c2364f 6px); }
.jr-stopped { color: var(--red); }
.jr-key { display: flex; flex-wrap: wrap; gap: 12px; margin: 14px 0 10px; font-size: 12px; color: var(--muted); }
.jr-key span { display: inline-flex; align-items: center; gap: 6px; }
.jr-key i { width: 14px; height: 7px; border-radius: 3px; }
.jr-group.open > .rb { background: #ffffff07; }
.jr-steps { margin: 8px 0 4px 14px; padding-left: 10px; border-left: 2px solid var(--line-soft); }
.rt-groups.jr-sum { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* --- A game's own lines on the server's health (IErpServerFacts): told, never judged --- */
.vital.info { --v: var(--blue); }

/* --- A game's own incident stories (IErpAntiCheat.Story): notes on top, the player's moves around it --- */
.update-note { display: flex; align-items: center; gap: 8px; padding: 7px 10px; margin-bottom: 10px; border-radius: 9px; font-size: 12.5px; font-weight: 600; color: var(--blue);
  background: #5aa9ff12; border: 1px solid #5aa9ff44; }
.ss-around { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: var(--chrome); border: 1px dashed var(--line); }
.ss-around > span { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ss-around > div { display: flex; flex-wrap: wrap; gap: 6px; }
.move { font-size: 12px; padding: 3px 8px; border-radius: 7px; background: var(--panel-2); color: var(--text-2); }

/* --- Tools → Codes (pages/codes.js): the composer is Mail's; the preview is a voucher, the code big, its rewards, its terms --- */
.inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline .field { flex: 1; min-width: 0; }
.code-input { font-size: 16px; letter-spacing: .08em; font-weight: 700; }
.code-create { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.voucher { border-radius: 16px; padding: 16px; background: radial-gradient(120% 90% at 50% 0%, #2b3f6e 0%, #16223d 55%, #0f182c 100%);
  border: 2px dashed #b48a3c88; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.voucher-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 24px; font-weight: 800; letter-spacing: .12em; color: #ffd978;
  text-shadow: 0 1px 0 #0008; overflow-wrap: anywhere; }
.voucher .letter-rewards { justify-content: center; margin-top: 0; }
.voucher-terms { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font-size: 12px; color: #e9dcbc; }
.code-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.code-head .btn { margin-left: auto; }

/* --- Tools → Wipe (pages/wipe.js): what goes and what stays, each with its count --- */
.wipe-zone { border-color: #ff6b6b55; }
.wipe-preview h4 { margin: 10px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.wipe-list { display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow-y: auto; font-size: 12.5px; }
.wipe-list div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border-bottom: 1px solid var(--line-soft); }
