/* ============================================================
   BTOWN TV — css/tv.css
   A finite, human-picked page of videos. Lean-back: big
   thumbnails, one pick, short shelves, done. Rides the guide's
   tokens (css/style.css) so light/dark follow the sun like the
   rest of the site; dark is the native mood.
============================================================ */

.tv-page { max-width: 1180px; margin: 0 auto; padding: 0 20px 72px; }
.tv-page[hidden] { display: none; }

/* --- masthead --- */
.tv-mast { padding: 28px 0 18px; border-bottom: 1px solid var(--line); }
.tv-kicker {
  font-family: var(--font-body); font-size: var(--text-xs); letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px;
}
.tv-title {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em;
  font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1; color: var(--ink);
}
.tv-title em { font-style: normal; color: var(--coral); }
.tv-tag { margin-top: 10px; color: var(--ink-2); font-size: var(--text-md); max-width: 48em; }
.tv-mast-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 16px;
}
.tv-edition { font-size: var(--text-sm); color: var(--ink-3); }
.tv-edition b { color: var(--ink-2); font-weight: 600; }
.tv-play {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--radius-full);
  background: var(--coral); color: #fff; text-decoration: none;
  font-family: var(--font-body); font-weight: 600; font-size: var(--text-base);
  box-shadow: var(--shadow-sm); transition: transform var(--duration-fast) var(--ease), box-shadow var(--duration-fast) var(--ease);
}
.tv-play:hover, .tv-play:focus-visible { transform: translateY(-1px); box-shadow: var(--shadow-md); outline: none; }
.tv-play svg { width: 16px; height: 16px; }
.tv-how {
  background: none; border: 1px solid var(--line); color: var(--ink-2);
  padding: 8px 12px; border-radius: var(--radius-full); cursor: pointer;
  font: inherit; font-size: var(--text-sm);
}
.tv-how[aria-expanded="true"] { background: var(--bg-subtle); }
.tv-howtext {
  margin: 14px 0 0; padding: 14px 16px; background: var(--bg-subtle);
  border-radius: var(--radius-md); color: var(--ink-2); font-size: var(--text-sm);
  max-width: 64em; line-height: 1.55;
}
.tv-howtext[hidden] { display: none; }
.tv-howtext a { color: var(--teal); }

/* --- empty / stale --- */
.tv-empty { padding: 48px 0; color: var(--ink-3); text-align: center; }
.tv-stale {
  margin: 12px 0 0; font-size: var(--text-sm); color: var(--coral);
}

/* --- tonight's pick --- */
.tv-pick { margin: 28px 0 8px; }
.tv-pick-label {
  font-family: var(--font-body); font-size: var(--text-xs); letter-spacing: .14em;
  text-transform: uppercase; color: var(--coral); margin-bottom: 10px; font-weight: 600;
}
.tv-pick-card {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 22px; align-items: center; text-decoration: none; color: inherit;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-md);
}
.tv-pick-card .tv-thumb { border-radius: 0; aspect-ratio: 16 / 9; }
.tv-pick-body { padding: 22px 26px 22px 4px; min-width: 0; }
.tv-pick-body h2 {
  font-family: var(--font-display); font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  line-height: 1.18; color: var(--ink); margin: 0 0 10px; text-wrap: balance;
}
.tv-pick-body .tv-why { font-size: var(--text-md); }
.tv-pick-note { color: var(--ink-3); text-transform: none; letter-spacing: 0; font-weight: 500; }
.tv-pick-acts { display: flex; justify-content: flex-end; margin-top: 6px; }
.tv-pick-acts .tv-acts { padding: 0; gap: 2px; }
.tv-pick-acts .tv-act { flex: 0 0 auto; padding: 6px 10px; }
.tv-pick.is-watched .tv-pick-card { opacity: .55; }
.tv-pick.is-skipped .tv-pick-card { opacity: .35; }
.tv-pick.is-skipped .tv-pick-body h2 { text-decoration: line-through; }
@media (max-width: 760px) {
  .tv-pick-card { grid-template-columns: 1fr; gap: 0; }
  .tv-pick-body { padding: 16px 18px 18px; }
}

/* --- shelves --- */
.tv-shelf { margin: 36px 0 0; }
.tv-shelf-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.tv-shelf-head h2 {
  font-family: var(--font-display); font-size: var(--text-xl); color: var(--ink); font-weight: 600;
}
.tv-shelf-head p { color: var(--ink-3); font-size: var(--text-sm); margin: 0; }
.tv-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* --- card --- */
.tv-card {
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column; min-width: 0;
  transition: transform var(--duration-base) var(--ease), box-shadow var(--duration-base) var(--ease), opacity var(--duration-base);
}
.tv-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.tv-card.is-watched { opacity: .55; }
.tv-card.is-skipped { opacity: .35; }
.tv-card.is-skipped .tv-card-title { text-decoration: line-through; }
.tv-swapped {
  position: absolute; left: 8px; top: 8px; padding: 2px 7px; border-radius: 4px;
  background: var(--coral); color: #fff; font-size: 10px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}
.tv-card a.tv-link { text-decoration: none; color: inherit; display: block; }
.tv-thumb {
  position: relative; aspect-ratio: 16 / 9; background: var(--bg-subtle);
  overflow: hidden;
}
.tv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tv-dur {
  position: absolute; right: 8px; bottom: 8px; padding: 2px 7px; border-radius: 4px;
  background: rgba(0,0,0,.78); color: #fff; font-size: var(--text-xs); font-weight: 600;
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.tv-dur.is-live { background: #C62828; }
.tv-card-body { padding: 12px 14px 10px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tv-card-title {
  font-family: var(--font-body); font-weight: 600; font-size: var(--text-base);
  line-height: 1.3; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.tv-meta { font-size: var(--text-xs); color: var(--ink-3); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tv-meta .tv-ch { color: var(--ink-2); font-weight: 500; }
.tv-lane {
  display: inline-block; padding: 1px 6px; border-radius: var(--radius-sm);
  background: var(--teal-light); color: var(--teal); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600;
}
.tv-why { color: var(--ink-2); font-size: var(--text-sm); line-height: 1.45; }

/* --- reactions --- */
.tv-acts { display: flex; gap: 4px; padding: 0 8px 10px; margin-top: auto; }
.tv-act {
  flex: 1; background: none; border: 1px solid transparent; border-radius: var(--radius-md);
  color: var(--ink-3); font: inherit; font-size: var(--text-xs); padding: 6px 4px; cursor: pointer; white-space: nowrap;
  transition: background var(--duration-fast), color var(--duration-fast);
}
.tv-act:hover, .tv-act:focus-visible { background: var(--bg-subtle); color: var(--ink); outline: none; }
.tv-act[aria-pressed="true"] { color: var(--coral); border-color: var(--line); background: var(--bg-subtle); }
.tv-act[data-kind="more"][aria-pressed="true"] { color: #D23F6A; }

/* --- the bench: one fold per shelf, then it's over --- */
.tv-more-btn {
  display: inline-flex; align-items: baseline; gap: 6px; margin-top: 14px;
  background: none; border: 1px solid var(--line); color: var(--ink-2);
  padding: 9px 14px; border-radius: var(--radius-full); cursor: pointer;
  font: inherit; font-size: var(--text-sm); font-weight: 600;
  transition: background var(--duration-fast), color var(--duration-fast), border-color var(--duration-fast);
}
.tv-more-btn span { font-weight: 400; color: var(--ink-3); }
.tv-more-btn:hover, .tv-more-btn:focus-visible { background: var(--bg-subtle); color: var(--ink); border-color: var(--ink-4); outline: none; }
.tv-bench { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); outline: none; }
.tv-bench-head { font-size: var(--text-sm); color: var(--ink-3); margin-bottom: 12px; }
.tv-bench-head span { color: var(--ink-2); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: var(--text-xs); }
.tv-bench-end { margin: 14px 0 0; font-size: var(--text-sm); color: var(--ink-3); font-style: italic; }

/* --- past nights --- */
.tv-past { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); }
.tv-past-strip {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.tv-past-night {
  display: flex; flex-direction: column; gap: 6px; text-align: left; min-width: 0;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 8px; cursor: pointer; font: inherit; color: inherit;
  transition: transform var(--duration-fast) var(--ease), box-shadow var(--duration-fast) var(--ease), border-color var(--duration-fast);
}
.tv-past-night:hover, .tv-past-night:focus-visible { transform: translateY(-1px); box-shadow: var(--shadow-sm); outline: none; }
.tv-past-night[aria-expanded="true"] { border-color: var(--coral); box-shadow: 0 0 0 1px var(--coral); }
.tv-past-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius-sm); background: var(--bg-subtle); }
.tv-past-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tv-past-date { font-size: var(--text-xs); color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.tv-past-title {
  font-size: var(--text-sm); color: var(--ink-2); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tv-past-body { margin-top: 20px; padding: 18px 18px 8px; background: var(--bg-subtle); border-radius: var(--radius-lg); }
.tv-past-body-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.tv-past-body-head h3 { font-family: var(--font-display); font-size: var(--text-lg); color: var(--ink); font-weight: 600; margin: 0; }
.tv-past-body-acts { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tv-past-play {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--radius-full);
  background: var(--coral); color: #fff; text-decoration: none; font-size: var(--text-xs); font-weight: 600;
}
.tv-past-play:hover { filter: brightness(1.05); }
.tv-past-close {
  background: none; border: 1px solid var(--line); color: var(--ink-2); padding: 6px 12px;
  border-radius: var(--radius-full); cursor: pointer; font: inherit; font-size: var(--text-xs);
}
.tv-past-close:hover { background: var(--bg-raised); color: var(--ink); }
.tv-past-pick { margin-bottom: 18px; }
.tv-past-shelf { margin: 0 0 18px; }
.tv-past-shelf h4 { font-family: var(--font-display); font-size: var(--text-md); color: var(--ink); font-weight: 600; margin: 0 0 10px; }
.tv-grid-1 { grid-template-columns: repeat(auto-fill, minmax(260px, 360px)); }
.tv-past-body .tv-card { background: var(--bg-raised); }

/* --- live rail --- */
.tv-live { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); }
.tv-live h2 { font-family: var(--font-display); font-size: var(--text-lg); color: var(--ink); font-weight: 600; margin-bottom: 8px; }
.tv-live-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tv-live-list a {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px;
  border: 1px solid var(--line); border-radius: var(--radius-full); text-decoration: none;
  color: var(--ink-2); font-size: var(--text-sm); background: var(--bg-raised);
}
.tv-live-list a i { width: 8px; height: 8px; border-radius: 50%; background: #C62828; display: inline-block; }
.tv-live-list a:hover { color: var(--ink); border-color: var(--ink-4); }

/* --- colophon --- */
.tv-colophon {
  margin-top: 44px; padding-top: 14px; border-top: 1px solid var(--line);
  color: var(--ink-3); font-size: var(--text-xs); line-height: 1.6;
}
.tv-colophon a { color: var(--teal); }

/* --- toast --- */
.tv-toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--radius-full);
  font-size: var(--text-sm); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  z-index: 50; box-shadow: var(--shadow-lg);
}
.tv-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
/* the pill itself stays click-through; only the Undo button takes taps */
.tv-toast-undo {
  pointer-events: auto; margin-left: 10px; background: none; border: 1px solid currentColor; opacity: .85; color: inherit;
  padding: 2px 10px; border-radius: var(--radius-full); cursor: pointer; font: inherit; font-size: var(--text-xs); font-weight: 600;
}
.tv-toast-undo:hover, .tv-toast-undo:focus-visible { opacity: 1; text-decoration: underline; outline: none; }

@media (prefers-reduced-motion: reduce) {
  .tv-card, .tv-play, .tv-toast, .tv-past-night, .tv-more-btn { transition: none; }
  .tv-card:hover, .tv-play:hover, .tv-past-night:hover { transform: none; }
}
