/* Bedwars Stats Tracker — "Liquid Glass" on a deep violet night.
   Look references: neon-violet glass UI kits (glowing active pill, soft glass cards with a light
   edge on top), iOS-26 style floating glass navigation. No framework, no build step. */

:root {
  --bg: #07040f;
  --ink: #f4edff;
  --tint-rgb: 228 214 255;
  --surface-rgb: 26 14 52;
  --a-rgb: 154 92 255;
  --a-light-rgb: 190 140 255;
  --a-deep-rgb: 112 52 230;
  --a-dark-rgb: 88 28 200;
  --blob-1: #5b21b6;
  --blob-2: #a855f7;
  --blob-3: #3b1d8f;
  --on-accent: #fff;
  --muted: rgb(var(--tint-rgb) / 0.62);
  --faint: rgb(var(--tint-rgb) / 0.38);

  --violet-200: #e6d3ff;
  --violet-300: #d0adff;
  --violet-400: #b585ff;
  --violet-500: #9a5cff;
  --violet-600: #7c3aed;
  --win: #74f0c0;
  --loss: #ff7ea6;

  --glass-fill: linear-gradient(150deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.035) 42%, rgba(255, 255, 255, 0.06));
  --glass-blur: blur(26px) saturate(170%);
  --edge: rgba(255, 255, 255, 0.13);
  --inset: rgba(255, 255, 255, 0.055);

  --r-xl: 30px;
  --r-lg: 24px;
  --r-md: 16px;

  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'Figtree', system-ui, sans-serif;
}

/* ---------- color schemes (Einstellungen → Farbschema) ----------
   Everything accent-colored reads these variables; :root above is the default "Lila". */
:root[data-theme="neon-gruen"] {
  --bg: #030a06;
  --ink: #edfff3;
  --tint-rgb: 208 255 224;
  --surface-rgb: 6 26 14;
  --violet-200: #d4ffe4;
  --violet-300: #9dffc0;
  --violet-400: #5dff96;
  --violet-500: #22f56b;
  --violet-600: #0fbf4f;
  --a-rgb: 34 245 107;
  --a-light-rgb: 90 255 150;
  --a-deep-rgb: 15 191 79;
  --a-dark-rgb: 8 120 50;
  --blob-1: #0b7a3a;
  --blob-2: #22c55e;
  --blob-3: #065f2c;
  --on-accent: #03210f;
}
:root[data-theme="neon-gelb"] {
  --bg: #0a0902;
  --ink: #fffdea;
  --tint-rgb: 255 250 208;
  --surface-rgb: 32 28 4;
  --violet-200: #fffbd0;
  --violet-300: #fff58a;
  --violet-400: #fff04a;
  --violet-500: #f5e60a;
  --violet-600: #c9b800;
  --a-rgb: 245 230 10;
  --a-light-rgb: 255 245 90;
  --a-deep-rgb: 201 184 0;
  --a-dark-rgb: 120 108 0;
  --blob-1: #7a6f00;
  --blob-2: #eab308;
  --blob-3: #5c5300;
  --on-accent: #1c1700;
}
:root[data-theme="pink"] {
  --bg: #0f0309;
  --ink: #fff0f8;
  --tint-rgb: 255 214 236;
  --surface-rgb: 42 8 26;
  --violet-200: #ffd6ec;
  --violet-300: #ff9bd0;
  --violet-400: #ff5cb3;
  --violet-500: #ff2d9b;
  --violet-600: #d11a7e;
  --a-rgb: 255 45 155;
  --a-light-rgb: 255 110 190;
  --a-deep-rgb: 209 26 126;
  --a-dark-rgb: 130 10 75;
  --blob-1: #9d174d;
  --blob-2: #ec4899;
  --blob-3: #831843;
  --on-accent: #fff;
}
:root[data-theme="hellblau"] {
  --bg: #030b12;
  --ink: #eef9ff;
  --tint-rgb: 214 241 255;
  --surface-rgb: 8 28 46;
  --violet-200: #d6f1ff;
  --violet-300: #9adfff;
  --violet-400: #5ccbff;
  --violet-500: #29b6f6;
  --violet-600: #0f8fd0;
  --a-rgb: 41 182 246;
  --a-light-rgb: 100 205 255;
  --a-deep-rgb: 15 143 208;
  --a-dark-rgb: 8 90 140;
  --blob-1: #0a6a9e;
  --blob-2: #38bdf8;
  --blob-3: #075985;
  --on-accent: #03202f;
}
:root[data-theme="dunkelblau"] {
  --bg: #030612;
  --ink: #eef1ff;
  --tint-rgb: 211 220 255;
  --surface-rgb: 10 16 48;
  --violet-200: #d3dcff;
  --violet-300: #97aaff;
  --violet-400: #6683ff;
  --violet-500: #3d5cf0;
  --violet-600: #2340c8;
  --a-rgb: 61 92 240;
  --a-light-rgb: 110 135 255;
  --a-deep-rgb: 35 64 200;
  --a-dark-rgb: 20 35 130;
  --blob-1: #1e3a8a;
  --blob-2: #3b5bdb;
  --blob-3: #172554;
  --on-accent: #fff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}

html {
  color-scheme: dark;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.01em;
}
h2 {
  font-size: 1.05rem;
  font-weight: 600;
}
h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
}
p {
  margin: 0;
}
a {
  color: var(--violet-300);
}
code {
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 0.88em;
  background: rgba(255, 255, 255, 0.09);
  padding: 1px 7px;
  border-radius: 8px;
}
.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.center { text-align: center; }
:focus-visible {
  outline: 2px solid var(--violet-300);
  outline-offset: 2px;
}

/* ---------- ambient light behind the glass ---------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 85% -10%, rgb(var(--a-deep-rgb) / 0.28), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgb(var(--a-dark-rgb) / 0.3), transparent 60%),
    var(--bg);
}
.ambient i {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  animation: drift 28s ease-in-out infinite alternate;
}
.ambient i:nth-child(1) { width: 46vmax; height: 46vmax; left: -12vmax; top: 6vmax; background: var(--blob-1); }
.ambient i:nth-child(2) { width: 38vmax; height: 38vmax; right: -10vmax; top: 30vmax; background: var(--blob-2); opacity: 0.32; animation-duration: 36s; animation-delay: -8s; }
.ambient i:nth-child(3) { width: 30vmax; height: 30vmax; left: 34vw; top: -12vmax; background: var(--blob-3); animation-duration: 32s; animation-delay: -15s; }
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(5vmax, -4vmax, 0) scale(1.15); }
}

/* ---------- the glass material ---------- */
.glass {
  position: relative;
  isolation: isolate;
  background: var(--glass-fill);
  border-radius: var(--r-lg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    0 24px 60px -24px rgba(0, 0, 0, 0.75),
    0 2px 10px rgba(0, 0, 0, 0.25);
}
/* violet light pooling at the top edge */
.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(110% 70% at 50% -18%, rgb(var(--a-light-rgb) / 0.24), transparent 62%);
}
/* light-catching border: bright top-left, fading, violet bottom-right */
.glass::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.06) 32%, rgba(255, 255, 255, 0.02) 68%, rgb(var(--a-light-rgb) / 0.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

/* ---------- top bar ---------- */
.topbar {
  position: fixed;
  z-index: 50;
  top: 14px;
  left: 16px;
  right: 16px;
  height: 62px;
  padding: 0 14px 0 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}
.brand b {
  font-weight: 700;
  background: linear-gradient(90deg, var(--violet-200), var(--violet-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-mark {
  color: var(--on-accent);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, var(--violet-300), var(--violet-600));
  box-shadow: 0 0 22px rgb(var(--a-rgb) / 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  flex: none;
}
.brand-mark svg { width: 66%; height: 66%; }
.brand-mark-lg {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  margin-bottom: 8px;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.live-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--win);
  box-shadow: 0 0 10px var(--win);
  animation: pulse 2.4s ease-in-out infinite;
}
.live-dot.is-error {
  background: var(--loss);
  box-shadow: 0 0 10px var(--loss);
}
@keyframes pulse {
  50% { opacity: 0.45; }
}

/* ---------- search ---------- */
.search {
  position: relative;
  display: flex;
  align-items: center;
  width: 280px;
  height: 42px;
  padding: 0 12px 0 14px;
  gap: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: width 0.25s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.search:focus-within {
  width: 340px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgb(var(--a-light-rgb) / 0.7), 0 0 26px rgb(var(--a-rgb) / 0.4);
}
.search-icon { color: var(--muted); flex: none; }
.search input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: 0;
  color: var(--ink);
  font: inherit;
}
.search input::placeholder { color: var(--faint); }
.search-kbd {
  font: 600 0.72rem var(--font-body);
  color: var(--faint);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  padding: 0 7px;
}
.search:focus-within .search-kbd { display: none; }

.search-results {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(380px, calc(100vw - 32px));
  max-height: 420px;
  overflow-y: auto;
  padding: 8px;
  border-radius: var(--r-lg);
  background: linear-gradient(150deg, rgba(48, 30, 84, 0.86), rgba(20, 12, 38, 0.92));
  animation: pop 0.16s ease-out;
}
@keyframes pop {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
}
.sr-group {
  margin: 8px 10px 4px;
  font: 600 0.68rem var(--font-body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.sr-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 14px;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.sr-item img,
.sr-avatar-ph {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  image-rendering: pixelated;
  background: rgba(255, 255, 255, 0.1);
  flex: none;
}
.sr-name { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.sr-kind { font-size: 0.72rem; color: var(--faint); white-space: nowrap; }
.sr-item:hover,
.sr-item.is-active {
  background: linear-gradient(135deg, rgb(var(--a-rgb) / 0.5), rgb(var(--a-deep-rgb) / 0.32));
  box-shadow: 0 0 22px rgb(var(--a-rgb) / 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.sr-empty, .sr-loading {
  padding: 12px 10px;
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--violet-300);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  color: var(--ink);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: background 0.2s, box-shadow 0.2s;
}
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 0 0 1px rgb(var(--a-light-rgb) / 0.6), 0 0 20px rgb(var(--a-rgb) / 0.35);
}

/* ---------- navigation (floating glass pill) ---------- */
.sidebar {
  position: fixed;
  z-index: 40;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 88px;
  padding: 12px 10px;
  border-radius: var(--r-xl);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 4px 10px;
  border-radius: 22px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 600;
  transition: color 0.2s, background 0.25s, box-shadow 0.25s, transform 0.2s;
}
.nav-item:hover { color: var(--ink); background: rgba(255, 255, 255, 0.07); }
.nav-item.is-active {
  color: var(--on-accent);
  background: linear-gradient(140deg, rgb(var(--a-light-rgb) / 0.85), rgb(var(--a-deep-rgb) / 0.75));
  box-shadow: 0 0 30px rgb(var(--a-rgb) / 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

/* ---------- page frame ---------- */
.page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 96px 20px 48px;
}
body.has-sidebar .page { padding-left: 124px; }
.view-head { margin-bottom: 18px; }
.view-head h1 { font-size: 1.6rem; }
.view-head p { color: var(--muted); margin-top: 4px; }

/* ---------- shared components ---------- */
.card { padding: 22px 24px; }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.btn {
  font: 600 0.9rem var(--font-body);
  border: 0;
  border-radius: 999px;
  padding: 11px 22px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s, box-shadow 0.25s, background 0.25s;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  color: var(--on-accent);
  background: linear-gradient(140deg, rgb(var(--a-light-rgb) / 0.95), rgb(var(--a-deep-rgb) / 0.9));
  box-shadow: 0 0 28px rgb(var(--a-rgb) / 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn-primary:hover { box-shadow: 0 0 40px rgb(var(--a-light-rgb) / 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.btn-primary:disabled { opacity: 0.6; cursor: wait; }
.btn-glass {
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  padding: 9px 16px;
}
.btn-glass:hover { background: rgba(255, 255, 255, 0.15); box-shadow: inset 0 0 0 1px rgb(var(--a-light-rgb) / 0.6), 0 0 22px rgb(var(--a-rgb) / 0.35); }
.btn-glass.is-spinning svg { animation: spin 0.8s linear infinite; }

.segmented {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}
.seg {
  position: relative; /* above the gliding pill */
  z-index: 1;
  border: 0;
  border-radius: 999px;
  padding: 6px 14px;
  background: none;
  color: var(--muted);
  font: 600 0.8rem var(--font-body);
  cursor: pointer;
  transition: color 0.25s;
}
.seg:hover { color: #fff; } /* white while hovering, also over the not-yet-selected ones */
.seg.is-active, .seg.is-active:hover { color: var(--on-accent); }
/* The one coloured pill; JS moves it under the selected button. */
.seg-thumb {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  border-radius: 999px;
  pointer-events: none;
  background: linear-gradient(140deg, rgb(var(--a-light-rgb) / 0.9), rgb(var(--a-deep-rgb) / 0.8));
  box-shadow: 0 0 20px rgb(var(--a-rgb) / 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.38s cubic-bezier(0.3, 1.15, 0.5, 1), width 0.38s cubic-bezier(0.3, 1.15, 0.5, 1), height 0.3s;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
  text-decoration: none;
}
.chip b { font-weight: 600; color: var(--muted); }
.chip-link:hover { background: rgb(var(--a-rgb) / 0.3); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
}
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.pill-online { color: var(--win); background: rgba(116, 240, 192, 0.1); box-shadow: inset 0 0 0 1px rgba(116, 240, 192, 0.35); }
.pill-online i { background: var(--win); box-shadow: 0 0 10px var(--win); animation: pulse 2s ease-in-out infinite; }
.pill-offline, .pill-unknown { color: var(--muted); }

/* ---------- login ---------- */
.auth-panel {
  max-width: 440px;
  margin: 8vh auto 0;
  padding: 40px 36px 36px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-radius: var(--r-xl);
}
.auth-title { font-size: 1.6rem; }
.auth-hint { color: var(--muted); margin: 6px 0 20px; font-size: 0.9rem; }
.auth-form { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 0.82rem; color: var(--muted); font-weight: 500; }
.field input {
  font: 500 1rem var(--font-body);
  color: var(--ink);
  background: rgba(0, 0, 0, 0.25);
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  outline: 0;
  transition: box-shadow 0.2s;
}
.field input:focus { box-shadow: inset 0 0 0 1px rgb(var(--a-light-rgb) / 0.8), 0 0 22px rgb(var(--a-rgb) / 0.3); }
.auth-error { color: var(--loss); font-size: 0.88rem; }
.auth-form .btn { justify-content: center; margin-top: 4px; }

/* ---------- player dashboard ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}
.bento > * { animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.bento > *:nth-child(2) { animation-delay: 0.05s; }
.bento > *:nth-child(3) { animation-delay: 0.1s; }
.bento > *:nth-child(4) { animation-delay: 0.14s; }
.bento > *:nth-child(n + 5) { animation-delay: 0.18s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
}
.span-12 { grid-column: span 12; }
.span-8 { grid-column: span 8; }
.span-7 { grid-column: span 7; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }

.hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 26px 28px;
  border-radius: var(--r-xl);
}
.hero-avatar {
  width: 88px;
  height: 88px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  overflow: hidden;
  font: 700 2rem var(--font-display);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 34px rgb(var(--a-rgb) / 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.hero-avatar img { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.hero-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.hero-name { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; }
.hero-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.hero-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

.rank-tag { font: 700 1.05rem var(--font-display); }
.rank-mvpp { color: #ffb020; }
.rank-mvp { color: #5ff0ff; }
.rank-vip { color: #5cf58a; }
.rank-yt, .rank-staff { color: #ff6b6b; }
.rank-none { color: var(--muted); }
.star { font: 700 1.05rem var(--font-display); }
.star-gray { color: #b8b8c4; }
.star-white { color: #fff; }
.star-gold { color: #ffb020; }
.star-aqua { color: #5ff0ff; }
.star-green { color: #5cf58a; }
.star-teal { color: #19c6c6; }
.star-red { color: #ff6b6b; }
.star-pink { color: #ff7bff; }
.star-blue { color: #8b8bff; }
.star-purple { color: #c46bff; }
.star-rainbow {
  background: linear-gradient(90deg, #ff6b6b, #ffb020, #5cf58a, #5ff0ff, #8b8bff, #ff7bff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}
.k3 { grid-column: span 3; }
.k4 { grid-column: span 4; }
.k6 { grid-column: span 6; }
.kpi {
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-radius: var(--r-lg);
  transition: transform 0.25s, box-shadow 0.25s;
}
.kpi:hover { transform: translateY(-3px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 20px 50px -18px rgb(var(--a-rgb) / 0.5); }
.kpi-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.kpi-value { font: 700 1.9rem/1.15 var(--font-display); font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 0.78rem; color: var(--faint); }
.tone-win .kpi-value { color: var(--win); text-shadow: 0 0 24px rgba(116, 240, 192, 0.35); }
.tone-loss .kpi-value { color: var(--loss); text-shadow: 0 0 24px rgba(255, 126, 166, 0.3); }
.tone-accent .kpi-value { color: var(--violet-300); text-shadow: 0 0 24px rgb(var(--a-rgb) / 0.55); }

.ring-wrap { display: grid; place-items: center; margin: 4px 0 10px; }
.ring { overflow: visible; filter: drop-shadow(0 0 14px rgb(var(--a-rgb) / 0.5)); }
.ring-overlay { position: absolute; overflow: visible; pointer-events: none; }
.star-prestige { margin: 0 0 6px; font-weight: 600; }
.ring-main { fill: #fff; font-family: var(--font-display); font-weight: 700; }
.ring-sub { fill: var(--muted); font-family: var(--font-body); font-weight: 500; }
.rings { display: flex; flex-wrap: wrap; justify-content: space-around; gap: 18px; padding: 6px 0; }
.rings figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rings figcaption { color: var(--muted); font-size: 0.85rem; font-weight: 500; }

.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar { display: grid; grid-template-columns: 150px 1fr 72px; align-items: center; gap: 14px; }
.hbar-label { font-weight: 600; font-size: 0.88rem; }
.hbar.is-special .hbar-label { color: var(--muted); font-weight: 500; }
.hbar-value { text-align: right; font: 600 0.9rem var(--font-display); font-variant-numeric: tabular-nums; }
.hbar-track {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.hbar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet-600), var(--violet-300));
  box-shadow: 0 0 16px rgb(var(--a-rgb) / 0.7);
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mode-table { margin-top: 18px; }
.mode-table summary { cursor: pointer; color: var(--violet-300); font-weight: 600; font-size: 0.86rem; width: fit-content; }
.table-wrap { overflow-x: auto; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 0.84rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
th, td { padding: 8px 12px; text-align: right; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
th:first-child, td:first-child { text-align: left; }
thead th { color: var(--muted); font-weight: 600; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; }
tbody tr:hover { background: rgba(255, 255, 255, 0.04); }

.stack { display: flex; height: 16px; border-radius: 999px; overflow: hidden; gap: 2px; box-shadow: 0 0 22px rgb(var(--a-rgb) / 0.25); }
.stack span { display: block; }
.legend-list { list-style: none; margin: 16px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.legend-list li { display: grid; grid-template-columns: 12px 1fr auto 56px; align-items: center; gap: 10px; font-size: 0.88rem; }
.legend-list i { width: 12px; height: 12px; border-radius: 4px; }
.legend-list b { font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.legend-list em { font-style: normal; color: var(--muted); text-align: right; font-size: 0.8rem; }

.game-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.game-list li {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 9px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.86rem;
}
.game-list li.is-bedwars { background: linear-gradient(90deg, rgb(var(--a-rgb) / 0.3), rgb(var(--a-rgb) / 0.06)); box-shadow: inset 0 0 0 1px rgb(var(--a-light-rgb) / 0.3); }
.game-name { font-weight: 600; }
.game-meta { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-time { color: var(--faint); font-size: 0.78rem; white-space: nowrap; }

.guild-name { display: flex; align-items: center; gap: 10px; font: 700 1.25rem var(--font-display); margin-bottom: 14px; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0; }
.facts div { padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); }
.facts dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 600; }
.facts dd { margin: 2px 0 0; font: 600 0.98rem var(--font-display); }

.ach-grid { display: grid; grid-template-columns: 180px 1fr 1fr; gap: 28px; align-items: start; }
.ach-summary { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ach-list, .tier-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ach-list li { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; }
.ach-list em { grid-column: 1; font-style: normal; color: var(--faint); font-size: 0.78rem; }
.ach-list b { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: var(--violet-300); font-family: var(--font-display); }
.ach-list span { font-weight: 600; font-size: 0.88rem; }
.tier-list li { display: flex; flex-direction: column; gap: 5px; }
.tier-top { display: flex; justify-content: space-between; font-size: 0.86rem; font-weight: 600; }
.tier-top b { color: var(--violet-300); font-family: var(--font-display); }
.tier-list .hbar-track { height: 8px; }
.tier-list em { font-style: normal; font-size: 0.76rem; color: var(--faint); }
.empty-card { text-align: center; padding: 40px; }

/* ---------- charts ---------- */
.chart-wrap, .line-chart { position: relative; }
.chart { display: block; width: 100%; height: auto; }
.chart-grid { stroke: rgba(255, 255, 255, 0.08); stroke-width: 1; stroke-dasharray: 2 5; }
.chart-axis-label { fill: var(--faint); font-size: 11px; font-family: var(--font-body); }
.chart-point { fill: rgb(var(--surface-rgb)); stroke: var(--violet-300); stroke-width: 1.5; }
.hover-line { stroke: var(--violet-300); stroke-width: 1.5; opacity: 0.7; }
.hover-dot { fill: #fff; stroke: var(--violet-500); stroke-width: 3; filter: drop-shadow(0 0 8px rgb(var(--a-rgb) / 0.9)); }
.chart-tooltip {
  position: absolute;
  z-index: 5;
  transform: translateX(-50%);
  pointer-events: none;
  padding: 7px 12px;
  border-radius: 14px;
  font-size: 0.8rem;
  line-height: 1.35;
  white-space: nowrap;
  text-align: center;
  background: rgb(var(--surface-rgb) / 0.94);
  box-shadow: inset 0 0 0 1px rgb(var(--a-light-rgb) / 0.5), 0 10px 30px rgba(0, 0, 0, 0.5);
}
.chart-legend { display: flex; gap: 16px; font-size: 0.82rem; color: var(--muted); }
.legend-item { display: flex; align-items: center; gap: 7px; }
.legend-swatch { width: 10px; height: 10px; border-radius: 4px; }
.legend-win { background: var(--violet-400); box-shadow: 0 0 10px var(--violet-500); }
.legend-loss { background: var(--loss); box-shadow: 0 0 10px var(--loss); }
.bar { transition: opacity 0.2s; }

/* ---------- session view ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat-tile { padding: 20px 22px; display: flex; flex-direction: column; gap: 4px; }
.stat-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.stat-value { font: 700 2.3rem/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.stat-win .stat-value { color: var(--violet-300); text-shadow: 0 0 26px rgb(var(--a-rgb) / 0.6); }
.stat-loss .stat-value { color: var(--loss); }
.stat-streak .stat-value.is-loss { color: var(--loss); }
.view > .glass, #dashboard > .glass:not(.stat-tile) { margin-bottom: 16px; }
.recent-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.recent-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.045); }
.recent-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.recent-item.is-win .recent-dot { background: var(--violet-400); box-shadow: 0 0 12px var(--violet-500); }
.recent-item.is-loss .recent-dot { background: var(--loss); box-shadow: 0 0 12px var(--loss); }
.recent-label { font-weight: 600; flex: 1; }
.recent-time, .recent-empty { color: var(--muted); font-size: 0.85rem; }
.empty-state { padding: 40px; text-align: center; max-width: 560px; margin: 6vh auto 0; }
.empty-title { font: 600 1.2rem var(--font-display); margin-bottom: 8px; }
.empty-body { color: var(--muted); }
.settings-stack { display: flex; flex-direction: column; gap: 16px; max-width: 560px; }
.settings-panel { max-width: 560px; }
.theme-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.theme-opt {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 0; border-radius: 16px; cursor: pointer; text-align: left;
  color: var(--ink); font: 600 0.88rem var(--font-body);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.theme-opt:hover { background: rgba(255, 255, 255, 0.1); }
.theme-opt:active { transform: scale(0.98); }
.theme-opt.is-active { background: rgb(var(--a-rgb) / 0.18); box-shadow: inset 0 0 0 1.5px rgb(var(--a-light-rgb) / 0.85), 0 0 22px rgb(var(--a-rgb) / 0.35); }
.theme-swatch { width: 28px; height: 28px; border-radius: 9px; flex: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 0 14px rgba(255, 255, 255, 0.12); }

.link-card {
  display: flex; align-items: center; gap: 14px; padding: 16px 22px;
  border-radius: var(--r-lg); color: var(--ink); text-decoration: none;
  transition: transform 0.25s, box-shadow 0.25s;
}
.link-card:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 20px 50px -18px rgb(var(--a-rgb) / 0.5); }
.link-card-title { font: 700 1.05rem var(--font-display); }
.link-card-sub { color: var(--muted); font-size: 0.86rem; flex: 1; }
.link-card-arrow { color: var(--violet-300); flex: none; }
.hero-name-link { color: inherit; text-decoration: none; border-bottom: 2px dotted rgb(var(--a-light-rgb) / 0.55); transition: color 0.2s, border-color 0.2s; }
.hero-name-link:hover { color: var(--violet-200); border-bottom-color: var(--violet-300); }
.copy-note { font-size: 0.8rem; color: var(--win); background: rgba(116, 240, 192, 0.1); padding: 3px 10px; border-radius: 999px; }
.settings-line { margin-bottom: 8px; }
.settings-note { color: var(--muted); }

/* ---------- states + skeleton ---------- */
.state-card { max-width: 560px; margin: 8vh auto 0; padding: 40px 36px; text-align: center; border-radius: var(--r-xl); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.state-card h1 { font-size: 1.5rem; }
.state-card p { color: var(--muted); }
.state-icon { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font: 700 1.5rem var(--font-display); color: #fff; background: linear-gradient(140deg, rgb(var(--a-light-rgb) / 0.9), rgb(var(--a-deep-rgb) / 0.8)); box-shadow: 0 0 30px rgb(var(--a-rgb) / 0.6); }
.state-actions { margin-top: 8px; }
.sk { border-radius: 12px; background: linear-gradient(100deg, rgba(255, 255, 255, 0.05) 30%, rgba(255, 255, 255, 0.13) 50%, rgba(255, 255, 255, 0.05) 70%) 0 0 / 300% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { to { background-position: -300% 0; } }
.sk-avatar { width: 88px; height: 88px; border-radius: 26px; }
.sk-lines { display: flex; flex-direction: column; gap: 12px; }
.sk-line { height: 14px; } .sk-line.tall { height: 28px; margin-top: 10px; }
.w40 { width: 40%; } .w60 { width: 60%; } .w70 { width: 70%; }
.sk-block { height: 200px; }
.skeleton-card { display: flex; gap: 24px; align-items: center; }
.skeleton-card .sk-block { flex: 1; }
.kpi .sk-line { display: block; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .ach-grid { grid-template-columns: 1fr 1fr; }
  .ach-summary { grid-column: 1 / -1; }
}
@media (max-width: 1000px) {
  .span-8, .span-7, .span-5, .span-4 { grid-column: span 12; }
  .hero { grid-template-columns: auto 1fr; }
  .hero-actions { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
  .k3, .k4, .k6 { grid-column: span 6; }
  .k-last { grid-column: span 12; }
  .live-status span:last-child { display: none; }
}
@media (max-width: 860px) {
  /* nav becomes a floating glass bar at the bottom, like the iOS-style reference */
  .sidebar {
    top: auto;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    flex-direction: row;
    padding: 8px 10px;
    border-radius: 999px;
  }
  .nav-item { padding: 8px 16px 7px; min-width: 76px; border-radius: 999px; }
  body.has-sidebar .page { padding-left: 16px; padding-bottom: 110px; }
  .page { padding: 92px 16px 110px; }
  .search { width: 190px; }
  .search:focus-within { width: 230px; }
  .brand-text { display: none; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hbar { grid-template-columns: 96px 1fr 60px; gap: 10px; }
  .game-list li { grid-template-columns: 1fr auto; }
  .game-meta { grid-column: 1 / -1; grid-row: 2; }
  .ach-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .kpi-value { font-size: 1.5rem; }
  .hero { padding: 20px; gap: 16px; align-items: start; }
  .hero-avatar { width: 64px; height: 64px; border-radius: 20px; }
  .card { padding: 18px; }
  .topbar-right { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* No backdrop-filter support -> stay readable with a more opaque fill. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: linear-gradient(150deg, rgb(var(--a-dark-rgb) / 0.92), rgba(24, 14, 46, 0.95)); }
}

/* ---------- Session: context bar, range chart, game cards ---------- */
.context-bar { display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 14px 22px; margin-bottom: 16px; border-radius: var(--r-lg); }
.ctx-item { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ctx-label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.ctx-value { font: 600 0.98rem var(--font-display); overflow-wrap: anywhere; }
.ctx-item.is-empty .ctx-value { color: var(--faint); font-weight: 500; font-size: 0.86rem; font-family: var(--font-body); }

.chart-panel .card-head { flex-wrap: wrap; gap: 12px; }
.chart-panel .chart-legend { margin: 2px 0 10px; }
.range-line { vector-effect: non-scaling-stroke; }
.range-win { stroke: var(--violet-300); filter: drop-shadow(0 0 6px rgb(var(--a-rgb) / 0.6)); }
.range-loss { stroke: var(--loss); }
.range-dot-win { fill: rgb(var(--surface-rgb)); stroke: var(--violet-300); stroke-width: 1.4; }
.range-dot-loss { fill: rgb(var(--surface-rgb)); stroke: var(--loss); stroke-width: 1.4; }
.hover-dot-win { fill: #fff; stroke: var(--violet-400); stroke-width: 3; filter: drop-shadow(0 0 8px rgb(var(--a-rgb) / 0.9)); }
.hover-dot-loss { fill: #fff; stroke: var(--loss); stroke-width: 3; filter: drop-shadow(0 0 8px rgba(255, 126, 166, 0.8)); }

.game-group { margin-bottom: 16px; }
.group-title { display: flex; align-items: center; gap: 12px; list-style: none; cursor: pointer; user-select: none; font: 700 1.05rem var(--font-display); letter-spacing: 0.02em; color: #fff; margin: 0 0 12px; padding: 12px 18px; border-radius: var(--r-lg); background: var(--glass-fill); border: 1px solid rgba(255, 255, 255, 0.14); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); transition: border-color 0.2s, box-shadow 0.2s; }
.group-title::-webkit-details-marker { display: none; }
.group-title:hover { border-color: rgb(var(--a-light-rgb) / 0.6); box-shadow: 0 0 22px rgb(var(--a-rgb) / 0.3); }
.group-title:focus-visible { outline: 2px solid rgb(var(--a-light-rgb) / 0.7); outline-offset: 2px; }
.group-chevron { width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform 0.2s; flex: none; margin: 0 3px; }
.game-group[open] > .group-title .group-chevron { transform: rotate(45deg); }
.group-meta { margin-left: auto; font: 500 0.82rem var(--font-body, inherit); color: var(--muted); }
.group-meta .w { color: var(--violet-300); }
.group-meta .l { color: var(--loss); }
.game-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.gcard { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; border-radius: var(--r-lg); }
.gcard.is-active { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), 0 0 0 1.5px rgb(var(--a-light-rgb) / 0.7), 0 0 30px rgb(var(--a-rgb) / 0.35); }
.gcard-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gcard-name { font: 700 1.15rem var(--font-display); }
.chip-live { color: var(--win); background: rgba(116, 240, 192, 0.12); }
.gcard-score { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gs { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); }
.gs b { font: 700 1.35rem/1.15 var(--font-display); font-variant-numeric: tabular-nums; }
.gs small { color: var(--faint); font-size: 0.7rem; }
.gs-win b { color: var(--violet-300); }
.gs-loss b { color: var(--loss); }
.gcard-server { margin: 0; font-size: 0.86rem; color: var(--muted); overflow-wrap: anywhere; }
.gcard-opps { display: flex; flex-direction: column; gap: 6px; }
.opp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.opp-list li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); font-size: 0.86rem; }
.opp-name { font-weight: 600; overflow-wrap: anywhere; }
.opp-score { font-variant-numeric: tabular-nums; color: var(--muted); }
.opp-score .w { color: var(--violet-300); }
.opp-score .l { color: var(--loss); }
.recent-detail { color: var(--muted); font-weight: 400; font-size: 0.85rem; margin-left: 6px; }

.gcard-duels { display: flex; flex-direction: column; gap: 6px; }
.duel-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.duel-chip { min-width: 40px; text-align: center; padding: 3px 9px; border-radius: 999px; font: 700 0.8rem var(--font-display); font-variant-numeric: tabular-nums; cursor: default; }
.duel-chip.is-win { color: var(--violet-200); background: rgb(var(--a-rgb) / 0.22); box-shadow: inset 0 0 0 1px rgb(var(--a-light-rgb) / 0.45); }
.duel-chip.is-loss { color: var(--loss); background: rgba(255, 126, 166, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 126, 166, 0.4); }
.recent-score { font: 700 0.85rem var(--font-display); font-variant-numeric: tabular-nums; color: var(--muted); margin-right: 14px; }
.is-win .recent-score { color: var(--violet-300); }
.is-loss .recent-score { color: var(--loss); }

/* ---------- Quoten: mode picker ---------- */
.quota-picker { position: relative; }
.quota-btn { display: inline-flex; align-items: center; gap: 8px; font: 500 0.82rem var(--font-body); color: var(--muted); background: rgba(255, 255, 255, 0.06); border: 1px solid var(--edge); border-radius: 999px; padding: 6px 12px 6px 14px; cursor: pointer; transition: color 0.2s, border-color 0.2s; }
.quota-btn:hover, .quota-btn[aria-expanded="true"] { color: #fff; border-color: rgb(var(--a-light-rgb) / 0.6); }
.quota-chevron { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-1px, -1px); }
.quota-btn[aria-expanded="true"] .quota-chevron { transform: rotate(-135deg) translate(-1px, -1px); }
.quota-menu { position: absolute; z-index: 20; right: 0; top: calc(100% + 8px); min-width: 210px; margin: 0; padding: 6px; list-style: none; border-radius: var(--r-md); background: rgb(var(--surface-rgb) / 0.96); border: 1px solid var(--edge); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.7); }
.quota-opt { display: block; width: 100%; text-align: left; font: 500 0.88rem var(--font-body); color: var(--ink); background: none; border: 0; border-radius: 10px; padding: 9px 12px; cursor: pointer; }
.quota-opt:hover { background: rgba(255, 255, 255, 0.09); }
.quota-opt.is-active { background: rgb(var(--a-rgb) / 0.28); color: #fff; }

/* ---------- multi-user: auth switch, watcher setup, danger zone ---------- */
.auth-switch { margin-top: 14px; text-align: center; font-size: 0.88rem; color: var(--muted); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--violet-300); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: #fff; }
.setup-steps { margin: 8px 0 14px; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; font-size: 0.92rem; }
.setup-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.setup-actions .btn { text-decoration: none; }
.token-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin: 6px 0 10px; }
.token-value { flex: 1 1 200px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 8px 12px; }
.btn-danger { background: rgba(255, 126, 166, 0.16); color: var(--loss); box-shadow: inset 0 0 0 1px rgba(255, 126, 166, 0.45); margin-top: 10px; }
.btn-danger:hover { background: rgba(255, 126, 166, 0.28); }
