/* =======================================================
   Stream Companion — Base
   ======================================================= */

:root {
  color-scheme: dark;

  --surface-page: #17131f;
  --surface-page-glow: rgba(122, 92, 255, 0.16);
  --surface-panel: rgba(39, 35, 59, 0.96);
  --surface-panel-soft: rgba(31, 28, 47, 0.94);
  --surface-card: rgba(17, 15, 27, 0.72);
  --surface-input: rgba(14, 12, 23, 0.88);
  --surface-popover: rgba(24, 21, 39, 0.98);
  --surface-video: #0c0a12;
  --surface-overlay: rgba(8, 6, 16, 0.76);

  --border-muted: rgba(122, 92, 255, 0.28);
  --border-strong: rgba(122, 92, 255, 0.52);
  --border-subtle: rgba(255, 255, 255, 0.06);

  --text-primary: #f5f3ff;
  --text-secondary: #b8b2ca;
  --text-muted: #8d879d;
  --text-inverse: #17131f;

  --accent-bg: #7a5cff;
  --accent-bg-hover: #8d75ff;
  --accent-text: #f5f3ff;
  --accent-border: rgba(122, 92, 255, 0.52);
  --accent-soft: rgba(122, 92, 255, 0.18);
  --accent-selected-bg: rgba(122, 92, 255, 0.22);
  --focus-ring: rgba(122, 92, 255, 0.14);

  --status-live-bg: #ff4c62;
  --status-live-text: #ffb4c1;
  --status-live-border: rgba(255, 76, 98, 0.42);
  --status-live-ring: rgba(255, 76, 98, 0.72);
  --status-success-bg: #52d273;
  --status-success-text: #6adf8d;
  --status-success-border: rgba(82, 210, 115, 0.42);
  --status-success-ring: rgba(82, 210, 115, 0.66);
  --status-warning-bg: rgba(255, 208, 116, 0.1);
  --status-warning-text: #ffe0a3;
  --status-warning-border: rgba(255, 208, 116, 0.34);
  --status-danger-bg: rgba(255, 125, 125, 0.12);
  --status-danger-text: #ff7d7d;
  --status-danger-border: rgba(255, 125, 125, 0.44);

  --zap-accent: var(--status-warning-text);
  --zap-bg: var(--status-warning-bg);
  --zap-border: var(--status-warning-border);
  --zap-text: #ffe7a8;

  --ticker-bg:
    linear-gradient(
      90deg,
      rgba(255, 208, 116, 0.12),
      rgba(122, 92, 255, 0.12)
    ),
    var(--surface-panel-soft);
  --ticker-text: var(--text-primary);
  --ticker-badge-bg: var(--status-warning-bg);
  --ticker-badge-text: var(--status-warning-text);
  --ticker-border: var(--border-muted);

  --creator-card-bg:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.052),
      rgba(255, 255, 255, 0.026)
    ),
    var(--surface-panel-soft);
  --creator-card-border: var(--border-muted);
  --logo-frame-bg:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.075),
      rgba(255, 255, 255, 0.018)
    );
  --logo-frame-border: rgba(188, 138, 255, 0.22);
  --logo-widget-bg:
    radial-gradient(
      circle at 18% 12%,
      rgba(188, 138, 255, 0.16),
      transparent 34%
    ),
    #12101a;

  --link-chip-bg: rgba(255, 255, 255, 0.04);
  --link-chip-border: var(--border-muted);
  --link-chip-text: var(--text-primary);
  --link-chip-hover-bg: var(--accent-soft);

  --identity-ring-ready: var(--status-success-bg);
  --identity-ring-available: rgba(82, 210, 115, 0.42);
  --avatar-fallback-bg:
    linear-gradient(
      135deg,
      rgba(122, 92, 255, 0.85),
      rgba(68, 45, 169, 0.92)
    );

  --page-bg: var(--surface-page);
  --panel-bg: var(--surface-panel);
  --panel-bg-soft: var(--surface-panel-soft);
  --border: var(--border-muted);
  --text: var(--text-primary);
  --text-soft: var(--text-secondary);
  --accent: var(--accent-bg);
  --accent-hover: var(--accent-bg-hover);
  --live: var(--status-live-bg);
  --success: var(--status-success-bg);

  --jorstr-header-border: var(--border-muted);
  --jorstr-header-border-strong: var(--border-strong);
  --jorstr-header-control-bg: var(--surface-panel-soft);
  --jorstr-header-control-hover-bg: var(--surface-panel);
  --jorstr-header-tooltip-bg: var(--surface-popover);
  --jorstr-header-text: var(--text-primary);
  --jorstr-header-avatar-bg: var(--accent-soft);
  --jorstr-header-avatar-text: var(--text-primary);
  --jorstr-header-success: var(--identity-ring-ready);
  --jorstr-header-success-soft: var(--identity-ring-available);

  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

html[data-jorstr-theme="jorstr"] {
  color-scheme: dark;
}

html[data-jorstr-theme="midnight"] {
  --surface-page: #070b16;
  --surface-page-glow: rgba(80, 140, 255, 0.13);
  --surface-panel: rgba(13, 20, 36, 0.97);
  --surface-panel-soft: rgba(10, 16, 30, 0.95);
  --surface-card: rgba(6, 11, 22, 0.78);
  --surface-input: rgba(5, 9, 18, 0.9);
  --surface-popover: rgba(9, 14, 28, 0.98);
  --surface-video: #040711;
  --surface-overlay: rgba(3, 6, 13, 0.78);
  --border-muted: rgba(89, 136, 220, 0.3);
  --border-strong: rgba(111, 159, 255, 0.58);
  --text-primary: #edf4ff;
  --text-secondary: #b3c1d8;
  --text-muted: #7e8ba4;
  --accent-bg: #4f8cff;
  --accent-bg-hover: #79a7ff;
  --accent-border: rgba(79, 140, 255, 0.58);
  --accent-soft: rgba(79, 140, 255, 0.18);
  --accent-selected-bg: rgba(79, 140, 255, 0.24);
  --focus-ring: rgba(79, 140, 255, 0.2);
  --ticker-bg:
    linear-gradient(90deg, rgba(79, 140, 255, 0.12), rgba(120, 190, 255, 0.1)),
    var(--surface-panel-soft);
  --logo-widget-bg:
    radial-gradient(circle at 18% 12%, rgba(96, 150, 255, 0.18), transparent 34%),
    #071020;
  --avatar-fallback-bg:
    linear-gradient(135deg, #4f8cff, #1e345c);
}

html[data-jorstr-theme="ocean"] {
  --surface-page: #061922;
  --surface-page-glow: rgba(35, 214, 200, 0.14);
  --surface-panel: rgba(8, 39, 54, 0.96);
  --surface-panel-soft: rgba(5, 31, 44, 0.95);
  --surface-card: rgba(4, 26, 38, 0.78);
  --surface-input: rgba(3, 22, 32, 0.9);
  --surface-popover: rgba(5, 31, 44, 0.98);
  --surface-video: #03131b;
  --surface-overlay: rgba(2, 12, 18, 0.78);
  --border-muted: rgba(35, 214, 200, 0.26);
  --border-strong: rgba(62, 232, 220, 0.55);
  --text-primary: #ecffff;
  --text-secondary: #a8d5d8;
  --text-muted: #73a6ad;
  --accent-bg: #23d6c8;
  --accent-bg-hover: #60efe4;
  --accent-text: #042227;
  --accent-border: rgba(35, 214, 200, 0.56);
  --accent-soft: rgba(35, 214, 200, 0.16);
  --accent-selected-bg: rgba(35, 214, 200, 0.22);
  --focus-ring: rgba(35, 214, 200, 0.2);
  --ticker-bg:
    linear-gradient(90deg, rgba(35, 214, 200, 0.14), rgba(62, 145, 255, 0.1)),
    var(--surface-panel-soft);
  --logo-widget-bg:
    radial-gradient(circle at 18% 12%, rgba(35, 214, 200, 0.16), transparent 34%),
    #041c28;
  --avatar-fallback-bg:
    linear-gradient(135deg, #23d6c8, #0b4c5c);
}

html[data-jorstr-theme="bitcoin"] {
  --surface-page: #15120d;
  --surface-page-glow: rgba(247, 147, 26, 0.14);
  --surface-panel: rgba(36, 30, 21, 0.96);
  --surface-panel-soft: rgba(28, 24, 18, 0.95);
  --surface-card: rgba(22, 18, 13, 0.8);
  --surface-input: rgba(16, 13, 9, 0.9);
  --surface-popover: rgba(29, 24, 17, 0.98);
  --surface-video: #0e0b08;
  --surface-overlay: rgba(8, 6, 4, 0.78);
  --border-muted: rgba(247, 147, 26, 0.28);
  --border-strong: rgba(255, 176, 65, 0.58);
  --text-primary: #fff6e8;
  --text-secondary: #d7c5a8;
  --text-muted: #a99271;
  --accent-bg: #f7931a;
  --accent-bg-hover: #ffb347;
  --accent-text: #1a1003;
  --accent-border: rgba(247, 147, 26, 0.58);
  --accent-soft: rgba(247, 147, 26, 0.18);
  --accent-selected-bg: rgba(247, 147, 26, 0.24);
  --focus-ring: rgba(247, 147, 26, 0.2);
  --zap-accent: #ffbd5a;
  --zap-bg: rgba(247, 147, 26, 0.12);
  --zap-border: rgba(247, 147, 26, 0.38);
  --zap-text: #ffd89a;
  --ticker-bg:
    linear-gradient(90deg, rgba(247, 147, 26, 0.16), rgba(255, 219, 128, 0.08)),
    var(--surface-panel-soft);
  --logo-widget-bg:
    radial-gradient(circle at 18% 12%, rgba(247, 147, 26, 0.18), transparent 34%),
    #19130b;
  --avatar-fallback-bg:
    linear-gradient(135deg, #f7931a, #5f3608);
}

html[data-jorstr-theme="forest"] {
  --surface-page: #0d1b14;
  --surface-page-glow: rgba(101, 196, 102, 0.13);
  --surface-panel: rgba(18, 39, 29, 0.96);
  --surface-panel-soft: rgba(13, 32, 23, 0.95);
  --surface-card: rgba(8, 27, 18, 0.8);
  --surface-input: rgba(7, 22, 15, 0.9);
  --surface-popover: rgba(13, 32, 23, 0.98);
  --surface-video: #06140d;
  --surface-overlay: rgba(4, 11, 7, 0.78);
  --border-muted: rgba(101, 196, 102, 0.28);
  --border-strong: rgba(132, 218, 132, 0.56);
  --text-primary: #f0fff4;
  --text-secondary: #b6d4be;
  --text-muted: #7fa58a;
  --accent-bg: #65c466;
  --accent-bg-hover: #86dc86;
  --accent-text: #07180e;
  --accent-border: rgba(101, 196, 102, 0.56);
  --accent-soft: rgba(101, 196, 102, 0.16);
  --accent-selected-bg: rgba(101, 196, 102, 0.22);
  --focus-ring: rgba(101, 196, 102, 0.2);
  --ticker-bg:
    linear-gradient(90deg, rgba(101, 196, 102, 0.15), rgba(197, 166, 90, 0.1)),
    var(--surface-panel-soft);
  --logo-widget-bg:
    radial-gradient(circle at 18% 12%, rgba(101, 196, 102, 0.18), transparent 34%),
    #0b1c13;
  --avatar-fallback-bg:
    linear-gradient(135deg, #65c466, #1f512e);
}

html[data-jorstr-theme="neon"] {
  --surface-page: #0a0715;
  --surface-page-glow: rgba(255, 63, 209, 0.18);
  --surface-panel: rgba(21, 14, 39, 0.96);
  --surface-panel-soft: rgba(15, 10, 31, 0.95);
  --surface-card: rgba(10, 7, 24, 0.8);
  --surface-input: rgba(8, 5, 20, 0.92);
  --surface-popover: rgba(16, 10, 32, 0.98);
  --surface-video: #05030d;
  --surface-overlay: rgba(4, 2, 10, 0.8);
  --border-muted: rgba(0, 245, 255, 0.3);
  --border-strong: rgba(255, 63, 209, 0.62);
  --text-primary: #fff5ff;
  --text-secondary: #d8c2ff;
  --text-muted: #a88bd6;
  --accent-bg: #ff3fd1;
  --accent-bg-hover: #00f5ff;
  --accent-text: #120018;
  --accent-border: rgba(255, 63, 209, 0.62);
  --accent-soft: rgba(255, 63, 209, 0.18);
  --accent-selected-bg: rgba(0, 245, 255, 0.18);
  --focus-ring: rgba(0, 245, 255, 0.24);
  --status-live-bg: #ff245f;
  --status-live-ring: rgba(255, 36, 95, 0.8);
  --zap-accent: #fff16a;
  --zap-bg: rgba(255, 241, 106, 0.12);
  --zap-border: rgba(255, 241, 106, 0.4);
  --zap-text: #fff7a3;
  --ticker-bg:
    linear-gradient(90deg, rgba(255, 63, 209, 0.16), rgba(0, 245, 255, 0.12)),
    var(--surface-panel-soft);
  --logo-widget-bg:
    radial-gradient(circle at 18% 12%, rgba(0, 245, 255, 0.2), transparent 34%),
    #09051a;
  --avatar-fallback-bg:
    linear-gradient(135deg, #ff3fd1, #00a8ff);
}

html[data-jorstr-theme="light"] {
  color-scheme: light;
  --surface-page: #f7f4ff;
  --surface-page-glow: rgba(122, 92, 255, 0.16);
  --surface-panel: rgba(255, 255, 255, 0.96);
  --surface-panel-soft: rgba(243, 239, 255, 0.96);
  --surface-card: rgba(255, 255, 255, 0.92);
  --surface-input: rgba(255, 255, 255, 0.98);
  --surface-popover: rgba(255, 255, 255, 0.98);
  --surface-video: #191525;
  --surface-overlay: rgba(35, 28, 53, 0.36);
  --border-muted: rgba(91, 70, 176, 0.24);
  --border-strong: rgba(91, 70, 176, 0.5);
  --border-subtle: rgba(91, 70, 176, 0.14);
  --text-primary: #201a32;
  --text-secondary: #574e70;
  --text-muted: #756c88;
  --text-inverse: #f8f5ff;
  --accent-bg: #6a55e8;
  --accent-bg-hover: #5845ca;
  --accent-text: #ffffff;
  --accent-border: rgba(91, 70, 176, 0.5);
  --accent-soft: rgba(106, 85, 232, 0.12);
  --accent-selected-bg: rgba(106, 85, 232, 0.14);
  --focus-ring: rgba(106, 85, 232, 0.18);
  --status-live-text: #bd1931;
  --status-success-text: #1f7a3a;
  --status-warning-text: #75511d;
  --status-danger-text: #b71f2f;
  --zap-accent: #9b6200;
  --zap-bg: rgba(245, 170, 39, 0.14);
  --zap-border: rgba(187, 114, 6, 0.34);
  --zap-text: #6d4300;
  --ticker-bg:
    linear-gradient(90deg, rgba(255, 202, 103, 0.3), rgba(106, 85, 232, 0.12)),
    var(--surface-panel-soft);
  --creator-card-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 241, 255, 0.96));
  --logo-widget-bg:
    radial-gradient(circle at 18% 12%, rgba(106, 85, 232, 0.12), transparent 34%),
    #ffffff;
  --logo-frame-bg:
    linear-gradient(145deg, rgba(106, 85, 232, 0.08), rgba(255, 255, 255, 0.92));
  --link-chip-bg: rgba(106, 85, 232, 0.08);
  --avatar-fallback-bg:
    linear-gradient(135deg, #6a55e8, #c4b9ff);
  --shadow: 0 18px 50px rgba(48, 37, 80, 0.14);
}

html[data-jorstr-theme="mono"] {
  --surface-page: #111111;
  --surface-page-glow: rgba(255, 255, 255, 0.08);
  --surface-panel: rgba(32, 32, 32, 0.97);
  --surface-panel-soft: rgba(24, 24, 24, 0.95);
  --surface-card: rgba(18, 18, 18, 0.82);
  --surface-input: rgba(12, 12, 12, 0.92);
  --surface-popover: rgba(24, 24, 24, 0.98);
  --surface-video: #050505;
  --surface-overlay: rgba(0, 0, 0, 0.76);
  --border-muted: rgba(255, 255, 255, 0.24);
  --border-strong: rgba(255, 255, 255, 0.62);
  --text-primary: #f3f3f3;
  --text-secondary: #c8c8c8;
  --text-muted: #949494;
  --accent-bg: #e9e9e9;
  --accent-bg-hover: #ffffff;
  --accent-text: #111111;
  --accent-border: rgba(255, 255, 255, 0.72);
  --accent-soft: rgba(255, 255, 255, 0.14);
  --accent-selected-bg: rgba(255, 255, 255, 0.18);
  --focus-ring: rgba(255, 255, 255, 0.24);
  --status-live-bg: #f2f2f2;
  --status-live-text: #ffffff;
  --status-live-ring: rgba(255, 255, 255, 0.65);
  --status-success-bg: #d8d8d8;
  --status-success-text: #eaeaea;
  --status-warning-text: #d8d8d8;
  --status-danger-text: #ffffff;
  --zap-accent: #f4f4f4;
  --zap-bg: var(--border-muted);
  --zap-border: rgba(255, 255, 255, 0.36);
  --zap-text: #f5f5f5;
  --ticker-bg:
    linear-gradient(90deg, rgba(255, 255, 255, 0.14), var(--border-subtle)),
    var(--surface-panel-soft);
  --logo-widget-bg:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.13), transparent 34%),
    #141414;
  --avatar-fallback-bg:
    linear-gradient(135deg, #f2f2f2, #555555);
}

html[data-jorstr-theme="really"] {
  --surface-page: #35ff00;
  --surface-page-glow: rgba(255, 66, 200, 0.42);
  --surface-panel: rgba(45, 0, 86, 0.96);
  --surface-panel-soft: rgba(255, 240, 0, 0.94);
  --surface-card: rgba(0, 38, 255, 0.78);
  --surface-input: rgba(255, 255, 255, 0.96);
  --surface-popover: rgba(45, 0, 86, 0.98);
  --surface-video: #070012;
  --surface-overlay: rgba(31, 0, 54, 0.78);
  --border-muted: rgba(255, 66, 200, 0.54);
  --border-strong: rgba(0, 255, 255, 0.76);
  --border-subtle: rgba(0, 0, 0, 0.22);
  --text-primary: #ffffff;
  --text-secondary: #fff000;
  --text-muted: #161000;
  --text-inverse: #1b0031;
  --accent-bg: #ff42c8;
  --accent-bg-hover: #00ffff;
  --accent-text: #1a0030;
  --accent-border: rgba(0, 255, 255, 0.76);
  --accent-soft: rgba(255, 66, 200, 0.24);
  --accent-selected-bg: rgba(0, 255, 255, 0.28);
  --focus-ring: rgba(0, 255, 255, 0.32);
  --status-warning-bg: rgba(255, 240, 0, 0.2);
  --status-warning-text: #fff000;
  --status-warning-border: rgba(255, 240, 0, 0.58);
  --zap-accent: #fff000;
  --zap-bg: rgba(255, 240, 0, 0.22);
  --zap-border: rgba(255, 240, 0, 0.66);
  --zap-text: #fff000;
  --ticker-bg:
    linear-gradient(90deg, rgba(255, 66, 200, 0.5), rgba(0, 255, 255, 0.28)),
    #2d0056;
  --ticker-text: #ffffff;
  --ticker-badge-bg: #fff000;
  --ticker-badge-text: #1b0031;
  --ticker-border: rgba(255, 240, 0, 0.76);
  --creator-card-bg:
    linear-gradient(180deg, rgba(0, 38, 255, 0.92), rgba(45, 0, 86, 0.9));
  --logo-widget-bg:
    radial-gradient(circle at 18% 12%, rgba(255, 240, 0, 0.42), transparent 34%),
    #0026ff;
  --logo-frame-bg:
    linear-gradient(145deg, rgba(255, 66, 200, 0.26), rgba(0, 255, 255, 0.16));
  --logo-frame-border: rgba(255, 240, 0, 0.82);
  --link-chip-bg: rgba(255, 240, 0, 0.18);
  --link-chip-text: #ffffff;
  --link-chip-hover-bg: rgba(0, 255, 255, 0.24);
  --identity-ring-ready: #fff000;
  --avatar-fallback-bg:
    linear-gradient(135deg, #ff42c8, #00ffff);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(
      circle at top left,
      var(--surface-page-glow),
      transparent 34rem
    ),
    var(--page-bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent-border);
  outline-offset: 2px;
}

* {
  scrollbar-color:
    var(--border-strong)
    var(--surface-card);
}

html[data-jorstr-theme="mono"] .communication-tab.is-active,
html[data-jorstr-theme="mono"] .communication-tab[aria-selected="true"],
html[data-jorstr-theme="mono"] .zap-amount-button.is-selected {
  border-width: 2px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

h1,
h2,
p {
  margin-top: 0;
}


/* =======================================================
   Main Shell
   ======================================================= */

.stream-app {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 10px 0 14px;
}


/* =======================================================
   Header
   ======================================================= */

.stream-header {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    auto
    auto;
  gap: 8px 16px;
  align-items: center;
  position: relative;
  min-height: 52px;
  margin-bottom: 8px;
}

.stream-header .jorstr-header-brand {
  grid-column: 1;
}

.stream-header .jorstr-header-nav {
  grid-column: 2;
  justify-self: end;
}

.stream-header .jorstr-header-identity {
  grid-column: 3;
}

.stream-header-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 780;
}

.stream-header-nav a {
  text-decoration: none;
}

.stream-header-nav a:hover {
  color: var(--text-primary);
}

.stream-brand-label,
.section-label {
  margin-bottom: 6px;
  color: var(--accent-hover);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stream-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.stream-brand .stream-brand-label {
  flex: 0 0 auto;
  margin-bottom: 0;
}

.stream-status {
  display: flex;
  gap: 9px;
  align-items: center;
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-card);
  color: var(--text-soft);
  font-size: 0.86rem;
}

.live-status-indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-muted);
}

.stream-status.is-live .live-status-indicator {
  background: var(--live);
  box-shadow: 0 0 12px var(--status-live-ring);
}


/* =======================================================
   Shared Panels
   ======================================================= */

.video-panel,
.chat-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-bg);
  box-shadow: var(--shadow);
}

.panel-heading,
.zap-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.panel-heading h2,
.zap-heading h2,
.zap-heading h3,
.streamer-details h3 {
  margin-bottom: 0;
  font-size: 1.2rem;
}

.video-heading-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.stream-content-heading {
  min-width: 0;
}

.stream-copy {
  min-width: 0;
}

.stream-copy h1 {
  margin: 0 0 5px;
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
  line-height: 1.05;
}


/* =======================================================
   Creator Row
   ======================================================= */

.creator-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: min(280px, 100%);
}

.streamer-avatar-shell {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--panel-bg-soft);
}

.streamer-avatar,
.streamer-avatar-fallback {
  width: 100%;
  height: 100%;
}

.streamer-avatar {
  display: block;
  object-fit: cover;
}

.streamer-avatar-fallback {
  display: grid;
  place-items: center;
  color: var(--accent-text);
  font-size: 1.25rem;
  font-weight: 800;
  background:
    var(--avatar-fallback-bg);
}

.streamer-details {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.stream-attribution-text {
  min-width: 0;
}

.stream-attribution-text,
.streaming-label,
#streamerName {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#streamerName {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-configuration-warning {
  margin: 10px 0 0;
  padding: 9px 11px;
  border: 1px solid var(--status-warning-border);
  border-radius: 10px;
  background: var(--status-warning-bg);
  color: var(--zap-text);
  font-size: 0.86rem;
  line-height: 1.35;
}

.stream-configuration-warning[hidden] {
  display: none;
}

.streamer-npub {
  overflow: hidden;
  margin: 5px 0 0;
  color: var(--text-muted);
  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-button,
.chat-form button,
.zap-amount-button {
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  transition:
    transform 120ms ease,
    background 120ms ease,
    border-color 120ms ease;
}

.identity-button {
  padding: 10px 16px;
}

.identity-button:hover:not(:disabled),
.chat-form button:hover:not(:disabled),
.zap-amount-button:hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--accent-hover);
}

.zap-amount-button.is-selected {
  border-color: var(--accent-text);
  background: var(--accent-hover);
  box-shadow:
    0 0 0 2px
    var(--accent-selected-bg);
}


/* =======================================================
   Workspace
   ======================================================= */

.stream-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.8fr);
  gap: 16px;
  align-items: stretch;
}

.video-panel,
.chat-panel {
  min-width: 0;
  padding: 16px;
}

@media (min-width: 901px) {
  .video-panel {
    align-self: start;
  }

  .chat-panel {
    align-self: stretch;
    contain: layout size;
  }
}

.creator-ticker,
.creator-personalization-area {
  margin-top: 8px;
}

.creator-ticker[hidden],
.creator-personalization-area[hidden] {
  display: none;
}

.creator-ticker {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: center;
  overflow: hidden;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background:
    linear-gradient(
      90deg,
      rgba(255, 208, 116, 0.12),
      rgba(122, 92, 255, 0.12)
    ),
    var(--panel-bg-soft);
  color: var(--text);
}

.creator-ticker::before {
  content: "Live note";
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  padding: 3px 8px;
  border: 1px solid var(--status-warning-border);
  border-radius: 999px;
  background: var(--status-warning-bg);
  color: var(--status-warning-text);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.creator-ticker-text {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 0.88rem;
  font-weight: 750;
  -webkit-mask-image:
    linear-gradient(
      90deg,
      transparent,
      #000 18px,
      #000 calc(100% - 18px),
      transparent
    );
  mask-image:
    linear-gradient(
      90deg,
      transparent,
      #000 18px,
      #000 calc(100% - 18px),
      transparent
    );
}

.creator-ticker-track {
  display: inline-block;
  min-width: max-content;
  padding-left: 100%;
  padding-right: 72px;
  animation:
    creatorTickerScroll 32s linear infinite;
  will-change: transform;
}

@keyframes creatorTickerScroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .creator-ticker-track {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    animation: none;
    will-change: auto;
  }
}

.creator-personalization-area {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  align-items: start;
}

.creator-personalization-widget {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.052),
      rgba(255, 255, 255, 0.026)
    ),
    var(--panel-bg-soft);
  color: var(--text);
}

.creator-personalization-widget h2 {
  margin: 0 0 5px;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.creator-personalization-widget p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.42;
  white-space: pre-wrap;
}

.creator-logo-widget {
  padding: 8px;
  background:
    var(--logo-widget-bg);
}

.creator-logo-frame {
  display: grid;
  place-items: center;
  min-height: 74px;
  padding: 9px;
  border: 1px solid var(--logo-frame-border);
  border-radius: 12px;
  background:
    var(--logo-frame-bg);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.creator-logo-widget img {
  display: block;
  max-width: 100%;
  max-height: 58px;
  object-fit: contain;
}

.creator-about-widget {
  border-color: var(--logo-frame-border);
}

.creator-links-widget {
  border-color: var(--zap-border);
}

.creator-links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.creator-links-list a {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--link-chip-bg);
  color: var(--text);
  font-size: 0.82rem;
  text-decoration: none;
}

.creator-links-list a:hover,
.creator-links-list a:focus-visible {
  border-color: var(--border-strong);
  background: var(--accent-soft);
  outline: none;
}


/* =======================================================
   Video
   ======================================================= */

.rumble-player-shell {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin-top: 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--surface-video);
  aspect-ratio: 16 / 9;
}

.rumble-player,
.video-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.rumble-player {
  border: 0;
}

.stream-overlay-preview {
  position: absolute;
  inset: 0;
  z-index: 10;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  pointer-events: none;
}

.video-placeholder {
  display: grid;
  place-content: center;
  padding: 24px;
  color: var(--text-muted);
  text-align: center;
  background:
    radial-gradient(
      circle at center,
      var(--accent-soft),
      transparent 45%
    ),
    var(--surface-video);
}

.video-placeholder-title {
  margin-bottom: 8px;
  color: var(--text-soft);
  font-size: 1.25rem;
  font-weight: 800;
}


/* =======================================================
   Chat
   ======================================================= */

.chat-panel {
  position: relative;
  display: grid;
  grid-template-rows:
    auto
    minmax(0, 1fr)
    auto
    auto
    auto;
  min-height: 0;
  overflow: hidden;
}

.chat-panel.is-chat-mode,
.chat-panel.is-zap-setup-mode,
.chat-panel.is-zap-payment-mode {
  min-height: 0;
}

.communication-tabs {
  display: flex;
  gap: 8px;
}

.communication-panel-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.communication-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-card);
  color: var(--text-soft);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.communication-tab.is-active,
.communication-tab[aria-selected="true"] {
  border-color: var(--border-strong);
  background: var(--accent-selected-bg);
  color: var(--text);
}

.zap-pending-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 10px var(--status-live-ring);
}

.zap-pending-indicator[hidden] {
  display: none;
}

.communication-panel-body {
  min-height: 0;
  height: auto;
  align-self: stretch;
  margin-top: 12px;
  overflow: hidden;
}

.communication-panel-body[hidden] {
  display: none;
}

.chat-mode-panel {
  position: relative;
}

.chat-panel.is-chat-mode .chat-mode-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: auto;
  overflow: hidden;
}

.zap-setup-panel,
.zap-payment-panel {
  min-height: 0;
  height: auto;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--surface-card);
}

.zap-setup-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  gap: 14px;
}

.zap-payment-panel {
  display: grid;
  align-content: center;
}

.relay-status {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.relay-status.is-connected {
  color: var(--success);
}

.relay-status.connecting {
    color: var(--status-warning-text);
}

.relay-status.loading {
    color: var(--status-warning-text);
}

.relay-status.live {
    color: var(--status-success-text);
}

.relay-status.ended {
    color: var(--text-muted);
}

.relay-status.error {
    color: var(--status-danger-text);
}

.chat-messages {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  min-height: 0;
  height: auto;
  flex: 1 1 auto;
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--surface-card);
}

.chat-messages > :first-child {
  margin-top: auto;
}

.empty-chat-message {
  display: grid;
  place-content: center;
  min-height: 100%;
  color: var(--text-muted);
  text-align: center;
}

.empty-chat-message p:last-child {
  margin-bottom: 0;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 12px;
}

.chat-form textarea,
.custom-zap-controls input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  background: var(--surface-input);
  color: var(--text);
}

.chat-form textarea {
  min-height: 46px;
  max-height: 140px;
  padding: 10px 12px;
  resize: vertical;
}

.chat-form button {
  min-width: 100px;
  padding: 0 16px;
}

.chat-form textarea:focus,
.custom-zap-controls input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.chat-status,
.zap-status {
  min-height: 1.25em;
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: pre-line;
}


.lightning-address {
  margin-bottom: 0;
  color: var(--text-muted);
  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;
  font-size: 0.82rem;
}

.zap-setup-panel .zap-amount-buttons {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
  overflow: visible;
}

.zap-setup-panel .zap-amount-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  width: 100%;
  text-align: center;
  font-size: clamp(0.78rem, 1vw, 0.9rem);
  white-space: nowrap;
}

.custom-zap {
  margin-bottom: 14px;
}

.custom-zap-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.custom-zap label {
  display: block;
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 700;
}

.edit-zap-presets-button {
  border: 0;
  background: transparent;
  color: var(--accent-hover);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.edit-zap-presets-button:hover {
  text-decoration: underline;
}

.edit-zap-presets-button[hidden] {
  display: none;
}

.custom-zap-controls {
  display: grid;
  grid-template-columns: minmax(0, 220px) auto;
  gap: 10px;
}

.custom-zap-controls input {
  padding: 10px 12px;
}


/* =======================================================
   Hidden Controls and Accessibility
   ======================================================= */

.visually-hidden {
  position: absolute !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.header-identity-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  width: min(240px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-popover);
  box-shadow: var(--shadow);
}

.header-identity-menu[hidden] {
  display: none;
}

.header-identity-menu-name {
  margin: 0 0 8px;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 760;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-identity-menu button {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 780;
}

.header-identity-menu button:hover {
  background: var(--accent-selected-bg);
}


/* =====================================================
   Stream Configuration
   ===================================================== */

.configure-stream-button {
  margin-top: 8px;
  padding: 9px 14px;

  border: 1px solid var(--accent-border);
  border-radius: 10px;

  background:
    var(--accent-soft);

  color: var(--text-primary);

  font: inherit;
  font-weight: 700;

  cursor: pointer;
}

.configure-stream-button:hover {
  background:
    var(--accent-selected-bg);
}

.configure-stream-dialog,
.zap-presets-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);

  padding: 0;

  border: 1px solid
    var(--accent-border);

  border-radius: 16px;

  background:
    var(--surface-popover);

  color: var(--text-primary);

  box-shadow:
    0 24px 70px
    rgba(0, 0, 0, 0.6);

  overflow: auto;
}

.configure-stream-dialog::backdrop,
.zap-presets-dialog::backdrop {
  background:
    var(--surface-overlay);

  backdrop-filter:
    blur(4px);
}

.identity-connection-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);

  padding: 0;

  border: 1px solid
    var(--accent-border);

  border-radius: 16px;

  background:
    var(--surface-popover);

  color: var(--text-primary);

  box-shadow:
    0 24px 70px
    rgba(0, 0, 0, 0.6);

  overflow: auto;
}

.identity-connection-dialog::backdrop {
  background:
    var(--surface-overlay);

  backdrop-filter:
    blur(4px);
}

.identity-connection-content {
  display: grid;
  gap: 16px;

  padding: 24px;
}

.identity-connection-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.identity-connection-heading h2 {
  margin: 4px 0 0;

  font-size: 1.45rem;
}

.identity-connection-close {
  width: 38px;
  height: 38px;

  flex: 0 0 auto;

  border: 1px solid
    var(--border-muted);

  border-radius: 10px;

  background:
    var(--border-subtle);

  color: var(--text-primary);

  font-size: 1.4rem;
  line-height: 1;

  cursor: pointer;
}

.identity-connection-close:hover {
  background:
    var(--border-muted);
}

.identity-connection-message,
.remote-signer-status {
  margin: 0;

  color: var(--text-secondary);

  font-size: 0.94rem;
}

.identity-connection-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.identity-connection-choice {
  min-height: 90px;
  padding: 16px;

  border: 1px solid
    var(--border-muted);

  border-radius: 12px;

  background:
    var(--surface-card);

  color: var(--text-primary);

  text-align: left;

  cursor: pointer;
}

.identity-connection-choice:hover:not(:disabled),
.identity-connection-choice:focus-visible {
  background:
    var(--accent-soft);

  border-color:
    var(--border-strong);
}

.identity-connection-choice span {
  display: block;

  margin-bottom: 8px;

  font-weight: 800;
}

.identity-connection-choice small {
  color: var(--text-secondary);

  font-size: 0.82rem;
}

.remote-signer-connection-panel {
  display: grid;
  gap: 12px;
}

.remote-signer-connection-panel[hidden] {
  display: none;
}

.remote-signer-debug-indicator {
  padding: 9px 12px;

  border: 1px solid
    var(--status-warning-border);

  border-radius: 10px;

  background:
    var(--status-warning-bg);

  color: var(--status-warning-text);

  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
}

.remote-signer-debug-indicator[hidden] {
  display: none;
}

.remote-signer-qr {
  display: grid;
  place-items: center;

  width: 260px;
  min-height: 260px;
  max-width: 100%;

  padding: 10px;

  border: 1px solid
    var(--border-muted);

  border-radius: 12px;

  background:
    #fff;

  color: var(--text-inverse);

  justify-self: center;
  text-align: center;
}

.remote-signer-qr canvas,
.remote-signer-qr img {
  display: block;

  max-width: 100%;
  height: auto;
}

.copy-remote-signer-uri-button,
.identity-connection-actions button {
  padding: 10px 14px;

  border: 1px solid
    var(--accent-border);

  border-radius: 10px;

  background:
    var(--accent-soft);

  color: var(--text-primary);

  font: inherit;
  font-weight: 700;

  cursor: pointer;
}

.copy-remote-signer-uri-button:hover:not(:disabled),
.identity-connection-actions button:hover:not(:disabled) {
  background:
    var(--accent-selected-bg);
}

.remote-signer-uri {
  width: 100%;
  padding: 11px 12px;

  border: 1px solid
    var(--border-muted);

  border-radius: 10px;

  outline: none;

  background:
    var(--surface-input);

  color: var(--text-primary);

  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;
  font-size: 0.78rem;

  text-overflow: ellipsis;
}

.remote-signer-diagnostics {
  padding: 10px 12px;

  border: 1px solid
    var(--accent-selected-bg);

  border-radius: 12px;

  background:
    var(--surface-card);
}

.remote-signer-diagnostics[hidden] {
  display: none;
}

.remote-signer-diagnostics summary {
  color: var(--text-primary);

  font-weight: 800;

  cursor: pointer;
}

.remote-signer-diagnostics-summary {
  margin-top: 10px;

  color: var(--text-secondary);

  font-size: 0.84rem;
}

.remote-signer-diagnostics-list {
  display: grid;
  gap: 8px;

  max-height: 220px;
  margin: 10px 0 0;
  padding-left: 1.25rem;

  overflow-y: auto;

  color: var(--text-primary);

  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;
  font-size: 0.76rem;
}

.remote-signer-diagnostics-list li span,
.remote-signer-diagnostics-list li small {
  display: block;
}

.remote-signer-diagnostics-list li small {
  margin-top: 2px;

  overflow-wrap: anywhere;

  color: var(--text-secondary);
}

.copy-remote-signer-diagnostics-button {
  margin-top: 10px;
  padding: 9px 12px;

  border: 1px solid
    var(--accent-border);

  border-radius: 10px;

  background:
    var(--accent-soft);

  color: var(--text-primary);

  font: inherit;
  font-weight: 700;

  cursor: pointer;
}

.copy-remote-signer-diagnostics-button:hover:not(:disabled) {
  background:
    var(--accent-selected-bg);
}

.identity-connection-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 560px) {
  .identity-connection-content {
    padding: 20px;
  }

  .identity-connection-choices {
    grid-template-columns: 1fr;
  }

  .remote-signer-qr {
    width: 240px;
    min-height: 240px;
  }

  .copy-remote-signer-uri-button,
  .copy-remote-signer-diagnostics-button,
  .identity-connection-actions button {
    width: 100%;
  }
}

.configure-stream-form {
  display: grid;
  gap: 10px;

  padding: 24px;
}

.configure-stream-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;

  margin-bottom: 8px;
}

.configure-stream-heading h2 {
  margin: 4px 0 0;

  font-size: 1.6rem;
}

.configure-stream-close {
  width: 38px;
  height: 38px;

  flex: 0 0 auto;

  border: 1px solid
    var(--border-muted);

  border-radius: 10px;

  background:
    var(--border-subtle);

  color: var(--text-primary);

  font-size: 1.4rem;
  line-height: 1;

  cursor: pointer;
}

.configure-stream-close:hover {
  background:
    var(--border-muted);
}

.configure-stream-form label,
.zap-presets-form label {
  margin-top: 5px;

  color: var(--text-secondary);

  font-size: 0.92rem;
  font-weight: 700;
}

.configure-stream-form input,
.configure-stream-form select,
.configure-stream-form textarea,
.zap-presets-form input {
  width: 100%;
  box-sizing: border-box;

  padding: 11px 12px;

  border: 1px solid
    var(--border-muted);

  border-radius: 10px;

  background:
    var(--surface-input);

  color: var(--text-primary);

  font: inherit;
}

.configure-stream-form textarea {
  resize: vertical;
  min-height: 88px;
}

.configure-stream-form input:focus,
.configure-stream-form select:focus,
.configure-stream-form textarea:focus,
.zap-presets-form input:focus {
  outline: 2px solid
    var(--accent-border);

  outline-offset: 1px;

  border-color:
    var(--accent-border);
}

.configure-stream-status {
  min-height: 1.4em;
  margin: 4px 0 0;

  color: var(--text-secondary);

  font-size: 0.9rem;
}

.configure-stream-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;

  margin-top: 10px;
}

.configure-stream-actions button {
  padding: 10px 16px;

  border-radius: 10px;

  font: inherit;
  font-weight: 700;

  cursor: pointer;
}

.zap-presets-form {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.zap-preset-inputs {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.zap-preset-input-field {
  min-width: 0;
}

.zap-preset-input-field input {
  text-align: center;
  font-weight: 800;
}

.configure-stream-status.is-error {
  color: var(--status-live-text);
}

#cancelConfigureStreamButton {
  border: 1px solid
    rgba(255, 255, 255, 0.14);

  background:
    var(--border-subtle);

  color: var(--text-primary);
}

#saveStreamConfigurationButton {
  border: 1px solid
    var(--accent-border);

  background:
    var(--accent-bg);

  color: var(--accent-text);
}

#saveStreamConfigurationButton:hover {
  background:
    var(--accent-bg-hover);
}

@media (max-width: 600px) {
  .configure-stream-dialog,
  .zap-presets-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);

    border-radius: 14px;
  }

  @media (max-width: 700px) {
    .custom-zap-controls {
      grid-template-columns: 1fr;
    }

    .zap-payment {
      grid-template-columns: 140px 1fr;
    }

    .zap-qr-code,
    .zap-qr-code canvas,
    .zap-qr-code img {
      width: 140px !important;
      height: 140px !important;
    }
  }

  .configure-stream-form {
    padding: 18px;
  }

  .configure-stream-actions {
    flex-direction: column-reverse;
  }

  .configure-stream-actions button {
    width: 100%;
  }

  .current-stream-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin: 0.75rem 0 1rem;
  }

  .current-stream-label {
    font-size: .82rem;
    opacity: .65;
  }

  #currentStreamStarted {
    font-size: 1rem;
  }

  .configure-stream-section {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255,255,255,.12);
  }

  .current-stream-help {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255,255,255,.65);
    line-height: 1.4;
  }
}

/* =======================================================
   Responsive
   ======================================================= */

@media (max-width: 900px) {
  .stream-workspace {
    grid-template-columns: 1fr;
  }

  .chat-panel {
    height: clamp(520px, 82dvh, 720px);
  }

  .creator-personalization-area {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .creator-logo-widget {
    justify-items: start;
  }
}

@media (max-width: 620px) {
  .creator-ticker {
    align-items: center;
  }

  .creator-ticker-text {
    white-space: nowrap;
  }

  .creator-personalization-area {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .stream-app {
    width: min(100% - 20px, 1480px);
    padding-top: 14px;
  }

  .stream-header {
    display: grid;
    grid-template-columns:
      minmax(0, 1fr)
      auto;
    gap: 8px 12px;
  }

  .stream-header .jorstr-header-brand {
    grid-column: 1;
    grid-row: 1;
  }

  .stream-header .jorstr-header-nav {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .stream-header .jorstr-header-identity {
    grid-column: 2;
    grid-row: 1;
  }

  .identity-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .panel-heading,
  .zap-heading {
    align-items: flex-start;
  }

  .communication-panel-topline {
    align-items: center;
    flex-wrap: wrap;
  }

  .chat-form {
    grid-template-columns: 1fr;
  }

  .chat-form button {
    min-height: 42px;
    min-width: 100px;
  }

  .custom-zap-controls {
    display: grid;
    grid-template-columns: minmax(180px, 275px);
    gap: 12px;
    align-items: end;
  }

  .zap-payment {
    display: grid;
    grid-template-columns:
      160px
      minmax(0, 1fr);
    grid-template-areas:
      "qr summary"
      "qr actions";
    gap: 10px 16px;
    align-items: center;

    padding: 12px;

    border: 1px solid
      rgba(122, 92, 255, 0.3);

    border-radius: 12px;

    background:
      rgba(17, 14, 29, 0.6);
  }

  .zap-payment-actions {
    grid-area: actions;

    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .zap-payment[hidden] {
    display: none;
  }

  #zapPaymentSummary {
    grid-area: summary;
    margin: 0;
  }

  .zap-qr-code {
    grid-area: qr;
    width: 160px;
    height: 160px;
  }

  .zap-qr-code canvas,
  .zap-qr-code img {
    display: block;

    width: 160px !important;
    height: 160px !important;
  }


  .zap-setup-panel .zap-amount-buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .zap-setup-panel .zap-amount-button {
    min-height: 46px;
  }

  .lightning-address {
    max-width: 48%;
    overflow-wrap: anywhere;
    text-align: right;
  }
}

.nip46-test-lab-button {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 20;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(17, 14, 29, 0.9);
  color: rgba(255, 255, 255, 0.86);
  font: inherit;
  font-size: 0.76rem;
  cursor: pointer;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.28);
}

.nip46-test-lab-button:hover {
  border-color: rgba(122, 92, 255, 0.72);
  color: var(--accent-text);
}

.nip46-test-lab-dialog {
  width: min(680px, calc(100vw - 28px));
  border: 1px solid rgba(122, 92, 255, 0.34);
  border-radius: 14px;
  padding: 0;
  background: #141120;
  color: var(--accent-text);
}

.nip46-test-lab-dialog::backdrop {
  background: rgba(0, 0, 0, 0.58);
}

.nip46-test-lab-content {
  padding: 20px;
}

.nip46-test-lab-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nip46-test-lab-heading h2 {
  margin: 0;
  font-size: 1.15rem;
}

.nip46-test-lab-close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-text);
  font: inherit;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.nip46-test-lab-description {
  margin: 12px 0 16px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.nip46-test-lab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.nip46-test-lab-actions button {
  border: 1px solid rgba(122, 92, 255, 0.42);
  border-radius: 10px;
  padding: 9px 12px;
  background: var(--surface-page-glow);
  color: var(--accent-text);
  font: inherit;
  cursor: pointer;
}

.nip46-test-lab-results {
  min-height: 48px;
}

.nip46-test-lab-uri-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-muted);
}

.nip46-test-lab-uri-section h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.nip46-test-lab-empty {
  margin: 0;
  color: var(--text-muted);
}

.nip46-test-lab-result-list {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 8px 14px;
  margin: 0;
}

.nip46-test-lab-result-list dt {
  color: rgba(255, 255, 255, 0.66);
  font-weight: 700;
}

.nip46-test-lab-result-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.nip46-test-lab-result-passed {
  color: var(--status-success-text);
}

.nip46-test-lab-result-failed {
  color: #ff9aa8;
}

.nip46-test-lab-result-neutral {
  color: rgba(255, 255, 255, 0.86);
}

.nip46-test-lab-uri-output {
  display: grid;
  grid-template-columns: minmax(240px, 260px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-top: 14px;
}

.nip46-test-lab-qr-panel {
  min-height: 260px;
}

.nip46-test-lab-qr {
  display: grid;
  place-items: center;
  width: 260px;
  min-height: 260px;
  border: 1px solid rgba(122, 92, 255, 0.34);
  border-radius: 10px;
  padding: 10px;
  background: #ffffff;
}

.nip46-test-lab-qr-placeholder {
  margin: 0;
  color: rgba(20, 17, 32, 0.74);
  font-size: 0.86rem;
  line-height: 1.35;
  text-align: center;
}

.nip46-test-lab-uri-controls {
  min-width: 0;
}

.nip46-test-lab-uri {
  display: block;
  width: 100%;
  min-height: 120px;
  border: 1px solid rgba(122, 92, 255, 0.34);
  border-radius: 10px;
  padding: 10px;
  resize: vertical;
  background: var(--border-subtle);
  color: var(--accent-text);
  font: inherit;
  font-family:
    Consolas,
    "Liberation Mono",
    monospace;
  overflow-wrap: anywhere;
}

.nip46-test-lab-copy-uri {
  margin-top: 10px;
  border: 1px solid rgba(122, 92, 255, 0.42);
  border-radius: 10px;
  padding: 9px 12px;
  background: var(--surface-page-glow);
  color: var(--accent-text);
  font: inherit;
  cursor: pointer;
}

.nip46-test-lab-plaintext {
  display: block;
  width: 100%;
  min-height: 140px;
  margin-top: 14px;
  border: 1px solid var(--status-success-border);
  border-radius: 10px;
  padding: 10px;
  resize: vertical;
  background: rgba(143, 240, 189, 0.08);
  color: var(--accent-text);
  font: inherit;
  font-family:
    Consolas,
    "Liberation Mono",
    monospace;
  overflow-wrap: anywhere;
}

.nip46-test-lab-protocol-document {
  margin-top: 16px;
}

.nip46-test-lab-protocol-document h4 {
  margin: 0 0 10px;
  font-size: 0.94rem;
}

.nip46-test-lab-protocol-json {
  display: block;
  width: 100%;
  min-height: 170px;
  border: 1px solid rgba(122, 92, 255, 0.34);
  border-radius: 10px;
  padding: 10px;
  resize: vertical;
  background: var(--border-subtle);
  color: var(--accent-text);
  font: inherit;
  font-family:
    Consolas,
    "Liberation Mono",
    monospace;
  overflow-wrap: anywhere;
}

.nip46-test-lab-ledger {
  margin-top: 16px;
  overflow-x: auto;
}

.nip46-test-lab-ledger h4 {
  margin: 0 0 10px;
  font-size: 0.94rem;
}

.nip46-test-lab-ledger table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.nip46-test-lab-ledger th,
.nip46-test-lab-ledger td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 7px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.nip46-test-lab-ledger th {
  color: rgba(255, 255, 255, 0.68);
  font-weight: 700;
}

@media (max-width: 720px) {
  .nip46-test-lab-uri-output {
    grid-template-columns: 1fr;
  }

  .nip46-test-lab-qr {
    width: min(260px, 100%);
    margin: 0 auto;
  }
}

@media (max-width: 520px) {
  .nip46-test-lab-result-list {
    grid-template-columns: 1fr;
  }
}

#chatMessages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  max-height: none;
  height: auto;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 12px;
}

.chat-panel.is-chat-mode #chatMessages {
  flex: 1 1 auto;
  margin-top: 0;
  min-height: 0;
  max-height: none;
  height: auto;
  overflow-y: auto;
}

.new-chat-items-button {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;

  padding: 8px 12px;
  border: 1px solid rgba(122, 92, 255, 0.45);
  border-radius: 999px;

  background: rgba(39, 35, 59, 0.96);
  color: var(--accent-text);

  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;

  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.28);
}

.new-chat-items-button:hover {
  border-color: rgba(122, 92, 255, 0.8);
}

.new-chat-items-button[hidden] {
  display: none;
}

.chat-message {
  padding: 10px 12px;
  border: 1px solid var(--border-muted);
  border-radius: 12px;
  background: var(--surface-card);
}

.chat-message-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
}

.chat-message-author {
  color: var(--accent-bg-hover);
  font-size: 0.85rem;
  font-weight: 700;
}

.chat-message-time {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.chat-message-content {
  margin: 0;
  color: var(--text-primary);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.chat-message-content a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.zap-payment {
  display: grid;
  grid-template-columns:
    180px
    minmax(0, 1fr);
  grid-template-areas:
    "qr summary"
    "qr actions";
  gap: 12px 16px;
  align-items: center;

  padding: 16px;

  border: 1px solid
    var(--border-muted);

  border-radius: 14px;

  background:
    var(--surface-card);
}

.zap-payment[hidden] {
  display: none;
}

.zap-diagnostic-panel {
  margin-top: 12px;
  border: 1px solid var(--status-success-border);
  border-radius: 12px;
  padding: 12px;
  background: var(--surface-card);
}

.zap-diagnostic-panel[hidden] {
  display: none;
}

.zap-diagnostic-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.zap-diagnostic-heading strong {
  color: var(--status-success-text);
  font-size: 0.86rem;
}

.zap-diagnostic-heading button {
  border: 1px solid var(--status-success-border);
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--status-success-border);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.76rem;
  cursor: pointer;
}

.zap-diagnostic-summary {
  display: grid;
  grid-template-columns: minmax(110px, 150px) minmax(0, 1fr);
  gap: 6px 10px;
  margin: 0;
  font-size: 0.78rem;
}

.zap-diagnostic-summary dt {
  color: var(--text-muted);
}

.zap-diagnostic-summary dd {
  margin: 0;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.zap-diagnostic-events {
  display: grid;
  gap: 4px;
  max-height: 150px;
  margin: 10px 0 0;
  padding-left: 18px;
  overflow-y: auto;
  color: var(--text-secondary);
  font-size: 0.72rem;
}

#zapPaymentSummary {
  grid-area: summary;
  margin: 0;
}

.zap-qr-code {
  grid-area: qr;
  width: 180px;
  height: 180px;
}

.zap-qr-code img,
.zap-qr-code canvas {
  display: block;
  width: 180px !important;
  height: 180px !important;
}

.zap-payment-actions {
  grid-area: actions;

  display: grid;
  gap: 8px;
}

.zap-payment-actions button {
  width: 100%;
}

.zap-payment-primary-action {
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 800;
}

.zap-payment-primary-action:hover:not(:disabled) {
  background: var(--accent-hover);
}

.zap-payment-primary-action[hidden] {
  display: none;
}

.zap-payment-secondary-actions {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.zap-payment-secondary-actions button {
  border: 1px solid var(--border-muted);
  border-radius: 10px;
  padding: 9px 12px;
  background: var(--border-subtle);
  color: var(--text-primary);
  font-weight: 700;
}

.zap-wallet-status {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.76rem;
  text-align: center;
}

.zap-wallet-status[hidden] {
  display: none;
}

.zap-payment-quiet-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.zap-payment-quiet-actions button {
  width: auto;
  min-height: 0;
  border: 0;
  padding: 4px 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.zap-payment-quiet-actions button:hover:not(:disabled) {
  color: var(--text-primary);
  text-decoration: underline;
}

.zap-payment-quiet-actions button[hidden] {
  display: none;
}

.custom-zap-controls {
  display: grid;
  grid-template-columns: minmax(180px, 280px);
  gap: 12px;
}

.nwc-wallet-panel {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border-muted);
  border-radius: 12px;
  background: var(--surface-card);
}

.nwc-wallet-panel strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.82rem;
}

.nwc-wallet-panel p {
  margin: 3px 0 0;
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.nwc-wallet-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.nwc-wallet-connect-form {
  display: grid;
  gap: 12px;
}

.nwc-wallet-connect-form label {
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 700;
}

.nwc-wallet-connect-form textarea {
  min-height: 112px;
  resize: vertical;
}

@media (max-width: 900px) {
  .zap-payment {
    grid-template-columns:
      150px
      minmax(0, 1fr);
  }

  .zap-qr-code,
  .zap-qr-code img,
  .zap-qr-code canvas {
    width: 150px !important;
    height: 150px !important;
  }

  .nwc-wallet-panel {
    grid-template-columns: 1fr;
  }

  .nwc-wallet-actions {
    justify-content: stretch;
  }

  .nwc-wallet-actions button {
    flex: 1 1 140px;
  }

  .zap-payment-secondary-actions {
    grid-template-columns: 1fr;
  }

  .zap-payment-quiet-actions {
    flex-direction: column;
    align-items: center;
  }
}

.streamer-avatar-shell {
  width: 44px;
  height: 44px;
}

#nostrConnectionStatus {
  white-space: nowrap;
  color: var(--text-soft);
  font-size: 0.88rem;
}

.configure-stream-button {
  margin-top: 0;
  padding: 9px 14px;
}

@media (max-width: 760px) {
  .video-panel .panel-heading {
    align-items: flex-start;
  }

  .video-heading-main {
    flex-wrap: wrap;
    gap: 10px;
  }

  .creator-row {
    max-width: 100%;
    min-width: 0;
  }
}

/* =====================================================
   Final compact desktop layout pass
   ===================================================== */

/* Pull the whole page closer to the top */
.stream-app {
  padding-top: 10px;
}

/* Compact the top bar and stream title area */
.stream-header {
  min-height: 52px;
  margin-bottom: 6px;
  gap: 10px 18px;
}

.stream-brand-label {
  margin-bottom: 0;
}

.stream-copy h1 {
  margin-bottom: 5px;
  font-size: clamp(1.55rem, 2.4vw, 1.85rem);
}

/* The full npub is not useful in the main viewing layout */
.streamer-npub {
  display: none;
}

.stream-header .stream-brand {
  align-items: center;
}

.stream-header .stream-brand-label {
  font-size: 0.82rem;
  line-height: 1;
}

.stream-header .creator-row {
  align-items: center;
  min-width: 0;
}

.stream-header .streamer-avatar-shell {
  width: 32px;
  height: 32px;
}

.stream-header .streamer-details {
  align-items: center;
  display: block;
  min-width: 0;
}

.stream-header .stream-attribution-text {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  color: var(--accent-hover);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.2;
  min-width: 0;
}

.stream-header .streaming-label,
.stream-header #streamerName {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
}

/* Compact video and chat headings */
.video-panel .section-label,
.chat-panel .section-label {
  display: none;
}

.video-panel .stream-content-heading,
.communication-panel-topline {
  min-height: 28px;
}

/* Bring the embedded video and chat history closer to their headings */
.rumble-player-shell {
  margin-top: 8px;
}

/* Slightly tighter panel padding */
.video-panel,
.chat-panel {
  padding: 13px;
}

/* Slightly smaller gap between video and chat */
.stream-workspace {
  gap: 14px;
}

/* =====================================================
   Help Dialog
   ===================================================== */

.help-dialog {
  width: min(92vw, 640px);
  max-height: min(86vh, 760px);

  padding: 0;

  color: #f7f5ff;
  background:
    linear-gradient(
      145deg,
      rgba(35, 30, 57, 0.98),
      rgba(20, 18, 34, 0.99)
    );

  border:
    1px solid
    rgba(139, 111, 255, 0.5);

  border-radius: 18px;

  box-shadow:
    0 24px 70px
    rgba(0, 0, 0, 0.6),
    0 0 35px
    rgba(111, 78, 255, 0.18);

  overflow: hidden;
}

.help-dialog::backdrop {
  background:
    rgba(7, 6, 14, 0.76);

  backdrop-filter:
    blur(5px);
}

.help-dialog-content {
  display: flex;
  flex-direction: column;

  max-height: inherit;
}

.help-dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  padding: 20px 22px 18px;

  background:
    rgba(91, 65, 170, 0.18);

  border-bottom:
    1px solid
    rgba(139, 111, 255, 0.28);
}

.help-dialog-heading h2 {
  margin: 0;

  color: var(--accent-text);

  font-size:
    clamp(1.25rem, 3vw, 1.65rem);

  line-height: 1.2;
}

.help-dialog-close {
  flex: 0 0 auto;

  width: 38px;
  height: 38px;

  display: grid;
  place-items: center;

  padding: 0;

  color: #ddd7ff;
  background:
    rgba(255, 255, 255, 0.08);

  border:
    1px solid
    rgba(255, 255, 255, 0.14);

  border-radius: 10px;

  font-size: 1.35rem;
  line-height: 1;

  cursor: pointer;

  transition:
    background 150ms ease,
    border-color 150ms ease,
    transform 150ms ease;
}

.help-dialog-close:hover {
  background:
    rgba(139, 111, 255, 0.24);

  border-color:
    rgba(169, 148, 255, 0.55);

  transform:
    translateY(-1px);
}

.help-dialog-close:focus-visible {
  outline:
    3px solid
    rgba(171, 151, 255, 0.55);

  outline-offset: 2px;
}

#helpDialogBody {
  padding: 22px;

  overflow-y: auto;

  scrollbar-width: thin;
}

.help-dialog-intro {
  margin:
    0 0 22px;

  padding: 14px 16px;

  color: #eeeaff;
  background:
    rgba(111, 78, 255, 0.12);

  border-left:
    3px solid
    rgba(151, 126, 255, 0.9);

  border-radius: 0 10px 10px 0;

  line-height: 1.55;
}

.help-dialog-section {
  margin-top: 24px;
}

.help-dialog-section:first-of-type {
  margin-top: 0;
}

.help-dialog-section h3 {
  margin:
    0 0 10px;

  color: var(--accent-text);

  font-size: 1.05rem;
  line-height: 1.3;
}

.help-dialog-section p {
  margin:
    0 0 12px;

  color: #cec8df;

  line-height: 1.6;
}

.help-dialog-section p:last-child {
  margin-bottom: 0;
}

.help-dialog-section ol {
  margin:
    12px 0 0;

  padding-left: 1.6rem;

  color: #ddd8eb;
}

.help-dialog-section li {
  margin-bottom: 8px;

  padding-left: 4px;

  line-height: 1.45;
}

.help-dialog-section li::marker {
  color: #a98cff;
  font-weight: 700;
}

.help-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;

  padding: 16px 22px 20px;

  border-top:
    1px solid
    rgba(139, 111, 255, 0.22);

  background:
    rgba(14, 12, 25, 0.55);
}

.help-dialog-actions[hidden] {
  display: none;
}

.help-dialog-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 42px;

  padding: 10px 16px;

  color: var(--accent-text);
  background:
    linear-gradient(
      135deg,
      #7357d9,
      #5839b7
    );

  border:
    1px solid
    rgba(178, 158, 255, 0.38);

  border-radius: 10px;

  text-decoration: none;
  font-weight: 700;

  box-shadow:
    0 8px 20px
    rgba(49, 29, 112, 0.3);

  transition:
    transform 150ms ease,
    filter 150ms ease;
}

.help-dialog-action:hover {
  filter: brightness(1.1);

  transform:
    translateY(-1px);
}

.help-dialog-action:focus-visible {
  outline:
    3px solid
    rgba(171, 151, 255, 0.55);

  outline-offset: 2px;
}

@media (max-width: 560px) {
  .help-dialog {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);

    border-radius: 14px;
  }

  .help-dialog-heading {
    padding: 17px 16px;
  }

  #helpDialogBody {
    padding: 18px 16px;
  }

  .help-dialog-actions {
    flex-direction: column;

    padding: 14px 16px 18px;
  }

  .help-dialog-action {
    width: 100%;
  }
}
