/* Tab Lộ trình (js/road.js): thẻ pastel, dùng token màu của pastel.css nên tự đổi sáng/tối */
.road { display: block; }
.road button { font: inherit; color: inherit; cursor: pointer; }
.road .pcard small { color: var(--muted); }
.rd-i { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.15em; }
/* Màu theo cấp: --lc là nền pastel, --lcd là màu đậm hơn dùng cho viền, vòng tiến độ */
.lv-green { --lc: var(--t-green); } .lv-blue { --lc: var(--t-blue); } .lv-lemon { --lc: var(--t-lemon); } .lv-peach { --lc: var(--t-peach); } .lv-pink { --lc: var(--t-pink); } .lv-lav { --lc: var(--t-lav); }
[class*="lv-"] { --lcd: color-mix(in srgb, var(--lc) 45%, var(--fg)); }

/* Đầu trang */
.rd-head { padding: 18px 20px 18px; margin-bottom: 20px; }
.rd-hrow { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.rd-hring { flex: none; }
.rd-htx { flex: 1 1 200px; min-width: 0; display: grid; gap: 2px; }
.rd-htx small { font-size: .8rem; letter-spacing: .02em; }
.rd-htx h2 { margin: 0; font-size: 1.9rem; line-height: 1.1; }
.rd-htx span { color: var(--muted); font-size: .92rem; }
.rd-ring2 { display: block; } .rd-ring2 .rg-bg { stroke: color-mix(in srgb, var(--fg) 12%, transparent); } .rd-ring2 .rg-fg { stroke: var(--lcd, color-mix(in srgb, var(--acc) 70%, var(--fg))); transition: stroke-dasharray .5s ease; }
.rd-ring2 .rg-t { fill: var(--fg); font: 800 1.3rem Nunito, system-ui, sans-serif; }
.rd-seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: color-mix(in srgb, var(--card) 80%, transparent); border: 1px solid color-mix(in srgb, var(--fg) 10%, transparent); }
.rd-seg button { border: 0; background: transparent; padding: 9px 20px; border-radius: 999px; font-weight: 700; min-height: 40px; transition: background .15s; }
.rd-seg button.on { background: var(--fg); color: var(--card); }
.rd-next { --lc: var(--card); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border-radius: 22px; background: color-mix(in srgb, var(--card) 88%, transparent); border: 1px solid color-mix(in srgb, var(--fg) 8%, transparent); }
.rd-nb { flex: none; padding: 8px 14px; border-radius: 14px; background: var(--lc); font-weight: 800; border: 1px solid color-mix(in srgb, var(--fg) 12%, transparent); }
.rd-nt { flex: 1 1 200px; min-width: 0; display: grid; }
.rd-nt small { font-size: .78rem; }
.rd-nt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-min { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.rd-next .primary { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

/* Kiến thức */
.rd-kn { display: grid; gap: 0 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1300px) { .rd-kn { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.road .pcard h3 { margin: 2px 0 0; font-size: 1.5rem; }
.rd-lvtop, .rd-gtop { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.rd-lvtx { display: grid; gap: 2px; } .road .rd-lvtx h3 { font-size: 2.2rem; line-height: 1.05; }
.rd-sub { color: var(--muted); font-size: .9rem; }
.rd-bar { position: relative; height: 16px; margin: 20px 16px 6px 0; border-radius: 999px; background: color-mix(in srgb, var(--fg) 10%, transparent); }
.rd-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--lcd); min-width: 16px; transition: width .4s ease; }
.rd-mk { position: absolute; top: -4px; bottom: -4px; width: 2px; background: color-mix(in srgb, var(--fg) 40%, transparent); border-radius: 2px; }
.rd-flag { position: absolute; right: -16px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--card); border: 2px solid var(--lcd); font-style: normal; }
.rd-flag .ic { width: 15px; height: 15px; }
.rd-barlb { position: relative; display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); }
.rd-b80 { position: absolute; left: 80%; transform: translateX(-50%); }
.rd-chg, .rd-edit { margin-top: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--fg) 14%, transparent); background: color-mix(in srgb, var(--card) 80%, transparent); font-weight: 700; min-height: 40px; }
.rd-edit { margin-top: 0; }
.rd-picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.rd-picks button { display: grid; justify-items: center; padding: 10px 6px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--fg) 10%, transparent); background: var(--lc); }
.rd-picks button.on { background: var(--fg); color: var(--card); } .rd-picks button.on small { color: inherit; }
.rd-picks button:disabled { opacity: .5; cursor: default; }
.rd-goals { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rd-goals button { padding: 8px 14px; font-weight: 700; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--fg) 12%, transparent); background: color-mix(in srgb, var(--card) 80%, transparent); min-height: 38px; }
.rd-goals button.on { background: var(--fg); color: var(--card); }
.rd-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.rd-stats .pcard { margin: 0; padding: 14px 16px 16px; display: grid; gap: 2px; }
.rd-si { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--card) 70%, transparent); margin-bottom: 4px; } .rd-si .rd-i { width: 18px; height: 18px; }
.rd-stats b { display: block; font-size: 2rem; line-height: 1.15; } .rd-stats b span { font-size: 1rem; color: var(--muted); font-weight: 700; }
.rd-eta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.rd-eta > div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 16px; background: color-mix(in srgb, var(--card) 72%, transparent); }
.rd-eta b { font-size: 1.05rem; line-height: 1.2; }
.rd-fn, .rd-exam p { margin: 12px 0 0; line-height: 1.5; font-size: .92rem; color: color-mix(in srgb, var(--fg) 80%, transparent); }
.rd-exam .primary { margin-top: 12px; display: inline-flex; align-items: center; gap: 6px; }
.rd-chip { padding: 5px 12px; border-radius: 999px; font-size: .82rem; font-weight: 800; background: color-mix(in srgb, var(--card) 80%, transparent); white-space: nowrap; }
.rd-chip.ok { background: var(--fg); color: var(--card); }
.rd-h2 { margin-top: 4px; }
.rd-toc { display: grid; gap: 10px; }
.rd-un { border-radius: 24px; border: 1px solid var(--line); background: var(--card); overflow: hidden; }
.rd-un.cur { border-color: var(--lcd); box-shadow: 0 0 0 2px color-mix(in srgb, var(--lc) 90%, transparent); }
.rd-un summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; min-height: 60px; }
.rd-un summary::-webkit-details-marker { display: none; }
.rd-ub { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: var(--lc); font-weight: 800; flex: none; }
.rd-un.full .rd-ub { background: #5fbf8a; color: #fff; } .rd-ub .ic { width: 20px; height: 20px; }
.rd-ut { flex: 1; min-width: 0; display: grid; gap: 1px; } .rd-ut b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .rd-ut small { color: var(--muted); }
.rd-mini { display: block; height: 5px; margin-top: 4px; border-radius: 999px; background: color-mix(in srgb, var(--fg) 10%, transparent); overflow: hidden; } .rd-mini u { display: block; height: 100%; background: var(--lcd); text-decoration: none; border-radius: 999px; }
.rd-car { display: grid; transition: transform .2s; } .rd-un[open] .rd-car { transform: rotate(180deg); }
.rd-rows { display: grid; padding: 8px 8px 10px; gap: 4px; border-top: 1px dashed var(--line); }
.rd-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 10px; border-radius: 16px; border: 1px solid transparent; background: transparent; min-height: 54px; }
.rd-row:hover { background: color-mix(in srgb, var(--fg) 5%, transparent); }
.rd-row.now { background: var(--t-peach); border-color: color-mix(in srgb, var(--fg) 14%, transparent); }
.rd-ri { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--t-lemon); flex: none; } .rd-ri .ic { width: 18px; height: 18px; }
.rd-row.k-grammar .rd-ri { background: var(--t-pink); } .rd-row.k-reading .rd-ri { background: var(--t-blue); } .rd-row.k-talk .rd-ri { background: var(--t-lav); } .rd-row.k-nghe .rd-ri { background: var(--t-peach); }
.rd-row.done .rd-ri { background: var(--t-green); }
.rd-rt { flex: 1; min-width: 0; display: grid; } .rd-rt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .rd-rt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-row em { font-style: normal; font-size: .75rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--fg); color: var(--card); white-space: nowrap; }
.rd-m { color: var(--muted); font-size: .82rem; font-weight: 700; min-width: 2.2em; text-align: right; }
.rd-ck { width: 24px; height: 24px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--fg) 25%, transparent); display: grid; place-items: center; flex: none; }
.rd-ck.on { background: #4fae7b; border-color: #4fae7b; color: #fff; } .rd-ck .ic { width: 14px; height: 14px; }

/* Hành trình */
.rd-jr { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1240px) { .rd-jr { grid-template-columns: minmax(0, 1fr) 320px; } .rd-side { position: sticky; top: 96px; } }
.rd-mapbox { margin: 0; }
.rd-map { position: relative; height: clamp(440px, 68vh, 780px); border-radius: 32px; overflow: hidden; border: 1px solid var(--line); background: radial-gradient(120% 90% at 20% 0%, color-mix(in srgb, var(--t-lemon) 60%, var(--card)), transparent 60%), radial-gradient(120% 90% at 100% 100%, color-mix(in srgb, var(--t-blue) 55%, var(--card)), transparent 60%), color-mix(in srgb, var(--t-green) 50%, var(--card)); touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; outline: none; box-shadow: var(--pc-shadow); }
.rd-map::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle, color-mix(in srgb, var(--fg) 13%, transparent) 1.5px, transparent 2px); background-size: 28px 28px; pointer-events: none; }
.rd-map.grab { cursor: grabbing; } .rd-map:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--fg) 40%, transparent); }
.rd-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rd-road0 { fill: none; stroke: color-mix(in srgb, var(--fg) 12%, transparent); stroke-width: 30; stroke-linecap: round; stroke-linejoin: round; }
.rd-road { fill: none; stroke: color-mix(in srgb, var(--fg) 8%, var(--card)); stroke-width: 24; stroke-linecap: round; stroke-linejoin: round; }
.rd-road2 { fill: none; stroke: color-mix(in srgb, var(--fg) 28%, var(--card)); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 2 12; }
.rd-trail { fill: none; stroke: #4fae7b; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.rd-n { cursor: pointer; }
.rd-n .rd-c { fill: var(--card); stroke: var(--lcd); stroke-width: 3.5; }
.rd-n.u .rd-c { fill: var(--lc); }
.rd-n.lv .rd-c { fill: var(--lc); stroke-width: 3; }
.rd-n.ex .rd-c { fill: var(--t-lav); }
.rd-n.full .rd-c { fill: #5fbf8a; stroke: #3a8f63; }
.rd-n.cur .rd-c { fill: var(--card); stroke: var(--fg); stroke-width: 4.5; }
.rd-ring { fill: none; stroke: var(--fg); stroke-width: 2; stroke-dasharray: 5 6; opacity: .55; }
.rd-arc { fill: none; stroke: #3a8f63; stroke-width: 5; stroke-linecap: round; }
.rd-n.sel .rd-c { stroke: var(--fg); stroke-width: 6; }
.rd-n.hit .rd-c { stroke: #e0866f; stroke-width: 7; }
.rd-num { fill: var(--fg); font: 800 18px Nunito, system-ui, sans-serif; text-anchor: middle; }
.rd-tk { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.rd-fl, .rd-tp { fill: none; stroke: var(--fg); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.rd-lvt { fill: var(--fg); font: 800 21px Nunito, system-ui, sans-serif; text-anchor: middle; }
.rd-lb { text-anchor: middle; fill: var(--fg); font-family: Nunito, system-ui, sans-serif; paint-order: stroke; stroke: color-mix(in srgb, var(--t-green) 45%, var(--card)); stroke-width: 4px; stroke-linejoin: round; }
.rd-lb.b { font-weight: 800; font-size: 14px; } .rd-lb.s { font-size: 12.5px; fill: var(--muted); }
.rd-pin rect { fill: var(--fg); } .rd-pin text { fill: var(--card); text-anchor: middle; font: 800 12px Nunito, system-ui, sans-serif; }
.rd-ctl { position: absolute; z-index: 2; }
.rd-find { top: 14px; left: 14px; right: 78px; max-width: 360px; display: flex; align-items: center; gap: 8px; padding: 4px 14px; border-radius: 999px; background: color-mix(in srgb, var(--card) 94%, transparent); border: 1px solid var(--line); cursor: text; box-shadow: var(--pc-shadow); }
.rd-find input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; padding: 9px 0; color: var(--fg); }
.rd-find small { color: var(--muted); font-weight: 800; }
.rd-zoom { right: 14px; top: 14px; display: grid; gap: 8px; }
.rd-zoom button { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; border: 1px solid var(--line); background: color-mix(in srgb, var(--card) 94%, transparent); box-shadow: var(--pc-shadow); }
.rd-zoom button:hover { background: var(--t-lemon); }
.rd-pop { position: absolute; z-index: 3; left: 14px; right: 14px; bottom: 14px; max-width: 480px; display: grid; gap: 4px; padding: 14px 46px 14px 18px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--pc-shadow); }
.rd-pop[hidden] { display: none; } .rd-pop span { color: var(--muted); font-size: .9rem; }
.rd-pa { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; } .rd-pa button { padding: 8px 16px; border-radius: 999px; min-height: 40px; font-weight: 700; border: 1px solid var(--line); background: var(--card); } .rd-pa .primary { background: var(--fg); color: var(--card); border-color: transparent; }
.rd-x { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; font-size: 1.4rem; line-height: 1; }
.rd-side { margin: 0; } .rd-side h3 { margin: 0 0 12px; }
.rd-lvrow { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; margin-bottom: 8px; border-radius: 20px; border: 1px solid color-mix(in srgb, var(--fg) 8%, transparent); background: color-mix(in srgb, var(--card) 85%, transparent); min-height: 62px; }
.rd-lvrow.now { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg); } .rd-lvrow:disabled { opacity: .55; cursor: default; }
.rd-lvn { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: var(--lc); font-weight: 800; flex: none; }
.rd-lvt2 { flex: 1; min-width: 0; display: grid; gap: 2px; } .rd-lvp { font-weight: 800; }

@media (max-width: 560px) {
  .rd-head { padding: 14px; } .rd-htx h2 { font-size: 1.5rem; } .rd-seg { width: 100%; } .rd-seg button { flex: 1; padding: 9px 6px; }
  .rd-next .primary { width: 100%; justify-content: center; } .rd-nt { flex-basis: 140px; }
  .rd-stats b { font-size: 1.6rem; } .rd-map { height: clamp(400px, 64vh, 580px); border-radius: 26px; }
  .rd-find { right: 68px; } .rd-eta { grid-template-columns: 1fr 1fr; } .rd-eta > div:last-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { .rd-bar i, .rd-car, .rd-ring2 .rg-fg { transition: none; } }
.tabbar .sb-menu [data-v="path"] { --ti: var(--t-lav); }
@media (max-width: 899px) { .tabbar { padding-left: 3px; padding-right: 3px; } .tabbar .sb-menu button { padding: 5px 0; min-width: 0; } .tabbar .sb-menu button small { font-size: .6rem; letter-spacing: -.01em; } }
