/* === SparkBox Dashboard — Claude Design code, used directly (Tom 2026-06-13:
   'copy the code that Claude AI design did and replace icons/logo'). Loaded
   LAST so the design's tokens + components + core are authoritative. Our real
   markup uses the same class names, so our icons/logo/live-data keep working. */

/* ---- design tokens.css ---- */
/* ============================================================
   SparkBox — token system (lifted verbatim from style.css +
   themes.css) so the redesign is pixel-accurate per theme, plus a
   small set of NEW redesign tokens called out at the bottom.
   Everything downstream is driven by these custom properties, so the
   glow-up stays theme-safe across all 10 variants.
   ============================================================ */

:root {
  /* Default dark ladder (midnight-purple family) */
  --bg-0: #0A0C12;
  --bg-1: #1C2029;
  --bg-2: #2A3040;
  --bg-3: #353c4d;
  --bg-input: #262B37;

  --border: #2A2E3A;
  --border-strong: #3E4352;
  --border-hair: rgba(255, 255, 255, 0.08);
  --border-soft: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.20);

  --elev-1: 0 2px 4px rgba(0,0,0,0.45), 0 14px 34px -12px rgba(0,0,0,0.66), 0 0 0 1px var(--card-border);
  --elev-2: 0 8px 24px -8px rgba(0,0,0,0.5), 0 2px 6px rgba(0,0,0,0.3), 0 0 0 1px var(--border);
  --elev-3: 0 24px 64px -16px rgba(0,0,0,0.6), 0 8px 24px rgba(0,0,0,0.4), 0 0 0 1px var(--border-strong);
  --elev-flat: 0 1px 2px rgba(0,0,0,0.18);

  --keycap-bg: linear-gradient(180deg, #242834, #1D2029);
  --warm-glow: rgba(215, 201, 175, 0.05);

  --text: #F8F9FB;
  --text-secondary: #C7CCD6;
  --text-muted: #9196A5;

  --accent: #8b5cf6;
  --accent-2: #7c3aed;
  --accent-soft: rgba(139, 92, 246, 0.20);
  --accent-hover: #a78bfa;
  --accent-glow: rgba(139, 92, 246, 0.45);

  --live: #30d158;
  --live-glow: rgba(48, 209, 88, 0.25);
  --warn: #ff9f0a;
  --danger: #ff453a;

  --mesh-1: rgba(139, 92, 246, 0.55);
  --mesh-2: rgba(56, 189, 248, 0.38);
  --mesh-3: rgba(244, 114, 182, 0.30);

  --green: #30d158;
  --orange: #ff9f0a;
  --red: #ff453a;
  --blue: #64d2ff;
  --gold: #fcd34d;

  --radius-sm: 8px;   /* buttons, chips, inputs */
  --radius: 12px;     /* cards, notices, menus */
  --radius-lg: 16px;  /* panels, modals, hero */
  --radius-pill: 999px;
  --font-mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* ---------- NEW redesign tokens (call-outs in design notes) ---------- */
  --module-hairline: var(--border-soft);

  /* Atmosphere intensity multiplier, dialed by the preview control.
     0 = solid page, 1 = designed default, up to 1.6 = vivid. */
  --atmo: 0.95;

  /* Near-solid frosted card fill — cards read as their own crisp panels;
     the mesh lives in the GAPS, never bleeding through dense neighbours. */
  --card-fill: color-mix(in srgb, var(--bg-1) 94%, transparent);
  --card-blur: 14px;

  /* Section-band rule + label tone */
  --band-rule: var(--border-strong);

  /* A brighter accent ring used as the single crisp card edge */
  --ring: var(--card-border);
}

/* =========================== DARK VARIANTS =========================== */
:root[data-theme="midnight-purple"],
.theme-preview[data-theme="midnight-purple"] {
  --bg-0:#0A0C12; --bg-1:#1C2029; --bg-2:#2A3040; --bg-3:#353c4d; --bg-input:#262B37;
  --border:#2A2E3A; --border-strong:#3E4352; --border-soft:rgba(255,255,255,0.04); --card-border:rgba(255,255,255,0.20);
  --text:#F8F9FB; --text-secondary:#C7CCD6; --text-muted:#9196A5;
  --accent:#8b5cf6; --accent-2:#7c3aed; --accent-hover:#a78bfa; --accent-soft:rgba(139,92,246,0.20); --accent-glow:rgba(139,92,246,0.45);
  --live:#30d158; --live-glow:rgba(48,209,88,0.25);
  --mesh-1:rgba(139,92,246,0.55); --mesh-2:rgba(56,189,248,0.38); --mesh-3:rgba(244,114,182,0.30);
}
:root[data-theme="forest"],
.theme-preview[data-theme="forest"] {
  --bg-0:#0A110D; --bg-1:#18221C; --bg-2:#243329; --bg-3:#2F4236; --bg-input:#243329;
  --border:#2E3C33; --border-strong:#3F5044; --border-soft:rgba(255,255,255,0.04); --card-border:rgba(255,255,255,0.18);
  --text:#F1F5F2; --text-secondary:#B8C5BC; --text-muted:#8B9A90;
  --accent:#10b981; --accent-2:#059669; --accent-hover:#34d399; --accent-soft:rgba(16,185,129,0.16); --accent-glow:rgba(16,185,129,0.38);
  --live:#84cc16; --live-glow:rgba(132,204,22,0.28);
  --mesh-1:rgba(5,150,105,0.50); --mesh-2:rgba(132,204,22,0.30); --mesh-3:rgba(20,184,166,0.30);
}
:root[data-theme="sunset"],
.theme-preview[data-theme="sunset"] {
  --bg-0:#120B0E; --bg-1:#221A1D; --bg-2:#30252A; --bg-3:#402F36; --bg-input:#30252A;
  --border:#3C2E34; --border-strong:#503F46; --border-soft:rgba(255,255,255,0.04); --card-border:rgba(255,255,255,0.18);
  --text:#F5F1F2; --text-secondary:#C5BAC0; --text-muted:#9A8E94;
  --accent:#f97316; --accent-2:#ea580c; --accent-hover:#fb923c; --accent-soft:rgba(249,115,22,0.16); --accent-glow:rgba(249,115,22,0.40);
  --live:#facc15; --live-glow:rgba(250,204,21,0.28);
  --mesh-1:rgba(234,88,12,0.52); --mesh-2:rgba(244,63,94,0.34); --mesh-3:rgba(250,204,21,0.26);
}
:root[data-theme="arctic"],
.theme-preview[data-theme="arctic"] {
  --bg-0:#0A1017; --bg-1:#181F2B; --bg-2:#242E3E; --bg-3:#303D52; --bg-input:#242E3E;
  --border:#2E3848; --border-strong:#3F4C62; --border-soft:rgba(255,255,255,0.04); --card-border:rgba(255,255,255,0.18);
  --text:#F1F4F6; --text-secondary:#B8C3CD; --text-muted:#8B95A5;
  --accent:#0ea5e9; --accent-2:#0284c7; --accent-hover:#38bdf8; --accent-soft:rgba(14,165,233,0.16); --accent-glow:rgba(14,165,233,0.38);
  --live:#5eead4; --live-glow:rgba(94,234,212,0.28);
  --mesh-1:rgba(14,116,176,0.50); --mesh-2:rgba(99,102,241,0.32); --mesh-3:rgba(20,184,166,0.30);
}
:root[data-theme="rose"],
.theme-preview[data-theme="rose"] {
  --bg-0:#110A10; --bg-1:#201820; --bg-2:#2C222C; --bg-3:#3A2D3A; --bg-input:#2C222C;
  --border:#352A35; --border-strong:#483A48; --border-soft:rgba(255,255,255,0.04); --card-border:rgba(255,255,255,0.18);
  --text:#F4F1F3; --text-secondary:#C5B8C1; --text-muted:#9A8C95;
  --accent:#ec4899; --accent-2:#be185d; --accent-hover:#f472b6; --accent-soft:rgba(236,72,153,0.16); --accent-glow:rgba(236,72,153,0.38);
  --live:#34d399; --live-glow:rgba(52,211,153,0.25);
  --mesh-1:rgba(190,24,93,0.52); --mesh-2:rgba(168,85,247,0.32); --mesh-3:rgba(251,113,133,0.30);
}

/* =========================== LIGHT VARIANTS =========================== */
/* Light themes use a solid border for the card edge + flat warm-glow.
   --mesh-* are intentionally left UNDEFINED so the atmosphere layer
   falls back to transparent — no dark-mode glow bleeds onto a white page. */
:root[data-theme^="light"],
.theme-preview[data-theme^="light"] { --card-border: var(--border); --card-blur: 0px; }

:root[data-theme="light"],
.theme-preview[data-theme="light"] {
  --bg-0:#f6f6f8; --bg-1:#ffffff; --bg-2:#f0f0f3; --bg-3:#e6e6ea; --bg-input:#ffffff;
  --border:#e4e4e7; --border-strong:#cfcfd4; --border-soft:rgba(0,0,0,0.03);
  --text:#18191c; --text-secondary:#48494e; --text-muted:#6a6b72;
  --accent:#7c3aed; --accent-2:#6d28d9; --accent-hover:#8b5cf6; --accent-soft:rgba(124,58,237,0.12); --accent-glow:rgba(124,58,237,0.28);
  --live:#16a34a; --live-glow:rgba(22,163,74,0.22); --warn:#d97706; --danger:#dc2626;
  --warm-glow:rgba(124,58,237,0.05);
  --elev-1:0 1px 2px rgba(0,0,0,0.05), 0 0 0 1px var(--border);
  --elev-2:0 4px 12px rgba(0,0,0,0.08), 0 0 0 1px var(--border);
  --elev-3:0 16px 40px rgba(0,0,0,0.12), 0 0 0 1px var(--border-strong);
  --keycap-bg:linear-gradient(180deg,#ffffff,#eeeef2);
  --card-fill:#ffffff;
}
:root[data-theme="light-forest"],
.theme-preview[data-theme="light-forest"] {
  --bg-0:#f4f8f5; --bg-1:#ffffff; --bg-2:#edf3ef; --bg-3:#e0ebe3; --bg-input:#ffffff;
  --border:#d4e4d8; --border-strong:#b8d4bf; --border-soft:rgba(0,0,0,0.03);
  --text:#18191c; --text-secondary:#3d4a40; --text-muted:#657a6a;
  --accent:#059669; --accent-2:#047857; --accent-hover:#10b981; --accent-soft:rgba(5,150,105,0.12); --accent-glow:rgba(5,150,105,0.20);
  --live:#16a34a; --warm-glow:rgba(5,150,105,0.05);
  --elev-1:0 1px 2px rgba(0,0,0,0.05), 0 0 0 1px var(--border);
  --elev-2:0 4px 12px rgba(0,0,0,0.08), 0 0 0 1px var(--border);
  --elev-3:0 16px 40px rgba(0,0,0,0.12), 0 0 0 1px var(--border-strong);
  --keycap-bg:linear-gradient(180deg,#ffffff,#edf3ef); --card-fill:#ffffff;
}
:root[data-theme="light-sunset"],
.theme-preview[data-theme="light-sunset"] {
  --bg-0:#faf7f4; --bg-1:#ffffff; --bg-2:#f5f0ea; --bg-3:#ede4d9; --bg-input:#ffffff;
  --border:#e8ddd0; --border-strong:#d9c9b5; --border-soft:rgba(0,0,0,0.03);
  --text:#1c1916; --text-secondary:#4a4036; --text-muted:#7a6e60;
  --accent:#d97706; --accent-2:#b45309; --accent-hover:#f59e0b; --accent-soft:rgba(217,119,6,0.12); --accent-glow:rgba(217,119,6,0.20);
  --live:#16a34a; --warm-glow:rgba(217,119,6,0.05);
  --elev-1:0 1px 2px rgba(0,0,0,0.05), 0 0 0 1px var(--border);
  --elev-2:0 4px 12px rgba(0,0,0,0.08), 0 0 0 1px var(--border);
  --elev-3:0 16px 40px rgba(0,0,0,0.12), 0 0 0 1px var(--border-strong);
  --keycap-bg:linear-gradient(180deg,#ffffff,#f5f0ea); --card-fill:#ffffff;
}
:root[data-theme="light-arctic"],
.theme-preview[data-theme="light-arctic"] {
  --bg-0:#f4f7fa; --bg-1:#ffffff; --bg-2:#edf2f7; --bg-3:#e0e8f0; --bg-input:#ffffff;
  --border:#d4dfe8; --border-strong:#b8cad8; --border-soft:rgba(0,0,0,0.03);
  --text:#18191c; --text-secondary:#3a4450; --text-muted:#607080;
  --accent:#0891b2; --accent-2:#0e7490; --accent-hover:#06b6d4; --accent-soft:rgba(8,145,178,0.12); --accent-glow:rgba(8,145,178,0.20);
  --live:#16a34a; --warm-glow:rgba(8,145,178,0.05);
  --elev-1:0 1px 2px rgba(0,0,0,0.05), 0 0 0 1px var(--border);
  --elev-2:0 4px 12px rgba(0,0,0,0.08), 0 0 0 1px var(--border);
  --elev-3:0 16px 40px rgba(0,0,0,0.12), 0 0 0 1px var(--border-strong);
  --keycap-bg:linear-gradient(180deg,#ffffff,#edf2f7); --card-fill:#ffffff;
}
:root[data-theme="light-rose"],
.theme-preview[data-theme="light-rose"] {
  --bg-0:#faf5f7; --bg-1:#ffffff; --bg-2:#f5edf0; --bg-3:#ede0e6; --bg-input:#ffffff;
  --border:#e8d4dc; --border-strong:#d9b8c4; --border-soft:rgba(0,0,0,0.03);
  --text:#1c1618; --text-secondary:#4a3640; --text-muted:#7a6070;
  --accent:#db2777; --accent-2:#be185d; --accent-hover:#ec4899; --accent-soft:rgba(219,39,119,0.12); --accent-glow:rgba(219,39,119,0.20);
  --live:#16a34a; --warm-glow:rgba(219,39,119,0.05);
  --elev-1:0 1px 2px rgba(0,0,0,0.05), 0 0 0 1px var(--border);
  --elev-2:0 4px 12px rgba(0,0,0,0.08), 0 0 0 1px var(--border);
  --elev-3:0 16px 40px rgba(0,0,0,0.12), 0 0 0 1px var(--border-strong);
  --keycap-bg:linear-gradient(180deg,#ffffff,#f5edf0); --card-fill:#ffffff;
}

/* ---- design components.css ---- */
/* ============================================================
   SparkBox redesign — COMPONENTS
   Launcher · gauges · activity · release · media · running ·
   network · backups · stat cards · widget gallery · controls · notes
   ============================================================ */

/* ---------------- LAUNCHER ---------------- */
.app-launcher { display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.launcher-category { padding: 0.4rem 0 0.7rem; border-bottom: 1px solid var(--module-hairline); }
.launcher-category:last-child { border-bottom: none; padding-bottom: 0; }
.launcher-category-title { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.6rem; }
.launcher-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 0.4rem; }
.launcher-icon { display: flex; flex-direction: column; align-items: center; gap: 0.45rem; padding: 0.6rem 0.25rem; border-radius: 12px; text-decoration: none; color: var(--text); cursor: pointer; transition: background .15s; position: relative; }
.launcher-icon:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
.keycap {
  position: relative; width: 52px; height: 52px; border-radius: var(--radius); display: grid; place-items: center;
  font-weight: 800; font-size: 1.15rem; color: #fff;
  background: var(--app-color, var(--accent));
  box-shadow: 0 3px 8px -2px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.28), inset 0 -10px 18px -8px rgba(0,0,0,0.45);
  transition: transform .15s, opacity .15s; letter-spacing: -0.02em;
}
.launcher-icon:hover .keycap { transform: translateY(-2px); }
.launcher-icon:active .keycap { transform: translateY(0); opacity: 0.8; }
.keycap-status { position: absolute; bottom: -2px; right: -2px; width: 13px; height: 13px; border-radius: 50%; border: 2.5px solid var(--bg-1); }
.keycap-status.on { background: var(--live); }
.keycap-status.off { background: var(--text-muted); }
.keycap-status.warn { background: var(--warn); }
.launcher-icon.is-down .keycap { filter: saturate(0.35) brightness(0.6); }
.launcher-icon-name { font-size: 0.78rem; font-weight: 500; color: var(--text-secondary); text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- SYSTEM GAUGES ---------------- */
.system-gauges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gauge-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; border-radius: 12px; background: var(--bg-2); box-shadow: var(--elev-flat), 0 0 0 1px var(--card-border); text-align: center; }
:root[data-theme^="light"] .gauge-card { box-shadow: var(--elev-flat); }
.gauge-ring { width: 72px; height: 72px; }
.gauge-ring svg { width: 100%; height: 100%; transform: rotate(0deg); }
.gauge-bg { fill: none; stroke: color-mix(in srgb, var(--text) 9%, transparent); stroke-width: 3; }
.gauge-fill { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; transition: stroke-dasharray .7s var(--ease-out), stroke .3s; }
.gauge-fill.warn { stroke: var(--warn); } .gauge-fill.danger { stroke: var(--danger); }
.gauge-text { fill: var(--text); font-size: 0.58rem; font-weight: 800; text-anchor: middle; }
.gauge-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-secondary); }
.gauge-detail { font-size: 0.66rem; color: var(--text-muted); }
.gauge-uptime { font-size: 1.4rem; font-weight: 800; color: var(--text); line-height: 1; padding: 0.7rem 0; }

.system-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.system-action { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 11px 4px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--border-soft); color: var(--text-secondary); cursor: pointer; text-decoration: none; font-family: inherit; transition: background .14s, color .14s, border-color .14s; }
.system-action:hover { background: var(--bg-3); color: var(--text); border-color: var(--border-strong); }
.system-action-icon { font-size: 1rem; line-height: 1; }
.system-action-label { font-size: 0.68rem; font-weight: 600; }

/* ---------------- ACTIVITY ---------------- */
.activity-list { list-style: none; display: flex; flex-direction: column; gap: 2px; max-height: 270px; overflow-y: auto; margin: -2px -6px; padding: 2px 6px; }
.activity-list::-webkit-scrollbar { width: 5px; } .activity-list::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text) 12%, transparent); border-radius: 3px; }
.activity-row { display: flex; align-items: center; gap: 11px; padding: 9px 8px; border-radius: var(--radius); transition: background .12s; }
.activity-row:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.activity-dot.ok { background: var(--live); } .activity-dot.info { background: var(--blue); } .activity-dot.warn { background: var(--warn); } .activity-dot.accent { background: var(--accent); }
.activity-main { flex: 1; min-width: 0; }
.activity-text { font-size: 0.84rem; font-weight: 500; color: var(--text); }
.activity-text b { font-weight: 700; }
.activity-time { font-size: 0.72rem; color: var(--text-muted); font-family: var(--font-mono); flex-shrink: 0; }

/* ---------------- LATEST RELEASE ribbon ---------------- */
.release-body { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.release-tag { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent-hover); font-size: 0.72rem; font-weight: 700; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.release-title { flex: 1 1 auto; min-width: 0; font-size: 0.96rem; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.release-date { font-size: 0.74rem; color: var(--text-muted); font-family: var(--font-mono); }
.release-link { flex-shrink: 0; padding: 7px 13px; border-radius: var(--radius); background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text-secondary); font-size: 0.78rem; font-weight: 700; text-decoration: none; transition: background .14s, color .14s; }
.release-link:hover { background: var(--accent-soft); color: var(--accent-hover); }

/* ---------------- MEDIA ---------------- */
.media-section { margin-bottom: 18px; } .media-section:last-child { margin-bottom: 0; }
.media-section-title { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.01em; color: var(--text-secondary); margin-bottom: 10px; }
.media-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.media-tile { display: flex; align-items: center; gap: 11px; padding: 12px 13px; border-radius: 12px; background: var(--bg-2); box-shadow: var(--elev-flat), 0 0 0 1px var(--card-border); }
:root[data-theme^="light"] .media-tile { box-shadow: var(--elev-flat); }
.media-tile-ico { width: 34px; height: 34px; border-radius: var(--radius); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 0.85rem; flex-shrink: 0; background: var(--app-color, var(--accent)); }
.media-tile-val { font-size: 1.05rem; font-weight: 800; line-height: 1; }
.media-tile-label { font-size: 0.72rem; color: var(--text-muted); margin-top: 3px; }

.poster-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.poster-row::-webkit-scrollbar { height: 6px; } .poster-row::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text) 12%, transparent); border-radius: 3px; }
.poster { flex: 0 0 112px; scroll-snap-align: start; cursor: pointer; }
.poster-art { position: relative; aspect-ratio: 2/3; border-radius: var(--radius); overflow: hidden; background: linear-gradient(150deg, var(--p1, #2a2f3d), var(--p2, #161a22)); box-shadow: var(--elev-1); display: grid; place-items: end stretch; }
.poster-art::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 9px); }
.poster:hover .poster-art { transform: translateY(-3px); transition: transform .15s; }
.poster-badge { position: absolute; top: 7px; left: 7px; z-index: 2; padding: 3px 7px; border-radius: var(--radius-sm); font-size: 0.6rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; background: rgba(0,0,0,0.55); color: #fff; backdrop-filter: blur(4px); }
.poster-prog { position: relative; z-index: 2; height: 4px; margin: 0 8px 8px; border-radius: 99px; background: rgba(255,255,255,0.25); overflow: hidden; }
.poster-prog i { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 99px; }
.poster-title { font-size: 0.78rem; font-weight: 600; margin-top: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poster-sub { font-size: 0.7rem; color: var(--text-muted); }

/* ---------------- RUNNING ---------------- */
.running-list { display: flex; flex-direction: column; gap: 7px; }
.running-row { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 12px; background: var(--bg-2); box-shadow: var(--elev-flat); transition: background .12s; }
.running-row:hover { background: var(--bg-3); }
.running-icon { width: 36px; height: 36px; border-radius: var(--radius); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 0.82rem; flex-shrink: 0; background: var(--app-color, var(--accent)); }
.running-info { flex: 1; min-width: 0; }
.running-name { font-weight: 700; font-size: 0.88rem; }
.running-detail { font-size: 0.74rem; color: var(--text-muted); display: flex; align-items: center; gap: 7px; }
.running-stats { display: flex; gap: 20px; }
.mini-stat { text-align: right; } .mini-stat-val { font-size: 0.85rem; font-weight: 700; font-family: var(--font-mono); } .mini-stat-label { font-size: 0.62rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
@media (max-width: 600px) { .running-stats .mini-stat:nth-child(2) { display: none; } }

/* ---------------- NETWORK ---------------- */
.network-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.network-item { padding: 12px 14px; border-radius: var(--radius); background: var(--bg-2); box-shadow: var(--elev-flat); }
.network-label { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 5px; }
.network-value { font-size: 0.86rem; font-weight: 600; color: var(--text); word-break: break-all; }

/* ---------------- BACKUPS ---------------- */
.backup-body { display: flex; flex-direction: column; gap: 1px; }
.backup-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 2px; border-bottom: 1px solid var(--module-hairline); }
.backup-row:last-child { border-bottom: none; }
.backup-label { font-size: 0.8rem; color: var(--text-muted); }
.backup-value { font-size: 0.82rem; font-weight: 700; color: var(--text); font-family: var(--font-mono); }
.backup-value.ok { color: var(--live); }

/* ---------------- STAT CARDS (Money saved / Ads blocked) ---------------- */
.stat-card { justify-content: space-between; }
.stat-big { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 4px; }
.stat-num { font-size: 2.3rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-family: var(--font-mono); }
.stat-unit { font-size: 1rem; font-weight: 700; color: var(--text-secondary); }
.stat-note { font-size: 0.8rem; color: var(--text-muted); }
.stat-spark { display: flex; align-items: flex-end; gap: 4px; height: 44px; margin-top: 14px; }
.stat-spark i { flex: 1; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 35%, transparent)); min-height: 4px; opacity: 0.85; }
.stat-card.ads .stat-spark i { background: linear-gradient(180deg, var(--live), color-mix(in srgb, var(--live) 35%, transparent)); }
.stat-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.stat-pill { font-size: 0.72rem; font-weight: 700; padding: 4px 9px; border-radius: 99px; background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text-secondary); }

/* ---------------- WIDGET GALLERY (add-widget fix) ---------------- */
.scrim { position: fixed; inset: 0; z-index: 200; background: rgba(5,6,10,0.6); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 201; width: min(460px, 92vw);
  background: var(--bg-1); border-left: 1px solid var(--border); box-shadow: -24px 0 64px -16px rgba(0,0,0,0.6);
  transform: translateX(100%); transition: transform .26s var(--ease-out); display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-head { padding: 20px 22px 16px; border-bottom: 1px solid var(--border); }
.drawer-eyebrow { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-hover); }
.drawer-title { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; margin-top: 5px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.drawer-sub { font-size: 0.86rem; color: var(--text-muted); margin-top: 6px; line-height: 1.5; }
.drawer-close { width: 32px; height: 32px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-2); color: var(--text-secondary); cursor: pointer; font-size: 1.1rem; flex-shrink: 0; }
.drawer-close:hover { background: var(--bg-3); color: var(--text); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 22px 24px; }
.widget-cat { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin: 18px 0 10px; }
.widget-cat:first-child { margin-top: 0; }
.widget-card { display: flex; align-items: center; gap: 13px; padding: 13px 14px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--border-soft); margin-bottom: 9px; transition: border-color .14s, background .14s; }
.widget-card:hover { border-color: var(--border-strong); }
.widget-ico { width: 40px; height: 40px; border-radius: var(--radius); display: grid; place-items: center; flex-shrink: 0; font-size: 1.1rem; background: var(--accent-soft); color: var(--accent-hover); }
.widget-meta { flex: 1; min-width: 0; }
.widget-name { font-size: 0.9rem; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.widget-name .pro-tag { font-size: 0.56rem; font-weight: 800; letter-spacing: 0.05em; padding: 2px 6px; border-radius: 5px; background: linear-gradient(135deg, #fcd34d, var(--accent-hover)); color: #2a1d00; }
.widget-desc { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
.widget-add { flex-shrink: 0; padding: 8px 14px; border-radius: var(--radius); border: 1px solid var(--accent); background: var(--accent); color: #fff; font-weight: 700; font-size: 0.8rem; font-family: inherit; cursor: pointer; transition: background .14s; min-width: 84px; }
.widget-add:hover { background: var(--accent-2); }
.widget-add.added { background: transparent; color: var(--live); border-color: color-mix(in srgb, var(--live) 50%, transparent); }

/* ---------------- PREVIEW CONTROLS DOCK ---------------- */
.lab-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 150; display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 17px; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--bg-1) 88%, transparent); backdrop-filter: blur(14px); color: var(--text);
  font-family: inherit; font-weight: 700; font-size: 0.85rem; cursor: pointer; box-shadow: var(--elev-3);
  transition: transform .14s, box-shadow .14s;
}
.lab-fab:hover { transform: translateY(-2px); }
.lab-fab .gear { width: 16px; height: 16px; color: var(--accent-hover); }
.lab {
  position: fixed; right: 22px; bottom: 22px; z-index: 151; width: 320px; max-width: calc(100vw - 28px);
  max-height: calc(100dvh - 44px); overflow-y: auto; border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--bg-1) 94%, transparent); backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--border-strong); box-shadow: var(--elev-3);
  transform: translateY(12px) scale(0.98); opacity: 0; pointer-events: none; transform-origin: bottom right;
  transition: transform .2s var(--ease-out), opacity .2s;
}
.lab.open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
.lab-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 17px 12px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: inherit; backdrop-filter: blur(20px); z-index: 1; }
.lab-head h3 { font-size: 0.95rem; font-weight: 800; letter-spacing: -0.01em; }
.lab-head p { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.lab-body { padding: 14px 17px 18px; display: flex; flex-direction: column; gap: 18px; }
.lab-group { display: flex; flex-direction: column; gap: 8px; }
.lab-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); display: flex; justify-content: space-between; }
.lab-label .val { color: var(--accent-hover); }
.seg { display: flex; gap: 4px; padding: 4px; background: var(--bg-2); border-radius: var(--radius); border: 1px solid var(--border-soft); }
.seg button { flex: 1; padding: 7px 6px; border: 0; border-radius: 8px; background: transparent; color: var(--text-secondary); font-family: inherit; font-size: 0.76rem; font-weight: 600; cursor: pointer; transition: background .14s, color .14s; }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--accent); color: #fff; }
.theme-dots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.theme-dot { aspect-ratio: 1; border-radius: var(--radius); border: 2px solid transparent; cursor: pointer; position: relative; background: linear-gradient(135deg, var(--d1), var(--d2)); transition: transform .12s; }
.theme-dot:hover { transform: scale(1.08); }
.theme-dot.active { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.theme-dot.light { box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15); }
.lab-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 5px; border-radius: 99px; background: var(--bg-3); outline: none; }
.lab-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 17px; height: 17px; border-radius: 50%; background: var(--accent); cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,0.4); border: 2px solid #fff; }
.lab-slider::-moz-range-thumb { width: 17px; height: 17px; border-radius: 50%; background: var(--accent); cursor: pointer; border: 2px solid #fff; }
.lab-toggle { display: flex; align-items: center; justify-content: space-between; }
.lab-toggle span { font-size: 0.82rem; font-weight: 600; }
.tgl { width: 42px; height: 24px; border-radius: 99px; background: var(--bg-3); border: 1px solid var(--border); position: relative; cursor: pointer; flex-shrink: 0; transition: background .15s; }
.tgl::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-secondary); transition: transform .18s, background .15s; }
.tgl.on { background: var(--accent); border-color: var(--accent); } .tgl.on::after { transform: translateX(18px); background: #fff; }
.lab-foot { padding: 12px 17px 15px; border-top: 1px solid var(--border); }
.lab-link { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; padding: 10px; border-radius: var(--radius); border: 1px solid var(--border-strong); background: var(--bg-2); color: var(--text); font-family: inherit; font-weight: 700; font-size: 0.82rem; cursor: pointer; }
.lab-link:hover { background: var(--bg-3); }

/* ---------------- DESIGN NOTES ---------------- */
.notes-body { font-size: 0.88rem; line-height: 1.62; color: var(--text-secondary); }
.notes-body h4 { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-hover); margin: 22px 0 9px; }
.notes-body h4:first-child { margin-top: 0; }
.notes-body p { margin-bottom: 10px; } .notes-body strong { color: var(--text); }
.notes-body ul { list-style: none; display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px; }
.notes-body li { position: relative; padding-left: 18px; }
.notes-body li::before { content: ''; position: absolute; left: 2px; top: 8px; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.notes-body code { font-family: var(--font-mono); font-size: 0.82em; background: var(--bg-2); padding: 1px 6px; border-radius: 5px; color: var(--text); }
.notes-body .ba { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.notes-body .ba > div { padding: 11px 13px; border-radius: var(--radius); background: var(--bg-2); box-shadow: var(--elev-flat), 0 0 0 1px var(--card-border); }
.notes-body .ba .tag { font-size: 0.64rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); display: block; margin-bottom: 5px; }
.notes-body .ba.is-after > div { box-shadow: var(--elev-flat), 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }

/* ---- design redesign.css ---- */
/* ============================================================
   SparkBox redesign — CORE (atmosphere, shell, hero, section
   bands, frosted bento cards, status chips).
   Built entirely on the token system in tokens.css so it stays
   theme-safe across all 10 variants.
   ============================================================ */

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  background: var(--bg-0);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  letter-spacing: -0.005em;
  font-weight: 500;
  font-feature-settings: "calt","kern","liga","ss03";
  overflow-x: hidden;
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* =================================================================
   ATMOSPHERE — the real glow-up. A vivid, VISIBLE layered mesh built
   from each theme's own --mesh-1/2/3 accent glows, scaled by --atmo.
   This is a single fixed background layer (cheap: one painted element,
   not backdrop-blur on the whole page) so the NAS + weak browsers stay
   smooth. Light themes leave --mesh-* undefined → transparent → their
   flat warm page shows through untouched.
   ================================================================= */
.atmo {
  position: fixed;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(48% 38% at 14% 8%,  var(--mesh-1, transparent), transparent 64%),
    radial-gradient(46% 40% at 88% 4%,  var(--mesh-2, transparent), transparent 66%),
    radial-gradient(52% 46% at 70% 102%, var(--mesh-3, transparent), transparent 64%),
    radial-gradient(40% 30% at 50% -6%,  var(--warm-glow), transparent 60%);
  opacity: var(--atmo);
  filter: saturate(118%);
  animation: atmo-drift 34s ease-in-out infinite alternate;
}
@keyframes atmo-drift {
  from { transform: translate3d(0,0,0) scale(1); }
  to   { transform: translate3d(-2.2%, 1.6%, 0) scale(1.06); }
}
/* Grain + vignette: keeps the gradient from banding and frames the page
   so cards in the middle feel lifted. Very cheap (one SVG noise tile). */
.atmo::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 58%, rgba(0,0,0,0.42) 100%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/></svg>");
  background-size: cover, 200px 200px;
  mix-blend-mode: overlay;
  opacity: 0.5;
}
:root[data-theme^="light"] .atmo { opacity: calc(var(--atmo) * 0.5); animation: none; }
:root[data-theme^="light"] .atmo::after { opacity: 0.25; mix-blend-mode: multiply; }

/* WALLPAPER mode — a deeper, photographic-feeling base. Since this demo
   ships no image, we synthesize a tasteful dark wallpaper from the theme
   accent (a real .jpg drops into --wp-image with zero other changes). */
body[data-atmo="wallpaper"] .atmo {
  background:
    radial-gradient(60% 50% at 20% 0%, var(--mesh-1, transparent), transparent 60%),
    radial-gradient(60% 55% at 92% 12%, var(--mesh-2, transparent), transparent 62%),
    radial-gradient(70% 60% at 78% 108%, var(--mesh-3, transparent), transparent 60%),
    conic-gradient(from 210deg at 30% 20%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 40%, color-mix(in srgb, var(--mesh-2, transparent) 60%, transparent) 70%, transparent),
    linear-gradient(160deg, #05060a 0%, color-mix(in srgb, var(--bg-0) 80%, #000) 55%, #04050a 100%);
  opacity: var(--atmo);
}
body[data-atmo="solid"] .atmo { opacity: 0; }

/* App scaffolding sits above the atmosphere */
.app { position: relative; z-index: 1; }

/* =================================================================
   TOP BAR
   ================================================================= */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0 1.4rem; height: 60px;
  background: color-mix(in srgb, var(--bg-0) 72%, transparent);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: 0 1px 0 rgba(255,255,255,0.02) inset, 0 10px 24px -18px rgba(0,0,0,0.7);
}
.topbar-left { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 800; font-size: 1.02rem; letter-spacing: -0.02em; color: var(--text); }
.brand-mark {
  width: 30px; height: 30px; border-radius: var(--radius); flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 14px -2px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.35);
}
.brand-mark i { width: 11px; height: 11px; background: #fff; border-radius: 2px; transform: rotate(45deg); box-shadow: 0 0 8px rgba(255,255,255,0.6); }
.brand-text { font-weight: 800; }

.topbar-nav { display: flex; gap: 0.1rem; padding: 4px; background: color-mix(in srgb, var(--text) 4%, transparent); border: 1px solid var(--border-soft); border-radius: var(--radius-pill); }
.tab {
  padding: 0.5rem 0.95rem; font-size: 0.86rem; font-weight: 600; color: var(--text-secondary);
  text-decoration: none; border-radius: var(--radius-pill); min-height: 34px; display: flex; align-items: center;
  letter-spacing: -0.005em; cursor: pointer; transition: color .18s, background .18s, box-shadow .18s; white-space: nowrap;
}
.tab:hover { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }
.tab.active { background: var(--bg-1); color: var(--text); box-shadow: var(--elev-1); }
.tab-external { color: var(--accent-hover); }
/* Updates tab (2026-09-21): always carries the running version; glows when a
   release is ready so it cannot be missed from any page. */
.tab-updates { gap: 6px; border: 1px solid transparent; }
.tab-updates-icon { font-size: 0.95rem; line-height: 1; }
.tab-version { font-size: 0.66rem; font-weight: 600; color: var(--text-muted); background: color-mix(in srgb, var(--text) 7%, transparent); padding: 2px 6px; border-radius: 999px; }
.tab-updates.has-update { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: var(--accent-soft, color-mix(in srgb, var(--accent) 12%, transparent)); color: var(--text); }
.tab-updates.has-update .tab-version { color: var(--accent-hover); }
.tab-updates .update-badge { margin-left: 0; font-size: 0.62rem; letter-spacing: 0.02em; padding: 0 0.4rem; }
@media (max-width: 1100px) { .tab-version { display: none; } }

.topbar-right { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.topbar-stats { display: inline-flex; gap: 3px; }
.topbar-stat { font-size: 0.66rem; font-weight: 600; font-family: var(--font-mono); color: var(--text-muted); background: color-mix(in srgb, var(--text) 5%, transparent); padding: 0.22rem 0.5rem; border-radius: 5px; min-width: 44px; text-align: center; }
.topbar-stat b { color: var(--text-secondary); }
.topbar-stat-label { opacity: 0.6; font-weight: 600; }
.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px;
  background: transparent; border: 1px solid var(--border); color: var(--text-secondary); cursor: pointer;
  transition: background .15s, color .15s, border-color .15s; font-size: 15px; position: relative;
}
.icon-btn:hover { background: var(--bg-2); color: var(--text); border-color: var(--border-strong); }
.icon-btn .dot-badge { position: absolute; top: 5px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg-0); }
@media (max-width: 860px) { .topbar-nav .tab-hideable, .topbar-stats { display: none; } }
/* Mobile: let the topbar GROW when the nav wraps. style.css's 768px rule
   (flex-wrap + height:auto) is overridden by this file's fixed height:60px
   because design.css loads last — so the wrapped nav row bled out of the bar
   and painted over the VPN/pipeline cards (GUI audit P1-4). */
@media (max-width: 768px) {
  .topbar { height: auto; min-height: 60px; flex-wrap: wrap; padding: 0.5rem 1rem; row-gap: 0.4rem; }
}

/* Top-bar overlap (#28884): the full bar (brand + BACKER/LEGEND badge +
   9 tabs + stats/controls) needs ~1540px. Below that, flex shrinks the
   only item with min-width:0 — .topbar-left — and its unclipped content
   paints straight over the Home/Apps/Updates tabs, so every supporter on
   a laptop-width window saw their badge on top of the nav. Never shrink
   the left column; degrade instead: drop the brand text first, then the
   stat pills, and as the final pressure valve let the nav itself scroll
   (scrollbar hidden) so nothing ever overlaps at any width. */
.topbar-left { flex-shrink: 0; }
.topbar-nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.topbar-nav::-webkit-scrollbar { display: none; }
@media (max-width: 1500px) { .topbar .brand-text { display: none; } }
@media (max-width: 1360px) { .topbar-stats { display: none; } }

/* Top bar not showing fully (forum #49304, 2026-11-05): since the version
   chip, host pill and Switch dashboard button joined the bar it needs about
   2,070px, so on an 1855px window Community and Report bug were cut off, at
   1366px only Home and Updates showed, and the hidden scrollbar gave no hint
   that Settings or Logs existed. On desktop widths, never hide a tab: when
   the whole bar does not fit, the right-hand controls drop to a second row
   (the bar grows), and if the tabs alone are wider than the window they wrap
   onto two lines inside the pill. Phones keep the swipe row (style.css). */
@media (min-width: 769px) {
  .topbar { flex-wrap: wrap; height: auto; min-height: 60px; padding-top: 0.6rem; padding-bottom: 0.6rem; row-gap: 0.5rem; }
  .topbar-right { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; row-gap: 0.4rem; }
  .topbar-nav { flex-wrap: wrap; overflow-x: visible; }
}
@media (min-width: 769px) and (max-width: 1240px) { .topbar-nav { border-radius: 18px; } }

/* =================================================================
   PAGE SHELL
   ================================================================= */
.main { max-width: 1320px; margin: 0 auto; padding: 2rem 2rem 6rem; }

/* Greeting hero */
.home-hero { text-align: center; margin: 0.5rem 0 1.5rem; }
.home-hero h1 { font-size: 33px; line-height: 1.1; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 6px; }
.home-hero p { font-size: 15px; color: var(--text-secondary); }
.home-brand { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 12px; opacity: 0.9; user-select: none; }
.home-brand .brand-mark { width: 24px; height: 24px; border-radius: var(--radius-sm); }
.home-brand .brand-mark i { width: 9px; height: 9px; }
.home-brand span { font-size: 0.95rem; font-weight: 600; color: var(--text-muted); letter-spacing: -0.01em; white-space: nowrap; }
.home-brand strong { color: var(--text); font-weight: 800; }

/* Search + layout controls row */
.tools-row { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.search-bar { position: relative; flex: 0 1 380px; min-width: 240px; }
.search-bar input {
  width: 100%; padding: 0.62rem 1rem 0.62rem 2.5rem; font: inherit; font-size: 13.5px; color: var(--text);
  background: var(--card-fill); border: 1px solid var(--border-soft); border-radius: var(--radius); box-shadow: var(--elev-1); outline: none;
  transition: border-color .15s, box-shadow .15s; backdrop-filter: blur(var(--card-blur));
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar input:focus { border-color: var(--accent); box-shadow: var(--elev-1), 0 0 0 3px var(--accent-soft); }
.search-bar svg { position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }

/* =================================================================
   STATUS HERO — the calm "is my server OK?" answer + Ask Tom AI
   ================================================================= */
.status-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding: 18px 22px; margin-bottom: 28px; border-radius: var(--radius-lg);
  background: var(--card-fill); backdrop-filter: blur(var(--card-blur));
  box-shadow: var(--elev-1); border-left: 3px solid var(--live);
  position: relative; overflow: hidden;
}
.status-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, color-mix(in srgb, var(--live) 12%, transparent), transparent 52%);
}
.status-hero.is-warn { border-left-color: var(--warn); }
.status-hero.is-warn::before { background: linear-gradient(100deg, color-mix(in srgb, var(--warn) 14%, transparent), transparent 52%); }
.sh-left { display: flex; align-items: center; gap: 16px; min-width: 0; position: relative; }
.sh-ring {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  color: var(--live); background: color-mix(in srgb, var(--live) 16%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--live) 40%, transparent), 0 0 22px -4px var(--live-glow);
  font-size: 22px;
}
.is-warn .sh-ring { color: var(--warn); background: color-mix(in srgb, var(--warn) 16%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--warn) 40%, transparent); }
.sh-title { font-size: 1.18rem; font-weight: 800; letter-spacing: -0.015em; }
.sh-sub { font-size: 0.88rem; color: var(--text-muted); margin-top: 2px; }
.sh-cta { display: flex; align-items: center; gap: 10px; position: relative; flex-shrink: 0; }
.ask-tom {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border: 0; border-radius: 12px; cursor: pointer;
  font-weight: 700; font-size: 0.92rem; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 22px -8px var(--accent-glow); transition: transform .12s, box-shadow .12s;
}
.ask-tom:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -8px var(--accent-glow); }
.ask-tom .spark { width: 16px; height: 16px; display: grid; place-items: center; }
.ask-tom .spark::before { content:''; width: 10px; height: 10px; background: #fff; border-radius: 2px; transform: rotate(45deg); }

/* =================================================================
   SECTION BANDS — the new higher-order grouping. Bold label, a
   plain-English helper line, a status chip, and (for Backers) the
   Add-widget button living right here so it's impossible to miss.
   ================================================================= */
.band { margin-top: 34px; }
.band:first-of-type { margin-top: 0; }
.band-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.band-titles { min-width: 0; }
.band-title { display: flex; align-items: center; gap: 10px; font-size: 1.18rem; font-weight: 800; letter-spacing: -0.02em; }
.band-title .band-ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: var(--accent-hover); background: var(--accent-soft); font-size: 14px; }
.band-sub { font-size: 0.84rem; color: var(--text-muted); margin-top: 3px; }
.band-rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--band-rule), transparent); align-self: center; }
.band-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: var(--radius-pill);
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.01em; white-space: nowrap;
  background: color-mix(in srgb, var(--live) 14%, transparent); color: var(--live);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--live) 30%, transparent);
}
.chip .live-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: chip-pulse 2.4s ease infinite; }
@keyframes chip-pulse { 0%,100%{ box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 50%, transparent);} 50%{ box-shadow: 0 0 0 4px transparent;} }
.chip.neutral { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text-secondary); box-shadow: inset 0 0 0 1px var(--border); }
.chip.accent { background: var(--accent-soft); color: var(--accent-hover); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.chip.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 35%, transparent); }

.add-widget-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: var(--radius); cursor: pointer;
  font-size: 0.8rem; font-weight: 700; font-family: inherit; color: var(--accent-hover);
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  transition: background .14s, border-color .14s, transform .12s;
}
.add-widget-btn:hover { background: color-mix(in srgb, var(--accent) 24%, transparent); transform: translateY(-1px); }
.add-widget-btn .plus { font-size: 1rem; line-height: 1; margin-top: -1px; }

/* =================================================================
   BENTO GRID + FROSTED CARDS
   ================================================================= */
.bento-grid { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: auto; gap: 22px; align-items: start; }
.bento-8 { grid-column: span 8; } .bento-6 { grid-column: span 6; } .bento-4 { grid-column: span 4; } .bento-12 { grid-column: span 12; }
.bento-col { display: flex; flex-direction: column; gap: 22px; }

.bento-card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--card-fill); backdrop-filter: blur(var(--card-blur)); -webkit-backdrop-filter: blur(var(--card-blur));
  border-radius: var(--radius-lg); padding: 18px 20px 20px;
  box-shadow: var(--elev-1);
  opacity: 0; transform: translateY(10px); animation: card-in 460ms var(--ease-out) forwards; animation-delay: var(--bento-delay, 0ms);
}
/* hairline top sheen — the crisp premium edge catch */
.bento-card::before {
  content: ''; position: absolute; left: 14px; right: 14px; top: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text) 16%, transparent), transparent);
}
:root[data-theme^="light"] .bento-card::before { opacity: 0.5; }
@keyframes card-in { to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .bento-card { opacity: 1; transform: none; animation: none; } }

/* CARD STYLE variants (preview control) */
body[data-cards="solid"] .bento-card { background: var(--bg-1); backdrop-filter: none; -webkit-backdrop-filter: none; }
body[data-cards="elevated"] .bento-card { background: var(--bg-1); backdrop-filter: none; box-shadow: var(--elev-3); }
body[data-cards="elevated"] .bento-card:hover { box-shadow: var(--elev-3); }

.bento-card-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--module-hairline); }
.bento-label { font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); display: inline-flex; align-items: center; gap: 7px; }
.bento-label .lbl-ico { color: var(--text-muted); display: inline-flex; }
.bento-meta { font-size: 11px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.02em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 6px; }
.bento-meta .live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--live); box-shadow: 0 0 6px var(--live-glow); }

/* Section reveal animation */
.band { opacity: 0; transform: translateY(8px); animation: card-in 500ms var(--ease-out) forwards; animation-delay: var(--band-delay, 0ms); }
@media (prefers-reduced-motion: reduce) { .band { opacity: 1; transform: none; animation: none; } }

/* Hide bands toggle */
body[data-bands="off"] .band-head { display: none; }
body[data-bands="off"] .band { margin-top: 22px; }

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (max-width: 1100px) {
  .bento-8, .bento-6, .bento-4 { grid-column: span 12; }
}
@media (max-width: 760px) {
  .main { padding: 1.25rem 1rem 5rem; }
  .home-hero h1 { font-size: 26px; }
  .bento-grid { gap: 14px; }
  .bento-col { gap: 14px; }
  .band-head { flex-wrap: wrap; }
  .band-rule { display: none; }
  .status-hero { padding: 16px; }
}

/* ============================================================
   SparkBox additions on top of the design code
   ============================================================ */

/* theme.js sets data-atmo on :root (html), not body — re-point the design's
   atmosphere toggles to :root, and add real WALLPAPER backgrounds. */
:root[data-atmo="solid"] .atmo { opacity: 0; }
:root[data-atmo="nebula"] .atmo { opacity: 1; filter: saturate(170%) brightness(1.1); }
:root[data-atmo="deep"] body { background-color: color-mix(in srgb, var(--bg-0) 42%, #000); }
:root[data-atmo="deep"] .atmo { opacity: 0.5; }
:root[data-atmo="slate"] .atmo { opacity: 1; filter: none; animation: none;
  background: radial-gradient(120% 80% at 50% -12%, rgba(255,255,255,0.07), transparent 58%); }
:root[data-atmo="void"] body { background-color: #07090e; }
:root[data-atmo="void"] .atmo { background: none; opacity: 1; filter: none; animation: none; }
:root[data-atmo="void"] .atmo::after { opacity: 0.26; }

/* WALLPAPER backgrounds — full-bleed photo behind the cards (dark centre, glow
   at edges) so cards read as clearly separated. wp-purple = default. */
:root[data-atmo^="wp-"] body { background-color: #08080d; }
:root[data-atmo^="wp-"] .atmo { opacity: 1; filter: none; animation: none;
  background-position: center; background-size: cover; background-repeat: no-repeat; }
:root[data-atmo^="wp-"] .atmo::after { opacity: 0.34; }
:root[data-atmo="wp-purple"] .atmo { background-image: url("/img/backgrounds/aurora-purple.jpg"); }
:root[data-atmo="wp-blue"]   .atmo { background-image: url("/img/backgrounds/deep-blue.jpg"); }

/* Our bands are rendered by home-layout.js with band-ico as a direct child of
   band-head (not nested in band-title), so style it standalone to match. */
.band-head > .band-ico {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 14px;
  color: var(--accent-hover); background: var(--accent-soft);
}

/* Inner tiles — beat our base style.css high-specificity rules so the design's
   raised-tile look wins (page → card → tile, three real levels). */
:root #home-media .media-tile,
:root .bento-system .gauge-card,
:root .bento-card .running-row,
:root .bento-network .network-item,
:root .network-item {
  background: var(--bg-2);
  box-shadow: var(--elev-flat), 0 0 0 1px var(--card-border);
  border: 0;
}

/* Atmosphere / wallpaper picker (Settings → Appearance) */
.atmo-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 10px; }
.atmo-swatch { display: flex; flex-direction: column; gap: 7px; padding: 7px; background: var(--bg-1);
  border: 1px solid var(--border); border-radius: 12px; cursor: pointer; font-family: inherit; transition: border-color .14s, transform .1s; }
.atmo-swatch:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.atmo-swatch.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.atmo-swatch-preview { height: 46px; border-radius: 8px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--card-border); }
.atmo-swatch-name { font-size: 0.76rem; font-weight: 700; color: var(--text-secondary); text-align: center; }
.atmo-swatch.selected .atmo-swatch-name { color: var(--text); }
.atmo-wp-purple .atmo-swatch-preview { background: url("/img/backgrounds/aurora-purple.jpg") center/cover; }
.atmo-wp-blue .atmo-swatch-preview { background: url("/img/backgrounds/deep-blue.jpg") center/cover; }
.atmo-aurora .atmo-swatch-preview { background: radial-gradient(60% 60% at 12% 8%, rgba(139,92,246,.85), transparent 70%), radial-gradient(60% 60% at 90% 4%, rgba(56,189,248,.6), transparent 72%), #12131a; }
.atmo-nebula .atmo-swatch-preview { background: radial-gradient(60% 60% at 12% 8%, rgba(139,92,246,1), transparent 68%), radial-gradient(60% 60% at 90% 4%, rgba(56,189,248,.9), transparent 70%), #101018; filter: saturate(150%); }
.atmo-deep .atmo-swatch-preview { background: radial-gradient(55% 55% at 14% 10%, rgba(139,92,246,.4), transparent 70%), #07080d; }
.atmo-slate .atmo-swatch-preview { background: radial-gradient(120% 90% at 50% -10%, rgba(255,255,255,.14), transparent 60%), #14161c; }
.atmo-void .atmo-swatch-preview { background: #07090e; }

/* Our home-layout.js injects band-heads as DIRECT children of .bento-grid (the
   design wraps them in .band instead), so they must span all 12 columns or they
   eat a grid cell and break the launcher|right-column row. */
.bento-grid > .band-head { grid-column: 1 / -1; margin: 16px 2px 2px; }
.bento-grid > .band-head:first-child { margin-top: 0; }
/* our right-column stack wrapper = the design's .bento-col */
.bento-col-right { display: flex; flex-direction: column; gap: 22px; }

/* ============================================================
   STRONG card separation (Tom 2026-06-13: "modules still blend").
   The design's frosted bg-1 cards are too subtle on a dark wallpaper —
   so on dark themes make cards a CLEARLY lighter solid panel with a
   visible edge + real float shadow + generous gaps. Unmistakable.
   ============================================================ */
/* Darker card fill (Tom 2026-06-14: panels were too bright, icon/label text
   hard to read). Separation now leans on the border + float shadow rather than
   brightness, so cards stay clearly distinct from the wallpaper while text reads
   with much higher contrast. */
:root:not([data-theme^="light"]) .bento-card {
  background: rgba(24, 28, 40, 0.98);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 10px 30px -8px rgba(0, 0, 0, 0.82);
}
:root:not([data-theme^="light"]) .bento-grid { gap: 28px; }
/* inner tiles a notch darker than the card so the 3 levels still read */
:root:not([data-theme^="light"]) #home-media .media-tile,
:root:not([data-theme^="light"]) .bento-system .gauge-card,
:root:not([data-theme^="light"]) .bento-card .running-row,
:root:not([data-theme^="light"]) .network-item {
  background: rgba(13, 16, 25, 0.94);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* Custom uploaded wallpaper */
:root[data-atmo="wp-custom"] .atmo { background-image: url("/api/appearance/background"); }
.atmo-wp-custom .atmo-swatch-preview { background-size: cover; background-position: center; }
/* Upload-your-own button in the picker */
.atmo-upload-btn {
  margin-top: 12px; padding: 9px 14px; border-radius: var(--radius); cursor: pointer; font: inherit;
  font-size: 0.82rem; font-weight: 700; color: var(--accent-hover);
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  transition: background .14s, transform .1s;
}
.atmo-upload-btn:hover { background: color-mix(in srgb, var(--accent) 24%, transparent); transform: translateY(-1px); }
.atmo-upload-btn:disabled { opacity: 0.6; cursor: default; }

/* Background popover (opened from the Customize bar's "Background" button) */
.sb-bg-popover {
  z-index: 1000; width: 320px; max-width: 92vw; max-height: 70vh; overflow: auto;
  background: var(--bg-1); border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 14px; box-shadow: 0 24px 64px -16px rgba(0,0,0,0.7), 0 0 0 1px var(--card-border);
}
.sb-bg-popover-title { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 10px; }

/* ============================================================
   KILL THE FLASH + SECTION BANDS INSIDE GRIDSTACK (Tom 2026-06-14)
   The home grid is held invisible from the moment loadHome renders it until
   home-layout.js settles the final layout, so the plain-grid → GridStack
   "separation appears, then snaps together" flash never reaches the eye.
   ============================================================ */
.bento-grid { transition: opacity 280ms var(--ease-out, ease); }
.bento-grid.sb-settling { opacity: 0; }

/* Section-band headers carried INTO GridStack as locked, full-width rows.
   They are labels, not cards — strip the card panel styling the grid-stack glue
   would otherwise give a .grid-stack-item-content, and lay the header out
   centred so it reads like the default plain-grid band. */
.bento-grid.grid-stack > .grid-stack-item.sb-band-item > .grid-stack-item-content.band-head-gs {
  inset: 0; width: 100%; height: 100%;
  background: transparent; border: 0; box-shadow: none; border-radius: 0;
  overflow: visible; padding: 0 4px; margin: 0;
  display: flex; align-items: center; gap: 14px;
}
.bento-grid.grid-stack > .grid-stack-item.sb-band-item .band-head-gs { margin-bottom: 0; }
/* The band is a label only — never interactive, never a drop target outline. */
.bento-grid.grid-stack > .grid-stack-item.sb-band-item { pointer-events: none; }
.bento-grid.sb-editing > .grid-stack-item.sb-band-item > .grid-stack-item-content { outline: 0 !important; cursor: default; }
.bento-grid.grid-stack > .grid-stack-item.sb-band-item .ui-resizable-handle { display: none !important; }

/* ============================================================
   MY SHIP — Fleet Registry trading card
   Flat solid plates only: no sheen, glow, or gradient treatment.
   ============================================================ */
.bento-myship::before { display: none; }
#myship-body.ship-trading-body { height: auto !important; }
.ship-trading-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  gap: 16px;
  align-items: stretch;
}
.ship-trading-card {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: #e8ebf2;
  text-decoration: none;
  background: #10131a;
  border: 2px solid #596273;
  border-radius: var(--radius);
}
.ship-trading-card.tcg-legend { border-color: #f5c451; }
.ship-trading-card.tcg-backer { border-color: #9aa7bd; }
.ship-trading-card:hover,
.ship-trading-card:focus-visible {
  color: #ffffff;
  border-color: #ffce5a;
  outline: none;
}
.ship-tcg-nameband {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #343b49;
}
.ship-trading-card.tcg-legend .ship-tcg-nameband { background: #f5c451; }
.ship-trading-card.tcg-backer .ship-tcg-nameband { background: #9aa7bd; }
.ship-trading-card.tcg-legend .ship-tcg-nameband,
.ship-trading-card.tcg-backer .ship-tcg-nameband { color: #14100a; }
.ship-tcg-name {
  overflow-wrap: anywhere;
  font-size: clamp(19px, 2vw, 26px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.02em;
}
.ship-tcg-stars { flex: none; font-size: 13px; letter-spacing: 2px; white-space: nowrap; }
.ship-tcg-typeline {
  padding: 8px 16px;
  color: #9aa4b5;
  background: #141821;
  border-bottom: 1px solid #343b49;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.ship-trading-art {
  position: relative;
  min-height: 230px;
  padding: 46px 20px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #080a0f;
  border-bottom: 1px solid #343b49;
}
.ship-tcg-set,
.ship-tcg-serial {
  position: absolute;
  top: 12px;
  padding: 4px 7px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ship-tcg-set { left: 12px; color: #c7ceda; background: #171b24; border: 1px solid #3a4352; }
.ship-tcg-serial { right: 12px; color: #ffdf8a; background: #171b24; border: 1px solid #6b5a2a; }
.ship-trading-sprite {
  width: min(100%, 384px);
  aspect-ratio: var(--ship-frame-ratio);
  flex: none;
  background-image: url("https://tomsparkbox.com/fleet-atlas.webp?r=4");
  background-repeat: no-repeat;
  background-size: 1066.666667% auto;
  background-position: var(--ship-atlas-x) var(--ship-atlas-y);
}
.ship-trading-art-pending {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #687184;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ship-trading-art-pending span { font-size: 64px; line-height: 1; }
.ship-trading-art-pending small { font-size: 9px; line-height: 1.6; text-align: center; padding: 0 16px; max-width: 34ch; }
.ship-tcg-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #10131a;
  border-bottom: 1px solid #343b49;
}
.ship-tcg-stat { min-width: 0; padding: 12px 16px; }
.ship-tcg-stat + .ship-tcg-stat { border-left: 1px solid #343b49; }
.ship-tcg-stat span,
.ship-trading-map-head,
.ship-trading-kicker {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ship-tcg-stat span { display: block; margin-bottom: 4px; color: #788295; }
.ship-tcg-stat strong {
  display: block;
  color: #e8ebf2;
  font-family: var(--font-mono);
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.15;
}
.ship-tcg-stat.is-fleet strong { color: #ffdf8a; }
.ship-tcg-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  color: #8f99aa;
  background: #171b24;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ship-tcg-foot-open { color: #b7c0cf; }
.ship-trading-map {
  min-width: 0;
  min-height: 360px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #080a0f;
  border: 1px solid #343b49;
  border-radius: var(--radius);
}
.ship-trading-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  color: #8f99aa;
  background: #141821;
  border-bottom: 1px solid #343b49;
}
.ship-trading-map-head a { color: #ffce5a; text-decoration: none; }
.ship-trading-map-actions { display: flex; align-items: center; gap: 12px; }
.ship-trading-map-toggle {
  padding: 5px 10px;
  color: #dce1e9;
  background: #1e2330;
  border: 1px solid #3a4352;
  border-radius: 5px;
  font: inherit;
  cursor: pointer;
}
.ship-trading-map-toggle:hover,
.ship-trading-map-toggle:focus-visible { color: #fff; border-color: #ffce5a; }
.ship-trading-map-slot { flex: 1; min-height: 320px; display: flex; }
.ship-trading-map-off {
  margin: auto;
  max-width: 44ch;
  padding: 22px;
  color: #8f99aa;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
.ship-trading-map iframe { width: 100%; flex: 1; border: 0; background: #0a0a0f; }
.ship-trading-free {
  min-height: 190px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 24px;
  color: #dce1e9;
  background: #10131a;
  border: 1px solid #596273;
  border-radius: var(--radius);
}
.ship-trading-free-mark {
  width: 112px;
  height: 112px;
  flex: 0 0 112px;
  display: grid;
  place-items: center;
  color: #596273;
  background: #080a0f;
  border: 1px solid #343b49;
  border-radius: var(--radius-sm);
  font-size: 54px;
}
.ship-trading-free-copy { max-width: 660px; }
.ship-trading-kicker { display: block; margin-bottom: 7px; color: #9aa4b5; }
.ship-trading-free-copy > strong { display: block; color: #ffffff; font-size: 19px; }
.ship-trading-free .sb-widget-note { margin-top: 8px; color: #aeb7c5; font-size: 13px; }
.ship-trading-free .sb-widget-note a { color: #ffce5a; }

@media (max-width: 820px) {
  .ship-trading-shell { grid-template-columns: 1fr; }
  .ship-trading-map { min-height: 280px; }
  .ship-trading-map-slot { min-height: 240px; }
}
@media (max-width: 560px) {
  .ship-trading-art { min-height: 200px; padding-inline: 14px; }
  .ship-tcg-stars { display: none; }
  .ship-trading-free { align-items: flex-start; gap: 14px; padding: 18px; }
  .ship-trading-free-mark { width: 70px; height: 70px; flex-basis: 70px; font-size: 34px; }
}

/* ── SECOND PRINT (Production Run 2) home card ──────────────────────────
   Flat plates only (house rule: no gradients). The card image carries its
   own art; the module just seats it beside the supporter blurb. */
.run2-shell { display: flex; gap: 22px; align-items: center; padding: 6px 4px; }
.run2-card-link { flex-shrink: 0; line-height: 0; }
.run2-card-img { width: 220px; max-width: 40vw; height: auto; border-radius: var(--radius); border: 1px solid rgba(255, 255, 255, 0.08); transition: transform 0.15s ease; }
.run2-card-link:hover .run2-card-img { transform: translateY(-3px) scale(1.015); }
.run2-side { min-width: 0; }
.run2-side strong { display: block; font-size: 18px; margin-bottom: 6px; }
.run2-side .run2-of { color: var(--muted, #8b8b98); font-size: 13px; font-weight: 400; }
.run2-side p { color: var(--muted, #8b8b98); font-size: 13.5px; line-height: 1.55; margin: 0 0 10px; max-width: 480px; }
.run2-side a { color: #ffce5a; text-decoration: none; font-size: 13px; }
.run2-unclaimed { padding: 14px 4px; }
.run2-cta { display: inline-block; border: 1px solid #ffce5a; border-radius: 8px; padding: 8px 16px; font-weight: 600; }
@media (max-width: 560px) {
  .run2-shell { flex-direction: column; align-items: flex-start; }
  .run2-card-img { width: 180px; max-width: 70vw; }
}

/* Home → App Store affordances (2026-09-17): the tab is now labelled
   "App Store" like the page and the copy; the Launcher tile links there in
   its header and in its empty state so a new owner never has to guess. */
.launcher-store-link { margin-left: auto; white-space: nowrap; }
.launcher-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px 6px; color: var(--text-secondary); max-width: 46ch; }
.launcher-empty p { margin: 0; line-height: 1.5; }

/* ---- Classic dashboard quick wins (design review 2026-09-17) ---------------
   #1 Light mode with a wallpaper was unreadable: the wp-* rules above force a
      near-black body for every theme while light themes set near-black text
      (1.1:1). Keep the page light and let the photo show as a faint texture.
   #8 There was no base link rule anywhere, so unclassed links rendered in the
      browser's default blue on both themes. */
:root[data-theme^="light"][data-atmo^="wp-"] body { background-color: var(--bg-0); }
:root[data-theme^="light"][data-atmo^="wp-"] .atmo { opacity: 0.16; filter: saturate(80%) brightness(1.15); }
:root[data-theme^="light"][data-atmo^="wp-"] .atmo::after { opacity: 0; }
a { color: var(--accent-hover); text-decoration: underline; text-decoration-thickness: 1px;
    text-underline-offset: 2px; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
a:hover { text-decoration-color: currentColor; }
:root[data-theme^="light"] a { color: var(--accent); }
.tab, .btn-pill, .btn-main, .btn-soft, .btn-ghost, .system-action, .quick-action, .launcher-store-link, .brand { text-decoration: none; }
