:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --panel: #141414;
  --panel-2: #1c1c1c;
  --line: #3a3a3a;
  --text: #f2f2f2;
  --muted: #9a9a9a;
  --accent: #d0d0d0;
  --accent-2: #a8a8a8;
  --danger: #cfcfcf;
  --audio-blue: #bdbdbd;
  --audio-blue-dark: #7a7a7a;
  --mixdown-red: #b0b0b0;
  --mixdown-red-dark: #6e6e6e;
  --window-frame: #8a8a8a;
  --window-frame-dark: #5c5c5c;
  --window-frame-light: #c4c4c4;
  --window-body: #1a1a1a;
  --desktop-pan-x: 0px;
  --desktop-pan-y: 0px;
  --desktop-zoom: 1;
  --desktop-world-width: 24000px;
  --desktop-world-height: 16000px;
  --taskbar-widget-height: 72px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body {
  margin: 0;
  min-height: 100vh;
  padding-bottom: 0;
  background:
    linear-gradient(rgba(210, 210, 210, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(210, 210, 210, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(242, 242, 242, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 242, 242, 0.025) 1px, transparent 1px),
    var(--bg);
  background-size: 48px 48px, 48px 48px, 12px 12px, 12px 12px, auto;
  background-position: 0 58px, 0 58px, 0 58px, 0 58px, 0 0;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

body.login-page {
  min-height: 100vh;
  height: auto;
  overflow: auto;
  padding: 0;
  background: #090807;
  background-image: none;
  color: #f4efe8;
}

.login-stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(340px, 440px) minmax(0, 1fr);
}

.login-panel {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  padding: 48px 44px 32px;
  background:
    linear-gradient(180deg, rgba(224, 122, 61, 0.14), transparent 220px),
    #100e0c;
  border-right: 1px solid rgba(224, 122, 61, 0.35);
  box-shadow: 18px 0 50px rgba(0, 0, 0, 0.28);
}

.login-brand h1 {
  margin: 6px 0 0;
  font-size: 44px;
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.login-kicker {
  margin: 0;
  color: #e08a4a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.login-lede,
.login-footnote {
  margin: 0;
  color: #b7aa9e;
  font-size: 15px;
  line-height: 1.45;
}

.login-lede {
  max-width: 32ch;
  margin-top: 12px;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form[hidden] {
  display: none !important;
}

.login-field {
  display: grid;
  gap: 6px;
}

.login-field span {
  color: #d9cfc4;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-field input {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(224, 186, 150, 0.28);
  border-radius: 8px;
  background: rgba(8, 7, 6, 0.72);
  color: #f7f2ec;
  padding: 0 14px;
  font: inherit;
  font-size: 15px;
}

.login-field input:focus {
  outline: 2px solid rgba(224, 138, 74, 0.85);
  outline-offset: 1px;
  border-color: transparent;
}

.login-submit {
  min-height: 48px;
  margin-top: 4px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #f0a15f, #c86a32);
  color: #1a0d07;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.login-submit:hover {
  background: linear-gradient(180deg, #ffb578, #d47538);
}

.login-message {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.4;
}

.login-message[hidden] {
  display: none !important;
}

.login-message.is-error {
  color: #ffd0b8;
  background: rgba(140, 42, 18, 0.45);
}

.login-message.is-ok {
  color: #e7f5d4;
  background: rgba(48, 92, 42, 0.45);
}

.login-switch {
  display: flex;
  margin-top: -6px;
}

.login-switch button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #f0a15f;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.login-switch button[hidden] {
  display: none !important;
}

.login-footnote {
  font-size: 13px;
}

.login-hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #1a120e;
}

.login-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% center;
}

.login-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(16, 14, 12, 0.78), rgba(16, 14, 12, 0.08) 24%, transparent 46%);
  pointer-events: none;
}

@media (max-width: 860px) {
  .login-stage {
    grid-template-columns: 1fr;
  }

  .login-hero {
    min-height: 42vh;
    order: -1;
  }

  .login-hero img {
    object-position: 70% 30%;
  }

  .login-hero::after {
    background: linear-gradient(180deg, transparent 40%, rgba(16, 14, 12, 0.88));
  }

  .login-panel {
    min-height: 0;
    padding: 28px 22px 36px;
    border-right: 0;
    box-shadow: none;
  }

  .login-brand h1 {
    font-size: 36px;
  }
}

.stream-scroll-rail {
  position: fixed;
  left: 14px;
  right: 328px;
  bottom: 18px;
  z-index: 99;
  height: 18px;
  border: 1px solid rgba(210, 210, 210, 0.45);
  border-radius: 999px;
  background: rgba(13, 13, 13, 0.96);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.34);
  cursor: pointer;
  touch-action: none;
}

.stream-scroll-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 80px;
  height: 10px;
  min-width: 54px;
  border: 1px solid rgba(242, 242, 242, 0.32);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 18px rgba(210, 210, 210, 0.34);
}

.task-items {
  min-width: 0;
  display: grid;
  gap: 8px;
}

:where(.card, .utility-window, .stream-log-list, .stat-history-list, .audio-mixer-list, .task-items) {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

:where(.card, .utility-window, .stream-log-list, .stat-history-list, .audio-mixer-list, .task-items)::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.task-actions,
.studio-menu-grid {
  display: grid;
  gap: 8px;
}

.studio-menu-grid {
  grid-template-columns: repeat(3, 96px);
}

.task-clock-panel {
  display: grid;
  gap: 4px;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: auto !important;
  border: 1px solid rgba(210, 210, 210, 0.45);
  border-radius: 8px;
  background: rgba(13, 13, 13, 0.94);
  padding: 8px 9px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.26);
}

.task-clock-head {
  display: grid;
  gap: 5px;
  align-content: center;
  user-select: none;
  min-height: 0;
}

.clock-title {
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  text-transform: uppercase;
}

.task-clock-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.task-clock {
  color: var(--danger);
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-clock-controls,
.counter-controls {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.clock-mode-toggle,
.add-counter,
.countdown-preset,
.counter-toggle,
.counter-remove {
  width: 30px;
  min-height: 30px;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
}

.start-menu-shell {
  position: relative;
  flex: 0 0 auto;
}

.studio-menu-toggle,
.start-menu-toggle {
  min-width: 42px;
  width: 42px;
  min-height: 36px;
  padding: 0;
  border-color: rgba(210, 210, 210, 0.45);
  background: rgba(13, 13, 13, 0.96);
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.studio-menu-toggle[aria-expanded="true"],
.start-menu-toggle[aria-expanded="true"] {
  border-color: var(--accent);
  background: rgba(32, 32, 32, 0.98);
}

.start-menu-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  width: auto;
  overflow: visible;
  border: 1px solid rgba(210, 210, 210, 0.42);
  border-radius: 12px;
  background: rgba(16, 16, 16, 0.98);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
  padding: 10px;
  z-index: 120;
}

.studio-menu-btn {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  width: 96px;
  height: 96px;
  min-height: 96px;
  padding: 8px;
  border: 1px solid rgba(210, 210, 210, 0.35);
  border-radius: 12px;
  background: rgba(28, 28, 28, 0.96);
  color: #f2f2f2;
  cursor: pointer;
}

.studio-menu-btn i {
  font-size: 22px;
  line-height: 1;
}

.studio-menu-btn span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1;
  text-transform: uppercase;
}

.studio-menu-btn:hover,
.studio-menu-btn:focus-visible {
  border-color: rgba(242, 242, 242, 0.7);
  background: rgba(48, 48, 48, 0.98);
  outline: none;
}

.start-menu-title {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.start-menu-section-title {
  margin-top: 12px;
}

.start-menu-panel .task-item {
  width: 100%;
  justify-content: flex-start;
}

.start-menu-apps {
  padding: 0 0 2px;
  overflow: visible;
}

.start-menu-apps .task-item {
  max-width: none;
  min-height: 42px;
  background: rgba(32, 32, 32, 0.82);
}

.server-load-mini {
  width: 100%;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto minmax(96px, 1fr) auto auto;
  gap: 6px;
  align-content: stretch;
  border: 1px solid rgba(242, 242, 242, 0.22);
  border-radius: 8px;
  background: rgba(13, 13, 13, 0.94);
  padding: 8px;
  text-align: left;
  overflow: hidden;
}

.server-load-mini[hidden] {
  display: none !important;
}

.server-load-mini-head,
.server-load-mini-foot,
.server-load-mini-sat-head,
.server-load-mini-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.server-load-mini-legend {
  justify-content: flex-start;
  gap: 10px;
}

.server-load-mini .legend-item {
  font-size: 10px;
  line-height: 1;
}

.server-load-mini .legend-item.cpu {
  color: #d0d0d0;
}

.server-load-mini .legend-item.inbound {
  color: #6ea8ff;
}

.server-load-mini .legend-item.outbound {
  color: #ffd45c;
}

.server-load-mini-plot {
  position: relative;
  min-height: 96px;
  height: 100%;
}

.server-load-mini-sat {
  display: grid;
  gap: 4px;
}

.server-load-mini .network-sat-track {
  height: 8px;
}

.server-load-mini span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.server-load-mini strong {
  color: var(--accent);
  font-size: 12px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#serverLoadMiniChart {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(242, 242, 242, 0.12);
  border-radius: 4px;
  background: #0d0d0d;
}

.start-menu-panel .mixer-settings-toggle {
  width: 100%;
}

.clock-mode-toggle {
  color: var(--accent);
}

.add-counter {
  color: var(--accent-2);
}

.countdown-preset {
  color: #cfcfcf;
  font-size: 13px;
}

.counter-list {
  display: grid;
  gap: 6px;
}

.clock-popup {
  position: fixed;
  right: 328px;
  bottom: 14px;
  z-index: 101;
  width: min(360px, calc(100vw - 24px));
  max-height: min(460px, calc(100vh - 80px));
  overflow: auto;
  border: 1px solid rgba(210, 210, 210, 0.45);
  border-radius: 8px;
  background: rgba(13, 13, 13, 0.98);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
  padding: 8px;
}

.clock-popup[hidden] {
  display: none !important;
}

.counter-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(242, 242, 242, 0.12);
  border-radius: 6px;
  background: rgba(32, 32, 32, 0.78);
  padding: 6px 8px;
}

.counter-row.countdown-row {
  border-color: rgba(200, 200, 200, 0.28);
}

.counter-value {
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.countdown-row .counter-value {
  color: #cfcfcf;
}

.counter-toggle,
.counter-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
}

.task-item {
  flex: 0 0 auto;
  min-height: 36px;
  max-width: 220px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--text);
  padding: 0 12px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.task-item:hover,
.task-item.active {
  border-color: var(--accent);
}

.task-icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  color: var(--accent);
  position: relative;
}

.task-icon::before {
  content: "";
  display: block;
}

.task-icon.stream-icon::before {
  width: 0;
  height: 0;
  margin-left: 2px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 10px solid currentColor;
}

.task-icon.server-icon {
  color: var(--accent-2);
}

.task-icon.server-icon::before {
  width: 15px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 2px;
  background:
    linear-gradient(currentColor 0 0) 3px 7px / 2px 2px no-repeat,
    linear-gradient(currentColor 0 0) 7px 4px / 2px 5px no-repeat,
    linear-gradient(currentColor 0 0) 11px 2px / 2px 7px no-repeat;
}

.task-icon.log-icon {
  color: #cfcfcf;
}

.task-icon.log-icon::before {
  width: 15px;
  height: 12px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  background: linear-gradient(currentColor 0 0) center / 15px 2px no-repeat;
}

.task-icon.stats-icon {
  color: #6ea8ff;
}

.task-icon.stats-icon::before {
  width: 16px;
  height: 13px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  background:
    linear-gradient(currentColor 0 0) 3px 8px / 2px 3px no-repeat,
    linear-gradient(currentColor 0 0) 7px 5px / 2px 6px no-repeat,
    linear-gradient(currentColor 0 0) 11px 2px / 2px 9px no-repeat;
}

.task-icon.mixer-icon {
  color: #ff8a7a;
}

.task-icon.mixer-icon::before {
  width: 16px;
  height: 14px;
  background:
    linear-gradient(currentColor 0 0) 1px 2px / 2px 11px no-repeat,
    linear-gradient(currentColor 0 0) 7px 0 / 2px 13px no-repeat,
    linear-gradient(currentColor 0 0) 13px 4px / 2px 9px no-repeat;
}

.task-icon.mixer-icon::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: -6px 4px 0 currentColor, 6px -3px 0 currentColor;
}

.task-icon.admin-icon {
  color: var(--danger);
}

.task-icon.admin-icon::before {
  width: 14px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 2px;
  box-shadow: inset 0 0 0 2px rgba(242, 242, 242, 0.08);
}

.task-icon.admin-icon::after {
  content: "";
  position: absolute;
  top: 1px;
  width: 8px;
  height: 6px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.task-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-audio {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  color: var(--accent);
  position: relative;
}

.task-audio::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 5px;
  width: 7px;
  height: 9px;
  background: currentColor;
  clip-path: polygon(0 25%, 45% 25%, 100% 0, 100% 100%, 45% 75%, 0 75%);
}

.task-audio::after {
  content: "";
  position: absolute;
  right: 1px;
  top: 3px;
  width: 8px;
  height: 12px;
  border: 2px solid currentColor;
  border-left: 0;
  border-top-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
}

.shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 66px 20px 40px;
  min-height: 100vh;
}

.desktop-panning .dashboard-layout {
  cursor: auto;
  user-select: none;
}

.dashboard-layout :where(.card, .utility-window, button, a, input, select, textarea, video) {
  cursor: auto;
}

.presence-panel {
  position: fixed;
  top: 58px;
  right: 14px;
  bottom: 14px;
  z-index: 80;
  width: 300px;
  display: grid;
  grid-template-rows: auto minmax(120px, 1fr) auto minmax(72px, 0.55fr) auto;
  gap: 8px;
  border-left: 1px solid rgba(210, 210, 210, 0.28);
  background: rgba(16, 16, 16, 0.9);
  padding: 10px;
  pointer-events: auto;
  overflow: auto;
}

.presence-panel.has-server-rail {
  grid-template-rows: auto minmax(88px, 0.62fr) auto minmax(48px, 0.32fr) minmax(180px, 1.5fr) auto;
}

.live-chat-panel {
  min-height: 0;
  max-height: none;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 6px;
  border: 1px solid rgba(210, 210, 210, 0.32);
  border-radius: 8px;
  background: rgba(13, 13, 13, 0.9);
  padding: 8px;
}

.live-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.live-chat-head strong {
  font-size: 13px;
  text-transform: uppercase;
}

.live-chat-head span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.live-chat-messages {
  min-height: 0;
  display: grid;
  align-content: end;
  gap: 7px;
  overflow: auto;
  padding-right: 2px;
}

.live-chat-message {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(242, 242, 242, 0.12);
  border-left: 4px solid var(--accent);
  border-radius: 7px;
  background: rgba(24, 24, 24, 0.9);
  padding: 6px 7px;
}

.live-chat-message.role-admin {
  border-left-color: var(--danger);
}

.live-chat-message.role-operator {
  border-left-color: var(--accent-2);
}

.live-chat-message-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.live-chat-message-head strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-chat-message-head span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.live-chat-message p {
  margin: 0;
  color: rgba(242, 242, 242, 0.92);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.live-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 62px;
  gap: 6px;
}

.live-chat-form input {
  min-width: 0;
  min-height: 32px;
  border: 1px solid rgba(210, 210, 210, 0.35);
  border-radius: 6px;
  background: #0d0d0d;
  color: var(--text);
  padding: 8px 9px;
}

.live-chat-form button {
  min-height: 32px;
  padding: 0 10px;
}

.presence-live-count {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  border: 1px solid rgba(242, 242, 242, 0.28);
  border-radius: 6px;
  background: rgba(13, 13, 13, 0.94);
  padding: 9px 10px;
}

.presence-live-count div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.presence-live-count span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.presence-live-count strong {
  color: var(--accent);
  font-size: 22px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.toast-stack {
  position: fixed;
  right: 14px;
  bottom: 120px;
  z-index: 110;
  width: min(360px, calc(100vw - 28px));
  display: grid;
  gap: 8px;
  justify-items: end;
  pointer-events: none;
}

.toast-message {
  max-width: 100%;
  border: 1px solid rgba(200, 200, 200, 0.42);
  border-left: 4px solid #cfcfcf;
  border-radius: 8px;
  background: rgba(24, 24, 24, 0.96);
  color: var(--text);
  padding: 10px 12px;
  font-size: 13px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.36);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast-message.toast-hide {
  opacity: 0;
  transform: translateY(8px);
}

.fennic-flow {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 6px;
  border: 1px solid rgba(210, 210, 210, 0.32);
  border-radius: 8px;
  background: rgba(13, 13, 13, 0.9);
  padding: 8px;
}

.fennic-flow-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fennic-flow-head strong {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

.fennic-flow-head span:last-child {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fennic-flow-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d0d0d0;
  box-shadow: 0 0 0 0 rgba(208, 208, 208, 0.6);
}

.fennic-flow.is-stable .fennic-flow-dot {
  animation: fennic-pulse 1.8s ease-out infinite;
}

.fennic-flow.is-acting .fennic-flow-dot,
.fennic-flow.is-warn .fennic-flow-dot {
  background: #d10f24;
  animation: fennic-pulse 0.8s ease-out infinite;
}

@keyframes fennic-pulse {
  0% { box-shadow: 0 0 0 0 rgba(208, 208, 208, 0.55); }
  100% { box-shadow: 0 0 0 7px rgba(208, 208, 208, 0); }
}

.fennic-think {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.fennic-think-status {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  min-width: 0;
}

.fennic-think-label {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.fennic-think-ellipsis::after {
  content: "";
  display: inline-block;
  width: 1.1em;
  text-align: left;
  animation: fennic-dots 1.1s steps(4, end) infinite;
}

@keyframes fennic-dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}

.fennic-think-status #fennicThinkStatus {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fennic-think-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(242, 242, 242, 0.08);
}

.fennic-think-fill {
  position: relative;
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #d0d0d0;
  transition: width 0.55s ease;
}

.fennic-think-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: translateX(-100%);
  animation: fennic-sheen 1.15s ease-in-out infinite;
}

.fennic-flow.is-acting .fennic-think-fill,
.fennic-flow.is-warn .fennic-think-fill {
  background: #d10f24;
}

@keyframes fennic-sheen {
  to { transform: translateX(100%); }
}

.fennic-flow-feed {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 5px;
  overflow: auto;
  padding-right: 2px;
}

.fennic-flow-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.fennic-flow-step {
  display: grid;
  gap: 2px;
  border: 1px solid rgba(242, 242, 242, 0.1);
  border-left: 3px solid #d0d0d0;
  border-radius: 4px;
  background: rgba(24, 24, 24, 0.9);
  padding: 4px 6px;
}

.fennic-flow-step.is-act {
  border-left-color: #f4f4f4;
}

.fennic-flow-step.is-warn {
  border-left-color: #d10f24;
}

.fennic-flow-step time {
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.fennic-flow-step p {
  margin: 0;
  color: rgba(242, 242, 242, 0.92);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.presence-title {
  justify-self: stretch;
  border: 1px solid rgba(210, 210, 210, 0.34);
  border-radius: 6px;
  background: rgba(13, 13, 13, 0.92);
  color: var(--muted);
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.presence-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: auto;
  padding-right: 2px;
}

.presence-card {
  width: 100%;
  max-width: 100%;
  display: grid;
  gap: 3px;
  border: 1px solid rgba(242, 242, 242, 0.12);
  border-left: 4px solid var(--muted);
  border-radius: 8px;
  background: rgba(24, 24, 24, 0.94);
  padding: 9px 11px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.presence-card strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.presence-card span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.presence-card.role-admin {
  border-left-color: var(--danger);
}

.presence-card.role-operator {
  border-left-color: var(--accent-2);
}

.presence-card.role-watch,
.presence-card.role-viewer {
  border-left-color: var(--accent);
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 110;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(242, 242, 242, 0.18);
  background: rgba(16, 16, 16, 0.96);
  backdrop-filter: blur(10px);
  margin-bottom: 0;
  padding: 7px 18px;
}

.topbar-leading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

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

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 32px;
  line-height: 1.1;
}

.topbar h1 {
  font-size: 16px;
  line-height: 1;
}

#summary {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

button,
.copy,
.button-link,
.player-button {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  min-height: 40px;
  border-radius: 6px;
  padding: 0 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

button:hover,
.copy:hover,
.button-link:hover,
.player-button:hover {
  border-color: var(--accent);
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.status {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  border-radius: 8px;
  padding: 18px;
}

.status.error {
  border-color: var(--danger);
  color: var(--danger);
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  width: 100%;
  min-height: auto;
  overflow: visible;
}

.dashboard-main {
  min-width: 0;
  width: calc(100vw - 360px);
}

.stream-log-panel {
  --window-pad: 14px;
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow: hidden;
  border: 2px solid var(--window-frame);
  border-radius: 12px;
  background: var(--window-body);
  padding: 14px;
}

.stat-history-window {
  --window-pad: 14px;
  border: 2px solid var(--window-frame);
  border-radius: 12px;
  background: var(--window-body);
  padding: 14px;
}

.audio-mixer-window {
  --window-pad: 14px;
  border: 2px solid var(--audio-blue);
  border-radius: 12px;
  background: var(--window-body);
  padding: 14px;
}

.mixdown-settings-window {
  --window-pad: 14px;
  border: 2px solid var(--window-frame);
  border-radius: 12px;
  background: var(--window-body);
  padding: 14px;
}

.stream-log-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.stream-log-head h2 {
  font-size: 18px;
}

.stream-log-head p,
.stream-log-empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.stream-log-section {
  margin: 16px 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.stream-log-section-note {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.stream-log-list {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  padding-right: 4px;
}

.stream-log-group {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(242, 242, 242, 0.1);
  border-radius: 8px;
  background: rgba(13, 13, 13, 0.5);
  padding: 8px;
}

.stream-log-group-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.stream-log-group-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-log-group-head span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.stream-log-item {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0d0d0d;
  padding: 10px;
}

.stream-log-item.online {
  border-color: rgba(210, 210, 210, 0.45);
}

.stream-log-item.offline {
  border-color: rgba(180, 180, 180, 0.45);
  opacity: 0.72;
}

.stream-log-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.stream-log-top strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-log-top time {
  color: var(--muted);
  font-size: 12px;
}

.stream-log-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0 0;
  font-variant-numeric: tabular-nums;
}

.stream-log-stats div {
  min-width: 0;
}

.stream-log-stats dt {
  font-size: 10px;
}

.stream-log-stats dd {
  margin-top: 3px;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-history-list {
  display: grid;
  gap: 12px;
  max-height: calc(100% - 48px);
  overflow: auto;
  padding-right: 4px;
}

.stat-history-empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.stat-history-item {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(242, 242, 242, 0.1);
  border-radius: 8px;
  background: rgba(13, 13, 13, 0.55);
  padding: 10px;
}

.stat-history-item-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.stat-history-item-head div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.stat-history-item-head strong,
.stat-history-item-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-history-item-head span,
.stat-history-item-head time {
  color: var(--muted);
  font-size: 12px;
}

.stat-history-chart {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0d0d0d;
}

.stat-history-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.stat-history-legend span::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 3px;
  margin-right: 6px;
  vertical-align: middle;
  background: currentColor;
}

.stat-history-legend .quality {
  color: var(--accent);
}

.stat-history-legend .bandwidth {
  color: #cfcfcf;
}

.stat-history-legend .viewers {
  color: #6ea8ff;
}

.stat-history-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
}

.stat-history-values div {
  min-width: 0;
}

.stat-history-values dt {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.stat-history-values dd {
  margin-top: 3px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mixer-master {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
  align-self: start;
  justify-self: start;
  border: 1px solid rgba(180, 180, 180, 0.34);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(180, 180, 180, 0.16), rgba(36, 16, 18, 0.42) 54%, rgba(13, 13, 13, 0.2)),
    rgba(44, 18, 20, 0.62);
  padding: 34px 12px 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.mixer-master::before {
  content: "Outgoing Mixdown";
  position: absolute;
  top: 10px;
  right: 12px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.mixer-master button.active,
.mixer-mute.active {
  border-color: var(--danger);
  background: rgba(180, 180, 180, 0.14);
  color: var(--danger);
}

#mixerMasterMute.is-live,
#mixerBrowserMute.is-live {
  border-color: var(--accent);
  background: rgba(210, 210, 210, 0.16);
  color: var(--accent);
}

.mixer-stream-toggle.active {
  border-color: var(--danger);
  background: rgba(180, 180, 180, 0.14);
  color: var(--danger);
}

.audio-mixer-window .window-titlebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 58%),
    linear-gradient(90deg, var(--audio-blue-dark), var(--audio-blue));
}

.mixer-master label {
  min-width: 0;
  display: grid;
  gap: 6px;
  justify-items: center;
  color: var(--muted);
  font-size: 12px;
}

.mixer-master-buttons {
  display: grid;
  gap: 8px;
}

.mixer-master-buttons button {
  width: 100%;
  min-height: 34px;
}

.mixer-fader-shell::before {
  content: "";
  display: block;
  width: 18px;
  height: 210px;
  background:
    repeating-linear-gradient(180deg, rgba(242, 242, 242, 0.55) 0 1px, transparent 1px 8px) 0 0 / 7px 100% no-repeat,
    repeating-linear-gradient(180deg, rgba(242, 242, 242, 0.28) 0 1px, transparent 1px 16px) 10px 0 / 8px 100% no-repeat;
  opacity: 0.74;
  pointer-events: none;
}

.mixer-master input,
.mixer-volume {
  width: 196px;
  height: 42px;
  transform: rotate(-90deg);
  transform-origin: center;
  writing-mode: horizontal-tb;
  direction: ltr;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.mixer-fader-shell {
  position: relative;
  width: 76px;
  height: 232px;
  display: grid;
  grid-template-columns: 18px 58px;
  place-items: center;
}

.master-fader-shell {
  height: 292px;
}

.master-fader-shell::before {
  height: 270px;
}

.mixer-master .master-fader-shell input {
  width: 256px;
}

.mixer-fader-shell::before {
  grid-column: 1;
  grid-row: 1;
}

.mixer-fader-shell .mixer-volume {
  grid-column: 2;
  grid-row: 1;
}

.mixer-fader-shell input {
  grid-column: 2;
  grid-row: 1;
}

.mixer-master input::-webkit-slider-runnable-track,
.mixer-volume::-webkit-slider-runnable-track {
  height: 18px;
  border-radius: 999px;
  background: #070707;
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, 0.85),
    inset 0 0 0 3px rgba(242, 242, 242, 0.08),
    inset 0 0 14px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(242, 242, 242, 0.08);
}

.mixer-master input::-webkit-slider-thumb,
.mixer-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 46px;
  height: 54px;
  margin-top: -18px;
  border: 1px solid rgba(242, 242, 242, 0.38);
  border-radius: 4px;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.2) 0 2px, rgba(0, 0, 0, 0.25) 2px 6px),
    linear-gradient(180deg, #252525 0%, #737373 22%, #a2a2a2 50%, #737373 78%, #252525 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(0, 0, 0, 0.55),
    0 0 0 2px rgba(13, 13, 13, 0.86),
    0 6px 14px rgba(0, 0, 0, 0.5);
}

.mixer-master input::-moz-range-track,
.mixer-volume::-moz-range-track {
  height: 18px;
  border-radius: 999px;
  background: #070707;
  box-shadow:
    inset 0 0 0 1px rgba(242, 242, 242, 0.15),
    inset 0 0 10px rgba(0, 0, 0, 0.72);
}

.mixer-master input::-moz-range-thumb,
.mixer-volume::-moz-range-thumb {
  width: 46px;
  height: 54px;
  border: 1px solid rgba(242, 242, 242, 0.38);
  border-radius: 4px;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.2) 0 2px, rgba(0, 0, 0, 0.25) 2px 6px),
    linear-gradient(180deg, #252525 0%, #737373 22%, #a2a2a2 50%, #737373 78%, #252525 100%);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.5);
}

.audio-mixer-list,
.mixdown-feeds-list {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: start;
  justify-content: flex-start;
  gap: 10px;
  max-height: 100%;
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(210, 210, 210, 0.34);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(210, 210, 210, 0.16), rgba(24, 24, 24, 0.48) 52%, rgba(13, 13, 13, 0.2)),
    rgba(13, 13, 13, 0.54);
  padding: 34px 10px 10px;
  box-shadow: inset 0 1px 0 rgba(242, 242, 242, 0.06);
}

.audio-mixer-list::before,
.mixdown-feeds-list::before {
  content: "Incoming Feeds";
  position: absolute;
  top: 10px;
  left: 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mixdown-feeds-list {
  border-color: rgba(180, 180, 180, 0.38);
  background:
    linear-gradient(180deg, rgba(180, 180, 180, 0.14), rgba(42, 16, 20, 0.48) 52%, rgba(13, 13, 13, 0.2)),
    rgba(38, 16, 20, 0.54);
}

.mixdown-feeds-list::before {
  content: "Mixdown Feeds";
  color: var(--danger);
}

.audio-mixer-empty {
  color: var(--muted);
  font-size: 13px;
}

.mixer-channel {
  display: grid;
  grid-template-rows: auto 1fr;
  flex: 0 0 172px;
  min-width: 0;
  min-height: 370px;
  gap: 10px;
  border: 1px solid rgba(242, 242, 242, 0.1);
  border-radius: 8px;
  background: rgba(13, 13, 13, 0.55);
  padding: 10px;
}

.mixer-channel-head,
.mixer-controls {
  display: grid;
  gap: 8px;
  align-items: start;
}

.mixer-channel-body {
  display: grid;
  grid-template-columns: 28px 76px;
  gap: 12px;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.mixer-channel-head {
  grid-template-columns: 1fr;
  text-align: center;
}

.mixer-channel-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mixer-channel-head span,
.mixer-volume-value {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.mixer-meter {
  justify-self: center;
  align-self: stretch;
  width: 20px;
  height: 232px;
  max-height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background:
    linear-gradient(0deg, transparent 0 72%, rgba(200, 200, 200, 0.18) 72% 88%, rgba(180, 180, 180, 0.22) 88% 100%),
    #0d0d0d;
  display: flex;
  align-items: flex-end;
}

.mixer-meter-fill {
  width: 100%;
  height: 0;
  border-radius: inherit;
  background: linear-gradient(0deg, var(--accent), #e0e0e0);
  transition: height 80ms linear, background 120ms ease;
}

.mixer-meter-fill.warm {
  background: linear-gradient(0deg, var(--accent), #cfcfcf);
}

.mixer-meter-fill.hot {
  background: linear-gradient(0deg, #cfcfcf, var(--danger));
}

.mixer-controls {
  grid-template-columns: 1fr;
  justify-items: center;
  align-content: start;
}

.mixer-controls button {
  grid-column: 1 / -1;
  width: min(100%, 82px);
  min-height: 32px;
  padding: 0 10px;
}

.mixer-volume-value {
  grid-column: 1 / -1;
}

.mixer-isolate {
  color: #cfcfcf;
}

.mixer-stream-status {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  margin-top: 10px;
}

.mixdown-settings-form {
  display: grid;
  gap: 12px;
}

.mixdown-settings-form label {
  display: grid;
  gap: 6px;
}

.mixdown-settings-form span,
.mixdown-settings-form p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.mixdown-settings-form select,
.mixdown-settings-form input {
  min-height: 40px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0d0d0d;
  color: var(--text);
  padding: 0 12px;
  font: inherit;
}

.mixdown-settings-form input[readonly] {
  color: var(--muted);
  cursor: default;
}

.mixdown-boost-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 62px;
  gap: 10px;
  align-items: center;
}

.mixdown-boost-row input[type="range"] {
  min-height: 30px;
  padding: 0;
  accent-color: var(--accent-2);
}

.mixdown-boost-row strong {
  color: var(--accent-2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgb(0 0 0 / 72%);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  position: relative;
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 24px;
  box-shadow: 0 24px 70px rgb(0 0 0 / 45%);
}

.modal h2 {
  padding-right: 44px;
  font-size: 22px;
}

.modal p {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  min-height: 34px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  align-items: flex-start;
  margin-bottom: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  padding-bottom: 92px;
}

.metrics-panel {
  margin-top: 18px;
  --window-pad: 18px;
  border: 2px solid var(--window-frame);
  background: var(--window-body);
  border-radius: 12px;
  padding: 18px;
}

.utility-window {
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(210, 210, 210, 0.16);
  touch-action: none;
}

.utility-window:not(.minimized) {
  position: fixed;
  z-index: 20;
  max-height: calc(100vh - 82px);
  overflow: auto;
}

.utility-window:not(.minimized):not(.taskbar-closed) {
  resize: both;
}

.desktop-locked .utility-window:not(.minimized):not(.taskbar-closed) {
  resize: none;
}

.metrics-panel.utility-window:not(.minimized) {
  width: min(980px, calc(100vw - 24px));
  min-width: min(760px, calc(100vw - 24px));
  min-height: 520px;
  margin-top: 0;
}

.stream-log-panel.utility-window:not(.minimized) {
  width: min(720px, calc(100vw - 24px));
  min-width: min(480px, calc(100vw - 24px));
  min-height: 420px;
  max-height: calc(100vh - 82px);
  overflow: auto;
}

.live-chat-panel.utility-window {
  --window-pad: 12px;
}

.live-chat-panel.utility-window:not(.minimized):not(.taskbar-closed) {
  z-index: 96;
  width: min(400px, calc(100vw - 24px));
  height: min(540px, calc(100vh - 100px));
  min-width: min(320px, calc(100vw - 24px));
  min-height: 360px;
  padding: 12px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  overflow: hidden;
}

.live-chat-panel .window-titlebar {
  margin-bottom: 0;
}

.live-chat-panel .window-titlebar #liveChatStatus {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.desktop-locked .live-chat-panel .window-titlebar {
  cursor: grab;
}

.desktop-locked .live-chat-panel .window-minimize,
.desktop-locked .live-chat-panel .window-reset,
.desktop-locked .live-chat-panel .window-close {
  opacity: 1;
  cursor: pointer;
}

.desktop-locked .live-chat-panel.utility-window:not(.minimized):not(.taskbar-closed) {
  resize: both;
}

.stream-log-panel .stream-log-list,
.stream-log-panel .stat-history-list {
  max-height: none;
  overflow: visible;
}

.stat-history-window.utility-window:not(.minimized) {
  width: min(760px, calc(100vw - 24px));
  height: min(620px, calc(100vh - 82px));
  min-width: min(390px, calc(100vw - 24px));
  min-height: 320px;
  max-height: calc(100vh - 82px);
}

.audio-mixer-window.utility-window:not(.minimized) {
  width: min(820px, calc(100vw - 24px));
  height: min(560px, calc(100vh - 82px));
  min-width: min(390px, calc(100vw - 24px));
  min-height: 300px;
  max-height: calc(100vh - 82px);
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) minmax(170px, 0.36fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  column-gap: 12px;
  row-gap: 0;
}

.audio-mixer-window.utility-window:not(.minimized) .audio-mixer-head {
  grid-column: 1 / -1;
}

.audio-mixer-window.utility-window:not(.minimized) .mixer-master {
  grid-column: 1;
  grid-row: 2;
}

.audio-mixer-window.utility-window:not(.minimized) .audio-mixer-list {
  grid-column: 2;
  grid-row: 2;
}

.audio-mixer-window.utility-window:not(.minimized) .mixdown-feeds-list {
  grid-column: 3;
  grid-row: 2;
}

.audio-mixer-window.utility-window:not(.minimized) .mixer-stream-status {
  grid-column: 1 / -1;
  grid-row: 3;
}

.mixdown-settings-window.utility-window:not(.minimized):not(.taskbar-closed) {
  width: min(380px, calc(100vw - 24px));
  min-width: min(300px, calc(100vw - 24px));
  min-height: 260px;
  max-height: calc(100vh - 82px);
}

.studio-settings-window {
  --window-pad: 16px;
  border: 2px solid var(--window-frame);
  border-radius: 12px;
  background: var(--window-body);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.studio-settings-window.utility-window:not(.minimized):not(.taskbar-closed) {
  width: min(1120px, calc(100vw - 24px));
  height: min(680px, calc(100vh - 82px));
  min-width: min(760px, calc(100vw - 24px));
  min-height: 460px;
  max-height: calc(100vh - 82px);
}

.studio-settings-window > .admin-window-head {
  margin: -16px -16px 0;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(242, 242, 242, 0.08);
}

.studio-settings-window > .admin-window-head h2 {
  font-size: 18px;
  letter-spacing: 0.01em;
}

.studio-settings-window > .admin-window-head p {
  margin-top: 2px;
  color: rgba(242, 242, 242, 0.78);
  font-size: 12px;
  line-height: 1.35;
  text-transform: none;
}

.studio-settings-toolbar {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.settings-btn {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 13, 13, 0.72);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.settings-btn:hover {
  border-color: rgba(210, 210, 210, 0.45);
  background: rgba(210, 210, 210, 0.12);
}

.settings-btn-primary {
  border-color: rgba(210, 210, 210, 0.55);
  background: rgba(210, 210, 210, 0.2);
}

.settings-btn-primary:hover {
  background: rgba(210, 210, 210, 0.3);
}

.account-requests {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(224, 122, 61, 0.4);
  border-radius: 10px;
  background: rgba(224, 122, 61, 0.07);
  padding: 10px 12px;
}

.account-requests[hidden] {
  display: none !important;
}

.account-requests-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.account-requests-head h3 {
  margin: 0;
  font-size: 14px;
}

.account-requests-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.account-requests-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  max-height: 180px;
  overflow: auto;
}

.account-request {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
}

.account-request-name {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.account-request-name strong {
  font-size: 14px;
}

.account-request-name span {
  color: var(--muted);
  font-size: 12px;
}

.account-request-actions {
  display: inline-flex;
  gap: 6px;
  flex: none;
}

.account-request-empty {
  color: var(--muted);
  font-size: 13px;
}

.settings-btn-secondary {
  color: var(--text);
}

.settings-btn-danger {
  border-color: rgba(180, 180, 180, 0.55);
  color: var(--danger);
  background: rgba(180, 180, 180, 0.08);
}

.settings-btn-danger:hover {
  border-color: rgba(180, 180, 180, 0.82);
  background: rgba(180, 180, 180, 0.16);
}

.settings-btn-ghost {
  min-height: 30px;
  padding: 0 10px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.settings-btn-ghost:hover {
  border-color: rgba(180, 180, 180, 0.4);
  color: var(--danger);
  background: rgba(180, 180, 180, 0.1);
}

.studio-settings-gate {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #141414;
  padding: 18px;
}

.studio-settings-gate h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.studio-settings-gate p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.studio-settings-unlock-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 0;
}

.studio-settings-unlock-form .admin-inline-error {
  grid-column: 1 / -1;
}

.studio-settings-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  flex: 1;
}

.studio-settings-notice:empty {
  display: none;
}

.studio-settings-layout {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
  flex: 1;
}

.studio-settings-users,
.studio-settings-detail {
  border: 1px solid rgba(242, 242, 242, 0.1);
  border-radius: 10px;
  background: #141414;
  padding: 12px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.studio-settings-panel-head h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.studio-settings-panel-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.studio-settings-window .stream-accounts-controls {
  display: grid;
  gap: 8px;
}

.studio-settings-window .stream-accounts-search,
.studio-settings-window .stream-accounts-sort {
  margin-top: 0;
  gap: 6px;
}

.studio-settings-window .stream-accounts-search span,
.studio-settings-window .stream-accounts-sort span {
  font-size: 11px;
  letter-spacing: 0.04em;
}

.studio-settings-window .stream-accounts-search input,
.studio-settings-window .stream-accounts-sort select {
  min-height: 36px;
  border-radius: 8px;
  font-size: 13px;
}

.studio-settings-window .stream-accounts-sort {
  display: grid;
}

.studio-settings-window .stream-accounts-sort select {
  width: 100%;
  border: 1px solid rgba(210, 210, 210, 0.35);
  background: #0d0d0d;
  color: var(--text);
  padding: 8px 10px;
  cursor: pointer;
}

.studio-settings-window .settings-user-list,
.studio-settings-window .stream-accounts-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
}

.studio-settings-window .stream-account-row {
  display: block;
  width: 100%;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(13, 13, 13, 0.55);
  padding: 8px 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}

.studio-settings-window .settings-credentials-wrap {
  display: grid;
  gap: 12px;
}

.studio-settings-window .settings-credentials-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
}

.studio-settings-window .settings-credentials-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.studio-settings-window .stream-account-row:hover {
  border-color: rgba(210, 210, 210, 0.28);
  background: rgba(210, 210, 210, 0.08);
}

.studio-settings-window .stream-account-row.active {
  border-color: rgba(210, 210, 210, 0.7);
  background: rgba(210, 210, 210, 0.14);
  box-shadow: inset 3px 0 0 var(--accent);
}

.studio-settings-window .stream-account-summary {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.studio-settings-window .stream-account-name {
  min-width: 0;
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-transform: none;
  line-height: 1.3;
}

.stream-account-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-user-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #d10f24;
  box-shadow: 0 0 8px rgba(209, 15, 36, 0.85);
}

.studio-settings-window .stream-account-meta-row {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

.studio-settings-window .settings-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border: 1px solid rgba(242, 242, 242, 0.16);
  border-radius: 999px;
  background: rgba(242, 242, 242, 0.06);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-transform: none;
  letter-spacing: 0.01em;
}

.studio-settings-window .settings-badge.role-admin {
  border-color: #ff4d4d;
  background: #d10f24;
  color: #ffffff;
}

.studio-settings-window .settings-badge.role-operator {
  border-color: #6ea8ff;
  background: #1d5fd0;
  color: #ffffff;
}

.studio-settings-window .settings-badge.role-viewer {
  border-color: #5ddea0;
  background: #128a45;
  color: #ffffff;
}

.studio-settings-window .settings-badge.is-warn {
  border-color: rgba(200, 200, 200, 0.45);
  background: rgba(200, 200, 200, 0.12);
  color: #ffe29a;
}

.studio-settings-window .settings-badge.is-danger {
  border-color: rgba(180, 180, 180, 0.45);
  background: rgba(180, 180, 180, 0.12);
  color: #ffc2b8;
}

.studio-settings-window .stream-account-hours {
  border-color: rgba(242, 242, 242, 0.22);
  background: rgba(242, 242, 242, 0.08);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.settings-tablist {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  border: 1px solid rgba(242, 242, 242, 0.12);
  border-radius: 10px;
  background: rgba(13, 13, 13, 0.7);
  padding: 4px;
}

.settings-tab {
  min-height: 34px;
  min-width: 96px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.studio-settings-window .settings-usage-wrap {
  display: grid;
  gap: 14px;
}

.studio-settings-window .settings-usage-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.studio-settings-window .settings-usage-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.studio-settings-window .settings-usage-chart-card {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(242, 242, 242, 0.12);
  border-radius: 10px;
  background: rgba(13, 13, 13, 0.55);
  padding: 10px 12px;
  min-width: 0;
}

.studio-settings-window .settings-usage-chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.studio-settings-window .settings-usage-chart-head strong {
  color: var(--text);
  font-size: 13px;
}

.studio-settings-window .settings-usage-chart-head span {
  color: var(--muted);
  font-size: 11px;
}

.studio-settings-window .settings-usage-chart {
  width: 100%;
  height: 160px;
  border-radius: 8px;
  background: #0d0d0d;
}

@media (max-width: 1100px) {
  .studio-settings-window .settings-usage-charts {
    grid-template-columns: 1fr;
  }
}

.studio-settings-window .settings-usage-card,
.studio-settings-window .settings-usage-loading {
  border: 1px solid rgba(242, 242, 242, 0.12);
  border-radius: 10px;
  background: rgba(13, 13, 13, 0.55);
  padding: 10px 12px;
}

.studio-settings-window .settings-usage-card {
  display: grid;
  gap: 4px;
}

.studio-settings-window .settings-usage-card span,
.studio-settings-window .settings-usage-metric span,
.studio-settings-window .settings-usage-when span,
.studio-settings-window .settings-usage-list-head {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.studio-settings-window .settings-usage-card strong,
.studio-settings-window .settings-usage-metric strong,
.studio-settings-window .settings-usage-when strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.studio-settings-window .settings-usage-list {
  display: grid;
  gap: 8px;
}

.studio-settings-window .settings-usage-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
  border: 1px solid rgba(242, 242, 242, 0.1);
  border-radius: 10px;
  background: rgba(13, 13, 13, 0.45);
  padding: 10px 12px;
}

.studio-settings-window .settings-usage-row.is-live {
  border-color: rgba(210, 210, 210, 0.45);
  background: rgba(210, 210, 210, 0.1);
}

.studio-settings-window .settings-usage-when,
.studio-settings-window .settings-usage-metric {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.studio-settings-window .settings-usage-when span,
.studio-settings-window .settings-usage-metric strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .studio-settings-window .settings-usage-row {
    grid-template-columns: 1fr 1fr;
  }
}

.settings-tab:hover {
  color: var(--text);
  background: rgba(242, 242, 242, 0.05);
}

.settings-tab.active {
  border-color: rgba(210, 210, 210, 0.45);
  background: rgba(210, 210, 210, 0.18);
  color: var(--text);
}

.studio-settings-detail-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-top: 2px;
}

.settings-empty-state {
  display: grid;
  gap: 6px;
  place-content: center;
  min-height: 180px;
  border: 1px dashed rgba(242, 242, 242, 0.14);
  border-radius: 10px;
  background: rgba(13, 13, 13, 0.35);
  padding: 24px;
  text-align: center;
}

.settings-empty-state strong {
  font-size: 14px;
}

.settings-empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.studio-settings-window .stream-accounts-empty {
  margin: 0;
  padding: 18px 14px;
  border: 1px dashed rgba(242, 242, 242, 0.14);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(13, 13, 13, 0.35);
  font-size: 13px;
  text-align: center;
}

.studio-settings-window .stream-account-edit-form {
  display: grid;
  gap: 14px;
  max-width: 560px;
}

.studio-settings-window .stream-account-edit-form label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.studio-settings-window .stream-account-edit-form input,
.studio-settings-window .stream-account-edit-form select {
  min-height: 38px;
  border-radius: 8px;
  font-size: 13px;
}

.studio-settings-window .settings-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.studio-settings-window .settings-form-grid .span-2 {
  grid-column: 1 / -1;
}

.studio-settings-window .settings-check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.studio-settings-window .stream-account-enabled {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  color: var(--text);
  font-size: 13px;
  text-transform: none;
}

.studio-settings-window .stream-account-nsfw-hint {
  margin: 0;
  color: #f0b4b4;
  font-size: 12px;
  line-height: 1.4;
}

.studio-settings-window .stream-account-popup-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  padding-top: 4px;
}

.studio-settings-window .stream-account-code-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.studio-settings-window .stream-account-code-group {
  gap: 10px;
  border: 1px solid rgba(242, 242, 242, 0.1);
  border-radius: 10px;
  background: rgba(13, 13, 13, 0.45);
  padding: 14px;
}

.studio-settings-window .stream-account-code-group h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.studio-settings-window .stream-account-code-line {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 64px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.studio-settings-window .stream-account-code-line > span:first-child {
  color: var(--muted);
  font-weight: 600;
}

.studio-settings-window .stream-account-code-line input {
  min-height: 34px;
  border-radius: 8px;
  font-size: 12px;
}

.studio-settings-window .stream-account-code-line button {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 960px) {
  .studio-settings-layout {
    grid-template-columns: 1fr;
  }

  .studio-settings-window.utility-window:not(.minimized):not(.taskbar-closed) {
    min-width: min(420px, calc(100vw - 24px));
  }

  .studio-settings-window .settings-form-grid,
  .studio-settings-window .stream-account-code-details {
    grid-template-columns: 1fr;
  }

  .studio-settings-unlock-form {
    grid-template-columns: 1fr;
  }
}

.stream-account-edit-window,
.stream-account-code-window {
  --window-pad: 16px;
  border: 2px solid var(--window-frame);
  border-radius: 12px;
  background: var(--window-body);
  padding: 16px;
}

.stream-account-edit-window.utility-window:not(.minimized):not(.taskbar-closed) {
  width: min(500px, calc(100vw - 24px));
  min-width: min(460px, calc(100vw - 24px));
  min-height: 480px;
}

.stream-account-code-window.utility-window:not(.minimized):not(.taskbar-closed) {
  width: min(860px, calc(100vw - 24px));
  min-width: min(760px, calc(100vw - 24px));
  min-height: 540px;
}

.utility-window.minimized {
  display: none !important;
}

.utility-window .metrics-head,
.utility-window .stream-log-head,
.utility-window .stat-history-head,
.utility-window .audio-mixer-head,
.utility-window .mixdown-settings-head,
.utility-window .admin-window-head,
.utility-window .live-chat-head {
  cursor: grab;
  user-select: none;
}

.desktop-locked .window-titlebar,
.desktop-locked .card-head {
  cursor: default;
}

.desktop-locked .window-minimize,
.desktop-locked .window-reset,
.desktop-locked .window-close {
  opacity: 0.45;
  cursor: not-allowed;
}

.utility-window.dragging .metrics-head,
.utility-window.dragging .stream-log-head,
.utility-window.dragging .stat-history-head,
.utility-window.dragging .audio-mixer-head,
.utility-window.dragging .mixdown-settings-head,
.utility-window.dragging .admin-window-head,
.utility-window.dragging .live-chat-head {
  cursor: grabbing;
}

.metrics-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.metrics-head h2 {
  font-size: 20px;
}

#metricsSummary {
  color: var(--muted);
  margin-top: 6px;
}

.metrics-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.monthly-bandwidth {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.monthly-bandwidth div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d0d0d;
  padding: 14px;
}

.monthly-bandwidth span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.monthly-bandwidth strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}

.monthly-cap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d0d0d;
  padding: 14px;
  margin-bottom: 14px;
}

.monthly-cap-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.monthly-cap-head span,
.monthly-cap p {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.monthly-cap-head strong {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.monthly-cap-track {
  height: 16px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(242, 242, 242, 0.06);
}

.monthly-cap-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transition: width 240ms ease;
}

.monthly-cap-fill.warning {
  background: linear-gradient(90deg, var(--accent-2), #cfcfcf);
}

.monthly-cap-fill.danger {
  background: linear-gradient(90deg, #cfcfcf, var(--danger));
}

.monthly-cap p {
  margin-top: 8px;
}

.network-sat-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d0d0d;
  padding: 14px;
  margin-bottom: 14px;
}

.network-sat-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.network-sat-head h3 {
  margin: 0;
  font-size: 16px;
}

.network-sat-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.network-calibrate-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.network-sat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.network-sat-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(242, 242, 242, 0.03);
  padding: 10px 12px;
}

.network-sat-card.highlight {
  border-color: rgba(200, 200, 200, 0.45);
  background: rgba(200, 200, 200, 0.08);
}

.network-sat-card span,
.network-sat-card p {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.network-sat-card strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.network-sat-card p {
  margin-top: 6px;
  text-transform: none;
}

.network-sat-meters {
  display: grid;
  gap: 10px;
}

.network-sat-meter-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 6px;
}

.network-sat-meter-head span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.network-sat-meter-head strong {
  font-variant-numeric: tabular-nums;
}

.network-sat-track {
  position: relative;
  height: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(242, 242, 242, 0.06);
}

.network-sat-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transition: width 240ms ease, background 240ms ease;
}

.network-sat-fill.nic {
  background: linear-gradient(90deg, #6ea8ff, #9bc2ff);
}

.network-sat-fill.warning {
  background: linear-gradient(90deg, var(--accent-2), #cfcfcf);
}

.network-sat-fill.danger {
  background: linear-gradient(90deg, #cfcfcf, var(--danger));
}

.network-sat-mark {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(242, 242, 242, 0.35);
}

.network-sat-mark.warn {
  background: rgba(200, 200, 200, 0.7);
}

.network-sat-mark.danger {
  background: rgba(255, 92, 92, 0.8);
}

.server-load-mini.near-sat {
  box-shadow: inset 0 0 0 1px rgba(200, 200, 200, 0.55);
}

.server-load-mini.saturated {
  box-shadow: inset 0 0 0 1px rgba(255, 92, 92, 0.75);
}

.server-load-mini-foot #serverLoadMiniSat {
  color: #cfcfcf;
}

@media (max-width: 1100px) {
  .network-sat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.legend-item {
  font-size: 12px;
  font-weight: 700;
}

.legend-item.cpu {
  color: var(--accent);
}

.legend-item.inbound {
  color: var(--accent-2);
}

.legend-item.outbound {
  color: #cfcfcf;
}

#metricsChart {
  display: block;
  width: 100%;
  height: 280px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d0d0d;
}

.stream-usage-panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d0d0d;
  padding: 14px;
}

.stream-usage-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 10px;
}

.stream-usage-head h2 {
  font-size: 16px;
}

.stream-usage-head p,
.stream-usage-empty {
  color: var(--muted);
  font-size: 13px;
}

.stream-usage-list {
  display: grid;
  gap: 8px;
}

.stream-usage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 120px;
  gap: 10px;
  align-items: center;
  border-top: 1px solid rgba(242, 242, 242, 0.08);
  padding-top: 8px;
}

.stream-usage-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-usage-rate,
.stream-usage-total {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.stream-usage-rate {
  color: var(--accent);
}

.stream-usage-total {
  color: var(--muted);
}

.card {
  --window-pad: 0px;
  position: relative;
  flex: 0 0 min(720px, calc(100vw - 380px));
  width: min(720px, calc(100vw - 380px));
  min-width: min(520px, calc(100vw - 380px));
  min-height: 260px;
  max-height: calc(100vh - 168px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(210, 210, 210, 0.42);
  background: linear-gradient(180deg, rgba(22, 22, 22, 0.98), rgba(12, 12, 12, 0.98));
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(242, 242, 242, 0.04);
  touch-action: auto;
  cursor: default;
  resize: none !important;
  user-select: auto;
  -webkit-user-drag: none;
  scroll-snap-align: start;
}

.card + .card {
  margin-left: 14px;
}

.card + .card::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: -8px;
  width: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
}

.card * {
  -webkit-user-drag: none;
}

.card.mixdown-card {
  border-color: rgba(210, 210, 210, 0.42);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(242, 242, 242, 0.04);
}

.card.mixdown-card .window-titlebar {
  background: transparent;
}

.card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  cursor: default;
  user-select: none;
  touch-action: auto;
}

.card > .card-head.window-titlebar {
  position: sticky;
  top: 0;
  z-index: 9;
  min-height: 44px;
  border-radius: 0;
  border: 1px solid rgba(242, 242, 242, 0.18);
  border-bottom: 0;
  background: rgba(18, 18, 18, 0.98);
  padding: 7px 10px 8px;
  margin: 0 0 0;
  color: var(--text);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.card > .card-head.window-titlebar .meta {
  display: none;
}

.card > .card-head.window-titlebar .window-actions {
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.card > .card-head.window-titlebar .window-actions .badge {
  order: 20;
  margin-left: 4px;
  flex: 0 0 auto;
}

.window-titlebar {
  position: sticky;
  top: calc(-1 * var(--window-pad, 18px));
  z-index: 4;
  min-height: 44px;
  border: 0;
  border-radius: 10px 10px 0 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 58%),
    linear-gradient(90deg, var(--window-frame-dark), var(--window-frame));
  padding: 0 14px;
  margin: calc(-1 * var(--window-pad, 18px)) calc(-1 * var(--window-pad, 18px)) 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.22);
}

.window-titlebar > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.window-titlebar h2 {
  color: #ffffff;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 700;
}

.window-titlebar p,
.window-titlebar .meta,
.window-titlebar #metricsSummary,
.window-titlebar .account-window-summary {
  color: rgba(255, 255, 255, 0.72);
  margin-top: 4px;
  font-size: 12px;
}

.card.is-new {
  animation: new-stream-flash 1s ease-in-out 6;
}

.card.window-flash,
.utility-window.window-flash {
  animation: called-window-flash 0.42s ease-in-out 4;
}

@keyframes new-stream-flash {
  0%,
  100% {
    border-color: var(--line);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  }
  50% {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(180, 180, 180, 0.24), 0 22px 56px rgba(180, 180, 180, 0.18);
  }
}

@keyframes called-window-flash {
  0%,
  100% {
    border-color: var(--window-frame);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(210, 210, 210, 0.16);
  }
  50% {
    border-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(210, 210, 210, 0.38), 0 22px 58px rgba(210, 210, 210, 0.24);
  }
}

.window-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.window-minimize,
.window-reset,
.window-close {
  width: 34px;
  min-height: 34px;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 14px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.window-minimize::before,
.window-close::before,
.window-close::after,
.speaker-icon::before,
.speaker-icon::after,
.window-speaker::before,
.window-speaker::after {
  content: none;
  display: none;
}

.window-minimize:hover,
.window-reset:hover,
.window-close:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: transparent;
}

.window-reset {
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
}

.window-speaker {
  display: none;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 6px;
  color: #ffffff;
  position: relative;
}

.window-speaker.active {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.card.minimized {
  width: min(460px, 100%);
  height: auto !important;
  min-height: 0;
  resize: none;
}

.card.taskbar-closed,
.utility-window.taskbar-closed {
  display: none !important;
}

.admin-window-head h2 {
  font-size: 18px;
}

.admin-auth-form,
.admin-credential-form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.admin-credential-form {
  grid-template-columns: 1fr;
}

.admin-auth-form input,
.admin-credential-form input,
.stream-account-edit-form input,
.stream-account-edit-form select,
.stream-account-code-line input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  background: #0d0d0d;
  color: var(--text);
  border-radius: 6px;
  padding: 8px 10px;
}

.stream-accounts-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  max-height: calc(100% - 136px);
  overflow: auto;
}

.stream-accounts-search {
  display: grid;
  gap: 5px;
  margin-top: 12px;
}

.stream-accounts-search span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.stream-accounts-search input {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(210, 210, 210, 0.35);
  border-radius: 6px;
  background: #0d0d0d;
  color: var(--text);
  padding: 8px 10px;
}

.stream-account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px 90px;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(242, 242, 242, 0.1);
  border-radius: 8px;
  background: rgba(13, 13, 13, 0.5);
  padding: 8px;
}

.stream-accounts-empty {
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(242, 242, 242, 0.1);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(13, 13, 13, 0.5);
}

.stream-account-summary {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.stream-account-summary strong {
  min-width: 0;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  overflow: hidden;
  font-size: 14px;
}

.stream-account-summary strong > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-account-hours {
  flex: 0 0 auto;
  border: 1px solid rgba(242, 242, 242, 0.32);
  border-radius: 999px;
  background: rgba(242, 242, 242, 0.08);
  color: var(--text);
  padding: 2px 7px;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stream-account-delete-button {
  border-color: rgba(180, 180, 180, 0.55);
  color: var(--danger);
}

.stream-account-delete-button:hover {
  border-color: rgba(180, 180, 180, 0.82);
  background: rgba(180, 180, 180, 0.13);
}

.stream-account-summary span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.stream-account-popup {
  max-width: calc(100vw - 24px);
}

.stream-account-popup .admin-window-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  min-height: 54px;
  margin: -16px -16px 14px;
  padding: 10px 12px;
}

.stream-account-popup .admin-window-head > div:first-child {
  min-width: 0;
}

.stream-account-popup .admin-window-head h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-account-popup .admin-window-head p {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  line-height: 1.35;
  text-transform: none;
}

.stream-account-popup-body {
  display: grid;
  gap: 12px;
  margin-top: 0;
}

.stream-account-edit-form {
  display: grid;
  gap: 12px;
}

.stream-account-edit-form label > span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.stream-account-enabled {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.stream-account-enabled input {
  width: auto;
  min-height: auto;
}

.stream-account-nsfw-hint {
  margin: 0;
  color: #f0b4b4;
  font-size: 11px;
  line-height: 1.35;
}

.card.nsfw-card > .card-head.window-titlebar .badge {
  background: #d10f24;
  border-color: #ff8a9a;
}

.nsfw-preview-gate {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  text-align: center;
  background: rgba(8, 6, 8, 0.92);
  color: #f5dede;
}

.nsfw-preview-gate strong {
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ff8a9a;
}

.nsfw-preview-gate p {
  margin: 0;
  max-width: 320px;
  font-size: 13px;
  line-height: 1.4;
  color: #e8c8c8;
}

.nsfw-preview-opt-in {
  border: 1px solid rgba(255, 138, 154, 0.55);
  border-radius: 8px;
  background: rgba(160, 40, 64, 0.55);
  color: #fff;
  font: inherit;
  font-size: 13px;
  padding: 8px 14px;
  cursor: pointer;
}

.nsfw-preview-opt-in:hover {
  background: rgba(190, 55, 80, 0.75);
}

.card.nsfw-gated .preview video {
  visibility: hidden;
}

.stream-account-edit-form input[type="password"] {
  border-color: rgba(210, 210, 210, 0.35);
}

.stream-account-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
  border: 1px solid rgba(210, 210, 210, 0.36);
  border-radius: 8px;
  background: rgba(13, 13, 13, 0.62);
  padding: 4px;
}

.stream-account-tabs button {
  min-height: 34px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.stream-account-tabs button.active {
  border-color: rgba(210, 210, 210, 0.58);
  background: rgba(210, 210, 210, 0.16);
  color: var(--text);
}

.stream-account-tab-body {
  min-width: 0;
}

.stream-account-popup-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.stream-account-code-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stream-account-code-group {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid rgba(242, 242, 242, 0.1);
  border-radius: 8px;
  background: rgba(13, 13, 13, 0.38);
  padding: 12px;
}

.stream-account-code-group h3 {
  margin: 0 0 2px;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--text);
}

.stream-account-code-line {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 70px;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.stream-account-code-line input {
  min-height: 34px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

@media (max-width: 960px) {
  .stream-account-code-details {
    grid-template-columns: 1fr;
  }
}

.admin-credential-form input[readonly] {
  color: var(--muted);
}

.admin-credential-form label span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.admin-credential-form fieldset {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 13, 13, 0.45);
  padding: 12px;
}

.admin-credential-form legend {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  padding: 0 6px;
  text-transform: uppercase;
}

.admin-credential-shot {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d0d0d;
  overflow: hidden;
}

.admin-credential-shot img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #050505;
}

.admin-credential-shot img[hidden] {
  display: none;
}

.admin-credential-shot figcaption {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  padding: 8px 10px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 10px;
  background: var(--danger);
}

.status-dot.online {
  background: var(--accent);
}

.admin-inline-notice,
.admin-inline-error {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.admin-inline-notice.error,
.admin-inline-error {
  color: var(--danger);
}

.card.minimized .details,
.card.minimized .stream-chart-grid,
.card.minimized .viewer-panel,
.card.minimized .client-panel {
  display: none;
}

.card.minimized .meta {
  display: none;
}

.card.minimized .preview video,
.card.minimized .meter {
  min-height: 130px;
}

.card.minimized .player-controls {
  grid-template-columns: auto auto 1fr auto;
}

.card h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.stream-title-link {
  color: var(--text);
  text-decoration: none;
}

.stream-title-link:hover {
  color: var(--accent);
}

.meta {
  color: var(--muted);
  margin-top: 6px;
  font-size: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #ff4d4d;
  color: #ffffff;
  border-radius: 6px;
  background: #d10f24;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: 0 0 0 0 rgba(209, 15, 36, 0.45), 0 0 16px rgba(209, 15, 36, 0.38);
  animation: live-badge-pulse 1.35s ease-in-out infinite;
}

.badge-viewers {
  min-width: 24px;
  border-radius: 999px;
  background: #ffffff;
  color: #101010;
  padding: 3px 7px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.badge.offline {
  border-color: rgba(180, 180, 180, 0.45);
  color: var(--danger);
  animation: none;
  background: rgba(180, 180, 180, 0.08);
  box-shadow: none;
}

.badge.offline .badge-viewers {
  background: rgba(242, 242, 242, 0.78);
  color: #2a2a2a;
}

@keyframes live-badge-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(209, 15, 36, 0.4), 0 0 14px rgba(209, 15, 36, 0.28);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 0 0 5px rgba(209, 15, 36, 0.12), 0 0 22px rgba(209, 15, 36, 0.5);
  }
}

.preview {
  position: sticky;
  top: 44px;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: stretch;
  background: rgba(18, 18, 18, 0.98);
  border-bottom: 1px solid rgba(242, 242, 242, 0.22);
  padding-bottom: 8px;
}

.video-shell {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  background: #050505;
}

.preview video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 180px;
  max-height: 360px;
  object-fit: contain;
  background: #050505;
}

.mixdown-video-plate {
  display: none;
}

.mixdown-card .video-shell {
  position: relative;
}

.mixdown-card .preview video {
  opacity: 0;
}

.mixdown-card .mixdown-video-plate {
  position: absolute;
  inset: 0 0 55px 0;
  z-index: 1;
  display: grid;
  place-content: center;
  gap: 8px;
  aspect-ratio: 16 / 9;
  min-height: 180px;
  max-height: 360px;
  border-bottom: 1px solid rgba(180, 180, 180, 0.24);
  background:
    radial-gradient(circle at 50% 42%, rgba(180, 180, 180, 0.18), transparent 34%),
    repeating-linear-gradient(90deg, rgba(180, 180, 180, 0.055) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(0deg, rgba(180, 180, 180, 0.05) 0 1px, transparent 1px 34px),
    #10090a;
  text-align: center;
}

.mixdown-video-plate strong {
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
}

.mixdown-video-plate span {
  color: rgba(255, 214, 218, 0.72);
  font-size: 13px;
  text-transform: uppercase;
}

.player-controls {
  display: grid;
  grid-template-columns: auto auto minmax(120px, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: rgba(13, 13, 13, 0.96);
}

.player-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.mute-toggle {
  gap: 8px;
}

.speaker-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}

.stream-card-pill-icon {
  font-size: 13px;
  line-height: 1;
}

.is-live-audio {
  border-color: rgba(210, 210, 210, 0.7);
  color: var(--accent);
}

.volume-control {
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr);
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  min-width: 0;
}

.volume-control span {
  text-transform: uppercase;
}

.volume-range {
  width: 100%;
  accent-color: var(--accent);
}

.meter {
  position: relative;
  align-self: stretch;
  display: flex;
  width: max-content;
  min-width: 10px;
  max-width: 30px;
  min-height: 180px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #0d0d0d;
}

.meter-channels {
  display: flex;
  align-items: stretch;
  gap: 1px;
  width: 100%;
  height: 100%;
}

.meter-channel {
  position: relative;
  flex: 1 1 5px;
  width: 5px;
  min-width: 2px;
  max-width: 5px;
  overflow: hidden;
  border-radius: 2px;
  background:
    linear-gradient(to top, rgba(210, 210, 210, 0.12), rgba(255, 205, 86, 0.16) 72%, rgba(180, 180, 180, 0.18)),
    #0d0d0d;
}

.meter::before,
.meter::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px solid rgba(242, 242, 242, 0.18);
  z-index: 2;
}

.meter::before {
  bottom: 72%;
}

.meter::after {
  bottom: 90%;
}

.meter-channel-fill,
.meter-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0%;
  background: linear-gradient(to top, #1f9a4a 0%, #c6e04a 62%, #ffd23a 78%, #e10600 100%);
  transition: height 70ms linear;
}

.feed-detector {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #0d0d0d;
  padding: 7px 8px;
}

.feed-detector-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.feed-detector-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #737373;
}

.feed-detector.is-watching .feed-detector-dot {
  background: #d0d0d0;
  animation: detector-pulse 1.6s ease-in-out infinite;
}

.feed-detector.is-acting .feed-detector-dot {
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16);
  animation: detector-pulse 0.7s ease-in-out infinite;
}

.feed-detector.is-recovering .feed-detector-dot {
  background: #d10f24;
  box-shadow: 0 0 0 3px rgba(209, 15, 36, 0.2);
}

.feed-detector-state {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.feed-detector-latency {
  margin-left: auto;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.feed-detector-track {
  position: relative;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(242, 242, 242, 0.12);
}

.feed-detector-target {
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: 18.75%;
  width: 1px;
  background: rgba(255, 255, 255, 0.72);
}

.feed-detector-fill {
  display: block;
  width: 0%;
  height: 100%;
  background: #d0d0d0;
}

.feed-detector.is-late .feed-detector-fill {
  background: #d10f24;
}

.feed-detector-note {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bitrate-hint {
  margin: 0;
  border: 1px solid rgba(242, 242, 242, 0.28);
  border-radius: 3px;
  background: #161616;
  color: #f2f2f2;
  font-size: 12px;
  line-height: 1.35;
  padding: 7px 8px;
}

@keyframes detector-pulse {
  0%,
  100% { opacity: 0.45; }
  50% { opacity: 1; }
}

.details {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.details div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 8px;
  background: rgba(13, 13, 13, 0.78);
}

.details .audio-box {
  grid-column: span 2;
}

.details .audio-box .tracks {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.details .dropped-frames,
.details .frame-rate,
.details .resolution,
.watch-stats .dropped-frames,
.watch-stats .frame-rate,
.watch-stats .resolution {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}

.dropped-frames.is-dropping {
  color: #d10f24;
}

.details .stream-action-tile {
  border-color: rgba(180, 180, 180, 0.45);
}

.drop-streamer {
  width: auto;
  min-height: 30px;
  border: 1px solid rgba(180, 180, 180, 0.55);
  border-radius: 6px;
  background: rgba(230, 230, 230, 0.1);
  color: var(--danger);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 0 10px;
}

.drop-streamer:hover:not(:disabled) {
  background: rgba(230, 230, 230, 0.18);
  border-color: rgba(180, 180, 180, 0.78);
}

.drop-streamer:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.stream-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 6px;
}

.quality-panel,
.bandwidth-panel,
.viewer-panel,
.client-panel,
.watch-quality {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #0d0d0d;
  padding: 8px;
  min-width: 0;
}

.quality-head,
.bandwidth-head,
.viewer-head,
.client-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.quality-head h2,
.quality-head h3,
.bandwidth-head h3,
.viewer-head h3,
.client-head h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
}

.quality-head p,
.bandwidth-head p,
.viewer-head p,
.client-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.client-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(76px, 1fr));
  gap: 8px;
  flex: 0 1 360px;
}

.client-counts div {
  border: 1px solid rgba(242, 242, 242, 0.1);
  border-radius: 6px;
  background: rgba(32, 32, 32, 0.56);
  padding: 7px 10px;
  min-width: 0;
}

.client-counts span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
}

.client-counts strong {
  display: block;
  margin-top: 3px;
  color: var(--accent);
  font-size: 24px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.client-counts .client-offline-count {
  color: rgba(180, 180, 180, 0.9);
}

.client-list {
  display: grid;
  gap: 6px;
}

.client-row {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(108px, 0.72fr) minmax(100px, 1fr) minmax(68px, auto) 34px;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(242, 242, 242, 0.1);
  border-radius: 6px;
  background: rgba(32, 32, 32, 0.62);
  padding: 5px 8px;
  font-size: 12px;
}

.client-connection {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.output-kind {
  flex: 0 0 auto;
  border: 1px solid rgba(242, 242, 242, 0.28);
  border-radius: 999px;
  padding: 1px 6px;
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.client-delay {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  min-width: 0;
}

.client-delay-value {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
}

.client-row .output-how,
.client-row .client-delay-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  text-transform: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-row.is-late .client-delay-value {
  color: #d10f24;
}

.client-row strong,
.client-row b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.client-row strong {
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.client-flag {
  flex: 0 0 auto;
  font-size: 13px;
  line-height: 1;
}

.client-health {
  color: var(--accent);
  font-style: normal;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.client-chart {
  display: block;
  width: 100%;
  height: 26px;
  min-width: 0;
  border: 1px solid rgba(242, 242, 242, 0.08);
  border-radius: 4px;
  background: #0d0d0d;
}

.client-row span {
  color: var(--muted);
  text-transform: uppercase;
}

.client-row .output-kind {
  color: var(--text);
  text-transform: uppercase;
}

.client-row b {
  color: var(--accent);
  text-align: right;
}

.client-row.client-slow {
  border-color: rgba(180, 180, 180, 0.45);
}

.client-row.client-slow .client-health,
.client-row.client-slow b {
  color: var(--danger);
}

.client-row.client-offline {
  border-color: rgba(180, 180, 180, 0.2);
  background: rgba(48, 48, 48, 0.42);
  color: rgba(242, 242, 242, 0.62);
}

.client-row.client-offline strong,
.client-row.client-offline .client-health,
.client-row.client-offline span,
.client-row.client-offline b {
  color: rgba(180, 180, 180, 0.68);
}

.client-row.client-offline .client-chart {
  opacity: 0.7;
}

.client-disconnect {
  width: 30px;
  min-height: 28px;
  padding: 0;
  border-color: rgba(180, 180, 180, 0.35);
  color: var(--danger);
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.client-disconnect:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.client-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.client-event-list {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.client-event,
.client-event-empty {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.client-event {
  display: grid;
  grid-template-columns: 74px 92px minmax(80px, 1fr) minmax(72px, auto);
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(242, 242, 242, 0.08);
  border-radius: 6px;
  background: rgba(13, 13, 13, 0.42);
  padding: 5px 8px;
}

.client-event time,
.client-event b {
  font-variant-numeric: tabular-nums;
}

.client-event strong {
  color: var(--text);
}

.client-event b {
  color: var(--accent);
  text-align: right;
}

.client-event.slow,
.client-event.stalled,
.client-event.disconnected {
  border-color: rgba(180, 180, 180, 0.35);
}

.client-event.slow strong,
.client-event.stalled strong,
.client-event.disconnected strong {
  color: var(--danger);
}

.bandwidth-legend {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}

.quality-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.quality-legend .legend-item::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 3px;
  margin-right: 5px;
  vertical-align: middle;
  background: currentColor;
}

.quality-score-line {
  color: var(--accent);
}

.viewer-health-line {
  color: var(--accent-2);
}

.quality-score,
.viewer-current,
#qualityScore {
  min-width: 48px;
  text-align: right;
  color: var(--accent);
  font-size: 28px;
  line-height: 1;
}

.quality-score.watch,
#qualityScore.watch {
  color: #cfcfcf;
}

.quality-score.poor,
#qualityScore.poor {
  color: var(--danger);
}

.quality-chart,
.bandwidth-chart,
.viewer-chart,
#qualityChart {
  display: block;
  width: 100%;
  height: 128px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0d0d0d;
}

.viewer-chart {
  height: 72px;
}

dt {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

dd {
  margin: 6px 0 0;
  font-size: 16px;
}

.bandwidth-consumed,
.feed-rate {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.stream-card-pill,
.stream-outputs-gear,
.stream-account-profile {
  appearance: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: auto;
  min-width: 84px;
  min-height: 30px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(210, 210, 210, 0.5);
  border-radius: 6px;
  background: rgba(210, 210, 210, 0.12);
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.stream-card-pill-icon,
.stream-outputs-gear-icon {
  width: auto;
  height: auto;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
}

.stream-card-pill:hover,
.stream-card-pill:focus-visible,
.stream-outputs-gear:hover,
.stream-outputs-gear:focus-visible,
.stream-account-profile:hover,
.stream-account-profile:focus-visible {
  color: #f2f2f2;
  border-color: rgba(210, 210, 210, 0.85);
  background: rgba(210, 210, 210, 0.22);
  outline: none;
}

.stream-card-pill:disabled,
.stream-account-profile:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.stream-outputs-popup {
  position: fixed;
  z-index: 12000;
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 2px solid var(--window-frame, rgba(210, 210, 210, 0.55));
  background: var(--window-body, #101010);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

.stream-outputs-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(242, 242, 242, 0.12);
}

.stream-outputs-popup-head strong {
  font-size: 13px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.stream-outputs-popup-close {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(242, 242, 242, 0.22);
  background: rgba(13, 13, 13, 0.94);
  color: var(--muted);
  border-radius: 6px;
  width: 30px;
  height: 30px;
  min-height: 30px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.stream-outputs-popup-close:hover,
.stream-outputs-popup-close:focus-visible {
  color: var(--accent);
  border-color: rgba(210, 210, 210, 0.55);
  outline: none;
}

.stream-outputs-popup-body {
  display: grid;
  gap: 8px;
  max-height: min(60vh, 420px);
  overflow: auto;
  padding-top: 2px;
}

.stream-outputs-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.link-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 74px;
  align-items: center;
  gap: 8px;
}

.link-row .copy {
  min-height: 30px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.protocol {
  color: var(--accent);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

code {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  background: #0d0d0d;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
}

.stream-page {
  background:
    radial-gradient(circle at top left, rgba(210, 210, 210, 0.18), transparent 32rem),
    linear-gradient(135deg, #0a0a0a 0%, #141414 48%, #101010 100%);
}

.watch-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 24px;
}

.watch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-link {
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.watch-player {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #050505;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.watch-player video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 520px;
  max-height: calc(100vh - 210px);
  object-fit: contain;
  background: #050505;
}

.watch-player video[hidden],
.watch-controls[hidden],
.watch-offline[hidden] {
  display: none;
}

.watch-controls {
  border-top-color: var(--line);
}

.watch-offline {
  min-height: 520px;
  aspect-ratio: 16 / 9;
  display: grid;
  place-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
}

.watch-offline h1 {
  font-size: clamp(28px, 4vw, 52px);
}

.watch-offline p,
.watch-status {
  color: var(--muted);
}

.watch-panel {
  border: 1px solid var(--line);
  background: rgba(24, 24, 24, 0.86);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(170px, 0.7fr) minmax(220px, 1fr) minmax(180px, 0.8fr) minmax(240px, 1.1fr);
  gap: 14px;
  align-items: center;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.watch-panel h1 {
  overflow-wrap: anywhere;
}

.watch-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0;
  min-width: 0;
}

.watch-stats div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #0d0d0d;
  min-width: 0;
}

.watch-stats dd {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.15;
  text-align: right;
}

.watch-status {
  text-align: right;
}

.watch-quality {
  min-width: 0;
  width: 100%;
}

@media (max-width: 640px) {
  body {
    padding-bottom: 0;
  }

  .shell {
    width: 100%;
    padding: 60px 10px 28px;
  }

  .dashboard-main {
    width: 100%;
  }

  .presence-panel {
    top: 52px;
    right: 10px;
    bottom: 10px;
    width: min(280px, calc(100vw - 20px));
    max-height: none;
    grid-template-rows: auto minmax(100px, 1fr) auto minmax(64px, 0.5fr) auto;
    border: 1px solid rgba(210, 210, 210, 0.28);
    border-radius: 8px;
  }

  .presence-panel.has-server-rail {
    grid-template-rows: auto minmax(80px, 0.55fr) auto minmax(44px, 0.3fr) minmax(150px, 1.4fr) auto;
  }

  .live-chat-panel.utility-window:not(.minimized):not(.taskbar-closed) {
    width: min(400px, calc(100vw - 16px));
    height: min(70vh, calc(100vh - 80px));
  }

  .topbar {
    align-items: center;
    flex-direction: row;
    padding: 7px 10px;
  }

  .top-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .stream-scroll-rail {
    left: 10px;
    right: 10px;
    bottom: 12px;
  }

  .server-load-mini {
    width: 100%;
  }

  .task-clock-panel {
    width: 100%;
    min-height: 0;
    height: auto !important;
  }

  .clock-popup {
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    max-height: min(360px, calc(100vh - 80px));
  }

  .start-menu-panel {
    left: 0;
    width: max-content;
    max-width: calc(100vw - 20px);
  }

  .task-clock {
    font-size: 16px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .card,
  .card.minimized {
    flex-basis: 100%;
    min-width: 100%;
    width: 100%;
    max-height: calc(100vh - 230px);
  }

  .metrics-head {
    flex-direction: column;
  }

  .client-head {
    flex-direction: column;
  }

  .client-counts {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .client-row {
    grid-template-columns: minmax(0, 1fr) minmax(96px, auto) 34px;
  }

  .client-row .client-chart,
  .client-row .client-rate {
    display: none;
  }

  .metrics-legend {
    justify-content: flex-start;
  }

  .monthly-bandwidth {
    grid-template-columns: 1fr;
  }

  .stream-usage-head,
  .stream-usage-row,
  .stream-account-row {
    grid-template-columns: 1fr;
  }

  .stream-usage-head {
    align-items: flex-start;
  }

  .stream-usage-rate,
  .stream-usage-total {
    text-align: left;
  }

  .details {
    grid-template-columns: 1fr;
  }

  .details .audio-box {
    grid-column: auto;
  }

  .stream-chart-grid {
    grid-template-columns: 1fr;
  }

  .link-row {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .preview {
    grid-template-columns: minmax(0, 1fr) 14px;
  }

  .player-controls {
    grid-template-columns: 1fr 1fr;
  }

  .volume-control {
    grid-column: 1 / -1;
  }

  .mixer-master,
  .mixer-controls {
    grid-template-columns: 1fr;
  }

  .preview video,
  .meter {
    min-height: 170px;
  }

  .copy {
    grid-column: 2;
  }
}

@media (max-width: 1180px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .stream-log-panel {
    position: static;
    max-height: none;
  }

  .stream-log-list {
    max-height: 360px;
  }
}

@media (max-width: 860px) {
  .watch-shell {
    width: min(100% - 20px, 1180px);
    padding: 16px 0;
  }

  .watch-layout {
    grid-template-columns: 1fr;
    align-items: start;
  }

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

  .watch-status {
    text-align: left;
  }

  .watch-player video,
  .watch-offline {
    min-height: 220px;
  }
}

/* VRFOX Studio desk. Matches the login charcoal and ember panels. */
:root {
  --bg: #090807;
  --panel: #14110f;
  --panel-2: #1c1814;
  --line: rgba(224, 186, 150, 0.28);
  --text: #f4efe8;
  --muted: #b7aa9e;
  --accent: #e08a4a;
  --accent-2: #c86a32;
  --danger: #e7a07a;
  --window-frame: #c9895a;
  --window-frame-dark: #6a3a22;
  --window-frame-light: #f0a15f;
  --window-body: #120f0c;
}

body:not(.login-page) {
  background:
    linear-gradient(180deg, rgba(9, 8, 7, 0.28), rgba(9, 8, 7, 0.72)),
    url("/login-hero.jpg?v=20261121-vrfox-theme") 68% center / cover no-repeat,
    #090807;
  color: #f4efe8;
}

.shell {
  padding: 108px 20px 48px;
}

.topbar {
  min-height: 86px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(224, 122, 61, 0.35);
  background:
    linear-gradient(180deg, rgba(224, 122, 61, 0.16), transparent 72%),
    rgba(16, 14, 12, 0.94);
}

.studio-kicker {
  margin: 0 0 4px;
  color: #e08a4a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1;
  text-transform: uppercase;
}

.topbar h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

#summary {
  margin-top: 6px;
  color: #b7aa9e;
  font-size: 12px;
}

.studio-menu-toggle,
.start-menu-toggle {
  border-color: rgba(224, 186, 150, 0.35);
  background: #100e0c;
  color: #f0a15f;
}

.studio-menu-toggle[aria-expanded="true"],
.start-menu-toggle[aria-expanded="true"] {
  border-color: #e08a4a;
  background: #241710;
}

.start-menu-panel {
  border: 1px solid rgba(224, 122, 61, 0.35);
  background: rgba(16, 14, 12, 0.96);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
}

.studio-menu-btn {
  border: 1px solid rgba(224, 186, 150, 0.28);
  background:
    linear-gradient(180deg, rgba(224, 122, 61, 0.12), transparent 70%),
    #1c1814;
  color: #f4efe8;
}

.studio-menu-btn:hover,
.studio-menu-btn:focus-visible {
  border-color: #e08a4a;
  background: #2a1c14;
}

.presence-panel {
  top: 98px;
  border-left: 1px solid rgba(224, 122, 61, 0.35);
  background:
    linear-gradient(180deg, rgba(224, 122, 61, 0.12), transparent 180px),
    rgba(16, 14, 12, 0.94);
}

.live-chat-panel,
.presence-card,
.server-load-mini {
  border-color: rgba(224, 186, 150, 0.28);
  background: rgba(18, 15, 12, 0.92);
}

.card {
  max-height: calc(100vh - 210px);
  border: 1px solid rgba(224, 122, 61, 0.35);
  background: linear-gradient(180deg, rgba(28, 22, 18, 0.92), rgba(14, 12, 10, 0.94));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.46);
}

.card + .card::before {
  background: linear-gradient(180deg, #f0a15f, #c86a32);
}

.utility-window {
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(224, 122, 61, 0.2);
}

.utility-window:not(.minimized) {
  max-height: calc(100vh - 124px);
}

.window-titlebar {
  background:
    linear-gradient(180deg, rgba(255, 214, 180, 0.18), transparent 58%),
    linear-gradient(90deg, #6a3a22, #c9895a);
  color: #fff8f3;
}

.window-titlebar h2,
.window-titlebar p,
.window-titlebar .meta,
.window-titlebar #metricsSummary,
.window-titlebar .account-window-summary {
  color: #fff8f3;
}

button,
.copy,
.button-link,
.player-button {
  border-color: rgba(224, 186, 150, 0.28);
  background: #1c1814;
  color: #f4efe8;
}

button:hover,
.copy:hover,
.button-link:hover,
.player-button:hover {
  border-color: #e08a4a;
}

.stream-scroll-rail {
  border-color: rgba(224, 122, 61, 0.4);
  background: rgba(16, 14, 12, 0.94);
}

.stream-scroll-thumb {
  border-color: rgba(240, 161, 95, 0.7);
  box-shadow: 0 0 18px rgba(224, 138, 74, 0.35);
}
/* Fixed edgeless video wall. Empty cells stay a silent test pattern. */
body:not(.login-page) {
  background: #090807;
}

body:not(.login-page) .stream-scroll-rail {
  display: none;
}

body:not(.login-page) .topbar {
  flex-wrap: wrap;
  gap: 10px 16px;
}

.matrix-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.matrix-modes,
.matrix-pages {
  display: flex;
  align-items: center;
  gap: 6px;
}

.matrix-modes button,
.matrix-pages button {
  min-width: 36px;
  min-height: 32px;
  height: 32px;
  padding: 0 10px;
  border-color: rgba(224, 186, 150, 0.35);
  background: #1c1814;
  color: #f4efe8;
}

.matrix-modes button[aria-pressed="true"] {
  border-color: #e08a4a;
  background: #2a1c14;
  color: #fff8f3;
}

.matrix-pages span {
  min-width: 52px;
  color: #f4efe8;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

body:not(.login-page) .grid {
  position: fixed;
  z-index: 2;
  top: 108px;
  right: 300px;
  bottom: 0;
  left: 0;
  display: grid;
  align-items: stretch;
  justify-items: stretch;
  align-content: stretch;
  gap: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #000;
}

body:not(.login-page) .grid[data-mode="4"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

body:not(.login-page) .grid[data-mode="8"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

body:not(.login-page) .grid[data-mode="12"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
}

body:not(.login-page) .grid[data-mode="16"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
}

body:not(.login-page) .matrix-slot {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  align-self: stretch;
  justify-self: stretch;
  overflow: hidden;
  background: #000;
}

body:not(.login-page) .matrix-slot.matrix-drop {
  box-shadow: inset 0 0 0 3px #e08a4a;
}

body:not(.login-page) .matrix-pattern {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #050505;
}

body:not(.login-page) .matrix-pattern[hidden] {
  display: none;
}

body:not(.login-page) .matrix-bars {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(#000 0 0) bottom / 100% 18% no-repeat,
    repeating-linear-gradient(
      90deg,
      #c8c8c8 0 12.5%,
      #c8c800 0 25%,
      #00c8c8 0 37.5%,
      #00c800 0 50%,
      #c800c8 0 62.5%,
      #c80000 0 75%,
      #0000c8 0 87.5%,
      #141414 0 100%
    );
}

body:not(.login-page) .matrix-pattern span {
  position: relative;
  z-index: 1;
  color: #fff8f3;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.62);
  padding: 6px 10px;
}

body:not(.login-page) .matrix-slot > .card {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  background: #000;
}

body:not(.login-page) .card + .card,
body:not(.login-page) .matrix-slot > .card + .card {
  margin-left: 0;
}

body:not(.login-page) .card + .card::before {
  display: none;
}

body:not(.login-page) .card.matrix-dragging {
  opacity: 0.72;
}

body:not(.login-page) .card > .card-head.window-titlebar {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  border: 0;
  border-radius: 0;
  cursor: grab;
  touch-action: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0));
}

body:not(.login-page) .card > .card-head.window-titlebar h2 {
  flex: 1 1 72px;
  min-width: 0;
}

body:not(.login-page) .card > .card-head.window-titlebar .window-actions {
  flex: 1 1 auto;
  min-width: 0;
  gap: 4px;
}

body:not(.login-page) .card .stream-card-pill {
  min-width: 0;
  height: 26px;
  min-height: 26px;
  padding: 0 8px;
}

body:not(.login-page) .stream-data-gear {
  order: 19;
  width: 30px;
  min-width: 30px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border-radius: 6px;
  border-color: rgba(224, 186, 150, 0.45);
  background: #1c1814;
  color: #f0a15f;
}

body:not(.login-page) .stream-data-gear[aria-expanded="true"] {
  border-color: #e08a4a;
  background: #2a1c14;
  color: #fff8f3;
}

body:not(.login-page) .card.matrix-dragging > .card-head {
  cursor: grabbing;
}

body:not(.login-page) .card h2 {
  overflow: hidden;
  font-size: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

body:not(.login-page) .preview,
body:not(.login-page) .video-shell {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #000;
}

body:not(.login-page) .preview video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
  object-fit: cover;
  background: #000;
}

body:not(.login-page) .player-controls {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 6;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 4px;
  padding: 6px;
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
}

body:not(.login-page) .player-button {
  min-height: 28px;
  padding: 0 8px;
  font-size: 12px;
}

body:not(.login-page) .volume-control span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

body:not(.login-page) .stream-data-popup {
  position: fixed;
  z-index: 220;
  top: 56px;
  right: 8px;
  width: min(640px, calc(100vw - 16px));
  max-height: min(72vh, 680px);
  overflow: auto;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(224, 122, 61, 0.45);
  border-radius: 10px;
  background: rgba(16, 14, 12, 0.98);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
}

body:not(.login-page) .stream-data-popup[hidden] {
  display: none;
}

body:not(.login-page) .stream-data-popup .meter {
  width: 100%;
  max-width: none;
  min-height: 72px;
  max-height: 110px;
}

body:not(.login-page) .stream-data-popup .details {
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
}

body:not(.login-page) .stream-data-popup canvas {
  width: 100%;
  height: auto;
}


/* vrfox public homepage */
html.home-page,
html.home-page body {
  height: auto;
  min-height: 100%;
  overflow: auto;
}

body.home-page {
  background: #090807;
  color: #f4efe8;
}

.home-hero {
  position: relative;
  min-height: 46vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #1a120e;
}

.home-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% center;
}

.home-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding: 72px 48px 40px;
  background: linear-gradient(90deg, rgba(9, 8, 7, 0.88) 0%, rgba(9, 8, 7, 0.72) 62%, rgba(9, 8, 7, 0.05) 100%);
}

.home-kicker {
  margin: 0;
  color: #e08a4a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.home-hero h1 {
  margin: 10px 0 0;
  max-width: 14ch;
  font-size: 56px;
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.home-hero-copy p:last-child {
  max-width: 46ch;
  margin: 16px 0 0;
  color: #e7ddd3;
  font-size: 18px;
  line-height: 1.45;
}

.home-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 36px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 42px 32px 64px;
}

.home-story h2,
.home-login h2 {
  margin: 8px 0 0;
  font-size: 32px;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.home-story > p {
  max-width: 62ch;
  margin: 14px 0 0;
  color: #b7aa9e;
  font-size: 17px;
  line-height: 1.5;
}

.home-points {
  display: grid;
  gap: 14px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.home-points li {
  padding: 16px 18px;
  border: 1px solid rgba(224, 186, 150, 0.22);
  border-radius: 12px;
  background: rgba(16, 14, 12, 0.72);
}

.home-points h3 {
  margin: 0;
  color: #f0a15f;
  font-size: 16px;
}

.home-points p {
  margin: 6px 0 0;
  color: #d9cfc4;
  font-size: 15px;
  line-height: 1.45;
}

.home-login {
  align-self: start;
  padding: 26px 24px 22px;
  border: 1px solid rgba(224, 122, 61, 0.35);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(224, 122, 61, 0.16), transparent 140px),
    #100e0c;
}

.home-login-lede {
  margin: 10px 0 18px;
  color: #b7aa9e;
  font-size: 15px;
  line-height: 1.45;
}

.home-request {
  margin: 14px 0 0;
  font-size: 14px;
}

.home-request a {
  color: #f0a15f;
  font-weight: 700;
}

@media (max-width: 860px) {
  .home-hero {
    min-height: 38vh;
  }

  .home-hero h1 {
    font-size: 40px;
  }

  .home-hero-copy {
    padding: 48px 22px 28px;
    background: linear-gradient(180deg, rgba(9, 8, 7, 0.2), rgba(9, 8, 7, 0.88));
  }

  .home-main {
    grid-template-columns: 1fr;
    padding: 28px 18px 48px;
  }
}

/* vrfox camera and gear pages */
.home-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.home-links a {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid rgba(224, 138, 74, 0.45);
  border-radius: 999px;
  color: #f0a15f;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

html.studio-page,
html.studio-page body {
  height: auto;
  min-height: 100%;
  overflow: auto;
}

body.studio-page {
  background: #090807;
  color: #f4efe8;
}

.studio-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 28px;
  border-bottom: 1px solid rgba(224, 186, 150, 0.16);
}

.studio-brand {
  color: #f0a15f;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-decoration: none;
}

.studio-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.studio-nav a {
  color: #e7ddd3;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.studio-nav a[aria-current="page"] {
  color: #f0a15f;
}

.studio-hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px 32px 8px;
}

.studio-hero h1,
.cover-block h2 {
  margin: 8px 0 0;
  font-size: 52px;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.studio-lede {
  max-width: 64ch;
  margin: 14px 0 0;
  color: #b7aa9e;
  font-size: 18px;
  line-height: 1.45;
}

.studio-note,
.dog-note {
  margin: 12px 0 0;
  color: #b7aa9e;
  font-size: 14px;
  line-height: 1.45;
}

.studio-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.studio-stats div {
  min-width: 128px;
  padding: 12px 14px;
  border: 1px solid rgba(224, 186, 150, 0.22);
  border-radius: 12px;
  background: #100e0c;
}

.studio-stats strong {
  display: block;
  color: #f0a15f;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.studio-stats span,
.dog-care,
.gear-card header p,
.gear-core span,
.gear-drives span,
.dog-specs dt,
.gear-card dt {
  color: #b7aa9e;
  font-size: 13px;
}

.dog-grid,
.gear-grid,
.cover-block {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 32px 8px;
}

.dog-grid,
.gear-grid,
.cover-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.dog-card,
.gear-card,
.cover-grid article {
  border: 1px solid rgba(224, 186, 150, 0.22);
  border-radius: 16px;
  background: #100e0c;
  overflow: hidden;
}

.dog-photo {
  position: relative;
  height: 240px;
  background: #1a120e;
}

.dog-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.dog-photo-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 28px 16px 12px;
  background: linear-gradient(transparent, rgba(9, 8, 7, 0.92));
}

.dog-photo-label strong {
  font-size: 26px;
  letter-spacing: -0.03em;
}

.dog-photo-label span {
  align-self: end;
  color: #f0a15f;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dog-body,
.gear-card,
.cover-grid article {
  padding: 16px 16px 18px;
}

.dog-body h2,
.cover-grid h3 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.dog-care {
  margin: 4px 0 0;
}

.dog-specs,
.gear-card dl {
  margin: 14px 0 0;
}

.dog-specs div,
.gear-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-top: 1px solid rgba(224, 186, 150, 0.16);
}

.dog-specs dd,
.gear-card dd {
  margin: 0;
  text-align: right;
}

.dog-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
}

.dog-links a {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid rgba(224, 138, 74, 0.45);
  border-radius: 999px;
  background: transparent;
  color: #f0a15f;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.dog-links a.is-primary {
  border-color: transparent;
  background: #f0a15f;
  color: #1a100c;
}

.cover-block {
  padding-bottom: 64px;
}

.cover-block h2 {
  font-size: 36px;
}

.cover-grid {
  margin-top: 18px;
  padding: 0;
}

.cover-grid p,
.gear-card header p {
  margin: 6px 0 0;
  color: #d9cfc4;
  line-height: 1.45;
}

.gear-card header {
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.gear-card header > span {
  color: #e08a4a;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.gear-card h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.gear-core {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.gear-core div {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(224, 122, 61, 0.08);
}

.gear-core span,
.gear-core em,
.gear-drives span {
  display: block;
}

.gear-core strong {
  display: block;
  margin-top: 4px;
}

.gear-core em {
  margin-top: 4px;
  color: #b7aa9e;
  font-style: normal;
  font-size: 13px;
}

.gear-drives {
  margin-top: 12px;
}

.gear-drives ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.gear-drives li {
  margin: 2px 0;
}

@media (max-width: 860px) {
  .studio-top,
  .studio-hero,
  .dog-grid,
  .gear-grid,
  .cover-block {
    padding-left: 16px;
    padding-right: 16px;
  }

  .studio-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .studio-hero h1 {
    font-size: 38px;
  }

  .dog-grid,
  .gear-grid,
  .cover-grid,
  .gear-core {
    grid-template-columns: 1fr;
  }
}
