/* starcrossed.tv broadcast UI */

:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --surface1: #12151b;
  --surface2: #161b22;
  --surface3: #1c2330;
  --border: #252c3a;
  --text: #e6eaf2;
  --muted: #a7b0c0;
  --accent: #7c5cff;
  --success: #3fae8b;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --tap: 44px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: radial-gradient(1200px 800px at 30% 0%, rgba(124, 92, 255, 0.08), transparent 60%),
    var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

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

.app {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 13, 16, 0.72);
  backdrop-filter: blur(10px);
}

.topbar__left,
.topbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar__right {
  justify-content: flex-end;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
}

.brand:focus-visible {
  outline: 2px solid rgba(124, 92, 255, 0.6);
  outline-offset: 2px;
}

.brand:hover {
  border-color: rgba(124, 92, 255, 0.22);
  background: rgba(18, 21, 27, 0.55);
  text-decoration: none;
}

.brand__mark {
  color: var(--accent);
  filter: drop-shadow(0 0 12px rgba(124, 92, 255, 0.4));
  font-size: 16px;
  line-height: 1;
}

.brand__name {
  font-weight: 650;
  letter-spacing: 0.2px;
}

.topbar__meta {
  font-size: 12px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(37, 44, 58, 0.7);
  background: rgba(18, 21, 27, 0.6);
}

.dot {
  opacity: 0.6;
}

.search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(37, 44, 58, 0.8);
  background: rgba(18, 21, 27, 0.55);
  color: var(--muted);
}

.search__input {
  width: 190px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}

.search__input::placeholder {
  color: rgba(167, 176, 192, 0.8);
}

.search__input:disabled {
  opacity: 0.55;
}

/* Buttons */
.btn {
  min-height: var(--tap);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(37, 44, 58, 0.9);
  background: rgba(18, 21, 27, 0.85);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.btn:hover {
  border-color: rgba(124, 92, 255, 0.35);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0px);
}

.btn:focus-visible {
  outline: 2px solid rgba(124, 92, 255, 0.7);
  outline-offset: 2px;
}

.btn--primary {
  border-color: rgba(124, 92, 255, 0.55);
  background: rgba(124, 92, 255, 0.12);
}

.btn--secondary {
  background: rgba(22, 27, 34, 0.9);
}

.btn--tertiary {
  background: transparent;
}

/* Stage panels (loading/error/empty) */
.stage {
  flex: 1;
  padding: 18px 16px 28px;
}

.panel {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(37, 44, 58, 0.85);
  background: rgba(18, 21, 27, 0.8);
}

.panel__title {
  font-size: 18px;
  font-weight: 650;
}

.panel__subtitle {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.panel__actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

/* Guide area */
.guide {
  max-width: 1400px;
  margin: 0 auto;
}

.guide__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 auto 14px;
}

.viewtoggle {
  display: inline-flex;
  gap: 8px;
}

.chip {
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(37, 44, 58, 0.9);
  background: rgba(18, 21, 27, 0.75);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.chip:hover {
  border-color: rgba(124, 92, 255, 0.35);
}

.chip:focus-visible {
  outline: 2px solid rgba(124, 92, 255, 0.7);
  outline-offset: 2px;
}

.chip--active {
  color: var(--text);
  border-color: rgba(124, 92, 255, 0.55);
  background: rgba(124, 92, 255, 0.12);
}

.chip--ghost {
  color: var(--text);
  border-color: rgba(37, 44, 58, 0.85);
  background: rgba(18, 21, 27, 0.35);
}

/* On Now stack (mobile-first) */
.onnow {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.onnow__card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(37, 44, 58, 0.85);
  background: rgba(18, 21, 27, 0.75);
  padding: 12px;
}

.onnow__row {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 12px;
  align-items: center;
}

.stationbug__name {
  font-weight: 700;
  font-size: 13px;
}

.stationbug__slug {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.onnow__title {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
}

.onnow__meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.onnow__actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

/* Grid */
.grid {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(37, 44, 58, 0.9);
  background: rgba(18, 21, 27, 0.6);
  --grid-row-h: 52px;
  /* The grid itself is the vertical scroller so the header can stick without covering rows. */
  max-height: calc(100vh - 210px);
  overflow-y: auto;
  overflow-x: hidden;
}

.grid__header {
  display: grid;
  grid-template-columns: 240px 1fr;
  border-bottom: 1px solid rgba(37, 44, 58, 0.9);
  background: rgba(18, 21, 27, 0.85);
  position: sticky;
  top: 0;
  z-index: 30;
}

.grid__lefthead {
  border-right: 1px solid rgba(37, 44, 58, 0.85);
}

.grid__righthead {
  min-width: 0;
}

.grid__timeline {
  position: relative;
  height: 46px;
  overflow-x: auto;
  overflow-y: hidden;
}

.timeline__rail {
  position: relative;
  height: 46px;
  width: var(--timeline-width, 1200px);
}

/* Hide the timeline scrollbar; the body scroller is the primary affordance. */
.grid__timeline {
  scrollbar-width: none;
}
.grid__timeline::-webkit-scrollbar {
  height: 0;
}

.tick {
  position: absolute;
  top: 12px;
  width: 1px;
  height: 22px;
  background: rgba(37, 44, 58, 0.8);
}

.tick--major {
  background: rgba(37, 44, 58, 1);
}

.tick__label {
  position: absolute;
  top: -10px;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 650;
  color: rgba(167, 176, 192, 0.95);
  white-space: nowrap;
}

.grid__body {
  position: relative;
  display: grid;
  grid-template-columns: 240px 1fr;
  /* Vertical scrolling is handled by `.grid` now. */
  overflow: visible;
}

.grid__leftcol {
  border-right: 1px solid rgba(37, 44, 58, 0.85);
  background: rgba(18, 21, 27, 0.9);
}

.grid__rightcol {
  position: relative;
  min-width: 0;
  overflow-x: visible;
  overflow-y: hidden;
}

.grid__xscroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
}

/* Daypart background bands (subtle but high-signal) */
.dayparts-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.dayparts-overlay .band {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--x);
  width: var(--w);
  opacity: 0.38;
}

.dayparts-overlay .band.b0 {
  background: rgba(15, 23, 42, 0.0);
}

.dayparts-overlay .band.b1 {
  background: rgba(99, 102, 241, 0.06);
}

.dayparts-overlay .band.b2 {
  background: rgba(34, 211, 238, 0.045);
}

.dayparts-overlay .band.b3 {
  background: rgba(244, 63, 94, 0.04);
}

.rows {
  position: relative;
  width: var(--rows-width, 1200px);
}

.row {
  position: relative;
  height: var(--grid-row-h);
  border-bottom: 1px solid rgba(37, 44, 58, 0.55);
  width: 100%;
}

.channel {
  width: 100%;
  height: var(--grid-row-h);
  text-align: left;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid rgba(37, 44, 58, 0.55);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.channel:hover {
  background: rgba(124, 92, 255, 0.06);
}

.channel:focus-visible {
  outline: 2px solid rgba(124, 92, 255, 0.7);
  outline-offset: -2px;
}

.channel__name {
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* Subtle “station bug” warmth to separate channel names from program lanes. */
  padding: 2px 8px;
  margin-left: -8px;
  margin-right: auto;
  border-radius: 999px;
  border: 1px solid rgba(90, 18, 30, 0.35);
  background: linear-gradient(180deg, rgba(90, 18, 30, 0.55), rgba(90, 18, 30, 0.18));
}

.channel__desc {
  margin-top: 0px;
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
  line-height: 1.2;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.slot {
  position: absolute;
  top: 6px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(37, 44, 58, 0.95);
  background: rgba(22, 27, 34, 0.9);
  color: var(--text);
  padding: 6px 8px;
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.slot:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 92, 255, 0.35);
}

.slot:focus-visible {
  outline: 2px solid rgba(124, 92, 255, 0.7);
  outline-offset: 2px;
}

.slot__title {
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot__meta {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(167, 176, 192, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot--live {
  border-color: rgba(124, 92, 255, 0.7);
  background: rgba(124, 92, 255, 0.12);
}

/* NOW needle */
.needle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  pointer-events: none;
  z-index: 5;
}

.needle__label {
  position: sticky;
  top: 8px;
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(124, 92, 255, 0.65);
  background: rgba(11, 13, 16, 0.7);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
}

.needle__line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(124, 92, 255, 0.85);
  box-shadow: 0 0 18px rgba(124, 92, 255, 0.35);
}

/* “Back to Live” should never feel like it disappeared. */
.guide__toolbar #sc-back-live {
  position: sticky;
  right: 0;
  z-index: 55; /* Above grid header/rows; below popover/drawer layers. */
}

/* Channel drawer */
.drawer-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
  z-index: 60;
}

.drawer-scrim.drawer-scrim--open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  max-width: calc(100vw - 60px);
  border-left: 1px solid rgba(37, 44, 58, 0.9);
  background: rgba(18, 21, 27, 0.96);
  box-shadow: var(--shadow);
  transform: translateX(102%);
  transition: transform 180ms ease;
  z-index: 70;
  pointer-events: none;
  display: flex;
  flex-direction: column;
}

.drawer.drawer--open {
  transform: translateX(0%);
  pointer-events: auto;
}

.drawer:focus-visible {
  outline: 2px solid rgba(124, 92, 255, 0.7);
  outline-offset: 2px;
}

.drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(37, 44, 58, 0.7);
}

.drawer__title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.drawer__subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.drawer__close {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(37, 44, 58, 0.9);
  background: rgba(18, 21, 27, 0.7);
  color: var(--text);
  cursor: pointer;
  flex: 0 0 auto;
}

.drawer__close:focus-visible {
  outline: 2px solid rgba(124, 92, 255, 0.7);
  outline-offset: 2px;
}

.drawer__content {
  padding: 14px 14px 18px;
  overflow: auto;
}

.drawer__sectionTitle {
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.4px;
  color: rgba(167, 176, 192, 0.95);
  margin-top: 14px;
}

.drawer__sectionBody {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
}

.drawer__lineup {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drawer__slot {
  width: 100%;
  text-align: left;
  padding: 10px 10px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(37, 44, 58, 0.85);
  background: rgba(22, 27, 34, 0.7);
  color: var(--text);
  cursor: pointer;
}

.drawer__slot:hover {
  border-color: rgba(124, 92, 255, 0.35);
}

.drawer__slot:focus-visible {
  outline: 2px solid rgba(124, 92, 255, 0.7);
  outline-offset: 2px;
}

.drawer__slotTitle {
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
}

.drawer__slotMeta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.drawer__badgeLive {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(124, 92, 255, 0.65);
  background: rgba(124, 92, 255, 0.12);
  color: var(--text);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.5px;
  margin-right: 8px;
}

/* Modal (matching guide style) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.58);
  display: none;
  padding: 24px 16px;
  overflow: auto;
}

.modal-backdrop[aria-hidden="false"] {
  display: block;
}

.modal {
  max-width: 860px;
  margin: 0 auto;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.55);
  padding: 16px 16px 18px;
}

.modal:focus-visible {
  outline: 2px solid rgba(124, 92, 255, 0.7);
  outline-offset: 2px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.modal-title {
  font-size: 16px;
  font-weight: 800;
  margin: 0;
}

.modal-close {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(5, 8, 22, 0.65);
  color: var(--text);
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 12px;
}

.modal-close:hover {
  background: rgba(5, 8, 22, 0.85);
  border-color: rgba(148, 163, 184, 0.5);
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.kv {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px;
  align-items: start;
}

.k {
  color: var(--muted);
  font-size: 12px;
}

.v {
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}

.v .muted {
  color: var(--muted);
}

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

.program__kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.program__title {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 750;
  line-height: 1.2;
}

.program__meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.program__sub {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(167, 176, 192, 0.95);
}

.program__live {
  margin-top: 10px;
  padding: 10px 10px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(124, 92, 255, 0.45);
  background: rgba(124, 92, 255, 0.1);
  font-weight: 700;
}

.program__notes {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(167, 176, 192, 0.95);
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.modal-actions .btn--tertiary {
  grid-column: 1 / -1;
}

.watch {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 10px;
  margin-top: 4px;
}

.watch-title {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.watch-list {
  margin: 0;
  padding-left: 18px;
}

.watch-list li {
  margin: 4px 0;
  font-size: 12px;
}

.watch-empty {
  color: var(--muted);
  font-size: 12px;
}

/* Legacy program styles (kept for compatibility) */
.program__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.program__actions .btn--tertiary {
  grid-column: 1 / -1;
}

.program__providers {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(37, 44, 58, 0.7);
}

.program__providersTitle {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: rgba(167, 176, 192, 0.95);
  margin-bottom: 8px;
}

.providers {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.provider {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(37, 44, 58, 0.85);
  background: rgba(18, 21, 27, 0.55);
}

.provider:hover {
  border-color: rgba(124, 92, 255, 0.35);
  text-decoration: none;
}

.provider__name {
  font-weight: 700;
}

.provider__region {
  font-size: 11px;
  color: var(--muted);
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

/* Tooltip */
.tooltip {
  position: fixed;
  z-index: 50;
  max-width: 360px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.96);
  color: var(--text);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  display: none;
}

.tooltip .t-title {
  font-weight: 700;
  font-size: 12px;
  line-height: 1.2;
}

.tooltip .t-sub {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

.tooltip .t-desc {
  margin-top: 8px;
  font-size: 11px;
  color: #e5e7eb;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(37, 44, 58, 0.9);
  background: rgba(18, 21, 27, 0.92);
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
  transition: opacity 140ms ease, transform 140ms ease;
  z-index: 110;
}

.toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0px);
}

/* Responsive */
@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "left right"
      "center center";
  }
  .topbar__left {
    grid-area: left;
  }
  .topbar__right {
    grid-area: right;
  }
  .topbar__center {
    grid-area: center;
    justify-self: start;
  }
  .search {
    display: none;
  }
  .onnow__row {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .onnow__actions {
    margin-top: 10px;
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Watching Mode */
.watch {
  padding-bottom: 92px; /* room for bottom actions */
}

.watch__header {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.watch__kicker {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.watch__title {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.watch__meta {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(167, 176, 192, 0.95);
  line-height: 1.35;
}

.syncbar {
  max-width: 1100px;
  margin: 8px auto 10px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(37, 44, 58, 0.9);
  background: rgba(18, 21, 27, 0.75);
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 12px;
  align-items: center;
}

.syncbar__label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: rgba(167, 176, 192, 0.95);
}

.syncbar__value {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 750;
}

.syncbar__timecode {
  margin-top: 4px;
  font-size: 28px;
  font-weight: 850;
  letter-spacing: 0.4px;
  color: var(--text);
  text-shadow: 0 0 18px rgba(124, 92, 255, 0.16);
}

.syncbar__subvalue {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.2px;
  color: var(--muted);
}

.syncbar__right {
  display: inline-flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.syncbar__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.syncbar__app-tc-group {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(37, 44, 58, 0.5);
  width: 100%;
}

.syncbar__label--small {
  font-size: 10px;
  margin-bottom: 2px;
}

.syncbar__timecode--small {
  font-size: 18px;
  font-weight: 750;
  text-shadow: 0 0 12px rgba(124, 92, 255, 0.12);
}

.syncbar__offset {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-top: 2px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: transparent;
}

.syncbar__offset--synced {
  color: var(--success);
  background: rgba(63, 174, 139, 0.12);
}

.syncbar__offset--behind {
  color: rgba(255, 180, 80, 0.95);
  background: rgba(255, 180, 80, 0.1);
}

.syncbar__offset--ahead {
  color: rgba(124, 92, 255, 0.95);
  background: rgba(124, 92, 255, 0.1);
}

.syncbar__pause-state {
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: rgba(37, 44, 58, 0.4);
  border: 1px solid rgba(37, 44, 58, 0.6);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.2s ease;
}

.syncbar__pause-state--ready {
  background: rgba(124, 92, 255, 0.15);
  border-color: rgba(124, 92, 255, 0.3);
  color: var(--accent);
}

.syncbar__pause-text {
  text-align: center;
}

.syncbar__sync-method {
  display: flex;
  align-items: center;
  margin-right: 8px;
}

.syncbar__method-tabs {
  display: flex;
  gap: 4px;
  background: rgba(37, 44, 58, 0.4);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.syncbar__method-tab {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: calc(var(--radius-sm) - 2px);
  cursor: pointer;
  transition: all 0.15s ease;
}

.syncbar__method-tab:hover {
  color: var(--text);
  background: rgba(37, 44, 58, 0.6);
}

.syncbar__method-tab--active {
  color: var(--text);
  background: rgba(124, 92, 255, 0.2);
}

.syncbar__time-entry-group {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 8px;
}

.syncbar__time-input-group {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(37, 44, 58, 0.4);
  border: 1px solid rgba(37, 44, 58, 0.6);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
}

.syncbar__time-input {
  width: 70px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  background: transparent;
  border: none;
  outline: none;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.syncbar__time-input::placeholder {
  color: var(--muted);
  opacity: 0.5;
}

.syncbar__time-toggle {
  width: 20px;
  height: 20px;
  padding: 0;
  font-size: 12px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.syncbar__time-toggle:hover {
  color: var(--text);
  background: rgba(37, 44, 58, 0.6);
}

.btn--small {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
}

.syncbar__sync-suggestions {
  display: flex;
  gap: 6px;
  margin-right: 8px;
}

.btn--pulse {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(124, 92, 255, 0.4);
  }
  50% {
    opacity: 0.9;
    box-shadow: 0 0 0 4px rgba(124, 92, 255, 0);
  }
}

.momentbar {
  max-width: 1100px;
  margin: 0 auto 14px;
  padding: 0 16px;
}

.momentbar__rail {
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(37, 44, 58, 0.85);
  background: rgba(18, 21, 27, 0.55);
  position: relative;
  overflow: hidden;
}

.momentbar__star {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(167, 176, 192, 0.45);
  box-shadow: none;
}

.momentbar__star--lit {
  background: rgba(124, 92, 255, 0.9);
  box-shadow: 0 0 12px rgba(124, 92, 255, 0.35);
}

.watch__main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px 14px;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 14px;
  align-items: start;
}

.nowcard,
.feed {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(37, 44, 58, 0.85);
  background: rgba(18, 21, 27, 0.72);
  padding: 12px 12px 14px;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(37, 44, 58, 0.9);
  background: rgba(22, 27, 34, 0.65);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: var(--text);
}

.nowcard__label {
  font-size: 12px;
  font-weight: 750;
  color: rgba(167, 176, 192, 0.95);
  text-align: right;
}

.nowcard__body {
  margin-top: 10px;
  font-size: 13px;
  color: rgba(230, 234, 242, 0.95);
  line-height: 1.45;
}

.nowcard__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

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

.feed__title {
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.2px;
}

.feed__subtitle {
  font-size: 12px;
  color: var(--muted);
}

.feed__list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.moment {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(37, 44, 58, 0.85);
  background: rgba(22, 27, 34, 0.65);
  padding: 10px 10px 11px;
}

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

.moment__tc {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.4px;
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(37, 44, 58, 0.9);
  background: rgba(18, 21, 27, 0.35);
  font-size: 11px;
  font-weight: 850;
  color: rgba(167, 176, 192, 0.95);
}

.moment__q {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.moment__sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.watch__actions {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: min(1100px, calc(100vw - 24px));
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(37, 44, 58, 0.85);
  background: rgba(18, 21, 27, 0.72);
  backdrop-filter: blur(10px);
  z-index: 100;
}

.watch__action {
  width: 100%;
}

/* Ask Sheet */
.sheet-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  z-index: 120;
}

.sheet {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: min(720px, calc(100vw - 24px));
  max-height: calc(100vh - 120px);
  overflow: auto;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(37, 44, 58, 0.9);
  background: rgba(22, 27, 34, 0.96);
  box-shadow: var(--shadow);
  padding: 14px 14px 16px;
  z-index: 130;
}

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

.sheet__title {
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0.2px;
}

.sheet__close {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(37, 44, 58, 0.9);
  background: rgba(18, 21, 27, 0.7);
  color: var(--text);
  cursor: pointer;
}

.sheet__form {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.field__label {
  font-size: 12px;
  font-weight: 800;
  color: rgba(167, 176, 192, 0.95);
  margin-bottom: 6px;
}

.field__input,
.field__textarea,
.field__select {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid rgba(37, 44, 58, 0.9);
  background: rgba(18, 21, 27, 0.7);
  color: var(--text);
  padding: 10px 10px;
  font-size: 13px;
  outline: none;
}

.field__textarea {
  resize: vertical;
}

.field__input:focus,
.field__textarea:focus,
.field__select:focus {
  border-color: rgba(124, 92, 255, 0.55);
  outline: 2px solid rgba(124, 92, 255, 0.25);
  outline-offset: 2px;
}

.sheet__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

/* Settings Modal */
.modal-content {
  padding: 0;
}

.field {
  margin-bottom: 16px;
}

.field__help {
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 980px) {
  .syncbar {
    grid-template-columns: 1fr;
  }
  .syncbar__right {
    justify-content: flex-start;
  }
  .watch__main {
    grid-template-columns: 1fr;
  }
  .watch__actions {
    grid-template-columns: 1fr;
  }
}

/* =====================================================================
   K-DRAMA BINGO TAGGING
   ===================================================================== */

.sheet--bottom {
  bottom: 0;
  left: 0;
  right: 0;
  transform: translateY(100%);
  width: 100%;
  max-width: 100%;
  max-height: 60vh;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  transition: transform 0.3s ease-out;
}

.sheet--bottom:not(.hidden) {
  transform: translateY(0);
}

.sheet__subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.bingo__content {
  padding: 16px;
  max-height: calc(60vh - 80px);
  overflow-y: auto;
}

.bingo__trending {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.bingo__trending-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.bingo__trending-chip {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(124, 92, 255, 0.1);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.bingo__trending-chip:hover {
  background: rgba(124, 92, 255, 0.2);
  border-color: rgba(124, 92, 255, 0.4);
  transform: translateY(-1px);
}

.bingo__search {
  margin-bottom: 16px;
}

.bingo__search-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface1);
  color: var(--text);
  font-size: 14px;
}

.bingo__search-input:focus {
  outline: 2px solid rgba(124, 92, 255, 0.7);
  outline-offset: 2px;
  border-color: rgba(124, 92, 255, 0.4);
}

.bingo__categories {
  margin-bottom: 16px;
}

.bingo__category-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.bingo__category-filter {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface1);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.bingo__category-filter:hover {
  border-color: rgba(124, 92, 255, 0.4);
  background: var(--surface2);
}

.bingo__category-filter--active {
  background: rgba(124, 92, 255, 0.15);
  border-color: rgba(124, 92, 255, 0.5);
  color: var(--accent);
}

.bingo__grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bingo__category-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bingo__category-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}

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

.bingo__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface1);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  min-height: var(--tap);
}

.bingo__pill:hover {
  border-color: rgba(124, 92, 255, 0.4);
  background: var(--surface2);
  transform: translateY(-1px);
}

.bingo__pill:active {
  transform: translateY(0);
}

.bingo__pill-label {
  flex: 1;
}

.bingo__pill-info {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--muted);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.bingo__pill-info:hover {
  border-color: rgba(124, 92, 255, 0.4);
  background: rgba(124, 92, 255, 0.1);
  color: var(--accent);
}

#sc-tag-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 130;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow);
  min-width: 280px;
  max-width: 90vw;
}

.toast__content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast__message {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

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

.toast__btn {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface1);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.toast__btn:hover {
  border-color: rgba(124, 92, 255, 0.4);
  background: var(--surface2);
}

.toast__btn:active {
  transform: scale(0.98);
}

.moment--tag {
  border-left: 3px solid rgba(124, 92, 255, 0.4);
}

.moment__count {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.moment__jump {
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface1);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.moment__jump:hover {
  border-color: rgba(124, 92, 255, 0.4);
  background: var(--surface2);
}

.pill--tag {
  background: rgba(124, 92, 255, 0.1);
  border-color: rgba(124, 92, 255, 0.3);
  color: var(--accent);
}

.feed__tags {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

@media (max-width: 640px) {
  .sheet--bottom {
    max-height: 70vh;
  }
  .bingo__content {
    max-height: calc(70vh - 80px);
  }
  .bingo__pills {
    gap: 6px;
  }
  .bingo__pill {
    padding: 8px 12px;
    font-size: 12px;
  }
}


