/* Eastern Aquarium: lesson player, story reader and questions (quiz.js) */
:root {
  --lp-ink: #0f172a; --lp-text: #334155; --lp-muted: #64748b; --lp-line: #e3eaef;
  --lp-teal: #0f7d88; --lp-teal-dark: #0b6770; --lp-aqua: #2eb8c2; --lp-soft: #eef7f8;
  --lp-sun: #ffc93c; --lp-green: #12a150; --lp-red: #e5484d; --lp-bg: #eaf4f6;
}
.lp-page { background: linear-gradient(180deg, #dff1f4 0%, #eef7f8 280px, #f5f9fa 100%); min-height: 70vh; padding: 22px 16px 60px; }
.lp-wrap { max-width: 860px; margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Top bar: back, title, progress, sound */
.lp-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.lp-back { display: inline-flex; align-items: center; gap: 8px; color: var(--lp-teal-dark); font: 700 .92rem 'Inter', sans-serif; text-decoration: none; padding: 9px 12px; border-radius: 12px; background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.08); }
.lp-back:hover { background: var(--lp-soft); }
.lp-title { flex: 1; min-width: 0; font: 800 1rem 'Montserrat', sans-serif; color: var(--lp-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-icon { width: 42px; height: 42px; border-radius: 12px; border: none; background: #fff; color: var(--lp-teal-dark); cursor: pointer; box-shadow: 0 1px 3px rgba(15,23,42,.08); font-size: 1rem; display: inline-flex; align-items: center; justify-content: center; }
.lp-icon:hover { background: var(--lp-soft); }
.lp-progress { height: 12px; background: #fff; border-radius: 999px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--lp-line); margin-bottom: 18px; }
.lp-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--lp-aqua), var(--lp-teal)); border-radius: 999px; transition: width .35s ease; }
.lp-draft { background: #fff7e0; border: 1.5px solid #ffd65c; color: #7a5200; border-radius: 12px; padding: 10px 14px; font-size: .88rem; margin-bottom: 14px; }

/* The card that holds each step */
.lp-stage { background: #fff; border-radius: 26px; box-shadow: 0 2px 4px rgba(15,23,42,.04), 0 18px 40px rgba(15,23,42,.08); padding: 34px 36px; min-height: 340px; animation: lpIn .35s ease; }
@keyframes lpIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lp-stage { animation: none; } }
.lp-stage h1, .lp-stage .lp-h { font: 900 clamp(1.5rem, 3.6vw, 2.1rem)/1.2 'Montserrat', sans-serif; color: var(--lp-ink); letter-spacing: -.5px; margin: 0 0 14px; }
.lp-text { font-size: 1.15rem; line-height: 1.75; color: var(--lp-text); }
.lp-text p { margin: 0 0 14px; }
.lp-text h3 { font: 800 1.25rem 'Montserrat', sans-serif; color: var(--lp-ink); margin: 18px 0 8px; }
.lp-text ul, .lp-text ol { padding-left: 26px; margin: 0 0 14px; }
.lp-text li { margin-bottom: 6px; }
.lp-text a { color: var(--lp-teal); font-weight: 600; }
.lp-text mark { background: #fff1b8; border-radius: 4px; padding: 0 3px; }
.lp-img { display: block; width: 100%; max-height: 420px; object-fit: contain; border-radius: 18px; background: var(--lp-soft); margin: 0 0 20px; }
.lp-video { position: relative; padding-top: 56.25%; border-radius: 18px; overflow: hidden; background: #000; margin-bottom: 14px; }
.lp-video iframe, .lp-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lp-say { display: inline-flex; align-items: center; gap: 8px; border: none; background: var(--lp-soft); color: var(--lp-teal-dark); font: 700 .9rem 'Inter', sans-serif; padding: 9px 14px; border-radius: 12px; cursor: pointer; margin-bottom: 16px; }
.lp-say:hover, .lp-say.on { background: #d4eef1; }

/* Start and end screens */
.lp-start { text-align: center; }
.lp-start .lp-char { width: 130px; height: 130px; border-radius: 50%; object-fit: cover; background: var(--lp-soft); margin: 0 auto 16px; display: block; }
.lp-start p { color: var(--lp-muted); font-size: 1.08rem; line-height: 1.6; max-width: 560px; margin: 0 auto 18px; }
.lp-chips { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.lp-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--lp-soft); color: var(--lp-teal-dark); border-radius: 999px; padding: 6px 12px; font: 700 .82rem 'Inter', sans-serif; }
.lp-stars { display: flex; justify-content: center; gap: 10px; font-size: 3rem; margin: 6px 0 10px; }
.lp-stars i { color: #e2e8f0; }
.lp-stars i.on { color: var(--lp-sun); animation: lpStar .5s cubic-bezier(.2,1.6,.4,1) both; filter: drop-shadow(0 3px 6px rgba(255,180,0,.35)); }
.lp-stars i:nth-child(2).on { animation-delay: .15s; } .lp-stars i:nth-child(3).on { animation-delay: .3s; }
@keyframes lpStar { from { transform: scale(0) rotate(-40deg); } to { transform: none; } }
.lp-score { font: 900 1.4rem 'Montserrat', sans-serif; color: var(--lp-ink); }
.lp-save { background: var(--lp-soft); border-radius: 16px; padding: 14px 16px; margin: 18px auto 0; max-width: 480px; color: var(--lp-text); font-size: .95rem; }

/* Buttons and bottom navigation */
.lp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 52px; padding: 12px 26px; border-radius: 16px; border: none; font: 800 1.05rem 'Inter', sans-serif; cursor: pointer; text-decoration: none; background: var(--lp-teal); color: #fff; box-shadow: 0 4px 0 var(--lp-teal-dark); transition: transform .08s, box-shadow .08s, background .15s; }
.lp-btn:hover { background: #0d8a96; color: #fff; }
.lp-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--lp-teal-dark); }
.lp-btn.big { min-height: 60px; padding: 14px 36px; font-size: 1.15rem; }
.lp-btn.sun { background: var(--lp-sun); color: #3d2a00; box-shadow: 0 4px 0 #d9a300; }
.lp-btn.ghost { background: #fff; color: var(--lp-teal-dark); box-shadow: 0 0 0 2px var(--lp-line), 0 4px 0 var(--lp-line); }
.lp-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.lp-btn:focus-visible, .qz-opt:focus-visible, .lp-icon:focus-visible { outline: 4px solid rgba(46,184,194,.55); outline-offset: 2px; }
.lp-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.lp-nav .lp-count { color: var(--lp-muted); font: 700 .9rem 'Inter', sans-serif; }
.lp-end-btns { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

/* ── Questions ── */
.qz-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.qz-num { font: 800 .8rem 'Inter', sans-serif; text-transform: uppercase; letter-spacing: .6px; color: var(--lp-aqua); }
.qz-say { display: inline-flex; align-items: center; gap: 7px; border: none; background: var(--lp-soft); color: var(--lp-teal-dark); font: 700 .85rem 'Inter', sans-serif; padding: 8px 12px; border-radius: 10px; cursor: pointer; }
.qz-prompt { font: 900 clamp(1.35rem, 3.2vw, 1.8rem)/1.3 'Montserrat', sans-serif; color: var(--lp-ink); margin: 0 0 18px; letter-spacing: -.3px; }
.qz-img { display: block; max-width: 100%; max-height: 300px; margin: 0 auto 20px; border-radius: 16px; }
.qz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qz-opts.tf .qz-opt { justify-content: center; font-size: 1.25rem; min-height: 80px; }
.qz-opts.tf .qz-opt i { font-size: 1.4rem; }
.qz-opts.pics { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.qz-opt { position: relative; display: flex; align-items: center; gap: 12px; text-align: left; min-height: 66px; padding: 14px 16px; border-radius: 18px; border: 3px solid var(--lp-line); background: #fff; font: 700 1.08rem 'Inter', sans-serif; color: var(--lp-ink); cursor: pointer; box-shadow: 0 4px 0 var(--lp-line); transition: border-color .12s, transform .08s, background .12s; }
.qz-opt:hover:not(:disabled) { border-color: var(--lp-aqua); background: #f4fcfd; }
.qz-opt:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--lp-line); }
.qz-opts.pics .qz-opt { flex-direction: column; text-align: center; padding: 12px; }
.qz-opt img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; background: var(--lp-soft); }
.qz-letter { width: 34px; height: 34px; border-radius: 10px; background: var(--lp-soft); color: var(--lp-teal-dark); display: inline-flex; align-items: center; justify-content: center; font-weight: 900; flex-shrink: 0; }
.qz-opts.pics .qz-letter { position: absolute; top: 18px; left: 18px; background: rgba(255,255,255,.92); }
.qz-opt.right, .qz-opt.right:hover:not(:disabled) { border-color: var(--lp-green); background: #ecfbf2; box-shadow: 0 4px 0 #9fe0bb; }
.qz-opt.right .qz-letter { background: var(--lp-green); color: #fff; }
.qz-opt.wrong, .qz-opt.wrong:hover:not(:disabled) { border-color: var(--lp-red); background: #fff2f2; box-shadow: 0 4px 0 #ffc9cb; }
.qz-opt.shake { animation: qzShake .4s; }
@keyframes qzShake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.qz.locked .qz-opt:not(.right) { opacity: .55; }
.qz.busy { cursor: progress; }
.qz-tip { color: var(--lp-muted); margin: -6px 0 12px; }
.qz-order { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 10px; counter-reset: qz; }
.qz-item { counter-increment: qz; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 3px solid var(--lp-line); background: #fff; font: 700 1.05rem 'Inter', sans-serif; color: var(--lp-ink); cursor: grab; touch-action: none; user-select: none; }
.qz-item::before { content: counter(qz); width: 30px; height: 30px; border-radius: 9px; background: var(--lp-soft); color: var(--lp-teal-dark); display: inline-flex; align-items: center; justify-content: center; font-weight: 900; flex-shrink: 0; }
.qz-item .qz-text { flex: 1; }
.qz-item.dragging { border-color: var(--lp-aqua); box-shadow: 0 8px 20px rgba(15,23,42,.15); transform: scale(1.02); }
.qz-item.right { border-color: var(--lp-green); background: #ecfbf2; }
.qz-grip { color: #b6c2cc; }
.qz-arrows { display: flex; gap: 4px; }
.qz-arrows button { width: 36px; height: 36px; border-radius: 10px; border: none; background: var(--lp-soft); color: var(--lp-teal-dark); cursor: pointer; }
.qz-arrows button:disabled { opacity: .3; cursor: default; }
.qz-check { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 12px 26px; border-radius: 16px; border: none; background: var(--lp-teal); color: #fff; font: 800 1.05rem 'Inter', sans-serif; cursor: pointer; box-shadow: 0 4px 0 var(--lp-teal-dark); }
.qz-check:disabled { opacity: .45; cursor: default; }
.qz-type { display: flex; gap: 10px; flex-wrap: wrap; }
.qz-type input { flex: 1; min-width: 200px; min-height: 56px; border: 3px solid var(--lp-line); border-radius: 16px; padding: 12px 16px; font: 700 1.15rem 'Inter', sans-serif; color: var(--lp-ink); outline: none; }
.qz-type input:focus { border-color: var(--lp-aqua); }
.qz-type input.right { border-color: var(--lp-green); background: #ecfbf2; }
.qz-feedback { margin-top: 16px; border-radius: 16px; display: none; padding: 14px 16px; font-size: 1rem; line-height: 1.5; }
.qz-feedback b { display: block; font-size: 1.1rem; margin-bottom: 2px; }
.qz-feedback.good { display: block; background: #ecfbf2; color: #0b6b38; }
.qz-feedback.bad { display: block; background: #fff2f2; color: #a3262b; }
.qz-feedback.reveal { display: block; background: #fff8e0; color: #7a5200; }

/* ── Story reader ── */
.st-book { background: #fffdf7; border-radius: 26px; box-shadow: 0 2px 4px rgba(15,23,42,.04), 0 18px 40px rgba(15,23,42,.1); overflow: hidden; }
.st-page { display: grid; grid-template-columns: 1fr; min-height: 460px; animation: lpIn .3s ease; }
.st-page.has-img.wide { grid-template-columns: 1.1fr 1fr; }
.st-page-img { background: #e8f4f6; display: flex; align-items: center; justify-content: center; }
.st-page-img img { width: 100%; height: 100%; max-height: 520px; object-fit: contain; display: block; }
.st-page-text { padding: 34px 38px; display: flex; flex-direction: column; justify-content: center; }
.st-words { font: 600 clamp(1.25rem, 2.6vw, 1.6rem)/1.7 'Inter', sans-serif; color: var(--lp-ink); white-space: pre-wrap; }
.st-words.big { font-size: clamp(1.5rem, 3.4vw, 2rem); }
.st-word { border-radius: 6px; transition: background .1s; padding: 0 1px; }
.st-word.on { background: #ffe58a; box-shadow: 0 0 0 2px #ffe58a; }
.st-cover { text-align: center; padding: 30px 26px 34px; }
.st-cover img { max-width: min(100%, 420px); max-height: 420px; border-radius: 18px; box-shadow: 0 10px 30px rgba(15,23,42,.18); margin-bottom: 20px; }
.st-cover h1 { font: 900 clamp(1.7rem, 4vw, 2.4rem)/1.15 'Montserrat', sans-serif; color: var(--lp-ink); margin: 0 0 8px; }
.st-cover .st-by { color: var(--lp-muted); font-weight: 600; margin-bottom: 18px; }
.st-bar { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-top: 1px solid #f0ebdd; background: #fffaf0; flex-wrap: wrap; }
.st-bar .lp-count { margin: 0 auto; color: var(--lp-muted); font: 700 .95rem 'Inter', sans-serif; }
.st-turn { width: 60px; height: 60px; border-radius: 50%; border: none; background: var(--lp-teal); color: #fff; font-size: 1.3rem; cursor: pointer; box-shadow: 0 4px 0 var(--lp-teal-dark); display: inline-flex; align-items: center; justify-content: center; }
.st-turn:disabled { opacity: .3; cursor: default; }
.st-turn:focus-visible { outline: 4px solid rgba(46,184,194,.55); outline-offset: 2px; }
.st-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.st-tool { display: inline-flex; align-items: center; gap: 7px; border: 2px solid var(--lp-line); background: #fff; color: var(--lp-teal-dark); font: 700 .88rem 'Inter', sans-serif; padding: 9px 14px; border-radius: 12px; cursor: pointer; }
.st-tool.on { background: var(--lp-teal); border-color: var(--lp-teal); color: #fff; }
.st-dots { display: flex; gap: 6px; justify-content: center; padding: 10px 0 0; flex-wrap: wrap; }
.st-dots span { width: 9px; height: 9px; border-radius: 50%; background: #d7e2e8; }
.st-dots span.on { background: var(--lp-teal); }

/* ── Learn page: story shelf ── */
.st-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.st-card { display: flex; flex-direction: column; background: #fff; border-radius: 18px; overflow: hidden; text-decoration: none; box-shadow: 0 2px 10px rgba(15,23,42,.08); transition: transform .15s, box-shadow .15s; position: relative; }
.st-card:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(15,23,42,.14); }
.st-card-cover { aspect-ratio: 3/4; background: linear-gradient(135deg, #bfe9ee, #e0f4f6); display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.st-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-card-body { padding: 12px 14px 14px; }
.st-card-body b { display: block; font: 800 1rem 'Montserrat', sans-serif; color: var(--lp-ink); line-height: 1.3; }
.st-card-body span { font-size: .8rem; color: var(--lp-muted); }
.st-card .st-read { position: absolute; top: 10px; right: 10px; background: var(--lp-green); color: #fff; font: 800 .7rem 'Inter', sans-serif; border-radius: 999px; padding: 4px 9px; }

@media (max-width: 760px) {
  .lp-stage { padding: 24px 18px; border-radius: 20px; }
  .qz-opts { grid-template-columns: 1fr; }
  .qz-opts.tf { grid-template-columns: 1fr 1fr; }
  .st-page.has-img.wide { grid-template-columns: 1fr; }
  .st-page-text { padding: 22px 20px; }
  .st-turn { width: 54px; height: 54px; }
  .lp-btn { padding: 12px 18px; }
  .lp-title { display: none; }
}
