:root {
  color-scheme: light;
  --ink: #17324d;
  --muted: #5f7184;
  --paper: #edf7ff;
  --surface: #ffffff;
  --line: #dce5eb;
  --blue: #2367d1;
  --blue-deep: #174b9b;
  --aqua: #dff5f1;
  --sun: #ffd13d;
  --coral: #ef4a4f;
  --purple: #5948b8;
  --grass: #57a75c;
  --danger: #b93737;
  --shadow: 0 12px 30px rgba(23, 50, 77, 0.1);
  font-family: ui-rounded, "SF Pro Rounded", "Avenir Next", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(ellipse 130px 55px at 8% 7%, rgba(255, 255, 255, 0.92) 0 58%, transparent 60%),
    radial-gradient(ellipse 160px 64px at 91% 19%, rgba(255, 255, 255, 0.85) 0 58%, transparent 60%),
    linear-gradient(180deg, #dff2ff 0%, #f6fbff 35%, var(--paper) 100%);
  color: var(--ink);
}

body {
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  touch-action: manipulation;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 4px solid rgba(30, 117, 216, 0.28);
  outline-offset: 3px;
}

.app-shell {
  min-height: 100dvh;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
  padding: calc(0.8rem + env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) 0.8rem max(1rem, env(safe-area-inset-left));
  background: rgba(237, 247, 255, 0.92);
  border-bottom: 1px solid rgba(220, 229, 235, 0.85);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--coral), #d51f37);
  box-shadow: 0 8px 16px rgba(23, 50, 77, 0.18);
}

.brand-mark svg {
  width: 24px;
  fill: white;
}

.brand-copy {
  min-width: 0;
}

.brand-copy strong,
.brand-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy strong {
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.main {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(1.2rem, 4vw, 3rem) max(1rem, env(safe-area-inset-right)) calc(3rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 1.25rem;
  align-items: stretch;
  margin-bottom: 2rem;
}

.hero-copy,
.hero-card,
.panel,
.setup-card,
.dialog-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(220, 229, 235, 0.9);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: clamp(1.5rem, 4vw, 3.4rem);
  border-top: 7px solid var(--sun);
}

.eyebrow {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  margin: 0 0 0.75rem;
  color: var(--blue-deep);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 0.65rem;
  height: 0.65rem;
  background: var(--coral);
  border-radius: 50%;
  content: "";
}

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

h1 {
  max-width: 14ch;
  margin-bottom: 0.8rem;
  font-size: clamp(2.2rem, 7vw, 4.7rem);
  letter-spacing: -0.065em;
  line-height: 0.98;
}

h2 {
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  letter-spacing: -0.035em;
}

h3 {
  margin-bottom: 0.45rem;
  font-size: 1.05rem;
}

.lede {
  max-width: 58ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.6;
}

.hero-card {
  display: grid;
  min-height: 260px;
  padding: 1.5rem;
  place-items: center;
  background:
    radial-gradient(circle at 15% 20%, white 0 2px, transparent 3px),
    radial-gradient(circle at 75% 28%, white 0 3px, transparent 4px),
    radial-gradient(circle at 62% 75%, var(--sun) 0 2px, transparent 3px),
    radial-gradient(circle at 28% 70%, white 0 2px, transparent 3px),
    linear-gradient(145deg, #256fdb 0%, #5948b8 100%);
  color: white;
  overflow: hidden;
  position: relative;
}

.hero-card::before,
.hero-card::after {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  content: "";
}

.hero-card::before {
  top: -70px;
  right: -30px;
  background: var(--sun);
}

.hero-card::after {
  bottom: -95px;
  left: -50px;
  background: var(--coral);
}

.hero-lock {
  position: relative;
  z-index: 1;
  display: grid;
  width: 150px;
  height: 150px;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.32);
  border-radius: 42px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 4rem;
  transform: rotate(4deg);
}

.hero-lock::after {
  position: absolute;
  right: -22px;
  bottom: -18px;
  font-size: 2.2rem;
  content: "★";
  color: var(--sun);
}

/* Wonder Shelf character home screen */
.home-crew-stage {
  position: relative;
  z-index: 2;
  min-width: 0;
  min-height: 380px;
}

.home-hero {
  position: relative;
  grid-template-columns: minmax(0, 0.86fr) minmax(390px, 1.14fr);
  min-height: 410px;
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.75) 0 3px, transparent 4px),
    radial-gradient(circle at 92% 48%, rgba(255, 209, 61, 0.95) 0 4px, transparent 5px),
    linear-gradient(135deg, #215daf 0%, #447bdc 48%, #7158c8 100%);
  border: 5px solid rgba(255, 255, 255, 0.92);
  border-radius: 36px;
  box-shadow: 0 24px 55px rgba(33, 80, 141, 0.2);
  overflow: hidden;
}

.home-hero::before {
  position: absolute;
  top: -105px;
  right: -75px;
  width: 300px;
  height: 300px;
  background: rgba(255, 209, 61, 0.96);
  border-radius: 50%;
  content: "";
}

.home-hero::after {
  position: absolute;
  bottom: -180px;
  left: 44%;
  width: 330px;
  height: 260px;
  background: rgba(112, 216, 188, 0.3);
  border-radius: 50%;
  content: "";
}

.home-hero .hero-copy {
  position: relative;
  z-index: 3;
  align-self: center;
  padding: clamp(2rem, 5vw, 3.8rem) 0 clamp(2rem, 5vw, 3.8rem) clamp(1.6rem, 5vw, 3.8rem);
  color: white;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.home-hero h1 {
  max-width: 10ch;
  font-size: clamp(2.7rem, 6vw, 4.7rem);
}

.home-hero .lede {
  color: rgba(255, 255, 255, 0.84);
  font-weight: 650;
}

.hero-eyebrow {
  color: rgba(255, 255, 255, 0.82);
}

.hero-eyebrow::before {
  background: var(--sun);
}

.hero-trust {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 1.25rem;
  padding: 0.58rem 0.78rem;
  background: rgba(11, 36, 70, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 13px;
  font-size: 0.8rem;
  font-weight: 800;
}

.hero-trust b {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: var(--blue-deep);
  background: var(--aqua);
  border-radius: 50%;
}

.home-crew-stage img {
  position: absolute;
  right: -5%;
  bottom: -1%;
  z-index: 2;
  display: block;
  width: 116%;
  max-width: none;
  filter: drop-shadow(0 20px 18px rgba(13, 29, 72, 0.28));
}

.crew-star {
  position: absolute;
  z-index: 3;
  color: var(--sun);
  font-size: 2rem;
  filter: drop-shadow(0 3px 0 rgba(33, 57, 104, 0.25));
}

.crew-star-one { top: 9%; left: 5%; transform: rotate(-15deg); }
.crew-star-two { top: 30%; right: 8%; color: white; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
}

.section-heading h2,
.section-heading p {
  margin-bottom: 0;
}

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

.channel-grid,
.video-grid,
.category-grid {
  display: grid;
  gap: clamp(0.8rem, 2vw, 1.25rem);
}

.channel-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(210px, 45%), 1fr));
  margin-bottom: 2.4rem;
}

.video-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
}

.category-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  margin-bottom: 2.4rem;
}

.category-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 42px;
  gap: 1rem;
  align-items: center;
  min-height: 118px;
  padding: 1rem;
  color: var(--ink);
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  border-bottom: 7px solid var(--blue);
  border-radius: 24px;
  box-shadow: 0 8px 20px rgba(23, 50, 77, 0.08);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.category-card:nth-child(5n + 2) { border-bottom-color: var(--coral); }
.category-card:nth-child(5n + 3) { border-bottom-color: var(--sun); }
.category-card:nth-child(5n + 4) { border-bottom-color: var(--grass); }
.category-card:nth-child(5n + 5) { border-bottom-color: var(--purple); }

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

.adventure-category-card {
  position: relative;
  display: block;
  min-height: 190px;
  padding: 1.25rem;
  border: 1px solid rgba(23, 50, 77, 0.08);
  border-bottom: 0 !important;
  border-radius: 27px;
  overflow: hidden;
}

.adventure-category-card::after {
  position: absolute;
  right: -35px;
  bottom: -52px;
  width: 150px;
  height: 150px;
  border: 22px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  content: "";
}

.adventure-category-copy {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  height: 100%;
}

.adventure-category-card .category-emoji {
  width: 50px;
  height: 50px;
  margin-bottom: 0.75rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  box-shadow: 0 5px 12px rgba(23, 50, 77, 0.08);
  font-size: 1.6rem;
}

.adventure-category-card strong {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 900;
  letter-spacing: -0.035em;
}

.adventure-category-card small {
  color: rgba(23, 50, 77, 0.7);
}

.adventure-category-card .category-arrow {
  position: absolute;
  left: 1.25rem;
  bottom: 1.15rem;
  z-index: 4;
  width: 34px;
  height: 34px;
  font-size: 0.9rem;
}

.adventure-category-card.has-character {
  min-height: 240px;
}

.adventure-category-card.has-character .adventure-category-copy {
  width: 57%;
}

.story-adventure-card { background: linear-gradient(135deg, #fff1a8, #ffd86a); }
.space-adventure-card { background: linear-gradient(135deg, #cbd9ff, #bdb0f3); }
.build-adventure-card { background: linear-gradient(135deg, #b9f0e3, #79d8c1); }
.music-adventure-card { background: linear-gradient(135deg, #ffd1dc, #ffa2b0); }
.spanish-adventure-card { grid-column: 1 / -1; min-height: 170px; background: linear-gradient(135deg, #d2eeff, #9fd9fb); }
.custom-adventure-card { min-height: 170px; background: linear-gradient(135deg, #f1efff, #d9d2ff); }

.category-character {
  position: absolute;
  z-index: 2;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 12px 10px rgba(23, 50, 77, 0.18));
}

.pico-character { right: -16px; bottom: -24px; width: min(49%, 245px); transform: rotate(2deg); }
.bitty-character { right: -5px; bottom: -34px; width: min(50%, 245px); transform: rotate(-2deg); }

.category-orbit {
  position: absolute;
  top: 13%;
  right: 6%;
  z-index: 1;
  width: 145px;
  height: 145px;
  border: 8px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.category-orbit::before {
  position: absolute;
  top: 28px;
  left: 28px;
  width: 74px;
  height: 74px;
  background: linear-gradient(145deg, #7056c8, #3a63bd);
  border: 8px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  box-shadow: inset -12px -10px 0 rgba(26, 49, 117, 0.2);
  content: "";
}

.category-orbit i { position: absolute; top: 44%; right: -7px; width: 23px; height: 23px; background: var(--sun); border: 4px solid white; border-radius: 50%; }
.category-orbit b { position: absolute; bottom: 5px; left: -7px; color: white; font-size: 1.7rem; }
.space-adventure-card .adventure-category-copy,
.music-adventure-card .adventure-category-copy { width: 64%; }

.category-music-notes {
  position: absolute;
  top: 22%;
  right: 8%;
  z-index: 2;
  color: rgba(130, 48, 100, 0.8);
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  transform: rotate(-8deg);
}

.category-music-notes b { color: white; font-size: 3.4rem; }

.category-speech { position: absolute; top: 22%; right: 7%; z-index: 2; width: 175px; height: 96px; }
.category-speech i,
.category-speech b { position: absolute; display: grid; place-items: center; background: rgba(255, 255, 255, 0.84); border: 3px solid rgba(23, 50, 77, 0.08); border-radius: 21px; box-shadow: 0 9px 18px rgba(23, 50, 77, 0.08); font-style: normal; }
.category-speech i { top: 0; left: 0; width: 104px; height: 60px; color: var(--blue-deep); font-size: 1.05rem; font-weight: 900; transform: rotate(-4deg); }
.category-speech b { right: 0; bottom: 0; width: 72px; height: 52px; color: #d94755; transform: rotate(5deg); }
.spanish-adventure-card .adventure-category-copy { width: 66%; }

.category-card:hover {
  box-shadow: 0 13px 28px rgba(23, 50, 77, 0.13);
  transform: translateY(-3px);
}

.category-emoji,
.category-hero-emoji {
  display: grid;
  place-items: center;
  background: #edf6ff;
  border-radius: 21px;
}

.category-emoji {
  width: 74px;
  height: 74px;
  font-size: 2.4rem;
}

.category-card strong,
.category-card small {
  display: block;
}

.category-card strong {
  font-size: 1.18rem;
  line-height: 1.2;
}

.category-card small {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.category-arrow {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: white;
  background: var(--ink);
  border-radius: 50%;
  font-weight: 900;
}

.category-hero {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  margin-bottom: 2rem;
  padding: clamp(1.2rem, 4vw, 2rem);
  background: white;
  border: 1px solid var(--line);
  border-left: 8px solid var(--sun);
  border-radius: 25px;
  box-shadow: var(--shadow);
}

.category-hero h1,
.category-hero p {
  margin-bottom: 0;
}

.category-hero h1 {
  max-width: none;
  font-size: clamp(2rem, 7vw, 4rem);
}

.category-hero-emoji {
  flex: 0 0 auto;
  width: clamp(76px, 14vw, 110px);
  height: clamp(76px, 14vw, 110px);
  font-size: clamp(2.6rem, 8vw, 4rem);
}

.channel-card,
.video-card {
  position: relative;
  padding: 0;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(23, 50, 77, 0.07);
  cursor: pointer;
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.channel-card:hover,
.video-card:hover {
  box-shadow: 0 13px 28px rgba(23, 50, 77, 0.13);
  transform: translateY(-3px);
}

.channel-card:active,
.video-card:active,
.btn:active,
.icon-btn:active {
  transform: scale(0.98);
}

.channel-card {
  display: grid;
  min-height: 220px;
  padding: 1.25rem;
  place-items: center;
  border-radius: 26px;
}

.channel-card:nth-child(4n + 1) { border-bottom: 7px solid var(--blue); }
.channel-card:nth-child(4n + 2) { border-bottom: 7px solid var(--coral); }
.channel-card:nth-child(4n + 3) { border-bottom: 7px solid var(--sun); }
.channel-card:nth-child(4n + 4) { border-bottom: 7px solid var(--grass); }

.channel-avatar {
  width: 112px;
  height: 112px;
  margin-bottom: 1rem;
  object-fit: cover;
  border: 6px solid var(--aqua);
  border-radius: 50%;
}

.channel-card strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 1.08rem;
  line-height: 1.25;
  text-align: center;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.channel-arrow {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--blue-deep);
  background: #eef6ff;
  border-radius: 50%;
  font-weight: 900;
}

.video-card {
  border-radius: 22px;
}

.thumbnail-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #dce5eb;
  overflow: hidden;
}

.thumbnail-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-badge {
  position: absolute;
  right: 0.8rem;
  bottom: 0.8rem;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: white;
  background: rgba(23, 50, 77, 0.9);
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  font-size: 1rem;
}

.video-copy {
  min-height: 98px;
  padding: 1rem;
}

.video-copy strong {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.video-copy span {
  display: block;
  margin-top: 0.45rem;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn,
.icon-btn,
.tab {
  min-height: 48px;
  border: 0;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.78rem 1.15rem;
  color: white;
  background: var(--blue);
  border-radius: 15px;
  font-weight: 800;
  text-decoration: none;
  transition: background 150ms ease, transform 150ms ease;
}

.btn:hover {
  background: var(--blue-deep);
}

.btn-secondary {
  color: var(--ink);
  background: #edf3f6;
}

.btn-secondary:hover {
  background: #dfe9ee;
}

.btn-danger {
  color: var(--danger);
  background: #fff0f0;
}

.btn-danger:hover {
  background: #ffe2e2;
}

.btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.icon-btn {
  display: grid;
  min-width: 48px;
  padding: 0 0.9rem;
  place-items: center;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  font-size: 1rem;
  font-weight: 800;
}

.setup-wrap,
.dialog {
  display: grid;
  min-height: 100dvh;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  place-items: center;
}

.setup-card {
  width: min(620px, 100%);
  padding: clamp(1.4rem, 5vw, 3rem);
}

.setup-icon {
  display: grid;
  width: 70px;
  height: 70px;
  margin-bottom: 1.25rem;
  place-items: center;
  background: var(--aqua);
  border-radius: 24px;
  font-size: 2rem;
}

.setup-card .lede {
  margin-bottom: 1.5rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field label {
  font-size: 0.9rem;
  font-weight: 800;
}

.field small,
.helper,
.fine-print {
  color: var(--muted);
  line-height: 1.5;
}

.field input,
.field select {
  width: 100%;
  min-height: 52px;
  padding: 0.85rem 1rem;
  color: var(--ink);
  background: white;
  border: 2px solid var(--line);
  border-radius: 15px;
}

.field input:focus,
.field select:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 4px rgba(30, 117, 216, 0.13);
}

.parent-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 1.25rem;
}

.parent-nav,
.panel {
  padding: 1.25rem;
}

.parent-nav {
  align-self: start;
  background: var(--ink);
  border-radius: 24px;
  color: white;
}

.parent-nav h2 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.tabs {
  display: grid;
  gap: 0.45rem;
}

.tab {
  padding: 0.75rem 0.85rem;
  color: rgba(255, 255, 255, 0.72);
  text-align: left;
  background: transparent;
  border-radius: 12px;
  font-weight: 750;
}

.tab[aria-selected="true"] {
  color: white;
  background: rgba(255, 255, 255, 0.14);
}

.panel {
  min-width: 0;
}

.add-form {
  display: flex;
  gap: 0.65rem;
  margin: 1.25rem 0 0.65rem;
}

.add-form input {
  flex: 1;
}

.approved-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.travel-panel {
  padding: 1.15rem;
  background: linear-gradient(145deg, #eef8ff, #f8f4ff);
  border: 2px solid #d8e6f2;
  border-radius: 22px;
}

.travel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.travel-heading h3 {
  margin: 0.65rem 0 0;
}

.travel-heading > strong {
  color: var(--blue-deep);
  font-size: 0.86rem;
  white-space: nowrap;
}

.travel-status {
  color: #76530d;
  background: #fff0b8;
}

.travel-import-form {
  display: grid;
  grid-template-columns: minmax(210px, 1.2fr) minmax(170px, 1fr) minmax(170px, 0.8fr) auto;
  gap: 0.75rem;
  align-items: end;
  margin-top: 1rem;
}

.travel-import-form input,
.travel-import-form select {
  width: 100%;
  min-height: 52px;
  padding: 0.75rem;
  color: var(--ink);
  background: white;
  border: 2px solid var(--line);
  border-radius: 15px;
}

.travel-file-field input {
  padding: 0.55rem;
}

.travel-file-field input::file-selector-button {
  min-height: 36px;
  margin-right: 0.65rem;
  padding: 0.45rem 0.7rem;
  color: var(--ink);
  background: #edf3f6;
  border: 0;
  border-radius: 10px;
  font-weight: 800;
}

.travel-empty {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  padding: 1rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed #bcd0df;
  border-radius: 16px;
}

.travel-empty > span,
.offline-row-icon {
  display: grid;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, var(--blue), var(--purple));
  border-radius: 15px;
  font-weight: 900;
}

.travel-empty p {
  margin: 0.2rem 0 0;
}

.search-results {
  margin-top: 1.25rem;
  padding: 1rem;
  background: #eef7ff;
  border: 2px solid #c9e1f5;
  border-radius: 20px;
}

.search-results-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.search-results-heading h3,
.search-results-heading p {
  margin-bottom: 0;
}

.search-results-heading p {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.search-result-list {
  display: grid;
  gap: 0.65rem;
}

.search-result {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.7rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.search-result img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 50%;
}

.search-result-copy {
  min-width: 0;
}

.search-result-copy strong,
.search-result-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-copy span {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.8rem;
}

@media (max-width: 560px) {
  .search-result {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .search-result img {
    width: 54px;
    height: 54px;
  }

  .search-result .btn {
    grid-column: 1 / -1;
  }
}

.category-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1rem 0;
}

.category-chip {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  padding: 0.55rem 0.75rem;
  background: #f2f7fa;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 800;
}

.approved-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.75rem;
  background: #f7fafb;
  border: 1px solid var(--line);
  border-radius: 17px;
}

.approved-row img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 13px;
}

.approved-row-copy {
  min-width: 0;
}

.approved-row-copy strong,
.approved-row-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.approved-row-copy span {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.approved-row-actions {
  display: flex;
  gap: 0.55rem;
  align-items: center;
}

.approved-category-select {
  width: min(220px, 28vw);
  min-height: 44px;
  padding: 0.55rem 2.15rem 0.55rem 0.7rem;
  font-size: 0.84rem;
  font-weight: 800;
}

.offline-thumbnail {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 78% 20%, rgba(255, 214, 92, 0.92) 0 12%, transparent 13%),
    linear-gradient(145deg, #2f69c9, #6957c7);
}

.offline-movie-icon {
  display: grid;
  width: 74px;
  height: 74px;
  padding-left: 5px;
  place-items: center;
  color: var(--blue-deep);
  background: white;
  border: 5px solid rgba(255, 255, 255, 0.44);
  border-radius: 50%;
  box-shadow: 0 12px 28px rgba(10, 27, 43, 0.24);
  font-size: 1.5rem;
}

.offline-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.42rem 0.62rem;
  color: #17324d;
  background: #fff0b8;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
}

.empty-state {
  padding: clamp(2rem, 8vw, 5rem) 1rem;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.66);
  border: 2px dashed var(--line);
  border-radius: 24px;
}

.empty-state .empty-icon {
  display: block;
  margin-bottom: 0.8rem;
  font-size: 2.8rem;
}

.empty-state h2,
.empty-state h3 {
  color: var(--ink);
}

.dialog {
  position: fixed;
  z-index: 100;
  inset: 0;
  background: rgba(10, 27, 43, 0.58);
  backdrop-filter: blur(8px);
}

.dialog-card {
  width: min(470px, 100%);
  max-height: calc(100dvh - 2rem);
  padding: 1.35rem;
  overflow: auto;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.player-page {
  min-height: 100dvh;
  background: #0c1823;
  color: white;
}

.player-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: calc(0.8rem + env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) 0.8rem max(1rem, env(safe-area-inset-left));
}

.player-bar .btn-secondary {
  background: rgba(255, 255, 255, 0.13);
  color: white;
}

.player-title {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-stage {
  display: grid;
  min-height: calc(100dvh - 80px - env(safe-area-inset-top));
  padding: 0 max(0px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(0px, env(safe-area-inset-left));
  place-items: center;
}

.player-frame-wrap {
  width: min(100%, calc((100dvh - 110px) * 16 / 9));
  aspect-ratio: 16 / 9;
  background: black;
}

.player-frame-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.offline-player-video {
  display: block;
  width: min(100%, calc((100dvh - 110px) * 16 / 9));
  max-height: calc(100dvh - 110px);
  background: black;
}

.offline-player-loading {
  padding: 2rem;
  color: white;
  text-align: center;
}

.loader {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.toast-region {
  position: fixed;
  z-index: 200;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  display: grid;
  gap: 0.5rem;
  width: min(380px, calc(100% - 2rem));
  pointer-events: none;
}

.toast {
  padding: 0.9rem 1rem;
  color: white;
  background: var(--ink);
  border-radius: 14px;
  box-shadow: var(--shadow);
  line-height: 1.4;
  animation: toast-in 180ms ease-out;
}

.toast.error {
  background: var(--danger);
}

.status-pill {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  padding: 0.35rem 0.65rem;
  color: #2b6949;
  background: #e6f7ed;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.status-pill::before {
  width: 0.5rem;
  height: 0.5rem;
  background: #36a269;
  border-radius: 50%;
  content: "";
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}

.contact-card {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  min-height: 100px;
  padding: 1rem;
  color: var(--ink);
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  border-bottom: 7px solid var(--sun);
  border-radius: 22px;
  box-shadow: 0 8px 20px rgba(23, 50, 77, 0.07);
  cursor: pointer;
}

.contact-card:nth-child(2) {
  border-bottom-color: var(--coral);
}

.contact-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: white;
  background: var(--blue);
  border-radius: 18px;
  font-size: 1.45rem;
}

.contact-card:nth-child(2) .contact-icon {
  background: var(--purple);
}

.contact-copy {
  min-width: 0;
}

.contact-copy strong,
.contact-copy span {
  display: block;
}

.contact-copy strong {
  margin-bottom: 0.25rem;
}

.contact-copy span {
  color: var(--muted);
  font-size: clamp(1rem, 3vw, 1.25rem);
  font-weight: 850;
  letter-spacing: 0.035em;
}

.practice-number {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  margin: 1rem 0 1.5rem;
}

.practice-digit {
  display: grid;
  width: clamp(34px, 8vw, 48px);
  height: clamp(46px, 10vw, 60px);
  place-items: center;
  color: white;
  background: var(--blue);
  border-bottom: 5px solid var(--blue-deep);
  border-radius: 13px;
  font-size: clamp(1.2rem, 4vw, 1.75rem);
  font-weight: 900;
}

.practice-digit:nth-child(3n + 1) { background: var(--coral); border-bottom-color: #be2834; }
.practice-digit:nth-child(3n + 2) { background: var(--purple); border-bottom-color: #403192; }

.toy-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.7rem;
  color: #704c00;
  background: #fff1b8;
  border: 2px solid #f4cf45;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(-1deg);
}

.mock-avatar {
  display: grid;
  width: 112px;
  height: 112px;
  margin-bottom: 1rem;
  place-items: center;
  background: linear-gradient(145deg, #e8f6ff, #bfe3ff);
  border: 6px solid var(--aqua);
  border-radius: 50%;
  font-size: 3.3rem;
}

.channel-card:nth-child(2) .mock-avatar { background: linear-gradient(145deg, #fff3bd, #ffd660); }
.channel-card:nth-child(3) .mock-avatar { background: linear-gradient(145deg, #eeeaff, #beb3ff); }
.channel-card:nth-child(4) .mock-avatar { background: linear-gradient(145deg, #e7f8df, #aee397); }

.mock-thumbnail {
  display: grid;
  height: 100%;
  place-items: center;
  background:
    radial-gradient(circle at 72% 22%, var(--sun) 0 13%, transparent 13.5%),
    linear-gradient(145deg, #2672dc, var(--purple));
  color: white;
  font-size: clamp(3rem, 9vw, 5rem);
}

.video-card:nth-child(2) .mock-thumbnail {
  background: linear-gradient(145deg, #f8cf45, #ef704a);
}

.video-card:nth-child(3) .mock-thumbnail {
  background: linear-gradient(145deg, #64bd69, #238a80);
}

.footer-note {
  margin-top: 2.5rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: center;
}

.footer-note a {
  color: inherit;
}

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

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
}

@media (max-width: 760px) {
  .hero,
  .parent-layout {
    grid-template-columns: 1fr;
  }

  .hero-card {
    min-height: 180px;
  }

  .parent-nav {
    position: sticky;
    top: 77px;
    z-index: 10;
    padding: 0.6rem;
    border-radius: 18px;
  }

  .parent-nav h2 {
    display: none;
  }

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

  .tab {
    text-align: center;
  }

  .add-form {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 900px) {
  .travel-import-form {
    grid-template-columns: 1fr 1fr;
  }

  .travel-file-field,
  .travel-import-form .btn {
    grid-column: 1 / -1;
  }

  .home-hero {
    grid-template-columns: 1fr;
    min-height: 650px;
  }

  .home-hero .hero-copy {
    padding: 2.2rem 2rem 0;
  }

  .home-crew-stage {
    min-height: 350px;
  }

  .home-crew-stage img {
    right: 0;
    bottom: -2%;
    width: min(760px, 108%);
  }
}

@media (max-width: 500px) {
  .travel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .travel-import-form {
    grid-template-columns: 1fr;
  }

  .travel-file-field,
  .travel-import-form .btn {
    grid-column: auto;
  }

  .brand-copy span {
    display: none;
  }

  .topbar .icon-btn .button-label {
    display: none;
  }

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

  .channel-card {
    min-height: 180px;
    padding: 0.8rem;
  }

  .channel-avatar {
    width: 88px;
    height: 88px;
  }

  .approved-row {
    grid-template-columns: 50px minmax(0, 1fr) auto;
  }

  .approved-row img {
    width: 50px;
    height: 50px;
  }

  .approved-row-actions {
    grid-column: 1 / -1;
  }

  .approved-category-select {
    width: 100%;
  }
}

@media (max-width: 650px) {
  .home-hero {
    min-height: 585px;
    border-width: 3px;
    border-radius: 28px;
  }

  .home-hero .hero-copy {
    padding: 1.6rem 1.35rem 0;
  }

  .home-hero h1 {
    font-size: clamp(2.6rem, 13vw, 4.1rem);
  }

  .home-crew-stage {
    min-height: 290px;
  }

  .home-crew-stage img {
    right: -10%;
    width: 121%;
  }

  .adventure-category-grid {
    grid-template-columns: 1fr;
  }

  .spanish-adventure-card {
    grid-column: auto;
    min-height: 190px;
  }

  .category-speech {
    right: 1%;
    transform: scale(0.78);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
