/* ============================================================================
 * LỚP MẦM NON ĐỘC LẬP HOA SEN — SÂN KHẤU THỐNG NHẤT KHÔNG KÉO LÊN XUỐNG
 * Thiết kế không viền (Borderless UI) • Ẩn thanh cuộn • Tối ưu 60fps
 * ============================================================================ */

:root {
  --bg-cream: #fcf9f4;
  --bg-golden: #f6efe6;
  --bg-sunset: #fae8d6;
  --pink: #e87a90;
  --pink-deep: #c74b67;
  --pink-soft: #f7d1da;
  --teal: #389fad;
  --teal-deep: #247884;
  --teal-soft: #d7f1f4;
  --green: #52a877;
  --green-soft: #dcf0e4;
  --sun: #f4c96b;
  --sun-soft: #fdf0cc;
  --ink: #2c2a29;
  --ink-muted: #5f5852;
  --ink-light: #887e76;
  --card-bg: rgba(255, 253, 249, 0.93);
  --shadow-paper: 0 22px 52px -18px rgba(74, 52, 42, 0.16), 0 6px 18px -6px rgba(74, 52, 42, 0.07);
  --shadow-soft: 0 12px 30px -12px rgba(74, 52, 42, 0.14), 0 2px 8px -2px rgba(74, 52, 42, 0.05);
  --radius-card: 28px;

  --font-display: "Fraunces", Georgia, serif;
  --font-ui: "Quicksand", "Be Vietnam Pro", sans-serif;
  --font-body: "Be Vietnam Pro", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Ẩn hoàn toàn thanh cuộn dọc trên mọi nền tảng nhưng vẫn cuộn bình thường */
html,
body,
.story-card,
.epilogue-scene-panel {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.story-card::-webkit-scrollbar,
.epilogue-scene-panel::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

html {
  scroll-behavior: auto;
  overflow-x: clip;
  background: var(--bg-cream);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--bg-cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(0.94rem, 0.89rem + 0.22vw, 1.04rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
a {
  font-family: inherit;
  color: inherit;
}

.paper-grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* ============================================================================
 * THANH CHROME NỔI KHÔNG VIỀN
 * ============================================================================ */
.top-chrome {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) clamp(14px, 3vw, 32px) 10px;
  pointer-events: none;
}

.brand-pill,
.chrome-actions,
.mobile-progress-pill {
  pointer-events: auto;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 15px 6px 8px;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  transition: transform 0.25s ease;
}

.brand-pill:hover {
  transform: translateY(-1px);
}

.brand-lotus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  background: #fffdf9;
  flex-shrink: 0;
}

.brand-lotus img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-family: var(--font-ui);
  font-size: clamp(0.84rem, 0.78rem + 0.2vw, 0.96rem);
  font-weight: 700;
  color: var(--ink);
}

.brand-text small {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.mobile-progress-pill {
  display: none;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--teal-deep);
  box-shadow: var(--shadow-soft);
}

.progress-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pink);
  flex-shrink: 0;
}

.chrome-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chrome-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.chrome-link:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.call-menu-wrap {
  position: relative;
}

.chrome-cta-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--pink);
  color: #fffdf9;
  cursor: pointer;
  box-shadow: 0 12px 26px -10px rgba(232, 122, 144, 0.78);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.chrome-cta-circle:hover,
.chrome-cta-circle[aria-expanded="true"] {
  background: var(--pink-deep);
  transform: translateY(-1px) scale(1.03);
}

.call-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 224px;
  padding: 8px;
  border-radius: 20px;
  background: rgba(255, 253, 249, 0.98);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 44px -12px rgba(74, 52, 42, 0.26), 0 4px 14px -4px rgba(74, 52, 42, 0.08);
  display: grid;
  gap: 6px;
  z-index: 80;
}

.call-popover[hidden] {
  display: none;
}

.call-popover-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 13px;
  border-radius: 14px;
  background: #f8f2ea;
  text-decoration: none;
  color: var(--ink);
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.call-popover-item:hover {
  background: var(--pink-soft);
  transform: translateX(-2px);
}

.call-item-name {
  font-family: var(--font-ui);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
}

.call-item-phone {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--pink-deep);
}

/* ============================================================================
 * THANH ĐỊNH VỊ HÀNH TRÌNH (10 CHẶNG THỐNG NHẤT)
 * ============================================================================ */
.journey-stepper {
  position: fixed;
  right: clamp(12px, 1.8vw, 24px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 55;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.stepper-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 5px;
  min-width: 32px;
  min-height: 32px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.stepper-label {
  opacity: 0;
  transform: translateX(8px);
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(44, 42, 41, 0.9);
  color: #fffdf9;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 20px -6px rgba(44, 42, 41, 0.3);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.stepper-item:hover .stepper-label,
.stepper-item:focus-visible .stepper-label {
  opacity: 1;
  transform: translateX(0);
}

.stepper-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(44, 42, 41, 0.24);
  box-shadow: 0 0 0 2px rgba(255, 253, 249, 0.9), 0 3px 8px rgba(44, 42, 41, 0.14);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.stepper-item.is-active .stepper-dot {
  height: 24px;
  background: var(--pink);
  box-shadow: 0 0 0 2px rgba(255, 253, 249, 0.95), 0 6px 14px rgba(232, 122, 144, 0.55);
}

/* ============================================================================
 * SÂN KHẤU THỐNG NHẤT DUY NHẤT (KHÔNG KÉO CUỘN LÊN XUỐNG GIỮA CÁC CHƯƠNG)
 * ============================================================================ */
.unified-story-root {
  position: relative;
  background: var(--bg-cream);
}

.master-scrollytelling {
  position: relative;
  width: 100%;
}

.master-sticky-viewport {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100svh;
  overflow: hidden;
  z-index: 5;
}

.stage-sky-backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #fcf9f4 0%, #fbf3e7 58%, #f5ebde 100%);
  pointer-events: none;
}

.stage-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: center center;
  will-change: transform, opacity;
}

.svg-layer-host,
.svg-guide-host {
  position: absolute;
  top: 0;
  left: 0;
  width: 3200px;
  height: 2100px;
  transform-origin: 0 0;
  pointer-events: none;
  will-change: transform;
}

.svg-layer-host svg,
.svg-guide-host svg {
  width: 3200px;
  height: 2100px;
  display: block;
}

.stage-bottom-mist {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 47svh;
  height: 70px;
  pointer-events: none;
  z-index: 6;
  background: linear-gradient(180deg, rgba(252, 249, 244, 0) 0%, rgba(252, 249, 244, 0.88) 70%, #fcf9f4 100%);
  opacity: 0;
}

/* LỚP THẺ KỂ CHUYỆN CHƯƠNG 1 -> 7 XUẤT HIỆN GIỮA KHÔNG GIAN (TẠI CHỖ) */
.story-cards-overlay {
  position: absolute;
  inset: 0;
  z-index: 15;
  pointer-events: none;
}

.story-card {
  position: absolute;
  top: 50%;
  width: min(calc(100vw - 40px), 420px);
  max-height: calc(100svh - 140px);
  overflow-y: auto;
  padding: clamp(20px, 2.3vw, 30px);
  border-radius: var(--radius-card);
  background: var(--card-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-paper);
  transform: translate3d(0, -50%, 0);
  will-change: transform, opacity;
}

.story-card.is-side-left {
  left: clamp(22px, 4.2vw, 62px);
}

.story-card.is-side-right {
  right: clamp(54px, 5vw, 86px);
}

.chapter-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: 8px;
}

.chapter-eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pink);
  flex-shrink: 0;
}

.story-title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 100;
  font-size: clamp(1.32rem, 1rem + 1.05vw, 1.84rem);
  font-weight: 600;
  line-height: 1.24;
  color: var(--ink);
}

.story-body {
  margin: 0 0 14px;
  color: var(--ink-muted);
  max-width: 58ch;
  font-size: clamp(0.9rem, 0.86rem + 0.18vw, 0.98rem);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.story-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.25;
}

.story-badge.tone-pink { background: var(--pink-soft); color: #9e2d48; }
.story-badge.tone-teal { background: var(--teal-soft); color: #176672; }
.story-badge.tone-green { background: var(--green-soft); color: #296d46; }
.story-badge.tone-sun { background: var(--sun-soft); color: #7d530d; }

.story-highlights {
  list-style: none;
  margin: 0;
  padding: 11px 13px;
  border-radius: 18px;
  background: #f8f2ea;
  display: grid;
  gap: 5px;
}

.story-highlights li {
  position: relative;
  padding-left: 18px;
  font-size: 0.84rem;
  color: var(--ink-muted);
}

.story-highlights li::before {
  content: "✿";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--pink);
  font-size: 0.76rem;
}

.scroll-cue {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--pink-deep);
}

.scroll-cue-arrow {
  display: inline-flex;
  animation: gentleBob 1.9s ease-in-out infinite;
}

.subclass-mini-card {
  margin-top: 10px;
  padding: 13px 15px;
  border-radius: 20px;
  background: #f7f2eb;
}

.subclass-hint {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--teal-deep);
  text-transform: uppercase;
  margin-bottom: 3px;
}

.subclass-mini-card h3 {
  margin: 0 0 5px;
  font-family: var(--font-display);
  font-size: 1.06rem;
  color: var(--ink);
}

.subclass-mini-card p {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

/* ============================================================================
 * 3 CẢNH CUỐI CHUYỂN CẢNH MƯỢT TRONG CÙNG SÂN KHẤU CỐ ĐỊNH
 * ============================================================================ */
.epilogue-vine-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 8;
  opacity: 0;
}

.epilogue-vine-svg {
  width: 100%;
  height: 100%;
}

.epilogue-panels-stage {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}

.epilogue-scene-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(56px, 6.5svh, 76px) clamp(20px, 4vw, 56px);
  overflow-y: auto;
  will-change: transform, opacity;
}

.epilogue-scene-panel > * {
  width: min(100%, 1160px);
}

.master-scroll-track {
  position: relative;
  z-index: 1;
  margin-top: -100svh;
  pointer-events: none;
}

.scroll-step-slot {
  height: 108svh;
}

.scroll-step-slot[data-step="gate"] {
  height: 95svh;
}

.scroll-step-slot[data-step="contact"] {
  height: 120svh;
}

.band-intro {
  max-width: 660px;
  margin: 0 auto clamp(14px, 2svh, 24px);
  text-align: center;
}

.band-intro h2 {
  margin: 4px 0 6px;
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 100;
  font-size: clamp(1.36rem, 1.05rem + 1.3vw, 2.05rem);
  font-weight: 600;
  line-height: 1.22;
  color: var(--ink);
}

.band-intro p {
  margin: 0 auto;
  max-width: 58ch;
  font-size: clamp(0.84rem, 0.8rem + 0.16vw, 0.94rem);
  color: var(--ink-muted);
}

/* Cảnh 8: Khoảnh khắc treo ngẫu nhiên tự nhiên */
.bunting-gallery-wrap {
  position: relative;
  padding-top: 18px;
}

.bunting-cord-svg {
  position: absolute;
  top: 0;
  left: -2%;
  width: 104%;
  height: 104px;
  pointer-events: none;
  z-index: 2;
}

.photo-bunting-grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  row-gap: clamp(26px, 3vw, 38px);
  column-gap: clamp(16px, 1.8vw, 24px);
  align-items: start;
}

.bunting-photo-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 8px 8px 11px;
  border: 0;
  border-radius: 22px;
  background: #fffdf9;
  box-shadow: 0 16px 36px -14px rgba(74, 52, 42, 0.2), 0 4px 12px -4px rgba(74, 52, 42, 0.08);
  text-align: left;
  cursor: pointer;
  transform: translate3d(0, var(--card-drop, 0px), 0) rotate(var(--card-tilt, 0deg));
  transform-origin: top center;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
  will-change: transform, opacity;
}

.bunting-photo-card:nth-child(2n) {
  transform: translate3d(0, calc(var(--card-drop, 0px) + 5px), 0) rotate(var(--card-tilt, 0deg));
}

.bunting-photo-card:nth-child(3n) {
  transform: translate3d(0, calc(var(--card-drop, 0px) - 5px), 0) rotate(var(--card-tilt, 0deg));
}

.bunting-photo-card:hover,
.bunting-photo-card:focus-visible {
  transform: translate3d(0, -8px, 0) rotate(0deg) scale(1.03);
  box-shadow: 0 24px 48px -14px rgba(74, 52, 42, 0.28);
  outline: none;
  z-index: 5;
}

.wooden-peg {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  width: 15px;
  height: 24px;
  border-radius: 7px;
  background: linear-gradient(180deg, #deb482 0%, #c4925e 100%);
  box-shadow: 0 4px 8px rgba(74, 52, 42, 0.2);
}

.wooden-peg::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 3px;
  right: 3px;
  height: 2px;
  border-radius: 1px;
  background: rgba(94, 62, 34, 0.42);
}

.bunting-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  border-radius: 14px;
  background: #f4ece2;
}

.bunting-photo-card:nth-child(2) .bunting-thumb-wrap,
.bunting-photo-card:nth-child(5) .bunting-thumb-wrap {
  aspect-ratio: 16 / 11;
}

.bunting-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.bunting-photo-card:hover .bunting-thumb-wrap img {
  transform: scale(1.05);
}

.bunting-photo-tag {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.94);
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--teal-deep);
  box-shadow: 0 4px 10px rgba(44, 42, 41, 0.1);
}

.bunting-photo-title {
  margin: 8px 4px 2px;
  font-family: var(--font-ui);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.28;
}

.bunting-photo-caption {
  margin: 0 4px;
  font-size: 0.74rem;
  color: var(--ink-muted);
  line-height: 1.36;
}

.gallery-note {
  margin: 22px auto 0;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--pink-deep);
}

/* Cảnh 9: Vườn Hoa Sen — Đội ngũ cô giáo */
.garden-decor-back,
.garden-decor-front {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  pointer-events: none;
  z-index: 1;
}

.garden-decor-back {
  bottom: clamp(16px, 5svh, 64px);
  height: clamp(180px, 28svh, 280px);
  margin: 0;
  opacity: 0.96;
}

.garden-decor-front {
  bottom: 0;
  height: clamp(72px, 12svh, 120px);
  margin: 0;
}

.garden-decor-back svg,
.garden-decor-front svg {
  display: block;
  width: 100%;
  height: 100%;
}

.epilogue-scene-panel.is-teachers .band-intro {
  position: relative;
  z-index: 3;
}

.teachers-garden-grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.8vw, 22px);
}

.teacher-petal-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 18px 14px 20px;
  border-radius: 30px;
  background: rgba(255, 253, 249, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-paper);
}

.teacher-avatars-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.petal-avatar-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.petal-frame {
  position: relative;
  width: 84px;
  height: 94px;
  padding: 5px;
  border-radius: 46px 46px 30px 30px;
  background: linear-gradient(155deg, var(--pink-soft), #fffdf9 65%, var(--green-soft));
  box-shadow: 0 10px 22px -12px rgba(232, 122, 144, 0.45);
}

.petal-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 40px 40px 26px 26px;
}

.teacher-mini-name {
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink);
  padding: 2px 9px;
  border-radius: 999px;
  background: #f6efe6;
}

.teacher-class-pill {
  display: inline-block;
  margin-bottom: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--green-soft);
  color: #256842;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
}

.teacher-petal-card h3 {
  margin: 0 0 5px;
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: var(--ink);
}

.teacher-quote {
  margin: 0;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--ink-muted);
  line-height: 1.46;
}

/* Cảnh 10: Bưu thiếp chiều nắng ấm tại Sơn Tịnh */
.sunset-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 22% 45%, rgba(244, 201, 107, 0.28), transparent 58%);
  pointer-events: none;
}

.postcard-layout {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(220px, 0.76fr) minmax(0, 1.44fr);
  align-items: center;
  gap: clamp(18px, 3vw, 40px);
}

.mini-gate-art {
  max-width: 340px;
  margin: 0 auto;
}

.postcard-card {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  border-radius: 30px;
  background: #fffdf9;
  box-shadow: 0 26px 58px -20px rgba(96, 62, 42, 0.22);
}

.postcard-stamp {
  position: absolute;
  top: 18px;
  right: 20px;
  padding: 5px 12px;
  border-radius: 14px;
  background: #fdf2f4;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--pink-deep);
  transform: rotate(3deg);
  box-shadow: 0 4px 12px rgba(232, 122, 144, 0.16);
}

.postcard-card h2 {
  margin: 4px 0 6px;
  padding-right: 110px;
  font-family: var(--font-display);
  font-size: clamp(1.26rem, 1rem + 0.95vw, 1.75rem);
  line-height: 1.24;
  color: var(--ink);
}

.postcard-sub {
  margin: 0 0 14px;
  color: var(--ink-muted);
  max-width: 58ch;
  font-size: 0.88rem;
}

.postcard-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.detail-tile {
  padding: 10px 14px;
  border-radius: 18px;
  background: #f8f2ea;
}

.detail-tile.is-wide {
  grid-column: 1 / -1;
}

.detail-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: 2px;
}

.detail-value {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}

.hours-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.contacts-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.contact-person-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 20px;
  background: #fdf6f8;
  box-shadow: 0 6px 18px -10px rgba(74, 52, 42, 0.16);
}

.contact-person-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.22;
}

.contact-person-meta strong {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--ink);
}

.contact-person-meta span {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--pink-deep);
}

.contact-mini-actions {
  display: inline-flex;
  gap: 6px;
}

.mini-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 700;
  color: #fffdf9;
  transition: transform 0.2s ease;
}

.mini-action-btn:hover {
  transform: translateY(-1px);
}

.mini-action-btn.call { background: var(--pink); }
.mini-action-btn.zalo { background: var(--teal); }

.postcard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 0.84rem;
  font-weight: 700;
  transition: transform 0.2s ease;
}

.action-btn:hover {
  transform: translateY(-2px);
}

.action-btn.maps {
  background: var(--green-soft);
  color: #215e3b;
  box-shadow: 0 8px 20px -10px rgba(82, 168, 119, 0.5);
}

.map-embed-frame {
  overflow: hidden;
  border-radius: 20px;
  background: #f5eee6;
  box-shadow: var(--shadow-soft);
}

.map-embed-frame iframe {
  display: block;
  width: 100%;
  height: 155px;
  border: 0;
}

/* ============================================================================
 * LIGHTBOX PHÓNG TO ẢNH KHÔNG VIỀN
 * ============================================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 28px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(34, 29, 27, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox-panel {
  position: relative;
  z-index: 2;
  width: min(960px, 100%);
  max-height: 92svh;
  padding: clamp(16px, 2.5vw, 24px);
  border-radius: 28px;
  background: #fcf9f4;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.4);
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: #fffdf9;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.lightbox-stage {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  align-items: center;
  gap: 10px;
}

.lightbox-nav {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: #fffdf9;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.lightbox-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.lightbox-figure img {
  max-height: 62svh;
  width: auto;
  max-width: 100%;
  border-radius: 18px;
  object-fit: contain;
  background: #efe7dc;
}

.lightbox-caption {
  margin-top: 12px;
  max-width: 560px;
}

.lightbox-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--pink-soft);
  color: var(--pink-deep);
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 700;
}

.lightbox-caption h3 {
  margin: 6px 0 4px;
  font-family: var(--font-display);
  font-size: 1.18rem;
  color: var(--ink);
}

.lightbox-caption p {
  margin: 0 0 4px;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.lightbox-counter {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-light);
}

/* ============================================================================
 * CHUYỂN ĐỘNG TỐI ƯU GPU
 * ============================================================================ */
@keyframes gentleBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

@keyframes flagWave {
  0%, 100% { transform: skewY(0deg) scaleX(1) rotate(0deg); }
  25% { transform: skewY(-4.5deg) scaleX(0.94) rotate(-1.5deg); }
  50% { transform: skewY(2.5deg) scaleX(0.98) rotate(1deg); }
  75% { transform: skewY(-3.5deg) scaleX(0.92) rotate(-1deg); }
}

@keyframes cursorPulse {
  0% { transform: scale(0.85); opacity: 0.6; }
  60% { transform: scale(1.65); opacity: 0.1; }
  100% { transform: scale(0.85); opacity: 0.6; }
}

@keyframes cloudDrift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(38px, -4px, 0); }
}

@keyframes swingRock {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(4.5deg); }
}

@keyframes ballHop {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(8px, -8px, 0); }
}

@keyframes steamRise {
  0% { transform: translateY(6px); opacity: 0.25; }
  50% { transform: translateY(-6px); opacity: 0.85; }
  100% { transform: translateY(-14px); opacity: 0.15; }
}

.anim-flag { animation: flagWave 2.6s ease-in-out infinite; }
.anim-cursor-ring { transform-box: fill-box; transform-origin: center; animation: cursorPulse 1.7s ease-in-out infinite; }
.anim-cloud-slow { animation: cloudDrift 18s ease-in-out infinite; }
.anim-cloud-mid { animation: cloudDrift 13s ease-in-out infinite reverse; }
.anim-swing { animation: swingRock 3.6s ease-in-out infinite; }
.anim-ball { animation: ballHop 2.8s ease-in-out infinite; }
.anim-steam { animation: steamRise 3.2s ease-in-out infinite; }
.anim-steam-delay { animation: steamRise 3.6s ease-in-out 1.1s infinite; }

/* ============================================================================
 * RESPONSIVE: TABLET (768px – 1023px) — THẺ CỐ ĐỊNH Ở NỬA DƯỚI
 * ============================================================================ */
@media (max-width: 1023px) {
  .stage-bottom-mist {
    opacity: 1;
  }

  .story-cards-overlay {
    top: 50svh;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 24px 18px;
  }

  .story-card,
  .story-card.is-side-left,
  .story-card.is-side-right {
    left: 50%;
    right: auto;
    top: 50%;
    width: min(calc(100vw - 48px), 580px);
    max-height: 45svh;
    transform: translate3d(-50%, -50%, 0);
    background: #fffdf9;
    backdrop-filter: none;
  }

  .journey-stepper {
    right: 10px;
  }

  .stepper-item {
    min-width: 44px;
    min-height: 44px;
  }

  .photo-bunting-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 24px;
    column-gap: 12px;
  }

  .teachers-garden-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .bunting-photo-title {
    font-size: 0.78rem;
  }

  .bunting-photo-caption {
    font-size: 0.68rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .postcard-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .mini-gate-art {
    max-width: 240px;
  }
}

/* ============================================================================
 * RESPONSIVE: MOBILE (< 768px) — VỪA KHÍT SÂN KHẤU TẠI CHỖ
 * ============================================================================ */
@media (max-width: 767px) {
  .top-chrome {
    gap: 6px;
    padding: max(8px, env(safe-area-inset-top)) 10px 8px;
  }

  .chrome-link { display: none; }
  .brand-text small { display: none; }

  .brand-text strong {
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .brand-pill {
    padding: 5px 10px 5px 6px;
    gap: 6px;
    flex-shrink: 0;
  }

  .brand-lotus {
    width: 26px;
    height: 26px;
  }

  .chrome-cta-circle {
    width: 34px;
    height: 34px;
  }

  .chrome-cta-circle svg {
    width: 15px;
    height: 15px;
  }

  .mobile-progress-pill {
    display: inline-flex;
    min-width: 0;
    max-width: 146px;
    padding: 5px 10px;
    font-size: 0.72rem;
    white-space: nowrap;
  }

  .mobile-progress-pill #mobile-step-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .journey-stepper {
    display: none;
  }

  .stage-bottom-mist {
    bottom: 47svh;
    height: 50px;
    opacity: 1;
  }

  .story-cards-overlay {
    top: 47svh;
    bottom: 0;
    padding: 4px 10px 10px;
  }

  .story-card,
  .story-card.is-side-left,
  .story-card.is-side-right {
    width: calc(100vw - 20px);
    max-height: 50svh;
    overflow-y: auto;
    padding: 12px 14px 14px;
    border-radius: 20px;
  }

  .chapter-eyebrow {
    font-size: 0.68rem;
    margin-bottom: 4px;
  }

  .story-title {
    font-size: 1.04rem;
    line-height: 1.22;
    margin-bottom: 6px;
  }

  .story-body {
    font-size: 0.77rem;
    line-height: 1.4;
    margin-bottom: 7px;
  }

  .badge-row {
    gap: 5px;
    margin-bottom: 7px;
  }

  .story-badge {
    font-size: 0.67rem;
    padding: 3px 8px;
  }

  .story-highlights {
    padding: 8px 10px;
    border-radius: 13px;
    gap: 3px;
  }

  .story-highlights li {
    font-size: 0.73rem;
    line-height: 1.3;
    padding-left: 15px;
  }

  .scroll-cue {
    margin-top: 7px;
    font-size: 0.72rem;
  }

  .epilogue-scene-panel {
    justify-content: center;
    padding: 54px 12px;
  }

  .band-intro {
    margin-bottom: 6px;
  }

  .band-intro h2 {
    font-size: 1.12rem;
    margin: 2px 0;
  }

  .band-intro p {
    font-size: 0.73rem;
    line-height: 1.32;
  }

  /* Cảnh 8 Mobile: treo lệch tầng ngẫu nhiên 2 cột gọn trong 100svh */
  .bunting-gallery-wrap {
    padding-top: 4px;
  }

  .photo-bunting-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 9px;
  }

  .bunting-photo-card {
    padding: 4px 4px 6px;
    border-radius: 14px;
  }

  .bunting-photo-card:nth-child(even) {
    transform: translate3d(0, 6px, 0) rotate(var(--card-tilt, 2deg));
  }

  .wooden-peg {
    top: -8px;
    width: 11px;
    height: 16px;
  }

  .bunting-thumb-wrap,
  .bunting-photo-card:nth-child(2) .bunting-thumb-wrap,
  .bunting-photo-card:nth-child(5) .bunting-thumb-wrap {
    aspect-ratio: 16 / 9;
    border-radius: 10px;
  }

  .bunting-photo-tag {
    left: 5px;
    bottom: 5px;
    padding: 2px 7px;
    font-size: 0.6rem;
  }

  .bunting-photo-title {
    font-size: 0.7rem;
    line-height: 1.2;
    margin: 4px 2px 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .bunting-photo-caption,
  .gallery-note {
    display: none;
  }

  /* Cảnh 9 Mobile: 4 thẻ cô giáo gọn theo hàng ngang căn giữa tâm, giữ đầm sen nền dịu */
  .garden-decor-back {
    bottom: 0;
    height: 120px;
    opacity: 0.65;
  }

  .garden-decor-front {
    display: none;
  }

  .teachers-garden-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .teacher-petal-card {
    flex-direction: row;
    text-align: left;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 22px;
  }

  .teacher-avatars-row {
    margin-bottom: 0;
    gap: 6px;
    flex-shrink: 0;
  }

  .petal-frame {
    width: 54px;
    height: 60px;
    padding: 3px;
    border-radius: 30px 30px 20px 20px;
  }

  .teacher-mini-name {
    font-size: 0.68rem;
    padding: 1px 6px;
  }

  .teacher-info-col {
    min-width: 0;
  }

  .teacher-class-pill {
    font-size: 0.68rem;
    padding: 3px 9px;
    margin-bottom: 3px;
  }

  .teacher-petal-card h3 {
    font-size: 0.9rem;
    margin-bottom: 2px;
  }

  .teacher-quote {
    font-size: 0.72rem;
    line-height: 1.32;
  }

  /* Cảnh 10 Mobile: Bưu thiếp gọn trọn vẹn trong 100svh */
  .postcard-layout {
    gap: 7px;
  }

  .mini-gate-art {
    max-width: 116px;
  }

  .postcard-card {
    padding: 12px 13px 13px;
    border-radius: 20px;
  }

  .postcard-stamp {
    position: static;
    display: inline-block;
    margin-bottom: 4px;
    padding: 3px 9px;
    font-size: 0.65rem;
    transform: rotate(-1.5deg);
  }

  .postcard-card h2 {
    padding-right: 0;
    margin: 1px 0 5px;
    font-size: 1.08rem;
  }

  .postcard-sub {
    display: none;
  }

  .postcard-details,
  .contacts-split {
    grid-template-columns: 1fr;
    gap: 6px;
    margin-bottom: 7px;
  }

  .detail-tile {
    padding: 7px 10px;
    border-radius: 13px;
  }

  .detail-value {
    font-size: 0.76rem;
  }

  .contact-person-pill {
    padding: 6px 10px;
    border-radius: 16px;
  }

  .action-btn {
    width: 100%;
    min-height: 34px;
    font-size: 0.78rem;
  }

  .map-embed-frame iframe {
    height: 98px;
  }

  .lightbox-stage {
    grid-template-columns: 1fr;
  }

  .lightbox-nav {
    position: absolute;
    bottom: 14px;
    z-index: 6;
  }

  .lightbox-nav.prev { left: 16px; }
  .lightbox-nav.next { right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .anim-flag,
  .anim-cloud-slow,
  .anim-cloud-mid,
  .anim-swing,
  .anim-ball,
  .anim-steam,
  .anim-steam-delay,
  .scroll-cue-arrow {
    animation: none !important;
  }

  .bunting-photo-card,
  .action-btn {
    transition: none !important;
  }
}
