/* ASIFT 樣式
 * 品牌色：主色 #70B7E8、輔助黃 #FFE39A、輔助綠 #A8DCC0、輔助粉 #F3B8C8、背景 #FFFDF7、文字 #34445A
 * 對比（WCAG 2.1，已逐一計算）：
 *   文字 #34445A / 背景 #FFFDF7 = 9.74:1；次要文字 #5C6B80 / #FFFDF7 = 5.33:1、/ 白 = 5.43:1、/ 天空 #E3F2FC = 4.75:1
 *   按鈕預設 #34445A / #70B7E8 = 4.54:1；按鈕 hover 白 / #2C6E9B = 5.51:1；深色按鈕 白 / #34445A = 9.9:1
 *   連結 #23628F / #FFFDF7 = 6.42:1 */
:root {
  /* 色彩 */
  --blue: #70B7E8;
  --blue-d: #2C6E9B;
  --blue-ink: #23628F;
  --yellow: #FFE39A;
  --green: #A8DCC0;
  --green-d: #6FBF95;
  --pink: #F3B8C8;
  --bg: #FFFDF7;
  --ink: #34445A;
  --ink-soft: #5C6B80;
  --ink-tint: #55637A;
  --line: #D5D9E0;
  --card: #FFFFFF;
  --sky: #E3F2FC;
  /* 間距（8px 系統） */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px;
  /* 字階（6 級，相鄰比值 ≥ 1.25） */
  --t-xs: .75rem; --t-s: .875rem; --t-m: 1rem; --t-l: 1.25rem; --t-xl: 1.75rem; --t-2xl: 2.5rem;
  /* 圓角（3 種：膠囊、卡片、小元件） */
  --r-pill: 999px; --radius: 12px; --radius-s: 8px;
  --shadow: 0 1px 2px rgba(52, 68, 90, .06), 0 8px 24px rgba(52, 68, 90, .07);
  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --card-border: 1px solid var(--line);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 64px;
  /* 插圖用色（依年齡層覆寫） */
  --i-blue: var(--blue); --i-blue-d: #4A93C8; --i-yellow: var(--yellow); --i-green: var(--green); --i-green-d: var(--green-d);
  --i-pink: var(--pink); --i-ink: var(--ink); --i-ink-soft: #8A97A8; --i-white: #fff; --i-face: #DDF0FC; --i-panel: #F2F8FD;
  --i-sky: #E3F2FC; --i-wall: #FFF6E3; --i-floor: #F2DDB8; --i-skin: #F8D7BE; --i-skin2: #D9A47E; --i-hair: #5A4636; --i-hair2: #2E2A27;
}

/* ---------- 五個年齡層的視覺風格（以底色、線條、插圖色區辨；圓角只做小幅調整） ---------- */
/* 幼兒園：水彩繪本、可愛角色（整體放大 12.5%） */
html[data-age="kinder"] { font-size: 112.5%; }
[data-age="kinder"] { --radius: 16px; --radius-s: 12px; --i-panel: #FFF4DC; --i-face: #E8F5FD; --i-ink-soft: #A3AEBB; --card-border: 2px solid #EBCB85; }
[data-age="kinder"] body {
  background:
    radial-gradient(circle at 10% 20%, rgba(243, 184, 200, .25), transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(255, 227, 154, .35), transparent 40%),
    radial-gradient(circle at 70% 90%, rgba(168, 220, 192, .3), transparent 45%), var(--bg);
  background-attachment: fixed;
}
/* 國小：彩色漫畫、情境插畫（粗框、漫畫陰影） */
html[data-age="elem"] { font-size: 106.25%; }
[data-age="elem"] { --card-border: 3px solid var(--ink); --shadow: 5px 5px 0 var(--ink); --i-panel: #FFF8E1; }
[data-age="elem"] .ill .s-ink, [data-age="elem"] .scene rect, [data-age="elem"] .concept rect { stroke: var(--ink); stroke-width: 2.5; }
[data-age="elem"] .btn:not(.dark) { box-shadow: 3px 3px 0 var(--ink); border: 2px solid var(--ink); }
/* 國中：科學圖解、資訊圖表（方格紙背景） */
[data-age="junior"] { --i-panel: #F1FAF5; --card-border: 1px solid #B9D9C7; }
[data-age="junior"] body {
  background-color: var(--bg);
  background-image: linear-gradient(rgba(112, 183, 232, .09) 1px, transparent 1px), linear-gradient(90deg, rgba(112, 183, 232, .09) 1px, transparent 1px);
  background-size: 24px 24px;
}
/* 高中：科技視覺、技術架構（深色科技面板） */
[data-age="senior"] { --radius: 10px; --radius-s: 6px; --i-panel: #1F2B3D; --i-face: #CFE6F7; --i-white: #EAF4FB; --i-wall: #263449; --i-floor: #33435A; --i-sky: #22324A; --i-ink-soft: #8FA3BA; }
[data-age="senior"] .lesson-head { background: linear-gradient(135deg, #1F2B3D, #2C3E57); color: #EAF4FB; border-color: #1F2B3D; }
[data-age="senior"] .lesson-head .lead, [data-age="senior"] .lesson-head .eyebrow, [data-age="senior"] .lesson-head .lesson-sub { color: #D6E4F0; }
[data-age="senior"] .lesson-head .term-link { color: #A9D4F2; }
[data-age="senior"] .flow-n { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; }
[data-age="senior"] .lesson-head .speak-btn { background: #2C3E57; color: #EAF4FB; border-color: #6E8BAA; }
/* 成人：專業資訊圖表、商業視覺（簡潔、細線） */
[data-age="adult"] { --radius: 8px; --radius-s: 6px; --i-panel: #F4F6F9; --i-pink: #E9A6B9; --shadow: 0 1px 3px rgba(52, 68, 90, .12); }

/* ---------- 基本 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--s2)); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--t-m); line-height: 1.7; }
img, svg { max-width: 100%; }
a { color: var(--blue-ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 var(--s2); }
h1 { font-size: clamp(2rem, 5.2vw, 3.25rem); line-height: 1.18; letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2rem); }
h3 { font-size: var(--t-l); }
h4 { font-size: var(--t-m); }
p { margin: 0 0 var(--s2); }
ul, ol { padding-left: 1.3em; margin: 0 0 var(--s2); }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 var(--s2); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 16px; border-radius: var(--radius-s); z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--blue-ink); outline-offset: 2px; }
.small { font-size: var(--t-s); color: var(--ink-soft); }
.card { background: var(--card); border: var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--s3); margin-bottom: var(--s3); }
.card p, .lead, .sec-lead, .tl-panel p, .hist-list p { max-width: 40em; }
.en { color: var(--ink-soft); font-size: var(--t-s); }

/* ---------- 按鈕 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; background: var(--blue); color: var(--ink); border: 2px solid var(--blue); border-radius: var(--r-pill); padding: .55em 1.25em; text-decoration: none; cursor: pointer; font: inherit; font-weight: 700; min-height: 44px; transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease); }
.btn:hover, .btn:focus-visible { background: var(--blue-d); border-color: var(--blue-d); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.dark:hover, .btn.dark:focus-visible { background: var(--blue-d); border-color: var(--blue-d); }
.btn.ghost { background: transparent; color: var(--blue-ink); border-color: var(--blue); }
.btn.ghost:hover, .btn.ghost:focus-visible { background: var(--sky); color: var(--ink); border-color: var(--blue-d); }
.btn.big { font-size: var(--t-l); padding: .6em 1.5em; min-height: 56px; }
.btn.small { padding: .3em 1em; font-size: var(--t-s); }
.btn:disabled { opacity: .55; cursor: default; }
.speak-btn { display: inline-flex; align-items: center; gap: .35em; background: var(--yellow); color: var(--ink); border: 2px solid #E8C35A; border-radius: var(--r-pill); padding: .3em 1em; font: inherit; font-size: var(--t-s); font-weight: 700; cursor: pointer; min-height: 44px; transition: background-color .2s var(--ease); }
.speak-btn .ico { width: 1.2em; height: 1.2em; }
.speak-btn.speaking { background: var(--pink); border-color: #E596AC; }
.speak-btn.speaking::after { content: "（再按一次停止）"; font-weight: 400; }
.no-speech .speak-btn { display: none; }

/* ---------- 頁首（單列 64px） ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 253, 247, .97); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: var(--s2); min-height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: var(--s1); text-decoration: none; color: var(--ink); font-weight: 900; font-size: var(--t-l); letter-spacing: .06em; min-height: 44px; }
.logo-mark { width: 32px; height: 32px; }
.main-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav-top { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 var(--s2); border: 0; background: none; border-radius: var(--r-pill); color: var(--ink); text-decoration: none; font: inherit; font-weight: 700; cursor: pointer; transition: background-color .2s var(--ease); }
.nav-top:hover { background: var(--sky); }
.nav-top[aria-current="page"], .nav-group.is-current > .nav-top { background: var(--sky); box-shadow: inset 0 -3px 0 var(--blue-d); }
.caret { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s var(--ease); }
.nav-top[aria-expanded="true"] .caret { transform: rotate(225deg) translateY(-2px); }
.nav-group { position: relative; }
.sub { display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 260px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--s1); z-index: 60; }
.nav-top[aria-expanded="true"] + .sub { display: block; }
.sub a { display: flex; align-items: center; min-height: 44px; padding: 0 var(--s2); border-radius: var(--radius-s); color: var(--ink); text-decoration: none; font-weight: 600; }
.sub a:hover, .sub a:focus-visible { background: var(--sky); }
.sub-h { margin: 4px var(--s2) 4px; font-size: var(--t-xs); font-weight: 700; color: var(--ink-soft); letter-spacing: .04em; }
.icon-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; justify-content: center; padding: 0 var(--s1); border-radius: var(--r-pill); color: var(--ink); text-decoration: none; font-weight: 700; }
.icon-btn:hover, .icon-btn[aria-current="page"] { background: var(--sky); }
.icon-btn .ico { width: 22px; height: 22px; }
.nav-cta { min-height: 44px; padding: 0 var(--s3); }
.menu-btn { display: none; font: inherit; font-weight: 700; background: var(--sky); border: 0; border-radius: var(--r-pill); padding: 0 var(--s2); color: var(--ink); cursor: pointer; min-height: 48px; }
@media (max-width: 1000px) { .icon-btn-t { display: none; } }
@media (max-width: 900px) {
  .bar { flex-wrap: wrap; gap: var(--s1); }
  .menu-btn { display: inline-flex; align-items: center; }
  .icon-btn { margin-left: auto; }
  .nav-cta { display: none; }
  .main-nav { display: none; order: 10; width: 100%; flex-direction: column; align-items: stretch; margin: 0; padding-bottom: var(--s2); }
  .nav-open .main-nav { display: flex; }
  .nav-top { width: 100%; min-height: 48px; justify-content: space-between; border-radius: var(--radius-s); }
  .nav-group.is-current > .nav-top, .nav-top[aria-current="page"] { box-shadow: inset 4px 0 0 var(--blue-d); }
  .sub { position: static; box-shadow: none; border: 0; border-left: 2px solid var(--line); border-radius: 0; margin: 0 0 var(--s1) var(--s2); padding: 0; min-width: 0; }
  .sub a { min-height: 48px; }
}

/* ---------- 麵包屑、更新日期 ---------- */
.crumbs ol { list-style: none; padding: 0; margin: 0 0 var(--s2); display: flex; flex-wrap: wrap; align-items: center; font-size: var(--t-s); color: var(--ink-soft); }
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before { content: "›"; margin: 0 var(--s1); color: var(--ink-soft); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.updated { font-size: var(--t-s); color: var(--ink-soft); margin: var(--s2) 0; }

/* ---------- 顯示版本切換（頁面內） ---------- */
.age-switch { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s1) var(--s2); margin: 0 0 var(--s3); }
.age-switch-note { margin: 0; font-size: var(--t-s); color: var(--ink-soft); flex: 1 1 260px; }
.age-switch-note b { color: var(--ink); }
.age-switch-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.seg { font: inherit; font-size: var(--t-s); font-weight: 700; min-height: 44px; padding: 0 var(--s2); border: 2px solid var(--line); background: #fff; color: var(--ink); border-radius: var(--r-pill); cursor: pointer; transition: background-color .2s var(--ease), border-color .2s var(--ease); }
.seg:hover { border-color: var(--blue); }
.seg[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- 頁尾 ---------- */
.site-footer { background: var(--ink); color: #E8EEF5; margin-top: var(--s6); padding: var(--s5) 0 var(--s3); }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: var(--s3); }
.logo-foot { color: #fff; }
.foot-tag { color: #C9D4E0; margin-top: var(--s1); }
.foot-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s3); align-content: start; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }
.foot-note { border-top: 1px solid rgba(255, 255, 255, .2); margin-top: var(--s3); padding-top: var(--s2); font-size: var(--t-s); color: #C9D4E0; }
.foot-note p { max-width: 48em; }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- 區塊節奏 ---------- */
.sec { padding: var(--s7) 0; }
.sec.alt { padding: var(--s6) 0; background: rgba(227, 242, 252, .5); }
.sec.tight { padding: var(--s5) 0; }
@media (max-width: 720px) { .sec { padding: var(--s5) 0; } .sec.alt { padding: 40px 0; } .sec.tight { padding: var(--s4) 0; } }
.sec-title { margin-bottom: var(--s1); }
.sec-lead { color: var(--ink-soft); margin-bottom: var(--s3); }
.more { margin-top: var(--s2); font-weight: 700; }
.more a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; }
.eyebrow { font-weight: 700; color: var(--blue-ink); letter-spacing: .02em; margin-bottom: var(--s1); font-size: var(--t-s); }

/* ---------- 首頁：Hero ---------- */
.hero { background: linear-gradient(180deg, var(--sky), var(--bg)); padding: var(--s6) 0 var(--s5); }
.hero-in { display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--s5); align-items: center; }
.hero .eyebrow a { margin-left: 4px; font-weight: 600; }
.hero h1 { margin-bottom: var(--s2); }
.hero-zh { font-size: var(--t-l); font-weight: 700; margin-bottom: var(--s3); }
.hero-en { display: block; font-size: var(--t-m); font-weight: 600; color: var(--ink-soft); margin-top: 2px; }
.cta { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); margin-bottom: var(--s4); }
.stats { list-style: none; padding: var(--s2) 0 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); border-top: 1px solid var(--line); max-width: 560px; }
.stats a { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); min-height: 44px; }
.stats b { font-size: var(--t-xl); line-height: 1.1; }
.stats span { font-size: var(--t-s); color: var(--ink-soft); }
.stats a:hover span { color: var(--blue-ink); text-decoration: underline; }
.hero-art { margin: 0; }
.hero-art .ill { width: 100%; height: auto; }
@media (max-width: 820px) {
  .hero { padding: var(--s4) 0 var(--s3); }
  .hero-in { grid-template-columns: 1fr; gap: var(--s3); }
  .hero-art { max-width: 260px; margin: 0 auto; order: 2; }
  .hero .cta { margin-bottom: var(--s3); }
  .stats { gap: var(--s1); }
  .stats b { font-size: var(--t-l); }
  .stats span { font-size: var(--t-xs); }
}
/* 手機：主視覺讓位給標題與內容（AI 小星仍出現在課程縮圖與各內頁） */
@media (max-width: 560px) { .hero-art { display: none; } #ages .sec-lead { margin-bottom: var(--s2); } }

/* 首頁：學習階段索引列（01–05） */
.age-index { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.age-index li + li { border-left: 1px solid var(--line); }
.age-row { position: relative; width: 100%; height: 100%; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto auto auto auto; align-content: start; gap: 2px var(--s1); text-align: left; background: transparent; border: 0; padding: var(--s2) var(--s2) var(--s3); font: inherit; color: var(--ink); cursor: pointer; transition: background-color .2s var(--ease); }
.age-row::before { content: ""; position: absolute; left: 0; top: -2px; height: 4px; width: 0; background: var(--blue-d); transition: width .3s var(--ease); }
.age-row:hover, .age-row:focus-visible { background: rgba(227, 242, 252, .6); }
.age-row:hover::before, .age-row:focus-visible::before, .age-row[aria-pressed="true"]::before { width: 100%; }
.age-num { font-size: var(--t-s); font-weight: 700; color: var(--blue-ink); letter-spacing: .06em; }
.age-row-ill { grid-row: 1 / 3; grid-column: 2; }
.age-row-ill .age-ico { width: 44px; height: 44px; }
.age-row b { font-size: var(--t-l); grid-column: 1; }
.age-range { font-size: var(--t-s); color: var(--ink-tint); grid-column: 1 / -1; }
.age-mode { font-weight: 700; color: var(--blue-ink); grid-column: 1 / -1; margin-top: var(--s1); }
.age-style { font-size: var(--t-s); color: var(--ink-tint); grid-column: 1 / -1; }
@media (max-width: 900px) {
  .age-index { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
  .age-index li { flex: 0 0 44%; scroll-snap-align: start; }
  .age-row { padding-bottom: var(--s2); }
}
@media (max-width: 480px) { .age-index li { flex-basis: 62%; } .age-style { display: none; } }

/* 首頁：三條路 */
.path-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.path-card { display: flex; flex-direction: column; gap: var(--s1); background: #fff; border: var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--s3); text-decoration: none; color: var(--ink); transition: transform .2s var(--ease), border-color .2s var(--ease); }
.path-card:hover, .path-card:focus-visible { transform: translateY(-3px); border-color: var(--blue-d); }
.path-card .ill { width: 48px; height: 48px; }
.path-card b { font-size: var(--t-l); }
.path-card span { color: var(--ink-soft); }
.path-card .go, .today-term .go { margin-top: auto; color: var(--blue-ink); font-weight: 700; }
@media (max-width: 820px) { .path-grid { grid-template-columns: 1fr; } .path-card { padding: var(--s2); } }

/* 首頁：AI 入門 6 堂課 */
.course-meta { font-weight: 700; color: var(--blue-ink); margin-bottom: var(--s3); }
.course-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.course-item { display: grid; grid-template-columns: auto 88px 1fr; gap: var(--s2); align-items: center; background: #fff; border: var(--card-border); border-radius: var(--radius); padding: var(--s2); text-decoration: none; color: var(--ink); min-height: 96px; transition: border-color .2s var(--ease), transform .2s var(--ease); }
.course-item:hover, .course-item:focus-visible { border-color: var(--blue-d); transform: translateY(-2px); }
.course-n { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--yellow); font-weight: 700; }
.course-ill .ill { width: 88px; height: auto; }
.course-t { display: flex; flex-direction: column; }
.course-t b { font-size: var(--t-l); }
.course-t span { font-size: var(--t-s); color: var(--ink-soft); }
@media (max-width: 900px) { .course-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .course-list { grid-template-columns: 1fr; } .course-item { grid-template-columns: auto 64px 1fr; } .course-ill .ill { width: 64px; } }

/* 首頁：名詞、今日一詞 */
.gloss-home { display: grid; grid-template-columns: 1fr 2fr; gap: var(--s2); align-items: stretch; }
@media (max-width: 820px) { .gloss-home { grid-template-columns: 1fr; } }
.today-term { display: flex; flex-direction: column; gap: 4px; background: linear-gradient(135deg, #FFF8DE, #fff); border: 2px solid #E8C35A; border-radius: var(--radius); padding: var(--s3); text-decoration: none; color: var(--ink); margin-bottom: var(--s3); transition: transform .2s var(--ease); }
.today-term:hover, .today-term:focus-visible { transform: translateY(-2px); }
.today-term .ill { width: 56px; height: 56px; }
.today-k { font-size: var(--t-xs); font-weight: 700; color: var(--ink-tint); letter-spacing: .06em; }
.today-term b { font-size: var(--t-xl); line-height: 1.2; }
.gloss-home .today-term { margin-bottom: 0; }

.life-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.life-card { display: flex; flex-direction: column; gap: var(--s1); text-decoration: none; color: var(--ink); margin: 0; transition: transform .2s var(--ease), border-color .2s var(--ease); }
.life-card:hover { transform: translateY(-2px); border-color: var(--blue-d); }
.life-card .ill { border-radius: var(--radius-s); width: 100%; height: auto; }
.life-card span { color: var(--ink-soft); font-size: var(--t-s); }
@media (max-width: 820px) { .life-grid { grid-template-columns: 1fr; } .life-card { display: grid; grid-template-columns: 120px 1fr; grid-template-rows: auto 1fr; column-gap: var(--s2); } .life-card .ill { grid-row: span 2; } }

.play-intro { display: grid; grid-template-columns: 1fr 1.6fr; gap: var(--s3); align-items: start; }
@media (max-width: 820px) { .play-intro { grid-template-columns: 1fr; } }

/* 首頁：最近更新 */
.news { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.news li { border-bottom: 1px solid var(--line); }
.news a { display: grid; grid-template-columns: 120px 1fr; grid-template-rows: auto auto; column-gap: var(--s3); padding: var(--s2) 0; text-decoration: none; color: var(--ink); }
.news time { grid-row: span 2; font-size: var(--t-s); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.news b { font-size: var(--t-l); }
.news span { color: var(--ink-soft); }
.news a:hover b { color: var(--blue-ink); text-decoration: underline; }
@media (max-width: 560px) { .news a { grid-template-columns: 1fr; } .news time { grid-row: auto; } }

/* 首頁：公益理念（精簡） */
.mission { background: linear-gradient(135deg, #FFF6D9, #FDE9EF); }
.mission-quote { font-size: var(--t-xl); font-weight: 900; line-height: 1.3; margin: 0 0 var(--s1); padding-left: var(--s2); border-left: 6px solid var(--blue-d); max-width: none; }
.mission-in p:last-child { margin: 0; max-width: 46em; }
.principles { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); margin-top: var(--s2); }
.principles li { background: #fff; border-radius: var(--radius); padding: var(--s2); display: flex; flex-direction: column; gap: 4px; border: var(--card-border); }
.pr-k { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--blue); font-weight: 900; font-size: var(--t-l); }
.principles li > span:last-child { color: var(--ink-soft); font-size: var(--t-s); }
@media (max-width: 900px) { .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .principles { grid-template-columns: 1fr; } }

/* ---------- 內頁標頭 ---------- */
.page-head { background: linear-gradient(180deg, var(--sky), transparent); padding: var(--s3) 0 var(--s2); margin-bottom: var(--s3); }
.page-head-in { display: grid; grid-template-columns: 1fr 200px; gap: var(--s3); align-items: center; }
.page-head-ill .ill { width: 100%; height: auto; max-height: 160px; }
.lead { font-size: var(--t-l); color: var(--ink-soft); }
@media (max-width: 640px) { .page-head-in { grid-template-columns: 1fr 88px; } .lead { font-size: var(--t-m); } }

/* ---------- 單元學習頁 ---------- */
.learn-top { padding-top: var(--s3); }
.unit-tabs { display: flex; gap: var(--s1); overflow-x: auto; padding-bottom: var(--s1); scrollbar-width: thin; }
.unit-tabs a { display: inline-flex; align-items: center; gap: var(--s1); white-space: nowrap; text-decoration: none; color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: var(--r-pill); padding: 0 var(--s2) 0 6px; font-weight: 700; min-height: 44px; transition: border-color .2s var(--ease); }
.unit-tabs a:hover { border-color: var(--blue); }
.unit-tabs a[aria-current="page"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.unit-tabs a[aria-current="page"] .ut-n { background: #fff; color: var(--ink); }
.ut-n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--yellow); font-size: var(--t-s); }
.prog { font-size: var(--t-s); color: var(--ink-soft); margin: var(--s1) 0 0; }
.lesson-head { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--s4); align-items: center; background: linear-gradient(135deg, #fff, var(--sky)); border-radius: var(--radius); padding-top: var(--s4); padding-bottom: var(--s4); margin-top: var(--s3); margin-bottom: var(--s3); border: var(--card-border); }
.lesson-head h1 { margin-bottom: var(--s1); }
.lesson-sub { font-size: var(--t-l); font-weight: 700; color: var(--ink-tint); margin-bottom: var(--s2); }
.lesson-ill { margin: 0; }
.lesson-ill .ill { width: 100%; height: auto; }
@media (max-width: 820px) {
  .lesson-head { grid-template-columns: 1fr; width: calc(100% - 32px); gap: var(--s2); padding-top: var(--s3); padding-bottom: var(--s3); }
  .lesson-ill { max-width: 320px; }
}
.lesson-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s3); }
@media (max-width: 820px) { .lesson-grid { grid-template-columns: 1fr; } }
.pts-sub { font-size: var(--t-m); color: var(--ink-tint); margin-bottom: var(--s2); }
.lesson-points ul { list-style: none; padding: 0; }
.lesson-points li { position: relative; padding-left: 34px; margin-bottom: var(--s2); }
.lesson-points li::before { content: ""; position: absolute; left: 0; top: .25em; width: 22px; height: 22px; border-radius: 50%; background: var(--yellow); box-shadow: inset 0 0 0 6px var(--blue); }
.term-link { color: inherit; text-decoration: underline dashed var(--blue-d); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.term-link:hover { color: var(--blue-ink); text-decoration-style: solid; }
.lesson-scene figure { margin: 0 0 var(--s2); }
.lesson-scene .ill { width: 100%; height: auto; border-radius: var(--radius-s); }
.lesson-scene figcaption { margin-top: var(--s1); font-weight: 600; }
.mark-btn { margin-top: var(--s2); }
.mark-btn[aria-pressed="true"] { background: var(--green); border-color: var(--green-d); color: var(--ink); }
.pager { display: flex; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; margin: var(--s1) auto var(--s3); }
.src-box { font-size: var(--t-s); color: var(--ink-soft); }
.src-box p { margin-bottom: var(--s1); }
@media (max-width: 720px) { .src a, .src-box a { display: inline-flex; align-items: center; min-height: 44px; } }

/* 完成證明 */
.cert { display: grid; grid-template-columns: 140px 1fr; gap: var(--s3); align-items: center; margin-top: var(--s3); background: linear-gradient(135deg, #FFF8DE, #EAF5FD); border: 3px double var(--blue-d); border-radius: var(--radius); padding: var(--s3); }
.cert h2 { margin-bottom: var(--s1); }
.cert-name { display: flex; flex-direction: column; gap: 4px; font-size: var(--t-s); color: var(--ink-soft); margin-bottom: var(--s2); max-width: 360px; }
.cert-name input { font: inherit; font-size: var(--t-l); font-weight: 700; color: var(--ink); padding: var(--s1) var(--s2); border: 2px solid var(--line); border-radius: var(--radius-s); background: #fff; min-height: 48px; }
.cert-btns { display: flex; flex-wrap: wrap; gap: var(--s1); }
@media (max-width: 560px) { .cert { grid-template-columns: 1fr; } .cert .xx { max-width: 120px; } }

/* 接下來看 */
.next-up { margin-top: var(--s4); margin-bottom: var(--s3); }
.next-h { font-size: var(--t-xl); }
.next-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s2); }
.next-card { display: flex; flex-direction: column; gap: 4px; background: #fff; border: var(--card-border); border-top: 4px solid var(--blue-d); border-radius: var(--radius); padding: var(--s2); text-decoration: none; color: var(--ink); min-height: 120px; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.next-card:hover, .next-card:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow); }
.next-kind { font-size: var(--t-xs); font-weight: 700; color: var(--ink-tint); letter-spacing: .06em; }
.next-card b { font-size: var(--t-l); }
.next-card span:last-child { font-size: var(--t-s); color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* 圖解：流程 */
.flow { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.flow-step { position: relative; display: flex; align-items: center; gap: var(--s2); background: var(--sky); border-radius: var(--radius-s); padding: 10px var(--s2); font-weight: 700; }
.flow-step:not(:last-child)::after { content: ""; position: absolute; left: 30px; bottom: -20px; border: 9px solid transparent; border-top: 11px solid var(--blue-d); }
.flow-n { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color: var(--ink); }
.flow-step:nth-child(2n) { background: #FDF0F4; } .flow-step:nth-child(2n) .flow-n { background: var(--pink); }
.flow-step:nth-child(3n) { background: #EEF9F3; } .flow-step:nth-child(3n) .flow-n { background: var(--green); }
[data-age="kinder"] .flow-step { font-size: var(--t-l); padding: var(--s2); }
[data-age="senior"] .flow-step { background: #1F2B3D; color: #EAF4FB; }
/* 圖解：層級 */
.nested { font-weight: 700; }
.nest { border-radius: var(--radius-s); padding: 12px 12px 14px; margin-top: var(--s1); }
.nest-l { display: block; margin-bottom: 4px; }
.nest-0 { background: var(--sky); border: 2px solid var(--blue); margin-top: 0; }
.nest-1 { background: #EEF9F3; border: 2px solid var(--green-d); }
.nest-2 { background: #FDF0F4; border: 2px solid var(--pink); }
.nest-3 { background: #FFF6D6; border: 2px solid #E8C35A; }
/* 圖解：神經網路 */
.neural-wrap .ill { width: 100%; height: auto; background: var(--i-panel); border-radius: var(--radius-s); }
.legend { list-style: none; padding: 0; margin-top: var(--s2); }
.legend li { display: flex; align-items: center; gap: var(--s1); margin-bottom: 4px; }
.dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.dot-0 { background: var(--blue); } .dot-1 { background: var(--pink); } .dot-2 { background: var(--green-d); }
/* 圖解：迷你時間軸 */
.mini-tl { list-style: none; padding: 0 0 0 18px; border-left: 4px solid var(--blue); }
.mini-tl li { position: relative; margin-bottom: 12px; }
.mini-tl li::before { content: ""; position: absolute; left: -27px; top: 14px; width: 14px; height: 14px; border-radius: 50%; background: var(--yellow); border: 3px solid var(--blue-d); }
.mini-tl a { display: flex; align-items: center; gap: var(--s1); min-height: 44px; text-decoration: none; color: var(--ink); font-weight: 700; }
.mini-tl b { color: var(--blue-ink); }
.mini-tl small { display: block; color: var(--ink-soft); font-size: var(--t-s); }

/* ---------- 名詞卡 ---------- */
.term-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s2); }
.term-grid.compact { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.term-card { display: flex; flex-direction: column; gap: 4px; background: #fff; border: var(--card-border); border-radius: var(--radius); padding: var(--s2); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .2s var(--ease), border-color .2s var(--ease); }
.term-card:hover, .term-card:focus-visible { border-color: var(--blue-d); transform: translateY(-2px); }
.term-card .ill { width: 48px; height: 48px; }
.term-card b { font-size: var(--t-l); }
.term-card span { color: var(--ink-soft); font-size: var(--t-s); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- 時間軸 ---------- */
.tl-track { display: flex; gap: 10px; overflow-x: auto; padding: var(--s1) 2px var(--s2); scroll-snap-type: x proximity; scrollbar-width: thin; }
.tl-dot { flex: none; scroll-snap-align: center; display: flex; flex-direction: column; align-items: flex-start; width: 150px; text-align: left; background: #fff; border: 2px solid var(--line); border-top: 6px solid var(--blue); border-radius: var(--radius-s); padding: var(--s1) 10px; cursor: pointer; font: inherit; color: var(--ink); min-height: 88px; transition: background-color .2s var(--ease), border-color .2s var(--ease); }
.tl-dot b { font-size: var(--t-l); }
.tl-dot span { font-size: var(--t-s); line-height: 1.4; }
.tl-dot.era-winter { border-top-color: var(--green-d); } .tl-dot.era-deep { border-top-color: #E596AC; } .tl-dot.era-genai { border-top-color: #E8C35A; }
.tl-dot[aria-selected="true"] { background: var(--sky); border-color: var(--blue-d); box-shadow: var(--shadow); }
.tl-panel { min-height: 180px; }
.tl-year { font-size: var(--t-xl); font-weight: 900; color: var(--blue-ink); margin: 0; }
.tl-nav { display: flex; gap: 10px; justify-content: flex-end; margin-top: calc(-1 * var(--s1)); margin-bottom: var(--s3); }
.src { font-size: var(--t-s); color: var(--ink-soft); }
.hist-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s2); }
@media (max-width: 720px) { .hist-list { grid-template-columns: 1fr; } }
.filters { display: flex; flex-wrap: wrap; gap: var(--s1); margin: var(--s2) 0; }
.chip { font: inherit; font-weight: 700; background: #fff; border: 2px solid var(--line); color: var(--ink); border-radius: var(--r-pill); padding: 0 var(--s2); cursor: pointer; min-height: 44px; transition: background-color .2s var(--ease), border-color .2s var(--ease); }
.chip:hover { border-color: var(--blue); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip small { font-weight: 400; font-size: var(--t-xs); }

/* ---------- 名詞百科、搜尋 ---------- */
.gl-tools { display: flex; flex-direction: column; gap: 6px; margin-top: var(--s2); }
.search { display: block; flex: 1; }
.search input { width: 100%; font: inherit; padding: 0 var(--s2); min-height: 48px; border: 2px solid var(--line); border-radius: var(--r-pill); background: #fff; color: var(--ink); }
.search input:focus { border-color: var(--blue-d); outline: none; box-shadow: 0 0 0 3px rgba(112, 183, 232, .35); }
.gl-count, .s-count { color: var(--ink-soft); font-size: var(--t-s); }
.gl-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s2); }
@media (max-width: 720px) { .gl-list { grid-template-columns: 1fr; } }
.gl-item { display: grid; grid-template-columns: 56px 1fr; gap: var(--s2); align-items: start; }
.gl-item .ill { width: 56px; height: 56px; }
.gl-item h3 { margin-bottom: 0; }
.gl-cat { font-size: var(--t-xs); font-weight: 700; color: var(--blue-ink); margin-bottom: 2px; letter-spacing: .04em; }
.gl-item details { margin: 4px 0 var(--s1); font-size: var(--t-s); color: var(--ink-soft); }
.gl-item summary { cursor: pointer; color: var(--blue-ink); font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.cat-future { background: linear-gradient(135deg, #fff, #FFF8E1); }
.flash { animation: flash 1.6s ease 2; }
@keyframes flash { 50% { box-shadow: 0 0 0 6px var(--yellow); } }
.empty { padding: var(--s3); text-align: center; color: var(--ink-soft); max-width: none; }
.search-form { display: flex; gap: var(--s1); margin-bottom: var(--s2); }
.s-group { margin-bottom: var(--s4); }
.s-group h2 { font-size: var(--t-l); border-bottom: 2px solid var(--ink); padding-bottom: var(--s1); }
.s-group h2 small { font-size: var(--t-s); color: var(--ink-soft); font-weight: 600; }
.s-group ul { list-style: none; padding: 0; margin: 0; }
.s-group li { border-bottom: 1px solid var(--line); }
.s-group a { display: flex; flex-direction: column; gap: 2px; padding: var(--s2) 0; text-decoration: none; color: var(--ink); }
.s-group a b { color: var(--blue-ink); }
.s-group a:hover b { text-decoration: underline; }
.s-group a > span:last-child { color: var(--ink-soft); font-size: var(--t-s); }
.s-tag { align-self: flex-start; font-size: var(--t-xs); font-weight: 700; background: var(--sky); color: var(--ink); border-radius: var(--r-pill); padding: 0 var(--s1); }
mark { background: var(--yellow); color: var(--ink); padding: 0 2px; border-radius: 3px; }

/* ---------- 生活應用、工具 ---------- */
.life-list .life-item { display: grid; grid-template-columns: 300px 1fr; gap: var(--s3); align-items: center; }
.life-item figure { margin: 0; }
.life-item .ill { width: 100%; height: auto; border-radius: var(--radius-s); }
@media (max-width: 720px) { .life-list .life-item { grid-template-columns: 1fr; } }
.caution { background: #FFF6D6; border-radius: var(--radius-s); padding: 6px 12px; font-size: var(--t-s); }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--s2); }
@media (max-width: 900px) { .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tool-grid { grid-template-columns: 1fr; } }
.tool-card .ill { width: 48px; height: 48px; }
.tool-card h2 { font-size: var(--t-l); }
.tool-card .ex { font-size: var(--t-s); color: var(--ink-soft); }
.tips { font-size: var(--t-s); }
.checklist-card { background: #FFFBEA; }

/* ---------- 測驗與遊戲 ---------- */
.quiz { border: 0; padding: 0; margin: 0 0 var(--s1); min-width: 0; }
.quiz legend { font-weight: 700; font-size: var(--t-l); margin-bottom: 10px; padding: 0; }
.quiz-opts { display: grid; gap: var(--s1); }
.quiz-opt { text-align: left; font: inherit; background: #fff; border: 2px solid var(--line); border-radius: var(--radius-s); padding: .6em 1em; cursor: pointer; color: var(--ink); min-height: 48px; transition: background-color .2s var(--ease), border-color .2s var(--ease); }
.quiz-opt:hover:not(:disabled) { border-color: var(--blue-d); background: var(--sky); }
.quiz-opt.right { background: var(--green); border-color: var(--green-d); font-weight: 700; }
.quiz-opt.right::before { content: "✓ "; }
.quiz-opt.wrong { background: #FDE8EE; border-color: var(--pink); text-decoration: line-through; }
.quiz-opt:disabled { cursor: default; opacity: 1; }
.quiz-fb { font-weight: 700; margin: var(--s1) 0 0; min-height: 1.5em; }
.quiz-ex { background: var(--sky); border-radius: var(--radius-s); padding: var(--s1) 12px; }

.play-wrap h2 { margin-bottom: var(--s1); }
.isai-score, .m-score, .ch-score, .cl-score { font-weight: 700; }
.isai-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .isai-list { grid-template-columns: 1fr; } }
.isai-item { display: grid; grid-template-columns: 48px 1fr; gap: 4px 10px; align-items: center; background: #fff; border: 2px solid var(--line); border-radius: var(--radius-s); padding: 10px; }
.isai-item .ill { width: 48px; height: 48px; grid-row: span 2; }
.isai-name { font-weight: 700; }
.isai-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.isai-why { grid-column: 1 / -1; font-size: var(--t-s); }
.isai-item.right { border-color: var(--green-d); background: #F1FAF5; }
.isai-item.wrong { border-color: var(--pink); background: #FDF0F4; }
.match { display: grid; grid-template-columns: 1fr 1.6fr; gap: 12px; margin: 10px 0; }
.m-col { display: flex; flex-direction: column; gap: var(--s1); }
.m-item { font: inherit; text-align: left; background: #fff; border: 2px solid var(--line); border-radius: var(--radius-s); padding: var(--s1) 12px; cursor: pointer; color: var(--ink); min-height: 56px; display: flex; align-items: center; gap: var(--s1); }
.m-left .ill { width: 48px; height: 48px; }
.m-item.sel { border-color: var(--blue-d); background: var(--sky); box-shadow: 0 0 0 3px rgba(112, 183, 232, .4); }
.m-item.done { background: var(--green); border-color: var(--green-d); cursor: default; }
.m-item.shake { animation: shake .35s; border-color: var(--pink); }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.m-fb { font-weight: 700; min-height: 1.5em; }
.ch-q { border-top: 1px dashed var(--line); padding-top: 14px; margin-top: 14px; }

/* ---------- 教師、家長、關於 ---------- */
.lesson-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s2); }
@media (max-width: 820px) { .lesson-list { grid-template-columns: 1fr; } }
.plan h4 { margin: 12px 0 4px; color: var(--blue-ink); }
.plan-btns { display: flex; gap: var(--s1); flex-wrap: wrap; margin-top: 12px; }
.pg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--s2); }
.pg-item { background: var(--bg); border: 2px solid var(--line); border-radius: var(--radius-s); padding: var(--s2); }
.pg-item.current { border-color: var(--blue-d); background: var(--sky); }
.pg-item h3 { display: flex; align-items: center; gap: 6px; }
.pg-item h3 .ill { width: 36px; height: 36px; }
.pg-item h3 small { font-size: var(--t-xs); color: var(--ink-tint); font-weight: 600; }
.checklist { list-style: none; padding: 0; }
.checklist li { margin-bottom: var(--s1); }
.checklist label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; min-height: 44px; }
.checklist input { width: 22px; height: 22px; flex: none; margin-top: .2em; accent-color: var(--blue-d); }
.talk { list-style: none; padding: 0; }
.talk li { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--line); font-weight: 600; }
.about .big { font-size: var(--t-l); font-weight: 700; }
.notice { background: #FFF6D6; border-left: 6px solid #E8C35A; padding: 10px 14px; border-radius: 6px; }
.dirs li { margin-bottom: 6px; }

/* ---------- SVG 插圖顏色（由 CSS 控制，可依年齡層變化） ---------- */
.ill { display: block; }
.c-blue { fill: var(--i-blue); } .c-blue-d { fill: var(--i-blue-d); } .c-yellow { fill: var(--i-yellow); } .c-green { fill: var(--i-green); } .c-green-d { fill: var(--i-green-d); }
.c-pink { fill: var(--i-pink); } .c-ink { fill: var(--i-ink); } .c-ink-soft { fill: var(--i-ink-soft); } .c-white { fill: var(--i-white); } .c-face { fill: var(--i-face); }
.c-panel { fill: var(--i-panel); } .c-sky { fill: var(--i-sky); } .c-wall { fill: var(--i-wall); } .c-floor { fill: var(--i-floor); }
.c-skin { fill: var(--i-skin); } .c-skin2 { fill: var(--i-skin2); } .c-hair { fill: var(--i-hair); } .c-hair2 { fill: var(--i-hair2); }
.s-ink { stroke: var(--i-ink); } .s-ink-soft { stroke: var(--i-ink-soft); } .s-blue { stroke: var(--i-blue-d); } .s-pink { stroke: var(--i-pink); } .s-green { stroke: var(--i-green-d); }
.s-white { stroke: var(--i-white); } .s-yellow { stroke: var(--i-yellow); }
.limb { fill: none; stroke: var(--i-blue); stroke-width: 9; stroke-linecap: round; }

/* 簡單動畫 */
.float { animation: float 4s ease-in-out infinite; transform-box: fill-box; }
.spin { animation: spin 12s linear infinite; }
.pulse { animation: pulse 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.wave { animation: blinkw 1.6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-4px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { transform: scale(1.18); } }
@keyframes blinkw { 50% { opacity: .3; } }
/* 尊重「減少動態」：關閉平滑捲動、所有動畫與轉場 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- 列印（教案、完成證明只印指定區塊） ---------- */
@media print {
  .site-header, .site-footer, .no-print, .speak-btn, .page-head-ill, .age-switch, .next-up { display: none !important; }
  body { background: #fff !important; font-size: 12pt; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  body.print-one * { visibility: hidden; }
  body.print-one .print-target, body.print-one .print-target * { visibility: visible; }
  body.print-one .print-target { position: absolute; left: 0; top: 0; width: 100%; }
}
