/* =========================================================
   pages.css — page-specific layouts
   ========================================================= */

/* ================= HOME: HERO ================= */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(255, 201, 60, .45), transparent 60%),
    linear-gradient(180deg, #6CC8FF 0%, #A9E2FF 48%, #DDF3FF 78%, var(--bg) 100%);
  padding-top: clamp(20px, 4vw, 48px);
}
.hero__sun { position: absolute; top: -60px; inset-inline-end: -40px; width: 230px; height: 230px; border-radius: 50%;
  background: radial-gradient(circle, #FFE58A 0 45%, rgba(255, 201, 60, .35) 46% 62%, transparent 63%); animation: spin 40s linear infinite; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero .cloud { animation: drift 9s ease-in-out infinite alternate; }
.hero__grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1.1fr; align-items: end; gap: 12px; }
.hero__text { padding-bottom: clamp(40px, 7vw, 110px); }
.hero__logo { width: min(460px, 100%); height: auto; filter: drop-shadow(0 14px 24px rgba(27, 42, 94, .2)); animation: logoIn 1s var(--ease-bounce) both; }
@keyframes logoIn { from { opacity: 0; transform: scale(.7) rotate(-6deg); } }
.hero__lead { font-size: var(--fs-lead); font-weight: 700; color: var(--navy); max-width: 30ch; margin: 14px 0 24px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__hint { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; padding: 8px 16px; border-radius: var(--r-pill); background: rgba(255,255,255,.75); font-family: var(--font-head); font-weight: 700; font-size: 1rem; }
.hero__hint svg { width: 22px; height: 22px; color: var(--orange-600); animation: wiggle 1.6s ease-in-out infinite; }

.stage { position: relative; height: clamp(320px, 42vw, 540px); }
.stage__ground { position: absolute; bottom: -40px; inset-inline: -10%; height: 120px; border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: linear-gradient(180deg, #9BDB6A, #7BC950); box-shadow: inset 0 10px 0 rgba(255,255,255,.35); }
.ch { position: absolute; bottom: 14px; padding: 0; border: 0; background: none; cursor: pointer; transform-origin: 50% 100%; touch-action: manipulation; }
.ch img { height: 100%; width: auto; filter: drop-shadow(0 12px 14px rgba(27, 42, 94, .22)); transition: transform .3s var(--ease-bounce); pointer-events: none; user-select: none; -webkit-user-drag: none; }
.ch:hover img { transform: scale(1.04) rotate(-2deg); }
.ch.hop { animation: hop .7s var(--ease-out); }
.ch .bubble { bottom: calc(100% + 6px); inset-inline-start: 50%; translate: -50% 0; width: max-content; }
html[dir="rtl"] .ch .bubble { translate: 50% 0; }
.ch--tamim { height: 82%; inset-inline-start: 8%; z-index: 2; }
.ch--roida { height: 90%; inset-inline-end: 6%; z-index: 1; }
.ch--rocky { height: 42%; inset-inline-start: 41%; z-index: 3; bottom: 4px; }
.ch--dino { height: 30%; top: 2%; bottom: auto; inset-inline-start: 34%; z-index: 1; animation: floaty 3.4s ease-in-out infinite; }
.ch--dino .bubble { bottom: auto; top: calc(100% + 4px); }
.ch--dino .bubble::after { bottom: auto; top: -10px; border-top: 0; border-bottom: 11px solid #fff; }

@media (max-width: 899px) {
  /* phones & small tablets: logo → hint → characters → text → buttons */
  .hero__grid { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0; }
  .hero__text { display: contents; }
  .hero__logo { order: 1; width: min(330px, 78vw); }
  .hero__hint { order: 2; margin-top: 10px; }
  .stage { order: 3; height: clamp(250px, 68vw, 430px); max-width: 560px; width: 100%; margin-top: 12px; }
  .hero__lead { order: 4; margin: 40px auto 18px; position: relative; z-index: 2; }
  .hero__cta { order: 5; justify-content: center; width: 100%; padding-bottom: 10px; }
}
@media (max-width: 420px) {
  .hero__cta .btn { flex: 1 1 100%; }
  .ch .bubble { font-size: .9rem; max-width: 170px; }
}

/* ================= HOME: SERIES ================= */
.series-grid { display: grid; gap: clamp(18px, 3vw, 28px); grid-template-columns: 1fr; }
@media (min-width: 980px) { .series-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 620px) and (max-width: 979px) {
  .series-grid { grid-template-columns: repeat(2, 1fr); }
  .series-card:last-child:nth-child(odd) { grid-column: 1 / -1; flex-direction: row; }
  .series-card:last-child:nth-child(odd) .series-card__art { height: auto; min-height: 230px; flex: 0 0 46%; }
}
.series-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .35s var(--ease-bounce), box-shadow .3s; }
.series-card:hover { transform: translateY(-8px) rotate(-.6deg); box-shadow: var(--shadow-lg); }
.series-card__art { position: relative; height: 210px; background: linear-gradient(135deg, var(--c1), var(--c2)); overflow: hidden; }
.series-card__art::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.35), transparent 45%), radial-gradient(circle at 80% 90%, rgba(255,255,255,.2), transparent 40%); }
.series-card__art svg { position: absolute; width: 62%; height: auto; top: 50%; inset-inline-start: 6%; translate: 0 -50%; filter: drop-shadow(0 10px 12px rgba(0,0,0,.2)); transition: transform .4s var(--ease-bounce); }
.series-card:hover .series-card__art svg { transform: rotate(-6deg) scale(1.06); }
.series-card__peek { position: absolute; bottom: -6px; inset-inline-end: 4%; height: 92%; width: auto; filter: drop-shadow(0 8px 10px rgba(0,0,0,.25)); transition: transform .4s var(--ease-bounce); }
.series-card:hover .series-card__peek { transform: translateY(-8px); }
.series-card__body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.series-card__body h3 { font-size: var(--fs-h3); margin: 0; }
.series-card__body p { color: var(--muted); margin: 0 0 12px; }
.series-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--r-pill); background: var(--sky-100); color: var(--sky-600); font-weight: 800; font-size: .92rem; }
.pill svg { width: 16px; height: 16px; }

/* ================= HOME: CHARACTERS STRIP ================= */
.friends-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 3vw, 30px); }
.friend { display: grid; justify-items: center; gap: 10px; text-decoration: none; color: inherit; }
.friend__circle { position: relative; width: 100%; aspect-ratio: 1; border-radius: 50%; background: var(--bg-c); overflow: hidden;
  box-shadow: inset 0 -10px 0 rgba(0,0,0,.06), 0 6px 0 var(--c), var(--shadow-sm); transition: transform .35s var(--ease-bounce); }
.friend__circle img { position: absolute; bottom: -8%; left: 50%; translate: -50% 0; height: 104%; width: auto; max-width: none; transition: transform .35s var(--ease-bounce); }
.friend:hover .friend__circle { transform: translateY(-6px) rotate(-4deg); }
.friend:hover .friend__circle img { transform: scale(1.08) translateY(-4px); }
.friend span { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.05rem, 2.4vw, 1.4rem); }
@media (max-width: 560px) { .friends-strip { grid-template-columns: repeat(2, 1fr); gap: 22px 18px; } }

/* ================= HOME: EXPLORE TILES ================= */
.tiles { display: grid; gap: 18px; grid-template-columns: repeat(4, 1fr); }
.tile { position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 210px; padding: 24px; border-radius: var(--r-lg);
  background: var(--c); color: #fff; text-decoration: none; overflow: hidden;
  box-shadow: 0 8px 0 var(--c-d), var(--shadow-md); transition: transform .3s var(--ease-bounce), box-shadow .3s; }
.tile:hover { transform: translateY(-6px) rotate(.8deg); box-shadow: 0 14px 0 var(--c-d), var(--shadow-lg); }
.tile:active { transform: translateY(4px); box-shadow: 0 3px 0 var(--c-d); }
.tile__icon { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 20px; background: rgba(255,255,255,.22); margin-bottom: 10px; }
.tile__icon svg { width: 38px; height: 38px; }
.tile h3 { font-size: 1.35rem; margin: 0; }
.tile p { margin: 0; opacity: .92; font-weight: 600; line-height: 1.5; }
.tile .badge-soon { position: absolute; top: 18px; inset-inline-end: 18px; background: #fff; color: var(--c-d); }
.tile::after { content: ""; position: absolute; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.12); bottom: -60px; inset-inline-end: -40px; }
@media (max-width: 980px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .tiles { gap: 14px; } .tile { min-height: 180px; padding: 18px; } .tile h3 { font-size: 1.15rem; } .tile p { font-size: .92rem; } .tile__icon { width: 54px; height: 54px; } }

/* ================= HOME: BOOK SHELF ================= */
.shelf { display: flex; gap: clamp(14px, 2.5vw, 26px); overflow-x: auto; padding: 10px 4px 34px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.shelf::-webkit-scrollbar { display: none; }
.shelf a { flex: 0 0 clamp(140px, 22vw, 190px); scroll-snap-align: start; position: relative; }
.shelf::after { content: ""; flex: 0 0 1px; }
.cover3d { position: relative; display: block; border-radius: 6px 14px 14px 6px; overflow: hidden; aspect-ratio: 3 / 4;
  box-shadow: 0 16px 24px rgba(27, 42, 94, .22), 0 3px 0 rgba(0,0,0,.06); transition: transform .35s var(--ease-bounce); }
html[dir="rtl"] .cover3d { border-radius: 14px 6px 6px 14px; }
.cover3d img { width: 100%; height: 100%; object-fit: cover; }
.cover3d::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 12px; z-index: 1;
  background: linear-gradient(90deg, rgba(0,0,0,.28), rgba(255,255,255,.25) 50%, rgba(0,0,0,.08)); }
.cover3d::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(255,255,255,.3), transparent 35%); pointer-events: none; }
a:hover > .cover3d, button:hover > .cover3d { transform: translateY(-8px) rotate(-2deg); }

/* ================= HOME: SOCIAL ================= */
.join {
  position: relative; overflow: hidden; text-align: center; color: #fff;
  background: radial-gradient(800px 300px at 50% 0%, #2D4BA0, var(--navy)); border-radius: var(--r-xl);
  padding: clamp(36px, 6vw, 64px) clamp(20px, 4vw, 48px);
}
.join h2 { color: #fff; font-size: var(--fs-h2); }
.join p { color: #DCE4FF; font-size: var(--fs-lead); max-width: 44ch; margin: 0 auto 26px; }
.join .eyebrow { background: rgba(255,255,255,.14); color: var(--sun); }
.join .social { margin-bottom: 26px; }
.join__avatar { width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 16px; border: 5px solid var(--sun); box-shadow: 0 0 0 8px rgba(255,201,60,.2); animation: floaty 4s ease-in-out infinite; }

/* ================= CHARACTERS PAGE ================= */
.cards { display: grid; gap: clamp(18px, 3vw, 30px); grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.cards--friends { grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); }
.flip { perspective: 1400px; height: 470px; cursor: pointer; scroll-margin-top: calc(var(--topbar-h) + 20px); }
.cards--friends .flip { height: 400px; }
.flip__in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .8s var(--ease-bounce); }
.flip.is-flipped .flip__in { transform: rotateY(180deg); }
.flip__face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: var(--r-lg); overflow: hidden;
  box-shadow: 0 8px 0 var(--c), var(--shadow-md); display: flex; flex-direction: column; }
.flip__front { background: radial-gradient(circle at 50% 35%, #fff 0, var(--bg-c) 62%); }
.flip__back { background: #fff; transform: rotateY(180deg); padding: 24px; gap: 10px; border: 4px solid var(--bg-c); }
.flip__img { flex: 1; min-height: 0; position: relative; }
.flip__img img { position: absolute; inset: 16px 8px 0; width: calc(100% - 16px); height: calc(100% - 16px); object-fit: contain; object-position: center bottom; filter: drop-shadow(0 10px 12px rgba(0,0,0,.18)); transition: transform .4s var(--ease-bounce); }
.flip:hover .flip__img img { transform: translateY(-6px) scale(1.03); }
.flip__img.talk img { animation: hop .7s var(--ease-out); }
.flip__label { padding: 14px 18px 18px; text-align: center; background: #fff; }
.flip__label h3 { font-size: 1.65rem; margin: 0; color: var(--c); }
.cards--friends .flip__label h3 { font-size: 1.35rem; }
.flip__role { display: block; font-weight: 700; color: var(--muted); font-size: .98rem; margin-bottom: 10px; }
.flip__btns { display: flex; gap: 10px; justify-content: center; }
.flip__btns .btn { flex: 1; padding-inline: 12px; font-size: 1rem; }
.btn--char { --btn-bg: var(--c); --btn-fg: #fff; --btn-edge: rgba(0,0,0,.28); box-shadow: 0 6px 0 color-mix(in srgb, var(--c) 70%, #000), var(--shadow-sm); }
.flip__back h3 { font-size: 1.6rem; color: var(--c); margin: 0; display: flex; align-items: center; gap: 10px; }
.flip__back h3 img { width: 54px; height: 54px; object-fit: cover; object-position: top; border-radius: 50%; background: var(--bg-c); }
.flip__back p { margin: 0; color: var(--ink); line-height: 1.7; }
.facts { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 8px; }
.facts li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 14px; border-radius: 14px; background: var(--bg-c); font-weight: 700; font-size: .98rem; }
.facts li b { color: var(--c); font-family: var(--font-head); }
.flip__back .flip__btns { margin-top: auto; }
.cards-title { display: flex; align-items: center; gap: 12px; font-size: var(--fs-h3); margin: 0 0 20px; }
.cards-title::after { content: ""; flex: 1; height: 4px; border-radius: 4px; background: repeating-linear-gradient(90deg, var(--line) 0 14px, transparent 14px 24px); }
@media (max-width: 480px) { .flip { height: 440px; } .cards--friends { grid-template-columns: repeat(2, 1fr); gap: 14px; } .cards--friends .flip { height: 320px; }
  .cards--friends .flip__label { padding: 10px; } .cards--friends .flip__label h3 { font-size: 1.1rem; } .cards--friends .flip__role { font-size: .8rem; margin-bottom: 6px; }
  .cards--friends .flip__btns .btn { min-height: 46px; padding: 6px; font-size: .85rem; } .cards--friends .flip__btns .btn span { display: none; }
  .cards--friends .flip__back { padding: 14px; } .cards--friends .flip__back h3 { font-size: 1.15rem; } .cards--friends .flip__back h3 img { width: 40px; height: 40px; } .cards--friends .flip__back p { font-size: .88rem; line-height: 1.55; } }

/* ================= STORIES: PLAYER ================= */
.tabs { display: flex; gap: 10px; overflow-x: auto; padding: 6px 4px 14px; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.tabs::-webkit-scrollbar { display: none; }
.tabs .chip { flex: none; scroll-snap-align: start; }
.tabs .chip svg { width: 22px; height: 22px; }
.watch { display: grid; grid-template-columns: 1.7fr 1fr; gap: 24px; align-items: start; }
.player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; background: var(--navy); box-shadow: 0 10px 0 var(--navy-700), var(--shadow-lg); }
.player iframe, .player img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.player__play { position: absolute; inset: 0; display: grid; place-items: center; border: 0; background: linear-gradient(0deg, rgba(20,32,74,.45), transparent 50%); cursor: pointer; }
.player__play span { width: 96px; height: 96px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center;
  box-shadow: 0 7px 0 var(--red-600), 0 0 0 12px rgba(255,255,255,.25); transition: transform .25s var(--ease-bounce); animation: pulse 2s ease-in-out infinite; }
.player__play span svg { width: 46px; height: 46px; margin-inline-start: 6px; }
html[dir="rtl"] .player__play span svg { margin-inline-start: 0; margin-inline-end: 6px; }
.player__play:hover span { transform: scale(1.1); }
@keyframes pulse { 0%,100% { box-shadow: 0 7px 0 var(--red-600), 0 0 0 10px rgba(255,255,255,.25); } 50% { box-shadow: 0 7px 0 var(--red-600), 0 0 0 20px rgba(255,255,255,.08); } }
.now { margin-top: 22px; display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.now small { display: block; font-weight: 800; color: var(--red-600); font-family: var(--font-head); }
.now h2 { font-size: var(--fs-h3); margin: 0; }
.now p { color: var(--muted); margin: 4px 0 0; }
.eplist { display: grid; gap: 12px; max-height: 560px; overflow-y: auto; padding: 4px; overscroll-behavior: contain; }
.ep { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: center; padding: 8px; border: 3px solid transparent; border-radius: 20px; background: #fff;
  box-shadow: var(--shadow-sm); cursor: pointer; text-align: start; transition: transform .2s var(--ease-bounce), border-color .2s; }
.ep:hover { transform: translateX(-3px); }
html[dir="ltr"] .ep:hover { transform: translateX(3px); }
.ep[aria-current="true"] { border-color: var(--red); background: #FFF4F3; }
.ep__thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--sky-100); }
.ep__thumb img { width: 100%; height: 100%; object-fit: cover; }
.ep__dur { position: absolute; bottom: 5px; inset-inline-end: 5px; padding: 1px 7px; border-radius: 8px; background: rgba(20,32,74,.85); color: #fff; font-size: .78rem; font-weight: 800; direction: ltr; }
.ep__no { position: absolute; top: 5px; inset-inline-start: 5px; padding: 1px 8px; border-radius: 8px; background: var(--sun); color: var(--navy); font-size: .78rem; font-weight: 800; }
.ep__title { font-family: var(--font-head); font-weight: 700; font-size: 1.02rem; line-height: 1.35; }
.ep__series { display: block; font-size: .85rem; font-weight: 700; color: var(--muted); margin-top: 2px; }
@media (max-width: 980px) {
  .watch { grid-template-columns: 1fr; }
  .eplist { max-height: none; overflow: visible; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
}
@media (max-width: 480px) { .ep { grid-template-columns: 128px 1fr; } .ep__title { font-size: .95rem; } .player__play span { width: 76px; height: 76px; } }

/* ================= STORIES: FLIPBOOK ================= */
.book-wrap { position: relative; max-width: 1060px; margin-inline: auto; }
.book { position: relative; width: 100%; aspect-ratio: 3 / 2; perspective: 2600px; user-select: none; touch-action: pan-y; }
.book__shadow { position: absolute; inset: 4% 1% -3%; border-radius: 24px; background: rgba(27,42,94,.25); filter: blur(22px); z-index: 0; }
.half { position: absolute; top: 0; width: 50%; height: 100%; overflow: hidden; background: #FFFDF7; background-size: 200% 100%; background-repeat: no-repeat; }
.half--l { left: 0; border-radius: 18px 0 0 18px; background-position: left center; }
.half--r { right: 0; border-radius: 0 18px 18px 0; background-position: right center; }
.half.full { background-size: cover; background-position: center; }
.half.blank { background: transparent; }
.half::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.half--l::after { background: linear-gradient(90deg, transparent 80%, rgba(0,0,0,.18) 98%, rgba(0,0,0,.3)); }
.half--r::after { background: linear-gradient(270deg, transparent 80%, rgba(0,0,0,.16) 98%, rgba(0,0,0,.28)); }
.book__pages { position: absolute; inset: 0; z-index: 1; }
.leaf { position: absolute; top: 0; width: 50%; height: 100%; z-index: 5; transform-style: preserve-3d; transition: transform .95s cubic-bezier(.45, .05, .25, 1); }
.leaf--l { left: 0; transform-origin: right center; }
.leaf--r { right: 0; transform-origin: left center; }
.leaf .half { left: 0; right: auto; width: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.leaf .half--back { transform: rotateY(180deg); }
.leaf .half::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .95s;
  background: linear-gradient(90deg, rgba(0,0,0,.25), transparent 60%); }
.leaf.turning .half::before { opacity: 1; }
.book__hit { position: absolute; top: 0; height: 100%; width: 50%; z-index: 8; border: 0; background: transparent; cursor: pointer; }
.book__hit--l { left: 0; } .book__hit--r { right: 0; }
.book__hit:focus-visible { outline-offset: -6px; }

/* HTML pages inside the book */
.pg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(6px, 1.4vw, 14px); padding: 6% 8%; text-align: center;
  background: radial-gradient(circle at 50% 20%, #FFF4D6, #FFFDF7 70%); }
.pg h3 { font-size: clamp(1rem, 2.6vw, 1.9rem); margin: 0; line-height: 1.35; }
.pg p { margin: 0; color: var(--muted); font-size: clamp(.78rem, 1.6vw, 1.08rem); line-height: 1.6; }
.pg img.pg__logo { width: 52%; height: auto; }
.pg img.pg__cover { height: 50%; width: auto; border-radius: 6px 12px 12px 6px; box-shadow: var(--shadow-md); }
.pg .btn { min-height: 44px; font-size: clamp(.8rem, 1.6vw, 1.05rem); padding: 6px 18px; }
.pg__tap { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-head); font-weight: 800; color: var(--orange-600); font-size: clamp(.8rem, 1.6vw, 1.1rem); animation: floaty 2s ease-in-out infinite; }
.pg__tap svg { width: 1.3em; height: 1.3em; }

.reader { display: grid; grid-template-columns: auto 1fr auto; gap: clamp(10px, 2vw, 20px); align-items: center; margin-top: clamp(22px, 3vw, 34px); }
.reader__nav { width: 68px; height: 68px; }
.reader__nav svg { width: 32px; height: 32px; }
html[dir="ltr"] .reader__next svg, html[dir="rtl"] .reader__prev svg { transform: scaleX(-1); }
.reader__nav:disabled { opacity: .35; cursor: default; transform: none; }
.reader__box { background: #fff; border-radius: var(--r-lg); padding: 18px clamp(18px, 3vw, 30px); box-shadow: var(--shadow-md); min-height: 130px; display: grid; gap: 8px; align-content: center; }
.reader__text { font-family: var(--font-head); font-size: clamp(1.1rem, 2.3vw, 1.45rem); font-weight: 600; line-height: 2; margin: 0; }
html[lang="en"] .reader__text { line-height: 1.6; font-weight: 500; }
.reader__text.swap { animation: textIn .5s var(--ease-out); }
@keyframes textIn { from { opacity: 0; transform: translateY(8px); } }
.reader__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.reader__count { font-weight: 800; color: var(--muted); }
.dots { display: flex; gap: 6px; flex-wrap: wrap; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--line); transition: background .3s, transform .3s; }
.dots i.on { background: var(--orange); transform: scale(1.3); }
.reading .reader__text { color: var(--sky-600); }
@media (max-width: 640px) {
  .reader { grid-template-columns: 1fr 1fr; }
  .reader__box { grid-column: 1 / -1; grid-row: 1; }
  .reader__prev { justify-self: start; } .reader__next { justify-self: end; }
  .reader__nav { width: 60px; height: 60px; }
  .half--l { border-radius: 12px 0 0 12px; } .half--r { border-radius: 0 12px 12px 0; }
}

/* credits */
.credits img { width: 100%; height: auto; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }

/* ================= BOOKS ================= */
.book-grid { display: grid; gap: clamp(22px, 3vw, 34px); grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); }
.bk { display: flex; flex-direction: column; gap: 14px; background: #fff; border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-md); }
.bk__cover { position: relative; border: 0; padding: 0; background: none; cursor: pointer; display: block; width: 100%; }
.bk__no { position: absolute; top: -10px; inset-inline-end: -8px; z-index: 3; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sun); color: var(--navy); font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; box-shadow: 0 4px 0 var(--sun-600); }
.bk h3 { font-size: 1.15rem; margin: 0; line-height: 1.45; }
.bk__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { padding: 3px 10px; border-radius: var(--r-pill); background: var(--sky-100); color: var(--sky-600); font-weight: 800; font-size: .82rem; }
.tag--sun { background: var(--sun-100); color: #8A5A00; }
.tag--green { background: #E6F7DA; color: var(--green-600); }
.bk__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; }
.bk__btns .btn { padding-inline: 10px; font-size: .98rem; }
.bk__btns .btn svg { width: 20px; height: 20px; }
.book-modal { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; }
.book-modal .cover3d { width: 100%; }
.book-modal h2 { font-size: var(--fs-h3); padding-inline-end: 50px; }
.book-modal p { color: var(--ink); line-height: 1.85; }
.book-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 20px; }
.book-facts div { background: #fff; border-radius: 16px; padding: 10px; text-align: center; box-shadow: var(--shadow-sm); }
.book-facts b { display: block; font-family: var(--font-head); font-size: 1.15rem; color: var(--orange-600); }
.book-facts span { font-size: .85rem; font-weight: 700; color: var(--muted); }
@media (max-width: 680px) { .book-modal { grid-template-columns: 1fr; } .book-modal .cover3d { width: 56%; margin-inline: auto; } }
.parents { display: flex; gap: 16px; align-items: center; background: var(--sun-100); border-radius: var(--r-lg); padding: 18px 22px; margin-top: 40px; }
.parents svg { width: 40px; height: 40px; flex: none; color: var(--orange-600); }
.parents h3 { margin: 0; font-size: 1.15rem; }
.parents p { margin: 0; color: #6B4B00; }

/* ================= COMING SOON ================= */
.soon { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 50px 0; }
.soon__chars { display: flex; justify-content: center; align-items: flex-end; gap: 10px; height: 230px; margin-bottom: 20px; }
.soon__chars img { height: 100%; width: auto; animation: floaty 3.5s ease-in-out infinite; }
.soon__chars img:nth-child(2) { height: 60%; animation-delay: .4s; }
.soon__chars img:nth-child(3) { animation-delay: .8s; }
.soon h1 { font-size: var(--fs-h2); }
.soon p { font-size: var(--fs-lead); color: var(--muted); max-width: 40ch; margin: 0 auto 24px; }

/* book editions (bilingual / English only) */
.tabs--ed { justify-content: center; padding-top: 0; }
.tabs--ed .chip { min-height: 42px; padding: 6px 16px; font-size: .95rem; }
.ed-switch { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 16px; }
.ed-switch .chip { min-height: 42px; padding: 6px 16px; font-size: .95rem; }
.ed-switch__label { width: 100%; font-weight: 800; font-size: .9rem; color: var(--muted); }
.tag--two { background: #EEE6FF; color: var(--purple-600); }
