:root {
  --tv-bg: #101816;
  --tv-panel: #1b2823;
  --tv-ink: #f4f1ea;
  --tv-muted: #c9d2cb;
  --tv-teal: #0b6e4f;
  --tv-gold: #c9a227;
  --tv-line: rgba(244, 241, 234, 0.16);
}
* { box-sizing: border-box; }
body.tv-body {
  margin: 0;
  background: var(--tv-bg);
  color: var(--tv-ink);
  font-family: Georgia, "Iowan Old Style", serif;
}
a { color: var(--tv-gold); }
.tv-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: #073b3a;
}
.tv-brand { color: white; text-decoration: none; font-weight: 700; letter-spacing: 0.04em; }
.tv-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.tv-nav a, .tv-button, button.tv-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--tv-teal);
  color: white;
  text-decoration: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}
.tv-button.secondary { background: transparent; color: var(--tv-ink); border: 1px solid var(--tv-line); }
.tv-wrap { width: min(1120px, calc(100% - 28px)); margin: 0 auto; padding: 22px 0 48px; }
.tv-hero h1 { font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.05; margin: 0 0 8px; }
.tv-muted { color: var(--tv-muted); }
.tv-viewing-notice {
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--tv-line);
  border-radius: 12px;
  background: var(--tv-panel);
  color: var(--tv-ink);
  font-family: system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.45;
}
@media (max-width: 700px) {
  .tv-viewing-notice { font-size: 0.95rem; padding: 10px 12px; }
}
.tv-notice, .tv-error {
  background: #24352e;
  border-left: 4px solid var(--tv-gold);
  padding: 14px 16px;
  margin: 16px 0;
}
.tv-cats-block { margin: 14px 0 0; }
.tv-cats-block h2 { font-size: 1.15rem; margin: 0 0 10px; }
.tv-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.tv-cats a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--tv-line);
  background: transparent;
  color: var(--tv-ink);
  text-decoration: none;
  font-family: system-ui, sans-serif;
  font-size: 0.92rem;
  line-height: 1.2;
}
.tv-cats a[aria-current="page"] {
  background: var(--tv-teal);
  border-color: var(--tv-teal);
  color: white;
}
.tv-search { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 18px; }
.tv-search input, .tv-search select, .tv-form input, .tv-form textarea, .tv-form select {
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--tv-line);
  background: #0d1512;
  color: var(--tv-ink);
  padding: 8px 12px;
  font: inherit;
}
.tv-search input { flex: 1 1 220px; }
.tv-section { margin-top: 28px; }
.tv-section h2 { font-size: 1.4rem; margin-bottom: 4px; }
.tv-grid, .tv-rail {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.tv-card {
  background: var(--tv-panel);
  border-radius: 16px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.tv-card:focus-visible, .tv-button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 3px solid var(--tv-gold);
  outline-offset: 2px;
}
.tv-poster {
  aspect-ratio: 16 / 9;
  background: #07110e center/cover no-repeat;
  display: grid;
  place-items: end start;
}
.tv-duration, .tv-views {
  margin: 8px;
  background: rgba(0, 0, 0, 0.72);
  border-radius: 999px;
  padding: 2px 8px;
  font-family: system-ui, sans-serif;
  font-size: 0.82rem;
}
.tv-card div.body { padding: 12px 14px 16px; }
.tv-card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.tv-studio-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.tv-channel-settings { margin: 0 0 8px; }
.tv-channel-settings summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.tv-studio-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.tv-video-card .body { display: grid; gap: 4px; padding: 8px 10px 10px; }
.tv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font-family: system-ui, sans-serif; font-size: 0.78rem; color: var(--tv-muted); }
.tv-video-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tv-video-card img.tv-poster,
.tv-video-card .tv-poster {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.tv-poster-empty { position: relative; background: linear-gradient(160deg, #1b2823, #07110e); }
.tv-poster-empty::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 0;
  height: 0;
  margin: auto;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent var(--tv-gold);
}
.tv-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  margin: 0;
  padding: 2px 10px;
  border-radius: 999px;
  font-family: system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}
.tv-status-review { background: #3d3420; color: var(--tv-gold); }
.tv-status-live { background: var(--tv-teal); color: white; }
.tv-status-rejected { background: #4a2424; color: #f3c1c1; }
.tv-status-processing, .tv-status-hidden { background: #24352e; color: var(--tv-muted); }
.tv-manage { font-family: system-ui, sans-serif; font-size: 0.92rem; }
.tv-stage {
  background: black;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
}
.tv-stage video { width: 100%; max-width: 100%; max-height: 72vh; height: auto; object-fit: contain; background: black; display: block; }
.tv-ad-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  margin: 0;
  padding: 3px 7px;
  border-radius: 3px;
  background: #ffe14a;
  color: #1a1408;
  font-family: system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  pointer-events: none;
}
.tv-ad-badge[hidden] { display: none !important; }
.tv-skip-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 10px;
}
.tv-skip-note {
  margin: 0;
  flex: 1 1 220px;
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--tv-muted);
}
#tv-skip-advert:disabled {
  background: #3a4641;
  color: #d5ddd8;
  cursor: not-allowed;
}
.tv-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.55);
  color: var(--tv-ink);
  font-family: system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
}
.tv-overlay[hidden] {
  display: none !important;
}
.tv-stage.is-advert #tv-player,
.tv-stage:not(.is-advert) #tv-advert,
#tv-player[hidden],
#tv-advert[hidden] {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  max-height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
.tv-advert {
  background: black;
  object-fit: contain;
}
.tv-resume-status {
  position: absolute;
  left: 50%;
  bottom: 52px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 24px);
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(12, 18, 16, 0.88);
  color: var(--tv-ink);
  font-family: system-ui, sans-serif;
  font-size: 0.95rem;
  line-height: 1.3;
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
}
.tv-resume-status[hidden] { display: none !important; }
.tv-resume-spinner {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 2px solid rgba(244, 241, 234, 0.35);
  border-top-color: var(--tv-ink);
  border-radius: 50%;
  animation: tv-resume-spin 0.8s linear infinite;
}
@keyframes tv-resume-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .tv-resume-spinner { animation: none; border-top-color: var(--tv-ink); }
}
@media (max-width: 700px) {
  .tv-resume-status { bottom: 46px; font-size: 0.9rem; padding: 8px 10px; }
}
.tv-form { display: grid; gap: 12px; max-width: 640px; }
.tv-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.tv-checks label { display: flex; gap: 8px; align-items: center; min-height: 44px; }
.tv-progress { height: 8px; background: #0d1512; border-radius: 99px; overflow: hidden; }
.tv-progress span { display: block; height: 100%; width: 0; background: var(--tv-gold); }
.tv-prp-summary { font-family: system-ui, sans-serif; font-size: 1.35rem; margin: 12px 0 4px; }
.tv-prp-list { display: grid; gap: 12px; margin-top: 16px; }
.tv-prp-row {
  background: var(--tv-panel);
  border-radius: 16px;
  padding: 14px 16px;
  display: grid;
  gap: 6px;
}
.tv-prp-row h2 { margin: 0; font-size: 1.15rem; }
.tv-prp-amount { margin: 0; font-family: system-ui, sans-serif; font-size: 1.25rem; }
.tv-prp-row p { margin: 0; overflow-wrap: anywhere; }
.tv-prp-pager { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
@media (max-width: 700px) {
  .tv-top { align-items: flex-start; flex-direction: column; }
  .tv-stage video { max-height: 70vh; object-fit: contain; }
  .tv-cats { gap: 6px; }
  .tv-cats a { min-height: 40px; padding: 8px 12px; }
  .tv-studio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tv-ad-badge { top: 6px; left: 6px; font-size: 0.62rem; padding: 2px 5px; }
  .tv-skip-note { flex-basis: 100%; }
}
@media (max-width: 900px) {
  .tv-studio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .tv-studio-grid { grid-template-columns: 1fr; }
}
.boost-durations {
  border: 1px solid var(--tv-line);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 12px;
  min-width: 0;
}
.boost-durations legend { font-size: 1.25rem; padding: 0 4px; }
.boost-duration {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #12201b;
  min-width: 0;
}
.boost-duration.is-selected {
  border-color: var(--tv-gold);
  background: #24352c;
}
.boost-duration-choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 700;
  line-height: 1.35;
}
.tv-form .boost-budget-field { display: grid; gap: 4px; }
.tv-form .boost-budget-field p { margin: 0; }
.tv-form .boost-reserve-choice {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.tv-form .boost-reserve-choice legend { font-weight: 700; padding: 0; }
.tv-form .boost-reserve-choice p { margin: 0; }
.tv-form .boost-duration-choice input[type="radio"] {
  width: 1.25rem;
  min-width: 1.25rem;
  height: 1.25rem;
  min-height: 1.25rem;
  margin-top: 0.15rem;
  padding: 0;
  accent-color: var(--tv-gold);
}
.boost-duration-fields {
  display: grid;
  gap: 10px;
}
.boost-duration-fields div { display: grid; gap: 4px; min-width: 0; }
.tv-form .boost-duration-fields input { width: 100%; max-width: 12rem; }
.boost-duration input:disabled { opacity: 0.55; }
.boost-summary, .boost-budget-summary {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--tv-panel);
  min-width: 0;
}
.boost-summary { border-left: 4px solid var(--tv-gold); }
.boost-summary h2, .boost-budget-summary h2 { margin: 0; font-size: 1.2rem; }
.boost-summary p, .boost-budget-summary p, .boost-summary li { margin: 0; overflow-wrap: anywhere; }
.boost-summary .tv-notice { margin: 0; }
.boost-summary .tv-notice:empty,
.boost-summary .tv-notice[hidden] { display: none; }
.boost-summary ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 4px; }
@media (min-width: 700px) {
  .boost-duration-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.boost-player-frame {
  width: min(960px, 100%);
  margin: 12px auto;
  display: flex;
  justify-content: center;
  background: transparent;
}
.boost-player-frame video {
  display: block;
  width: min(960px, 100%);
  max-width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  background: #000;
}
.boost-channel {
  width: min(960px, 100%);
  margin: 12px auto 0;
}
.boost-channel p { margin: 0 0 8px; }
@media (max-width: 700px) {
  .boost-player-frame,
  .boost-channel { width: 100%; }
  .boost-player-frame video { max-height: 70vh; }
}
