/* ============================================================
   SRDELI — Unified Visual System v3.0
   ------------------------------------------------------------
   DESIGN PRINCIPLES
   - True neutral grey: every surface is R=G=B, zero tint
   - No accent color: primary actions use near-white
   - Signal red (#d71920) is reserved EXCLUSIVELY for the
     LIVE indicator — never used elsewhere
   - No bright outlines: elevation via background shade only
   - Hairlines are barely perceptible (6% white)
   - One button system, one input system, one pill system
   - Spacing on a 4px grid, radii on a consistent scale
   ============================================================ */

/* ═══════════════════════════════════════════
   1. DESIGN TOKENS
   ═══════════════════════════════════════════ */
:root {
  color-scheme: dark;

  /* Surfaces — pure neutral grey, R=G=B */
  --bg:           #0e0e0e;
  --bg-elev:      #141414;
  --surface:      #181818;
  --surface-2:    #1d1d1d;
  --surface-3:    #232323;
  --surface-4:    #2a2a2a;
  --surface-5:    #333333;

  /* Hairlines — barely visible */
  --hairline:     rgba(255, 255, 255, 0.06);
  --hairline-2:   rgba(255, 255, 255, 0.10);
  --hairline-3:   rgba(255, 255, 255, 0.14);

  /* Text — neutral */
  --text:         #e8e8e8;
  --text-2:       #a0a0a0;
  --text-3:       #707070;
  --text-4:       #505050;

  /* Accent — near-white for primary actions (no color) */
  --accent:       #e8e8e8;
  --accent-2:     #ffffff;
  --accent-text:  #1a1a1a;
  --accent-soft:  rgba(255, 255, 255, 0.08);
  --accent-line:  rgba(255, 255, 255, 0.15);

  /* Signal red — LIVE indicator ONLY */
  --live:         #d71920;
  --live-soft:    rgba(215, 25, 32, 0.16);

  /* Status — all desaturated, barely tinted */
  --ok:           #7a9a7e;
  --ok-soft:      rgba(122, 154, 126, 0.12);
  --warn:         #b89556;
  --warn-soft:    rgba(184, 149, 86, 0.12);
  --danger:       #c25951;
  --danger-soft:  rgba(194, 89, 81, 0.12);

  /* Channel mode indicators — same grey, label differentiates */
  --mode-password:    #a0a0a0;
  --mode-password-soft: rgba(255, 255, 255, 0.06);
  --mode-whitelist:   #808080;
  --mode-whitelist-soft: rgba(255, 255, 255, 0.04);

  /* Radii */
  --r-xs:   4px;
  --r-sm:   6px;
  --r:      8px;
  --r-lg:   12px;
  --r-pill: 999px;

  /* Shadows — soft, infrequent */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow:    0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.4);

  /* Spacing — 4px grid */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;

  /* Typography */
  --font-ui: "Inter", -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, monospace;

  /* Layout */
  --topbar: 56px;
  --container: 1600px;
  --page-pad: clamp(16px, 4vw, 32px);

  /* Motion */
  --t-fast: 120ms cubic-bezier(.4, 0, .2, 1);
  --t:      200ms cubic-bezier(.4, 0, .2, 1);
  --t-slow: 320ms cubic-bezier(.4, 0, .2, 1);
}

/* ═══════════════════════════════════════════
   2. RESET / BASE
   ═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  min-height: 100%;
  background: var(--bg);
}
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: var(--text); }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
h1 { font-size: clamp(22px, 2.4vw, 28px); }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
h4 { font-size: 12px; color: var(--text-2); }

p { margin: 0; line-height: 1.55; }

img, svg, video { display: block; max-width: 100%; }
svg { fill: currentColor; }

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

::selection { background: rgba(255, 255, 255, 0.15); }

/* Scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--surface-4) transparent;
}
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: var(--r-pill);
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--surface-4);
  background-clip: padding-box;
}

/* ═══════════════════════════════════════════
   3. LAYOUT PRIMITIVES
   ═══════════════════════════════════════════ */
.container,
main.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--sp-5) var(--page-pad) var(--sp-8);
  min-height: calc(100vh - var(--topbar));
}

.muted { color: var(--text-2); }
.warn  { color: var(--warn); }
.ok-text { color: var(--ok); }

.panel {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
}
.panel.narrow {
  max-width: 440px;
  margin: var(--sp-10) auto;
  text-align: center;
  padding: var(--sp-8) var(--sp-6);
}
.panel.narrow h1 {
  font-size: 56px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--sp-2);
  letter-spacing: -0.04em;
}
.panel.narrow .warn {
  color: var(--text-2);
  margin-bottom: var(--sp-5);
  font-size: 14px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 8px 16px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  color: var(--text);
  font-weight: 500;
  font-size: 13px;
  transition: background var(--t-fast);
}
.button-link:hover { background: var(--surface-3); color: var(--text); }

.grid { display: grid; gap: var(--sp-4); }

/* ═══════════════════════════════════════════
   4. BUTTON SYSTEM
   ═══════════════════════════════════════════ */

/* Reset all button variants to clean baseline */
button, input[type="submit"] {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  margin: 0;
  padding: 0;
}

/* Primary — near-white background, dark text */
.auth37-submit,
.auth-modal-form button[type="submit"],
.settings-actions > button:not(.secondary-button):not(.danger-button),
.split-actions > button:not(.secondary-button):not(.danger-button),
.compact-buttons button:not(#stream-reveal):not(.secondary-button),
#mv216-fullscreen.mv216-mainbtn {
  background: var(--accent);
  color: var(--accent-text);
  padding: 8px 16px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.005em;
  transition: background var(--t-fast), transform var(--t-fast);
}
.auth37-submit:hover,
.auth-modal-form button[type="submit"]:hover,
.settings-actions > button:not(.secondary-button):not(.danger-button):hover,
.split-actions > button:not(.secondary-button):not(.danger-button):hover,
#mv216-fullscreen.mv216-mainbtn:hover {
  background: var(--accent-2);
  color: var(--accent-text);
}
.auth37-submit:active { transform: translateY(1px); }

/* Secondary — dark surface */
.secondary-button,
#mv216-clear,
#profile-color-reset,
#stream-reveal,
#stream-copy,
#stream-token-copy,
.mv216-secondary,
.global-search-button,
.icon-nav,
.nav-link,
.nav-text,
.user-menu-panel button,
.auth-modal-close,
.button-link {
  background: var(--surface-2);
  color: var(--text);
  padding: 8px 16px;
  border-radius: var(--r-sm);
  font-weight: 500;
  font-size: 13px;
  transition: background var(--t-fast), color var(--t-fast);
}
.secondary-button:hover,
#mv216-clear:hover,
#profile-color-reset:hover,
#stream-reveal:hover,
#stream-copy:hover,
#stream-token-copy:hover,
.mv216-secondary:hover,
.global-search-button:hover,
.icon-nav:hover,
.nav-link:hover,
.nav-text:hover,
.user-menu-panel button:hover,
.auth-modal-close:hover,
.button-link:hover {
  background: var(--surface-3);
  color: var(--text);
}

/* Danger */
.danger-button {
  background: var(--danger-soft);
  color: var(--danger);
  padding: 8px 16px;
  border-radius: var(--r-sm);
  font-weight: 500;
  font-size: 13px;
  transition: background var(--t-fast);
}
.danger-button:hover { background: rgba(194, 89, 81, 0.20); color: var(--danger); }

/* Icon buttons — square, transparent until hover */
.icon-nav {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-2);
  padding: 0;
  border-radius: var(--r-sm);
}
.icon-nav:hover { background: var(--surface-2); color: var(--text); }
.icon-nav svg { width: 18px; height: 18px; }

/* Plus-submit icon buttons (add to whitelist, add to multiview) */
.srd-plus-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  flex: 0 0 auto;
  background: var(--surface-2);
  color: var(--text-2);
  border-radius: var(--r-sm);
  transition: background var(--t-fast), color var(--t-fast);
}
.srd-plus-submit:hover { background: var(--surface-3); color: var(--text); }
.srd-plus-submit svg { width: 16px; height: 16px; }

/* ═══════════════════════════════════════════
   5. INPUT / FORM SYSTEM
   ═══════════════════════════════════════════ */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="search"],
input[type="url"],
input[type="number"],
input:not([type]),
select,
textarea,
.chan297-secret-input,
.mv216-secret-row input,
#stream-secret-visible,
#profile-color-hex,
#global-streamer-search-input,
#mv216-input,
.control-filter input,
.control-password input,
.whitelist-form input,
.account-shell input[name="title"],
.account-shell select,
.account-shell input[type="password"],
.auth37-form input,
.auth-modal-form input {
  background: var(--surface-2);
  color: var(--text);
  border: 0;
  border-radius: var(--r-sm);
  padding: 9px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 400;
  width: 100%;
  outline: 0;
  transition: background var(--t-fast), box-shadow var(--t-fast);
  -webkit-appearance: none;
  appearance: none;
}
input::placeholder,
textarea::placeholder,
.chan297-secret-input::placeholder,
#mv216-input::placeholder,
#global-streamer-search-input::placeholder {
  color: var(--text-3);
}
input:focus,
select:focus,
textarea:focus,
.chan297-secret-input:focus,
#global-streamer-search-input:focus,
#mv216-input:focus,
.control-filter input:focus,
.control-password input:focus,
.whitelist-form input:focus,
.account-shell input:focus,
.account-shell select:focus,
.auth37-form input:focus,
.auth-modal-form input:focus {
  background: var(--surface-3);
  box-shadow: 0 0 0 1px var(--accent-line);
}
input[type="checkbox"], input[type="radio"] {
  accent-color: var(--accent);
  width: 16px; height: 16px;
  cursor: pointer;
}
input[type="range"] {
  accent-color: var(--accent);
  width: 100%;
  height: 4px;
  cursor: pointer;
}
select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23a0a0a0'><path d='M7 10l5 5 5-5z'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 16px !important;
  padding-right: 36px;
  cursor: pointer;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
}
select::-ms-expand { display: none !important; }
select:hover {
  background-color: var(--surface-3);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e8e8e8'><path d='M7 10l5 5 5-5z'/></svg>") !important;
}
select:focus {
  background-color: var(--surface-3);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e8e8e8'><path d='M7 10l5 5 5-5z'/></svg>") !important;
}

/* Form labels */
.auth37-form label,
.auth-modal-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
  font-weight: 500;
}
.auth37-form label > span,
.auth-modal-form label > span {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
}

/* Form error / notice */
.form-error,
.notice {
  font-size: 13px;
  border-radius: var(--r-sm);
  padding: 8px 12px;
  margin: 0;
}
.form-error:empty { display: none; }
.notice.error,
.form-error:not(:empty) {
  background: var(--danger-soft);
  color: var(--danger);
}
.notice.success {
  background: var(--ok-soft);
  color: var(--ok);
}
.notice { margin-bottom: var(--sp-4); }

/* ═══════════════════════════════════════════
   6. SECRET / PASSWORD FIELDS (shared by account, channel gate, multiview gate)
   ═══════════════════════════════════════════ */

/* Inline secret field — input + toggle button fused */
.secret-inline,
.secret-field,
.secret-inline-tight {
  display: flex;
  align-items: stretch;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  overflow: hidden;
  transition: box-shadow var(--t-fast);
}
.secret-inline:focus-within,
.secret-field:focus-within {
  box-shadow: 0 0 0 1px var(--accent-line);
}
.secret-inline input,
.secret-entry {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0;
  padding: 9px 12px;
  flex: 1;
  min-width: 0;
}
.secret-entry.is-masked {
  -webkit-text-security: disc;
  text-security: disc;
  letter-spacing: 0.08em;
}
.secret-toggle {
  width: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  color: var(--text-3);
  flex: 0 0 auto;
  border-radius: 0;
  padding: 0;
  transition: background var(--t-fast), color var(--t-fast);
}
.secret-toggle:hover {
  background: var(--surface-3) !important;
  color: var(--text);
}
.secret-toggle svg { width: 16px; height: 16px; }

/* Password field wrapper (created by ui.js srdeliInstallPasswordToggles) */
.password-field,
.srd-password-control {
  position: relative;
  display: flex;
  align-items: stretch;
}
.password-field input,
.srd-password-control > input:first-child {
  padding-right: 38px;
}
.password-toggle,
.password-toggle-icon,
.srd-password-eye {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  color: var(--text-3);
  border-radius: var(--r-xs);
  padding: 0;
  transition: background var(--t-fast), color var(--t-fast);
}
.password-toggle:hover,
.srd-password-eye:hover {
  background: var(--surface-3) !important;
  color: var(--text);
}
.password-toggle svg,
.srd-password-eye svg { width: 16px; height: 16px; }

/* ═══════════════════════════════════════════
   7. TOPBAR
   ═══════════════════════════════════════════ */
.topbar,
.shell-topbar,
.topbar-v234 {
  height: var(--topbar);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 0 var(--page-pad);
  background: rgba(14, 14, 14, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}

/* Brand */
.brand-lockup {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--text);
  padding: 4px 8px;
  flex: 0 0 auto;
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast);
}
.brand-lockup:hover {
  color: var(--text);
  background: var(--surface-2);
}

/* Global search — input and button joined with straight edges */
.global-search,
#global-streamer-search {
  flex: 1 1 auto;
  max-width: 420px;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: stretch;
  height: 36px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  transition: background var(--t-fast), box-shadow var(--t-fast);
}
#global-streamer-search:hover { background: var(--surface-3); }
#global-streamer-search:focus-within {
  background: var(--surface-3);
  box-shadow: 0 0 0 1px var(--accent-line);
}
#global-streamer-search-input {
  background: transparent !important;
  padding: 0 0 0 14px !important;
  border-radius: var(--r-sm) 0 0 var(--r-sm) !important;
  font-size: 13px !important;
  height: 36px !important;
  flex: 1;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  color: var(--text) !important;
  min-width: 0;
}
#global-streamer-search-input:focus {
  background: transparent !important;
  box-shadow: none !important;
}
.global-search-button {
  height: 36px;
  width: 44px;
  padding: 0;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: transparent !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  flex: 0 0 44px;
  transition: color var(--t-fast);
  border: 0;
}
.global-search-button:hover { background: transparent !important; color: var(--text); }
.global-search-button svg { width: 16px; height: 16px; }

/* Top nav */
.topnav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}
.nav-link,
.nav-text {
  background: transparent;
  padding: 7px 12px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}
.nav-link:hover,
.nav-text:hover { background: var(--surface-2); color: var(--text); }

/* User menu */
.user-menu { position: relative; display: inline-block; }
.user-menu-trigger {
  width: 36px;
  height: 36px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0;
  transition: background var(--t-fast);
  box-shadow: 0 0 0 3px var(--user-color, var(--text-3));
}
.user-menu-trigger:hover { background: var(--surface-3); }
.user-menu-trigger svg { width: 16px; height: 16px; }

/* User menu panel — rein per CSS am .user-menu (position:relative) verankert.
   Früher setzte JS position:fixed + Koordinaten erst NACH dem Einblenden:
   das unpositionierte Panel verschob dabei kurz den Trigger-Button, die
   Messung lief gegen den verschobenen Button und das Menü landete mitten im
   Header. CSS-Verankerung kann prinzipbedingt nie unpositioniert rendern. */
.user-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 300;
  min-width: 200px;
  max-height: calc(100vh - var(--topbar) - 16px);
  max-height: calc(100svh - var(--topbar) - 16px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--hairline-2);
  border-radius: var(--r);
  padding: 6px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.user-menu-panel[hidden] { display: none; }
.user-menu-panel a,
.user-menu-panel button {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: transparent !important;
  text-align: left;
  width: 100%;
  transition: background var(--t-fast);
}
.user-menu-panel a:hover,
.user-menu-panel button:hover { background: var(--surface-2) !important; }

.user-menu-head,
.user-menu-channel {
  flex-direction: column;
  align-items: flex-start !important;
  gap: 1px !important;
  padding-bottom: 10px !important;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--hairline);
  cursor: pointer;
  position: relative;
}
.user-menu-head strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.user-menu-head span {
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--font-mono);
}
.user-menu-channel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--user-color, var(--text-3));
}
.user-menu-channel { padding-left: 14px !important; position: relative; }

/* ═══════════════════════════════════════════
   8. AUTH MODAL + STANDALONE AUTH PAGES
   ═══════════════════════════════════════════ */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
}
.auth-modal[hidden] { display: none; }
.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
body.auth-modal-open { overflow: hidden; }

.auth-modal-panel,
.auth37-panel {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-lg);
}
.auth-modal-close {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  width: 30px;
  height: 30px;
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  color: var(--text-3);
  font-size: 20px;
  line-height: 1;
  padding: 0 !important;
}
.auth-modal-close:hover { background: var(--surface-2) !important; color: var(--text); }

.auth37-head,
.auth-modal-view .auth37-head { margin-bottom: var(--sp-5); }
.auth37-head h1 {
  font-size: 20px;
  font-weight: 600;
}
.auth37-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.auth37-form button[type="submit"],
.auth37-submit {
  width: 100%;
  margin-top: var(--sp-1);
}
.auth37-foot {
  margin-top: var(--sp-5);
  text-align: center;
  font-size: 13px;
  color: var(--text-2);
}
.auth37-foot button,
.auth37-foot a {
  color: var(--text);
  background: transparent;
  padding: 0 4px;
  font-weight: 600;
  font-size: 13px;
  display: inline;
  text-decoration: underline;
  text-decoration-color: var(--text-3);
  text-underline-offset: 2px;
}
.auth37-foot button:hover,
.auth37-foot a:hover {
  color: var(--text);
  text-decoration-color: var(--text);
}
.auth-modal-view[hidden] { display: none; }
.auth-modal-error { min-height: 16px; }

/* Standalone auth pages */
.auth37-shell {
  min-height: calc(100vh - var(--topbar));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6) var(--page-pad);
}
.auth37-shell .auth37-panel { max-width: 360px; }

/* ═══════════════════════════════════════════
   9. HOME PAGE
   ═══════════════════════════════════════════ */
.home-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
  flex-wrap: wrap;
}
.home-filter-group {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.home-check {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}
.home-check input { display: none; }
.home-check-box {
  width: 18px;
  height: 18px;
  border-radius: var(--r-xs);
  background: var(--surface-2);
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background var(--t-fast);
  flex-shrink: 0;
}
.home-check-box::after {
  content: "";
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e8e8e8' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity var(--t-fast), transform var(--t-fast);
}
.home-check input:checked + .home-check-box {
  background: var(--surface-3);
}
.home-check input:checked + .home-check-box::after {
  opacity: 1;
  transform: scale(1);
}
.home-check:hover .home-check-box { background: var(--surface-3); }

.home-filter-modes {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding-left: var(--sp-4);
  border-left: 1px solid var(--hairline);
}
.home-filter-modes[hidden] { display: none; }

.home-sort-button {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text-2);
  padding: 0;
  transition: background var(--t-fast), color var(--t-fast);
}
.home-sort-button:hover { background: var(--surface-3); color: var(--text); }
.home-sort-button svg { width: 16px; height: 16px; }

/* Stream grid — uses available space, smaller minimum for more columns */
.stream-grid,
[data-home-stream-grid] {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--sp-3);
}
.stream-grid[hidden],
[data-home-stream-grid][hidden] { display: none; }

/* Stream card — elevation only, no bright borders */
.stream-card,
.stream-card-v234 {
  background: var(--surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--t), background var(--t), box-shadow var(--t);
  position: relative;
}
.stream-card:hover {
  transform: translateY(-2px);
  background: var(--surface-2);
  box-shadow: var(--shadow);
}
.stream-card-protected .thumb-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(14, 14, 14, 0.3);
  pointer-events: none;
  z-index: 1;
}
/* Mode variants — imperceptible inset tint, not a bright outline */
.stream-card-password .thumb-wrap { box-shadow: inset 0 0 0 1px var(--mode-password-soft); }
.stream-card-whitelist .thumb-wrap { box-shadow: inset 0 0 0 1px var(--mode-whitelist-soft); }

.thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-elev);
  overflow: hidden;
}
.thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}
.stream-card:hover .thumb { transform: scale(1.03); }

/* LIVE pill — signal red background with white text, no pulsing dot */
.live-pill {
  position: absolute;
  top: var(--sp-2);
  left: var(--sp-2);
  z-index: 2;
  background: var(--live);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 7px;
  border-radius: var(--r-xs);
  text-transform: uppercase;
  line-height: 1;
}

/* Viewer pill — subtle, blends with thumbnail */
.viewer-pill {
  position: absolute;
  bottom: var(--sp-2);
  right: var(--sp-2);
  z-index: 2;
  background: rgba(14, 14, 14, 0.75);
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 7px;
  border-radius: var(--r-xs);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-variant-numeric: tabular-nums;
}

/* Access badges — small, monochrome */
.access-badges-stack {
  position: absolute;
  top: var(--sp-2);
  right: var(--sp-2);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}
.access-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 6px;
  border-radius: var(--r-xs);
  text-transform: uppercase;
  line-height: 1;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(14, 14, 14, 0.75);
  color: var(--text-2);
}

/* Card body */
.card-body {
  padding: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  flex: 1;
}
.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
}
.channel-name,
.username-fixed {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.channel-name:hover { color: var(--text); }
.stream-title {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 36px;
}

/* Multiview add button — its own row in card body, not an overlay */
.mv-add-card {
  align-self: flex-start;
  margin-top: var(--sp-1);
  background: var(--surface-3);
  color: var(--text-2);
  padding: 5px 10px;
  border-radius: var(--r-xs);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background var(--t-fast), color var(--t-fast);
  position: static;
  opacity: 1;
  width: auto;
  height: auto;
}
.mv-add-card::before { display: none; }
.mv-add-card:hover { background: var(--surface-4); color: var(--text); }
.mv-add-card.is-in-multiview,
.mv-add-card[aria-pressed="true"] {
  background: var(--live);
  color: #fff;
}
.mv-add-card.is-in-multiview:hover,
.mv-add-card[aria-pressed="true"]:hover {
  background: #ff2a32;
  color: #fff;
}

/* Empty states */
[data-home-empty],
.home-filter-empty {
  color: var(--text-3);
  font-size: 14px;
  padding: var(--sp-10) var(--sp-4);
  text-align: center;
}
[data-home-empty][hidden],
.home-filter-empty[hidden] { display: none; }
.home-stream-sentinel { height: 1px; }
.home-stream-sentinel[hidden] { display: none; }

/* ═══════════════════════════════════════════
   10. ACCOUNT PAGE
   ═══════════════════════════════════════════ */
.account-shell,
.account-v27 {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  max-width: 880px;
  margin: 0 auto;
}

.account-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--hairline);
  flex-wrap: wrap;
}
.account-hero h1 {
  font-size: 26px;
  font-weight: 600;
}
.account-hero p { color: var(--text-2); font-size: 13px; margin-top: 4px; }

.identity-row { display: flex; align-items: center; gap: var(--sp-4); }

.status-grid,
.mini-status {
  display: flex;
  gap: var(--sp-5);
  flex-wrap: wrap;
}
.status-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.status-cell small {
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.status-cell strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.ok-text { color: var(--ok); }
.account-stream-locked { color: var(--text-3); }

.channel-link-inline,
.username-color-link {
  color: var(--user-color, var(--text));
  font-weight: 600;
  font-size: 14px;
  font-family: var(--font-mono);
}
.channel-link-inline:hover { opacity: 0.75; }

/* Settings board */
.settings-board,
.settings-board-v27 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}
@media (max-width: 760px) {
  .settings-board,
  .settings-board-v27 { grid-template-columns: 1fr; }
}

.settings-card,
.panel.settings-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.span-2 { grid-column: 1 / -1; }

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
}
.section-title-row h2 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* Secret URL box (WHIP URL) */
.secret-url-box {
  background: var(--bg-elev);
  border-radius: var(--r);
  padding: var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.secret-url-box small {
  display: block;
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
  margin-bottom: 4px;
}
.secret-url-mask,
#stream-url-mask {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  word-break: break-all;
  line-height: 1.5;
}
.button-row,
.compact-buttons {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.compact-buttons button { padding: 7px 12px; font-size: 12px; }

/* Settings table */
.settings-table {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.settings-line {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
  align-items: center;
}
.settings-line.onecol { grid-template-columns: 1fr; }
@media (max-width: 540px) {
  .settings-line { grid-template-columns: 1fr; gap: var(--sp-2); }
}
.setting-copy { display: flex; flex-direction: column; gap: 2px; }
.setting-copy strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.setting-copy span {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.4;
}
.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-2);
  margin-top: var(--sp-5);
}
.settings-actions.split-actions,
.split-actions { justify-content: space-between; }

/* Die primäre Action-Zeile sitzt IMMER unten rechts in der Karte: Karten
   einer Grid-Zeile sind gleich hoch (grid stretch), also muss das Formular
   die Karte füllen und die Action-Zeile per margin-top:auto an den Boden —
   sonst hängt der Button der kürzeren Karte auf Inhaltshöhe und die weißen
   Buttons benachbarter Karten liegen nicht auf einer Linie. */
.settings-card > form.settings-table,
.settings-card > form.color-form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
.settings-card > form > .settings-actions {
  margin-top: auto;
  padding-top: var(--sp-5);
}

/* Stream password row — JS toggles display: grid | none inline */
.stream-password-line { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); align-items: center; }
.stream-password-line[style*="display: none"],
.stream-password-line[style*="display:none"] { display: none !important; }

/* Profile color picker */
.integrated-color,
#profile-color-widget {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  background: var(--bg-elev);
  border-radius: var(--r);
  padding: var(--sp-4);
}
.color-readout {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.color-preview,
#profile-color-preview {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--picked-color, var(--text-3));
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.color-hex-input,
#profile-color-hex {
  flex: 1;
  font-family: var(--font-mono);
  text-transform: lowercase;
  letter-spacing: 0.02em;
}
.color-control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--sp-3);
}
@media (max-width: 540px) {
  .color-control-grid { grid-template-columns: 1fr; }
}
.color-control-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.color-swatch {
  width: 24px;
  height: 24px;
  border-radius: var(--r-pill);
  background: var(--swatch);
  padding: 0;
  border: 0;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.color-swatch:hover { transform: scale(1.12); }
.color-swatch.active {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--swatch);
}

/* Whitelist */
.whitelist-form,
.rowform {
  display: flex;
  gap: var(--sp-2);
  align-items: stretch;
}
.whitelist-form input { flex: 1; }
.clean-list,
.compact-list,
.whitelist-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.whitelist-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: 8px 12px;
  background: var(--bg-elev);
  border-radius: var(--r-sm);
  font-size: 13px;
}
.whitelist-list li a {
  font-weight: 500;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
}
.whitelist-list li a:hover { color: var(--text); opacity: 0.75; }
.whitelist-list li form { display: inline; }
.whitelist-list li form button {
  background: transparent !important;
  color: var(--text-3);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: var(--r-xs);
}
.whitelist-list li form button:hover {
  background: var(--surface-3) !important;
  color: var(--danger);
}
.whitelist-list li.muted {
  background: transparent;
  color: var(--text-3);
  font-size: 13px;
  justify-content: center;
  padding: var(--sp-4);
}

.compact-copy,
.compact-password-form { font-size: 13px; }
.compact-copy { color: var(--text-2); line-height: 1.5; }

/* ═══════════════════════════════════════════
   11. CONTROL PANEL (/control)
   Gleiche Formensprache wie /account: Karten-Panels, ruhige Flächen und
   EIN Button-Raster (alle Aktionen exakt gleich groß). Farbe trägt nur
   Bedeutung: weiß = Primäraktion, Rot erscheint erst beim Hover auf
   destruktiven Aktionen (Muster der Whitelist-Entfernen-Buttons).
   ═══════════════════════════════════════════ */
.card-count { font-size: 12px; color: var(--text-3); }
.live-text { color: var(--live); }

.control-filter {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.control-filter input { width: 190px; height: 32px; }
.control-filter select { width: auto; height: 32px; }

.control-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.control-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(150px, 0.9fr) minmax(220px, 1fr) minmax(222px, auto);
  gap: var(--sp-3);
  align-items: center;
  padding: var(--sp-3);
  background: var(--bg-elev);
  border-radius: var(--r-sm);
  font-size: 13px;
}
.control-session-row {
  grid-template-columns: minmax(140px, 1.4fr) minmax(110px, 0.6fr) minmax(170px, 1fr) auto;
}
.control-row-head {
  background: transparent;
  padding: 0 var(--sp-3) var(--sp-2);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--hairline);
  border-radius: 0;
}
.control-user-row.is-banned { opacity: 0.55; }

.control-usercell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.control-userlink {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.control-userlink:hover { opacity: 0.75; }
.control-userlink.user-dot {
  color: var(--user-color, var(--text)) !important;
  position: relative;
  padding-left: 14px;
}
.control-userlink.user-dot::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 7px;
  border-radius: var(--r-pill);
  background: var(--user-color, var(--text-3));
}
.control-usercell small {
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--font-mono);
}
.control-user-row .control-usercell small { padding-left: 14px; }

/* Badges — eine Geometrie, Farben aus den bestehenden Tokens */
.control-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.control-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--r-xs);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
  background: var(--surface-2);
  color: var(--text-3);
}
.control-badge-live { background: var(--live); color: #fff; }
.control-badge-warn { background: var(--warn-soft); color: var(--warn); }
.control-badge-ok { background: rgba(122, 154, 126, 0.16); color: var(--ok); }
.control-badge-danger { background: var(--danger-soft); color: var(--danger); }
.control-badge-accent { background: var(--accent-soft); color: var(--text); }

.control-time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
}

/* EIN Button-Raster: alle Aktionen exakt gleich groß (30px × min. 108px) */
.control-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  min-width: 108px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 500;
  background: var(--surface-2);
  color: var(--text-2);
  white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast);
}
.control-btn:hover { background: var(--surface-3); color: var(--text); }
.control-btn-primary {
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
}
.control-btn-primary:hover { background: var(--accent-2); color: var(--accent-text); }
.control-btn-danger:hover { background: var(--danger-soft); color: var(--danger); }

/* Aktionen als 2-Spalten-Raster: Buttons stehen immer bündig übereinander */
.control-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(108px, 1fr));
  gap: 6px;
  justify-content: end;
}
.control-actions form { display: contents; }
.control-session-row .control-actions { grid-template-columns: minmax(108px, auto); }

.control-password { display: flex; gap: 6px; align-items: center; }
.control-password input {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
  flex: 1 1 auto;
  min-width: 0;
}
.control-password .control-btn { flex: 0 0 auto; }

.control-empty { color: var(--text-3); padding: var(--sp-4); text-align: center; }

@media (max-width: 900px) {
  .control-row,
  .control-session-row { grid-template-columns: 1fr; gap: var(--sp-2); }
  .control-row-head { display: none; }
  .control-actions { justify-content: start; }
}


/* ═══════════════════════════════════════════
   12. TOAST
   ═══════════════════════════════════════════ */
.toast-stack {
  position: fixed;
  bottom: var(--sp-5);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2147483647;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  pointer-events: none;
  align-items: center;
}
.toast {
  background: var(--surface-3);
  color: var(--text);
  padding: 10px 16px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow);
  pointer-events: auto;
  transition: opacity var(--t), transform var(--t);
  max-width: 360px;
  text-align: center;
}

/* ═══════════════════════════════════════════
   13. USER SUGGEST AUTOCOMPLETE
   ═══════════════════════════════════════════ */
.user-suggest-wrap { position: relative; }
.sr-autocomplete-decoy { display: none !important; }

.user-suggest-box,
.mv216-suggest {
  position: absolute;
  z-index: 220;
  background: var(--surface);
  border: 1px solid var(--hairline-2);
  border-radius: var(--r);
  padding: 4px;
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.user-suggest-box[hidden],
.mv216-suggest[hidden] { display: none; }

.suggest-item,
.mv216-suggest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: transparent !important;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  width: 100%;
  text-align: left;
  border: 0;
  transition: background var(--t-fast);
}
.suggest-item:hover,
.suggest-item.active,
.mv216-suggest-item:hover,
.mv216-suggest-item.active {
  background: var(--surface-2) !important;
}
.user-history-item {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 0 !important;
}
.user-history-item .history-pick {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 8px 10px;
  background: transparent !important;
  font-size: 13px;
  color: var(--text);
  border-radius: var(--r-sm);
  text-align: left;
}
.user-history-item .history-pick:hover { background: var(--surface-2) !important; }
.user-history-item .history-delete {
  padding: 6px 8px;
  background: transparent !important;
  color: var(--text-3);
  font-size: 11px;
  border-radius: var(--r-xs);
}
.user-history-item .history-delete:hover {
  background: var(--surface-3) !important;
  color: var(--danger);
}

.suggest-name { font-weight: 500; }
.suggest-meta {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: var(--r-xs);
}
.suggest-meta.is-live {
  background: var(--live);
  color: #fff;
}
.suggest-meta.is-empty { display: none; }

/* ═══════════════════════════════════════════
   14. RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 720px) {
  :root { --topbar: 52px; }
  .topbar, .shell-topbar, .topbar-v234 { gap: var(--sp-2); padding: 0 var(--sp-3); }
  .global-search, #global-streamer-search { max-width: none; }
  .nav-link, .nav-text { padding: 6px 8px; font-size: 12px; }
  .brand-lockup { font-size: 13px; }
  .stream-grid, [data-home-stream-grid] { grid-template-columns: 1fr; }
  .account-hero { flex-direction: column; align-items: flex-start; }
  .status-grid, .mini-status { gap: var(--sp-3); }
  .home-controls { flex-direction: column; align-items: stretch; }
  .home-filter-modes { padding-left: 0; border-left: 0; }
}

/* ═══════════════════════════════════════════
   15. UTILITIES
   ═══════════════════════════════════════════ */
[hidden] { display: none !important; }
