/* DevStack — shared styles (clean dev-tool look: neutral greys, white accent, Inter) */
:root {
  --bg: #09090b;
  --bg-elev: #111113;
  --bg-hover: #18181b;
  --bg-input: #0c0c0e;
  --border: #232327;
  --border-strong: #34343a;
  --text: #ededef;
  --text-dim: #8b8b94;
  --text-faint: #5c5c66;
  --accent: #ededef;
  --accent-ink: #09090b;
  --accent-soft: rgba(255, 255, 255, 0.08);
  --primary-bg: #ededef;
  --primary-text: #09090b;
  --primary-hover: #ffffff;
  --success: #4ade80;
  --warn: #fbbf24;
  --danger: #f87171;
  --link: #60a5fa;
  --code-bg: #0c0c0e;
  --grid-line: rgba(255, 255, 255, 0.04);
  --radius: 10px;
  --radius-sm: 6px;
  --max: 1200px;
  --head-h: 56px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #fafafa;
  --bg-elev: #ffffff;
  --bg-hover: #f4f4f5;
  --bg-input: #ffffff;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --text: #09090b;
  --text-dim: #63636e;
  --text-faint: #a1a1aa;
  --accent: #09090b;
  --accent-ink: #fafafa;
  --accent-soft: rgba(0, 0, 0, 0.06);
  --primary-bg: #09090b;
  --primary-text: #fafafa;
  --primary-hover: #27272a;
  --success: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
  --link: #2563eb;
  --code-bg: #f4f4f5;
  --grid-line: rgba(0, 0, 0, 0.05);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 12px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); letter-spacing: -0.02em; font-weight: 600; }
h2 { font-size: 1.05rem; }
h3 { font-size: 0.95rem; }
p { margin: 0 0 1em; }
code, pre, kbd { font-family: var(--mono); font-size: 0.86em; }
:not(pre) > code {
  background: var(--code-bg);
  border: 1px solid var(--border);
  padding: 0.05em 0.35em;
  border-radius: var(--radius-sm);
}
kbd {
  border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: var(--radius-sm);
  padding: 0 0.4em; background: var(--bg-elev); color: var(--text-dim);
}
.num, .mono { font-family: var(--font); font-variant-numeric: tabular-nums; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
@media (max-width: 560px) { .container { padding: 0 16px; } }

/* Header: one dense bar */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: stretch; gap: 0; height: var(--head-h); }
.logo { display: flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; font-family: var(--font); font-weight: 600; font-size: 0.95rem; letter-spacing: -0.02em; padding-right: 20px; margin-right: 6px; border-right: 1px solid var(--border); }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 22px; height: 22px; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; flex: none;
}
.logo-mark svg { width: 13px; height: 13px; }
.nav-links { display: flex; gap: 0; align-items: stretch; flex: 1; min-width: 0; }
.nav-links > a { display: flex; align-items: center; color: var(--text-dim); padding: 0 12px; font-size: 0.85rem; font-weight: 500; text-decoration: none; position: relative; white-space: nowrap; }
.nav-links > a:hover { color: var(--text); background: var(--bg-hover); }
.nav-links > a[aria-current="page"] { color: var(--text); }
.nav-links > a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--accent); }
.nav-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; padding-left: 12px; }
.nav-live { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font); font-size: 0.74rem; color: var(--text-dim); text-decoration: none; padding: 4px 9px; border: 1px solid var(--border); border-radius: var(--radius-sm); white-space: nowrap; }
.nav-live:hover { color: var(--text); border-color: var(--border-strong); text-decoration: none; }
.nav-live strong { color: var(--text); font-weight: 500; }
.nav-live:empty { display: none; }
.icon-btn {
  background: transparent; border: 1px solid var(--border); color: var(--text-dim);
  width: 30px; height: 30px; border-radius: var(--radius-sm); cursor: pointer; font-size: 0.9rem;
  display: grid; place-items: center;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text); }
.menu-toggle { display: none; }
@media (max-width: 1080px) { .nav-live { display: none; } }
@media (max-width: 860px) {
  .menu-toggle { display: grid; margin: auto 0 auto auto; }
  .logo { border-right: 0; }
  .nav-links {
    display: none; position: absolute; top: var(--head-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: 6px 0 14px;
  }
  .nav-links.open { display: flex; }
  .nav-links > a { padding: 11px 20px; border-bottom: 1px solid var(--border); }
  .nav-links > a[aria-current="page"]::after { left: 0; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .nav-tools { margin: 12px 0 0; padding: 0 20px; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary-bg); color: var(--primary-text); border: 1px solid var(--primary-bg);
  padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.86rem;
  cursor: pointer; font-family: inherit; text-decoration: none; white-space: nowrap; transition: background 0.12s, border-color 0.12s;
}
.btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--primary-text); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); border-color: var(--text-faint); }
.btn-sm { padding: 4px 10px; font-size: 0.78rem; }
.btn-kofi { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-kofi:hover { background: var(--bg-hover); color: var(--text); }

/* Panels */
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px;
}
a.card { color: var(--text); display: block; text-decoration: none; transition: border-color 0.12s, background 0.12s; position: relative; }
a.card:hover { border-color: var(--border-strong); background: var(--bg-hover); }
.card p { color: var(--text-dim); margin: 0; font-size: 0.86rem; }
.card h3 { margin-bottom: 6px; }
.card h2 { font-size: 0.98rem; }
.tag { font-size: 0.68rem; padding: 1px 6px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); color: var(--text-dim); font-family: var(--font); }

/* Section labels: small caps line with a rule, like a board */
.section { padding: 28px 0; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.section-title h2 { margin: 0; font-size: 0.74rem; font-family: var(--font); font-weight: 500; color: var(--text); text-transform: uppercase; letter-spacing: 0.08em; }
.section-title a.hint { font-family: var(--font); font-size: 0.74rem; text-decoration: none; }
.section-title a.hint:hover { color: var(--accent); }

/* Generic page head: left-aligned title row, no breadcrumb trail */
.tool-head { padding: 28px 0 18px; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.tool-head h1 { font-size: clamp(1.45rem, 3vw, 1.9rem); margin-bottom: 6px; }
.tool-head > p { color: var(--text-dim); max-width: 720px; margin: 0; font-size: 0.92rem; }
.breadcrumb { display: none; }
.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; align-items: start; }
.tool-layout:not(:has(> aside > :not(.ad-slot:not(.ad-on)))) { grid-template-columns: minmax(0, 1fr); }
.tool-layout:not(:has(> aside > :not(.ad-slot:not(.ad-on)))) > aside { display: none; }
@media (max-width: 960px) { .tool-layout { grid-template-columns: minmax(0, 1fr); } }
.sidebar { display: flex; flex-direction: column; gap: 12px; position: sticky; top: calc(var(--head-h) + 14px); }
@media (max-width: 960px) { .sidebar { position: static; } }
.card + .card, .stack > * + * { margin-top: 12px; }

/* Forms */
label { display: block; font-weight: 500; font-size: 0.82rem; margin-bottom: 6px; color: var(--text); }
.hint { color: var(--text-dim); font-size: 0.8rem; font-weight: 400; }
input:not([type]), input[type="text"], input[type="number"], input[type="search"], input[type="url"], input[type="email"], textarea, select {
  width: 100%; background: var(--bg-input); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 12px;
  font-family: inherit; font-size: 0.92rem; transition: border-color 0.15s, box-shadow 0.15s;
}
input[type="number"] { font-family: var(--font); font-size: 0.88rem; }
input:hover, textarea:hover, select:hover { border-color: var(--border-strong); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="color"] { width: 48px; height: 40px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-input); padding: 3px; cursor: pointer; }
textarea { resize: vertical; min-height: 120px; }
.field { margin-bottom: 14px; }
.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }

/* Segmented control */
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 2px; background: var(--bg-input); margin-bottom: 16px; flex-wrap: wrap; }
.segmented button {
  background: transparent; border: none; color: var(--text-dim); padding: 6px 12px; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.82rem; cursor: pointer;
}
.segmented button.active { background: var(--bg-hover); color: var(--text); box-shadow: 0 0 0 1px var(--border-strong); }

/* Results */
.result-grid { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-top: 8px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.stat { background: var(--bg-input); padding: 14px; }
.stat .label { color: var(--text-dim); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--font); }
.stat .value { font-size: 1.3rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat .value.good { color: var(--success); }

/* Code blocks */
.code-wrap { position: relative; margin: 8px 0 16px; }
pre {
  background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px; overflow-x: auto; margin: 0; line-height: 1.6; tab-size: 4;
}
.copy-btn {
  position: absolute; top: 8px; right: 8px;
  background: var(--bg-elev); color: var(--text-dim); border: 1px solid var(--border);
  font-size: 0.72rem; padding: 3px 9px; border-radius: var(--radius-sm); cursor: pointer; font-family: var(--font);
}
.copy-btn:hover { color: var(--text); border-color: var(--border-strong); }
.copy-btn.copied { color: var(--success); border-color: var(--success); }
.output-line { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.output-line code { flex: 1; min-width: 0; display: block; padding: 9px 12px; overflow-x: auto; white-space: nowrap; border-radius: var(--radius-sm); }

/* Snippets */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 20px; }
.chip {
  background: transparent; border: 1px solid var(--border); color: var(--text-dim);
  padding: 4px 12px; border-radius: var(--radius-sm); cursor: pointer; font-size: 0.8rem; font-family: inherit;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.active { color: var(--primary-text); background: var(--primary-bg); border-color: var(--primary-bg); }
.snippet { margin-bottom: 12px; }
.snippet-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.tag { font-size: 0.7rem; padding: 1px 7px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); color: var(--text-dim); font-family: var(--font); }
.empty { color: var(--text-dim); text-align: center; padding: 32px; }

/* Ads + support */
.ad-slot {
  border: 1px dashed var(--border); border-radius: var(--radius);
  min-height: 100px; display: grid; place-items: center;
  color: var(--text-faint); font-size: 0.72rem; text-align: center; padding: 12px; font-family: var(--font); text-transform: uppercase; letter-spacing: 0.08em;
}
.ad-slot.tall { min-height: 250px; }
.ad-slot.wide { min-height: 90px; margin: 24px 0; }

/* Prose pages */
.prose { max-width: 720px; padding: 44px 0; }
.prose h2 { margin-top: 1.8em; }
.prose p, .prose li { color: var(--text-dim); }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.5em; }
.prose li::marker { color: var(--text-faint); }

/* Swatch */
.swatch { width: 100%; height: 72px; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.swatch-row { display: flex; gap: 12px; align-items: center; }
.swatch-sm { width: 40px; height: 40px; border-radius: var(--radius-sm); border: 1px solid var(--border); flex-shrink: 0; }

/* Counter bars */
.meter { height: 4px; background: var(--border); border-radius: var(--radius-sm); overflow: hidden; margin-top: 8px; }
.meter > span { display: block; height: 100%; background: var(--success); transition: width 0.15s; }
.meter.warn > span { background: var(--warn); }
.meter.over > span { background: var(--danger); }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 5px 0; display: flex; gap: 10px; color: var(--text-dim); font-size: 0.9rem; }
.checklist li.ok { color: var(--text); }
.checklist li::before { content: "✕"; color: var(--danger); font-family: var(--font); font-size: 0.8rem; width: 14px; flex-shrink: 0; }
.checklist li.ok::before { content: "✓"; color: var(--success); }
.tile-preview { width: 170px; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.tile-preview .thumb { height: 96px; background: linear-gradient(135deg, #3f3f46, #18181b); }
.tile-preview .name { padding: 8px 10px; font-weight: 600; font-size: 0.85rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.1em; }

/* UDim2 preview */
.screen-preview {
  position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 0 auto;
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 10% 10%,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 10% 10%,
    var(--bg-input);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden;
}
.screen-preview .gui-el {
  position: absolute; background: var(--accent-soft); border: 1.5px solid var(--accent); border-radius: var(--radius-sm);
  display: grid; place-items: center; font-family: var(--font); font-size: 0.7rem; color: var(--accent); overflow: hidden;
}
.screen-preview .anchor-dot { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); transform: translate(-50%, -50%); box-shadow: 0 0 0 2px var(--bg-input); }
.device-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }

/* ---------- Tracker ---------- */
.stat-strip { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 16px; font-family: var(--font); font-size: 0.8rem; color: var(--text-dim); }
.stat-strip strong { color: var(--text); font-weight: 500; }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: none; margin-right: 6px; vertical-align: 1px; animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 50% { opacity: 0.35; } }

.search-wrap { position: relative; margin-bottom: 16px; }
.search-wrap input { padding-left: 38px; height: 44px; font-size: 0.95rem; }
.search-wrap .search-ico { position: absolute; left: 13px; top: 13px; color: var(--text-faint); pointer-events: none; }
.suggest { position: absolute; top: 48px; left: 0; right: 0; z-index: 20; background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; box-shadow: 0 12px 32px rgba(0,0,0,0.35); }
.suggest a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: var(--text); text-decoration: none; font-size: 0.88rem; }
.suggest a:hover, .suggest a.active { background: var(--bg-hover); }
.suggest .hint { margin-left: auto; font-family: var(--font); }

.game-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.game-table th { text-align: left; font-family: var(--font); font-weight: 500; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); padding: 0 10px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.game-table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.game-table tr:last-child td { border-bottom: none; }
.game-table tbody tr { transition: background 0.1s; cursor: pointer; }
.game-table tbody tr:hover { background: var(--bg-hover); }
.game-table .num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font); font-size: 0.82rem; white-space: nowrap; }
.game-table .rank { color: var(--text-faint); font-family: var(--font); font-size: 0.78rem; width: 36px; }
.game-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.game-cell a { color: var(--text); text-decoration: none; font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-cell .creator { color: var(--text-dim); font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-cell > div { min-width: 0; }
.game-icon { border-radius: var(--radius-sm); flex-shrink: 0; background: var(--bg-hover); object-fit: cover; border: 1px solid var(--border); }
.game-icon.placeholder { display: inline-block; }
.table-card { padding: 8px 0 0; overflow: hidden; }
.table-card .game-table th:first-child, .table-card .game-table td:first-child { padding-left: 16px; }
.table-card .game-table th:last-child, .table-card .game-table td:last-child { padding-right: 16px; }
@media (max-width: 640px) { .hide-sm { display: none; } .game-table td, .game-table th { padding-left: 6px; padding-right: 6px; } }

.chg { font-family: var(--font); font-size: 0.8rem; white-space: nowrap; }
.chg.up { color: var(--success); }
.chg.down { color: var(--danger); }
.chg.flat { color: var(--text-faint); }
.verified { display: inline-block; width: 13px; height: 13px; vertical-align: -2px; margin-left: 3px; color: var(--accent); }

.pulse-list { list-style: none; margin: 0; padding: 0; }
.pulse-list li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.84rem; }
.pulse-list li:last-child { border-bottom: none; }
.pulse-list a { color: var(--text); text-decoration: none; font-weight: 500; }
.pulse-list a:hover { text-decoration: underline; }
.pulse-list .meta { color: var(--text-faint); font-family: var(--font); font-size: 0.72rem; margin-top: 2px; }
.pill { font-family: var(--font); font-size: 0.66rem; padding: 1px 6px; border-radius: var(--radius-sm); text-transform: uppercase; letter-spacing: 0.04em; }
.pill.high { color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); }
.pill.surge { color: var(--success); border: 1px solid color-mix(in srgb, var(--success) 40%, transparent); }

.loading, .error-box { padding: 32px; text-align: center; color: var(--text-dim); font-size: 0.9rem; }
.error-box { color: var(--danger); }
.skeleton { background: linear-gradient(90deg, var(--bg-hover), var(--border), var(--bg-hover)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { to { background-position: -200% 0; } }

.game-hero { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.game-hero .game-icon { border-radius: var(--radius); }
.game-hero h1 { margin-bottom: 4px; font-size: clamp(1.5rem, 3.5vw, 2.1rem); word-break: break-word; }
.game-hero .sub { color: var(--text-dim); font-size: 0.9rem; display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; }
.game-hero .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.game-hero > div { min-width: 0; flex: 1; }

.chart-box { position: relative; }
.chart-svg .grid { stroke: var(--border); stroke-width: 1; }
.chart-svg .axis { fill: var(--text-faint); font-size: 11px; font-family: var(--font); }
.chart-svg .hover-line { stroke: var(--border-strong); stroke-dasharray: 3 3; }
.chart-svg .hover-dot { fill: var(--accent); stroke: var(--bg-elev); stroke-width: 2; }
.chart-tip { position: absolute; top: 4px; transform: translateX(-50%); background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 6px 10px; font-size: 0.78rem; pointer-events: none; white-space: nowrap; text-align: center; }
.chart-tip span { color: var(--text-dim); font-family: var(--font); font-size: 0.7rem; }
.chart-empty { height: 200px; display: grid; place-items: center; color: var(--text-dim); font-size: 0.88rem; text-align: center; padding: 16px; border: 1px dashed var(--border); border-radius: var(--radius-sm); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.card-head .segmented { margin: 0; }

.endpoint { border-top: 1px solid var(--border); padding: 20px 0; }
.endpoint:first-of-type { border-top: none; }
.endpoint h3 { font-family: var(--mono); font-size: 0.92rem; font-weight: 500; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; word-break: break-all; }
.method { font-size: 0.7rem; padding: 2px 7px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
.params { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin: 8px 0 12px; }
.params td { padding: 6px 8px; border-bottom: 1px solid var(--border); color: var(--text-dim); vertical-align: top; }
.params td:first-child { font-family: var(--mono); color: var(--text); white-space: nowrap; width: 1%; }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--primary-bg); color: var(--primary-text); font-size: 0.85rem; font-weight: 500;
  padding: 8px 16px; border-radius: var(--radius-sm); opacity: 0; transition: all 0.2s; pointer-events: none; z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- Tracker extras: sub-nav, filters, watchlist stars, compare, trends, alerts ---- */
.subnav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.subnav a { display: inline-flex; align-items: center; gap: 6px; font-size: 0.84rem; font-weight: 500; color: var(--text-dim); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 5px 12px; background: var(--bg-elev); }
.subnav a:hover, .subnav a[aria-current="page"] { color: var(--text); border-color: var(--border-strong); text-decoration: none; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: -6px 0 14px; }
.filter-bar[hidden] { display: none; }
.filter-bar label { margin: 0; font-size: 0.82rem; color: var(--text-dim); }
.filter-bar select { width: auto; min-width: 150px; padding: 6px 10px; font-size: 0.85rem; }
.star-btn { background: none; border: 0; color: var(--text-faint); font-size: 1.05rem; line-height: 1; cursor: pointer; padding: 4px; border-radius: var(--radius-sm); flex: none; }
.star-btn:hover, .star-btn[aria-pressed="true"] { color: var(--warn); }
.star-btn:focus-visible { outline: 2px solid var(--accent); }
.game-cell .star-btn { margin-left: auto; }
a.creator-link { color: inherit; }
a.creator-link:hover { color: var(--text); }
.chart-svg .marker { stroke: var(--warn); stroke-width: 1; stroke-dasharray: 2 3; opacity: 0.8; }
.chart-svg .marker-dot { fill: var(--warn); }
.tip-upd { color: var(--warn); font-style: normal; }
.tip-row { display: flex; align-items: center; gap: 6px; }
.tip-row i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.legend-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.legend-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 6px 4px 10px; font-size: 0.84rem; background: var(--bg-input); max-width: 100%; }
.legend-chip i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.legend-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend-chip button { background: none; border: 0; color: var(--text-faint); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 4px; }
.legend-chip button:hover { color: var(--danger); }
.table-scroll { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.compare-table th, .compare-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.compare-table th:first-child, .compare-table td:first-child { text-align: left; color: var(--text-dim); font-weight: 500; }
.compare-table thead th { font-size: 0.8rem; color: var(--text); }
.compare-table tr:last-child td { border-bottom: 0; }
.trend-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.trend-grid > .card { margin: 0; min-width: 0; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.mini-list li:last-child { border-bottom: 0; }
.mini-list .grow { flex: 1; min-width: 0; }
.mini-list .grow a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; color: var(--text); }
.mini-list .meta { font-size: 0.76rem; color: var(--text-dim); font-family: var(--font); }
.mini-list .right { text-align: right; font-family: var(--font); font-variant-numeric: tabular-nums; font-size: 0.86rem; white-space: nowrap; }
.summary { font-size: 1.02rem; line-height: 1.7; color: var(--text); max-width: 75ch; margin: 0; }
.pill.update { color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.check-row { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.check-row label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; cursor: pointer; }
.check-row input { accent-color: var(--accent); width: 16px; height: 16px; }
.steps { margin: 0 0 14px; padding-left: 20px; color: var(--text-dim); font-size: 0.9rem; display: grid; gap: 6px; }
.steps strong { color: var(--text); }
.beta-tag { font-family: var(--font); font-size: 0.66rem; color: var(--success); border: 1px solid color-mix(in srgb, var(--success) 40%, transparent); border-radius: var(--radius-sm); padding: 1px 6px; text-transform: uppercase; letter-spacing: 0.04em; vertical-align: middle; }
.filter-bar [hidden] { display: none; }
[hidden] { display: none !important; }

/* ---- Ticking numbers ---- */
.tick { font-variant-numeric: tabular-nums; border-radius: var(--radius-sm); }
.tick-up { animation: tick-up 1.6s ease-out; }
.tick-down { animation: tick-down 1.6s ease-out; }
@keyframes tick-up { 0%, 30% { color: var(--success); background: color-mix(in srgb, var(--success) 16%, transparent); } 100% { background: transparent; } }
@keyframes tick-down { 0%, 30% { color: var(--danger); background: color-mix(in srgb, var(--danger) 16%, transparent); } 100% { background: transparent; } }

/* ---- Sparklines ---- */
.spark { display: block; margin-left: auto; overflow: visible; }
.spark-line { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.spark-area { fill: currentColor; opacity: 0.12; stroke: none; }
.spark-dot { fill: currentColor; stroke: var(--bg-elev); stroke-width: 1.5; }
.spark.up { color: var(--success); }
.spark.down { color: var(--danger); }
.spark.flat { color: var(--text-faint); }
.spark-empty { color: var(--text-faint); }
.game-table td.spark-cell { width: 100px; padding-top: 4px; padding-bottom: 4px; }

/* ---- Ticker ---- */
.ticker { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-elev); overflow: hidden; font-size: 0.84rem; margin: 18px 0 0; min-width: 0; max-width: 100%; }
.ticker[hidden] { display: none; }
.tk-label { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-family: var(--font); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text); border-right: 1px solid var(--border); white-space: nowrap; background: var(--bg-input); flex: none; }
.tk-viewport { overflow: hidden; flex: 1; min-width: 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.tk-track { display: inline-flex; white-space: nowrap; animation: tk-scroll 60s linear infinite; padding: 8px 0; }
.ticker:hover .tk-track, .ticker:focus-within .tk-track { animation-play-state: paused; }
.tk-dup { display: inline-flex; }
.tk-item { display: inline-flex; align-items: center; gap: 6px; padding: 0 22px; color: var(--text-dim); border-right: 1px solid var(--border); }
.tk-item a { color: var(--text); font-weight: 600; text-decoration: none; }
.tk-item a:hover { text-decoration: underline; }
.tk-item strong { color: var(--text); }
.tk-ago { color: var(--text-faint); font-family: var(--font); font-size: 0.72rem; }
@keyframes tk-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .tk-track { animation: none; }
  .tk-dup { display: none; }
  .tk-viewport { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
}

/* ---- Game of the day ---- */
.gotd { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 16px 18px; margin-bottom: 16px; border-color: color-mix(in srgb, var(--warn) 35%, var(--border));
  background: linear-gradient(110deg, color-mix(in srgb, var(--warn) 12%, transparent), transparent 60%), var(--bg-elev); }
.gotd[hidden] { display: none; }
.gotd .game-icon { border-radius: var(--radius); }
.gotd .grow { flex: 1; min-width: 180px; }
.gotd .kicker { font-family: var(--font); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--warn); }
.gotd h2 { margin: 2px 0; font-size: 1.15rem; }
.gotd h2 a { color: var(--text); text-decoration: none; }
.gotd h2 a:hover { text-decoration: underline; }
.gotd .why { color: var(--text-dim); font-size: 0.86rem; }
.gotd .nums { display: flex; gap: 18px; font-family: var(--font); font-size: 0.82rem; color: var(--text-dim); }
.gotd .nums strong { display: block; color: var(--text); font-size: 1.05rem; }

/* ---- Game-coloured pages ---- */
body.game-themed { --accent: var(--game-d); --accent-soft: color-mix(in srgb, var(--game-d) 12%, transparent); }
:root[data-theme="light"] body.game-themed { --accent: var(--game-l); --accent-soft: color-mix(in srgb, var(--game-l) 9%, transparent); }
body.game-themed .tool-head { position: relative; isolation: isolate; }
body.game-themed .tool-head::before { content: ""; position: absolute; inset: -40px -50vw 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 120% at 20% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%); }
body.game-themed .game-hero .game-icon { box-shadow: 0 10px 40px -8px color-mix(in srgb, var(--accent) 55%, transparent); }
body.game-themed .game-hero .btn:not(.btn-ghost) { background: var(--accent); border-color: var(--accent); color: #0b0d12; }
:root[data-theme="light"] body.game-themed .game-hero .btn:not(.btn-ghost) { color: #fff; }
main { overflow-x: clip; }

/* ---- Badge embed + genres ---- */
.badge-preview { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.badge-preview img { display: block; height: 22px; max-width: 100%; }
.genre-bar { height: 8px; border-radius: var(--radius-sm); background: var(--bg-input); overflow: hidden; min-width: 60px; }
.genre-bar i { display: block; height: 100%; background: var(--accent); border-radius: var(--radius-sm); }
.genre-tops { display: flex; gap: 4px; }
.genre-tops .game-icon { border-radius: var(--radius-sm); }

/* Let the game-name column shrink (with "…") so the numbers always fit on phones */
.game-table td:has(> .game-cell) { width: 100%; max-width: 0; }
@media (max-width: 640px) { .game-table td.spark-cell { width: 66px; } .game-table td.spark-cell .spark { width: 60px; } .game-cell .game-icon { width: 32px; height: 32px; } }
@media (max-width: 480px) { .game-table .star-btn { display: none; } .game-table .rank { width: 22px; } .game-cell { gap: 8px; } .game-table td.spark-cell { width: 54px; } .game-table td.spark-cell .spark { width: 50px; } }
@media (max-width: 480px) { .genre-share { min-width: 84px !important; } .genre-share .chg { display: none; } }

/* ================= Community ================= */
/* ---- Nav sign-in ---- */
.nav-auth { position: relative; margin-left: 8px; display: inline-flex; align-items: center; }
.nav-auth:empty { display: none; }
.nav-links a.nav-signin { color: var(--primary-text); padding: 6px 12px; }
.nav-links a.nav-signin:hover { color: var(--primary-text); background: var(--primary-hover); }
.nav-avatar { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--bg-hover); padding: 0; cursor: pointer; overflow: hidden; display: grid; place-items: center; }
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; }
.av-fallback { font-weight: 600; font-size: 0.85rem; color: var(--text); }
.nav-menu { position: absolute; right: 0; top: 42px; z-index: 50; min-width: 200px; background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 6px; box-shadow: 0 12px 40px -12px rgba(0,0,0,.5); }
.nav-menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; display: flex; flex-direction: column; }
.nav-links .nav-menu a, .nav-menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--text); background: none; border: 0; font: inherit; font-size: 0.88rem; cursor: pointer; }
.nav-menu button:hover, .nav-links .nav-menu a:hover { background: var(--bg-hover); }
@media (max-width: 760px) {
  .nav-auth { margin: 10px 0 0 10px; }
  .nav-menu { left: 0; right: auto; }
}

/* ---- Avatars ---- */
.avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--bg-hover); display: block; }
.avatar-fallback { display: grid; place-items: center; font-weight: 600; color: var(--text); border: 1px solid var(--border-strong); }

/* ---- Feed layout ---- */
.feed-layout { display: grid; grid-template-columns: minmax(0, 620px) 300px; gap: 28px; justify-content: center; align-items: start; padding-top: 24px; }
@media (max-width: 960px) { .feed-layout { grid-template-columns: minmax(0, 1fr); } .feed-layout .sidebar { display: none; } }
.feed-col { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); overflow: hidden; min-width: 0; }
.feed-tabs { display: flex; border-bottom: 1px solid var(--border); position: sticky; top: 56px; z-index: 5; background: color-mix(in srgb, var(--bg-elev) 88%, transparent); backdrop-filter: blur(10px); }
.feed-tabs button { flex: 1; background: none; border: 0; color: var(--text-dim); font: inherit; font-size: 0.88rem; font-weight: 500; padding: 14px 8px; cursor: pointer; position: relative; }
.feed-tabs button:hover { background: var(--bg-hover); color: var(--text); }
.feed-tabs button.active { color: var(--text); }
.feed-tabs button.active::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: 0; height: 3px; border-radius: 3px; background: var(--accent); }
.feed-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.feed-head h1 { font-size: 1.15rem; margin: 0; }
.feed-more { display: block; width: 100%; padding: 16px; background: none; border: 0; border-top: 1px solid var(--border); color: var(--accent); font: inherit; cursor: pointer; }
.feed-more:hover { background: var(--bg-hover); }
.feed-empty { padding: 48px 24px; text-align: center; color: var(--text-dim); }

/* ---- Composer ---- */
.composer { display: flex; gap: 12px; padding: 16px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.composer-out { align-items: center; flex-wrap: wrap; }
.composer-out > div { flex: 1; min-width: 160px; }
.composer-out p { margin: 2px 0 0; }
.composer-main { flex: 1; min-width: 0; }
.composer textarea { border: 0; background: transparent; padding: 8px 0; min-height: 0; resize: none; font-size: 1.05rem; box-shadow: none; }
.composer textarea:focus { box-shadow: none; }
.composer-bar { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--border); padding-top: 10px; margin-top: 6px; }
.composer-bar .icon-btn { margin: 0; color: var(--accent); border-color: transparent; }
.composer-bar .icon-btn:hover { background: var(--accent-soft); }
.composer-bar .btn { margin-left: auto; border-radius: var(--radius-sm); padding: 7px 18px; }
.composer-bar .btn:disabled { opacity: 0.45; cursor: default; }
.composer-count { font-family: var(--font); }
.composer-count.over { color: var(--danger); }
.composer-game { position: relative; margin: 6px 0; }
.composer-pick { margin: 6px 0 4px; }
.composer-x { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--bg-elev); color: var(--text); cursor: pointer; line-height: 1; }

/* ---- Posts ---- */
.post { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.12s; }
.post:hover { background: color-mix(in srgb, var(--bg-hover) 60%, transparent); }
.post-main { cursor: default; }
.post-main:hover { background: none; }
.post-main .post-text { font-size: 1.1rem; }
.post-av { flex-shrink: 0; }
.post-body { flex: 1; min-width: 0; }
.post-head { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.post-head .hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.post-name { color: var(--text); font-weight: 600; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.post-name:hover, .post-time:hover { text-decoration: underline; }
.post-time { color: inherit; text-decoration: none; }
.post-menu-wrap { margin-left: auto; position: relative; flex-shrink: 0; align-self: flex-start; }
.post-menu { position: absolute; right: 0; top: 30px; z-index: 10; background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 4px; min-width: 140px; box-shadow: 0 12px 30px -10px rgba(0,0,0,.5); }
.post-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--text); font: inherit; font-size: 0.86rem; padding: 7px 10px; border-radius: var(--radius-sm); cursor: pointer; }
.post-menu button:hover { background: var(--bg-hover); }
.post-menu .danger { color: var(--danger); }
.post-text { margin: 2px 0 0; color: var(--text); font-size: 0.95rem; line-height: 1.5; overflow-wrap: anywhere; }
.post-text a { color: var(--accent); }
.post-actions { display: flex; gap: 28px; margin-top: 8px; }
.post-act { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 4px; margin-left: -4px; color: var(--text-dim); font: inherit; font-size: 0.82rem; cursor: pointer; border-radius: var(--radius-sm); text-decoration: none; font-variant-numeric: tabular-nums; }
.post-act:hover { color: var(--accent); }
.post-act.like:hover, .post-act.like.on { color: #f43f5e; }
.post-act.like.on svg { fill: currentColor; }
.post-act.like.on svg { animation: pop 0.3s ease-out; }
@keyframes pop { 50% { transform: scale(1.3); } }
.post-more { margin: -4px -4px 0 0; }
.post-thread-line { padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.reply-head { padding: 12px 16px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 0.9rem; }

/* ---- Game card inside posts ---- */
.game-card { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-input); color: var(--text); text-decoration: none; max-width: 480px; transition: border-color .15s, transform .15s; }
.game-card:hover { border-color: var(--border-strong); text-decoration: none; transform: translateY(-1px); }
.game-card .game-icon { border-radius: var(--radius); flex: none; }
.gc-main .hint { white-space: normal !important; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; line-height: 1.35; }
.gc-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.gc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gc-main strong, .gc-main .hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-spark .spark { margin: 0; }
.gc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.gc-stat { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; background: var(--bg-elev); min-width: 0; }
.gc-stat b { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font); font-size: .95rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gc-stat b i { font-style: normal; font-weight: 400; color: var(--text-dim); font-size: .75rem; margin-left: -4px; }
.gc-stat b .chg { font-size: .7rem; font-weight: 500; }
.gc-stat b .hint { font-family: var(--font); font-weight: 400; font-size: .8rem; }
.gc-stat small { color: var(--text-dim); font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; font-family: var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 480px) { .gc-spark { display: none; } }

/* ---- Side cards ---- */
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li + li { border-top: 1px solid var(--border); }
.side-list a { display: flex; align-items: center; gap: 10px; padding: 9px 0; color: var(--text); text-decoration: none; font-size: 0.86rem; min-width: 0; }
.side-list a:hover strong { text-decoration: underline; }
.side-list .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.side-list .grow strong, .side-list .grow .hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Profile ---- */
.profile-head { display: flex; gap: 16px; align-items: center; padding: 20px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.profile-head h1 { margin: 0; font-size: 1.3rem; }
.profile-stats { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 6px; font-size: 0.86rem; color: var(--text-dim); }
.profile-stats strong { color: var(--text); }

/* ---- Marketplace ---- */
.market-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.market-bar .search-wrap { margin: 0; flex: 1 1 220px; max-width: 320px; }
.market-bar select { width: auto; padding: 7px 10px; font-size: 0.85rem; }
.pill-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.pill-tabs button { border: 1px solid var(--border); background: var(--bg-elev); color: var(--text-dim); border-radius: var(--radius-sm); padding: 6px 14px; font: inherit; font-size: 0.84rem; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.pill-tabs button:hover { color: var(--text); border-color: var(--border-strong); }
.pill-tabs button.active { background: var(--primary-bg); color: var(--primary-text); border-color: var(--primary-bg); }
.pill-tabs .n { font-family: var(--font); font-size: 0.72rem; opacity: 0.7; }
.market-grid { display: grid; gap: 22px 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
@media (max-width: 520px) { .market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; } }
.listing-card { display: flex; flex-direction: column; gap: 4px; color: var(--text); text-decoration: none; min-width: 0; }
.listing-card:hover { text-decoration: none; }
.listing-card:hover .lc-img img { transform: scale(1.04); }
.lc-img { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: linear-gradient(135deg, hsl(var(--h, 220) 60% 35%), hsl(calc(var(--h, 220) + 50) 60% 22%)); border: 1px solid var(--border); margin-bottom: 6px; display: block; }
.lc-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.lc-ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.2rem; font-weight: 800; color: rgba(255,255,255,.85); letter-spacing: -0.04em; }
.lc-time, .lc-kind, .lc-seller { position: absolute; display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 600; padding: 3px 8px; border-radius: var(--radius-sm); background: rgba(255,255,255,.94); color: #18181b; font-variant-numeric: tabular-nums; max-width: calc(100% - 16px); }
.lc-time { top: 8px; left: 8px; color: #dc2626; font-family: var(--font); }
.lc-time.buy { color: #15803d; font-family: var(--font); }
.lc-time.sold, .lc-time.ended { color: #52525b; }
.lc-kind { top: 8px; right: 8px; background: rgba(9,9,11,.72); color: #fff; font-weight: 500; }
.lc-seller { bottom: 8px; left: 8px; font-weight: 500; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lc-seller .avatar { width: 18px; height: 18px; font-size: 9px; }
.owner-tick { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: #2563eb; color: #fff; flex-shrink: 0; }
.owner-tick svg { width: 10px; height: 10px; }
.lc-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-price strong { font-size: 1rem; }
.lc-stats { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.78rem; }
.lc-stats .spark { margin: 0; display: inline-block; }
.lc-stats .live-dot { margin-right: 4px; }

/* Listing page */
.listing-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; padding-top: 24px; }
@media (max-width: 900px) { .listing-layout { grid-template-columns: minmax(0, 1fr); } }
.listing-hero { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); position: relative; }
.listing-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.listing-hero .lc-ph { font-size: 4rem; }
.price-box { position: sticky; top: 72px; }
@media (max-width: 900px) { .price-box { position: static; } }
.price-box .big { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.price-box .ends { display: flex; align-items: center; gap: 8px; font-family: var(--font); font-size: 0.9rem; margin: 8px 0 14px; color: var(--text-dim); }
.price-box .ends.soon span, .ends.soon { color: var(--danger); }
.bid-row { display: flex; gap: 8px; }
.bid-row input { flex: 1; }
.contact-box { background: var(--bg-input); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 12px; font-family: var(--mono); word-break: break-all; }
.bids-list { list-style: none; margin: 0; padding: 0; font-size: 0.86rem; }
.bids-list li { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--border); }
.bids-list li:first-child { border-top: 0; }
.bids-list .amt { margin-left: auto; font-family: var(--font); font-weight: 600; }
.seller-card { display: flex; gap: 12px; align-items: center; }
.safety { font-size: 0.84rem; color: var(--text-dim); padding-left: 18px; margin: 8px 0 0; }
.safety li + li { margin-top: 4px; }
.desc-text { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); font-size: 0.94rem; line-height: 1.6; margin: 0; }
.verified-banner { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; padding: 8px 12px; border-radius: var(--radius-sm); background: color-mix(in srgb, #2563eb 12%, transparent); color: var(--text); margin-bottom: 12px; }
.warn-banner { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; padding: 8px 12px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--text); margin-bottom: 12px; }

/* Sell form */
.kind-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
@media (max-width: 520px) { .kind-pick { grid-template-columns: 1fr; } }
.kind-pick label { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; cursor: pointer; background: var(--bg-input); margin: 0; }
.kind-pick label:hover { border-color: var(--border-strong); }
.kind-pick input { position: absolute; opacity: 0; pointer-events: none; }
.kind-pick label:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.kind-pick strong { display: block; font-size: 0.95rem; }
.kind-pick span { color: var(--text-dim); font-size: 0.8rem; font-weight: 400; }
.preview-box { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-input); margin-top: 8px; }
.preview-box img { width: 96px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-sm); }
.input-row { display: flex; gap: 8px; }
.input-row > input { flex: 1; min-width: 0; }
input[type="url"] { width: 100%; background: var(--bg-input); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 12px; font-family: inherit; font-size: 0.92rem; }

/* ---- Skills ---- */
.skills-hero { padding: 48px 0 28px; text-align: center; }
.skills-hero h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); margin-bottom: 10px; }
.skills-hero p { color: var(--text-dim); max-width: 600px; margin: 0 auto 22px; }
.skills-hero .search-wrap { max-width: 520px; margin: 0 auto; }
.skills-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.skill-card { display: flex; flex-direction: column; gap: 8px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); min-width: 0; transition: border-color 0.15s, transform 0.15s; }
.skill-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.skill-top { display: flex; gap: 12px; align-items: center; }
.skill-mark { width: 40px; height: 40px; border-radius: var(--radius); display: grid; place-items: center; font-weight: 700; font-size: 0.9rem; color: #fff; flex-shrink: 0; background: linear-gradient(135deg, hsl(var(--h) 65% 52%), hsl(calc(var(--h) + 40) 65% 38%)); }
.skill-top h3 { margin: 0; font-size: 1rem; }
.skill-top .hint a { color: inherit; }
.skill-card p { margin: 0; color: var(--text-dim); font-size: 0.88rem; flex: 1; }
.skill-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.skill-foot .btn { margin-left: auto; }
.src-tag { font-family: var(--font); font-size: 0.68rem; padding: 2px 7px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); color: var(--text-dim); }
.src-tag.anthropic { color: #d97757; border-color: color-mix(in srgb, #d97757 45%, transparent); }
.src-tag.superpowers { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.install-steps code { font-family: var(--mono); font-size: 0.85rem; }
.install-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.install-grid .card h3 { font-size: 0.95rem; }

/* ---- Admin ---- */
.queue-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.queue-item:first-child { border-top: 0; }
.queue-item .grow { flex: 1; min-width: 200px; }
.queue-item .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger); filter: brightness(1.1); color: #fff; }
.home-community .card h3 { display: flex; align-items: center; gap: 8px; }

/* ---- Motion: page transitions, entrances, reveals ---- */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
::view-transition-old(root) { animation: vt-out 0.16s ease-in both; }
::view-transition-new(root) { animation: vt-in 0.18s ease-out both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

/* Charts draw themselves in */
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } }
.chart-svg .draw-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s cubic-bezier(0.4, 0, 0.2, 1) 0.05s forwards; }
.chart-svg .draw-area { animation: fade 0.9s ease 0.3s both; }
#liveRows .spark-line, .gc-spark .spark-line, .listing-card .spark-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.15s forwards; }
#liveRows .spark-area, .gc-spark .spark-area, .listing-card .spark-area { animation: fade 0.8s ease 0.4s both; }

/* ---- Home: Roblox right now ---- */
.pulse-grid { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
.pulse-grid .genre-chart { grid-column: 1 / -1; }
.stat-tile { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat-label { font-size: 0.78rem; color: var(--text-dim); }
.stat-tile strong { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.genre-chart h3 { margin: 0; font-size: 0.95rem; }
.genre-chart .hint { margin: 2px 0 0; }
.gbars { display: grid; gap: 4px; margin-top: 12px; }
.gbar-row { display: grid; grid-template-columns: 172px 1fr 112px; align-items: center; gap: 12px; padding: 4px 6px; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-size: 0.86rem; }
.gbar-row:hover { background: var(--bg-hover); text-decoration: none; }
.gbar-row .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gbar { height: 10px; background: var(--bg-input); border-radius: 0 4px 4px 0; overflow: hidden; }
.gbar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 0 4px 4px 0; transition: width 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.gbar-row:hover .gbar i { filter: brightness(1.15); }
.gbar-row .v { text-align: right; font-family: var(--font); font-size: 0.78rem; color: var(--text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 640px) {
  .pulse-grid { grid-template-columns: 1fr 1fr; }
  .pulse-grid .stat-tile:first-child { grid-column: 1 / -1; }
  .stat-tile strong { font-size: 1.5rem; }
  .gbar-row { grid-template-columns: 96px 1fr 92px; gap: 8px; }
  .gbar-row .n { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.25; font-size: 0.8rem; }
  .gbar-row .v { font-size: 0.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .reveal { opacity: 1; transform: none; }
  .chart-svg .draw-line, .spark-line { stroke-dasharray: none; stroke-dashoffset: 0; }
}

/* ---------- Accessibility ---------- */
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--primary-bg); color: var(--primary-text); padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 600; text-decoration: none; transition: top .15s; }
.skip-link:focus { top: 10px; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; }
main:focus { outline: none; }
input::placeholder, textarea::placeholder { text-overflow: ellipsis; }
.menu-toggle svg { display: block; }
#theme-toggle:empty { width: 34px; height: 34px; }

/* ---------- Tools catalog ---------- */
.catalog-bar { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin-bottom: 8px; }
.catalog-bar .chips { margin: 0; }
.catalog-search { flex: 1 1 260px; max-width: 360px; margin: 0; }
.tool-group { padding: 24px 0 8px; }
.tool-group .section-title { margin-bottom: 4px; }
.group-blurb { margin: 0 0 16px; color: var(--text-dim); font-size: .9rem; }
.tool-card[hidden], .tool-group[hidden] { display: none; }
.idea-card { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.idea-card h3 { margin: 0 0 4px; }

/* ---------- Text that fits: names wrap to two lines instead of getting cut ---------- */
.game-cell > div > a:first-child, .mini-list .grow a, .lc-title, .gc-main strong, .side-list .grow strong {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  white-space: normal; overflow: hidden; overflow-wrap: anywhere; line-height: 1.3;
}
.game-cell .creator a { display: inline; white-space: normal; }
.game-cell .creator { line-height: 1.35; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.star-btn { min-width: 32px; }
.post-name { max-width: none; flex-shrink: 1; }
.post-head { flex-wrap: wrap; row-gap: 0; }
.stat-tile strong { white-space: normal; overflow-wrap: anywhere; }

/* ---------- Phones ---------- */
@media (max-width: 480px) {
  /* Tables: drop the sparkline so the game name has room */
  .game-table td.spark-cell, .game-table th[title^="Players over the last 24"] { display: none; }
  .game-table td:has(> .game-cell) { padding-right: 4px; }
  .game-table .num { font-size: .8rem; }
  /* Bigger tap targets */
  .segmented button, .pill-tabs button, .chip { min-height: 36px; }
  .btn-sm { min-height: 34px; }
  .copy-btn { padding: 6px 12px; min-height: 34px; }
  .post-act { padding: 8px; margin-left: -8px; }
  .post-actions { gap: 20px; }
  input[type=checkbox] { width: 20px; height: 20px; }
  /* Game card stats stack as rows */
  .gc-stats { grid-template-columns: 1fr; }
  .gc-stat { flex-direction: row-reverse; justify-content: space-between; align-items: center; padding: 7px 10px; }
  .gc-stat small { overflow: visible; }
}

/* Ad slots stay hidden until AdSense is switched on in main.js */
.ad-slot:not(.ad-on) { display: none !important; }
.tool-layout.no-sidebar { grid-template-columns: minmax(0, 1fr); }

.btn-discord { background: #5865f2; border-color: #5865f2; color: #fff; }
.btn-discord:hover { background: #4752c4; border-color: #4752c4; color: #fff; }

/* ---------- Portfolios ---------- */
.pf-head { --pf-accent: #3b82f6; border-bottom: 1px solid var(--border); }
.pf-banner { height: 112px; background:
  radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--pf-accent) 85%, #fff 15%) 0%, transparent 55%),
  linear-gradient(120deg, var(--pf-accent), color-mix(in srgb, var(--pf-accent) 45%, var(--bg-elev))); }
.pf-head-body { padding: 0 18px 18px; position: relative; }
.pf-avatar { margin-top: -44px; width: 96px; height: 96px; border-radius: 50%; border: 4px solid var(--bg-elev); background: var(--bg-elev); overflow: hidden; }
.pf-avatar .avatar { width: 88px; height: 88px; border-radius: 50%; display: block; }
.pf-actions { position: absolute; top: 12px; right: 18px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; max-width: calc(100% - 140px); }
.pf-head h1 { margin: 10px 0 0; font-size: 1.45rem; line-height: 1.2; overflow-wrap: anywhere; }
.pf-handle { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--text-dim); font-size: 0.9rem; margin-top: 2px; }
.pf-headline { margin: 10px 0 0; font-size: 0.98rem; color: var(--text); overflow-wrap: anywhere; }
.pf-status { display: inline-flex; align-items: center; gap: 6px; font-size: 0.76rem; font-weight: 600; padding: 3px 9px; border-radius: var(--radius-sm); border: 1px solid var(--border); color: var(--text); }
.pf-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-faint); }
.pf-status.open i { background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 25%, transparent); }
.pf-status.hiring i { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pf-status.busy i { background: var(--warn); }
.pf-roles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pf-role { font-size: 0.78rem; padding: 4px 10px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--pf-accent) 14%, transparent); color: var(--text); border: 1px solid color-mix(in srgb, var(--pf-accent) 30%, transparent); }
.pf-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pf-link { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 5px 11px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: none; color: var(--text); font: inherit; font-size: 0.82rem; text-decoration: none; cursor: pointer; max-width: 100%; }
.pf-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-link:hover { background: var(--bg-hover); text-decoration: none; }
.pf-link svg { flex: none; color: var(--text-dim); }
.pf-head .profile-stats { margin-top: 14px; gap: 6px 16px; }

.pf-body { padding: 16px; display: grid; gap: 16px; }
.pf-body h2 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); font-family: var(--font); font-weight: 500; margin: 0 0 10px; }
.pf-body .card { margin: 0; }
.pf-bio { line-height: 1.6; overflow-wrap: anywhere; }
.pf-rates { margin: 12px 0 0; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.pf-empty { text-align: center; padding: 32px 20px; }
.pf-empty h2 { text-transform: none; letter-spacing: 0; font-family: var(--font); font-size: 1.15rem; color: var(--text); font-weight: 700; }
.pf-empty p { max-width: 420px; margin: 0 auto 16px; }
.pf-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.pf-item { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--text); text-decoration: none; min-width: 0; transition: border-color .15s, transform .15s; }
.pf-item:hover { border-color: var(--border-strong); transform: translateY(-1px); text-decoration: none; }
.pf-item p { margin: 0; font-size: 0.85rem; color: var(--text-dim); line-height: 1.5; overflow-wrap: anywhere; }
.pf-game-top { display: flex; gap: 12px; align-items: center; min-width: 0; }
.pf-game-top .game-icon { border-radius: var(--radius); flex: none; }
.pf-item-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pf-item-main strong { font-size: 0.95rem; line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.pf-item-role { align-self: flex-start; font-size: 0.74rem; padding: 2px 8px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-game-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.8rem; color: var(--text-dim); }
.pf-game-stats b { color: var(--text); font-variant-numeric: tabular-nums; }
.pf-game-stats .live-dot { margin-right: 5px; }
.pf-video { padding: 0 0 14px; overflow: hidden; }
.pf-video .pf-item-main, .pf-video p { padding: 0 14px; }
.pf-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--bg-input); overflow: hidden; flex: none; }
.pf-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-play { position: absolute; inset: 0; margin: auto; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, 0.6); color: #fff; }
.pf-link-ico { width: 44px; height: 44px; border-radius: var(--radius); flex: none; display: grid; place-items: center; background: var(--bg-hover); color: var(--text-dim); }

/* Editor */
.pf-editor { max-width: 760px; }
.pf-editor .card { margin-bottom: 16px; }
.pf-editor .card h2 { font-size: 1.05rem; margin: 0 0 14px; }
.pf-editor .card-head h2 { margin: 0; }
.pf-editor textarea { width: 100%; resize: vertical; min-height: 120px; }
.pf-fieldset { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.pf-fieldset legend { font-size: 0.85rem; font-weight: 500; margin-bottom: 8px; padding: 0; }
.pf-choice { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-choice label { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.85rem; cursor: pointer; user-select: none; margin: 0; }
.pf-choice label:hover { background: var(--bg-hover); }
.pf-choice label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.pf-choice input { margin: 0; accent-color: var(--accent); width: auto; }
.pf-link-fields { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.pf-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.pf-swatch { position: relative; cursor: pointer; }
.pf-swatch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }
.pf-swatch span { display: block; width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--bg-elev); box-shadow: 0 0 0 1px var(--border); }
.pf-swatch input:checked + span { box-shadow: 0 0 0 2px var(--text); }
.pf-swatch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.pf-edit-items { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 12px; }
.pf-ei { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; background: var(--bg); min-width: 0; }
.pf-ei .row { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 10px; }
.pf-ei .field { margin-bottom: 0; }
.pf-ei-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pf-ei-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.pf-ei-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-ei-thumb { border-radius: var(--radius-sm); object-fit: cover; flex: none; background: var(--bg-input); }
.pf-ei-tools { display: flex; gap: 4px; flex: none; }
.pf-ei-tools .icon-btn:disabled { opacity: 0.35; cursor: default; }
.pf-ei-empty { margin: 4px 0 12px; }
.pf-add { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-add .btn:disabled { opacity: 0.5; cursor: default; }
.pf-add-panel { margin-top: 12px; padding: 14px; border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.pf-add-panel .row { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.pf-savebar { position: sticky; bottom: 0; z-index: 6; display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 12px 16px; margin: 0 -16px 24px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--border); }
.pf-savebar .hint { margin-right: auto; }

@media (max-width: 560px) {
  .pf-banner { height: 88px; }
  .pf-actions { position: static; max-width: none; justify-content: flex-start; margin-top: 12px; }
  .pf-head h1 { font-size: 1.3rem; }
  .pf-grid { grid-template-columns: 1fr; }
  .pf-body { padding: 12px; }
}
.pf-avatar .avatar-fallback { display: grid; place-items: center; font-weight: 700; }

/* Find developers */
.dev-head { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.dev-roles { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.dev-roles .chip { display: inline-flex; align-items: center; gap: 6px; }
.dev-roles .n { font-family: var(--font); font-size: 0.72rem; opacity: 0.7; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; }
.dev-count { margin: -6px 0 12px; min-height: 1.2em; }
.dev-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.dev-card { --pf-accent: #3b82f6; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); color: var(--text); text-decoration: none; overflow: hidden; min-width: 0; transition: border-color .15s, transform .15s; }
a.dev-card:hover { border-color: var(--border-strong); transform: translateY(-2px); text-decoration: none; }
a.dev-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dev-banner { height: 56px; flex: none; background: linear-gradient(120deg, var(--pf-accent), color-mix(in srgb, var(--pf-accent) 40%, var(--bg-elev))); }
.dev-body { display: flex; flex-direction: column; gap: 10px; padding: 0 16px 16px; flex: 1; min-width: 0; }
.dev-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: -28px; }
.dev-top .pf-status { background: var(--bg-elev); }
.dev-avatar { width: 64px; height: 64px; border-radius: 50%; border: 4px solid var(--bg-elev); background: var(--bg-elev); flex: none; overflow: hidden; }
.dev-avatar .avatar { width: 56px; height: 56px; border-radius: 50%; display: block; }
.dev-avatar .avatar-fallback { display: grid; place-items: center; }
.dev-name { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.dev-name strong { font-size: 1.02rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-name .hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-headline { font-size: 0.88rem; line-height: 1.45; color: var(--text-dim); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.dev-card .pf-roles { margin-top: 0; }
.dev-previews { display: flex; gap: 6px; align-items: center; }
.dev-pv { width: 40px; height: 40px; border-radius: var(--radius); overflow: hidden; flex: none; display: grid; place-items: center; background: var(--bg-hover); color: var(--text-dim); }
.dev-pv .game-icon { border-radius: var(--radius); }
.dev-pv-video { width: 64px; }
.dev-pv-video img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dev-pv-more { font-size: 0.78rem; font-family: var(--font); }
.dev-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
.dev-foot:empty { display: none; }
.dev-stats { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 0.8rem; color: var(--text-dim); }
.dev-stats b { color: var(--text); font-variant-numeric: tabular-nums; }
.dev-stats .live-dot { margin-right: 5px; }
.dev-rates { font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-skel { min-height: 220px; }
@media (max-width: 560px) {
  .dev-roles { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .dev-roles::-webkit-scrollbar { display: none; }
  .dev-roles .chip { flex: none; }
  .dev-grid { grid-template-columns: 1fr; }
  .market-bar .search-wrap { max-width: none; flex-basis: 100%; }
}

/* ================= Data board layer ================= */

/* Footer: an index of links, one row per section */
.site-footer { border-top: 1px solid var(--border); margin-top: 56px; padding: 0 0 28px; color: var(--text-dim); font-size: 0.84rem; background: var(--bg); }
.foot-index { display: grid; border-bottom: 1px solid var(--border); }
.foot-row { display: grid; grid-template-columns: 140px 1fr; gap: 16px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--border); }
.foot-row:last-child { border-bottom: 0; }
.foot-row h2 { margin: 0; font-family: var(--font); font-size: 0.7rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); }
.foot-row div { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.foot-row a { color: var(--text-dim); text-decoration: none; }
.foot-row a:hover { color: var(--accent); }
.foot-base { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding-top: 18px; }
.foot-base .logo { border: 0; padding: 0; margin: 0; font-size: 0.88rem; }
.foot-copy { font-family: var(--font); font-size: 0.74rem; color: var(--text-faint); }
.foot-discord { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--text-dim); text-decoration: none; font-size: 0.82rem; }
.foot-discord:hover { color: var(--text); }
.foot-discord svg { color: #5865f2; }
.foot-base .disclaimer { flex-basis: 100%; margin: 4px 0 0; font-size: 0.72rem; color: var(--text-faint); max-width: 760px; }
@media (max-width: 560px) {
  .foot-row { grid-template-columns: 1fr; gap: 6px; }
  .foot-row a { padding: 3px 0; }
  .foot-discord { margin-left: 0; }
}

/* Panels: flush-bodied boxes with a label bar */
.panel { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--border); background: var(--bg); }
.panel-head h2 { margin: 0; font-family: var(--font); font-size: 0.72rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text); }
.panel-head a { font-family: var(--font); font-size: 0.72rem; color: var(--text-dim); text-decoration: none; white-space: nowrap; }
.panel-head a:hover { color: var(--accent); }
.panel .game-table th { padding-top: 10px; }
.panel .game-table th:first-child, .panel .game-table td:first-child { padding-left: 14px; }
.panel .game-table th:last-child, .panel .game-table td:last-child { padding-right: 14px; }
.empty-row { padding: 16px 14px; list-style: none; }

/* Live ticker as a full-width band under the header */
.ticker-band { margin: 0; border-width: 0 0 1px; border-radius: 0; background: var(--bg-elev); }
.ticker-band .tk-label { background: var(--accent); color: var(--accent-ink); border-right: 0; font-weight: 600; }
.ticker-band .tk-label .live-dot { background: var(--accent-ink); }
.tk-k { font-family: var(--font); font-size: 0.66rem; font-weight: 600; letter-spacing: 0.06em; padding: 1px 5px; border-radius: var(--radius-sm); border: 1px solid currentColor; margin-right: 4px; }
.tk-k.high { color: var(--warn); }
.tk-k.surge { color: var(--success); }
.tk-k.update { color: var(--accent); }
.tk-k.pick { color: var(--text); }

/* Home */
.home-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 32px; align-items: end; padding-top: 36px; padding-bottom: 26px; }
.kicker { display: flex; align-items: center; gap: 2px; margin: 0 0 14px; font-family: var(--font); font-size: 0.74rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.home-intro h1 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); line-height: 1.12; max-width: 15em; margin-bottom: 12px; }
.home-intro .lead { color: var(--text-dim); max-width: 34em; margin-bottom: 18px; }
.home-search { display: flex; gap: 0; max-width: 480px; }
.home-search input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); height: 40px; }
.home-search .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; height: 40px; }
.home-stats { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--border); gap: 1px; overflow: hidden; }
.home-stats > div { background: var(--bg-elev); padding: 14px 16px; min-width: 0; }
.home-stats dt { font-family: var(--font); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); }
.home-stats dd { margin: 4px 0 2px; font-family: var(--font); font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.home-stats > div:first-child dd { color: var(--accent); }
.home-stats .hint { display: block; font-size: 0.74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 14px; align-items: start; margin-bottom: 14px; }
.board-side { display: grid; gap: 14px; min-width: 0; }
.board-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--border); min-width: 0; font-size: 0.86rem; }
.rank-list li:last-child { border-bottom: 0; }
.rank-list li:hover { background: var(--bg-hover); }
.rank-list .game-icon { border-radius: var(--radius-sm); }
.rl-n { width: 16px; font-family: var(--font); font-size: 0.74rem; color: var(--text-faint); flex: none; }
.rl-name { flex: 1; min-width: 0; color: var(--text); text-decoration: none; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-name:hover { color: var(--accent); }
.rl-v { text-align: right; font-family: var(--font); font-size: 0.82rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rl-v small { display: block; font-size: 0.68rem; color: var(--text-faint); }
.panel .gbars { padding: 10px 8px; margin: 0; }
.panel .gbar-row { grid-template-columns: 112px 1fr 44px; }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { padding: 9px 14px; border-bottom: 1px solid var(--border); min-width: 0; }
.activity li:last-child { border-bottom: 0; }
.act-main { display: block; color: var(--text-dim); text-decoration: none; font-size: 0.86rem; line-height: 1.4; overflow-wrap: anywhere; }
.act-main strong { color: var(--text); font-weight: 600; }
.act-main:hover strong { color: var(--accent); }
.act-meta { display: block; margin-top: 2px; font-family: var(--font); font-size: 0.7rem; color: var(--text-faint); }
.act-price { color: var(--text); }
.home-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); gap: 1px; background: var(--border); overflow: hidden; margin-top: 14px; }
.home-links a { display: flex; gap: 12px; align-items: center; padding: 14px; background: var(--bg-elev); color: var(--text); text-decoration: none; min-width: 0; }
.home-links a:hover { background: var(--bg-hover); }
.home-links a:hover .hl-k { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.home-links strong { display: block; font-size: 0.88rem; font-weight: 600; }
.home-links .hint { display: block; font-size: 0.76rem; }
.hl-k { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-family: var(--font); font-size: 0.74rem; font-weight: 600; }
@media (max-width: 1000px) {
  .home-top { grid-template-columns: 1fr; align-items: start; gap: 22px; padding-top: 26px; }
  .board, .board-3 { grid-template-columns: minmax(0, 1fr); }
  .home-links { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .home-links { grid-template-columns: 1fr; }
  .home-stats > div { padding: 12px; }
}

/* Tracker pages: a screener header with section tabs on its bottom edge */
.tool-head:has(.subnav) { padding: 20px 0 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; align-items: end; }
.tool-head:has(.subnav) h1 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); margin: 0 0 4px; }
.tool-head:has(.subnav) > p { grid-column: 1; font-size: 0.86rem; }
.tool-head:has(.subnav) .stat-strip { grid-column: 2; grid-row: 1 / span 2; margin: 0; align-self: center; justify-content: flex-end; }
.tool-head:has(.subnav) > :not(.subnav):not(.stat-strip):not(h1):not(p):not(.breadcrumb) { grid-column: 1 / -1; }
.subnav { grid-column: 1 / -1; display: flex; gap: 0; margin: 16px 0 -1px; overflow-x: auto; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; font-size: 0.84rem; font-weight: 500; color: var(--text-dim); text-decoration: none; white-space: nowrap; }
.subnav a:hover { color: var(--text); background: var(--bg-hover); }
.subnav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); background: none; }
@media (max-width: 760px) { .tool-head:has(.subnav) { grid-template-columns: minmax(0, 1fr); } .tool-head:has(.subnav) .stat-strip { grid-column: 1; grid-row: auto; justify-content: flex-start; margin-top: 10px; } }

/* List switcher: tabs, not a pill group */
.segmented { display: flex; flex-wrap: wrap; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 0; background: none; margin-bottom: 14px; gap: 0; }
.segmented button { border-radius: 0; padding: 8px 12px; font-size: 0.82rem; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.segmented button:hover { color: var(--text); background: var(--bg-hover); }
.segmented button.active { background: none; box-shadow: none; color: var(--text); border-bottom-color: var(--accent); }
.card-head .segmented { border-bottom: 0; }
.card-head .segmented button { padding: 4px 9px; font-family: var(--font); font-size: 0.74rem; border: 1px solid transparent; margin: 0; }
.card-head .segmented button.active { border-color: var(--border-strong); background: var(--bg-hover); }
.chip { border-radius: var(--radius-sm); font-size: 0.78rem; padding: 4px 10px; }
.chip.active { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

/* Tables read like a terminal: mono headers, tight rows */
.game-table td { padding: 8px 10px; }
.game-table th { color: var(--text-faint); font-size: 0.68rem; }
.game-table tbody tr:hover { background: var(--bg-hover); box-shadow: inset 2px 0 0 var(--accent); }
.game-icon { border-radius: var(--radius-sm); }
.table-card { padding: 4px 0 0; }
.live-dot { background: var(--success); box-shadow: none; }

/* Game page: a profile band, full width */
.tool-head:has(.game-hero) { position: relative; border-bottom: 0; padding: 26px 0 22px; margin-bottom: 22px; isolation: isolate; }
.tool-head:has(.game-hero)::after { content: ""; position: absolute; z-index: -1; inset: 0 calc(50% - 50vw); background: var(--bg-elev); border-bottom: 1px solid var(--border); }
.game-hero { gap: 22px; align-items: flex-start; }
.game-hero .game-icon { border-radius: var(--radius); border: 1px solid var(--border-strong); }
body.game-themed .tool-head::before { display: none; }
body.game-themed .tool-head:has(.game-hero)::after { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 14%, var(--bg-elev)), var(--bg-elev) 55%); }
body.game-themed .game-hero .game-icon { box-shadow: none; }
.game-hero h1 { font-size: clamp(1.4rem, 3vw, 2rem); }
.game-hero .sub { font-family: var(--font); font-size: 0.78rem; }

/* Calculators: inputs on the left, a readout on the right */
.tool-layout section.card:has(> .result-grid) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); column-gap: 22px; align-items: start; padding: 0; overflow: hidden; }
.tool-layout section.card:has(> .result-grid) > * { grid-column: 1; margin-left: 18px; }
.tool-layout section.card:has(> .result-grid) > h2 { padding-top: 16px; margin-bottom: 14px; font-family: var(--font); font-size: 0.74rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); }
.tool-layout section.card:has(> .result-grid) > :last-child:not(.result-grid) { margin-bottom: 16px; }
.tool-layout section.card:has(> .result-grid) > .row { margin-bottom: 4px; }
.tool-layout section.card > .result-grid { grid-column: 2; grid-row: 1 / span 10; align-self: stretch; margin: 0; grid-template-columns: 1fr; border: 0; border-left: 1px solid var(--border); border-radius: 0; gap: 1px; }
.result-grid .stat { padding: 12px 16px; display: flex; flex-direction: column; justify-content: center; }
.result-grid .stat .value { font-family: var(--font); font-weight: 500; font-size: 1.25rem; }
.result-grid .stat .value.good { color: var(--accent); }
.result-grid .stat:has(.value.good) { background: color-mix(in srgb, var(--accent) 6%, var(--bg-input)); }
@media (max-width: 720px) {
  .tool-layout section.card:has(> .result-grid) { grid-template-columns: minmax(0, 1fr); }
  .tool-layout section.card:has(> .result-grid) > * { margin-right: 16px; margin-left: 16px; }
  .tool-layout section.card > .result-grid { grid-column: 1; grid-row: auto; border-left: 0; border-top: 1px solid var(--border); margin: 8px 0 0; grid-template-columns: 1fr 1fr; }
}
.tool-layout section.card + section.card, .tool-layout .ad-slot + section.card { margin-top: 14px; }

/* Docs: reading column with a contents rail */
.doc { display: grid; grid-template-columns: 200px minmax(0, 720px); gap: 48px; padding: 36px 0 12px; align-items: start; }
.doc-toc { position: sticky; top: calc(var(--head-h) + 20px); font-size: 0.82rem; border-left: 1px solid var(--border); }
.doc-toc h2 { margin: 0 0 8px; padding-left: 14px; font-family: var(--font); font-size: 0.68rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); }
.doc-toc a { display: block; padding: 4px 0 4px 13px; margin-left: -1px; border-left: 2px solid transparent; color: var(--text-dim); text-decoration: none; line-height: 1.35; }
.doc-toc a:hover { color: var(--text); }
.doc-toc a.on { color: var(--text); border-left-color: var(--accent); }
.doc-body { min-width: 0; }
.doc-body .prose, .doc .prose { padding: 0; max-width: none; }
.doc-kicker { font-family: var(--font); font-size: 0.72rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 10px; }
.doc-body h1 { margin-bottom: 14px; }
.prose h2 { font-size: 1.12rem; margin-top: 2em; padding-top: 1.2em; border-top: 1px solid var(--border); }
.prose h2:first-of-type { border-top: 0; padding-top: 0; }
.prose p, .prose li { line-height: 1.7; }
@media (max-width: 860px) { .doc { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 24px; } .doc-toc { display: none; } }

/* Tools index: a plain list */
.tool-list { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg-elev); }
.tool-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; }
.tool-row:last-child { border-bottom: 0; }
.tool-row:hover { background: var(--bg-hover); }
.tool-row:hover .hl-k { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tool-row strong { display: block; font-weight: 600; font-size: 0.92rem; }
.tool-row .hint { display: block; font-size: 0.82rem; }
.tool-row .tr-go { font-family: var(--font); font-size: 0.74rem; color: var(--text-faint); white-space: nowrap; }
.tool-row:hover .tr-go { color: var(--accent); }
.tool-row[hidden] { display: none; }
.tool-group { padding: 18px 0 6px; }
.group-blurb { font-size: 0.86rem; margin: -4px 0 12px; }
@media (max-width: 520px) { .tool-row { grid-template-columns: 38px minmax(0, 1fr); } .tool-row .tr-go { display: none; } }

/* Misc */
.stat-strip { font-size: 0.76rem; gap: 6px 20px; }
.pill { border-radius: var(--radius-sm); }
.ad-slot { border-radius: var(--radius); }
.gotd { border-radius: var(--radius); background: var(--bg-elev); border-color: var(--border); box-shadow: inset 3px 0 0 var(--warn); }
.toast { border-radius: var(--radius-sm); }
.nav-menu { border-radius: var(--radius); }
.nav-avatar { width: 30px; height: 30px; border-radius: var(--radius-sm); }
.nav-auth { margin-left: 0; }
.doc-api { grid-template-columns: 220px minmax(0, 1fr); }
.doc-toc a.sub { padding-left: 24px; font-family: var(--font); font-size: 0.74rem; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-toc a.sub:hover, .doc-toc a.sub.on { color: var(--text); }
.doc-api .doc-toc { max-height: calc(100vh - var(--head-h) - 40px); overflow-y: auto; }
.api-head { padding-bottom: 18px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.api-head > p:not(.doc-kicker) { color: var(--text-dim); max-width: 760px; }
.api-sec { padding: 22px 0; border-bottom: 1px solid var(--border); }
.api-sec:last-of-type { border-bottom: 0; }
.api-sec > h2 { font-size: 1.15rem; }
.endpoint h3 { font-size: 0.9rem; }
.method { border-radius: var(--radius-sm); font-weight: 600; }
.tools-suggest { margin-top: 18px; }
.sidebar .card .btn { margin-top: 12px; }

/* Marketplace: a store with a filter rail */
.store-head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; justify-content: space-between; padding: 26px 0 18px; }
.store-head h1 { font-size: clamp(1.45rem, 3vw, 1.9rem); margin-bottom: 6px; }
.store-head p { color: var(--text-dim); max-width: 640px; margin: 0; font-size: 0.9rem; }
.store { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; border-top: 1px solid var(--border); padding-top: 20px; }
.store-rail { position: sticky; top: calc(var(--head-h) + 16px); display: flex; flex-direction: column; gap: 0; margin: 0; align-items: stretch; flex-wrap: nowrap; }
.store-rail .search-wrap { margin: 0 0 14px; max-width: none; flex: none; }
.store-rail .search-wrap input { height: 36px; }
.store-rail .search-wrap .search-ico { top: 9px; }
.rail-group { padding: 12px 0; border-top: 1px solid var(--border); }
.rail-group h2 { margin: 0 0 8px; font-family: var(--font); font-size: 0.68rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); }
.rail-group h2 label { font: inherit; color: inherit; margin: 0; }
.rail-group select { width: 100%; }
.rail-list { display: flex; flex-direction: column; }
.rail-list button { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-left: 2px solid transparent; color: var(--text-dim); font: inherit; font-size: 0.86rem; padding: 6px 10px; cursor: pointer; }
.rail-list button:hover { color: var(--text); background: var(--bg-hover); }
.rail-list button.active { color: var(--text); border-left-color: var(--accent); background: var(--bg-elev); font-weight: 500; }
.rail-list .n { font-family: var(--font); font-size: 0.72rem; color: var(--text-faint); }
.rail-help summary { cursor: pointer; font-family: var(--font); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); }
.rail-help .safety { margin: 10px 0 0; padding-left: 16px; font-size: 0.8rem; color: var(--text-dim); display: grid; gap: 6px; }
.store-main .market-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
@media (max-width: 820px) {
  .store { grid-template-columns: minmax(0, 1fr); border-top: 0; padding-top: 0; }
  .store-rail { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; background: var(--bg-elev); }
  .store-rail .search-wrap { grid-column: 1 / -1; }
  .rail-help { grid-column: 1 / -1; }
}
.store:has(> .store-rail[hidden]) { grid-template-columns: minmax(0, 1fr); }

/* Skills: a package registry, one row per skill */
.skills-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 400px); column-gap: 32px; align-items: end; text-align: left; padding: 28px 0 20px; }
.skills-hero > :not(form) { grid-column: 1; }
.skills-hero h1 { font-size: clamp(1.45rem, 3vw, 1.9rem); margin-bottom: 6px; }
.skills-hero p:not(.doc-kicker) { margin: 0; max-width: 640px; font-size: 0.9rem; }
.skills-hero .search-wrap { grid-column: 2; grid-row: 1 / span 3; margin: 0; max-width: none; }
.skills-bar { justify-content: space-between; border-bottom: 1px solid var(--border); margin-bottom: 0; gap: 0 12px; }
.skills-bar .pill-tabs { gap: 0; }
.skills-bar .pill-tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 9px 12px; margin-bottom: -1px; }
.skills-bar .pill-tabs button.active { background: none; color: var(--text); border-bottom-color: var(--accent); }
.skills-bar select { margin: 6px 0; }
.skills-grid { display: block; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); background: var(--bg-elev); }
.skill-card { display: grid; grid-template-columns: minmax(200px, 280px) minmax(0, 1fr) auto; gap: 18px; align-items: center; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 11px 14px; background: none; }
.skill-card:last-child { border-bottom: 0; }
.skill-card:hover { transform: none; background: var(--bg-hover); border-color: var(--border); }
.skill-mark { width: 30px; height: 30px; border-radius: var(--radius-sm); font-family: var(--font); font-size: 0.72rem; font-weight: 600; color: hsl(var(--h) 75% 72%); background: color-mix(in srgb, hsl(var(--h) 60% 50%) 14%, var(--bg)); border: 1px solid color-mix(in srgb, hsl(var(--h) 60% 50%) 35%, transparent); }
:root[data-theme="light"] .skill-mark { color: hsl(var(--h) 65% 32%); }
.skill-top h3 { font-size: 0.9rem; }
.skill-card p { font-size: 0.84rem; line-height: 1.45; }
.skill-foot { flex-wrap: nowrap; }
.skill-foot .btn { margin-left: 4px; }
@media (max-width: 900px) {
  .skills-hero { grid-template-columns: minmax(0, 1fr); }
  .skills-hero .search-wrap { grid-column: 1; grid-row: auto; margin-top: 16px; }
  .skill-card { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .skill-foot { flex-wrap: wrap; }
}

/* 404 */
.notfound { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; padding: 72px 0 40px; }
.nf-code { margin: 0; font-family: var(--font); font-size: clamp(4rem, 12vw, 7rem); font-weight: 500; line-height: 1; color: var(--accent); letter-spacing: -0.04em; }
.notfound h1 { margin-bottom: 6px; }
.notfound p { color: var(--text-dim); }
.nf-links { display: flex; gap: 8px; flex-wrap: wrap; }

/* Developer cards: a thin accent edge, square avatars, no lift */
.dev-banner { height: 3px; background: var(--pf-accent); }
a.dev-card:hover { transform: none; background: var(--bg-hover); }
.dev-top { margin-top: 14px; }
.dev-avatar { width: 48px; height: 48px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); }
.dev-avatar .avatar { width: 46px; height: 46px; border-radius: var(--radius-sm); }
.subnav { flex-wrap: nowrap; }
@media (max-width: 760px) {
  .segmented { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px; }
  .segmented::-webkit-scrollbar { display: none; }
  .segmented button { flex: none; }
  .card-head .segmented { margin: 0; padding: 0; }
}


/* ================= Softer look (rounded, Inter, white accent) ================= */
body { font-size: 15px; line-height: 1.6; }
::selection { background: var(--accent-soft); color: var(--text); }
h1 { font-weight: 700; letter-spacing: -0.035em; }
.card { padding: 20px; }

/* Header */
.site-header { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); }
.nav { align-items: center; gap: 16px; }
.logo { font-family: var(--font); font-size: 0.98rem; font-weight: 600; letter-spacing: -0.01em; padding-right: 0; margin-right: 0; border-right: 0; gap: 10px; }
.logo-mark { width: 28px; height: 28px; border-radius: 7px; background: var(--primary-bg); color: var(--primary-text); }
.logo-mark svg { width: 16px; height: 16px; }
.nav-links { align-items: center; gap: 2px; }
.nav-links > a { padding: 6px 10px; border-radius: var(--radius-sm); font-size: 0.88rem; }
.nav-links > a[aria-current="page"] { color: var(--text); background: var(--bg-hover); }
.nav-links > a[aria-current="page"]::after { display: none; }
.nav-live { font-family: var(--font); font-size: 0.8rem; border-radius: 999px; padding: 4px 12px; }
.icon-btn { width: 34px; height: 34px; }
.nav-avatar { width: 34px; height: 34px; border-radius: 50%; }
@media (max-width: 860px) {
  .nav-links { padding: 8px 16px 16px; }
  .nav-links > a { padding: 10px; border-bottom: 0; }
  .nav-tools { padding: 0 10px; }
}

/* Buttons */
.btn { padding: 9px 16px; font-weight: 500; font-size: 0.9rem; }
.btn-sm { padding: 5px 10px; font-size: 0.8rem; }
.chip, .nav-live, .pill-tabs button { border-radius: 999px; }

/* Labels: plain Inter instead of typewriter capitals */
.section-title h2, .panel-head h2, .foot-row h2, .kicker, .home-stats dt, .doc-toc h2, .doc-kicker,
.rail-group h2, .rail-help summary, .tool-layout section.card:has(> .result-grid) > h2, .stat .label, .stat-label {
  font-family: var(--font); text-transform: none; letter-spacing: 0; font-weight: 600;
}
.section-title h2, .panel-head h2 { font-size: 0.9rem; color: var(--text); }
.section-title a.hint, .panel-head a { font-family: var(--font); font-size: 0.8rem; }
.foot-row h2, .doc-toc h2, .rail-group h2, .rail-help summary, .home-stats dt, .stat .label { font-size: 0.78rem; color: var(--text-dim); font-weight: 500; }
.kicker, .doc-kicker { font-size: 0.8rem; color: var(--text-dim); font-weight: 500; }
.tool-layout section.card:has(> .result-grid) > h2 { font-size: 0.95rem; color: var(--text); }
.panel-head { background: transparent; padding: 12px 16px; }
.foot-copy, .act-meta, .stat-strip { font-family: var(--font); }
.act-meta { font-size: 0.76rem; }

/* Numbers: clean Inter figures in the big tiles */
.home-stats dd, .result-grid .stat .value { font-family: var(--font); font-weight: 700; letter-spacing: -0.02em; }
.home-stats > div:first-child dd { color: var(--text); }
.result-grid .stat .value.good { color: var(--success); }
.result-grid .stat:has(.value.good) { background: var(--bg-input); }

/* Rounded boxes */
.home-stats, .home-links, .tool-list, .panel, .skills-grid { border-radius: var(--radius); }
.skills-grid { border-top: 1px solid var(--border); margin-top: 14px; }
.skills-bar { border-bottom: 0; }
.skills-bar .pill-tabs { gap: 6px; }
.skills-bar .pill-tabs button { border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; margin: 0; background: var(--bg-elev); }
.skills-bar .pill-tabs button.active { background: var(--primary-bg); color: var(--primary-text); border-color: var(--primary-bg); }
.hl-k { border-radius: 8px; font-size: 0.78rem; }
.game-icon, .rank-list .game-icon { border-radius: 8px; }
.game-hero .game-icon { border-radius: 16px; }
.dev-avatar { border-radius: 50%; }
.dev-avatar .avatar { border-radius: 50%; }
.rail-list button { border-radius: var(--radius-sm); border-left: 0; }
.rail-list button.active { background: var(--bg-hover); }
.home-search input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.home-search .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* Ticker band: quiet label */
.ticker-band .tk-label { background: var(--bg-input); color: var(--text); font-weight: 500; border-right: 1px solid var(--border); }
.ticker-band .tk-label .live-dot { background: var(--success); }
.tk-k { font-family: var(--font); font-size: 0.68rem; border-radius: 4px; letter-spacing: 0.02em; }
.tk-k.update { color: var(--link); }

/* Bits that used the old orange to highlight */
.verified { color: var(--link); }
.gbar i, .genre-bar i { background: var(--text-dim); }
.gbar-row:hover .gbar i { background: var(--text); filter: none; }
.game-table tbody tr:hover { box-shadow: none; }
.rl-name:hover, .act-main:hover strong, .foot-row a:hover, .section-title a.hint:hover, .panel-head a:hover, .tool-row:hover .tr-go { color: var(--text); }
.tool-row .tr-go { font-family: var(--font); }
.gotd { box-shadow: none; }
.nf-code { color: var(--text); font-family: var(--font); font-weight: 800; }
.chart-svg .hover-dot { fill: var(--link); }


/* Inter figures line up in tables */
.game-table, .mini-list, .rank-list, .gbar-row, .home-stats, .result-grid, .chg { font-variant-numeric: tabular-nums; }
.game-table th, .stat .label, .pill, .gc-stat small, .pf-body h2, .tk-label { letter-spacing: 0.03em; }.ticker-band .tk-label { text-transform: none; letter-spacing: 0; font-size: 0.78rem; }
@media (max-width: 860px) { .nav-links { align-items: stretch; } .nav-links > a { border-radius: var(--radius-sm); } .nav-tools { justify-content: flex-start; } }


/* ================= Motion and softer edges ================= */
:root { --radius: 12px; --radius-sm: 8px; --ease: cubic-bezier(0.2, 0.7, 0.2, 1); }

/* Smooth colour fade when switching light/dark */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease, fill 0.35s ease, stroke 0.35s ease !important;
}

/* Everything interactive eases instead of snapping */
a, button, .btn, .chip, .icon-btn, .nav-links > a, .subnav a, .segmented button, .pill-tabs button,
.rail-list button, input, select, textarea, summary, .tool-row,
.home-links a, .panel, .card, .dev-card, .listing-card, .skill-card, .game-card, .post, .gbar-row {
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.22s ease, transform 0.22s var(--ease), opacity 0.18s ease;
}
.btn:active, .chip:active, .icon-btn:active, .segmented button:active, .subnav a:active, .pill-tabs button:active, .rail-list button:active { transform: scale(0.97); }
.btn:not(.btn-ghost):hover { box-shadow: 0 4px 16px -6px color-mix(in srgb, var(--primary-bg) 45%, transparent); }
.icon-btn:hover svg { transform: rotate(-12deg); }
.icon-btn svg { transition: transform 0.3s var(--ease); }

/* Cards that link somewhere lift a little */
a.card:hover, .dev-card:hover, .listing-card:hover, a.skill-card:hover, .game-card:hover {
  transform: translateY(-2px); border-color: var(--border-strong);
  box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.55);
}
:root[data-theme="light"] a.card:hover, :root[data-theme="light"] .dev-card:hover, :root[data-theme="light"] .listing-card:hover { box-shadow: 0 10px 28px -16px rgba(0, 0, 0, 0.22); }
.panel:hover { border-color: var(--border-strong); }
.lc-img img { transition: transform 0.5s var(--ease); }
.listing-card:hover .lc-img img { transform: scale(1.04); }
.tool-row .tr-go { transition: transform 0.2s var(--ease), color 0.18s; }
.tool-row:hover .tr-go { transform: translateX(3px); }
.rail-list button:hover:not(.active) { background: var(--bg-hover); }

/* Rows slide in when lists fill or change */
@keyframes row-in { from { opacity: 0; transform: translateY(4px); } }
.game-table tbody tr, .rank-list > *, .activity > *, .tool-row, .skill-card, .dev-card, .listing-card, .post {
  animation: row-in 0.4s var(--ease) both;
}
.game-table tbody tr:nth-child(2), .rank-list > :nth-child(2), .activity > :nth-child(2), .tool-row:nth-child(2) { animation-delay: 0.03s; }
.game-table tbody tr:nth-child(3), .rank-list > :nth-child(3), .activity > :nth-child(3), .tool-row:nth-child(3) { animation-delay: 0.06s; }
.game-table tbody tr:nth-child(4), .rank-list > :nth-child(4), .activity > :nth-child(4), .tool-row:nth-child(4) { animation-delay: 0.09s; }
.game-table tbody tr:nth-child(5), .rank-list > :nth-child(5), .activity > :nth-child(5), .tool-row:nth-child(5) { animation-delay: 0.12s; }
.game-table tbody tr:nth-child(6), .rank-list > :nth-child(6), .tool-row:nth-child(6) { animation-delay: 0.15s; }
.game-table tbody tr:nth-child(7), .tool-row:nth-child(7) { animation-delay: 0.18s; }
.game-table tbody tr:nth-child(8), .tool-row:nth-child(8) { animation-delay: 0.21s; }
.game-table tbody tr:nth-child(9) { animation-delay: 0.24s; }
.game-table tbody tr:nth-child(n+10) { animation-delay: 0.27s; }

/* Page entrance: header block, then content */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
main > .tool-head, .home-top > * { animation: rise 0.55s var(--ease) both; }
.home-top > :nth-child(2) { animation-delay: 0.08s; }
main > :not(.tool-head):not(.home-top):not(.ad-slot):not(.board):not(.board-3) { animation: rise 0.6s var(--ease) 0.08s both; }
.board > *, .board-3 > * { animation: rise 0.6s var(--ease) both; }
.board > :nth-child(2), .board-3 > :nth-child(2) { animation-delay: 0.08s; }
.board-3 > :nth-child(3) { animation-delay: 0.16s; }
.board-side > * { animation: rise 0.6s var(--ease) both; }
.board-side > :nth-child(2) { animation-delay: 0.1s; }

/* Panels further down fade up as they scroll in (where supported) */
@supports (animation-timeline: view()) {
  .board-3 > *, .home-links, .doc-body > h2, .tool-layout > aside .card, .sidebar .card {
    animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%;
  }
}

/* Mobile menu slides open */
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } }
@media (max-width: 860px) {
  .nav-links.open { animation: menu-in 0.22s var(--ease) both; }
  .nav-links.open > a { animation: row-in 0.3s var(--ease) both; }
  .nav-links.open > a:nth-child(2) { animation-delay: 0.02s; }
  .nav-links.open > a:nth-child(3) { animation-delay: 0.04s; }
  .nav-links.open > a:nth-child(4) { animation-delay: 0.06s; }
  .nav-links.open > a:nth-child(5) { animation-delay: 0.08s; }
  .nav-links.open > a:nth-child(6) { animation-delay: 0.1s; }
  .nav-links.open > a:nth-child(7) { animation-delay: 0.12s; }
}

/* Dropdowns and expanders */
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.nav-menu:not([hidden]), .suggest:not([hidden]), .chart-tip { animation: pop-in 0.16s var(--ease) both; }
details[open] > :not(summary) { animation: row-in 0.25s var(--ease) both; }
summary::marker { transition: none; }

/* Numbers fade in once data arrives */
.home-stats dd, .result-grid .stat .value { animation: fade 0.4s ease both; }

/* ---------- Softer edges ---------- */
/* Tabs become soft pills instead of hard underlines */
.subnav { gap: 4px; border-bottom: 0; }
.subnav a { border-bottom: 0; border-radius: 999px; padding: 7px 14px; }
.subnav a:hover { background: var(--bg-hover); }
.subnav a[aria-current="page"], .subnav a.active { background: var(--bg-hover); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.subnav a[aria-current="page"]::after, .subnav a.active::after { display: none; }
.segmented { gap: 4px; border-bottom: 0; padding: 4px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 999px; width: fit-content; max-width: 100%; }
.segmented button { border: 0; border-radius: 999px; margin: 0; padding: 6px 14px; }
.segmented button:hover { background: var(--bg-hover); }
.segmented button.active { background: var(--primary-bg); color: var(--primary-text); border: 0; }
.card-head .segmented { padding: 3px; }
.card-head .segmented button { padding: 4px 10px; border-radius: 999px; }
.card-head .segmented button.active { background: var(--primary-bg); color: var(--primary-text); border-color: transparent; }
.feed-tabs button.active::after { border-radius: 999px; }

/* Rounded lists keep hover colours inside their corners */
.skills-grid, .tool-list, .home-links, .home-stats { overflow: hidden; }
.skills-grid { border-radius: var(--radius); }
.ticker-band .tk-label { border-radius: 0 999px 999px 0; }
.dev-banner { border-radius: var(--radius) var(--radius) 0 0; }
.gbar { border-radius: 999px; }
.gbar i { border-radius: 999px; }
.genre-bar, .genre-bar i { border-radius: 999px; }
.home-search { border-radius: var(--radius-sm); }
.home-search input:focus { position: relative; z-index: 1; }
.tag, .pill, .src-tag, .beta-tag, .pf-item-role, .tk-k { border-radius: 999px; }
.tk-k { padding: 1px 7px; }
pre { border-radius: var(--radius-sm); }
.chart-tip, .toast { border-radius: var(--radius-sm); box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.5); }
.nav-menu { border-radius: var(--radius); box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.6); }
.gotd { border-radius: var(--radius); }
input, select, textarea { border-radius: var(--radius-sm); }
input:focus, textarea:focus, select:focus { box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--border-strong); }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { border-radius: var(--radius-sm); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.segmented { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .segmented::-webkit-scrollbar { display: none; } .segmented button { flex: none; white-space: nowrap; }
@media (min-width: 641px) { .segmented { flex-wrap: wrap; overflow: visible; border-radius: 14px; } }
@media (max-width: 640px) { .segmented { width: auto; border-radius: 999px; margin-left: 0; margin-right: 0; padding-left: 4px; padding-right: 4px; } }
.tk-label { text-transform: none; letter-spacing: 0; font-size: 0.78rem; }

/* ================= Marketplace upgrade ================= */
.lc-save { position: absolute; right: 8px; bottom: 8px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 999px; background: rgba(9,9,11,.6); color: #fff; cursor: pointer; transition: transform 0.2s var(--ease), background-color 0.18s; }
.lc-save:hover { transform: scale(1.08); background: rgba(9,9,11,.8); }
.lc-save.on svg { fill: #f43f5e; stroke: #f43f5e; }
.lc-seller { max-width: calc(100% - 56px); }
.lc-rating { display: inline-flex; align-items: center; gap: 2px; margin-left: 4px; color: #a16207; }
.stars { display: inline-flex; gap: 1px; color: #eab308; vertical-align: -2px; }
.ds-dialog { border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--bg-elev); color: var(--text); padding: 0; width: min(460px, calc(100vw - 32px)); box-shadow: 0 24px 60px -20px rgba(0,0,0,.6); }
.ds-dialog::backdrop { background: rgba(0,0,0,.55); }
.ds-dialog[open] { animation: pop-in 0.18s var(--ease) both; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.dlg-head h2 { font-size: 1rem; margin: 0; }
.dlg-body { padding: 16px; }


/* ================= Game insights cards ================= */
.ins-big { font-size: 1.55rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; line-height: 1.2; }
.ins-big small { font-size: 0.8rem; font-weight: 500; color: var(--text-dim); letter-spacing: 0; }
.ins-big .pos { color: var(--success); }
.ins-big .neg { color: var(--danger); }
.ins-sub { font-size: 0.76rem; color: var(--text-dim); margin: 2px 0 10px; min-height: 1.1em; }
.ins-sub b { color: var(--text); font-weight: 600; }
.ins-chg { display: inline-flex; align-items: center; gap: 3px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0; }
.ins-chg.up { color: var(--success); }
.ins-chg.down { color: var(--danger); }
.ins-chg.flat { color: var(--text-dim); }
.ins-plot { margin-top: auto; min-height: 118px; }
.ins-axis { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 0.7rem; color: var(--text-faint); margin-top: 4px; font-variant-numeric: tabular-nums; }
.ins-key { display: inline-flex; align-items: center; gap: 5px; }
.ins-key i { display: inline-block; width: 12px; height: 2px; border-radius: 2px; background: var(--accent); }
.ins-key i.k-typ { background: none; border-top: 2px dashed var(--text-faint); height: 0; margin-left: 6px; }
.ins-empty { min-height: 110px; display: grid; place-items: center; text-align: center; font-size: 0.78rem; color: var(--text-faint); padding: 8px; border: 1px dashed var(--border); border-radius: 12px; }
.ins-svg { display: block; overflow: visible; }
.ins-svg .ins-grid { stroke: var(--border); stroke-dasharray: 3 4; }
.ins-max { font-size: 10px; fill: var(--text-faint); font-family: var(--font); }
.ins-val { font-size: 10.5px; font-weight: 700; fill: var(--text); font-family: var(--font); }
.ins-bar { fill: color-mix(in srgb, var(--text) 18%, transparent); transform-box: fill-box; transform-origin: bottom; animation: ins-bar-up 0.6s var(--ease) both; transition: fill 0.15s; }
.ins-bar.mark { fill: var(--accent); }
.ins-bar.hover { fill: color-mix(in srgb, var(--text) 45%, transparent); }
.ins-bar.mark.hover { fill: var(--accent); opacity: 0.85; }
.ins-tone-money .ins-bar { fill: color-mix(in srgb, var(--success) 26%, transparent); }
.ins-tone-money .ins-bar.mark, .ins-tone-money .ins-bar.hover { fill: var(--success); }
.ins-tone-money .ins-val { fill: var(--success); }
.hatch-bg { fill: color-mix(in srgb, var(--text) 8%, transparent); }
.hatch-line { stroke: color-mix(in srgb, var(--text) 40%, transparent); stroke-width: 2; }
.ins-tone-money .hatch-line { stroke: var(--success); }
@keyframes ins-bar-up { from { transform: scaleY(0); } }
.ins-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ins-line.main { stroke: var(--accent); stroke-dasharray: 1; stroke-dashoffset: 1; animation: ins-draw 0.9s var(--ease) 0.1s forwards; }
@keyframes ins-draw { to { stroke-dashoffset: 0; } }
.ins-line.typical { stroke: var(--text-faint); stroke-width: 1.5; stroke-dasharray: 3 4; }
.ins-line.forecast { stroke: var(--text-dim); stroke-dasharray: 5 5; }
.ins-svg .stop-a { stop-color: var(--accent); stop-opacity: 0.22; }
.ins-svg .stop-b { stop-color: var(--accent); stop-opacity: 0; }
.ins-area { animation: ins-fade 0.8s ease 0.3s both; }
@keyframes ins-fade { from { opacity: 0; } }
.ins-svg .hover-line { stroke: var(--border-strong); stroke-width: 1; }
.ins-svg .hover-line, .ins-svg .hover-dot { opacity: 0; transition: opacity 0.12s; }
.ins-svg.hovering .hover-line, .ins-svg.hovering .hover-dot { opacity: 1; }
.ins-svg .hover-dot { fill: var(--accent); stroke: var(--bg-elev); stroke-width: 2; }
.ins-stage .chart-tip { top: -6px; z-index: 3; }
.ins-list { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.ins-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; margin: 0 -8px; border-radius: 10px; color: var(--text); text-decoration: none; min-width: 0; }
a.ins-row:hover { background: var(--bg-hover); text-decoration: none; }
.ins-row.self { background: var(--bg-hover); box-shadow: inset 0 0 0 1px var(--border-strong); }
.ins-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ins-row strong { font-size: 0.84rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ins-row .hint { font-size: 0.72rem; }
.ins-row .game-icon { border-radius: 8px; flex-shrink: 0; }
.ins-chart-ico { width: 30px; height: 30px; flex-shrink: 0; display: grid; place-items: center; border-radius: 8px; background: var(--bg-hover); border: 1px solid var(--border); font-size: 0.68rem; font-weight: 700; color: var(--text-dim); }
.ins-rank { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }
.ins-rank.off { color: var(--text-faint); font-weight: 500; font-size: 0.8rem; }
.ins-rank-spark { display: block; }
.ins-rank-spark path { fill: none; stroke: var(--text-dim); stroke-width: 1.6; stroke-linejoin: round; }
.ins-rank-spark circle { fill: var(--accent); }
@media (max-width: 400px) { .ins-row-spark { display: none; } }
.ins-pos { width: 18px; text-align: center; font-size: 0.74rem; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.ins-num { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.ins-num b { font-size: 0.86rem; }
.ins-num small { font-size: 0.7rem; font-weight: 600; }
.ins-num .pos { color: var(--success); }
.ins-num .neg { color: var(--danger); }
.heatmap { position: relative; display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 3px; align-items: center; margin-top: 2px; }
.hm-day { font-size: 0.7rem; color: var(--text-faint); }
.hm-cell { aspect-ratio: 1 / 1; max-height: 22px; border-radius: 4px; background: color-mix(in srgb, var(--accent) calc(var(--k) * 88% + 6%), var(--bg-hover)); transition: transform 0.15s var(--ease); }
.hm-cell:hover { transform: scale(1.25); position: relative; z-index: 1; }
.hm-cell.none { background: var(--bg-hover); }
.hm-hour { font-size: 0.64rem; color: var(--text-faint); white-space: nowrap; }
.heatmap .chart-tip { top: -30px; }
.ins-tip { display: flex; gap: 8px; align-items: flex-start; font-size: 0.78rem; color: var(--text-dim); margin: 12px 0 0; padding: 10px 12px; background: var(--bg-hover); border-radius: 10px; }
.ins-tip svg { flex-shrink: 0; margin-top: 1px; color: var(--warn); }
.ins-tip b { color: var(--text); }
.nav-avatar { position: relative; }
.nav-badge { position: absolute; top: -4px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: #ef4444; color: #fff; font-size: 0.64rem; font-weight: 700; line-height: 17px; text-align: center; border: 2px solid var(--bg); box-sizing: content-box; }
.nav-badge[hidden], .nav-count[hidden] { display: none; }
.nav-menu .nav-inbox { display: flex !important; align-items: center; justify-content: space-between; }
.nav-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #ef4444; color: #fff; font-size: 0.68rem; font-weight: 700; display: inline-grid; place-items: center; }

/* Insights layout: metric explorer, heatmap, charts + competition */
.ins-wrap { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; container-type: inline-size; }
.ins-wrap[hidden] { display: none; }
.ins-wrap > .card { margin: 0; animation: rise 0.5s var(--ease) both; }
.ins-wrap > .card:nth-child(2) { animation-delay: 0.06s; }
.ins-wrap > .card:nth-child(3) { animation-delay: 0.12s; }
.ins-wrap .card-head .segmented { margin: 0; transition: opacity 0.2s; }
.ins-wrap .segmented.is-off { opacity: 0.35; pointer-events: none; }
.ins-explore-body { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 20px; }
.ins-rail { display: flex; flex-direction: column; gap: 2px; padding-right: 14px; border-right: 1px solid var(--border); }
.ins-metric { appearance: none; font: inherit; color: inherit; text-align: left; background: none; border: 0; cursor: pointer; display: flex; flex-direction: column; gap: 1px; padding: 8px 12px; border-radius: 12px; transition: background 0.15s ease, box-shadow 0.15s ease; }
.ins-metric:hover { background: var(--bg-hover); }
.ins-metric[aria-selected="true"] { background: var(--bg-hover); box-shadow: inset 0 0 0 1px var(--border-strong); }
.ins-metric:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ins-m-label { font-size: 0.74rem; color: var(--text-dim); transition: color 0.15s; }
.ins-metric[aria-selected="true"] .ins-m-label { color: var(--text); }
.ins-m-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ins-m-row b { font-size: 1rem; font-weight: 650; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ins-m-row .ins-chg { font-size: 0.72rem; }
.ins-m-row .ins-chg svg { width: 12px; height: 12px; }
.ins-stage { min-width: 0; display: flex; flex-direction: column; }
.ins-stage.swap > * { animation: ins-fade 0.35s ease both; }
.ins-stage .ins-sub { margin-bottom: 14px; }
.ins-stage .ins-plot { min-height: 0; margin-top: auto; }
.ins-key i.k-bar { width: 10px; height: 10px; border-radius: 3px; background: color-mix(in srgb, var(--text) 18%, transparent); }
.ins-key i.k-fut { width: 10px; height: 10px; border-radius: 3px; background: none; border: 1.3px dashed var(--text-dim); margin-left: 6px; }
.ins-bar.future { fill: transparent; stroke: color-mix(in srgb, var(--text) 45%, transparent); stroke-width: 1.2; stroke-dasharray: 3 3; }
.ins-bar.future.hover { fill: color-mix(in srgb, var(--text) 10%, transparent); }
@container (max-width: 600px) {
  .ins-explore-body { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .ins-rail { flex-direction: row; overflow-x: auto; padding: 2px 2px 8px; border-right: 0; scrollbar-width: none; }
  .ins-rail::-webkit-scrollbar { display: none; }
  .ins-metric { flex: 0 0 auto; min-width: 124px; box-shadow: inset 0 0 0 1px var(--border); }
}
.ins-heat-body { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 22px; align-items: center; }
.ins-heat-facts { display: flex; flex-direction: column; gap: 14px; }
.ins-heat-facts div { display: flex; flex-direction: column; }
.ins-heat-facts .hint { font-size: 0.72rem; }
.ins-heat-facts b { font-size: 0.98rem; font-weight: 650; }
@container (max-width: 600px) {
  .ins-heat-body { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .ins-heat-facts { flex-direction: row; justify-content: space-between; gap: 10px; }
  .ins-heat-facts b { font-size: 0.86rem; }
}
.ins-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 0; }
.ins-split > .ins-col { padding: 16px 18px; min-width: 0; }
.ins-split > .ins-col + .ins-col { border-left: 1px solid var(--border); }
.ins-split .card-head { margin-bottom: 6px; }
@container (max-width: 600px) {
  .ins-split { grid-template-columns: minmax(0, 1fr); }
  .ins-split > .ins-col + .ins-col { border-left: 0; border-top: 1px solid var(--border); }
}
.ins-wrap:not([hidden]) + .card { margin-top: 16px; }

/* Change log (game page) and My games activity feed */
.cl-scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 12px; }
.cl-score { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-hover); }
.cl-score b { font-size: 1.15rem; font-weight: 650; }
.cl-score .hint { font-size: 0.74rem; }
.cl-list li.cl-row { align-items: flex-start; gap: 12px; padding: 12px 0; }
.cl-pill { flex: 0 0 auto; font-size: 0.72rem; font-weight: 550; line-height: 1; padding: 5px 9px; border-radius: 999px; color: var(--text-dim); background: var(--bg-hover); border: 1px solid var(--border); white-space: nowrap; margin-top: 1px; }
.cl-pill.cl-update { color: var(--text); border-color: var(--border-strong); }
.cl-pill.cl-title { color: var(--link); border-color: color-mix(in srgb, var(--link) 35%, transparent); background: color-mix(in srgb, var(--link) 8%, transparent); }
.cl-pill.cl-icon, .cl-pill.cl-thumbnail { --cl-v: color-mix(in srgb, var(--link) 45%, #a855f7); color: var(--cl-v); border-color: color-mix(in srgb, var(--cl-v) 35%, transparent); background: color-mix(in srgb, var(--cl-v) 8%, transparent); }
.cl-pill.cl-chart, .cl-pill.cl-surge { color: var(--success); border-color: color-mix(in srgb, var(--success) 35%, transparent); background: color-mix(in srgb, var(--success) 8%, transparent); }
.cl-pill.cl-high { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: color-mix(in srgb, var(--warn) 8%, transparent); }
.cl-what { display: block; font-weight: 500; font-size: 0.9rem; overflow-wrap: anywhere; }
.cl-old { color: var(--text-dim); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--text-dim) 60%, transparent); font-weight: 400; }
.cl-imgs { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--text-faint); }
.cl-imgs img, .cl-noimg { border-radius: 10px; border: 1px solid var(--border); background: var(--bg-hover); object-fit: cover; }
.cl-imgs.cl-icon img, .cl-imgs.cl-icon .cl-noimg { width: 56px; height: 56px; }
.cl-imgs.cl-thumbnail img, .cl-imgs.cl-thumbnail .cl-noimg { width: 128px; height: 72px; }
.cl-noimg { display: inline-flex; align-items: center; justify-content: center; font-size: 0.7rem; color: var(--text-faint); }
.cl-impact { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; font-size: 0.86rem; }
.cl-impact small { font-size: 0.72rem; color: var(--text-dim); white-space: nowrap; }
@media (max-width: 560px) {
  .cl-list li.cl-row { flex-wrap: wrap; }
  .cl-list li.cl-row .grow { flex-basis: calc(100% - 100px); }
  .cl-impact { flex-basis: 100%; flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 8px; padding-left: 0; }
  .cl-imgs.cl-thumbnail img, .cl-imgs.cl-thumbnail .cl-noimg { width: 104px; height: 58px; }
}

/* CSV downloads */
.csv-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* My games dashboard */
.dash-top { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.dash-top .search-wrap { margin: 0; }
.dash-sync { margin: 0; font-size: 0.8rem; }
.dash-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.dash-totals[hidden] { display: none; }
.dash-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-elev); animation: rise 0.5s var(--ease) both; }
.dash-tile:nth-child(2) { animation-delay: 0.04s; }
.dash-tile:nth-child(3) { animation-delay: 0.08s; }
.dash-tile:nth-child(4) { animation-delay: 0.12s; }
.dash-tile .hint { font-size: 0.76rem; }
.dash-tile b { font-size: 1.4rem; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) { .dash-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-tile b { font-size: 1.15rem; } }
.dash-table th { text-transform: none; letter-spacing: 0; font-size: 0.76rem; }
.dash-table .game-cell > div:not(.icon) { flex: 1; }
.dash-sub { font-size: 0.74rem; margin-top: 2px; white-space: nowrap; }
.dash-ranks { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.dash-rank { font-size: 0.7rem; line-height: 1; padding: 3px 7px; border-radius: 999px; color: var(--success); background: color-mix(in srgb, var(--success) 9%, transparent); border: 1px solid color-mix(in srgb, var(--success) 30%, transparent); white-space: nowrap; }
.dash-feed-row > img, .dash-feed-row > .icon { flex: 0 0 auto; }
.dash-feed-head { display: flex; align-items: center; gap: 8px; min-width: 0; margin-bottom: 3px; }
.mini-list .dash-feed-head a { display: inline-block; max-width: 70%; font-size: 0.84rem; }
.dash-feed-head .cl-pill { margin: 0; padding: 3px 8px; font-size: 0.68rem; }
.dash-empty { text-align: center; padding: 36px 20px; }
.dash-empty h2 { margin: 0 0 6px; }
.dash-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.dash-links[hidden], .watch-note[hidden] { display: none; }
.watch-note { margin: 0 0 10px; font-size: 0.8rem; }
.dash-ranks { min-width: 0; }
.dash-rank { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) {
  .dash-rank:nth-child(n+2) { display: none; }
  .dash-table .game-cell { gap: 8px; }
  .dash-table .game-cell .game-icon { width: 32px; height: 32px; }
  .dash-table .game-cell a { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}
.mini-list .dash-feed-head a { text-decoration: none; }
.mini-list .dash-feed-head a:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .dash-table td:nth-child(3) .dash-sub { display: none; }
  .dash-table th:nth-child(3) { white-space: normal; }
  .dash-table .game-cell .game-icon { width: 32px !important; height: 32px !important; }
}
.only-sm { display: none; }
@media (max-width: 640px) { .only-sm { display: inline; } }

/* People card on the game page */
.people-head { display: flex; align-items: center; gap: 14px; min-width: 0; margin-bottom: 14px; }
.people-head .grow { flex: 1; min-width: 0; }
.people-img { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 14px; object-fit: cover; background: var(--bg-input); border: 1px solid var(--border); }
.people-img.round { border-radius: 50%; }
.people-img.placeholder { display: inline-block; }
.people-name { font-size: 1.05rem; font-weight: 650; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.people-name:hover { text-decoration: underline; }
.people-head .hint { margin-top: 3px; font-size: 0.8rem; }
.people-head .hint a { color: inherit; }
.people-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.people-stats > div { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-input); min-width: 0; }
.people-stats .hint { font-size: 0.74rem; }
.people-stats b { font-size: 1.05rem; font-weight: 650; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.people-note { margin: 4px 0 2px; font-size: 0.8rem; }
@media (max-width: 560px) { .people-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Is Roblox down? */
.rs-verdict { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; padding: 20px 22px; --rs: var(--text-faint); border-color: color-mix(in srgb, var(--rs) 35%, var(--border)); background: linear-gradient(135deg, color-mix(in srgb, var(--rs) 8%, var(--bg-elev)), var(--bg-elev) 60%); transition: border-color 0.3s var(--ease), background 0.3s var(--ease); }
.rs-verdict[data-state="normal"], .rs-off-head[data-ok="true"] { --rs: var(--success); }
.rs-verdict[data-state="issues"], .rs-verdict[data-state="dropping"] { --rs: var(--warn); }
.rs-verdict[data-state="down"], .rs-verdict[data-state="stale"], .rs-off-head[data-ok="false"] { --rs: var(--danger); }
.rs-off-head[data-ok="false"] { --rs: var(--warn); }
.rs-dot { flex: 0 0 auto; width: 14px; height: 14px; margin-top: 6px; border-radius: 50%; background: var(--rs, var(--text-faint)); box-shadow: 0 0 0 5px color-mix(in srgb, var(--rs, var(--text-faint)) 18%, transparent); }
.rs-verdict[data-state="normal"] .rs-dot, .rs-verdict[data-state="down"] .rs-dot, .rs-verdict[data-state="dropping"] .rs-dot { animation: rs-pulse 2.4s ease-in-out infinite; }
@keyframes rs-pulse { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--rs) 6%, transparent); } }
@media (prefers-reduced-motion: reduce) { .rs-dot { animation: none !important; } }
.rs-main { flex: 1; min-width: 0; }
.rs-main h2 { margin: 0 0 4px; font-size: 1.5rem; letter-spacing: -0.02em; }
.rs-main .hint { margin: 0; font-size: 0.9rem; line-height: 1.5; }
.rs-main .hint b { color: var(--text); font-weight: 600; }
.rs-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.rs-chips:empty { display: none; }
.rs-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--text-dim); padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-input); white-space: nowrap; }
.rs-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.rs-grid > .card { margin: 0; min-width: 0; }
.rs-grid .card-head { flex-wrap: wrap; gap: 8px; }
.rs-grid .card-head .segmented { margin-bottom: 0; }
.rs-plot { margin-top: 6px; }
.rs-off-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 10px; }
.rs-off-head .rs-dot { width: 10px; height: 10px; margin-top: 0; box-shadow: 0 0 0 4px color-mix(in srgb, var(--rs) 18%, transparent); }
.rs-off-head .hint { font-size: 0.76rem; }
.rs-h3 { font-size: 0.86rem; font-weight: 600; margin: 14px 0 2px; }
.rs-official .mini-list .meta { white-space: normal; font-size: 0.76rem; color: var(--text-dim); }
.rs-official .mini-list .right { font-size: 0.76rem; color: var(--warn); white-space: nowrap; }
.rs-faq h2 { font-size: 1.05rem; }
.rs-faq h2:not(:first-child) { margin-top: 18px; }
@media (max-width: 820px) { .rs-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .rs-verdict { padding: 16px; gap: 12px; } .rs-main h2 { font-size: 1.2rem; } .rs-chip { white-space: normal; } }

/* Compare: section rows */
.compare-table tr.cmp-group td { text-align: left; color: var(--text); font-weight: 600; font-size: 0.8rem; padding-top: 16px; background: none; }
.compare-table tr.cmp-group:first-child td { padding-top: 6px; }
.compare-table tr.cmp-group td .hint { font-weight: 400; }
.compare-table td .hint { font-size: 0.72rem; font-weight: 400; }
.stat-strip a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 3px; } .stat-strip a:hover { color: var(--text); }
.rs-faq > h2:first-child { margin-top: 0; }
@media (max-width: 640px) { .chg-win { display: none; } }
.compare-table tr.cmp-group td { white-space: normal; }
.cmp-gl { position: sticky; left: 10px; display: inline-block; max-width: min(100%, calc(100vw - 90px)); }
.cmp-gl .hint { margin-top: 2px; }

/* Server-filled hero text (shown until the page's script draws the full view) */
.game-hero > div > p.hint { margin: 6px 0 0; max-width: 640px; line-height: 1.5; }
.ssr-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.86rem; }

/* ---- Studio tools ---- */
.checklist li.warn::before { content: "!"; color: var(--warn); font-weight: 700; }
.checklist li.warn { color: var(--text); }
.tp-label { font-size: 0.78rem; font-weight: 600; color: var(--text-dim); margin: 18px 0 8px; }
.tp-label:first-child { margin-top: 0; }

/* UDim2 converter */
.ud-code { margin-top: 14px; }
.ud-code-label { font-size: 0.8rem; font-weight: 600; margin: 10px 0 6px; }
.ud-code-label .hint { font-weight: 400; }
.ud-code .output-line code { font-family: "JetBrains Mono", monospace; font-size: 0.84rem; background: var(--bg-input); border: 1px solid var(--border); }
.ud-devices { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.ud-dev { margin: 0; flex: 1 1 140px; max-width: 100%; min-width: 0; }
.ud-screen { position: relative; overflow: hidden; border: 6px solid color-mix(in srgb, var(--text) 14%, transparent); border-radius: 12px; background: repeating-linear-gradient(0deg, transparent 0 19px, color-mix(in srgb, var(--text) 5%, transparent) 19px 20px), repeating-linear-gradient(90deg, transparent 0 19px, color-mix(in srgb, var(--text) 5%, transparent) 19px 20px), var(--bg-input); }
.ud-box { position: absolute; border-radius: 6px; background: color-mix(in srgb, var(--accent) 22%, transparent); border: 1.5px solid var(--accent); transition: width 0.25s var(--ease), height 0.25s var(--ease); }
.ud-pin { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); transition: left 0.25s var(--ease), top 0.25s var(--ease); }
.ud-dev figcaption { font-size: 0.8rem; margin-top: 6px; display: flex; flex-direction: column; gap: 1px; }
.ud-dev figcaption .hint { font-size: 0.74rem; }
@media (min-width: 720px) { .ud-dev:nth-child(1) { flex-grow: 1.1; } .ud-dev:nth-child(2) { flex-grow: 1.2; } .ud-dev:nth-child(3) { flex-grow: 1.7; } }

/* Icon & thumbnail preview */
.tp-drops { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 12px; }
.tp-drop { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1.5px dashed var(--border-strong); border-radius: 14px; cursor: pointer; margin: 0; font-weight: 400; transition: border-color 0.2s, background 0.2s; min-width: 0; }
.tp-drop:hover, .tp-drop.over, .tp-drop:focus-within { border-color: var(--accent); background: var(--bg-hover); }
.tp-drop > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tp-drop .hint { font-size: 0.76rem; }
.tp-drop-art { flex: 0 0 auto; background: var(--bg-input) center / cover no-repeat; border-radius: 10px; border: 1px solid var(--border); }
.tp-drop-art.tp-sq { width: 64px; height: 64px; }
.tp-drop-art.tp-wide { width: 112px; height: 63px; }
.tp-stage { border-radius: 14px; padding: 16px; --tp-bg: #191b1d; --tp-card: #232527; --tp-text: #f7f7f8; --tp-dim: #a5a7aa; --tp-other: #34373a; background: var(--tp-bg); color: var(--tp-text); transition: background 0.25s var(--ease); }
.tp-stage[data-bg="light"] { --tp-bg: #f2f4f5; --tp-card: #ffffff; --tp-text: #1d1f21; --tp-dim: #60656a; --tp-other: #dadde0; }
.tp-stage .tp-label { color: var(--tp-dim); }
.tp-art { background: var(--tp-other) center / cover no-repeat; border-radius: 10px; }
.tp-art.tp-sq { aspect-ratio: 1; }
.tp-art.tp-wide { aspect-ratio: 16 / 9; }
.tp-card .tp-art[style*="--o"], .tp-wcard .tp-art[style*="--o"] { opacity: calc(1 - var(--o) * 0.12); }
.tp-row { display: grid; grid-template-columns: repeat(4, minmax(0, 104px)); gap: 10px; }
.tp-card, .tp-wcard { min-width: 0; }
.tp-name { font-size: 0.8rem; font-weight: 600; line-height: 1.25; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.tp-name i { display: block; height: 8px; border-radius: 4px; background: var(--tp-other); margin-top: 4px; width: 90%; }
.tp-name i + i { width: 60%; }
.tp-stats { display: flex; gap: 8px; font-size: 0.7rem; color: var(--tp-dim); margin-top: 3px; white-space: nowrap; overflow: hidden; }
.tp-wide-row { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 260px); gap: 12px; }
.tp-page { background: var(--tp-card); border-radius: 14px; overflow: hidden; max-width: 560px; }
.tp-hero { border-radius: 0; }
.tp-page-info { display: flex; align-items: center; gap: 12px; padding: 12px; }
.tp-page-info > .tp-art { width: 56px; flex: 0 0 auto; }
.tp-page-info > div:not(.tp-art) { flex: 1; min-width: 0; }
.tp-page-name { font-weight: 700; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-by { font-size: 0.76rem; color: var(--tp-dim); }
.tp-play { flex: 0 0 auto; width: 56px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #3a8a3a; color: #fff; font-size: 0.9rem; }
.tp-tiny { display: flex; align-items: center; gap: 12px; }
.tp-tiny .tp-art { border-radius: 8px; flex: 0 0 auto; }
.tp-stage .tp-tiny .hint { color: var(--tp-dim); font-size: 0.76rem; }
@media (max-width: 560px) {
  .tp-drops { grid-template-columns: minmax(0, 1fr); }
  .tp-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tp-row .tp-card:nth-child(4) { display: none; }
  .tp-wide-row { grid-template-columns: minmax(0, 1fr) minmax(0, 0.35fr); }
  .tp-stage { padding: 12px; }
}

/* Title checker */
.tc-count { float: right; font-weight: 400; font-variant-numeric: tabular-nums; }
.tc-count.bad { color: var(--danger); }
textarea { width: 100%; resize: vertical; min-height: 120px; line-height: 1.5; }
.tc-previews { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.tc-previews .grow { flex: 1 1 260px; min-width: 0; }
.tc-tile { width: 112px; }
.tc-art { aspect-ratio: 1; border-radius: 10px; background: linear-gradient(135deg, color-mix(in srgb, var(--text) 18%, transparent), color-mix(in srgb, var(--text) 6%, transparent)); }
.tc-tname { font-size: 0.8rem; font-weight: 600; line-height: 1.25; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.tc-about { padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-input); font-size: 0.86rem; }
.tc-about p { margin: 4px 0 0; color: var(--text-dim); overflow-wrap: anywhere; }

/* Payout splitter */
.ps-head, .ps-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 0.8fr) 34px; gap: 8px; align-items: center; }
.ps-head { font-size: 0.76rem; font-weight: 600; color: var(--text-dim); margin-bottom: 6px; }
.ps-head .hint { font-weight: 400; }
.ps-row { margin-bottom: 8px; }
.ps-row input { min-width: 0; }
.ps-row .icon-btn { width: 34px; height: 38px; }
.ps-row .icon-btn:disabled { opacity: 0.35; cursor: default; }
.compare-table tr.ps-kept td { color: var(--text-dim); }
@media (max-width: 560px) {
  .ps-head { display: none; }
  .ps-row { grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr) 34px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
  .ps-row input[data-k="uid"] { grid-column: 1 / -1; grid-row: 2; }
}

/* UGC calculator */
.compare-table td.ugc-neg { color: var(--danger); }
.tp-card .tp-pw { display: none; }

@media (max-width: 720px) { .tool-layout section.card > .result-grid .stat:last-child:nth-child(odd) { grid-column: 1 / -1; } }

/* Admin: free plan usage meters */
.use-row { padding: 12px 0; border-top: 1px solid var(--border); }
.use-row:first-child { border-top: 0; padding-top: 2px; }
.use-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; font-size: 0.9rem; }
.use-badge { font-size: 0.78rem; font-weight: 500; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-dim); white-space: nowrap; }
.use-bar { height: 8px; border-radius: 999px; background: var(--bg-input); border: 1px solid var(--border); overflow: hidden; margin-bottom: 6px; }
.use-bar span { display: block; height: 100%; border-radius: 999px; background: var(--success); }
.use-warning .use-bar span { background: var(--warn); }
.use-critical .use-bar span { background: var(--danger); }
.use-warning .use-badge { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.use-critical .use-badge { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.use-row .hint { margin: 0; }
