@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/bvp-400-vietnamese.woff2) format('woff2');unicode-range:U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/bvp-400-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/bvp-400-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:500;font-display:swap;src:url(fonts/bvp-500-vietnamese.woff2) format('woff2');unicode-range:U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:500;font-display:swap;src:url(fonts/bvp-500-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:500;font-display:swap;src:url(fonts/bvp-500-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:600;font-display:swap;src:url(fonts/bvp-600-vietnamese.woff2) format('woff2');unicode-range:U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:600;font-display:swap;src:url(fonts/bvp-600-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:600;font-display:swap;src:url(fonts/bvp-600-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:700;font-display:swap;src:url(fonts/bvp-700-vietnamese.woff2) format('woff2');unicode-range:U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:700;font-display:swap;src:url(fonts/bvp-700-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:700;font-display:swap;src:url(fonts/bvp-700-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:800;font-display:swap;src:url(fonts/bvp-800-vietnamese.woff2) format('woff2');unicode-range:U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:800;font-display:swap;src:url(fonts/bvp-800-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Be Vietnam Pro';font-style:normal;font-weight:800;font-display:swap;src:url(fonts/bvp-800-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Charis SIL';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/charis-400-vietnamese.woff2) format('woff2');unicode-range:U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB}
@font-face{font-family:'Charis SIL';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/charis-400-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Charis SIL';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/charis-400-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
/* Lưu Loát — giao diện app hiện đại: nền màu loang nhẹ, thẻ trắng bo lớn đổ bóng ánh xanh, mỗi kỹ năng một màu,
   chữ Be Vietnam Pro; dạ quang vàng chỉ dành cho chữ đang được đọc. */
:root {
  --bg: #f2f4fb; --paper: #ffffff; --wash: #f4f6fc; --wash2: #e8ecf7; --ink: #141b34; --ink2: #3c4663; --pencil: #6b7590;
  --line: #e6e9f3; --line2: #d3d8e6; --pen: #3355e8; --pen-d: #2440c9; --pen-wash: #eaefff; --on-pen: #ffffff;
  --hl: #ffd84d; --hl-ink: #141b34; --red: #e0444d; --red-wash: #fdecee; --green: #0f9f68; --green-wash: #e3f7ee;
  --amber: #b26b00; --amber-wash: #fff4dc;
  --grad: linear-gradient(135deg, #6a86ff 0%, #3355e8 48%, #2131b3 100%);
  --sh: 0 1px 2px rgba(20, 27, 52, .05), 0 12px 32px -16px rgba(51, 85, 232, .28);
  --sh-pop: 0 14px 34px -12px rgba(51, 85, 232, .55);
  --glass: rgba(255, 255, 255, .78);
  --h0: #e9edf6; --h1: #9aaeeb; --h2: #6e87e0; --h3: #4462d2; --h4: #2446c8;
  --s1: #2446c8; --s2: #c98500; --s3: #9b3fb0;
  --sans: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ipa: 'Charis SIL', 'Be Vietnam Pro', Georgia, serif;
  --r1: 10px; --r2: 16px; --r3: 24px;
  --tab-h: 66px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #090e1d; --paper: #121a30; --wash: #18213a; --wash2: #212b47; --ink: #eef1f9; --ink2: #c3cbe0; --pencil: #8f99b3;
    --line: rgba(255, 255, 255, .07); --line2: rgba(255, 255, 255, .14); --pen: #7c95ff; --pen-d: #9fb1ff; --pen-wash: #1c2752; --on-pen: #ffffff;
    --red: #ff7a80; --red-wash: #3a1d25; --green: #3fd39a; --green-wash: #11302a; --amber: #ffc25c; --amber-wash: #34280f;
    --grad: linear-gradient(135deg, #5a78ff 0%, #3a52e0 50%, #1f2a8f 100%);
    --sh: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 12px 30px -16px rgba(0, 0, 0, .7);
    --glass: rgba(18, 26, 48, .78);
    --h0: #1b2338; --h1: #36498e; --h2: #4660c0; --h3: #6d86ea; --h4: #9db0ff; --s1: #6d86ea; --s2: #b98325; --s3: #b264c6; color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #090e1d; --paper: #121a30; --wash: #18213a; --wash2: #212b47; --ink: #eef1f9; --ink2: #c3cbe0; --pencil: #8f99b3;
  --line: rgba(255, 255, 255, .07); --line2: rgba(255, 255, 255, .14); --pen: #7c95ff; --pen-d: #9fb1ff; --pen-wash: #1c2752; --on-pen: #ffffff;
  --red: #ff7a80; --red-wash: #3a1d25; --green: #3fd39a; --green-wash: #11302a; --amber: #ffc25c; --amber-wash: #34280f;
  --grad: linear-gradient(135deg, #5a78ff 0%, #3a52e0 50%, #1f2a8f 100%);
  --sh: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 12px 30px -16px rgba(0, 0, 0, .7);
  --glass: rgba(18, 26, 48, .78);
  --h0: #1b2338; --h1: #36498e; --h2: #4660c0; --h3: #6d86ea; --h4: #9db0ff; --s1: #6d86ea; --s2: #b98325; --s3: #b264c6; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100dvh; font: 400 16px/1.5 var(--sans); color: var(--ink); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  background:
    radial-gradient(900px 520px at -15% -8%, color-mix(in srgb, var(--pen) 16%, transparent), transparent 62%),
    radial-gradient(720px 460px at 115% 2%, color-mix(in srgb, #12b886 13%, transparent), transparent 60%),
    radial-gradient(760px 520px at 50% 115%, color-mix(in srgb, #9b5cff 10%, transparent), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--pen); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.015em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--pen); outline-offset: 2px; border-radius: 8px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.en { font-family: var(--sans); }
.muted { color: var(--pencil); }
.small { font-size: 13px; }
.hl { background: linear-gradient(transparent 12%, var(--hl) 12%, var(--hl) 88%, transparent 88%); color: var(--hl-ink); padding: 0 4px; margin: 0 -4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; border-radius: 3px; }
.ipa { font-family: var(--ipa); color: var(--pencil); font-size: 17px; }
.ipa .pos { font-family: var(--sans); font-size: 12.5px; margin-left: 10px; padding: 2px 8px; border-radius: 99px; background: var(--wash2); color: var(--ink2); }
.ipa.sm { font-size: 14px; }
.ok, .good-t { color: var(--green); }
.bad-t { color: var(--red); }
.card { background: var(--paper); border-radius: var(--r3); box-shadow: var(--sh); }

/* ---------- khung ---------- */
#app { min-height: 100dvh; }
main { padding: calc(var(--safe-t) + 16px) 16px calc(var(--tab-h) + var(--safe-b) + 40px); max-width: 760px; margin: 0 auto; outline: none; }
#app.focus main { padding-bottom: calc(var(--safe-b) + 28px); }
.tabs { position: fixed; z-index: 20; left: 12px; right: 12px; bottom: calc(var(--safe-b) + 10px); height: var(--tab-h); display: flex; padding: 6px; gap: 2px; background: var(--glass); backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6); border: 1px solid color-mix(in srgb, var(--line2) 60%, transparent); border-radius: 24px; box-shadow: 0 10px 30px -12px rgba(20, 27, 52, .25); }
.tabs .brand { display: none; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--pencil); text-decoration: none; font-size: 11px; font-weight: 600; border-radius: 18px; transition: background .2s, color .2s; }
.tab.on { color: var(--pen); background: var(--pen-wash); }
#app.focus .tabs { display: none; }
@media (min-width: 900px) {
  .tabs { top: 16px; bottom: 16px; left: 16px; right: auto; width: 220px; height: auto; flex-direction: column; justify-content: flex-start; gap: 4px; padding: 22px 12px; border-radius: 28px; }
  .tabs .brand { display: flex; align-items: center; gap: 10px; font: 800 22px/1.2 var(--sans); color: var(--ink); text-decoration: none; padding: 0 10px 22px; letter-spacing: -0.02em; }
  .tabs .brand::before { content: ''; width: 30px; height: 30px; border-radius: 10px; background: url(icons/favicon-64.png) center/cover; box-shadow: var(--sh-pop); }
  .tab { flex: 0; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 12px 14px; border-radius: 16px; font-size: 15px; }
  #app.focus .tabs { display: flex; }
  main, #app.focus main { margin-left: max(252px, calc((100vw - 760px) / 2 + 126px)); padding: 36px 32px 60px; }
}

/* ---------- chữ trang ---------- */
.page-t { font: 800 32px/1.12 var(--sans); margin: 6px 0 16px; letter-spacing: -0.025em; }
.lead { font-size: 16.5px; line-height: 1.6; color: var(--ink2); margin: 4px 0 16px; max-width: 62ch; }
.sec-t { font-size: 19px; font-weight: 700; margin: 28px 0 12px; }
.sub-t { font-size: 14px; color: var(--pencil); font-weight: 600; margin: 18px 4px 8px; }
.note { display: flex; gap: 10px; align-items: flex-start; background: var(--paper); border-radius: var(--r2); padding: 13px 15px; margin: 14px 0; font-size: 15px; box-shadow: var(--sh); }
.note.ok { background: var(--green-wash); box-shadow: none; }
.note .ic { flex: none; margin-top: 2px; color: var(--pen); }
.foot-note { color: var(--pencil); font-size: 13px; margin: 22px 4px 0; text-align: center; }

/* ---------- nút ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: var(--r2); border: 0; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; transition: transform .12s, box-shadow .2s, background .2s; touch-action: manipulation; letter-spacing: -0.005em; }
.btn.primary { background: var(--grad); color: #fff; box-shadow: var(--sh-pop); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: var(--paper); color: var(--ink); box-shadow: var(--sh); }
.btn.ghost:hover { background: var(--wash); }
.btn.quiet { background: none; color: var(--pen); padding: 0 8px; }
.btn.big { min-height: 56px; font-size: 17px; width: 100%; border-radius: 18px; }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.ib { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; border: 0; background: none; color: var(--ink); cursor: pointer; flex: none; transition: background .15s; }
.ib:hover { background: var(--wash2); }
.ib[aria-pressed='true'] { background: var(--pen-wash); color: var(--pen); }
.ib.tiny { width: 32px; height: 32px; vertical-align: middle; color: var(--pen); border-radius: 10px; }
.linkbtn { background: none; border: 0; color: var(--pen); padding: 8px 2px; cursor: pointer; font-weight: 600; }
.linkbtn.danger, .danger .btn { color: var(--red); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.actions > .btn { flex: 1 1 140px; }
.actions.sticky { position: sticky; bottom: calc(var(--tab-h) + var(--safe-b) + 20px); background: linear-gradient(transparent, var(--bg) 35%); padding-top: 18px; margin-bottom: 0; z-index: 5; }
#app.focus .actions.sticky { bottom: calc(var(--safe-b) + 10px); }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 14px 0; }
.inline { display: flex; gap: 10px; align-items: center; }
.inline .inp { flex: 1; }

/* ---------- ô biểu tượng màu theo kỹ năng / chủ đề ---------- */
.tile { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex: none; box-shadow: 0 8px 16px -10px rgba(20, 27, 52, .5), inset 0 1px 0 rgba(255, 255, 255, .25); background: linear-gradient(135deg, #8a99b8, #5b6785); }
.tile.sm { width: 36px; height: 36px; border-radius: 12px; }
.t-listen { background: linear-gradient(135deg, #4f9dff, #2563eb); }
.t-speak { background: linear-gradient(135deg, #ff6fae, #db2777); }
.t-read { background: linear-gradient(135deg, #2dd4bf, #0d9488); }
.t-write { background: linear-gradient(135deg, #fbbf24, #d97706); }
.t-vocab { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.t-grammar { background: linear-gradient(135deg, #fb923c, #ea580c); }
.t-pron { background: linear-gradient(135deg, #38bdf8, #0284c7); }
.t-test { background: linear-gradient(135deg, #34d399, #059669); }
.t-life { background: linear-gradient(135deg, #34d399, #0f9f6e); }
.t-work { background: linear-gradient(135deg, #818cf8, #4f46e5); }
.t-story { background: linear-gradient(135deg, #c084fc, #9333ea); }
.t-auto { background: linear-gradient(135deg, #60a5fa, #1d4ed8); }
.t-coffee { background: linear-gradient(135deg, #c08457, #7c4a26); }
.t-ielts { background: linear-gradient(135deg, #fb7185, #e11d48); }
.t-news { background: linear-gradient(135deg, #94a3b8, #475569); }

/* ---------- chip, cấp độ ---------- */
.lv { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.lv-A1 { background: #dff7ea; color: #067a4c; } .lv-A2 { background: #d4f5f1; color: #0b6f67; } .lv-B1 { background: #dcecff; color: #1559b8; }
.lv-B2 { background: #e2e5ff; color: #3b3fc4; } .lv-C1 { background: #efe5ff; color: #6a2bd0; } .lv-C2 { background: #ffe3ea; color: #b4123f; }
:root[data-theme='dark'] .lv { filter: saturate(1.2) brightness(.9); }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: var(--wash2); color: var(--ink2); }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; }
.fchip { flex: none; height: 36px; padding: 0 15px; border-radius: 99px; border: 0; background: var(--paper); font-size: 14px; font-weight: 600; cursor: pointer; color: var(--ink2); box-shadow: var(--sh); }
.fchip.on { background: var(--ink); color: var(--bg); box-shadow: none; }
.score { font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 99px; }
.score.hi { background: var(--green-wash); color: var(--green); } .score.mid { background: var(--amber-wash); color: var(--amber); } .score.lo { background: var(--red-wash); color: var(--red); }
.item-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 2px 0 14px; }

/* ---------- thanh trên ---------- */
.topbar { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 6px; margin: -4px -4px 10px; min-height: 48px; }
.topbar .back { background: var(--paper); box-shadow: var(--sh); }
.tb-title { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-right { display: flex; align-items: center; gap: 4px; padding-right: 6px; }

/* ---------- tiến độ ---------- */
.bar { height: 8px; border-radius: 99px; background: var(--wash2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width .4s; }
.bar.thin { height: 5px; margin-top: 8px; }
.ring { display: block; }

/* ---------- chọn đoạn ---------- */
.seg { display: inline-flex; background: var(--wash2); border-radius: 14px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; min-height: 38px; padding: 0 13px; border-radius: 11px; font-size: 14px; cursor: pointer; color: var(--pencil); font-weight: 700; }
.seg button.on { background: var(--paper); color: var(--ink); box-shadow: 0 2px 6px rgba(20, 27, 52, .12); }
.seg.small button { min-height: 34px; padding: 0 11px; }

/* ---------- toast, tấm trượt ---------- */
#toast { position: fixed; z-index: 60; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 24px); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 16px; font-size: 15px; font-weight: 600; max-width: min(92vw, 460px); transition: .25s; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .4); }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(9, 14, 29, .45); backdrop-filter: blur(2px); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { width: 100%; max-width: 560px; max-height: 86dvh; overflow: auto; background: var(--paper); border-radius: 28px 28px 0 0; padding: 8px 22px calc(var(--safe-b) + 24px); outline: none; animation: up .22s ease-out; }
.sheet::before { content: ''; display: block; width: 40px; height: 5px; border-radius: 9px; background: var(--line2); margin: 0 auto 6px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: var(--paper); padding: 4px 0; }
.sheet-head h2 { font-size: 15px; color: var(--pencil); font-weight: 600; }
@media (min-width: 700px) { .scrim { align-items: center; } .sheet { border-radius: 28px; padding-bottom: 24px; } .sheet::before { display: none; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.empty { padding: 30px 6px; color: var(--pencil); text-align: center; display: grid; gap: 14px; justify-items: center; }
.loading { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 70px 0; color: var(--pencil); }
.spin { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--line2); border-top-color: var(--pen); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.boot { padding: 40px 20px; color: var(--pencil); }

/* ---------- Hôm nay ---------- */
.today-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 18px; }
.avatar { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; background: var(--grad); color: #fff; font: 800 20px/1 var(--sans); box-shadow: var(--sh-pop); flex: none; }
.today-head .who-t { flex: 1; min-width: 0; }
.hello { font: 800 21px/1.2 var(--sans); letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.date { color: var(--pencil); font-size: 14px; margin-top: 2px; }
.streak { display: flex; align-items: center; gap: 4px; padding: 8px 12px; border-radius: 99px; background: var(--paper); color: var(--pencil); font-weight: 800; box-shadow: var(--sh); }
.streak.on { background: linear-gradient(135deg, #ffb347, #ff6a3d); color: #fff; box-shadow: 0 10px 22px -10px rgba(255, 106, 61, .7); }
.hero { position: relative; overflow: hidden; border-radius: 28px; padding: 22px 20px 20px; background: var(--grad); color: #fff; box-shadow: var(--sh-pop); margin-bottom: 6px; }
.hero::before { content: ''; position: absolute; width: 260px; height: 260px; right: -90px; top: -110px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .28), transparent 65%); }
.hero::after { content: ''; position: absolute; width: 220px; height: 220px; left: -80px; bottom: -130px; border-radius: 50%; background: radial-gradient(circle, rgba(120, 220, 255, .35), transparent 65%); }
.hero > * { position: relative; z-index: 1; }
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.hero-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 99px; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .25); font-size: 12.5px; font-weight: 700; color: #fff; backdrop-filter: blur(4px); }
.hero-k { font-size: 13px; font-weight: 600; opacity: .85; margin-top: 14px; }
.hero-t { font: 800 25px/1.2 var(--sans); margin: 4px 0 4px; letter-spacing: -0.02em; text-wrap: balance; }
.hero-sub { opacity: .88; font-size: 15px; }
.hero-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 12px 0 16px; }
.hero .btn.go { background: #fff; color: #2440c9; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .45); min-height: 52px; padding: 0 26px; border-radius: 16px; }
.hero .lv { background: rgba(255, 255, 255, .92); }
.hero-ring { position: relative; width: 74px; height: 74px; flex: none; }
.hero-ring .ring { position: absolute; inset: 0; }
.hero-ring span { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-size: 11px; line-height: 1.1; font-weight: 600; opacity: .95; }
.hero-ring b { display: block; font-size: 18px; font-weight: 800; }
.hero.fin { background: linear-gradient(135deg, #34d399 0%, #0f9f68 55%, #0b6b48 100%); box-shadow: 0 14px 34px -12px rgba(15, 159, 104, .55); }
.sess { margin-top: 20px; }
.sess-head { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 4px 8px; }
.sess-head h2 { font-size: 17px; }
.blks { list-style: none; display: grid; gap: 10px; }
.blk { display: grid; grid-template-columns: 1fr auto; align-items: center; background: var(--paper); border-radius: 20px; box-shadow: var(--sh); transition: transform .12s; }
.blk:active { transform: scale(.99); }
.blk.next { box-shadow: 0 0 0 2px var(--pen), var(--sh); }
.blk-main { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 12px 6px 12px 12px; color: inherit; text-decoration: none; min-height: 68px; min-width: 0; }
.blk-text { display: grid; gap: 2px; min-width: 0; }
.blk-title { font-weight: 700; font-size: 15.5px; line-height: 1.3; }
.blk-sub { font-size: 13px; color: var(--pencil); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blk-min { font-size: 12.5px; color: var(--pencil); white-space: nowrap; font-weight: 600; background: var(--wash); padding: 4px 8px; border-radius: 99px; }
.blk-check { width: 30px; height: 30px; margin: 0 12px 0 4px; border-radius: 50%; border: 2px solid var(--line2); background: transparent; display: grid; place-items: center; cursor: pointer; color: #fff; }
.blk.done { opacity: .72; box-shadow: none; background: color-mix(in srgb, var(--paper) 70%, transparent); }
.blk.done .blk-check { background: var(--green); border-color: var(--green); }
.blk.done .blk-title { text-decoration: line-through; text-decoration-color: var(--line2); }
.blk.next .blk-check { border-color: var(--pen); }

/* ---------- Lộ trình ---------- */
.chart-wrap { position: relative; margin: 8px 0 6px; max-width: 640px; background: var(--paper); border-radius: var(--r3); box-shadow: var(--sh); padding: 14px 10px 8px; }
.chart { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--pencil); font: 600 11px var(--sans); }
.chart .cefr { font-weight: 800; }
.chart .band { fill: var(--pen); opacity: .16; }
.chart .mid { fill: none; stroke: var(--pen); stroke-width: 2.5; }
.chart .phase-line { stroke: var(--line2); stroke-dasharray: 2 4; }
.chart .target { stroke: #e11d48; stroke-dasharray: 6 5; stroke-width: 1.4; }
.chart .tgt { fill: #e11d48; font-weight: 800; }
.chart .you-line { stroke: var(--ink); stroke-width: 1; opacity: .5; }
.chart .you-dot { fill: var(--hl); stroke: var(--ink); stroke-width: 2; }
.chart .res-dot { fill: var(--pen); stroke: var(--paper); stroke-width: 2; }
.chart .cross { stroke: var(--pencil); stroke-width: 1; }
.tip { position: absolute; z-index: 5; pointer-events: none; background: var(--ink); color: var(--bg); border-radius: 12px; padding: 8px 11px; font-size: 13px; line-height: 1.35; display: grid; opacity: 0; transition: opacity .12s; white-space: nowrap; }
.tip.on { opacity: 1; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.facts > div { padding: 14px 14px 12px; background: var(--paper); border-radius: 20px; box-shadow: var(--sh); min-width: 0; }
.facts dt { font-size: 12.5px; color: var(--pencil); font-weight: 600; }
.facts dd { margin: 4px 0 0; font: 800 20px/1.15 var(--sans); letter-spacing: -0.02em; }
.facts dd.muted { font: 500 12px/1.35 var(--sans); color: var(--pencil); letter-spacing: 0; }
.facts.four { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .facts.four { grid-template-columns: repeat(4, 1fr); } }
.honest { background: linear-gradient(135deg, #fff6e0, #ffe9c7); color: #5b3b00; border-radius: var(--r3); padding: 16px 18px; margin: 12px 0 8px; }
:root[data-theme='dark'] .honest { background: linear-gradient(135deg, #3a2b0d, #2c210b); color: #ffd99a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .honest { background: linear-gradient(135deg, #3a2b0d, #2c210b); color: #ffd99a; } }
.honest h2 { font-size: 16px; margin-bottom: 6px; }
.phases { list-style: none; display: grid; gap: 12px; }
.phases > li { min-width: 0; }
.phase { position: relative; min-width: 0; padding: 16px 16px 16px 18px; background: var(--paper); border-radius: 22px; box-shadow: var(--sh); }
.phase::before { content: ''; position: absolute; left: 0; top: 18px; bottom: 18px; width: 4px; border-radius: 0 4px 4px 0; background: var(--line2); }
.phase.past::before { background: var(--green); }
.phase.cur { box-shadow: 0 0 0 2px var(--pen), var(--sh); }
.phase.cur::before { background: var(--grad); }
.ph-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.ph-head h3 { font: 800 18px/1.25 var(--sans); }
.ph-days { color: var(--pencil); font-size: 13.5px; margin: 4px 0 8px; }
.ph-band { margin-left: 8px; color: var(--pen); font-weight: 800; }
.ph-goal { margin-bottom: 12px; color: var(--ink2); font-size: 15px; }
.ph-mix { overflow: hidden; display: flex; gap: 3px; border-radius: 12px; overflow: hidden; font-size: 11px; }
.mix { padding: 6px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; color: #fff; font-weight: 600; }
.mix b { font-weight: 800; }
.mix-pron { background: #0284c7; } .mix-vocab { background: #7c3aed; } .mix-listen { background: #2563eb; } .mix-shadow { background: #db2777; } .mix-grammar { background: #ea580c; } .mix-read { background: #0d9488; } .mix-write { background: #d97706; } .mix-speak { background: #be185d; }
.ph-test { margin-top: 10px; font-size: 13.5px; color: var(--pen); font-weight: 700; }
.why { list-style: none; display: grid; gap: 10px; }
.why li { background: var(--paper); border-radius: 18px; padding: 13px 15px; box-shadow: var(--sh); font-size: 15px; }

/* ---------- lịch học, thanh kỹ năng ---------- */
.hmap { max-width: 420px; }
.hm.h0 { fill: var(--h0); } .hm.h1 { fill: var(--h1); } .hm.h2 { fill: var(--h2); } .hm.h3 { fill: var(--h3); } .hm.h4 { fill: var(--h4); }
.hm-legend { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--pencil); margin: 8px 4px 2px; }
.hm-k { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.hm-k.h0 { background: var(--h0); } .hm-k.h1 { background: var(--h1); } .hm-k.h2 { background: var(--h2); } .hm-k.h3 { background: var(--h3); } .hm-k.h4 { background: var(--h4); }
.sbars { display: grid; gap: 10px; background: var(--paper); border-radius: var(--r3); box-shadow: var(--sh); padding: 16px; }
.sbar { display: grid; grid-template-columns: 84px 1fr 46px; gap: 10px; align-items: center; font-size: 14px; font-weight: 600; }
.sb-track { height: 12px; background: var(--wash2); border-radius: 99px; overflow: hidden; }
.sb-track i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }
.sb-val { color: var(--pencil); text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- danh sách ---------- */
.list { list-style: none; display: grid; gap: 10px; }
.list > li.li-h { padding: 0; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: inherit; text-decoration: none; min-height: 64px; background: var(--paper); border-radius: 20px; box-shadow: var(--sh); transition: transform .12s; }
.row:active { transform: scale(.99); }
.row-main { flex: 1; display: grid; gap: 3px; min-width: 0; }
.row-t { font-weight: 700; }
.row-t.en { font-size: 16.5px; }
.row-s { color: var(--pencil); font-size: 13.5px; }
.row-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.row-m { display: grid; text-align: right; }
.row-ic { color: var(--pen); display: grid; }
.row > .ic:last-child { color: var(--line2); flex: none; }
.ok-mark { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--green); color: #fff; flex: none; }
.lib-tabs, .modes { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 14px; padding: 2px 16px 6px; }
.lib-tabs a, .modes a { flex: none; padding: 9px 15px; color: var(--ink2); text-decoration: none; font-weight: 700; font-size: 14.5px; border-radius: 99px; background: var(--paper); box-shadow: var(--sh); }
.lib-tabs a.on, .modes a.on { color: #fff; background: var(--grad); box-shadow: var(--sh-pop); }
.lib-count { margin: 0 4px 10px; }

/* ---------- bài nghe ---------- */
.script { display: grid; gap: 8px; padding-bottom: 8px; }
.ln { padding: 12px 14px; border-radius: 18px; cursor: pointer; background: var(--paper); box-shadow: var(--sh); border: 2px solid transparent; transition: border-color .15s, background .15s; }
.ln.para { margin-top: 10px; }
.ln.on { border-color: var(--pen); background: color-mix(in srgb, var(--pen) 7%, var(--paper)); }
.who { display: inline-block; font-size: 12px; font-weight: 800; color: #fff; margin-bottom: 4px; padding: 2px 9px; border-radius: 99px; background: #64748b; }
.sp0 .who { background: #2563eb; } .sp1 .who { background: #db2777; } .sp2 .who { background: #0d9488; } .sp3 .who { background: #d97706; }
.ln-en, .say, .reading .en { font-size: 19px; line-height: 1.6; font-weight: 500; letter-spacing: -0.005em; }
.ln-vi, .reading .vi { color: var(--pencil); font-size: 14.5px; margin-top: 4px; }
.script.no-vi .ln-vi, .reading.no-vi .vi { display: none; }
.script.blind .ln-en { filter: blur(7px); }
.script.blind .ln.on .ln-en { filter: blur(4px); }
.w { border-radius: 5px; cursor: pointer; transition: background .08s; padding: 0 1px; }
.w.on { background: var(--hl); color: var(--hl-ink); box-shadow: 0 0 0 2px var(--hl); }
.m-ok { color: var(--green); } .m-near { color: var(--amber); text-decoration: underline wavy; text-underline-offset: 4px; } .m-miss { color: var(--red); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.controls { position: sticky; bottom: calc(var(--safe-b) + 10px); background: var(--glass); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5); border: 1px solid color-mix(in srgb, var(--line2) 60%, transparent); border-radius: 26px; padding: 12px 14px 14px; margin-top: 14px; display: grid; gap: 10px; box-shadow: 0 16px 40px -14px rgba(20, 27, 52, .35); z-index: 5; }
.scrubrow { display: flex; align-items: center; gap: 10px; }
.scrub { flex: 1; accent-color: var(--pen); height: 26px; }
.tm { font-size: 12.5px; color: var(--pencil); font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.ctl-row { display: flex; align-items: center; justify-content: center; gap: 12px; }
.ctl-row.speeds { justify-content: space-between; gap: 6px; }
.ctl-row.speeds .seg { flex: 1; justify-content: space-between; flex-wrap: nowrap; }
.ctl-row.speeds .seg button { padding: 0 4px; flex: 1; }
.play-main { width: 66px; height: 66px; border-radius: 50%; border: 0; background: var(--grad); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: var(--sh-pop); }
.play-main:active { transform: scale(.95); }
.gloss { margin: 12px 0; background: var(--paper); border-radius: 20px; box-shadow: var(--sh); padding: 4px 16px; }
.gloss summary { cursor: pointer; font-weight: 700; padding: 10px 0; }
.gloss ul { list-style: none; display: grid; gap: 6px; padding: 4px 0 12px; }
.wsheet { display: grid; gap: 8px; padding-bottom: 8px; }
.ws-top { display: flex; align-items: center; justify-content: space-between; }
.ws-word { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; }
.ws-vi { font-size: 18px; font-weight: 600; }
.ws-ctx { color: var(--pencil); }
.ws-ex { font-size: 17px; margin-top: 6px; }
.ws-exv { color: var(--pencil); font-size: 14px; }

/* nhại theo, nhập vai */
.shadow { display: grid; gap: 14px; background: var(--paper); border-radius: var(--r3); box-shadow: var(--sh); padding: 18px; }
.say { font-size: 23px; line-height: 1.45; font-weight: 600; }
.micwrap { display: grid; justify-items: center; gap: 8px; margin: 10px 0; }
.mic { width: 88px; height: 88px; border-radius: 50%; border: 0; background: linear-gradient(135deg, #ff6fae, #db2777); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 16px 30px -12px rgba(219, 39, 119, .65); }
.mic.rec { background: linear-gradient(135deg, #ff7a7a, #e0444d); animation: pulse 1.3s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(224, 68, 77, .45); } 70% { box-shadow: 0 0 0 20px rgba(224, 68, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(224, 68, 77, 0); } }
.live { min-height: 22px; color: var(--pencil); text-align: center; font-size: 15px; }
.hint { color: var(--pencil); font-size: 14px; }
.sh-score { font: 800 34px/1 var(--sans); }
.sh-score.good { color: var(--green); } .sh-score.mid { color: var(--amber); } .sh-score.bad { color: var(--red); }
.heard { font-size: 14px; color: var(--pencil); }
.chat { display: grid; gap: 10px; padding-bottom: 20px; }
.bub { max-width: 86%; padding: 11px 15px; border-radius: 20px; background: var(--paper); box-shadow: var(--sh); }
.bub.them { border-bottom-left-radius: 6px; }
.bub.me { justify-self: end; background: var(--grad); color: #fff; border-bottom-right-radius: 6px; box-shadow: var(--sh-pop); }
.bub.me .vi { color: rgba(255, 255, 255, .85); }
.bub .en { font-size: 17.5px; font-weight: 500; }
.bub .vi { color: var(--pencil); font-size: 14px; }
.bub .sh-score { font-size: 18px; margin-top: 4px; }
.bub.me .m-ok { color: #b9ffd9; } .bub.me .m-near { color: #ffe08a; } .bub.me .m-miss { color: #ffc2c6; }
.rp-ctl { display: grid; justify-items: center; gap: 4px; }
.rp-pick { display: grid; gap: 12px; }
.rp-end { text-align: center; display: grid; gap: 8px; justify-items: center; padding: 20px 0; }

/* đọc */
.reading { display: grid; gap: 10px; }
.rd-ln, .rd-p { background: var(--paper); border-radius: 18px; box-shadow: var(--sh); padding: 14px 16px; }
.rd-ln .en, .rd-p .en { font-size: 18.5px; line-height: 1.7; }
.rd-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.sent { border-radius: 4px; transition: background .12s; }
.sent.on { background: color-mix(in srgb, var(--pen) 14%, transparent); }
.mini-player { display: flex; align-items: center; gap: 8px; }
.passage { background: var(--wash); border-radius: 16px; padding: 10px 14px; max-height: 42vh; overflow: auto; }
.passage summary { cursor: pointer; color: var(--pencil); font-size: 14px; font-weight: 600; }
.passage p { font-size: 16.5px; line-height: 1.6; margin-top: 8px; }

/* ---------- bài tập ---------- */
.ex { display: flex; flex-direction: column; min-height: calc(100dvh - 60px); }
.ex-head { display: flex; align-items: center; gap: 10px; margin: -4px -4px 16px; }
.ex-head .bar { flex: 1; height: 10px; }
.ex-count { font-size: 13px; color: var(--pencil); white-space: nowrap; padding-right: 6px; font-weight: 700; }
.ex-body { flex: 1; display: grid; align-content: start; gap: 16px; }
.ex-cap { font-size: 13px; color: var(--pencil); font-weight: 600; }
.ex-q { display: grid; gap: 8px; }
.ex-ins { color: var(--pencil); font-size: 14.5px; font-weight: 600; }
.ex-q .q { font-size: 22px; line-height: 1.4; font-weight: 700; letter-spacing: -0.01em; }
.ex-sub { color: var(--pencil); }
.blank { display: inline-block; min-width: 3em; border-bottom: 3px solid var(--pen); color: transparent; border-radius: 2px; }
.ex-audio { display: flex; align-items: center; gap: 12px; }
.play-big { width: 72px; height: 72px; border-radius: 22px; border: 0; background: var(--grad); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: var(--sh-pop); }
.opts { display: grid; gap: 10px; }
.opts.pair { grid-template-columns: 1fr 1fr; }
.opt { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 12px 16px; border: 2px solid transparent; border-radius: 18px; background: var(--paper); text-align: left; cursor: pointer; font-size: 17px; font-weight: 600; box-shadow: var(--sh); transition: border-color .12s, background .12s, transform .1s; }
.opt:active { transform: scale(.99); }
.opt.en { font-size: 17.5px; }
.opts.pair .opt { flex-direction: column; justify-content: center; text-align: center; font-size: 22px; gap: 2px; min-height: 96px; }
.opt .key { width: 26px; height: 26px; flex: none; border-radius: 8px; background: var(--wash2); display: grid; place-items: center; font: 800 12px var(--sans); color: var(--pencil); }
.opts.pair .opt .key { display: none; }
.opt.sel { border-color: var(--pen); background: color-mix(in srgb, var(--pen) 8%, var(--paper)); }
.opt.sel .key { background: var(--pen); color: #fff; }
.opt.right { border-color: var(--green); background: var(--green-wash); }
.opt.wrong { border-color: var(--red); background: var(--red-wash); }
.opt .radio { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--line2); }
.opt.sel .radio { border: 7px solid var(--pen); }
.inp { width: 100%; min-height: 52px; padding: 13px 16px; border: 2px solid transparent; border-radius: 16px; background: var(--paper); font-size: 18px; box-shadow: var(--sh); }
textarea.inp { resize: vertical; line-height: 1.55; }
.inp:focus { border-color: var(--pen); outline: none; }
.inp.right { border-color: var(--green); } .inp.wrong { border-color: var(--red); }
.inp.search { margin: 6px 0 14px; }
.order-line { min-height: 70px; display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; padding: 12px; border-radius: 18px; background: var(--paper); box-shadow: var(--sh); border: 2px solid transparent; }
.order-line.right { border-color: var(--green); } .order-line.wrong { border-color: var(--red); }
.order-line .ph { color: var(--pencil); font-size: 14px; }
.order-pool { display: flex; flex-wrap: wrap; gap: 8px; }
.order-pool .tile, .order-line .tile { width: auto; height: auto; min-height: 44px; padding: 0 15px; border: 0; border-radius: 14px; background: var(--paper); color: var(--ink); font-size: 17px; font-weight: 600; cursor: pointer; box-shadow: 0 3px 0 var(--line2), var(--sh); display: inline-flex; align-items: center; }
.order-line .tile { background: color-mix(in srgb, var(--pen) 10%, var(--paper)); }
.order-pool .tile.used { visibility: hidden; }
.ex-foot { position: sticky; bottom: 0; padding: 14px 0 calc(var(--safe-b) + 10px); background: linear-gradient(transparent, var(--bg) 22%); display: grid; gap: 10px; }
.fb { border-radius: 20px; padding: 14px 16px; display: grid; gap: 4px; }
.fb.good { background: var(--green-wash); } .fb.bad { background: var(--red-wash); } .fb.mid { background: var(--amber-wash); }
.fb-title { display: flex; gap: 6px; align-items: center; font-weight: 800; font-size: 17px; }
.fb.good .fb-title { color: var(--green); } .fb.bad .fb-title { color: var(--red); } .fb.mid .fb-title { color: var(--amber); }
.fb-ans b { font-weight: 700; }
.fb-why, .fb-note { font-size: 14px; color: var(--ink2); }
.fb-diff { font-size: 17px; font-weight: 600; }
.fb-score { font-weight: 800; }
.result { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 26px 16px; background: var(--paper); border-radius: 28px; box-shadow: var(--sh); margin-bottom: 10px; }
.result-pct { font: 800 40px/1.1 var(--sans); letter-spacing: -0.03em; }
.result .ring + .result-pct { margin-top: -86px; margin-bottom: 46px; font-size: 30px; }
.result-msg { font-size: 18px; font-weight: 700; }
.result-sub { color: var(--pencil); }
.review { margin-top: 10px; display: grid; gap: 10px; }
.review h2 { font-size: 17px; margin: 6px 4px; }
.rv { padding: 14px 16px; background: var(--paper); border-radius: 18px; box-shadow: var(--sh); display: grid; gap: 4px; }
.rv-q { font-size: 16.5px; font-weight: 600; }
.rv-a { font-size: 14px; }
.rv-why { font-size: 14px; color: var(--pencil); }
.skillsplit { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 6px 0 14px; }
.skillsplit > div { display: grid; gap: 2px; padding: 12px 14px; background: var(--paper); border-radius: 18px; box-shadow: var(--sh); font-weight: 600; }
.skillsplit b { font-size: 22px; font-weight: 800; }

/* ---------- từ vựng ---------- */
.wcard { display: grid; gap: 10px; background: var(--paper); border-radius: 28px; box-shadow: var(--sh); padding: 22px 20px; position: relative; overflow: hidden; }
.wcard::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(90deg, #a78bfa, #3355e8, #2dd4bf); }
.wc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wc-word { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.wc-word.big { font-size: 42px; line-height: 1.1; }
.wc-vi { font-size: 20px; font-weight: 700; color: var(--pen); }
.wc-vi.big { font: 800 28px/1.3 var(--sans); color: var(--ink); }
.wc-ex { border-radius: 16px; background: var(--wash); padding: 12px 14px; margin-top: 4px; }
.wc-ex .en { font-size: 17px; font-weight: 600; }
.wc-ex .vi { color: var(--pencil); font-size: 14.5px; margin-top: 2px; }
.wc-tags { margin-top: 2px; }
.snd-btn { background: var(--grad); color: #fff; box-shadow: var(--sh-pop); border-radius: 16px; }
.card-stage { flex: 1; display: grid; align-content: center; gap: 14px; min-height: 52vh; }
.page.study { display: flex; flex-direction: column; min-height: calc(100dvh - 46px); }
.page.study .card-stage { flex: 1; }
.front { display: grid; gap: 10px; justify-items: start; background: var(--paper); border-radius: 28px; box-shadow: var(--sh); padding: 26px 22px; }
.new-tag { display: inline-flex; gap: 6px; align-items: center; color: #7c3aed; font-weight: 800; font-size: 13px; background: #f1e9ff; padding: 5px 11px; border-radius: 99px; justify-self: start; }
.rates { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rate { display: grid; gap: 2px; justify-items: center; padding: 10px 4px; border-radius: 18px; border: 0; background: var(--paper); cursor: pointer; min-height: 64px; box-shadow: var(--sh); }
.rate b { font-size: 15px; }
.rate span { font-size: 12px; color: var(--pencil); font-weight: 600; }
.rate.again b { color: var(--red); } .rate.hard b { color: var(--amber); } .rate.good b { color: var(--green); } .rate.easy b { color: var(--pen); }
.vhead { margin-bottom: 6px; }
.topic h3 { font-size: 15px; margin: 18px 4px 8px; }
.words { list-style: none; background: var(--paper); border-radius: 20px; box-shadow: var(--sh); overflow: hidden; }
.words li + li { border-top: 1px solid var(--line); }
.wrow { display: grid; grid-template-columns: 12px minmax(90px, auto) 1fr; gap: 12px; align-items: baseline; width: 100%; padding: 12px 14px; background: none; border: 0; text-align: left; cursor: pointer; }
.wr-w { font-size: 16.5px; font-weight: 700; }
.wr-vi { color: var(--pencil); font-size: 14px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line2); align-self: center; }
.dot.learning { background: var(--hl); } .dot.known { background: var(--green); }

/* ---------- ngữ pháp ---------- */
.lbody { display: grid; gap: 12px; max-width: 66ch; }
.lbody h3 { font-size: 18px; margin-top: 8px; }
.lbody > p { color: var(--ink2); }
.bul { padding-left: 20px; display: grid; gap: 5px; }
.tbl-wrap { overflow-x: auto; background: var(--paper); border-radius: 18px; box-shadow: var(--sh); }
.tbl { border-collapse: collapse; font-size: 14.5px; min-width: 100%; }
.tbl th, .tbl td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th { color: var(--pencil); font-weight: 700; font-size: 12.5px; background: var(--wash); }
.gex { display: grid; grid-template-columns: 32px 1fr; gap: 8px; align-items: start; background: var(--paper); border-radius: 16px; box-shadow: var(--sh); padding: 10px 12px; }
.gex .en { font-size: 17px; font-weight: 600; }
.gex .vi { color: var(--pencil); font-size: 14px; }
.tip { display: flex; gap: 10px; align-items: flex-start; background: var(--amber-wash); border-radius: 16px; padding: 12px 14px; font-size: 15px; }
.tip .ic { flex: none; color: var(--amber); margin-top: 1px; }

/* ---------- viết, nói ---------- */
.w-title { font-size: 22px; font-weight: 800; margin: 6px 0; letter-spacing: -0.015em; }
.w-prompt { font-size: 16px; max-width: 64ch; margin-bottom: 10px; color: var(--ink2); }
.hint-box { margin: 8px 0 12px; }
.hint-box summary { cursor: pointer; color: var(--pen); font-weight: 700; }
.essay { min-height: 260px; font-size: 17.5px; }
.wbar { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 16px; }
.wc { color: var(--pencil); font-size: 14px; font-weight: 600; }
.wc.ok { color: var(--green); }
.tmr { display: inline-flex; gap: 5px; align-items: center; color: var(--pencil); }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--ink); }
.timer.low { color: var(--red); }
.analysis, .model, .self { margin: 14px 0; display: grid; gap: 10px; background: var(--paper); border-radius: var(--r3); box-shadow: var(--sh); padding: 18px; }
.analysis .facts { margin: 4px 0; }
.analysis .facts > div { box-shadow: none; background: var(--wash); }
.analysis h2, .model h2, .self h2 { font-size: 17px; }
.model .en { font-size: 17px; line-height: 1.65; }
.crit { display: grid; gap: 6px; }
.task-chart { margin: 10px 0 14px; background: var(--paper); border-radius: var(--r3); box-shadow: var(--sh); padding: 14px; }
.task-chart figcaption { font-weight: 700; margin-bottom: 6px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13.5px; margin-top: 6px; font-weight: 600; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }
.qs { list-style: none; display: grid; gap: 12px; }
.qcard { padding: 14px 16px; background: var(--paper); border-radius: 22px; box-shadow: var(--sh); }
.q-top { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.q-top .q { font-size: 18px; font-weight: 700; }
.ans { display: grid; gap: 6px; }
.said { font-size: 17px; background: var(--wash); border-radius: 14px; padding: 10px 12px; }
.cue { border-radius: 22px; padding: 18px; margin: 8px 0; background: var(--paper); box-shadow: 0 0 0 2px var(--pen), var(--sh); }
.cue-t { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.cue ul { padding-left: 20px; font-size: 17px; }
.sample { margin: 16px 0; background: var(--paper); border-radius: 22px; box-shadow: var(--sh); padding: 6px 16px 12px; }
.sample summary { cursor: pointer; color: var(--pen); font-weight: 700; padding: 8px 0; }
.sample .en { font-size: 17px; line-height: 1.65; margin: 8px 0; }
.rec-play { width: 100%; }

/* ---------- phát âm ---------- */
.ipa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 10px; }
.ipa-tile { display: grid; justify-items: center; gap: 2px; padding: 12px 4px; border-radius: 18px; background: var(--paper); box-shadow: var(--sh); text-decoration: none; color: var(--ink); border: 2px solid transparent; }
.ipa-tile:hover { border-color: var(--pen); }
.ipa-tile.done { border-color: var(--green); }
.ipa-s { font: 700 26px/1.1 var(--ipa); color: var(--pen); }
.ipa-tile .en { font-size: 13px; font-weight: 600; color: var(--pencil); }
.sound { display: grid; gap: 12px; background: var(--paper); border-radius: 28px; box-shadow: var(--sh); padding: 20px; }
.snd-top { display: flex; align-items: baseline; gap: 14px; }
.snd-sym { font: 700 56px/1 var(--ipa); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.snd-ex { display: flex; flex-wrap: wrap; gap: 8px; }
.wchip { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 14px; border-radius: 99px; border: 0; background: var(--wash); cursor: pointer; color: var(--pen); font-weight: 700; }
.wchip .en { font-size: 16px; color: var(--ink); }
.snd-pairs { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.pairchip .linkbtn { font-size: 16px; }

/* ---------- kiểm tra ---------- */
.place { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 18px; border-radius: 24px; color: #fff; text-decoration: none; background: linear-gradient(135deg, #34d399, #0f9f68 60%, #0b6b48); box-shadow: 0 14px 34px -12px rgba(15, 159, 104, .55); }
.place b { display: block; font-size: 18px; font-weight: 800; }
.place .muted { color: rgba(255, 255, 255, .88); font-size: 14px; }
.place-ic { width: 52px; height: 52px; border-radius: 16px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; color: #fff; }
.place .score { background: rgba(255, 255, 255, .9); }
.lvl { margin: 14px 0; background: var(--paper); border-radius: 24px; box-shadow: var(--sh); padding: 16px; }
.lvl-head { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.lvl-head h3 { font-size: 16px; flex: 1; }
.tgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.tcell { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 58px; border-radius: 16px; background: var(--wash); color: var(--ink); text-decoration: none; font-weight: 800; transition: transform .1s; }
.tcell:active { transform: scale(.96); }
.tcell.tried { background: var(--pen-wash); color: var(--pen); }
.tcell .score { font-size: 10.5px; padding: 1px 6px; }
.intro { display: grid; gap: 12px; justify-items: start; background: var(--paper); border-radius: var(--r3); box-shadow: var(--sh); padding: 20px; }

/* ---------- tôi ---------- */
.namefield { display: grid; gap: 4px; margin-bottom: 6px; }
.namefield .inp { font: 800 22px var(--sans); }
.menu { margin-top: 24px; }
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 10px; justify-items: start; background: var(--paper); border-radius: 22px; box-shadow: var(--sh); padding: 16px; }
.field > p { font-weight: 700; }
.field .inp { max-width: 360px; box-shadow: none; background: var(--wash); }
.codebig { font: 800 22px/1.3 var(--sans); letter-spacing: .06em; word-break: break-all; }
.codebig.sm { font-size: 17px; }
.sync-on { display: grid; gap: 8px; justify-items: start; margin: 10px 0; background: var(--paper); border-radius: var(--r3); box-shadow: var(--sh); padding: 18px; }
.or { margin: 16px 0 8px; text-align: center; }
.inp.code { text-transform: uppercase; letter-spacing: .05em; }
.install { margin: 14px 0; display: grid; gap: 10px; justify-items: start; background: var(--paper); border-radius: var(--r3); box-shadow: var(--sh); padding: 18px; }
.install h2 { font-size: 18px; }
.steps { padding-left: 22px; display: grid; gap: 8px; }
.urlline { color: var(--pencil); font-size: 14px; word-break: break-all; }
.qr { border-radius: 14px; background: #fff; padding: 6px; }

/* ---------- màn chào ---------- */
.onb { max-width: 520px; margin: 0 auto; padding: 6vh 0 40px; display: grid; gap: 18px; }
.onb .brand { display: flex; align-items: center; gap: 10px; font: 800 20px var(--sans); color: var(--ink); }
.onb .brand::before { content: ''; width: 40px; height: 40px; border-radius: 13px; background: url(icons/favicon-64.png) center/cover; box-shadow: var(--sh-pop); }
.onb h1 { font: 800 34px/1.12 var(--sans); letter-spacing: -0.03em; text-wrap: balance; }
.onb h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.onb-list { list-style: none; display: grid; gap: 10px; }
.onb-list li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; background: var(--paper); border-radius: 20px; box-shadow: var(--sh); padding: 12px; font-weight: 600; font-size: 15px; }
.onb .field { justify-items: stretch; }
.onb .field > span, .onb .field > p { font-weight: 700; }
.onb .field .inp { max-width: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) { .w.on, .hl { forced-color-adjust: none; background: Highlight; color: HighlightText; } .hero, .btn.primary { forced-color-adjust: auto; } }
