:root {
  --ink: #17202a;
  --muted: #62727f;
  --line: #d9e2e7;
  --paper: #fbfcf8;
  --white: #ffffff;
  --teal: #0f7b7e;
  --teal-dark: #075b61;
  --coral: #ef6a52;
  --sun: #f2bd3d;
  --leaf: #8ebf63;
  --sky: #e7f4f6;
  --shadow: 0 18px 44px rgba(23, 32, 42, 0.12);
  --deep-shadow: 0 22px 0 rgba(10, 75, 80, 0.16), 0 32px 54px rgba(23, 32, 42, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.7;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: block;
  padding: 0;
  background: rgba(251, 252, 248, 0.94);
  border-bottom: 1px solid rgba(217, 226, 231, 0.7);
  backdrop-filter: blur(16px);
}

.utility-bar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 8px clamp(18px, 4vw, 54px);
  background: var(--teal-dark);
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.utility-bar div {
  display: flex;
  gap: 16px;
}

.utility-bar a {
  color: var(--white);
  font-weight: 700;
}

.primary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 54px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--teal);
  color: var(--white);
  font-weight: 800;
  direction: ltr;
}

.brand strong,
.brand small {
  display: block;
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #33424e;
  font-size: 14px;
}

.main-nav a,
.nav-item > a {
  padding: 8px 0;
}

.main-nav a.active,
.nav-item > a.active {
  color: var(--teal-dark);
  box-shadow: inset 0 -3px 0 var(--sun);
}

.nav-item {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  left: 0;
  top: 100%;
  display: grid;
  gap: 6px;
  min-width: 210px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.dropdown-panel a {
  padding: 8px 10px;
  border-radius: 8px;
}

.dropdown-panel a:hover {
  background: var(--sky);
}

.nav-item:hover .dropdown-panel,
.nav-item:focus-within .dropdown-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.login-link {
  color: var(--teal-dark);
  font-weight: 800;
}

.header-action,
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
}

.header-action,
.primary-button {
  background: var(--coral);
  color: var(--white);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--ink);
}

.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: clamp(48px, 9vw, 110px) clamp(18px, 6vw, 82px);
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(251, 252, 248, 0.95) 0%, rgba(251, 252, 248, 0.82) 38%, rgba(251, 252, 248, 0.16) 72%),
    linear-gradient(0deg, rgba(23, 32, 42, 0.34), rgba(23, 32, 42, 0.02) 45%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
}

.hero-3d-stage {
  position: absolute;
  right: clamp(22px, 8vw, 110px);
  bottom: clamp(54px, 8vw, 110px);
  z-index: 1;
  width: min(340px, 34vw);
  height: 320px;
  perspective: 900px;
  pointer-events: none;
}

.storybook-3d {
  position: absolute;
  right: 54px;
  bottom: 36px;
  width: 180px;
  height: 230px;
  transform-style: preserve-3d;
  transform: rotateY(-28deg) rotateX(12deg);
  animation: book-float 4.8s ease-in-out infinite;
}

.book-cover,
.book-pages {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  box-shadow: var(--deep-shadow);
}

.book-cover {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #ef6a52, #f2bd3d 58%, #ffffff 59%, #ffffff 66%, #0f7b7e 67%);
  color: var(--white);
  font-size: 34px;
  font-weight: 900;
  transform: translateZ(18px);
}

.book-pages {
  background: repeating-linear-gradient(90deg, #ffffff 0 7px, #e8edf0 8px 10px);
  transform: translate(18px, 8px) translateZ(-10px);
}

.floating-card {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 76px;
  min-height: 54px;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(23, 32, 42, 0.16);
  transform-style: preserve-3d;
}

.card-vocab {
  top: 20px;
  right: 12px;
  background: #fff4e2;
  animation: card-drift 5s ease-in-out infinite;
}

.card-game {
  top: 72px;
  left: 22px;
  background: #d7f1ea;
  animation: card-drift 4.4s ease-in-out 0.4s infinite;
}

.card-audio {
  right: 0;
  bottom: 14px;
  background: #edf1fa;
  animation: card-drift 5.4s ease-in-out 0.8s infinite;
}

.eyebrow,
.card-label {
  margin: 0 0 10px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.hero h1 {
  margin: 0;
  font-size: clamp(34px, 5.5vw, 74px);
  line-height: 1.12;
  max-width: 740px;
}

.hero p {
  max-width: 620px;
  color: #33424e;
  font-size: clamp(16px, 1.8vw, 20px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(520px, 100%);
  margin: 36px 0 0;
}

.hero-stats div {
  padding: 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 8px;
}

.hero-stats dt {
  font-weight: 900;
  font-size: 24px;
}

.hero-stats dd {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.band {
  padding: clamp(54px, 8vw, 88px) clamp(18px, 5vw, 72px);
}

.intro-band,
.teacher-band,
.feature-band,
.faq-band {
  background: var(--white);
}

.lessons-band {
  background: #eef7ef;
}

.titles-band {
  background: #f7fbfb;
}

.dashboard-band {
  background: #eef7ef;
}

.method-band {
  background: #fff9e8;
}

.reader-band {
  background: #e8f4f3;
}

.compatibility-band {
  background: #f4fbfc;
}

.challenge-band {
  background: #fff3ed;
}

.ai-band {
  background: #edf1fa;
}

.devices-band {
  background: #eaf5ef;
}

.experts-band {
  background: #ffffff;
}

.resources-band {
  background: #f8f6ec;
}

.practice-band {
  background: #fff4e2;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto 28px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3.2vw, 44px);
  line-height: 1.2;
}

.learning-flow,
.book-grid,
.teacher-layout,
.practice-layout,
.lesson-shell,
.feature-grid,
.reader-layout,
.ai-layout,
.resource-grid,
.faq-list,
.method-layout,
.compat-grid,
.mission-board,
.expert-grid,
.catalogue-shell,
.access-grid,
.about-layout,
.signin-layout {
  max-width: 1180px;
  margin: 0 auto;
}

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

.learning-flow article,
.book-card,
.dashboard-panel,
.teacher-tools article,
.flash-card,
.quiz-panel,
.lesson-detail,
.lesson-list,
.feature-grid article,
.reader-panel,
.game-panel,
.ai-card,
.resource-grid article,
.faq-list details,
.method-card,
.compat-tile,
.mission-board article,
.expert-grid article,
.access-card,
.about-card,
.catalogue-filter,
.signin-panel,
.student-portal,
.dashboard-preview,
.trial-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(23, 32, 42, 0.06);
}

.learning-flow article,
.feature-grid article,
.ai-card,
.resource-grid article {
  padding: 20px;
}

.method-layout,
.compat-grid,
.access-grid,
.about-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.method-layout,
.compat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.method-card,
.compat-tile,
.mission-board article,
.expert-grid article,
.access-card,
.about-card {
  padding: 22px;
}

.raised-3d,
.feature-grid article,
.book-card,
.resource-grid article,
.ai-card,
.compat-tile,
.mission-board article {
  transform: translateY(0);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.raised-3d:hover,
.feature-grid article:hover,
.book-card:hover,
.resource-grid article:hover,
.ai-card:hover,
.compat-tile:hover,
.mission-board article:hover {
  transform: translateY(-6px) rotateX(2deg);
  box-shadow: var(--deep-shadow);
}

.method-number {
  display: inline-grid;
  place-items: center;
  min-width: 64px;
  min-height: 50px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--teal);
  color: var(--white);
  font-weight: 900;
  box-shadow: 0 8px 0 rgba(7, 91, 97, 0.22);
}

.learning-flow span {
  color: var(--coral);
  font-weight: 900;
}

.learning-flow h3,
.teacher-tools h3,
.lesson-detail h3,
.flash-card h3,
.quiz-panel h3,
.feature-grid h3,
.reader-page h3,
.game-panel h3,
.ai-card h3,
.resource-grid h3 {
  margin: 8px 0 8px;
  line-height: 1.35;
}

.learning-flow p,
.book-card p,
.teacher-tools p,
.lesson-detail p,
.flash-card p,
.quiz-panel p,
.feature-grid p,
.reader-page p,
.game-panel p,
.ai-card p,
.resource-grid p,
.faq-list p {
  color: var(--muted);
}

.feature-grid,
.ai-layout,
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

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

.shop-grid article {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 250px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 18px 35px rgba(23, 32, 42, 0.08);
}

.shop-grid h3,
.shop-grid p {
  margin: 0;
}

.shop-grid p {
  color: var(--muted);
}

.get-started-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
  min-height: calc(100vh - 110px);
  padding: clamp(40px, 8vw, 96px) clamp(18px, 5vw, 72px);
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 207, 85, 0.34), transparent 28%),
    linear-gradient(135deg, #eef9f9 0%, #fbfcf8 52%, #ffe9df 100%);
}

.get-started-copy {
  max-width: 680px;
}

.get-started-copy h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 1.02;
}

.get-started-copy p {
  max-width: 620px;
  color: var(--muted);
}

.started-device-stage {
  position: relative;
  min-height: 470px;
  perspective: 1000px;
}

.started-device-stage img {
  position: absolute;
  inset: 18px 0 auto auto;
  width: min(92%, 640px);
  height: 390px;
  object-fit: cover;
  border: 10px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  box-shadow: 0 34px 70px rgba(33, 50, 63, 0.2);
  transform: rotateY(-10deg) rotateX(5deg);
}

.floating-card {
  position: absolute;
  display: grid;
  gap: 4px;
  width: min(230px, 54%);
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 40px rgba(33, 50, 63, 0.14);
}

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

.price-card {
  left: 0;
  top: 74px;
  transform: rotate(-3deg);
}

.app-card {
  right: 18px;
  bottom: 28px;
  transform: rotate(4deg);
}

.started-section {
  scroll-margin-top: 120px;
}

.started-split {
  display: grid;
  grid-template-columns: minmax(300px, 520px) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.started-form,
.started-info-card,
.download-card,
.started-steps article,
.tutorial-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 18px 35px rgba(23, 32, 42, 0.08);
}

.started-form {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.started-form textarea {
  min-height: 110px;
  resize: vertical;
}

.started-form input,
.started-form select,
.started-form textarea {
  width: 100%;
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  font: inherit;
}

.started-info-card {
  padding: clamp(22px, 4vw, 38px);
  background:
    linear-gradient(145deg, rgba(255, 207, 85, 0.14), rgba(238, 249, 249, 0.72)),
    var(--white);
}

.started-info-card h3 {
  margin: 12px 0;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.05;
}

.started-info-card ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

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

.download-card,
.started-steps article,
.tutorial-card {
  min-height: 210px;
  padding: 18px;
}

.download-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.download-card > span,
.started-steps span,
.tutorial-card span {
  color: var(--teal-dark);
  font-weight: 900;
}

.download-card h3,
.download-card p,
.started-steps h3,
.started-steps p {
  margin: 0;
}

.download-card p,
.started-steps p {
  color: var(--muted);
}

.download-card .compact {
  align-self: end;
  justify-self: start;
}

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

.tutorial-card {
  min-height: 150px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tutorial-card strong {
  display: block;
  margin-top: 36px;
  font-size: 20px;
}

.tutorial-card:hover,
.tutorial-card.active,
.download-card button.active {
  transform: translateY(-4px);
  border-color: var(--teal);
  box-shadow: 0 22px 38px rgba(27, 146, 146, 0.15);
}

.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 110px);
  padding: clamp(42px, 8vw, 100px) clamp(18px, 5vw, 72px);
  overflow: hidden;
  background:
    radial-gradient(circle at 75% 20%, rgba(27, 146, 146, 0.16), transparent 28%),
    linear-gradient(135deg, #fbfcf8 0%, #eef9f9 48%, #fff4e2 100%);
}

.about-hero-copy h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(38px, 6vw, 80px);
  line-height: 1.02;
}

.about-hero-copy p {
  max-width: 660px;
  color: var(--muted);
}

.about-orbit {
  position: relative;
  min-height: 470px;
  perspective: 1000px;
}

.about-orbit img {
  position: absolute;
  inset: 42px 4% auto auto;
  width: min(92%, 620px);
  height: 380px;
  object-fit: cover;
  border: 10px solid rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  box-shadow: 0 34px 70px rgba(33, 50, 63, 0.2);
  transform: rotateY(-12deg) rotateX(5deg);
}

.orbit-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 38px rgba(33, 50, 63, 0.14);
  font-weight: 900;
}

.chip-one {
  left: 0;
  top: 72px;
}

.chip-two {
  right: 24px;
  top: 18px;
}

.chip-three {
  left: 36px;
  bottom: 62px;
}

.chip-four {
  right: 8px;
  bottom: 30px;
}

.about-feature-band {
  scroll-margin-top: 120px;
}

.about-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: 22px;
  align-items: stretch;
}

.about-split.reverse {
  grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1.05fr);
}

.about-large-card,
.about-progress-card,
.support-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 18px 35px rgba(23, 32, 42, 0.08);
}

.about-large-card {
  padding: clamp(22px, 4vw, 42px);
}

.about-large-card h3 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.06;
}

.about-large-card p,
.about-progress-card p,
.support-grid p,
.method-note {
  color: var(--muted);
}

.about-stat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.about-stat-grid div,
.about-progress-card {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 140px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, var(--white), #eef9f9);
  box-shadow: 0 16px 32px rgba(23, 32, 42, 0.08);
}

.about-stat-grid strong,
.about-progress-card strong {
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1;
}

.about-stat-grid span,
.about-progress-card span {
  color: var(--teal-dark);
  font-weight: 900;
}

.level-map {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 10px;
}

.level-map span {
  display: grid;
  place-items: center;
  min-height: 72px;
  border-radius: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 14px 28px rgba(23, 32, 42, 0.07);
  font-weight: 900;
}

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

.support-grid article {
  min-height: 190px;
  padding: 18px;
}

.support-grid h3 {
  margin: 0 0 10px;
}

.method-pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.method-pill {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.method-pill.active,
.method-pill:hover {
  border-color: var(--teal);
  background: var(--teal);
  color: var(--white);
}

.method-note {
  min-height: 54px;
  margin: 18px 0 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 16px 30px rgba(23, 32, 42, 0.07);
  font-weight: 800;
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 110px);
  padding: clamp(42px, 8vw, 100px) clamp(18px, 5vw, 72px);
  background:
    radial-gradient(circle at 80% 18%, rgba(255, 207, 85, 0.28), transparent 28%),
    linear-gradient(135deg, #fbfcf8 0%, #eef9f9 52%, #ffe9df 100%);
  overflow: hidden;
}

.page-hero h1 {
  margin: 0;
  max-width: 860px;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 1.02;
}

.page-hero p {
  max-width: 660px;
  color: var(--muted);
}

.resource-cover,
.page-visual {
  position: relative;
  min-height: 430px;
}

.resource-cover img,
.page-visual img {
  position: absolute;
  inset: 34px 0 auto auto;
  width: min(92%, 620px);
  height: 350px;
  object-fit: cover;
  border: 10px solid rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  box-shadow: 0 34px 70px rgba(33, 50, 63, 0.2);
  transform: rotateY(-12deg) rotateX(5deg);
}

.resource-cover span,
.page-visual span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin: 14px 8px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 32px rgba(33, 50, 63, 0.12);
  font-weight: 900;
}

.page-section {
  scroll-margin-top: 120px;
}

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

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

.month-grid button {
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 14px 28px rgba(23, 32, 42, 0.07);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.month-grid button:hover,
[data-resource].active {
  border-color: var(--teal);
  box-shadow: 0 18px 32px rgba(27, 146, 146, 0.15);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--sky);
  color: var(--teal-dark);
  font-weight: 900;
}

.level-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 26px;
}

.level-button {
  min-width: 58px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.level-button.active {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}

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

.catalogue-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.catalogue-filter {
  position: sticky;
  top: 128px;
  display: grid;
  gap: 18px;
  padding: 18px;
}

.catalogue-filter label,
.filter-stack {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.catalogue-filter input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
}

.filter-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 900;
}

.filter-pill {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  text-align: left;
  padding: 0 12px;
  font-weight: 800;
  cursor: pointer;
}

.filter-pill.active {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}

.catalogue-topline {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 14px;
  color: var(--muted);
}

.catalogue-topline strong {
  color: var(--teal-dark);
  font-size: 20px;
}

.book-card {
  position: relative;
  min-height: 244px;
  padding: 20px;
  overflow: hidden;
}

.book-card::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 8px;
  height: 100%;
  background: var(--accent, var(--teal));
}

.book-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  justify-content: flex-start;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--sky);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
}

.book-card h3 {
  margin: 0;
  font-size: 22px;
  text-align: left;
}

.book-card p {
  min-height: 76px;
}

.book-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #42515c;
  font-size: 13px;
}

.lesson-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
}

.lesson-list {
  padding: 10px;
  align-self: start;
}

.lesson-tab {
  width: 100%;
  min-height: 58px;
  margin: 0 0 8px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.lesson-tab strong,
.lesson-tab span {
  display: block;
}

.lesson-tab span {
  color: var(--muted);
}

.lesson-tab.active {
  background: var(--teal);
  color: var(--white);
}

.lesson-tab.active span {
  color: rgba(255, 255, 255, 0.82);
}

.lesson-detail {
  padding: clamp(18px, 3vw, 32px);
}

.lesson-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.lesson-title-row h3 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 38px);
  text-align: left;
}

.lesson-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.lesson-columns h4 {
  margin: 0 0 8px;
}

.lesson-columns ul {
  margin: 0;
  padding: 0 18px 0 0;
}

.lesson-columns li {
  margin-bottom: 7px;
}

.story-box {
  margin-top: 20px;
  padding: 18px;
  border-radius: 8px;
  background: #f8fbfc;
  border: 1px solid var(--line);
  text-align: left;
}

.reader-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 16px;
}

.reader-panel,
.game-panel {
  padding: 22px;
}

.reader-panel {
  position: relative;
  overflow: hidden;
}

.reader-scene {
  position: absolute;
  right: 22px;
  top: 18px;
  width: 180px;
  height: 92px;
  pointer-events: none;
  perspective: 600px;
}

.scene-book {
  position: absolute;
  width: 70px;
  height: 48px;
  border-radius: 8px;
  transform-style: preserve-3d;
  box-shadow: 0 12px 24px rgba(23, 32, 42, 0.14);
}

.scene-book-one {
  right: 18px;
  top: 10px;
  background: linear-gradient(135deg, #ef6a52, #f2bd3d);
  animation: tiny-book 3.6s ease-in-out infinite;
}

.scene-book-two {
  right: 86px;
  top: 30px;
  background: linear-gradient(135deg, #0f7b7e, #8ebf63);
  animation: tiny-book 4.2s ease-in-out 0.5s infinite;
}

.scene-star {
  position: absolute;
  right: 116px;
  top: 0;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: var(--sun);
  color: var(--ink);
  font-weight: 900;
  animation: pop-badge 2.8s ease-in-out infinite;
}

.reader-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.reader-toolbar button,
.match-options button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.reader-toolbar button {
  padding: 0 12px;
}

.reader-toolbar button.active {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}

.reader-page {
  padding: clamp(18px, 3vw, 30px);
  border-radius: 8px;
  background: #fbfcf8;
  border: 1px solid var(--line);
}

.reader-kicker {
  margin: 0;
  color: var(--coral);
  font-weight: 800;
}

.reader-page h3 {
  font-size: clamp(26px, 3vw, 42px);
}

.reader-page p[data-line] {
  padding: 6px 8px;
  border-radius: 8px;
}

.reader-panel.highlight-lines .reader-page p[data-line] {
  background: #fff0b8;
  color: var(--ink);
}

.reader-panel.reading .reader-page p[data-line="2"] {
  background: #d7f1ea;
  color: var(--ink);
}

.reader-panel.dyslexia-mode .reader-page {
  font-family: Verdana, Arial, sans-serif;
  font-size: 19px;
  letter-spacing: 0;
  word-spacing: 0.08em;
  line-height: 1.95;
}

.reader-panel.focus-mode .reader-page {
  background: #ffffff;
  box-shadow: inset 0 0 0 999px rgba(255, 255, 255, 0.02);
}

.reader-panel.focus-mode .reader-page p:not([data-line="2"]) {
  opacity: 0.36;
}

.match-options {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.match-options button {
  padding: 10px 12px;
  text-align: left;
}

.match-options button.correct {
  border-color: var(--leaf);
  background: #edf8e9;
}

.match-options button.wrong {
  border-color: var(--coral);
  background: #fff0ed;
}

.book-reader-body {
  background:
    radial-gradient(circle at 18% 12%, rgba(242, 189, 61, 0.18), transparent 28%),
    radial-gradient(circle at 86% 20%, rgba(25, 167, 206, 0.18), transparent 30%),
    linear-gradient(135deg, #eef3f5, #f8fbfc 46%, #fff7ea);
}

.book-reader-shell {
  width: min(1480px, calc(100% - 28px));
  margin: 0 auto;
  padding: clamp(14px, 2vw, 26px) 0;
}

.book-reader-header,
.book-reader-layout,
.reader-book-card,
.reader-stage,
.reader-activity-card,
.student-book-card {
  border: 1px solid rgba(23, 32, 42, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 40px rgba(23, 32, 42, 0.1);
}

.book-reader-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  margin-bottom: 14px;
}

.book-reader-header h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 50px);
  line-height: 1.05;
}

.reader-progress-badge {
  display: grid;
  place-items: center;
  width: 108px;
  aspect-ratio: 1;
  border-radius: 999px;
  color: var(--teal-dark);
  background: conic-gradient(var(--leaf) 68%, #e7eef0 0);
  box-shadow: inset 0 0 0 12px #fff;
}

.reader-progress-badge strong {
  font-size: 26px;
}

.book-reader-layout {
  display: grid;
  grid-template-columns: minmax(230px, 0.65fr) minmax(0, 1.45fr) minmax(260px, 0.75fr);
  gap: 14px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(248, 251, 252, 0.94)),
    repeating-linear-gradient(45deg, rgba(15, 123, 126, 0.04) 0 8px, transparent 8px 18px);
}

.reader-book-card,
.reader-stage,
.reader-activity-card {
  padding: 16px;
}

.book-cover-3d,
.mini-book-cover {
  --book-color: #19a7ce;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.22) 0 10%, transparent 10%),
    linear-gradient(145deg, var(--book-color), #fff7d6);
  box-shadow: 16px 18px 0 rgba(23, 32, 42, 0.08), 0 22px 34px rgba(23, 32, 42, 0.14);
  transform: perspective(760px) rotateY(-10deg) rotateX(4deg);
}

.book-cover-3d {
  min-height: 360px;
  margin-bottom: 18px;
}

.mini-book-cover {
  min-height: 230px;
}

.book-cover-3d::before,
.mini-book-cover::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.52);
}

.cover-sun,
.cover-wave,
.cover-shape {
  position: absolute;
  display: block;
}

.cover-sun {
  width: 74px;
  aspect-ratio: 1;
  border-radius: 999px;
  top: 28px;
  right: 32px;
  background: #ffe066;
  box-shadow: 0 0 0 14px rgba(255, 224, 102, 0.22);
  animation: floatCover 4s ease-in-out infinite;
}

.cover-wave {
  left: -10%;
  right: -10%;
  bottom: 26px;
  height: 84px;
  border-radius: 50% 50% 0 0;
  background: rgba(255, 255, 255, 0.5);
}

.cover-shape {
  width: 86px;
  height: 56px;
  left: 34px;
  bottom: 90px;
  border-radius: 8px;
  background: rgba(23, 32, 42, 0.18);
  transform: rotate(-8deg);
}

[data-scene="space"] .cover-sun {
  background: #f8f0fc;
  box-shadow: 0 0 0 16px rgba(248, 240, 252, 0.24);
}

[data-scene="space"] .cover-wave {
  height: 120px;
  background: rgba(23, 32, 42, 0.22);
}

[data-scene="market"] .cover-wave {
  background: repeating-linear-gradient(90deg, #fff 0 24px, rgba(255, 230, 109, 0.72) 24px 48px);
}

[data-scene="garden"] .cover-wave {
  background: rgba(183, 228, 199, 0.82);
}

@keyframes floatCover {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(10px);
  }
}

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

.reader-meta-grid span,
.reader-word-list span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  background: #f2f8f9;
  color: var(--teal-dark);
  font-weight: 900;
  font-size: 13px;
}

.reader-word-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.reader-toolbar,
.student-book-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.reader-toolbar {
  justify-content: space-between;
  margin-bottom: 14px;
}

.animated-book {
  min-height: 520px;
  padding: clamp(14px, 3vw, 34px);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(23, 32, 42, 0.08), transparent 7%, transparent 93%, rgba(23, 32, 42, 0.08)),
    #f2eadc;
  perspective: 1200px;
}

.book-spread-page {
  min-height: 455px;
  display: grid;
  align-content: center;
  box-shadow: 0 22px 38px rgba(23, 32, 42, 0.12);
  transform: rotateX(2deg);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.book-spread-page:hover {
  transform: rotateX(0deg) translateY(-2px);
  box-shadow: 0 30px 48px rgba(23, 32, 42, 0.16);
}

.reader-stage.reading .reader-page p[data-line] {
  background: #fff0b8;
}

.reader-activity-card h2,
.reader-activity-card h3 {
  margin-top: 0;
}

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

.similar-book-list a {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
  color: var(--ink);
}

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

.student-book-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 10px;
  margin-bottom: 14px;
}

.student-book-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.student-book-toolbar input,
.student-book-toolbar select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  font: inherit;
}

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

.student-book-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  align-items: stretch;
}

.student-book-card h3 {
  margin: 4px 0 6px;
  font-size: 22px;
}

.student-book-card p {
  color: var(--muted);
}

.compact-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 10px 0;
}

.video-book-body {
  min-height: 100vh;
  overflow-x: hidden;
  background: #11131b;
  color: #ffffff;
}

.video-book-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  min-height: 100vh;
  padding: 14px clamp(10px, 2vw, 24px) 22px;
}

.video-book-topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 72px;
  padding: 8px 0 14px;
}

.video-book-topbar h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1;
}

.reader-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 900;
}

.video-book-status {
  display: grid;
  justify-items: end;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

.video-book-status strong {
  color: #ffe066;
  font-size: 24px;
}

.video-reader-stage {
  --mx: 0;
  --my: 0;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  min-height: 440px;
  max-height: calc(100vh - 190px);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #8ed1ec;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  cursor: pointer;
  isolation: isolate;
}

.video-reader-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8, 10, 20, 0.08), transparent 46%, rgba(8, 10, 20, 0.1)),
    radial-gradient(circle at center, transparent 52%, rgba(0, 0, 0, 0.16));
  z-index: 5;
}

.video-story-title {
  position: absolute;
  top: 5%;
  left: 50%;
  z-index: 9;
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: min(250px, 30%);
  padding: 5px 10px;
  border-radius: 8px;
  color: #24445c;
  background: rgba(224, 247, 178, 0.55);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
  transform: translateX(-50%);
  backdrop-filter: blur(3px);
}

.video-story-title span {
  color: rgba(36, 68, 92, 0.72);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.video-story-title strong {
  font-size: clamp(14px, 1.8vw, 24px);
  line-height: 1;
  letter-spacing: 0;
}

.video-settings-button {
  position: absolute;
  right: 3.5%;
  bottom: 5.3%;
  z-index: 12;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: transparent;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
}

.video-settings-button::before {
  content: "";
  width: 18px;
  aspect-ratio: 1;
  border: 3px solid #153a7a;
  border-radius: 999px;
  box-shadow:
    0 -9px 0 -6px #153a7a,
    0 9px 0 -6px #153a7a,
    9px 0 0 -6px #153a7a,
    -9px 0 0 -6px #153a7a,
    6px 6px 0 -6px #153a7a,
    -6px -6px 0 -6px #153a7a,
    -6px 6px 0 -6px #153a7a,
    6px -6px 0 -6px #153a7a;
}

.beach-scene,
.beach-scene span {
  position: absolute;
  display: block;
}

.beach-scene {
  inset: 0;
  overflow: hidden;
  background: linear-gradient(#bfe7fb 0 50%, #f9d78a 50% 100%);
  transform: scale(1.02) translate(calc(var(--mx) * -14px), calc(var(--my) * -10px));
  transition: filter 0.45s ease, transform 0.8s ease;
}

.story-playing .beach-scene {
  transform: scale(1.055) translate(calc(var(--mx) * -18px), calc(var(--my) * -12px));
}

.story-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  background: #87d8f0;
}

.canvas-mode .beach-scene {
  opacity: 0;
  pointer-events: none;
}

.scene-sky {
  inset: 0 0 50%;
  background: linear-gradient(#b8e0f7, #d9f0fb);
}

.scene-sun {
  width: 8%;
  aspect-ratio: 1;
  top: 8%;
  right: 12%;
  border-radius: 999px;
  background: #ffe066;
  box-shadow: 0 0 0 18px rgba(255, 224, 102, 0.28), 0 0 50px rgba(255, 224, 102, 0.5);
  animation: sunPulse 4s ease-in-out infinite;
}

.scene-cloud {
  width: 18%;
  height: 8%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  filter: blur(0.5px);
  animation: cloudDrift 13s ease-in-out infinite;
  translate: calc(var(--mx) * -18px) calc(var(--my) * -6px);
}

.scene-cloud::before,
.scene-cloud::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: inherit;
}

.scene-cloud::before {
  width: 38%;
  height: 120%;
  left: 15%;
  top: -48%;
}

.scene-cloud::after {
  width: 42%;
  height: 132%;
  right: 18%;
  top: -56%;
}

.cloud-one {
  top: 10%;
  left: 8%;
}

.cloud-two {
  top: 18%;
  right: 16%;
  transform: scale(0.76);
  animation-delay: -3s;
}

.scene-hill {
  left: 12%;
  right: 6%;
  top: 32%;
  height: 22%;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(120deg, #38618c, #254969);
  opacity: 0.86;
}

.scene-sea {
  left: -8%;
  right: -8%;
  height: 13%;
  border-radius: 50%;
  background: rgba(79, 161, 206, 0.66);
  animation: waveMove 4.2s ease-in-out infinite;
}

.sea-one {
  top: 43%;
}

.sea-two {
  top: 48%;
  opacity: 0.54;
  animation-delay: -1.8s;
}

.scene-sand {
  inset: 54% 0 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(255, 255, 255, 0.28), transparent 26%),
    radial-gradient(ellipse at 76% 72%, rgba(255, 255, 255, 0.2), transparent 30%),
    linear-gradient(#f8d994, #e8bd6e);
}

.scene-gull {
  width: 34px;
  height: 14px;
  top: 22%;
  border-top: 4px solid rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  animation: gullFly 7s linear infinite;
  z-index: 3;
}

.scene-gull::after {
  content: "";
  position: absolute;
  left: 16px;
  top: -4px;
  width: 34px;
  height: 14px;
  border-top: 4px solid rgba(255, 255, 255, 0.95);
  border-radius: 50%;
}

.gull-one {
  left: 20%;
}

.gull-two {
  left: 72%;
  top: 35%;
  animation-delay: -4s;
  transform: scale(0.78);
}

.kid {
  width: 13%;
  height: 42%;
  bottom: 10%;
  z-index: 4;
  transition: transform 0.55s ease;
  margin-left: calc(var(--mx) * 10px);
}

.kid::before {
  content: "";
  position: absolute;
  left: 30%;
  top: 0;
  width: 34%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffd0a6;
  box-shadow: inset 8px 0 rgba(150, 82, 44, 0.1);
}

.kid i {
  left: 24%;
  top: 21%;
  width: 48%;
  height: 36%;
  border-radius: 42% 42% 18% 18%;
  background: #1d4e89;
}

.kid b {
  left: 28%;
  top: 56%;
  width: 42%;
  height: 34%;
  border-radius: 0 0 24px 24px;
  background: #ffd0a6;
}

.kid-left {
  left: 18%;
  transform: rotate(-5deg);
}

.kid-right {
  right: 18%;
  transform: scaleX(-1) rotate(-4deg);
}

.kid-right i {
  background: repeating-linear-gradient(90deg, #df3e3e 0 16px, #fff 16px 32px);
}

.trash {
  z-index: 4;
  bottom: 16%;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.7s ease, opacity 0.7s ease;
}

.trash-bottle {
  width: 9%;
  height: 4%;
  left: 42%;
  transform: rotate(-16deg);
}

.trash-cup {
  width: 5%;
  height: 8%;
  left: 60%;
  transform: rotate(12deg);
}

.trash-can {
  width: 7%;
  height: 6%;
  left: 30%;
  transform: rotate(20deg);
}

.clean-bag {
  width: 10%;
  height: 14%;
  right: 34%;
  bottom: 14%;
  border-radius: 30% 30% 44% 44%;
  background: rgba(43, 177, 115, 0.88);
  z-index: 4;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.sparkle {
  width: 20px;
  aspect-ratio: 1;
  background: #fff7a8;
  clip-path: polygon(50% 0, 62% 36%, 100% 50%, 62% 64%, 50% 100%, 38% 64%, 0 50%, 38% 36%);
  z-index: 5;
  opacity: 0;
  animation: sparklePop 1.6s ease-in-out infinite;
}

.sparkle-one {
  left: 38%;
  top: 63%;
}

.sparkle-two {
  right: 26%;
  top: 58%;
  animation-delay: -0.8s;
}

.beach-scene[data-state="sad"] {
  filter: saturate(0.82) brightness(0.93);
}

.beach-scene[data-state="cleaning"] .kid-left {
  transform: translateX(12%) rotate(3deg);
}

.beach-scene[data-state="cleaning"] .kid-right {
  transform: scaleX(-1) translateX(12%) rotate(5deg);
}

.beach-scene[data-state="cleaning"] .clean-bag,
.beach-scene[data-state="happy"] .clean-bag {
  opacity: 1;
  transform: translateY(0);
}

.beach-scene[data-state="cleaning"] .trash {
  transform: translateY(-26px) rotate(0deg);
}

.beach-scene[data-state="happy"] .trash {
  opacity: 0;
  transform: translateY(-80px) scale(0.4);
}

.beach-scene[data-state="happy"] .sparkle {
  opacity: 1;
}

.video-caption-panel {
  position: absolute;
  top: 16%;
  left: 50%;
  z-index: 8;
  width: min(420px, 40%);
  transform: translateX(-50%);
  translate: calc(var(--mx) * 10px) calc(var(--my) * 8px);
  padding: clamp(8px, 1.2vw, 14px);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #11131b;
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(6px);
}

.video-caption-lines {
  display: grid;
  gap: 4px;
  font-size: clamp(14px, 1.65vw, 25px);
  line-height: 1.1;
  font-weight: 800;
}

.video-caption-lines p {
  width: fit-content;
  margin: 0;
  padding: 3px 8px;
  border-radius: 4px;
}

.video-caption-lines p.active {
  background: #ffe95e;
  box-shadow: 0 0 0 4px rgba(255, 233, 94, 0.34);
}

.stage-play-toggle {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
}

.stage-play-toggle span {
  display: inline-grid;
  place-items: center;
  min-width: 64px;
  min-height: 64px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(13, 17, 28, 0.58);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.32);
  opacity: 0.96;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.story-playing .stage-play-toggle span {
  opacity: 0;
  transform: scale(0.8);
}

.video-reader-stage:hover .stage-play-toggle span {
  opacity: 0.96;
  transform: scale(1);
}

.video-book-controls {
  position: absolute;
  left: 50%;
  bottom: 4.2%;
  z-index: 14;
  display: grid;
  grid-template-columns: auto auto minmax(240px, auto) auto;
  gap: 10px;
  align-items: center;
  width: min(48%, 430px);
  margin-top: 0;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}

.video-round-button,
.video-arrow-button,
.video-scene-dots button {
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #153a7a;
  background: rgba(255, 255, 255, 0.84);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.12);
}

.video-round-button {
  width: 40px;
  height: 40px;
  color: transparent;
  position: relative;
}

.video-round-button::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid #153a7a;
  margin-left: 4px;
}

.story-playing .video-round-button::before {
  width: 13px;
  height: 17px;
  border: 0;
  margin-left: 0;
  background: linear-gradient(90deg, #153a7a 0 32%, transparent 32% 68%, #153a7a 68%);
}

.video-arrow-button {
  width: 34px;
  height: 34px;
  color: transparent;
  position: relative;
}

.video-arrow-button::before {
  content: "";
  width: 10px;
  height: 10px;
  border-top: 3px solid #153a7a;
  border-right: 3px solid #153a7a;
  transform: rotate(45deg);
}

#prevPage::before {
  transform: rotate(-135deg);
}

.video-arrow-button:disabled,
.video-scene-dots button:disabled {
  opacity: 0.45;
}

.video-scene-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
}

.video-scene-dots button {
  width: 34px;
  height: 34px;
  color: #153a7a;
  font-size: 14px;
}

.video-scene-dots button.active {
  background: #153a7a;
  color: #ffffff;
}

.video-control-settings {
  position: absolute;
  right: -52px;
  bottom: calc(100% + 8px);
  display: grid;
  grid-template-columns: 90px auto auto;
  gap: 6px;
  align-items: end;
  padding: 7px;
  border-radius: 8px;
  background: rgba(17, 19, 27, 0.72);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.show-video-settings .video-control-settings {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.speed-control {
  display: grid;
  gap: 2px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 10px;
  font-weight: 900;
}

.speed-control select {
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: #ffffff;
  color: #11131b;
  font: inherit;
  padding: 0 8px;
}

.video-control-settings .secondary-button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 11px;
}

.video-progress-track {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -7px;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.video-progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffe95e, #54d178);
  transition: width 0.12s linear;
}

.video-reader-side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.82);
}

.video-reader-side > div:first-child {
  display: flex;
  gap: 8px;
}

.video-reader-side > div:first-child strong,
.video-reader-side > div:first-child span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.video-reader-side .reader-word-list {
  margin: 0;
}

.video-reader-side .reader-word-list span {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

@keyframes sunPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

@keyframes cloudDrift {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 28px 0;
  }
}

@keyframes waveMove {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 32px 4px;
  }
}

@keyframes gullFly {
  0% {
    translate: -30px 0;
  }
  50% {
    translate: 80px -16px;
  }
  100% {
    translate: -30px 0;
  }
}

@keyframes sparklePop {
  0%,
  100% {
    transform: scale(0.7) rotate(0deg);
  }
  50% {
    transform: scale(1.2) rotate(18deg);
  }
}

.book-detail-shell {
  width: min(1280px, calc(100% - 28px));
  margin: 0 auto;
  padding: clamp(14px, 2vw, 28px) 0;
}

.book-detail-topbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.book-detail-hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 20px;
  align-items: center;
  padding: clamp(18px, 3vw, 34px);
  border: 1px solid rgba(23, 32, 42, 0.1);
  border-radius: 8px;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 224, 102, 0.28), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(242, 248, 249, 0.92));
  box-shadow: 0 24px 54px rgba(23, 32, 42, 0.12);
}

.book-detail-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 440px;
  perspective: 1000px;
}

.featured-upload-cover {
  width: min(360px, 90%);
  min-height: 430px;
  animation: uploadedBookFloat 5s ease-in-out infinite;
}

.upload-stamp {
  position: absolute;
  right: 12%;
  bottom: 26px;
  display: grid;
  gap: 2px;
  padding: 12px 16px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--teal-dark);
  box-shadow: 0 16px 28px rgba(23, 32, 42, 0.16);
  transform: rotate(-4deg);
}

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

.book-detail-copy h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.95;
}

.book-detail-subtitle {
  color: var(--teal-dark);
  font-size: 20px;
  font-weight: 900;
}

.book-detail-copy > p:not(.eyebrow):not(.book-detail-subtitle) {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
}

.book-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

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

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

.book-page-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.book-page-preview button {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, #fffef7, #ffffff);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.book-page-preview button:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
}

.book-page-preview span {
  color: var(--muted);
}

@keyframes uploadedBookFloat {
  0%,
  100% {
    transform: perspective(760px) rotateY(-10deg) rotateX(4deg) translateY(0);
  }
  50% {
    transform: perspective(760px) rotateY(-4deg) rotateX(7deg) translateY(-12px);
  }
}

.teacher-layout {
  display: grid;
  grid-template-columns: minmax(290px, 0.9fr) minmax(0, 1.4fr);
  gap: 16px;
}

.dashboard-panel,
.teacher-tools article,
.flash-card,
.quiz-panel {
  padding: 22px;
}

.panel-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.panel-topline h3 {
  margin: 0;
}

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

.progress-row {
  display: grid;
  grid-template-columns: 92px 1fr 44px;
  gap: 10px;
  align-items: center;
  margin: 14px 0;
}

meter {
  width: 100%;
  height: 12px;
}

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

.access-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: space-between;
}

.access-card > span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--sky);
  color: var(--teal-dark);
  font-weight: 900;
}

.teacher-login {
  background: linear-gradient(145deg, #ffffff, #e8f4f3);
}

.student-login {
  background: linear-gradient(145deg, #ffffff, #fff4e2);
}

.admin-login {
  background: linear-gradient(145deg, #ffffff, #edf1fa);
}

.signin-layout {
  display: grid;
  grid-template-columns: minmax(290px, 0.8fr) minmax(0, 1.35fr);
  gap: 16px;
  margin-top: 18px;
}

.signin-panel,
.student-portal,
.dashboard-preview {
  padding: 22px;
}

.signin-panel {
  display: grid;
  gap: 14px;
  align-self: start;
}

.signin-panel h3,
.student-portal h3 {
  margin: 0;
  font-size: 26px;
  line-height: 1.25;
}

.signin-panel p,
.portal-header p,
.portal-lock p,
.teacher-note {
  color: var(--muted);
}

.role-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
}

.role-button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.role-button.active {
  background: var(--teal);
  color: var(--white);
  box-shadow: 0 8px 18px rgba(15, 123, 126, 0.18);
}

.signin-panel label:not(.checkbox-row) {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.signin-panel input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
}

.signin-row {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  font-size: 13px;
}

.signin-row a,
.signin-note {
  color: var(--teal-dark);
  font-weight: 800;
}

.student-portal {
  min-height: 640px;
  background:
    radial-gradient(circle at top right, rgba(242, 189, 61, 0.22), transparent 34%),
    linear-gradient(145deg, #ffffff, #f7fbfb);
}

.dashboard-preview {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(15, 123, 126, 0.2), transparent 34%),
    linear-gradient(145deg, #ffffff, #f7fbfb);
}

.dashboard-preview > span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--sky);
  color: var(--teal-dark);
  font-weight: 900;
}

.dashboard-preview h3 {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  margin-bottom: 8px;
}

.dashboard-preview p {
  color: var(--muted);
}

.preview-stack {
  display: grid;
  gap: 10px;
  margin: 22px 0;
}

.preview-stack div {
  height: 58px;
  border-radius: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 12px 24px rgba(23, 32, 42, 0.08);
}

.preview-stack div:nth-child(1) {
  width: 82%;
}

.preview-stack div:nth-child(2) {
  width: 96%;
}

.preview-stack div:nth-child(3) {
  width: 72%;
}

.student-portal.locked .portal-content {
  display: none;
}

.student-portal:not(.locked) .portal-lock {
  display: none;
}

.portal-lock {
  display: grid;
  place-items: start;
  justify-content: center;
  min-height: 410px;
  align-content: center;
}

.portal-lock span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  background: #fff4e2;
  color: #9a5b00;
  font-weight: 900;
}

.portal-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
  margin-bottom: 18px;
}

.auth-providers {
  display: grid;
  gap: 8px;
}

.auth-providers button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--teal-dark);
  font-weight: 900;
  cursor: pointer;
}

.app-version {
  color: var(--muted);
  text-align: center;
}

.admin-shell {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  min-height: 600px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #f3f7f8;
}

.bookr-admin {
  grid-template-columns: 238px minmax(0, 1fr);
}

.dashboard-page {
  min-height: 100vh;
  background: #eef3f5;
}

.student-app-page {
  background:
    radial-gradient(circle at top left, rgba(25, 167, 206, 0.14), transparent 28rem),
    linear-gradient(135deg, #f6fbfc 0%, #eef5f2 52%, #fff8eb 100%);
}

.student-app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
}

.student-app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 18px;
  padding: 18px 14px;
  background: #07172d;
  color: var(--white);
  overflow-y: auto;
}

.student-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--white);
}

.student-logo span,
.student-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffd94f;
  color: #07172d;
  font-weight: 950;
}

.student-logo strong {
  font-size: 17px;
}

.student-app-sidebar nav {
  display: grid;
  align-content: start;
  gap: 8px;
}

.student-app-sidebar nav a,
.student-exit {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.74);
  font-weight: 900;
}

.student-app-sidebar nav a::before {
  content: attr(data-nav-icon);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  font-size: 11px;
}

.student-app-sidebar nav a.active,
.student-app-sidebar nav a:hover,
.student-exit:hover {
  background: #1b9292;
  color: var(--white);
}

.student-sidebar-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.student-sidebar-card span,
.student-sidebar-card small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.student-sidebar-card strong {
  font-size: 28px;
}

.student-exit {
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.student-app-main {
  min-width: 0;
  padding: clamp(18px, 3vw, 34px);
}

.student-topbar,
.student-panel-heading,
.student-hero-actions,
.student-profile-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.student-topbar {
  margin-bottom: 14px;
}

.student-topbar h1,
.student-panel-heading h2,
.student-hero-panel h2 {
  margin: 0;
}

.student-topbar h1 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
}

.student-topbar p,
.student-hero-panel p,
.student-panel p,
.student-profile-chip small {
  color: var(--muted);
}

.student-profile-chip {
  justify-content: start;
  min-width: 230px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 34px rgba(23, 32, 42, 0.08);
}

.student-profile-chip strong,
.student-profile-chip small {
  display: block;
}

.student-hero-panel {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(360px, 1.18fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: stretch;
  min-height: 340px;
  margin-bottom: 16px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(237, 250, 250, 0.92)),
    #fff;
  box-shadow: 0 22px 50px rgba(23, 32, 42, 0.1);
}

.student-continue-copy {
  display: grid;
  align-content: center;
  gap: 14px;
}

.student-continue-copy h2 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
}

.student-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff1b8;
  color: #7a5100;
  font-size: 12px;
  font-weight: 950;
}

.student-reader-preview {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  border-radius: 8px;
  border: 8px solid #07172d;
  background: #80ddf1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 18px 34px rgba(7, 23, 45, 0.18);
}

.preview-sky,
.preview-sea,
.preview-sand,
.preview-sun,
.preview-child,
.preview-caption,
.preview-control-row {
  position: absolute;
}

.preview-sky {
  inset: 0 0 42%;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.82) 0 32px, transparent 34px),
    radial-gradient(circle at 72% 22%, rgba(255, 255, 255, 0.78) 0 42px, transparent 44px),
    linear-gradient(#6ed9ee, #b7eef8);
}

.preview-sun {
  top: 34px;
  right: 54px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #ffd94f;
  box-shadow: 0 0 34px rgba(255, 217, 79, 0.62);
}

.preview-sea {
  left: 0;
  right: 0;
  bottom: 28%;
  height: 32%;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.32) 0 2px, transparent 2px 16px),
    linear-gradient(180deg, #267db1, #5bbad1);
  animation: previewSea 5s ease-in-out infinite;
}

.preview-sand {
  left: 0;
  right: 0;
  bottom: 0;
  height: 34%;
  background:
    radial-gradient(circle at 22% 55%, #f87171 0 10px, transparent 11px),
    radial-gradient(circle at 68% 48%, #fbbf24 0 8px, transparent 9px),
    radial-gradient(circle at 80% 70%, #9ca3af 0 12px, transparent 13px),
    #f8d98c;
}

.preview-child {
  bottom: 70px;
  width: 54px;
  height: 112px;
  border-radius: 30px 30px 16px 16px;
  background: #1f5f99;
  animation: previewBob 3.4s ease-in-out infinite;
}

.preview-child::before {
  content: "";
  position: absolute;
  left: 13px;
  top: -32px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ffd1a3;
}

.preview-child.one {
  left: 24%;
}

.preview-child.two {
  right: 22%;
  background: #ef4444;
  animation-delay: -1.2s;
}

.preview-caption {
  left: 50%;
  top: 24%;
  transform: translateX(-50%);
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  color: #07172d;
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 950;
  box-shadow: 0 12px 24px rgba(23, 32, 42, 0.12);
}

.preview-control-row {
  left: 50%;
  bottom: 16px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.preview-control-row span {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
}

.student-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.student-stat-strip div,
.student-panel {
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 30px rgba(23, 32, 42, 0.07);
}

.student-stat-strip div {
  padding: 16px;
}

.student-stat-strip strong,
.student-stat-strip span {
  display: block;
}

.student-stat-strip strong {
  color: #07172d;
  font-size: 30px;
}

.student-stat-strip span,
.student-panel-heading > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.student-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 14px;
  margin-bottom: 14px;
}

.student-panel {
  padding: 16px;
  min-width: 0;
}

.student-panel-heading {
  margin-bottom: 14px;
}

.student-panel-heading h2 {
  font-size: 22px;
}

.reading-path-panel,
.student-library-panel {
  grid-column: span 2;
}

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

.path-step,
.student-task-list button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.path-step {
  display: grid;
  gap: 7px;
  min-height: 116px;
  padding: 13px;
}

.path-step span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e6eef2;
  color: #07172d;
  font-weight: 950;
}

.path-step strong,
.path-step small {
  display: block;
}

.path-step small {
  color: var(--muted);
  font-weight: 800;
}

.path-step.done,
.path-step.current,
.path-step:hover,
.student-task-list button.active,
.student-task-list button:hover {
  border-color: #1b9292;
  box-shadow: 0 14px 26px rgba(27, 146, 146, 0.14);
}

.path-step.current span,
.path-step.done span {
  background: #1b9292;
  color: var(--white);
}

.student-progress-rail {
  height: 12px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6eef2;
}

.student-progress-rail span {
  display: block;
  width: var(--w);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1b9292, #ffd94f);
}

.teacher-panel,
.tasks-panel,
.practice-panel {
  min-height: 100%;
}

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

.student-task-list button {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 12px;
}

.student-task-list span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

.student-library-panel {
  margin-bottom: 14px;
}

.student-library-panel .student-panel-heading {
  align-items: end;
}

.student-progress-label {
  display: block;
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 900;
}

.student-book-card .mini-book-cover strong {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  color: var(--white);
  font-size: 18px;
  line-height: 1;
  text-shadow: 0 2px 12px rgba(7, 23, 45, 0.42);
}

.student-profile-panel {
  margin-bottom: 20px;
}

@keyframes previewSea {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

@keyframes previewBob {
  0%, 100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-7px) rotate(2deg);
  }
}

@media (max-width: 980px) {
  .student-app-shell,
  .student-hero-panel,
  .student-dashboard-grid,
  .reading-path-panel,
  .student-library-panel {
    display: block;
  }

  .student-app-sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    height: auto;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto;
    align-items: center;
    overflow-x: auto;
  }

  .student-app-sidebar nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
  }

  .student-app-sidebar nav a,
  .student-exit {
    flex: 0 0 auto;
  }

  .student-sidebar-card {
    display: none;
  }

  .student-topbar,
  .student-panel-heading,
  .student-library-panel .student-panel-heading {
    align-items: start;
    flex-direction: column;
  }

  .student-profile-chip {
    width: 100%;
  }

  .student-hero-panel,
  .student-panel,
  .student-stat-strip {
    margin-bottom: 12px;
  }

  .student-reader-preview {
    min-height: 280px;
    margin-top: 16px;
  }

  .student-stat-strip,
  .student-path-steps,
  .student-activity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .student-app-main {
    padding: 12px;
  }

  .student-logo strong {
    display: none;
  }

  .student-app-sidebar {
    grid-template-columns: auto 1fr;
  }

  .student-exit {
    display: none;
  }

  .student-app-sidebar nav a {
    min-height: 38px;
    padding: 0 10px;
    font-size: 13px;
  }

  .student-app-sidebar nav a::before {
    display: none;
  }

  .student-hero-actions,
  .student-book-toolbar,
  .student-stat-strip,
  .student-path-steps,
  .student-activity-grid {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .student-reader-preview {
    min-height: 230px;
    border-width: 5px;
  }

  .preview-caption {
    width: min(82%, 360px);
    text-align: center;
  }

  .preview-child {
    bottom: 58px;
    transform: scale(0.86);
  }

  .student-continue-copy h2 {
    font-size: 34px;
  }
}

.standalone-dashboard {
  min-height: 100vh;
  border: 0;
  border-radius: 0;
}

.standalone-dashboard .portal-main {
  padding: clamp(18px, 3vw, 34px);
}

.standalone-dashboard .portal-header h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.12;
}

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

.portal-sidebar {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 18px 12px;
  background: #17202a;
  color: var(--white);
}

.portal-sidebar strong {
  margin: 0 0 12px;
  font-size: 15px;
}

.portal-sidebar a {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.portal-sidebar a.active,
.portal-sidebar a:hover {
  background: var(--teal);
  color: var(--white);
}

.admin-sidebar a {
  min-height: 34px;
  font-size: 13px;
}

.portal-main {
  padding: 18px;
  min-width: 0;
}

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

.stats-filters label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.stats-filters select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 0 10px;
  font: inherit;
}

.student-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.student-summary div {
  padding: 14px;
  border-radius: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 10px 20px rgba(23, 32, 42, 0.06);
}

.student-summary strong,
.student-summary span {
  display: block;
}

.student-summary strong {
  color: var(--teal-dark);
  font-size: 26px;
}

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

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

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

.analytics-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 8px 18px rgba(23, 32, 42, 0.05);
  min-width: 0;
}

.dashboard-toast {
  min-height: 28px;
  margin: 0 0 12px;
  color: var(--teal-dark);
  font-weight: 800;
}

.admin-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.admin-filter-grid label,
.goal-input {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-filter-grid input,
.admin-filter-grid select,
.admin-action-form input,
.admin-action-form select,
.goal-input input,
.support-ai-panel textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

.admin-action-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbfc;
}

.admin-action-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.upload-form {
  grid-template-columns: 170px minmax(180px, 1fr) 120px minmax(180px, 1fr) 150px auto;
}

.danger-link {
  color: #a03a3a;
  margin-left: 8px;
}

.goal-meter {
  display: grid;
  gap: 6px;
  min-height: 130px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, #eef9f9, #fff4e2);
  text-align: center;
}

.goal-meter strong {
  font-size: 34px;
}

.admin-mini-grid {
  display: grid;
  gap: 10px;
}

.admin-mini-grid div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
}

.admin-mini-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--teal-dark);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 0;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.admin-tabs button,
.admin-folder-grid button,
.admin-challenge-grid button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-tabs button {
  min-height: 38px;
  padding: 8px 12px;
}

.admin-tabs button.active,
.admin-tabs button:hover,
.admin-folder-grid button.active,
.admin-folder-grid button:hover,
.admin-challenge-grid button.active,
.admin-challenge-grid button:hover {
  border-color: var(--teal);
  box-shadow: 0 16px 28px rgba(27, 146, 146, 0.14);
  transform: translateY(-2px);
}

.admin-challenge-grid,
.admin-folder-grid {
  display: grid;
  gap: 12px;
}

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

.admin-challenge-grid button,
.admin-folder-grid button {
  min-height: 118px;
  padding: 14px;
  text-align: left;
}

.admin-challenge-grid strong,
.admin-challenge-grid span {
  display: block;
}

.admin-challenge-grid span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

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

.support-ai-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr) auto;
  gap: 12px;
  align-items: end;
}

.support-ai-panel h3,
.support-ai-panel p {
  margin: 0;
}

.support-ai-panel p {
  color: var(--muted);
}

.support-ai-panel textarea {
  min-height: 96px;
  resize: vertical;
}

.message-reply {
  width: 100%;
  min-height: 88px;
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  resize: vertical;
  font: inherit;
  color: var(--ink);
  background: var(--white);
}

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

.activity-tile {
  min-height: 98px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, var(--white), #eef9f9);
  box-shadow: 0 12px 24px rgba(33, 50, 63, 0.08);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 6px;
  text-align: left;
  font: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.activity-tile strong,
.activity-tile span {
  display: block;
}

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

.activity-tile:hover,
.activity-tile.active {
  transform: translateY(-3px);
  border-color: var(--teal);
  box-shadow: 0 18px 30px rgba(27, 146, 146, 0.16);
}

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

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.setting-row span,
.setting-row strong,
.setting-row small {
  display: block;
}

.setting-row small {
  margin-top: 4px;
  color: var(--muted);
}

.setting-row input {
  width: 42px;
  height: 22px;
  accent-color: var(--teal);
}

.selected-row {
  background: #eef9f9;
}

.wide-card {
  grid-column: 1 / -1;
}

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

.card-heading h4 {
  margin: 0;
}

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

.bar-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  height: 220px;
  padding-top: 16px;
}

.bar-chart span {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
  height: var(--h);
  min-height: 22px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, var(--coral), var(--sun));
  box-shadow: 0 10px 20px rgba(239, 106, 82, 0.16);
}

.bar-chart b {
  position: absolute;
  bottom: -28px;
  color: var(--muted);
  font-size: 12px;
}

.skill-bars {
  display: grid;
  gap: 14px;
}

.skill-bars label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.skill-bars span {
  position: relative;
  display: block;
  height: 10px;
  border-radius: 999px;
  background: #e6edf0;
  overflow: hidden;
}

.skill-bars span::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  background: var(--teal);
  border-radius: inherit;
}

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

.table-card table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

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

.table-card th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.status-progress,
.status-done,
.status-blocked,
.status-open {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.status-progress {
  background: #fff4e2;
  color: #9a5b00;
}

.status-done {
  background: #edf8e9;
  color: #3d7d21;
}

.status-open {
  background: #edf1fa;
  color: #4066a8;
}

.status-blocked {
  background: #feecec;
  color: #a03a3a;
}

.student-info-grid section {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.student-info-grid h4 {
  margin: 0 0 10px;
}

.student-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.student-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(217, 226, 231, 0.75);
}

.student-list li:last-child {
  border-bottom: 0;
}

.student-list strong {
  color: var(--teal-dark);
  white-space: nowrap;
}

.word-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.word-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--sky);
  color: var(--teal-dark);
  font-weight: 900;
}

.compat-tile span {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--teal-dark);
  color: var(--white);
  font-weight: 900;
  box-shadow: 0 8px 0 rgba(15, 123, 126, 0.18);
}

.mission-board,
.expert-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.badge-3d {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--sun), #fff2ac);
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 9px 0 rgba(190, 132, 0, 0.24), 0 18px 28px rgba(23, 32, 42, 0.12);
}

.ai-card {
  background: #ffffff;
}

.resource-grid article {
  min-height: 190px;
}

.device-stage {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: clamp(12px, 3vw, 38px);
  max-width: 980px;
  min-height: 350px;
  margin: 0 auto;
  perspective: 1000px;
}

.device {
  position: relative;
  display: grid;
  place-items: center;
  border: 10px solid #26333d;
  border-radius: 18px;
  background: #f8fbfc;
  box-shadow: var(--deep-shadow);
  transform-style: preserve-3d;
  animation: device-breathe 4.8s ease-in-out infinite;
}

.laptop {
  width: min(440px, 48vw);
  height: 250px;
  transform: rotateY(-12deg) rotateX(6deg);
}

.tablet {
  width: 190px;
  height: 260px;
  transform: rotateY(10deg) translateY(22px);
  animation-delay: 0.4s;
}

.phone {
  width: 112px;
  height: 220px;
  transform: rotateY(-16deg) translateY(38px);
  animation-delay: 0.8s;
}

.device-screen {
  display: grid;
  place-items: center;
  width: 86%;
  height: 76%;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 123, 126, 0.18), rgba(242, 189, 61, 0.28)),
    #ffffff;
  color: var(--teal-dark);
  font-weight: 900;
  text-align: center;
  padding: 12px;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 20px auto 0;
  max-width: 980px;
}

.store-row span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  font-weight: 800;
}

.expert-grid article {
  background: #fbfcf8;
}

.expert-grid p {
  color: #33424e;
  font-size: 18px;
}

.expert-grid strong {
  color: var(--teal-dark);
}

.practice-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 16px;
}

.flash-card {
  min-height: 290px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--teal-dark);
  color: var(--white);
}

.flash-card .card-label,
.flash-card p {
  color: rgba(255, 255, 255, 0.78);
}

.flash-card h3 {
  font-size: clamp(38px, 6vw, 68px);
  text-align: left;
}

.compact {
  width: fit-content;
  min-height: 40px;
  background: var(--sun);
  color: var(--ink);
}

.quiz-options {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.quiz-options button {
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.quiz-options button.correct {
  border-color: var(--leaf);
  background: #edf8e9;
}

.quiz-options button.wrong {
  border-color: var(--coral);
  background: #fff0ed;
}

.quiz-result {
  min-height: 30px;
  font-weight: 800;
}

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

.faq-list details {
  padding: 16px 18px;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 800;
}

.trial-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 22px;
  align-items: center;
  padding: clamp(44px, 7vw, 72px) clamp(18px, 5vw, 72px);
  background: var(--teal-dark);
  color: var(--white);
}

.trial-band > div,
.trial-form {
  max-width: 1180px;
}

.trial-band h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.16;
}

.trial-band p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.78);
}

.trial-band .eyebrow {
  color: var(--sun);
}

.trial-form {
  display: grid;
  gap: 12px;
  padding: 18px;
  color: var(--ink);
}

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

.trial-form label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.trial-form input,
.trial-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
}

.checkbox-row {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px !important;
  color: var(--muted);
  font-size: 13px;
}

.checkbox-row input {
  width: 18px;
  min-height: 18px;
  margin-top: 4px;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.4fr);
  gap: 32px;
  padding: 24px clamp(18px, 5vw, 72px);
  background: var(--ink);
  color: var(--white);
}

.footer-brand strong,
.footer-brand span,
.footer-brand p {
  display: block;
}

.footer-brand strong {
  font-size: 24px;
}

.footer-brand p,
.site-footer span {
  color: rgba(255, 255, 255, 0.72);
}

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

.footer-columns h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.footer-columns a {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  margin: 6px 0;
}

@media (max-width: 920px) {
  .site-header {
    align-items: stretch;
  }

  .primary-header {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .main-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    min-height: 760px;
    align-items: end;
  }

  .hero-overlay {
    background:
      linear-gradient(0deg, rgba(251, 252, 248, 0.96) 0%, rgba(251, 252, 248, 0.76) 55%, rgba(251, 252, 248, 0.08) 100%),
      linear-gradient(0deg, rgba(23, 32, 42, 0.22), rgba(23, 32, 42, 0.02));
  }

  .section-heading {
    display: block;
  }

  .learning-flow,
  .book-grid,
  .catalogue-shell,
  .teacher-tools,
  .practice-layout,
  .teacher-layout,
  .lesson-shell,
  .feature-grid,
  .reader-layout,
  .ai-layout,
  .resource-grid,
  .shop-grid,
  .method-layout,
  .compat-grid,
  .mission-board,
  .expert-grid,
  .access-grid,
  .about-layout,
  .signin-layout,
  .get-started-hero,
  .started-split,
  .about-hero,
  .about-split,
  .about-split.reverse,
  .page-hero,
  .student-summary,
  .student-info-grid,
  .admin-shell,
  .admin-filter-grid,
  .admin-action-form,
  .upload-form,
  .stats-filters,
  .analytics-grid,
  .activity-grid,
  .settings-grid,
  .admin-challenge-grid,
  .admin-folder-grid,
  .support-ai-panel,
  .book-reader-header,
  .book-reader-layout,
  .book-detail-hero,
  .book-detail-grid,
  .book-page-preview,
  .video-book-topbar,
  .video-book-controls,
  .student-book-toolbar,
  .student-book-grid,
  .download-grid,
  .started-steps,
  .tutorial-grid,
  .level-map,
  .support-grid,
  .compact-support,
  .month-grid,
  .site-footer,
  .footer-columns,
  .trial-band {
    grid-template-columns: 1fr;
  }

  .standalone-dashboard {
    display: block;
  }

  .standalone-dashboard .portal-sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    overflow-x: auto;
    gap: 8px;
  }

  .standalone-dashboard .portal-sidebar strong {
    flex: 0 0 auto;
    margin: 0 8px 0 0;
    align-self: center;
  }

  .standalone-dashboard .portal-sidebar a {
    flex: 0 0 auto;
  }

  .video-book-controls {
    grid-template-columns: auto auto minmax(120px, 1fr) auto;
    width: min(54%, 440px);
    min-height: 48px;
    padding: 6px 8px;
    border-radius: 999px;
  }

  .video-control-settings {
    grid-template-columns: 90px auto auto;
  }

  .video-scene-dots {
    justify-content: center;
  }

  .catalogue-filter {
    position: static;
  }

  .hero-3d-stage {
    display: none;
  }

  .started-device-stage {
    min-height: 360px;
  }

  .started-device-stage img {
    width: 100%;
    height: 300px;
  }

  .about-orbit {
    min-height: 360px;
  }

  .about-orbit img {
    width: 100%;
    height: 300px;
  }

  .reader-scene {
    position: relative;
    right: auto;
    top: auto;
    margin-bottom: 10px;
  }

  .device-stage {
    align-items: center;
    flex-direction: column;
    min-height: auto;
  }

  .laptop,
  .tablet,
  .phone {
    width: min(100%, 340px);
    transform: none;
  }

  .book-reader-header {
    align-items: start;
  }

  .reader-progress-badge {
    width: 92px;
  }

  .student-book-card {
    grid-template-columns: 132px minmax(0, 1fr);
  }

  .book-detail-art {
    min-height: 390px;
  }

  .featured-upload-cover {
    min-height: 370px;
  }

  .mini-book-cover {
    min-height: 210px;
  }
}

@media (max-width: 560px) {
  .site-header {
    gap: 10px;
  }

  .brand {
    min-width: 0;
    flex: 1 1 180px;
  }

  .header-action {
    flex: 0 0 auto;
    min-width: 96px;
    padding: 0 14px;
  }

  .main-nav {
    gap: 14px;
    font-size: 13px;
  }

  .utility-bar,
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

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

  .admin-action-form,
  .upload-form {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 720px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .lesson-columns {
    grid-template-columns: 1fr;
  }

  .book-reader-shell {
    width: min(100% - 16px, 1480px);
  }

  .book-detail-shell {
    width: min(100% - 16px, 1280px);
  }

  .book-reader-header,
  .book-detail-topbar,
  .book-detail-actions,
  .reader-toolbar,
  .student-book-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .book-detail-art {
    min-height: 340px;
  }

  .featured-upload-cover {
    min-height: 320px;
  }

  .detail-meta,
  .book-page-preview {
    grid-template-columns: 1fr;
  }

  .video-book-shell {
    padding: 10px 8px 18px;
  }

  .video-reader-stage {
    min-height: 360px;
    max-height: none;
  }

  .video-caption-panel {
    top: 13%;
    width: min(82%, 520px);
  }

  .video-caption-lines {
    font-size: clamp(20px, 6vw, 32px);
  }

  .video-book-controls {
    grid-template-columns: auto minmax(0, 1fr) auto;
    width: min(92%, 560px);
    padding: 6px;
    border-radius: 8px;
  }

  .video-progress-track {
    grid-column: 1 / -1;
  }

  .video-round-button {
    width: 52px;
    height: 52px;
  }

  .video-arrow-button {
    width: 44px;
    height: 44px;
  }

  .video-scene-dots {
    gap: 6px;
    overflow-x: auto;
    justify-content: start;
  }

  .video-scene-dots button {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    font-size: 18px;
  }

  .video-control-settings {
    right: 0;
    left: 0;
    grid-template-columns: 1fr;
  }

  .video-story-title {
    top: 3.5%;
    min-width: min(50%, 250px);
    padding: 5px 9px;
  }

  .video-settings-button {
    top: auto;
    right: 2.4%;
    bottom: 5%;
    width: 34px;
    height: 34px;
  }

  .video-reader-side {
    display: grid;
  }

  .reader-progress-badge {
    width: 86px;
  }

  .animated-book {
    min-height: 430px;
    padding: 10px;
  }

  .book-spread-page {
    min-height: 390px;
  }

  .student-book-card {
    grid-template-columns: 1fr;
  }

  .mini-book-cover {
    min-height: 250px;
  }

  .compact-meta {
    grid-template-columns: 1fr;
  }
}

@keyframes book-float {
  0%,
  100% {
    transform: rotateY(-28deg) rotateX(12deg) translateY(0);
  }
  50% {
    transform: rotateY(-18deg) rotateX(16deg) translateY(-18px);
  }
}

@keyframes card-drift {
  0%,
  100% {
    transform: rotateZ(-4deg) translateY(0);
  }
  50% {
    transform: rotateZ(6deg) translateY(-14px);
  }
}

@keyframes tiny-book {
  0%,
  100% {
    transform: rotateY(-18deg) translateY(0);
  }
  50% {
    transform: rotateY(18deg) translateY(-8px);
  }
}

@keyframes pop-badge {
  0%,
  100% {
    transform: scale(1) rotate(-4deg);
  }
  50% {
    transform: scale(1.08) rotate(5deg);
  }
}

@keyframes device-breathe {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -8px;
  }
}

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