/* site.css — Bible Story Phase 1 MVP — 2026-07-18 */
:root {
  --ink: #14233a;
  --ink-soft: #3d4f6a;
  --paper: #f3f7fb;
  --sky: #9ec8d8;
  --dawn: #d7eaf2;
  --navy: #1b2a4a;
  --teal: #1f6f78;
  --gold: #c9a227;
  --sand: #e8dcc8;
  --white: #ffffff;
  --danger: #b42318;
  --ok: #1b7a4a;
  --radius: 14px;
  --shadow: 0 18px 40px rgba(20, 35, 58, 0.12);
  --font-display: "Dongle", "Gowun Dodum", sans-serif;
  --font-body: "Gowun Dodum", "Malgun Gothic", sans-serif;
  --max: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(158, 200, 216, 0.55), transparent 60%),
    radial-gradient(900px 420px at 100% 0%, rgba(201, 162, 39, 0.18), transparent 55%),
    linear-gradient(180deg, var(--dawn) 0%, var(--paper) 280px, #eef3f7 100%);
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy); }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: 0.5rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(243, 247, 251, 0.86);
  border-bottom: 1px solid rgba(27, 42, 74, 0.08);
}
.site-header__inner {
  max-width: var(--max); margin: 0 auto; padding: 0.7rem 1.1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand {
  font-family: var(--font-display);
  font-size: 2.2rem; line-height: 1; font-weight: 700;
  color: var(--navy); text-decoration: none; letter-spacing: -0.02em;
}
.site-nav { display: flex; gap: 1.1rem; align-items: center; }
.site-nav a {
  color: var(--ink-soft); text-decoration: none; font-weight: 700;
  position: relative;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -4px; height: 2px;
  background: var(--gold); transition: right 0.25s ease;
}
.site-nav a:hover::after, .site-nav a:focus-visible::after { right: 0; }
.nav-toggle {
  display: none; border: 1px solid rgba(27, 42, 74, 0.2); background: #fff;
  border-radius: 999px; padding: 0.35rem 0.9rem; font-family: inherit; cursor: pointer;
}

.hero {
  position: relative; min-height: min(88vh, 760px);
  display: grid; align-items: end;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(27, 42, 74, 0.72), rgba(31, 111, 120, 0.45)),
    radial-gradient(circle at 70% 30%, rgba(201, 162, 39, 0.35), transparent 45%),
    linear-gradient(160deg, #24375f 0%, #1f6f78 45%, #87b7c5 100%);
  color: #fff;
}
/* site.css — Animated hero objects start — Updated: 2026-07-19 */
.hero__scene {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.hero__backdrop {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  transform: scale(1.06); animation: heroPan 28s ease-in-out infinite alternate;
}
.hero__glow {
  position: absolute; inset: -10%;
  background:
    radial-gradient(circle at 72% 28%, rgba(255,220,120,0.28), transparent 28%),
    radial-gradient(circle at 18% 70%, rgba(120,200,210,0.22), transparent 30%),
    linear-gradient(120deg, rgba(20,35,58,0.55), rgba(31,111,120,0.28) 55%, rgba(20,35,58,0.45));
}
.hero-float {
  position: absolute; display: block; width: auto; height: auto;
  max-width: none; user-select: none;
  filter: drop-shadow(0 12px 24px rgba(10, 20, 40, 0.28));
  will-change: transform;
}
.hero-float--bible {
  width: clamp(120px, 18vw, 220px); right: 7%; bottom: 12%;
  animation: heroFloatA 7.5s ease-in-out infinite;
}
.hero-float--dove {
  width: clamp(90px, 14vw, 170px); right: 22%; top: 14%;
  animation: heroFloatB 9s ease-in-out infinite;
}
.hero-float--cross {
  width: clamp(70px, 11vw, 130px); right: 4%; top: 18%;
  animation: heroPulse 5.8s ease-in-out infinite;
}
.hero-float--rainbow {
  width: clamp(140px, 22vw, 280px); right: 28%; bottom: 8%; opacity: 0.92;
  animation: heroSway 10s ease-in-out infinite;
}
.hero-float--sheep {
  width: clamp(80px, 12vw, 150px); right: 38%; top: 22%;
  animation: heroFloatA 8.4s ease-in-out infinite reverse;
}
.hero-float--star {
  width: clamp(56px, 9vw, 110px); right: 14%; top: 42%;
  animation: heroTwinkle 4.8s ease-in-out infinite;
}
.hero-float--star2 {
  width: clamp(42px, 7vw, 84px); right: 46%; bottom: 28%;
  animation: heroTwinkle 6.2s ease-in-out infinite 1s;
}
@keyframes heroPan {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to { transform: scale(1.1) translate3d(-2.5%, -1.5%, 0); }
}
@keyframes heroFloatA {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-2deg); }
  50% { transform: translate3d(0, -18px, 0) rotate(2deg); }
}
@keyframes heroFloatB {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(12px, -22px, 0) rotate(-4deg); }
}
@keyframes heroSway {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-1deg); }
  50% { transform: translate3d(-10px, -12px, 0) rotate(2deg); }
}
@keyframes heroPulse {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.9; }
  50% { transform: translate3d(0, -10px, 0) scale(1.06); opacity: 1; }
}
@keyframes heroTwinkle {
  0%, 100% { transform: translate3d(0, 0, 0) scale(0.92) rotate(0deg); opacity: 0.7; }
  50% { transform: translate3d(0, -8px, 0) scale(1.08) rotate(8deg); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__backdrop, .hero-float { animation: none !important; }
}
/* site.css — Animated hero objects end */
.hero__veil {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.55), transparent),
    radial-gradient(2px 2px at 40% 70%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1.5px 1.5px at 65% 25%, rgba(255,255,255,0.45), transparent),
    radial-gradient(2px 2px at 80% 55%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 55% 80%, rgba(255,255,255,0.4), transparent);
  animation: drift 18s linear infinite;
  opacity: 0.55; pointer-events: none; z-index: 1;
}
@keyframes drift {
  from { transform: translateY(0); }
  to { transform: translateY(-40px); }
}
.hero__content {
  position: relative; z-index: 2;
  max-width: var(--max); width: 100%; margin: 0 auto;
  padding: 4.5rem 1.25rem 3.2rem;
  animation: rise 0.8s ease both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero__brand {
  margin: 0 0 0.2rem; font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5rem); line-height: 0.9; font-weight: 700;
  color: #fff; text-shadow: 0 8px 30px rgba(0,0,0,0.25);
}
.hero__title {
  margin: 0.2rem 0 0.8rem; font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.8rem); line-height: 1; font-weight: 700;
  max-width: 14ch;
}
.hero__lead {
  margin: 0 0 1.4rem; max-width: 34rem; font-size: 1.1rem; color: rgba(255,255,255,0.92);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* site.css — Homepage how-to guide start — Updated: 2026-07-20 */
.how-to__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; }
.how-to__item { display: grid; grid-template-columns: auto 1fr; gap: 0.85rem; align-items: start; padding: 0.35rem 0; }
.how-to__num { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 700; font-size: 0.95rem; line-height: 1; }
.how-to__item strong { display: block; font-size: 1.05rem; color: var(--navy); margin-bottom: 0.15rem; }
.how-to__item p { margin: 0; color: var(--ink-soft); line-height: 1.55; }
.how-to__item a { color: var(--teal); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
@media (min-width: 760px) {
  .how-to__list { grid-template-columns: 1fr 1fr; gap: 1rem 1.5rem; }
}
/* site.css — Homepage how-to guide end */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0.55rem 1.2rem; border-radius: 999px;
  border: 1px solid transparent; font-family: inherit; font-weight: 700;
  font-size: 1rem; cursor: pointer; text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary {
  background: var(--gold); color: var(--navy); box-shadow: 0 10px 24px rgba(201, 162, 39, 0.35);
}
.btn--primary:hover { color: var(--navy); background: #d9b336; }
.btn--ghost {
  background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.35);
}
.page-head .btn--ghost, .story-actions .btn--ghost, .quiz-submit .btn--ghost, .cut-stage__controls .btn--ghost, .print-actions .btn--ghost, .account-settings .btn--ghost, .account-settings-card .btn--ghost, .section__head-link, .badge-pager .btn--ghost {
  background: #fff; color: var(--navy); border-color: rgba(27, 42, 74, 0.15);
}
.account-settings .btn--ghost:hover, .account-settings-card .btn--ghost:hover, .section__head-link:hover, .badge-pager .btn--ghost:hover { color: var(--teal); border-color: rgba(31, 111, 120, 0.35); }
.section__head--split { align-items: center; }
.section__head-link { flex-shrink: 0; white-space: nowrap; }
.char-hero__stats--dashboard a { color: var(--teal); text-decoration: none; font-weight: 700; }
.char-hero__stats--dashboard a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }

.section, .page-head, .filters, .story-grid, .timeline, .story-page, .quiz-form, .result-list, .empty {
  max-width: var(--max); margin-left: auto; margin-right: auto; padding-left: 1.1rem; padding-right: 1.1rem;
}
.section { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.section--tight { padding-top: 1.5rem; }
.section__head { display: flex; justify-content: space-between; gap: 1rem; align-items: end; margin-bottom: 1rem; }
.section__head h2, .page-head h1, .h-small {
  font-family: var(--font-display); font-weight: 700; line-height: 1; margin: 0;
}
.section__head h2 { font-size: 2.6rem; }
.section__head .section__lead { margin: 0.25rem 0 0; color: var(--ink-soft); font-size: 0.98rem; line-height: 1.55; }
.section__head .section__lead strong { color: var(--teal); }
.page-head { padding-top: 2rem; padding-bottom: 1rem; text-align: center; }
.page-head h1 { font-size: clamp(2.6rem, 6vw, 3.4rem); }
.page-head--narrow { max-width: 720px; }
.section__more { margin-top: 1.2rem; text-align: center; }
.eyebrow { margin: 0; color: var(--teal); font-weight: 700; letter-spacing: 0.02em; }
.muted { color: var(--ink-soft); }
.empty { padding: 2rem 1.1rem; text-align: center; }

/* site.css — Story/curriculum card centering start — 2026-07-18 */
.story-grid {
  list-style: none; margin: 0 auto; padding-bottom: 1rem;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.9rem;
  justify-content: center; width: 100%; align-items: stretch;
}
.story-grid > li {
  display: flex; flex-direction: column; min-width: 0; min-height: 100%;
}
.story-tile {
  display: flex; flex-direction: column; gap: 0.35rem; align-items: center;
  min-height: 132px; padding: 1rem 1.05rem; text-align: center;
  border-radius: var(--radius); text-decoration: none; color: inherit;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(27, 42, 74, 0.08);
  box-shadow: 0 8px 20px rgba(20, 35, 58, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.story-tile:hover {
  transform: translateY(-3px); box-shadow: var(--shadow); color: inherit;
}
.story-tile__era { font-size: 0.88rem; color: var(--teal); font-weight: 700; }
.story-tile__title {
  font-family: var(--font-display); font-size: 1.85rem; line-height: 1.05; font-weight: 700;
}
.story-tile__meta { font-size: 0.92rem; color: var(--ink-soft); }

.filters {
  display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 1rem;
  justify-content: center;
}
/* site.css — Story/curriculum card centering end */
.filters label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.9rem; font-weight: 700; }
.filters select {
  min-width: 180px; min-height: 42px; border-radius: 10px; border: 1px solid rgba(27,42,74,0.18);
  padding: 0.35rem 0.6rem; font-family: inherit; background: #fff;
}

/* site.css — Story cover cards start — Updated: 2026-07-19 */
.page-head--stories { padding-bottom: 0.6rem; }
.page-head--stories .eyebrow { margin-bottom: 0.15rem; }
.page-head--stories p strong { color: var(--teal); }
.filters--panel {
  max-width: var(--max); margin: 0 auto 1.4rem; padding: 0.95rem 1.1rem;
  border: 1px solid rgba(27,42,74,0.08); border-radius: 18px;
  background: rgba(255,255,255,0.72); box-shadow: 0 10px 28px rgba(20,35,58,0.06);
  justify-content: flex-start;
}
.story-grid--page { gap: 1.15rem; padding-bottom: 2.5rem; }
/* Updated: 2026-07-20 — Equal card height in a row; single-line title ellipsis. */
.story-tile--cover {
  display: flex; flex-direction: column; flex: 1 1 auto; align-self: stretch;
  align-items: stretch; width: 100%; min-height: 100%; padding: 0; overflow: hidden; text-align: left;
  background: rgba(255,255,255,0.9); border-radius: 20px;
  box-shadow: 0 14px 34px rgba(20,35,58,0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.story-tile--cover:hover {
  transform: translateY(-5px); border-color: rgba(31,111,120,0.22);
  box-shadow: 0 22px 42px rgba(20,35,58,0.14); color: inherit;
}
.story-tile__media {
  position: relative; display: block; flex: 0 0 auto; aspect-ratio: 4 / 3; overflow: hidden;
  background: linear-gradient(145deg, #1b2a4a, #255965);
}
.story-tile__media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  transition: transform 0.45s ease;
}
.story-tile--cover:hover .story-tile__media img { transform: scale(1.05); }
.story-tile__placeholder {
  display: block; width: 100%; height: 100%;
  background:
    radial-gradient(circle at 30% 20%, rgba(201,162,39,0.35), transparent 42%),
    linear-gradient(145deg, #1b2a4a, #255965);
}
.story-tile__badge {
  position: absolute; left: 0.75rem; top: 0.75rem; z-index: 1;
  padding: 0.22rem 0.65rem; border-radius: 999px;
  background: rgba(255,255,255,0.92); color: var(--teal);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em;
  box-shadow: 0 6px 16px rgba(20,35,58,0.12);
}
.story-tile__body {
  display: grid; flex: 1 1 auto;
  grid-template-rows: auto 1.5em auto auto;
  gap: 0.2rem; align-content: start;
  padding: 0.7rem 0.9rem 0.78rem; min-width: 0; overflow: hidden;
}
.story-tile--cover .story-tile__era {
  display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-family: var(--font-body); font-size: 0.78rem; line-height: 1.35; min-width: 0;
}
/* Updated: 2026-07-20 — Single-line title with ellipsis (Gowun Dodum; Dongle breaks ellipsis). */
.story-tile--cover .story-tile__title {
  display: block; box-sizing: border-box;
  width: 100%; max-width: 100%; min-width: 0;
  margin: 0; padding: 0;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  word-break: keep-all; overflow-wrap: normal;
  font-family: var(--font-body); font-size: 1.08rem; font-weight: 700;
  line-height: 1.4; height: 1.5em; max-height: 1.5em; letter-spacing: -0.02em;
  color: var(--ink);
}
.story-tile--cover .story-tile__meta {
  display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-family: var(--font-body); font-size: 0.82rem; line-height: 1.35; min-width: 0;
}
.story-tile__cta {
  align-self: start; margin-top: 0.15rem; padding-top: 0.15rem; color: var(--teal);
  font-size: 0.78rem; font-weight: 700; line-height: 1.35;
}
.story-tile--cover:hover .story-tile__cta { color: var(--navy); }
/* site.css — Story cover cards end */

/* site.css — Timeline page UI start — Updated: 2026-07-19, remove empty space and improve navigation */
.timeline-overview { max-width: var(--max); margin: 0 auto 1rem; padding: 0 1.1rem; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr); gap: 1rem; }
.timeline-overview__intro { position: relative; overflow: hidden; padding: 1.7rem 1.8rem; border-radius: 22px; color: #fff; background: linear-gradient(135deg, var(--navy), #255965); box-shadow: var(--shadow); }
.timeline-overview__intro::after { content: ""; position: absolute; width: 220px; height: 220px; right: -70px; bottom: -120px; border-radius: 50%; background: rgba(201, 162, 39, 0.2); }
.timeline-overview__eyebrow { display: inline-block; margin-bottom: 0.3rem; color: #f5d86e; font-size: 0.9rem; font-weight: 700; }
.timeline-overview__intro h2 { position: relative; z-index: 1; margin: 0; max-width: 15ch; font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1; }
.timeline-overview__intro p { position: relative; z-index: 1; max-width: 38rem; margin: 0.7rem 0 0; color: rgba(255,255,255,0.86); }
.timeline-stats { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.65rem; }
.timeline-stat { display: flex; min-width: 0; flex-direction: column; justify-content: center; align-items: center; padding: 1rem 0.5rem; border: 1px solid rgba(27,42,74,0.08); border-radius: 18px; background: rgba(255,255,255,0.82); box-shadow: 0 10px 24px rgba(20,35,58,0.07); text-align: center; }
.timeline-stat::before { content: ""; width: 28px; height: 4px; margin-bottom: 0.65rem; border-radius: 999px; background: var(--gold); }
.timeline-stat--old::before { background: var(--teal); }
.timeline-stat--new::before { background: #7d5fc7; }
.timeline-stat dt { color: var(--ink-soft); font-size: 0.83rem; font-weight: 700; }
.timeline-stat dd { margin: 0.15rem 0 0; color: var(--navy); font-family: var(--font-display); font-size: 2.5rem; font-weight: 700; line-height: 1; }
.timeline-stat small { margin-left: 0.1rem; font-family: var(--font-body); font-size: 0.8rem; }
/* site.css — Timeline era select start — Updated: 2026-07-19, prevent horizontal scrollbar */
.timeline-jump { max-width: var(--max); margin: 0 auto 0.6rem; padding: 1rem 1.1rem; display: flex; align-items: center; justify-content: flex-end; gap: 0.75rem; }
.timeline-jump__label { flex: 0 0 auto; color: var(--ink-soft); font-size: 0.88rem; font-weight: 700; }
.timeline-jump__select { width: min(100%, 360px); min-height: 46px; padding: 0.55rem 2.5rem 0.55rem 0.85rem; border: 1px solid rgba(31,111,120,0.22); border-radius: 12px; color: var(--navy); background-color: rgba(255,255,255,0.88); box-shadow: 0 6px 18px rgba(20,35,58,0.06); font-family: inherit; font-size: 0.95rem; font-weight: 700; cursor: pointer; }
.timeline-jump__select:focus { border-color: var(--teal); outline: 3px solid rgba(31,111,120,0.14); }
/* site.css — Timeline era select end */
.timeline { padding-bottom: 3rem; }
.timeline-era { scroll-margin-top: 5.5rem; margin: 1rem 0 1.4rem; padding: 1.25rem; border: 1px solid rgba(27,42,74,0.08); border-radius: 22px; background: rgba(255,255,255,0.68); box-shadow: 0 12px 30px rgba(20,35,58,0.07); }
.timeline-era__head { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 0.1rem 1.1rem; align-items: center; padding-bottom: 1rem; border-bottom: 1px solid rgba(27,42,74,0.08); }
.timeline-era__head > div { grid-row: 1 / span 2; }
.timeline-era__head h2 { margin: 0; font-family: var(--font-display); font-size: 2.4rem; line-height: 1; }
.timeline-era__head p { margin: 0.2rem 0 0; color: var(--ink-soft); }
.timeline-era__badge { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; background: rgba(31,111,120,0.12); color: var(--teal); font-size: 0.85rem; font-weight: 700; }
.timeline-era__count { margin-left: 0.25rem; color: var(--ink-soft); font-size: 0.84rem; font-weight: 700; }
.timeline-nodes { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
.timeline-node { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 0.12rem 0.75rem; height: 100%; min-height: 104px; padding: 0.9rem 1rem 0.8rem 1.15rem; overflow: hidden; border: 1px solid rgba(31,111,120,0.1); border-radius: 14px; background: rgba(255,255,255,0.76); color: inherit; text-decoration: none; transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
.timeline-node::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(180deg, var(--gold), var(--teal)); }
.timeline-node:hover { transform: translateY(-2px); border-color: rgba(31,111,120,0.24); box-shadow: 0 10px 22px rgba(20,35,58,0.1); color: inherit; }
.timeline-node__dot { position: absolute; left: -0.3rem; top: 1.15rem; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(201,162,39,0.2); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.18); }
  50% { box-shadow: 0 0 0 7px rgba(201, 162, 39, 0.08); }
}
.timeline-node__order { grid-row: 1 / span 3; min-width: 2.2rem; color: var(--teal); font-family: var(--font-display); font-size: 1.55rem; font-weight: 700; line-height: 1.1; }
.timeline-node__title { font-family: var(--font-display); font-size: 1.7rem; line-height: 1.05; font-weight: 700; }
.timeline-node__ref { grid-column: 2; color: var(--ink-soft); font-size: 0.92rem; }
.timeline-node__more { grid-column: 2; align-self: end; color: var(--teal); font-size: 0.83rem; font-weight: 700; }
/* site.css — Timeline page UI end */

.story-page { padding: 1.5rem 1.1rem 2rem; max-width: 820px; }
/* site.css — Related era stories full width start — Updated: 2026-07-20 */
.story-related { max-width: var(--max); padding-bottom: 2.5rem; }
.story-related__head { margin-bottom: 0.85rem; align-items: end; }
.story-related__head h2 { font-size: clamp(2.2rem, 5vw, 2.8rem); }
.story-related .story-grid--page { padding-left: 0; padding-right: 0; max-width: none; }
/* site.css — Related era stories full width end */
/* site.css — Story back link start — Updated: 2026-07-20 */
.story-back { margin: 0 0 0.75rem; }
.story-back a {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--teal); font-size: 0.95rem; font-weight: 700; text-decoration: none;
}
.story-back a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
/* site.css — Story back link end */

/* site.css — Story side arrows hidden — Updated: 2026-07-20 */
.story-side-nav { display: none !important; }
/* site.css — Story side arrows end */
.story-page__head h1 {
  font-family: var(--font-display); font-size: clamp(2.6rem, 7vw, 3.6rem);
  line-height: 1; margin: 0.2rem 0 0.5rem;
}
.story-page__meta { color: var(--ink-soft); margin: 0; }

.cut-stage {
  margin: 1.4rem 0 1.8rem; padding: 1rem; border-radius: 18px;
  background: linear-gradient(160deg, #1b2a4a, #255965);
  color: #fff; box-shadow: var(--shadow);
}
.cut-stage__frame { position: relative; }
.cut-panel { margin: 0; }
.cut-panel__art {
  position: relative; min-height: 180px; border-radius: 14px;
  display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(201,162,39,0.35), transparent 40%),
    linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.12);
}
/* Updated: 2026-07-18 — 이미지 잘림 방지: 프레임을 이미지 비율에 맞춰 표시(contain) */
.cut-panel__img {
  width: 100%; height: auto; max-height: 70vh; object-fit: contain; display: block;
  margin: 0 auto;
}
.cut-panel__num {
  font-family: var(--font-display); font-size: 2.4rem; opacity: 0.9;
}
.cut-panel figcaption { padding: 0.9rem 0.2rem 0.2rem; }
.cut-panel figcaption strong {
  display: block; font-family: var(--font-display); font-size: 1.8rem; line-height: 1.05;
}
.cut-panel figcaption p { margin: 0.35rem 0 0; color: rgba(255,255,255,0.86); }
.cut-stage__controls {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: 0.8rem;
}
.cut-stage__status { font-weight: 700; }
/* site.css — Cut-stage TTS icon overlay start — Updated: 2026-07-20 */
.cut-stage__tts {
  position: absolute; top: 0.7rem; right: 0.7rem; z-index: 4;
  display: flex; align-items: center; gap: 0.4rem;
  pointer-events: none;
}
.cut-tts-btn {
  pointer-events: auto; appearance: none; border: 0; cursor: pointer;
  width: 3rem; height: 3rem; border-radius: 50%;
  display: inline-grid; place-items: center;
  color: var(--navy); background: rgba(255,255,255,0.94);
  box-shadow: 0 8px 20px rgba(12, 24, 40, 0.28);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.cut-tts-btn i { font-size: 1.2rem; line-height: 1; }
.cut-tts-btn--main .fa-play { transform: translateX(1px); }
/* Updated: 2026-07-20 — Keep play/stop buttons the same size. */
.cut-tts-btn--main { color: #fff; background: var(--teal); }
.cut-tts-btn--stop { color: var(--navy); background: rgba(255,255,255,0.92); }
.cut-tts-btn:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 12px 24px rgba(12, 24, 40, 0.32); }
.cut-tts-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.cut-tts-btn.is-playing { background: #fff; color: var(--teal); }
.cut-tts-btn.is-paused { background: var(--gold); color: var(--navy); }
.cut-stage__tts.is-active .cut-tts-btn--main { box-shadow: 0 10px 22px rgba(31, 111, 120, 0.35); }
@media (max-width: 640px) {
  .cut-tts-btn { width: 2.75rem; height: 2.75rem; }
  .cut-tts-btn i { font-size: 1.1rem; }
  .cut-stage__tts { top: 0.55rem; right: 0.55rem; gap: 0.3rem; }
}
/* site.css — Cut-stage TTS icon overlay end */

.story-body__toolbar {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
}
.story-body__toolbar h2, .story-actions .badge-hint {
  font-family: var(--font-display); font-size: 2rem; margin: 0; line-height: 1;
}
.text-link { font-weight: 700; }
.prose { font-size: 1.12rem; }
.prose p { margin: 0 0 1rem; }
.prose--advanced {
  margin-top: 1.2rem; padding: 1rem; border-radius: 12px;
  background: rgba(158, 200, 216, 0.22); border: 1px dashed rgba(31, 111, 120, 0.35);
}
.prose--advanced h3 { margin-top: 0; font-family: var(--font-display); font-size: 1.8rem; }

.story-actions { margin: 1.5rem 0; display: grid; gap: 0.6rem; justify-items: start; }
.badge-hint { color: var(--ink-soft); font-size: 1.5rem !important; }
/* site.css — Story pager with list link start — Updated: 2026-07-20 */
.story-pager {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.75rem;
  margin: 1.5rem 0; padding-top: 1rem; border-top: 1px solid rgba(27, 42, 74, 0.1);
}
.story-pager a { font-weight: 700; text-decoration: none; color: var(--navy); }
.story-pager__prev, .story-pager__next {
  display: inline-flex; align-items: center; gap: 0.55rem; min-width: 0;
}
.story-pager__prev { justify-self: start; }
.story-pager__next { justify-self: end; text-align: right; }
.story-pager__prev span, .story-pager__next span { display: grid; gap: 0.1rem; min-width: 0; }
.story-pager__prev em, .story-pager__next em {
  font-style: normal; font-size: 0.8rem; color: var(--ink-soft); font-weight: 700;
}
.story-pager__prev strong, .story-pager__next strong {
  font-size: 0.95rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14rem;
}
.story-pager__list {
  display: inline-flex; align-items: center; gap: 0.4rem; justify-self: center;
  padding: 0.45rem 0.9rem; border-radius: 999px; border: 1px solid rgba(27, 42, 74, 0.12);
  background: #fff; color: var(--teal); white-space: nowrap;
}
.story-pager__list:hover { background: var(--teal); color: #fff; }
.story-pager__empty { display: block; }
.story-pager a:hover { color: var(--teal); }
.story-pager__list:hover { color: #fff; }
@media (max-width: 640px) {
  .story-pager { grid-template-columns: 1fr; gap: 0.55rem; }
  .story-pager__prev, .story-pager__next, .story-pager__list { justify-self: stretch; }
  .story-pager__next { text-align: left; flex-direction: row-reverse; justify-content: flex-end; }
  .story-pager__prev strong, .story-pager__next strong { max-width: none; white-space: normal; }
  .story-pager__list { justify-content: center; }
}
/* site.css — Story pager with list link end */

.quiz-form, .result-list { max-width: 720px; padding-bottom: 2.5rem; }
.quiz-card {
  margin: 0 0 1rem; padding: 1rem 1.05rem 1.1rem;
  border: 1px solid rgba(27, 42, 74, 0.1); border-radius: var(--radius);
  background: rgba(255,255,255,0.85);
}
.quiz-card legend {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; padding: 0 0.25rem;
}
.quiz-card__prompt { margin: 0.4rem 0 0.8rem; font-size: 1.12rem; }
.quiz-options { display: grid; gap: 0.45rem; }
.quiz-option {
  display: flex; align-items: flex-start; gap: 0.55rem;
  padding: 0.65rem 0.75rem; border-radius: 10px; background: #f7fafc;
  border: 1px solid rgba(27, 42, 74, 0.08); cursor: pointer;
}
.quiz-option:has(input:checked) {
  border-color: var(--teal); background: rgba(31, 111, 120, 0.08);
}
.order-list { margin: 0 0 0.8rem; padding-left: 1.2rem; }
.order-input { display: grid; gap: 0.35rem; font-weight: 700; }
.order-input input {
  min-height: 44px; border-radius: 10px; border: 1px solid rgba(27,42,74,0.18);
  padding: 0.4rem 0.7rem; font-family: inherit; font-size: 1rem;
}
.quiz-submit {
  display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1rem;
}

.score-line { font-family: var(--font-display); font-size: 2rem; margin: 0.4rem 0; }
.score-line__num { font-size: 3.4rem; color: var(--teal); font-weight: 700; }
.badge-win {
  display: inline-block; margin: 0.4rem 0 0; padding: 0.45rem 0.85rem;
  border-radius: 999px; background: rgba(201, 162, 39, 0.2); font-weight: 700;
}
.result-list { list-style: none; margin: 0 auto; padding-left: 1.1rem; padding-right: 1.1rem; }
.result-item {
  margin-bottom: 0.8rem; padding: 0.9rem 1rem; border-radius: 12px;
  background: #fff; border: 1px solid rgba(27,42,74,0.08);
}
.result-item.is-correct { border-left: 4px solid var(--ok); }
.result-item.is-wrong { border-left: 4px solid var(--danger); }
.result-item__status { margin: 0; font-weight: 700; }
.result-item.is-correct .result-item__status { color: var(--ok); }
.result-item.is-wrong .result-item__status { color: var(--danger); }
.result-item__prompt { margin: 0.25rem 0; }
.result-item__meta, .result-item__explain { margin: 0.2rem 0 0; color: var(--ink-soft); font-size: 0.95rem; }

/* site.css — Quiz polished UI start — Updated: 2026-07-19 */
.quiz-hero {
  max-width: 820px; margin: 1.2rem auto 1rem; padding: 0 1.1rem;
  display: grid; grid-template-columns: minmax(180px, 0.85fr) minmax(0, 1.15fr); gap: 1rem; align-items: stretch;
}
.quiz-hero__media {
  min-height: 210px; overflow: hidden; border-radius: 22px;
  background: linear-gradient(145deg, #1b2a4a, #255965);
  box-shadow: 0 16px 36px rgba(20,35,58,0.14);
}
.quiz-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.quiz-hero__placeholder { display: block; width: 100%; height: 100%; min-height: 210px; }
.quiz-hero__copy {
  display: flex; flex-direction: column; justify-content: center; gap: 0.35rem;
  padding: 1.2rem 1.3rem; border-radius: 22px;
  background: rgba(255,255,255,0.86); border: 1px solid rgba(27,42,74,0.08);
  box-shadow: 0 14px 34px rgba(20,35,58,0.07);
}
.quiz-hero__copy h1 {
  margin: 0; font-family: var(--font-display); font-size: clamp(2.3rem, 5vw, 3.2rem); line-height: 0.95;
}
.quiz-hero__lead { margin: 0.15rem 0 0; color: var(--ink-soft); }
.quiz-hero__meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.55rem; }
.quiz-hero__meta span {
  display: inline-flex; padding: 0.2rem 0.65rem; border-radius: 999px;
  background: rgba(31,111,120,0.1); color: var(--teal); font-size: 0.8rem; font-weight: 700;
}
.quiz-progress {
  max-width: 720px; margin: 0 auto 1rem; padding: 0.85rem 1rem;
  border-radius: 16px; background: rgba(255,255,255,0.82);
  border: 1px solid rgba(27,42,74,0.08); box-shadow: 0 10px 24px rgba(20,35,58,0.06);
}
.quiz-progress__head {
  display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; margin-bottom: 0.45rem;
  color: var(--ink-soft); font-size: 0.88rem; font-weight: 700;
}
.quiz-progress__head strong { color: var(--navy); font-family: var(--font-display); font-size: 1.55rem; line-height: 1; }
.quiz-progress__track {
  height: 10px; overflow: hidden; border-radius: 999px; background: rgba(31,111,120,0.12);
}
.quiz-progress__bar {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  transition: width 0.25s ease;
}
.quiz-form { max-width: 720px; }
.quiz-card {
  margin: 0 0 0.9rem; padding: 1.15rem 1.15rem 1.2rem; border-radius: 20px;
  border: 1px solid rgba(27,42,74,0.08); background: rgba(255,255,255,0.9);
  box-shadow: 0 12px 28px rgba(20,35,58,0.06);
}
.quiz-card__head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.35rem; }
.quiz-card__num {
  display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: linear-gradient(145deg, var(--navy), #255965); color: #fff;
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; line-height: 1;
}
.quiz-card legend {
  float: none; width: auto; margin: 0; padding: 0;
  font-family: var(--font-display); font-size: 1.55rem; font-weight: 700; color: var(--navy);
}
.quiz-card__prompt { margin: 0.45rem 0 0.95rem; font-size: 1.12rem; line-height: 1.55; }
.quiz-options { display: grid; gap: 0.55rem; }
.quiz-options--ox { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.quiz-option {
  position: relative; display: flex; align-items: center; gap: 0.7rem;
  min-height: 56px; padding: 0.8rem 0.9rem; border-radius: 14px;
  background: #f6fafb; border: 1px solid rgba(27,42,74,0.08); cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.quiz-option:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(20,35,58,0.08); }
.quiz-option input {
  position: absolute; opacity: 0; pointer-events: none;
}
.quiz-option:has(input:checked) {
  border-color: rgba(31,111,120,0.45); background: rgba(31,111,120,0.1);
  box-shadow: 0 0 0 3px rgba(31,111,120,0.08);
}
.quiz-option:has(input:focus-visible) {
  outline: 3px solid rgba(31,111,120,0.22); outline-offset: 2px;
}
.quiz-option__key, .quiz-option__mark {
  display: grid; place-items: center; flex: 0 0 auto;
  width: 2rem; height: 2rem; border-radius: 50%;
  background: rgba(255,255,255,0.95); color: var(--teal);
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(31,111,120,0.12);
}
.quiz-option--ox {
  flex-direction: column; justify-content: center; gap: 0.25rem;
  min-height: 118px; text-align: center;
}
.quiz-option--ox .quiz-option__mark {
  width: 3.2rem; height: 3.2rem; font-size: 2.1rem;
}
.quiz-option--o:has(input:checked) {
  border-color: rgba(27,122,74,0.45); background: rgba(27,122,74,0.1);
  box-shadow: 0 0 0 3px rgba(27,122,74,0.08);
}
.quiz-option--o:has(input:checked) .quiz-option__mark { color: var(--ok); }
.quiz-option--x:has(input:checked) {
  border-color: rgba(180,35,24,0.4); background: rgba(180,35,24,0.08);
  box-shadow: 0 0 0 3px rgba(180,35,24,0.07);
}
.quiz-option--x:has(input:checked) .quiz-option__mark { color: var(--danger); }
.quiz-option__text { font-weight: 700; }
.order-list {
  list-style: none; margin: 0 0 0.85rem; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem;
}
.order-list li {
  padding: 0.65rem 0.8rem; border-radius: 12px;
  background: rgba(31,111,120,0.07); color: var(--navy); font-weight: 700;
}
.order-input { display: grid; gap: 0.35rem; font-weight: 700; }
.order-input input {
  min-height: 48px; border-radius: 12px; border: 1px solid rgba(27,42,74,0.18);
  padding: 0.45rem 0.8rem; font-family: inherit; font-size: 1rem; background: #fff;
}
.order-input input:focus { border-color: var(--teal); outline: 3px solid rgba(31,111,120,0.12); }
.quiz-submit {
  display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.1rem; margin-bottom: 2rem;
}
.quiz-submit--inline { margin: 0.85rem 0 0; }
.quiz-result-hero {
  max-width: 820px; margin: 1.2rem auto 1.2rem; padding: 0 1.1rem;
  display: grid; grid-template-columns: minmax(180px, 0.75fr) minmax(0, 1.25fr); gap: 1rem;
}
.quiz-result-hero__score {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  min-height: 220px; padding: 1.3rem; border-radius: 24px; text-align: center; color: #fff;
  background: linear-gradient(145deg, var(--navy), #255965);
  box-shadow: 0 18px 40px rgba(20,35,58,0.16);
}
.quiz-result-hero.is-perfect .quiz-result-hero__score {
  background: linear-gradient(145deg, #1b5c3d, #2f8f5b);
}
.quiz-result-hero.is-retry .quiz-result-hero__score {
  background: linear-gradient(145deg, #5a2e2a, #8a4a3d);
}
.quiz-result-hero__label { font-size: 0.88rem; font-weight: 700; opacity: 0.9; }
.quiz-result-hero .score-line { margin: 0.2rem 0; color: #fff; }
.quiz-result-hero .score-line__num { font-size: clamp(3.4rem, 8vw, 4.6rem); color: #fff; line-height: 0.9; }
.score-line__unit { margin-left: 0.1rem; font-size: 1.5rem; }
.quiz-result-hero__ratio { margin: 0; opacity: 0.9; font-weight: 700; }
.quiz-result-hero__copy {
  display: flex; flex-direction: column; justify-content: center; gap: 0.35rem;
  padding: 1.25rem 1.35rem; border-radius: 24px;
  background: rgba(255,255,255,0.88); border: 1px solid rgba(27,42,74,0.08);
  box-shadow: 0 14px 34px rgba(20,35,58,0.07);
}
.quiz-result-hero__copy h1 {
  margin: 0; font-family: var(--font-display); font-size: clamp(2.2rem, 5vw, 3rem); line-height: 0.95;
}
.badge-win {
  display: inline-flex; align-items: center; width: fit-content;
  margin: 0.2rem 0 0; padding: 0.45rem 0.9rem; border-radius: 999px;
  background: rgba(201,162,39,0.22); color: var(--navy); font-weight: 700;
}
.result-list { max-width: 720px; list-style: none; margin: 0 auto 2.4rem; padding: 0 1.1rem; }
.result-item {
  margin-bottom: 0.75rem; padding: 1rem 1.05rem; border-radius: 18px;
  background: rgba(255,255,255,0.92); border: 1px solid rgba(27,42,74,0.08);
  box-shadow: 0 10px 24px rgba(20,35,58,0.05);
}
.result-item.is-correct { border-left: 5px solid var(--ok); }
.result-item.is-wrong { border-left: 5px solid var(--danger); }
.result-item__head { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.25rem; }
.result-item__num {
  display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: rgba(27,42,74,0.08); color: var(--navy);
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; line-height: 1;
}
.result-item__status { margin: 0; font-weight: 700; }
.result-item.is-correct .result-item__status { color: var(--ok); }
.result-item.is-wrong .result-item__status { color: var(--danger); }
.result-item__prompt { margin: 0.2rem 0 0.55rem; font-size: 1.05rem; }
.result-item__answers {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem;
}
.result-item__answers span {
  display: block; padding: 0.55rem 0.7rem; border-radius: 12px;
  background: rgba(31,111,120,0.07); color: var(--ink-soft); font-size: 0.92rem;
}
.result-item__answers strong { display: block; margin-bottom: 0.15rem; color: var(--navy); font-size: 0.78rem; }
.result-item__explain {
  margin: 0.55rem 0 0; padding: 0.65rem 0.75rem; border-radius: 12px;
  background: rgba(201,162,39,0.12); color: var(--ink-soft); font-size: 0.95rem;
}
.quiz-empty { max-width: 720px; margin: 2rem auto; padding: 0 1.1rem; }
.quiz-empty__card {
  padding: 2rem 1.5rem; border-radius: 24px; text-align: center;
  background: rgba(255,255,255,0.88); border: 1px solid rgba(27,42,74,0.08);
  box-shadow: 0 16px 36px rgba(20,35,58,0.08);
}
.quiz-empty__card h1 {
  margin: 0.2rem 0 0.55rem; font-family: var(--font-display); font-size: 2.8rem; line-height: 1;
}
.quiz-empty__card .quiz-submit { justify-content: center; }
/* site.css — Quiz polished UI end */

.site-footer {
  margin-top: 1rem; padding: 2rem 1.1rem; text-align: center;
  border-top: 1px solid rgba(27, 42, 74, 0.08); color: var(--ink-soft);
}
.site-footer p { margin: 0.25rem 0; }

/* Phase 2 — search, characters, auth, learning */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.header-search {
  display: flex; flex: 1; max-width: 280px; gap: 0.35rem; margin: 0 0.5rem;
}
.header-search input {
  flex: 1; min-width: 0; min-height: 38px; border-radius: 999px;
  border: 1px solid rgba(27,42,74,0.15); padding: 0.3rem 0.85rem;
  font-family: inherit; background: #fff;
}
.header-search button {
  border: 0; border-radius: 999px; padding: 0 0.85rem; cursor: pointer;
  background: var(--navy); color: #fff; font-family: inherit; font-weight: 700;
}
.flash-list {
  list-style: none; max-width: var(--max); margin: 0.6rem auto 0; padding: 0 1.1rem;
}
.flash {
  margin: 0.3rem 0; padding: 0.65rem 0.9rem; border-radius: 10px;
  background: rgba(31, 111, 120, 0.12); font-weight: 700;
}
.flash--error, .flash--warning { background: rgba(180, 35, 24, 0.1); }
.flash--success { background: rgba(27, 122, 74, 0.12); }

.char-grid, .badge-grid {
  list-style: none; max-width: var(--max); margin: 0 auto 2rem; padding: 0 1.1rem;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem;
}
.char-tile, .badge-chip {
  display: flex; flex-direction: column; gap: 0.25rem;
  padding: 0.95rem 1rem; border-radius: var(--radius); text-decoration: none; color: inherit;
  background: rgba(255,255,255,0.82); border: 1px solid rgba(27,42,74,0.08);
}
.char-tile:hover { box-shadow: var(--shadow); color: inherit; transform: translateY(-2px); transition: 0.15s ease; }
.char-tile__name {
  font-family: var(--font-display); font-size: 1.9rem; line-height: 1; font-weight: 700;
}
.char-tile__meta { color: var(--ink-soft); font-size: 0.92rem; }
.badge-chip strong { font-family: var(--font-display); font-size: 1.55rem; line-height: 1.05; }
.badge-chip span { color: var(--ink-soft); font-size: 0.9rem; }

/* site.css — Character page UI start — Updated: 2026-07-19 */
.page-head--characters { padding-bottom: 0.5rem; }
.page-head--characters p strong { color: var(--teal); }
.char-overview {
  max-width: var(--max); margin: 0 auto 1.2rem; padding: 0 1.1rem;
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr); gap: 0.85rem;
}
.char-overview__card, .char-overview__hint {
  position: relative; overflow: hidden; border-radius: 20px;
  border: 1px solid rgba(27,42,74,0.08); box-shadow: 0 12px 28px rgba(20,35,58,0.07);
}
.char-overview__card {
  padding: 1.4rem 1.5rem; color: #fff;
  background: linear-gradient(135deg, var(--navy), #255965);
}
.char-overview__card::after {
  content: ""; position: absolute; width: 180px; height: 180px; right: -50px; bottom: -90px;
  border-radius: 50%; background: rgba(201,162,39,0.2);
}
.char-overview__eyebrow { display: inline-block; margin-bottom: 0.25rem; color: #f5d86e; font-size: 0.86rem; font-weight: 700; }
.char-overview__card h2 { position: relative; z-index: 1; margin: 0; max-width: 14ch; font-family: var(--font-display); font-size: clamp(1.9rem, 3.5vw, 2.5rem); line-height: 1; }
.char-overview__card p { position: relative; z-index: 1; margin: 0.65rem 0 0; max-width: 34rem; color: rgba(255,255,255,0.88); }
.char-overview__hint {
  display: flex; flex-direction: column; justify-content: center; gap: 0.2rem;
  padding: 1.2rem 1.15rem; background: rgba(255,255,255,0.82);
}
.char-overview__hint span { color: var(--teal); font-size: 0.82rem; font-weight: 700; }
.char-overview__hint strong { font-family: var(--font-display); font-size: 2rem; line-height: 1; color: var(--navy); }
.char-overview__hint p { margin: 0.2rem 0 0; color: var(--ink-soft); font-size: 0.9rem; }
.char-grid--page { gap: 1rem; padding-bottom: 2.4rem; }
.char-tile--cover {
  align-items: stretch; min-height: 0; padding: 0; overflow: hidden; text-align: left;
  background: rgba(255,255,255,0.92); border-radius: 20px;
  box-shadow: 0 14px 34px rgba(20,35,58,0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.char-tile--cover:hover {
  transform: translateY(-5px); border-color: rgba(31,111,120,0.22);
  box-shadow: 0 22px 42px rgba(20,35,58,0.14); color: inherit;
}
.char-tile__media {
  position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden;
  background: linear-gradient(145deg, #1b2a4a, #255965);
}
.char-tile__media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  transition: transform 0.45s ease;
}
.char-tile--cover:hover .char-tile__media img { transform: scale(1.05); }
.char-tile__monogram {
  display: grid; place-items: center; width: 4.4rem; height: 4.4rem; border-radius: 50%;
  background: rgba(255,255,255,0.16); color: #fff;
  font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; line-height: 1;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.22);
}
.char-tile--accent-0 .char-tile__media, .char-hero.char-tile--accent-0 .char-hero__media { background: linear-gradient(145deg, #1b2a4a, #255965); }
.char-tile--accent-1 .char-tile__media, .char-hero.char-tile--accent-1 .char-hero__media { background: linear-gradient(145deg, #23405f, #3d7a73); }
.char-tile--accent-2 .char-tile__media, .char-hero.char-tile--accent-2 .char-hero__media { background: linear-gradient(145deg, #2a3558, #7a6a3a); }
.char-tile--accent-3 .char-tile__media, .char-hero.char-tile--accent-3 .char-hero__media { background: linear-gradient(145deg, #1f3b4d, #4f6f8f); }
.char-tile--accent-4 .char-tile__media, .char-hero.char-tile--accent-4 .char-hero__media { background: linear-gradient(145deg, #243447, #6b5a3d); }
.char-tile__count {
  position: absolute; left: 0.7rem; top: 0.7rem; z-index: 1;
  padding: 0.2rem 0.6rem; border-radius: 999px;
  background: rgba(255,255,255,0.92); color: var(--teal);
  font-size: 0.74rem; font-weight: 700; box-shadow: 0 6px 16px rgba(20,35,58,0.12);
}
.char-tile__body {
  display: flex; flex: 1; flex-direction: column; gap: 0.14rem;
  padding: 0.7rem 0.9rem 0.8rem;
}
.char-tile--cover .char-tile__name { font-size: 1.7rem; line-height: 1; }
.char-tile--cover .char-tile__meta { font-size: 0.82rem; }
.char-tile__cta {
  margin-top: auto; padding-top: 0.28rem; color: var(--teal);
  font-size: 0.78rem; font-weight: 700;
}
.char-tile--cover:hover .char-tile__cta { color: var(--navy); }
.char-hero {
  max-width: var(--max); margin: 1.2rem auto 0.4rem; padding: 0 1.1rem;
  display: grid; grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.1fr); gap: 1rem; align-items: stretch;
}
.char-hero__media {
  position: relative; min-height: 240px; overflow: hidden; border-radius: 24px;
  display: grid; place-items: center; box-shadow: 0 18px 40px rgba(20,35,58,0.14);
}
.char-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.char-hero__monogram {
  display: grid; place-items: center; width: 6.2rem; height: 6.2rem; border-radius: 50%;
  background: rgba(255,255,255,0.16); color: #fff;
  font-family: var(--font-display); font-size: 3.6rem; font-weight: 700; line-height: 1;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.22);
}
.char-hero__copy {
  display: flex; flex-direction: column; justify-content: center; gap: 0.35rem;
  padding: 1.2rem 1.3rem; border-radius: 24px;
  background: rgba(255,255,255,0.82); border: 1px solid rgba(27,42,74,0.08);
  box-shadow: 0 14px 34px rgba(20,35,58,0.07);
}
.char-hero__copy h1 {
  margin: 0; font-family: var(--font-display); font-size: clamp(2.6rem, 6vw, 3.6rem); line-height: 0.95;
}
.char-hero__lead { margin: 0.2rem 0 0; color: var(--ink-soft); max-width: 38rem; }
.char-hero__stats {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem; margin-top: 0.7rem;
}
.char-hero__stats > div {
  display: flex; flex-direction: column; min-width: 96px; padding: 0.55rem 0.8rem;
  border-radius: 14px; background: rgba(31,111,120,0.08);
}
.char-hero__stats strong {
  font-family: var(--font-display); font-size: 2.1rem; line-height: 1; color: var(--teal);
}
.char-hero__stats span { color: var(--ink-soft); font-size: 0.82rem; font-weight: 700; }
/* site.css — My learning page UI start — Updated: 2026-07-21 */
.learning-page { padding-bottom: 2rem; }
.char-hero__stats--dashboard { margin-top: 0.35rem; gap: 0.55rem; }
.char-hero__stats--dashboard > div { flex: 1; min-width: 0; }
.quiz-hero--link {
  display: grid; text-decoration: none; color: inherit;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.quiz-hero--link:hover { transform: translateY(-3px); color: inherit; }
.quiz-hero--link .quiz-hero__copy { gap: 0.2rem; }
.quiz-hero--link .quiz-hero__title {
  font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1; color: var(--navy);
}
.grade-mode-panel {
  max-width: var(--max); margin: 0 auto 1.5rem; padding: 0.95rem 1.1rem;
  border: 1px solid rgba(27,42,74,0.08); border-radius: 18px;
  background: rgba(255,255,255,0.72); box-shadow: 0 10px 28px rgba(20,35,58,0.06);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; align-items: stretch;
}
.grade-mode-option {
  position: relative; display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: center;
  padding: 0.95rem 1rem; border-radius: 16px; cursor: pointer;
  background: #fff; border: 2px solid rgba(27,42,74,0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.grade-mode-option:hover { border-color: rgba(31,111,120,0.22); transform: translateY(-2px); }
.grade-mode-option.is-active { border-color: rgba(31,111,120,0.45); box-shadow: 0 10px 24px rgba(20,35,58,0.08); }
.grade-mode-option input { position: absolute; opacity: 0; pointer-events: none; }
.grade-mode-option__icon {
  display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: rgba(31,111,120,0.1); color: var(--teal); font-size: 1.05rem;
}
.grade-mode-option.is-active .grade-mode-option__icon { background: rgba(31,111,120,0.18); color: var(--navy); }
.grade-mode-option__body strong { display: block; font-size: 1.02rem; color: var(--navy); margin-bottom: 0.1rem; }
.grade-mode-option__body > span { display: block; color: var(--ink-soft); font-size: 0.86rem; line-height: 1.45; font-weight: 400; }
.grade-mode-panel__submit { grid-column: 1 / -1; justify-self: start; min-width: 120px; }
.grade-mode-panel--inline {
  max-width: none; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none;
  grid-template-columns: repeat(2, minmax(120px, 1fr)); gap: 0.5rem;
}
.grade-mode-panel--inline .grade-mode-option { padding: 0.55rem 0.65rem; border-radius: 12px; }
.grade-mode-panel--inline .grade-mode-option__icon { width: 2rem; height: 2rem; font-size: 0.9rem; }
.grade-mode-panel--inline .grade-mode-option__body strong { font-size: 0.92rem; }
.grade-mode-panel--inline .grade-mode-option__body > span { font-size: 0.76rem; }
.account-settings {
  max-width: var(--max); margin: 0 auto 1.5rem; padding: 0 1.1rem;
}
.account-settings-card {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.85rem;
  padding: 1rem 1.15rem; border-radius: 18px;
  background: rgba(255,255,255,0.88); border: 1px solid rgba(27,42,74,0.08);
  box-shadow: 0 10px 28px rgba(20,35,58,0.06);
}
.account-settings-card__copy strong { display: block; color: var(--navy); font-size: 1.02rem; margin-bottom: 0.12rem; }
.account-settings-card__copy span { color: var(--ink-soft); font-size: 0.88rem; }
.account-settings .btn i, .account-settings-card .btn i { margin-right: 0.35rem; }
.story-body__toolbar .grade-toggle { flex: 1; max-width: 360px; }
.badge-grid--page { gap: 1rem; padding-bottom: 2.4rem; }
.badge-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
  padding: 1.15rem 1rem 1.05rem; border-radius: 20px; text-align: center;
  background: rgba(255,255,255,0.92); border: 1px solid rgba(27,42,74,0.08);
  box-shadow: 0 14px 34px rgba(20,35,58,0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.badge-card:hover { transform: translateY(-5px); box-shadow: 0 22px 42px rgba(20,35,58,0.14); }
.badge-card__medal {
  position: relative; display: grid; place-items: center; width: 5.2rem; height: 5.2rem;
  border-radius: 50%; color: #fff;
  background: radial-gradient(circle at 30% 25%, #ffe9a8 0%, #d4a82a 42%, #9a7618 100%);
  box-shadow: 0 10px 24px rgba(154,118,24,0.28), inset 0 2px 8px rgba(255,255,255,0.35);
}
.badge-card__medal img { width: 3rem; height: 3rem; object-fit: contain; border-radius: 50%; }
.badge-card__icon { font-size: 2rem; line-height: 1; filter: drop-shadow(0 2px 4px rgba(60,40,0,0.25)); }
.badge-card__shine {
  position: absolute; inset: 8% 18% auto auto; width: 28%; height: 28%; border-radius: 50%;
  background: rgba(255,255,255,0.45); transform: rotate(-18deg);
}
.badge-card--accent-0 .badge-card__medal { background: radial-gradient(circle at 30% 25%, #ffe9a8 0%, #d4a82a 42%, #9a7618 100%); }
.badge-card--accent-1 .badge-card__medal { background: radial-gradient(circle at 30% 25%, #d8f0ff 0%, #5a9fd4 42%, #2a5f8f 100%); box-shadow: 0 10px 24px rgba(42,95,143,0.25), inset 0 2px 8px rgba(255,255,255,0.35); }
.badge-card--accent-2 .badge-card__medal { background: radial-gradient(circle at 30% 25%, #d8f5ea 0%, #3d9a72 42%, #1f6f4a 100%); box-shadow: 0 10px 24px rgba(31,111,74,0.25), inset 0 2px 8px rgba(255,255,255,0.35); }
.badge-card--accent-3 .badge-card__medal { background: radial-gradient(circle at 30% 25%, #f0e0ff 0%, #9a6fd4 42%, #5a3d8f 100%); box-shadow: 0 10px 24px rgba(90,61,143,0.25), inset 0 2px 8px rgba(255,255,255,0.35); }
.badge-card--accent-4 .badge-card__medal { background: radial-gradient(circle at 30% 25%, #ffd8d8 0%, #d46f6f 42%, #8f3d3d 100%); box-shadow: 0 10px 24px rgba(143,61,61,0.25), inset 0 2px 8px rgba(255,255,255,0.35); }
.badge-card__body { display: flex; flex-direction: column; gap: 0.18rem; width: 100%; }
.badge-card__name { font-family: var(--font-display); font-size: 1.65rem; line-height: 1.05; color: var(--navy); }
.badge-card__story { color: var(--ink-soft); font-size: 0.86rem; line-height: 1.4; }
.badge-card__date { margin-top: 0.15rem; color: var(--teal); font-size: 0.76rem; font-weight: 700; }
.badge-grid--compact { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.55rem; }
.badge-card--compact {
  gap: 0.35rem; padding: 0.55rem 0.35rem 0.5rem; border-radius: 14px;
  box-shadow: 0 8px 18px rgba(20,35,58,0.06);
}
.badge-card--compact:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(20,35,58,0.1); }
.badge-card--compact .badge-card__medal { width: 2.6rem; height: 2.6rem; box-shadow: 0 6px 14px rgba(154,118,24,0.22), inset 0 1px 5px rgba(255,255,255,0.35); }
.badge-card--compact .badge-card__medal img { width: 1.55rem; height: 1.55rem; }
.badge-card--compact .badge-card__icon { font-size: 1.15rem; }
.badge-card--compact .badge-card__name {
  font-size: 0.92rem; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.badge-card--compact .badge-card__date { margin-top: 0; font-size: 0.68rem; }
.badge-pager {
  max-width: var(--max); margin: 0 auto 1rem; padding: 0 1.1rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.65rem;
}
.badge-pager__status { color: var(--ink-soft); font-size: 0.92rem; font-weight: 700; }
/* site.css — My learning page UI end */

.search-panel {
  display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.8rem;
}
.search-panel input {
  flex: 1; min-width: 200px; min-height: 46px; border-radius: 999px;
  border: 1px solid rgba(27,42,74,0.18); padding: 0.4rem 1rem; font-family: inherit; font-size: 1rem;
}

.auth-form, .grade-form {
  max-width: 420px; margin: 0 auto 2.5rem; padding: 0 1.1rem;
  display: grid; gap: 0.85rem;
}
.auth-form label, .grade-form { font-weight: 700; }
.auth-form input {
  display: block; width: 100%; margin-top: 0.3rem; min-height: 44px;
  border-radius: 10px; border: 1px solid rgba(27,42,74,0.18);
  padding: 0.4rem 0.7rem; font-family: inherit; font-size: 1rem;
}
.form-errors, .field-error { color: var(--danger); font-size: 0.92rem; font-weight: 700; }
.stats-row {
  max-width: var(--max); margin: 0 auto 1rem; padding: 0 1.1rem;
  display: flex; flex-wrap: wrap; gap: 0.7rem;
}
.stat-pill {
  display: flex; flex-direction: column; gap: 0.1rem;
  min-width: 120px; padding: 0.85rem 1rem; border-radius: 14px;
  background: rgba(255,255,255,0.85); border: 1px solid rgba(27,42,74,0.08);
}
.stat-pill strong {
  font-family: var(--font-display); font-size: 2.4rem; line-height: 1; color: var(--teal);
}
.stat-pill span { color: var(--ink-soft); font-size: 0.92rem; }

.text-link-btn {
  border: 0; background: none; color: var(--teal); font-family: inherit;
  font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 0;
}
.grade-toggle { display: flex; align-items: center; }
.action-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
/* site.css — Teacher curriculum UI start — Updated: 2026-07-20 */
.curricula-page {
  position: relative;
  padding-bottom: 3.5rem;
  background:
    radial-gradient(900px 420px at 8% -5%, rgba(158, 200, 216, 0.45), transparent 58%),
    radial-gradient(700px 380px at 96% 8%, rgba(201, 162, 39, 0.16), transparent 52%),
    linear-gradient(180deg, rgba(215, 234, 242, 0.55) 0%, transparent 42%);
}
.curricula-hero {
  max-width: 920px;
  margin: 0 auto;
  padding: 2.6rem 1.25rem 1.6rem;
}
.curricula-hero__inner { max-width: 640px; }
.curricula-hero__brand {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  line-height: 0.9;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.curricula-hero__eyebrow {
  margin: 0 0 0.55rem;
  color: var(--teal);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
}
.curricula-hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 4.2rem);
  line-height: 0.92;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.curricula-hero__lead {
  margin: 0.9rem 0 0;
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.75;
}
.curricula-hero__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.2rem;
  align-items: center;
  margin-top: 1.25rem;
}
.curricula-hero__stat {
  color: var(--ink-soft);
  font-weight: 700;
}
.curricula-hero__stat em {
  font-style: normal;
  font-family: var(--font-display);
  font-size: 1.85rem;
  line-height: 1;
  color: var(--teal);
  margin-right: 0.15rem;
}

.curricula-board {
  max-width: 980px;
  margin: 0 auto;
  padding: 0.4rem 1.1rem 0;
}
.curricula-board__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.curricula-board__list > li {
  animation: curriculaRise 0.7s ease both;
  animation-delay: calc(var(--i, 0) * 55ms);
}
.curricula-pack {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem 1.2rem;
  align-items: center;
  padding: 1.15rem 1.25rem;
  text-decoration: none;
  color: inherit;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(27, 42, 74, 0.08);
  backdrop-filter: blur(8px);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.curricula-pack:hover {
  transform: translateY(-2px);
  color: inherit;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(31, 111, 120, 0.28);
}
.curricula-pack__index {
  font-family: var(--font-display);
  font-size: 2.35rem;
  line-height: 1;
  font-weight: 700;
  color: rgba(27, 42, 74, 0.28);
  min-width: 2.4rem;
}
.curricula-pack:hover .curricula-pack__index { color: var(--teal); }
.curricula-pack__body { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.curricula-pack__audience {
  color: var(--teal);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}
.curricula-pack__title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.5vw, 2.15rem);
  line-height: 1.05;
  font-weight: 700;
  color: var(--ink);
}
.curricula-pack__summary {
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.55;
}
.curricula-pack__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.05rem;
  text-align: right;
  min-width: 4.2rem;
}
.curricula-pack__weeks {
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 0.9;
  font-weight: 700;
  color: var(--navy);
}
.curricula-pack__weeks-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.curricula-pack__go {
  margin-top: 0.35rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--teal);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.curricula-pack:hover .curricula-pack__go { opacity: 1; transform: translateX(0); }

.curricula-flow {
  max-width: 980px;
  margin: 0.4rem auto 1.6rem;
  padding: 0 1.1rem;
}
.curricula-flow__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.85rem;
  line-height: 1;
  color: var(--navy);
}
.curricula-flow__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}
.curricula-flow__steps li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 0.2rem 0.85rem 0;
  border-top: 2px solid rgba(31, 111, 120, 0.35);
}
.curricula-flow__steps span {
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1;
  color: rgba(27, 42, 74, 0.35);
  font-weight: 700;
}
.curricula-flow__steps strong {
  font-family: var(--font-display);
  font-size: 1.65rem;
  line-height: 1.05;
  color: var(--ink);
}
.curricula-flow__steps em {
  font-style: normal;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.curricula-lessons {
  list-style: none;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1.1rem;
  display: grid;
  gap: 1.1rem;
}
.curricula-lesson {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 1.15rem;
  align-items: stretch;
  animation: curriculaRise 0.7s ease both;
  animation-delay: calc(var(--i, 0) * 60ms);
}
.curricula-lesson__media {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  min-height: 150px;
  background:
    linear-gradient(145deg, rgba(27, 42, 74, 0.08), rgba(31, 111, 120, 0.16));
}
.curricula-lesson__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 150px;
  transition: transform 0.55s ease;
}
.curricula-lesson:hover .curricula-lesson__media img { transform: scale(1.04); }
.curricula-lesson__ph { display: block; width: 100%; height: 100%; min-height: 150px; }
.curricula-lesson__num {
  position: absolute;
  left: 0.7rem;
  bottom: 0.55rem;
  font-family: var(--font-display);
  font-size: 2.1rem;
  line-height: 1;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 12px rgba(10, 20, 40, 0.45);
}
.curricula-lesson__body {
  padding: 0.15rem 0.1rem 0.35rem;
  border-bottom: 1px solid rgba(27, 42, 74, 0.08);
}
.curricula-lesson__meta {
  margin: 0;
  color: var(--teal);
  font-weight: 700;
  font-size: 0.9rem;
}
.curricula-lesson__title {
  margin: 0.2rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.5vw, 2.35rem);
  line-height: 1.02;
  font-weight: 700;
}
.curricula-lesson__title a {
  color: var(--ink);
  text-decoration: none;
}
.curricula-lesson__title a:hover { color: var(--teal); }
.curricula-lesson__note { margin: 0.7rem 0 0; color: var(--ink-soft); }
.curricula-plan {
  margin: 0.85rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.curricula-plan__row {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 0.65rem;
  align-items: baseline;
  padding: 0.35rem 0;
  border-top: 1px solid rgba(27, 42, 74, 0.07);
}
.curricula-plan__row:first-child { border-top: 0; padding-top: 0; }
.curricula-plan dt {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--teal);
}
.curricula-plan dd { margin: 0; color: var(--ink); line-height: 1.55; }
.curricula-lesson__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.95rem;
}
.curricula-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.25rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(27, 42, 74, 0.12);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.curricula-link:hover {
  background: #fff;
  border-color: rgba(31, 111, 120, 0.35);
  color: var(--teal);
}
.curricula-link--accent {
  background: rgba(201, 162, 39, 0.18);
  border-color: rgba(201, 162, 39, 0.35);
  color: var(--navy);
}
.curricula-link--accent:hover {
  background: rgba(201, 162, 39, 0.3);
  color: var(--navy);
}

.curriculum-print__meta { font-weight: 700; color: var(--ink-soft); }
.curriculum-print__flow {
  margin: 0 0 1.25rem;
  padding: 0.75rem 0 0.75rem 0.95rem;
  border-left: 3px solid var(--teal);
  background: transparent;
}
.curriculum-print__list { list-style: none; margin: 0; padding: 0; }
.curriculum-print__item {
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(27, 42, 74, 0.12);
}
.curriculum-print__item h2 { margin: 0 0 0.25rem; font-size: 1.15rem; }

@keyframes curriculaRise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .curricula-board__list > li,
  .curricula-lesson,
  .curricula-pack,
  .curricula-lesson__media img { animation: none !important; transition: none !important; }
}
@media (max-width: 860px) {
  .curricula-pack {
    grid-template-columns: auto 1fr;
    grid-template-areas: "idx body" "idx aside";
  }
  .curricula-pack__index { grid-area: idx; align-self: start; }
  .curricula-pack__body { grid-area: body; }
  .curricula-pack__aside {
    grid-area: aside;
    flex-direction: row;
    align-items: baseline;
    gap: 0.35rem;
    justify-content: flex-start;
    text-align: left;
  }
  .curricula-pack__weeks { font-size: 1.8rem; }
  .curricula-pack__go { display: none; }
  .curricula-flow__steps { grid-template-columns: 1fr; gap: 0.35rem; }
  .curricula-lesson { grid-template-columns: 1fr; }
  .curricula-lesson__media { min-height: 180px; aspect-ratio: 16 / 10; }
  .curricula-plan__row { grid-template-columns: 1fr; gap: 0.15rem; }
}
/* site.css — Teacher curriculum UI end */

@media (max-width: 860px) {
  .story-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .char-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .badge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .badge-grid--compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  /* site.css — Timeline tablet UI start — Updated: 2026-07-19 */
  .timeline-overview { grid-template-columns: 1fr; }
  .timeline-overview__intro h2 { max-width: none; }
  /* site.css — Timeline tablet UI end */
  /* site.css — Story cover tablet UI start — Updated: 2026-07-20 */
  .story-grid--page { gap: 0.75rem; }
  .story-tile__body { grid-template-rows: auto 1.45em auto auto; }
  .story-tile--cover .story-tile__title {
    font-size: 1.02rem; line-height: 1.4; height: 1.45em;
  }
  /* site.css — Story cover tablet UI end */
  /* site.css — Character tablet UI start — Updated: 2026-07-19 */
  .char-overview { grid-template-columns: 1fr; }
  .char-hero { grid-template-columns: 1fr; }
  .char-hero__media { min-height: 220px; }
  .char-tile--cover .char-tile__name { font-size: 1.55rem; }
  /* site.css — Character tablet UI end */
  /* site.css — My learning tablet UI start — Updated: 2026-07-21 */
  .char-hero__stats--dashboard { flex-wrap: wrap; }
  .grade-mode-panel { grid-template-columns: 1fr; }
  /* site.css — My learning tablet UI end */
  /* site.css — Quiz tablet UI start — Updated: 2026-07-19 */
  .quiz-hero, .quiz-result-hero { grid-template-columns: 1fr; }
  .quiz-hero__media { min-height: 200px; }
  /* site.css — Quiz tablet UI end */
}
@media (max-width: 640px) {
  .nav-toggle { display: inline-flex; }
  .header-search { display: none; }
  .site-nav {
    display: none; position: absolute; right: 1rem; top: 3.4rem;
    flex-direction: column; align-items: stretch; gap: 0.2rem;
    background: #fff; padding: 0.7rem; border-radius: 12px;
    box-shadow: var(--shadow); min-width: 160px;
  }
  .site-nav.is-open { display: flex; }
  .site-header__inner { position: relative; }
  .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
  .char-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
  .badge-grid { grid-template-columns: 1fr; }
  .badge-grid--compact { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.45rem; }
  .hero { min-height: 78vh; align-items: center; }
  .hero__content { padding-top: 5rem; }
  /* site.css — Hero mobile objects start — Updated: 2026-07-19 */
  .hero-float--sheep, .hero-float--star2, .hero-float--rainbow { display: none; }
  .hero-float--bible { width: 96px; right: 4%; bottom: 10%; }
  .hero-float--dove { width: 72px; right: 18%; top: 12%; }
  .hero-float--cross { width: 58px; right: 3%; top: 16%; }
  .hero-float--star { width: 48px; right: 8%; top: 38%; }
  /* site.css — Hero mobile objects end */
  .section__head { flex-direction: column; align-items: start; }
  .cut-stage__controls { flex-wrap: wrap; justify-content: center; }
  /* site.css — Timeline mobile UI start — Updated: 2026-07-19 */
  .timeline-overview__intro { padding: 1.35rem 1.2rem; border-radius: 18px; }
  .timeline-stats { gap: 0.4rem; }
  .timeline-stat { padding: 0.8rem 0.2rem; border-radius: 14px; }
  .timeline-stat dt { font-size: 0.72rem; }
  .timeline-stat dd { font-size: 2rem; }
  .timeline-jump { padding-top: 0.7rem; padding-bottom: 0.5rem; flex-direction: column; align-items: stretch; gap: 0.35rem; }
  .timeline-jump__select { width: 100%; }
  .timeline-era { padding: 1rem 0.85rem; border-radius: 18px; }
  .timeline-era__head { display: block; }
  .timeline-era__head h2 { margin-top: 0.45rem; font-size: 2.1rem; }
  .timeline-nodes { grid-template-columns: 1fr; gap: 0.55rem; }
  .timeline-node { min-height: 96px; }
  /* site.css — Timeline mobile UI end */
  /* site.css — Story cover mobile UI start — Updated: 2026-07-20 */
  .filters--panel { flex-direction: column; align-items: stretch; gap: 0.65rem; padding: 0.85rem 1rem; }
  .filters--panel select { width: 100%; min-width: 0; }
  .story-tile--cover { border-radius: 14px; }
  .story-tile__badge { left: 0.45rem; top: 0.45rem; padding: 0.15rem 0.48rem; font-size: 0.68rem; }
  .story-tile__body { padding: 0.55rem 0.62rem 0.62rem; grid-template-rows: auto 1.4em auto auto; }
  .story-tile--cover .story-tile__era { font-size: 0.68rem; }
  .story-tile--cover .story-tile__title { font-size: 0.95rem; line-height: 1.35; height: 1.4em; }
  .story-tile--cover .story-tile__meta { font-size: 0.72rem; }
  .story-tile__cta { padding-top: 0.18rem; font-size: 0.7rem; }
  /* site.css — Story cover mobile UI end */
  /* site.css — Character mobile UI start — Updated: 2026-07-19 */
  .char-overview__card { padding: 1.15rem 1.1rem; border-radius: 16px; }
  .char-overview__hint { padding: 1rem; border-radius: 16px; }
  .char-tile--cover { border-radius: 14px; }
  .char-tile__count { left: 0.45rem; top: 0.45rem; padding: 0.14rem 0.45rem; font-size: 0.66rem; }
  .char-tile__body { padding: 0.55rem 0.62rem 0.62rem; }
  .char-tile--cover .char-tile__name { font-size: 1.35rem; }
  .char-tile--cover .char-tile__meta { font-size: 0.72rem; }
  .char-tile__cta { font-size: 0.7rem; }
  .char-hero { margin-top: 0.8rem; gap: 0.7rem; }
  .char-hero__media, .char-hero__copy { border-radius: 18px; }
  .char-hero__copy { padding: 1rem; }
  /* site.css — Character mobile UI end */
  /* site.css — Quiz mobile UI start — Updated: 2026-07-19 */
  .quiz-hero__copy, .quiz-result-hero__copy, .quiz-progress, .quiz-card { border-radius: 16px; }
  .quiz-options--ox { grid-template-columns: 1fr 1fr; gap: 0.45rem; }
  .quiz-option--ox { min-height: 100px; }
  .order-list { grid-template-columns: 1fr; }
  .result-item__answers { grid-template-columns: 1fr; }
  .quiz-submit { justify-content: stretch; }
  .quiz-submit .btn { flex: 1 1 auto; }
  /* site.css — Quiz mobile UI end */
}
