/* Inter font: loaded via <link> in each HTML head (parallel + preconnect)
   instead of @import, which chained render-blocking requests. */

:root,
html[data-theme="dark"] {
  --bg-base: #080808;
  --bg-card: #111111;
  --bg-card-hover: #161616;
  --bg-sidebar: #0d0d0d;
  --border: #1e1e1e;
  --border-hover: #2e2e2e;
  --accent: #7c3aed;
  --accent-hover: #6d28d9;
  --accent-glow: rgba(124, 58, 237, 0.15);
  --accent-2: #3b82f6;
  --text-primary: #f5f5f5;
  --text-secondary: #888;
  --text-muted: #555;
  --green: #22c55e;
  --green-bg: rgba(34, 197, 94, 0.08);
  --red: #ef4444;
  --yellow: #f59e0b;
  --topbar-bg: rgba(8, 8, 8, 0.85);
  --hover-bg: rgba(255, 255, 255, 0.05);
  --media-bg: #0a0a0a;
  --scrollbar-thumb: #333;
  --scrollbar-thumb-hover: #444;
  --sidebar-width: 220px;
  --radius: 10px;
  --radius-sm: 6px;
}

html[data-theme="light"] {
  --bg-base: #f4f4f5;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f0f2;
  --bg-sidebar: #ffffff;
  --border: #e4e4e7;
  --border-hover: #d4d4d8;
  --accent: #7c3aed;
  --accent-hover: #6d28d9;
  --accent-glow: rgba(124, 58, 237, 0.12);
  --accent-2: #3b82f6;
  --text-primary: #18181b;
  --text-secondary: #52525b;
  --text-muted: #a1a1aa;
  --green: #16a34a;
  --green-bg: rgba(22, 163, 74, 0.1);
  --red: #dc2626;
  --yellow: #d97706;
  --topbar-bg: rgba(255, 255, 255, 0.88);
  --hover-bg: rgba(0, 0, 0, 0.05);
  --media-bg: #ececee;
  --scrollbar-thumb: #c4c4c8;
  --scrollbar-thumb-hover: #a1a1aa;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }

/* ─── Sidebar ─── */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
  padding: 20px 12px;
  gap: 4px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}

a.sidebar-brand:hover {
  background: var(--hover-bg);
}

.sidebar-brand img {
  width: 32px; height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

.sidebar-brand span {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.sidebar-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 10px 4px;
  margin-top: 8px;
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.sidebar a:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}

.sidebar a.active {
  background: var(--accent-glow);
  color: #a78bfa;
}

.sidebar a svg { width: 16px; height: 16px; flex-shrink: 0; }

.sidebar-bottom {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.sidebar-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--green-bg);
  color: var(--green);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 99px;
}

.sidebar-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ─── Main Content ─── */
.main {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ─── Top Bar ─── */
.topbar {
  position: sticky;
  top: 0;
  background: var(--topbar-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
  padding: 0 28px;
  padding-top: env(safe-area-inset-top);
  height: calc(52px + env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.topbar-left span {
  color: var(--text-primary);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
}

.theme-toggle,
.topbar-icon-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
  text-decoration: none;
}

.theme-toggle:hover,
.topbar-icon-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.theme-toggle svg,
.topbar-icon-btn svg {
  width: 18px;
  height: 18px;
}

/* ── Topbar Support link (Cloudflare-style ghost: icon + text, no border) ── */
.topbar-support {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.topbar-support:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}
.topbar-support.active { color: var(--text-primary); }
.topbar-support svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .topbar-support span { display: none; }
  .topbar-support { padding: 6px; }
}

/* ── Sidebar dropdown group (Status) ── */
.side-group { display: flex; flex-direction: column; }
.side-parent span { flex: 1; }
.side-parent.active-parent { color: var(--text-primary); }
.side-chev-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-right: -6px;
  border-radius: 6px;
  color: var(--text-muted);
  flex-shrink: 0;
  cursor: pointer;
}
.side-chev-btn:hover { background: var(--hover-bg); color: var(--text-primary); }
.side-chev-btn svg { width: 13px; height: 13px; transition: transform 0.18s ease; }
.side-group.open .side-chev-btn svg { transform: rotate(180deg); }
.side-sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.18s ease; }
.side-group.open .side-sub { grid-template-rows: 1fr; }
.side-sub-inner { overflow: hidden; display: flex; flex-direction: column; padding: 1px 0; }
.sidebar .side-sub a { padding: 7px 12px 7px 37px; font-size: 12.5px; }

/* ── Status page ── */
.status-page { padding: 28px 28px 40px; max-width: 1100px; }
.status-sub { font-size: 13px; color: var(--text-secondary); margin: -12px 0 18px; }
.status-pills { display: flex; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.st-pill {
  padding: 7px 14px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.st-pill:hover { color: var(--text-primary); border-color: var(--border-hover); }
.st-pill.active { background: var(--accent-glow); border-color: var(--accent); color: #a78bfa; }
.status-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
  margin: 10px 0 18px;
}
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; flex-shrink: 0; }
.ex-toolbar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.ex-search {
  flex: 1;
  min-width: 180px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}
.ex-search:focus { border-color: var(--accent); }
.ex-search::placeholder { color: var(--text-muted); }
.chip {
  padding: 9px 14px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.chip:hover { color: var(--text-primary); border-color: var(--border-hover); }
.chip.active { background: var(--accent-glow); border-color: var(--accent); color: #a78bfa; }
/* ─── Filters button + drawer (same language as sUNC modal: bg-card panel,
       1px --border, Inter, pill active = accent-glow + #a78bfa) ─── */
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.filter-btn:hover { border-color: var(--border-hover); }
.filter-btn svg { width: 15px; height: 15px; }
.flt-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.filter-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.filter-overlay[hidden] { display: none; }
.filter-overlay.open { opacity: 1; }
.filter-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 92vw);
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(30px);
  transition: transform 0.18s ease;
  overflow: hidden;
}
.filter-overlay.open .filter-panel { transform: translateX(0); }
.filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.filter-title { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.filter-title .sunc-s { color: #a78bfa; }
.filter-head-actions { display: flex; align-items: center; gap: 8px; }
.filter-clear {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.filter-clear:hover:not(:disabled) { border-color: var(--border-hover); color: var(--text-primary); }
.filter-clear:disabled { opacity: 0.4; cursor: default; }
.filter-x {
  width: 30px;
  height: 30px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}
.filter-x:hover { color: var(--text-primary); background: var(--bg-card-hover); }
.filter-body { padding: 20px; overflow-y: auto; flex: 1; }
.filter-sec { margin-bottom: 24px; }
.filter-sec:last-child { margin-bottom: 6px; }
.filter-sec-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.filter-select-wrap { position: relative; }
.filter-select-wrap::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.6px solid var(--text-secondary);
  border-bottom: 1.6px solid var(--text-secondary);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.filter-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  padding: 10px 38px 10px 14px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
}
.filter-select:focus { border-color: var(--accent); }
.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-pill {
  padding: 9px 18px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-pill:hover { color: var(--text-primary); border-color: var(--border-hover); }
.filter-pill.active { background: var(--accent-glow); border-color: var(--accent); color: #a78bfa; }
.filter-plats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.filter-plat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 14px 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-plat:hover { color: var(--text-primary); border-color: var(--border-hover); }
.filter-plat.active { background: var(--accent-glow); border-color: var(--accent); color: #a78bfa; }
.filter-plat svg { width: 22px; height: 22px; }
.ex-count { font-size: 12.5px; color: var(--text-muted); margin-bottom: 12px; }
.ex-count b { color: var(--green); }
.ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.ex-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: 12px;
  padding: 16px;
}
.ex-card.is-ok { border-left-color: var(--green); }
.ex-head { display: flex; align-items: center; gap: 10px; }
.ex-icon {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 17px;
  color: var(--text-secondary);
  flex-shrink: 0;
  overflow: hidden;
}
.ex-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Loaded image covers the fallback letter (transparent logos must not show it through) */
.ex-icon.has-img .ex-letter { display: none; }
.ex-name { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.ex-badges { display: flex; align-items: center; gap: 6px; margin-top: 3px; flex-wrap: wrap; }
.ex-ver { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.ex-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  letter-spacing: 0.2px;
}
.ex-tag.key { background: rgba(124, 58, 237, 0.18); border-color: transparent; color: #c4b5fd; }
.ex-tag.free { color: var(--green); }
.ex-status {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 99px;
  background: var(--red);
  color: #fff;
  flex-shrink: 0;
  white-space: nowrap;
}
.ex-status.ok { background: var(--green); }
.ex-updated { font-size: 12px; color: var(--text-muted); margin-top: 10px; }
.ex-note {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.12);
  border-left: 2px solid var(--accent);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.ex-links { display: flex; gap: 8px; margin-top: 12px; }
.ex-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}
.ex-link-btn:hover { border-color: var(--border-hover); }
.ex-link-btn svg { width: 15px; height: 15px; }
.ex-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--text-secondary);
}
.ex-stats b { color: var(--text-primary); font-weight: 700; }
.ex-stats .yes { color: var(--green); font-weight: 700; }
.ex-stats .no { color: var(--text-muted); font-weight: 700; }
.ver-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ver-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.ver-plat { font-size: 13px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.6px; }
.ver-num { font-size: 24px; font-weight: 800; color: var(--text-primary); margin: 8px 0 4px; word-break: break-all; }
.ver-hash { font-family: ui-monospace, monospace; font-size: 11.5px; color: var(--text-muted); word-break: break-all; }
.ver-date { font-size: 12px; color: var(--text-muted); margin-top: 8px; }
.gh-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
  border: 1px solid var(--border);
}
.gh-banner.ok { background: rgba(34, 197, 94, 0.1); color: var(--green); border-color: transparent; }
.gh-banner.warn { background: rgba(245, 158, 11, 0.12); color: var(--yellow); border-color: transparent; }
.gh-banner.bad { background: rgba(239, 68, 68, 0.12); color: var(--red); border-color: transparent; }
.gh-banner small { font-weight: 500; opacity: 0.85; }
.gh-comp { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 14px; }
.gh-comp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.gh-comp-row:last-child { border-bottom: none; }
.gh-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.gh-comp-row span:last-child { margin-left: auto; color: var(--text-muted); font-size: 12px; }
.gh-inc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}
.gh-inc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gh-inc-head a { color: var(--text-primary); font-weight: 700; font-size: 14px; text-decoration: none; }
.gh-inc-head a:hover { text-decoration: underline; }
.gh-impact {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.gh-inc-body { font-size: 13px; color: var(--text-secondary); line-height: 1.55; margin-top: 8px; }
.st-note {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.6;
}
.st-note .btn-primary { margin-top: 14px; display: inline-block; }
@media (max-width: 760px) {
  .status-page { padding: 20px 16px 32px; }
  .ver-grid { grid-template-columns: 1fr; }
  .ex-grid { grid-template-columns: 1fr; }
}

/* Cost pill (blue, like the reference card) */
.ex-tag.cost { background: var(--accent-2); border-color: transparent; color: #fff; }

/* Clickable sUNC stat → opens the detail modal */
.ex-sunc-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 12.5px;
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.ex-sunc-link:hover { color: var(--accent-2); }
.ex-sunc-link b { color: var(--text-primary); font-weight: 700; }

/* ── sUNC detail modal ── */
.sunc-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}
.sunc-dialog {
  width: 100%;
  max-width: 880px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.sunc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.sunc-title { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.sunc-title .sunc-s { color: #a78bfa; }
.sunc-x {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
}
.sunc-x:hover { color: var(--text-primary); background: var(--bg-card-hover); }
.sunc-note {
  margin: 16px 20px 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.1);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-secondary);
}
.sunc-note b { color: var(--text-primary); }
.sunc-cols { display: grid; grid-template-columns: 260px 1fr; gap: 20px; padding: 20px; }
.sunc-left { text-align: center; }
.sunc-donut { width: 170px; height: 170px; }
.sunc-track { fill: none; stroke: var(--border); stroke-width: 11; }
.sunc-fill { fill: none; stroke-width: 11; stroke-linecap: round; }
.sunc-fill.good { stroke: var(--green); }
.sunc-fill.mid { stroke: var(--yellow); }
.sunc-fill.bad { stroke: var(--red); }
.sunc-pct { fill: var(--text-primary); font-size: 24px; font-weight: 800; }
.sunc-frac-a { fill: var(--green); font-size: 12px; font-weight: 700; }
.sunc-frac-b { fill: var(--text-muted); font-size: 12px; }
.sunc-exec { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-top: 10px; }
.sunc-tested { font-size: 11.5px; color: var(--text-muted); margin-top: 6px; }
.sunc-right { min-width: 0; display: flex; flex-direction: column; }
.sunc-search-row { margin-bottom: 10px; }
.sunc-search-row .ex-search { width: 100%; }
.sunc-count { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.sunc-list { overflow-y: auto; max-height: 380px; border: 1px solid var(--border); border-radius: 10px; }
.sunc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.sunc-row:last-child { border-bottom: none; }
.sunc-ico {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}
.sunc-row.pass .sunc-ico { background: var(--green); color: #fff; }
.sunc-row.fail .sunc-ico { background: var(--red); color: #fff; }
.sunc-fname { font-weight: 600; color: var(--text-primary); word-break: break-all; }
.sunc-lib {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}
.sunc-reason { font-size: 12px; color: var(--text-muted); padding: 0 14px 10px 44px; line-height: 1.5; }
.sunc-foot { padding: 12px 20px; border-top: 1px solid var(--border); text-align: center; font-size: 12px; color: var(--text-muted); }
@media (max-width: 640px) {
  .sunc-cols { grid-template-columns: 1fr; }
  .sunc-overlay { padding: 20px 12px; }
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--border-hover); color: var(--text-primary); }

/* ─── Profile Banner ─── */
.profile-banner {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.profile-banner img,
.profile-banner video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
  user-select: none;
}

.profile-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, var(--bg-base) 100%);
}

/* ─── Profile Info ─── */
.profile-info {
  padding: 0 32px;
  margin-top: -40px;
  position: relative;
  z-index: 2;
}

.profile-avatar-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  margin-bottom: 14px;
  display: block;
  flex-shrink: 0;
}

.profile-avatar,
.profile-avatar-wrap .profile-avatar-base,
.profile-avatar-wrap .profile-avatar-deco {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
  display: block;
}

.profile-avatar {
  transition: opacity 0.15s ease;
}

.profile-avatar-wrap .profile-avatar-base {
  transition: opacity 0.15s ease;
}

.profile-avatar-wrap .profile-avatar-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* Gentle hover bob — rotation is off the table (Yoda must stay upright) */
  animation: deco-bob 3.4s ease-in-out infinite;
  will-change: transform;
  filter: drop-shadow(0 0 7px rgba(124, 58, 237, 0.35));
}

@keyframes deco-bob {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.025); }
}

.profile-info > a:hover .profile-avatar,
.profile-info > a:hover .profile-avatar-base {
  opacity: 0.85;
}

.profile-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 0;
}

.profile-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.profile-discord {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: #5865F2;
  text-decoration: none;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.profile-discord:hover {
  background: rgba(88, 101, 242, 0.12);
  border-color: rgba(88, 101, 242, 0.35);
  transform: translateY(-1px);
}

.profile-discord svg {
  width: 20px;
  height: 20px;
}

.profile-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.profile-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.profile-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.profile-meta-item svg { width: 14px; height: 14px; }

/* ─── Tab Navigation ─── */
.tab-nav {
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  margin-top: 16px;
  display: flex;
  gap: 0;
}

.tab-btn {
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 7px;
}

.tab-btn:hover { color: var(--text-primary); }

.tab-btn.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

.tab-count {
  background: rgba(255,255,255,0.08);
  color: var(--text-secondary);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 99px;
  font-weight: 600;
}

/* ─── Page Content ─── */
.page-content { padding: 28px 32px; }

/* ─── Section Title ─── */
.section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 16px;
}

/* ─── Product Grid ─── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.product-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.product-card-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  background: linear-gradient(135deg, #1a0533 0%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  position: relative;
  overflow: hidden;
}

.product-card-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-glow), rgba(59,130,246,0.1));
}

.product-card-emoji {
  font-size: 40px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 16px rgba(124,58,237,0.4));
}

/* Card media — autoplay video, no controls, clicks pass through to the card */
.product-card-img video,
.card-img-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
  background: transparent;
}

/* ─── Skeleton loading (grids) — static first paint, JS replaces on data ───
   Theme-aware (follows light/dark vars like the roblox page pattern) */
.skel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.skel-cover {
  height: 130px;
  background: linear-gradient(100deg, var(--bg-base) 30%, var(--border-hover) 50%, var(--bg-base) 70%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.3s infinite;
}
.skel-cover.tall { height: 150px; }
.skel-body { padding: 14px 16px 16px; }
.skel-line {
  height: 11px;
  border-radius: 6px;
  margin-bottom: 8px;
  background: linear-gradient(100deg, var(--bg-base) 30%, var(--border-hover) 50%, var(--bg-base) 70%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.3s infinite;
}
.skel-btn {
  height: 33px;
  border-radius: var(--radius-sm);
  margin-top: 10px;
  background: linear-gradient(100deg, var(--bg-base) 30%, var(--border-hover) 50%, var(--bg-base) 70%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.3s infinite;
}
@keyframes skel-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .skel-cover, .skel-line, .skel-btn, .card-media-lazy.skel { animation: none; }
  .profile-avatar-wrap .profile-avatar-deco { animation: none; filter: none; }
}

/* Lazy card media — elegant initial while heavy bytes load on demand */
.card-media-lazy {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #1b1b20 0%, #101013 100%);
}
.card-media-lazy span {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #26262c;
  border: 1px solid #34343c;
  color: #8e8c9c;
  font-weight: 800;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
/* Skeleton variant — shimmer while a card video loads (no still flash).
   Strong gray sweep against the black card so it reads as skeleton UI. */
.card-media-lazy.skel {
  background: linear-gradient(100deg, #101013 30%, #3a3a44 50%, #101013 70%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.3s infinite;
}

.product-card-body { padding: 14px 16px 16px; }

.product-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card-price {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.product-card-price strong {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
}

.product-card-sold {
  font-size: 11px;
  color: var(--text-muted);
  margin: -8px 0 12px;
}

.card-sold {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

.buy-sold-count {
  font-size: 12px;
  color: var(--text-muted);
  margin: 2px 0 10px;
}

.buy-sold-count::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 6px;
  vertical-align: middle;
}

.btn-buy {
  width: 100%;
  padding: 9px;
  background: linear-gradient(180deg, #26262c 0%, #17171b 100%);
  color: #f5f5f5;
  border: 1px solid #34343c;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 2px 8px rgba(0,0,0,.4);
  transition: border-color 0.15s, box-shadow 0.15s, filter 0.15s;
  font-family: 'Inter', sans-serif;
}

.btn-buy:hover {
  filter: brightness(1.15);
  border-color: rgba(245,158,11,.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 0 16px rgba(245,158,11,.14);
}

/* ─── Stats Grid ─── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.stat-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.stat-accent { color: var(--accent); }
.stat-green { color: var(--green); }
.stat-blue { color: var(--accent-2); }

/* ─── Table ─── */
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
}

.table-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.table-title {
  font-size: 14px;
  font-weight: 600;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 13px 20px;
  font-size: 13.5px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--text-secondary);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

td.td-primary { color: var(--text-primary); font-weight: 500; }

/* ─── Badge ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
}

.badge-green { background: var(--green-bg); color: var(--green); }
.badge-red { background: rgba(239,68,68,0.08); color: var(--red); }
.badge-yellow { background: rgba(245,158,11,0.08); color: var(--yellow); }

/* ─── Loading ─── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  color: var(--text-muted);
  font-size: 14px;
  gap: 10px;
}

.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Delivery Modal ─── */
.delivery-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.delivery-modal {
  width: 100%;
  max-width: 520px;
  background: var(--bg-card);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.delivery-modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.delivery-modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #22c55e;
}

.delivery-modal-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.delivery-modal-body {
  padding: 18px 20px;
}

.delivery-modal-note {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
}

.delivery-modal-preview {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-family: monospace;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 240px;
  overflow: auto;
}

.delivery-modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-base);
}

.delivery-modal-actions .btn-primary,
.delivery-modal-actions .btn-ghost,
.delivery-modal-actions a.btn-ghost {
  flex: 1;
  min-width: 120px;
  justify-content: center;
  text-align: center;
  text-decoration: none;
}

/* ─── Purchase History ─── */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.history-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.history-item-name {
  font-size: 15px;
  font-weight: 700;
}

.history-item-date {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.history-item-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  word-break: break-word;
}

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

.history-btn {
  padding: 7px 12px;
  min-height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.history-btn:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.history-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.history-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ─── Empty State ─── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state h3 { font-size: 16px; margin-bottom: 6px; color: var(--text-secondary); }
.empty-state p { font-size: 13px; }

/* ─── Mobile hamburger / overlay ─── */
.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: -8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--text-primary);
  flex-shrink: 0;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.55);
}

.sidebar-backdrop.show { display: block; }

.mobile-pay-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--topbar-bg);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}

.mobile-pay-bar.is-hidden { display: none !important; }

.mobile-pay-bar-price {
  font-size: 16px;
  font-weight: 800;
  min-width: 0;
}

.mobile-pay-bar-btn {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 18px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 110;
    padding-top: calc(20px + env(safe-area-inset-top));
  }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .hamburger { display: flex; }
  .topbar { padding: 0 16px; padding-top: env(safe-area-inset-top); }
  .product-grid,
  .stats-grid,
  .product-full-grid { grid-template-columns: 1fr; }
  .page-content { padding: 20px 16px; }
  .profile-info { padding: 0 16px; }
  .tab-nav { padding: 0 16px; }
  .profile-banner { height: 140px; }
  .delivery-modal-overlay,
  .binance-modal-overlay { padding: 12px; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .delivery-modal-actions { flex-direction: column; }
  .delivery-modal-actions .btn-primary,
  .delivery-modal-actions .btn-ghost,
  .delivery-modal-actions a.btn-ghost {
    min-width: 0;
    min-height: 44px;
    width: 100%;
  }
  .history-item-top { flex-direction: column; gap: 4px; }
  .history-item-date { white-space: normal; }
  .history-item-actions { flex-direction: column; }
  .history-btn { width: 100%; min-height: 44px; }
  .mobile-pay-bar { display: flex; }
  body.has-mobile-pay { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  /* Status cards on narrow phones: let the name shrink instead of pushing */
  .ex-card { padding: 14px; }
  .ex-head > div { min-width: 0; }
  .ex-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ex-status { padding: 5px 10px; font-size: 11px; }
  .ex-links { flex-wrap: wrap; }
  .st-pill { padding: 6px 12px; font-size: 12px; }
}

/* Markdown (.md) description */
.markdown-body {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.markdown-body > :first-child { margin-top: 0; }
.markdown-body > :last-child { margin-bottom: 0; }

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  color: var(--text-primary);
  font-weight: 800;
  line-height: 1.35;
  margin: 1em 0 0.45em;
}

.markdown-body h1 { font-size: 18px; }
.markdown-body h2 { font-size: 16px; }
.markdown-body h3 { font-size: 14.5px; }
.markdown-body h4 { font-size: 13.5px; }

.markdown-body p { margin: 0 0 0.65em; }

.markdown-body ul,
.markdown-body ol {
  margin: 0.35em 0 0.75em;
  padding-left: 1.35em;
}

.markdown-body li { margin-bottom: 0.35em; }

.markdown-body blockquote {
  margin: 0.6em 0;
  padding: 8px 12px;
  border-left: 3px solid var(--accent);
  background: var(--bg-card);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
}

.markdown-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.9em 0;
}

.markdown-body a {
  color: #a78bfa;
  text-decoration: underline;
  word-break: break-word;
}

.markdown-body strong { color: var(--text-primary); font-weight: 700; }

.markdown-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
}

.markdown-body pre {
  margin: 0.6em 0;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
}

.markdown-body pre code {
  border: none;
  padding: 0;
  background: transparent;
}

/* Shared media framing — auto cover vs contain by aspect ratio */
.media-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.media-fill.fit-contain {
  object-fit: contain;
  padding: 6px;
  box-sizing: border-box;
}

.media-thumb .media-fill,
.media-thumb > img,
.media-thumb > video {
  position: absolute;
  inset: 0;
}

/* Binance Pay modal */
.binance-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.binance-modal {
  position: relative;
  width: 100%;
  max-width: 340px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 22px 22px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.binance-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}

.binance-modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-base);
}

.binance-modal-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 6px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.binance-amount {
  font-size: 32px;
  font-weight: 800;
  color: #f0b90b;
  margin-bottom: 2px;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.binance-price-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.binance-countdown {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 16px;
}

.binance-countdown.urgent {
  color: #f0b90b;
  border-color: rgba(240, 185, 11, 0.35);
  background: rgba(240, 185, 11, 0.08);
}

.binance-countdown.expired {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.08);
}

.binance-qr-wrap {
  width: 220px;
  margin: 0 auto 10px;
  padding: 10px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
  line-height: 0;
}

.binance-qr {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.binance-qr-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0 0 10px;
}

.binance-pay-warning {
  font-size: 11px;
  line-height: 1.5;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 12px;
  text-align: left;
}

.binance-pay-warning strong {
  color: #f59e0b;
}

.binance-status {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 14px;
  line-height: 1.5;
}

.binance-status.err {
  color: #f87171;
}

.binance-status.warn {
  color: #fbbf24;
}

.btn-binance-verify {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: var(--radius-sm);
  background: #f0b90b;
  color: #181a20;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s, transform 0.1s;
}

.btn-binance-verify:hover:not(:disabled) {
  opacity: 0.92;
}

.btn-binance-verify:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-binance-verify:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.binance-modal-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  gap: 14px;
}

.binance-modal-state p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 600;
}

.binance-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(240, 185, 11, 0.2);
  border-top-color: #f0b90b;
  border-radius: 50%;
  animation: binanceSpin 0.75s linear infinite;
}

@keyframes binanceSpin {
  to { transform: rotate(360deg); }
}

.binance-check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  border: 2px solid #22c55e;
  color: #22c55e;
  font-size: 32px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: binancePop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes binancePop {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ─── Roblox Launcher & Search Module ─── */
.roblox-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.roblox-hero-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 260px; height: 100%;
  background: radial-gradient(circle at top right, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.roblox-hero-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.roblox-hero-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.roblox-hero-title svg {
  color: var(--accent);
}

.roblox-hero-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 18px;
  line-height: 1.5;
}

.roblox-launch-bar {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
}

.roblox-input-wrap {
  flex: 1;
  min-width: 260px;
  position: relative;
  display: flex;
  align-items: center;
}

.roblox-input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.roblox-input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.roblox-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.roblox-input::placeholder {
  color: var(--text-muted);
}

.btn-roblox-launch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-roblox-launch:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-roblox-launch:active {
  transform: translateY(0);
}

.btn-roblox-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 16px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-roblox-secondary:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.roblox-vip-drawer {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 640px) {
  .roblox-vip-drawer {
    grid-template-columns: 1fr;
  }
}

.roblox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.roblox-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  position: relative;
}

.roblox-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.roblox-card-cover {
  height: 130px;
  position: relative;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.roblox-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.roblox-card:hover .roblox-card-cover img {
  transform: scale(1.04);
}

.roblox-card-emoji {
  font-size: 42px;
  filter: drop-shadow(0 0 16px rgba(124, 58, 237, 0.4));
  z-index: 1;
}

.roblox-card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  z-index: 2;
  flex-wrap: wrap;
}

.roblox-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

.roblox-badge.script-badge {
  background: var(--accent-glow);
  border-color: rgba(124, 58, 237, 0.4);
  color: #c4b5fd;
}

.roblox-card-star {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: all 0.15s ease;
}

.roblox-card-star:hover {
  color: #f59e0b;
  transform: scale(1.1);
}

.roblox-card-star.active {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
}

.roblox-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.roblox-card-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
  line-height: 1.3;
}

.roblox-card-id {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.roblox-card-id button {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 11px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: 'Inter', sans-serif;
}

.roblox-card-id button:hover {
  color: var(--accent);
}

.roblox-card-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  flex: 1;
  line-height: 1.4;
}

.roblox-card-actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  align-items: center;
}

.btn-card-launch {
  padding: 8px 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-card-launch:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 16px var(--accent-glow);
}

.btn-card-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-card-icon:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.roblox-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.roblox-toast {
  padding: 10px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(10px);
  opacity: 0;
  animation: toastSlideUp 0.25s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

.roblox-toast.success svg { color: var(--green); }
.roblox-toast.info svg { color: var(--accent); }

@keyframes toastSlideUp {
  to { transform: translateY(0); opacity: 1; }
}
