*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --surface-2: #243044;
  --text: #e8edf4;
  --muted: #8b9cb3;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius: 12px;
}

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

.app {
  max-width: 1580px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr) minmax(240px, 300px);
  gap: 16px;
  align-items: start;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 96px);
  min-height: 0;
}

.main-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.channel-rail {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 96px);
  min-height: 0;
}

.panel--channels {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(100vh - 96px);
  padding: 0;
  overflow: hidden;
}

.panel-head--channels {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 12px 8px;
  margin-bottom: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.panel-head--channels h3 {
  margin: 0;
  font-size: 0.9rem;
}

.btn--tiny {
  padding: 4px 10px;
  font-size: 0.68rem;
  flex-shrink: 0;
}

.channel-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.channel-group__head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 2px 4px 4px;
}

.channel-group__title {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.channel-group__logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 20px;
  padding: 2px 4px;
  border-radius: 5px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.85);
  flex-shrink: 0;
}

.channel-group__logo {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.channel-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 20, 25, 0.45);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
  font: inherit;
}

.channel-item:disabled {
  pointer-events: none;
}

.channel-item:hover:not(:disabled) {
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(30, 41, 59, 0.55);
}

.channel-item--active {
  border-color: rgba(59, 130, 246, 0.75);
  background: rgba(59, 130, 246, 0.14);
}

.channel-item--empty {
  opacity: 0.72;
  cursor: default;
}

.channel-item__logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 28px;
  padding: 3px 5px;
  border-radius: 7px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
  flex-shrink: 0;
}

.channel-item__logo {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.channel-item__info {
  min-width: 0;
}

.channel-item__name {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
}

.channel-item__meta {
  margin-top: 2px;
  font-size: 0.6rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-item__play {
  padding: 6px 10px;
  font-size: 0.68rem;
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.18);
  color: #dbeafe;
  cursor: pointer;
  flex-shrink: 0;
}

.channel-item--empty .channel-item__play {
  opacity: 0.45;
  cursor: not-allowed;
}

.channel-edit-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(15, 20, 25, 0.35);
}

.channel-edit-row input {
  width: 100%;
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid var(--surface-2);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 0.72rem;
}

.channel-edit-row__actions {
  display: flex;
  gap: 6px;
}

.channel-editor {
  flex-shrink: 0;
  padding: 8px 10px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.channel-editor__hint {
  margin: 0 0 8px;
  font-size: 0.62rem;
  line-height: 1.45;
  color: var(--muted);
}

.channel-editor__hint code {
  font-size: 0.6rem;
}

.channel-editor__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.channel-add-btn {
  width: 100%;
  margin-top: 2px;
}

.panel--compact {
  padding: 14px 16px;
  margin-bottom: 0;
}

.panel--compact label {
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.panel--schedule,
.panel--results {
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-bottom: 0;
  padding: 14px 16px;
}

.panel--results {
  flex: 1;
  min-height: 180px;
}

.panel--schedule {
  flex: 0 0 auto;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: min(380px, 42vh);
  background: var(--surface);
  border-color: rgba(59, 130, 246, 0.2);
}

.league-picker-scroll {
  flex-shrink: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 12px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  scrollbar-width: thin;
  scrollbar-color: var(--surface-2) transparent;
}

.league-picker-scroll::-webkit-scrollbar {
  height: 4px;
}

.league-picker-scroll::-webkit-scrollbar-thumb {
  background: var(--surface-2);
  border-radius: 999px;
}

.league-picker {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  width: max-content;
  min-width: 100%;
}

.league-picker__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 62px;
  padding: 6px 8px 7px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 20, 25, 0.55);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.league-picker__btn:hover {
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(20, 28, 38, 0.85);
  color: var(--text);
}

.league-picker__btn--active {
  border-color: rgba(96, 165, 250, 0.75);
  background: rgba(30, 58, 95, 0.45);
  color: var(--text);
}

.league-picker__logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 38px;
  padding: 5px 7px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.league-picker__btn--active .league-picker__logo-wrap {
  box-shadow:
    0 0 0 1px rgba(59, 130, 246, 0.35),
    0 1px 3px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.league-picker__logo {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 100%;
  height: auto;
  object-fit: contain;
}

.league-picker__label {
  font-size: 0.58rem;
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
}

.panel--results {
  flex: 1 1 auto;
  overflow: hidden;
}

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

.panel-head h3,
.panel--results h3 {
  margin: 0;
  font-size: 0.95rem;
}

.panel-head__meta {
  font-size: 0.72rem;
  color: var(--muted);
}

.panel-head--schedule {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px 6px;
  margin-bottom: 0;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.1), transparent);
}

.panel-head--schedule h3 {
  margin: 0;
  font-size: 0.88rem;
  display: inline;
}

.panel-head__sub {
  display: inline;
  margin-left: 6px;
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 500;
}

.schedule-filter-scroll {
  flex-shrink: 0;
  overflow-x: auto;
  overflow-y: visible;
  padding: 6px 12px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  scrollbar-width: thin;
  scrollbar-color: var(--surface-2) transparent;
}

.schedule-filter-scroll::-webkit-scrollbar {
  height: 4px;
}

.schedule-filter-scroll::-webkit-scrollbar-thumb {
  background: var(--surface-2);
  border-radius: 999px;
}

.schedule-filter {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  width: max-content;
  min-width: 100%;
}

.schedule-filter__btn {
  padding: 5px 11px;
  font-size: 0.68rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--surface-2);
  background: rgba(15, 20, 25, 0.6);
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.schedule-filter__btn:hover {
  color: var(--text);
  border-color: rgba(59, 130, 246, 0.5);
}

.schedule-filter__btn--active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(37, 99, 235, 0.2));
  border-color: var(--accent);
  color: #dbeafe;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.25);
}

.schedule-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  max-height: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 8px 8px;
}

.schedule-next {
  margin: auto 8px;
  padding: 14px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(59, 130, 246, 0.35);
  background: rgba(15, 20, 25, 0.45);
  text-align: center;
}

.schedule-next__eyebrow {
  margin: 0 0 6px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.schedule-next__date {
  margin: 0 0 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #dbeafe;
}

.schedule-next__msg {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.45;
  color: var(--muted);
}

.schedule-item__time--tba {
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
}

.schedule-date {
  font-size: 0.62rem;
  font-weight: 700;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 2px 2px;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}

.schedule-date:first-child {
  padding-top: 2px;
}

.schedule-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  width: 100%;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: rgba(15, 20, 25, 0.45);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.schedule-item:hover {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.1);
}

.schedule-item--active {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.16);
}

.schedule-item--today {
  border-left: 2px solid var(--success);
  padding-left: 6px;
}

.schedule-item__time {
  font-size: 0.68rem;
  font-weight: 700;
  color: #93c5fd;
  font-variant-numeric: tabular-nums;
}

.schedule-item__match {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-item__vs {
  font-size: 0.62rem;
  color: var(--muted);
  font-weight: 500;
}

.schedule-item__badge {
  font-size: 0.58rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.2);
  flex-shrink: 0;
}

.input-row--stack {
  flex-direction: column;
}

.input-row--stack .btn {
  width: 100%;
}

.info--compact {
  padding: 12px 16px;
  margin-bottom: 0;
}

.info--compact .note {
  margin: 0;
  font-size: 0.82rem;
}

.player-shell {
  margin-bottom: 0;
}

.panel {
  margin-bottom: 0;
}

.search-results {
  margin-top: 0;
  overflow-y: auto;
  flex: 1;
  min-height: 200px;
  max-height: min(520px, 55vh);
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-item {
  padding: 8px 10px;
  gap: 8px;
}

.search-item__name {
  font-size: 0.82rem;
}

.search-item .btn {
  padding: 8px 12px;
  font-size: 0.8rem;
}

.search-item--active {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.12);
}

@media (max-width: 1180px) {
  .layout {
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  }

  .channel-rail {
    position: static;
    max-height: none;
    order: 3;
  }

  .panel--channels {
    max-height: 360px;
  }
}

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

  .sidebar {
    position: static;
    max-height: none;
    order: 2;
  }

  .main-column {
    order: 1;
  }

  .channel-rail {
    order: 3;
  }

  .schedule-list {
    max-height: 200px;
  }

  .search-results {
    max-height: min(400px, 45vh);
  }
}

@media (max-width: 600px) {
  .input-row:not(.input-row--stack) {
    flex-direction: column;
  }
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.player-shell {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.player-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: linear-gradient(180deg, #3a3a3a, #2a2a2a);
  border-bottom: 1px solid #111;
  font-size: 0.85rem;
}

.player-titlebar__icon {
  color: #ff8800;
}

.player-titlebar__text {
  font-weight: 600;
  color: #eee;
}

.player-titlebar__state {
  margin-left: auto;
  color: #ff8800;
  font-size: 0.8rem;
}

.player-body {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
}

video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: #aaa;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.player-overlay.hidden {
  display: none;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-icon {
  color: #ff8800;
  margin-right: 4px;
}

.status {
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
}

.status--ok {
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status--error {
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status--unknown {
  color: var(--muted);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: var(--radius);
  padding: 20px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
}

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

input[type="text"] {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--surface-2);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.btn {
  padding: 12px 18px;
  border: 1px solid var(--surface-2);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.btn:hover:not(:disabled) {
  background: #2d3d56;
}

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

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
}

.btn--primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.hint {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

.status-box {
  padding: 20px 24px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  text-align: center;
  font-size: 1.05rem;
  border: 1px solid var(--surface-2);
}

.status-box--info {
  background: var(--surface);
  color: var(--muted);
}

.status-box--loading {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}

.status-box--success {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
  color: #86efac;
}

.status-box--error {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

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

.stream-url-panel {
  margin-top: 0;
}

.stream-url-panel label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.78rem;
  color: var(--muted);
}

.stream-url-field {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: #dbeafe;
  font-size: 0.72rem;
  font-family: ui-monospace, Consolas, monospace;
}

.stream-url-field:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.55);
}

.stream-url-hint {
  margin: 8px 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.45;
}

.stats h3,
.info h3 {
  margin: 0 0 14px;
  font-size: 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.stats-grid div {
  background: var(--bg);
  padding: 12px;
  border-radius: 8px;
}

.stats-grid span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.stats-grid strong {
  font-size: 1.1rem;
}

.panel-head--highlights {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.panel-head--highlights h3 {
  margin: 0;
  font-size: 0.95rem;
}

.highlights-note {
  margin: 0 0 10px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.highlights-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(420px, 48vh);
  overflow-y: auto;
  padding-right: 4px;
}

.highlight-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--surface-2);
  border-radius: 10px;
}

.highlight-item--active {
  border-color: rgba(239, 68, 68, 0.55);
  background: rgba(239, 68, 68, 0.08);
}

.highlight-item__row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.highlight-item__thumb {
  flex-shrink: 0;
  width: 112px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #000;
}

.highlight-item__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 63px;
  object-fit: cover;
}

.highlight-item__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.highlight-item__source {
  display: inline-block;
  font-size: 0.72rem;
  color: #fca5a5;
  font-weight: 600;
}

.highlight-item__pending {
  font-size: 0.75rem;
  color: var(--muted);
}

.highlight-item__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
}

.highlight-item__match {
  font-size: 0.88rem;
  font-weight: 600;
}

.highlight-item__meta {
  font-size: 0.75rem;
  color: var(--muted);
}

.highlight-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.highlight-item__actions .btn {
  padding: 6px 10px;
  font-size: 0.74rem;
}

.highlight-item__actions .btn--tvri {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.12);
}

.highlight-item__actions .btn--youtube {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(220, 38, 38, 0.1);
}

.highlights-embed {
  margin-bottom: 12px;
  border: 1px solid var(--surface-2);
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}

.highlights-embed__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface-2);
}

.highlights-embed__title {
  font-size: 0.82rem;
  font-weight: 600;
}

.highlights-embed__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.highlights-embed__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.hidden {
  display: none;
}

.diag-output {
  margin: 0;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 0.8rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.search-results {
  margin-top: 0;
  overflow-y: auto;
  flex: 1;
  min-height: 200px;
  max-height: min(520px, 55vh);
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  gap: 8px;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--surface-2);
}

.search-item__name {
  font-size: 0.82rem;
  flex: 1;
  min-width: 0;
}

.search-item__meta {
  font-size: 0.75rem;
  color: var(--muted);
}

.search-item .btn {
  padding: 8px 12px;
  font-size: 0.8rem;
}

.search-item--active {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.12);
}

.search-empty {
  color: var(--muted);
  font-size: 0.85rem;
  padding: 8px 0;
}

.info ol {
  margin: 0;
  padding-left: 20px;
}

.info li {
  margin-bottom: 8px;
}

.note {
  margin: 14px 0 0;
  padding: 12px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 8px;
  color: #fcd34d;
  font-size: 0.9rem;
}
