/* =========================================================
   DINO AI 遊學樂園 — 內頁共用樣式（關於我們、學伴週報、最新公告、聯絡我們…）
   圖片路徑以本檔所在的 css/ 為基準
   ========================================================= */
:root {
  --navy: #1d3a8f;
  --ink: #26324a;
  --yellow: #f6c52a;
  --orange: #f08a1c;
  --red-orange: #e9591a;
  --card-blue: #4b7bfb;
  --green: #6cbb4f;
  --title-green: #3aa531;
  --pill-lime: #cdff6d;
  --paper: #fbf7ef;
  --sky-blue: #5fc6fb;
  --footer: #4574ff;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-latin: "Fredoka", "Noto Sans TC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--sky-blue);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.latin { font-family: var(--font-latin); font-weight: 600; letter-spacing: .01em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 捲動進場（淡入上移，無傾斜） ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- 捲動進度條 ---------- */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 4px; z-index: 60;
  background: linear-gradient(90deg, var(--orange), var(--yellow), var(--green), var(--card-blue));
  transform-origin: 0 50%; transform: scaleX(0);
}

/* =========================================================
   浮動導覽列（Logo 固定不動）
   ========================================================= */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(10px, 1.2vw, 22px) clamp(16px, 2.6vw, 54px);
  transition: padding .4s var(--ease-out), background .4s, box-shadow .4s;
}
.site-header.is-scrolled {
  padding-top: 8px; padding-bottom: 8px;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 6px 24px rgba(29, 58, 143, .12);
}
.brand { flex: none; display: block; }
.brand img { width: clamp(104px, 11.8vw, 250px); filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .12)); }

.nav {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  width: min(66.4vw, 1240px);
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .62);
  border: 1.5px solid rgba(255, 255, 255, .9);
  box-shadow: 0 6px 20px rgba(29, 58, 143, .10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.nav a {
  position: relative; z-index: 1;
  flex: 1; text-align: center;
  padding: clamp(6px, .62vw, 13px) 0;
  font-weight: 700; font-size: clamp(14px, 1.15vw, 22px);
  color: var(--navy); letter-spacing: .06em;
  transition: transform .3s var(--ease-out);
}
.nav a:hover { transform: translateY(-1px); }
.nav-indicator {
  position: absolute; top: 4px; bottom: 4px; left: 0; width: 0;
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .08), 0 4px 10px rgba(246, 197, 42, .45);
  transition: transform .45s var(--ease-spring), width .45s var(--ease-spring);
}
.menu-toggle { display: none; }

/* =========================================================
   內頁版型：藍天 → 白 → 淺藍，標題、白框橫幅、內容板、草地
   ========================================================= */
.inner-page {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg,
    #0272f3 0, #0ea3fc 17%, #ffffff 19.5%, #ffffff 26%, #cbecfe 35%, #60c6fb 45%, #60c6fb 100%);
  background-size: 100% max(100vw, 1000px);
  background-repeat: no-repeat;
  background-color: var(--sky-blue);
  padding-top: clamp(78px, 7.9vw, 152px);
}
.inner-sky {
  position: absolute; top: 0; left: -3%; width: 106%; max-width: none;
  pointer-events: none;
  animation: drift 30s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: translateX(-1.5%); } to { transform: translateX(1.5%); } }

.page-title {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center; gap: .45em;
  margin: 0 16px clamp(14px, 1.6vw, 30px);
  font-weight: 900;
  font-size: clamp(24px, 3vw, 58px);
  line-height: 1.25; letter-spacing: .04em;
  color: var(--title-green);
  text-align: center;
  text-shadow:
    3px 0 0 #fff, -3px 0 0 #fff, 0 3px 0 #fff, 0 -3px 0 #fff,
    2px 2px 0 #fff, -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff,
    0 7px 10px rgba(10, 60, 30, .35);
}
.page-title .star { width: .72em; flex: none; animation: spinStar 6s linear infinite; }
.page-title .star:last-child { animation-direction: reverse; }
@keyframes spinStar { 0%, 70% { transform: rotate(0) scale(1); } 80% { transform: rotate(72deg) scale(1.25); } 100% { transform: rotate(144deg) scale(1); } }

/* 圖像標題（使用設計稿切出的標題圖） */
.page-title-img {
  position: relative; z-index: 2;
  margin: 0 auto clamp(12px, 1.9vw, 36px);
  width: min(53.5vw, 1030px);
}
.page-title-img img { width: 100%; filter: drop-shadow(0 4px 6px rgba(0, 40, 90, .2)); }

/* 白框橫幅 */
.banner-frame {
  position: relative; z-index: 2;
  width: min(90vw, 1720px);
  margin: 0 auto;
  padding: clamp(8px, 1.2vw, 23px) clamp(8px, 2.2vw, 42px) clamp(10px, 1.6vw, 30px);
  background: #fff;
  border-radius: clamp(14px, 1.5vw, 28px);
  box-shadow: 0 12px 30px rgba(10, 50, 120, .22);
}
.banner-frame .banner-img {
  position: relative; overflow: hidden;
  border-radius: clamp(10px, 1.1vw, 22px);
}
.banner-frame img { width: 100%; object-fit: cover; }

/* 內容白板 */
.content-board {
  position: relative; z-index: 2;
  width: min(85.6vw, 1640px);
  margin: clamp(18px, 2.2vw, 42px) auto 0;
  padding: clamp(14px, 1.8vw, 34px) clamp(14px, 3.8vw, 73px) clamp(20px, 3.2vw, 60px);
  background: #fff;
  border-radius: clamp(14px, 1.5vw, 28px);
  box-shadow: 0 12px 30px rgba(10, 50, 120, .18);
}
.pill-heading {
  display: block; width: fit-content; max-width: 100%;
  margin: 0 auto clamp(16px, 1.6vw, 30px);
  padding: .62em 1.1em;
  border-radius: clamp(10px, .9vw, 18px);
  background: var(--pill-lime);
  border: 1.5px solid #bfbfbf;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .12);
  font-weight: 700; font-size: clamp(16px, 1.75vw, 34px); letter-spacing: .03em; line-height: 1.4;
  color: #1f2a12; text-align: center;
}
.paper {
  background: var(--paper);
  border: 2px solid #7f7f7f;
  border-radius: clamp(12px, 1.2vw, 22px);
  padding: clamp(16px, 2.2vw, 42px) clamp(14px, 1.8vw, 34px) clamp(18px, 2.4vw, 46px);
  font-size: clamp(15px, 1.5vw, 29px);
  line-height: 1.62; letter-spacing: .02em; color: #222;
}
.paper p { margin: 0 0 1em; }
.paper p:last-child { margin-bottom: 0; }
.paper .lead-lines { font-weight: 700; color: #111; }

/* ---------- 分頁籤（學伴週報）：滑過只放大，不傾斜 ---------- */
.tabs {
  position: relative; z-index: 2;
  display: flex; justify-content: center; gap: clamp(12px, 3vw, 58px);
  margin: clamp(12px, 1.3vw, 26px) auto 0;
  padding: 0 12px;
}
.tab {
  --tc: #a3a3a3;
  position: relative;
  min-width: clamp(104px, 12.6vw, 242px);
  padding: clamp(6px, .62vw, 12px) 1.2em;
  border: 2px solid #f2f2f2; border-radius: 999px;
  background: var(--tc);
  color: #fff; cursor: pointer;
  font-weight: 700; font-size: clamp(15px, 1.6vw, 31px); letter-spacing: .32em; text-indent: .32em;
  box-shadow: 0 3px 6px rgba(0, 0, 0, .28);
  transition: transform .3s var(--ease-out), background .35s, box-shadow .3s;
}
.tab::before { /* 內圈白色虛線 */
  content: ""; position: absolute; inset: 3px; border-radius: inherit;
  border: 1.5px dashed rgba(255, 255, 255, .9);
  pointer-events: none;
}
.tab:hover { transform: scale(1.06); }
.tab:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.tab[aria-selected="true"] { background: var(--active, var(--tc)); box-shadow: 0 4px 10px rgba(0, 0, 0, .3); }
.tab[data-color="green"]  { --active: #14ab39; }
.tab[data-color="purple"] { --active: #b250ff; }
.tab[data-color="blue"]   { --active: #009ae3; }

/* ---------- 文章 ---------- */
#panel-expert    { --uc: #14ab39; }
#panel-review    { --uc: #b250ff; }
#panel-parenting { --uc: #009ae3; }
.article-item + .article-item { margin-top: clamp(26px, 3vw, 56px); padding-top: clamp(26px, 3vw, 56px); border-top: 2px dashed #e3e3e3; }
.article-item .pill-heading { cursor: pointer; }

/* 展開／收合：內文高度平滑展開 */
.article-more {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .6s var(--ease-out);
}
.article-more-inner { min-height: 0; overflow: hidden; opacity: 0; transition: opacity .45s var(--ease-out); }
.article-item.is-open .article-more { grid-template-rows: 1fr; }
.article-item.is-open .article-more-inner { opacity: 1; }
.article-more-inner > :first-child { margin-top: 1.1em; }
.article-item .paper .lead-lines { margin-bottom: 0; }

.more-toggle {
  position: relative;
  display: flex; align-items: center; gap: .5em;
  margin: 1.2em auto 0;
  padding: .55em 1.5em .55em 1.7em;
  border: 2px solid #f2f2f2; border-radius: 999px;
  background: var(--uc, var(--card-blue)); color: #fff; cursor: pointer;
  font-weight: 700; font-size: clamp(14px, 1.15vw, 22px); letter-spacing: .12em;
  box-shadow: 0 3px 6px rgba(0, 0, 0, .25);
  transition: transform .3s var(--ease-out), box-shadow .3s;
}
.more-toggle::before {
  content: ""; position: absolute; inset: 3px; border-radius: inherit;
  border: 1.5px dashed rgba(255, 255, 255, .9); pointer-events: none;
}
.more-toggle:hover { transform: scale(1.06); box-shadow: 0 6px 12px rgba(0, 0, 0, .25); }
.more-toggle:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.more-toggle svg { width: 1.1em; height: 1.1em; transition: transform .45s var(--ease-out); }
.article-item.is-open .more-toggle svg { transform: scaleY(-1); }
.article-panel[hidden] { display: none; }
.article-panel.is-entering { animation: panelIn .6s var(--ease-out) both; }
@keyframes panelIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.paper h3 { margin: 1.6em 0 .2em; font-size: 1em; font-weight: 700; color: #111; }
.paper .lead-lines + p, .paper .lead-lines + h3 { margin-top: 1.1em; }
.paper ol { margin: 0 0 1em; padding-left: 1.4em; }
.paper .closing { font-weight: 700; color: #111; }
.article-foot {
  display: grid; grid-template-columns: 1fr 47%; gap: clamp(16px, 2vw, 40px);
  align-items: start; margin-top: 1.6em;
}
.article-foot.no-figure { grid-template-columns: 1fr; }
.tags { margin: 0; color: #3a7bd5; font-weight: 500; line-height: 1.62; }
.tags a { transition: color .25s; }
.tags a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.article-figure { margin: 0; }
.article-figure .sweep { border-radius: 2px; }
.article-figure img { width: 100%; }
.article-figure figcaption { margin-top: .5em; font-size: .58em; line-height: 1.7; color: #222; }

.eval-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: .6em 0 1.2em; font-size: .9em; line-height: 1.55; }
.eval-table th, .eval-table td { padding: .7em .8em; text-align: left; vertical-align: top; border-bottom: 1px solid #e4dccb; }
.eval-table thead th { background: #fff1c7; color: #5a3b00; font-weight: 900; }
.eval-table thead th:first-child { border-top-left-radius: 12px; }
.eval-table thead th:last-child { border-top-right-radius: 12px; }
.eval-table tbody th { font-weight: 700; color: #111; white-space: nowrap; }
.eval-table tbody tr { transition: background .25s; }
.eval-table tbody tr:hover { background: rgba(255, 241, 199, .55); }

/* =========================================================
   學習專區：10 大主題頁
   ========================================================= */
/* 文字標題「★ DINO AI 的學習奇幻之旅 ★」 */
.journey-heading {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center; gap: .45em;
  margin: 0 16px clamp(12px, 1.6vw, 30px);
  font-weight: 900; font-size: clamp(22px, 2.75vw, 53px); line-height: 1.25; letter-spacing: .03em;
  text-shadow:
    2px 0 0 #fff, -2px 0 0 #fff, 0 2px 0 #fff, 0 -2px 0 #fff,
    2px 2px 0 #fff, -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff,
    0 6px 14px rgba(29, 58, 143, .25);
}
.journey-heading .c-navy { color: #2747b8; font-family: var(--font-latin); font-weight: 600; }
.journey-heading .c-orange { color: var(--orange); }
.journey-heading .star { width: .72em; flex: none; animation: spinStar 6s linear infinite; }
.journey-heading .star:last-child { animation-direction: reverse; }

.banner-caption {
  margin: clamp(10px, 1.4vw, 26px) 0 clamp(2px, .4vw, 8px);
  text-align: center;
  font-weight: 700; font-size: clamp(16px, 2.15vw, 41px); letter-spacing: .06em; color: #111;
}

/* 主題頁：底部小路背景 */
.theme-page {
  padding-bottom: clamp(40px, 5.2vw, 100px);
  min-height: 72vw;
  border-radius: 0 0 clamp(14px, 1.4vw, 28px) clamp(14px, 1.4vw, 28px);
  margin-bottom: calc(-1 * clamp(14px, 1.4vw, 28px));
  z-index: 3;
}
.theme-page .path-bg {
  position: absolute; left: 0; bottom: 0; width: 100%; max-width: none;
  pointer-events: none; z-index: 0;
}
.theme-page + .site-footer { padding-top: calc(clamp(44px, 4.4vw, 90px) + clamp(14px, 1.4vw, 28px)); }

/* 單元卡片 */
.unit-grid {
  position: relative; z-index: 2;
  width: min(90vw, 1730px);
  margin: clamp(18px, 2.6vw, 50px) auto 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 2.6vw, 50px) clamp(12px, 2vw, 38px);
}
.unit-card {
  display: flex; flex-direction: column;
  padding: clamp(10px, 1.1vw, 21px) clamp(10px, 1.7vw, 32px) clamp(12px, 1.5vw, 28px);
  background: #fff;
  border-radius: clamp(12px, 1.4vw, 26px);
  box-shadow: 0 .8vw 1.6vw rgba(10, 50, 120, .2);
}
.unit-card.is-in { animation: floaty var(--fd, 5s) ease-in-out var(--fdel, 0s) infinite; }
.unit-card .thumb { border-radius: clamp(6px, .8vw, 14px); background: #e8eef8; }
.unit-card .thumb img { width: 100%; aspect-ratio: 1.76; object-fit: cover; }
.unit-card h3 {
  margin: clamp(8px, 1vw, 18px) 0 clamp(2px, .3vw, 6px);
  font-weight: 900; font-size: clamp(16px, 1.55vw, 30px); letter-spacing: .04em;
  color: var(--tc);
}
.unit-card p {
  margin: 0; flex: 1;
  font-weight: 700; font-size: clamp(13px, 1.22vw, 23px); line-height: 1.45; letter-spacing: .02em; color: #5a5a5a;
}
.unit-actions {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: clamp(14px, 2.2vw, 42px);
}
.unit-actions .more {
  display: block; width: clamp(104px, 10.4vw, 200px);
  transform-origin: 20% 50%;
  transform: scale(var(--ms, 1));
  transition: transform .25s var(--ease-out);
}
.unit-actions .more img { width: 100%; }
.unit-actions .dl {
  display: block; width: clamp(24px, 2.05vw, 40px);
  transition: transform .3s var(--ease-out);
}
.unit-actions .dl:hover { transform: scale(1.15); }
.unit-actions .dl img { width: 100%; }

/* 底部草地 */
.grass {
  position: relative; z-index: 1;
  margin-top: clamp(-40px, -2vw, -10px);
  pointer-events: none;
}
.grass img { width: 100%; }

/* 光線掃過（滑過圖片時） */
.sweep { position: relative; overflow: hidden; }
.sweep::after {
  content: ""; position: absolute; top: -10%; bottom: -10%; left: -75%; width: 45%;
  background: linear-gradient(100deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.15) 30%, rgba(255,255,255,.7) 50%, rgba(255,255,255,.15) 70%, rgba(255,255,255,0) 100%);
  transform: skewX(-18deg);
  pointer-events: none;
}
.sweep:hover::after, .sweep-host:hover .sweep::after { animation: sweep 1s var(--ease-out) forwards; }
@keyframes sweep { from { left: -75%; } to { left: 135%; } }

/* 圖片按鈕：滑過只放大＋光澤，不傾斜 */
.img-btn {
  position: relative; display: block;
  border-radius: 999px;
  transition: transform .35s var(--ease-out), filter .35s;
  filter: drop-shadow(0 6px 10px rgba(29, 58, 143, .18));
  overflow: hidden;
}
.img-btn img { width: 100%; }
.img-btn::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .65), transparent);
  transform: skewX(-20deg);
  transition: left .7s var(--ease-out);
}
.img-btn:hover { transform: scale(1.06); filter: drop-shadow(0 12px 18px rgba(29, 58, 143, .28)); }
.img-btn:hover::after { left: 130%; }
.img-btn:active { transform: scale(.97); }

/* 微微上下浮動（各自節奏由 JS 錯開） */
.floaty { animation: floaty var(--fd, 5s) ease-in-out var(--fdel, 0s) infinite; }
@keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }

/* =========================================================
   頁尾（Logo 固定不動）
   ========================================================= */
.site-footer {
  position: relative; z-index: 2;
  padding: clamp(44px, 4.4vw, 90px) 0 0;
  background: var(--footer);
  color: #fff;
}
.footer-inner {
  width: min(85.5vw, 1640px); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  padding: 0 0 clamp(22px, 2.4vw, 44px) 2%;
}
.footer-logo { flex: none; width: clamp(110px, 10vw, 200px); }
.footer-nav {
  display: grid; grid-template-columns: repeat(3, auto) auto;
  grid-auto-flow: column; grid-template-rows: repeat(2, auto);
  column-gap: clamp(28px, 3.6vw, 72px); row-gap: clamp(8px, .9vw, 18px);
  align-items: center;
  font-weight: 700; font-size: clamp(15px, 1.42vw, 27px); letter-spacing: .06em;
}
.footer-nav a { position: relative; }
.footer-nav > a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px; border-radius: 3px;
  background: var(--yellow); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease-out);
}
.footer-nav > a:hover::after { transform: scaleX(1); }
.follow-title { grid-row: 1; grid-column: 4; }
.socials { grid-row: 2; grid-column: 4; display: flex; gap: clamp(10px, 1vw, 20px); align-items: center; }
.socials a { display: grid; justify-items: center; transition: transform .35s var(--ease-out); }
.socials a:hover { transform: translateY(-4px); }
.socials svg { width: clamp(26px, 2.6vw, 50px); height: auto; }
.socials small { font-size: clamp(9px, .55vw, 11px); font-weight: 500; letter-spacing: 0; margin-top: -2px; }
.copyright {
  width: min(85.5vw, 1640px); margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, .55);
  text-align: center;
  padding: clamp(14px, 1.4vw, 26px) 0 clamp(18px, 1.8vw, 32px);
  font-size: clamp(12px, .9vw, 17px);
}

.to-top {
  position: fixed; right: clamp(14px, 2vw, 36px); bottom: clamp(14px, 2vw, 36px); z-index: 40;
  width: clamp(46px, 3.4vw, 60px); aspect-ratio: 1; border-radius: 50%;
  border: 3px solid #fff; background: var(--yellow); color: var(--navy); cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 8px 20px rgba(29, 58, 143, .3);
  opacity: 0; transform: translateY(20px) scale(.8); pointer-events: none;
  transition: opacity .4s, transform .45s var(--ease-out);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { transform: scale(1.08); }
.to-top svg { width: 46%; }

/* =========================================================
   響應式
   ========================================================= */
@media (max-width: 900px) {
  .site-header { padding: 10px 16px; }
  .menu-toggle {
    display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
    border: 2px solid #fff; background: var(--yellow); color: var(--navy); cursor: pointer;
    box-shadow: 0 6px 16px rgba(29, 58, 143, .25); position: relative; z-index: 2;
  }
  .menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
    display: block; width: 20px; height: 3px; border-radius: 3px; background: currentColor; position: relative;
    transition: transform .35s var(--ease-out), opacity .2s;
  }
  .menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
  .menu-toggle span::before { top: -7px; }
  .menu-toggle span::after { top: 7px; }
  .nav-open .menu-toggle span { background: transparent; }
  .nav-open .menu-toggle span::before { transform: translateY(7px) rotate(45deg); }
  .nav-open .menu-toggle span::after { transform: translateY(-7px) rotate(-45deg); }

  .nav {
    position: fixed; inset: 0; width: auto; z-index: 1;
    flex-direction: column; justify-content: center; gap: 8px;
    border-radius: 0; border: 0; padding: 80px 24px;
    background: rgba(253, 253, 235, .97);
    opacity: 0; pointer-events: none; transform: translateY(-12px);
    transition: opacity .35s, transform .45s var(--ease-out);
  }
  .nav-open .nav { opacity: 1; pointer-events: auto; transform: none; }
  /* 選單打開時拿掉導覽列的毛玻璃，選單才能鋪滿整個畫面 */
  /* 手機版導覽列不用毛玻璃（毛玻璃會把全螢幕選單限制在導覽列範圍內），改用不透明白底 */
  .site-header, .site-header.is-scrolled { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .site-header.is-scrolled { background: rgba(255, 255, 255, .96); }
  .nav-open .brand { position: relative; z-index: 2; }
  .nav-open .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: transparent; box-shadow: none; }
  .nav a { flex: none; width: min(320px, 80vw); font-size: 20px; padding: 14px 0; border-radius: 999px; }
  .nav a[aria-current="page"] { background: var(--yellow); }
  .nav-indicator { display: none; }

  .banner-frame, .content-board { width: calc(100% - 32px); }
  .unit-grid { width: calc(100% - 32px); grid-template-columns: repeat(2, 1fr); }
  .page-title-img { width: min(92vw, 560px); }
  .article-foot { grid-template-columns: 1fr; }
  .eval-table thead { display: none; }
  .eval-table, .eval-table tbody, .eval-table tr, .eval-table th, .eval-table td { display: block; width: 100%; }
  .eval-table tr { margin-bottom: 12px; border: 1px solid #e4dccb; border-radius: 12px; background: #fff; overflow: hidden; }
  .eval-table tbody th { background: #fff1c7; white-space: normal; }
  .eval-table td { border-bottom: 1px dashed #eee; }
  .eval-table td::before { content: attr(data-label); display: block; font-size: .8em; font-weight: 700; color: #8a6a1a; }

  .footer-inner { flex-direction: column; text-align: center; padding-left: 0; }
  .footer-nav { grid-auto-flow: row; grid-template-columns: repeat(3, auto); grid-template-rows: none; justify-content: center; }
  .follow-title { grid-row: 3; grid-column: 1 / -1; margin-top: 10px; }
  .socials { grid-row: 4; grid-column: 1 / -1; justify-content: center; }
}

@media (max-width: 600px) {
  .inner-page { background-size: 100% 1000px; }
  .content-board { padding: 16px 12px 22px; }
  .paper .lead-lines br { display: none; }
  .tab { letter-spacing: .12em; text-indent: .12em; min-width: 0; flex: 1; padding-left: .4em; padding-right: .4em; }
  .paper { padding: 16px 14px; }
}

/* 手機：主題頁單元卡改成一欄橫式卡片（左圖右文），「了解更多」與下載圖示放大 */
@media (max-width: 560px) {
  .unit-grid { grid-template-columns: 1fr; gap: 12px; }
  .unit-card {
    display: grid; grid-template-columns: 42% 1fr; grid-template-rows: auto auto 1fr;
    column-gap: 14px; align-items: start;
    padding: 12px; border-radius: 16px;
  }
  .unit-card .thumb { grid-row: 1 / span 3; align-self: center; border-radius: 10px; }
  .unit-card h3 { margin: 2px 0 4px; font-size: 18px; }
  .unit-card p { font-size: 14px; line-height: 1.55; }
  .unit-actions { grid-column: 2; margin-top: 10px; gap: 10px; justify-content: flex-start; align-self: end; }
  .unit-actions .more { width: 132px; }
  .unit-actions .dl { width: 36px; }
}

/* =========================================================
   APP大選單下載（與首頁同款：黃底白框、內側白虛線、咖啡色字＋箭頭圓）
   ========================================================= */
.menu-btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .6em .6em .6em 1.3em;
  background: #ffce00; color: #663418;
  border: .16em solid #fff; border-radius: 999px;
  font-weight: 900; letter-spacing: .05em; line-height: 1; white-space: nowrap; text-decoration: none;
  box-shadow: 0 .3em .8em rgba(0, 0, 0, .18);
  animation: menuPulse 2.4s ease-in-out infinite;
  transition: scale .45s var(--ease-spring);
}
.menu-btn::before {
  content: ""; position: absolute; inset: .2em; z-index: -1;
  border: .09em dashed rgba(255, 255, 255, .95); border-radius: inherit; pointer-events: none;
}
.menu-btn::after {
  content: ""; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 35%;
  background: linear-gradient(100deg, rgba(255,255,255,0), rgba(255,255,255,.75), rgba(255,255,255,0));
  transform: skewX(-18deg); pointer-events: none;
}
.menu-btn:hover { scale: 1.06; animation-play-state: paused; }
.menu-btn:hover::after { animation: menuSweep .9s var(--ease-out) forwards; }
.menu-btn b { font-size: 1.22em; font-weight: 900; margin: 0 .04em; }
.menu-btn .go { flex: none; display: grid; place-items: center; width: 1.75em; height: 1.75em; margin-left: .15em; border-radius: 50%; background: #663418; }
.menu-btn .go svg { width: 52%; height: 52%; color: #fff; }
@keyframes menuSweep { from { left: -60%; } to { left: 130%; } }
@keyframes menuPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 206, 0, .65), 0 .3em .8em rgba(0, 0, 0, .18); }
  60% { box-shadow: 0 0 0 .75em rgba(255, 206, 0, 0), 0 .3em .8em rgba(0, 0, 0, .18); }
}

/* 週報：沒有文章時的提示 */
.article-empty { margin: 0; padding: 30px 0; text-align: center; font-weight: 700; color: #36508a; }

/* 主題頁：課程資料載入中／沒有課程時的提示 */
.unit-empty { grid-column: 1 / -1; margin: 0; padding: 28px 16px; text-align: center; font-weight: 700; color: #36508a; background: rgba(255,255,255,.85); border-radius: 18px; }

/* 主題頁：橫幅下方的「需先安裝 APP大選單」提示 */
.menu-hint {
  position: relative; z-index: 2;
  width: fit-content; max-width: min(90vw, 1720px);
  margin: clamp(14px, 1.6vw, 30px) auto 0;
  display: flex; align-items: center; gap: .9em;
  padding: .5em .55em .5em 1.2em;
  font-size: clamp(15px, 1.05vw, 20px);
  background: rgba(255, 255, 255, .95);
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(10, 50, 120, .18);
}
.menu-hint p { margin: 0; font-weight: 700; color: #663418; }
.menu-hint .tag { display: inline-block; margin-right: .6em; padding: .25em .7em; border-radius: 999px; background: var(--orange, #f08a1c); color: #fff; font-size: .9em; font-weight: 900; letter-spacing: .08em; vertical-align: .08em; }
.menu-hint p em { font-style: normal; color: #e9591a; white-space: nowrap; }
.menu-hint .menu-btn { font-size: 1.12em; }
@media (max-width: 560px) {
  .menu-hint { width: calc(100% - 32px); flex-direction: column; gap: 10px; padding: 14px; border-radius: 20px; text-align: center; font-size: 15px; }
  .menu-hint .menu-btn { width: 100%; font-size: 18px; padding-block: .7em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
