/* ==========================================================================
   Melek Hoca · 在线课程样式（课程目录、课程页、练习游戏）
   依赖 style.css 里的颜色变量
   ========================================================================== */

/* ---------- 课程目录页 ---------- */
.learn-status { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.ls-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 999px;
  background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: 15px;
}
.ls-item.ok { border-color: var(--turq); background: var(--turq-pale); }
.ls-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--cobalt-soft); color: var(--cobalt); flex: none; }
.ls-item.ok .ls-icon { background: var(--turq); color: #fff; }
.ls-icon.gold { background: var(--gold-pale); color: var(--gold); }
.ls-icon svg { width: 17px; height: 17px; }
.link-btn { background: none; border: 0; padding: 0 4px; color: var(--cobalt); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 14px; }
.link-btn:hover { color: var(--red); }

.lesson-steps { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; list-style: none; margin: 0; padding: 0; counter-reset: ls; }
.lesson-steps li {
  counter-increment: ls; position: relative; text-align: center; padding: 18px 8px 14px; border-radius: 16px;
  background: var(--paper); border: 1px solid var(--line);
}
.lesson-steps .st-icon { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 8px; border-radius: 14px; background: var(--cobalt-soft); color: var(--cobalt); }
.lesson-steps li:nth-child(2) .st-icon { background: var(--turq-pale); color: var(--turq-dark); }
.lesson-steps li:nth-child(3) .st-icon { background: var(--red-pale); color: var(--red); }
.lesson-steps li:nth-child(4) .st-icon { background: var(--green-pale); color: var(--green); }
.lesson-steps li:nth-child(5) .st-icon { background: var(--gold-pale); color: var(--gold); }
.lesson-steps li:nth-child(6) .st-icon { background: var(--turq-pale); color: var(--turq-dark); }
.lesson-steps li:nth-child(7) .st-icon { background: var(--red-pale); color: var(--red); }
.lesson-steps .st-icon svg { width: 22px; height: 22px; }
.lesson-steps b { display: block; font-size: 14.5px; color: var(--cobalt-ink); line-height: 1.3; }
.lesson-steps i { display: block; font-family: var(--latin); font-size: 13px; color: var(--turq-dark); margin-bottom: 2px; }
.lesson-steps span { display: block; font-size: 12.5px; color: var(--ink-3); line-height: 1.4; margin-top: 4px; }
@media (max-width: 960px) { .lesson-steps { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px) { .lesson-steps { grid-template-columns: repeat(2, 1fr); } }

.book { margin-bottom: 56px; }
.book-head { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; margin-bottom: 22px; }
.book-spine {
  display: grid; place-items: center; width: 62px; height: 78px; border-radius: 8px 14px 14px 8px;
  background: var(--cobalt) var(--tile-dark); color: #fff; font-family: var(--latin); font-size: 30px; font-weight: 700;
  box-shadow: inset 7px 0 0 var(--cobalt-deep), var(--shadow-sm);
}
.book.is-soon .book-spine { background-color: #8b94ab; box-shadow: inset 7px 0 0 #6f7891; }
.book-title h2 { margin-bottom: 4px; }
.book-title p { margin: 0; color: var(--ink-2); max-width: 640px; }
.book-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
@media (max-width: 640px) {
  .book-head { grid-template-columns: auto 1fr; }
  .book-chips { grid-column: 1 / -1; justify-content: flex-start; }
  .book-spine { width: 50px; height: 64px; font-size: 24px; }
}

.lesson-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .lesson-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .lesson-grid { grid-template-columns: 1fr; } }
.l-card { display: flex; gap: 14px; align-items: center; padding: 14px 16px; text-decoration: none; color: var(--ink); transition: transform .2s, box-shadow .2s; }
.l-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }
.l-card .star-badge { width: 48px; height: 48px; }
.l-card .star-badge span { font-size: 17px; }
.l-body { display: flex; flex-direction: column; min-width: 0; }
.l-body .lp-tr { font-family: var(--latin); font-style: italic; color: var(--cobalt); font-size: 18px; line-height: 1.3; }
.l-body b { font-size: 14.5px; font-weight: 600; color: var(--ink-2); line-height: 1.35; }
.l-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.l-card.soon { background: transparent; box-shadow: none; border-style: dashed; }
.l-card.soon .lp-tr { color: var(--ink-3); }
.l-card.soon b { color: var(--ink-3); }
.l-card.soon:hover { transform: none; box-shadow: none; }
.l-card.locked { background: linear-gradient(180deg, var(--paper), var(--glaze-2)); }

.mini-stars { display: inline-flex; gap: 1px; vertical-align: middle; }
.mini-stars span { color: #D9D1C0; display: inline-grid; }
.mini-stars span.on { color: var(--gold); }
.mini-stars svg { width: 16px; height: 16px; }

.game-showcase { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 860px) { .game-showcase { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .game-showcase { grid-template-columns: 1fr; } }

/* ---------- 课程页：顶部 ---------- */
.lesson-hero { padding: 34px 0 34px; background: var(--tile-bg); border-bottom: 1px solid var(--line); }
.lesson-hero.slim { padding-bottom: 26px; }
.lesson-hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 40px; align-items: center; }
@media (max-width: 820px) { .lesson-hero-grid { grid-template-columns: 1fr; gap: 22px; } }
.lh-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.lh-top .eyebrow { margin: 0; }
.lesson-hero h1 { margin-bottom: 12px; }
.lh-tr { display: block; font-family: var(--latin); font-style: italic; color: var(--cobalt); font-size: clamp(38px, 6vw, 60px); line-height: 1.08; }
.lh-en { display: block; font-size: clamp(19px, 2.4vw, 24px); color: var(--ink-2); font-weight: 600; margin-top: 6px; font-family: var(--sans); letter-spacing: 0; }
.lesson-hero .lead { font-size: 17px; color: var(--ink-2); max-width: 600px; margin-bottom: 16px; }
.lh-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lh-stars .mini-stars svg { width: 20px; height: 20px; }

.lesson-cover { position: relative; margin: 0; aspect-ratio: 4 / 3; border-radius: 160px 160px 18px 18px; overflow: hidden; box-shadow: var(--shadow); border: 6px solid var(--paper); outline: 2px solid var(--gold); outline-offset: -12px; }
.lesson-cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lc-ph { position: absolute; inset: 0; display: grid; place-items: center; background: var(--cobalt) var(--tile-dark); }
.lc-ph::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 16px; background: var(--band) repeat-x center / auto 16px; }
.lc-word { font-family: var(--latin); font-style: italic; color: #fff; font-size: clamp(30px, 4vw, 44px); text-align: center; padding: 0 24px; text-shadow: 0 2px 14px rgba(0, 0, 0, .25); }
@media (max-width: 820px) { .lesson-cover { max-width: 460px; width: 100%; } }

/* ---------- 板块导航（吸顶） ---------- */
.sec-tabs {
  position: sticky; top: var(--header-h); z-index: 40;
  background: rgba(251, 247, 239, .95); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.sec-tabs-inner { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 8px 0; }
.sec-tabs-inner::-webkit-scrollbar { display: none; }
.sec-tabs a {
  flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px 6px 7px; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: none; white-space: nowrap; transition: background .2s, color .2s;
}
.sec-tabs a b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--glaze-2); color: var(--ink-3); font-size: 12px; font-family: var(--latin); }
.sec-tabs a:hover { background: var(--cobalt-soft); color: var(--cobalt); }
.sec-tabs a.active { background: var(--cobalt); color: #fff; }
.sec-tabs a.active b { background: rgba(255, 255, 255, .2); color: #fff; }

/* ---------- 课程页：板块 ---------- */
.lesson-body { padding-bottom: 72px; }
.lesson-sec { padding-top: 56px; }
.sec-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 22px; }
.sec-num {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin-top: 4px;
  font-family: var(--latin); font-weight: 700; font-size: 19px; color: #fff; background: var(--red);
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
}
.sec-head .eyebrow { margin-bottom: 0; }
.sec-head h2 { margin-bottom: 6px; }
.sec-head p { color: var(--ink-2); margin: 0; max-width: 720px; }
@media (max-width: 600px) { .lesson-sec { padding-top: 44px; } .sec-num { width: 36px; height: 36px; font-size: 16px; } }

.say { color: var(--cobalt); font-weight: 600; cursor: pointer; text-decoration: underline dotted var(--turq); text-underline-offset: 4px; text-decoration-thickness: 2px; }
.say:hover, .say.playing { color: var(--red); }

/* 目标 */
.goals-card { padding: 22px 24px; }
.goal-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 26px; }
@media (max-width: 700px) { .goal-list { grid-template-columns: 1fr; } }
.goal-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; }
.gl-check { flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%; background: var(--green-pale); color: var(--green); }
.gl-check svg { width: 14px; height: 14px; }
.audio-tip { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--turq-pale); font-size: 14.5px; color: var(--ink-2); }
.audio-tip > svg { flex: none; width: 22px; height: 22px; color: var(--turq-dark); margin-top: 2px; }
.audio-tip p { margin: 0; }

/* 字母表 */
.alpha-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13.5px; color: var(--ink-3); margin-bottom: 12px; }
.alpha-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--line); background: var(--paper); }
.lg.vowel { background: var(--turq-pale); border-color: var(--turq); }
.lg.new { background: var(--paper); border-color: var(--line); box-shadow: inset 0 -4px 0 var(--red); }
.lg.tip { background: var(--paper); position: relative; }
.lg.tip::after { content: ""; position: absolute; top: -4px; right: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.alpha-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.alpha-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.a-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px 8px;
  border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper); cursor: pointer;
  transition: transform .15s, border-color .2s, background .2s;
}
.a-tile:hover { border-color: var(--turq); transform: translateY(-2px); }
.a-tile.vowel { background: var(--turq-pale); border-color: #bfe3df; }
.a-tile.new { box-shadow: inset 0 -4px 0 var(--red); }
.a-tile.tip::after { content: ""; position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.a-tile.active, .a-tile.playing { border-color: var(--cobalt); background: var(--cobalt); }
.a-tile.active .a-l, .a-tile.active .a-w, .a-tile.playing .a-l, .a-tile.playing .a-w { color: #fff; }
.a-l { font-family: var(--latin); font-size: 26px; font-weight: 700; color: var(--cobalt-ink); line-height: 1.1; }
.a-l small { font-size: .78em; font-weight: 400; margin-left: 2px; color: var(--cobalt); }
.a-w { font-size: 12.5px; color: var(--ink-3); }
.alpha-detail { position: sticky; top: calc(var(--header-h) + 64px); overflow: hidden; }
.ad-art { position: relative; aspect-ratio: 1; display: grid; place-items: center; background: var(--glaze-2) var(--tile-bg); border-bottom: 1px solid var(--line); }
.ad-art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ad-big { font-family: var(--latin); font-size: 96px; font-weight: 700; color: var(--cobalt); line-height: 1; }
.ad-big small { font-size: .7em; font-weight: 400; color: var(--turq-dark); margin-left: 4px; }
.ad-body { padding: 16px 18px 18px; }
.ad-word { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.ad-word b { display: block; font-family: var(--latin); font-size: 24px; color: var(--cobalt-ink); line-height: 1.2; }
.ad-word span span { display: block; font-size: 14.5px; color: var(--ink-2); }
.ad-name { font-size: 13.5px; color: var(--ink-3); margin-bottom: 10px; }
.say-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px 2px 8px; margin-left: 4px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); color: var(--cobalt); font-weight: 600; cursor: pointer; font-size: 14px; }
.say-pill svg { width: 14px; height: 14px; }
.say-pill:hover, .say-pill.playing { border-color: var(--turq); background: var(--turq-pale); }
.ad-tip { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--gold-pale); color: #6d5212; font-size: 14.5px; line-height: 1.55; }
.ad-tip.plain { background: var(--glaze); color: var(--ink-3); }
@media (max-width: 860px) {
  .alpha-wrap { grid-template-columns: 1fr; }
  .alpha-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
  .a-l { font-size: 22px; }
  .a-w { font-size: 11.5px; }
  .alpha-detail { position: sticky; top: auto; bottom: 10px; display: grid; grid-template-columns: 112px 1fr; box-shadow: var(--shadow); z-index: 5; }
  .ad-art { border-bottom: 0; border-right: 1px solid var(--line); aspect-ratio: auto; min-height: 112px; }
  .ad-big { font-size: 48px; }
  .ad-body { padding: 10px 12px; }
  .ad-word { margin-bottom: 6px; gap: 8px; }
  .ad-word .icon-btn { width: 34px; height: 34px; }
  .ad-word b { font-size: 19px; }
  .ad-name { margin-bottom: 6px; font-size: 12.5px; }
  .ad-tip { font-size: 13px; padding: 7px 9px; line-height: 1.45; }
}

.vowel-chart { margin-top: 22px; padding: 22px 24px; }
.vowel-chart h3 { margin-bottom: 4px; }
.vowel-chart p { color: var(--ink-2); font-size: 15px; }
.vowel-chart table { border-collapse: separate; border-spacing: 8px; margin: 0 -8px; }
.vowel-chart th { font-size: 14px; color: var(--ink-2); text-align: left; font-weight: 600; padding: 0 6px; }
.vowel-chart th small { display: block; color: var(--ink-3); font-weight: 400; }
.vowel-chart thead th { text-align: center; }
.vowel-chart td { background: var(--glaze); border-radius: 12px; padding: 8px; text-align: center; white-space: nowrap; }
.vowel-chart tbody tr:first-child td { background: #E9F0FB; }
.vowel-chart tbody tr:last-child td { background: var(--red-pale); }
.vc-l { width: 52px; height: 52px; margin: 0 3px; border-radius: 12px; border: 0; background: var(--paper); box-shadow: var(--shadow-sm); font-family: var(--latin); font-size: 28px; font-weight: 700; color: var(--cobalt-ink); cursor: pointer; }
.vc-l:hover, .vc-l.playing { background: var(--cobalt); color: #fff; }
@media (max-width: 480px) { .vc-l { width: 42px; height: 42px; font-size: 23px; margin: 0 1px; } .vowel-chart table { border-spacing: 4px; } }

/* 对话 */
.dlg-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; font-size: 14px; }
.scene { overflow: hidden; margin-bottom: 26px; }
.scene-art { position: relative; margin: 0; aspect-ratio: 16 / 7; overflow: hidden; background: var(--cobalt-deep); }
.scene-art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sa-ph { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 16px 20px 26px; background: var(--cobalt) var(--tile-dark); }
.sa-ph::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px; background: var(--band) repeat-x center / auto 12px; }
.sa-ph span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #fff; font-size: 14px; font-weight: 600; }
.sa-ph svg { width: 16px; height: 16px; color: var(--turq-light); }
@media (max-width: 600px) { .scene-art { aspect-ratio: 16 / 8; } }
.scene-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 18px 22px 6px; }
.scene-head .eyebrow { margin-bottom: 0; font-size: 15px; }
.scene-head h3 { font-size: 21px; margin-bottom: 4px; }
.scene-head p { margin: 0; font-size: 14.5px; color: var(--ink-2); }
.scene-head .btn { flex: none; }
.scene-head .btn.on { background: var(--red); box-shadow: none; }
@media (max-width: 520px) { .scene-head { flex-direction: column; padding: 16px 16px 4px; } }

.dlg { list-style: none; margin: 0; padding: 12px 22px 22px; display: grid; gap: 12px; }
@media (max-width: 520px) { .dlg { padding: 10px 12px 18px; } }
.line { display: flex; gap: 10px; align-items: flex-end; max-width: 88%; }
.line.me { flex-direction: row-reverse; margin-left: auto; }
.avatar {
  position: relative; flex: none; width: 40px; height: 40px; display: grid; place-items: center; overflow: hidden;
  font-family: var(--latin); font-weight: 700; font-size: 18px; color: #fff; background: var(--cobalt);
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.t-cobalt { background: var(--cobalt); }
.t-turq { background: var(--turq); }
.t-red { background: var(--red); }
.t-green { background: var(--green); }
.t-gold { background: var(--gold); }
.bubble { position: relative; padding: 10px 14px 11px; border-radius: 16px 16px 16px 4px; background: var(--glaze); border: 1px solid var(--line); min-width: 0; transition: background .2s, border-color .2s, box-shadow .2s; }
.line.me .bubble { border-radius: 16px 16px 4px 16px; background: #EAF3F2; border-color: #cfe6e3; }
.who { display: block; font-size: 12px; font-weight: 700; color: var(--ink-3); letter-spacing: .02em; }
.l-tr { display: block; font-family: var(--latin); font-size: 19px; color: var(--cobalt-ink); cursor: pointer; line-height: 1.4; }
.l-tr:hover { color: var(--cobalt); }
.l-tr b, .l-tr mark { color: var(--red); background: none; font-weight: 700; }
.l-en { display: block; font-size: 14.5px; color: var(--ink-2); margin-top: 2px; transition: filter .2s; }
.hide-en .l-en { filter: blur(5px); cursor: pointer; user-select: none; }
.hide-en .l-en.reveal { filter: none; }
.line.speaking .bubble, .line .bubble:has(.l-tr.playing) { background: #fff; border-color: var(--turq); box-shadow: 0 0 0 3px var(--turq-pale); }
.dlg-note { text-align: center; font-size: 13.5px; font-style: italic; color: var(--ink-3); padding: 2px 0; }
.dlg-note::before, .dlg-note::after { content: " ❋ "; color: var(--gold); font-style: normal; }
.scene-note { display: flex; gap: 10px; margin: 0 22px 20px; padding: 12px 14px; border-radius: 12px; background: var(--gold-pale); color: #6d5212; font-size: 14.5px; }
.scene-note svg { flex: none; width: 20px; height: 20px; margin-top: 2px; }
.scene-note p { margin: 0; }
@media (max-width: 520px) { .line { max-width: 96%; } .l-tr { font-size: 17.5px; } .avatar { width: 34px; height: 34px; font-size: 15px; } .scene-note { margin: 0 12px 16px; } }

/* 生词 */
.vocab-group { margin-bottom: 26px; }
.vocab-group h3 { font-size: 18px; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.vocab-group h3::before { content: ""; width: 10px; height: 10px; background: var(--turq); transform: rotate(45deg); flex: none; }
.vocab-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 700px) { .vocab-list { grid-template-columns: 1fr; } }
.v-row {
  display: grid; grid-template-columns: 32px minmax(0, 1fr) minmax(0, 1.1fr); gap: 12px; align-items: center;
  padding: 10px 14px 10px 10px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); cursor: pointer;
  transition: border-color .2s, background .2s;
}
.v-row:hover { border-color: var(--turq); }
.v-row.playing { border-color: var(--turq); background: var(--turq-pale); }
.v-say { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--turq-pale); color: var(--turq-dark); }
.v-row.playing .v-say { background: var(--turq); color: #fff; }
.v-say svg { width: 16px; height: 16px; }
.v-tr { font-family: var(--latin); font-size: 18px; font-weight: 700; color: var(--cobalt-ink); line-height: 1.3; }
.v-en { font-size: 14.5px; color: var(--ink-2); line-height: 1.4; }
.v-en small { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
@media (max-width: 420px) { .v-row { grid-template-columns: 30px 1fr; } .v-en { grid-column: 2; margin-top: -6px; } }
.vocab-cta { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 14px; background: var(--cobalt-soft); color: var(--cobalt-ink); text-decoration: none; font-size: 15px; }
.vocab-cta > svg { flex: none; width: 22px; height: 22px; color: var(--cobalt); }
.vocab-cta span { flex: 1; }
.vocab-cta:hover { background: #dce4f5; color: var(--cobalt-ink); }

/* 数字 */
.num-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.n-tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px 10px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper); cursor: pointer; transition: border-color .2s, transform .15s; }
.n-tile:hover { border-color: var(--turq); transform: translateY(-2px); }
.n-tile.playing { background: var(--cobalt); border-color: var(--cobalt); }
.n-tile.playing b, .n-tile.playing span { color: #fff; }
.n-tile b { font-family: var(--latin); font-size: 26px; color: var(--cobalt-ink); line-height: 1.1; }
.n-tile span { font-size: 14px; color: var(--ink-2); text-align: center; line-height: 1.3; }
.num-lab { padding: 22px 24px; margin-top: 8px; background: var(--paper) var(--tile-bg); }
.nl-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.nl-head h3 { margin-bottom: 2px; }
.nl-head p { margin: 0; color: var(--ink-2); font-size: 15px; }
.nl-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--gold-pale); color: var(--gold); }
.nl-row { display: flex; flex-wrap: wrap; gap: 10px; }
.nl-input { width: 150px; height: 46px; border-radius: 12px; border: 2px solid var(--line); padding: 0 14px; font-size: 22px; font-family: var(--latin); color: var(--cobalt-ink); background: #fff; }
.nl-input:focus { outline: none; border-color: var(--turq); box-shadow: 0 0 0 4px var(--turq-pale); }
.nl-out { margin-top: 14px; min-height: 40px; font-family: var(--latin); font-style: italic; font-size: clamp(22px, 3vw, 30px); color: var(--cobalt); }

/* 语法 */
.gram-card { padding: 22px 26px; margin-bottom: 16px; }
.gram-card h3 { display: flex; gap: 12px; align-items: center; font-size: 21px; margin-bottom: 12px; }
.g-idx { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--cobalt); color: #fff; font-size: 15px; font-family: var(--latin); }
.g-content { font-size: 16px; }
.g-content > *:last-child { margin-bottom: 0; }
.g-content p { margin-bottom: .8em; }
.g-content ul { padding-left: 1.2em; margin: 0 0 1em; }
.g-content li { margin-bottom: .3em; }
.g-content table { width: 100%; border-collapse: collapse; margin: 6px 0 16px; font-size: 15px; background: var(--paper); border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.g-content th, .g-content td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.g-content th { background: var(--cobalt-soft); color: var(--cobalt-ink); font-weight: 700; font-size: 14px; }
.g-content tr:last-child td { border-bottom: 0; }
.g-content td[lang="tr"], .g-content .t { font-family: var(--latin); font-size: 16.5px; color: var(--cobalt-ink); }
.g-content .x { color: var(--red); font-weight: 700; }
.g-content .ok { color: var(--green); font-weight: 700; }
.g-content .no { color: var(--red); text-decoration: line-through; }
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.rule { display: flex; gap: 12px; padding: 12px 16px; margin: 4px 0 16px; border-radius: 12px; background: var(--turq-pale); border-left: 4px solid var(--turq); font-size: 15.5px; }
.rule.red { background: var(--red-pale); border-left-color: var(--red); }
.rule.gold { background: var(--gold-pale); border-left-color: var(--gold); }
.rule > *:last-child { margin-bottom: 0; }
.ex { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.ex:last-child { border-bottom: 0; }
.ex > span { display: flex; flex-wrap: wrap; column-gap: 12px; align-items: baseline; padding-top: 4px; }
.ex b { font-family: var(--latin); font-size: 18px; color: var(--cobalt-ink); font-weight: 700; }
.ex b b, .ex b u, .t b { color: var(--red); text-decoration: none; }
.ex > span > span { font-size: 14.5px; color: var(--ink-2); }
.ex-box { margin: 4px 0 16px; padding: 4px 14px; border-radius: 12px; background: var(--glaze); border: 1px solid var(--line); }
.harmony-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 6px 0 16px; }
.harmony-grid div { padding: 12px 8px; border-radius: 12px; text-align: center; background: var(--glaze); border: 1px solid var(--line); }
.harmony-grid div:nth-child(1) { background: #E9F0FB; }
.harmony-grid div:nth-child(2) { background: var(--red-pale); }
.harmony-grid div:nth-child(3) { background: #E9F0FB; }
.harmony-grid div:nth-child(4) { background: var(--red-pale); }
.harmony-grid small { display: block; font-size: 12.5px; color: var(--ink-3); }
.harmony-grid b { display: block; font-family: var(--latin); font-size: 22px; color: var(--cobalt-ink); }
.harmony-grid em { display: block; font-family: var(--latin); font-style: normal; font-weight: 700; font-size: 30px; color: var(--red); line-height: 1.1; }
.harmony-grid.two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 520px) { .harmony-grid { grid-template-columns: repeat(2, 1fr); } .gram-card { padding: 18px 16px; } .gram-card h3 { font-size: 19px; } }

/* 文化 */
.culture-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.cult-card { overflow: hidden; display: flex; flex-direction: column; }
.cc-art { margin: 0; aspect-ratio: 16 / 9; background: var(--glaze-2) var(--tile-bg); }
.cc-art:empty { display: none; }
.cc-art img { width: 100%; height: 100%; object-fit: cover; }
.cc-body { position: relative; padding: 20px 22px 18px; border-top: 5px solid var(--turq); flex: 1; }
.cult-card:nth-child(3n+2) .cc-body { border-top-color: var(--red); }
.cult-card:nth-child(3n+3) .cc-body { border-top-color: var(--gold); }
.cc-tag { display: inline-block; font-family: var(--latin); font-style: italic; font-size: 14px; color: var(--turq-dark); margin-bottom: 2px; }
.cc-body h3 { font-size: 19px; margin-bottom: 8px; }
.cc-body p { font-size: 15px; color: var(--ink-2); margin-bottom: .7em; }
.cc-body p:last-child { margin-bottom: 0; }
.cc-body .ex b { font-size: 16.5px; }

/* 练习 */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.game-card {
  position: relative; display: flex; gap: 14px; align-items: center; text-align: left; padding: 16px 18px; cursor: pointer; font: inherit; color: var(--ink);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.game-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--turq); }
.gc-icon { flex: none; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; color: #fff; }
.gc-icon svg { width: 25px; height: 25px; }
.gc-body b { display: block; font-size: 16.5px; color: var(--cobalt-ink); }
.gc-body span { display: block; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.gc-done { position: absolute; top: 10px; right: 10px; display: none; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: #fff; }
.gc-done svg { width: 13px; height: 13px; }
.game-card.done .gc-done { display: grid; }

.quiz-card { display: flex; gap: 20px; align-items: center; padding: 24px 26px; background: var(--paper) var(--tile-bg); }
.qc-badge { flex: none; display: grid; place-items: center; width: 72px; height: 72px; background: var(--gold); color: #fff; clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); }
.qc-badge svg { width: 34px; height: 34px; }
.qc-body { flex: 1; }
.qc-body h3 { margin-bottom: 4px; }
.qc-body p { font-size: 14.5px; color: var(--ink-2); margin-bottom: 8px; }
.qc-best { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; }
.qc-best .mini-stars svg { width: 20px; height: 20px; }
@media (max-width: 640px) { .quiz-card { flex-direction: column; align-items: flex-start; } .qc-badge { width: 58px; height: 58px; } }

/* 课末导航 */
.lesson-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 64px 0 28px; }
.ln-link { display: flex; flex-direction: column; gap: 2px; padding: 16px 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--paper); text-decoration: none; color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.ln-link:hover { border-color: var(--turq); box-shadow: var(--shadow-sm); color: var(--ink); }
.ln-link.next { text-align: right; align-items: flex-end; }
.ln-link.empty { border: 0; background: none; }
.ln-link.soon { opacity: .7; border-style: dashed; }
.ln-dir { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--turq-dark); text-transform: uppercase; letter-spacing: .05em; }
.ln-dir svg { width: 16px; height: 16px; }
.ln-link b { font-family: var(--latin); font-style: italic; font-size: 22px; color: var(--cobalt); font-weight: 400; }
.ln-link > span:last-child { font-size: 14px; color: var(--ink-2); display: inline-flex; gap: 5px; align-items: center; }
.ln-link > span:last-child svg { width: 14px; height: 14px; }
@media (max-width: 560px) { .lesson-nav { grid-template-columns: 1fr; } .ln-link.next { text-align: left; align-items: flex-start; } }
.lesson-cta { margin-top: 10px; }

/* 锁定 / 即将推出 / 出错 */
.lesson-loading { padding: 80px 20px; text-align: center; color: var(--ink-3); }
.spinner { display: inline-block; width: 20px; height: 20px; margin-right: 8px; vertical-align: -4px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--cobalt); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.notice-panel { max-width: 620px; margin: 40px auto 80px; padding: 34px 30px; text-align: center; }
.np-icon { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%; background: var(--cobalt-soft); color: var(--cobalt); }
.np-icon.locked { background: var(--red-pale); color: var(--red); }
.np-icon svg { width: 32px; height: 32px; }
.notice-panel p { color: var(--ink-2); }
.np-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.np-foot { margin: 18px 0 0; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 14.5px; }

/* ==========================================================================
   全屏游戏
   ========================================================================== */
html.game-open, html.game-open body { overflow: hidden; }
.game {
  position: fixed; inset: 0; z-index: 150; display: flex; flex-direction: column;
  background: var(--glaze) var(--tile-bg); animation: fade-in .2s ease;
}
.game-top { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--paper); border-bottom: 1px solid var(--line); }
.game-title { min-width: 0; text-align: center; line-height: 1.25; }
.game-title b { display: block; font-family: var(--serif); font-size: 18px; color: var(--cobalt-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-title span { font-size: 12.5px; color: var(--ink-3); }
.game-stat { min-width: 64px; text-align: right; font-size: 15px; color: var(--ink-2); white-space: nowrap; }
.game-stat b { color: var(--cobalt-ink); font-family: var(--latin); font-size: 17px; }
.g-bar { height: 6px; background: var(--line); }
.g-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--turq), var(--cobalt)); border-radius: 0 3px 3px 0; transition: width .3s ease; }
.game-body { flex: 1; overflow-y: auto; padding: 28px 18px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; }
.game-body > * { width: 100%; max-width: 620px; margin: auto 0; }

.g-instr { text-align: center; color: var(--ink-2); font-size: 15px; margin-bottom: 14px; }
.g-instr span { color: var(--ink-3); margin-left: 6px; }
.g-prompt { text-align: center; font-family: var(--serif); font-size: clamp(20px, 3.4vw, 26px); color: var(--cobalt-ink); line-height: 1.35; margin-bottom: 22px; }
.g-prompt b[lang="tr"], .g-prompt .t { color: var(--cobalt); font-family: var(--latin); }
.g-listen {
  display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0 auto 20px; width: 112px; height: 112px; justify-content: center;
  border-radius: 50%; border: 0; background: var(--cobalt); color: #fff; cursor: pointer; box-shadow: 0 10px 30px rgba(31, 63, 140, .3);
  transition: transform .15s, background .2s;
}
.g-listen svg { width: 40px; height: 40px; }
.g-listen span { font-size: 12px; font-weight: 600; opacity: .85; }
.g-listen:hover { background: var(--cobalt-deep); }
.g-listen:active { transform: scale(.95); }
.g-listen.playing { background: var(--turq); animation: pulse-ring 1.2s ease infinite; }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(42, 157, 153, .45); } 100% { box-shadow: 0 0 0 22px rgba(42, 157, 153, 0); } }

.g-options { display: grid; gap: 10px; }
.g-options.grid2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 420px) { .g-options.grid2 { grid-template-columns: 1fr; } }
.opt {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 12px 16px;
  border-radius: 14px; border: 2px solid var(--line); background: var(--paper); text-align: left; font-size: 16.5px; color: var(--ink);
  cursor: pointer; transition: border-color .15s, background .15s, transform .1s;
}
.opt.tr { font-family: var(--latin); font-size: 20px; color: var(--cobalt-ink); }
.opt kbd { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--glaze-2); color: var(--ink-3); font: 600 12px var(--sans); }
.opt:hover:not(:disabled) { border-color: var(--turq); background: #fff; }
.opt:active:not(:disabled) { transform: scale(.99); }
.opt:disabled { cursor: default; }
.opt.correct { border-color: var(--green); background: var(--green-pale); color: var(--green); }
.opt.correct kbd { background: var(--green); color: #fff; }
.opt.wrong { border-color: var(--red); background: var(--red-pale); color: var(--red-dark); animation: shake .4s; }
.opt.wrong kbd { background: var(--red); color: #fff; }
@media (hover: none) { .opt kbd { display: none; } }

.g-feedback { display: none; margin-top: 18px; padding: 14px 16px; border-radius: 14px; align-items: center; gap: 14px; justify-content: space-between; animation: pop-in .2s ease; }
.g-feedback.show { display: flex; }
.g-feedback.ok { background: var(--green-pale); }
.g-feedback.no { background: var(--red-pale); }
.fb-text { min-width: 0; }
.fb-text > b { font-size: 18px; color: var(--green); }
.g-feedback.no .fb-text > b { color: var(--red-dark); }
.fb-text > b small { font-size: 14px; font-weight: 600; color: var(--ink-3); }
.fb-text p { margin: 3px 0 0; font-size: 14.5px; color: var(--ink-2); }
.fb-text p b[lang="tr"] { font-family: var(--latin); color: var(--cobalt-ink); }
.g-feedback .btn { flex: none; }
@media (max-width: 520px) { .g-feedback { flex-direction: column; align-items: stretch; } }

/* 结果页 */
.g-result { text-align: center; padding: 10px 0; }
.g-result-icon { display: grid; place-items: center; width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 50%; background: var(--gold-pale); color: var(--gold); }
.g-result-icon svg { width: 40px; height: 40px; }
.g-result-icon.bolt { background: var(--red-pale); color: var(--red); }
.g-result h3 { font-size: 28px; margin-bottom: 6px; }
.g-result h3 small { display: block; font-family: var(--sans); font-size: 15px; font-weight: 600; color: var(--ink-3); margin-top: 2px; }
.g-score { font-family: var(--latin); font-size: 24px; color: var(--cobalt); margin-bottom: 6px; }
.g-note { color: var(--ink-2); font-size: 15px; max-width: 440px; margin: 0 auto 6px; }
.g-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }
.g-stars { display: flex; justify-content: center; gap: 6px; margin-bottom: 12px; }
.g-stars span { color: #D9D1C0; }
.g-stars span svg { width: 64px; height: 64px; }
.g-stars span.on { color: var(--gold); animation: star-pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.g-stars span.on:nth-child(2) { animation-delay: .15s; }
.g-stars span.on:nth-child(3) { animation-delay: .3s; }
.g-stars span:nth-child(2) svg { width: 80px; height: 80px; margin-top: -12px; }
@keyframes star-pop { from { transform: scale(0) rotate(-40deg); opacity: 0; } }

/* 闪卡 */
.fc-wrap { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.fc { width: 100%; max-width: 420px; aspect-ratio: 4 / 3; perspective: 1200px; border: 0; padding: 0; background: none; cursor: pointer; }
.fc-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .5s cubic-bezier(.3, .8, .3, 1); }
.fc.flipped .fc-inner { transform: rotateY(180deg); }
.fc-face {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px;
  border-radius: 22px; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: var(--shadow);
}
.fc-front { background: var(--paper); border: 2px solid var(--line); }
.fc-front::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 18px; border-radius: 20px 20px 0 0; background: var(--band) repeat-x center / auto 18px; }
.fc-back { background: var(--cobalt) var(--tile-dark); color: #fff; transform: rotateY(180deg); }
.fc-tr { font-family: var(--latin); font-size: clamp(30px, 7vw, 44px); font-weight: 700; color: var(--cobalt-ink); text-align: center; line-height: 1.2; }
.fc-hint { font-size: 13px; color: var(--ink-3); }
.fc-en { font-size: clamp(22px, 5vw, 30px); font-weight: 600; text-align: center; line-height: 1.3; }
.fc-small { font-family: var(--latin); font-style: italic; color: var(--turq-light); font-size: 18px; }
.fc-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; }

/* 连连看 */
.m-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.m-col { display: grid; gap: 10px; align-content: start; }
.m-item {
  min-height: 56px; padding: 10px 12px; border-radius: 14px; border: 2px solid var(--line); background: var(--paper);
  font-size: 15.5px; color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s, opacity .3s, transform .2s; line-height: 1.3;
}
.m-item.tr { font-family: var(--latin); font-size: 18.5px; color: var(--cobalt-ink); font-weight: 700; }
.m-item:hover:not(:disabled) { border-color: var(--turq); }
.m-item.sel { border-color: var(--cobalt); background: var(--cobalt-soft); transform: scale(1.02); }
.m-item.wrong { border-color: var(--red); background: var(--red-pale); animation: shake .4s; }
.m-item.done { border-color: var(--green); background: var(--green-pale); opacity: .4; cursor: default; }

/* 元音和谐快打 */
.h-cheat { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-width: 420px; margin: 16px auto 0; }
.h-cheat span { padding: 8px 4px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); font-family: var(--latin); font-size: 17px; color: var(--red); font-weight: 700; }
.h-cheat b { color: var(--cobalt-ink); font-weight: 400; }
.h-play { text-align: center; }
.h-combo { height: 26px; display: flex; align-items: center; justify-content: center; gap: 4px; color: var(--red); font-weight: 700; font-size: 15px; }
.h-combo svg { width: 18px; height: 18px; }
.h-word { font-family: var(--latin); font-size: clamp(44px, 10vw, 64px); font-weight: 700; color: var(--cobalt-ink); line-height: 1.1; }
.h-tag { display: inline-block; margin: 8px 0 22px; padding: 3px 14px; border-radius: 999px; background: var(--gold-pale); color: #8a6517; font-weight: 700; font-size: 15px; }
.h-play .opt { justify-content: center; text-align: center; }

/* 连词成句 */
.b-en { margin-bottom: 18px; }
.b-answer {
  min-height: 72px; display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; padding: 14px; margin-bottom: 16px;
  border-radius: 16px; background: var(--paper); border: 2px dashed var(--line);
}
.b-answer.ok { border-style: solid; border-color: var(--green); background: var(--green-pale); }
.b-answer.no { border-style: solid; border-color: var(--red); background: var(--red-pale); }
.b-ph { color: var(--ink-3); font-size: 14.5px; align-self: center; margin: 0 auto; }
.b-bank { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; min-height: 52px; }
.b-tok {
  padding: 9px 15px; border-radius: 12px; border: 2px solid var(--line); border-bottom-width: 4px; background: #fff;
  font-family: var(--latin); font-size: 19px; color: var(--cobalt-ink); cursor: pointer; transition: transform .1s, opacity .2s;
}
.b-tok:active { transform: translateY(2px); border-bottom-width: 2px; }
.b-tok.used { opacity: .25; cursor: default; }
.b-answer .b-tok { border-color: var(--turq); background: var(--turq-pale); }
.b-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; }
.b-actions .btn-primary { flex: 1; max-width: 240px; margin-left: auto; }
.b-full { display: flex; align-items: center; gap: 8px; }
.b-full span { font-family: var(--latin); font-size: 19px; color: var(--cobalt-ink); }

@media (prefers-reduced-motion: reduce) {
  .fc-inner, .g-stars span.on, .opt.wrong, .m-item.wrong, .g-listen.playing { transition: none; animation: none; }
}

/* 语法补充 */
.g-content h4 { font-size: 16.5px; color: var(--cobalt); margin: 18px 0 8px; }
.g-content td[lang="tr"] b, .g-content .t b { color: var(--red); }
.g-content td small, .g-content th small { font-family: var(--sans); font-size: 12px; color: var(--ink-3); font-weight: 400; }
.harmony-grid small i { font-style: normal; font-weight: 700; color: var(--ink-2); }
