/* ════════════════════════════════════════════════════════════════════
   LOABI TTS — Black glassmorphism + hot pink accents
   ════════════════════════════════════════════════════════════════════ */

:root {
  /* signature accent: hot pink */
  --pink: #ff2d87;
  --pink-soft: #ff6aa8;
  --pink-deep: #c4005a;
  --pink-glow: rgba(255, 45, 135, 0.55);
  --pink-glow-soft: rgba(255, 45, 135, 0.18);

  /* supporting accents (used very sparingly) */
  --violet: #b34dff;
  --cyan: #4dd0ff;

  /* surfaces — deep black glass */
  --bg-0: #000000;
  --bg-1: #050506;
  --bg-2: #0a0a0c;
  --glass-bg: rgba(255, 255, 255, 0.025);
  --glass-bg-strong: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-border-strong: rgba(255, 45, 135, 0.45);

  /* text */
  --text-hi: #fafafa;
  --text-mid: #9a9aa3;
  --text-lo: #5a5a64;

  /* glow */
  --glow-pink: rgba(255, 45, 135, 0.45);
}

* {
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #000;
  color: var(--text-hi);
  font-family: 'Space Mono', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── animated background ── */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 45, 135, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 45, 135, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, black 30%, transparent 75%);
}

.bg-noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  /* film grain — inline SVG turbulence (crisp, self-contained, no binary) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 140px 140px;
  background-repeat: repeat;
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  z-index: 0;
  pointer-events: none;
}
.orb-1 {
  width: 540px; height: 540px;
  top: -180px; left: -140px;
  background: radial-gradient(circle, var(--pink), transparent 70%);
  opacity: 0.35;
  animation: float-a 20s ease-in-out infinite;
}
.orb-2 {
  width: 480px; height: 480px;
  top: 40%; right: -160px;
  background: radial-gradient(circle, var(--violet), transparent 70%);
  opacity: 0.22;
  animation: float-b 24s ease-in-out infinite;
}
.orb-3 {
  width: 600px; height: 600px;
  bottom: -260px; left: 30%;
  background: radial-gradient(circle, var(--pink-soft), transparent 70%);
  opacity: 0.2;
  animation: float-a 28s ease-in-out infinite reverse;
}

@keyframes float-a {
  0%, 100% { transform: translate(0,0); }
  50% { transform: translate(60px, 40px); }
}
@keyframes float-b {
  0%, 100% { transform: translate(0,0); }
  50% { transform: translate(-50px, 30px); }
}

/* ── glass primitives ── */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border-radius: 24px;
  position: relative;
  transition: border-color 250ms ease, background 250ms ease;
}
.glass:hover {
  border-color: rgba(255, 255, 255, 0.1);
}
.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent 35%, transparent 65%, rgba(255,45,135,0.22));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.glass-accent { border-color: var(--glass-border-strong); }

.glow-pink { text-shadow: 0 0 24px var(--pink-glow); }

.gradient-text {
  background: linear-gradient(110deg, #fff 0%, var(--pink) 60%, var(--pink-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.gradient-text-reverse {
  background: linear-gradient(110deg, var(--pink), var(--pink-soft));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── buttons ── */
.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 24px;
  border-radius: 16px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: #fff;
  background: var(--pink);
  border: none;
  cursor: pointer;
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 200ms ease, background 200ms ease;
  box-shadow: 0 0 0 1px rgba(255,45,135,0.6), 0 8px 32px -8px var(--pink-glow), inset 0 1px 0 rgba(255,255,255,0.18);
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.2), transparent 50%);
  pointer-events: none;
}
.btn-primary:hover {
  transform: translateY(-2px);
  background: #ff3d92;
  box-shadow: 0 0 0 1px rgba(255,45,135,0.9), 0 16px 44px -8px var(--pink-glow), inset 0 1px 0 rgba(255,255,255,0.22);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 0 0 1px rgba(120,120,140,0.2);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 14px;
  font-weight: 500;
  font-size: 14px;
  color: var(--text-mid);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all 200ms ease;
}
.btn-ghost:hover {
  background: rgba(255,45,135,0.08);
  border-color: rgba(255,45,135,0.4);
  color: var(--text-hi);
}

.btn-icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
  color: var(--text-mid);
  cursor: pointer;
  transition: all 200ms ease;
}
.btn-icon:hover {
  background: rgba(255,45,135,0.1);
  border-color: rgba(255,45,135,0.4);
  color: var(--pink-soft);
}

/* ── mode tabs ── */
.mode-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 14px;
  border-radius: 14px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-lo);
  cursor: pointer;
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  position: relative;
}
.mode-tab:hover {
  background: rgba(255,255,255,0.03);
  color: var(--text-mid);
}
.mode-tab.active {
  background: linear-gradient(135deg, rgba(255,45,135,0.16), rgba(179,77,255,0.08));
  border-color: rgba(255,45,135,0.45);
  color: var(--text-hi);
  box-shadow: 0 0 32px -8px rgba(255,45,135,0.4), inset 0 0 24px rgba(255,45,135,0.06);
}
.mode-tab .mt-title {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
}
.mode-tab .mt-desc { font-size: 11px; opacity: 0.65; }

/* ── textarea / input ── */
.field {
  width: 100%;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 16px 18px;
  color: var(--text-hi);
  font-size: 16px;
  font-family: 'Space Mono', system-ui, sans-serif;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
}
.field::placeholder { color: var(--text-lo); }
.field:focus {
  border-color: rgba(255,45,135,0.55);
  background: rgba(0,0,0,0.6);
  box-shadow: 0 0 0 3px rgba(255,45,135,0.12);
}

/* ── range slider ── */
.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pink), rgba(255,255,255,0.08));
  outline: none;
  cursor: pointer;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 0;
  box-shadow: 0 0 0 3px var(--pink), 0 0 16px var(--pink-glow);
  transition: transform 150ms ease;
}
.range::-webkit-slider-thumb:hover { transform: scale(1.18); }
.range::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--pink);
  box-shadow: 0 0 16px var(--pink-glow);
  cursor: pointer;
}

/* ── chips ── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-mid);
  cursor: pointer;
  transition: all 200ms ease;
  white-space: nowrap;
  letter-spacing: -0.005em;
}
.chip:hover {
  background: rgba(255,45,135,0.1);
  border-color: rgba(255,45,135,0.4);
  color: var(--text-hi);
  transform: translateY(-1px);
}
.chip.active {
  background: linear-gradient(135deg, rgba(255,45,135,0.25), rgba(179,77,255,0.15));
  border-color: var(--pink);
  color: #fff;
  box-shadow: 0 0 18px rgba(255,45,135,0.3);
}

/* ── status pill ── */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid;
  backdrop-filter: blur(20px);
}
.status-pill .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
}
.status-online { background: rgba(0,255,135,0.08); color: #5cff9d; border-color: rgba(0,255,135,0.3); }
.status-online .dot { background: #00ff88; box-shadow: 0 0 8px #00ff88; animation: pulse-dot 2s ease-in-out infinite; }
.status-offline { background: rgba(255,45,135,0.08); color: var(--pink-soft); border-color: rgba(255,45,135,0.3); }
.status-offline .dot { background: var(--pink); box-shadow: 0 0 8px var(--pink); }
.status-checking { background: rgba(255,200,0,0.08); color: #ffd24a; border-color: rgba(255,200,0,0.3); }
.status-checking .dot { background: #ffc800; animation: pulse-dot 1s ease-in-out infinite; }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* ── history item ── */
.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all 200ms ease;
}
.history-item:hover {
  background: rgba(255,45,135,0.06);
  border-color: rgba(255,45,135,0.3);
  transform: translateX(3px);
}
.history-item .h-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-mid);
  font-size: 13px;
}

/* ── waveform bars ── */
.waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 32px;
}
.waveform .bar {
  width: 3px;
  background: linear-gradient(var(--pink), var(--violet));
  border-radius: 2px;
  box-shadow: 0 0 6px var(--pink-glow-soft);
  animation: wave 1s ease-in-out infinite;
}
@keyframes wave {
  0%, 100% { height: 20%; }
  50% { height: 100%; }
}

/* ── generate button loading ── */
.gen-loading .gen-label { opacity: 0; }
.gen-loading::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── scrollbars ── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,45,135,0.4); background-clip: padding-box; }

/* ── toast ── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 22px;
  border-radius: 14px;
  background: rgba(15,15,18,0.95);
  border: 1px solid rgba(255,45,135,0.4);
  backdrop-filter: blur(20px);
  color: var(--text-hi);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 30px -8px var(--pink-glow);
  opacity: 0;
  pointer-events: none;
  transition: all 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 100;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── reveal on scroll ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1), transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── file drop zone ── */
.dropzone {
  border: 1.5px dashed var(--glass-border);
  border-radius: 18px;
  padding: 32px;
  text-align: center;
  transition: all 250ms ease;
  cursor: pointer;
  background: rgba(255,255,255,0.01);
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--pink);
  background: rgba(255,45,135,0.04);
  box-shadow: inset 0 0 40px rgba(255,45,135,0.06);
}

/* ── player ── */
.player {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--glass-border);
}
.play-btn {
  flex-shrink: 0;
  width: 52px; height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--pink);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 24px var(--pink-glow), inset 0 1px 0 rgba(255,255,255,0.2);
}
.play-btn:hover { transform: scale(1.08); background: #ff3d92; }
.play-btn:disabled {
  background: rgba(255,255,255,0.06);
  color: var(--text-lo);
  box-shadow: none;
  cursor: not-allowed;
}
.progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
  cursor: pointer;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--pink), var(--pink-soft));
  border-radius: 999px;
  box-shadow: 0 0 12px var(--pink-glow);
  transition: width 100ms linear;
}

/* ── helper layout ── */
.container-x { max-width: 1200px; margin-inline: auto; padding-inline: 24px; }

@media (max-width: 640px) {
  .container-x { padding-inline: 16px; }
}

/* ── nav link ── */
.nav-link {
  position: relative;
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--text-mid);
  font-size: 14px;
  font-weight: 500;
  transition: all 200ms ease;
}
.nav-link:hover {
  color: var(--text-hi);
  background: rgba(255,255,255,0.04);
}

/* ── code block ── */
.code-block {
  font-family: 'Space Mono', ui-monospace, monospace;
  background: #000;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 20px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-mid);
  overflow-x: auto;
}
.code-block .kw { color: var(--violet); }
.code-block .str { color: #b6ff3c; }
.code-block .key { color: var(--pink-soft); }
.code-block .num { color: var(--pink); }
.code-block .com { color: var(--text-lo); font-style: italic; }

/* ── lang card (voices section) ── */
.lang-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--glass-border);
  font-size: 13px;
  color: var(--text-mid);
  transition: all 200ms ease;
}
.lang-card:hover {
  border-color: rgba(255,45,135,0.4);
  color: var(--text-hi);
  transform: translateY(-2px);
  background: rgba(255,45,135,0.05);
}

/* ── voice preset card ── */
.voice-preset {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all 220ms ease;
  text-align: left;
  font-family: inherit;
  color: inherit;
  width: 100%;
}
.voice-preset:hover {
  background: rgba(255,45,135,0.06);
  border-color: rgba(255,45,135,0.4);
  transform: translateY(-2px);
}
.voice-preset.active {
  background: linear-gradient(135deg, rgba(255,45,135,0.18), rgba(179,77,255,0.08));
  border-color: var(--pink);
  box-shadow: 0 0 24px -6px rgba(255,45,135,0.4);
}
.voice-preset .vp-avatar {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
}
.voice-preset .vp-body { flex: 1; min-width: 0; }
.voice-preset .vp-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-hi);
  letter-spacing: -0.01em;
}
.voice-preset .vp-desc {
  font-size: 11.5px;
  color: var(--text-lo);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ════════════════════════════════════════════════════════════════════
   Dhivehi (Thaana) — Noto Sans Thaana, ONLY for Thaana glyphs
   Latin font stays first in every stack; Thaana glyphs (which the Latin
   font lacks) fall through to Noto Sans Thaana. Latin text is untouched.
   ════════════════════════════════════════════════════════════════════ */
/* Self-hosted + unicode-range locked to Thaana → the browser is FORCED to use
   this font for Dhivehi glyphs (no system-font substitution), and never for
   Latin (out of range), so it can sit first in every stack safely. */
@font-face {
  font-family: 'AK Rasmee';
  src: url('./ak-rasmee.ttf') format('truetype');
  font-weight: normal;
  font-display: swap;
  unicode-range: U+0780-U+07BF, U+060C, U+061B, U+061F, U+FDF2, U+FDFD;
}
@font-face {
  font-family: 'AK Rasmee';
  src: url('./ak-rasmee.ttf') format('truetype');
  font-weight: bold;
  font-display: swap;
  unicode-range: U+0780-U+07BF, U+060C, U+061B, U+061F, U+FDF2, U+FDFD;
}

body,
.field,
input,
textarea,
button {
  font-family: 'Space Mono', 'AK Rasmee', system-ui, -apple-system, sans-serif;
}
.code-block, [class*="font-mono"] {
  font-family: 'Space Mono', 'AK Rasmee', ui-monospace, monospace !important;
}
/* Dhivehi-containing elements (textarea, output titles) — RTL + hybrid font:
   Space Mono renders Latin, AK Rasmee (unicode-range) renders the Thaana. */
.thaana {
  font-family: 'Space Mono', 'AK Rasmee', system-ui, sans-serif;
  direction: rtl;
  line-height: 2.0;
}
textarea.thaana { text-align: right; }

/* ── design attribute groups (select-only, cannot be wrong) ── */
.dgroup { margin-bottom: 16px; }
.dgroup:last-child { margin-bottom: 0; }
.dgroup-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-lo);
  margin-bottom: 10px;
}
.dgroup-chips { display: flex; flex-wrap: wrap; gap: 8px; }
/* reuses .chip; .chip.active already styled */

/* ════════════════════════════════════════════════════════════════════
   Desktop scale — dial the whole UI up ~125% on larger screens
   ════════════════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {
  header, main { zoom: 1.25; }
}
/* mild bump on mid screens so the jump isn't abrupt */
@media (min-width: 768px) and (max-width: 1023px) {
  header, main { zoom: 1.12; }
}

/* ════════════════════════════════════════════════════════════════════
   Self-hosted Latin fonts (no Google dependency — survives Firefox
   tracking-protection / extensions blocking fonts.gstatic.com)
   ════════════════════════════════════════════════════════════════════ */
@font-face { font-family:'Space Mono'; src:url('./spacemono-400.ttf') format('truetype'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:'Space Mono'; src:url('./spacemono-700.ttf') format('truetype'); font-weight:700; font-style:normal; font-display:swap; }
@font-face { font-family:'Space Mono'; src:url('./spacemono-400-italic.ttf') format('truetype'); font-weight:400; font-style:italic; font-display:swap; }
@font-face { font-family:'Space Mono'; src:url('./spacemono-700-italic.ttf') format('truetype'); font-weight:700; font-style:italic; font-display:swap; }
@font-face { font-family:'Instrument Serif'; src:url('./instrumentserif-400.ttf') format('truetype'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:'Instrument Serif'; src:url('./instrumentserif-400-italic.ttf') format('truetype'); font-weight:400; font-style:italic; font-display:swap; }

/* textarea text matches the char-count line (text-xs) */
#text-input { font-size: 0.75rem; }

/* tab badges */
.badge {
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 2px 6px; border-radius: 999px; margin-left: 7px; line-height: 1;
  display: inline-block; vertical-align: middle; white-space: nowrap;
}
.badge-beta { background: var(--pink); color: #fff; }
.badge-soon { background: rgba(255,255,255,0.06); color: var(--text-lo); border: 1px solid var(--glass-border); }
.mode-tab:disabled { opacity: .5; cursor: not-allowed; }
.mode-tab:disabled:hover { background: transparent; color: var(--text-lo); }

/* ── hot-pink beams (GPU transform only — very low power) ── */
.beam {
  position: fixed;
  left: 0;
  height: 3px;
  width: 38%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--pink) 45%, var(--pink-soft) 55%, transparent);
  filter: blur(6px);
  opacity: .6;
  will-change: transform;
  transform: translateX(-70%);
}
.beam-1 { top: 24%; animation: beam-sweep 13s ease-in-out infinite; }
.beam-2 { top: 62%; width: 28%; opacity: .3; animation: beam-sweep 17s ease-in-out infinite reverse; }
.beam-3 { top: 84%; width: 22%; opacity: .25; animation: beam-sweep 21s ease-in-out infinite; }
@keyframes beam-sweep {
  0%   { transform: translateX(-70%); }
  50%  { transform: translateX(300%); }
  100% { transform: translateX(-70%); }
}
@media (prefers-reduced-motion: reduce) { .beam { animation: none; opacity: .18; } }

/* badges on mobile: hide the long "Coming soon" (breaks the tab row),
   keep a compact Beta. Clone stays greyed/disabled to signal unavailable. */
@media (max-width: 640px) {
  .badge { margin-left: 5px; }
  .badge-beta { font-size: 8px; padding: 2px 5px; }
  .badge-soon { display: none; }
  .mode-tab { padding: 10px 8px; }
  .mode-tab .mt-title { font-size: 13px; }
}

/* ── offline takeover ── */
#offline-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  /* animated bg (grid/orbs/beams) stays visible behind */
}
body.offline #offline-screen { display: flex; }
body.offline header,
body.offline main { display: none; }
