/* ============ Course (Duolingo-style) ============ */

/* ---------- stats ---------- */
.cstats { display: flex; gap: 8px; }
.cstat { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-weight: 600; }
.cstat b { color: var(--text); font-size: 16px; }
.cstat small { font-size: 11px; color: var(--dim); }
.cstat .ic { width: 18px; height: 18px; }
.cstat.hot .ic { color: var(--ember); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--ember) 60%, transparent)); }
.cstat.hearts .ic { color: #FF5C6C; fill: #FF5C6C; }
.cstat.hearts.empty .ic { color: var(--dim); fill: none; }

/* ---------- map ---------- */
.course-wrap { max-width: 1100px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 40px) 120px; display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: start; }
.course-side { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 14px; }
.side-card h3 { margin-bottom: 8px; }
.side-card p { margin: 0 0 14px; color: var(--muted); font-size: 14.5px; }
.side-card .small, .small { font-size: 13px; color: var(--dim); margin: 10px 0 0; }
.course-main { display: flex; flex-direction: column; gap: 32px; }

.lvl-head { display: flex; align-items: center; gap: 14px; padding: 6px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.lvl-head b { display: block; font-size: 17px; }
.lvl-head span { color: var(--muted); font-size: 14px; }
.lvl-head .btn { margin-left: auto; }
.lvl-id { font-family: var(--display); font-weight: 600; font-size: 40px; letter-spacing: -0.06em; line-height: 1; background: linear-gradient(180deg, var(--text), var(--dim)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lvl-below .lvl-body { display: none; }
.lvl-below.open .lvl-body { display: block; }
.lvl-below .lvl-id { opacity: .55; }

.unit { margin-bottom: 26px; }
.unit-banner { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; border-radius: 20px; background: linear-gradient(120deg, color-mix(in srgb, var(--ac) 22%, var(--surface)), var(--surface) 70%); border: 1px solid color-mix(in srgb, var(--ac) 30%, var(--line)); }
.unit-banner .mono { color: color-mix(in srgb, var(--ac) 70%, var(--text)); }
.unit-banner h3 { font-size: 22px; margin: 4px 0 4px; }
.unit-banner p { margin: 0; font-size: 13.5px; color: var(--muted); }
.unit-done { font-family: var(--mono); font-size: 13px; color: var(--muted); padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line-2); white-space: nowrap; }

.path { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 26px 0 8px; }
.node-row { position: relative; transform: translateX(var(--x)); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.node { width: 76px; height: 70px; border-radius: 50%; display: grid; place-items: center; text-decoration: none; position: relative; transition: transform .15s var(--ease); }
.node .ic { width: 30px; height: 30px; }
.node.done { background: var(--ac); color: var(--on-ac); box-shadow: 0 7px 0 color-mix(in srgb, var(--ac) 55%, #000); }
.node.current { background: var(--ac); color: var(--on-ac); box-shadow: 0 7px 0 color-mix(in srgb, var(--ac) 55%, #000), 0 0 0 8px color-mix(in srgb, var(--ac) 22%, transparent); animation: nodePulse 1.8s ease-in-out infinite; }
.node.open { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-2); box-shadow: 0 7px 0 #000; }
.node.locked { background: var(--surface); color: var(--dim); border: 1px solid var(--line); box-shadow: 0 7px 0 color-mix(in srgb, var(--bg) 55%, #000); cursor: not-allowed; }
.node:not(.locked):hover { transform: translateY(-2px); }
.node:not(.locked):active { transform: translateY(5px); box-shadow: 0 2px 0 #000; }
.node.shake { animation: shake .4s; }
.node-label { font-size: 12.5px; color: var(--dim); font-weight: 500; }
.node-row:has(.current) .node-label { color: var(--text); }
.node-mascot { position: absolute; right: calc(100% + 18px); top: -12px; width: 86px; pointer-events: none; }
.node-row:nth-child(2) .node-mascot, .node-row:nth-child(1) .node-mascot { right: auto; left: calc(100% + 18px); }
.node-mascot .av { width: 100%; }
.node-start { position: absolute; top: -40px; left: 50%; translate: -50% 0; background: var(--text); color: var(--bg); font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 10px; white-space: nowrap; animation: bob 1s ease-in-out infinite alternate; }
.node-start::after { content: ''; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; background: var(--text); transform: translateX(-50%) rotate(45deg); }
@keyframes nodePulse { 50% { box-shadow: 0 7px 0 color-mix(in srgb, var(--ac) 55%, #000), 0 0 0 14px color-mix(in srgb, var(--ac) 10%, transparent); } }

/* ---------- intro / placement ---------- */
.course-intro { max-width: 640px; margin: 0 auto; padding: 56px 0 96px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.course-intro h1 { font-size: clamp(36px, 5vw, 60px); }
.course-intro h2 { font-size: clamp(26px, 3.2vw, 36px); }
.course-intro .lead { margin: 0 auto; }
.ci-av { width: 200px; }
.ci-av .av { width: 100%; }
.place-level { font-family: var(--display); font-weight: 600; font-size: clamp(90px, 14vw, 150px); line-height: .9; letter-spacing: -0.07em; background: linear-gradient(180deg, var(--amber), var(--ember)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hint-line { text-align: center; color: var(--dim); font-size: 14px; margin-top: 18px; }
.link { background: none; border: 0; color: var(--text); text-decoration: underline; text-underline-offset: 3px; padding: 4px; min-height: 32px; }

/* ---------- lesson ---------- */
body.in-lesson .topbar { display: none; }
.lesson { min-height: 100vh; display: flex; flex-direction: column; }
.lesson-top { max-width: 1000px; width: 100%; margin: 0 auto; padding: 22px clamp(16px, 4vw, 40px) 8px; display: flex; align-items: center; gap: 18px; }
.lt-close { width: 44px; height: 44px; display: grid; place-items: center; color: var(--muted); border-radius: 12px; }
.lt-close:hover { color: var(--text); background: var(--surface); }
.lt-bar { flex: 1; height: 16px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.lt-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--amber), var(--ember)); transition: width .45s var(--ease); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18); }
.lt-hearts { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: #FF5C6C; min-width: 56px; }
.lt-hearts .ic { fill: #FF5C6C; width: 24px; height: 24px; }
.lt-hearts.review { color: var(--muted); }
.lt-hearts.review .ic { fill: none; }
.lt-hearts.hit { animation: shake .4s; }

.lesson-body { flex: 1; width: 100%; max-width: 680px; margin: 0 auto; padding: 18px clamp(16px, 4vw, 24px) 200px; }
.lesson-coach { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 18px; min-height: 84px; }
.lc-av { width: 78px; flex: none; }
.lc-av .av { width: 100%; }
.lc-bubble { position: relative; background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; padding: 10px 14px; font-size: 14.5px; font-weight: 500; max-width: 420px; margin-bottom: 14px; opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s var(--ease); }
.lc-bubble.show { opacity: 1; transform: none; }
.lc-bubble::before { content: ''; position: absolute; left: -7px; bottom: 14px; width: 12px; height: 12px; background: var(--surface); border-left: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); transform: rotate(45deg); }

.ex-title { font-size: clamp(24px, 3vw, 30px); margin-bottom: 20px; }
.ex-prompt { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; font-size: 18px; }
.ex-prompt.big { font-family: var(--display); font-weight: 600; font-size: clamp(22px, 3vw, 28px); letter-spacing: -0.03em; }
.ex-ru { color: var(--muted); margin: -10px 0 22px; }
.bubble-q { display: inline-flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line-2); font-size: 18px; font-weight: 500; }
.snd { width: 44px; height: 44px; flex: none; border-radius: 12px; border: 0; background: var(--ac); color: var(--on-ac); display: grid; place-items: center; box-shadow: 0 4px 0 color-mix(in srgb, var(--ac) 55%, #000); }
.snd:active { transform: translateY(3px); box-shadow: 0 1px 0 #000; }
.snd.big { width: 96px; height: 96px; border-radius: 24px; }
.snd.big .ic { width: 40px; height: 40px; }
.snd.slow { width: 56px; height: 56px; background: var(--surface-2); color: var(--text); box-shadow: 0 4px 0 #000; }
.listen-btns { display: flex; align-items: flex-end; gap: 14px; }
.slow-l { font-size: 12px; color: var(--dim); margin-left: -6px; }

.choices { display: grid; gap: 10px; }
.choices.row { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.choice { display: flex; align-items: center; gap: 14px; text-align: left; min-height: 58px; padding: 12px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-2); border-bottom-width: 4px; font-size: 17px; font-weight: 500; transition: background .15s, border-color .15s; }
.choice:hover { background: var(--surface-2); }
.choice .k { width: 26px; height: 26px; flex: none; border-radius: 8px; border: 1px solid var(--line-2); display: grid; place-items: center; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.choice.sel { border-color: var(--ac); background: color-mix(in srgb, var(--ac) 12%, var(--surface)); }
.choice.sel .k { border-color: var(--ac); color: var(--ac); }
.fill-line { flex-wrap: wrap; gap: 6px; }
.gap { display: inline-block; min-width: 90px; border-bottom: 3px solid var(--line-2); text-align: center; color: var(--ac); }
.gap.filled { border-color: var(--ac); }

.tile-answer { min-height: 64px; padding: 8px 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; margin-bottom: 26px; }
.tile-bank { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tile { min-height: 46px; padding: 8px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); border-bottom-width: 4px; font-size: 17px; font-weight: 500; transition: transform .1s; }
.tile:active { transform: translateY(2px); }
.tile.used { background: var(--surface); color: transparent; border-color: var(--line); pointer-events: none; }

.type-in { width: 100%; resize: none; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); padding: 16px; font: inherit; font-size: 18px; }
.type-in:focus { outline: none; border-color: var(--ac); }

.match { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mcol { display: flex; flex-direction: column; gap: 10px; }
.mt { min-height: 56px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); border-bottom-width: 4px; font-size: 16px; font-weight: 500; transition: background .15s, border-color .15s, opacity .3s; }
.mt.sel { border-color: var(--ac); background: color-mix(in srgb, var(--ac) 12%, var(--surface)); }
.mt.ok { border-color: var(--ok); color: var(--ok); opacity: .45; }
.mt.bad { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); animation: shake .35s; }

.mic-big { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 76px; border-radius: 20px; border: 1px solid color-mix(in srgb, var(--ac) 50%, transparent); border-bottom-width: 4px; background: color-mix(in srgb, var(--ac) 12%, var(--surface)); color: var(--text); font-size: 17px; font-weight: 600; margin-top: 8px; }
.mic-big .ic { width: 28px; height: 28px; color: var(--ac); }
.mic-big.rec { background: var(--ac); color: var(--on-ac); animation: nodePulse 1.2s infinite; }
.mic-big.rec .ic { color: var(--on-ac); }
.heard { min-height: 1.5em; color: var(--muted); text-align: center; margin-top: 14px; }

.lesson-foot { position: fixed; left: 0; right: 0; bottom: 0; border-top: 1px solid var(--line); background: var(--bg-2); transition: background .2s; z-index: 20; }
.lf-inner { max-width: 1000px; margin: 0 auto; padding: 22px clamp(16px, 4vw, 40px); display: flex; align-items: center; gap: 18px; }
.lf-msg { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lf-msg b { display: inline-flex; align-items: center; gap: 8px; font-size: 20px; font-family: var(--display); letter-spacing: -0.03em; }
.lf-msg b .ic { width: 24px; height: 24px; }
.lf-msg span { font-size: 15px; }
.lf-msg .why { color: var(--muted); font-size: 14px; }
.lf-go { min-width: 170px; min-height: 52px; font-size: 16px; }
.lf-skip { min-height: 52px; }
.lesson-foot.ok { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.lesson-foot.ok .lf-msg { color: var(--ok); }
.lesson-foot.ok .lf-go { background: var(--ok); color: #062010; }
.lesson-foot.bad { background: color-mix(in srgb, var(--bad) 12%, var(--surface)); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.lesson-foot.bad .lf-msg { color: var(--bad); }
.lesson-foot.bad .lf-msg b { color: var(--bad); }
.lesson-foot.bad .lf-msg strong { color: var(--text); }
.lesson-foot.bad .lf-go { background: var(--bad); color: #2a0603; }

.lesson-loading { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 24px; }
.ll-av { width: 160px; animation: bob .7s ease-in-out infinite alternate; }
.ll-av .av { width: 100%; }
.lesson-loading p { font-size: 20px; font-weight: 600; margin: 0; }
.lesson-loading small { color: var(--dim); }

.lesson-done { max-width: 620px; margin: 0 auto; padding: 56px 0 96px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lesson-done h1 { font-size: clamp(36px, 5vw, 56px); }
.ld-av { width: 190px; }
.ld-av .av { width: 100%; }
.ld-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; margin: 10px 0 8px; }
.ld-stats div { border: 1px solid var(--line-2); border-radius: 16px; padding: 12px 8px; display: flex; flex-direction: column; gap: 4px; }
.ld-stats span { font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; font-family: var(--mono); }
.ld-stats b { font-size: 20px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.ld-stats b .ic { width: 18px; height: 18px; color: var(--ember); }

@media (max-width: 900px) {
  .course-wrap { grid-template-columns: 1fr; gap: 20px; }
  .course-side { position: static; }
  .course-side .side-card { display: none; }
  .node-mascot { width: 64px; }
}
@media (max-width: 560px) {
  .lf-inner { flex-wrap: wrap; }
  .lf-go { width: 100%; }
  .ld-stats { grid-template-columns: repeat(2, 1fr); }
  .lesson-coach { min-height: 64px; }
  .lc-av { width: 60px; }
}

@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-6px); } }

/* course map fixes */
section.lvl { padding: 0; }
.lvl-head .lvl-id { font-size: 40px; color: transparent; font-weight: 600; }
.lvl-below:not(.open) .lvl-head { margin-bottom: 0; }

/* ---------- full placement test ---------- */
.pt-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; max-width: 560px; margin: 6px 0 4px; }
.pt-facts div { border: 1px solid var(--line-2); border-radius: 16px; padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; background: var(--surface); }
.pt-facts b { font-family: var(--display); font-size: 22px; letter-spacing: -0.04em; }
.pt-facts span { font-size: 12px; color: var(--dim); }

.ptest { max-width: 800px; margin: 0 auto; padding: 28px 0 140px; }
.pt-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.pt-top .mono b { color: var(--text); }
.pt-exit { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; min-height: 44px; }
.pt-exit:hover { color: var(--text); }
.pt-coach { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.pt-meta { margin-bottom: 18px; }
.pt-skill { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pt-skill .ic { width: 15px; height: 15px; color: var(--ac); }
.passage { margin: 0 0 22px; padding: 18px 20px; border-left: 3px solid var(--ac); background: var(--bg-2); border-radius: 0 16px 16px 0; font-size: 17px; line-height: 1.65; color: var(--text); }
.pt-audio { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.pt-audio-note { color: var(--muted); font-size: 14px; }
.pt-q { font-family: var(--display); font-weight: 600; font-size: clamp(21px, 2.8vw, 30px); letter-spacing: -0.035em; line-height: 1.2; margin: 0 0 24px; }
.gap-inline { display: inline-block; min-width: 90px; border-bottom: 3px solid var(--ac); }
.pt-opts .opt { font-size: 16.5px; }
.pt-opts .opt.sel { border-color: var(--ac); background: color-mix(in srgb, var(--ac) 12%, var(--surface)); }
.pt-opts .opt.sel .k { background: var(--ac); color: var(--on-ac); border-color: transparent; }
.pt-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 24px; flex-wrap: wrap; }
.pt-foot-l { display: flex; gap: 16px; flex-wrap: wrap; }
.pt-foot .link { color: var(--muted); font-size: 14px; }
.pt-foot .link:hover { color: var(--text); }

.pt-result { max-width: 900px; margin: 0 auto; }
.place-level sup { font-size: .4em; vertical-align: top; position: relative; top: .35em; margin-left: 2px; }
.res-score { font-size: 16px; color: var(--muted); }
.res-score b { font-family: var(--display); font-size: 30px; color: var(--text); letter-spacing: -0.04em; }
.res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.res-grid h3 { margin-bottom: 14px; }
.bar-row { display: grid; grid-template-columns: 120px 1fr 48px; align-items: center; gap: 12px; margin: 10px 0; font-size: 14.5px; }
.bar-row .bl { color: var(--muted); font-weight: 500; }
.bar-row .bv { font-family: var(--mono); font-size: 12px; color: var(--dim); text-align: right; }
.bar { height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: var(--dim); transition: width .6s var(--ease); }
.bar i.pass { background: linear-gradient(90deg, var(--amber), var(--ember)); }
.res-note { margin-bottom: 16px; }
.res-note p { margin: 0 0 8px; color: var(--muted); }
.res-note p:last-child { margin: 0; }
.res-note b { color: var(--text); }
.res-wrong { margin-bottom: 24px; }
.res-wrong summary { cursor: pointer; font-weight: 600; font-size: 16px; padding: 4px 0; }
.rw { padding: 16px 0; border-top: 1px solid var(--line); margin-top: 14px; }
.rw:first-of-type { margin-top: 14px; }
.rw-q { margin: 6px 0; font-weight: 500; }
.rw-a { margin: 4px 0; font-family: var(--mono); font-size: 13.5px; }
.rw-a s { color: var(--bad); margin-right: 10px; }
.rw-a b { color: var(--ok); font-weight: 500; }
.rw-dunno { color: var(--dim); margin-right: 10px; }
.rw-e { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
@media (max-width: 700px) {
  .res-grid { grid-template-columns: 1fr; }
  .pt-facts { grid-template-columns: repeat(2, 1fr); }
  .bar-row { grid-template-columns: 100px 1fr 44px; }
}
.rw-t { margin: 6px 0; padding: 8px 12px; border-left: 2px solid var(--line-2); color: var(--muted); font-size: 14px; font-style: italic; }

/* ================= Course map v2 ================= */
.side-progress .sp-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.side-progress .sp-row b { font-family: var(--display); font-size: 34px; letter-spacing: -0.05em; }
.side-progress .sp-row span { color: var(--muted); font-size: 14px; }
.side-progress .small a { color: var(--ac); }

.lvl-head { gap: 16px; }
.lvl-info { flex: 1; min-width: 0; }
.lvl-bar { height: 5px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin-top: 8px; max-width: 260px; }
.lvl-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--amber), var(--ember)); border-radius: 4px; }
.lvl-count { font-family: var(--mono); font-size: 13px; color: var(--dim); }
.lvl-head .btn { margin-left: 0; }

.unit { margin-bottom: 40px; }
.unit-banner { position: relative; overflow: hidden; display: flex; align-items: center; gap: 20px; padding: 20px 24px; border-radius: 22px;
  background: radial-gradient(120% 160% at 0% 0%, color-mix(in srgb, var(--ac) 26%, transparent), transparent 55%), var(--surface);
  border: 1px solid color-mix(in srgb, var(--ac) 28%, var(--line)); }
.unit-banner::after { content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--ac) 22%, transparent), transparent 70%); pointer-events: none; }
.ub-num { font-family: var(--display); font-weight: 700; font-size: 54px; line-height: 1; letter-spacing: -0.06em; color: transparent; -webkit-text-stroke: 1.5px color-mix(in srgb, var(--ac) 70%, var(--text)); flex: none; }
.ub-main { flex: 1; min-width: 0; position: relative; z-index: 1; }
.ub-main h3 { font-size: 24px; margin: 4px 0; }
.ub-main p { margin: 0; font-size: 13.5px; color: var(--muted); }
.ub-bar { display: flex; gap: 6px; margin-top: 12px; }
.ub-bar i { flex: 1; max-width: 46px; height: 6px; border-radius: 4px; background: var(--surface-2); }
.ub-bar i.on { background: var(--ac); box-shadow: 0 0 10px color-mix(in srgb, var(--ac) 60%, transparent); }
.ub-bar i.cur { background: color-mix(in srgb, var(--ac) 40%, var(--surface-2)); animation: pulse 1.6s infinite; }
.unit-complete .unit-banner { border-color: color-mix(in srgb, var(--ac) 55%, transparent); }

.path { position: relative; gap: 30px; padding: 40px 0 10px; }
svg.road { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; z-index: 0; }
.road-track { fill: none; stroke: var(--line-2); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 2 18; }
.road-glow { fill: none; stroke: var(--ac); stroke-width: 16; stroke-linecap: round; opacity: .18; filter: blur(6px); }
.road-lit { fill: none; stroke: url(#none) var(--ac); stroke: var(--ac); stroke-width: 7; stroke-linecap: round; opacity: .9; }
.node-row { z-index: 1; }

.node { width: 84px; height: 78px; border: 0; }
.node .node-face { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; }
.node .ic { width: 32px; height: 32px; position: relative; z-index: 1; }
.node.done { background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--hot, #fff) 45%, var(--ac)), var(--ac) 60%); color: var(--on-ac); box-shadow: 0 8px 0 color-mix(in srgb, var(--ac) 50%, #000), 0 14px 30px -10px color-mix(in srgb, var(--ac) 70%, transparent); }
.node.current { background: radial-gradient(circle at 35% 30%, color-mix(in srgb, #fff 35%, var(--ac)), var(--ac) 62%); color: var(--on-ac); box-shadow: 0 8px 0 color-mix(in srgb, var(--ac) 50%, #000); animation: none; }
.node.current::before { content: ''; position: absolute; inset: -12px; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--ac) 70%, transparent); animation: ringPulse 1.8s ease-out infinite; }
.node.current::after { content: ''; position: absolute; inset: -22px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--ac) 28%, transparent), transparent 70%); z-index: -1; }
@keyframes ringPulse { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }
.node.open { background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--text) 8%, var(--surface-2)), var(--surface-2) 65%); color: var(--text); border: 1px solid color-mix(in srgb, var(--ac) 35%, var(--line-2)); box-shadow: 0 8px 0 color-mix(in srgb, var(--bg) 55%, #000); }
.node.locked { background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--text) 4%, var(--surface)), var(--surface) 65%); color: var(--dim); border: 1px solid var(--line); box-shadow: 0 8px 0 color-mix(in srgb, var(--bg) 55%, #000); }
.node:not(.locked):active { transform: translateY(6px); box-shadow: 0 2px 0 #000; }
.node-star { position: absolute; right: -4px; top: -4px; width: 28px; height: 28px; border-radius: 50%; background: var(--amber); color: #3a2200; display: grid; place-items: center; box-shadow: 0 0 0 3px var(--bg), 0 0 14px color-mix(in srgb, var(--amber) 70%, transparent); z-index: 2; }
.node-star .ic { width: 15px; height: 15px; fill: currentColor; }
.node-label { font-size: 13px; margin-top: 6px; }
.node-row:has(.current) .node-label { color: var(--text); font-weight: 600; }
.node-start { top: -50px; display: flex; flex-direction: column; align-items: center; line-height: 1.1; padding: 7px 14px; border-radius: 12px; font-size: 14px; }
.node-start small { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; opacity: .65; font-weight: 600; }
.node-mascot { width: 92px; top: -18px; }
.node-mascot.left { left: auto; right: calc(100% + 24px); }
.node-mascot.right { right: auto; left: calc(100% + 24px); }
.node-row:nth-child(n) .node-mascot.right { left: calc(100% + 24px); right: auto; }
.node-mascot .av { animation: bFloat 3s ease-in-out infinite; }

.unit-finish .finish { width: 62px; height: 62px; border-radius: 18px; transform: rotate(45deg); display: grid; place-items: center; background: var(--surface); border: 1px dashed var(--line-2); color: var(--dim); }
.unit-finish .finish .ic { transform: rotate(-45deg); width: 26px; height: 26px; }
.unit-finish .finish.on { background: linear-gradient(135deg, var(--amber), var(--ember)); color: #3a1500; border: 0; box-shadow: 0 0 30px -4px color-mix(in srgb, var(--ember) 80%, transparent); }
.unit-finish .finish.on .ic { fill: currentColor; }
.unit-finish .node-label { margin-top: 12px; }

@media (max-width: 560px) {
  .node-row { transform: translateX(calc(var(--x) * .6)); }
  .ub-num { font-size: 40px; }
  .unit-banner { padding: 16px; gap: 14px; }
  .node-mascot { width: 64px; }
}
.path .node-label { position: relative; z-index: 2; background: var(--bg); padding: 2px 10px; border-radius: 8px; }
.path { gap: 46px; }

/* ================= Lesson screen v2 ================= */
.lesson { position: relative; }
.lesson::before { content: ''; position: fixed; left: 50%; top: 55%; width: 900px; height: 600px; transform: translate(-50%, -50%); background: radial-gradient(ellipse, color-mix(in srgb, var(--ac) 9%, transparent), transparent 65%); pointer-events: none; z-index: 0; }
.lesson-top, .lesson-body { position: relative; z-index: 1; }
.lt-bar { height: 18px; position: relative; overflow: visible; }
.lt-bar i { position: relative; overflow: visible; }
.lt-bar i::after { content: ''; position: absolute; right: -6px; top: 50%; width: 14px; height: 14px; border-radius: 50%; transform: translateY(-50%); background: var(--hot, #FFE7A3); box-shadow: 0 0 12px 4px var(--ember); }
.lesson-body { display: flex; flex-direction: column; justify-content: center; min-height: calc(100vh - 210px); padding-top: 24px; padding-bottom: 170px; max-width: 700px; }
.lesson-ex { width: 100%; }
.lesson-ex .ex { animation: exIn .4s var(--ease) both; }
@keyframes exIn { from { opacity: 0; transform: translateY(14px); } }
.ex-kind { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--ac) 45%, var(--line-2)); background: color-mix(in srgb, var(--ac) 10%, transparent); color: color-mix(in srgb, var(--ac) 80%, var(--text)); font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 16px; }
.ex-kind .ic { width: 15px; height: 15px; }
.ex-title { font-size: clamp(26px, 3.4vw, 34px); margin-bottom: 24px; }
.ex-prompt.big { font-size: clamp(24px, 3.2vw, 32px); }
.bubble-q { font-size: 19px; padding: 16px 20px; border-radius: 20px 20px 20px 6px; background: var(--surface-2); box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .9); }
.choice { min-height: 64px; font-size: 17.5px; border-radius: 18px; }
.choices:not(.row) { grid-template-columns: 1fr 1fr; }
.tile { font-size: 18px; min-height: 50px; padding: 8px 16px; }
.tile-answer { min-height: 72px; border-top: 0; border-bottom: 2px dashed var(--line-2); }
.type-in { min-height: 120px; border-radius: 20px; }
.lf-msg .combo { display: inline-flex; align-items: center; gap: 4px; margin-left: 12px; padding: 2px 10px; border-radius: 999px; background: color-mix(in srgb, var(--amber) 14%, transparent); color: var(--amber); font-family: var(--mono); font-size: 12px; letter-spacing: .04em; }
.lf-msg .combo .ic { width: 14px; height: 14px; }
@media (max-width: 560px) {
  .choices:not(.row) { grid-template-columns: 1fr; }
  .lesson-body { min-height: auto; padding-top: 12px; }
}
