/* Trợ Giảng AI — Trogiang.ai brand on the giaovien.phongthiao.com layout. Light only. */
:root {
  --primary: #008037; --primary-dark: #17553f; --primary-soft: #e6f4ec; --primary-line: #bfe3cd;
  --accent: #f36e36; --accent-soft: #fdebe2; --yellow: #ffae0f; --navy: #051f4d;
  --ink: #212b36; --muted: #8a94a6; --line: #e5e8eb; --bg: #f5f6fa; --card: #fff; --soft: #f1f2f4;
  --ok: #1f9254; --ok-soft: #e6f7ed; --bad: #d93025; --bad-soft: #fdecea; --info: #1565c0;
  --radius: 12px; --sb: 280px; --font: "Open Sans", "Inter", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; font-size: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--ink); }
h1, h2, h3 { margin: 0; font-weight: 700; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.b { font-weight: 700; }
.row { display: flex; align-items: center; gap: 10px; }
.sp { flex: 1; }
.wrap { flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent; font-weight: 600; font-size: 14px; background: var(--soft); color: var(--ink); white-space: nowrap; transition: background .15s, box-shadow .15s; }
.btn:hover { filter: brightness(.97); }
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { background: #00702f; filter: none; }
.btn.accent { background: var(--accent); color: #fff; }
.btn.ghost { background: #fff; border-color: var(--line); }
.btn.ghost:hover { border-color: #cfd4da; background: #fafbfc; filter: none; }
.btn.soft { background: var(--primary-soft); color: var(--primary-dark); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.lg { height: 48px; padding: 0 26px; font-size: 15px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }
.link { background: none; border: 0; padding: 0; color: var(--primary); font-weight: 600; }
.chip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--soft); font-size: 12.5px; font-weight: 600; color: #41566c; }
.chip.green { background: var(--primary-soft); color: var(--primary-dark); }
.chip.orange { background: var(--accent-soft); color: #b94a16; }
.chip.blue { background: #e3f0fc; color: #0d47a1; }
.chip.red { background: var(--bad-soft); color: var(--bad); }
.chip.gold { background: #fff4d6; color: #8a5a00; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; }
.tag-pro { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 6px; background: #fff4d6; color: #8a5a00; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; }
.ico { width: 20px; height: 20px; flex: none; }

/* ---------- forms ---------- */
.input, .select, .textarea { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
.textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 44px; line-height: 1.5; }
.input:hover, .select:hover, .textarea:hover { border-color: #cfd4da; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 128, 55, .12); }
.label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 6px; }
.hint { font-size: 12.5px; color: var(--muted); }
.field { margin-bottom: 16px; }
.seg { display: inline-flex; background: var(--soft); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { height: 32px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; font-weight: 600; color: #41566c; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.choice { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-weight: 600; font-size: 13.5px; }
.choice.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
.toggle { position: relative; width: 40px; height: 22px; border-radius: 999px; background: #cfd4da; border: 0; transition: background .15s; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.toggle.on { background: var(--primary); }
.toggle.on::after { left: 20px; }

/* ---------- shell ---------- */
.app { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sb); background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 30; transition: transform .2s; }
.sb-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 48px; height: 48px; border-radius: 12px; }
.brand b { font-size: 15px; letter-spacing: .02em; color: var(--navy); line-height: 1.1; }
.brand small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 600; letter-spacing: .04em; }
.sb-collapse { width: 30px; height: 30px; border: 0; background: transparent; color: var(--muted); border-radius: 8px; }
.sb-collapse:hover { background: var(--soft); }
.sb-create { margin: 8px 16px 6px; position: relative; }
.sb-create .btn { width: 100%; height: 44px; font-size: 15px; }
.sb-create-menu { position: absolute; top: 50px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .12); padding: 6px; z-index: 5; }
.sb-create-menu button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 10px 12px; border: 0; background: none; border-radius: 8px; text-align: left; font-weight: 600; }
.sb-create-menu button:hover { background: var(--primary-soft); }
.sb-create-menu small { display: block; font-weight: 400; color: var(--muted); }
.sb-nav { flex: 1; overflow-y: auto; padding: 4px 16px 10px; }
.sb-sect { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin: 14px 0 4px; }
.sb-item { display: flex; align-items: center; gap: 14px; height: 42px; padding: 0 12px; border-radius: 10px; color: var(--ink); font-weight: 600; font-size: 15px; }
.sb-item:hover { background: var(--soft); }
.sb-item.on { background: var(--primary-soft); color: var(--primary); }
.sb-item .ico { color: #56595b; }
.sb-item.on .ico { color: var(--primary); }
.sb-item .tag-pro { margin-left: auto; }
.sb-bottom { padding: 10px 16px 16px; border-top: 1px solid var(--line); }
.wallet { display: flex; align-items: center; gap: 10px; padding: 10px 4px; }
.coin { width: 22px; height: 22px; border-radius: 50%; background: var(--yellow); color: #fff; font-weight: 800; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .15); }
.journey { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.journey b { font-size: 13px; }
.journey small { color: var(--primary); font-weight: 600; }
.main { margin-left: var(--sb); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: 64px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 28px 0 40px; }
.tb-title { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.tb-burger { display: none; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.tb-student { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--accent); background: linear-gradient(180deg, #ffe3d3, #fbcdb3); color: #7a2f0b; font-weight: 700; }
.tb-student .ico { color: var(--accent); }
.tb-plan { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 600; }
.tb-plan .ico { color: var(--primary); width: 18px; height: 18px; }
.tb-school { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 700; }
.tb-search { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 8px; background: var(--soft); color: var(--muted); font-weight: 600; font-size: 13px; }
.tb-icon { position: relative; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; display: inline-flex; align-items: center; justify-content: center; color: #41566c; }
.tb-icon:hover { background: var(--soft); }
.tb-icon .badge { position: absolute; top: -4px; right: -4px; }
.flag { width: 28px; height: 20px; border-radius: 3px; background: #da251d; position: relative; display: inline-block; }
.flag::after { content: "★"; color: #ffde00; position: absolute; inset: 0; font-size: 13px; line-height: 20px; text-align: center; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, #ffd9a0, #ffb34d); color: #6b3d00; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.guidebar { display: flex; align-items: center; gap: 18px; height: 40px; padding: 0 40px; background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
.guidebar button { background: none; border: 0; color: inherit; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.guidebar .x { margin-left: auto; font-size: 18px; }
.content { padding: 28px 40px 60px; flex: 1; }
.page-h { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-h h1 { font-size: 26px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.card + .card { margin-top: 16px; }
.card-h { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-h h2 { font-size: 17px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; gap: 14px; align-items: center; }
.kpi .ic { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
.kpi small { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #41566c; }
.kpi b { font-size: 22px; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12.5px; color: #41566c; background: var(--soft); padding: 12px 14px; font-weight: 700; }
.tbl th:first-child { border-radius: 10px 0 0 10px; }
.tbl th:last-child { border-radius: 0 10px 10px 0; }
.tbl td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl a.b { color: var(--info); }
.code { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 6px; background: #e3f0fc; color: #0d47a1; font-weight: 700; font-size: 12px; font-family: ui-monospace, Menlo, monospace; }
.bar { height: 8px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty img { width: 110px; margin-bottom: 10px; }
.grid { display: grid; gap: 16px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- explore ---------- */
.hero { background: linear-gradient(135deg, #e9f7ee, #f3fbf6 60%, #fff5ee); border: 1px solid #d8eee0; border-radius: 16px; padding: 30px 40px 26px; margin-bottom: 22px; }
.hero h1 { text-align: center; font-size: 30px; color: var(--primary-dark); margin-bottom: 18px; }
.hero h1 span { color: var(--accent); }
.search { display: flex; max-width: 620px; margin: 0 auto 16px; }
.search input { flex: 1; height: 50px; border: 1px solid var(--line); border-radius: 12px 0 0 12px; padding: 0 16px; font-size: 15px; outline: none; }
.search button { width: 56px; border: 0; border-radius: 0 12px 12px 0; background: var(--primary); color: #fff; }
.filters { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.filters select { height: 36px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 0 10px; font-size: 13px; font-weight: 600; color: #41566c; }
.subjects { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 14px; margin-bottom: 8px; }
.subj { flex: none; width: 118px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 6px; border-radius: 12px; border: 1px solid transparent; background: none; color: #41566c; font-weight: 600; font-size: 13px; }
.subj .ic { width: 62px; height: 62px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; color: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12); }
.subj.on { color: var(--ink); }
.subj.on .ic { box-shadow: 0 0 0 4px #fff, 0 0 0 6px currentColor; }
.subj.add .ic { background: var(--soft); color: var(--muted); border: 2px dashed #cfd4da; font-size: 28px; }
.sect-h { display: flex; align-items: center; gap: 12px; margin: 26px 0 14px; }
.sect-h h2 { font-size: 20px; }
.sect-h .btn { margin-left: auto; }
.cp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.cp { display: flex; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; position: relative; cursor: pointer; transition: box-shadow .15s, transform .15s; }
.cp:hover { box-shadow: 0 10px 28px rgba(0, 0, 0, .08); transform: translateY(-2px); }
.cp .cover { width: 120px; height: 150px; border-radius: 10px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 46px; font-weight: 700; color: #fff; position: relative; overflow: hidden; }
.cp .cover::after { content: ""; position: absolute; inset: auto -20px -30px auto; width: 110px; height: 110px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.cp .lvl { position: absolute; top: 8px; left: 8px; height: 22px; padding: 0 8px; border-radius: 6px; background: rgba(255, 255, 255, .92); color: var(--ink); font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; }
.cp .free { position: absolute; top: 10px; right: 10px; }
.cp h3 { font-size: 15px; line-height: 1.35; margin: 2px 0 8px; padding-right: 60px; }
.cp .meta { font-size: 12.5px; color: var(--muted); margin-top: auto; }
.cp .meta b { color: var(--ink); }
.cp .skills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.cp .skills span { font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }

/* ---------- builder: select type ---------- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs button { height: 42px; padding: 0 16px; border: 0; background: none; font-weight: 600; color: #41566c; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 8px; }
.tabs button.on { color: var(--primary); border-color: var(--primary); }
.type-sect { margin-bottom: 26px; }
.type-sect h2 { font-size: 16px; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.type-sect h2 .dot { width: 26px; height: 26px; border-radius: 8px; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px 12px; min-height: 118px; background: #fff; border: 1px solid var(--line); border-radius: 12px; text-align: center; transition: border-color .15s, box-shadow .15s; }
.tile:hover, .tile.on { border-color: var(--primary); box-shadow: 0 6px 18px rgba(0, 128, 55, .12); }
.tile .grp { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #41566c; }
.tile .ic { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; }
.tile .nm { font-size: 13px; font-weight: 700; line-height: 1.3; }
.tile .ai { position: absolute; top: 8px; right: 8px; font-size: 9.5px; font-weight: 800; color: var(--info); border: 1px solid #bcd6f5; border-radius: 4px; padding: 0 4px; }
.tile .lock { position: absolute; top: 8px; left: 8px; }
.type-desc { position: sticky; bottom: 16px; margin-right: 120px; display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .08); margin-top: 10px; }
.type-desc .ic { width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 17px; }
.type-desc b { display: block; font-size: 15px; }
.type-desc .btn { margin-left: auto; }

/* ---------- builder: editor ---------- */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 20px; align-items: start; }
.ed-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.ed-top #edTitle { flex: 1; min-width: 180px; max-width: 300px; }
.ed-top .meta { display: flex; gap: 8px; align-items: center; }
.ed-top .meta input { width: 64px; height: 36px; }
.ed-form .field { margin-bottom: 18px; }
.list-ed { display: flex; flex-direction: column; gap: 8px; }
.list-ed .r { display: flex; align-items: center; gap: 8px; }
.list-ed .r input[type=text] { flex: 1; height: 38px; }
.list-ed .r .mark { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: #fff; display: inline-flex; align-items: center; justify-content: center; color: #cfd4da; font-weight: 700; }
.list-ed .r .mark.on { background: var(--ok-soft); color: var(--ok); border-color: #9fd5b4; }
.list-ed .r .tfm { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.list-ed .r .tfm button { height: 36px; padding: 0 10px; border: 0; background: #fff; font-weight: 600; color: var(--muted); }
.list-ed .r .tfm button.on { background: var(--primary-soft); color: var(--primary-dark); }
.list-ed .r .del { width: 32px; height: 32px; border: 0; background: none; color: var(--muted); border-radius: 8px; font-size: 18px; }
.list-ed .r .del:hover { background: var(--bad-soft); color: var(--bad); }
.list-ed .add { align-self: flex-start; }
.subq { border: 1px dashed var(--line); border-radius: 10px; padding: 10px; }
.subq .o { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.subq .o input { flex: 1; height: 34px; }
.preview-card { position: sticky; top: 84px; }
.preview-card .card-h { margin-bottom: 10px; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ok); background: var(--ok-soft); padding: 2px 10px; border-radius: 999px; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.phone { width: 100%; max-width: 390px; margin: 0 auto; border: 10px solid #1b1b1f; border-radius: 36px; background: #fff; overflow: hidden; box-shadow: 0 20px 40px rgba(0, 0, 0, .18); }
.phone .notch { height: 26px; background: #1b1b1f; position: relative; }
.phone .notch::after { content: ""; position: absolute; left: 50%; top: 6px; width: 110px; height: 16px; transform: translateX(-50%); border-radius: 999px; background: #000; }
.phone .ph-h { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; }
.phone .ph-body { padding: 14px; min-height: 420px; max-height: 620px; overflow-y: auto; }
.phone .ph-foot { height: 22px; display: flex; justify-content: center; align-items: center; }
.phone .ph-foot i { width: 110px; height: 5px; border-radius: 999px; background: #1b1b1f; }

/* ---------- question renderers ---------- */
.q { font-size: 14.5px; }
.q-prompt { margin-bottom: 12px; }
.q-glyph { font-size: 54px; line-height: 1.1; text-align: center; margin: 4px 0 8px; font-weight: 500; }
.q-text { font-weight: 600; line-height: 1.55; }
.q-text b { color: var(--primary-dark); }
.spk { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; margin-top: 8px; border: 1px solid var(--primary-line); border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; font-size: 12.5px; }
.spk.on { background: var(--primary); color: #fff; }
.q-fig { display: block; margin: 6px 0 10px; }
.q-opts { display: flex; flex-direction: column; gap: 8px; }
.q-opts.small { gap: 6px; margin-top: 6px; }
.q-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; transition: border-color .12s, background .12s; }
.q-opt:hover { border-color: #cfd4da; }
.q-opt.sel { border-color: var(--primary); background: var(--primary-soft); }
.q-opt.right { border-color: var(--ok); background: var(--ok-soft); }
.q-opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.q-letter { width: 26px; height: 26px; border-radius: 50%; background: var(--soft); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12.5px; flex: none; }
.q-opt.sel .q-letter { background: var(--primary); color: #fff; }
.q-opt.right .q-letter { background: var(--ok); color: #fff; }
.q-opt.wrong .q-letter { background: var(--bad); color: #fff; }
.q-opt-t { flex: 1; }
.q-tf { display: flex; flex-direction: column; gap: 8px; }
.q-tf-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.q-tf-row.right { border-color: var(--ok); background: var(--ok-soft); }
.q-tf-row.wrong { border-color: var(--bad); background: var(--bad-soft); }
.q-tf-t { flex: 1; }
.q-tf-btns { display: inline-flex; gap: 4px; }
.q-tf-b { height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 600; font-size: 12.5px; }
.q-tf-b.sel { background: var(--primary); color: #fff; border-color: var(--primary); }
.q-match { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.q-col { display: flex; flex-direction: column; gap: 8px; }
.q-m { padding: 10px; border: 2px solid var(--line); border-radius: 12px; background: #fff; font-weight: 600; min-height: 44px; }
.q-m.sel { border-color: var(--primary); background: var(--primary-soft); }
.q-gaptext { line-height: 2.3; font-size: 15px; }
.q-gap { height: 32px; border: 0; border-bottom: 2px solid var(--primary); background: var(--primary-soft); border-radius: 6px 6px 0 0; padding: 0 8px; text-align: center; font-weight: 600; outline: none; margin: 0 3px; }
.q-gap.right { border-color: var(--ok); background: var(--ok-soft); }
.q-gap.wrong { border-color: var(--bad); background: var(--bad-soft); }
.q-keys { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.q-key { height: 32px; min-width: 36px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 600; }
.q-slot { min-width: 64px; height: 32px; padding: 0 10px; border: 2px dashed var(--primary); border-radius: 8px; background: #fff; font-weight: 700; margin: 0 3px; vertical-align: middle; }
.q-slot.filled { border-style: solid; background: var(--primary-soft); color: var(--primary-dark); }
.q-slot.right { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.q-slot.wrong { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.q-bank { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.q-chip { height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 600; box-shadow: 0 2px 0 var(--line); }
.q-chip.used { opacity: .3; pointer-events: none; }
.q-chip.picked { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary-dark); display: inline-flex; align-items: center; gap: 8px; }
.q-answer { min-height: 50px; padding: 8px; border: 1px dashed var(--line); border-radius: 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.q-answer.lines { flex-direction: column; align-items: stretch; }
.q-answer.lines .q-chip { height: auto; min-height: 36px; padding: 8px 12px; text-align: left; white-space: normal; }
.q-num { width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.q-hint { color: var(--muted); font-size: 13px; }
.q-dd { height: 32px; border: 1px solid var(--primary); border-radius: 8px; background: var(--primary-soft); padding: 0 6px; font-weight: 600; margin: 0 3px; }
.q-dd.right { border-color: var(--ok); background: var(--ok-soft); }
.q-dd.wrong { border-color: var(--bad); background: var(--bad-soft); }
.q-flash { display: flex; flex-direction: column; gap: 10px; }
.q-card { min-height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(160deg, #fff, #f3f8f5); cursor: pointer; padding: 16px; text-align: center; transition: transform .25s; }
.q-card.back { background: linear-gradient(160deg, var(--primary-soft), #fff); transform: rotateY(360deg); }
.q-card-face { font-size: 30px; font-weight: 700; }
.q-card-hint { font-size: 12px; color: var(--muted); margin-top: 8px; }
.q-flash-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.q-count { font-size: 12.5px; color: var(--muted); }
.q-essay { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-family: inherit; font-size: 14px; resize: vertical; }
.q-wc { font-size: 12px; color: var(--muted); margin-top: 6px; }
.q-rubric { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.q-rubric-h { background: var(--soft); padding: 8px 12px; font-size: 12px; font-weight: 700; }
.q-rubric-r { display: flex; justify-content: space-between; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 13px; }
.q-num-row { display: flex; gap: 8px; }
.q-numin { flex: 1; height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font-size: 16px; font-weight: 600; }
.q-unit { height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 8px; font-weight: 600; }
.q-numin.right, .q-unit.right { border-color: var(--ok); background: var(--ok-soft); }
.q-numin.wrong, .q-unit.wrong { border-color: var(--bad); background: var(--bad-soft); }
.q-stroke { display: flex; gap: 14px; align-items: flex-start; }
.q-canvas { width: 210px; height: 210px; max-width: 100%; border-radius: 8px; touch-action: none; cursor: crosshair; box-shadow: 0 0 0 1px var(--line); }
.q-stroke-side { display: flex; flex-direction: column; gap: 8px; }
.q-strokecount { font-weight: 700; font-size: 15px; color: var(--primary-dark); }
.q-hangul { display: flex; flex-direction: column; gap: 6px; }
.q-syl { font-size: 64px; text-align: center; font-weight: 600; line-height: 1.1; margin-bottom: 4px; }
.q-jamo-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 4px; }
.q-jamo { display: flex; flex-wrap: wrap; gap: 4px; }
.q-j { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 16px; }
.q-j.sel { background: var(--primary); color: #fff; border-color: var(--primary); }
.q-tones { display: flex; flex-direction: column; gap: 10px; }
.q-tone { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; }
.q-tone.right { border-color: var(--ok); background: var(--ok-soft); }
.q-tone.wrong { border-color: var(--bad); background: var(--bad-soft); }
.q-tone-py { width: 56px; font-weight: 700; }
.q-tone-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.q-tone-b { height: 34px; min-width: 46px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 600; }
.q-tone-b.sel { background: var(--primary); color: #fff; border-color: var(--primary); }
.q-eq { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 18px; padding: 8px 0; }
.q-term { display: inline-flex; align-items: center; gap: 4px; }
.q-coef { width: 40px; height: 38px; border: 1px solid var(--primary); border-radius: 8px; background: var(--primary-soft); text-align: center; font-weight: 700; font-size: 16px; }
.q-coef.right { border-color: var(--ok); background: var(--ok-soft); }
.q-coef.wrong { border-color: var(--bad); background: var(--bad-soft); }
.q-formula { font-weight: 600; }
.q-plus, .q-arrow { font-weight: 700; color: var(--muted); padding: 0 2px; }
.q-ptable { display: grid; grid-template-columns: repeat(18, minmax(0, 1fr)); gap: 2px; min-width: 0; }
.q-el { aspect-ratio: 1; min-width: 0; overflow: hidden; border: 1px solid #fff; border-radius: 4px; font-size: 10px; font-weight: 700; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; color: var(--ink); }
.q-el small { font-size: 6.5px; font-weight: 400; }
.q-el.ak, .q-pt-legend .ak { background: #ffd6d6; } .q-el.ae, .q-pt-legend .ae { background: #ffe4c4; } .q-el.tm, .q-pt-legend .tm { background: #fff2b3; } .q-el.pm, .q-pt-legend .pm { background: #d9f2d9; } .q-el.md, .q-pt-legend .md { background: #c8e6e6; } .q-el.nm, .q-pt-legend .nm { background: #d6e4ff; } .q-el.hl, .q-pt-legend .hl { background: #e8d6ff; } .q-el.ng, .q-pt-legend .ng { background: #f0d9ec; }
.q-el.sel { outline: 2px solid var(--primary); outline-offset: -1px; }
.q-el.right { outline: 2px solid var(--ok); outline-offset: -1px; }
.q-el.wrong { outline: 2px solid var(--bad); outline-offset: -1px; }
.q-pt-legend { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.q-pt-legend span { font-size: 10px; padding: 1px 6px; border-radius: 4px; }
.q-graph { display: block; max-width: 300px; margin: 0 auto; cursor: crosshair; }
.q-hot { line-height: 2.1; }
.q-w { border: 0; background: none; padding: 2px 3px; border-radius: 6px; font-size: 15px; }
.q-w:hover { background: var(--soft); }
.q-w.sel { background: #fff0b3; }
.q-w.right { text-decoration: underline; text-decoration-color: var(--ok); text-decoration-thickness: 2px; }
.q-w.wrong { background: var(--bad-soft); color: var(--bad); }
.q-passage { padding: 12px 14px; border-left: 3px solid var(--primary); background: #fafbfc; border-radius: 0 10px 10px 0; line-height: 1.7; margin-bottom: 12px; }
.q-subqs { display: flex; flex-direction: column; gap: 12px; }
.q-subq-t { font-weight: 600; }
.q-foot { margin-top: 14px; display: flex; gap: 8px; }
.q-result { margin-top: 10px; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: 13.5px; }
.q-result.ok { background: var(--ok-soft); color: var(--ok); }
.q-result.bad { background: var(--bad-soft); color: var(--bad); }
.q-result.neutral { background: var(--soft); color: #41566c; }

/* preview page (checkpoint) */
.cp-head { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 18px; }
.cp-head .cover { width: 140px; height: 170px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 54px; color: #fff; font-weight: 700; flex: none; }
.cp-head h1 { font-size: 24px; margin-bottom: 8px; }
.qlist { display: flex; flex-direction: column; gap: 16px; }
.qitem { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.qitem .qh { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.qitem .qh b { color: var(--ink); font-size: 14px; }

/* ---------- onboarding ---------- */
.onb { min-height: 100vh; background: #fff; display: flex; flex-direction: column; }
.onb-h { display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 24px; border-bottom: 1px solid var(--line); }
.coinpill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--yellow); background: #fffbf0; }
.coinpill b { color: var(--primary); font-size: 15px; display: block; line-height: 1; }
.coinpill small { color: #41566c; font-weight: 600; }
.onb-body { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 48px 20px 140px; }
.onb-step { width: 100%; max-width: 720px; text-align: center; }
.onb-step h1 { font-size: 30px; margin-bottom: 10px; }
.onb-step .lead { color: #41566c; font-size: 16px; margin-bottom: 30px; }
.onb-step .lead b { color: var(--ink); }
.dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 26px; }
.dots i { width: 28px; height: 5px; border-radius: 999px; background: var(--soft); }
.dots i.on { background: var(--primary); }
.rolecards { display: flex; justify-content: center; gap: 18px; }
.rolecard { width: 220px; padding: 26px 16px 22px; border: 1px solid var(--line); border-radius: 14px; background: #fff; display: flex; flex-direction: column; align-items: center; gap: 12px; font-weight: 700; font-size: 15px; transition: border-color .15s, box-shadow .15s; }
.rolecard:hover, .rolecard.on { border-color: var(--primary); box-shadow: 0 8px 24px rgba(0, 128, 55, .12); }
.rolecard .em { font-size: 44px; line-height: 1; }
.subjgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.subjcard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; font-weight: 700; font-size: 14px; }
.subjcard .ic { width: 54px; height: 54px; border-radius: 50%; color: #fff; font-size: 24px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.subjcard.on { border-color: var(--primary); background: var(--primary-soft); }
.subjcard .tick { position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; display: none; align-items: center; justify-content: center; }
.subjcard.on .tick { display: inline-flex; }
.onb-form { text-align: left; max-width: 560px; margin: 0 auto; }
.onb-form .card { padding: 18px 20px; }
.onb-form .card h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.onb-foot { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 14px 24px; display: flex; justify-content: center; gap: 12px; z-index: 5; }
.onb-foot .btn { min-width: 160px; }
.invite-code { font-size: 34px; font-weight: 800; letter-spacing: .12em; color: var(--primary-dark); font-family: ui-monospace, Menlo, monospace; }
.ways { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; text-align: left; }
.way { border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.way h3 { font-size: 15px; margin-bottom: 6px; }
.way p { color: #41566c; font-size: 13.5px; margin: 0 0 12px; }
.linkbox { display: flex; gap: 6px; }
.linkbox input { flex: 1; height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: #fafbfc; font-size: 12.5px; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; text-align: left; }
.quick .card { display: flex; flex-direction: column; gap: 10px; min-height: 190px; }
.quick .card .ic { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; background: var(--primary-soft); }
.quick .card h3 { font-size: 15px; }
.quick .card p { margin: 0; color: #41566c; font-size: 13.5px; flex: 1; }
.quick .card.hl { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 128, 55, .12); }
.stu-created { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.stu-created span { padding: 6px 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; font-size: 13px; animation: pop .35s both; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Bingo guide (onboarding) */
.bingo-guide { position: fixed; left: 22px; bottom: 22px; display: flex; align-items: flex-end; gap: 10px; z-index: 40; }
.bingo-av { width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #fff, #e6f4ec); border: 4px solid #fff; box-shadow: 0 0 0 3px var(--primary-line), 0 12px 30px rgba(0, 0, 0, .15); display: flex; align-items: flex-end; justify-content: center; overflow: hidden; animation: bob 2.6s ease-in-out infinite; }
.bingo-av img { width: 92%; display: block; }
@keyframes bob { 50% { transform: translateY(-5px); } }
.bingo-bubble { max-width: 320px; background: #fff; border: 2px solid var(--primary-line); border-radius: 16px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .12); position: relative; margin-bottom: 30px; animation: pop .3s both; }
.bingo-bubble::before { content: ""; position: absolute; left: -10px; bottom: 18px; border: 8px solid transparent; border-right-color: var(--primary-line); border-left: 0; }
.bingo-bubble .nm { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.bingo-bubble .nm .spk { margin: 0; height: 24px; font-size: 11.5px; }
.bingo-bubble .nm .x { margin-left: auto; border: 0; background: none; color: var(--muted); font-size: 16px; }
.bingo-bubble p { margin: 0; font-size: 13.5px; line-height: 1.5; }
.bingo-bubble .cta { margin-top: 6px; font-size: 12.5px; font-weight: 700; color: var(--primary-dark); }

/* Bingo helper (in app) */
.helper { position: fixed; right: 22px; bottom: 22px; z-index: 40; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.helper-av { width: 92px; height: 92px; border-radius: 50%; border: 4px solid #fff; background: radial-gradient(circle at 50% 40%, #fff, #e6f4ec); box-shadow: 0 0 0 3px var(--primary-line), 0 12px 30px rgba(0, 0, 0, .15); overflow: hidden; display: flex; align-items: flex-end; justify-content: center; cursor: pointer; animation: bob 2.6s ease-in-out infinite; }
.helper-av img { width: 88%; display: block; }
.helper-bubble { max-width: 320px; background: #fff; border: 2px solid var(--primary-line); border-radius: 16px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .12); animation: pop .3s both; }
.helper-bubble .nm { font-size: 12.5px; font-weight: 700; color: var(--primary); margin-bottom: 4px; display: flex; align-items: center; }
.helper-bubble .nm .x { margin-left: auto; border: 0; background: none; color: var(--muted); font-size: 16px; }
.helper-bubble p { margin: 0; font-size: 13.5px; line-height: 1.5; }
.helper-bubble .cta { margin-top: 6px; font-size: 12.5px; font-weight: 700; color: var(--primary-dark); }
.helper-panel { width: 340px; max-height: 70vh; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 14px 40px rgba(0, 0, 0, .16); }
.helper-panel .hp-h { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 700; }
.helper-panel .hp-h .x { margin-left: auto; border: 0; background: none; color: var(--muted); font-size: 18px; }
.helper-panel .faq { padding: 8px; }
.helper-panel details { border-radius: 10px; padding: 8px 10px; }
.helper-panel details[open] { background: var(--primary-soft); }
.helper-panel summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.helper-panel details p { margin: 6px 0 0; font-size: 13px; color: #41566c; }

/* ---------- modals & toasts ---------- */
.overlay { position: fixed; inset: 0; background: rgba(33, 43, 54, .5); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; padding: 22px 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); }
.modal.wide { max-width: 760px; }
.modal h2 { font-size: 19px; margin-bottom: 14px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.toasts { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #212b36; color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 13.5px; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); animation: pop .25s both; }
.toast.ok { background: var(--ok); }
.coinfly { position: fixed; z-index: 90; pointer-events: none; display: inline-flex; align-items: center; gap: 4px; font-weight: 800; color: #8a5a00; background: #fff4d6; border-radius: 999px; padding: 4px 10px; animation: fly 1.1s forwards; }
@keyframes fly { to { transform: translateY(-70px); opacity: 0; } }
.confetti { position: fixed; top: -10px; width: 9px; height: 14px; z-index: 85; pointer-events: none; animation: fall 1.8s linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(540deg); opacity: .3; } }

/* assistant chat */
.chat { display: flex; flex-direction: column; height: calc(100vh - 220px); min-height: 460px; }
.chat .msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 4px 4px 12px; }
.msg { max-width: 78%; padding: 12px 14px; border-radius: 14px; line-height: 1.55; }
.msg.me { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.bot .gen { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.gen-q { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; }
.gen-q b { display: block; font-size: 13.5px; }
.gen-q small { color: var(--muted); }
.chat .sug { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0; }
.chat .inp { display: flex; gap: 8px; }
.chat .inp input { flex: 1; height: 46px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; font-size: 14px; }
.typing i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); margin-right: 3px; animation: pulse 1s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }

/* grading */
.grading { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.drop { border: 2px dashed #cfd4da; border-radius: 14px; padding: 28px; text-align: center; color: var(--muted); background: #fafbfc; }
.drop b { display: block; color: var(--ink); margin-bottom: 4px; }
.sub-text { padding: 14px; background: #fafbfc; border: 1px solid var(--line); border-radius: 12px; line-height: 1.7; white-space: pre-wrap; }
.score-big { font-size: 40px; font-weight: 800; color: var(--primary-dark); }
.rub { width: 100%; border-collapse: collapse; }
.rub td { padding: 8px 6px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.rub td:last-child { text-align: right; font-weight: 700; }
.notes li { margin-bottom: 6px; }

/* program */
.weeks { display: flex; flex-direction: column; gap: 10px; }
.week { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.week .wn { width: 54px; height: 54px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-dark); font-weight: 800; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; flex: none; }
.week .wn small { font-size: 10px; font-weight: 700; }
.week h3 { font-size: 15px; }
.week .bar { width: 140px; }

/* plans */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan { border: 1px solid var(--line); border-radius: 16px; padding: 22px; background: #fff; display: flex; flex-direction: column; gap: 10px; }
.plan.on { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 128, 55, .12); }
.plan h3 { font-size: 20px; }
.plan .price { font-size: 17px; font-weight: 800; color: var(--primary-dark); }
.plan p { margin: 0; color: #41566c; flex: 1; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) { .editor { grid-template-columns: 1fr; } .preview-card { position: static; } .grading { grid-template-columns: 1fr; } }
@media (max-width: 960px) {
  :root { --sb: 0px; }
  .sidebar { width: 280px; transform: translateX(-100%); box-shadow: none; }
  .sidebar.open { transform: none; box-shadow: 0 0 0 100vw rgba(0, 0, 0, .35); }
  .main { margin-left: 0; }
  .tb-burger { display: inline-flex; align-items: center; justify-content: center; }
  .topbar { padding: 0 16px; gap: 8px; }
  .tb-school, .tb-search, .tb-title { display: none; }
  .tb-student span { display: none; }
  .guidebar, .content { padding-left: 16px; padding-right: 16px; }
  .hero { padding: 22px 16px; }
  .hero h1 { font-size: 22px; }
  .g3, .g4, .g2, .plans, .quick, .ways { grid-template-columns: 1fr; }
  .subjgrid { grid-template-columns: repeat(2, 1fr); }
  .rolecards { flex-direction: column; align-items: center; }
  .bingo-guide { left: 12px; bottom: 90px; }
  .bingo-av { width: 64px; height: 64px; }
  .bingo-bubble { max-width: calc(100vw - 110px); margin-bottom: 10px; }
  .helper { right: 12px; bottom: 12px; }
  .helper-av { width: 64px; height: 64px; }
  .helper-bubble, .helper-panel { max-width: calc(100vw - 24px); width: calc(100vw - 24px); }
  .cp-head { flex-direction: column; }
  .q-match { grid-template-columns: 1fr 1fr; }
  .q-stroke { flex-direction: column; }
  .onb-body { padding: 24px 16px 140px; }
  .onb-step h1 { font-size: 24px; }
  .tbl { display: block; overflow-x: auto; }
  .chat { height: auto; }
  .q-el { font-size: 8px; }
  .q-el small { display: none; }
  .q-match { grid-template-columns: 1fr; }
}
