/* ──────────────────────────────────────────────────────────────────────────────
   Alexia Hub — hub.css  (shell + house style, agent B0)

   Stolen wholesale from DrainButton/drainbutton.css and the GachAlexia
   content.css / autodrain.css family: rgb(12,0,12) ground with radial magenta
   glows, the #d455b8 / #c21590 / #7e46c2 ramp, Cormorant Garamond italic
   shimmer headings over Poppins body.

   Every shell selector is `hub-` prefixed. The shared component classes are
   listed at the bottom of this file under "CLASS CONTRACT" — the tab agents
   (home / gacha / autodrain) build on those instead of re-inventing them.
   ────────────────────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400;1,500;1,600&family=Poppins:wght@300;400;600&display=swap');

:root {
  --hub-bg:          rgb(12, 0, 12);
  --hub-mag:         #d455b8;
  --hub-mag-deep:    #c21590;
  --hub-violet:      #7e46c2;
  --hub-neon:        #ff75ed;
  --hub-glow:        255, 117, 237;          /* rgba() triple, used everywhere */

  --hub-ink:         rgb(190, 105, 175);
  --hub-ink-bright:  #ffe3f6;
  --hub-ink-dim:     rgba(255, 227, 246, 0.62);
  --hub-ink-faint:   rgba(255, 227, 246, 0.38);

  --hub-line:        rgba(255, 117, 237, 0.34);
  --hub-line-soft:   rgba(255, 117, 237, 0.14);
  --hub-panel:       rgba(24, 0, 26, 0.72);
  --hub-panel-solid: rgba(20, 0, 22, 0.96);
  --hub-field:       #1a0030;

  --hub-danger:      #ff4d6d;
  --hub-ok:          #ff9ad5;

  --hub-radius:      14px;
  --hub-radius-sm:   9px;
  --hub-topbar-h:    60px;

  --hub-serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --hub-sans:  'Poppins', 'Segoe UI', system-ui, sans-serif;
  --hub-shimmer: linear-gradient(100deg, #d455b8 0%, #c21590 25%, #7e46c2 50%, #c21590 75%, #d455b8 100%);
}

/* ── base ───────────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }   /* the shell toggles `hidden` on flex/grid boxes */

html, body { min-height: 100%; }

body {
  margin: 0;
  padding-top: var(--hub-topbar-h);
  /* the gacha/autodrain tabs go full-bleed (width: 100vw); with a vertical
     scrollbar present 100vw is a hair wider than the client area — clip the
     overflow instead of letting a horizontal scrollbar appear. */
  overflow-x: hidden;
  font-family: var(--hub-sans);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.6;
  color: var(--hub-ink);
  /* the gacha overlay's submerged ground, ported from content.css .overlayBody
     (lines 11–14): top glow at 50% 20%, floor glow at 50% 100%, near-black
     base — plus a vignette on top so the edges sink under the water. House
     tokens (--hub-bg) untouched; the orbs live on body::before/::after below,
     exactly where the overlay keeps its own. */
  background:
    radial-gradient(ellipse at 50% 46%, transparent 55%, rgba(4, 0, 4, 0.55) 100%),
    radial-gradient(ellipse at 50% 20%, rgba(110, 0, 92, 0.28), transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(70, 0, 60, 0.26), transparent 60%),
    var(--hub-bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* two soft floating glow orbs behind everything (the house ::before/::after) */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  animation: hubOrbDrift 16s ease-in-out infinite alternate;
}
body::before {
  width: 46vmin; height: 46vmin;
  top: 6%; left: 14%;
  background: rgba(130, 0, 110, 0.20);
}
body::after {
  width: 38vmin; height: 38vmin;
  bottom: 8%; right: 12%;
  background: rgba(180, 30, 150, 0.13);
  animation-delay: -8s;
}
@keyframes hubOrbDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vmin, -4vmin, 0) scale(1.14); }
}

/* faint drifting scanlines — sells "being watched" */
.hub-grain {
  position: fixed;
  inset: -20%;
  pointer-events: none;
  z-index: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 117, 237, 0.05) 0px,
    rgba(255, 117, 237, 0.05) 1px,
    transparent 1px,
    transparent 4px);
  animation: hubGrainDrift 9s linear infinite;
}
@keyframes hubGrainDrift {
  from { transform: translateY(0); }
  to   { transform: translateY(4px); }
}

::selection { background: rgba(255, 117, 237, 0.28); color: #fff; }

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: rgba(255, 117, 237, 0.22);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(255, 117, 237, 0.4); background-clip: content-box; }

a { color: var(--hub-mag); text-decoration: none; }
a:hover { color: var(--hub-neon); }
code {
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-size: 0.86em;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(255, 117, 237, 0.10);
  color: var(--hub-ink-bright);
}

/* ── typography ─────────────────────────────────────────────────────────────── */

.hub-shimmer {
  margin: 0;
  font-family: var(--hub-serif);
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: var(--hub-shimmer);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: hubShimmer 6s linear infinite;
  filter: drop-shadow(0 0 26px rgba(190, 20, 150, 0.40));
}
@keyframes hubShimmer {
  from { background-position: 0% center; }
  to   { background-position: -200% center; }
}

.hub-h1 { font-size: clamp(34px, 5.4vw, 58px); }
.hub-h2 { font-size: clamp(26px, 3.6vw, 40px); }
.hub-h3 {
  margin: 0;
  font-family: var(--hub-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  color: var(--hub-ink-bright);
}

.hub-lede {
  margin: 6px 0 0;
  font-family: var(--hub-serif);
  font-style: italic;
  font-size: clamp(15px, 1.9vw, 20px);
  letter-spacing: 0.16em;
  color: rgba(225, 135, 205, 0.85);
  text-shadow: 0 0 14px rgba(200, 30, 165, 0.45);
  animation: hubBreathe 3.4s ease-in-out infinite;
}
@keyframes hubBreathe {
  0%, 100% { opacity: 0.72; }
  50%      { opacity: 1; }
}

.hub-label {
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--hub-ink-faint);
}
.hub-num { font-variant-numeric: tabular-nums; }
.hub-muted { color: var(--hub-ink-dim); }
.hub-sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ── topbar ─────────────────────────────────────────────────────────────────── */

.hub-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--hub-topbar-h);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 clamp(12px, 3vw, 28px);
  background: rgba(12, 0, 12, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hub-line-soft);
}

.hub-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--hub-ink-bright);
}
.hub-sigil {
  width: 32px; height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(255, 117, 237, 0.55));
  animation: hubSigilPulse 5s ease-in-out infinite;
}
.hub-sigilFallback {
  display: none;
  width: 32px; height: 32px;
  align-items: center; justify-content: center;
  font-size: 20px;
  color: var(--hub-neon);
  text-shadow: 0 0 14px rgba(255, 117, 237, 0.7);
  animation: hubSigilPulse 5s ease-in-out infinite;
}
.hub-sigil[hidden] + .hub-sigilFallback { display: inline-flex; }
@keyframes hubSigilPulse {
  0%, 100% { opacity: 0.74; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.06); }
}
.hub-brandName {
  font-family: var(--hub-serif);
  font-style: normal;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.hub-brandName em {
  font-style: italic;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.04em;
  color: var(--hub-mag);
}

/* tab bar */
.hub-tabs {
  display: flex;
  align-items: center;
  gap: clamp(4px, 1.6vw, 18px);
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.hub-tabs::-webkit-scrollbar { display: none; }

.hub-tab {
  position: relative;
  appearance: none;
  background: none;
  border: 0;
  padding: 8px 10px 10px;
  cursor: pointer;
  font-family: var(--hub-sans);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--hub-ink-dim);
  white-space: nowrap;
  transition: color 0.18s ease;
}
.hub-tab:hover { color: var(--hub-ink-bright); }
.hub-tab::after {
  content: '';
  position: absolute;
  left: 10px; right: 10px; bottom: 0;
  height: 1.5px;
  background: var(--hub-shimmer);
  background-size: 200% auto;
  border-radius: 999px;
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 0.2s ease, transform 0.24s ease;
}
.hub-tab.on {
  color: var(--hub-ink-bright);
  text-shadow: 0 0 14px rgba(var(--hub-glow), 0.55);
}
.hub-tab.on::after {
  opacity: 1;
  transform: scaleX(1);
  animation: hubShimmer 6s linear infinite;
}

/* chips (right side of the topbar) */
.hub-auth {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.hub-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border: 1px solid var(--hub-line);
  border-radius: 999px;
  background: rgba(26, 0, 24, 0.6);
  color: var(--hub-ink-bright);
  font-family: var(--hub-sans);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.hub-chip:hover {
  background: rgba(255, 117, 237, 0.14);
  border-color: var(--hub-neon);
  box-shadow: 0 0 18px rgba(var(--hub-glow), 0.22);
}
.hub-chipText { max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-chipAuth { border-color: var(--hub-line); }

.hub-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #66335f;
  flex: 0 0 auto;
}
.hub-dot.on {
  background: var(--hub-neon);
  box-shadow: 0 0 9px var(--hub-neon);
  animation: hubDotPulse 1.6s ease-in-out infinite;
}
.hub-dot.warn { background: var(--hub-danger); box-shadow: 0 0 8px rgba(255, 77, 109, 0.7); }
@keyframes hubDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.82); }
}

/* account dropdown */
.hub-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 216px;
  padding: 10px;
  border: 1px solid var(--hub-line);
  border-radius: var(--hub-radius);
  background: var(--hub-panel-solid);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6), 0 0 34px rgba(var(--hub-glow), 0.14);
  animation: hubPopIn 0.18s ease-out both;
  z-index: 50;
}
.hub-menuEmail {
  margin: 2px 6px 10px;
  font-size: 12px;
  letter-spacing: 0.4px;
  color: var(--hub-ink-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hub-menuItem {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--hub-radius-sm);
  background: none;
  text-align: left;
  color: var(--hub-ink-bright);
  font-family: var(--hub-sans);
  font-size: 13px;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: background 0.14s ease;
}
.hub-menuItem:hover { background: rgba(255, 117, 237, 0.14); }
.hub-menuItemDanger { color: var(--hub-danger); }
.hub-menuItemDanger:hover { background: rgba(255, 77, 109, 0.14); }

/* ── install banner ─────────────────────────────────────────────────────────── */

.hub-banner {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1180px;
  margin: 18px auto -6px;
  padding: 14px 18px;
  border: 1px solid var(--hub-line);
  border-radius: var(--hub-radius);
  background:
    radial-gradient(ellipse at 0% 0%, rgba(110, 0, 92, 0.35), transparent 60%),
    var(--hub-panel);
  box-shadow: 0 0 40px rgba(var(--hub-glow), 0.10);
  animation: hubDropIn 0.4s ease-out both;
}
.hub-bannerBody { display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; }
.hub-bannerTitle {
  font-family: var(--hub-serif);
  font-style: italic;
  font-weight: 600;
  font-size: 18px;
  color: var(--hub-ink-bright);
}
.hub-bannerText { font-size: 12.5px; color: var(--hub-ink-dim); max-width: 78ch; }
@keyframes hubDropIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hub-x {
  appearance: none;
  flex: 0 0 auto;
  width: 26px; height: 26px;
  border: 1px solid var(--hub-line-soft);
  border-radius: 50%;
  background: rgba(12, 0, 12, 0.5);
  color: var(--hub-ink-dim);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.hub-x:hover { color: var(--hub-neon); border-color: var(--hub-neon); transform: scale(1.08); }

/* ── view / layout ──────────────────────────────────────────────────────────── */

.hub-view {
  position: relative;
  z-index: 10;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(18px, 3.4vw, 34px) clamp(14px, 3vw, 28px) 90px;
  min-height: calc(100vh - var(--hub-topbar-h));
  animation: hubFadeIn 0.45s ease-out both;
}
@keyframes hubFadeIn { from { opacity: 0; } to { opacity: 1; } }

.hub-tabHost { display: block; }

.hub-section { margin: 0 0 clamp(22px, 3.4vw, 40px); }
.hub-sectionHead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hub-line-soft);
}
.hub-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hub-rowBetween { justify-content: space-between; }
.hub-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.hub-gridWide { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* boot dots (first paint before the router resolves) */
.hub-boot {
  display: flex; gap: 10px; align-items: center; justify-content: center;
  min-height: 40vh;
}
.hub-bootDot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--hub-neon);
  box-shadow: 0 0 12px rgba(var(--hub-glow), 0.8);
  animation: hubDotPulse 1.2s ease-in-out infinite;
}
.hub-bootDot:nth-child(2) { animation-delay: 0.18s; }
.hub-bootDot:nth-child(3) { animation-delay: 0.36s; }

/* ── cards / stats / tables ─────────────────────────────────────────────────── */

.hub-card {
  position: relative;
  padding: 18px 20px;
  border: 1px solid var(--hub-line-soft);
  border-radius: var(--hub-radius);
  background: var(--hub-panel);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.hub-card::before {          /* hairline glow along the top edge */
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--hub-glow), 0.55), transparent);
}
.hub-cardHead {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
}
.hub-cardPadNone { padding: 0; }

.hub-stat { text-align: center; padding: 20px 16px; }
.hub-statValue {
  font-family: var(--hub-serif);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.05;
  color: var(--hub-ink-bright);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 22px rgba(var(--hub-glow), 0.45);
}
.hub-statLabel {
  margin-top: 6px;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--hub-ink-faint);
}
.hub-stat.kick { animation: hubKick 0.7s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
@keyframes hubKick {
  0%   { transform: scale(1); }
  20%  { transform: scale(1.06); }
  55%  { transform: scale(0.995); }
  100% { transform: scale(1); }
}

.hub-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hub-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--hub-ink-faint);
  border-bottom: 1px solid var(--hub-line-soft);
}
.hub-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(255, 117, 237, 0.07);
  color: var(--hub-ink-bright);
  font-variant-numeric: tabular-nums;
}
.hub-table tr:last-child td { border-bottom: 0; }
.hub-table td.hub-tdNum, .hub-table th.hub-tdNum { text-align: right; }
.hub-table tbody tr:hover td { background: rgba(255, 117, 237, 0.05); }

/* pills / tags */
.hub-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px;
  border: 1px solid var(--hub-line);
  border-radius: 999px;
  background: rgba(12, 0, 12, 0.6);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--hub-ink-bright);
}
.hub-pillDanger { border-color: rgba(255, 77, 109, 0.6); color: var(--hub-danger); }
.hub-pillMuted { border-color: var(--hub-line-soft); color: var(--hub-ink-faint); }

/* empty state + auth gate */
.hub-empty,
.hub-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: clamp(30px, 7vw, 64px) clamp(20px, 5vw, 48px);
  border: 1px dashed var(--hub-line);
  border-radius: var(--hub-radius);
  background: rgba(18, 0, 18, 0.5);
}
.hub-gate { border-style: solid; background: var(--hub-panel); }
.hub-emptyTitle {
  margin: 0;
  font-family: var(--hub-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(20px, 3vw, 30px);
  color: var(--hub-ink-bright);
}
.hub-emptyText { margin: 0; max-width: 54ch; font-size: 13.5px; color: var(--hub-ink-dim); }
.hub-emptyGlyph {
  font-size: 34px;
  color: var(--hub-neon);
  text-shadow: 0 0 22px rgba(var(--hub-glow), 0.6);
  animation: hubSigilPulse 5s ease-in-out infinite;
}

/* ── buttons ────────────────────────────────────────────────────────────────── */

.hub-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border: 1.5px solid var(--hub-neon);
  border-radius: var(--hub-radius-sm);
  background: transparent;
  color: var(--hub-neon);
  font-family: var(--hub-sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease, color 0.16s ease;
}
.hub-btn:hover:not(:disabled) {
  background: rgba(255, 117, 237, 0.14);
  box-shadow: 0 0 24px rgba(var(--hub-glow), 0.26);
}
.hub-btn:active:not(:disabled) { transform: scale(0.97); }
.hub-btn:disabled { opacity: 0.42; cursor: not-allowed; }
.hub-btn:focus-visible,
.hub-tab:focus-visible,
.hub-chip:focus-visible,
.hub-menuItem:focus-visible,
.hub-input:focus-visible,
.hub-link:focus-visible {
  outline: 2px solid rgba(var(--hub-glow), 0.8);
  outline-offset: 2px;
}

.hub-btnPrimary {
  background: linear-gradient(180deg, rgba(255, 117, 237, 0.26), rgba(194, 21, 144, 0.30));
  color: #fff;
  border-color: var(--hub-neon);
  box-shadow: 0 0 26px rgba(var(--hub-glow), 0.20), inset 0 0 22px rgba(var(--hub-glow), 0.14);
}
.hub-btnPrimary:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(255, 117, 237, 0.38), rgba(194, 21, 144, 0.42));
  box-shadow: 0 0 40px rgba(var(--hub-glow), 0.34), inset 0 0 26px rgba(var(--hub-glow), 0.2);
}
.hub-btnGhost { border-color: var(--hub-line); color: var(--hub-ink-bright); }
.hub-btnGhost:hover:not(:disabled) { border-color: var(--hub-mag); }
.hub-btnStop { border-color: var(--hub-danger); color: var(--hub-danger); }
.hub-btnStop:hover:not(:disabled) { background: rgba(255, 77, 109, 0.16); box-shadow: 0 0 24px rgba(255, 77, 109, 0.26); }
.hub-btnSmall { padding: 7px 14px; font-size: 11.5px; letter-spacing: 1.4px; text-transform: uppercase; }
.hub-btnBlock { width: 100%; }
.hub-btnBusy { position: relative; color: transparent !important; pointer-events: none; }
.hub-btnBusy::after {
  content: '';
  position: absolute;
  width: 15px; height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: hubSpin 0.7s linear infinite;
}
@keyframes hubSpin { to { transform: rotate(360deg); } }

/* segmented switch (login/signup, mode pickers) */
.hub-switch {
  display: flex;
  gap: 8px;
  margin: 4px 0 18px;
}
.hub-switchBtn {
  flex: 1;
  padding: 10px 8px;
  border: 1.5px solid var(--hub-line-soft);
  border-radius: var(--hub-radius-sm);
  background: transparent;
  color: var(--hub-ink-dim);
  font-family: var(--hub-sans);
  font-size: 12px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.hub-switchBtn:hover { background: rgba(255, 117, 237, 0.10); color: var(--hub-ink-bright); }
.hub-switchBtn.on {
  border-color: var(--hub-neon);
  background: rgba(255, 117, 237, 0.16);
  color: var(--hub-ink-bright);
  box-shadow: 0 0 20px rgba(var(--hub-glow), 0.18);
}

/* ── forms ──────────────────────────────────────────────────────────────────── */

.hub-field { display: block; margin: 0 0 13px; }
.hub-fieldLabel {
  display: block;
  margin-bottom: 5px;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: rgba(255, 117, 237, 0.72);
}
.hub-input,
.hub-select,
.hub-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 117, 237, 0.34);
  border-radius: var(--hub-radius-sm);
  background: var(--hub-field);
  color: var(--hub-neon);
  font-family: var(--hub-sans);
  font-size: 14px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.hub-input::placeholder { color: rgba(255, 227, 246, 0.28); }
.hub-input:focus, .hub-select:focus, .hub-textarea:focus {
  border-color: var(--hub-neon);
  box-shadow: 0 0 0 3px rgba(var(--hub-glow), 0.14);
  outline: none;
}
.hub-select { width: auto; }
.hub-textarea { min-height: 84px; resize: vertical; }
.hub-inputSm { width: 84px; padding: 6px 8px; font-size: 13px; }

.hub-check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 4px 0 16px;
  font-size: 13px;
  color: var(--hub-ink-bright);
  cursor: pointer;
  user-select: none;
}
.hub-check input { accent-color: var(--hub-neon); width: 15px; height: 15px; }

.hub-formError {
  margin: 0 0 12px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 77, 109, 0.5);
  border-radius: var(--hub-radius-sm);
  background: rgba(255, 77, 109, 0.10);
  color: #ffb3c3;
  font-size: 12.5px;
  line-height: 1.5;
}
.hub-hint { margin: 4px 0 0; font-size: 11px; color: var(--hub-ink-faint); }

/* ── modal ──────────────────────────────────────────────────────────────────── */

.hub-modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; }
.hub-modal[hidden] { display: none; }
.hub-modalBackdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 0, 6, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: hubFadeIn 0.25s ease-out both;
}
.hub-modalCard {
  position: relative;
  width: min(460px, 100%);
  max-height: min(86vh, 720px);
  overflow-y: auto;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--hub-line);
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(110, 0, 92, 0.34), transparent 62%),
    var(--hub-panel-solid);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 60px rgba(var(--hub-glow), 0.16);
  animation: hubPopIn 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.1) both;
}
@keyframes hubPopIn {
  from { opacity: 0; transform: translateY(-14px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.hub-modalX { position: absolute; top: 14px; right: 14px; }
.hub-modalTitle { font-size: clamp(26px, 4vw, 36px); }
.hub-modalSub {
  margin: 4px 0 18px;
  font-family: var(--hub-serif);
  font-style: italic;
  font-size: 16px;
  letter-spacing: 0.1em;
  color: rgba(225, 135, 205, 0.8);
}
.hub-modalFoot {
  margin: 16px 0 0;
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 0.3px;
  color: var(--hub-ink-faint);
}
.hub-steps { margin: 0; padding-left: 20px; font-size: 13.5px; color: var(--hub-ink-bright); }
.hub-steps li { margin-bottom: 9px; }
.hub-steps b { color: var(--hub-neon); font-weight: 600; }

/* ── toasts ─────────────────────────────────────────────────────────────────── */

.hub-toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}
.hub-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--hub-line);
  border-left: 3px solid var(--hub-neon);
  border-radius: var(--hub-radius-sm);
  background: var(--hub-panel-solid);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6), 0 0 26px rgba(var(--hub-glow), 0.12);
  color: var(--hub-ink-bright);
  font-size: 13px;
  line-height: 1.5;
  animation: hubToastIn 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.1) both;
}
.hub-toast.out { animation: hubToastOut 0.3s ease-in both; }
.hub-toastMsg { flex: 1 1 auto; }
.hub-toast .hub-x { width: 20px; height: 20px; font-size: 13px; border: 0; background: none; }
.hub-toast--ok    { border-left-color: var(--hub-ok); }
.hub-toast--error { border-left-color: var(--hub-danger); border-color: rgba(255, 77, 109, 0.45); }
.hub-toast--error .hub-toastMsg { color: #ffc4d0; }
@keyframes hubToastIn {
  from { opacity: 0; transform: translateX(26px) scale(0.96); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes hubToastOut {
  to { opacity: 0; transform: translateX(26px) scale(0.96); }
}

/* ── links tab ──────────────────────────────────────────────────────────────── */

.hub-linkGrid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.hub-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--hub-line-soft);
  border-radius: var(--hub-radius);
  background: var(--hub-panel);
  color: var(--hub-ink-bright);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.hub-link:hover {
  border-color: var(--hub-neon);
  box-shadow: 0 0 30px rgba(var(--hub-glow), 0.20);
  transform: translateY(-2px);
}
.hub-linkIcon {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--hub-line);
  border-radius: 50%;
  background: rgba(12, 0, 12, 0.6);
  font-family: var(--hub-serif);
  font-size: 19px;
  color: var(--hub-neon);
  text-shadow: 0 0 12px rgba(var(--hub-glow), 0.6);
}
.hub-linkIcon img { width: 22px; height: 22px; object-fit: contain; }
.hub-linkBody { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hub-linkLabel {
  font-family: var(--hub-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 19px;
  line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hub-linkHost { font-size: 11px; letter-spacing: 1px; color: var(--hub-ink-faint); overflow: hidden; text-overflow: ellipsis; }
.hub-linkSoon {
  cursor: default;
  border-style: dashed;
  opacity: 0.62;
}
.hub-linkSoon:hover { transform: none; border-color: var(--hub-line-soft); box-shadow: none; }
.hub-linkSoon .hub-linkLabel { color: var(--hub-ink-dim); }

/* ── responsive ─────────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .hub-brandName { display: none; }
  .hub-tab { letter-spacing: 2px; padding: 8px 8px 10px; }
}
@media (max-width: 700px) {
  :root { --hub-topbar-h: 54px; }
  .hub-topbar { gap: 10px; padding: 0 10px; }
  .hub-tabs { order: 3; width: 100%; margin-left: 0; }
  .hub-topbar { flex-wrap: wrap; height: auto; padding-top: 8px; padding-bottom: 0; }
  body { padding-top: 96px; }
  .hub-auth { margin-left: auto; }
  .hub-chip { padding: 5px 10px; font-size: 10px; }
  .hub-banner { flex-wrap: wrap; gap: 10px; margin: 12px 14px -6px; }
  .hub-toasts { right: 10px; left: 10px; bottom: 10px; width: auto; }
  .hub-table { font-size: 12px; }
  .hub-table th, .hub-table td { padding: 7px 6px; }
}
@media (max-width: 420px) {
  .hub-grid, .hub-gridWide { grid-template-columns: 1fr; }
  .hub-linkGrid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}

/* ──────────────────────────────────────────────────────────────────────────────
   CLASS CONTRACT — what the tab agents can lean on instead of restyling:

   layout      .hub-section .hub-sectionHead .hub-grid .hub-gridWide .hub-row
               .hub-rowBetween .hub-tabHost
   type        .hub-shimmer (+ .hub-h1/.hub-h2/.hub-h3) .hub-lede .hub-label
               .hub-num .hub-muted .hub-sr
   surfaces    .hub-card .hub-cardHead .hub-cardPadNone .hub-stat .hub-statValue
               .hub-statLabel .hub-table (+ .hub-tdNum) .hub-pill
               .hub-pillDanger .hub-pillMuted .hub-empty .hub-gate
               .hub-emptyTitle .hub-emptyText .hub-emptyGlyph
   controls    .hub-btn (+ Primary/Ghost/Stop/Small/Block/Busy) .hub-switch
               .hub-switchBtn .hub-field .hub-fieldLabel .hub-input (+ Sm)
               .hub-select .hub-textarea .hub-check .hub-formError .hub-hint .hub-x
   shell-owned .hub-topbar .hub-tabs .hub-tab .hub-chip .hub-dot .hub-menu
               .hub-banner .hub-modal .hub-modalCard .hub-toasts .hub-toast
               .hub-linkGrid .hub-link (+ .hub-linkSoon)

   Persona copy goes in [Vn] slots inside these; chrome text stays plain English.
   Tab-specific styles belong in the tab's own stylesheet (e.g. css/gacha.css).
   ────────────────────────────────────────────────────────────────────────────── */
