/* 学拼音 · 糖果城堡主题
 * 字体：Andika（SIL OFL，给识字儿童设计的字形：单层 a / g，拼音声调齐全）、Fredoka（OFL，圆体数字/拉丁）
 * 贴纸：Fluent Emoji 3D（MIT）
 */
@font-face { font-family: 'Andika'; font-weight: 400; font-display: swap; src: url(vendor/fonts/andika-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Andika'; font-weight: 700; font-display: swap; src: url(vendor/fonts/andika-latin-700-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Andika'; font-weight: 400; font-display: swap; src: url(vendor/fonts/andika-latin-ext-400-normal.woff2) format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Andika'; font-weight: 700; font-display: swap; src: url(vendor/fonts/andika-latin-ext-700-normal.woff2) format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Fredoka'; font-weight: 500; font-display: swap; src: url(vendor/fonts/fredoka-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Fredoka'; font-weight: 600; font-display: swap; src: url(vendor/fonts/fredoka-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Fredoka'; font-weight: 700; font-display: swap; src: url(vendor/fonts/fredoka-latin-700-normal.woff2) format('woff2'); }

:root {
  --bg: #fff6ee;
  --ink: #3a2548;
  --ink2: #6f5b7d;
  --muted: #a293ad;
  --card: #fff;
  --line: #f3e4d7;
  --pink: #ff5c8a;
  --c: #ff5c8a;
  --c2: #ff8fb1;
  --shadow: 0 10px 30px -12px rgba(88, 44, 90, .28);
  --r: 22px;
  --py: 'Andika', 'Fredoka', ui-rounded, system-ui, sans-serif;
  --sans: 'Fredoka', 'PingFang SC', 'HarmonyOS Sans SC', 'MiSans', 'Microsoft YaHei', 'Noto Sans CJK SC', system-ui, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.5;
  background:
    radial-gradient(900px 500px at 110% -10%, #ffe0ec 0, transparent 60%),
    radial-gradient(700px 480px at -10% 20%, #fff0c9 0, transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
[v-cloak] { display: none; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }

.page { max-width: 1280px; margin: 0 auto; padding: calc(var(--safe-t) + 8px) max(16px, env(safe-area-inset-right)) calc(var(--safe-b) + 28px) max(16px, env(safe-area-inset-left)); }

/* ---------- 顶栏 ---------- */
.topbar { display: flex; align-items: center; gap: 12px; min-height: 56px; position: sticky; top: 0; z-index: 20;
  margin: 0 -16px; padding: calc(var(--safe-t) + 6px) 16px 6px; background: rgba(255, 246, 238, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.tb-btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px 0 10px; border-radius: 999px; background: #fff;
  box-shadow: 0 3px 0 #efdccd, 0 6px 14px -8px rgba(88, 44, 90, .3); font-weight: 600; color: var(--ink2); flex: none; transition: transform .12s; }
.tb-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #efdccd; }
.tb-btn img { width: 24px; height: 24px; }
.tb-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.tb-title { flex: 1; min-width: 0; font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-nick { color: var(--muted); font-size: 13px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 20px; letter-spacing: 1px; }
.brand img { width: 32px; height: 32px; animation: wob 3.2s ease-in-out infinite; }
.tb-lec { display: inline-flex; align-items: center; gap: 8px; }
@keyframes wob { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(10deg) scale(1.06); } }

.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 13%, #fff); flex: none; }

/* ---------- 按压按钮（uiverse「pushable」思路） ---------- */
.push { --pc: var(--c); display: inline-block; border-radius: 16px; padding: 0 0 4px; background: color-mix(in srgb, var(--pc) 72%, #000); cursor: pointer; user-select: none; vertical-align: middle; }
.push-face { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 20px; border-radius: 16px; background: var(--pc); color: #fff; font-weight: 700; font-size: 16px;
  transform: translateY(-2px); transition: transform .12s cubic-bezier(.3, .7, .4, 1.5); white-space: nowrap; }
.push:hover .push-face { transform: translateY(-4px); }
.push:active .push-face { transform: translateY(1px); transition-duration: 34ms; }
.push.small .push-face { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 13px; }
.push.small { border-radius: 13px; }
.push img { width: 22px; height: 22px; }
.push.white { background: #eadbd0; }
.push.white .push-face { background: #fff; color: var(--ink); }

/* ---------- 首页 ---------- */
.hero { position: relative; display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; align-items: center; margin-top: 10px; padding: 28px; border-radius: 30px; overflow: hidden;
  color: #fff; background: linear-gradient(125deg, #ff6f9c 0%, #ff8a6b 45%, #ffb347 100%); box-shadow: 0 22px 40px -22px rgba(255, 95, 120, .7); }
.hero::after { content: ''; position: absolute; inset: auto -40px -70px auto; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .13); }
.hero-bubbles { position: absolute; inset: 0; pointer-events: none; }
.hero-bubbles span { position: absolute; font-family: var(--py); font-weight: 700; color: rgba(255, 255, 255, .2); animation: float 7s ease-in-out infinite; }
.hero-bubbles span:nth-child(1) { left: 44%; top: 6%; font-size: 64px; }
.hero-bubbles span:nth-child(2) { left: 56%; top: 58%; font-size: 44px; animation-delay: -2s; }
.hero-bubbles span:nth-child(3) { left: 4%; top: 70%; font-size: 40px; animation-delay: -4s; }
.hero-bubbles span:nth-child(4) { left: 90%; top: 4%; font-size: 52px; animation-delay: -1s; }
.hero-bubbles span:nth-child(5) { left: 36%; top: 76%; font-size: 34px; animation-delay: -3s; }
.hero-bubbles span:nth-child(6) { left: 70%; top: 2%; font-size: 30px; animation-delay: -5s; }
.hero-bubbles span:nth-child(7) { left: 22%; top: 2%; font-size: 36px; animation-delay: -6s; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-12px) rotate(6deg); } }
.hero-text { position: relative; z-index: 1; }
.hero-kicker { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; border-radius: 999px; background: rgba(255, 255, 255, .22); font-weight: 600; font-size: 14px; }
.hero-kicker img { width: 26px; height: 26px; }
.hero h1 { margin: 12px 0 8px; font-size: clamp(26px, 4.2vw, 40px); line-height: 1.2; letter-spacing: 1px; text-shadow: 0 3px 0 rgba(150, 40, 60, .18); }
.hero-sub { margin: 0; opacity: .95; font-size: 15px; }
.hero-stat { display: inline-block; margin-top: 14px; padding: 6px 14px; border-radius: 12px; background: rgba(255, 255, 255, .22); font-size: 14px; }
.hero-stat b { font-family: 'Fredoka', sans-serif; font-size: 18px; }

.cont { position: relative; z-index: 1; display: block; border-radius: 22px; background: #fff; color: var(--ink); padding: 10px; box-shadow: 0 16px 30px -16px rgba(90, 20, 40, .55); transition: transform .18s; }
.cont:hover { transform: translateY(-3px) rotate(-.4deg); }
.cont:active { transform: scale(.98); }
.cont-thumb { position: relative; border-radius: 15px; overflow: hidden; aspect-ratio: 16 / 9; background: #f5e9df; }
.cont-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cont-play { position: absolute; left: 50%; top: 50%; width: 62px; height: 62px; margin: -31px 0 0 -31px; border-radius: 50%; background: rgba(255, 255, 255, .95); display: grid; place-items: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .25); animation: pulse 2s ease-in-out infinite; }
.cont-play svg { width: 30px; height: 30px; fill: var(--c); margin-left: 4px; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .7), 0 8px 20px rgba(0, 0, 0, .25); } 50% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0), 0 8px 20px rgba(0, 0, 0, .25); } }
.cont-time { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 8px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; }
.cont-info { display: flex; flex-direction: column; padding: 10px 6px 4px; }
.cont-label { color: var(--c); font-weight: 700; font-size: 13px; }
.cont-info b { font-size: 16px; }
.cont-part { color: var(--muted); font-size: 13px; }

.sec-title { display: flex; align-items: baseline; gap: 12px; margin: 30px 4px 14px; flex-wrap: wrap; }
.sec-title h2 { margin: 0; font-size: 22px; }
.sec-title span { color: var(--muted); font-size: 14px; }

.lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 18px; }
.lcard { position: relative; display: flex; flex-direction: column; border-radius: var(--r); background: var(--card); overflow: hidden; box-shadow: var(--shadow), 0 4px 0 #f1e2d6;
  transition: transform .2s cubic-bezier(.3, .7, .4, 1.4), box-shadow .2s; }
.lcard:hover { transform: translateY(-5px) rotate(-.6deg); box-shadow: 0 18px 34px -14px rgba(88, 44, 90, .35), 0 4px 0 #f1e2d6; }
.lcard:active { transform: scale(.97); }
.lc-top { position: relative; height: 128px; display: grid; place-items: center; overflow: hidden; color: #fff;
  background: radial-gradient(circle at 20% 110%, rgba(255, 255, 255, .28) 0 30%, transparent 31%), radial-gradient(circle at 95% 0%, rgba(255, 255, 255, .22) 0 22%, transparent 23%), linear-gradient(135deg, var(--c), var(--c2)); }
.lc-no { position: absolute; left: 12px; top: 10px; padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, .25); font-weight: 700; font-size: 13px; }
.lc-emoji { position: absolute; right: 8px; bottom: 6px; width: 54px; height: 54px; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .18)); transition: transform .3s; }
.lcard:hover .lc-emoji { transform: rotate(-12deg) scale(1.12); }
.lc-keys { text-wrap: balance; font-family: var(--py); font-weight: 700; font-size: 34px; letter-spacing: 2px; word-spacing: 4px; padding: 16px 56px 0 16px; line-height: 1.15; text-align: center; text-shadow: 0 3px 0 rgba(0, 0, 0, .12); }
.lc-keys.long { font-size: 26px; }
.lc-keys.cjk { font-family: var(--sans); font-size: 21px; letter-spacing: 1px; text-wrap: balance; }
.lc-body { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.lc-body .chip { align-self: flex-start; }
.lc-body h3 { margin: 2px 0 0; font-size: 18px; line-height: 1.35; }
.lc-meta { margin-top: auto; padding-top: 6px; display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: #efe3da; }
.dots i.half { background: linear-gradient(90deg, var(--c) 50%, #efe3da 50%); }
.dots i.on { background: var(--c); }
.lc-done { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px 3px 4px; border-radius: 999px; background: #fff; color: #13a463; font-weight: 700; font-size: 13px; box-shadow: 0 4px 10px rgba(0, 0, 0, .12); }
.lc-done img { width: 20px; height: 20px; }
.foot { margin: 34px 0 0; text-align: center; color: var(--muted); font-size: 12px; }

/* ---------- 单讲 ---------- */
.lesson-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) 320px; grid-template-areas: 'stage parts' 'handout parts'; align-items: start; margin-top: 8px; }
.stage { grid-area: stage; }
.parts { grid-area: parts; position: sticky; top: calc(var(--safe-t) + 70px); }
.handout { grid-area: handout; }

.player-frame { border-radius: 22px; padding: 6px; background: linear-gradient(135deg, var(--c), var(--c2)); box-shadow: 0 20px 36px -20px color-mix(in srgb, var(--c) 80%, #000); }
.player { width: 100%; aspect-ratio: 16 / 9; border-radius: 17px; overflow: hidden; background: #000; }
.now { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 10px 12px 10px 16px; border-radius: 18px; background: #fff; box-shadow: var(--shadow); flex-wrap: wrap; }
.now-keys { font-family: var(--py); font-weight: 700; font-size: 24px; color: var(--c); letter-spacing: 1px; }
.now-keys.cjk { font-family: var(--sans); font-size: 18px; }
.now-info { flex: 1; min-width: 120px; color: var(--muted); }
.now-info b { color: var(--ink); font-size: 16px; }
.now-btns { display: flex; gap: 10px; }

.parts { background: #fff; border-radius: 22px; box-shadow: var(--shadow); padding: 14px 12px 12px; }
.parts-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 6px 10px; }
.parts-head h3 { margin: 0; font-size: 17px; }
.parts-head span { color: var(--muted); font-size: 13px; }
.parts-list { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 170px); overflow-y: auto; padding: 2px; }
.part { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border-radius: 16px; text-align: left; transition: background .15s, transform .15s; }
.part:hover { background: #fff5ef; }
.part:active { transform: scale(.98); }
.part.on { background: color-mix(in srgb, var(--c) 11%, #fff); box-shadow: inset 0 0 0 2px var(--c); }
.part-thumb { position: relative; flex: none; width: 124px; aspect-ratio: 16 / 9; border-radius: 11px; overflow: hidden; background: #f3e7de; }
.part-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.part.done .part-thumb img { opacity: .72; }
.part-dur { position: absolute; right: 5px; bottom: 5px; padding: 0 6px; border-radius: 6px; background: rgba(0, 0, 0, .62); color: #fff; font-size: 11px; line-height: 18px; }
.part-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .55); }
.part-bar i { display: block; height: 100%; background: var(--c); }
.part-txt { display: flex; flex-direction: column; min-width: 0; }
.part-txt b { font-size: 15px; }
.part-txt small { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 2px; }
.part-txt small.ok { color: #13a463; font-weight: 600; }
.part-txt small.playing { color: var(--c); font-weight: 700; }
.playing i { display: inline-block; width: 3px; height: 12px; margin-right: 1px; border-radius: 2px; background: var(--c); animation: eq .9s ease-in-out infinite; transform-origin: bottom; }
.playing i:nth-child(2) { animation-delay: -.3s; }
.playing i:nth-child(3) { animation-delay: -.6s; margin-right: 5px; }
@keyframes eq { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }

/* 讲义 */
.handout { scroll-margin-top: calc(var(--safe-t) + 70px); }
.ho-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 4px 12px; flex-wrap: wrap; }
.ho-title { display: flex; align-items: center; gap: 10px; }
.ho-title img { width: 42px; height: 42px; }
.ho-title h2 { margin: 0; font-size: 21px; line-height: 1.2; }
.ho-title span { color: var(--muted); font-size: 13px; }
.paper { position: relative; padding: 26px clamp(18px, 4vw, 48px) 34px; border-radius: 24px; background: #fff; box-shadow: var(--shadow);
  background-image: radial-gradient(color-mix(in srgb, var(--c) 9%, transparent) 1.2px, transparent 1.3px); background-size: 22px 22px; }
.ho-h { display: flex; justify-content: center; margin: 30px 0 14px; }
.ho-h:first-child { margin-top: 4px; }
.ho-h span { position: relative; padding: 7px 26px; border-radius: 14px; background: var(--hc); color: #fff; font-size: 18px; letter-spacing: 1px; box-shadow: 0 4px 0 color-mix(in srgb, var(--hc) 70%, #000); }
.ho-h span::before, .ho-h span::after { content: ''; position: absolute; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: var(--hc); opacity: .45; }
.ho-h span::before { left: -22px; }
.ho-h span::after { right: -22px; }
.ho-h2 { margin: 18px 0 8px; text-align: center; font-size: 17px; color: var(--ink); }
.ho-h2::before { content: ''; display: inline-block; width: 8px; height: 8px; margin: 0 8px 2px 0; border-radius: 3px; background: var(--c); transform: rotate(45deg); }
.ho-p { margin: 3px 0; text-align: center; font-size: 17px; line-height: 1.75; color: #4a3658; letter-spacing: .5px; }
.ho-p.b { font-weight: 700; color: var(--ink); }
.ho-py { margin: 10px 0; text-align: center; font-family: var(--py); font-size: 30px; font-weight: 700; color: var(--c); white-space: pre-wrap; letter-spacing: 1px; word-spacing: 6px; line-height: 1.5; }
.ho-py.big { font-size: 64px; line-height: 1.1; margin: 16px 0 4px; }
.ho-ruby { margin: 6px 0; text-align: center; font-size: 26px; line-height: 2.4; letter-spacing: 4px; color: var(--ink); }
.ho-ruby ruby { ruby-position: over; margin: 0 2px; }
.ho-ruby rt { font-family: var(--py); font-size: 16px; font-weight: 700; color: var(--c); letter-spacing: 0; }
.ho-ruby .punct { color: var(--muted); }
.ho-imgs { display: flex; justify-content: center; gap: 12px; margin: 12px 0; flex-wrap: wrap; }
.ho-imgs.multi .ho-img { flex: 1 1 200px; max-width: 360px; }
.ho-img { display: block; border-radius: 14px; overflow: hidden; background: #fff; cursor: zoom-in; transition: transform .15s; max-width: 100%; }
.ho-img:hover { transform: scale(1.015); }
.ho-img img { display: block; width: 100%; height: auto; }

.lec-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }
.ln { display: flex; flex-direction: column; max-width: 48%; padding: 12px 18px; border-radius: 18px; background: #fff; box-shadow: var(--shadow); transition: transform .15s; }
.ln:hover { transform: translateY(-2px); }
.ln small { color: var(--muted); }
.ln b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ln.next { text-align: right; margin-left: auto; }

.zoom { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(38, 20, 44, .86); cursor: zoom-out; overflow: auto; }
.zoom img { max-width: min(96vw, 1100px); max-height: 92vh; border-radius: 12px; background: #fff; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.zoom-x { position: fixed; top: calc(var(--safe-t) + 14px); right: 18px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--ink); font-size: 18px; font-weight: 700; }
.fade-enter-active, .fade-leave-active { transition: opacity .2s; }
.fade-enter-from, .fade-leave-to { opacity: 0; }

/* Artplayer 图层：下一段倒计时 / 本讲学完（盖在它自己的大播放按钮和控制条上面） */
.art-video-player .art-layers:has(.cd) { z-index: 70; }
.art-video-player:has(.cd) .art-mask { display: none; }
.cd { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(30, 14, 36, .72); color: #fff; font-family: var(--sans); font-size: 16px; text-align: center; padding: 16px; }
.cd img { width: 72px; height: 72px; }
.cd b { font-size: 22px; }
.cd-ring { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; border: 5px solid rgba(255, 255, 255, .3); border-top-color: #fff; animation: spin 1s linear infinite; }
.cd-ring b { animation: spin 1s linear infinite reverse; font-family: 'Fredoka', sans-serif; font-size: 30px; }
.cd-go { padding: 10px 22px; border-radius: 14px; border: 0; background: var(--c, #ff5c8a); color: #fff; font: 700 16px var(--sans); cursor: pointer; box-shadow: 0 4px 0 rgba(0, 0, 0, .25); }
.cd-x { border: 0; background: none; color: rgba(255, 255, 255, .8); font: 14px var(--sans); cursor: pointer; text-decoration: underline; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 门禁 / 加载 / 出错 */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.gate-card { max-width: 380px; width: 100%; padding: 34px 26px; border-radius: 28px; background: #fff; box-shadow: var(--shadow); text-align: center; }
.gate-card h2 { margin: 10px 0 6px; }
.gate-card p { color: var(--ink2); margin: 0 0 20px; }
.gate-emoji { width: 96px; height: 96px; animation: wob 3s ease-in-out infinite; }
.spinner { width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 50%; border: 5px solid #ffd7e3; border-top-color: var(--pink); animation: spin .9s linear infinite; }

/* ---------- 平板竖屏 / 手机 ---------- */
@media (max-width: 999px) {
  .lesson-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'stage' 'parts' 'handout'; }
  .parts { position: static; padding: 12px 0 8px; }
  .parts-head { padding: 0 16px 8px; }
  .parts-list { flex-direction: row; overflow-x: auto; max-height: none; padding: 2px 12px 6px; scroll-snap-type: x proximity; scrollbar-width: none; }
  .parts-list::-webkit-scrollbar { display: none; }
  .part { flex: none; width: 152px; flex-direction: column; align-items: stretch; gap: 6px; scroll-snap-align: start; }
  .part-thumb { width: 100%; }
  .part-txt { padding: 0 2px; }
}
@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; padding: 22px 18px 18px; border-radius: 26px; }
  .lgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .lc-top { height: 96px; }
  .lc-keys { font-size: 24px; padding: 18px 40px 0 10px; letter-spacing: 1px; word-spacing: 2px; }
  .lc-keys.long { font-size: 18px; }
  .lc-keys.cjk { font-size: 16px; }
  .lc-emoji { width: 40px; height: 40px; }
  .lc-no { font-size: 12px; left: 8px; top: 7px; }
  .lc-body { padding: 10px 12px 12px; }
  .lc-body h3 { font-size: 15px; }
  .lc-meta { flex-direction: column; align-items: flex-start; gap: 4px; font-size: 12px; }
  .lc-done { top: 6px; right: 6px; font-size: 12px; }
  .tb-btn span { display: none; }
  .tb-btn { padding: 0 10px; }
  .tb-lec .chip { display: none; }
  .player-frame { margin: 0 -10px; padding: 4px; border-radius: 18px; }
  .player { border-radius: 14px; }
  .now { gap: 8px 12px; }
  .now-btns { width: 100%; }
  .now-btns .push { flex: 1; }
  .now-btns .push-face { width: 100%; }
  .paper { padding: 20px 14px 26px; border-radius: 20px; margin: 0 -6px; }
  .ho-p { font-size: 16px; }
  .ho-py { font-size: 26px; }
  .ho-py.big { font-size: 54px; }
  .ho-ruby { font-size: 22px; letter-spacing: 2px; }
  .ho-ruby rt { font-size: 14px; }
  .ho-img { width: 100% !important; }
  .ho-imgs.multi .ho-img { flex-basis: 140px; }
}
/* 手机横屏（矮屏）：播放器尽量占满高度 */
@media (max-height: 520px) and (orientation: landscape) {
  .topbar { min-height: 46px; padding-top: 4px; padding-bottom: 4px; }
  .lesson-grid { grid-template-columns: minmax(0, 1fr) 240px; grid-template-areas: 'stage parts' 'handout handout'; }
  .player-frame { max-width: calc((100vh - 64px) * 16 / 9 + 12px); margin: 0 auto; }
  .parts { position: static; padding: 10px 6px; }
  .parts-list { flex-direction: column; overflow-y: auto; overflow-x: hidden; max-height: calc(100vh - 110px); }
  .part { width: 100%; flex-direction: row; }
  .part-thumb { width: 96px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
