:root {
  --bg:#f4f8fb; --surface:#ffffff; --surface-strong:#182139; --ink:#172033; --muted:#657384; --line:#d9e2ec;
  --mint:#10bdb8; --mint-soft:#daf7f5; --amber:#d69a31; --amber-soft:#faebcf; --coral:#f42e83; --blue:#642bd6;
  --on-strong:#ffffff; --on-strong-muted:#c8d8ea; --surface-soft:#edf5f7; --surface-input:#f8fbfd;
  --surface-neutral:#e7eef5; --neutral-ink:#495d70; --disabled-ink:#8c99a8; --danger-soft:#fde0ec; --danger-ink:#a61f57;
  --shadow:0 18px 50px rgba(20, 36, 62, .08);
}

* { box-sizing: border-box; }
[hidden] { display:none !important; }
body { margin:0; background:var(--bg); color:var(--ink); font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing:0; }
a { color:inherit; text-decoration:none; }
button, input, select { font:inherit; }
.shell { width:min(1220px, calc(100% - 32px)); margin:0 auto; }
.topbar { display:flex; align-items:center; justify-content:space-between; min-height:72px; border-bottom:1px solid var(--line); }
.brand { display:flex; align-items:center; min-width:0; }
.brand-logo { display:block; width:clamp(142px, 18vw, 196px); height:auto; }
.brand-mark { display:none; width:42px; height:42px; object-fit:contain; }
.topnav { display:flex; align-items:center; gap:18px; }
.nav-link { color:var(--muted); font-size:14px; font-weight:650; }
main { padding:28px 0 56px; }

.advert-banner-shell { display:flex; justify-content:center; padding-top:16px; }
.advert-frame { display:block; border:0; background:#d8dadd; overflow:hidden; }
.advert-frame.banner { width:min(728px, calc(100vw - 32px)); height:90px; }
.advert-rail { position:absolute; top:272px; z-index:2; display:none; width:160px; height:600px; }
.advert-rail.left { right:calc(50% + 628px); }
.advert-rail.right { left:calc(50% + 628px); }
.advert-frame.skyscraper { width:160px; height:600px; }

.hero { display:grid; grid-template-columns:1.25fr .75fr; gap:18px; align-items:stretch; margin-bottom:18px; }
.headline { background:var(--surface-strong); color:var(--on-strong); border-radius:8px; padding:28px; box-shadow:var(--shadow); }
.eyebrow { color:var(--on-strong-muted); text-transform:uppercase; letter-spacing:.08em; font-size:12px; font-weight:800; margin-bottom:10px; }
h1 { margin:0; font-size:clamp(38px, 5vw, 64px); line-height:1.02; max-width:800px; }
h2 { margin:0; font-size:18px; line-height:1.2; }
.subtle { color:var(--muted); }
.strong-subtle { color:var(--on-strong-muted); }
.metric-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px; }
.metric { min-height:118px; padding:18px; border-radius:8px; background:var(--surface); border:1px solid var(--line); box-shadow:var(--shadow); display:grid; align-content:center; gap:7px; }
.metric-label { color:var(--muted); font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
.metric-value { font-size:clamp(22px, 2.2vw, 28px); line-height:1.08; font-weight:850; overflow-wrap:anywhere; }
#giftValueMetric { font-size:clamp(19px, 1.8vw, 24px); }
.page-tools { display:flex; justify-content:flex-end; align-items:center; gap:10px; margin:0 0 18px; font-size:13px; }
.compact-select { border:1px solid var(--line); border-radius:8px; min-height:34px; padding:6px 10px; background:var(--surface-input); color:var(--ink); font-size:13px; font-weight:700; }
.section-head { min-height:auto; padding:0; margin:28px 0 12px; }
.highlight-grid { display:grid; grid-template-columns:repeat(6, minmax(0, 1fr)); gap:12px; margin-bottom:18px; }
.highlight-card { min-height:108px; display:grid; align-content:space-between; padding:14px; }
.highlight-title { margin-top:5px; font-size:14px; font-weight:850; line-height:1.16; overflow-wrap:anywhere; }
.highlight-value { color:var(--blue); font-size:13px; font-weight:850; margin-top:3px; }
.highlight-meta, .highlight-previous { color:var(--muted); font-size:11px; margin-top:4px; line-height:1.25; overflow:hidden; text-overflow:ellipsis; }

.grid-2 { display:grid; grid-template-columns:1.35fr .75fr; gap:18px; margin-bottom:18px; align-items:start; }
.public-data-grid { grid-template-columns:1.45fr .65fr; }
.grid-3 { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:18px; margin-bottom:18px; }
.card { background:var(--surface); border:1px solid var(--line); border-radius:8px; box-shadow:var(--shadow); overflow:hidden; }
.card-head { min-height:74px; padding:18px; border-bottom:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; gap:14px; }
.card-head .subtle { margin-top:4px; font-size:13px; }
.card-body { padding:18px; }
.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; min-width:620px; }
th, td { padding:11px 13px; border-bottom:1px solid var(--line); text-align:left; white-space:nowrap; font-size:13px; }
th { color:var(--muted); font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
tbody tr:last-child td { border-bottom:0; }
.account-link { font-weight:800; color:var(--ink); }
.handle { color:var(--muted); font-size:12px; margin-top:2px; display:block; }
.button, button { min-height:34px; display:inline-flex; align-items:center; justify-content:center; border:0; border-radius:8px; padding:7px 11px; background:var(--surface-strong); color:var(--on-strong); font-weight:800; font-size:13px; cursor:pointer; }
.button.secondary, button.secondary, .pager-link { background:var(--surface-neutral); color:var(--ink); }
button:disabled { color:var(--disabled-ink); cursor:default; opacity:.65; }
.control-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.search-control { position:relative; display:block; }
.search-control input { min-height:38px; width:min(260px, 100%); border:1px solid var(--line); border-radius:8px; padding:8px 11px; background:var(--surface-input); color:var(--ink); font-weight:650; }
.online-list { display:grid; gap:8px; padding:12px; }
.online-row { min-height:44px; display:flex; align-items:center; justify-content:space-between; gap:14px; padding:9px 11px; border:1px solid var(--line); border-radius:8px; background:var(--surface-input); }
.online-row strong { display:block; font-size:13px; }
.viewer-pill { color:var(--on-strong); background:var(--surface-strong); border-radius:999px; padding:5px 9px; font-size:12px; font-weight:800; white-space:nowrap; }
.live-banner, .badge.live { display:inline-flex; align-items:center; min-height:24px; border-radius:6px; padding:3px 7px; background:var(--mint-soft); color:#087c78; font-size:11px; font-weight:850; text-transform:uppercase; }
.badge { display:inline-flex; width:max-content; min-height:28px; align-items:center; border-radius:999px; padding:5px 10px; background:var(--surface-neutral); color:var(--neutral-ink); font-size:12px; font-weight:800; }
.room-pip { display:inline-block; width:9px; height:9px; margin-right:7px; border-radius:50%; vertical-align:middle; background:var(--mint); box-shadow:0 0 0 3px color-mix(in srgb, var(--mint) 18%, transparent); }
.room-pip.battle { background:var(--coral); box-shadow:0 0 0 3px color-mix(in srgb, var(--coral) 18%, transparent); }
.room-pip.multi_guest { background:var(--blue); box-shadow:0 0 0 3px color-mix(in srgb, var(--blue) 18%, transparent); }
.value-stack { display:flex; align-items:center; flex-wrap:wrap; gap:5px 6px; min-width:150px; white-space:normal; }
.value-cell { min-width:170px; white-space:normal; }
.coin-badge { display:inline-flex; align-items:center; gap:4px; border-radius:999px; background:color-mix(in srgb, #8b5cf6 14%, var(--surface)); color:#7c3aed; padding:4px 7px; font-size:11px; font-weight:850; white-space:nowrap; }
.gift-name { display:flex; align-items:center; gap:9px; font-weight:800; }
.gift-name img { width:30px; height:30px; border-radius:7px; object-fit:cover; }
.segment-control { display:inline-flex; align-items:center; border:1px solid var(--line); border-radius:8px; overflow:hidden; }
.segment-control a, .segment-control button { min-height:32px; border-radius:0; padding:6px 10px; background:var(--surface-input); color:var(--muted); font-size:12px; }
.segment-control a.active { background:var(--surface-strong); color:var(--on-strong); }
.pager { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 18px; border-top:1px solid var(--line); color:var(--muted); font-size:13px; }
.pager-actions { display:flex; gap:8px; }
.search-empty, .empty { color:var(--muted); padding:18px; border:1px dashed var(--line); border-radius:8px; background:var(--surface-soft); margin:12px; }
.profile-view { display:grid; gap:18px; }
.profile-top { display:grid; grid-template-columns:minmax(0, 1fr) minmax(220px, 300px); gap:18px; align-items:stretch; }
.profile-title { padding:28px; background:var(--surface-strong); color:var(--on-strong); border-radius:8px; box-shadow:var(--shadow); }
.profile-title h1 { overflow-wrap:anywhere; }
.profile-action-card .card-body { display:grid; gap:14px; align-content:start; }
.profile-meta-card { margin-bottom:0; }
.profile-bio { margin:0 0 16px; line-height:1.6; max-width:82ch; }
.profile-bio[hidden] { display:none; }
.profile-scrape-status { font-size:13px; text-align:right; }
.profile-metadata-empty { margin:0 0 14px; }
.stat-list { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px; }
.profile-stat-list { grid-template-columns:repeat(4, minmax(0, 1fr)); }
.stat { padding:14px; border-radius:8px; background:var(--surface-soft); border:1px solid var(--line); display:grid; align-content:center; gap:5px; }
.stat span { color:var(--muted); font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
.stat strong { font-size:20px; overflow-wrap:anywhere; }
.error-panel { margin-top:18px; padding:18px; border-radius:8px; background:var(--danger-soft); color:var(--danger-ink); }
.site-footer { border-top:1px solid var(--line); padding:30px 0 42px; color:var(--muted); }
.footer-grid { display:grid; grid-template-columns:minmax(180px, .7fr) minmax(0, 1fr) minmax(240px, .85fr); gap:24px; }
.footer-title { color:var(--ink); font-size:13px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; margin-bottom:10px; }
.footer-links { display:grid; gap:8px; }
.footer-links a { font-weight:650; }
.footer-copy { max-width:58ch; line-height:1.6; }
.footer-stats { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; }
.footer-stat { padding:10px; border:1px solid var(--line); border-radius:8px; background:var(--surface-soft); }
.footer-stat strong { display:block; color:var(--ink); font-size:18px; margin-top:3px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

@media (min-width:1600px) { .advert-rail { display:block; } }
@media (max-width:1080px) { .highlight-grid { grid-template-columns:repeat(3, minmax(0, 1fr)); } .grid-2, .public-data-grid { grid-template-columns:1fr; } }
@media (max-width:1080px) { .profile-stat-list { grid-template-columns:repeat(2, minmax(0, 1fr)); } }
@media (max-width:860px) { .hero, .grid-3, .profile-top { grid-template-columns:1fr; } .metric-grid, .stat-list, .footer-grid { grid-template-columns:1fr; } .card-head { align-items:stretch; flex-direction:column; } .profile-scrape-status { text-align:left; } }
@media (max-width:560px) { .shell { width:min(100% - 20px, 1220px); } .brand-logo { display:none; } .brand-mark { display:block; } .topbar { min-height:64px; } .topnav { gap:10px; font-size:13px; } .highlight-grid { grid-template-columns:1fr; } h1 { font-size:34px; } table { min-width:620px; } .pager { align-items:stretch; flex-direction:column; } .metric-value, #giftValueMetric { font-size:22px; } }
