/* Lộ trình 10 phút, từ lõi 80/20, mốc tuần */

/* ---------- Lộ trình 10 phút · Từ lõi 80/20 · Mốc tuần ---------- */
.ten-min {
  margin-bottom: 14px;
  border-left: 4px solid var(--minibus-red);
}

.ten-min.is-done {
  border-left-color: var(--ok);
}

.tm-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 8px;
}

.tm-step {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none !important;
  min-width: 0;
}

.tm-step:hover {
  border-color: var(--accent-2);
}

.tm-step .tm-n {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: .8rem;
  background: var(--surface-3);
  color: var(--muted);
}

.tm-step .tm-t {
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.tm-step small {
  color: var(--faint);
}

.tm-step.ok {
  border-color: color-mix(in srgb, var(--ok) 55%, transparent);
  background: color-mix(in srgb, var(--ok) 8%, var(--surface-2));
}

.tm-step.ok .tm-n {
  background: var(--ok);
  color: #fff;
}

@media (max-width: 640px) {
  .tm-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.core-meter {
  display: block;
  text-decoration: none !important;
  color: var(--text);
  margin: 14px 0;
}

.core-meter:hover {
  border-color: var(--gold);
}

.core-meter.compact {
  margin: 0;
}

.cm-big {
  color: var(--led-on);
  line-height: 1;
  margin-top: 6px;
}

.cm-big b {
  font-family: var(--font-led);
  font-size: 2.2rem;
}

.cm-big small {
  font-size: .95rem;
  font-weight: 600;
  opacity: .7;
}

.cm-pct {
  font-family: var(--font-led);
  font-size: 1.9rem;
  color: var(--gold);
  line-height: 1;
}

.core-chip {
  cursor: pointer;
  padding: 5px 10px;
  gap: 6px;
  color: var(--text);
}

.core-chip .zh {
  font-family: var(--font-zh-serif);
  font-size: 1.05rem;
}

.core-chip .cm {
  color: var(--muted);
  max-width: 16em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.core-chip:hover,
.core-chip.playing {
  border-color: var(--gold);
}

.core-row.met {
  border-color: color-mix(in srgb, var(--ok) 40%, var(--border));
}

.vrow .cl {
  color: var(--accent-2);
}

.ptc-card {
  border-left: 4px solid var(--gold);
}

.week-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  text-decoration: none !important;
  color: var(--text);
  border-style: dashed;
}

.week-strip:hover {
  border-color: var(--gold);
}

.week-strip.passed {
  border-style: solid;
  border-color: color-mix(in srgb, var(--ok) 50%, transparent);
}

.week-strip .ws-ico {
  font-size: 1.6rem;
}

.can-card.ok {
  border-color: color-mix(in srgb, var(--ok) 50%, transparent);
}

.week-pass {
  border-color: color-mix(in srgb, var(--gold) 60%, transparent);
}

.hv-table td small {
  display: block;
}

.goal-row .chip {
  white-space: normal;
  text-align: left;
}

:root[data-theme="light"] .cm-big {
  color: var(--accent-2);
}

:root[data-theme="light"] .cm-big b {
  text-shadow: none;
}

:root[data-theme="light"] .cm-pct {
  color: var(--accent);
}

/* ---------- trang bài trên điện thoại: nội dung hiện ngay màn đầu ---------- */
.goals {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 14px;
}

.goals summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.goals summary::-webkit-details-marker {
  display: none;
}

.goals summary::after {
  content: '';
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .15s;
}

.goals[open] summary::after {
  transform: rotate(-135deg);
}

.goals ul {
  margin: 0 0 10px;
  padding-left: 20px;
}

.goals li {
  margin: 3px 0;
}

.goals>small {
  display: block;
  margin: -4px 0 10px;
}

.tm-t .sh {
  display: none;
}

.task-ic {
  display: grid;
  place-items: center;
  width: 28px;
  color: var(--accent-2);
}

.task.done .task-ic {
  color: var(--ok);
}

@media (max-width: 560px) {
  .station.compact {
    padding: 12px 14px 12px;
    margin-bottom: 12px;
  }

  .station.compact .back {
    top: 10px;
    left: 14px;
    font-size: .8rem;
  }

  .station.compact .back+.plate,
  :root[data-skin] .station.compact .back+.plate {
    margin-top: 28px;
  }

  .station.compact .plate-zh {
    font-size: 1.45rem;
    line-height: 1.5;
  }

  .station.compact .plate-vi {
    font-size: .98rem;
  }

  .station.compact .side {
    position: absolute;
    top: 6px;
    right: 8px;
    gap: 4px;
  }

  .station.compact .side .btn {
    min-height: 30px;
    padding: 3px 9px;
    font-size: .78rem;
  }

  :root[data-skin] .station.compact {
    padding: 12px 16px 12px;
  }

  .ten-min {
    padding: 12px 14px;
  }

  .ten-min>small {
    display: none;
  }

  .ten-min .row.between {
    gap: 2px 10px;
  }

  .tm-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin: 8px 0 0;
  }

  .tm-step {
    padding: 8px 6px;
    align-items: center;
    text-align: center;
    gap: 3px;
  }

  .tm-step small {
    display: none;
  }

  .tm-t {
    font-size: .78rem;
  }

  .tm-t .lg {
    display: none;
  }

  .tm-t .sh {
    display: inline;
  }

  .tm-t .sh .ic {
    display: block;
    margin: 0 auto 2px;
    width: 1.35em;
    height: 1.35em;
  }

  .tm-step .tm-n {
    display: none;
  }

  .tm-step.ok .tm-t .sh .ic {
    color: var(--ok);
  }

  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    margin-left: -16px;
    margin-right: -16px;
    padding: 0 16px 2px;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tab {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  /* trang chủ: nút chính rộng hết, nút phụ xếp gọn */
  .hero .row.mt {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .hero .row.mt .btn.primary,
  .hero .row.mt .btn.k3d {
    grid-column: 1 / -1;
    min-height: 48px;
    font-size: 1rem;
  }

  .hero .row.mt .chip {
    justify-self: start;
    align-self: center;
  }
}

/* ---------- dòng nhắc chuỗi ngày trên trang chủ ---------- */
.streak-note {
  margin: 12px 0 0;
  font-size: .88rem;
  color: var(--muted);
  display: flex;
  gap: 6px;
  align-items: flex-start;
  line-height: 1.5;
}

.streak-note .ic {
  flex: 0 0 auto;
  margin-top: .2em;
  color: var(--warn);
}

.streak-note .zh {
  font-family: var(--font-zh);
  color: var(--text);
}

/* ---------- Luyện tai: cặp dễ lẫn, chính tả Jyutping ---------- */
.ear-groups {
  margin-bottom: 8px;
}

.ear-group {
  display: grid;
  gap: 6px;
  align-content: start;
  margin: 0;
  text-decoration: none;
  color: var(--text);
}

.ear-group .chip {
  justify-self: start;
}

.ear-ex {
  font-size: .92rem;
}

.ear-ex .zh {
  font-size: 1.15rem;
}

.ear-promo {
  display: grid;
  gap: 4px;
  text-decoration: none;
  color: var(--text);
  border-left: 6px solid var(--l-green);
}

.ear-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ear-opt {
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
  padding: 16px 10px;
}

.ear-opt .z {
  font-family: var(--font-zh);
  font-size: 2.4rem;
  line-height: 1.1;
}

.ear-opt .jp {
  font-size: 1.05rem;
  font-weight: 700;
}

.ear-opt.dim {
  opacity: .55;
}

.dict-form {
  display: flex;
  gap: 8px;
  margin: 10px 0 4px;
}

.dict-in {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  font-size: 1.1rem;
  padding: 8px 12px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font);
  letter-spacing: .02em;
}

.dict-in:focus {
  outline: none;
  border-color: var(--accent);
}

.dict-q .ps-tiles {
  justify-content: center;
  margin-top: 10px;
}

@media (max-width: 560px) {
  .grid.ear-groups {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .ear-group {
    padding: 12px;
    gap: 4px;
  }

  .ear-group b {
    font-size: .88rem;
    line-height: 1.35;
  }

  .ear-ex {
    font-size: .82rem;
  }
}

/* ---------- Phim & nhạc 30 ngày (影音30), học theo từng phim ---------- */
.f30-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr));
  gap: 10px;
}

.f30-cell {
  position: relative;
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  min-height: 104px;
}

.f30-cell.open {
  border: 2px solid var(--accent);
}

.f30-cell.done {
  background: color-mix(in srgb, var(--ok) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--ok) 45%, var(--border));
}

.f30-cell.locked {
  opacity: .62;
}

.f30-d {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--muted);
}

.f30-d b {
  font-family: var(--font-led);
  font-size: 1.15rem;
  color: var(--led-on);
  background: var(--led-bg);
  padding: 1px 6px 0;
  border-radius: 4px;
  margin-left: 4px;
  letter-spacing: .04em;
}

.f30-ok {
  position: absolute;
  top: 8px;
  right: 10px;
  font-family: var(--font-zh-serif);
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--bad);
  border: 2px solid var(--bad);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  transform: rotate(-12deg);
}

.f30-t {
  font-weight: 700;
  line-height: 1.35;
}

.f30-t .zh {
  font-family: var(--font-zh);
  font-size: 1.05rem;
}

.f30-step h2 {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.f30-promo {
  display: grid;
  gap: 4px;
  text-decoration: none;
  color: var(--text);
  border-left: 6px solid var(--l-brown);
}

.film-intro p {
  line-height: 1.6;
}

@media (max-width: 560px) {
  .f30-grid {
    grid-template-columns: 1fr 1fr;
  }

  .f30-cell {
    min-height: 96px;
    padding: 10px;
  }
}

/* ---------- Bắt lỗi bản lồng tiếng ---------- */
.dub {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid;
  gap: 6px;
}

.dub-h {
  font-weight: 800;
  font-size: .85rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dub-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.dub-row .zh {
  font-family: var(--font-zh);
  font-size: 1.1rem;
}

.dub-tag {
  flex: 0 0 auto;
  font-size: .72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-zh), var(--font);
}

.dub-tag.yue {
  color: var(--ok);
  border: 1px solid color-mix(in srgb, var(--ok) 50%, transparent);
}

.dub-tag.man {
  color: var(--muted);
  border: 1px solid var(--border);
}

.dub mark,
.dub-note mark {
  background: color-mix(in srgb, var(--gold) 38%, transparent);
  color: inherit;
  border-radius: 3px;
  padding: 0 2px;
}

.dub-card .dub {
  margin-top: 8px;
}

/* ---------- Kệ băng VHS (#/cinema): bìa tự vẽ, không dùng ảnh phim ---------- */
.vhs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
  gap: 12px;
}

.vhs {
  --c: #444;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 210px;
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none !important;
  color: #fff;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 92%, #fff 8%), color-mix(in srgb, var(--c) 70%, #000 30%));
  box-shadow: 0 2px 0 #000, 0 8px 18px rgba(0, 0, 0, .35);
  border: 1px solid rgba(0, 0, 0, .5);
  transition: transform .15s;
}

.vhs:hover,
.vhs:focus-visible {
  transform: translateY(-3px) rotate(-.4deg);
}

.vhs-band {
  display: flex;
  justify-content: space-between;
  padding: 5px 10px;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .12em;
  background: #111;
  color: var(--led-on);
  font-family: var(--font-zh), var(--font);
}

.vhs-body {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 12px 12px 8px;
  position: relative;
}

.vhs-body::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .55) 0 18px, transparent 18px 24px);
}

.vhs-vi {
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.25;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .5);
}

.vhs-vi2 {
  font-size: .78rem;
  opacity: .85;
}

.vhs-zh {
  font-family: var(--font-zh-serif);
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: .06em;
  line-height: 1.3;
  color: var(--cream);
}

.vhs-meta {
  font-size: .75rem;
  opacity: .85;
}

.vhs-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: .75rem;
  font-weight: 700;
  background: rgba(0, 0, 0, .35);
}

.vhs-lv {
  color: var(--sign-gold);
  white-space: nowrap;
}

.vhs-foot .chip {
  font-size: .7rem;
}

/* tô sáng câu được mở từ link #/film/<phim>/<câu> */
.fq.hl {
  box-shadow: 0 0 0 2px var(--gold), var(--shadow);
  animation: q-hl 2.4s ease-out 1;
}

@keyframes q-hl {

  0%,
  30% {
    background: color-mix(in srgb, var(--gold) 16%, var(--surface));
  }

  100% {
    background: var(--surface);
  }
}

.notice.warn {
  background: color-mix(in srgb, var(--bad) 10%, transparent);
  border-color: color-mix(in srgb, var(--bad) 40%, transparent);
}

/* ---------- Âm nhạc: một giai điệu hai lời, gốc Quan Thoại ---------- */
.melody-pair {
  border-left: 6px solid var(--l-pink);
}

.myth-card {
  border-left: 4px solid var(--faint);
}

.vn-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
}
/* =========================================================================
 * Phim & nhạc, thiết kế lại theo mẫu Mobbin (docs/plans/gop-nhanh-va-giao-dien.md, Đợt 2)
 * md-*: mảnh dùng chung (nút "?", bảng trượt, tab lọc dính, dòng danh sách, ô màu album, nhãn nhỏ)
 * ly-*: trang lời bài hát (#/music/<id>) · f30-*: 30 câu huyền thoại · vhs-dec: kệ theo thập niên · fq-*: câu thoại của phim
 * ========================================================================= */

/* nút "?" ở góc bảng tên ga */
.station .md-help {
  position: absolute;
  top: 10px;
  right: 12px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 1rem;
}

.station:has(.md-help) .plate {
  padding-right: 34px;
}

.md-sheet h2 {
  margin: 0 44px 10px 0;
}

.md-sheet h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 8px;
  font-size: 1rem;
}

.md-sheet p {
  margin: 0 0 10px;
  line-height: 1.55;
}

.md-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.md-legend li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  align-items: start;
  font-size: .9rem;
  line-height: 1.45;
}

@media (max-width: 420px) {
  .md-legend li {
    grid-template-columns: 1fr;
  }

  .md-legend li .chip {
    justify-self: start;
  }
}

/* tab lọc dính đầu trang khi cuộn */
.md-sticky {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 0 6px;
  padding: 10px 0 8px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}

.md-sticky .tabs {
  margin: 0;
}

.md-sticky .tab {
  border-radius: 999px;
}

@media (max-width: 860px) {
  .md-sticky {
    margin: 0 -16px 6px;
  }

  .md-sticky .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0;
    padding: 0 16px 2px;
  }

  .md-sticky .tabs::-webkit-scrollbar {
    display: none;
  }

  .md-sticky .tab {
    flex: 0 0 auto;
  }
}

.md-h {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 18px 0 8px;
}

.md-h small {
  font-size: .82rem;
  font-weight: 500;
}

/* ô màu album: vuông bo góc, màu theo tên bài */
.md-cover {
  --h: 0;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: var(--font-zh-serif);
  font-weight: 900;
  font-size: 1.35rem;
  color: #fff;
  background: linear-gradient(135deg, hsl(var(--h) 72% 46%), hsl(calc(var(--h) + 60) 66% 28%));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 2px 6px rgba(0, 0, 0, .25);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}

.md-cover.lg {
  width: 104px;
  height: 104px;
  border-radius: 16px;
  font-size: 2.8rem;
}

/* nhãn kiểm chứng nhỏ (chỉ dấu; chữ đầy đủ ở title) */
.md-chk {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: .8rem;
  font-weight: 800;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
}

.md-chk.ok {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 45%, transparent);
  background: color-mix(in srgb, var(--ok) 10%, transparent);
}

.md-chk.fan,
.md-chk.mem {
  border-color: color-mix(in srgb, var(--warn) 45%, transparent);
  background: color-mix(in srgb, var(--warn) 10%, transparent);
}

/* danh sách một dòng mỗi mục (bài hát) */
.md-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 2px 14px;
}

.md-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 8px 10px;
  margin: 0 -10px;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none !important;
}

.md-row:hover,
.md-row:focus-visible {
  background: var(--surface-2);
}

.md-row-t {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 1px;
}

.md-zh,
.md-vi,
.md-row-2 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.md-zh {
  font-weight: 700;
  line-height: 1.35;
}

.md-zh .zc {
  font-size: 1.08rem;
}

.md-zh .zi,
.md-zh .zj,
.md-zh .zj.long {
  white-space: nowrap;
}

.md-vi {
  font-size: .9rem;
  line-height: 1.3;
}

.md-row-2 {
  display: flex;
  gap: 4px;
  font-size: .8rem;
  line-height: 1.3;
  color: var(--muted);
}

.md-who {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- trang lời bài hát (#/music/<id>) ---------- */
.ly-head {
  display: flex;
  align-items: flex-end;
  gap: 16px;
}

.ly-meta {
  min-width: 0;
}

.ly-kind {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.ly-title {
  margin: 2px 0 0;
  font-family: var(--font-zh-serif);
  font-weight: 900;
  font-size: 2rem;
  line-height: 1.5;
  letter-spacing: .04em;
}

.ly-name {
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.35;
}

.ly-actions {
  margin-top: 14px;
}

.ly-grid {
  display: grid;
  gap: 14px;
  align-items: start;
}

@media (min-width: 1000px) {
  .ly-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  }
}

.ly-side {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.ly-side .card+.card {
  margin-top: 0;
}

/* khung lời: nền nhuộm theo màu album (vẫn theo bảng màu sáng / tối nên màu thanh điệu đọc được) */
.ly-panel {
  --h: 0;
  min-width: 0;
  padding: 14px 16px 16px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, hsl(var(--h) 60% 45%) 40%, var(--border));
  background: linear-gradient(170deg, color-mix(in srgb, hsl(var(--h) 65% 42%) 26%, var(--surface)), color-mix(in srgb, hsl(calc(var(--h) + 60) 55% 30%) 12%, var(--surface)));
  box-shadow: var(--shadow);
}

.ly-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.ly-tag {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.ly-tr[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
  border-color: transparent;
}

.ly-warn {
  display: flex;
  gap: 8px;
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: .88rem;
  line-height: 1.5;
  background: color-mix(in srgb, var(--warn) 12%, transparent);
}

.ly-warn .ic {
  margin-top: 2px;
}

.ly-lines {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.ly-line {
  display: grid;
  gap: 0;
  width: 100%;
  padding: 6px 10px 8px;
  margin: 0 -10px;
  box-sizing: content-box;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  transition: opacity .25s, background .2s;
}

button.ly-line {
  cursor: pointer;
}

button.ly-line:hover {
  background: color-mix(in srgb, var(--text) 6%, transparent);
}

.ly-zh.line-zh {
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 2.2;
}

.ly-vi {
  color: var(--muted);
  font-size: .98rem;
  line-height: 1.45;
}

.ly-novi .ly-vi {
  display: none;
}

/* dòng đang nghe / đang chọn sáng, dòng khác mờ */
.ly-lines.many .ly-line:not(.on),
.ly-live .ly-line:not(.on) {
  opacity: .42;
}

.ly-live .ly-line.on {
  background: color-mix(in srgb, var(--text) 8%, transparent);
}

.ly-practice {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px dashed color-mix(in srgb, var(--text) 22%, transparent);
}

.ly-pr-h {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 700;
}

.ly-pr-foot {
  justify-content: flex-end;
  margin-top: 8px;
}

.ly-about h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 0;
}

.ly-note {
  margin: 0 0 12px;
  line-height: 1.6;
}

.ly-facts {
  margin: 0;
  display: grid;
  gap: 0;
}

.ly-facts>div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--border);
}

.ly-facts dt {
  color: var(--muted);
  font-size: .85rem;
  font-weight: 700;
}

.ly-facts dd {
  margin: 0;
  min-width: 0;
  font-size: .92rem;
  line-height: 1.5;
}

.ly-facts dd>.ly-films,
.ly-facts dd>.ly-src,
.ly-facts dd>small,
.ly-facts dd>.vn-list {
  display: flex;
  margin-top: 6px;
}

.ly-facts dd>.vn-list {
  display: grid;
  margin-top: 0;
}

.ly-facts dd>small {
  display: block;
}

.ly-films {
  gap: 6px;
}

.ly-src {
  flex-wrap: wrap;
  gap: 4px;
  font-size: .85rem;
}

@media (max-width: 560px) {
  .ly-head {
    align-items: center;
    gap: 14px;
  }

  .md-cover.lg {
    width: 84px;
    height: 84px;
    font-size: 2.2rem;
  }

  .ly-title {
    font-size: 1.6rem;
  }

  .ly-title.long {
    font-size: 1.3rem;
    letter-spacing: .02em;
  }

  .ly-zh.line-zh {
    font-size: 1.45rem;
  }

  .ly-facts>div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* ---------- 30 câu huyền thoại: tuần gập được, có thanh tiến độ ---------- */
.f30-wk {
  margin-top: 10px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.f30-wk>summary {
  display: grid;
  grid-template-columns: 1fr auto auto;
  grid-template-areas: "h n chev" "bar bar bar";
  align-items: center;
  gap: 8px 10px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius);
}

.f30-wk>summary::-webkit-details-marker {
  display: none;
}

.f30-wk>summary:hover {
  background: var(--surface-2);
}

.f30-wk-h {
  grid-area: h;
  min-width: 0;
  line-height: 1.35;
}

.f30-wk-h b {
  font-size: 1.05rem;
}

.f30-wk-h small {
  font-size: .82rem;
}

.f30-wk-n {
  grid-area: n;
  font-family: var(--font-led);
  font-size: 1.05rem;
  color: var(--led-on);
  background: var(--led-bg);
  padding: 1px 8px 0;
  border-radius: 4px;
}

.f30-wk>summary>.ic {
  grid-area: chev;
  color: var(--muted);
  transition: transform .2s;
}

.f30-wk[open]>summary>.ic {
  transform: rotate(180deg);
}

.f30-wk-bar {
  grid-area: bar;
  height: 6px;
}

.f30-wk.full .f30-wk-bar>i {
  background: var(--ok);
}

.f30-wk .f30-grid {
  padding: 2px 14px 14px;
}

/* ---------- 30 câu huyền thoại: dải 4 bước, thẻ câu kiểu Speak ---------- */
.f30-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 0 0 12px;
}

.f30-seg {
  display: grid;
  gap: 5px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: .74rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  min-width: 0;
}

.f30-seg i {
  display: block;
  height: 6px;
  border-radius: 99px;
  background: var(--surface-3);
}

.f30-seg span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.f30-seg.ok {
  color: var(--text);
}

.f30-seg.ok i {
  background: var(--ok);
}

.f30-scene {
  --c: var(--l-brown);
  display: grid;
  gap: 6px;
  padding: 16px 18px 0;
  border-radius: var(--radius);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 18%, var(--surface)), var(--surface) 70%);
  border: 1px solid color-mix(in srgb, var(--c) 35%, var(--border));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.f30-scene-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  flex-wrap: wrap;
}

.f30-src {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 6px;
  min-width: 0;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none !important;
}

.f30-src .ic {
  align-self: center;
}

.f30-src .zh {
  font-family: var(--font-zh);
  color: var(--text);
}

.f30-src:hover .zh {
  text-decoration: underline;
}

.f30-who {
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.5;
}

.f30-who .ic {
  margin-right: 4px;
}

.f30-lines {
  display: grid;
  gap: 4px;
  padding: 6px 0 12px;
}

.f30-say .line-zh.lg {
  font-weight: 700;
  line-height: 2.1;
}

.f30-vi {
  font-size: 1.08rem;
  line-height: 1.45;
  color: var(--text);
  opacity: .82;
}

.f30-ctl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 -18px;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
}

.f30-ctl-b {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 10px 4px 12px;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none !important;
}

.f30-ctl-b+.f30-ctl-b {
  border-left: 1px solid var(--border);
}

.f30-ctl-b:hover {
  background: var(--surface-2);
}

.f30-ctl-i {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--c);
  color: #fff;
  box-shadow: 0 2px 0 color-mix(in srgb, var(--c) 60%, #000);
}

.f30-ctl-i .ic {
  width: 22px;
  height: 22px;
}

.f30-ctl-b:active .f30-ctl-i {
  transform: translateY(2px);
  box-shadow: none;
}

.f30-note {
  margin: 0 0 10px;
  line-height: 1.55;
}

/* ---------- Kho phim theo thập niên ---------- */
.vhs-dec+.vhs-dec {
  margin-top: 8px;
}

@media (max-width: 560px) {
  .vhs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .vhs {
    min-height: 0;
  }

  .vhs-body {
    padding: 10px 10px 8px;
  }

  .vhs-body::after {
    left: 10px;
    right: 10px;
  }

  .vhs-zh {
    font-size: 1.2rem;
  }

  .vhs-vi {
    font-size: .95rem;
  }

  .vhs-vi2 {
    display: none;
  }

  .vhs-meta {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .vhs-foot {
    padding: 7px 10px;
    font-size: .72rem;
  }
}

/* ---------- Trang phim: danh sách câu thoại có nút nghe ---------- */
.fq-list {
  display: grid;
  gap: 10px;
}

.fq {
  --c: var(--l-brown);
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--c);
  box-shadow: var(--shadow);
  min-width: 0;
}

.fq-main {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 6px;
}

.fq-t {
  flex: 1;
  min-width: 0;
}

.fq-vi {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.45;
}

.fq-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: 6px;
  font-size: .8rem;
  color: var(--muted);
}

.fq-meta .md-chk {
  width: 22px;
  height: 22px;
  font-size: .7rem;
}

.fq-who {
  min-width: 0;
}

.fq-meta .chip {
  font-size: .72rem;
}

.fq-play {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--ink-line, transparent);
  background: var(--c);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 0 color-mix(in srgb, var(--c) 60%, #000);
}

.fq-play .ic {
  width: 22px;
  height: 22px;
}

.fq-play:active {
  transform: translateY(2px);
  box-shadow: none;
}

.fq-more {
  border-top: 1px dashed var(--border);
  margin: 0 14px;
}

.fq-more>summary,
.fq-rest>summary {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  cursor: pointer;
  list-style: none;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 700;
}

.fq-more>summary::-webkit-details-marker,
.fq-rest>summary::-webkit-details-marker {
  display: none;
}

.fq-more>summary>.ic-chev-down,
.fq-rest>summary>.ic-chev-down {
  margin-left: auto;
  transition: transform .2s;
}

.fq-more[open]>summary>.ic-chev-down,
.fq-rest[open]>summary>.ic-chev-down {
  transform: rotate(180deg);
}

.fq-more[open] {
  padding-bottom: 12px;
}

.fq-note {
  margin: 4px 0 8px;
  font-size: .9rem;
  line-height: 1.55;
}

.fq-acts {
  margin-top: 10px;
}

.fq-off {
  border-left-color: var(--faint);
  box-shadow: none;
}

.fq-off .line-zh {
  opacity: .8;
}

.fq-rest>summary {
  padding: 8px 0;
  font-size: 1rem;
  color: var(--text);
}

.fq-rest>summary small {
  font-weight: 500;
  font-size: .8rem;
}

@media (max-width: 560px) {
  .fq-main {
    padding: 10px 12px 6px;
  }

  .fq-more {
    margin: 0 12px;
  }

  .f30-scene {
    padding: 14px 14px 0;
  }

  .f30-ctl {
    margin: 0 -14px;
  }

  .f30-say .line-zh.lg {
    font-size: 1.7rem;
  }
}
