/* 啥課網站。色票、圓角照 app 的 DESIGN.md：「啥」字藍只給點得下去的東西，
   底下鋪一層天光色暈，內容像貼在玻璃上的便利貼。 */

:root {
  --ink: #1259E6;
  --ink-small: #1259E6;          /* 小字用的藍：深色模式要更亮才有 4.5:1 */
  --ink-fill: #1259E6;
  --ink-fill-hover: #0E4AC2;
  --ink-soft: rgba(18, 89, 230, 0.10);
  --spark: #FDCA22;
  --text: #10141F;
  --text-2: #55576A;
  --bg: #F2F4FA;
  --line: rgba(16, 20, 31, 0.09);
  --surface: rgba(255, 255, 255, 0.66);
  --surface-strong: rgba(255, 255, 255, 0.86);
  /* 卡片的立體感只宣告一次：淺色用陰影，深色用一圈細線 */
  --lift: 0 1px 2px rgba(16, 20, 31, 0.04), 0 18px 40px -20px rgba(18, 40, 90, 0.25);
  --device-shadow: 0 50px 80px -40px rgba(18, 40, 90, 0.45);
  --in-class: #11612B;
  --in-class-tint: rgba(52, 199, 89, 0.30);
  --up-next: #864000;
  --danger: #C8261C;
  --busy: rgba(16, 20, 31, 0.065);
  --glow-1: rgba(55, 115, 237, 0.22);
  --glow-2: rgba(127, 182, 240, 0.24);
  --glow-3: rgba(246, 201, 168, 0.32);

  --r-stage: 32px;
  --r-card: 24px;
  --r-inner: 14px;
  --r-cell: 8px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

  --font: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --font-num: ui-rounded, -apple-system, "PingFang TC", sans-serif;

  color-scheme: light dark;
  accent-color: var(--ink);
  scrollbar-color: color-mix(in srgb, var(--text) 25%, transparent) transparent;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #3D7EFF;
    --ink-small: #6A9BFF;
    --ink-fill: #2F6BEB;
    --ink-fill-hover: #2559D0;
    --ink-soft: rgba(61, 126, 255, 0.16);
    --text: #F2F3F7;
    --text-2: #A3A3AE;
    --bg: #05070D;
    --line: rgba(255, 255, 255, 0.09);
    --surface: rgba(30, 32, 40, 0.62);
    --surface-strong: rgba(36, 38, 48, 0.9);
    --lift: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
    --device-shadow: 0 50px 80px -40px rgba(0, 0, 0, 0.9);
    --in-class: #3DDC72;
    --up-next: #FFB340;
    --danger: #FF6961;
    --busy: rgba(255, 255, 255, 0.07);
    --glow-1: rgba(37, 77, 157, 0.42);
    --glow-2: rgba(28, 90, 140, 0.26);
    --glow-3: rgba(37, 77, 157, 0.12);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  caret-color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
::selection { background: color-mix(in srgb, var(--ink) 24%, transparent); }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 {
  margin: 0; line-height: 1.18; letter-spacing: 0.01em; text-wrap: balance;
  font-feature-settings: "palt"; /* 中文標點收窄 */
}
p, li { margin: 0; text-wrap: pretty; }
figure { margin: 0; }
[id] { scroll-margin-top: 80px; }
a, button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
.pill:focus-visible { outline-offset: 4px; border-radius: 999px; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
/* 標題一行一行排，行內不斷開（中文不會在「課表」中間斷掉） */
h1 .line, h2 .line, h3 .line { display: inline-block; }
.nb { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.icon { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 30;
  padding: 10px 18px; border-radius: 999px; background: var(--ink-fill); color: #fff; font-weight: 600;
}
.skip:focus { top: 12px; }

/* 天光色暈 */
.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.sky i { position: absolute; border-radius: 50%; filter: blur(110px); }
.sky i:nth-child(1) { width: 760px; height: 760px; left: -260px; top: -340px; background: var(--glow-1); }
.sky i:nth-child(2) { width: 620px; height: 620px; right: -220px; top: 120px; background: var(--glow-2); }
.sky i:nth-child(3) { width: 700px; height: 700px; left: 10%; bottom: -400px; background: var(--glow-3); }

/* 頂端：捲動後才變玻璃 */
.top { position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top); transition: background .3s, box-shadow .3s; }
.top.scrolled {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(1.7);
  backdrop-filter: blur(20px) saturate(1.7);
  box-shadow: 0 1px 0 var(--line);
}
.top-inner {
  max-width: 1160px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px max(24px, env(safe-area-inset-right)) 10px max(24px, env(safe-area-inset-left));
}
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; font-size: 18px; letter-spacing: 0.04em; white-space: nowrap; }
.brand img { border-radius: var(--r-cell); }
.top nav { display: flex; align-items: center; gap: 14px; font-size: 15px; color: var(--text-2); }
.top nav a { white-space: nowrap; }
.top nav a:not(.pill) { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding-inline: 8px; /* 兩個字的連結也有 44pt 點擊範圍 */ transition: color .2s; }
.top nav a:not(.pill):hover, .top nav a[aria-current] { color: var(--text); }
.top nav a[aria-current="location"] { background: linear-gradient(var(--ink), var(--ink)) bottom / 100% 2px no-repeat content-box; } /* 底線只畫在字下面，不含左右點擊範圍 */

.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 26px 0 30px;
  border-radius: 999px;
  background: var(--ink-fill); color: #fff;
  font-weight: 600; font-size: 17px; letter-spacing: 0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 10px 24px -12px rgba(16, 20, 31, 0.45);
  transition: background .2s, transform .2s var(--ease-out);
}
.pill .icon { width: 18px; height: 18px; transition: transform .25s var(--ease-out); }
.pill:hover { background: var(--ink-fill-hover); }
.pill:hover .icon { transform: translateX(3px); }
.pill:active { transform: scale(0.97); }
.top nav .pill-small { min-height: 44px; padding: 0 20px; font-size: 15px; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22); }

main { max-width: 1160px; margin: 0 auto; padding: 0 max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left)); }

.lede { font-size: 19px; color: var(--text-2); max-width: 31em; }
.note { font-size: 14px; color: var(--text-2); }
.ink { color: var(--ink); }

/* ── 開場 ── */
.hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 48px;
  padding: 48px 0 64px; min-height: min(860px, calc(100vh - 64px));
}
.hero h1 { font-size: clamp(46px, 6.6vw, 84px); font-weight: 700; line-height: 1.1; letter-spacing: 0.02em; margin-bottom: 28px; }
.hero .lede { max-width: 25em; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 40px; }
.facts { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 14px; color: var(--text-2); }
.facts li { display: flex; align-items: center; gap: 8px; }
.facts li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .6; }

.hero-visual { justify-self: center; }

/* 手機：鈦金屬邊＋黑色螢幕框＋動態島 */
.phone {
  --w: 330px;
  position: relative;
  width: var(--w); padding: calc(var(--w) * 0.012);
  border-radius: calc(var(--w) * 0.175);
  background: linear-gradient(145deg, #5B5E66 0%, #2A2C31 22%, #1A1B1F 50%, #3C3E44 78%, #6A6D75 100%);
  box-shadow: var(--device-shadow);
}
.phone::before, .phone::after { /* 側鍵 */
  content: ""; position: absolute; width: 3px; border-radius: 2px; background: #3A3C42;
}
.phone::before { left: -2px; top: 22%; height: 9%; box-shadow: 0 calc(var(--w) * 0.2) 0 #3A3C42; }
.phone::after { right: -2px; top: 28%; height: 13%; }
.screen {
  position: relative; overflow: hidden;
  padding: calc(var(--w) * 0.022);
  border-radius: calc(var(--w) * 0.163);
  background: #000;
}
.screen img { border-radius: calc(var(--w) * 0.142); width: 100%; }
.screen::after { /* 動態島 */
  content: ""; position: absolute; left: 50%; transform: translateX(-50%); z-index: 2;
  top: calc(var(--w) * 0.048); width: 30%; height: calc(var(--w) * 0.088);
  border-radius: 999px; background: #000;
}
@media (prefers-color-scheme: dark) {
  .screen img { filter: brightness(0.9); } /* 淺色截圖在深色頁面上壓一點亮度 */
}

/* 鎖定畫面：用 HTML 畫，數字跟今天頁截圖是同一個時刻（週四 10:38）。
   字放在深一點的半透明底上，最小 11px，對比過 4.5:1 */
.lock {
  --lk-ink: #18214A; /* 淺色桌布上的字：深藍，不用純黑 */
  container-type: inline-size;
  aspect-ratio: 1320 / 2868;
  padding: 0; border: calc(var(--w) * 0.022) solid #000; box-sizing: content-box;
  width: calc(var(--w) * 0.932);
  color: var(--lk-ink); text-align: center;
  /* 淺色柔和的抽象桌布（自己畫的，不用 Apple 的桌布檔）：上淡藍、中淡紫、下淡桃 */
  background:
    radial-gradient(70% 34% at 85% 18%, rgba(196, 214, 255, 0.95), transparent 70%),
    radial-gradient(80% 40% at 10% 48%, rgba(214, 200, 255, 0.85), transparent 70%),
    radial-gradient(75% 36% at 90% 72%, rgba(255, 205, 222, 0.9), transparent 70%),
    radial-gradient(80% 34% at 20% 96%, rgba(255, 218, 190, 0.95), transparent 70%),
    linear-gradient(180deg, #DCE6FF 0%, #E6DEFF 45%, #FBE1EA 78%, #FFE8D6 100%);
  background-clip: padding-box;
  border-radius: calc(var(--w) * 0.163);
}
.lock::after { top: calc(var(--w) * 0.026); }
.lock::before { /* 開場「抬手喚醒」用的黑幕，平常是透明的 */
  content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit;
  background: #000; opacity: 0; pointer-events: none;
}
.lk-date { padding-top: 21cqw; font-size: max(12px, 4.6cqw); font-weight: 600; letter-spacing: .02em; }
.lk-time { font-size: 25cqw; font-weight: 700; line-height: 1; margin-top: .5cqw; letter-spacing: -.01em; }
.lk-widgets { width: 88%; margin: 6cqw auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 3cqw; text-align: left; }
/* 卡片用半透明白，不用毛玻璃：Safari 在動畫中的毛玻璃上會把文字畫出方塊 */
.lk-w {
  display: flex; flex-direction: column; padding: 2.8cqw 3.6cqw; border-radius: 5cqw;
  background: rgba(255, 255, 255, 0.5); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  font-size: max(11px, 3.4cqw); line-height: 1.35; white-space: nowrap;
}
.lk-w-head { display: flex; align-items: center; gap: 1.4cqw; font-weight: 600; }
.lk-w b { font-size: max(13px, 4.8cqw); margin: .6cqw 0 .2cqw; }
.lk-w > span:last-child { color: #3E4568; }
.lk-dot { width: 1.8cqw; height: 1.8cqw; border-radius: 50%; background: var(--lk-ink); flex: none; }
.lk-star { width: max(10px, 3cqw); height: max(10px, 3cqw); fill: #C8261C; flex: none; }
.lk-live {
  position: absolute; left: 4cqw; right: 4cqw; bottom: 22cqw;
  padding: 4.4cqw 5cqw 4.8cqw; border-radius: 8cqw; text-align: left;
  background: rgba(255, 255, 255, 0.78); color: #10141F;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 8px 24px -12px rgba(40, 30, 90, 0.25);
  line-height: 1.25;
}
.lk-live-row { display: flex; justify-content: space-between; align-items: baseline; }
.lk-status { display: flex; align-items: center; gap: 1.6cqw; font-size: max(11px, 3.6cqw); font-weight: 600; color: #11612B; }
.lk-status i { width: 1.9cqw; height: 1.9cqw; border-radius: 50%; background: #1F9D47; }
.lk-left { font-size: max(11px, 3.4cqw); color: #55576A; }
.lk-left b { font-size: 7.4cqw; font-weight: 600; margin-left: .6cqw; color: #10141F; }
.lk-title { font-size: max(14px, 5.8cqw); font-weight: 700; margin: 1.2cqw 0 3.2cqw; }
.lk-bar { height: 1.4cqw; border-radius: 999px; background: rgba(16, 20, 31, 0.1); overflow: hidden; }
.lk-bar i { display: block; width: 16%; height: 100%; border-radius: inherit; background: #1F9D47; }
.lk-meta { font-size: max(11px, 3.3cqw); color: #55576A; margin-top: 2.4cqw; }
.lk-bottom { position: absolute; left: 9cqw; right: 9cqw; bottom: 8cqw; display: flex; justify-content: space-between; }
.lk-bottom i { width: 11.5cqw; height: 11.5cqw; border-radius: 50%; background: rgba(255, 255, 255, 0.55); }
.lk-bottom::after { content: ""; position: absolute; left: 50%; bottom: -5.4cqw; transform: translateX(-50%); width: 34%; height: 1.2cqw; border-radius: 999px; background: var(--lk-ink); opacity: .7; }

/* ── 學校：一句話，不做成一排校名 ── */
.schools { max-width: 40em; margin: 0 auto; padding: 0 0 64px; text-align: center; }
.schools-head { font-size: 15px; font-weight: 600; color: var(--text); margin: 0 0 12px; }
.school-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.school-tags li { padding: 6px 14px; border-radius: 999px; background: var(--surface-strong); box-shadow: var(--lift); font-size: 15px; font-weight: 600; color: var(--ink-small); }
.schools-note { margin: 12px 0 0; font-size: 14px; color: var(--text-2); text-wrap: balance; }

/* ── 一天的時間軸 ── */
.day { padding: 32px 0 48px; }
.day-title, .setup-title { font-size: clamp(30px, 3.8vw, 44px); font-weight: 700; margin-bottom: 40px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
/* 左邊一條時間線，時刻掛在線上 */
.timeline::before {
  content: ""; position: absolute; left: 47px; top: 18px; bottom: 18px; width: 2px; border-radius: 1px;
  background: linear-gradient(var(--line), color-mix(in srgb, var(--ink) 35%, transparent) 50%, var(--line));
}
.moment {
  position: relative; display: grid; grid-template-columns: 96px minmax(0, 0.85fr) minmax(0, 1.15fr);
  column-gap: 40px; align-items: start; padding: 28px 0;
}
/* 文字跟時刻同一高度起頭，畫面在右邊自己撐開 */
.moment-copy { padding-top: 2px; }
.clock {
  align-self: start; position: relative; z-index: 1; margin-top: 2px;
  display: inline-flex; justify-content: center; width: 96px; padding: 6px 0; border-radius: 999px;
  font-size: 20px; font-weight: 600; letter-spacing: .01em;
  background: var(--surface-strong); box-shadow: var(--lift); color: var(--text);
}
.moment-copy { max-width: 26em; }
.moment h3 { font-size: clamp(26px, 2.8vw, 34px); font-weight: 700; margin-bottom: 16px; }
.moment-copy > p:not(.note) { color: var(--text-2); font-size: 17px; }
.moment-copy > .note { margin-top: 14px; }

.stage {
  position: relative; overflow: hidden; container-type: inline-size;
  height: 440px;
  border-radius: var(--r-stage);
  background:
    radial-gradient(80% 70% at 15% 0%, var(--t1), transparent 70%),
    radial-gradient(80% 80% at 100% 100%, var(--t2), transparent 70%),
    color-mix(in srgb, var(--t1) 40%, var(--t2));
  display: flex; justify-content: center;
}
/* 手機寬度用 cqi：--w 會拿去算外框、螢幕內距、動態島，百分比在不同屬性裡的基準不一樣 */
.stage .phone { --w: min(270px, 62cqi); margin-top: 36px; height: fit-content; }
@media (prefers-color-scheme: dark) {
  .stage {
    background:
      radial-gradient(80% 70% at 15% 0%, var(--d1), transparent 70%),
      radial-gradient(80% 80% at 100% 100%, var(--d2), transparent 70%),
      #0D0F16;
    box-shadow: var(--lift);
  }
}

/* 12:10 共同空堂 */
.friends-visual { position: relative; width: 100%; max-width: 480px; justify-self: center; padding-bottom: 104px; } /* 邀請卡只疊到空堂表的下內距，不蓋圖例 */
.freegrid {
  padding: 24px; border-radius: var(--r-card);
  background: var(--surface); box-shadow: var(--lift);
  -webkit-backdrop-filter: blur(24px) saturate(1.7); backdrop-filter: blur(24px) saturate(1.7);
}
.fg-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.fg-title { font-weight: 700; }
.fg-count { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--in-class); }
.avatars { display: flex; }
.avatars b {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; color: #10141F;
  background: var(--c); box-shadow: 0 0 0 2px var(--bg); margin-left: -8px;
}
.avatars b:first-child { margin-left: 0; }
.fg { display: grid; grid-template-columns: 22px repeat(5, 1fr); gap: 5px; }
.fg-day { text-align: center; font-size: 13px; color: var(--text-2); }
.fg-p { font-size: 12px; color: var(--text-2); display: grid; place-items: center; }
.fg i { height: 26px; border-radius: var(--r-cell); background: var(--busy); }
.fg i.free, .sw-free { background: var(--in-class-tint); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--in-class) 60%, transparent); }
/* 整頁唯一的動畫：一開始跟忙碌的格子一樣，捲到時大家都有空的格子依序亮成綠色 */
.armed .fg i.free { background: var(--busy); box-shadow: none; transition: background .5s var(--ease-out), box-shadow .5s var(--ease-out); transition-delay: calc(250ms + var(--i) * 30ms); }
.armed.lit .fg i.free { background: var(--in-class-tint); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--in-class) 60%, transparent); animation: pop .6s var(--ease-out) both; animation-delay: calc(250ms + var(--i) * 30ms); }
@keyframes pop { 0% { transform: scale(.82); } 100% { transform: scale(1); } }
.fg-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; font-size: 13px; color: var(--text-2); }
.fg-foot span { display: flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sw-busy { background: var(--busy); box-shadow: inset 0 0 0 1px var(--line); }
.fg i.some, .sw-some { background: color-mix(in srgb, var(--in-class-tint) 30%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--in-class) 22%, transparent); }
.invite {
  position: absolute; right: -32px; bottom: 0;
  display: grid; gap: 2px; padding: 16px 18px; width: 220px; line-height: 1.4;
  background: var(--surface-strong); border-radius: var(--r-card); box-shadow: var(--lift);
  -webkit-backdrop-filter: blur(24px) saturate(1.7); backdrop-filter: blur(24px) saturate(1.7);
}
.inv-label { font-size: 12px; font-weight: 600; color: var(--ink-small); letter-spacing: 0.04em; }
.invite b { font-size: 17px; }
.inv-meta { font-size: 13px; color: var(--text-2); }
.inv-replies { display: flex; align-items: center; gap: 14px; margin-top: 8px; font-size: 13px; }
.inv-replies > span { display: inline-flex; align-items: center; gap: 6px; }
.inv-replies .ok { width: 7px; height: 7px; border-radius: 50%; background: var(--in-class); }

/* 15:05 手錶＋動態島：用 HTML 畫（手錶模擬器的時鐘改不了，拍不到白天） */
.wrist {
  display: flex; align-items: center; justify-content: center; gap: 36px; flex-wrap: wrap;
  min-height: 360px; padding: 40px 24px; border-radius: var(--r-stage);
  background:
    radial-gradient(80% 70% at 15% 0%, var(--t1), transparent 70%),
    radial-gradient(80% 80% at 100% 100%, var(--t2), transparent 70%),
    color-mix(in srgb, var(--t1) 40%, var(--t2));
}
@media (prefers-color-scheme: dark) {
  .wrist {
    background:
      radial-gradient(60% 60% at 40% 45%, rgba(61, 126, 255, 0.22), transparent 70%),
      radial-gradient(80% 70% at 15% 0%, var(--d1), transparent 70%),
      radial-gradient(80% 80% at 100% 100%, var(--d2), transparent 70%),
      #0D0F16;
    box-shadow: var(--lift);
  }
}
.watch { width: 196px; flex: none; }
.watch-screen {
  aspect-ratio: 416 / 496; padding: 16px 16px 18px; border-radius: 52px; background: #000; color: #fff;
  box-shadow: 0 0 0 6px #2A2C31, 0 0 0 7px #55585F, var(--device-shadow);
  display: flex; flex-direction: column; line-height: 1.3;
}
.wt-time { align-self: flex-end; font-size: 15px; font-weight: 600; margin: 2px 10px 14px 0; }
.wt-row { display: flex; justify-content: space-between; font-size: 13px; }
.wt-status { display: flex; align-items: center; gap: 5px; color: #3DDC72; font-weight: 600; }
.wt-status i { width: 6px; height: 6px; border-radius: 50%; background: #3DDC72; }
.wt-left { color: #A3A3AE; }
.wt-bar { height: 4px; margin: 8px 0 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); overflow: hidden; }
.wt-bar i { display: block; height: 100%; width: 58%; background: #8FB6FF; border-radius: inherit; }
.wt-title { font-size: 19px; margin-bottom: 4px; }
.wt-meta { font-size: 13px; color: #A3A3AE; }
.island {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; min-width: 210px;
  padding: 12px 18px; border-radius: 999px; background: #000; color: #fff; font-size: 15px; font-weight: 600;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), var(--device-shadow);
}
.is-l { display: flex; align-items: center; gap: 8px; }
.is-l i { width: 8px; height: 8px; border-radius: 50%; background: #3DDC72; }
.is-r { color: #3DDC72; }

/* 22:51 主畫面：用 HTML 畫，小工具的字照 app 的寫法（DayDoneText、份未完成）。
   放在手機裡才有「睡前」的情境；小工具是淺色樣式，深淺色頁面都一樣 */
.home {
  container-type: inline-size;
  aspect-ratio: 1320 / 2868;
  /* 自己的內距不能用 cqw（會拿外面舞台的寬度算），照手機寬度算 */
  padding: calc(var(--w) * 0.15) calc(var(--w) * 0.045) 0; border: calc(var(--w) * 0.022) solid #000; box-sizing: content-box;
  width: calc(var(--w) * 0.842); /* 0.932 扣掉左右內距，才不會比機身寬 */
  background:
    radial-gradient(70% 40% at 85% 20%, rgba(246, 201, 168, 0.28), transparent 70%),
    radial-gradient(80% 50% at 10% 70%, rgba(55, 115, 237, 0.35), transparent 70%),
    linear-gradient(170deg, #1B2440 0%, #101731 60%, #0A0E1E 100%);
  background-clip: padding-box;
  border-radius: calc(var(--w) * 0.163);
}
.home::after { top: calc(var(--w) * 0.026); }
.hm-status { position: absolute; top: 5cqw; left: 11cqw; line-height: 1; color: #fff; font-size: max(11px, 4.4cqw); font-weight: 600; }
.widget {
  margin-bottom: 4cqw; padding: 4.2cqw 4.8cqw; border-radius: 7cqw;
  background: rgba(255, 255, 255, 0.95); color: #10141F; line-height: 1.4;
}
.w-done { font-size: max(12px, 4.8cqw); font-weight: 700; margin-bottom: 1.6cqw; }
.w-line { font-size: max(11px, 3.8cqw); font-weight: 600; }
.w-dim, .w-detail { color: #55576A; font-weight: 400; }
.w-exam { display: flex; align-items: center; gap: 1.6cqw; margin-top: 2.4cqw; padding-top: 2.4cqw; border-top: 1px solid rgba(16, 20, 31, 0.09); font-size: max(11px, 3.6cqw); }
.w-star { width: max(10px, 3.6cqw); height: max(10px, 3.6cqw); fill: #C8261C; flex: none; }
.w-due { margin-left: auto; font-weight: 600; color: #C8261C; }
.w-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2cqw; }
.w-title { font-size: max(12px, 4cqw); font-weight: 700; }
.w-detail { font-size: max(11px, 3.4cqw); }
.w-tasks ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.8cqw; }
.w-tasks li { display: grid; grid-template-columns: 4cqw minmax(0, 1fr) auto; align-items: center; column-gap: 2.4cqw; font-size: max(11px, 3.6cqw); white-space: nowrap; }
/* 勾選框外框是課程色壓暗到對白 3:1（照 Color.mark） */
.w-tasks li i { width: 4cqw; height: 4cqw; border-radius: 1cqw; box-shadow: inset 0 0 0 2px var(--c); }
.w-tasks li span { font-size: max(11px, 3.4cqw); color: #55576A; }
.w-tasks li .w-urgent { color: #864000; font-weight: 600; }
.w-tasks li i { position: relative; transition: background .25s, box-shadow .25s; }
.w-tasks li b, .w-tasks li span { transition: color .4s; }
.w-tasks li.done i { background: var(--c); box-shadow: none; animation: tick .45s var(--ease-spring); }
.w-tasks li.done i::after { content: ""; position: absolute; left: 34%; top: 14%; width: 26%; height: 50%; border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.w-tasks li.done b, .w-tasks li.done span { color: #8A8C99; font-weight: 400; }
.w-tasks li.done b { text-decoration: line-through; }
@keyframes tick { from { transform: scale(.5); } }
.w-tasks li b { overflow: hidden; text-overflow: ellipsis; } /* 很窄的螢幕上字有最小字級，課名截掉也不撐破小工具 */
.stage.stage-home .phone { --w: min(360px, 78cqi); margin-top: 28px; } /* 比手機版的 .stage .phone 優先 */
.hm-icons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6cqw; padding: 2cqw 4cqw; }
.hm-icons img, .hm-icons i { width: 100%; aspect-ratio: 1; border-radius: 23%; }
.hm-icons i { background: rgba(255, 255, 255, 0.16); }

.ticks { list-style: none; margin: 24px 0 0; padding: 20px 0 0; display: grid; gap: 12px; border-top: 1px solid var(--line); }
.ticks li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; }
.ticks .icon {
  width: 22px; height: 22px; padding: 4px; margin-top: 2px; border-radius: 50%;
  background: var(--ink-soft); color: var(--ink); stroke-width: 3;
}

/* ── 開學第一週：三張卡，截圖放大局部，看得清楚 ── */
.setup { padding: 64px 0 32px; }
.setup-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; align-items: stretch; }
.setup-import { grid-row: span 2; }
.setup-import .zoom { flex: 1; display: grid; align-content: center; padding-bottom: 24px; } /* 比右邊兩張矮時，底板撐滿，不在文字下留白 */
.setup-import .sim { margin-bottom: 0; }
.setup-card {
  display: flex; flex-direction: column; border-radius: var(--r-stage); overflow: hidden;
  background: var(--surface-strong); box-shadow: var(--lift);
  /* 裡面有截圖，不加毛玻璃：大面積的 backdrop-filter 會讓截圖慢一拍才畫出來 */
}
.setup-copy { padding: 28px 28px 20px; }
.setup-copy h3 { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.setup-copy > p { color: var(--text-2); font-size: 15px; }
.zoom {
  margin-top: auto; padding: 24px 22px 0;
  background:
    radial-gradient(80% 70% at 15% 0%, var(--t1), transparent 70%),
    radial-gradient(80% 80% at 100% 100%, var(--t2), transparent 70%),
    color-mix(in srgb, var(--t1) 40%, var(--t2));
}
@media (prefers-color-scheme: dark) {
  .zoom {
    background:
      radial-gradient(80% 70% at 15% 0%, var(--d1), transparent 70%),
      radial-gradient(80% 80% at 100% 100%, var(--d2), transparent 70%),
      #0D0F16;
  }
}

/* 開學那段的模擬畫面：用 HTML 照示範資料畫，任何寬度都清楚，捲到時跑一次 */
.sim {
  --sim-bg: #FFFFFF; --sim-line: rgba(16, 20, 31, 0.08); --sim-dim: #55576A;
  max-width: 400px; margin: 0 auto 24px; padding: 14px; border-radius: 20px;
  background: var(--sim-bg); color: var(--text); line-height: 1.35;
  box-shadow: 0 1px 2px rgba(16, 20, 31, 0.05), 0 20px 40px -24px rgba(18, 40, 90, 0.35);
}
@media (prefers-color-scheme: dark) {
  .sim { --sim-bg: #1C1D24; --sim-line: rgba(255, 255, 255, 0.08); --sim-dim: #A3A3AE; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
}

/* 匯入確認頁 */
.im-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin: 0 0 10px; font-size: 14px; }
.im-bar span:first-child { justify-self: start; padding: 3px 12px; border-radius: 999px; background: var(--busy); font-size: 13px; }
.sim-import ul { list-style: none; margin: 0; padding: 0; }
.sim-import li { display: grid; grid-template-columns: 22px 1fr 8px; column-gap: 10px; align-items: center; padding: 9px 2px; }
.sim-import li + li { border-top: 1px solid var(--sim-line); }
.im-check { width: 20px; height: 20px; border-radius: 50%; position: relative; box-shadow: inset 0 0 0 1.5px var(--sim-dim); }
.on .im-check { background: var(--ink-fill); box-shadow: none; }
.on .im-check::after {
  content: ""; position: absolute; left: 7px; top: 4px; width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.im-body { display: grid; gap: 1px; min-width: 0; }
.im-body b { font-size: 14px; display: flex; align-items: center; gap: 6px; }
.im-body > span { font-size: 11.5px; color: var(--sim-dim); }
.clash { font-style: normal; font-size: 11px; font-weight: 600; padding: 0 6px; border-radius: 6px; color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, transparent); }
.im-chev { width: 7px; height: 7px; border: solid var(--sim-dim); border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); opacity: .6; }
.im-more { margin: 4px 0 10px; font-size: 12px; color: var(--sim-dim); text-align: center; }
.im-add { width: fit-content; margin: 0 auto; padding: 7px 20px; border-radius: 999px; background: color-mix(in srgb, var(--ink-fill) 14%, var(--sim-bg)); color: var(--ink-small); font-size: 13px; font-weight: 600; text-align: center; } /* 畫面裡的按鈕，刻意不像頁面上真的下載鈕 */
.im-more-narrow { display: none; }

/* 週課表 */
.tt-grid {
  position: relative; display: grid; grid-template-columns: 34px repeat(5, 1fr);
  grid-template-rows: 38px repeat(8, 32px); column-gap: 4px; row-gap: 3px;
}
.tt-today { grid-column: 5; grid-row: 1 / -1; border-radius: 10px; background: color-mix(in srgb, var(--ink) 9%, transparent); }
.tt-h { grid-column: calc(var(--d) + 1); grid-row: 1; display: grid; justify-items: center; font-size: 12px; font-weight: 600; line-height: 1.2; }
.tt-h i { font-style: normal; font-size: 11px; font-weight: 400; color: var(--sim-dim); }
.tt-h.today i { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--ink-fill); color: #fff; font-weight: 600; }
.tt-p { grid-column: 1; grid-row: calc(var(--a) + 1); display: grid; align-content: center; justify-items: center; font-size: 12px; font-weight: 600; line-height: 1.1; }
.tt-p i { font-style: normal; font-size: 9px; font-weight: 400; color: var(--sim-dim); }
.tt-b {
  grid-column: calc(var(--d) + 1); grid-row: calc(var(--a) + 1) / calc(var(--b) + 2);
  display: grid; align-content: center; justify-items: center; text-align: center;
  padding: 2px; border-radius: 8px; background: var(--c); color: #10141F;
  font-size: 10px; line-height: 1.2; overflow: hidden;
}
.tt-b { word-break: keep-all; } /* 教室名在 <wbr> 處換行，不拆成單字 */
.tt-b b { font-size: 11px; white-space: nowrap; }

/* 月曆 */
.cm-title { display: flex; justify-content: space-between; align-items: center; margin: 2px 4px 10px; font-size: 16px; }
.cm-nav { display: flex; gap: 14px; color: var(--sim-dim); }
.cm-nav .icon { width: 16px; height: 16px; }
.cm-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 4px; text-align: center; }
.cm-w { font-size: 11px; color: var(--sim-dim); padding-bottom: 4px; }
.cm-d { display: grid; justify-items: center; gap: 2px; }
.cm-d b { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-size: 13px; font-weight: 500; }
.cm-d.today b { background: var(--ink-fill); color: #fff; font-weight: 700; }
.cm-m { display: flex; gap: 3px; height: 11px; align-items: center; }
.cm-sq { width: 7px; height: 7px; border-radius: 2px; background: var(--up-next); }
.cm-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.cm-star { width: 11px; height: 11px; fill: var(--danger); }

/* 月曆圖例：跟 app 同一套形狀 */
.legend { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 15px; }
.legend li { display: flex; align-items: center; gap: 8px; }
.mk { flex: none; display: inline-block; }
.mk-star { width: 16px; height: 16px; fill: var(--danger); }
.mk-square { width: 10px; height: 10px; border-radius: 2px; background: var(--up-next); }
.mk-dot { width: 10px; height: 10px; border-radius: 50%; background: #8790B9; }
@media (prefers-color-scheme: dark) { .mk-dot { background: #A3AEE0; } }
.mk-ring { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--text-2); }

/* 匯入三步：順序本身就是資訊，所以編號 */
.steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 28px 1fr; column-gap: 12px; align-items: baseline; }
.steps li::before { content: counter(step); grid-row: span 2; align-self: start; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--ink-soft); color: var(--ink-small); font-size: 14px; font-weight: 700; }
.steps b { font-size: 16px; }
.steps span { font-size: 14px; color: var(--text-2); line-height: 1.5; }
.steps-note { margin: 14px 0 0; font-size: 14px; color: var(--text-2); }

.privacy h2, .closing h2 { font-size: clamp(34px, 4.4vw, 52px); font-weight: 700; margin-bottom: 22px; }

/* ── 隱私：清單，不做成一排一樣大的卡片 ── */
.privacy { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 72px; align-items: start; padding: 96px 0 80px; }
.privacy-copy { position: sticky; top: 104px; }
.privacy .lede { margin-bottom: 18px; }
.privacy-list {
  list-style: none; margin: 0; padding: 6px 28px;
  border-radius: var(--r-card); background: var(--surface); box-shadow: var(--lift);
  -webkit-backdrop-filter: blur(24px) saturate(1.7); backdrop-filter: blur(24px) saturate(1.7);
}
.privacy-list li { display: grid; grid-template-columns: 44px 1fr; column-gap: 18px; padding: 20px 0; }
.privacy-list li + li { border-top: 1px solid var(--line); }
.pv-icon {
  grid-row: span 2; width: 44px; height: 44px; padding: 11px; border-radius: var(--r-inner);
  background: var(--ink-soft); color: var(--ink);
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.privacy-list b { font-size: 17px; line-height: 1.5; }
.privacy-list span { font-size: 15px; color: var(--text-2); line-height: 1.6; }
.link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--ink-small); font-weight: 600; }
.link .icon { transition: transform .25s var(--ease-out); }
.link:hover .icon { transform: translateX(3px); }

/* ── 收尾：整頁唯一一個「收工！」的光芒 ── */
.closing { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 72px 0 112px; }
.closing::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 40px; transform: translateX(-50%);
  width: min(720px, 100%); height: 420px; border-radius: 50%; filter: blur(80px);
  background: radial-gradient(closest-side, var(--glow-1), transparent);
}
.closing img { border-radius: 27px; margin-bottom: 32px; box-shadow: 0 24px 40px -20px rgba(16, 20, 31, 0.5); }
.closing h2 { margin-bottom: 36px; }
.closing .note { margin-top: 18px; }
.spark-word { position: relative; display: inline-block; }
.spark {
  position: absolute; right: -0.56em; top: -0.3em; width: 0.5em; height: 0.47em; /* 貼在「工」右上角，跟圖示的驚嘆光芒一樣 */
  fill: none; stroke: var(--spark); stroke-width: 112; stroke-linecap: round; overflow: visible;
}

footer { border-top: 1px solid var(--line); }
.foot-inner {
  max-width: 1160px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 24px;
  padding: 14px max(24px, env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  font-size: 14px; color: var(--text-2);
}
.foot-brand { display: flex; align-items: center; gap: 10px; }
.foot-brand img { border-radius: 6px; }
footer nav { display: flex; gap: 8px 24px; }
footer nav a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; transition: color .2s; }
footer a:hover { color: var(--text); }
.ext { width: 13px; height: 13px; }

/* ── 動畫（只在沒要求減少動態效果時） ── */
@media (prefers-reduced-motion: no-preference) {
  /* 開場：手機浮上來，即時動態從下面滑進來，進度條跑到 16% */
  .hero-visual .phone { animation: rise 1s var(--ease-out) both; }
  .lk-live { animation: live-in .8s var(--ease-out) .7s both; }
  .lk-bar i { animation: bar-fill 1.4s var(--ease-out) 1.2s both; }
  .lk-widgets { animation: fade-up .7s var(--ease-out) .45s both; }
  /* 鎖定畫面像抬手一樣從黑屏亮起來，日期時間先出現 */
  .lock::before { animation: wake 1s ease-out .2s both; }
  .lk-date, .lk-time { animation: fade-up .8s var(--ease-out) .35s both; }
  /* 「上課中」的綠點在呼吸，代表這是即時的 */
  .lk-status i, .wt-status i, .is-l i { animation: live 2.2s ease-out infinite; }
}
@keyframes wake { from { opacity: .7; } to { opacity: 0; } } /* 不從全黑開始：背景分頁、抓預覽圖時也看得到畫面 */
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 114, 0.6); } 70%, 100% { box-shadow: 0 0 0 5px rgba(61, 220, 114, 0); } }
@keyframes rise { from { opacity: 0; transform: translateY(48px); } }
@keyframes live-in { from { opacity: 0; transform: translateY(40%) scale(.96); } }
@keyframes bar-fill { from { width: 0; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } }

/* 時間軸的線跟著捲動填成藍色 */
.motion .timeline::after {
  content: ""; position: absolute; left: 47px; top: 18px; width: 2px; border-radius: 1px;
  height: calc((100% - 36px) * var(--progress, 0)); background: var(--ink);
}
/* 每個時刻：時刻先掛上線，再出文字、畫面 */
.motion .moment > *, .motion .setup-card, .motion .privacy-copy, .motion .privacy-list li, .motion .closing > * {
  opacity: 0; transform: translateY(12px);
  transition: opacity .55s var(--ease-out), transform .6s var(--ease-out);
}
.motion .moment > .clock { transform: scale(.8); transition-duration: .4s; }
.motion .moment > :nth-child(2) { transition-delay: .08s; }
.motion .moment > :nth-child(3) { transition-delay: .16s; }
.motion .setup-card:nth-child(2) { transition-delay: .08s; }
.motion .setup-card:nth-child(3) { transition-delay: .16s; }
.motion .privacy-list li:nth-child(2) { transition-delay: .05s; }
.motion .privacy-list li:nth-child(3) { transition-delay: .1s; }
.motion .privacy-list li:nth-child(4) { transition-delay: .15s; }
.motion .moment.in > *, .motion .setup-card.in, .motion .privacy-copy.in, .motion .privacy-list li.in, .motion .closing.in > * { opacity: 1; transform: none; }
/* 收尾的光芒最後才閃出來 */
/* 開學模擬畫面：課一塊一塊放進格子、匯入的課一列一列勾起來、月曆的記號依序出現 */
.motion .tt-b { opacity: 0; transform: translateY(-6px) scale(.94); transition: opacity .4s var(--ease-out), transform .5s var(--ease-out); transition-delay: calc(.2s + var(--n) * 60ms); }
.motion .sim-import li { opacity: 0; transform: translateX(-10px); transition: opacity .4s var(--ease-out), transform .5s var(--ease-out); transition-delay: calc(.15s + var(--n) * 110ms); }
.motion .sim-import .on .im-check { transform: scale(.4); transition: transform .35s var(--ease-out); transition-delay: calc(.45s + var(--n) * 110ms); }
.motion .cm-m > * { opacity: 0; transform: scale(.3); transition: opacity .3s, transform .4s var(--ease-out); transition-delay: calc(.2s + var(--n) * 28ms); }
.motion .setup-card.in .tt-b, .motion .setup-card.in .sim-import li, .motion .setup-card.in .cm-m > * { opacity: 1; transform: none; }
.motion .setup-card.in .sim-import .on .im-check { transform: none; }
.motion .setup-card.in .clash { animation: clash 1.2s var(--ease-out) 1s 2; }
@keyframes clash { 50% { background: color-mix(in srgb, var(--danger) 32%, transparent); } }

.motion .closing .spark { opacity: 0; transform: scale(.4) rotate(-20deg); transform-origin: 0 100%; transition: opacity .4s, transform .7s var(--ease-out); transition-delay: .6s; }
.motion .closing.in .spark { opacity: 1; transform: none; }

/* 捲動視差：手機、手錶跟著捲動有一點深度，動態島往反方向 */
.motion .hero-visual .phone { translate: 0 calc(var(--py, 0) * 28px); }
.motion .stage .phone { translate: 0 calc(var(--py, 0) * 36px); }
.motion .wrist .watch { translate: 0 calc(var(--py, 0) * 20px); }
.motion .island { translate: 0 calc(var(--py, 0) * -20px); }

/* 12:10：空堂亮完，邀請卡浮上來，好友一個一個回覆 */
.motion #friends .invite { opacity: 0; translate: 0 28px; scale: .94; transition: opacity .5s var(--ease-out), translate .8s var(--ease-spring), scale .8s var(--ease-spring); transition-delay: 1.2s; }
.motion .inv-replies > span { opacity: 0; translate: -6px 0; transition: opacity .4s var(--ease-out), translate .5s var(--ease-out); transition-delay: 2s; }
.motion .inv-replies > span + span { transition-delay: 2.5s; }
.motion #friends.lit .invite, .motion #friends.lit .inv-replies > span { opacity: 1; translate: none; scale: none; }
.motion #friends.lit .inv-replies .ok { animation: tick .45s var(--ease-spring) 2s both; }
.motion #friends.lit .inv-replies > span + span .ok { animation-delay: 2.5s; }

/* 15:05：手錶像抬手一樣翻上來，進度條跑到現在；動態島從小膠囊撐開 */
.motion .watch { opacity: 0; transform: perspective(700px) translateY(28px) rotateX(32deg); transition: opacity .6s var(--ease-out), transform 1s var(--ease-out); transition-delay: .3s; }
.motion .wt-bar i { transform: scaleX(0); transform-origin: left; transition: transform 1.3s var(--ease-out) 1s; }
.motion .island { clip-path: inset(0 32% round 999px); transition: clip-path .8s var(--ease-spring) .7s; }
.motion .island > * { opacity: 0; transition: opacity .35s ease-out 1.1s; }
.motion .moment.in .watch, .motion .moment.in .wt-bar i { opacity: 1; transform: none; }
.motion .moment.in .island { clip-path: inset(0 0 round 999px); }
.motion .moment.in .island > * { opacity: 1; }

/* 22:51：小工具一張一張出現，接著 HW2 被勾掉（JS 加 .done） */
.motion .stage-home .widget, .motion .stage-home .hm-icons { opacity: 0; transform: translateY(10px) scale(.97); transition: opacity .5s var(--ease-out), transform .7s var(--ease-out); transition-delay: .45s; }
.motion .stage-home .w-tasks { transition-delay: .6s; }
.motion .stage-home .hm-icons { transition-delay: .75s; }
.motion .moment.in .stage-home .widget, .motion .moment.in .stage-home .hm-icons { opacity: 1; transform: none; }

/* 開學：課都排好了，今天那一欄才亮起來 */
.motion .tt-today { opacity: 0; transition: opacity .6s ease-out 1.3s; }
.motion .setup-card.in .tt-today { opacity: 1; }

/* 隱私：每列的圖示彈出來 */
.motion .privacy-list .pv-icon { transform: scale(.6) rotate(-14deg); transition: transform .7s var(--ease-spring) .12s; }
.motion .privacy-list li.in .pv-icon { transform: none; }

/* 收尾：圖示從上面落下，光芒出現後再閃兩下 */
.motion .closing > img { transform: translateY(-28px) scale(.82); transition: opacity .5s var(--ease-out), transform .9s var(--ease-spring); }
.motion .closing.in .spark { animation: twinkle 1s ease-in-out 1.4s 2; }
@keyframes twinkle { 50% { scale: 1.3; rotate: 14deg; } }

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

/* ── 平板 ── */
@media (max-width: 1080px) {
  .moment { grid-template-columns: 96px minmax(0, 1fr) minmax(0, 1fr); column-gap: 28px; }
  .invite { right: -8px; }
}
@media (max-width: 960px) {
  .privacy { grid-template-columns: 1fr; gap: 32px; }
  .privacy-copy { position: static; }
  .setup-grid { grid-template-columns: 1fr 1fr; }
  .setup-import { grid-column: 1 / -1; grid-row: auto; }
  /* 時間軸改成上下排：時刻、文字、畫面 */
  .moment { grid-template-columns: 72px minmax(0, 1fr); row-gap: 24px; }
  .moment > :last-child { grid-column: 2; }
  .clock { width: 72px; font-size: 17px; }
  .timeline::before, .motion .timeline::after { left: 35px; }
}

/* ── 手機 ── */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .top nav { gap: 0; font-size: 14px; }
  /* 開場：手機上先放鎖定畫面，讓「剩 1:32」出現在第一屏 */
  .hero { grid-template-columns: 1fr; text-align: center; padding: 20px 0 40px; gap: 28px; min-height: 0; }
  .hero-copy { display: contents; }
  .hero h1 { order: 1; margin-bottom: 0; font-size: clamp(38px, 11vw, 46px); }
  .hero-visual { order: 2; }
  .hero { gap: 22px; }
  .cta { order: 3; margin-top: 0; justify-content: center; }
  .hero .lede { order: 4; margin: 0 auto; font-size: 17px; }
  .facts { order: 5; margin-top: -8px; justify-content: center; }
  .hero-visual .phone { --w: min(250px, 66vw, 24svh); }
  .schools { padding-bottom: 40px; }
  .school-tags li { font-size: 14px; padding: 5px 12px; }
  .day { padding-top: 8px; }
  .day-title, .setup-title { margin-bottom: 24px; }
  .timeline { padding-left: 22px; }
  .timeline::before, .motion .timeline::after { left: 4px; top: 14px; }
  .moment { grid-template-columns: 1fr; row-gap: 16px; padding: 24px 0; }
  .moment > :last-child { grid-column: auto; }
  .clock { width: auto; justify-self: start; margin-left: -22px; padding: 4px 14px; font-size: 16px; }
  .moment-copy { max-width: none; }
  .stage { height: 400px; border-radius: 28px; }
  .stage .phone { --w: min(250px, 66cqi); }
  .stage.stage-home .phone { --w: min(330px, 88cqi); }
  .friends-visual { padding-bottom: 0; }
  .invite { position: static; width: auto; margin-top: 12px; }
  .wrist { gap: 24px; }
  .watch { width: 168px; }
  .setup-copy { padding: 24px 22px 18px; }
  .wrist { min-height: 0; padding: 32px 16px; }
  .setup-grid { grid-template-columns: 1fr; }
  /* 手機上匯入畫面只留 3 列 */
  .sim-import li:nth-child(n+4) { display: none; }
  .im-more-wide { display: none; }
  .im-more-narrow { display: inline; }
  /* 手機上週課表要讓出寬度，教室名才放得進一格 */
  .zoom:has(.sim-tt) { padding-inline: 12px; }
  .sim-tt { padding: 10px; }
  .tt-grid { grid-template-columns: 28px repeat(5, 1fr); column-gap: 3px; }
  .tt-b { padding: 2px 1px; }
  .privacy { padding: 56px 0; }
  .privacy-list { padding: 4px 20px; }
  .closing { padding: 48px 0 72px; }
  .closing h2 { font-size: clamp(24px, 7.4vw, 34px); }
  .foot-inner { justify-content: center; }
}

/* ── 隱私權政策等文件頁 ── */
.doc { max-width: 1040px; }
.doc-hero { padding: 40px 0 40px; max-width: 760px; }
.back {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-bottom: 12px;
  font-size: 15px; font-weight: 600; color: var(--ink-small);
}
.back .icon { transition: transform .25s var(--ease-out); }
.back:hover .icon { transform: translateX(-3px); }
.doc-hero h1 { font-size: clamp(40px, 5.4vw, 64px); font-weight: 700; letter-spacing: 0.02em; margin-bottom: 12px; }
.doc-date { font-size: 14px; color: var(--text-2); margin-bottom: 24px; }
.doc-hero .lede { max-width: none; }

.doc-points { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 28px; }
.doc-points li { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; }
.doc-points .pv-icon { width: 34px; height: 34px; padding: 8px; border-radius: var(--r-cell); }

.doc-body { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: start; padding-bottom: 96px; }

.toc { position: sticky; top: 88px; }
.toc summary { list-style: none; font-size: 13px; font-weight: 600; color: var(--text-2); letter-spacing: 0.08em; margin-bottom: 10px; padding-left: 14px; }
.toc summary::-webkit-details-marker { display: none; }
.toc .chev { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.toc a {
  display: block; padding: 6px 14px; margin-left: -1px;
  font-size: 14px; line-height: 1.45; color: var(--text-2);
  border-left: 2px solid transparent; transition: color .2s, border-color .2s;
}
.toc a:hover { color: var(--text); }
.toc a[aria-current] { color: var(--ink-small); border-left-color: var(--ink); font-weight: 600; }

.prose {
  padding: 8px 48px 16px; border-radius: var(--r-card);
  background: var(--surface); box-shadow: var(--lift);
  -webkit-backdrop-filter: blur(24px) saturate(1.7); backdrop-filter: blur(24px) saturate(1.7);
}
.prose section { padding: 36px 0; scroll-margin-top: 88px; }
.prose section + section { border-top: 1px solid var(--line); }
.prose h2 { font-size: 24px; font-weight: 700; margin-bottom: 14px; }
.prose p, .prose li { color: color-mix(in srgb, var(--text) 86%, transparent); }
.prose p + p, .prose ul + p, .prose p + ul { margin-top: 14px; }
.prose ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.prose ul li { position: relative; padding-left: 22px; }
.prose ul li::before {
  content: ""; position: absolute; left: 4px; top: 0.72em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--ink);
}
.prose strong { color: var(--text); }
.prose a { color: var(--ink-small); font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent); text-underline-offset: 4px; text-decoration-thickness: 1.5px; transition: text-decoration-color .2s; }
.prose a:hover { text-decoration-color: var(--ink); }
.callout { padding: 14px 18px; border-radius: var(--r-inner); background: var(--ink-soft); color: var(--text) !important; font-size: 16px; }

@media (max-width: 860px) {
  .doc-body { grid-template-columns: 1fr; gap: 20px; }
  .toc {
    position: static; padding: 4px 18px; border-radius: var(--r-inner);
    background: var(--surface); box-shadow: var(--lift);
  }
  .toc summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; margin: 0; padding: 0; cursor: pointer; font-size: 15px; color: var(--text); letter-spacing: 0; }
  .toc .chev { display: block; width: 18px; height: 18px; color: var(--text-2); }
  .toc.ready .chev { transition: transform .25s var(--ease-out); } /* 載入時自動收合不要轉 */
  .toc[open] .chev { transform: rotate(180deg); }
  .toc ol { border-left: 0; padding-bottom: 10px; }
  .toc a { border-left: 0; padding: 0; min-height: 44px; display: flex; align-items: center; margin: 0; }
}
@media (max-width: 760px) {
  .doc-hero { padding: 16px 0 28px; }
  .prose { padding: 4px 22px 8px; }
  .prose section { padding: 28px 0; }
  .prose h2 { font-size: 21px; }
}
@media (max-width: 340px) { /* 很窄時只留圖示，導覽才不會擠成直排 */
  .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .top nav { gap: 0; }
  .top nav a:not(.pill) { padding-inline: 6px; }
}
