:root {
  --kidstv-ink: #172033;
  --kidstv-body: #465368;
  --kidstv-muted: #667085;
  --kidstv-line: #d7e0ea;
  --kidstv-bg: #f4f7fb;
  --kidstv-panel: #fff;
  --kidstv-brand: #2c666e;
  --kidstv-brand-strong: #20535a;
  --kidstv-accent: #579ba3;
  --kidstv-gold: #a36a17;
  --kidstv-green: #087443;
  --kidstv-soft-green: #dcfae6;
  --kidstv-soft-amber: #fef0c7;
  --kidstv-soft-gray: #eef2f6;
  --kidstv-shadow: 0 18px 48px rgba(16, 24, 40, .08);
}

.kidstv-page {
  min-height: 100vh;
  margin: 0;
  overflow: auto;
  color: var(--kidstv-ink);
  background: radial-gradient(circle at 10% 0%, rgba(87, 155, 163, .13), transparent 30%), var(--kidstv-bg);
  font-family: "Noto Sans SC", "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.kidstv-page * {
  box-sizing: border-box;
}

.kidstv-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.kidstv-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border: 1px solid rgba(215, 224, 234, .9);
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 10px 30px rgba(16, 24, 40, .06);
  backdrop-filter: blur(10px);
}

.kidstv-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--kidstv-ink);
  text-decoration: none;
}

.kidstv-brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .02em;
  background: linear-gradient(145deg, var(--kidstv-accent), var(--kidstv-brand));
  box-shadow: 0 10px 24px rgba(44, 102, 110, .22);
}

.kidstv-brand strong {
  display: block;
  font-size: 18px;
  line-height: 1.25;
}

.kidstv-brand small {
  display: block;
  margin-top: 3px;
  color: var(--kidstv-muted);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: .12em;
}

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

.kidstv-chip,
.kidstv-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--kidstv-line);
  border-radius: 999px;
  color: var(--kidstv-body);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.kidstv-button.primary {
  border-color: var(--kidstv-brand);
  color: #fff;
  background: var(--kidstv-brand);
}

.kidstv-button.primary:hover {
  background: var(--kidstv-brand-strong);
}

.kidstv-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  gap: 22px;
  margin-top: 22px;
}

.kidstv-hero-main,
.kidstv-hero-panel,
.kidstv-panel {
  border: 1px solid var(--kidstv-line);
  border-radius: 22px;
  background: var(--kidstv-panel);
  box-shadow: var(--kidstv-shadow);
}

.kidstv-hero-main {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 54px);
  background: linear-gradient(135deg, #12343a 0%, #2c666e 58%, #579ba3 100%);
  color: #fff;
}

.kidstv-hero-main::after {
  position: absolute;
  right: -90px;
  bottom: -120px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 54px rgba(255, 255, 255, .04), 0 0 0 108px rgba(255, 255, 255, .025);
}

.kidstv-eyebrow {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, .76);
  font-family: "DM Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
}

.kidstv-hero-main h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -.03em;
}

.kidstv-hero-main p {
  position: relative;
  z-index: 1;
  max-width: 42em;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, .82);
  font-size: 15px;
  line-height: 1.9;
}

.kidstv-hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.kidstv-hero-actions .kidstv-button {
  min-height: 44px;
  padding: 0 18px;
}

.kidstv-hero-actions .kidstv-button:not(.primary) {
  border-color: rgba(255, 255, 255, .35);
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.kidstv-hero-panel {
  padding: 24px;
}

.kidstv-hero-panel h2,
.kidstv-panel h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

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

.kidstv-metric {
  padding: 15px;
  border: 1px solid var(--kidstv-line);
  border-radius: 16px;
  background: #f8fafc;
}

.kidstv-metric b {
  display: block;
  margin-bottom: 5px;
  font-size: 24px;
  line-height: 1.1;
}

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

.kidstv-boundary {
  margin-top: 14px;
  padding: 14px;
  border-left: 4px solid var(--kidstv-accent);
  border-radius: 12px;
  color: #475467;
  background: #f0f7f8;
  font-size: 13px;
  line-height: 1.75;
}

.kidstv-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(130px, 180px));
  gap: 10px;
  margin: 22px 0;
}

.kidstv-toolbar input,
.kidstv-toolbar select {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--kidstv-line);
  border-radius: 12px;
  color: var(--kidstv-ink);
  background: #fff;
}

.kidstv-panel {
  padding: 22px;
}

.kidstv-panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

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

.kidstv-work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}

.kidstv-work-card {
  overflow: hidden;
  border: 1px solid var(--kidstv-line);
  border-radius: 18px;
  color: inherit;
  background: #fff;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.kidstv-work-card:hover,
.kidstv-work-card.active {
  border-color: var(--kidstv-accent);
  box-shadow: 0 18px 36px rgba(16, 24, 40, .12);
  transform: translateY(-2px);
}

.kidstv-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(150deg, #e6f0ef, #f7fafc);
}

.kidstv-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .25s ease;
}

.kidstv-poster img.loaded {
  opacity: 1;
}

.kidstv-poster-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  color: var(--kidstv-brand);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.kidstv-card-body {
  padding: 14px;
}

.kidstv-card-body h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}

.kidstv-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.kidstv-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  color: #475467;
  background: var(--kidstv-soft-gray);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.kidstv-badge.green {
  color: var(--kidstv-green);
  background: var(--kidstv-soft-green);
}

.kidstv-badge.amber {
  color: var(--kidstv-gold);
  background: var(--kidstv-soft-amber);
}

.kidstv-empty {
  padding: 38px 16px;
  border: 1px dashed var(--kidstv-line);
  border-radius: 16px;
  color: var(--kidstv-muted);
  text-align: center;
}

.kidstv-empty.is-hidden {
  display: none;
}

.kidstv-detail:empty {
  display: none;
}

.kidstv-detail {
  margin-top: 22px;
}

.kidstv-detail-hero {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  padding: 22px;
  border: 1px solid var(--kidstv-line);
  border-radius: 22px;
  background: #fff;
}

.kidstv-detail-poster {
  overflow: hidden;
  border-radius: 16px;
  background: #eef2f6;
}

.kidstv-detail-poster img {
  display: block;
  width: 100%;
  height: auto;
}

.kidstv-detail h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 34px);
}

.kidstv-detail-overview {
  margin: 12px 0 0;
  color: var(--kidstv-body);
  line-height: 1.8;
}

.kidstv-access-guide {
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px dashed var(--kidstv-accent);
  border-radius: 18px;
  background: #f0f7f8;
  color: var(--kidstv-body);
}

.kidstv-access-guide strong {
  display: block;
  margin-bottom: 6px;
  color: var(--kidstv-brand-strong);
  font-size: 15px;
}

.kidstv-access-guide p {
  margin: 0;
  line-height: 1.8;
}

.kidstv-footer {
  margin-top: 26px;
  color: var(--kidstv-muted);
  font-size: 12px;
  line-height: 1.8;
  text-align: center;
}

@media (max-width: 900px) {
  .kidstv-hero,
  .kidstv-detail-hero {
    grid-template-columns: 1fr;
  }

  .kidstv-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .kidstv-detail-poster {
    max-width: 220px;
  }
}

@media (max-width: 640px) {
  .kidstv-shell {
    width: min(100% - 20px, 1280px);
    padding-top: 12px;
  }

  .kidstv-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .kidstv-top-actions {
    justify-content: flex-start;
  }

  .kidstv-toolbar {
    grid-template-columns: 1fr;
  }

  .kidstv-metric-grid {
    grid-template-columns: 1fr;
  }

  .kidstv-work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}
