/* Lộ trình học và các bài nhập môn. */
.curriculum { width: 100%; margin: 0 auto; }
.curriculum-standalone { max-width: 880px; }
.curriculum h1, .curriculum h2, .starter-heading h2 { letter-spacing: -.035em; line-height: 1.16; }
.curriculum h1 { font-size: clamp(2rem, 5.5vw, 3.3rem); margin: 6px 0 10px; }
.curriculum-kicker { display: inline-block; color: var(--accent); font-size: .76rem; font-weight: 800; line-height: 1.5; }
.curriculum-column { display: grid; min-width: 0; gap: 26px; }
.curriculum-side { gap: 22px; }
.curriculum-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 20px; }
.curriculum-actions .btn { min-height: 44px; }
.curriculum-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.curriculum-section-head h2, .curriculum-panel h2 { margin: 0; font-size: clamp(1.1rem, 2vw, 1.45rem); }
.curriculum-section-head > :not(h2) { font-size: .81rem; font-weight: 700; }
.curriculum-stages { display: grid; gap: 8px; }
.curriculum-resource { min-height: 65px; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 13px;
  color: var(--text); text-decoration: none !important; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.curriculum-resource:hover { border-color: color-mix(in srgb, var(--track) 65%, var(--border)); background: var(--surface-2); }
.curriculum-resource b, .curriculum-resource small, .starter-lessons b, .starter-lessons small { display: block; }
.curriculum-resource small, .starter-lessons small { color: var(--muted); line-height: 1.45; margin-top: 2px; }
.curriculum-resource > :last-child { color: var(--muted); font-size: 1.3rem; }
.curriculum-glyph { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 9px; color: var(--text);
  background: color-mix(in srgb, var(--track) 17%, var(--surface)); border: 1px solid color-mix(in srgb, var(--track) 28%, var(--border)); }
.curriculum-glyph .ic { width: 19px; height: 19px; }
.curriculum-panel { padding: 16px; border-radius: 15px; background: var(--surface); border: 1px solid var(--border); }
.curriculum-panel h2 { margin-bottom: 13px; }
.curriculum-panel .curriculum-section-head h2 { margin: 0; }
.curriculum-side .tc-meter small { display: none; }
.curriculum-stat { display: flex; align-items: center; justify-content: space-between; gap: 7px; font-size: .83rem; }
.curriculum-stat { margin: 10px 0 4px; }
.curriculum-progress { display: block; width: 100%; height: 8px; appearance: none; border: none; border-radius: 9px; background: var(--surface-3); color: var(--accent); }
.curriculum-progress::-webkit-progress-bar { background: var(--surface-3); border-radius: 9px; }
.curriculum-progress::-webkit-progress-value { background: var(--accent); border-radius: 9px; }
.curriculum-progress::-moz-progress-bar { background: var(--accent); border-radius: 9px; }
.curriculum-back { display: inline-block; margin: 4px 0 14px; font-weight: 700; }
.starter-overview { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: clamp(16px, 3vw, 30px); margin-bottom: 25px;
  background: color-mix(in srgb, var(--accent) 7%, var(--surface)); border: 1px solid var(--border); border-radius: 19px; }
.starter-overview p { max-width: 54ch; margin: 0; }
.starter-overview .tc { flex: 0 0 auto; width: clamp(82px, 15vw, 166px); }
.starter-lessons { list-style: none; padding: 0; display: grid; gap: 8px; margin: 14px 0 0; }
.starter-lessons a { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 64px; padding: 9px 13px;
  border: 1px solid var(--border); border-radius: 11px; color: var(--text); background: var(--surface); text-decoration: none !important; }
.starter-lessons a[aria-current], .starter-lessons a:hover { border-color: var(--accent); }
.curriculum-number { display: grid; place-items: center; width: 38px; height: 38px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; font-weight: 800; }
.starter-lessons a[aria-current] .curriculum-number { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.starter-duration { font-size: .77rem; color: var(--muted); white-space: nowrap; }
.curriculum-resources { display: flex; flex-wrap: wrap; gap: 12px 22px; margin: 20px 0 0; font-size: .87rem; font-weight: 700; }
.starter-heading h2 { display: block; line-height: 1.24; }
.starter-heading p { color: var(--muted); font-size: .95rem; line-height: 1.55; margin-top: 4px; max-width: 58ch; }
.st-inline-zh { font-family: var(--font-zh); font-weight: 600; font-size: 1.06em; color: var(--text); padding: 0 1px; }
.st-opt { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 3px 12px; width: 100%; text-align: left; }
.st-opt-main { font-size: 1.06rem; font-weight: 800; }
.st-opt-sub { font-size: .92rem; font-weight: 500; color: var(--muted); }
.starter-session-intro { display: grid; gap: 14px; max-width: 520px; margin: 6px auto 0; text-align: center; justify-items: center; }
.st-intro-hero { display: grid; gap: 8px; justify-items: center; }
.st-intro-hero .tc { margin: 0 auto; width: clamp(104px, 26vw, 132px); }
.st-pill-kicker { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 11%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border)); }
.starter-session-intro .starter-heading { max-width: 44ch; }
.starter-session-intro .starter-heading h2 { font-size: clamp(1.65rem, 5vw, 2.3rem); margin: 0 0 6px; }
.starter-session-intro .starter-heading p { margin-inline: auto; }
.ses:has(.starter-session-intro) .ses-bar .ses-mascot { display: none; }
.starter-goal { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0; padding: 13px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); border-bottom-width: 3px; font-weight: 600; line-height: 1.45; text-align: left; }
.starter-goal svg { width: 20px; height: 20px; flex: 0 0 auto; color: var(--accent); }
.st-intro-stats { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.st-istat { padding: 11px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); border-bottom-width: 3px; display: grid; gap: 3px; text-align: center; }
.st-istat small { display: inline-flex; align-items: center; justify-content: center; gap: 5px; font-size: .8rem; font-weight: 700; color: var(--muted); }
.st-istat small svg { width: 15px; height: 15px; }
.st-istat.is-time small svg, .st-istat.is-time b { color: var(--accent-2); }
.st-istat.is-xp small svg, .st-istat.is-xp b { color: var(--gold); }
.st-istat b { font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; }

.starter-phrases { display: grid; gap: 10px; margin-top: 12px; }
.starter-phrase { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 13px; }
.starter-phrase b, .starter-phrase small { display: block; }
.st-phrase-copy b { font-size: .98rem; margin-top: 1px; }
.starter-phrase small { color: var(--muted); margin-top: 3px; line-height: 1.48; font-size: .86rem; }
.starter-zh { line-height: 2; }
.starter-audio .act-listen { margin: 0; }
.starter-cue, .starter-transcript, .starter-recall { margin: 8px 0; padding: 9px 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.starter-transcript summary, .starter-recall summary { cursor: pointer; font-weight: 700; font-size: .9rem; }
.starter-hint { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin: 0 0 14px; }
.starter-hint span { flex: 1 1 190px; }
.cl-row .cl-tx b, .cl-row .cl-tx small { white-space: normal; }

/* ---------- nhập môn Bài 2 & 3: sân khấu tách âm, bài ghép 3 mảnh, ô nghe nổi & phòng luyện nói ---------- */
.st-formula { width: 100%; margin: 0; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); border-bottom-width: 3px; display: grid; gap: 10px; text-align: left; }
.st-formula-word { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.st-formula-main { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.st-formula-word .z { font-family: var(--font-zh); font-size: 1.75rem; font-weight: 700; line-height: 1; }
.st-formula-word small { color: var(--muted); font-weight: 700; font-size: .88rem; }
.st-formula-eq { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.st-fpart { position: relative; min-width: 0; padding: 10px 6px 9px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); border-bottom-width: 3px;
  color: var(--text); font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; transition: transform .08s, border-color .15s; }
.st-fpart:hover { border-color: var(--accent-2); }
.st-fpart:active { transform: translateY(2px); }
.st-fp-ic { position: absolute; top: 5px; right: 6px; color: var(--muted); opacity: .75; }
.st-fp-ic svg { width: 13px; height: 13px; display: block; }
.st-fpart b { font-size: 1.35rem; line-height: 1.1; }
.st-fpart.k-0 b { color: var(--accent-2); }
.st-fpart.k-1 b { color: var(--accent); }
.st-fpart.k-2 b { color: var(--t5); }
.st-fpart span { font-size: .76rem; font-weight: 700; color: var(--text); }
.st-fpart small { font-size: .75rem; color: var(--muted); line-height: 1.3; }
.st-plus { align-self: center; font-weight: 800; color: var(--muted); font-size: .95rem; padding: 0 2px; }

/* Màn dạy tách âm từng bước: thanh bước + 1 thẻ sân khấu âm thanh + thanh đánh vần liền */
.st-unit-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 2px; }
.st-step-pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 11%, var(--surface)); }
.st-step-dots { display: inline-flex; gap: 5px; }
.st-step-dots i { width: 18px; height: 6px; border-radius: 99px; background: var(--surface-3); }
.st-step-dots i.done { background: var(--ok); }
.st-step-dots i.on { width: 28px; background: var(--accent); }

.st-stage-card { margin: 8px 0; padding: 11px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); border-bottom-width: 3px; display: grid; gap: 10px; }
.st-anat-target { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding-bottom: 9px; border-bottom: 1px solid var(--border); }
.st-anat-word { display: flex; align-items: center; gap: 10px; min-width: 0; }
.st-anat-word > .z { font-family: var(--font-zh); font-size: 2.2rem; font-weight: 700; line-height: 1; }
.st-anat-jp { font-size: 1.28rem; font-weight: 800; line-height: 1.2; }
.st-anat-jp .pi, .st-anat-jp .pf, .st-anat-jp .pt { display: inline-block; padding: 1px 3px; border-radius: 5px; transition: background .15s, color .15s; }
.st-anat-jp[data-focus="i"] .pi { color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 18%, transparent); text-decoration: underline; text-underline-offset: 3px; }
.st-anat-jp[data-focus="f"] .pf { color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); text-decoration: underline; text-underline-offset: 3px; }
.st-anat-jp[data-focus="t"] .pt { background: color-mix(in srgb, currentColor 20%, transparent); padding: 0 4px; }
.st-anat-word b { display: block; font-size: .9rem; color: var(--muted); font-weight: 700; margin-top: 1px; }

.st-parts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 0; }
.st-part { --pc: var(--accent-2); position: relative; min-width: 0; min-height: 76px; padding: 8px 6px 12px; border-radius: 13px; background: var(--surface-2);
  border: 1.5px solid var(--border); border-bottom-width: 3px; color: var(--text); font: inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; transition: transform .08s, border-color .15s, background .15s; }
.st-part.is-f { --pc: var(--accent); }
.st-part.t1, .st-coach-badge.t1, .st-tone-fig.t1 > span, .st-ctone.t1, .is-tone-tile.t1, .st-btile.t1, .st-bslot.t1 { --tc: var(--t1); }
.st-part.t2, .st-coach-badge.t2, .st-tone-fig.t2 > span, .st-ctone.t2, .is-tone-tile.t2, .st-btile.t2, .st-bslot.t2 { --tc: var(--t2); }
.st-part.t3, .st-coach-badge.t3, .st-tone-fig.t3 > span, .st-ctone.t3, .is-tone-tile.t3, .st-btile.t3, .st-bslot.t3 { --tc: var(--t3); }
.st-part.t4, .st-coach-badge.t4, .st-tone-fig.t4 > span, .st-ctone.t4, .is-tone-tile.t4, .st-btile.t4, .st-bslot.t4 { --tc: var(--t4); }
.st-part.t5, .st-coach-badge.t5, .st-tone-fig.t5 > span, .st-ctone.t5, .is-tone-tile.t5, .st-btile.t5, .st-bslot.t5 { --tc: var(--t5); }
.st-part.t6, .st-coach-badge.t6, .st-tone-fig.t6 > span, .st-ctone.t6, .is-tone-tile.t6, .st-btile.t6, .st-bslot.t6 { --tc: var(--t6); }
.st-part.is-t { --pc: var(--tc, var(--t5)); }
.st-part:hover { border-color: var(--pc); }
.st-part:active { transform: translateY(2px); }
.st-part.is-on { border-color: var(--pc); background: color-mix(in srgb, var(--pc) 11%, var(--surface)); box-shadow: 0 2px 0 var(--pc); }
.st-part-ic { position: absolute; top: 5px; right: 6px; color: var(--muted); opacity: .75; }
.st-part.is-on .st-part-ic { color: var(--pc); opacity: 1; }
.st-part-ic svg { width: 13px; height: 13px; display: block; }
.st-part-sym { display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-height: 34px; }
.st-part-sym > b { font-size: 1.45rem; font-weight: 800; line-height: 1; color: var(--pc); }
.st-part-sym .spk-contour { width: 46px; height: 30px; }
.st-part.is-t .st-part-sym > b { font-size: 1.15rem; }
.st-part-role { font-size: .72rem; font-weight: 800; color: var(--text); line-height: 1.15; }
.st-part-bar { position: absolute; left: 9px; right: 9px; bottom: 4px; height: 3px; border-radius: 9px; background: var(--surface-3); overflow: hidden; }
.st-part-bar i { display: block; width: 0; height: 100%; background: var(--ok); transition: width .2s; }
.st-part.is-seen .st-part-bar i { width: 100%; }
.st-part.is-on .st-part-bar i { background: var(--pc); }

.st-coach { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); display: grid; gap: 6px; }
.st-coach-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.st-coach-title { font-size: .98rem; font-weight: 800; }
.st-coach-how { margin: 0; font-size: .94rem; line-height: 1.54; }
.st-note { margin: 0; padding: 7px 11px; border-radius: 8px; border-left: 3px solid var(--border); font-size: .86rem !important; line-height: 1.48 !important; color: var(--muted); }
.st-note b { color: var(--text); }
.st-note.is-trap { border-left-color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, var(--surface)); }
.st-note.is-tip { border-left-color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 8%, var(--surface)); }
.st-hear-row { display: flex; flex-wrap: wrap; gap: 6px; }
.st-hear-btn { padding: 4px 10px; min-height: 32px; font-size: .83rem; white-space: normal; text-align: left; }
.st-coach-next { justify-self: end; border: 0; background: transparent; color: var(--accent-2); font: inherit; font-size: .84rem; font-weight: 700; padding: 2px 4px; cursor: pointer; }
.st-coach-next:hover { text-decoration: underline; }

.st-blend { margin: 8px 0 4px; padding: 10px 12px; border-radius: 15px; background: var(--surface); border: 1.5px solid color-mix(in srgb, var(--ok) 42%, var(--border)); border-bottom-width: 3px; display: grid; gap: 8px; }
.st-blend-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.st-blend-head > b { display: inline-flex; align-items: center; gap: 6px; font-size: .92rem; }
.st-blend-head > b svg { width: 17px; height: 17px; color: var(--ok); }
.st-blend-stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.st-stage { min-width: 0; padding: 7px 6px; border-radius: 11px; border: 1px solid var(--border); border-bottom-width: 3px; background: var(--surface-2); color: var(--text);
  font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; transition: transform .12s, border-color .15s, background .15s; }
.st-stage:hover { border-color: var(--accent-2); }
.st-stage:active { transform: translateY(2px); }
.st-stage small { font-size: .69rem; color: var(--muted); font-weight: 800; line-height: 1.15; }
.st-stage b { font-size: .98rem; line-height: 1.2; }
.st-stage.is-final { background: color-mix(in srgb, var(--ok) 11%, var(--surface-2)); border-color: color-mix(in srgb, var(--ok) 48%, var(--border)); }
.st-stage.is-active { transform: translateY(-2px); border-color: var(--ok); background: color-mix(in srgb, var(--ok) 22%, var(--surface)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ok) 35%, transparent); }
.st-blend-sum { margin: 0; font-size: .83rem; color: var(--muted); line-height: 1.38; }

.st-combine { margin: 8px 0 4px; padding: 10px 12px; border-radius: 15px; background: var(--surface); border: 1px solid var(--border); border-bottom-width: 3px; display: grid; gap: 8px; }
.st-combine-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.st-combine-head > div:first-child { flex: 1 1 200px; min-width: 0; }
.st-combine-zh { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 1px 0 3px; }
.st-combine-head p { margin: 0; font-size: .84rem; color: var(--muted); line-height: 1.38; }
.st-combine-tones { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.st-ctone { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 7px; border-radius: 10px; border: 1px solid var(--border); border-bottom-width: 2px; background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; }
.st-ctone:hover { border-color: var(--tc, var(--accent)); }
.st-ctone .spk-contour { width: 52px; height: 34px; }
.st-ctone span { font-size: .82rem; font-weight: 700; }
.st-combine-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-combine-acts .act-listen { margin: 0; }

/* Bài tập ghép 3 mảnh thành tiếng (st-build) */
.st-build-card { margin: 8px 0 10px; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); border-bottom-width: 3px; display: grid; gap: 10px; }
.st-build-target { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding-bottom: 9px; border-bottom: 1px solid var(--border); }
.st-build-word { display: flex; align-items: center; gap: 10px; min-width: 0; }
.st-build-word > .z { font-family: var(--font-zh); font-size: 2.3rem; font-weight: 700; line-height: 1; }
.st-build-word b { display: block; font-size: 1rem; }
.st-build-word small { display: block; font-size: .8rem; color: var(--muted); margin-top: 1px; }
.st-build-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.st-bslot { --sc: var(--accent-2); min-width: 0; min-height: 68px; padding: 8px 6px; border-radius: 13px; border: 2px dashed var(--border); background: var(--surface-2);
  color: var(--text); font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-align: center; transition: border-color .15s, background .15s, transform .08s; }
.st-bslot.is-f { --sc: var(--accent); }
.st-bslot.is-t { --sc: var(--tc, var(--t5)); }
.st-bslot small { font-size: .76rem; font-weight: 700; color: var(--muted); }
.st-bslot b { font-size: 1.35rem; font-weight: 800; line-height: 1.1; color: var(--sc); }
.st-bslot b.is-empty { color: var(--faint); font-size: 1.2rem; }
.st-bslot.is-cur { border-color: var(--sc); background: color-mix(in srgb, var(--sc) 8%, var(--surface-2)); }
.st-bslot.is-filled { border-style: solid; border-bottom-width: 3px; border-color: var(--sc); background: color-mix(in srgb, var(--sc) 12%, var(--surface)); }
.st-bslot.is-ok { border-style: solid; border-color: var(--ok); background: color-mix(in srgb, var(--ok) 15%, var(--surface)); }
.st-bslot.is-ok b { color: var(--ok); }
.st-bslot.is-bad { border-style: solid; border-color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, var(--surface)); }
.st-bslot.is-bad b { color: var(--bad); }
.st-build-preview { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 28px; padding: 5px 10px; border-radius: 9px; background: var(--surface-2); font-size: .84rem; color: var(--muted); text-align: center; }
.st-build-preview.is-ready { color: var(--text); font-weight: 700; background: color-mix(in srgb, var(--ok) 12%, var(--surface-2)); }
.st-build-preview svg { width: 16px; height: 16px; color: var(--ok); flex: 0 0 auto; }

.st-build-bank { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.st-btile { --bc: var(--accent-2); position: relative; min-width: 0; min-height: 76px; padding: 8px 6px; border-radius: 13px; background: var(--surface);
  border: 1.5px solid var(--border); border-bottom-width: 3px; box-shadow: 0 2px 0 color-mix(in srgb, var(--field, var(--border)) 45%, var(--border));
  color: var(--text); font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; transition: transform .08s, border-color .15s, background .15s, opacity .15s; }
.st-btile.is-f { --bc: var(--accent); }
.st-btile.is-t { --bc: var(--tc, var(--t5)); }
.st-btile:hover:not(:disabled) { border-color: var(--bc); }
.st-btile:active:not(:disabled) { transform: translateY(2px); box-shadow: none; }
.st-btile.sel { border-color: var(--bc); background: color-mix(in srgb, var(--bc) 14%, var(--surface)); box-shadow: 0 2px 0 var(--bc); }
.st-btile:disabled { opacity: .55; cursor: default; }
.st-btile .kbd { display: none; }
@media (hover: hover) and (min-width: 700px) {
  .st-btile .kbd { display: inline-grid; place-items: center; position: absolute; top: 5px; right: 6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 5px;
    border: 1px solid var(--border); color: var(--faint); font-size: .68rem; font-weight: 700; }
}
.st-bt-role { font-size: .74rem; font-weight: 700; color: var(--muted); }
.st-bt-val { font-size: 1.35rem; font-weight: 800; line-height: 1.1; color: var(--bc); }
.st-bt-sub { font-size: .76rem; color: var(--muted); line-height: 1.25; }

/* Ô nghe nổi ở câu hỏi luyện nghe (st-hear-hero) */
.st-hear-hero { display: flex; align-items: stretch; justify-content: center; gap: 10px; margin: 12px auto 8px; max-width: 340px; }
.st-hear-main { flex: 1 1 auto; min-height: 92px; padding: 12px 16px; border-radius: 18px; border: 1.5px solid color-mix(in srgb, var(--hk-cream, #fff) 18%, transparent);
  background: var(--minibus-red, var(--accent)); color: var(--hk-cream, #fff); box-shadow: 0 4px 0 color-mix(in srgb, var(--minibus-red, var(--accent)) 55%, #000);
  font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; transition: transform .08s, box-shadow .08s, filter .15s; }
.st-hear-main:hover { filter: brightness(1.06); }
.st-hear-main:active { transform: translateY(3px); box-shadow: 0 1px 0 color-mix(in srgb, var(--minibus-red, var(--accent)) 55%, #000); }
.st-hear-ic svg { width: 28px; height: 28px; display: block; }
.st-hear-bars { display: inline-flex; align-items: center; gap: 3px; height: 14px; }
.st-hear-bars i { width: 3px; border-radius: 9px; background: currentColor; opacity: .82; }
.st-hear-bars i:nth-child(1), .st-hear-bars i:nth-child(5) { height: 6px; }
.st-hear-bars i:nth-child(2), .st-hear-bars i:nth-child(4) { height: 10px; }
.st-hear-bars i:nth-child(3) { height: 14px; }
.st-hear-main b { font-size: .92rem; font-weight: 800; letter-spacing: .02em; }
.st-hear-slow { flex: 0 0 92px; min-height: 92px; padding: 10px 8px; border-radius: 18px; background: var(--surface); border: 1.5px solid var(--border); border-bottom-width: 3px;
  box-shadow: 0 3px 0 color-mix(in srgb, var(--field, var(--border)) 45%, var(--border)); color: var(--text); font: inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; transition: transform .08s, border-color .15s; }
.st-hear-slow:hover { border-color: var(--accent-2); }
.st-hear-slow:active { transform: translateY(3px); box-shadow: none; }
.st-hear-slow svg { width: 24px; height: 24px; color: var(--accent-2); }
.st-hear-slow b { font-size: .86rem; font-weight: 800; }

/* Lưới 6 thanh 2 cột ở Bài 3 (is-tone-grid) */
.st-ladder-bar { margin: 8px 0 2px; }
.st-ladder-btn { width: 100%; justify-content: center; min-height: 40px; }
.starter-phrases.is-tone-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
@media (min-width: 700px) { .starter-phrases.is-tone-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.starter-phrase.is-tone-tile { display: flex; flex-direction: column; align-items: stretch; justify-content: space-between; gap: 5px; min-width: 0; padding: 9px 10px;
  border-radius: 13px; background: var(--surface); border: 1.5px solid var(--border); border-bottom: 3px solid color-mix(in srgb, var(--tc, var(--border)) 68%, var(--border));
  color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: transform .08s, border-color .15s, background .15s; }
.starter-phrase.is-tone-tile:hover { border-color: var(--tc, var(--accent)); background: color-mix(in srgb, var(--tc, var(--accent)) 7%, var(--surface)); }
.starter-phrase.is-tone-tile:active { transform: translateY(2px); }
.st-tt-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.st-tone-fig { position: relative; flex: 0 0 auto; display: grid; place-items: center; padding: 3px 14px 3px 3px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); }
.st-tone-fig .spk-contour { width: 46px; height: 32px; }
.st-tone-fig > span { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-weight: 800; font-size: .78rem; color: var(--tc); }
.st-tt-word { flex: 1; min-width: 0; }
.st-tt-word .starter-zh { line-height: 1.7; }
.st-tt-word b { font-size: .82rem; line-height: 1.2; }
.st-tt-ic { flex: 0 0 auto; color: var(--muted); }
.st-tt-ic svg { width: 16px; height: 16px; display: block; }
.st-tt-cue { font-size: .75rem; line-height: 1.3; color: var(--muted); margin: 0 !important; }

/* Màn tự nói cuối bài: thanh chuyển từ 1 dòng + thẻ luyện nói gộp dải tách âm */
.st-recall-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0; }
.st-recall-tabs { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; padding-bottom: 2px; }
.st-recall-tabs::-webkit-scrollbar { display: none; }
.st-rtab { flex: 0 0 auto; display: inline-flex; align-items: baseline; gap: 5px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--border); border-bottom-width: 2px; background: var(--surface); color: var(--text); font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; }
.st-rtab .z { font-family: var(--font-zh); font-size: 1.02rem; }
.st-rtab.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.st-recall-cnt { flex: 0 0 auto; padding: 4px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: .75rem; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.st-recall-speak { margin: 0 0 8px; padding: 14px 12px; border-bottom-width: 3px; }
.st-recall-speak .spk-card { gap: 10px; }
.st-recall-speak .spk-zh { font-size: clamp(2rem, 8vw, 2.8rem); line-height: 1.1; }
.st-recall-speak .spk-mic-zone { margin-top: 2px; }
.st-recall-speak .spk-mic { width: 74px; height: 74px; }
.st-recall-speak .spk-mic svg { width: 32px; height: 32px; }
.st-recall-parts { width: 100%; max-width: 420px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 7px 9px; border-radius: 12px; background: var(--surface-2); }
.st-rpart { display: inline-flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 3px 6px; border-radius: 9px; background: var(--surface); border: 1px solid var(--border); }
.st-rsyl { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 7px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; }
.st-rsyl:hover { background: var(--surface-2); }
.st-rsyl svg { width: 14px; height: 14px; color: var(--accent); }
.st-rsyl .z { font-family: var(--font-zh); font-size: 1.05rem; }
.st-rformula { font-size: .78rem; color: var(--muted); }
.st-rformula .ri { color: var(--accent-2); }
.st-rformula .rf { color: var(--accent); }
.st-rformula .rt.t1 { color: var(--t1); } .st-rformula .rt.t2 { color: var(--t2); } .st-rformula .rt.t3 { color: var(--t3); }
.st-rformula .rt.t4 { color: var(--t4); } .st-rformula .rt.t5 { color: var(--t5); } .st-rformula .rt.t6 { color: var(--t6); }

/* ---------- nhiệm vụ hằng ngày: dòng nhiệm vụ (App.quests.row) dùng ở trang Học, #/quests và màn chúc mừng ---------- */
.quests { margin: 10px 0 12px; display: flex; flex-direction: column; gap: 4px; }
.quest { display: flex; align-items: center; gap: 10px; padding: 4px; border-radius: 12px; }
.q-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 4px 2px; border-radius: 10px; color: var(--text); text-decoration: none !important; }
a.q-link:hover { background: var(--surface-2); }
.quest .q-ic { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--gold); background: color-mix(in srgb, var(--gold) 14%, var(--surface)); }
.quest .q-ic svg { width: 20px; height: 20px; }
.quest:not(.is-shut) .q-ic { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, var(--surface)); }
.q-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.q-main b { font-size: .9rem; font-weight: 700; }
.q-bar { position: relative; display: block; height: 16px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.q-bar i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--gold); min-width: 6px; transition: width .4s; }
.quest:not(.is-shut) .q-bar i { background: var(--ok); }
.q-bar em { position: relative; display: block; text-align: center; font-style: normal; font-size: .7rem; font-weight: 800; line-height: 16px; color: var(--text); font-variant-numeric: tabular-nums; }
/* rương: đóng xám (chưa xong) → vàng nảy nhẹ (chờ mở) → mở nắp (đã nhận tiền) */
.q-chest { flex: 0 0 auto; width: 30px; height: 26px; overflow: visible; }
.q-chest .q-box, .q-chest .q-lid { fill: color-mix(in srgb, var(--faint) 55%, var(--surface-3)); }
.q-chest .q-band { fill: color-mix(in srgb, var(--faint) 75%, var(--surface-3)); }
.q-chest .q-lock { fill: var(--surface); }
.q-chest.is-ready .q-box, .q-chest.is-open .q-box { fill: var(--hk-warm, #9a5a22); }
.q-chest.is-ready .q-band, .q-chest.is-ready .q-lock, .q-chest.is-ready .q-lid,
.q-chest.is-open .q-band, .q-chest.is-open .q-lock, .q-chest.is-open .q-lid { fill: var(--gold); }
.q-chest.is-open .q-lid { transform: translateY(-3px) rotate(-8deg); transform-origin: 4px 11px; }
.q-chest.q-big { width: 40px; height: 35px; }
:root:not([data-fx="less"]) .q-chest.is-ready { animation: q-hop 1.4s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes q-hop { 0%, 60%, 100% { transform: none; } 70% { transform: translateY(-3px) rotate(-6deg); } 80% { transform: translateY(-3px) rotate(6deg); } 90% { transform: none; } }
.q-reward, .q-claim { flex: 0 0 auto; min-width: 52px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .72rem; font-weight: 800; color: var(--muted); }
.q-reward small, .q-claim small { font-size: inherit; line-height: 1; }
.q-claim small { color: inherit; }
.quest.is-open .q-reward small { color: var(--gold); }
.q-claim { min-height: 52px; justify-content: center; padding: 5px 6px; border-radius: 12px; cursor: pointer; color: color-mix(in srgb, var(--gold) 25%, #000);
  background: var(--gold); border: 0; box-shadow: 0 4px 0 color-mix(in srgb, var(--gold) 55%, #000); }
.q-claim .q-chest .q-box { fill: var(--hk-warm, #9a5a22); }
.q-claim .q-chest .q-band, .q-claim .q-chest .q-lock, .q-claim .q-chest .q-lid { fill: var(--hk-cream, #fff6dc); }
.q-claim:active { transform: translateY(3px); box-shadow: 0 1px 0 color-mix(in srgb, var(--gold) 55%, #000); }
.q-claim.big, .q-reward.big { min-width: 64px; }
.q-claim.big .q-chest, .q-reward.big .q-chest { width: 40px; height: 35px; }

@media (max-width: 420px) {
  .starter-overview .tc { display: none; }
  .starter-phrase:not(.is-tone-tile) { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .st-part-sym .spk-contour { width: 40px; height: 26px; }
  .st-tone-fig .spk-contour { width: 42px; height: 28px; }
  .starter-lessons a { gap: 8px; padding-inline: 8px; }
  .starter-lessons small { font-size: .79rem; }
}
@media (max-width: 350px) {
  .starter-phrases.is-tone-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Trang Học: con đường học (home-page.js) ----------
 * Thanh trên dính đầu trang (chuỗi, XP, tim, nhiệm vụ) · biển tên chặng dính ngay dưới · nút tròn nổi như phím bấm,
 * xếp uốn lượn bằng --x (× --pt-dx). Thẻ của nút nằm ngay dưới nút và đẩy đường xuống, nên không che bài kế tiếp. */
.pt-home { --pt-dx: 46px; --pt-top: 61px; max-width: 1040px; margin: 0 auto; }
.pt-bar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: flex-end; gap: 14px;
  margin: -24px -32px 14px; padding: 10px 32px; min-height: var(--pt-top);
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
}
.pt-stat {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 9px; border-radius: 10px; cursor: pointer;
  color: var(--text); font-weight: 800; font-size: 1rem; font-variant-numeric: tabular-nums; text-decoration: none !important;
}
.pt-stat:hover { background: var(--surface-2); }
.pt-stat > svg { width: 24px; height: 24px; flex: 0 0 auto; }
.pt-stat small { color: var(--muted); font-size: .78em; font-weight: 700; }
.st-streak { color: var(--faint); }
.st-streak.on { color: var(--warn); }
.st-streak.on svg { fill: color-mix(in srgb, var(--warn) 35%, transparent); }
/* chưa học hôm nay: ngọn lửa xám (như Duolingo); sau 18:00 thì nhịp đỏ nhắc giữ chuỗi · 恆心會 (≥ 30 ngày): vàng */
.st-streak.on:not(.done) { color: var(--muted); }
.st-streak.on:not(.done) svg { fill: none; }
.st-streak.risk { color: var(--bad); }
:root:not([data-fx="less"]) .st-streak.risk svg { animation: sk-pulse-ic 1.6s ease-in-out infinite; }
.st-streak.gold.done { color: var(--sign-gold, #f3bd3b); }
.st-streak.gold.done svg { fill: color-mix(in srgb, var(--sign-gold, #f3bd3b) 55%, transparent); }
@keyframes sk-pulse-ic { 0%, 100% { transform: none; } 50% { transform: scale(1.18); } }
.st-xp svg { color: var(--gold); fill: color-mix(in srgb, var(--gold) 30%, transparent); }
.st-heart { color: var(--bad); cursor: default; }
.st-heart:hover { background: transparent; }
.st-heart svg { fill: currentColor; }
.st-heart.empty { color: var(--faint); }
.st-heart.empty svg { fill: none; }
.st-quest { position: relative; }
.st-quest .q-chest { width: 27px; height: 24px; }
/* có rương chờ mở: chấm đỏ như huy hiệu */
.st-quest.has-gift::after { content: ''; position: absolute; top: 5px; right: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--bg); }

.pt-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; align-items: start; }
.pt-main { min-width: 0; width: 100%; max-width: 560px; margin: 0 auto; padding-bottom: 32px; }

/* biển tên chặng: màu tuyến MTR của chặng, chữ kem, nút sổ tay bên phải */
.pt-unit { margin-bottom: 22px; }
.pt-head {
  position: sticky; top: var(--pt-top); z-index: 30; display: flex; align-items: stretch; margin: 0 0 30px; border-radius: 14px;
  color: var(--hk-cream, var(--cream)); background: var(--line); box-shadow: 0 4px 0 color-mix(in srgb, var(--line) 60%, #000);
}
.pt-head-tx { flex: 1; min-width: 0; padding: 11px 16px 12px; }
.pt-head small { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: color-mix(in srgb, currentColor 82%, transparent); }
.pt-head h2, :root[data-theme] .pt-head h2 { margin: 2px 0 0; font-size: 1.15rem; color: inherit; }
.pt-book {
  flex: 0 0 58px; display: grid; place-items: center; color: inherit; border-radius: 0 14px 14px 0;
  border-left: 2px solid color-mix(in srgb, #000 22%, transparent);
}
.pt-book:hover { background: color-mix(in srgb, #fff 12%, transparent); }
.pt-book svg { width: 24px; height: 24px; }
.pt-jump { display: flex; align-items: center; justify-content: center; gap: 6px; margin: -14px 0 22px; font-size: .86rem; font-weight: 700; }
.pt-jump svg { width: 16px; height: 16px; }

.pt-path { list-style: none; margin: 0; padding: 0 0 6px; display: flex; flex-direction: column; gap: 20px; }
.pt-step { position: relative; display: flex; flex-direction: column; align-items: center; }
.pt-step:has(.pt-tag) { margin-top: 38px; }
.pt-node {
  --c: var(--line); position: relative; width: 70px; height: 64px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; background: var(--c); color: var(--hk-cream, #fff);
  box-shadow: 0 7px 0 color-mix(in srgb, var(--c) 58%, #000);
  transform: translateX(calc(var(--x) * var(--pt-dx))); transition: transform .08s, box-shadow .08s, filter .15s;
}
.pt-node:hover { filter: brightness(1.06); }
.pt-node:active { transform: translateX(calc(var(--x) * var(--pt-dx))) translateY(5px); box-shadow: 0 2px 0 color-mix(in srgb, var(--c) 58%, #000); }
.pt-node > svg { width: 30px; height: 30px; stroke-width: 2.4; }
.pt-node.is-done > svg { stroke-width: 3; }
.pt-node.is-todo, .pt-node.is-lock { --c: var(--surface-3); color: var(--faint); }
/* bài đang học: vòng tiến độ quanh nút */
.pt-node.is-cur::before {
  content: ''; position: absolute; inset: -11px -11px -17px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(var(--line) calc(var(--p) * 1%), var(--surface-3) 0);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
  mask: radial-gradient(closest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
}
.pt-lock {
  position: absolute; right: -5px; bottom: -8px; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%;
  background: var(--surface); color: var(--muted); border: 2px solid var(--surface-3);
}
.pt-lock svg { width: 14px; height: 14px; }
/* nhãn "Bắt đầu / Học tiếp" nhấp nhô trên nút đang học */
.pt-tag {
  position: absolute; bottom: calc(100% + 24px); left: 50%; z-index: 2; transform: translateX(calc(-50% + var(--x) * var(--pt-dx)));
  padding: 6px 13px; border-radius: 11px; white-space: nowrap; pointer-events: none;
  background: var(--surface); border: 2px solid var(--surface-3); color: color-mix(in oklab, var(--line) 75%, var(--text));
  font-weight: 800; font-size: .8rem; letter-spacing: .05em; text-transform: uppercase;
}
.pt-tag::after {
  content: ''; position: absolute; top: 100%; left: 50%; width: 11px; height: 11px; background: var(--surface);
  border-right: 2px solid var(--surface-3); border-bottom: 2px solid var(--surface-3); transform: translate(-50%, -5px) rotate(45deg);
}
:root:not([data-fx="less"]) .pt-tag { animation: pt-bob 1.6s ease-in-out infinite; }
@keyframes pt-bob { 50% { translate: 0 -4px; } }
/* thẻ của nút: màu tuyến cho bài đã mở, nền thường cho bài chưa tới */
.pt-pop {
  position: relative; z-index: 3; width: min(340px, 100%); margin-top: 20px; padding: 14px 16px 16px; border-radius: 16px; text-align: left;
  background: var(--line); color: var(--hk-cream, #fff); box-shadow: 0 12px 28px -14px rgba(0, 0, 0, .6);
}
.pt-pop[hidden] { display: none; }
.pt-pop::before {
  content: ''; position: absolute; top: -7px; left: calc(50% + var(--x) * var(--pt-dx)); width: 14px; height: 14px;
  background: inherit; transform: translateX(-50%) rotate(45deg); border-radius: 2px;
}
.pt-pop small { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.pt-pop b { display: block; margin: 2px 0 4px; font-size: 1.08rem; line-height: 1.3; }
.pt-pop p { margin: 0 0 12px; font-size: .9rem; opacity: .92; }
.pt-pop .pt-go {
  display: flex; width: 100%; min-height: 46px; justify-content: center; text-transform: uppercase; letter-spacing: .04em; font-weight: 800;
  background: var(--hk-cream, #fff); color: color-mix(in oklab, var(--line) 85%, #000); border-color: transparent;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--line) 55%, #000);
}
.pt-pop .pt-go:hover { filter: brightness(1.04); background: var(--hk-cream, #fff); }
.pt-more { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; color: inherit; font-size: .86rem; font-weight: 700; }
.pt-more svg { width: 17px; height: 17px; }
.pt-pop.is-todo, .pt-pop.is-lock { background: var(--surface); color: var(--text); border: 2px solid var(--surface-3); }
.pt-pop.is-todo::before, .pt-pop.is-lock::before { top: -9px; border-left: 2px solid var(--surface-3); border-top: 2px solid var(--surface-3); }
.pt-pop.is-todo small, .pt-pop.is-lock small { color: var(--muted); opacity: 1; }
.pt-pop.is-todo .pt-go, .pt-pop.is-lock .pt-go { background: var(--line); color: var(--hk-cream, #fff); }
.pt-pop.is-todo .pt-go:hover, .pt-pop.is-lock .pt-go:hover { background: var(--line); }
.pt-pop.is-todo .pt-more, .pt-pop.is-lock .pt-more { color: var(--accent-2); }
.pt-note { color: var(--muted); }
/* Tiểu Cường đứng cạnh bài đang học, phía đối diện chỗ đường uốn */
.pt-guide { position: absolute; top: -4px; left: calc(50% + var(--side) * 122px); transform: translateX(-50%); pointer-events: none; }
.pt-guide .tc { margin: 0; }

@media (max-width: 980px) { .pt-grid { grid-template-columns: minmax(0, 1fr) 260px; gap: 22px; } }
@media (max-width: 860px) {
  .pt-bar {
    justify-content: space-between; gap: 4px; margin: -14px calc(-1 * max(16px, env(safe-area-inset-right, 0px))) 12px calc(-1 * max(16px, env(safe-area-inset-left, 0px)));
    padding: max(10px, env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) 10px max(14px, env(safe-area-inset-left, 0px));
  }
  .pt-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  /* tiến độ và nhiệm vụ đã có trên thanh trên; dưới đường chỉ còn luyện thêm và Tiểu Cường */
  .pt-side .pt-wide { display: none; }
  .pt-side { padding-top: 22px; border-top: 1px solid var(--border); }
}
@media (max-width: 360px) { .pt-home { --pt-dx: 38px; } .pt-guide { display: none; } }

/* ---------- trang Nhiệm vụ hằng ngày (#/quests) ---------- */
.qp { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; padding-bottom: 20px; }
.qp-head {
  position: relative; display: flex; align-items: flex-end; gap: 12px; min-height: 150px; padding: 54px 20px 18px; border-radius: 20px; overflow: hidden;
  color: var(--hk-cream, #fff); background: var(--l-purple); box-shadow: 0 5px 0 color-mix(in srgb, var(--l-purple) 60%, #000);
}
.qp-x { position: absolute; top: 12px; left: 12px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: inherit; }
.qp-x:hover { background: color-mix(in srgb, #fff 14%, transparent); }
.qp-x svg { width: 24px; height: 24px; }
.qp-ht { flex: 1; min-width: 0; }
.qp-head h1, :root[data-theme] .qp-head h1 { margin: 0 0 6px; font-size: clamp(1.5rem, 6vw, 2rem); color: inherit; }
.qp-head p { margin: 0; display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; opacity: .92; }
.qp-head p svg { width: 18px; height: 18px; }
.qp-tc { flex: 0 0 auto; margin: -20px -4px -18px 0; }
.qp-tc .tc { width: 110px; }
.qp-card { padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); border-bottom-width: 3px; }
.qp-card h2 { margin: 0; font-size: 1.12rem; }
.qp-mrow { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.qp-mtx { flex: 1; min-width: 0; }
.qp-mtx small { display: block; margin-top: 3px; color: var(--muted); line-height: 1.4; }
.qp-month .q-bar { height: 20px; }
.qp-month .q-bar i { background: var(--l-purple); }
.qp-month .q-bar em { line-height: 20px; }
.qp-bonus { margin-top: 6px; padding-top: 12px; border-top: 1px dashed var(--border); border-radius: 0; }
.qp-note { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin: 0; color: var(--muted); font-size: .9rem; }
.qp-note > svg { width: 20px; height: 20px; color: var(--gold); }
.qp-note span { flex: 1 1 200px; }
.qp-go { justify-content: center; }
/* màn chúc mừng sau bài học */
.ses-chest { display: grid; place-items: center; width: 110px; height: 96px; margin: 0 auto; border-radius: 50%; background: color-mix(in srgb, var(--gold) 16%, var(--surface)); }
.ses-chest .q-chest { width: 72px; height: 63px; }
.ses-quests { width: 100%; max-width: 420px; margin: 6px auto 10px; text-align: left; }
@media (max-width: 860px) { .qp-head { margin-top: 2px; } }
