/* 玩樂高手官網共用樣式。
   Layout concept: the site is a LEGO baseplate — bright, studded, every course a brick on a staircase that
   climbs with age. Single bright theme on purpose (使用者 2026-10-02：整站明亮活潑為主);
   only VEX blocks switch to the LULU dark look via the .lulu scope at the bottom. */
/* 清松手寫體 1（圓潤），OFL；build.py 依頁面用字自動裁切。Handwriting POP face for headings. */
@font-face {
  font-family: "JH Round";
  src: url("fonts/jh1-subset.woff2") format("woff2");
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f6f7fc;
  --surface: #ffffff;
  --ink: #262142;
  --ink-soft: #5d5978;
  --line: #e2e0ee;
  --red: #e4322b;
  --yellow: #ffc531;
  --purple: #5a48a8;
  --green: #5fa82a;
  --sky: #2f9bd6;
  --plate: #ffd95e;
  --plate-stud: #ffe796;
  --plate-ink: #3b2b05;
  --tint-yellow: #fff2c2;
  --tint-red: #ffe1dc;
  --tint-green: #e3f3d3;
  --tint-sky: #dcf0fb;
  --tint-purple: #ebe6ff;
  --line-green: #06c755;
  --line-green-dark: #048a3b;
  --shadow: 0 1px 0 rgba(38, 33, 66, .06), 0 10px 28px -14px rgba(38, 33, 66, .28);
  --f-display: "JH Round", "Huninn", "Chiron GoRound TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --f-body: "Chiron GoRound TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --f-num: "Fredoka", "Chiron GoRound TC", system-ui, sans-serif;
  --wrap: 1160px;
  --gutter: 20px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-body); font-size: 16px; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 400; line-height: 1.25; margin: 0; text-wrap: balance; }
/* thicken the handwriting a touch so it reads like the stickers' marker lettering 手寫字加一點粗，像貼圖的麥克筆字 */
h1, h2, .door-body h3, .box-body h3, .program h3, .tile { -webkit-text-stroke: .025em currentColor; paint-order: stroke fill; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--surface); padding: 8px 14px; border-radius: 999px; }
.skip:focus { left: 12px; }

/* Die-cut sticker edge: white outline like a real sticker. 貼紙白邊，像真的貼紙。 */
.sticker {
  filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff)
          drop-shadow(0 6px 8px rgba(0, 0, 0, .2));
}
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(2deg); } }
.bob { animation: bob 4.6s ease-in-out infinite; }

/* Pills — every button and badge is a capsule. 按鈕與徽章一律膠囊。 */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
  font-weight: 700; text-decoration: none; font-size: 16px; line-height: 1.2;
  border: 2px solid var(--ink); background: var(--surface); color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease; box-shadow: 0 4px 0 var(--ink);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn--line { background: var(--line-green); color: #fff; border-color: var(--line-green-dark); box-shadow: 0 4px 0 var(--line-green-dark); }
.btn--line:hover { box-shadow: 0 6px 0 var(--line-green-dark); }
.btn--line:active { box-shadow: 0 1px 0 var(--line-green-dark); }
.btn svg { width: 18px; height: 18px; flex: none; }
.tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border-radius: 999px;
  font-size: 13px; font-weight: 500; background: var(--paper); color: var(--ink-soft); border: 1px solid var(--line);
  text-decoration: none;
}
a.tag:hover { border-color: var(--ink); color: var(--ink); }
.tag--hot { background: var(--yellow); color: var(--plate-ink); border-color: transparent; font-weight: 700; }
.eyebrow { font-family: var(--f-num); font-weight: 600; letter-spacing: .08em; font-size: 14px; color: var(--red); text-transform: uppercase; }
.section { padding-block: 72px; }
.section--white { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { display: grid; gap: 8px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(28px, 4.2vw, 42px); }
.section-head p { color: var(--ink-soft); max-width: 36em; }
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.head-row .sticker { width: 128px; flex: none; }
.more-link { font-weight: 700; color: var(--purple); text-decoration: none; display: inline-flex; gap: 4px; align-items: center; }
.more-link:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: rgba(246, 247, 252, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; text-decoration: none; flex: none; }
.brand img { height: 40px; width: auto; }
.brand .logo-dark { display: none; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav > a, .nav summary {
  padding: 8px 11px; border-radius: 999px; text-decoration: none; font-weight: 500; color: var(--ink);
  cursor: pointer; list-style: none; white-space: nowrap;
}
.nav summary::-webkit-details-marker { display: none; }
.nav > a:hover, .nav summary:hover { background: var(--surface); }
.nav > a[aria-current="page"] { background: var(--ink); color: #fff; }
.nav details { position: relative; }
.nav .menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); display: grid;
}
.nav .menu a { padding: 8px 12px; border-radius: 10px; text-decoration: none; display: flex; justify-content: space-between; gap: 12px; }
.nav .menu a:hover { background: var(--paper); }
.nav .menu small { color: var(--ink-soft); }
.nav .menu--left { left: 0; right: auto; }
.nav summary.is-current { background: var(--ink); color: #fff; }
.nav summary::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.nav-toggle .panel a.sub { padding-left: 18px; font-size: 15px; color: var(--ink-soft); }
.nav .btn { padding: 9px 16px; font-size: 15px; margin-left: 8px; }
/* VEX platform link: same as other nav items plus a small red dot (使用者 10-02：黑底太搶眼). VEX 選手平台：只加小紅點。 */
.nav > a.nav-vex { display: inline-flex; align-items: center; gap: 6px; }
.nav-vex span { width: 7px; height: 7px; border-radius: 50%; background: #e31b23; }
.nav-toggle { display: none; margin-left: auto; }
.nav-toggle summary { list-style: none; cursor: pointer; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: flex; }
.nav-toggle summary::-webkit-details-marker { display: none; }
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .panel {
  position: absolute; left: 0; right: 0; top: 64px; background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 12px var(--gutter) 20px; display: grid; gap: 2px; box-shadow: var(--shadow);
}
.nav-toggle .panel a { padding: 10px 4px; text-decoration: none; font-weight: 500; border-bottom: 1px dashed var(--line); }
.nav-toggle .panel a[aria-current="page"] { color: var(--red); }
.nav-toggle .panel .btn { margin-top: 12px; justify-content: center; border-bottom: 2px solid var(--line-green-dark); }
@media (max-width: 1140px) { .nav { display: none; } .nav-toggle { display: block; } }

/* ---------- Page hero (sub pages) ---------- */
.page-hero {
  position: relative; overflow: hidden; padding-block: 56px 60px;
  background-color: var(--hero-bg, var(--tint-sky));
  background-image: radial-gradient(circle at 50% 50%, var(--hero-stud, rgba(255,255,255,.6)) 0 8px, transparent 9px);
  background-size: 32px 32px;
  border-bottom: 3px solid var(--ink);
}
.page-hero .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.page-hero h1 { font-size: clamp(36px, 6vw, 60px); }
.page-hero p.lede { font-size: 18px; color: var(--ink-soft); max-width: 30em; margin-top: 10px; }
.page-hero .hero-text { display: grid; gap: 6px; min-width: 0; }
.page-hero .sticker { width: 150px; flex: none; }
.page-hero--yellow { --hero-bg: var(--plate); --hero-stud: var(--plate-stud); }
.page-hero--yellow p.lede { color: var(--plate-ink); }
.page-hero--red { --hero-bg: var(--tint-red); }
.page-hero--green { --hero-bg: var(--tint-green); }
.page-hero--purple { --hero-bg: var(--tint-purple); }
.page-hero--sky { --hero-bg: var(--tint-sky); }
@media (max-width: 640px) { .page-hero .sticker { width: 96px; } .page-hero { padding-block: 36px 40px; } }

/* ---------- Home hero ---------- */
.hero { padding-block: 48px 72px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero-copy { display: grid; gap: 22px; min-width: 0; }
.hero h1 { font-size: clamp(40px, 6.4vw, 72px); letter-spacing: .01em; }
.hero h1 .accent { color: var(--red); display: block; }
.hero h1 .accent span { color: var(--purple); }
.hero .lede { font-size: 19px; color: var(--ink-soft); max-width: 27em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.proof { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 0; margin: 4px 0 0; list-style: none; }
.proof li { display: flex; align-items: baseline; gap: 6px; color: var(--ink-soft); font-size: 15px; }
.proof b { font-family: var(--f-num); font-size: 26px; color: var(--ink); font-weight: 600; line-height: 1; }
.hero-art { position: relative; min-width: 0; }
.hero-photo {
  position: relative; border-radius: 28px; overflow: hidden; border: 4px solid var(--ink);
  box-shadow: 10px 10px 0 var(--yellow); aspect-ratio: 3 / 2; transform: rotate(1.5deg);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-art .sticker { position: absolute; width: 168px; }
.hero-art .sticker--a { left: -48px; bottom: -48px; }
.hero-art .sticker--b { right: -30px; top: -64px; animation-delay: -1.6s; }
@media (max-width: 900px) {
  .hero { padding-block: 28px 64px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 56px; }
  .hero-art { margin-inline: 12px; }
  .hero-art .sticker { width: 108px; }
  .hero-art .sticker--a { left: -14px; bottom: -38px; }
  .hero-art .sticker--b { right: -8px; top: -46px; width: 112px; }
}

/* ---------- Home: three doors ---------- */
.doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.door {
  position: relative; display: grid; grid-template-rows: auto 1fr; border-radius: 26px; overflow: hidden; text-decoration: none;
  border: 3px solid var(--ink); background: var(--surface); box-shadow: 6px 6px 0 var(--ink);
  transition: transform .18s ease, box-shadow .18s ease;
}
.door:hover { transform: translate(-2px, -3px); box-shadow: 9px 10px 0 var(--ink); }
.door-art {
  position: relative; height: 200px; display: grid; place-items: center; background-color: var(--c);
  background-image: radial-gradient(circle at 50% 50%, rgba(255,255,255,.45) 0 7px, transparent 8px); background-size: 28px 28px;
}
.door-art img { max-height: 160px; width: auto; filter: drop-shadow(0 8px 10px rgba(0,0,0,.18)); }
.door-art .sticker { position: absolute; right: 10px; bottom: 8px; width: 92px; filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff); }
.door-age {
  position: absolute; left: 14px; top: 14px; background: var(--surface); border: 2px solid var(--ink); border-radius: 14px;
  padding: 2px 12px; font-family: var(--f-num); font-weight: 700; font-size: 24px; line-height: 1.25;
}
.door-body { padding: 20px 22px 24px; display: grid; gap: 8px; align-content: start; }
.door-body h3 { font-size: 28px; }
.door-body p { color: var(--ink-soft); }
.door--kids { --c: var(--plate); }
.door--teen { --c: #9fd8f6; }
.door--pro { --c: #ffb3a8; }
@media (max-width: 900px) { .doors { grid-template-columns: 1fr; } .door-art { height: 170px; } }

/* ---------- Numbers strip ---------- */
.numbers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.number { padding: 20px 22px; border-radius: 20px; border: 2px solid var(--ink); }
.number b { display: block; font-family: var(--f-num); font-weight: 600; font-size: clamp(36px, 4.6vw, 50px); line-height: 1; font-variant-numeric: tabular-nums; }
.number b small { font-size: 18px; margin-left: 4px; color: var(--red); font-weight: 500; }
.number span { color: var(--ink-soft); font-size: 15px; }
.number:nth-child(1) { background: var(--tint-yellow); }
.number:nth-child(2) { background: var(--tint-red); }
.number:nth-child(3) { background: var(--tint-sky); }
.number:nth-child(4) { background: var(--tint-green); }
.numbers-note { margin-top: 12px; font-size: 14px; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; }
.numbers-note span { font-family: var(--f-num); letter-spacing: .02em; }
@media (max-width: 760px) { .numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Course staircase ---------- */
.bands { display: grid; grid-template-columns: var(--bands, 3fr 4fr 1.4fr); gap: 14px; margin-bottom: 14px; }
.band { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; padding-bottom: 8px; border-bottom: 3px solid currentColor; }
.band span { font-family: var(--f-num); font-weight: 500; color: var(--ink-soft); }
.band--kids { color: var(--red); }
.band--teen { color: var(--sky); }
.band--pro { color: var(--ink); }
.stairs { display: grid; grid-template-columns: repeat(var(--n, 8), minmax(0, 1fr)); gap: 14px; align-items: end; padding-top: 12px; }
.brick {
  --h: 150px; --c: var(--yellow); --c-ink: var(--plate-ink);
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
  height: var(--h); padding: 22px 12px 12px; border-radius: 10px 10px 8px 8px;
  background: var(--c); color: var(--c-ink); text-decoration: none;
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.14); transition: transform .18s ease;
}
.brick::before {
  /* studs on top of the brick 積木上面的凸點 */
  content: ""; position: absolute; left: 10px; right: 10px; top: -9px; height: 10px;
  background: radial-gradient(ellipse 9px 10px at 50% 100%, var(--c) 98%, transparent) 0 0 / 24px 10px repeat-x;
}
.brick:hover { transform: translateY(-6px); }
.brick .age { font-family: var(--f-num); font-weight: 700; font-size: 34px; line-height: 1; }
.brick .name { font-weight: 700; font-size: 15px; line-height: 1.35; }
.brick .kit { font-size: 12px; opacity: .9; line-height: 1.35; }
.brick--1 { --h: 150px; --c: var(--yellow); --c-ink: #3b2b05; }
.brick--2 { --h: 178px; --c: var(--red); --c-ink: #fff; }
.brick--3 { --h: 206px; --c: var(--green); --c-ink: #fff; }
.brick--4 { --h: 234px; --c: var(--sky); --c-ink: #fff; }
.brick--5 { --h: 262px; --c: #2f7fc0; --c-ink: #fff; }
.brick--6 { --h: 262px; --c: var(--purple); --c-ink: #fff; }
.brick--7 { --h: 290px; --c: #43378a; --c-ink: #fff; }
.brick--8 { --h: 318px; --c: var(--ink); --c-ink: #fff; }
.brick--8 .age { font-size: 22px; }
@media (max-width: 900px) {
  .bands { display: none; }
  .stairs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
  .brick { --h: auto !important; min-height: 128px; }
}

/* ---------- Kids zone (3–8) ---------- */
.plate {
  background-color: var(--plate);
  background-image: radial-gradient(circle at 50% 50%, var(--plate-stud) 0 9px, transparent 10px);
  background-size: 34px 34px; color: var(--plate-ink);
}
.plate .section-head p, .plate .eyebrow { color: var(--plate-ink); }
.toybox { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 24px; }
.box {
  position: relative; display: grid; grid-template-rows: auto 1fr; background: var(--surface); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 24px; overflow: hidden; box-shadow: 6px 6px 0 var(--ink);
  transition: transform .18s ease, box-shadow .18s ease;
}
.box:hover { transform: translate(-2px, -3px) rotate(-.4deg); box-shadow: 9px 10px 0 var(--ink); }
.box-art { position: relative; height: 200px; display: grid; place-items: center; padding: 18px; background: var(--c); }
.box-art img { max-height: 164px; width: auto; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0,0,0,.18)); }
.box-age {
  /* LEGO boxes print the age in a corner — same idea. 樂高盒子角落的年齡標示。 */
  position: absolute; left: 14px; top: 14px; background: var(--surface); color: var(--ink); border: 2px solid var(--ink);
  border-radius: 14px; padding: 2px 10px; font-family: var(--f-num); font-weight: 700; font-size: 26px; line-height: 1.2;
}
.box-body { display: grid; gap: 10px; padding: 20px 22px 22px; align-content: start; }
.box-body h3 { font-size: 26px; }
.box-body h3 small { display: block; font-family: var(--f-num); font-size: 14px; color: var(--ink-soft); letter-spacing: .04em; }
.box-body ul { margin: 0; padding-left: 1.1em; color: var(--ink-soft); }
.box-body .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.box--esm { --c: var(--tint-yellow); }
.box--spm { --c: var(--tint-red); }
.box--go { --c: var(--tint-green); }
.promise { margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.promise li {
  list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px;
  background: var(--surface); color: var(--ink); border: 2px solid var(--ink); font-weight: 700;
}
.promise svg { width: 28px; height: 28px; flex: none; color: var(--red); }
.class-life { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 16px; align-items: end; padding-top: 40px; }
.class-life figure { margin: 0; position: relative; }
.class-life img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 20px; border: 3px solid var(--ink); }
.class-life figure:nth-child(1) { transform: rotate(-1.5deg); }
.class-life figure:nth-child(2) { transform: rotate(1.2deg) translateY(-12px); }
.class-life figure:nth-child(3) { transform: rotate(-.8deg); }
.class-life figcaption {
  position: absolute; left: 12px; bottom: 12px; background: var(--surface); color: var(--ink);
  border-radius: 999px; padding: 4px 12px; font-size: 14px; font-weight: 700; border: 2px solid var(--ink);
}
.class-life .sticker { position: absolute; right: -10px; top: -70px; width: 120px; }
.cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 32px; border-radius: 28px;
  background: var(--surface); border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--ink);
}
.cta-band h2 { font-size: clamp(24px, 3.4vw, 34px); }
.cta-band p { color: var(--ink-soft); margin-top: 4px; }
.cta-band .sticker { width: 130px; flex: none; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
@media (max-width: 900px) {
  .toybox { grid-template-columns: 1fr; }
  .promise { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .class-life { grid-template-columns: 1fr 1fr; }
  .class-life figure:nth-child(1) { grid-column: 1 / -1; }
  .cta-band { flex-direction: column-reverse; align-items: flex-start; padding: 22px; }
}

/* ---------- Course cards (9–14) ---------- */
.teen-grid { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 18px; }
.card {
  display: grid; grid-template-rows: 160px auto; background: var(--surface); border: 2px solid var(--ink);
  border-radius: 22px; overflow: hidden; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 6px 6px 0 var(--ink); }
.card-art { position: relative; display: grid; place-items: center; padding: 14px; background: var(--c); }
.card-art img { max-height: 132px; width: auto; object-fit: contain; }
.card-age { position: absolute; left: 12px; top: 10px; font-family: var(--f-num); font-weight: 700; font-size: 24px; color: var(--ink); }
.card-body { padding: 16px 18px 20px; display: grid; gap: 6px; align-content: start; }
.card-body h3 { font-family: var(--f-body); font-weight: 700; font-size: 18px; }
.card-body p { color: var(--ink-soft); font-size: 15px; line-height: 1.6; }
.card--wedo { --c: var(--tint-green); }
.card--ev3 { --c: var(--tint-red); }
.card--iq { --c: var(--tint-sky); }
.card--v5 { --c: var(--tint-purple); }
@media (max-width: 900px) { .teen-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .teen-grid { grid-template-columns: 1fr; } }

/* ---------- Programs (compete) ---------- */
.programs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.program {
  padding: 24px; border-radius: 22px; background: var(--surface); border: 2px solid var(--ink);
  display: grid; gap: 12px; align-content: start; color: inherit;
}
.program .logo { height: 52px; display: flex; align-items: center; }
.program .logo img { max-height: 48px; width: auto; }
.program h3 { font-size: 24px; }
.program ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; color: var(--ink-soft); }
.program li b { color: var(--ink); font-family: var(--f-num); font-weight: 600; }
.program--first { background: var(--tint-sky); }
.program--wro { background: var(--tint-yellow); }
.program--fll { background: var(--tint-red); }
@media (max-width: 900px) { .programs { grid-template-columns: 1fr; } }
.also { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--ink-soft); font-size: 14px; }
.also img { height: 34px; width: auto; }

/* ---------- Videos ---------- */
.video-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.video-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.video { text-decoration: none; display: grid; gap: 10px; align-content: start; min-width: 0; }
.video .thumb { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 9; border: 2px solid var(--ink); background: var(--ink); }
.video .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.video:hover .thumb img { transform: scale(1.05); }
.video .play {
  position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 50%;
  background: var(--red); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(0,0,0,.3);
}
.video .play svg { width: 18px; height: 18px; margin-left: 3px; }
.reveal-team { position: absolute; left: 8px; top: 8px; background: #e31b23; color: #fff; font-family: "JetBrains Mono", monospace; font-weight: 600; font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.video .v-title { font-weight: 500; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.video .v-meta { font-size: 13px; color: var(--ink-soft); margin-top: -6px; }
.channels { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 900px) { .video-row, .video-row--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Locations ---------- */
.loc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.loc-card {
  padding: 20px 22px; border-radius: 20px; background: var(--surface); border: 2px solid var(--ink);
  display: grid; gap: 6px; align-content: start; text-decoration: none;
}
.loc-card:hover { box-shadow: 5px 5px 0 var(--ink); }
.city { font-family: var(--f-num); font-weight: 600; font-size: 13px; letter-spacing: .1em; color: var(--red); }
.loc-card h3 { font-family: var(--f-body); font-size: 19px; font-weight: 700; }
.phone { font-family: var(--f-num); font-weight: 600; font-size: 22px; font-variant-numeric: tabular-nums; text-decoration: none; user-select: all; }
@media (max-width: 900px) { .loc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .loc-grid { grid-template-columns: 1fr; } }

.store-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.store-jump a { background: var(--surface); border: 2px solid var(--ink); border-radius: 999px; padding: 6px 14px; font-weight: 700; text-decoration: none; }
.store-jump a:hover { background: var(--yellow); }
.store { padding-block: 56px; border-bottom: 1px solid var(--line); }
.store:nth-of-type(even) { background: var(--surface); }
.store .wrap { display: grid; grid-template-columns: 1fr 1.35fr; gap: 40px; align-items: start; }
.store-info { display: grid; gap: 14px; min-width: 0; }
.store-info h2 { font-size: clamp(28px, 3.8vw, 38px); }
.store-info .addr { color: var(--ink-soft); }
.hours { border-collapse: collapse; font-size: 15px; width: 100%; max-width: 340px; }
.hours th, .hours td { text-align: left; padding: 5px 0; border-bottom: 1px dashed var(--line); font-weight: 500; }
.hours td { font-family: var(--f-num); font-variant-numeric: tabular-nums; text-align: right; }
.hours td.closed { color: var(--red); font-family: var(--f-body); }
.store-links { display: flex; flex-wrap: wrap; gap: 8px; }
.store-links a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); text-decoration: none; font-weight: 500; font-size: 15px; }
.store-links a:hover { border-color: var(--ink); }
.store-links svg { width: 16px; height: 16px; }
.store-note { font-size: 13px; color: var(--ink-soft); }
.store-photos { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; aspect-ratio: 16 / 10; min-width: 0; }
.store-photos img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }
.store-photos img:first-child { grid-row: 1 / 3; }
.store-photos--none { aspect-ratio: auto; display: grid; place-items: center; grid-template-columns: 1fr; grid-template-rows: auto; padding: 36px; border-radius: 16px; border: 2px dashed var(--line); background: var(--paper); }
.store-photos--none .sticker { width: 140px; }
@media (max-width: 900px) { .store .wrap { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- About ---------- */
.founder { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.founder h2 { font-size: clamp(30px, 4.4vw, 46px); }
.founder h2 em { font-style: normal; color: var(--red); }
.founder blockquote { margin: 18px 0; font-size: 17px; color: var(--ink-soft); max-width: 30em; }
.founder cite { font-style: normal; font-weight: 700; color: var(--ink); }
.founder img.photo { border-radius: 24px; border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--yellow); }
.maker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.maker p { padding: 22px; border-radius: 20px; background: var(--surface); border: 2px solid var(--ink); font-size: 18px; font-weight: 500; }
.maker p b { color: var(--red); }
.parents { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.bubble { position: relative; margin: 0; padding: 18px 22px; background: var(--surface); border: 2px solid var(--ink); border-radius: 22px; font-size: 17px; }
.bubble::after {
  content: ""; position: absolute; left: 28px; bottom: -11px; width: 18px; height: 18px; background: var(--surface);
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg);
}
.bubble footer { margin-top: 12px; font-size: 14px; color: var(--ink-soft); display: flex; align-items: center; gap: 10px; }
.bubble .avatar { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink); object-fit: cover; flex: none; }
@media (max-width: 900px) { .founder, .maker, .parents { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c9c5e3; padding-block: 56px 36px; font-size: 15px; }
.site-footer .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.site-footer img.logo { height: 48px; width: auto; }
.site-footer h4 { margin: 0 0 10px; color: #fff; font-size: 15px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--yellow); }
.social { display: flex; gap: 10px; margin-top: 18px; }
.social a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); color: #fff; }
.social svg { width: 20px; height: 20px; }
.copyright { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.12); padding-top: 20px; font-size: 13px; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; gap: 28px; } }

/* ==========================================================================
   .lulu — VEX blocks borrow the LULU (vex-v5.dproboticslab.com) home look:
   near-black ground, one red, Outfit, mono numbers. 使用者 2026-10-02：到 VEX 再換成 LULU 首頁風格。
   Values copied from dp-standards style.md §1 (dark) so the two sites read as one family.
   ========================================================================== */
.lulu {
  --l-bg-0: #0f0f11; --l-bg-1: #18181b; --l-bg-2: #242427; --l-line: #2d2d30; --l-line-strong: #3f3f46;
  --l-text: #e5e7eb; --l-dim: #a1a1aa; --l-faint: #71717a; --l-primary: #e31b23;
  --l-font: "Outfit", "Chiron GoRound TC", system-ui, sans-serif;
  --l-mono: "JetBrains Mono", "Consolas", monospace;
  background-color: var(--l-bg-0); color: var(--l-text); font-family: var(--l-font);
  background-image: radial-gradient(ellipse 60% 55% at 90% 0%, rgba(227, 27, 35, .18), transparent 70%);
}
.lulu h2, .lulu h3, .lulu h4 { font-family: var(--l-font); font-weight: 700; letter-spacing: -.01em; -webkit-text-stroke: 0; }
.lulu .eyebrow { color: var(--l-primary); font-family: var(--l-mono); font-weight: 500; letter-spacing: .14em; }
.lulu .section-head p { color: var(--l-dim); }
.lulu .l-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.lulu .l-stat { padding: 18px 20px; border-radius: 12px; background: var(--l-bg-1); border: 1px solid var(--l-line); }
.lulu .l-stat b { display: block; font-family: var(--l-mono); font-weight: 600; font-size: clamp(32px, 4.2vw, 46px); line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.lulu .l-stat b small { font-size: 15px; margin-left: 4px; color: var(--l-primary); }
.lulu .l-stat span { color: var(--l-dim); font-size: 14px; }
.lulu .l-split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; margin-top: 32px; }
.lulu .mosaic { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; aspect-ratio: 5 / 4; min-width: 0; }
.lulu .mosaic img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.lulu .mosaic img:first-child { grid-row: 1 / 3; }
.lulu .l-tracks { display: grid; gap: 12px; }
.lulu .l-track { padding: 18px 20px; border-radius: 12px; background: var(--l-bg-1); border: 1px solid var(--l-line); display: grid; gap: 6px; }
.lulu .l-track h3 { font-size: 20px; }
.lulu .l-track p { color: var(--l-dim); font-size: 15px; }
.lulu .l-open { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(227, 27, 35, .16); color: #ff9da1; font-weight: 600; font-size: 14px; width: fit-content; }
.lulu .l-open svg { width: 16px; height: 16px; }
.lulu .l-btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px; font-weight: 600; text-decoration: none; border: 1px solid var(--l-line-strong); color: var(--l-text); }
.lulu .l-btn:hover { background: var(--l-bg-2); }
.lulu .l-btn--primary { background: var(--l-primary); border-color: var(--l-primary); color: #fff; }
.lulu .l-btn--primary:hover { background: #c6161d; }
.lulu .l-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.lulu .video .thumb { border: 1px solid var(--l-line); border-radius: 12px; }
.lulu .video .v-meta { color: var(--l-faint); }
.lulu .video .play { background: var(--l-primary); }
.lulu .l-sub { margin-top: 48px; }
.lulu .l-sub h3 { font-size: 22px; margin-bottom: 16px; }
@media (max-width: 900px) {
  .lulu .l-split { grid-template-columns: 1fr; }
  .lulu .l-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Honors: tabs, LULU-style stats, world honours, pennant walls ---------- */
.h-tabs-bar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: calc(env(safe-area-inset-top, 0px) + 64px); z-index: 10; }
.h-tabs { display: flex; gap: 8px; padding-block: 12px; overflow-x: auto; scrollbar-width: none; }
.h-tabs::-webkit-scrollbar { display: none; }
.h-tabs button {
  all: unset; box-sizing: border-box; cursor: pointer; flex: none; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px; border: 2px solid var(--line); font-weight: 700; color: var(--ink-soft); white-space: nowrap;
}
.h-tabs button:hover { border-color: var(--ink); color: var(--ink); }
.h-tabs button:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.h-tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.tab-n { font-family: var(--f-num); font-weight: 600; font-size: 13px; padding: 0 8px; border-radius: 999px; background: rgba(127,127,160,.18); }
.wall-zone { padding-block: 48px 72px; }
.h-panel { display: grid; gap: 28px; }
.h-head { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 18px; }
.h-head h2 { font-size: clamp(28px, 4vw, 40px); color: #fff; }
.h-head .l-btn { margin-left: auto; }
.h-stats { display: grid; grid-template-columns: 1.5fr repeat(5, minmax(0, 1fr)); gap: 10px; }
.h-stats > div { padding: 16px 18px; border-radius: 12px; background: #18181b; border: 1px solid #2d2d30; display: grid; align-content: end; gap: 4px; }
.h-stats b { font-family: var(--l-mono); font-weight: 600; font-size: clamp(30px, 3.6vw, 42px); line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.h-stats span { color: #a1a1aa; font-size: 14px; }
.h-total { background: linear-gradient(135deg, rgba(227,27,35,.22), #18181b 70%) !important; border-color: rgba(227,27,35,.45) !important; }
.h-total b { font-size: clamp(44px, 5.6vw, 64px) !important; }
.h-total small { color: #71717a; font-family: var(--l-mono); font-size: 12px; }
.h-cell--worlds b { color: #FFD23F; }
@media (max-width: 900px) { .h-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .h-total { grid-column: 1 / -1; } }
.h-progs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.h-prog { display: grid; gap: 6px; padding: 18px; border-radius: 12px; background: #18181b; border: 1px solid #2d2d30; text-decoration: none; color: #e5e7eb; transition: border-color .15s ease, transform .15s ease; }
.h-prog:hover { border-color: #e31b23; transform: translateY(-2px); }
.h-prog .p-mark { justify-self: start; }
.h-prog b { font-family: var(--l-mono); font-size: 34px; line-height: 1; color: #fff; }
.h-prog b small { font-size: 14px; color: #a1a1aa; margin-left: 4px; }
.h-prog span { color: #a1a1aa; font-size: 14px; }
.h-prog em { font-style: normal; color: #ff8a8f; font-weight: 600; font-size: 14px; }
@media (max-width: 900px) { .h-progs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.h-sub { font-size: 20px; color: #fff; margin-bottom: 12px; display: inline-block; padding: 4px 12px; border-radius: 8px; background: rgba(255, 210, 63, .14); color: #FFD23F; }
.hw-featured { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 10px; }
.hw-card { position: relative; padding: 16px 18px 16px 22px; border-radius: 12px; background: #18181b; border: 1px solid #3f3f46; display: grid; gap: 4px; overflow: hidden; }
.hw-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(#FFD23F, #e31b23); }
.hw-card b { font-family: var(--l-font); font-size: 20px; line-height: 1.25; background: linear-gradient(90deg, #fff3b0, #FFD23F 50%, #ffb347); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hw-card span { color: #a1a1aa; font-size: 13px; }
.hw-top { display: flex; align-items: center; gap: 8px; }
.hw-year { font-family: var(--l-mono); font-size: 13px; color: #a1a1aa; padding: 1px 8px; border-radius: 999px; border: 1px solid #3f3f46; }
.hw-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hw-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; background: #18181b; border: 1px solid #2d2d30; }
.hw-main { min-width: 0; display: grid; }
.hw-main b { color: #fff; font-size: 15px; font-family: var(--l-font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hw-main span { color: #a1a1aa; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hw-side { display: flex; align-items: center; gap: 8px; }
@media (max-width: 760px) { .hw-list { grid-template-columns: 1fr; } }
.hw-more { margin-top: 8px; }
.hw-more summary { cursor: pointer; color: #ff8a8f; font-weight: 600; padding: 8px 0; list-style: none; }
.hw-more summary::-webkit-details-marker { display: none; }
.hw-more[open] summary { margin-bottom: 8px; }
.h-note { margin-top: 32px; font-size: 13px; color: #71717a; }

/* program marks 賽事標誌 */
.p-mark { display: inline-flex; align-items: center; justify-content: center; height: 13cqw; max-width: 80%; }
.p-mark img { height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.p-mark--patch { background: #fff; border-radius: 2.5cqw; padding: 1.5cqw 3cqw; height: 22cqw; }
.p-mark--text { font-family: var(--l-font); font-weight: 700; font-size: 9cqw; color: #C9C9D6; letter-spacing: .06em; }
.p-mark--sm { height: 22px; }
.p-mark--sm.p-mark--patch { height: 26px; padding: 3px 6px; border-radius: 6px; }
.p-mark--lg { height: 36px; max-width: none; }
.p-mark--lg.p-mark--patch { height: 52px; padding: 5px 10px; border-radius: 10px; }
.p-mark--sm.p-mark--text, .p-mark--lg.p-mark--text { font-size: 14px; height: auto; }

.season + .season { margin-top: 40px; }
.season-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 14px; border-bottom: 1px solid #2d2d30; padding-bottom: 10px; }
.season-head h3 { font-family: var(--l-mono); font-size: 24px; color: #fff; font-variant-numeric: tabular-nums; }
.season-head > span:last-child { color: #a1a1aa; font-size: 14px; margin-left: auto; }
.season-game { font-family: var(--l-mono); font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; padding: 3px 12px; border-radius: 999px; background: #e5e7eb; color: #0f0f11; }
.pennants { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 1100px) { .pennants { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 760px) { .pennants { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 480px) { .pennants { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; } }
.pennant { container-type: inline-size; min-width: 0; }
.pennant-face {
  --cloth: #07070a; --ink: #fff; --dim: rgba(255,255,255,.66); --faint: rgba(255,255,255,.6);
  --grommet: rgba(255,255,255,.34); --chip-bg: rgba(255,255,255,.86); --chip-ink: var(--cloth); --gold: #FFD23F;
  position: relative; display: flex; flex-direction: column; align-items: center; aspect-ratio: 2 / 3.15; overflow: hidden;
  padding: 12cqw 6cqw 12cqw; border-radius: 6px 6px 0 0; text-align: center; background: var(--cloth); color: var(--ink);
  /* swallow-tail bottom like a real pennant 錦旗燕尾 */
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 93%, 0 100%);
}
.pennant:nth-child(3n + 2) .pennant-face { background: color-mix(in srgb, var(--cloth) 95%, #fff); }
.pennant:nth-child(3n) .pennant-face { background: color-mix(in srgb, var(--cloth) 91%, #fff); }
.pennant-face::before, .pennant-face::after {
  content: ""; position: absolute; top: 4cqw; width: 4.5cqw; height: 4.5cqw; border: 1.5cqw solid var(--grommet); border-radius: 999px;
}
.pennant-face::before { left: 6cqw; }
.pennant-face::after { right: 6cqw; }
.p-game { margin-top: 4cqw; max-width: 100%; padding: .8cqw 5cqw; border-radius: 999px; background: var(--chip-bg); color: var(--chip-ink);
  font-family: var(--l-mono); font-size: 6.5cqw; font-weight: 600; line-height: 1.25; letter-spacing: .08em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-gamelogo { flex: none; margin-top: 3cqw; width: 80%; height: 22cqw; display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 3cqw; padding: 1.5cqw 3cqw; overflow: hidden; }
.p-gamelogo img { display: block; max-width: 100%; max-height: 19cqw; width: auto; height: auto; object-fit: contain; }
.pennant-face:has(.p-gamelogo) .p-mark--patch { height: 17cqw; }
.pennant-face:has(.p-gamelogo) .p-event { -webkit-line-clamp: 3; }
.season-logo { height: 64px; display: inline-flex; align-items: center; }
/* Game logos sit straight on the dark wall (使用者 10-02：去背). A thin white die-cut edge keeps black lettering readable.
   題目 logo 去背直接放；外圍細白邊，黑色字在深底也看得到。 */
.season-logo img { max-height: 60px; max-width: 170px; width: auto; height: auto;
  filter: drop-shadow(1.5px 0 0 #fff) drop-shadow(-1.5px 0 0 #fff) drop-shadow(0 1.5px 0 #fff) drop-shadow(0 -1.5px 0 #fff); }
.p-award { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; margin-top: 5cqw;
  font-family: "Outfit", var(--f-body); font-size: 10.5cqw; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; -webkit-text-stroke: 0; }
.p-award.gold { color: var(--gold); }
.p-event { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; margin-top: 4cqw;
  font-size: 7.5cqw; line-height: 1.3; color: var(--dim); overflow-wrap: anywhere; }
.p-spacer { flex: 1 1 auto; min-height: 2cqw; }
.p-year { font-family: var(--l-mono); font-size: 13.5cqw; font-weight: 600; line-height: 1; letter-spacing: .06em; }
.p-foot { margin-top: 3.4cqw; font-family: var(--l-mono); font-size: 7cqw; line-height: 1.1; letter-spacing: .1em; color: var(--faint); }
/* Cloth colours: VEX from LULU tokens; FIRST from the official FIRST Brand Guidelines (FRC Process Blue 009CD7,
   FTC 158 orange F57E25, FLL Challenge red ED1C24, FLL Explore green 00A651; text in FIRST black 231F20 where white
   would fall under 4.5:1). 錦旗底色：FIRST 系列照官方品牌手冊色碼。 */
.pennant[data-k="vex-iq"] .pennant-face { --cloth: #08203A; }
.pennant[data-k="frc"] .pennant-face,
.pennant[data-k="ftc"] .pennant-face {
  --ink: #231F20; --dim: rgba(35,31,32,.78); --faint: rgba(35,31,32,.66); --grommet: rgba(35,31,32,.4);
  --chip-bg: #231F20; --chip-ink: #fff; --gold: #231F20;
}
.pennant[data-k="frc"] .pennant-face { --cloth: #009CD7; }
.pennant[data-k="ftc"] .pennant-face { --cloth: #F57E25; }
.pennant[data-k="frc"] .p-award.gold, .pennant[data-k="ftc"] .p-award.gold { text-decoration: underline; text-decoration-thickness: .6cqw; text-underline-offset: 1.6cqw; }
.pennant[data-k="fll"] .pennant-face { --cloth: #ED1C24; --dim: rgba(255,255,255,.88); --faint: rgba(255,255,255,.8); --gold: #fff3a6; }
.pennant[data-k="fll-explore"] .pennant-face { --cloth: #00A651; --ink: #fff; --dim: rgba(255,255,255,.9); --faint: rgba(255,255,255,.82); --gold: #fff3a6; }
.pennant[data-k="wro"] .pennant-face { --cloth: #16285c; --dim: rgba(255,255,255,.75); }
.pennant[data-k="other"] .pennant-face { --cloth: #2a2a33; }
.wall-more { margin-top: 28px; display: flex; justify-content: center; }
.wall-more .l-btn { cursor: pointer; background: none; font: inherit; font-weight: 600; }

/* ==========================================================================
   Brick kit — LEGO-style pieces used across the bright pages.
   積木元素：浮動小積木、標題積木字、積木眉標、積木按鈕、凸點分隔線（使用者 2026-10-02：要有積木元素、活潑）。
   ========================================================================== */
.lego {
  --c: var(--red); --n: 2;
  position: absolute; width: calc(var(--n) * 28px); height: 30px; border-radius: 5px; background: var(--c);
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.18), inset 0 2px 0 rgba(255,255,255,.35), 0 8px 14px -6px rgba(38,33,66,.35);
  transform: rotate(var(--r, 0deg));
}
.lego::before {
  content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 9px;
  background: radial-gradient(ellipse 9px 9px at 50% 100%, color-mix(in srgb, var(--c) 88%, #fff) 97%, transparent) 0 0 / 28px 9px repeat-x;
}
.lego--tall { height: 44px; }
.bricks-layer { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.bricks-layer .lego { animation: float 7s ease-in-out infinite; }
.bricks-layer .lego:nth-child(2n) { animation-duration: 8.5s; animation-delay: -2s; }
.bricks-layer .lego:nth-child(3n) { animation-duration: 6s; animation-delay: -4s; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* Headline characters sitting on bricks. 標題字放在積木上。 */
.tiles { display: inline-flex; flex-wrap: wrap; gap: .1em; padding-top: .16em; }
.tile {
  --c: var(--red);
  position: relative; display: inline-grid; place-items: center; width: 1.12em; height: 1.08em; border-radius: .12em;
  background: var(--c); color: #fff; font-size: 1em; line-height: 1;
  box-shadow: inset 0 -.09em 0 rgba(0,0,0,.2), inset 0 .03em 0 rgba(255,255,255,.35);
  transform: rotate(var(--r, 0deg));
}
.tile::before {
  content: ""; position: absolute; left: .1em; right: .1em; top: -.13em; height: .14em;
  background: radial-gradient(ellipse .17em .14em at 50% 100%, color-mix(in srgb, var(--c) 88%, #fff) 97%, transparent) 0 0 / 50% 100% repeat-x;
}
.tile > span { font-size: .78em; transform: translateY(.02em); }
.tile:nth-child(1) { --c: var(--red); --r: -3deg; }
.tile:nth-child(2) { --c: var(--yellow); --r: 2deg; color: var(--plate-ink); }
.tile:nth-child(3) { --c: var(--green); --r: -1deg; }
.tile:nth-child(4) { --c: var(--sky); --r: 3deg; }
.tile:nth-child(5) { --c: var(--purple); --r: -2deg; }
.tile:hover { animation: wiggle .4s ease; }
@keyframes wiggle { 0%, 100% { transform: rotate(var(--r)); } 30% { transform: rotate(calc(var(--r) - 8deg)) scale(1.06); } 70% { transform: rotate(calc(var(--r) + 6deg)); } }

/* Eyebrow becomes a little 2×n brick label. 眉標做成小積木標籤。 */
.eyebrow {
  position: relative; display: inline-block; width: fit-content; margin-top: 8px; padding: 3px 12px 4px; border-radius: 6px;
  background: var(--red); color: #fff; font-size: 13px;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.18);
}
.eyebrow::before {
  content: ""; position: absolute; left: 4px; right: 4px; top: -6px; height: 7px;
  background: radial-gradient(ellipse 6px 7px at 50% 100%, color-mix(in srgb, var(--red) 85%, #fff) 97%, transparent) 0 0 / 18px 7px repeat-x;
}
.plate .eyebrow, .page-hero--yellow .eyebrow { background: var(--ink); color: #fff !important; }
.plate .eyebrow::before, .page-hero--yellow .eyebrow::before { background-image: radial-gradient(ellipse 6px 7px at 50% 100%, #3d3664 97%, transparent); }
.section--white .eyebrow { background: var(--purple); }
.section--white .eyebrow::before { background-image: radial-gradient(ellipse 6px 7px at 50% 100%, #7464c4 97%, transparent); }
.section-head .eyebrow, .hero-text .eyebrow { color: #fff; }
.lulu .eyebrow, .lulu .section-head .eyebrow { background: none; box-shadow: none; padding: 0; margin-top: 0; border-radius: 0; font-size: 14px; color: var(--l-primary); }
.lulu .eyebrow::before { content: none; }

/* Buttons get studs on top — they look like bricks you can press. 按鈕上加凸點，像可以按的積木。 */
.btn { position: relative; border-radius: 12px; margin-top: 7px; }
.btn::before {
  content: ""; position: absolute; left: 12px; right: 12px; top: -9px; height: 8px;
  background: radial-gradient(ellipse 8px 8px at 50% 100%, var(--stud, var(--surface)) 80%, var(--stud-edge, var(--ink)) 82% 96%, transparent 100%) 0 0 / 22px 8px repeat-x;
}
.btn--line { --stud: var(--line-green); --stud-edge: var(--line-green-dark); }
.nav .btn { margin-top: 6px; }

/* A row of rainbow studs between bands. 彩色凸點分隔線。 */
.stud-rule {
  height: 16px; background:
    radial-gradient(circle at 14px 8px, var(--red) 0 6px, transparent 7px) 0 0 / 112px 16px,
    radial-gradient(circle at 42px 8px, var(--yellow) 0 6px, transparent 7px) 0 0 / 112px 16px,
    radial-gradient(circle at 70px 8px, var(--green) 0 6px, transparent 7px) 0 0 / 112px 16px,
    radial-gradient(circle at 98px 8px, var(--sky) 0 6px, transparent 7px) 0 0 / 112px 16px;
}
.site-footer { position: relative; }
.site-footer::before {
  /* the footer is a dark brick: studs along its top edge 頁尾像一塊深色積木，頂端一排凸點 */
  content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px;
  background: radial-gradient(ellipse 9px 8px at 50% 100%, var(--ink) 97%, transparent) 0 0 / 28px 8px repeat-x;
}

/* Home hero on a sky baseplate with bricks scattered around. 首頁主視覺：天藍底板＋散落積木。 */
.hero {
  position: relative; background-color: var(--tint-sky);
  background-image: radial-gradient(circle at 50% 50%, rgba(255,255,255,.7) 0 8px, transparent 9px);
  background-size: 32px 32px;
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { line-height: 1.3; }
.hero h1 .tiles { display: flex; margin-block: .18em .12em; }
.page-hero .bricks-layer .lego { opacity: .95; }
.page-hero .wrap { position: relative; z-index: 1; }
@media (max-width: 900px) { .bricks-layer .lego:nth-child(n + 4) { display: none; } }
@media (max-width: 640px) { .page-hero .bricks-layer .lego:nth-child(n + 2) { display: none; } }

/* ---------- Camps (cute side) 營隊頁 ---------- */
.camp-tabs-bar .h-tabs button[aria-selected="true"] { background: var(--ink); }
.camp-panel-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 8px; }
.camp-panel-head h2 { font-size: clamp(28px, 4vw, 40px); }
.camp-year { margin-top: 32px; }
.camp-year-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 3px dotted var(--line); }
.camp-year-head h3 { font-family: var(--f-num); font-weight: 700; font-size: 34px; line-height: 1; }
.camp-count { margin-left: auto; color: var(--ink-soft); font-size: 14px; }
.camp-chip { display: inline-flex; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; border: 2px solid var(--ink); }
.camp-chip--summer { background: var(--yellow); color: var(--plate-ink); }
.camp-chip--winter { background: #bfe6ff; color: #0b3554; }
.camp-chip--charity { background: var(--tint-green); color: #1f4d0a; }
.camp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.camp-card { display: grid; align-content: start; background: var(--surface); border: 2px solid var(--ink); border-radius: 20px; overflow: hidden; }
.camp-card:hover { box-shadow: 5px 5px 0 var(--ink); }
.camp-pics { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 3px; aspect-ratio: 16 / 10; background: var(--ink); overflow: hidden; }
.camp-pics img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.camp-pics img:first-child { grid-row: 1 / 3; }
.camp-pics img:only-child { grid-column: 1 / -1; }
/* 4 photos: big one left, three stacked right 四張：左大圖、右邊三張疊 */
.camp-pics:has(img:nth-child(4)) { grid-template-rows: repeat(3, minmax(0, 1fr)); }
.camp-pics:has(img:nth-child(4)) img:first-child { grid-row: 1 / 4; }
.camp-pics--one { display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--paper); }
.camp-pics--one img { max-height: 100%; width: auto; max-width: 100%; height: auto; object-fit: contain; }
.camp-pics--two { grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr); }
.camp-pics--two img:first-child { grid-row: auto; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.gallery figure { margin: 0; position: relative; }
.gallery figure:nth-child(odd) { transform: rotate(-1deg); }
.gallery figure:nth-child(even) { transform: rotate(1deg); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px; border: 3px solid var(--ink); }
.gallery figcaption { position: absolute; left: 10px; bottom: 10px; background: var(--surface); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 700; }
@media (max-width: 760px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.camp-body { padding: 14px 16px 18px; display: grid; gap: 6px; }
.camp-meta { display: flex; align-items: center; gap: 10px; }
.camp-meta time { font-family: var(--f-num); color: var(--ink-soft); font-size: 14px; }
.camp-body h4 { font-family: var(--f-body); font-weight: 700; font-size: 17px; line-height: 1.4; }
.camp-body p { color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
.camp-empty { display: grid; justify-items: center; gap: 14px; padding: 48px 20px; text-align: center; border: 3px dashed var(--line); border-radius: 24px; margin-top: 20px; }
.camp-empty .sticker { width: 150px; }
@media (max-width: 900px) { .camp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .camp-grid { grid-template-columns: 1fr; } }

/* ---------- Sticker buddy (every page) 右下角貼圖小幫手 ---------- */
.buddy { position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 40; display: grid; justify-items: end; gap: 10px; }
.buddy-btn { all: unset; cursor: pointer; position: relative; display: grid; justify-items: end; }
.buddy-btn img { width: 96px; height: auto; animation: bob 4.6s ease-in-out infinite;
  filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff) drop-shadow(0 8px 10px rgba(0,0,0,.25)); }
.buddy-btn:hover img { animation: wiggle .5s ease; }
.buddy-btn:focus-visible { outline: 3px solid var(--sky); outline-offset: 4px; border-radius: 12px; }
.buddy-say { position: absolute; right: 70px; top: -6px; white-space: nowrap; background: var(--surface); color: var(--ink); border: 2px solid var(--ink);
  border-radius: 14px; padding: 4px 10px; font-size: 13px; font-weight: 700; box-shadow: 3px 3px 0 var(--ink); }
.buddy.is-open .buddy-say { display: none; }
.buddy-panel { width: min(320px, calc(100vw - 28px)); max-height: min(70vh, 520px); overflow: auto; background: var(--surface); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 22px; box-shadow: 6px 6px 0 var(--ink); padding: 14px; display: grid; gap: 10px; font-family: var(--f-body); }
.buddy-head { display: flex; align-items: center; justify-content: space-between; }
.buddy-head b { font-family: var(--f-display); font-weight: 400; font-size: 20px; }
.buddy-x { all: unset; cursor: pointer; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-size: 22px; line-height: 1; }
.buddy-x:hover { background: var(--paper); }
.buddy-x:focus-visible { outline: 3px solid var(--sky); }
.buddy-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.buddy-act { all: unset; box-sizing: border-box; cursor: pointer; text-align: center; padding: 10px 8px; border-radius: 12px; border: 2px solid var(--ink); font-weight: 700; font-size: 14px; background: var(--tint-yellow); }
.buddy-act:hover { background: var(--yellow); }
.buddy-act:focus-visible { outline: 3px solid var(--sky); }
.buddy-act--line { background: var(--line-green); color: #fff; border-color: var(--line-green-dark); }
.buddy-act--line:hover { background: #05b04b; }
.buddy-sub { margin: 0; padding: 0; }
.buddy-phones { list-style: none; display: grid; gap: 4px; }
.buddy-phones li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 4px; border-bottom: 1px dashed var(--line); font-size: 14px; }
.buddy-phones a { font-family: var(--f-num); font-weight: 600; text-decoration: none; user-select: all; }
.buddy-faq details { border-bottom: 1px dashed var(--line); padding: 6px 2px; }
.buddy-faq summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.buddy-faq p { font-size: 14px; color: var(--ink-soft); margin-top: 4px; }
.buddy-faq a { color: var(--purple); font-weight: 700; margin-left: 4px; }
body.tech-page .buddy-panel { box-shadow: 6px 6px 0 #e31b23; }
@media (max-width: 560px) { .buddy-btn img { width: 76px; } .buddy-say { right: 56px; } }

/* ==========================================================================
   Tech pages (比賽專班／榮譽榜) — the whole page wears the LULU look. 使用者 10-02：競賽內容走 LULU 科技風。
   ========================================================================== */
body.tech-page { background: #0f0f11; }
body.tech-page .site-footer::before { background-image: none; }
.tech-hero {
  position: relative; overflow: hidden; padding-block: 72px 56px; border-bottom: 1px solid #2d2d30;
  background-color: #0f0f11;
  background-image:
    radial-gradient(ellipse 55% 70% at 85% 10%, rgba(227, 27, 35, .28), transparent 70%),
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: auto, 40px 40px, 40px 40px;
}
.tech-hero h1 { font-family: var(--l-font); font-weight: 800; font-size: clamp(44px, 7vw, 84px); letter-spacing: -.02em; color: #fff; -webkit-text-stroke: 0; margin-top: 10px; }
.tech-hero .lede { color: #a1a1aa; font-size: 18px; max-width: 34em; margin-top: 12px; }
.tech-kpis { margin-top: 36px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: #2d2d30; border: 1px solid #2d2d30; border-radius: 12px; overflow: hidden; }
.tech-kpis > div { background: rgba(15,15,17,.92); padding: 18px 20px; display: grid; gap: 6px; }
.tech-kpis b { font-family: var(--l-mono); font-weight: 600; font-size: clamp(30px, 4vw, 44px); line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.tech-kpis b small { font-size: 14px; color: #e31b23; margin-left: 4px; }
.tech-kpis span { color: #a1a1aa; font-size: 13px; }
@media (max-width: 760px) { .tech-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tech-head { display: flex; gap: 18px; align-items: flex-start; }
.tech-index { font-family: var(--l-mono); font-size: 14px; color: #e31b23; border: 1px solid rgba(227,27,35,.5); border-radius: 6px; padding: 2px 8px; margin-top: 6px; }
.lulu .section-head h2 { color: #fff; -webkit-text-stroke: 0; }
.tech-band { background-color: #121215; border-top: 1px solid #2d2d30; }
.l-mark { height: 30px; width: auto; }
.t-programs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.t-program {
  position: relative; display: grid; gap: 10px; align-content: start; padding: 20px; border-radius: 12px; text-decoration: none;
  background: #18181b; border: 1px solid #2d2d30; color: #e5e7eb; overflow: hidden; transition: border-color .15s ease, transform .15s ease;
}
.t-program::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--accent); }
.t-program:hover { border-color: var(--accent); transform: translateY(-2px); }
.t-logo { height: 64px; width: fit-content; padding: 6px 12px; background: #fff; border-radius: 10px; display: flex; align-items: center; }
.t-logo img { max-height: 52px; width: auto; }
.t-program h3 { font-size: 20px; color: #fff; }
.t-program h3 b { font-family: var(--l-mono); color: var(--accent); }
.t-program p { color: #a1a1aa; font-size: 14px; }
.t-program em { font-style: normal; color: #ff8a8f; font-weight: 600; font-size: 14px; }
@media (max-width: 900px) { .t-programs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .t-programs { grid-template-columns: 1fr; } }
.home-vex { border-block: 0; }
.home-vex-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: start; }
.home-vex h2 { font-size: clamp(30px, 4.4vw, 46px); color: #fff; margin-top: 8px; }
.home-vex-lede { color: #a1a1aa; margin-top: 10px; max-width: 30em; }
.l-stats--2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; margin-top: 24px; }
.hw-featured--home { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hw-featured--home .hw-card b { font-size: 17px; }
@media (max-width: 900px) { .home-vex-grid { grid-template-columns: 1fr; } .hw-featured--home { grid-template-columns: 1fr; } }
.rv-block > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.rv-block > summary::-webkit-details-marker { display: none; }
.rv-block > summary::after { content: "展開"; font-size: 13px; color: #a1a1aa; border: 1px solid #3f3f46; border-radius: 999px; padding: 2px 10px; }
.rv-block[open] > summary::after { content: "收合"; white-space: nowrap; }
.rv-block > summary h3 { margin-bottom: 0 !important; }
.rv-list { display: grid; gap: 28px; margin-top: 18px; }
.rv-season .season-head { margin-bottom: 12px; }
.rv-season .season-head > span:last-child { margin-left: 0; }
.rv-season .season-head h3 { font-size: 20px; }
body.tech-page .h-tabs-bar { background: #18181b; border-color: #2d2d30; }
body.tech-page .h-tabs button { border-color: #3f3f46; color: #a1a1aa; }
body.tech-page .h-tabs button:hover { border-color: #e5e7eb; color: #fff; }
body.tech-page .h-tabs button[aria-selected="true"] { background: #e31b23; border-color: #e31b23; color: #fff; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- charity page 公益頁 ---------- */
.camp-chip--school { background: var(--tint-purple); color: #33276e; }
.camp-chip b { font-family: var(--f-num); margin-left: 4px; }
.charity-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.charity-legend .camp-chip { background-color: var(--surface); }
.charity-legend .camp-chip--charity { background: var(--tint-green); }
.charity-legend .camp-chip--winter { background: #bfe6ff; }
.charity-legend .camp-chip--summer { background: var(--yellow); }
.charity-legend .camp-chip--school { background: var(--tint-purple); }
.charity-quote { font-family: var(--f-display); font-size: clamp(20px, 2.6vw, 26px); line-height: 1.5; margin: 6px 0 10px; color: var(--ink); }
.charity-more { margin-top: 14px; }
.charity-feature .thumb { border-width: 3px; border-radius: 24px; box-shadow: 8px 8px 0 var(--green); }
.charity-feature .v-title { font-size: 16px; }
.charity-video { display: block; }
.charity-video .thumb { border: 0; border-bottom: 2px solid var(--ink); border-radius: 0; }
.charity-links { list-style: none; margin: 6px 0 0; padding: 8px 0 0; border-top: 2px dotted var(--line); display: grid; gap: 4px; font-size: 14px; }
.charity-links a { color: var(--purple); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.charity-links a:hover { text-decoration: underline; }
.charity-video .thumb { aspect-ratio: 16 / 10; }
/* charity wall: every card same media height, rows stretch, links pinned to the bottom 公益卡牆：照片區同高、同排等高、連結貼底 */
.charity-grid { align-items: stretch; }
.charity-grid .camp-card { grid-template-rows: auto 1fr; align-content: stretch; }
.charity-grid .camp-pics, .charity-grid .charity-video .thumb { aspect-ratio: 16 / 10; }
.charity-grid .camp-body { grid-template-rows: auto auto 1fr auto; }
.charity-grid .charity-links { align-self: end; }

/* compete page: pick a competition 比賽專班：選賽事分頁 */
.c-tabs-bar .wrap { display: flex; align-items: center; gap: 14px; }
.c-tabs-label { flex: none; font-size: 13px; letter-spacing: .08em; color: #a1a1aa; }
.c-tabs { flex: 1; min-width: 0; }
.c-tabs button { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; font-size: 16px; font-weight: 700; }
.c-logo { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 4px 10px; border-radius: 8px; background: #fff; }
.c-logo img { height: 22px; width: auto; }
.t-programs--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 20px; }
@media (max-width: 760px) {
  .c-tabs-label { display: none; }
  .c-tabs button { font-size: 14px; padding: 6px 12px 6px 6px; gap: 8px; }
  .c-logo { height: 28px; padding: 3px 7px; }
  .c-logo img { height: 16px; }
}
@media (max-width: 900px) { .t-programs--3 { grid-template-columns: 1fr; } }
.c-logo--dark { background: #000; border: 1px solid #3f3f46; }
@media (max-width: 760px) {
  .c-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; overflow: visible; }
  .c-tabs button { flex-direction: column; justify-content: center; gap: 4px; padding: 6px 4px 8px; border-radius: 12px; font-size: 13px; min-width: 0; }
  .c-tabs .tab-n { display: none; }
  .c-logo { height: 26px; padding: 3px 6px; max-width: 100%; }
  .c-logo img { height: 14px; min-width: 0; }
}

/* FIRST reveals: one sideways row 歷年 Reveal 一排左右滑 */
.rv-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 270px); gap: 16px; overflow-x: auto; padding: 4px 2px 14px;
  scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: #52525b transparent; margin-top: 14px; }
.rv-card { scroll-snap-align: start; display: grid; gap: 10px; align-content: start; }
.rv-meta { display: flex; align-items: center; gap: 10px; height: 44px; }
.rv-meta b { font-family: var(--l-mono); font-size: 18px; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rv-logo img { max-height: 40px; max-width: 120px; width: auto; height: auto;
  filter: drop-shadow(1px 0 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 1px 0 #fff) drop-shadow(0 -1px 0 #fff); }
.rv-meta .season-game { font-size: 11px; padding: 2px 10px; white-space: nowrap; }
.rv-scroll:focus-visible { outline: 2px solid #e31b23; outline-offset: 4px; }
.rv-hint { font-size: 13px; font-weight: 400; color: #a1a1aa; margin-left: 8px; }

/* charity: cute Taiwan footprint map 公益頁：可愛台灣足跡地圖 */
.tw-map { display: grid; grid-template-columns: minmax(240px, 360px) 1fr; gap: 40px; align-items: center; }
.tw-art { position: relative; padding: 18px; border-radius: 32px; background: var(--tint-sky);
  background-image: radial-gradient(circle at 50% 50%, #c8e7f8 0 5px, transparent 6px); background-size: 26px 26px; border: 3px solid var(--ink); }
.tw-svg { display: block; width: 100%; height: auto; overflow: visible; }
.tw-sticker { position: absolute; width: 104px; left: -26px; bottom: -22px; }
.tw-pin { cursor: pointer; }
.tw-pin circle { fill: var(--c); stroke: var(--ink); stroke-width: 1.1; }
.tw-pin text { font: 700 5.4px var(--f-num); fill: #fff; text-anchor: middle; paint-order: stroke; stroke: var(--ink); stroke-width: .6px; pointer-events: none; }
.tw-pin:hover circle:not(.tw-pulse), .tw-pin:focus-visible circle:not(.tw-pulse) { stroke-width: 1.8; }
.tw-pulse { opacity: .5; transform-box: fill-box; transform-origin: center; animation: tw-pulse 2.4s ease-out infinite; }
.tw-pin:nth-of-type(2n) .tw-pulse { animation-delay: .8s; }
.tw-pin:nth-of-type(3n) .tw-pulse { animation-delay: 1.6s; }
@keyframes tw-pulse { from { transform: scale(1); opacity: .55; } to { transform: scale(2.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tw-pulse { animation: none; opacity: 0; } }
.tw-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tw-place { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; background: var(--surface); border: 2px solid var(--ink); border-radius: 18px; }
.tw-n { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--c); border: 2px solid var(--ink);
  font: 700 15px var(--f-num); color: #fff; -webkit-text-stroke: .6px var(--ink); paint-order: stroke fill; }
.tw-place b { font-family: var(--f-display); font-weight: 400; font-size: 20px; }
.tw-place small { margin-left: 8px; color: var(--ink-soft); font-size: 13px; }
.tw-place ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; font-size: 14px; }
.tw-place li { display: flex; justify-content: space-between; gap: 10px; }
.tw-place li a { color: var(--purple); font-weight: 700; text-decoration: none; }
.tw-place li a:hover { text-decoration: underline; }
.tw-place time { flex: none; font-family: var(--f-num); color: var(--ink-soft); }
.charity-grid .camp-card:target { box-shadow: 0 0 0 4px var(--yellow), 5px 5px 0 var(--ink); }
@media (max-width: 900px) {
  .tw-map { grid-template-columns: 1fr; gap: 28px; }
  .tw-art { max-width: 320px; margin-inline: auto; }
  .tw-list { grid-template-columns: 1fr; }
}

/* ---------- kids page: picture-book night sky 小小玩家：繪本星空風 ---------- */
.kids-page { --book-night: #334388; --book-blue: #2f5fae; --book-star: #ffe27a; }
.story-hero, .story-sky {
  position: relative; color: #fff; background-color: var(--book-night);
  background-image:
    radial-gradient(1.6px 1.6px at 12% 18%, #fff 99%, transparent), radial-gradient(1.2px 1.2px at 28% 72%, #fff 99%, transparent),
    radial-gradient(2px 2px at 47% 30%, var(--book-star) 99%, transparent), radial-gradient(1.3px 1.3px at 63% 82%, #fff 99%, transparent),
    radial-gradient(1.8px 1.8px at 78% 12%, #fff 99%, transparent), radial-gradient(1.2px 1.2px at 88% 58%, var(--book-star) 99%, transparent),
    radial-gradient(1.4px 1.4px at 6% 90%, #fff 99%, transparent), radial-gradient(1.1px 1.1px at 38% 48%, #fff 99%, transparent);
  background-size: 340px 300px;
}
.story-hero { overflow: hidden; padding-block: 48px 0; border-bottom: 3px solid var(--ink); }
.story-hero .wrap { display: grid; grid-template-columns: 1fr minmax(260px, 460px); gap: 24px; align-items: end; }
.story-hero .hero-text { padding-bottom: 56px; display: grid; gap: 10px; }
.story-hero h1 { font-size: clamp(40px, 6.4vw, 66px); color: #fff; }
.story-hero .lede { font-size: 18px; color: #dfe5ff; max-width: 26em; }
.story-hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.story-hero-art { display: block; width: 100%; height: auto; }
.story-sky { border-bottom: 3px solid var(--ink); }
.story-sky .section-head h2 { color: #fff; }
.story-sky .section-head p { color: #dfe5ff; }
.story-sky .eyebrow { background: var(--book-star); color: var(--ink) !important; }
.books { display: grid; gap: 28px; }
.book { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 24px; align-items: start;
  padding: 22px; border-radius: 28px; background: rgba(255,255,255,.07); border: 2px solid rgba(255,255,255,.18); }
.book-series { display: inline-block; font-size: 13px; font-weight: 700; color: var(--ink); background: var(--book-star); border-radius: 999px; padding: 2px 12px; }
.book h3 { font-family: var(--f-display); font-size: 34px; margin-top: 8px; color: #fff; }
.book h3 small { display: block; font-family: var(--f-num); font-size: 14px; letter-spacing: .06em; color: #aebbf5; margin-top: 2px; }
.book-info > p { color: #dfe5ff; font-size: 15px; margin-top: 8px; }
.book-units-label { font-weight: 700; color: #fff !important; margin-top: 14px !important; }
.book-units { list-style: none; counter-reset: u; margin: 8px 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.book-units li { counter-increment: u; font-size: 13px; padding: 3px 10px 3px 4px; border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; }
.book-units li::before { content: counter(u); display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 6px; border-radius: 50%;
  background: var(--book-star); color: var(--ink); font: 700 12px var(--f-num); }
.book-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 180px); gap: 14px; overflow-x: auto; padding: 4px 4px 12px;
  scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.4) transparent; }
.book-page { position: relative; scroll-snap-align: start; padding: 0; border: 3px solid #fff; border-radius: 10px; overflow: hidden; cursor: zoom-in;
  background: #fff; box-shadow: 5px 5px 0 rgba(0,0,0,.35); transition: transform .2s ease; }
.book-page:nth-child(odd) { transform: rotate(-1.2deg); }
.book-page:nth-child(even) { transform: rotate(1.2deg); }
.book-page:hover, .book-page:focus-visible { transform: rotate(0) translateY(-4px); }
.book-page img { display: block; width: 100%; height: auto; }
.book-page span { position: absolute; right: 6px; bottom: 6px; font: 700 11px var(--f-num); color: var(--ink); background: #fff; border-radius: 999px; padding: 1px 8px; }
.book-reader { width: min(560px, 94vw); max-height: 96vh; padding: 0; border: 3px solid var(--ink); border-radius: 24px; background: var(--book-night); color: #fff; }
.book-reader::backdrop { background: rgba(14, 18, 48, .78); }
.br-top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.br-title { font-family: var(--f-display); font-weight: 400; font-size: 20px; }
.br-count { font-family: var(--f-num); color: #aebbf5; }
.br-close { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; border: 2px solid #fff; background: none; color: #fff; font-size: 16px; cursor: pointer; }
.br-stage { position: relative; padding: 0 16px; }
.br-img { display: block; width: 100%; height: auto; max-height: calc(96vh - 130px); object-fit: contain; border-radius: 8px; background: #fff; }
.br-prev, .br-next { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink);
  background: var(--book-star); color: var(--ink); font-size: 28px; line-height: 1; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); }
.br-prev { left: 4px; } .br-next { right: 4px; }
.br-prev:disabled, .br-next:disabled { opacity: .3; cursor: default; }
.br-note { text-align: center; font-size: 13px; color: #aebbf5; padding: 10px 16px 14px; }
@media (max-width: 860px) {
  .story-hero .wrap { grid-template-columns: 1fr; }
  .story-hero .hero-text { padding-bottom: 0; }
  .story-hero-art { max-width: 380px; margin-inline: auto; }
  .book { grid-template-columns: 1fr; padding: 16px; }
  .book-strip { grid-auto-columns: 42%; }
}
/* kids page motion: twinkling stars, floating rocket, pages fly in, page-turn slide 小小玩家動畫 */
.story-hero > .wrap, .story-sky > .wrap { position: relative; z-index: 1; }
.story-hero::before, .story-sky::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(2.4px 2.4px at 20% 30%, #fff 99%, transparent), radial-gradient(2px 2px at 70% 22%, var(--book-star) 99%, transparent),
    radial-gradient(2.2px 2.2px at 52% 76%, #fff 99%, transparent), radial-gradient(1.8px 1.8px at 90% 80%, #fff 99%, transparent);
  background-size: 420px 360px; animation: kid-twinkle 2.6s ease-in-out infinite alternate;
}
.story-hero::after { content: ""; position: absolute; top: 14%; left: -10%; width: 90px; height: 2px; border-radius: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, #fff); transform: rotate(18deg); opacity: 0; animation: kid-shoot 7s ease-in 2s infinite; }
.story-hero-art { animation: kid-float 3.6s ease-in-out infinite; transform-origin: 50% 100%; }
.book-page { opacity: 0; translate: 0 26px; transition: opacity .5s ease var(--d, 0s), translate .5s cubic-bezier(.2,.8,.3,1.3) var(--d, 0s), transform .2s ease; }
.book.in .book-page { opacity: 1; translate: 0 0; }
.book-units li { opacity: 0; scale: .6; transition: opacity .35s ease var(--d, 0s), scale .35s cubic-bezier(.3,1.6,.5,1) var(--d, 0s); }
.book.in .book-units li { opacity: 1; scale: 1; }
.br-img.turn-next { animation: kid-turn-next .32s ease; }
.br-img.turn-prev { animation: kid-turn-prev .32s ease; }
@keyframes kid-twinkle { from { opacity: .15; } to { opacity: 1; } }
@keyframes kid-shoot { 0% { opacity: 0; translate: 0 0; } 4% { opacity: 1; } 14% { opacity: 0; translate: 70vw 22vw; } 100% { opacity: 0; translate: 70vw 22vw; } }
@keyframes kid-float { 0%, 100% { transform: translateY(0) rotate(-.6deg); } 50% { transform: translateY(-10px) rotate(.6deg); } }
@keyframes kid-turn-next { from { opacity: 0; transform: translateX(40px) rotateY(-12deg); } to { opacity: 1; transform: none; } }
@keyframes kid-turn-prev { from { opacity: 0; transform: translateX(-40px) rotateY(12deg); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .story-hero::before, .story-sky::before, .story-hero::after, .story-hero-art, .br-img { animation: none !important; }
  .book-page, .book-units li { opacity: 1; translate: none; scale: none; transition: none; }
}
.book-info > p.book-series { color: var(--ink); margin-top: 0; }
/* compete tabs: quiet cards, selected = accent outline + underline (使用者：紅底太醜) 選中只用代表色細框＋底線 */
body.tech-page .c-tabs button { background: #18181b; border: 1px solid #3f3f46; color: #a1a1aa; border-radius: 14px; position: relative; }
body.tech-page .c-tabs button:hover { border-color: #71717a; color: #fff; }
body.tech-page .c-tabs button[aria-selected="true"] { background: #232327; border-color: var(--accent); color: #fff; box-shadow: 0 0 0 1px var(--accent), 0 8px 24px -12px var(--accent); }
body.tech-page .c-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
body.tech-page .c-tabs button[aria-selected="true"] .tab-n { background: var(--accent); color: #0f0f11; }
.c-logo--dark { background: #0b0b0f; border: 1px solid #3f3f46; }
.h-prog { position: relative; }
.h-prog::after { content: "→"; position: absolute; right: 16px; top: 14px; color: #52525b; font-size: 18px; transition: color .15s ease, transform .15s ease; }
.h-prog:hover::after { color: #e31b23; transform: translateX(3px); }
/* auto-scrolling video rails 影片自動滑動列 */
.video-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 270px); gap: 16px; overflow-x: auto; padding: 4px 2px 12px;
  scrollbar-width: thin; scrollbar-color: #52525b transparent; -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.auto-rail.is-looping { scroll-snap-type: none; }
.video-rail .video .thumb { position: relative; }

/* ---------- free tools page: intro in the style of the brand video 免費工具頁：開場仿介紹影片 ---------- */
.tool-intro { position: relative; min-height: calc(100svh - 64px); display: grid; align-items: center; overflow: hidden; background: #0d0d10; color: #fff; isolation: isolate; }
.ti-grid { position: absolute; inset: -40px; z-index: -1; opacity: 0;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 40px 40px; animation: ti-fade 1s ease .05s forwards, ti-pan 30s linear infinite;
  -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse at 50% 45%, #000 30%, transparent 75%); }
.ti-dot { position: absolute; z-index: -1; width: 14px; height: 14px; border-radius: 50%; background: #e31b23; box-shadow: 0 0 24px 6px rgba(227,27,35,.7); opacity: 0;
  animation: ti-fade .6s ease forwards, ti-pulse 2.4s ease-in-out infinite; }
.ti-dot--1 { top: 22%; right: 14%; animation-delay: 1.2s, 1.2s; }
.ti-dot--2 { bottom: 26%; right: 30%; width: 9px; height: 9px; animation-delay: 1.6s, 1.9s; }
.ti-dot--3 { top: 64%; left: 6%; width: 7px; height: 7px; animation-delay: 2s, 2.6s; }
.ti-wrap { position: relative; padding-block: 56px 96px; }
.ti-logo { width: clamp(84px, 11vw, 132px); height: auto; margin-bottom: 18px; opacity: 0; filter: drop-shadow(0 12px 30px rgba(227,27,35,.35));
  animation: ti-drop .8s cubic-bezier(.3,1.5,.5,1) .15s forwards; }
.ti-eyebrow { font-family: var(--l-mono); font-size: 13px; letter-spacing: .2em; color: #e31b23; opacity: 0; animation: ti-up .5s ease .6s forwards; }
.ti-title { font-family: "Outfit", var(--f-body); font-weight: 700; font-size: clamp(44px, 8.4vw, 104px); line-height: 1.02; letter-spacing: -.02em; margin-top: 10px; -webkit-text-stroke: 0; }
.ti-line { display: block; opacity: 0; transform: translateY(40px); animation: ti-up .7s cubic-bezier(.2,.8,.2,1) .8s forwards; }
.ti-line + .ti-line { animation-delay: 1s; }
.ti-title em { font-style: normal; color: #e31b23; position: relative; }
.ti-title em::after { content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .06em; background: #e31b23; transform: scaleX(0); transform-origin: left; animation: ti-sweep .6s ease 1.5s forwards; }
.ti-code { font-family: var(--l-mono); font-size: clamp(14px, 1.6vw, 17px); color: #a1a1aa; margin-top: 22px; min-height: 1.6em; }
.ti-caret { display: inline-block; width: .55em; height: 1.1em; vertical-align: -.15em; background: #e31b23; margin-left: 4px; animation: ti-blink 1s steps(1) infinite; }
.ti-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.ti-chips a { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 12px; border: 1px solid #3f3f46; background: rgba(24,24,27,.8);
  color: #e5e7eb; text-decoration: none; font-weight: 600; opacity: 0; transform: translateY(16px); animation: ti-up .5s ease forwards; transition: border-color .15s ease, color .15s ease; }
.ti-chips a b { font-family: var(--l-mono); font-size: 12px; color: #e31b23; }
.ti-chips a:hover { border-color: #e31b23; color: #fff; }
.ti-chips a:nth-child(1) { animation-delay: 2.3s; } .ti-chips a:nth-child(2) { animation-delay: 2.4s; } .ti-chips a:nth-child(3) { animation-delay: 2.5s; }
.ti-chips a:nth-child(4) { animation-delay: 2.6s; } .ti-chips a:nth-child(5) { animation-delay: 2.7s; }
.ti-scroll { position: absolute; left: 50%; bottom: 22px; width: 26px; height: 42px; margin-left: -13px; border: 2px solid #52525b; border-radius: 14px; opacity: 0; animation: ti-fade .6s ease 3s forwards; }
.ti-scroll span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #e31b23; animation: ti-wheel 1.6s ease-in-out infinite; }
@keyframes ti-fade { to { opacity: 1; } }
@keyframes ti-up { to { opacity: 1; transform: none; } }
@keyframes ti-drop { 0% { opacity: 0; transform: translateY(-60px) rotate(-12deg) scale(.8); } 100% { opacity: 1; transform: none; } }
@keyframes ti-sweep { to { transform: scaleX(1); } }
@keyframes ti-blink { 50% { opacity: 0; } }
@keyframes ti-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }
@keyframes ti-pan { to { background-position: 40px 40px; } }
@keyframes ti-wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }
.tool-list { padding-top: 24px; }
.tool-row { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; padding-block: 56px; border-bottom: 1px solid #2d2d30;
  opacity: 0; transform: translateY(40px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); scroll-margin-top: 80px; }
.tool-row.in { opacity: 1; transform: none; }
.tool-row:nth-child(even) .tool-screen { order: 2; }
.tool-screen { border-radius: 16px; overflow: hidden; border: 1px solid #3f3f46; background: #000; aspect-ratio: 16 / 9;
  box-shadow: 0 0 0 1px rgba(227,27,35,.25), 0 30px 80px -30px rgba(227,27,35,.55); }
.tool-screen video { display: block; width: 100%; height: 100%; object-fit: cover; }
.tool-n { font-family: var(--l-mono); font-size: 13px; letter-spacing: .12em; color: #e31b23; }
.tool-text h2 { font-family: "Outfit", var(--f-body); font-weight: 700; font-size: clamp(28px, 3.4vw, 40px); color: #fff; margin-top: 8px; -webkit-text-stroke: 0; }
.tool-text > p:not(.tool-n) { color: #a1a1aa; margin-top: 12px; font-size: 16px; }
.tool-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 22px; padding: 0; }
.tool-tags li { font-size: 13px; padding: 3px 10px; border-radius: 999px; border: 1px solid #3f3f46; color: #e5e7eb; }
.tool-tags li:first-child { border-color: #e31b23; color: #fff; background: rgba(227,27,35,.15); }
.tool-more { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 48px 8px; }
.tool-more p { font-family: var(--l-mono); color: #a1a1aa; }
@media (max-width: 860px) {
  .tool-row { grid-template-columns: 1fr; gap: 22px; padding-block: 36px; }
  .tool-row:nth-child(even) .tool-screen { order: 0; }
  .ti-wrap { padding-block: 40px 90px; }
}
@media (prefers-reduced-motion: reduce) {
  .ti-grid, .ti-dot, .ti-logo, .ti-eyebrow, .ti-line, .ti-title em::after, .ti-chips a, .ti-scroll, .ti-scroll span, .ti-caret { animation: none !important; opacity: 1 !important; transform: none !important; }
  .tool-row { opacity: 1; transform: none; transition: none; }
}
/* FTC off-field cards (dark) 賽場外的 Screw It */
.l-sub-lede { color: var(--l-dim); margin: -4px 0 14px; }
.off-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.off-card { display: grid; grid-template-rows: auto 1fr; background: #18181b; border: 1px solid #2d2d30; border-radius: 14px; overflow: hidden; transition: border-color .15s ease, transform .15s ease; }
.off-card:hover { border-color: #F57E25; transform: translateY(-2px); }
.off-card .camp-pics { aspect-ratio: 16 / 10; background: #000; }
.off-body { padding: 14px 16px 16px; display: grid; gap: 6px; align-content: start; }
.off-body time { font-family: var(--l-mono); font-size: 12px; color: #F57E25; }
.off-body h4 { font-size: 17px; font-weight: 700; color: #fff; }
.off-body p { font-size: 14px; color: var(--l-dim); line-height: 1.6; }
.off-more { margin-top: 14px; }
@media (max-width: 1000px) { .off-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .off-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Course detail pages (course-*.html, tools/courses.py) 課程內頁
   Three looks from one template: cute＝小小玩家積木風（粗黑框、凸點、貼圖）、pro＝亮色專業（細框、無浮動積木）、
   pro-lulu＝pro＋一段 .lulu 深色比賽銜接。Reuses page-hero / box-age / promise / cta-band / brick / lulu.
   ========================================================================== */
.course-hero .wrap { align-items: center; gap: 40px; }
.course-hero .hero-text { gap: 10px; }
.course-hero h1 .course-code { display: block; font-family: var(--f-num); font-weight: 600; font-size: .42em; letter-spacing: .04em; color: var(--ink-soft); -webkit-text-stroke: 0; }
.course-hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
/* breadcrumb: 課程地圖 › 小小玩家 › ESM 麵包屑 */
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 0; font-size: 14px; color: var(--ink-soft); }
.crumbs li + li::before { content: "›"; margin: 0 8px; opacity: .6; }
.crumbs a { text-decoration: none; font-weight: 500; }
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); font-weight: 700; }
/* fact chips under the title: age, grade, kit, class types 年齡／年級／教具／班別小膠囊 */
.course-facts { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.course-facts li { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 14px; border-radius: 999px; background: var(--surface); border: 2px solid var(--ink); font-weight: 700; font-size: 15px; }
.course-facts b { font-family: var(--f-num); font-size: 18px; color: var(--red); line-height: 1; }
.course-facts .is-soon { background: var(--yellow); color: var(--plate-ink); }
/* kit "box" on the right, like the toybox cards 右邊教具盒，跟小小玩家盒子同款 */
.course-kit {
  position: relative; flex: none; width: min(380px, 40%); aspect-ratio: 1 / 1; display: grid; place-items: center; padding: 34px 26px 22px;
  background: var(--surface); border: 3px solid var(--ink); border-radius: 26px; box-shadow: 8px 8px 0 var(--ink); transform: rotate(1.5deg);
}
.course-kit img { max-height: 290px; width: auto; min-height: 0; object-fit: contain; filter: drop-shadow(0 10px 12px rgba(0,0,0,.18)); }
@media (max-width: 760px) {
  .course-hero .wrap { flex-direction: column; align-items: stretch; gap: 28px; }
  .course-kit { width: 100%; aspect-ratio: auto; height: 240px; padding: 30px 20px 16px; transform: none; box-shadow: 6px 6px 0 var(--ink); }
  .course-kit img { max-height: 190px; }
}
/* pro looks: plain tint, no studs, thin lines 專業版：純色底、不要凸點與浮動積木、細框 */
.course-hero--pro, .course-hero--pro-lulu { background-image: none; border-bottom: 1px solid var(--line); }
.course-hero--pro .course-kit, .course-hero--pro-lulu .course-kit { border: 1px solid var(--line); box-shadow: var(--shadow); transform: none; border-radius: 22px; }
.course-hero--pro .course-facts li, .course-hero--pro-lulu .course-facts li { border-width: 1px; border-color: var(--line); font-weight: 500; }

/* about: intro text + "what they learn" card 課程介紹＋學到什麼 */
.course-about-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 48px; align-items: start; }
.course-intro { display: grid; gap: 14px; font-size: 17px; max-width: 36em; }
.learn-card { padding: 24px 26px; border-radius: 22px; background: var(--paper); border: 2px solid var(--ink); }
.learn-card h3 { font-size: 24px; margin-bottom: 12px; }
.learn-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.learn-list li { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.learn-list svg { width: 26px; height: 26px; flex: none; padding: 5px; border-radius: 50%; background: var(--green); color: #fff; }
.course-page--pro .learn-card, .course-page--pro-lulu .learn-card { border: 1px solid var(--line); }
.course-page--pro .learn-list svg, .course-page--pro-lulu .learn-list svg { background: var(--sky); }
@media (max-width: 900px) { .course-about-grid { grid-template-columns: 1fr; gap: 28px; } }

/* highlights + class photos 特色卡＋上課照片 */
.hl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.hl { display: grid; gap: 8px; align-content: start; padding: 22px 24px; border-radius: 22px; background: var(--surface); border: 2px solid var(--ink); }
.hl-n { font-family: var(--f-num); font-weight: 700; font-size: 15px; color: var(--red); letter-spacing: .06em; }
.hl h3 { font-size: 24px; }
.hl p { color: var(--ink-soft); }
.course-page--cute .hl { box-shadow: 5px 5px 0 var(--ink); }
.course-page--cute .hl:nth-child(1) { background: var(--tint-yellow); }
.course-page--cute .hl:nth-child(2) { background: var(--tint-sky); }
.course-page--cute .hl:nth-child(3) { background: var(--tint-green); }
.course-page--pro .hl, .course-page--pro-lulu .hl { border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.course-page--pro .hl::before, .course-page--pro-lulu .hl::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--sky); }
.course-page--pro .hl h3, .course-page--pro-lulu .hl h3 { font-family: var(--f-body); font-weight: 700; font-size: 20px; -webkit-text-stroke: 0; }
.course-pics { position: relative; display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 16px; margin-top: 36px; align-items: end; }
.course-pics figure { margin: 0; position: relative; min-width: 0; }
.course-pics figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.course-pics figcaption {
  position: absolute; left: 12px; bottom: 12px; background: var(--surface); color: var(--ink);
  border-radius: 999px; padding: 3px 12px; font-size: 14px; font-weight: 700; border: 1px solid var(--line);
}
.course-page--cute .course-pics figure img { border: 3px solid var(--ink); border-radius: 20px; }
.course-page--cute .course-pics figcaption { border: 2px solid var(--ink); }
.course-page--cute .course-pics figure:nth-child(odd) { transform: rotate(-1.2deg); }
.course-page--cute .course-pics figure:nth-child(even) { transform: rotate(1deg) translateY(-10px); }
.course-pics-sticker { position: absolute; right: -14px; bottom: -40px; width: 110px; z-index: 1; }
@media (max-width: 760px) {
  .course-pics { grid-template-columns: 1fr 1fr; }
  .course-pics figure:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
  .course-pics-sticker { width: 80px; bottom: -30px; right: -6px; }
}
.course-promise .promise { margin-top: 0; }

/* competition bridge: light (EV3 → WRO/FLL) and LULU dark (VEX IQ/V5) 比賽銜接：亮色／LULU 深色 */
.comp-links { display: flex; flex-wrap: wrap; gap: 14px; }
.comp-link { display: inline-flex; align-items: center; gap: 14px; padding: 14px 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; font-weight: 700; }
.comp-link img { height: 40px; width: auto; }
.comp-link:hover { border-color: var(--ink); }
.course-sub { font-family: var(--f-body); font-weight: 700; font-size: 20px; margin: 36px 0 14px; -webkit-text-stroke: 0; }
.course-bridge .l-mark { height: 34px; margin-bottom: 14px; }
.course-bridge .section-head { margin-bottom: 0; }
.course-bridge-split { margin-top: 0; }

/* class info band 開課資訊 */
.course-info .class-list { list-style: none; margin: 14px 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.course-info .class-list li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 14px; background: var(--paper); border: 2px solid var(--ink); }
.course-info .class-list b { font-size: 17px; }
.course-info .class-list span:not(.tag) { color: var(--ink-soft); font-size: 14px; }
.course-next { margin-top: 8px; font-weight: 700; }
.course-next a { color: var(--purple); text-decoration: none; }
.course-next a:hover { text-decoration: underline; }

/* staircase prev / next — the same bricks as the course map 上一階／下一階：沿用課程地圖積木 */
.step-nav { padding-top: 0; }
.step-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 18px; align-items: end; padding-top: 12px; }
.step-nav .brick { --h: auto; min-height: 104px; padding: 22px 18px 14px; justify-content: flex-end; }
.step-nav .brick .name { font-size: 18px; }
.step-dir { font-size: 14px; font-weight: 700; opacity: .9; }
.step--next { text-align: right; align-items: flex-end; }
.step-map { font-weight: 700; color: var(--purple); text-decoration: none; padding-bottom: 14px; white-space: nowrap; }
.step-map:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .step-row { grid-template-columns: 1fr 1fr; gap: 22px 12px; }
  .step-map { grid-column: 1 / -1; grid-row: 2; justify-self: center; padding-bottom: 0; }
  .step-nav .brick .name { font-size: 15px; }
}
/* kids picture-book shelf 繪本書架 */
.shelf { display: grid; gap: 14px; margin-bottom: 22px; }
.shelf-row { display: flex; align-items: center; gap: 14px; }
.shelf-level { flex: none; width: 52px; font-family: var(--f-display); font-size: 20px; color: var(--book-star); }
.shelf-books { display: flex; gap: 12px; overflow-x: auto; padding: 6px 4px 10px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.4) transparent; }
.shelf-book { flex: none; display: grid; justify-items: center; gap: 6px; width: 96px; padding: 0; border: 0; background: none; color: #dfe5ff; cursor: pointer; font: 700 13px var(--f-body); }
.shelf-book img { width: 96px; height: auto; border-radius: 6px; border: 3px solid rgba(255,255,255,.5); box-shadow: 4px 4px 0 rgba(0,0,0,.35); transition: transform .2s ease, border-color .2s ease; }
.shelf-book:hover img { transform: translateY(-4px) rotate(-2deg); }
.shelf-book[aria-pressed="true"] { color: #fff; }
.shelf-book[aria-pressed="true"] img { border-color: var(--book-star); transform: translateY(-6px); box-shadow: 0 0 0 3px var(--book-star), 5px 8px 0 rgba(0,0,0,.35); }
@media (max-width: 560px) { .shelf-row { align-items: flex-start; flex-direction: column; gap: 4px; } .shelf-book, .shelf-book img { width: 84px; } }
.shelf { grid-template-columns: minmax(0, 1fr); }
.shelf-row, .shelf-books { min-width: 0; }
@media (max-width: 560px) { .shelf-row { align-items: stretch; } .shelf-books { max-width: 100%; } }
/* book shelf as fans of covers (replaces the listed rows) 書架改成扇形攤開的封面 */
.shelf { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px 64px; margin: 8px 0 30px; grid-template-columns: none; }
.shelf-row { display: none; }
.fan { display: grid; justify-items: center; gap: 10px; }
.fan-cards { position: relative; width: calc(150px + (var(--n-max, 4) - 1) * 44px); height: 230px; }
.fan-level { font-family: var(--f-display); font-size: 22px; color: var(--book-star); }
.shelf-book { position: absolute; left: 50%; bottom: 0; width: 130px; margin-left: -65px; padding: 0; border: 0; background: none; cursor: pointer;
  transform-origin: 50% 120%; --a: calc((var(--i) - (var(--n) - 1) / 2) * 13deg);
  transform: rotate(var(--a)); transition: transform .3s cubic-bezier(.3,1.4,.5,1), z-index 0s; z-index: calc(var(--i) + 1); }
.shelf-book img { display: block; width: 100%; height: auto; border-radius: 8px; border: 3px solid #fff; box-shadow: 4px 6px 0 rgba(0,0,0,.3); transition: border-color .2s ease, box-shadow .2s ease; }
.shelf-book:hover, .shelf-book:focus-visible { transform: rotate(var(--a)) translateY(-18px); z-index: 20; }
.shelf-book[aria-pressed="true"] { transform: rotate(var(--a)) translateY(-26px); z-index: 30; }
.shelf-book[aria-pressed="true"] img { border-color: var(--book-star); box-shadow: 0 0 0 3px var(--book-star), 6px 10px 0 rgba(0,0,0,.35); }
.fan:first-child .fan-cards { --n-max: 4; }
.fan:nth-child(2) .fan-cards { --n-max: 3; }
@media (max-width: 560px) {
  .shelf { gap: 18px 24px; }
  .fan-cards { height: 170px; width: calc(110px + (var(--n-max, 4) - 1) * 30px); }
  .shelf-book { width: 96px; margin-left: -48px; --a: calc((var(--i) - (var(--n) - 1) / 2) * 11deg); }
}
/* kids page: storybook scenery backgrounds (使用者：背景用故事書裡的景) 小小玩家：故事書場景當背景 */
.scene { position: relative; color: #fff; background-repeat: no-repeat; background-position: center bottom; background-size: cover; border-bottom: 3px solid var(--ink); }
.scene--tree { background-color: #385a9a; background-image: linear-gradient(180deg, #385a9a 0%, rgba(56,90,154,.55) 45%, rgba(56,90,154,0) 75%), url("img/books/scene-tree.webp"); }
.scene--bears { background-color: #60b0e2; background-image: linear-gradient(180deg, #60b0e2 0%, rgba(96,176,226,.4) 40%, rgba(20,40,30,.15) 100%), url("img/books/scene-bears.webp"); }
.scene--sea { background-color: #4a99c8; background-image: linear-gradient(180deg, #4a99c8 0%, rgba(74,153,200,.3) 50%, rgba(74,153,200,0) 80%), url("img/books/scene-sea.webp"); }
.scene .section-head h2, .scene h2 { color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.scene .section-head p, .scene .eyebrow { text-shadow: none; }
.scene .promise li { background: rgba(255,255,255,.92); color: var(--ink); border-radius: 999px; padding: 6px 14px; }
.scene .class-life figure { box-shadow: 6px 6px 0 rgba(0,0,0,.25); }
.scene .cta-band { background: rgba(255,255,255,.94); color: var(--ink); }
.scene .cta-band h2 { color: var(--ink); text-shadow: none; }
/* spread the fan wider so each cover shows 扇子再攤開一點 */
.shelf-book { --x: calc((var(--i) - (var(--n) - 1) / 2) * 46px); transform: translateX(var(--x)) rotate(var(--a)); }
.shelf-book:hover, .shelf-book:focus-visible { transform: translateX(var(--x)) rotate(var(--a)) translateY(-18px); }
.shelf-book[aria-pressed="true"] { transform: translateX(var(--x)) rotate(var(--a)) translateY(-26px); }
.fan-cards { width: calc(170px + (var(--n-max, 4) - 1) * 62px); }
@media (max-width: 560px) {
  .shelf-book { --x: calc((var(--i) - (var(--n) - 1) / 2) * 30px); }
  .fan-cards { width: calc(120px + (var(--n-max, 4) - 1) * 40px); }
}
.team-more { margin-top: 18px; }
/* show each scene whole on one side; the sky colour fills the rest 場景整張靠一側，其餘用天空色延伸 */
.scene { background-size: auto 112%; }
.scene--tree { background-image: url("img/books/scene-tree.webp"); background-position: left -40px bottom; }
.scene--bears { background-image: linear-gradient(90deg, rgba(96,176,226,0) 40%, #60b0e2 75%), url("img/books/scene-bears.webp"); background-position: left bottom, left bottom; background-size: 100% 100%, auto 112%; }
.scene--sea { background-image: url("img/books/scene-sea.webp"); background-position: right -40px bottom; }
@media (max-width: 760px) { .scene { background-size: auto 70%; } .scene--bears { background-size: 100% 100%, auto 70%; } }
/* kids page v2: one continuous sky (night → day), cut-out scenes fading into it (使用者：主題不連續很醜)
   小小玩家 v2：整頁一條夜空到白天的連續天空，去背場景靠邊淡出，區塊之間不再換底色、不畫分隔線 */
.kids-page main { background: linear-gradient(180deg, #334388 0%, #334388 34%, #3b5aa2 48%, #4a83c6 64%, #62a9de 82%, #79bdea 100%); }
.kids-page .story-hero, .kids-page .story-sky { border-bottom: 0; background-color: transparent; }
.kids-page .scene { background: none !important; border-bottom: 0; overflow: hidden; isolation: isolate; }
.kids-page .scene > .wrap { position: relative; z-index: 1; }
.scene-art { position: absolute; z-index: 0; bottom: 0; height: auto; pointer-events: none; }
.scene-art--tree { left: -3%; width: min(44vw, 600px);
  -webkit-mask-image: linear-gradient(90deg, #000 50%, transparent 92%), linear-gradient(180deg, #000 55%, transparent 98%); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, #000 50%, transparent 92%), linear-gradient(180deg, #000 55%, transparent 98%); mask-composite: intersect; }
.scene-art--bears { right: -3%; width: min(42vw, 580px);
  -webkit-mask-image: linear-gradient(270deg, #000 50%, transparent 92%), linear-gradient(180deg, #000 60%, transparent 100%); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(270deg, #000 50%, transparent 92%), linear-gradient(180deg, #000 60%, transparent 100%); mask-composite: intersect; }
.scene-art--sea { right: 0; width: min(58vw, 820px);
  -webkit-mask-image: linear-gradient(270deg, #000 55%, transparent 100%); mask-image: linear-gradient(270deg, #000 55%, transparent 100%); }
.kids-page .scene--tree .section-head, .kids-page .scene--bears .section-head { position: relative; }
@media (max-width: 860px) {
  .scene-art { opacity: .55; }
  .scene-art--tree, .scene-art--bears { width: 80vw; }
  .scene-art--sea { width: 100vw; }
}
.kids-page main { background: linear-gradient(180deg, #334388 0%, #334388 32%, #3f66ad 42%, #4f8fcf 55%, #66aee0 70%, #7cc0eb 100%); }
.scene-art--sea { width: auto; height: 118%; max-width: 70vw; object-fit: contain; object-position: right bottom; }
.scene-art--tree { width: auto; height: 108%; max-width: 48vw; object-fit: contain; object-position: left bottom; }
.scene-art--bears { width: auto; height: 112%; max-width: 46vw; object-fit: contain; object-position: right bottom; }
@media (max-width: 860px) { .scene-art--tree, .scene-art--bears, .scene-art--sea { height: 70%; max-width: 90vw; } }
/* kids page v3: the three lower sections share ONE world — the bear forest on both sides and one grass floor
   (使用者：下面三塊要同一主題) 小小玩家 v3：下半頁三區共用一個場景：左右兩片熊森林夾著內容，底部一條草地 */
.kids-land { position: relative; overflow: hidden; isolation: isolate; padding-bottom: 90px; }
.kids-land > .section { position: relative; z-index: 1; }
.kids-land::after { content: ""; position: absolute; z-index: 0; left: 0; right: 0; bottom: 0; height: 150px;
  background: linear-gradient(180deg, rgba(84,141,83,0) 0%, #548d53 55%, #4b7f4a 100%); }
.land-forest { position: absolute; z-index: 0; bottom: 60px; height: min(62%, 780px); width: auto; max-width: 42vw; object-fit: contain; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 88%); mask-image: linear-gradient(180deg, #000 70%, transparent 88%); }
.land-forest--left { left: -3%; transform: scaleX(-1); object-position: right bottom; }
.land-forest--right { right: -3%; object-position: right bottom; }
@media (max-width: 860px) {
  .land-forest { opacity: .45; height: 34%; max-width: 70vw; }
  .land-forest--left { display: none; }
}
/* white clouds drifting above the forest (使用者：森林上半部加白雲) 森林上方的白雲，慢慢飄 */
.land-forest { height: min(70%, 860px); max-width: 40vw; }
.land-cloud { position: absolute; z-index: 0; height: auto; pointer-events: none; opacity: .95; animation: cloud-drift 26s ease-in-out infinite alternate; }
.land-cloud--1 { width: 170px; left: 3%;  top: 36%; }
.land-cloud--2 { width: 120px; left: 21%; top: 30%; animation-duration: 32s; animation-delay: -8s; opacity: .85; }
.land-cloud--3 { width: 200px; right: 4%; top: 33%; animation-duration: 29s; animation-delay: -4s; }
.land-cloud--4 { width: 110px; right: 24%; top: 27%; animation-duration: 35s; animation-delay: -15s; opacity: .8; }
.land-cloud--5 { width: 140px; left: 44%; top: 24%; animation-duration: 38s; animation-delay: -20s; opacity: .7; }
@keyframes cloud-drift { from { translate: -24px 0; } to { translate: 24px 0; } }
@media (prefers-reduced-motion: reduce) { .land-cloud { animation: none; } }
@media (max-width: 860px) { .land-cloud { width: 90px !important; opacity: .55; } .land-cloud--2, .land-cloud--4 { display: none; } }
/* v4: the forest becomes the floor of the page, a mirrored panorama below the content — nothing covers the trees
   (使用者：樹被照片擋一半) v4：森林改成頁面最底下的一整排林地（左右鏡射接成全景），內容都在天空裡，不再擋到樹 */
.kids-land { padding-bottom: 0; }
.kids-land::after { content: none; }
.land-forest { display: none; }
.land-floor { position: relative; z-index: 0; display: flex; justify-content: center; height: clamp(220px, 30vw, 460px); margin-top: -10px; overflow: hidden; }
.land-floor img { flex: none; height: 100%; width: auto; display: block; }
.land-floor img.flip { transform: scaleX(-1); }
.land-floor img + img { margin-left: -1px; }
.land-cloud--1 { top: 52%; } .land-cloud--2 { top: 47%; } .land-cloud--3 { top: 50%; } .land-cloud--4 { top: 45%; } .land-cloud--5 { top: 43%; }
/* one preview book per level 每個年級一本試讀 */
.book-badge { display: inline-block; vertical-align: middle; margin-left: 10px; font: 700 13px var(--f-body); color: var(--ink); background: var(--book-star); border-radius: 999px; padding: 2px 10px; }
.book-locked { margin-top: 14px !important; padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,.12); color: #fff !important; font-weight: 700; }
.book-cover-only { display: grid; place-items: center; }
.book-cover-only img { width: min(240px, 60%); height: auto; border-radius: 10px; border: 3px solid #fff; box-shadow: 6px 8px 0 rgba(0,0,0,.3); transform: rotate(2deg); }
.shelf-book[data-preview="1"]::after { content: "試讀"; position: absolute; top: -10px; right: -8px; font: 700 12px var(--f-body); color: var(--ink);
  background: var(--book-star); border: 2px solid var(--ink); border-radius: 999px; padding: 1px 8px; }
.shelf-book[data-preview="0"] img { filter: saturate(.85) brightness(.92); }
.shelf-book[data-preview="1"]::after { left: -10px; right: auto; z-index: 2; }

/* ---------- Articles 文章（列表＋內頁，tools/articles.py） ---------- */
/* category chips 分類標籤 */
.a-chip { display: inline-flex; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; border: 2px solid var(--ink); line-height: 1.4; }
.a-chip--news { background: var(--yellow); color: var(--plate-ink); }
.a-chip--skills { background: #bfe6ff; color: #0b3554; }
.a-chip--tips { background: var(--tint-green); color: #14532d; }
.a-chip--media { background: var(--tint-purple); color: #3b0764; }
.a-chip--award { background: var(--tint-red); color: #7a1410; }
.a-chip--class { background: #ffe2c2; color: #6b3200; }
.a-card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.a-card-meta time { font-family: var(--f-num); color: var(--ink-soft); font-size: 14px; }
/* list: brick cards, 3 → 2 → 1 columns 列表：積木卡片 */
.a-list { padding-top: 40px; }
.a-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.a-card { display: grid; grid-template-rows: auto 1fr; text-decoration: none; background: var(--surface); border: 2px solid var(--ink);
  border-radius: 20px; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; min-width: 0; }
.a-card:hover { transform: translateY(-3px); box-shadow: 5px 6px 0 var(--ink); }
.a-cover { aspect-ratio: 16 / 9; background: var(--ink); border-bottom: 2px solid var(--ink); overflow: hidden; }
.a-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.a-card:hover .a-cover img { transform: scale(1.04); }
/* no picture: logo on a studded plate 沒圖：積木底板＋logo */
.a-cover--empty { display: grid; place-items: center; background-color: var(--tint-green);
  background-image: radial-gradient(circle, rgba(255,255,255,.7) 0 7px, transparent 8px); background-size: 28px 28px; }
.a-cover--empty img { width: 30%; height: auto; object-fit: contain; }
.a-card-body { padding: 14px 16px 18px; display: grid; gap: 8px; align-content: start; }
.a-card-body h3 { font-family: var(--f-body); font-weight: 700; font-size: 17px; line-height: 1.45; overflow-wrap: anywhere; }
.a-card-body p { color: var(--ink-soft); font-size: 14px; line-height: 1.65; }
@media (max-width: 900px) { .a-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .a-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .a-card, .a-cover img { transition: none; } }

/* article hero: shorter, title can be long 文章頁首：標題可能很長，字小一點 */
.a-hero { padding-block: 40px 44px; }
.a-hero .hero-text { gap: 12px; max-width: 760px; }
.a-hero h1 { font-size: clamp(28px, 4.6vw, 44px); overflow-wrap: anywhere; }
.a-stale { display: inline-flex; align-items: center; gap: 6px; justify-self: start; font-size: 13px; color: var(--ink-soft);
  background: rgba(255,255,255,.75); border: 1px dashed var(--ink-soft); border-radius: 999px; padding: 3px 12px; }
.a-stale::before { content: "🕰"; }

/* reading column: ~720px, airy lines, rounded pictures 正文：最寬約 720px、行距寬、圖片圓角 */
.a-page { padding-block: 48px 56px; }
.a-body { max-width: 720px; margin-inline: auto; font-size: 17px; line-height: 1.95; overflow-wrap: anywhere; }
.a-body > * + * { margin-top: 1.1em; }
.a-body h2, .a-body h3 { margin-top: 1.8em; line-height: 1.4; }
.a-body h2 { font-size: 26px; }
.a-body h3 { font-size: 22px; padding-left: 12px; border-left: 6px solid var(--yellow); }
.a-body a { color: var(--purple); font-weight: 500; text-underline-offset: 3px; }
.a-body figure { margin: 1.6em 0 0; }
.a-body figure img, .a-body video { width: auto; max-width: 100%; height: auto; margin-inline: auto; border-radius: 16px; border: 2px solid var(--line); }
.a-body video { display: block; width: 100%; background: var(--ink); }
.a-body figcaption { margin-top: 8px; text-align: center; font-size: 14px; color: var(--ink-soft); }
.a-body blockquote { margin: 1.4em 0 0; padding: 16px 20px; background: var(--tint-yellow); border-radius: 16px; border: 2px solid var(--ink); }
.a-body blockquote h2 { margin-top: 0; font-size: 22px; }
.a-body blockquote > * + * { margin-top: .6em; }
.a-body ul, .a-body ol { padding-left: 1.4em; }
.a-body pre { background: var(--ink); color: #fff; padding: 14px 16px; border-radius: 12px; overflow-x: auto; font-size: 14px; line-height: 1.6; }
.a-body code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .92em; }
/* YouTube link card with a play button 影片連到 YouTube，縮圖上有播放鈕 */
.a-yt a { position: relative; display: block; width: fit-content; max-width: 100%; margin-inline: auto; }
.a-yt a::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 64px; height: 64px; translate: -50% -50%; border-radius: 50%;
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 30px no-repeat;
  border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,.3); transition: transform .15s ease; }
.a-yt a:hover::after { transform: scale(1.08); }

/* original news reports (media posts) 原始報導：連結或「已下架」 */
.a-body .a-sources { margin-top: 2em; padding: 14px 18px; border: 2px dashed var(--line); border-radius: 16px; }
.a-sources > p { font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.a-sources ul { list-style: none; padding: 0; margin-top: 6px; display: grid; gap: 4px; }
.a-sources li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.a-sources li span { font-weight: 700; }
.a-sources li em { font-style: normal; font-size: 14px; color: var(--ink-soft); }
.a-sources li.is-gone span { color: var(--ink-soft); font-weight: 500; }

/* previous / next + more 上一篇／下一篇＋看更多 */
.a-pager { padding-block: 40px 64px; }
.a-pager-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 880px; margin-inline: auto; }
.a-step { display: grid; gap: 4px; align-content: start; padding: 14px 18px; text-decoration: none; background: var(--surface);
  border: 2px solid var(--ink); border-radius: 16px; box-shadow: 0 4px 0 var(--ink); transition: transform .15s ease, box-shadow .15s ease; min-width: 0; }
.a-step:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.a-step--next { text-align: right; }
.a-step--empty { visibility: hidden; }
.a-step-dir { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.a-step-title { font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.a-more { text-align: center; margin-top: 28px; }
@media (max-width: 560px) {
  .a-pager-row { grid-template-columns: 1fr; }
  .a-step--next { text-align: left; }
  .a-step--empty { display: none; }
  .a-body { font-size: 16px; }
}
.camp-chip--fund { background: var(--tint-red); color: #7a1410; }
.off-noimg { aspect-ratio: 16 / 10; display: grid; place-items: center; background: repeating-linear-gradient(45deg, #1f1f23 0 12px, #18181b 12px 24px); color: #F57E25; font-family: var(--l-mono); font-weight: 700; letter-spacing: .1em; }
.off-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* kids hero rocket: tap to launch, fly away, come back and land (使用者：按火箭會冒煙噴火起飛再降落)
   小小玩家主視覺火箭：點了冒煙、噴火、起飛，再飛回來降落 */
.rocket { position: relative; display: block; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.rocket:focus-visible { outline: 3px solid var(--book-star); outline-offset: 6px; border-radius: 16px; }
.rocket-ship { position: relative; display: block; z-index: 1; }
.rocket .story-hero-art { animation: kid-float 3.6s ease-in-out infinite; }
.rocket[class*="is-"]:not(.is-ignite) .story-hero-art { animation: none; } /* keeps floating while igniting: no jump 點火時不停漂浮，免得跳一下 */
.rocket-flame { position: absolute; left: 50%; top: 92%; width: 26%; height: 0; translate: -50% 0; border-radius: 45% 45% 50% 50% / 25% 25% 75% 75%;
  background: radial-gradient(ellipse 60% 70% at 50% 18%, #fffbe0 0 20%, #ffe066 34%, #ff9a2e 58%, rgba(255,72,0,.0) 78%);
  filter: blur(.5px); transition: height .25s ease; }
.rocket-smoke { position: absolute; left: 50%; bottom: -2%; width: 0; height: 0; z-index: 2; pointer-events: none; }
.rocket-smoke i { position: absolute; left: -40px; top: -40px; width: 80px; height: 80px; border-radius: 50%; background: #fff; opacity: 0; filter: blur(1px); }
.rocket-hint { position: absolute; right: 6%; top: 8%; z-index: 3; font: 700 15px var(--f-body); color: var(--ink); background: var(--book-star);
  border: 2px solid var(--ink); border-radius: 999px; padding: 4px 12px; transform: rotate(6deg); animation: kid-float 2.4s ease-in-out infinite; }
.rocket.was-flown .rocket-hint { display: none; }
/* 1 ignite 點火 */
.rocket.is-ignite .rocket-ship { animation: rk-shake .09s linear infinite; }
.rocket.is-ignite .rocket-flame { height: 18%; animation: rk-flicker .12s ease-in-out infinite alternate; }
.rocket.is-ignite .rocket-smoke i, .rocket.is-launch .rocket-smoke i, .rocket.is-lift .rocket-smoke i, .rocket.is-land .rocket-smoke i { animation: rk-smoke 1.4s ease-out forwards; }
.rocket-smoke i:nth-child(1) { --dx: -150px; --dy: -10px; } .rocket-smoke i:nth-child(2) { --dx: -90px; --dy: -40px; animation-delay: .08s !important; }
.rocket-smoke i:nth-child(3) { --dx: -30px; --dy: -60px; animation-delay: .16s !important; } .rocket-smoke i:nth-child(4) { --dx: 30px; --dy: -55px; animation-delay: .05s !important; }
.rocket-smoke i:nth-child(5) { --dx: 95px; --dy: -35px; animation-delay: .12s !important; } .rocket-smoke i:nth-child(6) { --dx: 155px; --dy: -8px; animation-delay: .2s !important; }
.rocket-smoke i:nth-child(7) { --dx: 0px; --dy: -20px; animation-delay: .24s !important; }
/* 2 launch 起飛 */
.rocket.is-launch .rocket-ship { animation: rk-launch 1.4s cubic-bezier(.55,0,.9,.4) forwards; }
.rocket.is-launch .rocket-flame, .rocket.is-return .rocket-flame { height: 46%; animation: rk-flicker .1s ease-in-out infinite alternate; }
/* 3 away 飛出畫面 */
.rocket.is-away .rocket-ship { translate: 0 -160vh; }
/* 4 return 飛回來 */
.rocket.is-return .rocket-ship { animation: rk-return 2.3s cubic-bezier(.15,.6,.35,1) forwards; }
/* 5 land 降落 */
.rocket.is-land .rocket-ship { animation: rk-land .9s cubic-bezier(.3,1.6,.5,1); }
.rocket.is-land .rocket-flame { height: 6%; }
.rocket.is-wiggle .rocket-ship { animation: rk-shake .12s linear 4; }
@keyframes rk-shake { 0% { translate: -2px 0; rotate: -.6deg; } 50% { translate: 2px 1px; rotate: .6deg; } 100% { translate: -2px 0; rotate: -.6deg; } }
@keyframes rk-flicker { from { scale: 1 .9; opacity: .9; } to { scale: 1.08 1.12; opacity: 1; } }
@keyframes rk-smoke { 0% { opacity: .95; transform: translate(0, 0) scale(.3); } 60% { opacity: .8; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.6); } }
@keyframes rk-launch { 0% { translate: 0 0; } 15% { translate: 0 10px; } 100% { translate: 0 -160vh; } }
@keyframes rk-return { 0% { translate: 0 -160vh; rotate: 0deg; } 60% { translate: 0 -12px; rotate: -2deg; } 85% { rotate: 1.5deg; } 100% { translate: 0 0; rotate: 0deg; } }
@keyframes rk-land { 0% { translate: 0 0; } 30% { translate: 0 8px; scale: 1.03 .96; } 100% { translate: 0 0; scale: 1 1; } }
@media (max-width: 860px) { .rocket { max-width: min(60vw, 250px); margin-inline: auto; } .rocket-hint { font-size: 13px; } } /* 使用者：手機版火箭小一點 */
.rocket-ship .story-hero-art { position: relative; z-index: 1; }
.rocket-flame { top: 76%; z-index: 0; width: 30%; }
.rocket.is-ignite .rocket-flame { height: 26%; }
.rocket.is-launch .rocket-flame, .rocket.is-return .rocket-flame { height: 60%; }
/* cut-out rocket (no sky box) sits on the hero's own starry sky 去背火箭直接放在主視覺星空上 */
.story-hero .rocket { margin-top: 24px; }
.rocket-ship .story-hero-art { filter: drop-shadow(0 10px 24px rgba(0,0,0,.25)); }
.rocket-flame { top: 88%; width: 34%; }
/* smoke and flame come out BELOW the rocket (使用者：煙和火要從下面跑出來) 煙和火從火箭底下冒出來 */
.story-hero .rocket { margin-bottom: clamp(90px, 12vw, 140px); }
.rocket-flame { top: 97%; width: 32%; z-index: 0; }
.rocket.is-ignite .rocket-flame { height: 34%; }
.rocket.is-launch .rocket-flame, .rocket.is-return .rocket-flame { height: 70%; }
.rocket-smoke { bottom: -6%; z-index: 0; }
.rocket-ship { z-index: 1; }
.rocket-smoke i { width: 90px; height: 90px; left: -45px; top: -30px; }
.rocket-smoke i:nth-child(1) { --dx: -190px; --dy: 30px; } .rocket-smoke i:nth-child(2) { --dx: -120px; --dy: 60px; }
.rocket-smoke i:nth-child(3) { --dx: -50px; --dy: 80px; }  .rocket-smoke i:nth-child(4) { --dx: 50px; --dy: 80px; }
.rocket-smoke i:nth-child(5) { --dx: 120px; --dy: 60px; }  .rocket-smoke i:nth-child(6) { --dx: 190px; --dy: 30px; }
.rocket-smoke i:nth-child(7) { --dx: 0px; --dy: 100px; }
@media (max-width: 860px) { .rocket-smoke i { width: 64px; height: 64px; left: -32px; top: -20px; } }
/* desktop: smaller rocket, centred with the text (使用者：電腦版火箭小一點) 電腦版火箭縮小、與文字置中 */
@media (min-width: 861px) {
  .story-hero .wrap { grid-template-columns: 1fr minmax(220px, 340px); align-items: center; }
  .story-hero .hero-text { padding-bottom: 0; }
  .story-hero .rocket { margin: 24px auto 110px; width: 100%; }
}
/* rocket v2: sky-writes the 玩 logo in smoke, then parks in the forest at the bottom of the page; tap it there to fly home
   (使用者：起飛後噴煙聚成「玩」logo，最後降落到頁底森林) 火箭 v2：噴煙寫出「玩」、停到森林、點森林裡的火箭飛回來 */
.rocket .rocket-ship { transition: opacity .4s ease, visibility .4s; }
.rocket.is-gone .rocket-ship, .rocket.is-fade .rocket-ship { opacity: 0; visibility: hidden; }
.rocket.is-gone .rocket-flame { height: 0; }
/* rocket v5: one rocket only — hand-overs to / from the flying layer are instant, so the two never show at once
   (使用者：途中看到一台一樣的火箭很怪) 火箭 v5：全程一艘；和飛行圖層交接是瞬間的，不會同時出現兩艘 */
.rocket.is-gone:not(.is-fade) .rocket-ship, .rocket.is-land .rocket-ship, .rocket.is-return .rocket-ship { transition: none; }
.rocket-pad { position: absolute; inset: 0; z-index: 0; display: grid; place-items: center; pointer-events: none; }
.rocket-pad-note { font: 700 16px/1.3 var(--f-body); color: var(--ink); background: var(--book-star); border: 2px solid var(--ink); border-radius: 999px;
  padding: 6px 14px; white-space: nowrap; opacity: 0; scale: .7; rotate: -3deg; transition: opacity .35s ease, scale .35s cubic-bezier(.3,1.6,.5,1); }
.rocket.is-gone .rocket-pad-note:not(:empty) { opacity: 1; scale: 1; }
.rocket-pad-note b { display: inline-block; animation: rk-arrow 1s ease-in-out infinite; }
/* the 玩 logo kept above the pad after the show; the note moves under it 飛完後留在發射台上方的「玩」，提示移到下面 */
.rocket-pad-logo { position: absolute; height: auto; max-width: none; opacity: 1; transition: opacity .5s ease; filter: drop-shadow(0 6px 14px rgba(0,0,0,.25)); }
.rocket-pad-logo.is-new { opacity: 0; }
.rocket-pad.has-logo .rocket-pad-note { align-self: end; position: relative; z-index: 1; margin-bottom: 2%; }
.rocket-pad-base { position: absolute; left: 50%; bottom: -5%; width: 64%; height: clamp(14px, 2vw, 20px); translate: -50% 0; border-radius: 50%;
  background: radial-gradient(ellipse at center, var(--book-star) 0 26%, #4d5487 28% 100%); border: 2px solid var(--ink); box-shadow: 0 5px 0 rgba(0,0,0,.25);
  opacity: 0; transition: opacity .4s ease; }
.rocket.is-gone .rocket-pad-base, .rocket.is-return .rocket-pad-base, .rocket.is-land .rocket-pad-base { opacity: 1; }
@keyframes rk-arrow { 0%, 100% { translate: 0 -2px; } 50% { translate: 0 4px; } }
/* the parked rocket, standing on the grass in the middle of the forest floor 停在頁底森林中間草地上的火箭 */
.rocket--park { position: absolute; z-index: 2; left: 50%; bottom: calc(clamp(220px, 30vw, 460px) * .13); width: clamp(150px, 17vw, 250px); /* 使用者：森林裡大一點 */
  max-width: none; margin: 0; translate: -50% 0; }
.rocket--park[hidden] { display: none; }
.rocket-park-art { display: block; width: 100%; height: auto; position: relative; z-index: 1; filter: drop-shadow(0 6px 8px rgba(0,0,0,.3)); }
.rocket--park .rocket-hint { top: -22%; right: -42%; font-size: 13px; padding: 2px 10px; }
.rocket--park:not(.is-ready) .rocket-hint { display: none; }
.rocket--park .rocket-smoke i { width: 40px; height: 40px; left: -20px; top: -16px; }
.rocket--park .rocket-smoke i:nth-child(1) { --dx: -90px; --dy: 0px; }  .rocket--park .rocket-smoke i:nth-child(2) { --dx: -58px; --dy: 6px; }
.rocket--park .rocket-smoke i:nth-child(3) { --dx: -24px; --dy: 8px; }  .rocket--park .rocket-smoke i:nth-child(4) { --dx: 24px; --dy: 8px; }
.rocket--park .rocket-smoke i:nth-child(5) { --dx: 58px; --dy: 6px; }   .rocket--park .rocket-smoke i:nth-child(6) { --dx: 90px; --dy: 0px; }
.rocket--park .rocket-smoke i:nth-child(7) { --dx: 0px; --dy: 4px; }
/* the sky show layer (fixed over the viewport, never catches clicks) 天空秀圖層：蓋在畫面上、不擋點擊 */
.sky-show { position: fixed; inset: 0; z-index: 45; pointer-events: none; overflow: hidden; contain: strict; }
.sky-show canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sky-logo { position: absolute; opacity: 0; scale: .88; transition: opacity .3s ease, scale .3s cubic-bezier(.3,1.5,.5,1); filter: drop-shadow(0 6px 14px rgba(0,0,0,.25)); }
.sky-logo.is-on { opacity: 1; scale: 1; }
.sky-logo.is-off { opacity: 0; scale: 1.12; transition-duration: .8s; }
.sky-show--calm .sky-logo { scale: 1 !important; transition: opacity .4s ease; }
.sky-show--fly { z-index: 46; }
.sky-rocket { position: absolute; left: 0; top: 0; will-change: transform; }
.sky-rocket img { position: relative; z-index: 1; display: block; width: 100%; height: auto; filter: drop-shadow(0 8px 16px rgba(0,0,0,.25)); }
.sky-flame { position: absolute; z-index: 0; left: 50%; top: 95%; width: 32%; height: 62%; translate: -50% 0; border-radius: 45% 45% 50% 50% / 25% 25% 75% 75%;
  background: radial-gradient(ellipse 60% 70% at 50% 18%, #fffbe0 0 20%, #ffe066 34%, #ff9a2e 58%, rgba(255,72,0,0) 78%); animation: rk-flicker .1s ease-in-out infinite alternate; }
.rk-paused .rocket *, .rk-paused .sky-show * { animation-play-state: paused !important; }
@keyframes rk-fadein { from { opacity: 0; } to { opacity: 1; } }
/* reduced motion: no flight, no particles, just gentle fades (beats the site-wide "no transitions" rule on purpose)
   減少動態：不飛、不噴煙，只保留淡入淡出（刻意蓋過全站關閉轉場的規則） */
@media (prefers-reduced-motion: reduce) {
  .rocket .rocket-hint, .rocket .rocket-pad-note b { animation: none !important; }
  .rocket .rocket-ship, .sky-show--calm .sky-logo { transition: opacity .4s ease, visibility .4s !important; }
  .rocket .rocket-pad-note, .rocket .rocket-pad-base { transition: opacity .4s ease !important; }
  .rocket.rocket--park.is-ready { animation: rk-fadein .4s ease !important; }
}

/* ---------- Downloads 軟體下載 ---------- */
.dl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.dl {
  display: grid; grid-template-columns: 1fr auto; gap: 16px 24px; align-items: center; padding: 18px 22px;
  background: var(--surface); border: 2px solid var(--line); border-radius: 20px;
}
.dl--must { border-color: var(--ink); box-shadow: 5px 5px 0 var(--yellow); }
.dl-text h3 { font-family: var(--f-body); font-weight: 700; font-size: 19px; }
.dl-text p { color: var(--ink-soft); margin-top: 4px; line-height: 1.6; }
.dl-tags { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.dl-go { display: grid; justify-items: end; gap: 6px; }
.dl-go .btn { padding: 10px 18px; font-size: 15px; white-space: nowrap; }
.dl--must .dl-go .btn { background: var(--yellow); color: var(--plate-ink); }
.btn--ghost { box-shadow: none; border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); box-shadow: 0 4px 0 var(--ink); }
.dl-more { font-size: 14px; color: var(--ink-soft); }
.section--white .dl { background: var(--paper); }
@media (max-width: 600px) {
  .dl { grid-template-columns: 1fr; padding: 16px 18px; }
  .dl-go { justify-items: start; }
}

/* ---------- Franchise 合作機會 ---------- */
.fr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.fr-card { background: var(--surface); border: 2px solid var(--ink); border-radius: 22px; overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.fr-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-bottom: 2px solid var(--ink); }
.fr-body { padding: 18px 22px 22px; display: grid; gap: 8px; align-content: start; }
.fr-body h3 { font-family: var(--f-body); font-weight: 700; font-size: 22px; }
.fr-body p { color: var(--ink-soft); line-height: 1.7; }
.fr-points { margin: 0; padding-left: 1.2em; color: var(--ink); line-height: 1.8; }
.fr-join { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.fr-box { padding: 22px 24px; border-radius: 20px; background: var(--tint-purple); border: 2px solid var(--ink); }
.fr-box:nth-child(2) { background: var(--tint-yellow); }
.fr-box h3 { font-family: var(--f-body); font-weight: 700; font-size: 20px; }
.fr-box p { color: var(--ink-soft); margin-top: 6px; line-height: 1.7; }
.fr-num { font-family: var(--f-num); color: var(--red); }
.fr-logos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.fr-logos li { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px; display: grid; place-items: center; }
.fr-logos img { width: 100%; max-width: 110px; height: auto; aspect-ratio: 1; object-fit: contain; }
@media (max-width: 800px) {
  .fr-grid, .fr-join { grid-template-columns: 1fr; }
  .fr-logos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- 中／EN switch (header) 頁首中英切換 ---------- */
.lang-switch {
  display: inline-flex; align-items: center; gap: 3px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink-soft); font: 600 14px/1 var(--f-num); text-decoration: none; white-space: nowrap; flex: none;
}
.lang-switch:hover { border-color: var(--ink-soft); color: var(--ink); }
.lang-switch .is-on { color: var(--ink); font-weight: 700; }
.lang-switch .lang-sep { opacity: .45; }
.nav .lang-switch { margin-left: 8px; }
.lang-switch--bar { display: none; margin-left: auto; }
@media (max-width: 1140px) { .lang-switch--bar { display: inline-flex; } .lang-switch--bar + .nav-toggle { margin-left: 0; } }
.nav-toggle .panel a.lang-switch { justify-self: start; padding: 8px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
/* First visit with an English browser: a small closable note (assets/lang.js). 英文瀏覽器第一次進站的小提示。 */
.lang-note {
  position: fixed; left: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 41; max-width: calc(100vw - 150px);
  display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 14px; border-radius: 14px; background: var(--ink); color: #fff;
  box-shadow: var(--shadow); font: 500 15px/1.3 var(--f-num);
}
.lang-note a { color: #fff; }
.lang-note-x { all: unset; cursor: pointer; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; font-size: 20px; }
.lang-note-x:hover, .lang-note-x:focus-visible { background: rgba(255, 255, 255, .18); }

/* ---------- English pages: longer words 英文頁：英文字較長的調整（只影響 html[lang=en]，中文頁不變） ---------- */
html[lang="en"] .nav .menu { min-width: 300px; }
html[lang="en"] .nav .menu a { white-space: nowrap; align-items: baseline; }
html[lang="en"] .brick--8 .age { font-size: 17px; line-height: 1.1; }
html[lang="en"] .camp-chip { white-space: nowrap; }

/* ---------- 賽場外卡片的影片與連結 Off-field card videos and links (dark FTC cards) ---------- */
.off-videos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 6px; }
.off-videos .video { gap: 6px; }
.off-videos .video .thumb { border: 1px solid #2d2d30; border-radius: 10px; }
.off-videos .video .play { transform: scale(.8); }
.off-videos .video .v-title { font-size: 13px; line-height: 1.4; color: #e5e7eb; }
.off-body .charity-links { border-top-color: #2d2d30; }
.off-body .charity-links a { color: #F57E25; }

/* ---------- 預約試聽 Trial-class booking form (book.html) ---------- */
.book-wrap { display: grid; gap: 28px; }
@media (min-width: 960px) { .book-wrap { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; } }
.book-form { display: grid; gap: 18px; min-width: 0; }
.book-sec { margin: 0; min-width: 0; border: 2px solid var(--ink); border-radius: 22px; background: var(--surface); padding: 18px 18px 20px; box-shadow: 6px 6px 0 var(--tint-yellow); }
.book-sec legend { float: left; width: 100%; padding: 0; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-size: 22px; line-height: 1.3; }
.book-sec legend + * { clear: both; }
.book-num { flex: none; width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--yellow); border: 2px solid var(--ink);
  font-family: var(--f-num); font-weight: 700; font-size: 17px; }
.book-grid { display: grid; gap: 14px; clear: both; }
@media (min-width: 640px) { .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.book-field { display: grid; gap: 6px; font-weight: 700; min-width: 0; }
.book-field--wide { margin-top: 4px; }
.book-label { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.book-label small { font-weight: 500; color: var(--ink-soft); font-size: 13px; }
.book-req { font-size: 12px; font-weight: 700; color: #fff; background: var(--red); padding: 1px 9px; border-radius: 999px; }
.book-form input[type=text], .book-form input[type=tel], .book-form select, .book-form textarea {
  width: 100%; min-height: 48px; font: inherit; font-weight: 500; color: var(--ink); padding: 11px 14px;
  border: 2px solid var(--line); border-radius: 14px; background: var(--paper); transition: border-color .15s ease, background-color .15s ease; }
.book-form textarea { resize: vertical; min-height: 84px; line-height: 1.6; }
.book-form input:focus, .book-form select:focus, .book-form textarea:focus { outline: none; border-color: var(--sky); background: #fff; box-shadow: 0 0 0 3px var(--tint-sky); }
.book-form [aria-invalid="true"] { border-color: var(--red); background: var(--tint-red); }
.book-err { color: var(--red); font-size: 14px; font-weight: 700; }
.book-hint { color: var(--ink-soft); font-size: 14px; margin-bottom: 10px; clear: both; }
.book-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.book-chip { position: relative; cursor: pointer; }
.book-chip input { position: absolute; left: 12px; top: 50%; width: 1px; height: 1px; opacity: 0; margin: 0; pointer-events: none; }
.book-chip span { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 999px; border: 2px solid var(--ink); background: #fff;
  font-weight: 700; box-shadow: 0 3px 0 var(--ink); transition: background-color .15s ease, transform .15s ease; }
.book-chip input:checked + span { background: var(--green); color: #fff; }
.book-chip input:checked + span::before { content: "✓"; }
.book-chip input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 3px; }
.book-chip input:active + span { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.book-hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.book-agree { display: flex; align-items: flex-start; gap: 10px; font-weight: 700; cursor: pointer; }
.book-agree input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--green); }
.book-send { display: grid; gap: 8px; justify-items: start; }
.book-send .btn { font-size: 18px; padding: 14px 36px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.book-note { color: var(--ink-soft); font-size: 14px; }
.book-errors { border: 2px solid var(--red); background: var(--tint-red); border-radius: 18px; padding: 14px 18px; margin-bottom: 18px; font-weight: 700; }
.book-errors ul { margin: 6px 0 0; padding-left: 1.3em; font-weight: 500; }
.book-side { display: grid; gap: 16px; }
.book-tip { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 18px 20px; display: grid; gap: 6px; }
.book-tip h2 { font-size: 22px; }
.book-tip p { color: var(--ink-soft); }
.book-tip--privacy { background: var(--tint-green); border-color: transparent; }
.book-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.book-links a { color: var(--purple); font-weight: 700; text-decoration: none; }
.book-links a:hover { text-decoration: underline; }
.book-done { background: var(--surface); border: 2px solid var(--ink); border-radius: 24px; padding: 24px; display: grid; gap: 12px; justify-items: start; box-shadow: 8px 8px 0 var(--yellow); min-width: 0; }
.book-done .sticker { width: 120px; }
.book-done h2 { font-size: clamp(26px, 4vw, 36px); }
.book-done > p b { font-family: var(--f-num); font-size: 20px; white-space: nowrap; }
.book-sum { margin: 4px 0; width: 100%; border-top: 2px dotted var(--line); }
.book-sum div { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 2px dotted var(--line); }
.book-sum dt { color: var(--ink-soft); }
.book-sum dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.book-sum .tag { margin: 0 6px 4px 0; }
.book-again { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.store-links a.store-book { background: var(--line-green); border-color: var(--line-green-dark); color: #fff; font-weight: 700; }
