/* Primary 6 English Flashcards — after-folder-revise-2 colour (sunny Unit 1 tab)
   Cream / navy board / coral·sunny·sky·green·pink vivid folders · no doodles
   Fredoka (display) + Nunito (body) · equal folder-step · equal tab widths · equal folder-open pad */

:root {
  --bg: #fcf0d8;           /* cream paper ground (revise-2 / classroom) */
  --surface: #fcf0e4;
  --ink: #243c6c;
  --muted: #5a6570;
  --accent: #fc903c;       /* coral CTA */
  --accent-ink: #ffffff;
  --navy: #243c6c;         /* hero board */
  --cream: #fcf0d8;        /* Unit 1 folder body */
  --pale-yellow: #fcc03c;  /* Unit 1 tab / sunny accent */
  --mint: #84c0e4;         /* unused hero; kept as soft sky alias */
  --dusty-rose: #f0909c;   /* Dictation / packs alias → pink */
  --light-green: #009c48;  /* footer desk → green band */
  --soft-sky: #84c0e4;
  --folder-coral: #f0909c; /* Dictation 3 / f5 */
  --folder-peach: #fcc03c; /* Unit 4 / f4 — sunny yellow band */
  --folder-sky: #84c0e4;   /* Unit 3 / f3 */
  --folder-green: #009c48; /* Unit 2 / f2 */
  --terracotta: #fc903c;   /* CTA / accent = coral */
  --soft-blue: #7BA3C9;
  --soft-red: #FF8A7A;
  --soft-green: #8FBE8A;
  --white: #ffffff;

  /* tone aliases used by pack/how cards */
  --coral: #fc903c;
  --sunny: #fcc03c;        /* Unit 1 tab */
  --green: #009c48;
  --sky: #84c0e4;
  --pink: #f0909c;

  --font-display: "Fredoka", "Nunito", "PingFang TC", "Noto Sans TC", system-ui, sans-serif;
  --font-text: "Nunito", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;

  --step-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1.02rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  --step-head: clamp(2rem, 1.35rem + 2.8vw, 3.5rem);
  --step-display: clamp(2.75rem, 1.5rem + 6.5vw, 6.5rem);

  --margin: clamp(1.25rem, 2.4vw, 2rem);
  --page-max: 1080px;
  --gutter: clamp(1rem, 2vw, 1.75rem);
  --section: clamp(4.5rem, 10vw, 9rem);
  --radius: 24px;
  --radius-folder: 40px;
  --radius-sm: 18px;
  --radius-pill: 999px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
  --t-reveal: 700ms;
  --stagger-item: 70ms;

  /* Soft chalk kid doodles — sparse sticker scatter (user refs); navy/terracotta outlines */
  --doodle-motifs-a: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22360%22%20height%3D%22320%22%20viewBox%3D%220%200%20360%20320%22%3E%20%3Cg%20fill%3D%22none%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%3C%21--%20sun%20%28terracotta%29%20top-left%20--%3E%20%3Cg%20stroke%3D%22%23C47A5A%22%20stroke-opacity%3D%220.55%22%20stroke-width%3D%222.2%22%3E%20%3Ccircle%20cx%3D%2258%22%20cy%3D%2252%22%20r%3D%2216%22%2F%3E%20%3Cpath%20d%3D%22M58%2028v-8M58%2084v-8M34%2052h-8M90%2052h-8M40%2034l-6-6M82%2070l-6-6M40%2070l-6%206M82%2034l-6%206%22%2F%3E%20%3Cpath%20d%3D%22M52%2050c2%206%2010%206%2012%200%22%2F%3E%20%3Ccircle%20cx%3D%2252%22%20cy%3D%2246%22%20r%3D%221.4%22%20fill%3D%22%23C47A5A%22%20fill-opacity%3D%220.55%22%20stroke%3D%22none%22%2F%3E%20%3Ccircle%20cx%3D%2264%22%20cy%3D%2246%22%20r%3D%221.4%22%20fill%3D%22%23C47A5A%22%20fill-opacity%3D%220.55%22%20stroke%3D%22none%22%2F%3E%20%3C%2Fg%3E%20%3C%21--%20cloud%20%28navy%29%20top-right%20--%3E%20%3Cg%20stroke%3D%22%231D2B53%22%20stroke-opacity%3D%220.5%22%20stroke-width%3D%222.2%22%3E%20%3Cpath%20d%3D%22M268%2058c0-10%208-18%2018-18%204-10%2016-14%2026-8%2012-6%2026%202%2026%2016%2010%202%2016%2012%2012%2022H270c-8%200-14-6-14-12z%22%2F%3E%20%3C%2Fg%3E%20%3C%21--%20star%20%28navy%29%20mid-left%20--%3E%20%3Cg%20stroke%3D%22%231D2B53%22%20stroke-opacity%3D%220.5%22%20stroke-width%3D%222%22%3E%20%3Cpath%20d%3D%22M48%20168l6.5%2012.5%2014%20.8-10.8%208.6%203.6%2013.4L48%20196l-13.3%207.3%203.6-13.4-10.8-8.6%2014-.8z%22%2F%3E%20%3C%2Fg%3E%20%3C%21--%20heart%20%28terracotta%29%20mid-right%20--%3E%20%3Cg%20stroke%3D%22%23C47A5A%22%20stroke-opacity%3D%220.55%22%20stroke-width%3D%222.2%22%3E%20%3Cpath%20d%3D%22M292%20168c-8-14-26-10-26%206%200%2018%2026%2032%2026%2032s26-14%2026-32c0-16-18-20-26-6z%22%2F%3E%20%3C%2Fg%3E%20%3C%21--%20tiny%20sparkle%20dots%20--%3E%20%3Cg%20stroke%3D%22%231D2B53%22%20stroke-opacity%3D%220.4%22%20stroke-width%3D%221.8%22%3E%20%3Cpath%20d%3D%22M160%2040v8M156%2044h8%22%2F%3E%20%3Cpath%20d%3D%22M200%20280v6M197%20283h6%22%2F%3E%20%3C%2Fg%3E%20%3C%2Fg%3E%20%3C%2Fsvg%3E");
  --doodle-motifs-b: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22360%22%20height%3D%22320%22%20viewBox%3D%220%200%20360%20320%22%3E%20%3Cg%20fill%3D%22none%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%3C%21--%20daisy%20flower%20%28terracotta%29%20--%3E%20%3Cg%20stroke%3D%22%23C47A5A%22%20stroke-opacity%3D%220.55%22%20stroke-width%3D%222.1%22%3E%20%3Ccircle%20cx%3D%2270%22%20cy%3D%2270%22%20r%3D%227%22%2F%3E%20%3Cellipse%20cx%3D%2270%22%20cy%3D%2250%22%20rx%3D%227%22%20ry%3D%2211%22%2F%3E%20%3Cellipse%20cx%3D%2270%22%20cy%3D%2290%22%20rx%3D%227%22%20ry%3D%2211%22%2F%3E%20%3Cellipse%20cx%3D%2250%22%20cy%3D%2270%22%20rx%3D%2211%22%20ry%3D%227%22%2F%3E%20%3Cellipse%20cx%3D%2290%22%20cy%3D%2270%22%20rx%3D%2211%22%20ry%3D%227%22%2F%3E%20%3Cpath%20d%3D%22M70%2097v28M62%20118c4%206%2012%206%2016%200%22%2F%3E%20%3C%2Fg%3E%20%3C%21--%20cat%20head%20%28navy%29%20--%3E%20%3Cg%20stroke%3D%22%231D2B53%22%20stroke-opacity%3D%220.5%22%20stroke-width%3D%222.1%22%3E%20%3Ccircle%20cx%3D%22270%22%20cy%3D%2272%22%20r%3D%2222%22%2F%3E%20%3Cpath%20d%3D%22M252%2058l-4-16%2014%2010M288%2058l4-16-14%2010%22%2F%3E%20%3Ccircle%20cx%3D%22262%22%20cy%3D%2268%22%20r%3D%222%22%20fill%3D%22%231D2B53%22%20fill-opacity%3D%220.5%22%20stroke%3D%22none%22%2F%3E%20%3Ccircle%20cx%3D%22278%22%20cy%3D%2268%22%20r%3D%222%22%20fill%3D%22%231D2B53%22%20fill-opacity%3D%220.5%22%20stroke%3D%22none%22%2F%3E%20%3Cpath%20d%3D%22M266%2080c3%204%209%204%2012%200%22%2F%3E%20%3Cpath%20d%3D%22M248%2074h-10M248%2080h-8M292%2074h10M292%2080h8%22%2F%3E%20%3C%2Fg%3E%20%3C%21--%20balloon%20%28terracotta%29%20--%3E%20%3Cg%20stroke%3D%22%23C47A5A%22%20stroke-opacity%3D%220.55%22%20stroke-width%3D%222.1%22%3E%20%3Cellipse%20cx%3D%2290%22%20cy%3D%22220%22%20rx%3D%2216%22%20ry%3D%2220%22%2F%3E%20%3Cpath%20d%3D%22M90%20240l-3%206%206%200-3-6%22%2F%3E%20%3Cpath%20d%3D%22M90%20246c4%2014-6%2022%202%2034%22%2F%3E%20%3C%2Fg%3E%20%3C%21--%20house%20%28navy%29%20--%3E%20%3Cg%20stroke%3D%22%231D2B53%22%20stroke-opacity%3D%220.5%22%20stroke-width%3D%222.1%22%3E%20%3Cpath%20d%3D%22M248%20250l32-26%2032%2026v36H248z%22%2F%3E%20%3Cpath%20d%3D%22M248%20250h64%22%2F%3E%20%3Crect%20x%3D%22268%22%20y%3D%22262%22%20width%3D%2212%22%20height%3D%2224%22%20rx%3D%221%22%2F%3E%20%3Crect%20x%3D%22290%22%20y%3D%22266%22%20width%3D%2214%22%20height%3D%2212%22%20rx%3D%221%22%2F%3E%20%3C%2Fg%3E%20%3C%21--%20tiny%20heart%20accent%20--%3E%20%3Cg%20stroke%3D%22%23C47A5A%22%20stroke-opacity%3D%220.45%22%20stroke-width%3D%221.8%22%3E%20%3Cpath%20d%3D%22M180%20160c-4-7-13-5-13%203%200%209%2013%2016%2013%2016s13-7%2013-16c0-8-9-10-13-3z%22%2F%3E%20%3C%2Fg%3E%20%3C%2Fg%3E%20%3C%2Fsvg%3E");
  --doodle-motifs-c: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22360%22%20height%3D%22320%22%20viewBox%3D%220%200%20360%20320%22%3E%20%3Cg%20fill%3D%22none%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%3C%21--%20round%20bird%20%28navy%29%20--%3E%20%3Cg%20stroke%3D%22%231D2B53%22%20stroke-opacity%3D%220.5%22%20stroke-width%3D%222.1%22%3E%20%3Cellipse%20cx%3D%2272%22%20cy%3D%2280%22%20rx%3D%2222%22%20ry%3D%2218%22%2F%3E%20%3Ccircle%20cx%3D%2292%22%20cy%3D%2268%22%20r%3D%2210%22%2F%3E%20%3Ccircle%20cx%3D%2296%22%20cy%3D%2266%22%20r%3D%221.6%22%20fill%3D%22%231D2B53%22%20fill-opacity%3D%220.5%22%20stroke%3D%22none%22%2F%3E%20%3Cpath%20d%3D%22M102%2068l10%202-10%203%22%2F%3E%20%3Cpath%20d%3D%22M58%2088c-8%204-12%2010-8%2012%22%2F%3E%20%3Cpath%20d%3D%22M70%2062c-4-10%202-16%208-12%22%2F%3E%20%3C%2Fg%3E%20%3C%21--%20mini%20rainbow%20arcs%20%28terracotta%29%20--%3E%20%3Cg%20stroke%3D%22%23C47A5A%22%20stroke-opacity%3D%220.5%22%20stroke-width%3D%222.1%22%3E%20%3Cpath%20d%3D%22M230%20100c18-22%2052-22%2070%200%22%2F%3E%20%3Cpath%20d%3D%22M238%20108c14-16%2040-16%2054%200%22%2F%3E%20%3Cpath%20d%3D%22M246%20116c10-10%2028-10%2038%200%22%2F%3E%20%3C%2Fg%3E%20%3C%21--%204-point%20sparkle%20%28navy%29%20--%3E%20%3Cg%20stroke%3D%22%231D2B53%22%20stroke-opacity%3D%220.45%22%20stroke-width%3D%221.9%22%3E%20%3Cpath%20d%3D%22M180%20200v16M172%20208h16%22%2F%3E%20%3Cpath%20d%3D%22M176%20204l8%208M184%20204l-8%208%22%2F%3E%20%3C%2Fg%3E%20%3C%21--%20tulip%20flower%20%28terracotta%29%20--%3E%20%3Cg%20stroke%3D%22%23C47A5A%22%20stroke-opacity%3D%220.55%22%20stroke-width%3D%222.1%22%3E%20%3Cpath%20d%3D%22M80%20250c-10-8-10-22%200-28%206%204%2010%204%2016%200%2010%206%2010%2020%200%2028z%22%2F%3E%20%3Cpath%20d%3D%22M88%20250v30%22%2F%3E%20%3Cpath%20d%3D%22M88%20268c-10%204-16%2012-12%2014M88%20268c10%204%2016%2012%2012%2014%22%2F%3E%20%3C%2Fg%3E%20%3C%21--%20small%20star%20%28navy%29%20--%3E%20%3Cg%20stroke%3D%22%231D2B53%22%20stroke-opacity%3D%220.5%22%20stroke-width%3D%221.9%22%3E%20%3Cpath%20d%3D%22M280%20240l4%208%209%20.5-7%205.5%202.2%208.5L280%20258l-8.2%204.5%202.2-8.5-7-5.5%209-.5z%22%2F%3E%20%3C%2Fg%3E%20%3C%2Fg%3E%20%3C%2Fsvg%3E");
  --doodle-underline: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22120%22%20height%3D%2212%22%20viewBox%3D%220%200%20120%2012%22%3E%3Cpath%20d%3D%22M4%208c28-6%2056%204%2084-2%2010-2%2020%200%2028%202%22%20fill%3D%22none%22%20stroke%3D%22%23C47A5A%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22%20stroke-opacity%3D%220.75%22%2F%3E%3C%2Fsvg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; overflow-x: clip; scrollbar-gutter: stable; }
body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: max(16px, var(--step-body));
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4, p, figure, ul, ol { margin: 0; }
img, svg { display: block; max-width: 100%; }
img { height: auto; background: var(--surface); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 3px; }
::selection { background: var(--pale-yellow); color: var(--navy); }
.nums { font-variant-numeric: tabular-nums; }
.sr-only.skip {
  position: absolute;
  width: 1px; height: 1px; /* taste-skill-ignore */
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  background: var(--navy); color: var(--cream);
  padding: 0.5rem 1rem; z-index: 100;
  border-radius: 12px;
}
.sr-only.skip:focus {
  width: auto; height: auto;
  clip-path: none;
  left: var(--margin); top: 0.5rem;
}

/* —— Top bar: cream, soft —— */
.topbar {
  background: var(--cream);
}
.topbar-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0.85rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: calc(100% - 2 * var(--margin));
  box-sizing: border-box;
}
.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.nav-plain {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.nav-plain a {
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  color: var(--navy);
}
.nav-plain a:hover { background: var(--pale-yellow); }
.nav-jump {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  background: transparent;
  color: var(--navy);
  border: 0;
  box-shadow: none;
}
.nav-action {
  background: var(--coral) !important;
  color: var(--navy) !important;
}
.nav-action:hover { background: var(--navy) !important; color: var(--cream) !important; }

/* —— Hero: navy board + vivid folder stack (revise-2 colours; no doodles) —— */
.hero {
  position: relative;
  background: var(--navy);
  color: var(--cream);
  padding: 2rem var(--margin) 0;
  min-height: 92svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero::before {
  content: none; /* doodles off */
  display: none;
}
.hero > * { position: relative; z-index: 1; }
.hero > .hero-title,
.hero > .hero-support,
.hero > .folder-stack {
  width: 100%;
  max-width: var(--page-max);
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: var(--step-display);
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-align: center;
  color: var(--sunny);
  max-width: 12ch;
  margin-top: clamp(1rem, 4vw, 2.5rem);
  padding-bottom: 0;
  background-image: none;
}
.hero-support {
  margin-top: 1rem;
  text-align: center;
  font-size: var(--step-body);
  line-height: 1.45;
  max-width: 42ch;
  color: var(--cream);
  opacity: 0.95;
  font-weight: 500;
}

/* Folder stack — equal top step f5→f1 (desktop + mobile) */
.folder-stack {
  position: relative;
  width: 100%;
  max-width: var(--page-max);
  margin-top: clamp(2rem, 6vw, 3.5rem);
  flex: 1;
  min-height: 52svh;
  --folder-step: 52px; /* equal visible band height between layers */
}
.folder {
  position: absolute;
  left: 0; right: 0;
  height: 72%;
  border-radius: var(--radius-folder) var(--radius-folder) 0 0;
  transition: transform var(--t-ui) var(--ease-out), opacity var(--t-ui) var(--ease-out);
}
.folder.is-dim { opacity: 0.78; }
.folder-tab {
  position: absolute;
  top: -34px;
  left: var(--tab-x, 8%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 7.5rem;
  min-width: 7.5rem;
  max-width: 7.5rem;
  height: 36px;
  padding: 0 0.4rem;
  box-sizing: border-box;
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-align: center;
  color: var(--navy);
  background: inherit;
  border-radius: 18px 18px 0 0;
  clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
}
/* Vivid revise-2 bands; equal --folder-step tops; Unit 1 tab = sunny #fcc03c */
.f5 { top: 0; background: var(--folder-coral); z-index: 1; --tab-x: 78%; } /* pink Dictation 3 */
.f4 { top: calc(var(--folder-step) * 1); background: var(--folder-peach); z-index: 2; --tab-x: 60%; } /* sunny Unit 4 */
.f3 { top: calc(var(--folder-step) * 2); background: var(--folder-sky);   z-index: 3; --tab-x: 42%; }
.f2 { top: calc(var(--folder-step) * 3); background: var(--folder-green); z-index: 4; --tab-x: 24%; }
.f2 .folder-tab { color: var(--white); } /* green needs white for contrast */
.f5 .folder-tab { color: var(--navy); }
.f1 {
  top: calc(var(--folder-step) * 4);
  bottom: 0;
  height: auto;
  min-height: 320px;
  background: var(--cream);
  color: var(--navy);
  z-index: 5;
  border-radius: var(--radius-folder) var(--radius-folder) 0 0;
}
.f1 .folder-tab {
  background: var(--sunny); /* Unit 1 tab sunny #fcc03c (revise-2) */
  color: var(--navy);
  left: 8%;
}
.folder-open {
  /* equal top ≈ bottom pad; desktop content further down */
  padding: 4rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.25rem 1.5rem;
  align-items: start;
  height: 100%;
}
.folder-cover {
  grid-row: 1 / span 2;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--sunny);
  aspect-ratio: 4 / 3;
  max-height: 340px;
}
.folder-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: cover-drift 14s var(--ease-soft) infinite alternate;
}
.folder-meta {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: var(--step-body);
  line-height: 1.4;
}
.folder-meta strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-lead);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.folder-cta { justify-self: start; align-self: end; }

@keyframes cover-drift {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  .folder-cover img { animation: none; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.7rem 1.4rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  transition: transform var(--t-press) var(--ease-out), background var(--t-hover) var(--ease-out), color var(--t-hover);
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--coral);
  color: var(--navy);
  border-radius: 18px 18px 14px 14px;
}
.btn-primary:hover { background: var(--sunny); color: var(--navy); }
.btn-ink {
  background: var(--navy);
  color: var(--cream);
  width: 100%;
  min-height: 56px;
  border-radius: var(--radius-sm);
}
.btn-ink:hover { background: var(--coral); color: var(--white); }

/* —— Packs: sunny Class News field + cream sheet —— */
.section { padding-block: 0; }
#packs { scroll-margin-top: 1rem; }
.packs-field {
  position: relative;
  background: var(--sunny);
  padding: clamp(3rem, 8vw, 5.5rem) var(--margin);
  overflow: hidden;
}
.packs-field::before {
  content: none;
  display: none;
}
.sheet {
  position: relative;
  z-index: 1;
  max-width: var(--page-max);
  margin: 0 auto;
  background: var(--cream);
  border-radius: var(--radius);
  padding: clamp(4.4rem, 7vw, 5.2rem) clamp(1.25rem, 3vw, 2.5rem) 2rem;
}
.sheet .detective-peek {
  position: absolute;
  top: 0.45rem;
  left: 0.55rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
  width: 4.1rem;
  color: var(--navy);
  text-decoration: none;
  opacity: 0.82;
}
.sheet .detective-peek img {
  width: 2.7rem;
  height: 2.7rem;
  object-fit: contain;
  background: none;
}
.sheet .detective-peek span {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 0.66rem;
  line-height: 1.05;
  text-align: center;
}
.sheet .detective-peek:hover,
.sheet .detective-peek:focus-visible { opacity: 1; }
.sheet-title {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: var(--step-head);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--navy);
  text-align: center;
  display: inline-block;
  width: 100%;
  padding-bottom: 0.25rem;
  background-image: var(--doodle-underline);
  background-repeat: no-repeat;
  background-position: center 100%;
  background-size: min(200px, 50%) 9px;
}
.sheet-note {
  margin: 0.65rem auto 1.75rem;
  text-align: center;
  max-width: 40ch;
  color: var(--ink);
  font-size: var(--step-body);
}
.pack-carousel { min-width: 0; }
.pack-track {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: relative;
  padding-bottom: 0.25rem;
}
.pack-track::-webkit-scrollbar { display: none; }
.pack-card {
  display: flex;
  flex-direction: column;
  flex: 0 0 min(26rem, 70%);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--navy);
  transition: transform var(--t-hover) var(--ease-out);
  min-height: 100%;
  padding: 0.65rem;
  gap: 0.65rem;
}
.pack-carousel-status {
  margin: 0.85rem 0 0;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 650;
  color: var(--navy);
}
.pack-card:hover,
.pack-card:focus-visible { transform: translateY(-4px); }
.pack-card.is-active { outline: 4px solid var(--navy); outline-offset: 3px; }
.pack-cover {
  aspect-ratio: 1;
  overflow: hidden;
  background: #fff;
  border-radius: calc(var(--radius) - 6px);
}
.pack-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #fff;
  -webkit-user-drag: none;
  user-select: none;
}
.pack-body {
  padding: 1rem 1.05rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
  background: var(--cream);
  color: var(--navy);
  border-radius: calc(var(--radius) - 6px);
}
.pack-body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.pack-body p {
  font-size: 1rem;
  line-height: 1.4;
  color: var(--navy);
}
.pack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.55rem;
}
.tag {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--pale-yellow);
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--navy);
}

.tone-coral { background: var(--coral); }
.tone-green { background: var(--green); }
.tone-sky   { background: var(--sky); }
.tone-sunny { background: var(--sunny); }
.tone-pink  { background: var(--pink); }
.tone-sunny .tag { background: var(--navy); color: var(--cream); }
.tone-green .folder-tab,
.tone-green .tag { color: var(--navy); }

/* —— How: cream + doodles —— */
.how {
  position: relative;
  background: var(--cream);
  padding: clamp(3.5rem, 9vw, 6rem) var(--margin);
  overflow: hidden;
}
.how::before {
  content: none;
  display: none;
}
.how-wrap {
  position: relative;
  z-index: 1;
  max-width: var(--page-max);
  margin: 0 auto;
  width: 100%;
}
.how-title {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: var(--step-head);
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--navy);
  text-align: center;
  padding-bottom: 0.3rem;
  background-image: var(--doodle-underline);
  background-repeat: no-repeat;
  background-position: center 100%;
  background-size: min(220px, 55%) 9px;
}
.how-lead {
  margin: 0.7rem auto 1.75rem;
  text-align: center;
  max-width: 42ch;
  font-size: var(--step-body);
  color: var(--ink);
}
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}
.how-card {
  border-radius: var(--radius);
  overflow: hidden;
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  color: var(--navy);
}
.how-card .how-art {
  position: relative;
  border-radius: calc(var(--radius) - 6px);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #fff;
}
.how-card .how-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #fff;
}
.how-card .how-body {
  background: var(--cream);
  border-radius: calc(var(--radius) - 6px);
  padding: 1rem 1.05rem 1.15rem;
  flex: 1;
}
.how-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-lead);
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
  color: var(--navy);
}
.how-card p {
  font-size: var(--step-body);
  line-height: 1.4;
  color: var(--navy);
}
@media (max-width: 820px) {
  .how-grid { grid-template-columns: 1fr; }
}

/* —— Word of the day: pale yellow band, lighter than the sunny Packs field —— */
.cta {
  position: relative;
  background: color-mix(in srgb, var(--sunny) 40%, #fff);
  color: var(--navy);
  min-height: 0;
  padding: clamp(1.75rem, 5vw, 3rem) var(--margin) clamp(2rem, 6vw, 3.5rem);
  overflow: hidden;
}
.daily-card {
  max-width: var(--page-max);
  margin: 0 auto;
  background: var(--cream);
  color: var(--navy);
  border: 0;
  box-shadow: none;
  border-radius: 28px;
  padding: clamp(1.1rem, 3vw, 1.6rem);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  gap: 1.1rem 1.5rem;
  align-items: stretch;
}
.daily-kicker {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 0.55rem;
}
.daily-kicker span {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
  margin-left: 0.35rem;
}
.daily-word-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.daily-img {
  width: 6.5rem;
  height: 6.5rem;
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
  flex: 0 0 auto;
}
.daily-en {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(1.7rem, 1.15rem + 1.8vw, 2.5rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--navy);
}
.daily-zh {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", var(--font-text);
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0.3rem;
  color: var(--navy);
}
.daily-unit {
  margin-top: 0.25rem;
  font-weight: 700;
  color: var(--navy);
}
.daily-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}
.daily-actions .btn { width: auto; }
#daily-play { gap: 0.4rem; white-space: nowrap; }
.daily-speaker {
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 auto;
  display: block;
}
.daily-open {
  background: var(--navy);
  color: var(--cream);
  border-radius: 18px;
}
.daily-open:hover { background: var(--coral); color: var(--navy); }
.daily-continue {
  background: var(--white);
  border: 0;
  box-shadow: none;
  border-radius: 22px;
  padding: 1rem 1.05rem 1.15rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
.daily-continue-copy {
  font-size: 1.08rem;
  line-height: 1.35;
  font-weight: 700;
  color: var(--navy);
}
.daily-continue .btn { margin-top: 0.9rem; width: auto; }
.cta::before {
  content: none;
  display: none;
}
.cta-inner {
  position: relative;
  z-index: 1;
  max-width: var(--page-max);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: end;
}
.cta-aside {
  font-size: clamp(1.15rem, 1rem + 0.8vw, 1.45rem);
  line-height: 1.35;
  max-width: 32ch;
  padding-bottom: 3.5rem;
  color: var(--navy);
  font-weight: 600;
}
.reply-card {
  background: var(--cream);
  color: var(--navy);
  border-radius: var(--radius);
  padding: 2.5rem 2rem 2.25rem;
  text-align: center;
  width: 100%;
  max-width: none;
  justify-self: stretch;
  transform: none;
  margin-bottom: -2.25rem;
  position: relative;
  z-index: 1;
}
.reply-card h2 {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.1rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.6rem;
}
.reply-card p {
  font-size: 1.05rem;
  margin-bottom: 1.35rem;
  line-height: 1.4;
}

/* —— Footer: navy desk + scalloped cream postcard —— */
.site-footer {
  position: relative;
  background: var(--navy);
  padding: clamp(3rem, 7vw, 4.5rem) var(--margin) 2.5rem;
  overflow: hidden;
}
.site-footer::before {
  content: none;
  display: none;
}
.postcard {
  position: relative;
  z-index: 1;
  max-width: var(--page-max);
  margin: 0 auto;
  background: var(--cream);
  color: var(--navy);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 2.5rem clamp(1.25rem, 3vw, 2.5rem) 1.5rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem 2rem;
  --scallop: 28px;
  clip-path: polygon(
    0% var(--scallop),
    4% 0%, 8% var(--scallop), 12% 0%, 16% var(--scallop), 20% 0%,
    24% var(--scallop), 28% 0%, 32% var(--scallop), 36% 0%, 40% var(--scallop),
    44% 0%, 48% var(--scallop), 52% 0%, 56% var(--scallop), 60% 0%,
    64% var(--scallop), 68% 0%, 72% var(--scallop), 76% 0%, 80% var(--scallop),
    84% 0%, 88% var(--scallop), 92% 0%, 96% var(--scallop), 100% 0%,
    100% 100%, 0% 100%
  );
  padding-top: calc(2.5rem + 10px);
}
.postcard-sign {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.55rem;
}
.postcard-left p:last-child {
  font-size: 1rem;
  line-height: 1.45;
  max-width: 42ch;
}
.postcard-right {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 1.05rem;
  font-weight: 600;
}
.postcard-right a:hover { color: var(--terracotta); }
.stamp {
  width: 88px;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  align-self: flex-end;
  padding: 4px;
  background: var(--white);
}
.stamp img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}
.imprint {
  grid-column: 1 / -1;
  text-align: center;
  font-size: var(--step-small);
  color: var(--muted);
  margin-top: 0.75rem;
}

/* —— Motion entrances —— */
.hero { opacity: 0; transform: translateY(18px); }
.hero.is-in { opacity: 1; transform: none; transition: opacity var(--t-reveal) var(--ease-out), transform var(--t-reveal) var(--ease-out); }
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--t-reveal) var(--ease-out), transform var(--t-reveal) var(--ease-out);
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 70ms; }
.reveal-delay-2 { transition-delay: 140ms; }
.reveal-delay-3 { transition-delay: 210ms; }
.reveal-delay-4 { transition-delay: 280ms; }
.reveal-delay-5 { transition-delay: 350ms; }

@media (prefers-reduced-motion: reduce) {
  .hero, .reveal { opacity: 1; transform: none; transition: none; }
  .pack-card:hover { transform: none; }
}

/* —— Phone —— */
@media (max-width: 820px) {
  .topbar-inner { gap: 0.45rem; }
  .brand { font-size: 1rem; flex: 0 1 auto; }
  .nav-plain { flex-wrap: nowrap; gap: 0.3rem; margin-left: auto; }
  .nav-plain a:not(.nav-action):not(.nav-jump) { display: none; }
  .nav-plain a.nav-jump,
  .nav-plain a.nav-action { display: inline-flex !important; }
  .nav-jump,
  .nav-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.3rem 0.55rem;
    font-size: 0.86rem;
    white-space: nowrap;
    border: 0;
    box-shadow: none;
  }
  .nav-jump {
    background: transparent;
    color: var(--navy);
  }
  .folder-stack { width: 100%; min-height: 64svh; }
  .folder { --radius-folder: 28px; }
  .folder-tab {
    top: -28px;
    width: 5.75rem;
    min-width: 5.75rem;
    max-width: 5.75rem;
    height: 30px;
    padding: 0 0.3rem;
    font-size: 0.72rem;
    border-radius: 14px 14px 0 0;
  }
  .folder-stack { --folder-step: 36px; }
  .f5 { --tab-x: 72%; }
  .f4 { --tab-x: 54%; }
  .f3 { --tab-x: 36%; }
  .f2 { --tab-x: 18%; }
  .f1 { min-height: 340px; }
  .f1 .folder-tab { left: 4%; }
  .folder-open {
    grid-template-columns: 1fr;
    padding: 2.25rem 1.1rem 2.25rem; /* equal top ≈ bottom on phone */
  }
  .folder-cover { grid-row: auto; max-height: 220px; }
  .folder-cta { width: 100%; }
  .hero-title { font-size: clamp(2.6rem, 14vw, 4rem); margin-top: 1rem; }
  .pack-card { flex-basis: min(26rem, 78%); }
  .cta-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .cta { min-height: 0; }
  .daily-card { grid-template-columns: 1fr; }
  .daily-actions { display: grid; grid-template-columns: 1fr; }
  .daily-actions .btn,
  .daily-continue .btn { width: 100%; }
  .cta-aside { padding-bottom: 0; order: 1; }
  .reply-card {
    order: 2;
    width: 100%;
    margin-bottom: -1.75rem;
  }
  .postcard {
    grid-template-columns: 1fr;
    --scallop: 22px;
  }
  .stamp { align-self: flex-end; width: 64px; }
}

@media (max-width: 420px) {
  .folder-stack { min-height: 68svh; }
  .folder-tab {
    width: 5.25rem;
    min-width: 5.25rem;
    max-width: 5.25rem;
    height: 28px;
    padding: 0 0.25rem;
    font-size: 0.66rem;
    top: -26px;
  }
  .folder-stack { --folder-step: 32px; }
  .f5 { --tab-x: 70%; }
  .f4 { --tab-x: 52%; }
  .f3 { --tab-x: 34%; }
  .f2 { --tab-x: 16%; }
  .f1 { min-height: 300px; }
}

@media (min-width: 821px) {
  .pack-card { flex-basis: min(26rem, 46%); }
}

.pack-card, .how-card, .reply-card, .folder-open > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--t-reveal) var(--ease-out), transform var(--t-reveal) var(--ease-out);
}
.packs.is-in .pack-card,
.how.is-in .how-card,
.cta.is-in .reply-card,
.cta.is-in .cta-aside,
.hero.is-in .folder-open > * {
  opacity: 1;
  transform: none;
}
.packs.is-in .pack-card:nth-child(1) { transition-delay: 60ms; }
.packs.is-in .pack-card:nth-child(2) { transition-delay: 120ms; }
.packs.is-in .pack-card:nth-child(3) { transition-delay: 180ms; }
.packs.is-in .pack-card:nth-child(4) { transition-delay: 240ms; }
.packs.is-in .pack-card:nth-child(5) { transition-delay: 300ms; }
.how.is-in .how-card:nth-child(1) { transition-delay: 80ms; }
.how.is-in .how-card:nth-child(2) { transition-delay: 160ms; }
.how.is-in .how-card:nth-child(3) { transition-delay: 240ms; }
.hero.is-in .folder-cover { transition-delay: 100ms; }
.hero.is-in .folder-meta { transition-delay: 170ms; }
.hero.is-in .folder-cta { transition-delay: 240ms; }
@media (prefers-reduced-motion: reduce) {
  .pack-card, .how-card, .reply-card, .folder-open > * {
    opacity: 1; transform: none; transition: none;
  }
}


/* —— Simple homepage (no folder tabs) —— */
.hero.hero-simple {
  min-height: auto;
  padding: 2rem var(--margin) 0.75rem;
  justify-content: center;
}
.hero.hero-simple .hero-title {
  margin-top: clamp(0.75rem, 3vw, 1.75rem);
  max-width: 14ch;
}
.hero.hero-simple .hero-support {
  margin-bottom: 0.5rem;
}
.badge-prompt {
  background: var(--navy);
  padding: 0.15rem var(--margin) 1.5rem;
}
.badge-prompt-card {
  max-width: var(--page-max);
  margin: 0 auto;
  background: var(--cream);
  color: var(--navy);
  border: 5px solid var(--sunny);
  border-radius: 28px;
  padding: 0.7rem 1rem 0.85rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  justify-content: center;
  gap: 0.35rem 0.85rem;
}
.badge-prompt-art {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 0;
}
.badge-prompt-art img {
  width: 6.4rem;
  height: 7.6rem;
  max-width: none;
  object-fit: contain;
  object-position: bottom center;
  background: none;
  margin: 0 -0.55rem;
}
.badge-prompt-copy {
  flex: 0 0 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
}
.badge-prompt-kicker {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--coral);
}
.badge-prompt-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(1.55rem, 1.2rem + 1.4vw, 2.15rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.badge-prompt-card p {
  margin: 0;
  font-weight: 700;
  line-height: 1.35;
}
.badge-prompt-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.35rem;
  background: var(--coral);
  color: var(--white);
  border-radius: 999px;
  min-height: 48px;
  padding: 0.55rem 1.25rem;
  font-family: var(--font-display);
  font-weight: 650;
  text-align: center;
}
.badge-prompt-go:hover { background: var(--navy); color: var(--cream); }
@media (max-width: 640px) {
  .badge-prompt-card { flex-direction: column; text-align: center; padding: 0.55rem 0.75rem 0.7rem; }
  .badge-prompt-art,
  .badge-prompt-copy { width: 100%; }
  .badge-prompt-art img { width: 5.6rem; height: 6.7rem; margin: 0 -0.45rem; }
  .badge-prompt-copy { align-items: center; }
  .badge-prompt-go { width: 100%; }
}
.folder-stack { display: none !important; }

.pack-card {
  /* was <a>; now <article> with inner Open button */
}
.pack-body .pack-open {
  margin-top: 0.75rem;
  align-self: stretch;
  width: 100%;
  text-align: center;
}
.tone-green .pack-open { color: var(--navy); }
.tone-green .pack-open:hover { background: var(--sunny); color: var(--navy); }


/* —— Badges page —— */
.badge-main {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) var(--margin) 3rem;
}
.badge-main h1 {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(2rem, 1.4rem + 2vw, 3rem);
  letter-spacing: -0.03em;
  color: var(--navy);
  margin-bottom: 0.4rem;
}
.badge-lead {
  max-width: 38rem;
  font-weight: 650;
  color: var(--ink);
  margin-bottom: 0.35rem;
}
.badge-count {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--coral);
  margin-bottom: 1.1rem;
}
.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
  gap: 1.75rem 0.85rem;
  justify-items: center;
}
.badge-card {
  background: none;
  padding: 0;
  width: 100%;
  max-width: 16rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  text-align: center;
}
.badge-art {
  width: 7.75rem;
  height: 7.75rem;
  margin: 0 auto 0.35rem;
  background: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.badge-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: none;
}
.badge-name {
  font-family: "Noto Sans TC", "PingFang TC", var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.25;
  color: var(--navy);
}
.badge-english {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
  color: var(--navy);
}
.badge-unit {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--navy);
}
.badge-date {
  margin-top: 0.15rem;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--muted);
}
.badge-how {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.35;
  color: var(--navy);
  text-align: center;
}
.badge-how a {
  color: var(--coral);
  font-weight: 800;
  text-decoration: underline;
}
.badge-name,
.badge-english,
.badge-how {
  display: block;
  max-width: 16rem;
}
.badge-card.is-locked .badge-how,
.badge-card.is-locked .badge-name,
.badge-card.is-locked .badge-english,
.badge-card.is-locked .badge-unit {
  color: var(--navy);
}
/* Book, level, and unit home */
html[data-place="guide"] .place-shell,
html[data-place="guide"] .home-overview,
html[data-place="guide"] .place-nav { display: none; }
html[data-place="ready"] .place-guide { display: none; }
.resource-list { display: grid; gap: 0.75rem; }
.resource-card {
  background: var(--white);
  border-radius: 18px;
  padding: 1rem 1.05rem;
  box-shadow: 0 10px 22px rgba(36, 60, 108, 0.12);
}
.resource-card h3 { margin: 0 0 0.25rem; color: var(--navy); }
.resource-meta { margin: 0 0 0.35rem; font-weight: 700; color: var(--navy); }
.resource-card button:disabled { opacity: 0.65; cursor: default; }
.resource-empty { color: var(--navy); font-weight: 700; }
html[data-view="unit"] .home-overview { display: none; }
html[data-view="home"] .unit-panel { display: none; }
html[data-level-live="no"] .level-live { display: none; }
.place-guide,
.place-shell {
  width: min(100% - 2 * var(--margin), var(--page-max));
  margin: 0 auto;
  padding: 1.35rem 0 0.5rem;
}
.place-shell {
  padding-top: 0.4rem;
  padding-bottom: 4.5rem;
}
.topbar .place-nav { margin-top: 0; align-items: center; }
.topbar .place-drop-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.topbar { overflow: visible; }
a.account-entry {
  background: var(--navy);
  color: var(--cream);
  min-height: 44px;
}
a.account-entry:hover { background: var(--coral); color: var(--navy); }
.place-guide h1,
.place-header,
.unit-heading {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--navy);
  text-wrap: balance;
}
.place-guide h1,
.place-header {
  font-size: clamp(2.1rem, 1.3rem + 3vw, 3.4rem);
  line-height: 1.05;
}
.place-choices {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.15rem;
}
.place-choices.is-book { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.place-choices.is-level { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.place-choice,
.place-drop button,
.place-menu button,
.unit-tab,
.place-back {
  font-family: var(--font-display);
  font-weight: 650;
  color: var(--navy);
}
.place-choice,
.place-back {
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 10px 22px rgba(36, 60, 108, 0.12);
}
.place-choice {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0.45rem;
  text-align: left;
}
.place-choice img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  background: #fff;
}
.place-choice span {
  padding: 0.65rem 0.35rem 0.35rem;
  font-size: 1.25rem;
}
.place-back { min-height: 2.75rem; padding: 0.4rem 1rem; }
.place-choice:hover,
.place-menu button:hover,
.place-menu button[aria-selected="true"] { background: var(--pale-yellow); }
.place-back {
  margin-top: 0.9rem;
  min-height: 2.75rem;
  padding: 0.4rem 1rem;
}
.place-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1rem;
  margin-top: 0.85rem;
}
.place-drop { position: relative; }
.place-drop-label {
  display: block;
  margin-bottom: 0.28rem;
  font-weight: 800;
  color: var(--navy);
}
.place-drop > button,
.unit-tab {
  min-height: 44px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 8px 18px rgba(36, 60, 108, 0.1);
}
.place-drop > button { padding: 0.35rem 0.9rem 0.35rem 1rem; font-size: 1.05rem; }
.place-drop > button::after {
  content: "";
  display: inline-block;
  margin-left: 0.55rem;
  border-width: 6px 5px 0;
  border-style: solid;
  border-color: var(--navy) transparent transparent;
  vertical-align: 0.15em;
}
.place-drop > button[aria-expanded="true"] { background: var(--pale-yellow); }
.place-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.4rem);
  left: 0;
  min-width: 11.5rem;
  padding: 0.35rem;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 14px 28px rgba(36, 60, 108, 0.16);
}
.place-menu button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0.35rem 0.75rem;
  border-radius: 12px;
  text-align: left;
}
.topbar:has(> .unit-tabs) .topbar-inner {
  width: min(100% - calc(2rem * 1.0625), 1080px);
  max-width: none;
  gap: calc(0.75rem * 1.0625) calc(1rem * 1.0625);
  padding: calc(0.75rem * 1.0625) 0 calc(0.35rem * 1.0625);
}
.topbar > .unit-tabs {
  display: flex;
  gap: 0.45rem;
  width: min(100% - calc(2rem * 1.0625), 1080px);
  margin: 0 auto;
  padding: calc(0.35rem * 1.0625) 0 calc(0.15rem * 1.0625);
  overflow-x: auto;
  scrollbar-width: none;
}
.topbar > .unit-tabs::-webkit-scrollbar { display: none; }
html[data-view="home"] .place-shell { display: none; }
.unit-tab {
  flex: 0 0 auto;
  padding: 0.4rem 0.95rem;
  border-radius: 16px 16px 8px 8px;
  background: color-mix(in srgb, var(--sky) 45%, white);
}
.unit-tab[aria-selected="true"] {
  background: var(--navy);
  color: var(--cream);
  box-shadow: none;
}
.unit-heading {
  margin-top: 0.2rem;
  font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2rem);
}
.place-entries {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.35rem;
  margin-top: 0.85rem;
}
@media (min-width: 960px) {
  .place-entries:has(> .place-group + .place-group) {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    column-gap: 1.25rem;
  }
  .place-entries:has(> .place-group + .place-group) > .place-group {
    display: flex;
    flex-direction: column;
  }
  .place-entries:has(> .place-group + .place-group) > .place-group > .place-group-items {
    flex: 1;
    grid-auto-rows: 1fr;
  }
}
.place-group-title {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}
.place-group-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
  gap: 0.75rem;
  align-items: stretch;
}
.place-entry {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  justify-content: flex-start;
  padding: 0;
  overflow: hidden;
  border-radius: 22px;
  color: var(--navy);
  box-shadow: 0 10px 22px rgba(36, 60, 108, 0.12);
}
.place-entry-media {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  overflow: hidden;
  background: #fff;
}
.place-entry-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  object-fit: contain;
  object-position: center;
  background: #fff;
}
.place-entry-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.25rem;
  min-height: 6.4rem;
  padding: 0.9rem 1rem 1rem;
}
.place-entry.is-soon {
  justify-content: center;
  min-height: 8.75rem;
}
.place-entry.is-soon .place-entry-copy { min-height: 0; }
.grade-covers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.75rem;
  width: min(100% - 2 * var(--margin), var(--page-max));
  margin: 1.25rem auto 0;
}
.grade-cover {
  display: flex;
  flex-direction: column;
  padding: 0.4rem;
  border-radius: 20px;
  background: var(--white);
  color: var(--navy);
  text-align: left;
  box-shadow: 0 10px 22px rgba(36, 60, 108, 0.12);
}
.grade-cover img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  background: #fff;
}
.grade-cover span {
  padding: 0.65rem 0.4rem 0.4rem;
  font-family: var(--font-display);
  font-weight: 700;
}
@media (max-width: 720px) {
  .place-choices.is-book,
  .place-choices.is-level { grid-template-columns: 1fr 1fr; }
  .topbar-inner { flex-wrap: wrap; row-gap: 0.55rem; }
}
.place-entry h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.place-entry p {
  font-weight: 700;
  min-height: 2lh;
}
.place-entry.tone-revision-vocab,
.place-entry.tone-practice-vocab { background: color-mix(in srgb, var(--sunny) 78%, white); }
.place-entry.tone-revision-grammar,
.place-entry.tone-practice-grammar { background: color-mix(in srgb, var(--sky) 72%, white); }
.place-entry.tone-game { background: color-mix(in srgb, var(--green) 38%, white); }
.topbar-account {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
html:not([data-signed-in="yes"]) #profile-slot { display: none !important; }
html[data-signed-in="yes"] #account-link { display: none !important; }
html[data-signed-in="yes"] #profile-slot { display: inline-flex !important; align-items: center; gap: 0.45rem; }
@media (max-width: 820px) {
  .topbar-inner { flex-wrap: wrap; align-items: center; }
  .brand { order: 0; }
  .topbar-account { order: 1; margin-left: auto; flex: 0 0 auto; }
  .place-nav { order: 2; flex: 1 0 100%; margin: 0.35rem 0 0; }
  .topbar:has(> .unit-tabs) .place-nav { margin-top: 0; }
}
.place-entry:hover { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) {
  .place-entry { transition: none; }
  .place-entry:hover { transform: none; }
}

.hero.hero-simple .hero-support-zh {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", var(--font-text);
  font-weight: 700;
  font-size: clamp(1.15rem, 0.9rem + 1.2vw, 1.55rem);
  letter-spacing: 0.12em;
  color: var(--cream, #fcf0d8);
  opacity: 0.95;
}
.badge-meter {
  width: min(100%, 9rem);
  height: 0.55rem;
  margin-top: 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--navy) 12%, white);
  overflow: hidden;
}
.badge-meter > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--coral);
}
.badge-fraction {
  margin: 0.2rem 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--navy);
}
.badge-art.is-filtered img { filter: grayscale(1); opacity: 0.72; }
