@font-face {
  font-family: 'Vazirmatn';
  src: url('/fonts/vazirmatn.woff2') format('woff2-variations'), url('/fonts/vazirmatn.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Lalezar';
  src: url('/fonts/lalezar.woff2') format('woff2');
  font-display: swap;
}

:root {
  --cyan: #52dbe3;
  --cyan-deep: #1a9aa3;
  --cyan-soft: #e3fafb;
  --cream: #fff4d9;
  --cream-2: #ffe7b3;
  --sun: #ffb000;
  --orange: #ffa62b;
  --orange-deep: #c96d00;
  --coral: #ff6f61;
  --navy: #1f2b5c;
  --navy-soft: #4a5687;
  --green: #1f9d55;
  --line: #e4e8f3;
  --bg: #fbfcff;
  --card: #ffffff;
  --radius: 22px;
  --shadow: 0 4px 0 rgba(31, 43, 92, 0.14);
  --display: 'Lalezar', 'Vazirmatn', system-ui, sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  /* The app's sky: cyan with a warm glow; clouds drift in .sky below. */
  background: radial-gradient(900px 420px at 50% -60px, rgba(255, 246, 201, 0.85), transparent 70%),
    linear-gradient(180deg, #5fe2e9 0, var(--cyan) 40%, #49d2dc 100%);
  background-color: var(--cyan);
  color: var(--navy);
  font-family: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.85;
  font-weight: 450;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--cyan-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

h1,
h2,
h3 {
  line-height: 1.5;
  margin: 0 0 0.5em;
}

h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 6vw, 46px);
  line-height: 1.35;
}

h2 {
  font-size: clamp(21px, 3.6vw, 26px);
  font-weight: 850;
  margin-top: 1.6em;
}

h3 {
  font-size: 18px;
  font-weight: 800;
}

.wrap {
  width: min(1100px, 100% - 32px);
  margin-inline: auto;
}

.wrap.narrow {
  width: min(820px, 100% - 32px);
}

.center {
  text-align: center;
}

.skip {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.skip:focus {
  width: auto;
  height: auto;
  clip-path: none;
  inset-inline-start: 16px;
  top: 8px;
  z-index: 10;
  background: #fff;
  padding: 6px 12px;
  border-radius: 10px;
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

/* ---- sky: four clouds and three sparkles, fixed behind the page ---- */

.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  contain: strict;
  pointer-events: none;
}

.cloud {
  position: absolute;
  left: 0;
  display: block;
  fill: #fff;
  will-change: transform;
  animation: drift linear infinite;
}

.cloud svg {
  display: block;
  width: 100%;
}

.c1 {
  top: 14%;
  width: 120px;
  opacity: 0.9;
  animation-duration: 70s;
  animation-delay: -12s;
}

.c2 {
  top: 42%;
  width: 80px;
  opacity: 0.7;
  animation-duration: 95s;
  animation-delay: -60s;
}

.c3 {
  top: 66%;
  width: 140px;
  opacity: 0.55;
  animation-duration: 120s;
  animation-delay: -35s;
}

.c4 {
  top: 86%;
  width: 70px;
  opacity: 0.75;
  animation-duration: 80s;
  animation-delay: -5s;
}

@keyframes drift {
  from {
    transform: translateX(-160px);
  }
  to {
    transform: translateX(calc(100vw + 20px));
  }
}

.spark {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #ffe066;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: twinkle 3s ease-in-out infinite;
}

.p1 {
  top: 24%;
  right: 6%;
}

.p2 {
  top: 58%;
  left: 5%;
  animation-delay: -1s;
}

.p3 {
  top: 78%;
  right: 12%;
  width: 10px;
  height: 10px;
  animation-delay: -2s;
}

@keyframes twinkle {
  50% {
    transform: scale(0.6) rotate(45deg);
    opacity: 0.5;
  }
}

/* ---- header / footer ---- */

.appbar {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, #1f2b5c, #2c3b7a, #1f2b5c);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

/* A light sweep every few seconds draws the eye to the install bar. */
.appbar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.22) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: sweep 4.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes sweep {
  0%,
  55% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.appbar-in {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
}

.phone-ico {
  font-size: 22px;
  animation: wiggle 2.4s ease-in-out infinite;
}

@keyframes wiggle {
  0%,
  60%,
  100% {
    transform: rotate(0);
  }
  70% {
    transform: rotate(-14deg) scale(1.1);
  }
  80% {
    transform: rotate(12deg) scale(1.1);
  }
  90% {
    transform: rotate(-6deg);
  }
}

.appbar-t {
  flex: 1;
  line-height: 1.6;
}

.stores {
  display: flex;
  gap: 6px;
  flex: none;
}

.appbar .store {
  padding: 4px 12px;
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.appbar .store.direct {
  background: var(--sun);
  box-shadow: 0 0 0 0 rgba(255, 176, 0, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 10px rgba(255, 176, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 176, 0, 0);
  }
}

.foot-end {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

#enamad {
  flex: none;
  background: #fff;
  border-radius: 14px;
  padding: 6px;
  line-height: 0;
}

#enamad img {
  width: 96px;
  height: auto;
}

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 3px 0 rgba(26, 154, 163, 0.35);
}

.top-in {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  text-decoration: none;
  flex: none;
}

.logo span {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo b {
  font-family: var(--display);
  font-weight: 400;
  font-size: 24px;
}

.logo small {
  font-size: 12px;
  color: var(--navy-soft);
  font-weight: 700;
}

.grades {
  display: flex;
  gap: 4px;
  margin-inline-start: auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.grades a {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--navy);
  text-decoration: none;
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
}

.grades a:hover,
.grades a[aria-current] {
  background: var(--cyan-soft);
}

.foot {
  margin-top: 64px;
  padding: 40px 0 24px;
  background: var(--navy);
  color: #dfe5ff;
}

.foot a {
  color: #fff;
  text-decoration: none;
}

.foot a:hover {
  text-decoration: underline;
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
}

.foot h2 {
  font-size: 17px;
  margin: 0 0 6px;
}

.foot ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 15px;
  line-height: 2.1;
}

.copy {
  margin: 28px 0 0;
  font-size: 13px;
  opacity: 0.75;
}

/* ---- buttons, chips ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 16px;
  background: var(--orange);
  color: var(--navy);
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--orange-deep);
  cursor: pointer;
  transition: transform 0.1s;
}

.btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--orange-deep);
}

.btn.white {
  background: #fff;
  box-shadow: 0 4px 0 #cfd6ea;
  border: 2px solid var(--line);
}

.btn.small {
  min-height: 40px;
  padding: 0 14px;
  font-size: 15px;
  flex: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0;
}

.chip {
  display: inline-block;
  margin: 0 0 8px 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--line);
  color: var(--navy);
  font-weight: 800;
  text-decoration: none;
}

.chip:hover {
  border-color: var(--cyan);
}

.eyebrow {
  margin: 0 0 6px;
  font-weight: 800;
  color: var(--cyan-deep);
}

.eyebrow a {
  text-decoration: none;
}

.lead {
  font-size: 18px;
  color: #33406e;
}

.hero .lead {
  font-weight: 650;
}

.small {
  font-size: 14px;
}

/* ---- home ---- */

.hero {
  padding: 36px 0 18px;
}

.hero h1 {
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.55);
}

.hero .lead,
#grades-h,
#feat-h,
#buy-h,
.grade-card h3 a,
.faq h2 {
  color: var(--navy);
}

/* Headings over cards and steps sit in the middle, like the cards. */
#grades-h,
#feat-h,
#books-h,
#free-h,
#sg-h,
#price-h,
#packs-h,
.buy > h2,
.others h2,
.faq h2 {
  text-align: center;
}

.others {
  text-align: center;
}

.hero .eyebrow {
  color: var(--navy);
  opacity: 0.8;
}

.hero-art {
  filter: drop-shadow(0 8px 0 rgba(26, 154, 163, 0.45));
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  50% {
    transform: translateY(-8px) rotate(4deg);
  }
}

/* Inner pages sit on a white sheet, like the app's cards on its sky. */
.sheet {
  margin-top: 18px;
  padding: 4px 22px 28px;
  background: var(--card);
  border-radius: 30px;
  box-shadow: 8px 10px 0 var(--cyan-deep);
}

.sheet .crumbs ol {
  margin-top: 14px;
}

.hero-in {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
}

.hero-art {
  width: clamp(120px, 24vw, 230px);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 10px;
}

.stats div {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow);
}

.stats b {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(26px, 5vw, 36px);
  line-height: 1.3;
}

.stats span {
  font-weight: 700;
  color: var(--navy-soft);
  font-size: 15px;
}

.grade-card {
  margin-bottom: 20px;
}

.grade-card h3 {
  font-size: 20px;
  margin: 18px 0 10px;
  text-align: center;
}

.grade-card h3 a {
  color: var(--navy);
}

.books {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 240px));
  justify-content: center;
  gap: 12px;
}

.book {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
  padding: 14px 16px;
  background: #fff;
  border: 2px solid var(--line);
  border-top: 6px solid var(--c, var(--cyan));
  border-radius: var(--radius);
  color: var(--navy);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.15s;
}

.book:hover {
  transform: translateY(-3px);
}

.book h2,
.book h3 {
  margin: 6px 0 0;
  font-size: 18px;
}

.book span {
  font-size: 14px;
  color: var(--navy-soft);
  font-weight: 700;
}

.books.big .book img {
  width: 64px;
  height: 64px;
}

.feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.feat {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.feat h3 {
  margin: 8px 0 4px;
}

.feat p {
  margin: 0;
  font-size: 15px;
  color: #33406e;
}

.buy .more {
  display: inline-block;
  margin: 0 16px;
  font-weight: 800;
  color: var(--navy);
}

/* ---- steps / price / cta ---- */

.steps {
  counter-reset: s;
  list-style: none;
  padding: 0;
  margin: 14px 0 20px;
  display: grid;
  gap: 10px;
}

.steps li {
  counter-increment: s;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 12px 64px 12px 16px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 18px;
}

.steps li::before {
  content: counter(s, persian);
  position: absolute;
  inset-inline-start: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sun);
  font-family: var(--display);
  font-size: 20px;
  line-height: 1;
}

.steps b {
  font-size: 17px;
}

.steps span {
  font-size: 15px;
  color: #33406e;
}

.price,
.cta-box {
  margin-top: 28px;
  padding: 20px;
  background: var(--cream);
  border: 2px solid var(--cream-2);
  border-radius: var(--radius);
}

.price h2,
.cta-box h2 {
  margin-top: 0;
}

.big-price {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--display);
  font-size: 34px;
}

/* ---- inner pages ---- */

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 18px 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-soft);
}

.crumbs li + li::before {
  content: '‹';
  margin: 0 8px;
}

.crumbs a {
  color: var(--navy-soft);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--cyan-deep);
}

.page-head {
  margin: 8px 0 12px;
}

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

.book-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.book-head .sub {
  margin: 0;
  font-weight: 800;
  color: var(--navy-soft);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 0;
}

.chips span {
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--cyan-soft);
  font-size: 14px;
  font-weight: 800;
}

.chips .free,
.tag.free {
  background: #d8f6e4;
  color: var(--green);
}

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

.lrow a {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 16px;
  color: var(--navy);
  text-decoration: none;
}

.lrow a:hover {
  border-color: var(--cyan);
}

.lrow .num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--cyan-soft);
  font-weight: 900;
}

.lrow .lt {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.lrow .lt small {
  font-size: 14px;
  color: #4a5687;
  line-height: 1.7;
}

.lrow .lm {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 13px;
  color: var(--navy-soft);
  white-space: nowrap;
}

.tag {
  font-style: normal;
  font-weight: 900;
  font-size: 12px;
  padding: 0 8px;
  border-radius: 999px;
}

.lessons.compact .lt small {
  display: none;
}

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

.free-list {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.free-list h3 {
  margin: 0 0 4px;
}

.free-list ol {
  margin: 0;
  padding-inline-start: 22px;
}

.free-list small {
  color: var(--navy-soft);
}

.others {
  margin-top: 28px;
}

.others h2 {
  font-size: 19px;
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 28px 0 0;
}

.pager a {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 16px;
  color: var(--navy);
  font-weight: 800;
  text-decoration: none;
}

.pager a[rel='next'] {
  text-align: left;
}

.pager small {
  color: var(--navy-soft);
  font-weight: 700;
}

/* ---- faq / quiz ---- */

.faq details,
.quiz .q {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 16px;
  margin-bottom: 8px;
}

.faq summary {
  padding: 12px 16px;
  font-weight: 800;
  cursor: pointer;
}

.faq details p {
  margin: 0;
  padding: 0 16px 14px;
}

.quiz > ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

.quiz .q {
  padding: 12px 16px;
}

.quiz .q > p {
  margin: 0 0 6px;
  font-weight: 700;
}

.opts {
  list-style: none;
  padding: 0;
  margin: 0 0 6px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px;
}

.opts li {
  padding: 4px 10px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 15px;
}

.opts span {
  font-weight: 900;
  color: var(--cyan-deep);
  margin-inline-end: 4px;
}

.quiz summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--cyan-deep);
  font-size: 15px;
}

.quiz details p {
  margin: 4px 0 0;
  font-size: 15px;
}

.table {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
}

th,
td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: start;
}

th {
  background: var(--cyan-soft);
}

.bullets {
  padding-inline-start: 22px;
}

.nf {
  padding-top: 40px;
}

.nf .actions {
  justify-content: center;
}

/* ---- checkout (/buy/) ---- */

.checkout {
  max-width: 460px;
  margin: 0 auto;
  text-align: center;
}

.checkout h2 {
  margin-top: 18px;
}

.co-book {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 18px;
  text-align: start;
}

.co-book div {
  display: flex;
  flex-direction: column;
}

.co-book span {
  font-size: 14px;
  color: var(--navy-soft);
  font-weight: 700;
}

.co-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0;
}

.co-field {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 2px solid var(--line);
  border-radius: 16px;
  font: inherit;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 2px;
  text-align: center;
  color: var(--navy);
  background: #fff;
}

.co-field:focus {
  border-color: var(--cyan);
  outline: none;
}

.co-link {
  border: 0;
  background: none;
  color: var(--cyan-deep);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.co-note {
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 800;
}

.co-note.err {
  background: #ffe4e0;
  color: #b3261e;
}

.co-note.ok {
  background: #d8f6e4;
  color: var(--green);
}

.co-wait {
  color: var(--navy-soft);
  font-weight: 800;
}

.co-packs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.co-pack {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 8px 10px;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
}

.co-pack input {
  position: absolute;
  opacity: 0;
}

.co-pack:has(input:checked) {
  border-color: var(--orange);
  background: var(--cream);
  box-shadow: 0 4px 0 var(--orange-deep);
}

.co-pack.short {
  opacity: 0.55;
}

.co-pack b {
  font-size: 18px;
}

.co-pack small,
.co-pack span {
  font-size: 13px;
  color: var(--navy-soft);
  font-weight: 700;
}

.co-pack em {
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  color: var(--navy-soft);
}

.co-pack em.fit {
  color: var(--green);
}

.co-code {
  margin: 4px 0 14px;
}

.co-code summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--cyan-deep);
}

.co-code form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.co-code .co-field {
  flex: 1;
  min-height: 48px;
  font-size: 17px;
}

.co-code-on {
  padding: 8px 12px;
  border-radius: 14px;
  background: #d8f6e4;
  color: var(--green);
  font-weight: 800;
}

.co-pack s {
  opacity: 0.6;
}

.co-pack .co-off {
  color: var(--green);
}

.co-small {
  font-size: 13px;
  color: var(--navy-soft);
}

.co-game {
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--cyan-soft);
  font-weight: 700;
}

.co-done h2 {
  margin-top: 8px;
}

.co-apps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 16px 0 6px;
}

/* ---- player ---- */

.player {
  position: relative;
  margin: 14px 0 6px;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}

.player > img,
.player .poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player .poster {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.player .play {
  position: absolute;
  inset: 0;
  margin: auto;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--navy);
  font-size: 34px;
  box-shadow: 0 5px 0 var(--orange-deep), 0 0 0 10px rgba(255, 255, 255, 0.35);
  transition: transform 0.15s;
}

.player .poster:hover .play {
  transform: scale(1.06);
}

.player.locked > img {
  filter: blur(2px) brightness(0.6);
}

.lock-over {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #fff;
  text-align: center;
  padding: 16px;
}

.lock-over span {
  font-size: 40px;
  line-height: 1.2;
}

a.lock-over {
  text-decoration: none;
  cursor: pointer;
}

a.lock-over:hover .btn {
  transform: translateY(-2px);
}

.lock-over .btn {
  margin-top: 8px;
  font-style: normal;
}

.buy-now {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 14px 0 4px;
  text-align: center;
}

.buy-now span {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-soft);
}

.note {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-soft);
}

/* Playing: no black box around it; the stage and bar carry the corners. */
.player.live {
  aspect-ratio: auto;
  overflow: visible;
  background: none;
  border-radius: 0;
}

.player.live .stage {
  border-radius: 18px 18px 0 0;
}

.player.live .bar {
  border-radius: 0 0 18px 18px;
}

/* Fullscreen (or filling the window on iPhone): video as big as fits above
   the bar, message and options under it. */
.player.full {
  position: fixed;
  inset: 0;
  z-index: 20;
  margin: 0;
}

.player.full,
.player:fullscreen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  background: #000;
  overflow-y: auto;
}

.player.full .stage,
.player:fullscreen .stage {
  flex: none;
  width: min(100%, calc((100vh - 190px) * 16 / 9));
  width: min(100%, calc((100dvh - 190px) * 16 / 9));
  margin: 0 auto;
  border-radius: 12px 12px 0 0;
}

.player.full .bar,
.player:fullscreen .bar,
.player.full .pmsg,
.player:fullscreen .pmsg,
.player.full .popts,
.player:fullscreen .popts {
  width: min(100%, calc((100vh - 190px) * 16 / 9));
  width: min(100%, calc((100dvh - 190px) * 16 / 9));
  margin: 0 auto;
}

.player.full .pmsg,
.player:fullscreen .pmsg {
  margin-top: 4px;
}


.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.stage video.fb {
  display: none;
}

.stage video.fb.on {
  display: block;
}

.stage .hot {
  position: absolute;
  border: 0;
  border-radius: 6%;
  background: transparent;
  cursor: pointer;
  outline: 3px dashed rgba(255, 255, 255, 0.85);
  animation: hot 1.2s infinite;
}

.stage .hot.tried {
  background: rgba(229, 72, 77, 0.35);
  outline-color: transparent;
  animation: none;
  cursor: not-allowed;
}

@keyframes hot {
  50% {
    background: rgba(255, 255, 255, 0.18);
  }
}

.spin {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  pointer-events: none;
}

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

.done {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 244, 217, 0.96);
  font-weight: 800;
  text-align: center;
  padding: 12px;
}

.bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--navy);
  color: #fff;
}

.bar button {
  width: 36px;
  height: 36px;
  flex: none;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.bar button.main {
  background: var(--orange);
  color: var(--navy);
}

.bar button.speed {
  width: auto;
  padding: 0 8px;
  font-weight: 900;
  font-size: 13px;
}

.bar button:disabled {
  opacity: 0.4;
}

.bar input {
  flex: 1;
  min-width: 0;
  accent-color: var(--orange);
}

.bar .t {
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pmsg {
  margin: 8px 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--cyan-soft);
  font-weight: 800;
  text-align: center;
}

.pmsg:empty {
  display: none;
}

.popts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.popts .btn {
  flex-direction: column;
  gap: 0;
  padding: 6px;
  min-height: 56px;
  font-size: 15px;
}

.popts .btn[disabled] {
  background: #ffe4e0;
  box-shadow: none;
  opacity: 0.7;
}

/* ---- small screens ---- */

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .top {
    position: static;
  }

  .appbar {
    font-size: 13px;
  }

  .appbar-in {
    flex-wrap: wrap;
    gap: 4px 8px;
    padding: 8px 0;
  }

  .stores {
    width: 100%;
  }

  .stores .store {
    flex: 1;
    text-align: center;
  }

  .top-in {
    flex-wrap: wrap;
    gap: 6px 10px;
    padding: 8px 0;
  }

  .grades {
    order: 3;
    width: 100%;
    margin: 0;
  }

  .top .btn.small {
    margin-inline-start: auto;
  }

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

  .hero-art {
    display: none;
  }

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

  .sheet {
    width: calc(100% - 20px);
    padding: 2px 14px 22px;
    border-radius: 24px;
    box-shadow: 5px 6px 0 var(--cyan-deep);
  }

  .lrow a {
    grid-template-columns: 34px 1fr;
  }

  .lrow .lm {
    grid-column: 2;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
  }

  .book-head img {
    width: 60px;
    height: 60px;
  }

  .bar {
    gap: 5px;
    padding: 6px;
  }

  .bar button {
    width: 32px;
    height: 32px;
  }

  .bar .t {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ---- header link, more links ---- */

.grades a.nav-league {
  color: var(--cyan-deep);
  margin-inline-start: 6px;
}

.more-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin: 22px 0;
}

.more-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff;
  border: 2px solid var(--line);
  color: var(--navy);
  text-decoration: none;
}

.more-card span {
  font-size: 14px;
  color: var(--navy-soft);
}

.more-card.exam {
  border-color: var(--sun);
  background: var(--cream);
}

.more-card:hover {
  border-color: var(--cyan);
}

.play-cta {
  margin-top: 6px;
}

/* ---- tap-to-answer questions ---- */

.hint {
  margin: -4px 0 10px;
  color: var(--navy-soft);
  font-size: 15px;
}

.opts li:has(> button) {
  padding: 0;
  border: 0;
  background: none;
}

.opts button {
  width: 100%;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--navy);
  font: inherit;
  font-size: 15px;
  text-align: start;
  cursor: pointer;
}

.opts button:hover {
  border-color: var(--cyan);
}

.q.answered .opts button {
  cursor: default;
}

.opts button.right {
  background: #e3f7ea;
  border-color: var(--green);
}

.opts button.wrong {
  background: #ffe9e6;
  border-color: var(--coral);
}

.score {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--cream);
  font-size: 18px;
}

.chapters {
  padding-inline-start: 20px;
}

.chapters > li {
  margin-bottom: 8px;
}

.chapters ul {
  margin: 4px 0;
  padding-inline-start: 18px;
}

.exam-row h3 {
  margin: 14px 0 6px;
  font-size: 18px;
}

/* ---- XO game ---- */

.game {
  margin: 26px 0;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--cyan-soft);
  border: 2px solid #bfeef1;
  scroll-margin-top: 16px;
}

.game h2 {
  margin-top: 0;
}

.game-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.game-status {
  margin: 0;
  font-weight: 800;
  text-align: center;
}

.game-status.ok,
.game-status.win {
  color: var(--green);
}

.game-status.bad,
.game-status.lose {
  color: #c4372a;
}

.board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: min(228px, 100%);
}

.cell {
  aspect-ratio: 1;
  border: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.cell:disabled {
  cursor: default;
}

.cell:not(:disabled):empty {
  outline: 3px dashed var(--orange);
  outline-offset: -6px;
}

.cell.win {
  background: var(--cream-2);
}

.game-qa {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.game-q {
  margin: 0;
  font-weight: 800;
  text-align: center;
}

.game-e {
  margin: 0;
  font-size: 15px;
  color: var(--navy-soft);
  text-align: center;
}

.game-opts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 6px;
  width: 100%;
}

.game-opts button {
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.game-opts button.right {
  background: #e3f7ea;
  border-color: var(--green);
}

.game-opts button.wrong {
  background: #ffe9e6;
  border-color: var(--coral);
}

.game-end {
  margin-top: 14px;
  text-align: center;
}

.game-end .actions {
  justify-content: center;
}

.game-more {
  margin: 0;
  font-weight: 800;
}

.store-btn {
  padding: 10px 16px;
  border-radius: 14px;
  background: #fff;
  border: 2px solid var(--line);
  color: var(--navy);
  font-weight: 800;
  text-decoration: none;
}

.store-btn:hover {
  border-color: var(--cyan);
}
