/* Sori: bright, warm and colorful. One stylesheet for the student page, the teacher dashboard and compare. */
:root {
  --bg: #fff6ee; --panel: #ffffff; --soft: #f6f1ff; --track: #efe9fb; --line: #ece4f7;
  --text: #2a2140; --muted: #7a7092; --accent: #ff5a5f; --accent2: #7c4dff; --pink: #ff4fa3;
  --good: #12b886; --warn: #f59f00; --bad: #f03e3e; --blue: #2f80ed; --teal: #0fb5a6; --sun: #ffc233;
  --grad: linear-gradient(120deg, #ff6a3d 0%, #ff4fa3 45%, #7c4dff 100%);
  --shadow: 0 10px 30px rgba(124, 77, 255, .12), 0 2px 6px rgba(255, 90, 95, .06);
}
* { box-sizing: border-box; }
html { height: 100%; }
body { margin: 0; min-height: 100%; display: flex; flex-direction: column; color: var(--text);
  font: 15px/1.5 "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(1200px 600px at 100% -10%, #ffe1ec 0%, transparent 60%),
              radial-gradient(900px 500px at -10% 20%, #e7ddff 0%, transparent 55%), var(--bg); background-attachment: fixed; }
a { color: var(--accent2); }
header { display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; background: var(--grad);
  color: #fff; box-shadow: 0 6px 20px rgba(255, 79, 163, .25); position: sticky; top: 0; z-index: 5; }
.brand { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.brand .logo { background: #fff; color: var(--accent); border-radius: 12px; padding: 2px 10px; font-size: 18px; }
.brand small { font-weight: 500; opacity: .9; font-size: 13px; }
.brand .ko { color: #fff; }
.hdr { display: flex; gap: 8px; align-items: center; }
header .chip { background: rgba(255,255,255,.22); color: #fff; }
header button.ghost, header a.chip { color: #fff; border-color: rgba(255,255,255,.6); background: transparent; }
header button.ghost:hover { background: rgba(255,255,255,.18); }
.chip { padding: 4px 12px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; }
.chip.live { background: #d3f9e8 !important; color: #087f5b !important; } .chip.wait { background: #fff3bf !important; color: #8a5a00 !important; }
.chip.err { background: #ffe3e3 !important; color: #c92a2a !important; }
button { font: inherit; color: var(--text); background: var(--panel); border: 1.5px solid var(--line); border-radius: 999px;
  padding: 7px 14px; cursor: pointer; transition: transform .08s, box-shadow .15s, background .15s; }
button:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(124, 77, 255, .15); }
button:disabled { opacity: .5; cursor: default; transform: none; }
button.primary { background: var(--grad); border: none; color: #fff; font-weight: 800; }
button.ghost { background: transparent; } button.big { font-size: 19px; padding: 14px 22px; }
.linkbtn { background: none; border: none; color: var(--accent2); padding: 0 4px; font-size: 13px; font-weight: 600; box-shadow: none !important; }
input, select, textarea { font: inherit; color: var(--text); background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 9px 12px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent2); box-shadow: 0 0 0 3px rgba(124,77,255,.15); }
textarea { width: 100%; resize: vertical; }
.hidden { display: none !important; }
.card { background: var(--panel); border-radius: 22px; padding: 18px; box-shadow: var(--shadow); border: 1px solid var(--line); }
h2 { margin: 0 0 10px; } h3 { margin: 6px 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--accent2); }
h3 small { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--muted); }
.hint { color: var(--muted); font-size: 13px; margin: 0; } .warn { color: var(--bad); display: block; font-size: 13px; }

/* ---------- start page (scrolls) ---------- */
.start { flex: 1; padding: 26px 20px 50px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.hero { width: min(1180px, 100%); display: grid; grid-template-columns: 1.05fr 1fr; gap: 26px; align-items: center;
  background: var(--grad); color: #fff; border-radius: 30px; padding: 30px; box-shadow: 0 20px 50px rgba(255, 79, 163, .3); }
.hello { font-size: 44px; font-weight: 900; line-height: 1; text-shadow: 0 3px 0 rgba(0,0,0,.08); }
.hero h1 { font-size: 30px; line-height: 1.2; margin: 10px 0 12px; }
.hero p { font-size: 16px; opacity: .95; margin: 0 0 14px; }
.how { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; counter-reset: s; }
.how li { background: rgba(255,255,255,.18); border-radius: 16px; padding: 10px; font-size: 12px; counter-increment: s; }
.how li::before { content: counter(s); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; color: var(--accent); font-weight: 900; margin-bottom: 4px; }
.how b { display: block; font-size: 15px; } .how span { opacity: .9; }
.hero-video video { width: 100%; border-radius: 18px; background: #000; box-shadow: 0 12px 30px rgba(0,0,0,.25); display: block; }
.hero-video .cap { font-size: 13px; margin-top: 6px; opacity: .95; } .hero-video .linkbtn { color: #fff; text-decoration: underline; }
.welcome { width: min(1180px, 100%); display: flex; flex-direction: column; gap: 12px; }
.formgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.formgrid label, .welcome > label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 13px; font-weight: 600; }
.check { flex-direction: row !important; align-items: flex-start; gap: 8px !important; color: var(--text) !important; font-size: 14px !important; }
.check small { display: block; color: var(--muted); font-weight: 400; }
.preview { background: var(--soft); border-radius: 18px; padding: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.preview .pv-title { grid-column: 1 / -1; font-weight: 800; font-size: 17px; }
.preview .pv-row b { color: var(--accent2); display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.preview .pv-sents { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.preview .pv-sents span { background: #fff; border-radius: 999px; padding: 3px 10px; font-size: 14px; border: 1px solid var(--line); }
.assign { background: #e6fcf5; border: 1.5px solid #96f2d7; border-radius: 16px; padding: 10px 12px; font-size: 14px; } .assign b { color: #087f5b; }
.links { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.checkmsg { border-radius: 14px; padding: 10px 12px; font-size: 14px; } .checkmsg.ok { background: #d3f9e8; } .checkmsg.bad { background: #ffe3e3; }
.checkmsg .detail { font-size: 12px; color: var(--muted); margin-top: 4px; word-break: break-word; }

/* ---------- lesson page ---------- */
main { flex: 1; display: grid; grid-template-columns: 300px minmax(0, 1fr) 300px; gap: 16px; padding: 16px; min-height: 0; align-items: start; }
aside { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.left .brief { background: var(--grad); color: #fff; border-radius: 22px; padding: 16px; box-shadow: var(--shadow); }
.brief-id { font-size: 12px; font-weight: 700; opacity: .9; letter-spacing: .08em; } .brief h2 { margin: 2px 0 10px; font-size: 22px; }
.brief-row { font-size: 13px; margin: 6px 0; } .brief-row b { display: block; font-size: 12px; opacity: .9; }
.steps { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 5px; counter-reset: st; }
.steps li { background: rgba(255,255,255,.16); border-radius: 12px; padding: 6px 10px; font-size: 13px; counter-increment: st; }
.steps li::before { content: counter(st) "  "; font-weight: 800; }
.steps li.on { background: #fff; color: var(--accent); font-weight: 800; box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.steps li.done { opacity: .75; } .steps li.done::after { content: " ✓"; }
.skills { display: flex; flex-direction: column; gap: 8px; background: #fff; border-radius: 18px; padding: 12px; box-shadow: var(--shadow); }
.skill { font-size: 12px; font-weight: 600; } .skill .bar { height: 9px; background: var(--track); border-radius: 6px; overflow: hidden; margin-top: 3px; }
.skill .bar div { height: 100%; border-radius: 6px; transition: width .5s; }
.skill.weak .name::after { content: "  ← focus"; color: var(--accent); font-weight: 800; }
.sounds { display: flex; flex-wrap: wrap; gap: 5px; }
.sounds span, .tag { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: #fff0f6; color: #c2255c; border: 1px solid #ffd6e8; }
.course summary { cursor: pointer; color: var(--accent2); font-weight: 700; font-size: 13px; }
.plan { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 4px; }
.plan li { padding: 6px 9px; border-radius: 12px; font-size: 13px; color: var(--muted); background: #fff; }
.plan li b { color: var(--text); } .plan li.done::before { content: "✓ "; color: var(--good); font-weight: 900; }
.plan li.current { background: var(--soft); color: var(--accent2); font-weight: 700; }

.center { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.conn { display: flex; justify-content: space-between; gap: 12px; align-items: center; background: #fff4e6; border: 2px solid #ffc078;
  border-radius: 18px; padding: 12px 14px; } .conn .detail { font-size: 12px; color: var(--muted); word-break: break-word; }
.conn.bad { background: #fff5f5; border-color: #ffa8a8; }
.phrase { text-align: center; padding: 16px 18px 12px; position: relative; overflow: hidden; }
.phrase-meta { font-size: 17px; } .phrase-meta .meaning { color: var(--text); margin-left: 8px; }
.phrase::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--grad); }
.lesson-title { color: var(--accent2); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.ko-big { margin: 8px 0 4px; overflow-x: auto; } .waiting { font-size: 22px; color: var(--muted); padding: 30px 0; }
.rom { font-size: 18px; color: var(--blue); font-weight: 600; } .meaning { font-size: 18px; color: var(--text); margin-top: 2px; }
.use { font-size: 14px; color: var(--muted); margin-top: 6px; } .use b { color: var(--teal); }
.tip { margin: 10px auto 0; max-width: 620px; background: #e7f5ff; border-radius: 14px; padding: 8px 12px; font-size: 14px; color: #1864ab; }
.qbadge { display: inline-block; margin-top: 8px; padding: 3px 12px; border-radius: 999px; background: #e6fcf5; color: #087f5b; font-size: 13px; font-weight: 700; }
.legend { font-size: 11px; color: var(--muted); margin-top: 8px; }
.legend .lg-line { color: var(--accent); font-weight: 700; } .legend .lg-link { color: var(--blue); font-weight: 700; } .legend .lg-said { color: var(--warn); font-weight: 700; }
.guide { margin-top: 8px; font-size: 13px; color: var(--muted); } .guide select { font-size: 13px; padding: 4px 10px; }
/* notation */
.nota-wrap { display: flex; justify-content: center; align-items: flex-end; flex-wrap: wrap; gap: 6px; }
.nota-sep { font-size: 28px; color: #d0c6e6; padding: 0 6px 40px; }
svg.nota { max-width: 100%; height: auto; overflow: visible; }
svg.nota .n-ko { fill: var(--text); font-weight: 800; } svg.nota .n-said { fill: #9b93b0; } svg.nota .n-said.ch { fill: var(--warn); font-weight: 800; }
svg.nota .n-line { stroke: var(--accent); } svg.nota .n-end { fill: var(--accent); font-weight: 800; }
svg.nota .n-link { stroke: var(--blue); } svg.nota .n-dot { fill: #d9cff0; }
.nota-said { font-size: 15px; color: var(--muted); margin-top: 2px; } .nota-said b { color: var(--warn); }

.turnbar { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 999px; padding: 6px 8px 6px 16px; box-shadow: var(--shadow); }
.turn { font-weight: 800; min-width: 190px; } .turn.you { color: var(--good); animation: pulse 1.2s infinite; } .turn.tutor { color: var(--accent2); }
@keyframes pulse { 50% { opacity: .5; } }
.meter { flex: 1; height: 10px; background: var(--track); border-radius: 6px; overflow: hidden; }
.meter div { height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--good)); transition: width .08s; }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; } .btnrow button { font-size: 13px; font-weight: 600; }
.btnrow button:nth-child(1) { background: #e7f5ff; border-color: #a5d8ff; } .btnrow button:nth-child(2) { background: #fff9db; border-color: #ffe066; }
.btnrow button:nth-child(3) { background: #f3f0ff; border-color: #d0bfff; } .btnrow button:nth-child(4) { background: #fff0f6; border-color: #fcc2d7; }
.btnrow button:nth-child(5) { background: #fff4e6; border-color: #ffd8a8; } .askt { background: #e6fcf5 !important; border-color: #96f2d7 !important; color: #087f5b; }
.sentlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.sent { background: var(--soft); border-radius: 16px; padding: 10px 12px; cursor: pointer; border: 2px solid transparent; transition: border .15s, transform .08s; text-align: left; }
.sent:hover { border-color: #d0bfff; transform: translateY(-1px); } .sent.on { border-color: var(--accent2); background: #fff; }
.sent .num { font-size: 11px; font-weight: 800; color: var(--accent2); } .sent .k { font-size: 20px; font-weight: 800; }
.sent .m { font-size: 13px; color: var(--muted); } .sent .st { float: right; font-size: 12px; font-weight: 800; }
.sent .st.s4, .sent .st.s5 { color: var(--good); } .sent .st.s3 { color: var(--warn); } .sent .st.s1, .sent .st.s2 { color: var(--bad); }
.feedback .fb-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.ko-mid { font-size: 22px; font-weight: 800; } .heard { color: var(--muted); font-size: 13px; }
.scores { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 12px 0; }
.score { border-radius: 16px; padding: 8px; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--soft); }
.score:nth-child(1) { background: #fff0f0; } .score:nth-child(2) { background: #f3f0ff; } .score:nth-child(3) { background: #e3fafc; }
.score:nth-child(4) { background: #e7f5ff; } .score:nth-child(5) { background: #fff9db; }
.score b { display: block; font-size: 24px; }
.fb-lines .good::before { content: "👍 "; } .fb-lines .fix::before { content: "🎯 "; } .fb-lines div { margin: 3px 0; }
.measured { display: flex; gap: 12px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
canvas { border-radius: 14px; max-width: 100%; }
.meas { font-size: 13px; color: var(--muted); } .meas b { color: var(--text); } .ok { color: var(--good); font-weight: 600; } .no { color: var(--bad); font-weight: 600; }
.lipf { margin-top: 4px; }

.right { gap: 12px; } .card.small { padding: 14px; }
.right .card { padding: 14px; }
.chat { display: flex; flex-direction: column; gap: 10px; }
.chat-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.chat .turnbar { box-shadow: none; background: var(--soft); flex: 1; max-width: 520px; padding: 4px 6px 4px 14px; }
.log { overflow: auto; display: flex; flex-direction: column; gap: 10px; font-size: 16px; height: calc(100vh - 470px); min-height: 280px; padding: 4px; }
.msg { font-size: 16px; line-height: 1.45; }
.msg { padding: 8px 12px; border-radius: 18px; max-width: 92%; }
.msg.tutor { background: #f3f0ff; border-bottom-left-radius: 6px; } .msg.you { background: #e6fcf5; align-self: flex-end; border-bottom-right-radius: 6px; }
.msg.sys { color: var(--muted); font-size: 12px; background: none; padding: 2px 4px; }
.msg .who { font-size: 11px; color: var(--muted); display: block; font-weight: 700; }
.msg.q { background: #e7f5ff; border: 1.5px dashed #74c0fc; font-size: 13px; } .msg.ta { background: #fff9db; border: 1.5px solid #ffe066; }
#typeForm { display: flex; gap: 6px; margin-top: 8px; } #typeForm input { flex: 1; min-width: 0; } #typeForm button { flex: none; }

/* mouth */
.diagram { margin: 12px auto 0; max-width: 720px; text-align: left; background: #fff; border: 2px solid #efe7ff; border-radius: 18px; padding: 12px 14px; box-shadow: 0 6px 20px rgba(124,77,255,.08); }
.dg-head { font-size: 15px; color: #4a3a7a; margin-bottom: 6px; } .dg-head b { font-size: 20px; color: #7c4dff; } .dg-head span { margin-left: 8px; color: #8a80a8; font-size: 13px; }
.dg-body { display: flex; gap: 16px; align-items: flex-start; }
.dg-pic { flex: 0 0 250px; background: linear-gradient(180deg,#fff7fb,#f6f1ff); border-radius: 14px; }
.m-side { width: 100%; height: auto; display: block; }
.m-nose { fill: #e8f2ff; } .m-skin-line { fill: none; stroke: #c9a38f; stroke-width: 2.4; stroke-linecap: round; }
.m-roof { fill: none; stroke: #8a6b5b; stroke-width: 3; stroke-linecap: round; } .m-line { fill: none; stroke: #cfbfb6; stroke-width: 2; }
.m-tooth { fill: #fff; stroke: #c9c1bb; stroke-width: 1.2; } .m-lip { fill: #ef8f8a; stroke: #d9706b; stroke-width: 1; }
.m-tongue { fill: #ff7a93; stroke: #e2526f; stroke-width: 1.5; opacity: .95; }
.m-air path, path.m-air { fill: none; stroke: #2f8cff; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 5 5; animation: m-flow 0.9s linear infinite; }
@keyframes m-flow { to { stroke-dashoffset: 20; } }
.m-airtxt { fill: #2f8cff; font-size: 11px; font-weight: 700; }
.m-hold circle, .m-hold path { fill: none; stroke: #e2526f; stroke-width: 2.4; }
.m-touch { fill: #ff2d55; stroke: #fff; stroke-width: 2; }
.m-halo { fill: #ff2d55; opacity: .5; }
.m-touch.near { fill: #fff; stroke: #ff2d55; stroke-dasharray: 3 2; }
.m-pointer { stroke: #ff2d55; stroke-width: 1.5; } .m-touchtxt { fill: #ff2d55; font-size: 11px; font-weight: 800; }
.m-arrow { fill: none; stroke: #7c4dff; stroke-width: 2; stroke-dasharray: 4 3; }
.m-throat path { fill: none; stroke: #ffa000; stroke-width: 2.4; }
.m-label { fill: #8a7b72; font-size: 10px; } .m-tlabel { fill: #c2334f; font-weight: 700; font-size: 11px; } .m-hint { fill: #9a90b5; font-size: 10px; }
.dg-text { flex: 1; min-width: 0; font-size: 14px; color: #3d3557; }
.dg-text ol { margin: 0 0 8px; padding-left: 20px; } .dg-text li { margin: 3px 0; }
.dg-cmp { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; font-size: 12.5px; }
.dg-cmp span { padding: 3px 9px; border-radius: 99px; } .dg-cmp .ok { background: #e6f8ee; color: #1b8a4c; } .dg-cmp .no { background: #ffecef; color: #c2334f; }
.dg-fam { display: flex; gap: 8px; flex-wrap: wrap; }
.dg-fam div { background: #f6f1ff; border-radius: 12px; padding: 6px 12px; text-align: center; min-width: 84px; }
.dg-fam b { display: block; font-size: 22px; color: #4a3a7a; } .dg-fam small { color: #7a7096; font-size: 11.5px; }
.dg-vowel { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin-bottom: 8px; }
.m-vmap { width: 190px; max-width: 100%; } .m-vbox { fill: #fbf8ff; stroke: #d9ccff; stroke-width: 1.5; }
.m-vmap g circle { fill: #fff; stroke: #c9b8ff; stroke-width: 1.5; } .m-vmap g text { font-size: 12px; fill: #6a5d8f; }
.m-vmap g text.en { font-size: 10px; fill: #a397c4; }
.m-vmap g.on circle { fill: #7c4dff; stroke: #7c4dff; } .m-vmap g.on text { fill: #fff; font-weight: 800; } .m-vmap g.on text.en { fill: #7c4dff; }
.m-front { width: 80px; } .m-lipf { fill: #ef8f8a; } .m-hole { fill: #5a1f2a; }
@media (max-width: 900px) { .dg-body { flex-direction: column; } .dg-pic { flex-basis: auto; width: 100%; } }
.mouthcard { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.cam { position: relative; width: 240px; height: 180px; border-radius: 16px; overflow: hidden; background: #1f1a3a; flex: none; }
.cam video, .cam canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.camlabel { position: absolute; left: 8px; bottom: 6px; font-size: 11px; color: #fff; text-shadow: 0 1px 2px #000; }
.chartbox { flex: 1; min-width: 300px; } #lipChart { width: 100%; max-width: 420px; height: auto; }
.vowelbtns { font-size: 13px; color: var(--muted); margin-top: 6px; } .vowelbtns button { font-size: 16px; padding: 3px 12px; margin: 2px; }
.vowelbtns button.on { background: var(--grad); color: #fff; border: none; }
.vtip { font-size: 13px; margin-top: 4px; } .vtip.win { color: var(--good); font-weight: 800; }

/* modals */
.modal { position: fixed; inset: 0; background: rgba(42, 33, 64, .55); display: grid; place-items: center; z-index: 20; padding: 16px; }
.modal .card { width: min(640px, 94vw); max-height: 88vh; overflow: auto; } .modal .card.video { width: min(980px, 96vw); padding: 10px; }
.modal video { width: 100%; border-radius: 14px; background: #000; }
.row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.md h1 { font-size: 22px; } .md h2 { font-size: 16px; color: var(--accent); margin-top: 16px; }

@media (max-width: 1100px) {
  main { grid-template-columns: 1fr; } .right { position: static; max-height: none; }
  .hero { grid-template-columns: 1fr; } .formgrid { grid-template-columns: 1fr 1fr; } .how { grid-template-columns: 1fr 1fr; }
}

/* lesson navigation, compact sentences, small voice panel */
.left .card { padding: 14px; }
.sentlist { display: flex; flex-direction: column; gap: 6px; }
.sent { padding: 8px 10px; } .sent .k { font-size: 17px; } .sent .m { font-size: 12px; }
.plan li { cursor: pointer; transition: background .15s; } .plan li:hover { background: var(--soft); color: var(--accent2); }
.voice .scores { grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 8px 0; }
.voice .score { padding: 4px 2px; font-size: 9px; } .voice .score b { font-size: 16px; }
.voice .fb-lines { font-size: 13px; } .voice .ko-mid { font-size: 16px; } .voice canvas { width: 100%; height: auto; margin-top: 6px; }
.voice .meas { font-size: 12px; }
details.mouthcard { display: block; } details.mouthcard summary { cursor: pointer; font-weight: 700; color: var(--accent2); font-size: 13px; }
details.mouthcard .cam { width: 100%; height: 160px; margin-top: 8px; } details.mouthcard canvas#lipChart { width: 100%; margin-top: 6px; }
.right .skills { box-shadow: none; padding: 0; }
.quit { color: var(--muted) !important; margin-left: auto; }
.pick { font-size: 14px; }
.lessoncards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.lcard { background: var(--soft); border-radius: 18px; padding: 12px; cursor: pointer; border: 2px solid transparent; transition: transform .1s, border .15s; position: relative; }
.lcard:hover { transform: translateY(-2px); border-color: #d0bfff; }
.lcard.on { background: #fff; border-color: var(--accent2); box-shadow: var(--shadow); }
.lcard .lid { font-size: 11px; font-weight: 800; color: #fff; background: var(--grad); border-radius: 999px; padding: 1px 8px; display: inline-block; }
.lcard .lt { font-weight: 800; margin: 6px 0 2px; } .lcard .ls { font-size: 12px; color: var(--muted); }
.lcard .done { position: absolute; top: 10px; right: 12px; color: var(--good); font-weight: 900; }
.lcard:nth-child(4n+1) { background: #fff0f0; } .lcard:nth-child(4n+2) { background: #f3f0ff; } .lcard:nth-child(4n+3) { background: #e3fafc; } .lcard:nth-child(4n+4) { background: #fff9db; }
.lcard.on { background: #fff !important; }
/* summary page */
.summary { flex: 1; padding: 26px 20px 50px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.sum-hero { width: min(1180px, 100%); background: var(--grad); color: #fff; border-radius: 30px; padding: 26px 30px; box-shadow: 0 20px 50px rgba(255,79,163,.3); }
.sum-hero h1 { margin: 6px 0 14px; }
.sum-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sum-stats div { background: rgba(255,255,255,.2); border-radius: 16px; padding: 10px 12px; font-size: 13px; }
.sum-stats b { display: block; font-size: 26px; }
.sum-grid { width: min(1180px, 100%); display: grid; grid-template-columns: 1.1fr 1fr 0.9fr; gap: 16px; align-items: start; }
.sum-sent { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sum-sent .k { font-weight: 800; font-size: 17px; } .sum-sent .m { font-size: 12px; color: var(--muted); }
.sum-sent .sc { font-weight: 800; white-space: nowrap; } .sum-sent .sc.s4, .sum-sent .sc.s5 { color: var(--good); } .sum-sent .sc.s3 { color: var(--warn); } .sum-sent .sc.s1, .sum-sent .sc.s2 { color: var(--bad); }
.sum-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
@media (max-width: 1100px) { .lessoncards { grid-template-columns: 1fr 1fr; } .sum-grid { grid-template-columns: 1fr; } .sum-stats { grid-template-columns: 1fr 1fr; } .log { height: 50vh; } }

.diagram { container-type: inline-size; }
@container (max-width: 520px) { .dg-body { flex-direction: column; align-items: stretch; } .dg-pic { flex-basis: auto; max-width: 320px; margin: 0 auto; } }
