:root {
  color-scheme: light;
  --bg: #f3f6fa;
  --surface: #ffffff;
  --surface-soft: #eef4f8;
  --ink: #162130;
  --muted: #66758a;
  --line: #d8e2ec;
  --accent: #1f8a70;
  --accent-strong: #146b59;
  --gold: #f2b34f;
  --blue: #4078c0;
  --danger: #d14c4c;
  --tv-bg: #eaf8ff;
  --tv-panel: rgba(255, 255, 255, 0.78);
  --focus: 0 0 0 4px rgba(242, 179, 79, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #f8fbfd 0%, var(--bg) 42%, #edf3f7 100%);
  color: var(--ink);
  font-family: "Avenir Next Rounded", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  height: 64px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 18px;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.brand strong {
  font-size: 21px;
  letter-spacing: .02em;
}

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

.topbar > .tag {
  flex: 0 1 auto;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mode-switch {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.segmented,
.ghost-button,
.primary-button,
.danger-button,
.icon-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 8px;
  min-height: 38px;
  padding: 0 12px;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.segmented:hover,
.ghost-button:hover,
.primary-button:hover,
.danger-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.segmented.active,
.primary-button {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  font-weight: 700;
}

.danger-button {
  background: #fff5f5;
  border-color: #f0b7b7;
  color: #a53030;
}

.content-root {
  min-height: 0;
}

.hosted-viewer .tv-app,
.hosted-viewer .player-view,
.hosted-viewer .rest-view {
  min-height: 100vh;
}

.tv-app {
  min-height: calc(100vh - 58px);
  background:
    radial-gradient(circle at 8% 4%, rgba(255, 218, 139, .62), transparent 22%),
    radial-gradient(circle at 93% 13%, rgba(115, 210, 226, .42), transparent 24%),
    linear-gradient(180deg, #eafaff 0%, #f8fcf3 54%, #fff8e7 100%);
  color: #29404b;
  display: grid;
  grid-template-rows: auto 1fr;
  position: relative;
  overflow: hidden;
}

.tv-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 28px;
  background: rgba(255, 255, 255, 0.76);
  border-bottom: 1px solid rgba(119, 177, 195, .22);
  backdrop-filter: blur(14px);
  position: relative;
  z-index: 2;
}

.tv-logo {
  font-size: 25px;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #225d66;
  min-height: 44px;
  background: rgba(255, 255, 255, .72);
  border: 2px solid rgba(74, 141, 151, .16);
  border-radius: 999px;
  padding: 5px 14px 5px 6px;
  box-shadow: 0 10px 24px rgba(54, 117, 128, .12);
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 33%, #fff4be 0 12%, transparent 13%),
    linear-gradient(135deg, #ffd969, #ffb15e);
  border: 2px solid rgba(153, 91, 28, .14);
  display: grid;
  place-items: center;
  position: relative;
  flex: 0 0 auto;
}

.logo-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #1f7278;
  box-shadow: 12px 0 0 #1f7278;
}

.logo-shine {
  position: absolute;
  left: 8px;
  top: 7px;
  width: 9px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
}

.logo-text {
  letter-spacing: 0;
}

.tv-status {
  display: flex;
  gap: 14px;
  color: #4e6670;
  font-size: 13px;
  white-space: nowrap;
}

.tv-nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.tv-update-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border: 1px solid rgba(31, 138, 112, .28);
  border-radius: 999px;
  background: linear-gradient(135deg, #fff9df, #e8fff5);
  color: #24636a;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(54, 117, 128, .1);
}

.tv-update-button:hover,
.tv-update-button:focus-visible {
  border-color: #1f8a70;
  background: #fff3b4;
  transform: translateY(-1px) scale(1.03);
  outline: 4px solid rgba(255, 193, 91, .32);
}

.tv-update-button span {
  font-size: 19px;
  line-height: 1;
}

.update-toast {
  position: fixed;
  left: 50%;
  bottom: clamp(24px, 5vh, 54px);
  z-index: 1000;
  max-width: min(80vw, 560px);
  transform: translateX(-50%);
  padding: 14px 22px;
  border: 2px solid rgba(255, 255, 255, .8);
  border-radius: 999px;
  background: rgba(31, 98, 105, .96);
  color: #fff;
  font-size: clamp(15px, 1.3vw, 20px);
  font-weight: 800;
  text-align: center;
  box-shadow: 0 18px 48px rgba(15, 55, 61, .28);
  animation: update-toast-in .2s ease-out;
}

.update-toast.is-success {
  background: rgba(31, 138, 112, .97);
}

.update-toast.is-error {
  background: rgba(185, 77, 57, .97);
}

.update-toast.is-checking {
  background: rgba(38, 105, 139, .97);
}

@keyframes update-toast-in {
  from { opacity: 0; transform: translate(-50%, 10px) scale(.96); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.tv-status span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(112, 167, 181, .22);
  border-radius: 999px;
  padding: 0 10px;
}

.status-animal {
  width: 24px;
  height: 24px;
}

.tv-main {
  padding: 28px;
  display: grid;
  gap: 22px;
  align-content: start;
  position: relative;
  z-index: 1;
}

.home-main {
  gap: 28px;
  padding: 32px clamp(24px, 4vw, 64px) 52px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 24px;
  align-items: stretch;
}

.home-hero {
  grid-template-columns: minmax(0, .92fr) minmax(430px, 1.08fr);
  min-height: 420px;
  gap: clamp(26px, 4vw, 58px);
}

.hero-copy {
  display: grid;
  align-content: center;
  gap: 14px;
  min-width: 0;
  padding: 18px 0;
}

.hero-kicker {
  width: fit-content;
  background: #ffffff;
  border: 2px solid rgba(255, 178, 82, .42);
  border-radius: 999px;
  color: #b05d2e;
  font-weight: 850;
  padding: 8px 13px;
}

.home-main .hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, .86);
  border-color: rgba(255, 156, 87, .36);
  box-shadow: 0 8px 24px rgba(166, 110, 54, .09);
}

.spark-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff8a58;
  box-shadow: 0 0 0 5px rgba(255, 138, 88, .16);
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: 0;
  color: #244a55;
  text-wrap: balance;
}

.home-main .hero-copy h1 {
  max-width: 700px;
  font-size: clamp(40px, 5vw, 70px);
  line-height: 1.06;
  letter-spacing: -.045em;
  color: #194f5b;
}

.hero-copy p {
  margin: 0;
  color: #516971;
  max-width: 680px;
  line-height: 1.55;
  font-weight: 650;
}

.home-main .hero-copy p {
  max-width: 620px;
  font-size: clamp(15px, 1.35vw, 19px);
  line-height: 1.65;
  color: #56717a;
}

.home-stats {
  width: fit-content;
  display: inline-grid;
  grid-template-columns: repeat(3, auto);
  align-items: center;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(77, 144, 151, .2);
  border-radius: 16px;
  background: rgba(255, 255, 255, .7);
  box-shadow: 0 10px 24px rgba(57, 116, 126, .08);
}

.home-stats span {
  min-height: 42px;
  display: inline-flex;
  position: relative;
  align-items: center;
  gap: 5px;
  padding: 0 15px;
  color: #52717a;
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
}

.home-stats span + span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: rgba(77, 144, 151, .2);
}

.home-stats strong {
  display: inline-flex;
  align-items: center;
  color: #1c6870;
  font-size: 17px;
  line-height: 1;
}

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

.buddy-row span {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, .74);
  border: 1px solid rgba(112, 167, 181, .2);
  border-radius: 999px;
  padding: 0 12px;
  color: #365965;
  font-weight: 800;
}

.mini-animal {
  width: 28px;
  height: 28px;
}

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

.tv-button {
  border: 2px solid rgba(43, 128, 137, 0.18);
  background: #ffffff;
  color: #25515c;
  border-radius: 8px;
  min-height: 52px;
  padding: 0 18px;
  font-weight: 850;
  box-shadow: 0 8px 22px rgba(63, 122, 134, .12);
}

.home-main .tv-button {
  min-height: 56px;
  border-radius: 999px;
  padding: 0 20px;
}

.tv-button.primary {
  background: #176d70;
  border-color: #176d70;
  color: #fff;
  box-shadow: 0 14px 30px rgba(24, 103, 108, .22);
}

.tv-button.soft {
  background: rgba(255, 255, 255, .74);
}

.button-play {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  margin-right: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  font-size: 10px;
  vertical-align: middle;
}

.tv-button:disabled {
  opacity: .68;
  cursor: not-allowed;
}

.tv-button:focus,
.tv-button.focused,
.content-card:focus,
.episode-card:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 5px rgba(242, 179, 79, 0.36), 0 16px 34px rgba(63, 122, 134, .2);
}

.poster {
  min-height: 260px;
  border-radius: 28px;
  border: 3px solid rgba(255, 255, 255, 0.82);
  padding: 22px;
  display: grid;
  align-content: end;
  gap: 8px;
  background:
    linear-gradient(180deg, #9ee4ff 0 52%, #8bd37b 53% 100%);
  box-shadow: 0 18px 54px rgba(68, 124, 132, .2);
  position: relative;
  overflow: hidden;
}

.home-spotlight {
  min-height: 420px;
  width: 100%;
  border: 4px solid rgba(255, 255, 255, .92);
  padding: 24px;
  text-align: left;
  cursor: pointer;
  isolation: isolate;
  box-shadow: 0 28px 70px rgba(39, 103, 113, .26);
  transition: transform .22s ease, box-shadow .22s ease;
}

.home-spotlight:hover,
.home-spotlight:focus {
  transform: translateY(-4px) rotate(.15deg);
  box-shadow: 0 34px 78px rgba(39, 103, 113, .31);
}

.home-spotlight:focus {
  outline: none;
  border-color: #ffd477;
}

.home-spotlight.has-cover::after {
  background:
    linear-gradient(180deg, rgba(12, 48, 54, .08) 18%, rgba(12, 35, 40, .84) 100%),
    linear-gradient(90deg, rgba(12, 35, 40, .16), transparent 55%);
}

.home-spotlight .spotlight-top {
  position: absolute;
  inset: 20px 20px auto;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.spotlight-label,
.spotlight-duration {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  color: #174e57 !important;
  font-size: 12px;
  font-weight: 900 !important;
  text-shadow: none !important;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .7);
}

.spotlight-label {
  background: #ffd36c;
  color: #704717 !important;
  border-color: rgba(130, 80, 20, .12);
}

.spotlight-duration {
  background: rgba(21, 72, 78, .82);
  color: #fff !important;
  border-color: rgba(255, 255, 255, .34);
  box-shadow: 0 8px 18px rgba(9, 42, 46, .2);
}

.play-orb {
  position: absolute !important;
  left: 50%;
  top: 48%;
  z-index: 3 !important;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 6px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  color: #187177 !important;
  font-size: 23px;
  padding-left: 4px;
  text-shadow: none !important;
  box-shadow: 0 16px 30px rgba(15, 46, 51, .22);
}

.spotlight-copy {
  position: relative;
  z-index: 3;
  width: fit-content;
  max-width: min(72%, 520px);
  display: grid;
  gap: 5px;
  justify-self: start;
  padding: 13px 16px 14px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 18px;
  background: rgba(14, 45, 50, .68);
  box-shadow: 0 14px 34px rgba(8, 28, 32, .2);
  backdrop-filter: blur(12px);
}

.spotlight-copy small {
  color: #ffe6a7;
  font-size: 12px;
  font-weight: 850;
}

.spotlight-copy strong {
  color: #fff;
  font-size: clamp(25px, 2.6vw, 38px);
  line-height: 1.06;
}

.spotlight-copy > span {
  color: rgba(255, 255, 255, .84);
  font-size: 14px;
}

.poster strong {
  font-size: 26px;
  color: #244a55;
  position: relative;
  z-index: 2;
}

.poster span {
  color: #4d6970;
  font-weight: 750;
  position: relative;
  z-index: 2;
}

.poster.has-cover {
  background: #29404b;
  color: white;
}

.poster.has-cover::after,
.content-card.has-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 24%, rgba(15, 25, 32, .72) 100%);
  pointer-events: none;
  z-index: 1;
}

.poster.has-cover strong,
.poster.has-cover span,
.content-card.has-cover strong,
.content-card.has-cover span,
.content-card.has-cover small {
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .32);
}

.poster-cover-image,
.card-cover-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-cover-image {
  z-index: 0;
}

.poster-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.poster-animal {
  position: absolute;
  z-index: 2;
  filter: drop-shadow(0 10px 16px rgba(72, 93, 72, .15));
}

.poster-animal.bear {
  width: 126px;
  left: 14%;
  bottom: 64px;
}

.poster-animal.rabbit {
  width: 106px;
  right: 16%;
  bottom: 70px;
}

.poster-animal.deer,
.poster-animal.whale {
  width: 150px;
  left: 50%;
  bottom: 60px;
  transform: translateX(-50%);
}

.sun {
  position: absolute;
  top: 28px;
  right: 34px;
  width: 58px;
  height: 58px;
  background: #ffd46d;
  border-radius: 50%;
  box-shadow: 0 0 0 12px rgba(255, 212, 109, .22);
}

.hill {
  position: absolute;
  bottom: -40px;
  width: 72%;
  height: 130px;
  border-radius: 50%;
  background: #7fc96f;
}

.hill-left {
  left: -16%;
}

.hill-right {
  right: -18%;
  background: #a5dc78;
}

.section-title {
  font-size: 20px;
  font-weight: 850;
  margin: 0;
  color: #244a55;
}

.discovery-strip {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 12px 18px;
  border: 1px solid rgba(88, 151, 159, .16);
  border-radius: 22px;
  background: rgba(255, 255, 255, .62);
  box-shadow: 0 14px 34px rgba(57, 116, 126, .08);
  backdrop-filter: blur(12px);
}

.discovery-lead {
  margin-right: 4px;
  color: #245661;
  font-weight: 900;
  white-space: nowrap;
}

.discovery-chip,
.section-link {
  border: 0;
  color: #285661;
  font-weight: 850;
}

.discovery-chip {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 999px;
  background: #e8f6fb;
  white-space: nowrap;
}

.discovery-chip span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .72);
  font-size: 11px;
}

.discovery-chip.tone-2 {
  background: #fff0cc;
  color: #795323;
}

.discovery-chip.tone-3 {
  background: #e5f4db;
  color: #3f683f;
}

.discovery-buddy {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #517079;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading > div {
  display: grid;
  gap: 5px;
}

.section-eyebrow {
  color: #d07843;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .15em;
}

.section-heading .section-title {
  font-size: clamp(23px, 2.4vw, 32px);
}

.section-link {
  min-height: 40px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .68);
}

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

.library-main {
  gap: 18px;
}

.library-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.library-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
}

.content-card,
.episode-card {
  border: 2px solid rgba(255, 255, 255, 0.82);
  background: var(--tv-panel);
  color: #274a54;
  border-radius: 22px;
  min-height: 176px;
  padding: 14px;
  text-align: left;
  display: grid;
  align-content: end;
  gap: 7px;
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
  box-shadow: 0 12px 28px rgba(63, 122, 134, .12);
}

.home-grid .content-card {
  min-height: 226px;
  padding: 16px;
}

.card-topline {
  position: absolute !important;
  inset: 14px 14px auto;
  z-index: 3 !important;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.card-play {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  color: #1b6c70 !important;
  font-size: 11px;
  padding-left: 2px;
  text-shadow: none !important;
  box-shadow: 0 8px 18px rgba(27, 74, 79, .16);
}

.card-copy {
  display: grid;
  gap: 6px;
  position: relative;
  z-index: 3;
}

.card-copy strong {
  line-height: 1.15;
}

.card-copy > span,
.card-copy > small {
  font-size: 12px;
}

.curation-note {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin: 0 auto;
  padding: 10px 16px 10px 11px;
  border: 1px solid rgba(76, 140, 147, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .62);
  color: #4c6871;
}

.curation-note > span {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}

.curation-note p {
  margin: 0;
  display: grid;
  gap: 1px;
}

.curation-note strong {
  color: #275762;
  font-size: 13px;
}

.curation-note small {
  font-size: 11px;
}

.source-note {
  width: fit-content;
  padding: 8px 11px;
  border: 1px solid rgba(70, 135, 143, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .68);
  color: #55717a;
  font-size: 12px;
  font-weight: 750;
}

.source-note span {
  color: #1d6b70;
  font-weight: 900;
}

.content-card::before,
.episode-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 76% 18%, rgba(255, 217, 126, .65), transparent 20%),
    linear-gradient(180deg, rgba(171, 230, 255, .72) 0 48%, rgba(179, 222, 126, .58) 49% 100%);
  pointer-events: none;
}

.content-card:hover,
.episode-card:hover {
  transform: translateY(-2px);
  background: #ffffff;
}

.content-card.has-cover::before {
  display: none;
}

.content-card strong,
.content-card span,
.content-card small,
.episode-card strong,
.episode-card span,
.episode-card small {
  position: relative;
  z-index: 2;
}

.content-card strong,
.episode-card strong {
  font-size: 18px;
}

.content-card span,
.episode-card span,
.episode-card small {
  color: #526b74;
  font-weight: 700;
}

.card-sky {
  position: absolute;
  top: 16px;
  right: 15px;
  width: 74px;
  height: 74px;
  z-index: 1;
}

.animal-icon {
  width: 100%;
  height: 100%;
}

.card-cover-image {
  z-index: 0;
}

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

.episode-card {
  min-height: 126px;
}

.episode-card.has-episode-cover {
  align-content: start;
  background: #fff;
}

.episode-card.has-episode-cover::before {
  display: none;
}

.episode-cover-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
}

.episode-admin-cover {
  width: 96px;
  height: 54px;
  object-fit: cover;
  border-radius: 6px;
  vertical-align: middle;
  margin-right: 10px;
}

.episode-source-link {
  display: block;
  margin-top: 6px;
}

.empty-tv {
  min-height: 126px;
  display: grid;
  place-items: center;
  border: 2px dashed rgba(43, 128, 137, .24);
  background: rgba(255, 255, 255, .72);
  border-radius: 8px;
  color: #526b74;
  font-weight: 850;
  text-align: center;
  padding: 18px;
}

.episode-animal {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  z-index: 1;
}

.player-view {
  position: fixed;
  inset: 0;
  z-index: 100;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 213, 125, .22), transparent 22%),
    linear-gradient(180deg, #11232c, #071014);
  color: white;
}

.video-area {
  position: absolute;
  inset: 0;
  display: block;
  padding: 0;
  background: #000;
}

.external-player,
.native-player {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: #000;
  box-shadow: none;
}

.native-player {
  display: block;
  max-height: none;
  object-fit: contain;
}

.player-topbar[hidden], .player-controls[hidden], .player-wake-button[hidden] {
  display: none;
}

.player-wake-button {
  position: absolute;
  z-index: 4;
  top: 12px;
  right: 16px;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
  background: rgba(8, 24, 29, .66);
  color: white;
  font-size: 24px;
  opacity: 0;
}

.player-wake-button:hover, .player-wake-button:focus {
  opacity: 1;
}

.player-topbar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  min-height: 92px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 28px 34px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .82), transparent);
  pointer-events: none;
}

.player-topbar > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.player-topbar small {
  color: #ffd873;
  font-size: 13px;
  font-weight: 850;
}

.player-topbar strong {
  overflow: hidden;
  color: #fff;
  font-size: clamp(18px, 2vw, 28px);
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .6);
}

.player-exit-button {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  background: rgba(8, 24, 29, .66);
  color: #fff;
  font-weight: 850;
  pointer-events: auto;
}

.player-controls {
  position: absolute;
  inset: auto 0 0;
  z-index: 3;
  display: grid;
  gap: 12px;
  padding: 58px 28px 22px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .9) 42%, rgba(0, 0, 0, .96));
}

/* 电视遥控器焦点与真实 DOM 焦点保持一致。 */
.content-root button:focus,
.content-root a:focus,
.content-root input:focus {
  outline: 4px solid #ffb72c;
  outline-offset: 4px;
  box-shadow: 0 0 0 8px rgba(255, 183, 44, .2);
}

.player-feedback {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100% - 48px));
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 20px;
  background: rgba(12, 32, 37, .96);
  color: white;
  text-align: center;
}

.player-feedback[hidden] { display: none; }
.player-feedback strong { font-size: 24px; }
.player-feedback p { margin: 12px 0 20px; font-size: 16px; line-height: 1.6; }
.player-feedback button { margin: 6px; min-height: 48px; }
.cover-unavailable { background: linear-gradient(135deg, #167a8b, #174d64); }
.ops-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 20px 0; }
.ops-stats > div { padding: 20px; border: 1px solid #d5e5e5; border-radius: 14px; background: #f7fbfb; }
.ops-stats small { display: block; color: #536b72; }
.ops-stats strong { display: block; font-size: 30px; margin-top: 6px; }
.ops-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 20px 0; }
.ops-filters label, .ops-release-form label { display: grid; gap: 7px; font-size: 14px; }
.ops-filters input, .ops-filters select, .ops-release-form input { min-height: 42px; max-width: 200px; padding: 10px; border: 1px solid #b6cece; border-radius: 8px; background: white; }
.ops-log { border: 1px solid #d5e5e5; border-radius: 12px; padding: 20px; margin-bottom: 12px; }
.ops-log-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ops-log-heading time { margin-left: auto; color: #536b72; font-size: 14px; }
.ops-log p { color: #536b72; font-size: 14px; overflow-wrap: anywhere; }
.ops-log details { margin: 15px 0; }
.ops-log summary { cursor: pointer; color: #146b72; }
.ops-log pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; padding: 16px; background: #102e35; color: #e0f3f5; border-radius: 8px; max-height: 360px; overflow: auto; }
.ops-log dl { display: grid; grid-template-columns: 90px 1fr; gap: 8px; font-size: 14px; }
.ops-log dd { margin: 0; overflow-wrap: anywhere; }
.ops-pagination, .ops-release-form { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 20px 0; }
.ops-release-preview { background: #effaf7; border: 1px solid #b6dbce; padding: 22px; border-radius: 12px; }
.ops-error { color: #a52323; background: #fff1f0; }
.card-cover-image[hidden], .poster-cover-image[hidden] { display: none; }

.player-progress-row {
  display: grid;
  grid-template-columns: 56px minmax(160px, 1fr) 56px;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, .92);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.player-seek {
  width: 100%;
  height: 10px;
  margin: 0;
  appearance: none;
  border-radius: 999px;
  outline: none;
  background: linear-gradient(90deg, #ffd36c var(--progress, 0%), rgba(255, 255, 255, .24) var(--progress, 0%));
}

.player-seek::-webkit-slider-thumb {
  width: 24px;
  height: 24px;
  appearance: none;
  border: 4px solid #fff;
  border-radius: 50%;
  background: #ffbd3c;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .45);
}

.player-seek:focus {
  box-shadow: 0 0 0 4px rgba(255, 211, 108, .45);
}

.external-progress-hint {
  display: flex;
  justify-content: center;
  color: rgba(255, 255, 255, .78);
  font-size: 13px;
  font-weight: 750;
}

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

.player-row > strong {
  color: rgba(255, 255, 255, .78);
  font-size: 13px;
}

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

.player-control-button {
  min-height: 46px;
  padding: 0 17px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 999px;
  background: rgba(15, 43, 49, .82);
  color: #fff;
  font-size: 14px;
  font-weight: 850;
}

.player-control-button.primary-control {
  border-color: rgba(255, 211, 108, .86);
  background: #f3ad2f;
  color: #2f2106;
}

.player-control-button:focus,
.player-exit-button:focus {
  outline: 4px solid rgba(255, 255, 255, .94);
  outline-offset: 3px;
  transform: translateY(-2px) scale(1.04);
}

.player-control-button:disabled {
  opacity: .35;
}

.source-button {
  min-height: 46px;
  color: #fff4c6;
  border-color: rgba(255, 229, 135, .45);
  background: rgba(255, 183, 61, .16);
}

.source-button:hover,
.source-button:focus {
  color: #271b07;
  background: #ffd66b;
}

.rest-view {
  min-height: calc(100vh - 58px);
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 215, 130, .6), transparent 24%),
    radial-gradient(circle at 84% 22%, rgba(132, 207, 255, .55), transparent 26%),
    linear-gradient(180deg, #eaf8ff, #fff6dd 60%, #dff5cf);
  color: #284652;
  text-align: center;
  padding: 28px;
}

.rest-box {
  max-width: 680px;
  display: grid;
  gap: 16px;
  justify-items: center;
}

.rest-box h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
  color: #244a55;
}

.rest-box p {
  margin: 0;
  color: #536b73;
  line-height: 1.6;
  font-weight: 700;
}

.countdown {
  font-size: 22px;
  font-weight: 850;
  color: #b05d2e;
  background: #ffffff;
  border: 2px solid rgba(255, 178, 82, .4);
  border-radius: 999px;
  padding: 8px 16px;
}

.rest-animal {
  width: min(180px, 42vw);
  height: auto;
  filter: drop-shadow(0 12px 18px rgba(56, 105, 123, .14));
}

.admin-app {
  min-height: calc(100vh - 58px);
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  background: linear-gradient(180deg, #f8fbfd, #edf3f7);
}

.admin-nav {
  border-right: 1px solid var(--line);
  background: #f9fbfc;
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.admin-nav button {
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 8px;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.admin-nav button:hover {
  transform: translateX(2px);
  background: var(--surface-soft);
}

.admin-nav button.active {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--ink);
  font-weight: 750;
}

.admin-main {
  padding: 22px;
  display: grid;
  align-content: start;
  gap: 18px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 18px 48px rgba(31, 49, 68, .08);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head h2 {
  margin: 0;
  font-size: 22px;
}

.inline-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.inline-controls select {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 8px;
  min-height: 36px;
  padding: 0 10px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: middle;
}

.table th {
  color: var(--muted);
  background: var(--surface-soft);
  font-weight: 750;
}

.table tbody tr:hover {
  background: #f9fbfd;
}

.cover-cell {
  min-width: 180px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cover-thumb,
.cover-placeholder {
  width: 72px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  border: 1px solid var(--line);
  object-fit: cover;
  flex: 0 0 auto;
}

.cover-placeholder {
  display: grid;
  place-items: center;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.file-button input {
  display: none;
}

.tag {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
}

.tag.green {
  color: var(--accent-strong);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
}

.tag.orange {
  color: #9a6417;
  border-color: color-mix(in srgb, var(--gold) 70%, var(--line));
}

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

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 40px;
  padding: 9px 10px;
  background: white;
  color: var(--ink);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-color: var(--accent);
}

.field textarea {
  min-height: 88px;
  resize: vertical;
}

.field-help {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.field.span-2 {
  grid-column: 1 / -1;
}

.span-2 {
  grid-column: 1 / -1;
}

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

.upload-route div {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f4f8fb);
  border-radius: 8px;
  min-height: 74px;
  padding: 12px;
  display: grid;
  gap: 6px;
  align-content: center;
}

.upload-route strong {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: white;
  font-size: 13px;
}

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

.upload-status {
  display: none;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f4f8fb);
  border-radius: 8px;
  padding: 12px;
  gap: 9px;
}

.upload-status.visible {
  display: grid;
}

.upload-status.error {
  background: #fff5f5;
  border-color: #f0b7b7;
}

.upload-status.paused {
  background: #fffaf0;
  border-color: color-mix(in srgb, var(--gold) 62%, var(--line));
}

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

.upload-status-row strong {
  color: var(--ink);
}

.upload-status-row span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  text-align: right;
}

.upload-status.error .upload-status-row span {
  color: #a53030;
}

.upload-status-row.meta span {
  font-size: 12px;
}

.upload-progress-track {
  height: 10px;
  background: #dfe8ef;
  border-radius: 999px;
  overflow: hidden;
}

.upload-progress-fill {
  display: block;
  width: var(--upload-progress, 0%);
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: inherit;
  transition: width .18s ease;
}

.upload-status.error .upload-progress-fill {
  background: var(--danger);
}

.upload-status.paused .upload-progress-fill {
  background: var(--gold);
}

.upload-status-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.upload-status-actions button {
  min-height: 34px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .46);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 60;
}

.modal {
  width: min(760px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 90px rgba(15, 23, 42, .28);
  padding: 18px;
  display: grid;
  gap: 16px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.modal-head h2 {
  margin: 0 0 4px;
}

.modal-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-bottom: 0;
  border-right: 0;
}

.day {
  min-height: 92px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 9px;
  display: grid;
  align-content: space-between;
  gap: 8px;
}

.day.active {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.day span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.login-view {
  min-height: calc(100vh - 58px);
  display: grid;
  place-items: center;
  padding: 24px;
}

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

.login-card h1 {
  margin: 0;
}

.notice {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.mobile-test {
  min-height: calc(100vh - 58px);
  display: grid;
  place-items: center;
  padding: 18px;
}

.phone-frame {
  width: min(390px, 100%);
  min-height: 640px;
  border: 8px solid #1f2937;
  border-radius: 28px;
  overflow: hidden;
  background: var(--surface);
  display: grid;
  grid-template-rows: auto 1fr;
}

.phone-top {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.phone-body {
  padding: 14px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.phone-card {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

/* 电视横屏：首页在 16:9 视口中完整呈现主推荐、分类和首排片单。 */
@media (min-width: 960px) and (min-aspect-ratio: 16/10) {
  .hosted-viewer {
    overflow: hidden;
  }

  .hosted-viewer .tv-app {
    height: 100vh;
    min-height: 0;
  }

  .tv-nav {
    min-height: 64px;
    padding: 9px clamp(28px, 3vw, 58px);
  }

  .tv-logo {
    min-height: 42px;
    font-size: 22px;
  }

  .tv-status span {
    min-height: 30px;
  }

  .tv-update-button {
    min-height: 34px;
  }

  .home-main {
    width: min(100%, 1920px);
    height: calc(100vh - 64px);
    min-height: 0;
    margin: 0 auto;
    padding: 16px clamp(34px, 4vw, 74px) 20px;
    gap: 12px;
    overflow: hidden;
    grid-template-rows: minmax(250px, 1fr) 54px 38px minmax(132px, 23vh);
  }

  .home-hero {
    min-height: 0;
    grid-template-columns: minmax(0, .86fr) minmax(460px, 1.14fr);
    gap: clamp(28px, 4vw, 72px);
  }

  .home-main .hero-copy {
    gap: clamp(8px, 1.15vh, 14px);
    padding: 0;
  }

  .home-main .hero-copy h1 {
    max-width: 760px;
    font-size: clamp(38px, 4.1vw, 66px);
    line-height: 1.01;
  }

  .home-main .hero-copy p {
    max-width: 720px;
    font-size: clamp(14px, 1.12vw, 19px);
    line-height: 1.45;
  }

  .home-main .hero-kicker {
    padding: 6px 12px;
  }

  .home-stats span {
    min-height: 36px;
    padding: 0 13px;
  }

  .home-main .tv-button {
    min-height: 48px;
  }

  .home-spotlight {
    height: 100%;
    min-height: 0;
    padding: 18px;
    border-radius: 24px;
  }

  .home-spotlight .spotlight-top {
    inset: 15px 15px auto;
  }

  .play-orb {
    width: 60px;
    height: 60px;
    border-width: 5px;
  }

  .spotlight-copy {
    max-width: min(68%, 500px);
    gap: 3px;
    padding: 10px 13px 11px;
    border-radius: 15px;
  }

  .spotlight-copy strong {
    font-size: clamp(25px, 2.6vw, 42px);
  }

  .discovery-strip {
    min-height: 54px;
    padding: 6px 12px 6px 16px;
    border-radius: 18px;
  }

  .discovery-chip {
    min-height: 38px;
    padding: 0 12px;
  }

  .section-heading {
    min-height: 38px;
  }

  .section-heading > div {
    display: flex;
    align-items: baseline;
    gap: 12px;
  }

  .section-heading .section-title {
    font-size: clamp(20px, 1.7vw, 28px);
  }

  .section-link {
    min-height: 36px;
  }

  .home-grid {
    height: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(10px, 1.2vw, 20px);
  }

  .home-grid .content-card {
    height: 100%;
    min-height: 0;
    border-radius: 18px;
    padding: 13px;
  }

  .home-grid .content-card strong {
    font-size: clamp(15px, 1.25vw, 20px);
  }

  .curation-note {
    display: none;
  }
}

@media (max-width: 820px) {
  .topbar,
  .tv-nav,
  .player-row {
    align-items: flex-start;
    flex-direction: column;
    height: auto;
  }

  .hero,
  .admin-app {
    grid-template-columns: 1fr;
  }

  .home-hero {
    min-height: auto;
  }

  .home-spotlight {
    min-height: 360px;
  }

  .discovery-strip {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .discovery-buddy {
    margin-left: 0;
  }

  .poster {
    min-height: 230px;
  }

  .poster-animal.bear {
    left: 10%;
  }

  .poster-animal.rabbit {
    right: 10%;
  }

  .admin-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .content-grid,
  .episode-grid,
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .content-grid,
  .episode-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .tv-main,
  .admin-main {
    padding: 16px;
  }

  .home-main {
    gap: 22px;
  }

  .home-main .hero-copy h1 {
    font-size: 40px;
  }

  .home-spotlight {
    min-height: 280px;
  }

  .section-heading {
    align-items: flex-start;
  }

  .section-link {
    font-size: 0;
  }

  .section-link span {
    font-size: 18px;
  }

  .curation-note {
    width: 100%;
    border-radius: 20px;
  }

  .tv-status {
    white-space: normal;
    flex-wrap: wrap;
  }

  .tv-nav-actions {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .poster-animal.bear,
  .poster-animal.rabbit {
    width: 96px;
  }
}

/* 当前阶段首页：把每天要看的内容放在第一屏，完整片库继续留在书架与后台。 */
.daily-plan {
  display: grid;
  grid-template-columns: minmax(340px, .82fr) minmax(520px, 1.18fr);
  gap: clamp(22px, 3vw, 42px);
  align-items: stretch;
  padding: clamp(22px, 3vw, 38px);
  border: 1px solid rgba(81, 141, 151, .2);
  border-radius: 32px;
  background:
    radial-gradient(circle at 8% 10%, rgba(255, 213, 105, .5), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(233, 250, 247, .9));
  box-shadow: 0 24px 64px rgba(38, 104, 114, .16);
}

.daily-summary {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 14px;
}

.daily-summary h1 {
  max-width: 720px;
  margin: 0;
  color: #194f5b;
  font-size: clamp(36px, 4.4vw, 64px);
  line-height: 1.05;
  letter-spacing: -.04em;
  text-wrap: balance;
}

.daily-summary > p {
  max-width: 640px;
  margin: 0;
  color: #56717a;
  font-size: clamp(16px, 1.2vw, 19px);
  font-weight: 700;
  line-height: 1.6;
}

.stage-pill {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(49, 125, 134, .2);
  border-radius: 999px;
  background: #e9f8ff;
  color: #276a78;
  font-size: 13px;
  font-weight: 900;
}

.home-managed-title {
  color: #2a717a;
  font-size: 15px;
  font-weight: 900;
}

.daily-queue-wrap {
  min-width: 0;
  padding: 16px;
  border-radius: 24px;
  background: #1d626b;
  color: #fff;
  box-shadow: 0 18px 42px rgba(25, 79, 88, .24);
}

.daily-queue-head {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 6px 10px;
}

.daily-queue-head span {
  font-size: 20px;
  font-weight: 950;
}

.daily-queue-head small {
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
  font-weight: 750;
}

.daily-queue {
  display: grid;
  gap: 8px;
}

.daily-episode {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border: 2px solid transparent;
  border-radius: 16px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  text-align: left;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.daily-episode:hover,
.daily-episode:focus,
.daily-episode.focused {
  outline: none;
  border-color: #ffd36c;
  background: rgba(255, 255, 255, .18);
  transform: translateX(3px);
}

.daily-number {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #ffd36c;
  color: #684618;
  font-size: 13px;
  font-weight: 950;
}

.daily-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.daily-copy small {
  overflow: hidden;
  color: #bce8e6;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-copy strong {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-status {
  color: #ffedbb;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.home-lane {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(81, 141, 151, .16);
  border-radius: 28px;
  background: rgba(255, 255, 255, .54);
  box-shadow: 0 14px 38px rgba(57, 116, 126, .08);
}

.home-lane .section-heading {
  align-items: center;
}

.lane-note {
  margin: 0;
  color: #607780;
  font-size: 14px;
  font-weight: 700;
}

.lane-blue {
  border-top: 5px solid #57a7cf;
}

.lane-orange {
  border-top: 5px solid #ed9b45;
}

.lane-green {
  border-top: 5px solid #62a76d;
}

.lane-purple {
  border-top: 5px solid #8b72c6;
}

.lane-empty {
  min-height: 100px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 2px dashed rgba(77, 128, 138, .2);
  border-radius: 18px;
  color: #607780;
  font-weight: 800;
  text-align: center;
}

@media (max-width: 1100px) {
  .daily-plan {
    grid-template-columns: 1fr;
  }

  .daily-queue {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .daily-plan,
  .home-lane {
    border-radius: 22px;
    padding: 18px;
  }

  .daily-queue {
    grid-template-columns: 1fr;
  }

  .home-lane .section-heading {
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .daily-summary h1 {
    font-size: 36px;
  }

  .daily-plan {
    padding: 15px;
  }

  .daily-queue-wrap {
    padding: 12px;
  }

  .daily-episode {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .daily-status {
    grid-column: 2;
  }
}

/* 新首页包含多个纵向资源分区，宽屏也必须按内容自然增高并允许滚动。
   这里覆盖旧版“单屏四行”布局，避免分区被压进固定网格行后彼此重叠。 */
@media (min-width: 960px) and (min-aspect-ratio: 16/10) {
  .hosted-viewer {
    overflow: auto;
  }

  .hosted-viewer .tv-app {
    height: auto;
    min-height: 100vh;
  }

  .home-main {
    height: auto;
    min-height: calc(100vh - 64px);
    padding: 24px clamp(34px, 4vw, 74px) 48px;
    gap: 28px;
    overflow: visible;
    grid-template-rows: none;
  }

  .daily-plan,
  .home-lane,
  .home-lane .home-grid,
  .home-lane .home-grid .content-card {
    height: auto;
  }

  .home-lane .home-grid .content-card {
    min-height: 226px;
  }

  .home-lane .section-heading {
    min-height: 0;
  }
}

/* 大封面今日轮播，以及按实际会话记录的播放历史。 */
.daily-plan {
  grid-template-columns: minmax(270px, .72fr) minmax(0, 1.28fr);
  gap: clamp(20px, 3vw, 40px);
}
.daily-summary h1 { font-size: clamp(32px, 3.5vw, 52px); line-height: 1.15; }
.daily-summary .tv-actions { flex-wrap: wrap; }
.history-entry { background: #fff6d9; color: #775318; border-color: #efd58b; }
.history-entry-icon { display: grid; place-items: center; flex-shrink: 0; width: 19px; height: 19px; }
.history-entry-icon svg { display: block; width: 19px; height: 19px; }
.history-entry > span:last-child { font-size: inherit; line-height: inherit; }
.daily-carousel { min-width: 0; padding: 16px; background: #174f5b; color: white; border-radius: 28px; box-shadow: 0 14px 36px #194f5b26; }
.carousel-heading { display: flex; justify-content: space-between; align-items: center; padding: 0 5px 13px; font-weight: 900; font-size: 21px; }
.carousel-heading > span:last-child { font-size: 13px; color: #dfecce; letter-spacing: .1em; }
.carousel-stage { position: relative; border-radius: 20px; overflow: hidden; background: #d2eadb; }
.daily-slide[hidden] { display: none !important; }
.daily-slide { animation: carousel-arrive .35s ease-out; }
.carousel-play { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; min-height: 275px; border: 0; padding: 0; color: white; background: linear-gradient(145deg,#8ddac5,#ffe8a4); text-align: left; overflow: hidden; cursor: pointer; touch-action: pan-y; }
.carousel-play::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg,transparent 30%,#0b26302e 49%,#102e3bea 100%); pointer-events: none; }
.carousel-play > img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.carousel-duration { position: absolute; z-index: 2; left: 16px; top: 16px; border-radius: 99px; padding: 6px 12px; background: #163c49d9; color: white; font-weight: 800; font-size: 14px; }
.carousel-play-icon { position: absolute; right: 18px; top: 18px; z-index: 2; display: grid; place-items: center; width: 56px; height: 56px; border: 3px solid #ffffffbd; border-radius: 50%; background: #ffd66c; color: #37554d; font-size: 22px; box-shadow: 0 5px 20px #14323d40; }
.carousel-caption { position: absolute; z-index: 2; left: 22px; right: 22px; bottom: 22px; display: grid; gap: 7px; }
.carousel-caption strong { color: white; font-size: clamp(26px,2.7vw,40px); line-height: 1.2; text-shadow: 0 2px 12px #06262e70; }
.carousel-caption > span { font-size: clamp(15px,1.4vw,20px); font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.carousel-caption small { font-size: 13px; color: #f8e6ac; font-weight: 700; }
.carousel-art { position: absolute; inset: 15% 0 auto; font-size: 70px; text-align: center; }
.carousel-toolbar { display: flex; align-items: center; justify-content: center; gap: 9px; padding-top: 14px; }
.carousel-arrow, .carousel-pause { flex-shrink: 0; display: grid; place-items: center; border: 1px solid #ffffff3d; background: #ffffff14; color: white; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; }
.carousel-arrow { font-size: 30px; line-height: 1; padding: 0 0 4px; }
.carousel-pause { font-size: 13px; margin-left: 6px; }
.carousel-dots { display: flex; justify-content: center; align-items: center; gap: 5px; min-width: 0; }
.carousel-dots button { display: grid; place-items: center; border: 1px solid transparent; width: 29px; height: 29px; padding: 0; border-radius: 50%; background: #ffffff14; color: #e5f5ee; font-size: 12px; font-weight: 850; cursor: pointer; transition: background .2s, transform .2s; }
.carousel-dots button[aria-current="true"] { color: #274b4c; background: #ffd66c; transform: scale(1.14); }
.carousel-hint { text-align: center; font-size: 12px; color: #d9e8df; margin: 12px 0 0; line-height: 1.5; }
.carousel-play:focus-visible { outline: 5px solid #ffd66c; outline-offset: -5px; }
.carousel-arrow:focus-visible, .carousel-pause:focus-visible, .carousel-dots button:focus-visible { outline: 3px solid #ffe99a; outline-offset: 3px; }
.history-main { max-width: 1500px; width: 100%; margin: 0 auto; display: block; }
.history-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 18px; }
.history-heading h1 { margin: 10px 0; font-size: clamp(30px,3vw,44px); color: #214e59; }
.history-heading p { color: #58767d; font-weight: 650; margin: 0; }
.history-note { color: #586c73; font-size: 14px; line-height: 1.65; background: #ffffff8a; border-radius: 12px; padding: 12px 16px; }
.history-date { font-size: 18px; color: #316d76; margin: 27px 0 12px; }
.history-card { display: grid; grid-template-columns: 180px minmax(0,1fr) auto; gap: 22px; align-items: center; padding: 18px; margin-bottom: 12px; border: 1px solid #d6e8e4; border-radius: 20px; background: #ffffffed; box-shadow: 0 8px 26px #2a77790a; }
.history-card > img, .history-art { width: 180px; aspect-ratio: 16/10; object-fit: cover; border-radius: 12px; }
.history-art { display: grid; place-items: center; background: #fff0cb; font-size: 48px; }
.history-copy { min-width: 0; }
.history-copy time { color: #63818a; font-size: 13px; font-weight: 750; }
.history-copy h3 { margin: 6px 0; color: #224e58; font-size: 21px; }
.history-copy > p { margin: 0 0 10px; font-size: 15px; color: #4f6c73; overflow-wrap: anywhere; }
.history-metrics { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: #6a7d80; }
.history-metrics strong { color: #258177; }
.history-resume { white-space: nowrap; background: #e8f8ec; color: #2c7157; border-color: #b9ddc7; }
.history-resume:disabled { opacity: .55; cursor: default; }
.history-empty { text-align: center; padding: 70px 20px; color: #517680; }
.history-empty > span { display: block; font-size: 70px; margin-bottom: 20px; }
.history-empty h2 { color: #315863; }
@keyframes carousel-arrive { from { opacity: .6; transform: scale(.985); } to { opacity: 1; transform: scale(1); } }
@media (max-width: 1100px) {
  .daily-plan { grid-template-columns: minmax(240px,.78fr) minmax(0,1.22fr); padding: 22px; gap: 22px; }
  .daily-summary h1 { font-size: 34px; }
  .carousel-play { min-height: 300px; }
  .carousel-dots { gap: 3px; }
  .carousel-dots button { width: 24px; height: 27px; }
  .history-card { grid-template-columns: 140px minmax(0,1fr); gap: 16px; }
  .history-card > img, .history-art { width: 140px; }
  .history-resume { grid-column: 2; justify-self: start; }
}
@media (max-width: 820px) {
  .daily-plan { grid-template-columns: 1fr; }
  .daily-summary { gap: 10px; }
  .daily-summary h1 { font-size: 32px; }
  .daily-carousel { padding: 13px; border-radius: 22px; }
  .carousel-play { min-height: 270px; }
  .carousel-dots button { width: 27px; }
  .history-heading { align-items: flex-start; }
}
@media (max-width: 520px) {
  .daily-plan { padding: 14px; }
  .daily-carousel { padding: 10px; }
  .carousel-play { min-height: 245px; }
  .carousel-caption { left: 15px; right: 15px; bottom: 16px; }
  .carousel-toolbar { gap: 4px; }
  .carousel-dots { gap: 2px; }
  .carousel-dots button { width: 22px; height: 26px; }
  .carousel-arrow, .carousel-pause { width: 30px; height: 32px; }
  .carousel-pause { margin-left: 0; }
  .history-heading { flex-direction: column; }
  .history-card { grid-template-columns: 92px minmax(0,1fr); padding: 12px; gap: 12px; }
  .history-card > img, .history-art { width: 92px; }
  .history-copy h3 { font-size: 18px; }
  .history-copy > p { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .daily-slide { animation: none; }
  .carousel-dots button { transition: none; }
}
