@font-face {
  font-family: "Nunito Sans";
  src: url("/fonts/nunito-sans/nunito-sans-v19-cyrillic_cyrillic-ext_latin_latin-ext-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Public landing page */
.landing-page {
  background: #fff;
  color: var(--text);
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

.landing-nav,
.landing-main,
.landing-footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
}

.landing-nav .brand-logo {
  width: 152px;
}

.landing-nav nav,
.landing-nav-actions,
.landing-hero-actions,
.landing-trust-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.landing-nav nav a {
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  align-items: center;
  gap: 64px;
  min-height: 560px;
  padding: 48px 0 64px;
}

.landing-hero h1 {
  max-width: 570px;
  font-size: clamp(42px, 5vw, 70px);
  line-height: 1.02;
}

.landing-hero h1 span {
  color: var(--primary);
}

.landing-hero-copy > p {
  max-width: 550px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.landing-hero-actions {
  flex-wrap: wrap;
  margin-top: 26px;
}

.landing-trust-row {
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 32px;
  font-size: 14px;
  font-weight: 800;
}

.landing-trust-row span,
.landing-split p {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.landing-trust-row .icon,
.landing-split .icon {
  color: #16A34A;
}

.landing-product-shot {
  position: relative;
  padding: 34px;
}

.landing-product-shot::before {
  position: absolute;
  inset: 0;
  border-radius: 34px;
  background: #FFE7E7;
  content: "";
  transform: rotate(-3deg);
}

.landing-product-shot img {
  position: relative;
  width: 100%;
  height: auto;
  object-fit: contain;
  border: 8px solid #D9D9D9;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 60px rgba(20, 20, 20, 0.12);
}

.landing-steps,
.landing-features,
.landing-values {
  padding: 58px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.landing-steps > div,
.landing-features > div,
.landing-values > div {
  display: grid;
  gap: 18px;
  margin-top: 34px;
}

.landing-steps > div {
  grid-template-columns: repeat(3, 1fr);
}

.landing-features > div {
  grid-template-columns: repeat(5, 1fr);
}

.landing-values > div {
  grid-template-columns: repeat(4, 1fr);
}

.landing-faq {
  padding: 58px 0;
  border-top: 1px solid var(--border);
}

.landing-faq h2 {
  text-align: center;
}

.landing-faq > div {
  display: grid;
  gap: 12px;
  max-width: 820px;
  margin: 30px auto 0;
}

.landing-faq details {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.landing-faq summary {
  cursor: pointer;
  padding: 18px 20px;
  font-weight: 800;
}

.landing-faq details p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--muted);
}

.landing-steps article,
.landing-features article,
.landing-values article {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 24px 18px;
}

.landing-features article {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.landing-steps article > .icon,
.landing-features article > .icon,
.landing-values article > .icon {
  width: 34px;
  height: 34px;
  color: var(--primary);
}

.landing-steps p,
.landing-features p,
.landing-values p,
.landing-footer p,
.landing-footer a {
  color: var(--muted);
}

.landing-split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(360px, 1.15fr);
  align-items: center;
  gap: 70px;
  padding: 70px 0;
}

.landing-split h2 {
  font-size: 34px;
}

.landing-split p {
  align-items: flex-start;
  margin-bottom: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.landing-split strong {
  display: block;
  color: var(--text);
}

.landing-tablet-art {
  padding: 34px;
  border-radius: 18px;
  background: linear-gradient(135deg, #FFF0F0, #F8FAFC);
}

.landing-tablet-art img {
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(20, 20, 20, 0.1);
}

.landing-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 28px;
  margin: 38px auto 64px;
  padding: 34px 56px;
  border-radius: 22px;
  background: #FFF0F0;
}

.landing-cta h2 {
  max-width: 430px;
  font-size: 30px;
}

.landing-cta p {
  margin-top: 12px;
  color: var(--muted);
}

.family-illustration {
  position: relative;
  height: 190px;
}

.family-illustration span {
  position: absolute;
  bottom: 0;
  border-radius: 999px 999px 22px 22px;
  background: #F97316;
}

.family-illustration span:nth-child(1) {
  left: 52px;
  width: 96px;
  height: 170px;
}

.family-illustration span:nth-child(2) {
  left: 140px;
  width: 80px;
  height: 128px;
  background: #FBBF24;
}

.family-illustration span:nth-child(3) {
  left: 214px;
  width: 96px;
  height: 160px;
  background: #FB7185;
}

.landing-footer {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 50px;
  padding: 44px 0 56px;
  border-top: 1px solid var(--border);
}

.landing-footer .brand-logo {
  width: 136px;
}

.landing-footer nav {
  display: grid;
  align-content: start;
  gap: 10px;
}

.landing-footer a {
  text-decoration: none;
}

@media (max-width: 920px) {
  .landing-nav {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .landing-nav nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .landing-hero,
  .landing-split,
  .landing-cta {
    grid-template-columns: 1fr;
  }

  .landing-steps > div,
  .landing-features > div,
  .landing-values > div,
  .landing-footer {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  html:has(body.landing-page) {
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.landing-page {
    height: auto;
    overflow-y: auto;
  }

  .landing-nav,
  .landing-main,
  .landing-footer {
    width: min(100% - 28px, 1180px);
  }

  .landing-nav nav {
    display: none;
  }

  .landing-nav-actions {
    width: 100%;
  }

  .landing-nav-actions .btn {
    flex: 1;
  }

  .landing-hero {
    gap: 28px;
    min-height: 0;
    padding: 24px 0 48px;
  }

  .landing-hero h1 {
    font-size: 42px;
  }

  .landing-product-shot {
    padding: 10px;
  }

  .landing-product-shot img {
    border-width: 5px;
    border-radius: 18px;
  }

  .landing-steps > div,
  .landing-features > div,
  .landing-values > div,
  .landing-footer {
    grid-template-columns: 1fr;
  }

  .landing-steps,
  .landing-features,
  .landing-values,
  .landing-faq,
  .landing-split {
    padding: 42px 0;
  }

  .landing-cta {
    padding: 28px;
  }

  .family-illustration {
    display: none;
  }
}

@font-face {
  font-family: "Nunito Sans";
  src: url("/fonts/nunito-sans/nunito-sans-v19-cyrillic_cyrillic-ext_latin_latin-ext-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito Sans";
  src: url("/fonts/nunito-sans/nunito-sans-v19-cyrillic_cyrillic-ext_latin_latin-ext-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito Sans";
  src: url("/fonts/nunito-sans/nunito-sans-v19-cyrillic_cyrillic-ext_latin_latin-ext-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito Sans";
  src: url("/fonts/nunito-sans/nunito-sans-v19-cyrillic_cyrillic-ext_latin_latin-ext-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #E53935;
  --primary-dark: #C62828;
  --background: #F9F9F9;
  --text: #0F0F0F;
  --muted: #606060;
  --card: #FFFFFF;
  --border: #E5E5E5;
  --success-bg: #DDF7DF;
  --success-text: #087B18;
  --shadow: 0 8px 24px rgba(15, 15, 15, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "Nunito Sans", Arial, Helvetica, sans-serif;
  font-weight: 500;
  line-height: 1.45;
  overflow-x: hidden;
}

html {
  max-width: 100%;
  overflow-x: hidden;
}

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

img {
  display: block;
  max-width: 100%;
}

.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;
}

.icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 1.15em;
  height: 1.15em;
  background: currentColor;
  mask: var(--icon-url) center / contain no-repeat;
  -webkit-mask: var(--icon-url) center / contain no-repeat;
}

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

.app-shell {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  width: 280px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px 20px;
  background: var(--card);
  border-right: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-logo {
  width: 192px;
  height: auto;
  max-height: 52px;
  object-fit: contain;
}

.nav-list {
  display: grid;
  gap: 10px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 8px;
  color: var(--text);
  font-weight: 700;
}

.nav-link .icon {
  width: 18px;
  height: 18px;
}

.nav-link:hover,
.nav-link.active {
  background: #FFF0F0;
  color: var(--primary);
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-group.is-active > .nav-link {
  background: #fff0f0;
  color: var(--primary);
}

.nav-sublist {
  display: grid;
  max-height: 230px;
  gap: 3px;
  margin-left: 24px;
  padding: 2px 0 4px 12px;
  overflow-y: auto;
  border-left: 1px solid var(--border);
}

.nav-sublist a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  min-width: 0;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.nav-sublist a:hover,
.nav-sublist a.active {
  background: #f7f7f7;
  color: var(--primary);
}

.nav-kid-avatar {
  display: grid;
  flex: 0 0 26px;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff0f0;
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
}

.nav-sublist-add .icon {
  width: 16px;
  height: 16px;
}

.logout-link {
  margin-top: auto;
}

.content-shell {
  width: calc(100% - 280px);
  margin-left: 280px;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr minmax(240px, 620px) 1fr;
  align-items: center;
  gap: 20px;
  min-height: 86px;
  padding: 16px 38px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  min-width: 0;
  max-width: 100%;
}

.mobile-brand {
  display: none;
}

.search-bar {
  display: flex;
  align-items: center;
  min-width: 0;
  border: 1px solid #D8DDE3;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.search-bar input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 18px;
  border: 0;
  outline: 0;
  color: var(--text);
}

.search-bar button {
  display: grid;
  place-items: center;
  width: 58px;
  height: 48px;
  border: 0;
  border-left: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.top-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  min-width: 0;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
}

.icon-link .icon {
  width: 17px;
  height: 17px;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #D81B60);
  color: #fff;
  font-weight: 800;
}

.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 4px 8px 4px 4px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.account-chip:hover {
  border-color: var(--border);
  background: #fff;
}

.account-copy {
  display: grid;
  gap: 1px;
  padding-right: 4px;
}

.account-copy strong {
  font-size: 14px;
  font-weight: 700;
}

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

.mobile-header-action,
.mobile-bottom-nav,
.mobile-more-menu {
  display: none;
}

.account-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  width: min(290px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.account-menu[hidden],
.mobile-more-menu[hidden] {
  display: none;
}

.account-menu-identity {
  display: grid;
  gap: 2px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--border);
}

.account-menu-identity strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.account-menu-identity span {
  color: var(--muted);
  font-size: 12px;
}

.account-menu a,
.mobile-more-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 16px;
  font-weight: 700;
}

.account-menu a:hover,
.mobile-more-menu a:hover {
  background: #f7f7f7;
}

.account-menu-logout {
  color: var(--primary-dark);
}

.account-menu a .icon,
.mobile-more-menu a .icon {
  width: 18px;
  height: 18px;
}

.main-content {
  width: min(100%, 1480px);
  max-width: 100%;
  margin: 0 auto;
  padding: 28px 38px 48px;
  overflow-x: hidden;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: 28px;
  font-weight: 800;
}

h2 {
  margin-bottom: 14px;
  font-size: 20px;
  font-weight: 800;
}

h2 > .icon {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  color: var(--primary);
  vertical-align: -3px;
}

.muted,
.section-heading p,
.help-text {
  color: var(--muted);
}

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

.video-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: opacity 180ms ease, transform 180ms ease;
}

.video-card.is-removing {
  opacity: 0;
  transform: scale(0.98);
}

.thumb-wrap {
  position: relative;
}

.thumb-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: #eee;
  overflow: hidden;
}

.thumb-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.video-card:hover img {
  transform: scale(1.03);
}

.play-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(15, 15, 15, 0.85);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.play-chip .icon {
  width: 13px;
  height: 13px;
}

.favorite-overlay-form {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.favorite-icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(15, 15, 15, 0.62);
  color: #fff;
  box-shadow: 0 8px 20px rgba(15, 15, 15, 0.2);
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.favorite-icon-btn .icon {
  width: 18px;
  height: 18px;
}

.favorite-icon-btn:hover,
.favorite-icon-btn:focus-visible {
  transform: scale(1.06);
  background: #fff;
  color: var(--primary);
}

.favorite-icon-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.favorite-icon-btn.active:hover,
.favorite-icon-btn.active:focus-visible {
  background: #fff;
  color: var(--primary-dark);
}

.favorite-float-status {
  position: absolute;
  top: 45px;
  right: 0;
  min-width: 68px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 15, 15, 0.82);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.favorite-float-status:not(:empty) {
  opacity: 1;
  transform: translateY(0);
}

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

.video-card h3 {
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
}

.video-card p {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
}

.kid-discovery-page .topbar {
  grid-template-columns: 1fr auto;
}

.kid-discovery-page .topbar > .search-bar {
  display: none;
}

.kid-discovery-page .mobile-header-action[data-mobile-search-toggle] {
  display: none;
}

.kid-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.kid-welcome-copy {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.kid-welcome-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 23px;
  font-weight: 900;
}

.kid-welcome h1 {
  margin-bottom: 2px;
  font-size: 26px;
}

.kid-welcome p {
  margin-bottom: 0;
  color: var(--muted);
}

.kid-welcome .eyebrow {
  margin-bottom: 3px;
  color: var(--primary);
  font-size: 11px;
}

.kid-search-button,
.kid-refresh-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.kid-search-button:hover,
.kid-search-button:focus-visible,
.kid-refresh-button:hover,
.kid-refresh-button:focus-visible {
  border-color: var(--primary);
  background: #fff4f4;
  color: var(--primary);
}

.kid-search-button .icon,
.kid-refresh-button .icon {
  width: 18px;
  height: 18px;
}

.kid-search-panel {
  display: none;
  gap: 8px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.kid-search-panel.is-open {
  display: grid;
}

.kid-search-panel label {
  font-size: 13px;
  font-weight: 800;
}

.kid-search-panel > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

.kid-search-panel input {
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #d8dde3;
  border-radius: 8px;
  font: inherit;
}

.kid-view-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
}

.kid-view-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 112px;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
}

.kid-view-tabs a.active {
  border-color: var(--primary);
  background: #fff0f0;
  color: var(--primary);
}

.kid-view-tabs .icon {
  width: 18px;
  height: 18px;
}

.kid-video-section {
  margin-top: 30px;
}

.kid-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

.kid-section-heading > div {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.kid-section-heading h2 {
  margin: 0;
  font-size: 20px;
}

.kid-section-heading > a {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.kid-section-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #fff0f0;
  color: var(--primary);
}

.kid-section-icon .icon {
  width: 19px;
  height: 19px;
}

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

.kid-video-row {
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 280px);
  grid-template-columns: none;
  overflow-x: auto;
  padding: 2px 2px 12px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.kid-video-row .kid-video-card {
  scroll-snap-align: start;
}

.kid-video-card {
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.kid-video-card .thumb-wrap,
.kid-video-card .thumb-link {
  border-radius: 8px;
}

.kid-video-card .thumb-link {
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.12);
}

.kid-video-card .video-card-body {
  padding: 10px 2px 0;
}

.kid-video-card h3 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.kid-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 62px;
  height: 44px;
  border: 2px solid #fff;
  border-radius: 13px;
  background: var(--primary);
  color: #fff;
  opacity: 0;
  transform: translate(-50%, -45%) scale(0.92);
  transition: opacity 160ms ease, transform 160ms ease;
}

.kid-play-overlay .icon {
  width: 25px;
  height: 25px;
}

.kid-video-card .thumb-link:hover .kid-play-overlay,
.kid-video-card .thumb-link:focus-visible .kid-play-overlay {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.duration-chip {
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 3px 6px;
  border-radius: 5px;
  background: rgba(15, 15, 15, 0.82);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.video-progress-track {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.5);
}

.video-progress-track span {
  display: block;
  height: 100%;
  background: var(--primary);
}

.kid-video-card .favorite-icon-btn {
  width: 42px;
  height: 42px;
}

.kid-inline-empty {
  padding: 24px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #fafafa;
  color: var(--muted);
  text-align: center;
}

.kid-refresh-button.is-loading .icon {
  animation: player-spin 800ms linear infinite;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.meta-row.wide {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--success-bg);
  color: var(--success-text);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.favorite-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.favorite-save-status {
  min-width: 46px;
}

.favorite-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #F5CACA;
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.favorite-btn .icon {
  width: 15px;
  height: 15px;
}

.favorite-btn.active {
  border-color: var(--primary);
  background: #FFF0F0;
}

.favorite-btn.active:hover,
.favorite-btn.active:focus-visible {
  background: #fff;
  border-color: var(--primary-dark);
  color: var(--primary-dark);
}

.favorite-btn.active:hover > span,
.favorite-btn.active:focus-visible > span {
  display: none;
}

.favorite-btn.active:hover::after,
.favorite-btn.active:focus-visible::after {
  content: attr(data-remove-label);
}

.tab-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tab-row a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
}

.tab-row .icon {
  width: 15px;
  height: 15px;
}

.tab-row a.active {
  border-color: var(--primary);
  background: #FFF0F0;
  color: var(--primary);
}

.panel,
.empty-state {
  margin-top: 28px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-width: 100%;
  min-width: 0;
}

.empty-state {
  text-align: center;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.admin-hero h1 {
  margin-bottom: 8px;
  font-size: 30px;
}

.admin-hero p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.stat-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 98px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.stat-card strong {
  font-size: 30px;
  line-height: 1;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #FFF0F0;
  color: var(--primary);
}

.stat-icon .icon {
  width: 22px;
  height: 22px;
}

.stat-copy {
  display: grid;
  gap: 6px;
}

.admin-jump-tabs {
  position: sticky;
  top: 86px;
  z-index: 8;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.admin-jump-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.admin-jump-tabs .icon,
.admin-content-tabs .icon,
.btn .icon,
.library-meta .icon {
  width: 15px;
  height: 15px;
}

.admin-jump-tabs a:hover {
  background: #FFF0F0;
  color: var(--primary);
}

.admin-jump-tabs a.active {
  background: #FFF0F0;
  color: var(--primary);
}

.profile-switcher {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}

.preview-switcher {
  margin-top: -6px;
  margin-bottom: 24px;
}

.profile-switcher a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 4px 14px 4px 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
}

.profile-switcher a.active {
  border-color: var(--primary);
  background: #FFF0F0;
  color: var(--primary);
}

.kids-workspace-tabs {
  position: sticky;
  top: 86px;
  z-index: 8;
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 20px rgba(15, 15, 15, 0.05);
  scrollbar-width: none;
}

.kids-workspace-tabs::-webkit-scrollbar {
  display: none;
}

.kids-workspace-tabs a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 13px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.kids-workspace-tabs a:hover,
.kids-workspace-tabs a:focus-visible {
  background: #fff0f0;
  color: var(--primary);
}

.kids-workspace-tabs .icon {
  width: 16px;
  height: 16px;
}

#workspace-overview,
#workspace-channels,
#workspace-add-content,
#video-library {
  scroll-margin-top: 150px;
}

.admin-add-panel {
  display: grid;
  gap: 18px;
}

.workspace-add-panel {
  gap: 20px;
  padding: 24px 28px;
}

.workspace-add-header,
.workspace-add-title,
.workspace-add-mode {
  display: flex;
  align-items: center;
}

.workspace-add-header {
  display: grid;
  justify-content: stretch;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.workspace-add-title {
  display: block;
}

.workspace-add-title .eyebrow {
  margin-bottom: 2px;
}

.workspace-add-title h2 {
  margin: 0;
  font-size: 24px;
}

.workspace-add-header .admin-content-tabs {
  width: fit-content;
}

.workspace-add-mode {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.workspace-add-mode > div {
  display: grid;
  gap: 3px;
}

.workspace-add-mode strong {
  font-size: 16px;
}

.workspace-add-mode span:not(.workspace-capacity) {
  color: var(--muted);
  font-size: 13px;
}

.workspace-capacity {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.workspace-add-panel .admin-add-form label {
  margin: 0;
}

.workspace-add-panel .admin-add-form input {
  height: 52px;
}

.workspace-add-panel .admin-add-form .btn {
  min-height: 52px;
}

@media (max-width: 560px) {
  .workspace-add-panel {
    padding: 18px;
  }

  .workspace-add-header,
  .workspace-add-mode {
    display: grid;
    align-items: start;
  }

  .workspace-add-header {
    gap: 16px;
  }

  .workspace-add-panel .admin-content-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .workspace-add-panel .admin-content-tabs button {
    justify-content: center;
    padding-inline: 8px;
  }

  .workspace-capacity {
    width: fit-content;
  }
}

.admin-add-panel .panel-title {
  align-items: flex-start;
}

.admin-add-panel .panel-title p {
  margin-bottom: 0;
}

.admin-content-tabs {
  display: inline-flex;
  width: fit-content;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #F3F4F6;
}

.admin-content-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.admin-content-tabs button.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 3px 10px rgba(15, 15, 15, 0.08);
}

.admin-tab-panel {
  display: none;
}

.admin-tab-panel.active {
  display: block;
}

.admin-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  min-width: 0;
}

.admin-tab-panel[data-admin-panel="video"] .admin-add-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

.admin-short-note {
  align-self: center;
}

.admin-add-form .btn {
  white-space: nowrap;
}

.admin-table strong {
  display: block;
  margin-bottom: 5px;
}

.admin-table-sub {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.channel-list {
  display: grid;
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  max-width: 100%;
}

.channel-list-head,
.channel-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) minmax(120px, 0.65fr) minmax(120px, 0.65fr) minmax(150px, 0.8fr) minmax(190px, 0.9fr);
  column-gap: 18px;
  align-items: center;
  min-width: 0;
}

.channel-list-head {
  min-height: 58px;
  padding: 0 16px;
  background: #FAFAFA;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 700;
}

.channel-row {
  min-height: 92px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.channel-row:last-child {
  border-bottom: 0;
}

.channel-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.channel-info strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.channel-info small {
  color: var(--muted);
  font-size: 13px;
}

.channel-info small:last-child {
  width: fit-content;
  margin-top: 3px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #F3F4F6;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.channel-setting {
  display: flex;
  align-items: center;
  min-width: 0;
}

.channel-setting .shorts-form {
  min-height: 44px;
  align-content: center;
}

.channel-updated {
  color: var(--text);
  font-size: 14px;
}

.channel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
  min-width: 0;
}

.channel-actions .btn {
  white-space: nowrap;
}

.channel-paused {
  opacity: 0.62;
}

.channel-paused .channel-info strong::after {
  content: "Paused";
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-left: 8px;
  padding: 0 7px;
  border-radius: 999px;
  background: #F3F4F6;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  vertical-align: middle;
}

.switch-control {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.switch-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #D8DDE3;
  transition: background 160ms ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 15, 15, 0.22);
  transition: transform 160ms ease;
}

.switch-control input:checked + .switch-track {
  background: var(--primary);
}

.switch-control input:checked + .switch-track::after {
  transform: translateX(18px);
}

.kid-card-list {
  display: grid;
  gap: 12px;
}

.kid-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FAFAFA;
}

.kid-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.kid-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #FFF0F0;
  color: var(--primary);
  font-weight: 800;
}

.kid-summary h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

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

.kid-mini-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.kid-mini-stats span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.kid-mini-stats strong {
  color: var(--text);
}

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

.kid-edit-form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.kid-edit-form[hidden] {
  display: none;
}

.kids-page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.kids-page-hero h1 {
  margin-bottom: 6px;
}

.kids-page-hero p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.kids-capacity {
  display: grid;
  flex: 0 0 auto;
  min-width: 128px;
  gap: 3px;
  padding: 14px 18px;
  border-radius: 8px;
  background: #fff0f0;
  color: var(--primary);
  text-align: center;
}

.kids-capacity strong {
  font-size: 24px;
}

.kids-capacity span {
  font-size: 12px;
  font-weight: 800;
}

.kids-directory-capacity {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: baseline;
  gap: 5px;
  padding: 7px 11px;
  border: 1px solid #ffd2d2;
  border-radius: 999px;
  background: #fff0f0;
  color: var(--primary);
}

.kids-directory-capacity strong {
  font-size: 15px;
  font-weight: 900;
}

.kids-directory-capacity small {
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 800;
}

.kids-create-panel {
  display: grid;
  gap: 20px;
  margin-bottom: 20px;
}

.kids-create-copy {
  display: flex;
  align-items: center;
  gap: 14px;
}

.kids-create-copy h2,
.kids-create-copy p {
  margin-bottom: 0;
}

.kids-create-copy p {
  margin-top: 4px;
  color: var(--muted);
}

.kids-create-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 280px)) minmax(150px, 170px);
  gap: 14px 16px;
  align-items: start;
  max-width: none;
}

.kids-create-form > .btn {
  grid-column: auto;
  justify-self: stretch;
  align-self: start;
  min-width: 0;
  margin-top: 28px;
  justify-content: center;
}

.kids-create-form .inline-save-status {
  grid-column: 1 / -1;
  min-height: 0;
}

.kids-create-form .password-match-status {
  grid-column: 1 / -1;
  margin-top: 0;
  min-height: 0;
}

.kids-create-form .password-match-status[hidden],
.kids-create-form .inline-save-status:empty {
  display: none;
}

.kids-directory {
  display: grid;
  gap: 18px;
}

.kids-management-card {
  position: relative;
  grid-template-columns: minmax(180px, 0.8fr) minmax(260px, 1fr) auto;
  padding: 18px;
  background: #fff;
}

.kids-management-card .kid-avatar {
  width: 48px;
  height: 48px;
}

.kid-edit-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kid-delete-form {
  grid-column: 1 / -1;
  display: none;
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.kids-management-card:has(.kid-edit-form:not([hidden])) .kid-delete-form {
  display: flex;
}

.overview-kid-list {
  display: grid;
  gap: 10px;
}

.overview-kid-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafafa;
}

.two-column-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 24px;
  align-items: end;
}

.account-create-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(320px, 1fr);
  gap: 28px;
  align-items: center;
}

.account-create-panel h2 {
  margin-bottom: 8px;
}

.account-create-panel .channel-form {
  grid-template-columns: minmax(160px, 1fr) minmax(180px, 1fr) auto;
  align-items: end;
}

.account-create-panel .btn {
  min-width: 160px;
}

.form-stack,
.channel-form {
  display: grid;
  gap: 16px;
}

.check-row,
.switch-row {
  display: inline-grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px 10px;
  font-weight: 700;
}

.check-row input,
.switch-row input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--primary);
}

.check-row small,
.shorts-form small {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.shorts-form {
  display: grid;
  gap: 4px;
}

.inline-save-status {
  min-height: 16px;
  color: var(--success-text);
  font-size: 12px;
  font-weight: 700;
}

.inline-save-status.is-error {
  color: var(--primary-dark);
}

.library-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin: 16px 0 18px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FAFAFA;
}

.video-library-panel {
  scroll-margin-top: 112px;
}

.video-library-panel.is-loading {
  opacity: 0.72;
  pointer-events: none;
}

.library-search {
  display: flex;
  align-items: center;
  min-width: 0;
  border: 1px solid #D8DDE3;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.library-search:focus-within {
  border-color: var(--primary);
  outline: 3px solid rgba(229, 57, 53, 0.12);
}

.library-search input {
  border: 0;
  border-radius: 0;
  outline: 0;
}

.library-search input:focus {
  border-color: transparent;
  outline: 0;
}

.library-search .btn {
  min-width: 86px;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
}

.library-filter-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.library-filter-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.library-filter-tabs a:hover,
.library-filter-tabs a.active {
  background: #FFF0F0;
  color: var(--primary);
}

.library-filter-select {
  display: none;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #D8DDE3;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

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

.library-load-more {
  display: flex;
  justify-content: center;
  padding-top: 18px;
}

.library-load-more .btn {
  min-width: 190px;
}

.library-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  transition: opacity 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.library-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 15, 15, 0.08);
}

.library-card.is-hidden,
.library-card.is-filtered-short {
  opacity: 0.58;
  border-color: #D8DDE3;
}

.library-card.is-filtered-short {
  border-color: #F5D6A8;
  background: #FFFCF7;
  opacity: 0.62;
}

.library-card.is-shown-anyway {
  border-color: #BFE8C7;
  opacity: 1;
}

.library-thumb {
  position: relative;
  overflow: hidden;
  background: #EFF1F4;
}

.library-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.library-card.is-hidden img,
.library-card.is-filtered-short img {
  filter: saturate(0.82) brightness(0.82);
}

.library-thumb-badges {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: none;
}

.library-thumb-badges span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #32363A;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(15, 15, 15, 0.12);
  backdrop-filter: blur(8px);
}

.library-thumb-badges .icon {
  color: #0F0F0F;
  background: #0F0F0F;
}

.library-thumb-badges span.warning {
  background: rgba(255, 246, 230, 0.96);
  color: #955F00;
}

.library-thumb-badges span.warning .icon,
.library-thumb-badges span.success .icon,
.library-thumb-badges span.danger .icon {
  color: #0F0F0F;
  background: #0F0F0F;
}

.library-thumb-badges span.success {
  background: rgba(235, 250, 238, 0.96);
  color: #137A2A;
}

.library-thumb-badges span.danger {
  background: rgba(255, 239, 239, 0.96);
  color: var(--primary);
}

.library-thumb-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
}

.library-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  background: rgba(15, 15, 15, 0.72);
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 15, 15, 0.2);
  backdrop-filter: blur(10px);
}

.library-action-btn .icon {
  width: 15px;
  height: 15px;
  background: currentColor;
}

.library-action-btn:hover {
  background: rgba(229, 57, 53, 0.92);
}

.library-card-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.library-card h3 {
  margin: 0;
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 800;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.library-card-info {
  display: grid;
  gap: 6px;
}

.library-channel-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-remove-form {
  margin-top: 2px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  min-width: 0;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #D8DDE3;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

textarea {
  min-height: 92px;
  padding: 12px 14px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(229, 57, 53, 0.14);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
}

.btn.primary:hover {
  background: var(--primary-dark);
}

.btn.danger {
  border-color: #F5CACA;
  background: #fff;
  color: var(--primary);
}

.btn:not(.primary):not(.danger) {
  border-color: var(--border);
  background: #fff;
  color: var(--text);
}

.btn.small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.panel-title span {
  color: var(--muted);
  font-size: 14px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
}

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

.inline-edit-form {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.inline-edit-form input {
  min-height: 36px;
}

th {
  background: #FAFAFA;
  font-weight: 700;
}

code {
  padding: 3px 6px;
  border-radius: 6px;
  background: #F3F4F6;
  font-size: 13px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 18px;
  max-width: 980px;
}

.settings-page-head {
  max-width: 980px;
  margin-bottom: 18px;
}

.settings-page-head h1 {
  margin-bottom: 6px;
}

.settings-page-head p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.settings-stats .stat-card {
  min-height: 90px;
}

.settings-card {
  display: grid;
  gap: 18px;
  align-content: start;
}

.settings-cache-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
}

.settings-managed-card {
  min-height: 118px;
}

.settings-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.settings-card-head h2 {
  margin-bottom: 4px;
}

.settings-card-head p {
  margin-bottom: 0;
}

.settings-card-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #FFF0F0;
  color: var(--primary);
}

.settings-card-icon .icon {
  width: 23px;
  height: 23px;
}

.settings-card-body {
  display: grid;
  gap: 16px;
}

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

.settings-presets button {
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.settings-presets button.active {
  border-color: var(--primary);
  background: #FFF0F0;
  color: var(--primary);
}

.settings-custom-threshold.is-hidden {
  display: none;
}

.settings-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.settings-save-status {
  min-width: 58px;
}

.settings-card-actions .btn {
  min-width: 112px;
}

.settings-last-refresh {
  margin-top: 3px;
  font-size: 13px;
  font-weight: 700;
}

.overview-hero-actions {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 12px;
}

.overview-primary-action {
  min-width: 190px;
  justify-content: center;
}

.overview-check-card {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 390px;
  max-width: 520px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FAFAFA;
}

.overview-check-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.overview-check-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.overview-check-card form {
  display: grid;
  gap: 6px;
}

.overview-check-card .btn,
.overview-check-disabled {
  white-space: nowrap;
}

.overview-check-disabled {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.overview-check-disabled .icon {
  width: 16px;
  height: 16px;
}

.settings-note {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid #F5CACA;
  border-radius: 8px;
  background: #FFF8F8;
  color: var(--muted);
  font-size: 14px;
}

.settings-note .icon {
  width: 17px;
  height: 17px;
  color: var(--primary);
}

.settings-range {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  background: #F3F4F6;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.settings-range span:nth-child(2) {
  color: var(--text);
}

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

.cache-facts div {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FAFAFA;
}

.cache-facts strong {
  font-size: 18px;
}

.cache-facts span {
  color: var(--muted);
  font-size: 14px;
}

.owner-hero {
  margin-bottom: 16px;
}

.owner-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.owner-accounts-panel {
  display: grid;
  gap: 18px;
}

.owner-account-list {
  display: grid;
  gap: 14px;
}

.owner-account-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FAFAFA;
}

.owner-account-card.is-collapsed,
.owner-plan-card.is-collapsed {
  gap: 0;
  padding: 14px 18px;
}

.owner-account-details {
  display: grid;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.owner-account-details[hidden] {
  display: none;
}

.owner-plan-list {
  display: grid;
  gap: 14px;
}

.owner-plan-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FAFAFA;
}

.owner-account-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.owner-account-main h3 {
  margin-bottom: 4px;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.owner-account-main p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}

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

.owner-view-toggle {
  min-width: 82px;
}

.owner-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.owner-status-pill.success {
  background: var(--success-bg);
  color: var(--success-text);
}

.owner-status-pill.danger {
  background: #FFF0F0;
  color: var(--primary-dark);
}

.owner-status-pill.neutral {
  background: #F3F4F6;
  color: var(--muted);
}

.owner-account-facts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.owner-account-facts span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.owner-account-facts strong {
  color: var(--text);
}

.owner-account-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}

.owner-access-summary {
  display: grid;
  grid-column: span 2;
  align-content: center;
  gap: 3px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.owner-access-summary span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.owner-plan-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 12px;
  align-items: end;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.owner-notes-field {
  grid-column: span 3;
}

.owner-plan-description {
  grid-column: span 3;
}

.owner-check-row {
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.owner-new-plan-form {
  border-top: 0;
  padding-top: 0;
}

.owner-account-form .btn,
.owner-plan-form .btn {
  min-width: 156px;
}

.owner-danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 16px;
  border-top: 1px solid #F2CACA;
}

.owner-danger-zone div {
  min-width: 0;
}

.owner-danger-zone strong {
  color: var(--primary-dark);
}

.owner-danger-zone p {
  max-width: 720px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.owner-delete-dialog {
  width: min(560px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.owner-delete-dialog::backdrop {
  background: rgba(20, 20, 20, 0.56);
}

.owner-delete-dialog form {
  display: grid;
}

.owner-delete-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border);
}

.owner-delete-dialog-head h2 {
  margin: 3px 0 0;
  font-size: 22px;
}

.owner-delete-dialog-body {
  display: grid;
  gap: 12px;
  padding: 22px 24px;
}

.owner-delete-dialog-body p {
  margin: 0;
  line-height: 1.5;
}

.owner-delete-dialog-body > p:first-child {
  font-size: 18px;
}

.owner-delete-dialog-body label strong {
  overflow-wrap: anywhere;
}

.owner-delete-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: #fafafa;
}

.owner-delete-dialog-actions .inline-save-status {
  margin-right: auto;
}

.owner-delete-dialog .btn.danger:not(:disabled) {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.owner-delete-dialog .btn.danger:not(:disabled):hover {
  background: var(--primary-dark);
}

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

.usage-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.usage-card-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 52px;
}

.usage-card-head span:not(.stat-icon) {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.usage-card-head strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.usage-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #F3F4F6;
}

.usage-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

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

.plan-expiry-note {
  color: var(--text);
  font-weight: 700;
}

.plan-access-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid #f0cf87;
  border-radius: 8px;
  background: #fff8e8;
  color: #6d4a00;
}

.plan-access-banner > .icon {
  width: 24px;
  height: 24px;
}

.plan-access-banner div {
  display: grid;
  gap: 3px;
}

.plan-access-banner span {
  line-height: 1.45;
}

.owner-monetization-panel {
  max-width: 1120px;
}

.owner-security-panel {
  max-width: 760px;
}

.owner-security-form {
  display: grid;
  gap: 18px;
}

.owner-security-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.owner-security-setting strong {
  display: block;
}

.owner-security-setting p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.owner-security-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #efb5b5;
  border-radius: 8px;
  background: #fff1f1;
  color: var(--primary-dark);
  line-height: 1.45;
}

.owner-security-warning svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.monetization-form {
  display: grid;
  gap: 24px;
}

.mode-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
}

.mode-choice legend {
  grid-column: 1 / -1;
  margin-bottom: 4px;
  font-weight: 700;
}

.mode-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 92px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.mode-option:has(input:checked) {
  border-color: var(--primary);
  background: #fff1f1;
}

.mode-option input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary);
}

.mode-option span,
.mode-option small {
  display: block;
}

.mode-option small {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.45;
}

.monetization-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}

.monetization-grid label:not(.check-row) {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.monetization-wide {
  grid-column: span 3;
}

.input-suffix {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.input-suffix input {
  border: 0;
  border-radius: 0;
}

.input-suffix span {
  padding: 0 14px;
  color: var(--muted);
}

.monetization-free-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #b7dfc5;
  border-radius: 8px;
  background: #f2fbf5;
  color: #24633a;
}

.monetization-webhook-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  overflow-wrap: anywhere;
}

.monetization-actions,
.support-project-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.support-project-panel {
  display: grid;
  gap: 24px;
}

.support-expiry-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #f0cf87;
  border-radius: 8px;
  background: #fff8e8;
  color: #6d4a00;
  font-weight: 700;
}

.support-expiry-banner.is-expired {
  border-color: #efb5b5;
  background: #fff1f1;
  color: var(--primary-dark);
}

.support-project-copy {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.support-project-copy h2 {
  margin: 2px 0 8px;
}

.support-project-copy p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
}

.support-benefit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.support-benefit-grid span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 68px;
  padding: 14px;
  border-right: 1px solid var(--border);
}

.support-benefit-grid span:last-child {
  border-right: 0;
}

.support-project-actions p {
  margin: 0;
  color: var(--muted);
}

.support-checkout {
  display: grid;
  grid-template-columns: minmax(330px, 0.85fr) minmax(480px, 1.15fr);
  align-items: start;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.support-checkout[hidden] {
  display: none;
}

.supporter-status-panel {
  display: grid;
  gap: 24px;
  margin-bottom: 20px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.supporter-status-panel.is-ending-soon {
  border-color: #f0b0b0;
}

.supporter-status-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.supporter-status-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
}

.supporter-status-icon .icon {
  width: 26px;
  height: 26px;
}

.supporter-status-main h2 {
  margin: 2px 0 5px;
  font-size: 24px;
}

.supporter-status-main p {
  margin: 0;
  color: var(--muted);
}

.supporter-status-main .eyebrow {
  color: var(--primary);
}

.supporter-status-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.supporter-status-details > div {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border-right: 1px solid var(--border);
}

.supporter-status-details > div:last-child {
  border-right: 0;
}

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

.supporter-status-details strong {
  font-size: 18px;
}

.supporter-status-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.supporter-status-footer p {
  margin: 0;
  color: var(--muted);
}

.support-offer,
.support-payment-column {
  min-width: 0;
  padding: 28px;
}

.support-offer {
  position: sticky;
  top: 24px;
}

.support-payment-column {
  border-left: 1px solid var(--border);
  background: #fcfcfc;
}

.support-offer-heading,
.support-payment-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.support-offer-heading h2,
.support-payment-heading h2 {
  margin: 2px 0 0;
  font-size: 22px;
}

.support-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 26px;
}

.support-price strong {
  font-size: 36px;
  line-height: 1;
}

.support-price span,
.support-offer-summary,
.support-price-note {
  color: var(--muted);
}

.support-offer-summary {
  margin: 12px 0 0;
  line-height: 1.6;
}

.support-benefit-list {
  display: grid;
  gap: 12px;
  margin: 24px 0;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.support-benefit-list span {
  display: flex;
  align-items: center;
  gap: 10px;
}

.support-benefit-list .icon {
  color: var(--success-text);
}

.support-step-number {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

.support-code-instructions {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.support-code-instructions p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.support-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 14px;
}

.support-code-row code {
  display: grid;
  place-items: center;
  min-height: 46px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f6f6f6;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
}

.support-confirm {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  min-height: 72px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafafa;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.support-confirm:has(input:checked) {
  border-color: #9fd3af;
  background: #f2fbf5;
}

.monetization-copy-settings {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 22px 0 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.monetization-copy-settings legend {
  padding: 0;
  font-size: 18px;
  font-weight: 800;
}

.monetization-copy-settings > p {
  margin: 0 0 8px;
}

.monetization-copy-settings .monetization-wide {
  grid-column: 1 / -1;
}

.support-confirm input {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  margin: 0;
  accent-color: var(--primary);
}

.support-confirm label {
  display: block;
  min-width: 0;
  cursor: pointer;
}

.support-confirm label > span {
  display: inline;
}

.support-terms-link {
  display: inline !important;
  color: var(--primary-dark);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.support-terms-link:hover,
.support-terms-link:focus-visible {
  color: var(--primary);
}

.support-confirm:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.58;
}

.support-checkout-note,
.support-price-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.support-checkout-note + .support-price-note {
  margin-top: 5px;
}

body.modal-open {
  overflow: hidden;
}

.tip-terms-modal {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.tip-terms-modal[hidden] {
  display: none;
}

.tip-terms-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(20, 20, 20, 0.52);
  cursor: default;
}

.tip-terms-dialog {
  position: relative;
  display: grid;
  width: min(580px, 100%);
  max-height: min(720px, calc(100vh - 48px));
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.tip-terms-dialog header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid var(--border);
}

.tip-terms-dialog h2 {
  margin: 3px 0 0;
  font-size: 22px;
}

.tip-terms-close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.tip-terms-close:hover {
  background: #f6f6f6;
}

.tip-terms-content {
  overflow-y: auto;
  padding: 24px;
  color: var(--muted);
  line-height: 1.65;
}

.tip-terms-dialog footer {
  display: flex;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

.support-payment-heading {
  margin-bottom: 18px;
}

.support-frame-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f9f9f9;
}

.support-frame-shell iframe {
  display: block;
  width: 100%;
  height: 690px;
  border: 0;
  background: #f9f9f9;
}

.support-frame-shell.is-locked iframe {
  pointer-events: none;
  filter: grayscale(0.35);
}

.support-frame-lock {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 30px;
  background: rgba(255, 255, 255, 0.9);
  text-align: center;
  backdrop-filter: blur(3px);
}

.support-frame-shell:not(.is-locked) .support-frame-lock {
  display: none;
}

.support-frame-lock .icon {
  width: 30px;
  height: 30px;
  margin-bottom: 12px;
  color: var(--primary);
}

.support-frame-lock p {
  max-width: 370px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.support-frame-fallback {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.support-payment-status {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: #f6f6f6;
  color: var(--muted);
  font-weight: 700;
}

.support-payment-status.is-success {
  background: var(--success-bg);
  color: var(--success-text);
}

.support-payment-status.is-error,
.support-review-reason {
  color: var(--primary-dark);
}

.support-payment-message,
.support-review-reason {
  margin: 14px 0 0;
}

.support-review-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto minmax(120px, auto);
  align-items: end;
  gap: 12px;
  margin-top: 18px;
}

.support-review-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.owner-support-orders-panel {
  margin-bottom: 18px;
}

.support-order-list {
  display: grid;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.support-order-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(420px, 1.5fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.support-order-row:last-child {
  border-bottom: 0;
}

.support-order-row > div:first-child {
  display: grid;
  gap: 4px;
}

.support-order-row > div:first-child span,
.support-order-meta {
  color: var(--muted);
  font-size: 13px;
}

.support-order-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.support-order-row form,
.support-order-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.support-order-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.usage-card.is-full .usage-bar span {
  background: var(--primary-dark);
}

.usage-card.is-over {
  border-color: #efb5b5;
}

.usage-over-label {
  color: var(--primary-dark) !important;
  font-weight: 700;
}

.usage-card-with-kids {
  align-content: start;
}

.usage-kid-list {
  display: grid;
  gap: 6px;
  padding-top: 2px;
}

.usage-kid-row {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(60px, 1fr) minmax(42px, auto);
  align-items: center;
  gap: 12px;
  min-height: 28px;
  padding: 0 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.usage-kid-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usage-kid-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #F3F4F6;
}

.usage-kid-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.usage-kid-row strong {
  color: var(--text);
  white-space: nowrap;
}

.usage-kid-empty {
  display: grid;
  padding: 0;
}

.usage-kid-empty .usage-bar {
  width: 100%;
}

.usage-kid-row.is-full strong {
  color: var(--primary-dark);
}

.usage-kid-row.is-full .usage-kid-bar span {
  background: var(--primary-dark);
}

.usage-kid-row.is-over strong::after {
  content: " Over";
  margin-left: 5px;
  color: var(--primary-dark);
  font-size: 10px;
  text-transform: uppercase;
}

.upgrade-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 16px;
  border: 1px solid #F5CACA;
  border-radius: 8px;
  background: #FFF8F8;
}

.upgrade-card h3 {
  margin-bottom: 4px;
  font-size: 16px;
}

.upgrade-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.plan-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: #FFF0F0;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

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

.pricing-card {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #FAFAFA;
}

.pricing-card.featured {
  border-color: #F5CACA;
  background: #FFF8F8;
}

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

.pricing-head h3 {
  margin-bottom: 4px;
  font-size: 18px;
}

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

.price-line {
  display: block;
  font-size: 26px;
  line-height: 1.1;
}

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

.plan-limit-list {
  display: grid;
  gap: 9px;
}

.plan-limit-list span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.plan-limit-list .icon {
  color: var(--primary);
}

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  align-items: start;
}

.kid-watch-page .topbar {
  grid-template-columns: 1fr auto;
}

.kid-watch-page .topbar > .search-bar,
.kid-watch-page .mobile-header-action[data-mobile-search-toggle] {
  display: none;
}

.watch-top-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.watch-back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

.watch-back-button {
  width: fit-content;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.watch-back-button:hover {
  border-color: var(--primary);
  background: #fff4f4;
  color: var(--primary);
}

.watch-back-button .icon {
  width: 18px;
  height: 18px;
}

.player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: #000;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.player-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
  user-select: none;
}

.player-center-toggle {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 96px;
  height: 68px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: background 160ms ease, opacity 220ms ease, transform 220ms ease;
}

.player-center-toggle:hover,
.player-center-toggle:focus-visible {
  background: transparent;
  transform: translate(-50%, -50%) scale(1.06);
}

.player-center-toggle .icon {
  width: 34px;
  height: 34px;
}

.player-center-toggle .player-play-icon img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.3));
}

.player-center-toggle .player-pause-icon,
.player-wrap.is-playing .player-center-toggle .player-play-icon,
.player-toggle-button .player-pause-icon,
.player-wrap.is-playing .player-toggle-button .player-play-icon,
.player-volume-off,
.player-wrap.is-muted .player-volume-on {
  display: none;
}

.player-wrap.is-playing .player-center-toggle .player-pause-icon,
.player-wrap.is-playing .player-toggle-button .player-pause-icon,
.player-wrap.is-muted .player-volume-off {
  display: inline-flex;
}

.player-wrap.is-playing .player-center-toggle {
  width: 76px;
  height: 76px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  opacity: 1;
}

.player-wrap.is-playing .player-center-toggle .player-pause-icon {
  visibility: hidden;
}

.player-wrap.is-playing:hover .player-center-toggle,
.player-wrap.is-playing .player-center-toggle:focus-visible {
  opacity: 1;
}

.kiddopick-player-controls {
  position: absolute;
  z-index: 3;
  right: 16px;
  bottom: 16px;
  left: 16px;
  display: grid;
  gap: 3px;
  padding: 8px 12px 9px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(15, 15, 15, 0.88);
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.player-wrap.is-playing.controls-hidden {
  cursor: none;
}

.player-wrap.is-playing.controls-hidden .kiddopick-player-controls {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

.player-wrap.is-playing.controls-hidden .player-center-toggle {
  opacity: 0;
  pointer-events: none;
}

.player-control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.player-control-group {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.player-control-group-end {
  justify-content: flex-end;
}

.player-control-group-center {
  justify-content: center;
}

.player-control-button {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.player-control-button:hover,
.player-control-button:focus-visible {
  background: rgba(255, 255, 255, 0.14);
}

.player-control-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.player-control-button .icon {
  width: 22px;
  height: 22px;
}

.player-toggle-button {
  min-width: 40px;
}

.player-next-button {
  display: inline-flex;
  gap: 6px;
  padding: 0 10px;
  font-weight: 800;
}

.player-next-button .icon,
.player-next-button img {
  display: block;
  width: 18px;
  height: 18px;
}

.player-next-button img {
  filter: brightness(0) invert(1);
}

.player-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 84px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.player-time-separator {
  color: rgba(255, 255, 255, 0.5);
}

.player-volume-control {
  display: flex;
  align-items: center;
  width: 142px;
  min-width: 0;
}

.player-progress,
.player-volume {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 20px;
  padding: 0;
  border: 0;
  outline: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.player-progress {
  align-self: center;
  background: transparent;
}

.player-volume {
  background: transparent;
}

.player-progress::-webkit-slider-runnable-track,
.player-volume::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 8px;
}

.player-progress::-webkit-slider-runnable-track {
  background: linear-gradient(to right, var(--primary) 0 var(--player-progress, 0%), rgba(255, 255, 255, 0.28) var(--player-progress, 0%) 100%);
}

.player-volume::-webkit-slider-runnable-track {
  background: linear-gradient(to right, #fff 0 var(--player-volume, 80%), rgba(255, 255, 255, 0.28) var(--player-volume, 80%) 100%);
}

.player-progress::-webkit-slider-thumb,
.player-volume::-webkit-slider-thumb {
  width: 15px;
  height: 15px;
  margin-top: -5px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--primary);
  -webkit-appearance: none;
}

.player-progress::-moz-range-track,
.player-volume::-moz-range-track {
  height: 5px;
  border: 0;
  border-radius: 8px;
}

.player-progress::-moz-range-track {
  background: linear-gradient(to right, var(--primary) 0 var(--player-progress, 0%), rgba(255, 255, 255, 0.28) var(--player-progress, 0%) 100%);
}

.player-volume::-moz-range-track {
  background: linear-gradient(to right, #fff 0 var(--player-volume, 80%), rgba(255, 255, 255, 0.28) var(--player-volume, 80%) 100%);
}

.player-progress::-moz-range-thumb,
.player-volume::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--primary);
}

.player-loading {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  background: #111;
  color: #fff;
}

.player-loading span {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: player-spin 800ms linear infinite;
}

.player-loading strong {
  font-size: 14px;
}

.player-loading.is-error span {
  display: none;
}

.player-loading.is-error strong {
  max-width: 320px;
  color: #fff;
  text-align: center;
}

.player-end-screen {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(190px, 42%) minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 20px;
  padding: clamp(22px, 5vw, 52px);
  background: rgba(10, 10, 10, 0.92);
  color: #fff;
}

.player-end-screen[hidden] {
  display: none;
}

.player-end-screen > img {
  grid-row: 1 / 3;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
}

.player-end-copy {
  display: grid;
  gap: 7px;
  align-self: end;
}

.player-end-copy span {
  color: #ff7774;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.player-end-copy strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: clamp(17px, 2.2vw, 25px);
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.player-end-copy small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.player-end-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: start;
}

.player-end-actions button,
.player-end-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.player-end-actions .player-end-play {
  border-color: var(--primary);
  background: var(--primary);
}

.player-end-actions .icon {
  width: 18px;
  height: 18px;
}

.player-wrap:fullscreen {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
}

@keyframes player-spin {
  to {
    transform: rotate(360deg);
  }
}

.watch-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 2px 8px;
}

.watch-meta h1 {
  display: -webkit-box;
  max-width: 760px;
  margin: 0;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.watch-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  margin-top: 0;
}

.watch-actions [data-favorite-form] {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.watch-actions .favorite-save-status:empty {
  display: none;
}

.watch-favorite-button,
.autoplay-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.watch-favorite-button {
  font: inherit;
}

.watch-favorite-button .icon {
  width: 20px;
  height: 20px;
}

.watch-favorite-button.active {
  border-color: var(--primary);
  background: #fff0f0;
  color: var(--primary);
}

.autoplay-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.autoplay-switch {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #d9dde2;
  transition: background 160ms ease;
}

.autoplay-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: transform 160ms ease;
}

.autoplay-toggle input:checked + .autoplay-switch {
  background: var(--primary);
}

.autoplay-toggle input:checked + .autoplay-switch::after {
  transform: translateX(16px);
}

.autoplay-toggle:focus-within {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.watch-mix-section {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.watch-mix-mobile {
  display: none;
}

.watch-mix-heading,
.watch-mix-heading > div {
  display: flex;
  align-items: center;
}

.watch-mix-heading {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.watch-mix-heading > div {
  gap: 10px;
}

.watch-mix-heading h2 {
  margin: 0;
  font-size: 20px;
}

.watch-mix-heading > a {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.watch-mix-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 16px;
}

.related-panel {
  padding: 15px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.related-panel h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.related-panel h2 .icon {
  margin-right: 0;
}

.related-list {
  display: grid;
  gap: 13px;
}

.related-item {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.related-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #eee;
}

.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-thumb > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  opacity: 0;
  background: rgba(0, 0, 0, 0.24);
  transition: opacity 150ms ease;
}

.related-thumb .icon {
  width: 32px;
  height: 32px;
}

.related-item:hover .related-thumb > span,
.related-item:focus-visible .related-thumb > span {
  opacity: 1;
}

.related-item strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.related-home-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  margin-top: 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.related-home-link .icon {
  width: 17px;
  height: 17px;
}
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(229, 57, 53, 0.08), transparent 32rem),
    var(--background);
}

.auth-card {
  width: min(100%, 500px);
  padding: 34px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 6px;
  margin: 24px 0 22px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #F3F4F6;
}

.auth-tab {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.auth-tab.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 3px 10px rgba(15, 15, 15, 0.08);
}

.login-panels {
  display: grid;
}

.login-panel {
  display: none;
}

.login-panel[hidden] {
  display: none !important;
}

.login-panel.active {
  display: grid;
}

.login-panel h2 {
  margin-bottom: 6px;
  font-size: 22px;
}

.login-panel .muted {
  margin-bottom: 2px;
  font-size: 14px;
}

.auth-brand {
  margin-bottom: 28px;
}

.auth-card h1 {
  font-size: 30px;
}

.auth-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  overflow: hidden;
  border: 1px solid #d8dde3;
  border-radius: 8px;
  background: #fff;
}

.password-field:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

.password-field input {
  min-width: 0;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0;
}

.password-field button {
  display: grid;
  place-items: center;
  border: 0;
  border-left: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.password-match-status {
  margin-top: -8px;
  color: var(--muted);
  font-size: 13px;
}

.password-match-status.is-valid {
  color: var(--success-text);
}

.password-match-status.is-error {
  color: var(--primary-dark);
}

.auth-field {
  display: grid;
  gap: 7px;
}

.auth-field > input {
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.auth-field > input:focus {
  border-color: var(--primary);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

.auth-field-message {
  min-height: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.auth-field.is-invalid > input,
.auth-field.is-invalid .password-field {
  border-color: var(--primary);
  background: #fff8f8;
}

.auth-field.is-invalid .auth-field-message {
  color: var(--primary-dark);
}

.auth-field.is-valid > input,
.auth-field.is-valid .password-field {
  border-color: #79bd8a;
}

.auth-field.is-valid .auth-field-message {
  color: var(--success-text);
}

.auth-validated-form button[type="submit"]:disabled {
  cursor: wait;
  opacity: 0.72;
}

.auth-form-error {
  padding: 12px 14px;
  border: 1px solid #f2b8b8;
  border-radius: 8px;
  background: #fff3f3;
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 700;
}

.auth-form-error[hidden] {
  display: none;
}

.auth-switch {
  margin: 18px 0 0;
  color: var(--muted);
  text-align: center;
}

.auth-switch a {
  color: var(--primary);
  font-weight: 700;
}

.auth-form-link {
  margin: -4px 0 0;
  text-align: right;
  font-size: 14px;
}

.auth-form-link a {
  color: var(--primary);
  font-weight: 700;
}

.alert {
  margin-bottom: 18px;
  padding: 13px 14px;
  border-radius: 8px;
  background: #FFF0F0;
  color: var(--primary-dark);
  font-weight: 700;
}

.alert.success {
  background: var(--success-bg);
  color: var(--success-text);
}

.empty-inline {
  padding: 18px;
  border: 1px dashed #D8DDE3;
  border-radius: 8px;
  background: #FAFAFA;
}

.empty-inline h3 {
  margin-bottom: 6px;
  font-size: 16px;
}

.empty-inline p {
  margin-bottom: 0;
  color: var(--muted);
}

.soft-hide {
  opacity: 0.35;
}

@media (max-width: 1400px) {
  body.kid-watch-page {
    --mobile-app-nav-height: calc(64px + env(safe-area-inset-bottom));
  }

  body.kid-watch-page .app-shell {
    display: block;
  }

  .kid-watch-page .sidebar,
  .kid-watch-page .topbar {
    display: none;
  }

  .kid-watch-page .content-shell {
    width: 100%;
    max-width: none;
    margin-left: 0;
  }

  .kid-watch-page .main-content {
    width: min(100%, 1280px);
    max-width: none;
    margin: 0 auto;
    padding: 16px 20px calc(var(--mobile-app-nav-height) + 28px);
  }

  .kid-watch-page .player-wrap {
    width: 100%;
    height: auto !important;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .kid-watch-page .player-wrap iframe {
    width: 100% !important;
    height: 100% !important;
  }

  .kid-watch-page .mobile-bottom-nav {
    position: fixed;
    z-index: 25;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: calc(64px + env(safe-area-inset-bottom));
    padding: 5px 8px env(safe-area-inset-bottom);
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -6px 20px rgba(15, 15, 15, 0.06);
    backdrop-filter: blur(12px);
  }

  .kid-watch-page .mobile-bottom-nav.mobile-nav-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .kid-watch-page .mobile-bottom-nav a {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 3px;
    min-width: 0;
    min-height: 54px;
    padding: 4px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
  }

  .kid-watch-page .mobile-bottom-nav a.active {
    background: #fff0f0;
    color: var(--primary);
  }

  .kid-watch-page .mobile-bottom-nav .icon {
    width: 21px;
    height: 21px;
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .channel-list-head,
  .channel-row {
    grid-template-columns: minmax(200px, 1.35fr) minmax(115px, 0.65fr) minmax(115px, 0.65fr) minmax(145px, 0.8fr) minmax(175px, 0.9fr);
    column-gap: 14px;
  }

  .video-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .watch-layout {
    grid-template-columns: 1fr;
  }

  .kiddopick-player-controls {
    right: 8px;
    bottom: 8px;
    left: 8px;
    padding: 7px 9px 8px;
  }

  .player-volume-control {
    width: clamp(86px, 18vw, 116px);
  }

  .player-control-button {
    min-width: 40px;
    height: 40px;
  }

  .player-center-toggle {
    width: 78px;
    height: 54px;
  }

  .library-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .owner-account-form {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .owner-plan-form {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .owner-notes-field {
    grid-column: 1 / -1;
  }

  .owner-plan-description {
    grid-column: 1 / -1;
  }

  .upgrade-card {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .upgrade-card .btn {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 900px) {
  html,
  body,
  .app-shell,
  .content-shell,
  .main-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
  }

  .parent-videos-page .section-heading,
  .parent-videos-page .profile-switcher,
  .parent-videos-page .usage-grid,
  .parent-videos-page .panel,
  .parent-videos-page .admin-add-form,
  .parent-videos-page .channel-list,
  .parent-videos-page .channel-row {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .parent-videos-page .section-heading > *,
  .parent-videos-page .panel-title > *,
  .parent-videos-page .admin-add-form > *,
  .parent-videos-page .channel-row > * {
    min-width: 0;
  }

  .supporter-status-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .supporter-status-details > div:nth-child(2) {
    border-right: 0;
  }

  .supporter-status-details > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }

  html,
  body.kid-watch-page,
  .kid-watch-page .app-shell,
  .kid-watch-page .content-shell {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .kid-watch-page .topbar {
    display: none;
  }

  .kid-watch-page .main-content {
    width: 100%;
    max-width: none;
    padding: 10px 12px calc(82px + env(safe-area-inset-bottom));
    overflow: visible;
  }

  .kid-watch-page .watch-layout,
  .kid-watch-page .watch-layout > div,
  .kid-watch-page .related-panel {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .kid-watch-page .watch-layout {
    display: block;
  }

  .kid-watch-page .player-wrap {
    width: 100%;
    height: auto !important;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .kid-watch-page .player-wrap iframe {
    width: 100% !important;
    height: 100% !important;
  }

  .plan-access-banner {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .plan-access-banner .btn {
    grid-column: 1 / -1;
    width: 100%;
  }
  .support-checkout {
    grid-template-columns: 1fr;
  }

  .support-offer {
    position: static;
  }

  .support-payment-column {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .monetization-grid,
  .support-benefit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .monetization-wide {
    grid-column: span 2;
  }

  .owner-access-summary {
    grid-column: span 2;
  }

  .support-benefit-grid span:nth-child(2) {
    border-right: 0;
  }

  .support-benefit-grid span:nth-child(-n+2) {
    border-bottom: 1px solid var(--border);
  }

  .support-review-form {
    grid-template-columns: 1fr 1fr;
  }

  .support-order-row {
    grid-template-columns: 1fr auto;
  }

  .support-order-meta {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .content-shell {
    width: 100%;
    margin-left: 0;
  }

  .topbar {
    position: sticky;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    min-height: 64px;
    padding: 8px 16px;
  }

  .topbar-spacer {
    display: none;
  }

  .mobile-brand {
    display: inline-flex;
    width: fit-content;
  }

  .mobile-brand .brand-logo {
    width: 145px;
    max-height: 42px;
  }

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

  .account-chip {
    min-height: 44px;
    padding: 2px;
    margin-left: 0;
  }

  .account-chip .avatar {
    width: 40px;
    height: 40px;
  }

  .account-copy {
    display: none;
  }

  .mobile-header-action {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
  }

  .mobile-header-action:hover,
  .mobile-header-action[aria-expanded="true"] {
    border-color: var(--border);
    background: #f7f7f7;
  }

  .mobile-header-action .icon {
    width: 21px;
    height: 21px;
  }

  .topbar > .search-bar {
    position: absolute;
    z-index: 20;
    top: calc(100% + 8px);
    right: 16px;
    left: 16px;
    display: none;
    box-shadow: var(--shadow);
  }

  .topbar > .search-bar.is-mobile-open {
    display: flex;
  }

  .account-menu {
    position: fixed;
    top: 58px;
    right: 12px;
  }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 25;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: calc(64px + env(safe-area-inset-bottom));
    padding: 5px 8px env(safe-area-inset-bottom);
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -6px 20px rgba(15, 15, 15, 0.06);
    backdrop-filter: blur(12px);
  }

  .mobile-bottom-nav.mobile-nav-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mobile-bottom-nav a,
  .mobile-bottom-nav button {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 3px;
    min-width: 0;
    min-height: 54px;
    padding: 4px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
  }

  .mobile-bottom-nav a.active,
  .mobile-bottom-nav button.active,
  .mobile-bottom-nav button[aria-expanded="true"] {
    background: #fff0f0;
    color: var(--primary);
  }

  .mobile-bottom-nav .icon {
    width: 21px;
    height: 21px;
  }

  .mobile-bottom-nav span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-more-menu {
    position: fixed;
    z-index: 26;
    right: 10px;
    bottom: calc(70px + env(safe-area-inset-bottom));
    display: grid;
    width: min(310px, calc(100vw - 20px));
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  .mobile-more-menu > strong {
    padding: 14px 16px 10px;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
  }

  .main-content {
    padding: 20px 16px calc(92px + env(safe-area-inset-bottom));
  }

  .admin-hero {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .admin-jump-tabs {
    position: static;
  }

  .admin-add-form,
  .admin-tab-panel[data-admin-panel="video"] .admin-add-form,
  .kid-edit-form {
    grid-template-columns: 1fr;
  }

  .channel-list {
    border: 0;
    border-radius: 0;
    background: transparent;
    gap: 12px;
    overflow: visible;
  }

  .channel-list-head {
    display: none;
  }

  .channel-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
    min-height: 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
  }

  .channel-info {
    grid-column: 1 / -1;
  }

  .channel-updated,
  .channel-actions {
    grid-column: 1 / -1;
    flex-wrap: wrap;
  }

  .channel-updated::before,
  .channel-setting::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }

  .channel-setting {
    display: block;
  }

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

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

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

  .library-filter-tabs {
    display: none;
  }

  .library-filter-select {
    display: block;
    width: 100%;
  }

  .two-column-panel,
  .account-create-panel,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .cache-facts {
    grid-template-columns: 1fr;
  }

  .account-create-panel .channel-form {
    grid-template-columns: 1fr;
  }

  .owner-account-main {
    align-items: flex-start;
  }

  .owner-account-summary-actions {
    justify-content: flex-start;
  }

  .owner-account-form {
    grid-template-columns: 1fr;
  }

  .owner-plan-form {
    grid-template-columns: 1fr;
  }
}

/* Keep the mobile app shell on touch-first phones and tablets in both orientations. */
@media (hover: none) and (pointer: coarse), (any-hover: none) and (any-pointer: coarse) {
  :root {
    --mobile-app-nav-height: calc(64px + env(safe-area-inset-bottom));
  }

  html,
  body,
  .app-shell,
  .content-shell,
  .main-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .content-shell {
    width: 100%;
    margin-left: 0;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 64px;
    padding: 8px 16px;
  }

  .topbar-spacer,
  .account-copy {
    display: none;
  }

  .mobile-brand {
    display: inline-flex;
    width: fit-content;
  }

  .mobile-brand .brand-logo {
    width: 145px;
    max-height: 42px;
  }

  .top-actions {
    gap: 8px;
  }

  .account-chip {
    min-height: 44px;
    padding: 2px;
  }

  .account-chip .avatar {
    width: 40px;
    height: 40px;
  }

  .mobile-header-action {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
  }

  .topbar > .search-bar {
    position: absolute;
    z-index: 20;
    top: calc(100% + 8px);
    right: 16px;
    left: 16px;
    display: none;
  }

  .topbar > .search-bar.is-mobile-open {
    display: flex;
  }

  .mobile-bottom-nav,
  .kid-watch-page .mobile-bottom-nav {
    position: fixed;
    z-index: 1000;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    width: 100%;
    height: var(--mobile-app-nav-height);
    margin: 0;
    padding: 4px 6px env(safe-area-inset-bottom);
    border: 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
    background: #fff;
    box-shadow: 0 -4px 16px rgba(15, 15, 15, 0.08);
  }

  .mobile-bottom-nav.mobile-nav-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .mobile-bottom-nav.mobile-nav-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mobile-bottom-nav > a,
  .mobile-bottom-nav > button {
    display: grid;
    align-content: center;
    justify-items: center;
    min-width: 0;
    min-height: 54px;
    padding: 4px;
    border-radius: 8px;
  }

  .main-content,
  .kid-watch-page .main-content {
    padding-bottom: calc(var(--mobile-app-nav-height) + 24px) !important;
  }

  .mobile-more-menu {
    right: 10px;
    bottom: calc(var(--mobile-app-nav-height) + 8px);
    left: 10px;
  }

  .kids-page-hero {
    align-items: flex-start;
    padding: 20px;
  }

  .kids-create-form {
    grid-template-columns: 1fr;
  }

  .kids-create-form .btn {
    grid-column: auto;
    min-width: 0;
    width: 100%;
  }

  .kids-management-card,
  .overview-kid-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .kids-management-card .kid-mini-stats,
  .overview-kid-row .kid-mini-stats {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .kids-management-card .kid-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .kids-management-card .kid-edit-form {
    grid-template-columns: 1fr 1fr;
  }

  .kids-management-card .kid-edit-actions {
    grid-column: 1 / -1;
  }

  .kids-workspace-tabs {
    top: 64px;
  }

  .kids-workspace-page .profile-switcher {
    flex-wrap: nowrap;
    margin-right: -16px;
    overflow-x: auto;
    padding-right: 16px;
    scrollbar-width: none;
  }

  .kids-workspace-page .profile-switcher::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 560px) {
  .parent-overview-page .admin-hero {
    gap: 16px;
    padding: 18px;
  }

  .parent-overview-page .admin-hero h1 {
    font-size: 24px;
  }

  .parent-overview-page .admin-hero .eyebrow {
    margin-bottom: 5px;
  }

  .parent-overview-page .admin-hero .btn {
    width: 100%;
    min-height: 46px;
  }

  .parent-overview-page .admin-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  .parent-overview-page .admin-stats .stat-card {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 3px;
    min-height: 76px;
    padding: 10px 5px;
    border: 0;
    border-right: 1px solid var(--border);
    border-radius: 0;
    box-shadow: none;
    text-align: center;
  }

  .parent-overview-page .admin-stats .stat-card:last-child {
    border-right: 0;
  }

  .parent-overview-page .admin-stats .stat-icon {
    display: none;
  }

  .parent-overview-page .admin-stats .stat-copy {
    gap: 2px;
  }

  .parent-overview-page .admin-stats .stat-copy > span {
    font-size: 11px;
  }

  .parent-overview-page .admin-stats .stat-copy strong {
    font-size: 22px;
  }

  .parent-overview-page .admin-stats + .usage-grid {
    display: block;
    margin-bottom: 12px;
  }

  .parent-overview-page .admin-stats + .usage-grid > .usage-card:not(.plan-summary-card) {
    display: none;
  }

  .parent-overview-page .admin-stats + .usage-grid .plan-summary-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: 0;
    gap: 2px 12px;
    padding: 14px 16px;
  }

  .parent-overview-page .admin-stats + .usage-grid .plan-summary-card .usage-card-head {
    grid-row: 1 / 3;
  }

  .parent-overview-page .admin-stats + .usage-grid .plan-summary-card > p {
    margin: 0;
    text-align: right;
  }

  .parent-overview-page .admin-stats + .usage-grid .plan-summary-card .plan-expiry-note {
    font-size: 12px;
  }

  .parent-overview-page .overview-kids-snapshot {
    padding: 18px;
  }

  .parent-overview-page .overview-kids-snapshot .panel-title > div p {
    display: none;
  }

  .parent-overview-page .overview-kids-snapshot .panel-title .btn {
    display: none;
  }

  .parent-overview-page .overview-kid-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px;
  }

  .parent-overview-page .overview-kid-row .kid-mini-stats {
    display: none;
  }

  .parent-overview-page .overview-kid-row > .btn {
    width: auto;
  }

  .kids-create-panel,
  .kids-directory {
    padding: 18px;
  }

  .kids-directory .panel-title {
    align-items: flex-start;
  }

  .kids-directory-capacity {
    margin-top: 2px;
  }

  .kids-management-card,
  .overview-kid-row {
    grid-template-columns: 1fr;
  }

  .kids-management-card .kid-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .kids-management-card .kid-actions .btn.primary {
    grid-column: 1 / -1;
  }

  .kids-management-card .kid-actions .btn {
    width: 100%;
  }

  .kids-management-card .kid-edit-form {
    grid-template-columns: 1fr;
  }

  .kid-delete-form {
    justify-content: stretch;
  }

  .kid-delete-form .btn {
    width: 100%;
  }

  .overview-kid-row > .btn {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .parent-videos-page .main-content {
    padding-right: 12px;
    padding-left: 12px;
  }

  .parent-videos-page .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .parent-videos-page .section-heading form,
  .parent-videos-page .section-heading .btn,
  .parent-videos-page .admin-add-form .btn {
    width: 100%;
  }

  .parent-videos-page .panel {
    padding: 18px;
  }

  .parent-videos-page .panel-title {
    align-items: flex-start;
    gap: 10px;
  }

  .parent-videos-page .admin-content-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .parent-videos-page .admin-content-tabs button {
    justify-content: center;
    min-width: 0;
    padding: 0 10px;
  }

  .parent-videos-page input,
  .parent-videos-page select,
  .parent-videos-page textarea {
    max-width: 100%;
    min-width: 0;
  }

  .parent-videos-page .channel-row {
    grid-template-columns: 1fr;
  }

  .parent-videos-page .channel-setting,
  .parent-videos-page .channel-updated,
  .parent-videos-page .channel-actions {
    grid-column: 1;
  }

  .supporter-status-panel {
    gap: 20px;
    padding: 20px;
  }

  .supporter-status-main {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .supporter-status-main .owner-status-pill {
    grid-column: 2;
    justify-self: start;
  }

  .supporter-status-details {
    grid-template-columns: 1fr;
  }

  .supporter-status-details > div,
  .supporter-status-details > div:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .supporter-status-details > div:last-child {
    border-bottom: 0;
  }

  .supporter-status-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .supporter-status-footer .btn {
    width: 100%;
  }

  .plan-access-banner {
    grid-template-columns: 1fr;
  }
  .mode-choice,
  .monetization-grid,
  .support-benefit-grid {
    grid-template-columns: 1fr;
  }

  .monetization-wide {
    grid-column: auto;
  }

  .owner-access-summary {
    grid-column: auto;
  }

  .kiddopick-player-controls {
    right: 5px;
    bottom: 5px;
    left: 5px;
    gap: 1px;
    padding: 5px 8px 6px;
  }

  .player-control-row {
    display: flex;
    justify-content: space-between;
    gap: 4px;
  }

  .player-control-group {
    gap: 4px;
  }

  .player-control-group-end {
    min-width: 0;
    gap: 4px;
  }

  .player-control-group-center {
    margin-left: auto;
  }

  .player-control-button {
    min-width: 34px;
    height: 34px;
    border-radius: 7px;
  }

  .player-control-button .icon {
    width: 19px;
    height: 19px;
  }

  .player-volume-control {
    width: clamp(64px, 24vw, 88px);
  }

  .player-volume-button {
    min-width: 32px;
  }

  .player-time-separator,
  [data-player-duration],
  .player-next-button span {
    display: none;
  }

  .player-time {
    min-width: 30px;
    font-size: 11px;
  }

  .player-next-button {
    min-width: 34px;
    padding: 0;
  }

  .player-center-toggle {
    width: 70px;
    height: 48px;
    border-radius: 14px;
  }

  .player-center-toggle .icon {
    width: 28px;
    height: 28px;
  }

  .support-benefit-grid span {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .support-benefit-grid span:last-child {
    border-bottom: 0;
  }

  .support-code-row,
  .support-review-form {
    grid-template-columns: 1fr;
  }

  .support-order-row {
    grid-template-columns: 1fr;
  }

  .owner-danger-zone,
  .owner-delete-dialog-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .owner-danger-zone .btn,
  .owner-delete-dialog-actions .btn {
    width: 100%;
  }

  .owner-delete-dialog-actions .inline-save-status {
    margin-right: 0;
  }

  .support-order-meta {
    grid-column: auto;
    grid-row: auto;
  }

  .support-offer,
  .support-payment-column {
    padding: 20px;
  }

  .support-price {
    display: grid;
  }

  .support-price strong {
    font-size: 30px;
  }

  .support-frame-shell iframe {
    height: 640px;
  }
  .inline-edit-form {
    grid-template-columns: 1fr;
  }

  .admin-stats {
    grid-template-columns: 1fr;
  }

  .owner-stats {
    grid-template-columns: 1fr;
  }

  .usage-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: 82px;
  }

  .channel-row {
    grid-template-columns: 1fr;
  }

  .kid-card {
    grid-template-columns: 1fr;
  }

  .owner-account-main {
    display: grid;
  }

  .kid-mini-stats,
  .kid-actions {
    justify-content: flex-start;
  }

  .owner-account-main {
    display: grid;
  }

  .kid-actions {
    justify-content: flex-start;
  }

  .settings-card-head {
    align-items: flex-start;
  }

  .settings-card-actions {
    display: grid;
  }

  .settings-card-actions .btn {
    width: 100%;
  }

  .settings-range {
    align-items: flex-start;
    flex-direction: column;
  }

  .settings-presets {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .overview-hero-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .overview-primary-action {
    min-width: 0;
  }

  .overview-check-card {
    grid-template-columns: 1fr;
    min-width: 0;
    max-width: none;
  }

  .overview-check-card .btn,
  .overview-check-disabled {
    width: 100%;
    justify-content: center;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .library-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }

  .meta-row {
    align-items: flex-start;
    flex-direction: column;
  }

  html:has(.auth-page),
  body:has(.auth-page) {
    min-height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .auth-page {
    min-height: 100svh;
    align-items: start;
    place-items: start center;
    padding: 12px 10px max(42svh, 260px);
    background: #fff;
    overflow: visible;
  }

  .auth-card {
    width: 100%;
    max-width: 430px;
    padding: 22px 22px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(15, 15, 15, 0.07);
  }

  .auth-brand {
    margin-bottom: 18px;
  }

  .auth-brand .brand-logo {
    width: 172px;
  }

  .auth-card h1 {
    font-size: 27px;
    line-height: 1.08;
  }

  .auth-tabs {
    margin: 18px 0;
  }

  .auth-tab {
    min-height: 42px;
  }

  .login-panel h2 {
    font-size: 21px;
  }

  .login-panel .muted {
    margin-bottom: 0;
  }

  .auth-field {
    gap: 6px;
    scroll-margin-top: 18px;
    scroll-margin-bottom: 210px;
  }

  .auth-field-message {
    min-height: 16px;
  }

  .auth-validated-form.is-keyboard-active {
    padding-bottom: 28px;
  }

  .brand {
    font-size: 20px;
  }

  .account-copy {
    display: none;
  }

  .account-chip {
    padding: 4px;
  }

  .related-item {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .related-item img {
    width: 104px;
  }
}

/* Native-style app navigation, rendered directly under body. */
@media (max-width: 900px) {
  :root {
    --mobile-app-nav-height: calc(64px + env(safe-area-inset-bottom));
  }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 1000;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    width: 100%;
    max-width: none;
    height: var(--mobile-app-nav-height);
    margin: 0;
    padding: 4px 6px env(safe-area-inset-bottom);
    border: 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
    background: #fff;
    box-shadow: 0 -4px 16px rgba(15, 15, 15, 0.08);
    overflow: hidden;
    transform: none;
    backdrop-filter: none;
  }

  .mobile-bottom-nav.mobile-nav-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .mobile-bottom-nav.mobile-nav-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mobile-bottom-nav > a,
  .mobile-bottom-nav > button {
    min-width: 0;
    min-height: 54px;
    padding: 4px;
    border-radius: 8px;
  }

  .main-content {
    padding-bottom: calc(var(--mobile-app-nav-height) + 24px) !important;
  }

  .mobile-more-menu {
    right: 10px;
    bottom: calc(var(--mobile-app-nav-height) + 8px);
    left: 10px;
  }
}

/* Keep wide workspace content inside the shared mobile app shell. */
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  .parent-videos-page .kids-workspace-tabs {
    position: static;
  }

  .parent-videos-page .profile-switcher,
  .parent-videos-page .kids-workspace-tabs,
  .parent-videos-page .channel-list,
  .parent-videos-page .library-toolbar,
  .parent-videos-page .library-grid {
    max-width: 100%;
  }
}

@media (max-width: 1180px) {
  body.kid-watch-page .app-shell {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .kid-watch-page .sidebar,
  .kid-watch-page .topbar {
    display: none;
  }

  .kid-watch-page .content-shell,
  .kid-watch-page .main-content,
  .kid-watch-page .watch-layout,
  .kid-watch-page .watch-layout > div,
  .kid-watch-page .related-panel {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .kid-watch-page .main-content {
    padding: 14px 18px calc(88px + env(safe-area-inset-bottom));
  }

  .kid-watch-page .mobile-bottom-nav {
    position: fixed;
    z-index: 25;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: calc(64px + env(safe-area-inset-bottom));
    padding: 5px 8px env(safe-area-inset-bottom);
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -6px 20px rgba(15, 15, 15, 0.06);
    backdrop-filter: blur(12px);
  }

  .kid-watch-page .mobile-bottom-nav a {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 3px;
    min-width: 0;
    min-height: 54px;
    padding: 4px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.15;
  }

  .kid-watch-page .mobile-bottom-nav a.active {
    background: #fff0f0;
    color: var(--primary);
  }

  .kid-watch-page .mobile-bottom-nav .icon {
    width: 21px;
    height: 21px;
  }

  .kid-watch-page .watch-layout {
    display: block;
  }

  .kid-watch-page .player-wrap {
    width: 100%;
    height: auto !important;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .kid-watch-page .player-wrap iframe {
    width: 100% !important;
    height: 100% !important;
  }

  .kid-watch-page .related-list {
    grid-auto-flow: column;
    grid-auto-columns: minmax(230px, 30vw);
    grid-template-columns: none;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x proximity;
  }

  .kid-watch-page .related-item {
    scroll-snap-align: start;
  }

  .kid-video-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kid-video-row {
    grid-template-columns: none;
  }
}

@media (max-width: 800px) {
  .kid-watch-page .watch-top-actions {
    margin-bottom: 10px;
  }

  .kid-watch-page .watch-meta {
    margin-bottom: 18px;
  }

  .kid-watch-page .watch-mix-section {
    margin-top: 20px;
  }

  .kid-watch-page .watch-mix-desktop {
    display: none;
  }

  .kid-watch-page .watch-mix-mobile {
    display: block;
  }

  .kid-watch-page .watch-mix-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding-bottom: 10px;
  }

  .kid-watch-page .related-panel {
    margin-right: -12px;
    margin-left: -12px;
    width: calc(100% + 24px);
    padding: 14px 12px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .kid-welcome {
    align-items: flex-start;
  }

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

  .kid-video-row {
    grid-template-columns: none;
  }
}

@media (max-width: 560px) {
  .kid-watch-page .main-content {
    padding: 8px 8px calc(78px + env(safe-area-inset-bottom));
  }

  .watch-top-actions {
    gap: 8px;
  }

  .watch-back-button {
    width: 42px;
    min-height: 42px;
    padding: 0;
    justify-content: center;
  }

  .watch-back-button span:not(.icon) {
    display: none;
  }

  .watch-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding-top: 12px;
  }

  .watch-meta h1 {
    font-size: 15px;
  }

  .watch-actions {
    gap: 7px;
  }

  .watch-favorite-button,
  .autoplay-toggle {
    min-height: 40px;
    padding: 0 10px;
  }

  .watch-favorite-button span:not(.icon),
  .autoplay-toggle > span:last-child {
    display: none;
  }

  .watch-favorite-button {
    width: 40px;
    padding: 0;
  }

  .autoplay-switch {
    width: 36px;
  }

  .autoplay-toggle input:checked + .autoplay-switch::after {
    transform: translateX(14px);
  }

  .kid-watch-page .related-panel {
    margin-right: -8px;
    margin-left: -8px;
    width: calc(100% + 16px);
    padding: 14px 8px;
  }

  .kid-watch-page .related-list {
    grid-auto-columns: minmax(180px, 72vw);
  }

  .kid-watch-page .related-item {
    grid-template-columns: none;
  }

  .kid-watch-page .related-thumb img {
    width: 100%;
  }

  .player-end-screen {
    grid-template-columns: minmax(110px, 42%) minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    gap: 9px 12px;
    padding: 14px;
    text-align: left;
  }

  .player-end-screen > img {
    grid-row: 1 / 3;
    width: 100%;
    justify-self: stretch;
  }

  .player-end-copy {
    align-self: end;
    gap: 3px;
  }

  .player-end-actions {
    align-self: start;
    gap: 6px;
  }

  .player-end-copy strong {
    font-size: 14px;
  }

  .player-end-copy small {
    font-size: 11px;
  }

  .player-end-actions button,
  .player-end-actions a {
    min-height: 36px;
    padding: 0 9px;
    font-size: 11px;
  }

  .player-end-actions span:not(.icon) {
    display: none;
  }

  .kid-discovery-page .main-content {
    padding-right: 14px;
    padding-left: 14px;
  }

  .kid-welcome {
    align-items: center;
    padding: 14px;
  }

  .kid-welcome-avatar {
    width: 46px;
    height: 46px;
    font-size: 20px;
  }

  .kid-welcome h1 {
    font-size: 21px;
  }

  .kid-welcome-copy > div > p:last-child,
  .kid-search-button span:not(.icon) {
    display: none;
  }

  .kid-search-button {
    flex: 0 0 auto;
    width: 46px;
    padding: 0;
  }

  .kid-search-panel > div {
    grid-template-columns: minmax(0, 1fr) 46px;
  }

  .kid-search-panel .btn.primary {
    width: 46px;
    padding: 0;
  }

  .kid-search-panel .btn.primary span:not(.icon) {
    display: none;
  }

  .kid-search-panel .btn.secondary {
    grid-column: 1 / -1;
    width: 100%;
  }

  .kid-view-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .kid-view-tabs a {
    min-width: 0;
    padding: 0 8px;
  }

  .kid-video-section {
    margin-top: 24px;
  }

  .kid-section-heading h2 {
    font-size: 18px;
  }

  .kid-refresh-button {
    width: 42px;
    min-height: 42px;
    padding: 0;
  }

  .kid-refresh-button span:not(.icon) {
    display: none;
  }

  .kid-video-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .kid-video-row {
    grid-auto-columns: minmax(250px, 82vw);
    grid-template-columns: none;
    gap: 12px;
  }

  .kid-video-card h3 {
    font-size: 15px;
  }

  .kid-play-overlay {
    display: none;
  }
}

@media (max-width: 420px) {
  .kid-watch-page .kiddopick-player-controls {
    right: 4px;
    bottom: 4px;
    left: 4px;
    padding: 4px 6px 5px;
  }

  .kid-watch-page .player-control-group-center {
    display: none;
  }

  .kid-watch-page .player-control-button {
    min-width: 30px;
    height: 32px;
  }

  .kid-watch-page .player-control-button .icon {
    width: 18px;
    height: 18px;
  }

  .kid-watch-page .player-volume-control {
    width: clamp(58px, 25vw, 76px);
  }

  .kid-watch-page .player-time {
    font-size: 10px;
  }

  .kid-watch-page .watch-meta {
    grid-template-columns: 1fr;
  }

  .kid-watch-page .watch-actions {
    justify-content: flex-end;
    gap: 8px;
    width: auto;
  }

  .kid-watch-page .watch-actions [data-favorite-form] {
    flex: 0 0 auto;
  }

  .kid-watch-page .related-list {
    grid-auto-columns: minmax(170px, 78vw);
  }
}

/* Child discovery UI: keep this final so shared responsive rules cannot flatten it. */
.kid-discovery-page .kid-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.kid-discovery-page .kid-welcome-copy {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.kid-discovery-page .kid-welcome-avatar {
  display: grid;
  flex: 0 0 54px;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 23px;
  font-weight: 900;
}

.kid-discovery-page .kid-search-button,
.kid-discovery-page .kid-refresh-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-weight: 800;
}

.kid-discovery-page .kid-search-panel {
  display: none;
  gap: 8px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.kid-discovery-page .kid-search-panel.is-open {
  display: grid;
}

.kid-discovery-page .kid-search-panel > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

.kid-discovery-page .kid-view-tabs {
  display: flex;
  gap: 8px;
  margin: 16px 0 22px;
}

.kid-discovery-page .kid-view-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 112px;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
}

.kid-discovery-page .kid-view-tabs a.active {
  border-color: var(--primary);
  background: #fff0f0;
  color: var(--primary);
}

.kid-discovery-page .kid-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

.kid-discovery-page .kid-section-heading > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.kid-discovery-page .kid-section-icon {
  display: grid;
  flex: 0 0 36px;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #fff0f0;
  color: var(--primary);
}

@media (max-width: 560px) {
  .kid-discovery-page .kid-welcome {
    padding: 14px;
  }

  .kid-discovery-page .kid-welcome-avatar {
    flex-basis: 46px;
    width: 46px;
    height: 46px;
    font-size: 20px;
  }

  .kid-discovery-page .kid-welcome h1 {
    font-size: 21px;
  }

  .kid-discovery-page .kid-welcome-copy > div > p:last-child,
  .kid-discovery-page .kid-search-button span:not(.icon) {
    display: none;
  }

  .kid-discovery-page .kid-search-button {
    flex: 0 0 46px;
    width: 46px;
    padding: 0;
  }

  .kid-discovery-page .kid-search-panel > div {
    grid-template-columns: minmax(0, 1fr) 46px;
  }

  .kid-discovery-page .kid-search-panel .btn.secondary {
    grid-column: 1 / -1;
    width: 100%;
  }

  .kid-discovery-page .kid-view-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .kid-discovery-page .kid-view-tabs a {
    min-width: 0;
    padding: 0 6px;
  }
}

/* Final mobile app menu rules. */
@media (max-width: 900px) {
  :root {
    --mobile-nav-safe-area: env(safe-area-inset-bottom, 0px);
    --mobile-app-nav-height: calc(64px + var(--mobile-nav-safe-area));
  }

  html {
    height: 100%;
    overflow: hidden;
  }

  body:has(> .app-shell) {
    display: grid;
    grid-template-rows: minmax(0, 1fr) var(--mobile-app-nav-height);
    width: 100%;
    height: 100svh;
    min-height: 0;
    overflow: hidden;
  }

  body > .app-shell {
    grid-row: 1;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body > .app-shell > .content-shell {
    display: grid;
    grid-template-rows: 64px minmax(0, 1fr);
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body > .app-shell > .content-shell > .topbar {
    position: relative;
    grid-row: 1;
  }

  body > .app-shell > .content-shell > .main-content {
    grid-row: 2;
    min-height: 0;
    padding-bottom: 24px !important;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }

  body.form-keyboard-active:has(> .app-shell) {
    grid-template-rows: minmax(0, 1fr) 0;
  }

  body.form-keyboard-active > .app-shell > .content-shell > .main-content {
    padding-bottom: max(46svh, 320px) !important;
  }

  body.form-keyboard-active .mobile-bottom-nav {
    display: none;
  }

  body.form-keyboard-active .auth-field,
  body.form-keyboard-active input,
  body.form-keyboard-active textarea,
  body.form-keyboard-active select {
    scroll-margin-top: 18px;
    scroll-margin-bottom: 260px;
  }

  body.kid-watch-page > .app-shell > .content-shell {
    grid-template-rows: minmax(0, 1fr);
  }

  body.kid-watch-page > .app-shell > .content-shell > .main-content {
    grid-row: 1;
  }

  .mobile-bottom-nav,
  .kid-watch-page .mobile-bottom-nav {
    position: relative;
    z-index: 1000;
    inset: auto;
    grid-row: 2;
    align-self: stretch;
    display: grid;
    width: 100%;
    max-width: none;
    height: var(--mobile-app-nav-height);
    min-height: var(--mobile-app-nav-height);
    max-height: var(--mobile-app-nav-height);
    margin: 0;
    padding: 4px 6px var(--mobile-nav-safe-area);
    border: 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
    background: #fff;
    box-shadow: 0 -4px 16px rgba(15, 15, 15, 0.08);
    overflow: hidden;
    transform: none;
    backdrop-filter: none;
    contain: size layout paint;
  }

  .mobile-bottom-nav.mobile-nav-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .mobile-bottom-nav.mobile-nav-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mobile-bottom-nav > a,
  .mobile-bottom-nav > button {
    align-self: start;
    width: 100%;
    height: 56px;
    min-width: 0;
    min-height: 56px;
    max-height: 56px;
    padding: 4px;
    overflow: hidden;
    border-radius: 8px;
    line-height: 1.15;
  }

  .mobile-more-menu {
    right: 10px;
    bottom: calc(var(--mobile-app-nav-height) + 8px);
    left: 10px;
  }
}
