:root {
  color-scheme: dark;
  --bg: #101113;
  --surface: #181a1d;
  --surface-2: #202329;
  --line: #323741;
  --text: #f3f5f7;
  --muted: #a9b0bb;
  --accent: #2f8f7a;
  --accent-2: #d4a93d;
  --danger: #c94f4f;
  --focus: #78c8b6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px;
  background: #15171a;
  border-right: 1px solid var(--line);
}

.brand {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: center;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--accent-2);
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin: 0;
}

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

h2 {
  font-size: 28px;
  line-height: 1.1;
}

h3 {
  font-size: 15px;
}

p {
  color: var(--muted);
  line-height: 1.5;
}

.nav-tabs {
  display: grid;
  gap: 6px;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nav-parent::after {
  content: '';
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, 2px);
  transition: transform 140ms ease;
  flex: 0 0 auto;
}

.nav-group.collapsed .nav-parent::after {
  transform: rotate(-45deg);
}

.nav-group.collapsed .nav-subtabs {
  display: none;
}

.nav-subtabs {
  display: grid;
  gap: 4px;
  padding-left: 12px;
}

.tab-button.subtab {
  min-height: 32px;
  font-size: 13px;
}

.tab-button,
.command,
.icon-button {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  min-height: 38px;
  border-radius: 6px;
  cursor: pointer;
}

.tab-button {
  text-align: left;
  padding: 10px 12px;
}

.tab-button.active,
.command.primary {
  border-color: transparent;
  background: var(--accent);
  color: #041b16;
  font-weight: 700;
}

.command.danger {
  border-color: transparent;
  background: var(--danger);
  color: #fff;
}

.command.dirty {
  box-shadow: 0 0 0 2px #dcae4f;
}

.command.dirty::after {
  content: ' *';
}

[data-config-section].has-unsaved-changes .topbar p::after {
  content: ' · Unsaved changes';
  color: #dcae4f;
  font-weight: 700;
}

.command.compact,
.icon-button {
  min-height: 32px;
  padding: 0 10px;
}

.icon-button {
  width: 34px;
  font-weight: 800;
}

button:hover {
  filter: brightness(1.08);
}

button:disabled {
  cursor: wait;
  opacity: 0.68;
  filter: saturate(0.8);
}

button.pending {
  position: relative;
  pointer-events: none;
}

button.pending::after {
  content: '';
  width: 10px;
  height: 10px;
  margin-left: 8px;
  display: inline-block;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -1px;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.status-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 6px;
  color: var(--muted);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #6b7280;
}

.status-dot.online {
  background: #35c486;
  box-shadow: 0 0 0 4px rgba(53, 196, 134, 0.14);
}

.workspace {
  min-width: 0;
  padding: 28px;
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 22px;
}

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

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.playlist-save-row {
  justify-content: flex-end;
  margin-top: 16px;
}

.command {
  padding: 0 16px;
}

a.command {
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}

.control-grid,
.settings-grid,
.single-grid,
.effects-grid,
.health-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.single-grid {
  grid-template-columns: minmax(0, 760px);
}

.effects-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.panel.wide {
  grid-column: 1 / -1;
}

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

.amiga-radio-pool-status,
.amiga-radio-issues {
  display: grid;
  gap: 12px;
}

.amiga-radio-pool-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 10px;
}

.amiga-radio-pool-summary > div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #13161a;
}

.amiga-radio-pool-summary span,
.amiga-radio-media-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.amiga-radio-pool-summary strong { font-size: 20px; }

.amiga-radio-scan-line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: #13161a;
}

.amiga-radio-scan-results { color: var(--muted); font-size: 12px; }

.amiga-radio-table-wrap { overflow-x: auto; }

.amiga-radio-media-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.amiga-radio-media-table th,
.amiga-radio-media-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.amiga-radio-media-table tr.inactive { opacity: .55; }

.amiga-radio-media-table th:first-child,
.amiga-radio-media-table td:first-child { width: 1%; padding-right: 0; }

.amiga-radio-audit-dialog {
  width: min(430px, calc(100vw - 32px));
  padding: 14px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101317;
  box-shadow: 0 18px 60px rgb(0 0 0 / 55%);
}

.amiga-radio-audit-dialog[open] { display: grid; gap: 12px; }
.amiga-radio-audit-dialog::backdrop { background: rgb(0 0 0 / 72%); }
.amiga-radio-audit-close { position: absolute; top: 8px; right: 10px; color: var(--muted); border: 0; background: transparent; font-size: 22px; cursor: pointer; }
.amiga-radio-audit-details { display: grid; gap: 3px; padding-right: 28px; }
.amiga-radio-audit-details strong { font-size: 16px; }
.amiga-radio-audit-details span { color: var(--accent); }
.amiga-radio-audit-details small { color: var(--muted); }
.amiga-radio-audit-audio { display: none; }
.amiga-radio-audit-transport { display: grid; grid-template-columns: auto minmax(80px, 1fr) auto; align-items: center; gap: 10px; }
.amiga-radio-audit-progress { width: 100%; accent-color: var(--accent); }
.amiga-radio-audit-time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.speccy-radio-audit-dialog { width: min(430px, calc(100vw - 32px)); padding: 14px; color: var(--text); border: 1px solid var(--line); border-radius: 8px; background: #101317; box-shadow: 0 18px 60px rgb(0 0 0 / 55%); }
.speccy-radio-audit-dialog[open] { display: grid; gap: 12px; }
.speccy-radio-audit-dialog::backdrop { background: rgb(0 0 0 / 72%); }
.speccy-radio-audit-close { position: absolute; top: 8px; right: 10px; color: var(--muted); border: 0; background: transparent; font-size: 22px; cursor: pointer; }
.speccy-radio-audit-details { display: grid; gap: 3px; padding-right: 28px; }
.speccy-radio-audit-details strong { font-size: 16px; }
.speccy-radio-audit-details span { color: var(--accent); }
.speccy-radio-audit-details small { color: var(--muted); }
.speccy-radio-audit-audio { display: none; }
.speccy-radio-audit-transport { display: grid; grid-template-columns: auto minmax(80px, 1fr) auto; align-items: center; gap: 10px; }
.speccy-radio-audit-progress { width: 100%; accent-color: var(--accent); }
.speccy-radio-audit-time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.radio-audit-volume { display: grid; grid-template-columns: auto minmax(100px, 1fr) 42px; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.radio-audit-volume input[type="range"] {
  --radio-volume: 100%;
  appearance: none;
  width: 100%;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: linear-gradient(to right, var(--accent) 0 var(--radio-volume), #5f6265 var(--radio-volume) 100%) center / calc(100% - 18px) 6px no-repeat;
  box-shadow: none;
  cursor: pointer;
}

.radio-audit-volume input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border: 0;
  background: transparent;
}

.radio-audit-volume input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -6px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
}

.radio-audit-volume input[type="range"]::-moz-range-track,
.radio-audit-volume input[type="range"]::-moz-range-progress {
  height: 6px;
  border: 0;
  background: transparent;
}

.radio-audit-volume input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
}
.radio-audit-volume output { text-align: right; font-variant-numeric: tabular-nums; }

.amiga-radio-issues {
  padding: 12px;
  border: 1px solid #6d4f2d;
  background: #241b12;
}

.amiga-radio-issues span { font-size: 12px; }

@media (max-width: 900px) {
  .amiga-radio-pool-summary { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .amiga-radio-scan-line { flex-direction: column; }
}

.field,
.field-grid {
  display: grid;
  gap: 7px;
}

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

.field span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

input,
select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #111317;
  color: var(--text);
}

input[type="checkbox"] {
  width: auto;
  min-height: 0;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch span {
  display: block;
  width: 46px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #111317;
  position: relative;
}

.switch span::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  top: 3px;
  left: 4px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 150ms ease, background 150ms ease;
}

.switch input:checked + span::after {
  transform: translateX(18px);
  background: var(--accent);
}

.rows {
  display: grid;
  gap: 10px;
}

.row {
  display: grid;
  grid-template-columns: 28px minmax(110px, 1fr) minmax(180px, 2fr) 84px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #13161a;
}

.row.playlist-item {
  grid-template-columns: 32px 28px minmax(110px, 1fr) minmax(180px, 2fr) minmax(92px, 0.6fr) 84px;
}

.row.playlist-item.has-media-preview {
  grid-template-columns: 32px 28px minmax(110px, 1fr) minmax(180px, 2fr) minmax(92px, 0.6fr) 42px 84px;
}
.row.playlist-item.has-media-preview.has-media-delete {
  grid-template-columns: 32px 28px minmax(110px, 1fr) minmax(180px, 2fr) minmax(92px, 0.6fr) 42px 42px;
}
.media-preview {
  min-width: 42px;
  padding-inline: 0;
  font-size: 15px;
}

.media-delete {
  min-width: 42px;
  padding-inline: 0;
  border-color: rgba(201, 79, 79, 0.55);
  color: #ffd2d2;
  font-size: 17px;
}

.drag-handle {
  width: 32px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: radial-gradient(circle, var(--muted) 1.4px, transparent 1.8px) 8px 8px / 8px 8px, #111317;
  cursor: grab;
}

.drag-handle:active {
  cursor: grabbing;
}

.playlist-item.dragging,
.jankfax-page-row.dragging {
  opacity: 0.55;
}

.item-duration {
  color: var(--muted);
}

.media-panel-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.media-library-summary {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.add-block-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 120px;
  gap: 10px;
  align-items: end;
}

.operation-status {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 110px;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

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

.operation-status.pending {
  border-color: rgba(231, 191, 105, 0.55);
  background: rgba(231, 191, 105, 0.08);
}

.operation-status.error {
  border-color: rgba(201, 79, 79, 0.55);
  background: rgba(201, 79, 79, 0.08);
}

.operation-status div {
  display: grid;
  gap: 4px;
}

.operation-status span:not(.status-pill) {
  color: var(--muted);
  font-size: 13px;
}

.row.block-control-row {
  grid-template-columns: minmax(180px, 1fr) 90px 110px;
}

.row.pending {
  border-color: rgba(231, 191, 105, 0.55);
  background: rgba(231, 191, 105, 0.08);
}

.block-summary {
  display: grid;
  gap: 4px;
}

.block-summary span {
  color: var(--muted);
  font-size: 13px;
}

.status-pill {
  min-height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  align-self: end;
}

.status-pill.online {
  color: var(--accent);
  border-color: rgba(92, 179, 128, 0.45);
}

.status-pill.error {
  color: #ffd2d2;
  border-color: rgba(201, 79, 79, 0.55);
}

.status-pill.pending {
  color: var(--warn);
  border-color: rgba(231, 191, 105, 0.55);
  background: rgba(231, 191, 105, 0.08);
}

.bot-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.bot-status-grid div,
.command-list div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #13161a;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metric-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-grid div,
.process-list div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #13161a;
  min-width: 0;
}

.metric-grid span,
.process-list span,
.process-list em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0;
}

.metric-grid strong,
.process-list strong {
  overflow-wrap: anywhere;
}

.process-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.health-overview header > div {
  display: grid;
  gap: 4px;
}

.health-overview header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.health-check-list,
.transition-timeline {
  display: grid;
  gap: 8px;
}

.health-check {
  display: grid;
  grid-template-columns: 92px minmax(150px, 190px) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border-left: 3px solid var(--line);
  background: #13161a;
}

.health-check strong,
.health-check span,
.transition-timeline div {
  overflow-wrap: anywhere;
}

.health-check-state {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.health-check.ok { border-left-color: var(--accent); }
.health-check.ok .health-check-state { color: var(--accent); }
.health-check.pending,
.health-check.warning { border-left-color: var(--warn); }
.health-check.pending .health-check-state,
.health-check.warning .health-check-state { color: var(--warn); }
.health-check.critical { border-left-color: var(--danger); }
.health-check.critical .health-check-state { color: #ffd2d2; }

.transition-timeline {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.transition-timeline div {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border-left: 2px solid var(--line);
  background: #13161a;
  font-size: 12px;
}

.transition-timeline time {
  color: var(--muted);
}

.bot-status-grid span,
.command-list span,
.status-message {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.command-list {
  display: grid;
  gap: 10px;
}

.bot-command-catalogue {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #13161a;
}

.bot-command-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1fr) minmax(300px, 1.6fr);
  align-items: start;
  gap: 14px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.bot-command-row:last-child {
  border-bottom: 0;
}

.bot-command-heading {
  background: #191d22;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.bot-command-row code {
  color: var(--accent-2);
  font-size: 13px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.bot-command-blocks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bot-command-block {
  display: inline-flex;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 12px;
}

.bot-command-block.active {
  border-color: var(--accent);
  background: rgba(47, 143, 122, 0.12);
  color: var(--text);
}

.bot-command-detail {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.bot-command-detail span,
.bot-command-detail small {
  overflow-wrap: anywhere;
}

.bot-command-detail small {
  color: var(--muted);
}

@media (max-width: 760px) {
  .bot-command-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .bot-command-heading {
    display: none;
  }
}

.row.destination {
  grid-template-columns: 28px minmax(120px, 1fr) minmax(90px, 0.7fr) minmax(180px, 1.4fr) minmax(130px, 0.9fr) minmax(130px, 0.9fr) 84px;
}


.remove {
  border-color: rgba(201, 79, 79, 0.45);
  color: #ffd2d2;
}

.destination-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.destination-chip {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #13161a;
}

.destination-chip strong {
  font-size: 14px;
}

.destination-chip span {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.pixel-prix-admin-bets {
  display: grid;
  gap: 8px;
}

.pixel-prix-admin-standings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.pixel-prix-admin-standings h4 {
  margin: 0 0 8px;
  font-size: 15px;
}

.pixel-prix-admin-standing-header,
.pixel-prix-admin-standing-row {
  display: grid;
  gap: 8px;
  align-items: center;
}

.gambler-admin-grid {
  grid-template-columns: minmax(0, 1fr) 42px 42px 100px;
}

.driver-admin-grid {
  grid-template-columns: minmax(0, 1fr) 60px 42px 42px;
}

.pixel-prix-admin-standing-header {
  padding: 7px 9px;
  background: #242a30;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.pixel-prix-admin-standing-row {
  min-height: 34px;
  padding: 6px 9px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.pixel-prix-admin-standing-header span:not(:first-child),
.pixel-prix-admin-standing-row span:not(:first-child) {
  text-align: right;
}

.pixel-prix-admin-standing-row span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.gambler-admin-grid span:last-child {
  color: var(--warn);
  font-variant-numeric: tabular-nums;
}

.pixel-prix-admin-assets {
  display: grid;
  gap: 8px;
}

.pixel-prix-admin-asset {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(90px, auto) 72px 72px 86px;
  gap: 12px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #13161a;
}

.pixel-prix-admin-asset .status-pill {
  min-height: 28px;
  align-self: center;
}

.pixel-prix-asset-issues {
  color: var(--muted);
  font-size: 13px;
}

.pixel-prix-asset-issues ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 20px;
}

.pixel-prix-admin-bet {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 90px minmax(120px, auto);
  gap: 12px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #13161a;
}

.pixel-prix-admin-bet > span:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.pixel-prix-car-red,
.pixel-prix-car-blue {
  font-weight: 700;
}

.pixel-prix-car-red {
  color: #ff8a91;
}

.pixel-prix-car-blue {
  color: #8eb0ff;
}

.jankpot-admin-queue,
.jankpot-ladder-admin {
  display: grid;
  gap: 8px;
}

.jankpot-queue-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: #13161a;
}

.jankpot-ladder-admin-header,
.jankpot-ladder-admin-row {
  display: grid;
  grid-template-columns: 54px minmax(150px, 1fr) minmax(150px, .8fr) 110px 90px;
  gap: 8px;
  align-items: center;
}

.jankpot-ladder-admin-header {
  padding: 7px 9px;
  background: #242a30;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.jankpot-ladder-admin-row {
  padding: 8px;
  border-bottom: 1px solid var(--line);
}

.jankpot-symbol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(520px, 1fr));
  gap: 10px;
}

.jankpot-symbol-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  background: #13161a;
}

.jankpot-symbol-previews {
  display: grid;
  grid-template-columns: repeat(5, 72px);
  gap: 8px;
}

.jankpot-symbol-original,
.jankpot-preview {
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  height: 92px;
  margin: 0;
  overflow: hidden;
  border: 1px solid #3b4149;
  background: #0b0d10;
}

.jankpot-preview {
  align-content: start;
}

.jankpot-preview.paper {
  background: #e9e3c8;
  background-image: repeating-linear-gradient(to bottom, transparent 0 7px, #d8d0af 7px 8px);
}

.jankpot-preview.checker {
  background-color: #fff;
  background-image: linear-gradient(45deg, #c7c7c7 25%, transparent 25%), linear-gradient(-45deg, #c7c7c7 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #c7c7c7 75%), linear-gradient(-45deg, transparent 75%, #c7c7c7 75%);
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  background-size: 12px 12px;
}

.jankpot-preview.white { background: #fff; }
.jankpot-preview.black { background: #000; }

.jankpot-symbol-original img {
  width: 72px;
  height: 72px;
  padding: 5px;
  max-width: 62px;
  max-height: 62px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.jankpot-preview canvas {
  width: 72px;
  height: 72px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.jankpot-symbol-original figcaption,
.jankpot-preview figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 19px;
  display: grid;
  place-items: center;
  background: rgb(5 7 10 / 88%);
  color: #d8dee9;
  font-size: 9px;
  line-height: 1;
  text-align: center;
}

.jankpot-symbol-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.jankpot-symbol-title span {
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jankpot-symbol-card .field,
.jankpot-symbol-card .switch {
  min-width: 0;
}

.jankpot-symbol-controls {
  display: grid;
  grid-template-columns: repeat(5, minmax(88px, 1fr));
  gap: 8px;
  align-items: end;
}

.jankpot-symbol-controls .field input[type="color"] {
  min-height: 34px;
  padding: 2px;
}

.compact-switch {
  min-height: 34px;
}

.jankpot-layout-json {
  width: 100%;
  min-height: 440px;
  resize: vertical;
  border: 1px solid var(--line);
  background: #090a0c;
  color: #d8dee9;
  font: 12px/1.45 ui-monospace, monospace;
}

.jankpot-audio-tests {
  margin-top: 12px;
}

.jankfax-page-list {
  display: grid;
  gap: 8px;
}

.jankfax-page-row {
  display: grid;
  grid-template-columns: 32px minmax(96px, 120px) minmax(220px, 1fr) minmax(130px, auto) minmax(218px, auto);
  gap: 10px;
  align-items: end;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #13161a;
}

.jankfax-page-number {
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
}

.jankfax-page-meta {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.jankfax-page-actions {
  display: flex;
  gap: 8px;
  align-self: end;
}

.jankfax-page-actions .command {
  white-space: nowrap;
}

.jankfax-preview-dialog {
  width: min(920px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 80px rgb(0 0 0 / 45%);
}

.media-preview-dialog {
  width: min(960px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 80px rgb(0 0 0 / 45%);
}
.media-preview-dialog::backdrop { background: rgb(0 0 0 / 75%); }
.media-preview-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.media-preview-dialog h3,
.media-preview-dialog p { margin: 0; }
.media-preview-description {
  max-width: min(760px, calc(100vw - 150px));
  margin-top: 3px !important;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.85rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.media-preview-frame-wrap { padding: 16px; }
.media-preview-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.jankfax-preview-dialog::backdrop {
  background: rgb(0 0 0 / 70%);
}

.jankfax-preview-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.jankfax-preview-dialog h3,
.jankfax-preview-dialog p {
  margin: 0;
}

.jankfax-preview-description {
  margin-top: 3px !important;
  color: var(--muted);
  font-size: 0.85rem;
}

.jankfax-preview-frame-wrap {
  padding: 16px;
}

.jankfax-preview-frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background: #000;
}

.jankfax-editor-dialog {
  width: min(1420px, calc(100vw - 24px));
  max-width: none;
  height: min(930px, calc(100vh - 24px));
  max-height: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 80px rgb(0 0 0 / 55%);
}

.jankfax-editor-dialog::backdrop {
  background: rgb(0 0 0 / 78%);
}

.jankfax-editor-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.jankfax-editor-dialog h3,
.jankfax-editor-dialog h4,
.jankfax-editor-dialog p {
  margin: 0;
}

.jankfax-editor-subtitle {
  margin-top: 3px !important;
  color: var(--muted);
  font-size: 0.85rem;
}

.jankfax-editor-body {
  display: grid;
  grid-template-columns: minmax(620px, 1fr) 330px;
  height: calc(100% - 66px);
  overflow: hidden;
}

.jankfax-editor-workspace {
  min-width: 0;
  padding: 14px;
  overflow: auto;
  background: #090b0e;
}

.jankfax-editor-notice {
  margin-bottom: 10px;
  padding: 9px 11px;
  border: 1px solid #7e6927;
  background: #29230f;
  color: #f0d878;
  font-size: 0.85rem;
}

.jankfax-editor-live-preview,
.jankfax-editor-grid-wrap {
  width: min(100%, 960px);
  margin-inline: auto;
  border: 1px solid #323840;
  background: #000;
}

.jankfax-editor-live-preview {
  margin-bottom: 12px;
}

.jankfax-editor-preview-frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #000;
}

.jankfax-editor-grid-wrap {
  line-height: 0;
}

.jankfax-editor-grid {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 48 / 25;
  outline: none;
  image-rendering: pixelated;
  cursor: crosshair;
}

.jankfax-editor-grid:focus {
  box-shadow: 0 0 0 2px var(--accent);
}

.jankfax-editor-coordinate {
  width: min(100%, 960px);
  margin: 8px auto 0;
  color: var(--muted);
  font: 12px/1.4 ui-monospace, monospace;
}

.jankfax-editor-tools {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 14px;
  border-left: 1px solid var(--line);
  overflow: auto;
  background: #111419;
}

.jankfax-editor-tools section {
  display: grid;
  gap: 9px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.jankfax-editor-tools h4 {
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
}

.jankfax-editor-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.jankfax-editor-mode .active {
  border-color: var(--accent);
  color: var(--accent);
}

.jankfax-colour-row {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
}

.jankfax-colour-swatch {
  width: 100%;
  aspect-ratio: 1;
  min-height: 24px;
  padding: 0;
  border: 2px solid #343940;
  background: var(--swatch);
}

.jankfax-colour-swatch.active {
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--accent);
}

.jankfax-editor-attributes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 10px;
  font-size: 0.85rem;
}

.jankfax-editor-attributes label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.jankfax-mosaic-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 3px;
}

.jankfax-mosaic-glyph {
  min-width: 0;
  aspect-ratio: 1;
  padding: 3px;
  border: 1px solid #3b424c;
  background: #07090c;
}

.jankfax-mosaic-glyph span {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, 1fr);
  width: 100%;
  height: 100%;
  gap: 1px;
}

.jankfax-mosaic-glyph i {
  background: transparent;
}

.jankfax-mosaic-glyph i.on {
  background: #e8ebef;
}

.jankfax-editor-help {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.jankfax-import-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 240px) auto;
  gap: 12px;
  align-items: end;
}

.jankfax-import-controls .primary {
  min-height: 42px;
}

.log-view {
  min-height: 620px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090a0c;
  color: #d8dee9;
  overflow: auto;
  white-space: pre-wrap;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: min(420px, calc(100vw - 44px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #22262c;
  color: var(--text);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.32);
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .jankfax-editor-body {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .jankfax-editor-tools {
    border-top: 1px solid var(--line);
    border-left: 0;
    overflow: visible;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 14px;
    gap: 14px;
  }

  .nav-tabs {
    grid-template-columns: repeat(3, 1fr);
  }

  .tab-button {
    text-align: center;
  }

  .status-strip {
    display: none;
  }

  .workspace {
    padding: 18px;
  }

  .topbar,
  .control-grid,
  .settings-grid,
  .single-grid,
  .effects-grid,
  .field-grid,
  .effect-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .bot-status-grid,
  .pixel-prix-admin-asset,
  .pixel-prix-admin-standings,
  .jankpot-ladder-admin-header,
  .jankpot-ladder-admin-row,
  .jankpot-symbol-card,
  .jankpot-symbol-controls,
  .jankfax-import-controls,
  .add-block-row,
  .row,
  .row.playlist-item.has-media-preview,
  .row.playlist-item,
  .row.destination,
  .jankfax-page-row {
    grid-template-columns: 1fr;
  }

  .jankpot-symbol-previews {
    max-width: 100%;
    overflow-x: auto;
  }
}

.login-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 18px;
}

.login-panel {
  display: grid;
  gap: 22px;
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.login-brand {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

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

.login-message {
  min-height: 24px;
  color: #ffd2d2;
}

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

.ingest-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 6px;
}

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

.bot-status-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.hsb-scoreboard-scroll {
  overflow-x: auto;
}

.hsb-scoreboard {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  table-layout: fixed;
}

.hsb-scoreboard th,
.hsb-scoreboard td {
  padding: 7px;
  border: 1px solid var(--line);
  text-align: left;
}

.hsb-scoreboard th:first-child {
  width: 70px;
  text-align: center;
}

.hsb-scoreboard th:nth-child(2) {
  width: 190px;
}

.hsb-scoreboard thead th {
  background: var(--surface-2);
}

.hsb-active-game-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.hsb-active-game-option input {
  width: auto;
  min-height: 0;
  accent-color: var(--accent);
}

.hsb-scoreboard input {
  min-width: 0;
}

.hsb-audio-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 4px;
  flex-wrap: wrap;
}

.hsb-mute-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
}

.hsb-mute-control strong {
  font-size: 13px;
  color: var(--text);
}

.hsb-volume-control {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 190px;
  min-width: 0;
}

.hsb-volume-control input[type="range"] {
  width: min(100%, 220px);
  min-height: 28px;
  accent-color: var(--accent);
}

.hsb-volume-value {
  color: var(--accent-2);
  font-weight: 800;
}

.playlist-item.metadata-loading .item-duration {
  border-color: var(--accent-2);
}

.jankfax-image-import {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 18px;
  align-items: start;
}

.jankfax-image-controls {
  display: grid;
  gap: 16px;
}

.jankfax-image-controls .button-row {
  justify-content: flex-start;
}

.jankfax-image-controls .switch {
  width: max-content;
}

.jankfax-image-preview {
  margin: 0;
  padding: 12px;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #050505;
}

.jankfax-image-preview-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #000;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.jankfax-image-preview-status {
  min-height: 20px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

@media (max-width: 960px) {
  .jankfax-image-import {
    grid-template-columns: 1fr;
  }
}


.row.raid-channel-row {
  grid-template-columns: 48px minmax(180px, 1fr) minmax(210px, 1fr) 80px 84px;
  align-items: center;
}

.raid-channel-state {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.raid-channel-state small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .row.raid-channel-row,
  .raid-channel-state {
    grid-template-columns: 1fr;
  }
}


/* Broadcast scheduler */
.schedule-view {
  gap: 14px !important;
}

.schedule-topbar,
.schedule-utility-row,
.schedule-override-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.schedule-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
}

.schedule-status-grid > div,
.schedule-publish-grid > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.schedule-status-grid span,
.schedule-publish-grid span,
.schedule-run-actions > span,
.schedule-snap-label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.schedule-status-grid strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-override-banner[hidden] {
  display: none;
}

.schedule-override-banner {
  padding: 12px 14px;
  border: 1px solid rgba(212, 169, 61, 0.6);
  border-radius: 6px;
  background: rgba(212, 169, 61, 0.1);
}

.schedule-override-banner > div {
  display: grid;
  gap: 3px;
}

.schedule-override-banner > div > span {
  color: var(--muted);
  font-size: 13px;
}

.schedule-revision-controls {
  display: grid;
  grid-template-columns: minmax(220px, 320px) auto;
  align-items: end;
  gap: 8px;
}

.scheduler-layout {
  display: grid;
  grid-template-columns: 190px minmax(620px, 1fr) 240px;
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.scheduler-layout > .panel {
  padding: 12px;
  gap: 12px;
}

.schedule-library-panel,
.schedule-inspector-panel {
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 36px);
  overflow: auto;
}

.schedule-block-library {
  display: grid;
  gap: 7px;
}

.schedule-library-card {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--schedule-color, #69717d);
  border-radius: 5px;
  background: #13161a;
}


.schedule-library-card strong {
  overflow: visible;
  color: var(--text);
  font-size: 12px;
  line-height: 1.3;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}


.schedule-group-fallback { --schedule-color: #6baeb4; }
.schedule-group-demo { --schedule-color: #5682c5; }
.schedule-group-music { --schedule-color: #9270b6; }
.schedule-group-interactive { --schedule-color: #5b9c72; }
.schedule-group-event { --schedule-color: #c4a54c; }
.schedule-group-live { --schedule-color: #bd5959; }
.schedule-group-general { --schedule-color: #747d89; }

.schedule-grid-panel {
  min-width: 0;
}

.schedule-grid-scroll {
  max-height: calc(100vh - 250px);
  min-height: 620px;
  overflow: auto;
  border: 1px solid var(--line);
  background: #0e1013;
}

.schedule-week-grid {
  display: grid;
  grid-template-columns: 52px repeat(7, minmax(88px, 1fr));
  grid-template-rows: 36px auto;
  min-width: 720px;
  position: relative;
}

.schedule-grid-corner,
.schedule-day-header {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  min-height: 36px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #24282e;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.schedule-time-axis {
  position: relative;
  border-right: 1px solid var(--line);
  background: #15181c;
}

.schedule-time-axis span {
  position: absolute;
  right: 7px;
  transform: translateY(-7px);
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.schedule-day-track {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background:
    repeating-linear-gradient(to bottom, transparent 0, transparent 47px, rgba(255, 255, 255, 0.03) 47px, rgba(255, 255, 255, 0.03) 48px),
    repeating-linear-gradient(to bottom, transparent 0, transparent 95px, rgba(255, 255, 255, 0.09) 95px, rgba(255, 255, 255, 0.09) 96px),
    repeating-linear-gradient(135deg, rgba(107, 174, 180, 0.018) 0, rgba(107, 174, 180, 0.018) 6px, transparent 6px, transparent 12px);
  background-position: 0 12px, 0 12px, 0 0;
}

.schedule-day-track:last-child {
  border-right: 0;
}

.schedule-fallback-label {
  position: absolute;
  top: 20px;
  left: 5px;
  right: 5px;
  color: rgba(107, 174, 180, 0.22);
  font-size: 9px;
  text-align: center;
  pointer-events: none;
}

.schedule-programme {
  position: absolute;
  z-index: 2;
  left: 3px;
  right: 3px;
  display: grid;
  align-content: start;
  gap: 2px;
  min-height: 18px;
  padding: 4px 5px 8px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--schedule-color) 72%, #fff 8%);
  border-left: 4px solid var(--schedule-color);
  border-radius: 4px;
  background: color-mix(in srgb, var(--schedule-color) 24%, #15181c);
  cursor: grab;
  user-select: none;
}

.schedule-programme strong {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-size: 10px;
  line-height: 1.15;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.schedule-programme > span {
  color: #d7dbe0;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 18px;
  white-space: nowrap;
}

.schedule-programme.selected {
  z-index: 4;
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.schedule-programme.disabled {
  opacity: 0.43;
  filter: grayscale(0.7);
}

.schedule-programme.conflict {
  z-index: 5;
  border-color: #ed6a6a;
  background: rgba(143, 37, 37, 0.82);
}

.schedule-warning {
  display: inline-grid;
  place-items: center;
  width: 13px;
  height: 13px;
  margin-right: 3px;
  border-radius: 50%;
  background: #ffd1d1;
  color: #6d1111;
  font-size: 9px;
}

.schedule-resize-handle {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: ns-resize;
  touch-action: none;
}

.schedule-resize-handle:hover,
.schedule-resize-handle:focus-visible {
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.16);
}

.schedule-delete-entry {
  position: absolute;
  right: 2px;
  bottom: 2px;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  min-height: 0;
  padding: 3px;
  border: 0;
  border-radius: 3px;
  background: rgba(8, 10, 12, 0.7);
  color: #d7dbe0;
  cursor: pointer;
  opacity: 0.72;
}

.schedule-delete-entry:hover,
.schedule-delete-entry:focus-visible {
  background: var(--danger);
  color: #fff;
  opacity: 1;
}

.schedule-delete-entry svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
  pointer-events: none;
}

.schedule-inspector,
.schedule-run-actions {
  display: grid;
  gap: 11px;
}

.schedule-inspector-empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.schedule-inspector .field-grid {
  grid-template-columns: 1fr 1fr;
}

textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  resize: vertical;
  background: #111317;
  color: var(--text);
  font: inherit;
}

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

.schedule-enabled {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.schedule-conflict-tools {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(201, 79, 79, 0.6);
  border-radius: 5px;
  background: rgba(201, 79, 79, 0.08);
}

.schedule-conflict-tools > span {
  color: var(--muted);
  font-size: 12px;
}

.schedule-inspector-actions {
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.schedule-run-actions {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.schedule-dialog {
  width: min(900px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.schedule-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.schedule-dialog > header,
.schedule-dialog > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.schedule-dialog > footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.schedule-dialog-body {
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 170px);
  padding: 16px;
  overflow: auto;
}

.schedule-rundown-day {
  display: grid;
  gap: 5px;
}

.schedule-rundown-day h4 {
  margin: 8px 0 3px;
  color: var(--accent-2);
}

.schedule-rundown-item {
  display: grid;
  grid-template-columns: 110px minmax(180px, 1fr) minmax(100px, auto);
  gap: 12px;
  padding: 7px 9px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.schedule-rundown-item time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.schedule-rundown-item.fallback {
  color: #78aeb2;
  background: rgba(107, 174, 180, 0.035);
}

.schedule-publish-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(90px, 1fr));
  gap: 8px;
}

.schedule-publish-grid strong {
  font-size: 22px;
}

@media (max-width: 1500px) {
  .scheduler-layout {
    grid-template-columns: 180px minmax(620px, 1fr);
  }

  .schedule-inspector-panel {
    position: static;
    grid-column: 1 / -1;
    max-height: none;
  }
}

@media (max-width: 1180px) {
  .schedule-status-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

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

  .schedule-library-panel {
    position: static;
    max-height: none;
  }

  .schedule-block-library {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .schedule-grid-panel,
  .schedule-inspector-panel {
    grid-column: 1;
  }
}

@media (max-width: 760px) {
  .schedule-topbar,
  .schedule-utility-row,
  .schedule-override-banner {
    display: grid;
  }

  .schedule-status-grid,
  .schedule-block-library,
  .schedule-publish-grid {
    grid-template-columns: 1fr;
  }

  .schedule-revision-controls {
    grid-template-columns: 1fr;
  }
}
.jankpot-motion-grid { display: grid; gap: 8px; margin-top: 12px; }
.jankpot-motion-row { display: grid; grid-template-columns: 70px repeat(9, minmax(90px, 1fr)); gap: 7px; align-items: end; padding: 8px; border-left: 3px solid var(--accent); background: rgb(255 255 255 / 3%); }
.jankpot-motion-row > strong { align-self: center; }
.jankpot-motion-row .field span { font-size: 11px; }
@media (max-width: 1500px) { .jankpot-motion-row { grid-template-columns: 70px repeat(3, minmax(120px, 1fr)); } }
.trivia-fake-users, .trivia-recent-inputs { display: grid; gap: 8px; }
.trivia-fake-user { display: grid; grid-template-columns: 1fr 1fr 1fr 120px auto; gap: 8px; align-items: end; }
.trivia-input-row { display: grid; grid-template-columns: 90px 70px minmax(120px, 1fr) 70px 110px; gap: 8px; padding: 8px; border-left: 3px solid var(--accent); background: rgb(255 255 255 / 3%); }
.trivia-question-library { display: grid; grid-template-columns: minmax(260px, 1fr) auto; gap: 8px; margin-bottom: 14px; }
.trivia-question-editor { display: grid; gap: 14px; }
.trivia-question-list { display: grid; gap: 14px; }
.trivia-question-card { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-left: 4px solid var(--accent); background: rgb(0 0 0 / 14%); }
.trivia-question-card > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.trivia-question-card h4 { margin: 0; }
.trivia-question-text-field { grid-column: span 3; }
.trivia-choice-grid { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 8px; }
.trivia-c64-preview { display: grid; grid-template-columns: 1fr; gap: 2px; max-width: 440px; padding: 10px 14px; color: #a5e5ff; background: #151058; border: 4px solid #6c5eb5; }
.trivia-c64-preview strong { margin-bottom: 4px; color: #fff; }
.trivia-c64-preview code { min-height: 1.2em; overflow: hidden; color: inherit; font: 14px/1.2 monospace; white-space: pre; }
.trivia-c64-preview small { min-height: 1.2em; margin-top: 5px; color: #d9e8ff; }
.trivia-c64-preview.invalid { border-color: #d46868; }
.trivia-c64-preview.invalid small { color: #ffb3b3; }
.trivia-question-import { position: relative; overflow: hidden; cursor: pointer; }
.trivia-question-import input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.status-message.warning { color: #ffc27a; }
@media (max-width: 900px) { .trivia-fake-user, .trivia-input-row { grid-template-columns: 1fr; } }
@media (max-width: 1200px) { .trivia-choice-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); } .trivia-question-text-field { grid-column: auto; } }
@media (max-width: 700px) { .trivia-question-library, .trivia-choice-grid { grid-template-columns: 1fr; } .trivia-question-card > header { align-items: flex-start; flex-direction: column; } }

/* Broadcast console refinement */
:root {
  --bg: #0a0e12;
  --surface: #131920;
  --surface-2: #1a222b;
  --surface-3: #202a34;
  --line: #293541;
  --line-strong: #3a4856;
  --text: #edf2f5;
  --muted: #8e9aa7;
  --accent: #31a889;
  --accent-bright: #53c9aa;
  --accent-2: #d2aa52;
  --warn: #d2a24b;
  --danger: #c95555;
  --focus: #67d6ba;
  --info: #5f8fc7;
  --purple: #9275b6;
  --panel-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

body {
  background: linear-gradient(180deg, #0a0e12 0%, #0d1218 100%);
  font-size: 14px;
}

.app-shell {
  grid-template-columns: 244px minmax(0, 1fr);
}

.sidebar {
  gap: 20px;
  padding: 18px 16px;
  background: linear-gradient(180deg, #10161c 0%, #0d1217 100%);
  border-right-color: #25303a;
  box-shadow: 8px 0 24px rgba(0, 0, 0, 0.18);
}

.brand {
  grid-template-columns: 40px 1fr;
  gap: 11px;
  min-width: 0;
  padding: 2px 4px 16px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-color: #42505c;
  border-radius: 4px;
  background: linear-gradient(145deg, #27333d, #182028);
  color: var(--accent-2);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06), 0 5px 14px rgba(0, 0, 0, 0.24);
  font-size: 14px;
}

.brand > div:last-child {
  min-width: 0;
}

.brand-eyebrow,
.nav-section-label,
.section-kicker {
  display: block;
  color: #71808e;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand h1 {
  margin-top: 2px;
  font-size: 16px;
  font-weight: 720;
}

.brand p {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-size: 11px;
}

.brand p::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #687582;
}

.nav-tabs {
  gap: 3px;
}

.nav-section-label {
  margin: 12px 10px 5px;
}

.nav-section-label:first-child {
  margin-top: 0;
}

.nav-group {
  gap: 3px;
}

.nav-subtabs {
  gap: 2px;
  margin: 3px 0 5px 12px;
  padding-left: 8px;
  border-left: 1px solid var(--line);
}

.tab-button,
.command,
.icon-button {
  border-color: var(--line-strong);
  border-radius: 4px;
  background: linear-gradient(180deg, #202a34, #192129);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035), 0 1px 2px rgba(0, 0, 0, 0.18);
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease, box-shadow 120ms ease, transform 80ms ease;
}

.tab-button {
  min-height: 35px;
  padding: 8px 10px;
  border-color: transparent;
  border-left: 3px solid transparent;
  background: transparent;
  box-shadow: none;
  color: #aeb8c2;
}

.tab-button:hover {
  border-left-color: #506171;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  filter: none;
}

.tab-button.active {
  border-color: transparent;
  border-left-color: var(--accent-bright);
  background: linear-gradient(90deg, rgba(49, 168, 137, 0.18), rgba(49, 168, 137, 0.035));
  color: #f5fffc;
  box-shadow: inset 0 0 0 1px rgba(75, 194, 161, 0.1);
}

.tab-button.subtab {
  min-height: 29px;
  padding-block: 5px;
  color: #919daa;
  font-size: 12px;
}

.status-strip {
  min-height: 44px;
  padding: 10px 11px;
  border-radius: 4px;
  background: #111820;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
  font-size: 12px;
}

.status-dot.warning {
  background: var(--warn);
  box-shadow: 0 0 0 4px rgba(210, 162, 75, 0.13);
}

.status-dot.error {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(201, 85, 85, 0.13);
}

.workspace {
  padding: 24px 28px 36px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.012), transparent 180px);
}

.view.active {
  gap: 18px;
}

.topbar,
.schedule-topbar {
  min-height: 64px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.topbar h2,
.schedule-topbar h2 {
  font-size: 23px;
  font-weight: 720;
}

.topbar p,
.schedule-topbar p {
  margin-top: 4px;
  font-size: 12px;
}

.button-row {
  gap: 8px;
}

.command {
  min-height: 37px;
  padding: 0 14px;
  font-weight: 650;
}

.command:hover:not(:disabled),
.icon-button:hover:not(:disabled) {
  border-color: #566676;
  background: linear-gradient(180deg, #29343f, #202a33);
  filter: none;
}

.command:active:not(:disabled),
.icon-button:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.25);
}

.command.primary {
  border-color: #3ab292;
  background: linear-gradient(180deg, #39b596, #2c9279);
  color: #061d17;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.18), 0 3px 10px rgba(24, 116, 92, 0.2);
}

.command.danger {
  border-color: #d16363;
  background: linear-gradient(180deg, #ce5d5d, #aa4444);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.14), 0 3px 10px rgba(126, 35, 35, 0.2);
}

button:disabled {
  opacity: 0.48;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
.switch input:focus-visible + span {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.control-grid,
.settings-grid,
.single-grid,
.effects-grid,
.health-grid {
  gap: 14px;
}

.panel {
  gap: 14px;
  padding: 16px;
  border-color: var(--line);
  border-radius: 6px;
  background: linear-gradient(180deg, #151c23, #12181e);
  box-shadow: var(--panel-shadow), inset 0 1px rgba(255, 255, 255, 0.025);
}

.panel header {
  min-height: 30px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(58, 72, 86, 0.7);
}

.panel header > div {
  min-width: 0;
}

.panel h3 {
  margin-top: 2px;
  font-size: 14px;
  font-weight: 700;
}

.field,
.field-grid {
  gap: 6px;
}

.field span {
  color: #8593a0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

input,
select {
  min-height: 39px;
  border-color: #34414d;
  border-radius: 4px;
  background: #0d1319;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.32);
}

input:hover:not(:disabled):not([readonly]),
select:hover:not(:disabled) {
  border-color: #4a5b6a;
}

input:focus,
select:focus {
  border-color: var(--accent);
}

input[readonly] {
  color: #8e9aa7;
  background: #11171d;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: max-content;
}

.switch span {
  width: 42px;
  height: 23px;
  border-color: #455360;
  background: #0c1116;
}

.switch span::after {
  width: 15px;
  height: 15px;
  background: #7d8994;
}

.switch input:checked + span {
  border-color: rgba(49, 168, 137, 0.7);
  background: rgba(49, 168, 137, 0.12);
}

.switch input:checked + span::after {
  transform: translateX(17px);
  background: var(--accent-bright);
}

.row,
.bot-status-grid div,
.command-list div,
.metric-grid div,
.process-list div {
  border-color: #2b3742;
  border-radius: 4px;
  background: #10171d;
}

.status-pill {
  min-height: 28px;
  padding-inline: 9px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.outputs-panel,
.relay-panel,
.destinations-panel {
  border-top: 2px solid #33414e;
}

.relay-panel .field-grid {
  grid-template-columns: minmax(190px, 0.8fr) minmax(130px, 0.45fr) minmax(280px, 1.75fr);
  align-items: end;
}

.relay-panel .switch {
  align-self: center;
  min-height: 39px;
  padding: 0 10px;
  border-left: 2px solid var(--accent);
  background: rgba(49, 168, 137, 0.045);
}

.destination-summary {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
}

.destination-chip,
.destination-editor {
  --platform-color: #71808e;
}

.platform-twitch {
  --platform-color: #9275b6;
}

.platform-owncast {
  --platform-color: #5f8fc7;
}

.platform-kick {
  --platform-color: #55b47b;
}

.platform-youtube {
  --platform-color: #c85d64;
}

.destination-chip {
  display: grid;
  gap: 13px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #2d3945;
  border-left: 3px solid var(--platform-color);
  border-radius: 4px;
  background: linear-gradient(145deg, #131b22, #10161c);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
}

.destination-chip.status-disabled {
  opacity: 0.53;
  filter: saturate(0.55);
}

.destination-chip.status-error {
  border-left-color: var(--danger);
  background: linear-gradient(145deg, rgba(201, 85, 85, 0.075), #10161c 48%);
}

.destination-chip.status-connecting {
  border-left-color: var(--warn);
}

.destination-chip-head,
.destination-editor-head,
.destination-identity {
  display: flex;
  align-items: center;
}

.destination-chip-head,
.destination-editor-head {
  justify-content: space-between;
  gap: 12px;
}

.destination-identity {
  min-width: 0;
  gap: 10px;
}

.destination-identity > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.destination-identity small,
.destination-metadata span {
  color: #768491;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.destination-identity strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.destination-platform-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid color-mix(in srgb, var(--platform-color) 58%, #27323c);
  border-radius: 4px;
  background: color-mix(in srgb, var(--platform-color) 12%, #111820);
  color: color-mix(in srgb, var(--platform-color) 72%, white);
  font-size: 11px;
  font-weight: 800;
}

.output-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  color: #9da8b2;
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.output-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #71808e;
}

.status-healthy .output-state,
.status-relaying .output-state {
  color: var(--accent-bright);
}

.status-healthy .output-state i,
.status-relaying .output-state i {
  background: var(--accent-bright);
  box-shadow: 0 0 0 3px rgba(83, 201, 170, 0.11);
}

.status-connecting .output-state {
  color: #e2b764;
}

.status-connecting .output-state i {
  background: var(--warn);
}

.status-error .output-state {
  color: #ed8d8d;
}

.status-error .output-state i {
  background: var(--danger);
}

.destination-metadata {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(95px, 0.75fr);
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(58, 72, 86, 0.55);
}

.destination-metadata > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.destination-metadata strong {
  overflow: hidden;
  color: #c9d1d8;
  font-size: 11px;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row.destination.destination-editor {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: stretch;
  overflow: hidden;
  padding: 0;
  border-left: 3px solid var(--platform-color);
  border-radius: 4px;
  background: #10171d;
}

.destination-editor-head {
  min-height: 52px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: #151d24;
}

.destination-editor-head .destination-identity {
  margin-right: auto;
}

.destination-enable {
  margin-left: auto;
}

.destination-enable strong {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.destination-editor-fields {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(105px, 0.7fr) minmax(210px, 1.55fr) minmax(155px, 1fr) minmax(155px, 1fr);
  gap: 10px;
  padding: 12px;
  transition: opacity 120ms ease;
}

.destination-editor.is-disabled .destination-editor-fields {
  opacity: 0.48;
}

.destination-editor.is-disabled {
  border-left-color: #596673;
}

.destination-editor .remove {
  min-width: 72px;
  border-color: rgba(201, 85, 85, 0.45);
  background: rgba(201, 85, 85, 0.055);
}

.destination-editor .remove:hover {
  border-color: var(--danger);
  background: rgba(201, 85, 85, 0.13);
}

.control-topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.broadcast-status {
  display: grid;
  grid-template-columns: 11px minmax(150px, auto);
  align-items: center;
  gap: 10px;
  min-height: 47px;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid #687582;
  border-radius: 4px;
  background: #10171d;
}

.broadcast-status-beacon {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #687582;
  box-shadow: 0 0 0 4px rgba(104, 117, 130, 0.12);
}

.broadcast-status-copy {
  display: grid;
  gap: 2px;
}

.broadcast-status-copy strong {
  font-size: 12px;
  text-transform: uppercase;
}

.broadcast-status-copy small {
  color: var(--muted);
  font-size: 11px;
}

.broadcast-status[data-state='live'] {
  border-left-color: var(--accent-bright);
}

.broadcast-status[data-state='live'] .broadcast-status-beacon {
  background: var(--accent-bright);
  box-shadow: 0 0 0 4px rgba(83, 201, 170, 0.13);
}

.broadcast-status[data-state='degraded'],
.broadcast-status[data-state='reconnecting'] {
  border-left-color: var(--warn);
}

.broadcast-status[data-state='degraded'] .broadcast-status-beacon,
.broadcast-status[data-state='reconnecting'] .broadcast-status-beacon {
  background: var(--warn);
  box-shadow: 0 0 0 4px rgba(210, 162, 75, 0.13);
}

.transport-controls .command {
  min-width: 82px;
  min-height: 43px;
  font-size: 12px;
  text-transform: uppercase;
}

.transport-restart {
  color: #c7d4df;
}

@media (max-width: 1180px) {
  .control-topbar-actions {
    align-items: stretch;
  }

  .broadcast-status {
    min-width: 205px;
  }

  .destination-editor-fields {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .destination-url-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .nav-section-label {
    grid-column: 1 / -1;
    margin-top: 8px;
  }

  .nav-group {
    min-width: 0;
  }

  .control-topbar-actions,
  .relay-panel .field-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .broadcast-status {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .nav-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace {
    padding: 16px 12px 28px;
  }

  .transport-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .transport-controls .command {
    min-width: 0;
  }

  .destination-summary,
  .destination-editor-fields,
  .destination-metadata {
    grid-template-columns: 1fr;
  }

  .destination-url-field {
    grid-column: auto;
  }

  .destination-editor-head {
    flex-wrap: wrap;
  }
}

.top-plops-library-panel > header {
  align-items: center;
}
.top-plops-library-table-wrap {
  overflow-x: auto;
}
.top-plops-library-table {
  width: 100%;
  min-width: 1120px;
  table-layout: fixed;
  border-collapse: collapse;
}
.top-plops-library-table th,
.top-plops-library-table td {
  padding: 7px;
  border: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
.top-plops-library-table thead th {
  background: var(--surface-2);
}
.top-plops-library-table th:nth-child(1) { width: 48px; }
.top-plops-library-table th:nth-child(2) { width: 15%; }
.top-plops-library-table th:nth-child(3) { width: 20%; }
.top-plops-library-table th:nth-child(4) { width: 21%; }
.top-plops-library-table th:nth-child(5) { width: 82px; }
.top-plops-library-table th:nth-child(6) { width: 148px; }
.top-plops-library-table th:nth-child(7) { width: 56px; }
.top-plops-library-table th:nth-child(8) { width: 218px; }
.top-plops-library-table th small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}
.top-plops-media-row td {
  vertical-align: middle;
}
.top-plops-media-row input:not([type='checkbox']) {
  width: 100%;
  min-width: 0;
}
.top-plops-media-row input[readonly] {
  color: var(--text);
}
.top-plops-enabled-cell {
  text-align: center !important;
}
.top-plops-enabled-cell input {
  width: auto;
}
.top-plops-duration {
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.top-plops-rating-value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.top-plops-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.top-plops-row-actions .reset-top-of-the-plops-rating {
  white-space: nowrap;
}
.top-plops-info-status {
  color: #9ed7ca;
  font-weight: 700;
}
.top-plops-info-row > td {
  padding: 0 8px 10px;
  white-space: normal;
  background: rgba(255, 255, 255, 0.015);
}
.top-plops-info-details > summary {
  width: max-content;
  padding: 8px 0 2px;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}
.top-plops-info-editor {
  display: grid;
  gap: 10px;
  padding: 10px 0 2px;
}
.top-plops-info-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.top-plops-info-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.top-plops-info-field > span {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
}
.top-plops-info-text {
  min-height: 78px;
  line-height: 1.35;
}
.top-plops-info-count {
  justify-self: end;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.top-plops-placeholder-badge {
  padding: 2px 6px;
  border: 1px solid rgba(242, 183, 69, 0.55);
  border-radius: 999px;
  color: #f2b745;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}
.top-plops-info-actions {
  justify-content: space-between;
  align-items: center;
}
@media (max-width: 900px) {
  .top-plops-info-fields {
    grid-template-columns: 1fr;
  }
}
.media-suggestions-panel > header {
  align-items: center;
}

.top-plops-ingest-panel > header {
  align-items: center;
}

.top-plops-ingest-panel > header > div {
  display: grid;
  gap: 4px;
}

.top-plops-ingest-panel header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.top-plops-ingest-panel code {
  color: #9ed7ca;
}

.top-plops-ingest-status,
.top-plops-ingest-errors {
  display: grid;
  gap: 8px;
}

.top-plops-ingest-summary,
.top-plops-ingest-current {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.top-plops-ingest-summary span,
.top-plops-ingest-current span,
.top-plops-ingest-errors span {
  color: var(--muted);
  font-size: 12px;
}

.top-plops-ingest-current {
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 2fr) 44px;
}

.top-plops-ingest-current progress {
  width: 100%;
  height: 10px;
  accent-color: var(--accent);
}

.top-plops-ingest-errors {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.media-suggestions-panel > header > div {
  display: grid;
  gap: 3px;
}

.media-suggestions-panel > header > .media-suggestion-header-actions {
  display: flex;
  gap: 6px;
}

.media-suggestion-count {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.media-suggestion-list {
  display: grid;
  gap: 8px;
}

.media-suggestion-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid #4f8995;
  border-radius: 4px;
  background: #10171d;
}

.media-suggestion-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.media-suggestion-copy strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.media-suggestion-copy span {
  color: var(--muted);
  font-size: 11px;
}

.media-suggestion-edit-text {
  min-height: 58px;
  max-height: 160px;
  font-size: 13px;
  line-height: 1.4;
}

.media-suggestion-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

@media (max-width: 760px) {
  .top-plops-ingest-current {
    grid-template-columns: 1fr;
  }

  .media-suggestion-row {
    grid-template-columns: 1fr;
  }

  .media-suggestion-actions {
    justify-content: flex-start;
  }
}
