/* 清新色系：薄荷綠＋天空藍，黃色／珊瑚色點綴；標題與按鈕用粉圓體 */
:root {
  --bg: #f2fbf7;
  --bg-2: #e2f5ee;
  --card: #ffffff;
  --mint: #3cbf9c;
  --mint-d: #23977a;
  --mint-l: #d4f3e8;
  --sky: #4aa8e8;
  --sky-d: #2b86c8;
  --sky-l: #dcefff;
  --sun: #ffd166;
  --sun-d: #e8ad2b;
  --coral: #ff7f6e;
  --coral-d: #e05c4b;
  --ink: #2c3e50;
  --muted: #6b8090;
  --line: #d3ece3;
  --kb: #2d5d7c;
  --radius: 22px;
  --shadow: 0 6px 20px rgba(35, 151, 122, .10);
  --round: "Huninn", "Noto Sans TC", system-ui, sans-serif;
  /* 書上的音名顏色（不要改） */
  --c: #f0707a; --d: #f2a46a; --e: #f3dc62; --f: #9fd36a; --g: #6cc9da; --a: #5a86c9; --b: #a982c4;
  /* 左右手 */
  --rh: var(--coral); --lh: var(--sky);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink);
  background: var(--bg) radial-gradient(circle at 8% 4%, #fff7d6 0 120px, transparent 121px) no-repeat;
  font-family: "Noto Sans TC", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.7; font-size: 16px;
}
a { color: var(--sky-d); }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; font-family: var(--round); font-weight: 400; }

/* ---------- 立體按鈕（按下去會往下沉） ---------- */
.btn, .chip, .play-btn, .icon-btn, .song, .book-tab, .feature, .nav a, .toggle {
  -webkit-tap-highlight-color: transparent;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 999px; border: 0;
  background: #fff; color: var(--mint-d); font-family: var(--round); font-size: 18px; text-decoration: none; cursor: pointer;
  box-shadow: 0 4px 0 var(--line), 0 6px 14px rgba(35, 151, 122, .12);
  transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.btn.primary { background: var(--mint); color: #fff; box-shadow: 0 4px 0 var(--mint-d), 0 8px 18px rgba(60, 191, 156, .3); }
.btn.primary:active { box-shadow: 0 1px 0 var(--mint-d); }
.btn.sun { background: var(--sun); color: #6b4a00; box-shadow: 0 4px 0 var(--sun-d), 0 8px 18px rgba(255, 209, 102, .35); }
.btn.small { padding: 7px 16px; font-size: 16px; }
.buy-secondary { color: #376070; text-underline-offset: .18em; }
.tag { display: inline-block; font-size: 13px; padding: 2px 10px; border-radius: 999px; background: var(--sun); color: #6b4a00; font-family: var(--round); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 10px max(16px, calc((100vw - 1100px) / 2));
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--mint-l);
}
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--round); font-size: 22px; color: var(--mint-d); text-decoration: none; letter-spacing: .04em; }
.brand-dots { display: flex; gap: 3px; }
.brand-dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--c); }
.brand-dots i:nth-child(2) { background: var(--e); }
.brand-dots i:nth-child(3) { background: var(--g); }
.nav { display: flex; gap: 6px; margin-left: auto; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; }
.nav a {
  padding: 7px 14px; border-radius: 999px; text-decoration: none; color: var(--ink);
  font-family: var(--round); white-space: nowrap; font-size: 17px; background: var(--bg);
  box-shadow: 0 3px 0 var(--line);
}
.nav a:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.nav a.active { background: var(--mint); color: #fff; box-shadow: 0 3px 0 var(--mint-d); }
@media (max-width: 640px) {
  .site-header { gap: 6px; }
  .nav { margin-left: 0; width: 100%; gap: 4px; justify-content: space-between; }
  .nav a { font-size: 14px; padding: 6px 8px; }
}

main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 48px; min-height: 60vh; }

/* ---------- common ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 28px; margin: 8px 0 14px; color: var(--ink); }
.lead { color: var(--muted); margin: 0 0 20px; }

/* ---------- home ---------- */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; margin-bottom: 30px; }
.hero h1 { font-size: clamp(32px, 4.8vw, 48px); color: var(--mint-d); letter-spacing: .03em; }
.hero h1 small { display: block; font-size: .48em; color: var(--sky-d); letter-spacing: 0; }
.hero p { margin: 0 0 18px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-buy { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; font-size: 15px; color: var(--ink-2, #6b6b6b); }
.intro-video { margin: 0 auto 30px; }
.intro-video video { display: block; width: 100%; border-radius: 22px; background: #14234a; box-shadow: 0 6px 0 var(--mint-l), 0 14px 34px rgba(45, 93, 124, .16); }
.intro-video.v16x9 video { aspect-ratio: 16 / 9; }
.intro-video.v9x16 { max-width: min(100%, calc(78vh * 9 / 16)); }
.intro-video.v9x16 video { aspect-ratio: 9 / 16; }
.covers { position: relative; height: 300px; }
.covers img { position: absolute; width: 74%; border-radius: 16px; border: 5px solid #fff; box-shadow: 0 10px 30px rgba(45, 93, 124, .18); }
.covers img:first-child { left: 0; top: 0; transform: rotate(-4deg); }
.covers img:last-child { right: 0; bottom: 0; transform: rotate(3deg); }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .covers { height: 220px; }
}
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 34px; }
@media (max-width: 760px) { .feature-grid { grid-template-columns: 1fr; } }
.feature {
  display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--ink); background: #fff; border-radius: var(--radius);
  padding: 18px; box-shadow: 0 5px 0 var(--line), var(--shadow); transition: transform .08s;
}
.feature:active { transform: translateY(3px); }
.feature .ico { flex: 0 0 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 34px; }
.feature:nth-child(1) .ico { background: var(--mint-l); }
.feature:nth-child(2) .ico { background: #fff1cc; }
.feature:nth-child(3) .ico { background: var(--sky-l); }
.feature h3 { margin: 0 0 2px; font-size: 21px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 32px; }
@media (max-width: 760px) { .how { grid-template-columns: 1fr; } }
.how div { background: #fff; border-radius: var(--radius); padding: 18px 20px; border: 3px dashed var(--line); }
.how b { font-family: var(--round); font-weight: 400; font-size: 20px; color: var(--mint-d); }

/* ---------- music list ---------- */
.book-tabs { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.book-tab {
  display: flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border-radius: 999px;
  background: #fff; cursor: pointer; font-family: var(--round); font-size: 19px; text-decoration: none; color: var(--ink);
  box-shadow: 0 4px 0 var(--line);
}
.book-tab:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.book-tab img { width: 48px; height: 34px; object-fit: cover; border-radius: 8px; }
.book-tab.active { background: var(--mint); color: #fff; box-shadow: 0 4px 0 var(--mint-d); }
.group { margin-bottom: 28px; }
.group-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.group-head h2 { font-size: 22px; margin: 0; color: var(--sky-d); }
.song-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.song {
  display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 20px; background: #fff;
  text-decoration: none; color: var(--ink); box-shadow: 0 4px 0 var(--line), 0 6px 14px rgba(35, 151, 122, .08);
  transition: transform .08s;
}
.song:hover { box-shadow: 0 4px 0 var(--mint), 0 6px 14px rgba(35, 151, 122, .12); }
.song:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.badge {
  flex: 0 0 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--round); font-size: 19px; color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .2);
}
.song b { display: block; font-family: var(--round); font-weight: 400; font-size: 17px; line-height: 1.3; }
.song small { font-size: 12px; color: var(--muted); }
.song.pending { background: #f7faf9; box-shadow: none; border: 2px dashed var(--line); }
.song.pending .badge { background: #cfdcd7 !important; }

/* ---------- player ---------- */
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.player-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.player-head h1 { font-size: clamp(30px, 4.4vw, 40px); margin: 0; color: var(--mint-d); }
.player-head .meta { color: var(--muted); font-size: 14px; }
.prevnext { display: flex; gap: 10px; }

.player { padding: 20px; }
.keyboard-wrap { background: var(--kb); border-radius: 20px; padding: 12px 10px 10px; margin-bottom: 18px; }
.hand-legend { display: flex; flex-wrap: wrap; gap: 2px 16px; justify-content: center; color: #e3f1fb; font-size: 14px; margin-bottom: 8px; }
.hand-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 5px; vertical-align: -1px; }
.hand-legend span { white-space: nowrap; }
.keyboard { position: relative; height: 150px; display: flex; user-select: none; }
.key-w {
  flex: 1; position: relative; background: #fff; border-radius: 0 0 8px 8px; margin: 0 1px;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding-bottom: 8px;
  transition: background .06s;
}
.key-b {
  position: absolute; top: 0; height: 60%; background: #1f2d3a; border-radius: 0 0 6px 6px; z-index: 2;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding-bottom: 6px;
}
.key-name { white-space: nowrap; font-size: 11px; color: #a9b8c2; font-weight: 700; }
.key-name .short { display: none; }
.key-c .key-name { color: var(--kb); }
.dot {
  width: min(26px, calc(100% - 4px)); aspect-ratio: 1; border-radius: 50%; transform: scale(0); transition: transform .08s;
  display: grid; place-items: center; font-size: 15px; font-weight: 900; color: #fff; margin-bottom: 6px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .25); background: var(--k);
}
.key-b .dot { width: min(16px, calc(100% - 2px)); font-size: 9px; margin-bottom: 4px; }
.on > .dot { transform: scale(1); }
.key-w.on { background: #fffbea; }

.transport { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.play-btn {
  width: 84px; height: 84px; border-radius: 50%; border: 0; background: var(--coral); color: #fff; cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 6px 0 var(--coral-d), 0 10px 22px rgba(255, 127, 110, .35);
  transition: transform .08s, box-shadow .08s;
}
.play-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--coral-d); }
.play-btn svg { width: 36px; height: 36px; }
.icon-btn {
  width: 56px; height: 56px; border-radius: 50%; border: 0; background: #fff; cursor: pointer; display: grid; place-items: center;
  color: var(--sky-d); box-shadow: 0 4px 0 var(--line), 0 6px 12px rgba(35, 151, 122, .1); transition: transform .08s;
}
.icon-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.icon-btn svg { width: 26px; height: 26px; }
.icon-btn.on { background: var(--sky); color: #fff; box-shadow: 0 4px 0 var(--sky-d); }
.status { color: var(--muted); font-size: 15px; font-family: var(--round); }

.progress { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-variant-numeric: tabular-nums; font-size: 14px; color: var(--muted); }
.progress input { flex: 1; }
.trial-buy {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px;
  margin: 0 0 18px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--bg); font-size: 15px;
}
.trial-buy.is-complete { background: #fff7d6; border-color: var(--sun-d); }
.trial-buy.is-complete .btn { background: var(--sun); color: #6b4a00; box-shadow: 0 4px 0 var(--sun-d); }

.controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 760px) { .controls { grid-template-columns: minmax(0, 1fr); } }
/* 手機：速度按鈕和聲部開關縮小，不要撐出卡片 */
@media (max-width: 420px) { #speedChips { gap: 6px; } #speedChips .chip { font-size: 14px; padding: 8px 2px; } #speedChips .chip .e { display: none; } .toggles { gap: 6px; } .toggle { font-size: 14px; white-space: nowrap; padding-left: 2px; padding-right: 2px; } .ctrl { padding: 14px 12px; } }
.ctrl { background: var(--bg); border-radius: 20px; padding: 16px 18px; }
.ctrl h3 { font-size: 20px; margin: 0 0 10px; display: flex; justify-content: space-between; align-items: baseline; color: var(--ink); }
.ctrl h3 output { font-size: 28px; color: var(--mint-d); }
.ctrl h3 output small { font-size: 14px; color: var(--muted); margin-left: 6px; font-family: "Noto Sans TC", sans-serif; }

/* 速度、風格的大泡泡按鈕 */
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 999px; border: 0; background: #fff; cursor: pointer;
  font-family: var(--round); font-size: 17px; color: var(--ink);
  box-shadow: 0 4px 0 var(--line); transition: transform .08s, box-shadow .08s;
}
.chip .e { font-size: 20px; line-height: 1; }
.chip:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.chip.active { background: var(--mint); color: #fff; box-shadow: 0 4px 0 var(--mint-d); }
#speedChips .chip.active { background: var(--sun); color: #6b4a00; box-shadow: 0 4px 0 var(--sun-d); }
#speedChips { flex-wrap: nowrap; }
#speedChips .chip { flex: 1; justify-content: center; padding: 8px 6px; min-width: 0; white-space: nowrap; }
.speed-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.speed-row input { flex: 1; }

/* 聲部：大開關卡片 */
.toggles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.toggles.two { grid-template-columns: repeat(2, 1fr); }
.toggle {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer;
  background: #fff; border-radius: 18px; padding: 10px 6px 12px; text-align: center;
  box-shadow: 0 4px 0 var(--line); transition: transform .08s, box-shadow .08s, background .1s;
  font-family: var(--round); font-size: 17px; color: var(--muted);
}
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle .t-ico { font-size: 30px; line-height: 1.2; filter: grayscale(1); opacity: .5; }
.toggle .t-sw { width: 40px; height: 22px; border-radius: 999px; background: #d5dfe3; position: relative; margin-top: 4px; transition: background .12s; }
.toggle .t-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .12s; }
.toggle:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.toggle:has(input:checked) { color: var(--ink); }
.toggle:has(input:checked) .t-ico { filter: none; opacity: 1; }
.toggle:has(input:checked) .t-sw { background: var(--tc, var(--mint)); }
.toggle:has(input:checked) .t-sw::after { left: 21px; }
.toggle:has(input:focus-visible) { outline: 3px solid var(--sky); }
.vol { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; color: var(--muted); }
.vol span { flex: 0 0 64px; }
.vol input { flex: 1; }

input[type=range] { accent-color: var(--mint); height: 30px; }
.note { font-size: 14px; color: var(--muted); margin-top: 16px; }

/* ---------- resources ---------- */
.res-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 760px) { .res-grid { grid-template-columns: 1fr; } }
.res h3 { font-size: 22px; }
.res p { margin: 0 0 12px; color: var(--muted); }
.thumbs { display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; }
.thumbs a { flex: 0 0 auto; }
.thumbs img { height: 110px; width: auto; border-radius: 10px; border: 2px solid var(--line); }
.res .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.placeholder-thumb { height: 110px; border-radius: 14px; background: repeating-linear-gradient(45deg, var(--mint-l) 0 12px, #f2fbf7 12px 24px); display: grid; place-items: center; color: var(--mint-d); font-size: 14px; margin-bottom: 14px; }

/* ---------- errata ---------- */
.errata-book { margin-bottom: 16px; }
.errata-book h3 { font-size: 22px; }
.errata-list { list-style: none; padding: 0; margin: 0; }
.errata-list li { display: flex; gap: 12px; padding: 10px 0; border-top: 2px dashed var(--line); }
.errata-list b { flex: 0 0 76px; color: var(--coral-d); font-family: var(--round); font-weight: 400; }

/* ---------- footer ---------- */
.site-footer { background: var(--bg-2); padding: 32px max(16px, calc((100vw - 1100px) / 2)); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h3 { font-size: 19px; }
.site-footer p { margin: 0 0 12px; font-size: 14px; }
.link-list { display: flex; flex-direction: column; gap: 6px; }
.link-list a { text-decoration: none; font-weight: 500; color: var(--mint-d); }
.copyright { margin-top: 20px; font-size: 13px; color: var(--muted); }

/* ---------- 手機 ---------- */
@media (max-width: 640px) {
  .hand-legend { font-size: 12px; }
  .keyboard { height: 120px; }
  .key-name { font-size: 9px; }
  .key-name .full { display: none; }
  .key-name .short { display: inline; }
  .dot { background: none; color: var(--ink); text-shadow: none; font-size: 11px; }
  .key-b .dot { color: #fff; font-size: 10px; }
  .key-w.on, .key-b.on { background: var(--k); }
  .play-btn { width: 76px; height: 76px; }
  .chip { font-size: 16px; padding: 7px 13px; }
  .song-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 免費試聽／上鎖 ---------- */
.nav a.nav-key { background: var(--coral); color: #fff; box-shadow: 0 3px 0 var(--coral-d); }
.trial-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; background: #fff7d6; border: 3px dashed var(--sun); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 22px; }
.trial-banner b { display: block; font-family: var(--round); font-weight: 400; font-size: 22px; color: #8a6200; }
.trial-banner span { color: var(--muted); font-size: 15px; }
.trial-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.song.locked { opacity: .78; }
.song.locked small { color: var(--coral-d); }
.song.trial { box-shadow: 0 4px 0 var(--sun-d), 0 6px 14px rgba(232, 173, 43, .25); background: #fffbea; }
.song.trial small { color: #8a6200; font-weight: 700; }
.lock-card { text-align: center; padding: 34px 22px; }
.lock-card .lock-ico { font-size: 56px; }
.lock-card h2 { font-size: 28px; color: var(--mint-d); margin: 6px 0 10px; }
.lock-card p { color: var(--muted); }
.lock-actions { display: flex; align-items: center; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 18px 0; }
.lock-login a { font-weight: 700; text-underline-offset: .18em; }
.buy-links { display: flex; gap: 8px 20px; justify-content: center; flex-wrap: wrap; }
.lock-try a { font-weight: 700; }
@media (max-width: 640px) { .nav a.nav-key { padding: 6px 9px; } .nav-key .nk-t { display: none; } }

/* ---------- 互動試閱 ---------- */
.pv-list { display: flex; flex-direction: column; gap: 22px; }
.pv { display: grid; grid-template-columns: 1.7fr 1fr; gap: 22px; align-items: center; padding: 18px; }
@media (max-width: 860px) { .pv { grid-template-columns: 1fr; } }
.pv-img { position: relative; border-radius: 14px; overflow: hidden; cursor: zoom-in; border: 2px solid var(--line); }
.pv-img img { width: 100%; display: block; }
.pv-hl { position: absolute; inset: 0; pointer-events: none; }
.pv-hl span { position: absolute; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%) scale(1.6);
  box-shadow: 0 0 0 6px var(--coral), 0 0 0 10px rgba(255, 255, 255, .9), 0 0 28px 10px rgba(255, 127, 110, .8); animation: pvPop .18s ease-out; }
@keyframes pvPop { from { transform: translate(-50%, -50%) scale(.6); } }
.pv-zoom { position: absolute; right: 10px; bottom: 10px; background: rgba(44, 62, 80, .72); color: #fff; font-size: 13px; padding: 3px 10px; border-radius: 999px; }
.pv-text h2 { font-size: 26px; color: var(--mint-d); margin: 8px 0 6px; }
.pv-text p { color: var(--muted); margin: 0 0 14px; }
.pv-ctrl { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.pv-more { display: inline-block; margin-top: 12px; font-weight: 700; color: var(--mint-d); }
.pv-cta { text-align: center; margin-top: 26px; }
.preview-book-bar { display: flex; align-items: center; gap: 12px 18px; margin-bottom: 18px; }
.preview-book-bar .book-tabs { margin-bottom: 0; }
.preview-buy { margin-left: auto; }
@media (max-width: 640px) {
  .preview-book-bar { flex-direction: column; align-items: flex-start; }
  .preview-buy { margin-left: 0; }
}
.pv-cta h2 { color: var(--mint-d); }
.pv-box { position: fixed; inset: 0; z-index: 50; background: rgba(20, 30, 40, .82); display: grid; place-items: center; padding: 16px; cursor: zoom-out; }
.pv-box[hidden] { display: none; }
.pv-box img { max-width: 100%; max-height: 92vh; border-radius: 10px; }
.pv-box .icon-btn { position: absolute; top: 14px; right: 14px; }
@media (max-width: 860px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .nav a:not(.active) .nl { display: none; } }

/* 課本標記的換指法（最後一組 #、*、☆）：亮燈時多一圈珊瑚色框 */
.chg > .dot { box-shadow: 0 0 0 3px #fff, 0 0 0 7px var(--coral); }
.hand-legend .lg-chg { width: 12px; height: 12px; border-radius: 50%; background: transparent; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--coral); }

/* ---------- 試閱導覽 ---------- */
.btn.coral { background: var(--coral); color: #fff; box-shadow: 0 4px 0 var(--coral-d), 0 8px 18px rgba(255, 127, 110, .3); }
.tour-banner { display: flex; align-items: center; gap: 20px; margin: -6px 0 26px; padding: 18px 22px; border-radius: 26px; text-decoration: none; color: #fff;
  background: linear-gradient(120deg, var(--coral) 0%, #ff9f7e 55%, var(--sun) 120%); box-shadow: 0 6px 0 var(--coral-d), 0 12px 28px rgba(255, 127, 110, .35); transition: transform .1s; }
.tour-banner:active { transform: translateY(3px); }
.tb-covers { position: relative; flex: 0 0 150px; height: 92px; }
.tb-covers img { position: absolute; width: 110px; border-radius: 8px; border: 3px solid #fff; box-shadow: 0 6px 14px rgba(0,0,0,.18); }
.tb-covers img:first-child { left: 0; top: 0; transform: rotate(-6deg); }
.tb-covers img:last-child { left: 38px; top: 18px; transform: rotate(5deg); }
.tb-text { flex: 1; }
.tb-text b { display: block; font-family: var(--round); font-weight: 400; font-size: 30px; }
.tb-text span { font-size: 15px; opacity: .95; }
.tb-go { flex: 0 0 auto; background: #fff; color: var(--coral-d); font-family: var(--round); font-size: 20px; padding: 10px 20px; border-radius: 999px; box-shadow: 0 4px 0 rgba(0,0,0,.12); animation: tbPulse 1.8s ease-in-out infinite; }
@keyframes tbPulse { 50% { transform: scale(1.07); } }
@media (max-width: 700px) {
  .tour-banner { flex-wrap: wrap; gap: 12px; }
  .tb-covers { flex-basis: 120px; height: 76px; }
  .tb-covers img { width: 90px; }
  .tb-text { flex-basis: calc(100% - 140px); }
  .tb-text b { font-size: 24px; }
  .tb-go { width: 100%; text-align: center; }
}
.tour-strip { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 8px; }
.tour-thumb { flex: 0 0 132px; border: 3px solid transparent; border-radius: 14px; background: #fff; padding: 4px; cursor: pointer; box-shadow: 0 3px 0 var(--line); }
.tour-thumb img { width: 100%; border-radius: 9px; display: block; }
.tour-thumb span { display: block; font-family: var(--round); font-size: 14px; padding: 4px 2px 0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tour-thumb.active { border-color: var(--coral); }
.tour { padding: 14px; }
.tour-stage { position: relative; overflow: hidden; border-radius: 16px; cursor: pointer; user-select: none; background: #fff; scroll-margin-top: 130px; }
.tour-stage img { width: 100%; display: block; transition: opacity .35s; }
.tour-spot { position: absolute; border-radius: 16px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(25, 38, 52, .58), 0 0 0 4px var(--sun), 0 0 26px 8px rgba(255, 209, 102, .7);
  transition: left .55s cubic-bezier(.4, .1, .2, 1), top .55s cubic-bezier(.4, .1, .2, 1), width .55s cubic-bezier(.4, .1, .2, 1), height .55s cubic-bezier(.4, .1, .2, 1), box-shadow .4s; }
.tour-spot.all { box-shadow: 0 0 0 9999px rgba(25, 38, 52, 0), 0 0 0 0 transparent; }
.tour-ring { position: absolute; aspect-ratio: 1; border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%) scale(1.5); opacity: 0;
  box-shadow: 0 0 0 5px var(--sun), 0 0 0 9px rgba(255,255,255,.9), 0 0 22px 8px rgba(255, 209, 102, .9); transition: left .3s, top .3s, opacity .2s; }
.tour-tap { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); background: rgba(44, 62, 80, .82); color: #fff; font-family: var(--round); font-size: 17px; padding: 6px 18px; border-radius: 999px; animation: tbPulse 1.6s ease-in-out infinite; pointer-events: none; }
.tour-cap { padding: 16px 8px 4px; }
.tour-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tour-meta b { font-family: var(--round); font-weight: 400; font-size: 24px; color: var(--mint-d); }
.tour-count { margin-left: auto; color: var(--muted); font-size: 14px; font-weight: 700; }
.tour-text { font-size: 19px; line-height: 1.7; margin: 10px 0 14px; min-height: 3.4em; }
.tour-text.in { animation: tourIn .45s ease-out; }
@keyframes tourIn { from { opacity: 0; transform: translateY(10px); } }
.tour-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.tour-nav .btn:disabled { opacity: .4; }
.tour-nav .btn.primary { font-size: 19px; padding: 11px 26px; }
.tour-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.tour-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.tour-dots i.done { background: var(--mint-l); }
.tour-dots i.on { background: var(--coral); transform: scale(1.3); }
@media (max-width: 640px) {
  .tour-text { font-size: 17px; min-height: 0; }
  .tour-thumb { flex-basis: 108px; }
  .tour-nav .btn { white-space: nowrap; padding: 9px 14px; font-size: 16px; }
  .tour-nav .btn.primary { font-size: 17px; padding: 10px 18px; }
  .tour-dots { gap: 4px; }
  .tour-dots i { width: 8px; height: 8px; }
}
.tour-nav .btn { white-space: nowrap; }

/* 學習單上鎖 */
.res-lock { margin-bottom: 20px; }
.locked-btn { color: var(--coral-d); }
