/* ==========================================================
   我的烏龜陪我走過七年 — styles
   暖色系：米白 / 淺綠 / 淺橘 + 一點手繪感
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght,SOFT@0,9..144,300..700,0..100;1,9..144,300..700,0..100&family=Caveat:wght@500;700&display=swap');

@font-face {
  font-family: 'JinxuanLatte';
  src: url('fonts/jinxuanlatte-book.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JinxuanLatte';
  src: url('fonts/jinxuanlatte-extrabold.otf') format('opentype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* user-spec palette */
  --cream:        #FEEFE5;
  --cream-2:      #FBE4D3;
  --leaf:         #FFD9BF;
  --leaf-2:       #ED9269;
  --leaf-3:       #C45A2E;
  --apricot:      #D8643A;
  --apricot-2:    #B84F22;
  --apricot-3:    #B84F22;

  --ink:          #2A2520;
  --ink-2:        #4A3F38;
  --ink-3:        #8A7B70;
  --hairline:     #E6D9C8;
  --paper:        #FFFCF6;

  --placeholder:  #E8E5E0;
  --placeholder-line: #B8B0A8;

  /* type — JinxuanLatte 金萱體 primary, Caveat as small English accent only */
  --font-cn:      'Fraunces', Georgia, serif;
  --font-en:      'Fraunces', Georgia, serif;
  --font-en-body: 'Fraunces', Georgia, serif;
  --font-ui:      'Fraunces', Georgia, serif;

  /* motion */
  --ease:        cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-bouncy: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* reset-ish */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-en-body);
  font-size: 17px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { display: block; max-width: 100%; }

/* paper texture (very subtle) — random little dots */
.paper-bg {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(184,207,176,0.10) 0, transparent 35%),
    radial-gradient(circle at 80% 70%, rgba(232,184,148,0.10) 0, transparent 40%);
}

/* ----- App shell --------------------------------------------------- */
#app {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: stretch;
}

.stage {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 40px 120px;
  position: relative;
}

/* progress dots top */
.progress { display: none !important; }
.progress-disabled-original {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px;
  z-index: 50;
  background: rgba(248, 244, 237, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px dashed var(--placeholder-line);
}
.progress .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--hairline);
  transition: all 240ms var(--ease);
}
.progress .dot.active {
  background: var(--apricot-2);
  width: 26px; border-radius: 999px;
}
.progress .dot.done {
  background: var(--apricot);
}

/* ----- Type helpers ------------------------------------------------ */
.cn-display { font-family: var(--font-cn); font-weight: 800; }
.cn-body    { font-family: var(--font-cn); font-weight: 400; }
.en-script  { font-family: var(--font-en); font-weight: 500; color: var(--apricot-3); }
.en-hand    { font-family: var(--font-en-body); }

h1.headline {
  font-family: var(--font-cn); font-weight: 800;
  font-size: clamp(38px, 5.4vw, 64px);
  line-height: 1.18; letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
h2.subhead {
  font-family: var(--font-cn); font-weight: 800;
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1.35;
  color: var(--ink-2);
  margin: 0;
  text-wrap: balance;
}
h3.q {
  font-family: var(--font-cn); font-weight: 800;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.4;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
.eyebrow {
  font-family: var(--font-en);
  font-size: 22px;
  color: var(--apricot-3);
  letter-spacing: 0.02em;
  display: inline-block;
}
.eyebrow.green { color: var(--apricot-3); }

/* ----- Buttons ---------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--font-cn); font-weight: 800;
  font-size: 17px;
  transition: transform 180ms var(--ease), background 180ms var(--ease), box-shadow 180ms var(--ease);
  border: 1.5px solid transparent;
  white-space: nowrap;
}
.btn .en {
  font-family: var(--font-en);
  font-weight: 500;
  font-size: 19px;
  opacity: 0.85;
  margin-left: 4px;
}
.btn-primary {
  background: var(--apricot);
  color: var(--ink);
  box-shadow: 0 4px 0 var(--apricot-2), 0 6px 14px -8px rgba(58,32,20,0.25);
}
.btn-primary:hover { transform: translateY(-1px); background: var(--apricot-2); color: var(--ink); }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--apricot-2); }
.btn-leaf {
  background: var(--apricot);
  color: var(--paper);
  box-shadow: 0 4px 0 var(--apricot-2), 0 6px 14px -8px rgba(58,32,20,0.25);
}
.btn-leaf:hover { transform: translateY(-1px); background: var(--apricot-2); }
.btn-leaf:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--apricot-2); }
.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border: 1.5px dashed var(--placeholder-line);
}
.btn-ghost:hover { color: var(--ink); border-color: var(--ink-3); }

/* ----- Slot (placeholder media) ----------------------------------- */
.slot {
  position: relative;
  background: var(--placeholder);
  border: 1px dashed var(--placeholder-line);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  color: #6b6660;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 14px;
  text-align: center;
  overflow: hidden;
  padding: 8px;
}
.slot.aspect-4-5 { aspect-ratio: 4 / 5; }
.slot.aspect-1-1 { aspect-ratio: 1 / 1; }
.slot.aspect-16-9 { aspect-ratio: 16 / 9; }
.slot.aspect-3-4 { aspect-ratio: 3 / 4; }
.slot.transparent { background: transparent; border: 1.5px dashed var(--placeholder-line); }
.slot .slot-name {
  font-size: 13px; opacity: 0.85;
  letter-spacing: 0.04em;
  word-break: break-all;
  padding: 0 8px;
  max-width: 100%;
}
.slot .slot-tag {
  position: absolute; top: 8px; left: 8px;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.7);
  color: #6b6660;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.slot .slot-play {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}
.slot .slot-play::before {
  content: '';
  width: 0; height: 0;
  border-left: 14px solid #6b6660;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  margin-left: 4px;
}

/* ----- Animations ------------------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes turtleHop {
  0%   { transform: translateY(110vh) rotate(-6deg); }
  55%  { transform: translateY(-30px) rotate(2deg); }
  70%  { transform: translateY(0) rotate(0deg); }
  82%  { transform: translateY(-12px) rotate(0deg); }
  100% { transform: translateY(0) rotate(0deg); }
}
@keyframes turtleSway {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-4deg); }
  75% { transform: rotate(4deg); }
}
@keyframes shadowPulse {
  0%   { transform: scale(0.4); opacity: 0; }
  55%  { transform: scale(0.6); opacity: 0.18; }
  70%  { transform: scale(1); opacity: 0.32; }
  100% { transform: scale(1); opacity: 0.28; }
}
@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-3deg); }
  75% { transform: rotate(3deg); }
}

.fade-up { animation: fadeUp 600ms var(--ease) both; }
.fade-in { animation: fadeIn 600ms var(--ease) both; }

/* ----- Section common --------------------------------------------- */
.section-head {
  display: flex; align-items: baseline; gap: 14px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.section-head .num {
  font-family: var(--font-cn);
  font-weight: 600;
  color: var(--apricot-3);
  font-size: 28px;
  letter-spacing: 0.04em;
}
.section-head .num strong { color: var(--apricot-3); }

.next-area {
  margin-top: 56px;
  display: flex; justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ----- Section 1 specific ----------------------------------------- */
.s1 {
  position: relative;
  min-height: calc(100vh - 100px);
  padding-top: 0 !important;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding-top: 80px;
}
.s1 .hero-stage {
  position: relative;
  width: min(380px, 80vw);
  margin-bottom: 32px;
}
.s1 .turtle-img {
  position: relative;
  z-index: 2;
  cursor: pointer;
  transform-origin: 50% 90%;
  filter: drop-shadow(0 4px 6px rgba(58,32,20,0.10));
}
.s1 .turtle-img.hop  { animation: turtleHop 1500ms var(--ease-bouncy) both; }
.s1 .turtle-img.sway { animation: turtleSway 1300ms var(--ease) 1500ms 1 both; }
.s1.compact { padding-top: 0; }
.s1.compact .hero-stage { width: min(416px, 67vw); margin-bottom: -12px; margin-top: 8px; }
.s1.compact .hero-stage .ground-shadow { display: none; }
.s1.compact .copy-block { margin-top: 0; }
.s1.compact .copy-block.reveal-1 { margin-bottom: -16px; }
.s1.compact .tag-line { margin-bottom: 0; }
.s1.compact .name-card { margin-top: 14px; padding: 16px 18px; }
.s1.compact .headline { font-size: clamp(34px, 4.6vw, 52px); }
.s1.compact .subhead { font-size: clamp(20px, 2.4vw, 26px); margin-top: 6px !important; }
.s1.compact .tag-line { margin-bottom: 0; }
.s1.compact .copy-block { gap: 4px; }

.s1 .turtle-img.idle { animation: wiggle 4s var(--ease) 2800ms infinite; }

/* sticker-style cover image — no frame, just a cutout PNG with a soft drop shadow */
.s1 .bob-sticker {
  display: block;
  width: 100%;
  height: auto;
  background: transparent;
  border: 0;
  outline: none;
  cursor: pointer;
  filter:
    drop-shadow(0 14px 20px rgba(58,32,20,0.18))
    drop-shadow(0 3px 6px rgba(58,32,20,0.12));
  -webkit-tap-highlight-color: transparent;
}
.s1 .bob-sticker:focus-visible { outline: 2px solid var(--apricot-3); outline-offset: 6px; border-radius: 12px; }

/* compact option grid (3 cols × 2 rows) for short labels */
.options.compact {
  gap: 12px;
}
.options.compact .opt {
  padding: 14px 16px;
  min-height: 0;
  font-size: 17px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-direction: row;
  flex-wrap: wrap;
}
.options.compact .opt .opt-emoji {
  font-size: 26px; line-height: 1; flex: 0 0 auto;
}
.options.compact .opt .opt-label {
  font-family: var(--font-en-body);
  font-weight: 500;
  font-size: 17px;
  color: var(--ink);
  flex: 1 1 auto;
}
.options.compact .opt .opt-tag {
  margin-top: 0; margin-left: auto;
  font-size: 12px;
  flex: 0 0 auto;
}
.options.compact .opt .ck {
  position: static;
  width: 18px; height: 18px;
  font-size: 11px;
  flex: 0 0 auto;
  order: -1;
}

/* sticker sitting ON TOP of the letter paper */
.letter.on-paper {
  position: relative;
  padding-bottom: 0;
}
.letter.on-paper .letter-line:last-of-type { margin-bottom: 0; }
.letter-sticker.on-paper {
  display: block;
  margin: -40px -8px -16px auto;
  width: 150px;
  height: auto;
  transform: rotate(-3deg);
  filter:
    drop-shadow(0 8px 12px rgba(58,32,20,0.18))
    drop-shadow(0 2px 4px rgba(58,32,20,0.10));
  pointer-events: none;
}
.letter-sticker.on-paper::before { content: none; }
.letter-sticker-caption.on-paper { display: none; }
@media (max-width: 720px) {
  .letter.on-paper { padding-bottom: 170px; }
  .letter-sticker.on-paper { width: 150px; right: 10px; bottom: 16px; }
  .letter-sticker-caption.on-paper { right: 22px; bottom: 2px; font-size: 18px; }
}
.letter-sticker-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 14px;
  transform: rotate(-3deg);
}
.letter-sticker-wrap::before {
  /* a piece of washi tape holding the sticker on the letter */
  content: "";
  position: absolute;
  top: 4px; left: 50%;
  width: 78px; height: 18px;
  transform: translateX(-50%) rotate(-4deg);
  background: rgba(216, 100, 58, 0.22);
  border: 1px dashed rgba(184, 79, 34, 0.35);
  border-radius: 2px;
  z-index: 2;
  pointer-events: none;
}
.letter-sticker {
  width: 100%;
  max-width: 240px;
  height: auto;
  display: block;
  filter:
    drop-shadow(0 10px 14px rgba(58,32,20,0.18))
    drop-shadow(0 2px 4px rgba(58,32,20,0.12));
}
.letter-sticker-caption {
  margin-top: 8px;
  font-family: 'Caveat', cursive;
  font-size: 22px;
  color: var(--apricot-3);
  transform: rotate(2deg);
}

.s1 .ground-shadow {
  position: absolute;
  bottom: -10px; left: 50%;
  width: 70%; height: 22px;
  background: radial-gradient(ellipse at center, rgba(58,32,20,0.32), transparent 70%);
  transform: translateX(-50%);
  z-index: 1;
  opacity: 0;
  animation: shadowPulse 1500ms var(--ease-bouncy) both;
}
.s1 .scenery {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.s1 .leaf, .s1 .stone {
  position: absolute;
  opacity: 0.5;
  animation: fadeIn 1200ms var(--ease) both;
}

.s1 .copy-block {
  text-align: center;
  margin-top: 16px;
  display: flex; flex-direction: column; gap: 12px; align-items: center;
}
.s1 .name-card {
  display: inline-flex; flex-direction: column; align-items: center;
  background: var(--paper);
  border: 1px dashed var(--placeholder-line);
  border-radius: 14px;
  padding: 18px 32px;
  margin-top: 24px;
}
.s1 .name-card .name {
  font-family: var(--font-cn); font-weight: 800;
  font-size: 36px; color: var(--apricot-3);
  line-height: 1.1;
  letter-spacing: 0.02em;
}
.s1 .name-card .about {
  margin-top: 8px;
  font-family: var(--font-en-body);
  color: var(--ink-2);
  font-size: 16px;
  max-width: 38ch;
  text-align: center;
  line-height: 1.6;
}

/* staggered reveal */
.s1 .reveal-1 { animation: fadeUp 700ms var(--ease) 1.7s both; }
.s1 .reveal-2 { animation: fadeUp 700ms var(--ease) 2.1s both; }
.s1 .reveal-3 { animation: fadeUp 700ms var(--ease) 2.4s both; }
.s1 .reveal-4 { animation: fadeUp 700ms var(--ease) 2.8s both; }

/* ----- Section 2 timeline ---------------------------------------- */
.timeline {
  position: relative;
  margin: 8px -40px 0;
  padding: 20px 40px 40px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.timeline::-webkit-scrollbar { height: 8px; }
.timeline::-webkit-scrollbar-track { background: transparent; }
.timeline::-webkit-scrollbar-thumb { background: var(--hairline); border-radius: 999px; }

.timeline-line {
  position: absolute;
  top: 50%; left: 40px; right: 40px;
  border-top: 2px dashed var(--apricot-2);
  z-index: 0;
}

.timeline-track {
  display: flex;
  gap: 18px;
  position: relative;
  z-index: 1;
  align-items: center;
  padding: 80px 0;
  min-width: max-content;
}

.tl-node {
  flex: 0 0 240px;
  display: flex;
  scroll-snap-align: center;
  position: relative;
  cursor: pointer;
  transition: transform 240ms var(--ease);
}
.tl-node:hover { transform: translateY(-6px); }
.tl-node.expanded { transform: scale(1.04); z-index: 5; }

.tl-card {
  background: var(--paper);
  border-radius: 16px;
  width: 100%;
  height: 420px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  border: 1px solid var(--hairline);
  box-shadow: 0 10px 30px -16px rgba(58,32,20,0.18);
  padding: 14px;
  transition: all 240ms var(--ease);
}
.tl-card .year-badge {
  position: absolute; top: -16px; left: 14px;
  background: var(--apricot);
  color: var(--paper);
  font-family: var(--font-cn);
  font-size: 18px;
  font-weight: 600;
  padding: 3px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--paper);
  line-height: 1.4;
}
.tl-card .meta {
  font-family: var(--font-en-body);
  font-size: 14px;
  color: var(--ink-3);
  margin-top: 10px;
  letter-spacing: 0.02em;
}
.tl-card .story {
  margin-top: 4px;
  font-family: var(--font-cn);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
}
.tl-node.expanded .tl-card {
  box-shadow: 0 30px 60px -20px rgba(58,32,20,0.30);
  transform: translateY(-4px);
}

.tl-arrows {
  display: flex; gap: 10px; margin-top: 18px; justify-content: center;
}
.tl-arrow {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--hairline);
  color: var(--ink-2);
  font-size: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 180ms var(--ease);
}
.tl-arrow:hover { background: var(--cream-2); color: var(--ink); }

/* ----- Section 3 quiz cards -------------------------------------- */
.s3 {
  display: flex; flex-direction: column; gap: 32px;
  align-items: stretch;
}
.s3 .quiz-head {
  display: flex; flex-direction: column; gap: 10px;
}
.s3 .quiz-head .icon-circle {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--cream-2);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-cn); font-weight: 600;
  font-size: 26px;
  color: var(--ink);
  margin-bottom: 4px;
}
.s3 .quiz-head .icon-circle.apricot { background: var(--apricot); }

.options {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}
.options.cols-2 { grid-template-columns: repeat(2, 1fr); }
.options.cols-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) {
  .options.cols-4 { grid-template-columns: repeat(4, 1fr); }
}
.options.cols-6 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) {
  .options.cols-6 { grid-template-columns: repeat(3, 1fr); }
}

.opt {
  position: relative;
  background: var(--paper);
  border: 2px solid var(--hairline);
  border-radius: 14px;
  padding: 18px 16px;
  text-align: left;
  font-family: var(--font-cn); font-weight: 800;
  font-size: 18px;
  color: var(--ink);
  transition: all 180ms var(--ease);
  display: flex; flex-direction: column; gap: 4px;
}
.opt:hover { border-color: var(--apricot-2); transform: translateY(-2px); }
.opt.picked { border-color: var(--apricot-2); background: #FFF6EB; box-shadow: 0 6px 0 var(--apricot-2); transform: translateY(-2px); }
.opt.picked-leaf { border-color: var(--leaf-2); background: #EFF5EA; box-shadow: 0 6px 0 var(--leaf-2); transform: translateY(-2px); }
.opt .price-en { font-family: var(--font-cn); font-weight: 600; font-size: 19px; color: var(--apricot-3); }
.opt .ck {
  position: absolute; top: 10px; right: 12px;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--hairline);
  background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  color: white;
  font-size: 13px;
}
.opt.picked .ck, .opt.picked-leaf .ck {
  border-color: transparent;
  background: var(--apricot-2);
}
.opt.picked-leaf .ck { background: var(--leaf-3); }

/* answer-review states */
.opt.correct { border-color: var(--leaf-3); background: #EFF5EA; box-shadow: 0 4px 0 var(--leaf-3); }
.opt.incorrect { border-color: #C9A89B; background: #F6EEE9; box-shadow: 0 4px 0 #B8A092; opacity: 0.78; }
.opt.correct .ck { background: var(--leaf-3); border-color: transparent; color: #fff; }
.opt.incorrect .ck { background: transparent; border-color: #B8A092; color: #B8A092; }
.opt .opt-tag {
  display: inline-block; margin-top: 8px;
  font-family: var(--font-en-body); font-size: 14px; font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
}

/* bullet list inside reveal cards */
.reveal-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
  font-family: var(--font-en-body); font-size: 17px; line-height: 1.5;
  color: var(--ink-2); max-width: 42ch;
}
.reveal-list li {
  position: relative; padding-left: 22px;
}
.reveal-list li::before {
  content: ""; position: absolute; left: 4px; top: 10px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--apricot-3);
}
.reveal-list strong { color: var(--ink); font-weight: 600; }

/* reveal panel */
.reveal-card {
  background: var(--paper);
  border-radius: 18px;
  border: 1.5px solid var(--hairline);
  box-shadow: 0 18px 40px -22px rgba(58,32,20,0.22);
  padding: 28px;
  display: grid;
  gap: 22px;
}
@media (min-width: 760px) {
  .reveal-card.with-image { grid-template-columns: 1fr 1fr; align-items: center; }
}
.reveal-card .big-num {
  font-family: var(--font-cn); font-weight: 800;
  font-size: clamp(44px, 6.4vw, 68px);
  line-height: 1.05;
  color: var(--apricot-3);
  letter-spacing: -0.01em;
}
.reveal-card .big-num .unit { font-size: 0.5em; color: var(--ink-2); margin-left: 6px; }
.reveal-card .note {
  font-family: var(--font-en-body);
  font-size: 16px; line-height: 1.6;
  color: var(--ink-2);
  background: var(--cream);
  border-radius: 10px
;
  padding: 14px 16px;
  border-left: 3px solid var(--leaf);
}
.reveal-card .pill-list {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.reveal-card .pill {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--leaf);
  color: var(--ink);
  font-family: var(--font-cn); font-weight: 800;
  font-size: 15px;
}

/* card flip wrapper */
.flip-wrap {
  perspective: 1400px;
}
.flip-card {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 1000ms var(--ease);
}
.flip-card.flipped { transform: rotateY(180deg); }
.flip-face {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.flip-face.back {
  position: absolute; inset: 0;
  transform: rotateY(180deg);
}

/* ----- 3.5 farewell --------------------------------------------- */
.farewell {
  margin-top: 56px;
  display: flex; flex-direction: column; gap: 28px;
  align-items: stretch;
  text-align: left;
}
.farewell .pause-line {
  font-family: var(--font-cn); font-weight: 800;
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.3;
  color: var(--ink);
  text-wrap: balance;
}
.farewell .pause-line.dim { color: var(--ink-3); }
.farewell .pause-line .en {
  display: block;
  margin-top: 8px;
  font-family: var(--font-en-body);
  font-size: 22px;
  color: var(--apricot-3);
  font-weight: 400;
}
.farewell .letter {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 32px 36px;
  font-family: var(--font-en-body);
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink);
  white-space: pre-wrap;
  position: relative;
}
.farewell .letter::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 100%;
  background-image:
    repeating-linear-gradient(transparent 0, transparent 33px, var(--hairline) 33px, var(--hairline) 34px);
  opacity: 0.30; pointer-events: none; border-radius: 16px;
}
.farewell .letter > * { position: relative; }

.farewell .closing {
  font-family: var(--font-cn); font-weight: 800;
  font-size: clamp(24px, 3.4vw, 36px);
  line-height: 1.3;
  text-align: center;
  color: var(--ink);
  padding: 36px 12px;
  border-top: 1px dashed var(--placeholder-line);
  border-bottom: 1px dashed var(--placeholder-line);
  text-wrap: balance;
}
.farewell .closing .en {
  display: block;
  margin-top: 10px;
  font-family: var(--font-en-body);
  color: var(--apricot-3);
  font-size: 18px;
  font-weight: 500;
}

/* slow staggered reveal for farewell */
.farewell-1 { animation: fadeUp 1200ms var(--ease) 200ms both; }
.farewell-2 { animation: fadeUp 1200ms var(--ease) 1200ms both; }
.farewell-3 { animation: fadeUp 1200ms var(--ease) 2400ms both; }
.farewell-4 { animation: fadeUp 1200ms var(--ease) 3400ms both; }
.farewell-5 { animation: fadeUp 1200ms var(--ease) 4400ms both; }

/* utility */
.flow-row {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 12px 16px;
}

.tag-line {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-cn);
  font-weight: 500;
  font-size: 17px;
  color: var(--apricot-3);
}
.tag-line::before, .tag-line::after {
  content: ''; width: 24px; height: 1px; background: var(--apricot); display: inline-block;
}

/* doodle line under handwriting */
.underline-doodle {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 8'><path d='M2 5 Q 30 -1, 60 4 T 118 3' stroke='%23D89A6F' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 8px;
  padding-bottom: 8px;
}


/* letter line-by-line reveal */
.letter-line {
  display: block;
  min-height: 1.2em;
  opacity: 0;
  animation: letterLineIn 700ms var(--ease) both;
}
@keyframes letterLineIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.slot.compact { max-width: 260px; margin-left: auto; margin-right: auto; }
