/* 공인중개사 37회 응축학습 — app.css */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --text: #15171c;
  --text-2: #3d424d;
  --muted: #737a87;
  --line: #e4e7ec;
  --line-2: #d3d8e0;
  --accent: #2c55e0;
  --accent-soft: #eaf0ff;
  --accent-ink: #1d3fb3;
  --ok: #10915a;
  --ok-soft: #e4f6ed;
  --bad: #d93a3f;
  --bad-soft: #fdeced;
  --warn: #b45309;
  --warn-soft: #fff5e1;
  --hl: #fff0a6;
  --star: #f2a900;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 20px 50px rgba(16, 24, 40, .18);
  --radius: 14px;
  --radius-sm: 10px;
  --s1: #2f6fed; --s2: #7a4de0; --s3: #0e9486; --s4: #e0620d; --s5: #c7336a; --s6: #a07c00;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115; --surface: #171a20; --surface-2: #1e222a; --text: #eceef2; --text-2: #c4c9d3;
    --muted: #8b93a1; --line: #262b34; --line-2: #333a45; --accent: #6e8fff; --accent-soft: #1c2645;
    --accent-ink: #a9bcff; --ok: #3ccf8e; --ok-soft: #112a20; --bad: #ff6b6f; --bad-soft: #33171a;
    --warn: #f0b35a; --warn-soft: #2e2413; --hl: #5b4d0f; --shadow: 0 1px 2px rgba(0,0,0,.3);
    --shadow-lg: 0 20px 50px rgba(0,0,0,.55); color-scheme: dark;
    --s1: #6b9bff; --s2: #a88bff; --s3: #3cc5b5; --s4: #ff9150; --s5: #f06d9d; --s6: #e0b93a;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1115; --surface: #171a20; --surface-2: #1e222a; --text: #eceef2; --text-2: #c4c9d3;
  --muted: #8b93a1; --line: #262b34; --line-2: #333a45; --accent: #6e8fff; --accent-soft: #1c2645;
  --accent-ink: #a9bcff; --ok: #3ccf8e; --ok-soft: #112a20; --bad: #ff6b6f; --bad-soft: #33171a;
  --warn: #f0b35a; --warn-soft: #2e2413; --hl: #5b4d0f; --shadow: 0 1px 2px rgba(0,0,0,.3);
  --shadow-lg: 0 20px 50px rgba(0,0,0,.55); color-scheme: dark;
  --s1: #6b9bff; --s2: #a88bff; --s3: #3cc5b5; --s4: #ff9150; --s5: #f06d9d; --s6: #e0b93a;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: 15.5px; line-height: 1.65; letter-spacing: -0.01em; word-break: keep-all; overflow-wrap: anywhere;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.025em; line-height: 1.35; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 256px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--line);
  background: var(--surface); padding: 22px 16px 24px; display: flex; flex-direction: column; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--text); color: var(--bg);
  display: grid; place-items: center; font-weight: 800; font-size: 13px; letter-spacing: -0.04em;
}
.brand b { display: block; font-size: 15px; }
.brand small { display: block; color: var(--muted); font-size: 12px; margin-top: -2px; }
/* 나도스터디 로고 */
.brand { flex-direction: column; align-items: center; gap: 6px; padding: 4px 0 0 !important; }
.brand img { width: 100%; max-width: 176px; height: auto; display: block; }
.brand .brand-sub { margin: 2px 0 0; text-align: center; }
.topbar .m-brand img { height: 36px; width: auto; display: block; }
.lg-dark { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lg-light { display: none !important; }
  :root:not([data-theme="light"]) .lg-dark { display: block !important; }
}
:root[data-theme="dark"] .lg-light { display: none !important; }
:root[data-theme="dark"] .lg-dark { display: block !important; }
.dday-mini { margin: 0 6px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.dday-mini .d { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.dday-mini .t { font-size: 12px; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 8px 10px 4px; letter-spacing: .02em; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--text-2);
  font-size: 14.5px; font-weight: 500;
}
.nav a:hover { background: var(--surface-2); }
.nav a.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.nav a .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.nav a .pct { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.nav svg { width: 18px; height: 18px; flex: none; }

.main { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 12px 28px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar .m-brand { display: none; font-weight: 800; font-size: 15px; }
.search {
  flex: 1; max-width: 420px; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px;
  border: 1px solid var(--line); background: var(--surface); border-radius: 10px;
}
.search svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.search input { border: 0; outline: 0; background: none; width: 100%; font-size: 14px; }
.topbar .spacer { flex: 1; }
.timer-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; font-weight: 600;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.timer-pill.run { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.timer-pill.quiz { border-color: var(--warn); color: var(--warn); background: var(--warn-soft); }
.timer-pill svg { width: 16px; height: 16px; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 20px; height: 20px; }
.m-only { display: none !important; }

.view { max-width: 880px; margin: 0 auto; padding: 18px 28px 80px; }
.tabbar { display: none; }

/* ---------- common ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 20px 22px; }
.stack > * + * { margin-top: 14px; }
.section { margin-top: 30px; }
.section-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.section-h h2 { font-size: 18px; }
.section-h .sub { font-size: 13px; color: var(--muted); }
.crumb { font-size: 13px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.crumb a:hover { color: var(--text); }
.page-h { margin: 6px 0 16px; }
.page-h h1 { font-size: 26px; font-weight: 800; }
.page-h p { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.grow { flex: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px;
  border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); font-size: 14px; font-weight: 600;
  white-space: nowrap; transition: background .12s, border-color .12s, transform .06s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.dark { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.lg { height: 46px; padding: 0 20px; font-size: 15px; border-radius: 11px; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.study { color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); background: var(--accent-soft); }
.btn.explain { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); background: var(--ok-soft); }
.btn.block { width: 100%; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; font-weight: 600; color: var(--text-2);
}
.chip.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px;
  font-weight: 700; background: var(--surface-2); color: var(--text-2); white-space: nowrap;
}
.stars { color: var(--star); letter-spacing: -1px; font-size: 13px; white-space: nowrap; }
.stars i { color: var(--line-2); font-style: normal; }

.bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .4s; }
.bar.ok > span { background: var(--ok); }

/* ---------- home ---------- */
.hero {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; overflow: hidden;
}
.hero-l { padding: 24px 24px 22px; border-right: 1px solid var(--line); }
.hero-l .k { font-size: 13px; color: var(--muted); font-weight: 600; }
.hero-l .d { font-size: 46px; font-weight: 850; letter-spacing: -0.045em; line-height: 1.1; margin-top: 4px; }
.hero-l .date { color: var(--text-2); font-size: 14px; margin-top: 6px; }
.hero-r { padding: 22px 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; align-content: center; }
.stat .v { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 12.5px; color: var(--muted); }
.heat { display: flex; gap: 4px; margin-top: 16px; align-items: flex-end; height: 34px; }
.heat span { flex: 1; border-radius: 3px; background: var(--surface-2); min-height: 4px; }
.heat span.on { background: var(--accent); }
.heat-l { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }

.plan { display: flex; flex-direction: column; }
.plan-row {
  display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-top: 1px solid var(--line);
}
.plan-row:first-child { border-top: 0; }
.plan-row:hover { background: var(--surface-2); }
.plan-row .n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 12.5px; font-weight: 800; color: #fff; flex: none; }
.plan-row .t { font-weight: 650; font-size: 14.5px; }
.plan-row .s { font-size: 12.5px; color: var(--muted); }
.plan-row .go { margin-left: auto; color: var(--muted); flex: none; }

.subj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.subj-card { padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; transition: border-color .15s, transform .15s; }
.subj-card:hover { border-color: var(--line-2); transform: translateY(-1px); }
.subj-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.subj-card .exam { font-size: 12px; color: var(--muted); font-weight: 600; }
.subj-card h3 { font-size: 16px; }
.subj-card .meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.subj-card .bar > span { background: var(--c); }

.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.quick a { padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.quick a:hover { border-color: var(--line-2); }
.quick .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 6px; }
.quick .ic svg { width: 19px; height: 19px; }
.quick b { font-size: 15px; }
.quick span { font-size: 12.5px; color: var(--muted); }

/* ---------- subject / type ---------- */
.subj-head { padding: 22px 22px 18px; border-top: 4px solid var(--c); }
.subj-head .row { margin-top: 12px; }
.part-h { font-size: 13px; font-weight: 800; color: var(--muted); margin: 24px 4px 8px; letter-spacing: .01em; }
.type-list { overflow: hidden; }
.type-row { display: flex; align-items: center; gap: 14px; padding: 15px 18px; border-top: 1px solid var(--line); }
.type-row:first-child { border-top: 0; }
.type-row:hover { background: var(--surface-2); }
.type-row .no { font-size: 12.5px; font-weight: 800; color: var(--muted); width: 26px; flex: none; font-variant-numeric: tabular-nums; }
.type-row .body { flex: 1; min-width: 0; }
.type-row .ttl { font-weight: 700; font-size: 15px; }
.type-row .trend { font-size: 13px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.type-row .prog { width: 92px; flex: none; text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.type-row .prog .bar { margin-top: 5px; }
.type-row .done { color: var(--ok); font-weight: 700; }

.type-head { padding: 20px 22px; }
.type-head h1 { font-size: 23px; font-weight: 800; margin-top: 6px; }
.type-head .trend { margin-top: 8px; color: var(--text-2); font-size: 14.5px; }
.type-head .row { margin-top: 14px; }

/* ---------- question card ---------- */
.qcard { padding: 20px 22px 18px; scroll-margin-top: 80px; }
.qcard + .qcard { margin-top: 14px; }
.qtop { display: flex; align-items: flex-start; gap: 12px; }
.qno {
  flex: none; min-width: 34px; height: 26px; padding: 0 8px; border-radius: 8px; background: var(--text); color: var(--bg);
  display: grid; place-items: center; font-weight: 800; font-size: 13px; margin-top: 1px;
}
.qstem { flex: 1; min-width: 0; font-weight: 650; font-size: 16px; line-height: 1.6; }
.qside { flex: none; display: flex; gap: 6px; align-items: center; }
.qmeta { font-size: 12.5px; color: var(--muted); margin: 0 0 8px 46px; }
.qmeta a:hover { color: var(--text); text-decoration: underline; }
.bm { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--muted); }
.bm:hover { background: var(--surface-2); }
.bm.on { color: var(--star); }
.bm svg { width: 18px; height: 18px; }
.opts { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.opt {
  width: 100%; text-align: left; display: flex; gap: 10px; padding: 11px 14px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--surface); font-size: 15px; line-height: 1.55;
  transition: border-color .12s, background .12s;
}
.opt:hover { border-color: var(--line-2); background: var(--surface-2); }
.opt .on { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--muted); margin-top: 1px; }
.opt.right { border-color: var(--ok); background: var(--ok-soft); }
.opt.right .on { background: var(--ok); border-color: var(--ok); color: #fff; }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.opt.wrong .on { background: var(--bad); border-color: var(--bad); color: #fff; }
.opts.locked .opt { cursor: default; }
.opts.locked .opt:not(.right):not(.wrong) { opacity: .62; }
.qfoot { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.qresult { font-size: 13.5px; font-weight: 700; }
.qresult.ok { color: var(--ok); }
.qresult.bad { color: var(--bad); }
.qhist { font-size: 12px; color: var(--muted); margin-left: auto; }

/* rich content inside data */
.rich { font-size: 15px; line-height: 1.75; color: var(--text); }
.rich > :first-child { margin-top: 0; }
.rich h4 { font-size: 15.5px; margin: 20px 0 8px; padding-left: 10px; border-left: 3px solid var(--accent); }
.rich p { margin: 8px 0; }
.rich ul, .rich ol { margin: 8px 0; padding-left: 20px; }
.rich li { margin: 3px 0; }
.rich li::marker { color: var(--muted); }
.rich table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; display: block; overflow-x: auto; }
.rich th, .rich td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; min-width: 70px; }
.rich th { background: var(--surface-2); font-weight: 700; white-space: nowrap; }
.hl { background: linear-gradient(transparent 55%, var(--hl) 55%); font-weight: 700; padding: 0 1px; }
.box { margin: 12px 0; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 500; font-size: 14.5px; line-height: 1.75; }
.qstem .box { margin-top: 10px; font-weight: 500; }
.tip { margin: 12px 0; padding: 11px 14px 11px 40px; border-radius: 10px; background: var(--accent-soft); color: var(--text); position: relative; font-size: 14.5px; }
.tip::before { content: "💡"; position: absolute; left: 13px; top: 10px; }
.warn { margin: 12px 0; padding: 11px 14px 11px 40px; border-radius: 10px; background: var(--warn-soft); color: var(--text); position: relative; font-size: 14px; }
.warn::before { content: "⚠️"; position: absolute; left: 13px; top: 10px; }

/* ---------- modal (popup) ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.modal-bg { position: absolute; inset: 0; background: rgba(10, 12, 16, .5); animation: fade .18s ease; }
.modal {
  position: relative; width: min(760px, 100%); max-height: min(86vh, 900px); display: flex; flex-direction: column;
  background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); animation: pop .2s cubic-bezier(.2, .9, .3, 1.1);
  overflow: hidden;
}
.modal-h { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.modal-h .ttl { flex: 1; min-width: 0; }
.modal-h .kind { font-size: 12px; font-weight: 800; letter-spacing: .03em; }
.modal-h .kind.study { color: var(--accent); }
.modal-h .kind.explain { color: var(--ok); }
.modal-h .kind.theory { color: var(--s4); }
.modal-h h3 { font-size: 17px; margin-top: 2px; }
.modal-b { padding: 18px 22px 26px; overflow-y: auto; overscroll-behavior: contain; }
.modal-f { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.ans-badge svg { width: 18px; height: 18px; flex: none; }
.ans-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; background: var(--ok-soft); color: var(--ok); font-weight: 800; margin-bottom: 12px; }
.rich .why, .why { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
.why li { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); font-size: 14.5px; }
.why li.c { border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); background: var(--ok-soft); }
.why li .o { font-size: 12.5px; color: var(--muted); display: block; margin-bottom: 2px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 200; background: var(--text); color: var(--bg);
  padding: 11px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); animation: pop .2s;
  display: flex; gap: 12px; align-items: center; max-width: calc(100vw - 32px);
}
.toast button { color: var(--hl); font-weight: 800; white-space: nowrap; flex-shrink: 0; }

/* ---------- quiz ---------- */
.q-setup .opt-group { margin-top: 18px; }
.q-setup .opt-group > label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mode { text-align: left; padding: 15px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); }
.mode b { display: block; font-size: 15px; }
.mode span { font-size: 12.5px; color: var(--muted); }
.mode.on { border-color: var(--accent); background: var(--accent-soft); }
.mode .em { font-size: 22px; display: block; margin-bottom: 4px; }

.play { max-width: 720px; margin: 0 auto; }
.play-top { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.play-top .idx { font-weight: 800; }
.play-top .score { margin-left: auto; font-weight: 800; font-size: 18px; }
.combo { font-weight: 800; color: var(--s4); font-size: 14px; }
.tbar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-bottom: 16px; }
.tbar > span { display: block; height: 100%; background: var(--accent); width: 100%; }
.tbar.low > span { background: var(--bad); }
.ox-stmt { font-size: 19px; font-weight: 700; line-height: 1.6; padding: 28px 24px; text-align: center; }
.ox-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.ox-btn { height: 88px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); font-size: 40px; font-weight: 900; }
.ox-btn.o { color: var(--accent); }
.ox-btn.x { color: var(--bad); }
.ox-btn:hover { background: var(--surface-2); }
.ox-btn.right { background: var(--ok-soft); border-color: var(--ok); }
.ox-btn.wrong { background: var(--bad-soft); border-color: var(--bad); }
.fb { margin-top: 14px; padding: 16px 18px; border-radius: 14px; animation: pop .2s; }
.fb.ok { background: var(--ok-soft); }
.fb.bad { background: var(--bad-soft); }
.fb .h { font-weight: 800; font-size: 16px; }
.fb.ok .h { color: var(--ok); }
.fb.bad .h { color: var(--bad); }
.fb .e { margin-top: 6px; font-size: 14.5px; }
.fb .row { margin-top: 12px; }
.pts { display: inline-block; font-weight: 800; color: var(--ok); animation: pop .3s; }
.result { text-align: center; padding: 34px 24px; }
.result .big { font-size: 56px; font-weight: 900; letter-spacing: -0.04em; line-height: 1.1; }
.result .grade { font-size: 18px; font-weight: 800; margin-top: 6px; }
.result .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 24px 0 8px; }
.result .stats div { padding: 12px 6px; border-radius: 12px; background: var(--surface-2); }
.result .stats b { display: block; font-size: 19px; }
.result .stats span { font-size: 12px; color: var(--muted); }
.newbest { display: inline-block; margin-top: 10px; padding: 4px 12px; border-radius: 99px; background: var(--hl); font-weight: 800; font-size: 13px; color: var(--text); }
.hist-row { display: flex; gap: 10px; align-items: center; padding: 11px 18px; border-top: 1px solid var(--line); font-size: 14px; font-variant-numeric: tabular-nums; }
.hist-row:first-child { border-top: 0; }
.hist-row .w { color: var(--muted); font-size: 12.5px; }
.hist-row b { margin-left: auto; }

/* ---------- settings ---------- */
.set-row { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.set-row:first-child { border-top: 0; }
.set-row .l { flex: 1; min-width: 180px; }
.set-row .l b { display: block; font-size: 15px; }
.set-row .l span { font-size: 13px; color: var(--muted); }
.inp { height: 38px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); min-width: 0; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); gap: 2px; }
.seg button { height: 32px; padding: 0 12px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }
.loading { display: grid; place-items: center; min-height: 60vh; color: var(--muted); }
.kbd { display: inline-block; padding: 0 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; font-size: 11.5px; font-weight: 700; }
.foot-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; }
.foot-nav a { flex: 1; padding: 14px 16px; }
.foot-nav a:hover { border-color: var(--line-2); }
.foot-nav small { display: block; color: var(--muted); font-size: 12px; }
.foot-nav b { font-size: 14.5px; }
.foot-nav .nx { text-align: right; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .subj-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .m-only { display: inline-flex !important; }
  .d-only { display: none !important; }
  .topbar { padding: 10px 16px; gap: 8px; padding-top: calc(10px + env(safe-area-inset-top)); }
  .topbar .m-brand { display: flex; align-items: center; gap: 8px; }
  .topbar .m-brand .brand-mark { width: 28px; height: 28px; font-size: 11px; border-radius: 8px; }
  .search { display: none; }
  .search.open { display: flex; position: absolute; left: 12px; right: 12px; top: 8px; max-width: none; height: 42px; box-shadow: var(--shadow-lg); z-index: 5; }
  .view { padding: 12px 16px calc(96px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); padding: 4px 0; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.on { color: var(--text); }
  .hero { grid-template-columns: 1fr; }
  .hero-l { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px; }
  .hero-l .d { font-size: 40px; }
  .hero-r { padding: 18px 20px; }
  .subj-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .quick { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .quick a { padding: 13px 12px; }
  .quick span { display: none; }
  .page-h h1 { font-size: 22px; }
  .pad { padding: 16px; }
  .qcard { padding: 16px 16px 14px; }
  .qtop { flex-wrap: wrap; gap: 10px; }
  .qstem { font-size: 15.5px; flex-basis: calc(100% - 50px); }
  .qside { width: 100%; justify-content: flex-end; order: 3; margin-top: -2px; }
  .qmeta { margin-left: 0; }
  .opt { padding: 10px 12px; font-size: 14.5px; }
  .modes { grid-template-columns: 1fr; }
  .mode { display: flex; align-items: center; gap: 12px; }
  .mode .em { margin: 0; }
  .type-row { padding: 13px 14px; gap: 10px; }
  .type-row .prog { width: 64px; }
  .type-row .trend { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  /* popup = bottom sheet */
  .modal-wrap { padding: 0; place-items: end stretch; }
  .modal { width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; animation: sheet .24s cubic-bezier(.2, .9, .3, 1); }
  .modal-h { padding: 16px 16px 12px; }
  .modal-h::before { content: ""; position: absolute; top: 6px; left: 50%; width: 38px; height: 4px; border-radius: 9px; background: var(--line-2); transform: translateX(-50%); }
  .modal-b { padding: 16px 16px 24px; }
  .modal-f { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .result .stats { grid-template-columns: repeat(2, 1fr); }
  .ox-stmt { font-size: 17px; padding: 22px 16px; }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .foot-nav { flex-direction: column; }
  .foot-nav .nx { text-align: left; }
}
@media (max-width: 420px) {
  .subj-grid { grid-template-columns: 1fr; }
  .hero-r { grid-template-columns: 1fr 1fr; gap: 12px; }
}
@keyframes sheet { from { transform: translateY(40px); opacity: .4; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ================= 고양이 교수님 강의 ================= */
.lec-head h1 { font-size: 23px; font-weight: 800; margin-top: 6px; }
.view.wide { max-width: 1240px; }
.lec-stage { display: grid; grid-template-columns: 1fr 168px; gap: 14px; align-items: end; margin-top: 14px; }
.board-wrap { position: relative; }
.board {
  position: relative; border-radius: 12px; padding: 16px 18px 20px;
  background: radial-gradient(circle at 30% 20%, #2f4b3f, #22382f 60%, #1b2c25);
  border: 12px solid #8a5f36; border-radius: 16px;
  box-shadow: inset 0 0 60px rgba(0,0,0,.45), 0 10px 28px rgba(16,24,40,.22);
  min-height: 400px; overflow: hidden;
}
.board::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .09;
  background-image: radial-gradient(circle at 12% 30%, #fff 0 1px, transparent 1px), radial-gradient(circle at 70% 60%, #fff 0 1px, transparent 1px);
  background-size: 90px 70px, 120px 100px;
}
.board-inner {
  color: #f6faf4; font-size: 17px; line-height: 1.7; font-weight: 500; letter-spacing: -0.005em;
  max-height: 480px; overflow-y: auto; scrollbar-width: none;
}
.board-inner::-webkit-scrollbar { display: none; }
.bl { margin: 5px 0; text-shadow: 0 1px 2px rgba(0,0,0,.35); animation: chalkIn .45s ease both; }
@keyframes chalkIn { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
.bl-title { font-family: Gaegu, "Nanum Pen Script", inherit; font-size: 27px; font-weight: 700; color: #ffe9a8; border-bottom: 2px dashed rgba(255,233,168,.45); padding-bottom: 8px; margin-bottom: 10px; }
.bl-head { font-family: Gaegu, "Nanum Pen Script", inherit; font-size: 23px; font-weight: 700; color: #ffe9a8; margin-top: 14px; }
.bl-point { padding-left: 10px; }
.bl-tip { color: #b9f6ca; }
.bl-warn { color: #ffd0a6; }
.bl-box { border-left: 3px solid rgba(255,255,255,.35); padding-left: 10px; color: #dfe9e2; }
.bl-end { font-family: Gaegu, "Nanum Pen Script", inherit; font-size: 23px; color: #ffe9a8; }
.bl.cur { color: #fff; }

@keyframes caret { 50% { opacity: 0; } }
.bl table { border-collapse: collapse; font-size: 15px; margin: 8px 0; color: #f6faf4; }
.bl th, .bl td { border: 1px solid rgba(255,255,255,.45); padding: 4px 8px; }
.bl th { background: rgba(255,255,255,.12); }
.chalk-tray { height: 10px; margin: 0 16px; border-radius: 0 0 8px 8px; background: linear-gradient(#6f4c2c, #5a3d23); box-shadow: 0 4px 10px rgba(0,0,0,.2); }

.cat-wrap { text-align: center; padding-bottom: 6px; }
.cat { width: 100%; max-width: 186px; height: auto; animation: catIdle 3.4s ease-in-out infinite; }
.cat-name { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-top: 2px; }
@keyframes catIdle { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-5px) rotate(-1deg); } }
.cat-head { transform-origin: 105px 150px; animation: catHead 5s ease-in-out infinite; }
@keyframes catHead { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2.5deg); } }
.cat-tail { transform-origin: 158px 276px; animation: catTail 2.6s ease-in-out infinite; }
@keyframes catTail { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(10deg); } }
.cat-eyes .eye { animation: blink 5.5s infinite; transform-origin: center; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.cat-mouth { transform-origin: 105px 134px; }
.cat-arm { transform-origin: 158px 204px; }
.cat-body { transform-origin: 105px 290px; animation: breathe 3.6s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.015, 1.01); } }
body.cat-talking .cat-mouth { animation: talk .3s ease-in-out infinite; }
@keyframes talk { 0% { transform: scaleY(.55); } 45% { transform: scaleY(1.25); } 70% { transform: scaleY(.8); } 100% { transform: scaleY(.55); } }
body.cat-talking .cat-arm { animation: writing 2.1s ease-in-out infinite; }
@keyframes writing { 0%, 100% { transform: rotate(0) translate(0, 0); } 30% { transform: rotate(-22deg) translate(-6px, -14px); } 60% { transform: rotate(-12deg) translate(-2px, -6px); } }
body.cat-talking .cat-head { animation: catHeadTalk 2.8s ease-in-out infinite; }
@keyframes catHeadTalk { 0%, 100% { transform: rotate(-1.5deg) translateY(0); } 35% { transform: rotate(2deg) translateY(-2px); } 70% { transform: rotate(-0.5deg) translateY(1px); } }
body.cat-talking .cat { animation-duration: 2.4s; }

.lec-bar { height: 5px; border-radius: 99px; background: var(--surface-2); margin: 14px 0 12px; overflow: hidden; }
.lec-bar > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .35s; }
.lec-ctrl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lec-subtitle {
  margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  font-size: 15.5px; line-height: 1.7; min-height: 60px; color: var(--text-2);
}
.lec-stage.playing .board { box-shadow: inset 0 0 60px rgba(0,0,0,.45), 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent), 0 10px 28px rgba(16,24,40,.22); }
.note-sec + .note-sec { margin-top: 16px; }
.note-ox { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 10px; }
.note-ox summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--muted); }
.type-row .no svg { width: 16px; height: 16px; }

@media (max-width: 860px) {
  .lec-stage { grid-template-columns: 1fr; gap: 0; position: relative; display: flex; flex-direction: column; }
  .board { min-height: 46vh; border-width: 7px; padding: 12px 12px 14px; }
  .board-inner { font-size: 15.5px; line-height: 1.55; max-height: 52vh; }
  .bl { margin: 3px 0; }
  .bl-title { font-size: 19px; padding-bottom: 6px; margin-bottom: 7px; }
  .bl-head { font-size: 17px; margin-top: 9px; }
  .bl table { font-size: 12.5px; }
  .bl th, .bl td { padding: 3px 5px; }
  
  /* 고양이는 칠판을 가리지 않게 아래 띠로 내림 */
  .cat-wrap { display: flex; align-items: flex-start; justify-content: flex-end; gap: 8px; height: 76px; margin: 2px 6px 0 0; overflow: hidden; }
  .cat { max-width: 86px; margin-top: 0; }
  .cat-name { display: block; font-size: 11.5px; margin-top: 26px; }
  .lec-ctrl { position: sticky; bottom: calc(66px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 92%, transparent); padding: 8px 0; z-index: 5; }
  .lec-ctrl .btn.lg { flex: 1; }
}
@media print {
  .side, .tabbar, .topbar, .lec-ctrl, .foot-nav, .chips { display: none !important; }
  .view { max-width: none; padding: 0; }
  .card { break-inside: avoid; box-shadow: none; }
  .note-ox { display: block; }
  .note-ox[open] summary { display: none; }
}

/* ================= 기본학습 (과목 → 유형 → 단락) ================= */
.nav-group {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 9px;
  font-size: 14.5px; font-weight: 700; color: var(--text); text-align: left;
}
.nav-group:hover { background: var(--surface-2); }
.nav-group.on { color: var(--accent-ink); }
.nav-group svg { width: 18px; height: 18px; flex: none; }
.nav-group span { flex: 1; min-width: 0; }
.nav-group .cv { width: 16px; height: 16px; transition: transform .18s; }
.nav-group .cv.open { transform: rotate(180deg); }
.nav-sub { display: flex; flex-direction: column; gap: 2px; padding-left: 8px; margin-left: 12px; border-left: 1px solid var(--line); }
.nav-sub[hidden] { display: none; }
.nav-sub a { font-size: 13.5px; padding: 7px 10px; }
.nav-sub .nav-label { padding: 6px 10px 2px; }

.cyc {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px;
  font-weight: 800; background: var(--accent); color: #fff; white-space: nowrap;
}
.cyc.none { background: var(--surface-2); color: var(--muted); }
.cyc.sm { height: 20px; font-size: 11.5px; padding: 0 8px; }

.learn-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.mode-card { padding: 18px 16px; display: flex; flex-direction: column; gap: 4px; transition: transform .15s, border-color .15s; }
.mode-card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.mode-card .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 8px; }
.mode-card .ic svg { width: 21px; height: 21px; }
.mode-card b { font-size: 16px; }
.mode-card span { font-size: 12.5px; color: var(--muted); line-height: 1.5; }

.read-head { margin: 10px 0 14px; }
.read-head h1 { font-size: 24px; font-weight: 800; margin-top: 10px; }
.read-body { font-size: 16px; line-height: 1.8; }
.read-act { margin-top: 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.print-only { display: none; }

/* 단락 학습: 상단 줄 · 제목 옆 영상 버튼 · 단락 영상 · 문제 풀기 */
.read-top { gap: 8px; flex-wrap: wrap; align-items: center; }
.type-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.type-tools .btn.lec { background: #ff7a18; border-color: #ff7a18; color: #fff; font-weight: 700; }
.btn.back-list { font-weight: 800; }
.sec-ttl { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.sec-ttl h1 { margin: 0; }
.btn.play-sec { background: #ff7a18; border-color: #ff7a18; color: #fff; font-weight: 800; }
.btn.play-sec:hover { filter: brightness(1.05); }
.btn.play-sec.on { background: var(--line-2); border-color: var(--line-2); color: var(--fg); }
.sec-video:empty { display: none; }
.sec-video { margin: 14px 0 6px; }
.lec-wrap.mini { border: 1px solid var(--line); border-radius: 16px; padding: 12px; background: var(--card); }
.lec-wrap.mini .mini-h { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 8px; }
.lec-wrap.mini .mini-h svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
.lec-wrap.mini .mini-time { font-size: 12.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.lec-wrap.mini .lec-stage { margin-top: 0; }
.lec-wrap.mini .lec-ctrl { margin-top: 10px; }
.mini-load { padding: 28px 0; text-align: center; color: var(--muted); }
.sec-solve { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.sec-solve .btn.solve { justify-content: center; font-weight: 800; padding: 14px 12px; }
.sec-solve .btn.past { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.sec-solve .btn.type { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.pop-qs .qcard { margin-bottom: 12px; }
.pop-qs .qcard:last-child { margin-bottom: 0; }

@media (max-width: 860px) {
  .learn-modes { grid-template-columns: 1fr; gap: 8px; }
  .mode-card { flex-direction: row; align-items: center; gap: 12px; padding: 14px; }
  .mode-card .ic { margin: 0; flex: none; }
  .mode-card span { display: block; }
  .read-head h1 { font-size: 21px; }
  /* 단락 학습 모바일: 버튼을 크고 한 줄씩 */
  .read-top { gap: 6px; }
  .read-top .btn.back-list { width: 100%; justify-content: center; }
  .read-top .btn.sm { flex: 1; justify-content: center; }
  .read-top .grow { display: none; }
  .sec-ttl { align-items: flex-start; flex-direction: column; gap: 8px; }
  .sec-ttl .btn.play-sec { width: 100%; justify-content: center; padding: 12px; }
  .sec-solve { grid-template-columns: 1fr; }
  .lec-wrap.mini { padding: 10px; border-radius: 14px; }
  .lec-wrap.mini .lec-ctrl { position: static; background: none; padding: 0; }
  .lec-wrap.mini .lec-ctrl .btn.primary { flex: 1; }
}

/* ================= 인쇄 ================= */
@media print {
  .no-print, .side, .tabbar, .topbar, .lec-ctrl, .foot-nav, .chips, .read-act, .btn { display: none !important; }
  .print-only { display: block; }
  body { background: #fff; font-size: 11pt; }
  .view { max-width: none; padding: 0; }
  .card { border: 0; box-shadow: none; padding: 0; break-inside: avoid; }
  .rich table { font-size: 10pt; }
  .hl { background: none; border-bottom: 2px solid #999; }
  .read-head h1 { font-size: 17pt; margin-bottom: 4pt; }
  #print-area h1 { font-size: 18pt; }
  #print-area h2 { font-size: 13pt; margin: 14pt 0 4pt; border-left: 3px solid #333; padding-left: 6pt; }
  body.printing-area > .app { display: none !important; }
  #print-area { display: block; }
}
#print-area { display: none; }

.inapp-banner {
  display: flex; flex-direction: column; gap: 6px; margin: 12px 0; padding: 14px 16px; border-radius: 12px;
  background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
}
.inapp-banner b { font-size: 14.5px; }
.inapp-banner span { font-size: 13.5px; color: var(--text-2); line-height: 1.6; }
.inapp-banner .btn { align-self: flex-start; margin-top: 4px; }

/* 모바일 전체메뉴 드로어 (PC 사이드바와 같은 구조) */
.menu-bg { position: fixed; inset: 0; z-index: 48; background: rgba(10,12,16,.45); animation: fade .18s ease; }
@media (max-width: 860px) {
  .side {
    display: flex !important; position: fixed; z-index: 49; left: 0; top: 0; bottom: 0; width: 284px; max-width: 86vw;
    height: 100%; transform: translateX(-102%); transition: transform .22s cubic-bezier(.2,.9,.3,1);
    box-shadow: 0 0 40px rgba(0,0,0,.25); padding-top: calc(18px + env(safe-area-inset-top));
    overflow-y: auto;
  }
  body.menu-open .side { transform: translateX(0); }
  body.menu-open { overflow: hidden; }
  .side .brand { padding-right: 34px; }
}

/* OX 단락 (문제 풀이형) */
.oxwrap { display: flex; flex-direction: column; gap: 12px; }
.oxhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.oxhead b { font-size: 15px; }
.oxhead .btn { margin-left: auto; }
.oxq { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.oxq-s { display: flex; gap: 10px; font-size: 15.5px; line-height: 1.6; }
.oxq-s b { font-weight: 650; }
.oxno { flex: none; width: 24px; height: 24px; border-radius: 7px; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; font-size: 12.5px; font-weight: 800; }
.oxq-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.ox-b { height: 52px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); font-size: 22px; font-weight: 900; transition: background .12s, border-color .12s; }
.ox-b.o { color: var(--accent); }
.ox-b.x { color: var(--bad); }
.ox-b:hover { background: var(--surface-2); }
.oxq.answered .ox-b { cursor: default; opacity: .55; }
.oxq.answered .ox-b.right { opacity: 1; background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.oxq.answered .ox-b.wrong { opacity: 1; background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.oxq-fb .fb { margin-top: 12px; padding: 12px 14px; font-size: 14.5px; }
.oxq-fb .fb .e { margin-top: 4px; }

/* 사진형 강사 아바타 */
.ava { position: relative; width: 100%; max-width: 172px; margin: 0 auto; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); background: var(--surface-2); animation: avaIdle 5s ease-in-out infinite; }
.ava img { display: block; width: 100%; height: auto; }
@keyframes avaIdle { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-4px) rotate(-.6deg); } }



body.cat-talking .ava { animation-duration: 3s; }




body.cat-talking .ava img { animation: avaJaw .3s ease-in-out infinite; transform-origin: 50% 20%; }
@keyframes avaJaw { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.006); } }
.ava-cal { display: flex; gap: 16px; flex-wrap: wrap; width: 100%; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.ava-prev { width: 130px; flex: none; }
.ava-prev .cat-name { text-align: center; }
.ava-sliders { flex: 1; min-width: 240px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; align-content: start; }
.ava-sl { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.ava-sl span { width: 54px; flex: none; }
.ava-sl input { flex: 1; min-width: 60px; }
.ava-sl b { width: 26px; text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }
.ava-sliders .btn { grid-column: 1 / -1; justify-self: start; }
@media (max-width: 860px) {
  .ava { max-width: 74px; border-radius: 10px; }
  .ava-sliders { grid-template-columns: 1fr; }
}

/* 아바타 움직임 강도 */
.ava.motion-off, .ava.motion-off img { animation: none !important; }


body.cat-talking .ava.motion-soft img { animation: none; }
.ava-wave { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); display: none; gap: 3px; align-items: flex-end; height: 14px;
  padding: 4px 8px; border-radius: 999px; background: rgba(15,18,24,.55); backdrop-filter: blur(4px); }
.ava-wave i { display: block; width: 3px; height: 4px; border-radius: 2px; background: #fff; animation: wave .9s ease-in-out infinite; }
.ava-wave i:nth-child(2) { animation-delay: .15s; }
.ava-wave i:nth-child(3) { animation-delay: .3s; }
.ava-wave i:nth-child(4) { animation-delay: .45s; }
@keyframes wave { 0%, 100% { height: 4px; opacity: .6; } 50% { height: 12px; opacity: 1; } }
body.cat-talking .ava:not(.motion-off) .ava-wave { display: flex; }

/* 사진 교대 방식 (teacher.jpg / teacher_talk.jpg / teacher_blink.jpg) */
.ava { position: relative; background: #e9eaec; }
.ava-f { display: block; width: 100%; height: auto; }
.ava-f.vis-m1, .ava-f.vis-m2, .ava-f.vis-m3, .ava-f.vis-o, .ava-f.vis-u, .ava-f.blink, .ava-f.half {
  position: absolute; inset: 0; opacity: 0; transition: opacity .07s ease-out;
}
.ava-f.blink { transition: opacity .05s linear; }
.ava.v-m1 .ava-f.vis-m1, .ava.v-m2 .ava-f.vis-m2, .ava.v-m3 .ava-f.vis-m3, .ava.v-o .ava-f.vis-o, .ava.v-u .ava-f.vis-u { opacity: 1; }
.ava.eye-shut .ava-f.blink { opacity: 1; z-index: 2; }
.ava.eye-half .ava-f.half { opacity: 1; z-index: 2; }
.ava-f.half { transition: opacity .04s linear; }
.ava.nodding img.base { animation: nodAnim .6s ease-in-out; }
@keyframes nodAnim { 0%, 100% { transform: translateY(0) rotate(0); } 40% { transform: translateY(4px) rotate(.5deg); } 70% { transform: translateY(1px) rotate(.2deg); } }
.ava.eye-shut .ava-f.blink { opacity: 1; }
.ava.motion-off .ava-f:not(.base), .ava.motion-off .ava-wave { display: none; }
.ava.motion-off { animation: none; }

/* 고양이 입 모양을 음성 타이밍에 맞춤 (미리 만든 음성 재생 시) */
body.audio-sync .cat-mouth { animation: none !important; transition: transform .07s ease-out; }
body.audio-sync .cat[data-v=""] .cat-mouth,
body.audio-sync .cat:not([data-v]) .cat-mouth { transform: scaleY(.5); }
body.audio-sync .cat[data-v="m1"] .cat-mouth { transform: scaleY(1); }
body.audio-sync .cat[data-v="m2"] .cat-mouth { transform: scaleY(1.7); }
body.audio-sync .cat[data-v="m3"] .cat-mouth { transform: scaleY(2.4); }
body.audio-sync .cat[data-v="o"]  .cat-mouth { transform: scale(.72, 2.0); }
body.audio-sync .cat[data-v="u"]  .cat-mouth { transform: scale(.6, 1.5); }
body.audio-sync .cat-arm { animation: writing 2.6s ease-in-out infinite; }

/* 배속 선택 메뉴 */
.rate-wrap { position: relative; display: inline-block; }
.rate-menu {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 30; display: flex; flex-direction: column; gap: 2px;
  padding: 5px; border-radius: 11px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  min-width: 92px;
}
.rate-menu[hidden] { display: none; }
.rate-menu button { padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; text-align: left; }
.rate-menu button:hover { background: var(--surface-2); }
.rate-menu button.on { background: var(--accent); color: #fff; }
@media (max-width: 860px) { .rate-menu { bottom: calc(100% + 6px); top: auto; } }

/* ===== 사람 일러스트 강사 (입이 연속 변형) ===== */
.human { width: 100%; max-width: 186px; height: auto; display: block; margin: 0 auto; animation: humanIdle 4.5s ease-in-out infinite; }
@keyframes humanIdle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.human-head { transform-origin: 105px 175px; animation: humanHead 6.5s ease-in-out infinite; }
@keyframes humanHead { 0%, 100% { transform: rotate(-1.2deg); } 50% { transform: rotate(1.4deg); } }
.human-body { transform-origin: 105px 300px; animation: humanBreathe 3.8s ease-in-out infinite; }
@keyframes humanBreathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.012, 1.008); } }
/* 입: data-v 에 따라 크기만 바뀌므로 중간값이 부드럽게 보간됨 */
.human .mouth-open, .human .teeth { transform-origin: 105px 152px; transform: scale(.18, .04); opacity: 0; transition: transform .075s ease-out, opacity .075s ease-out; }
.human .lip { transition: opacity .075s ease-out; }
.human[data-v="m1"] .mouth-open { opacity: 1; transform: scale(.5, .3); }
.human[data-v="m2"] .mouth-open { opacity: 1; transform: scale(.78, .72); }
.human[data-v="m3"] .mouth-open { opacity: 1; transform: scale(1, 1.1); }
.human[data-v="o"]  .mouth-open { opacity: 1; transform: scale(.5, .95); }
.human[data-v="u"]  .mouth-open { opacity: 1; transform: scale(.38, .62); }
/* 나도AI 티처스 캐릭터 강사: 말하는 동안 입 벌린 그림 */
.human.nfa .nf-o { display: none; }
.human.nfa[data-v="m1"] .nf-o, .human.nfa[data-v="m2"] .nf-o, .human.nfa[data-v="m3"] .nf-o, .human.nfa[data-v="o"] .nf-o, .human.nfa[data-v="u"] .nf-o { display: inline; }
.human.nfa[data-v="m1"] .nf-c, .human.nfa[data-v="m2"] .nf-c, .human.nfa[data-v="m3"] .nf-c, .human.nfa[data-v="o"] .nf-c, .human.nfa[data-v="u"] .nf-c { display: none; }
.human[data-v="m2"] .teeth, .human[data-v="m3"] .teeth { opacity: .92; transform: scale(1, 1); }
.human .tongue { transform-origin: 105px 158px; transform: scale(.6, .5); opacity: 0; transition: transform .08s, opacity .08s; }
.human[data-v="m3"] .tongue { opacity: .85; transform: scale(1, 1); }
.human[data-v="o"] .tongue, .human[data-v="u"] .tongue { opacity: .5; transform: scale(.7, .6); }
.human[data-v="m1"] .lip, .human[data-v="m2"] .lip, .human[data-v="m3"] .lip, .human[data-v="o"] .lip, .human[data-v="u"] .lip { opacity: .2; }
.human .lid { transform-origin: center top; transform: scaleY(0); transition: transform .06s linear; }
.human.eye-shut .lid { transform: scaleY(1.15); }
body.cat-talking .human { animation-duration: 3.2s; }
@media (max-width: 860px) { .human { max-width: 96px; } }

/* 캐릭터 없음 */
.cat-wrap:empty { display: none; }

/* ===== 칠판: 형광펜 · 별표 · 써지는 효과 ===== */
.bl { position: relative; }
.bl .wr {
  display: inline;
  background-image: linear-gradient(90deg, transparent 0 0);
}
/* 한 글자씩 써지는 느낌: 왼쪽에서 오른쪽으로 드러남 + 분필 끝 반짝 */
.bl.cur .wr { animation: writeIn var(--wr, 700ms) steps(24, end) both; }
@keyframes writeIn { from { clip-path: inset(0 100% -20% 0); } to { clip-path: inset(0 -2% -20% 0); } }
.bl:not(.cur) .wr { animation: none; }
.bl.cur::after {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  pointer-events: none; animation: chalkDust var(--wr, 700ms) linear both;
  background: radial-gradient(circle 3px at 0 60%, rgba(255,255,255,.85), transparent 70%);
  background-repeat: no-repeat; display: block;
}
@keyframes chalkDust { from { background-position: 0 0; opacity: .9; } to { background-position: 100% 0; opacity: 0; } }

/* 형광펜(분필 마커) — 핵심 용어 */
.hl-chalk {
  position: relative; color: #fffbe8; font-weight: 700; padding: 0 3px;
  box-shadow: inset 0 -0.62em 0 rgba(255, 214, 79, .32);
  border-radius: 3px;
}
/* 숫자·조문 */
.num-chalk { color: #ffe9a8; font-weight: 700; letter-spacing: .01em; }
/* 별표·글머리 */
.bl .star { color: #ffd84d; margin-right: 2px; text-shadow: 0 0 8px rgba(255,216,77,.45); }
.bl .star.warn-star { color: #ffb36b; }
.bl .dot { color: rgba(255,255,255,.55); margin-right: 4px; }
.bl-tip { color: #cbf5d6; }
.bl-tip .hl-chalk { box-shadow: inset 0 -0.62em 0 rgba(120, 255, 170, .22); }
.bl-warn { color: #ffd9b8; }

/* ===== 교안 패널 ===== */
.lec-notes-bar { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.lec-notes {
  margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  box-shadow: var(--shadow); overflow: hidden;
}
.lec-notes[hidden] { display: none; }
.notes-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.notes-head b { font-size: 15px; }
.notes-list { list-style: none; margin: 0; padding: 0; max-height: 460px; overflow-y: auto; }
.nt { display: flex; gap: 12px; padding: 11px 16px; border-top: 1px solid var(--line); cursor: pointer; }
.nt:first-child { border-top: 0; }
.nt:hover { background: var(--surface-2); }
.nt.on { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.nt-ch { flex: none; width: 62px; font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }
.nt.on .nt-ch { color: var(--accent-ink); }
.nt-body { flex: 1; min-width: 0; }
.nt-body b { display: block; font-size: 14.5px; font-weight: 650; }
.nt-say { display: block; font-size: 13px; color: var(--muted); line-height: 1.6; margin-top: 3px; }
.nt-head .nt-body b, .nt-title .nt-body b { font-size: 15.5px; color: var(--accent-ink); }
.nt-head, .nt-title { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.nt-tip .nt-body b { color: var(--ok); }
.nt-warn .nt-body b { color: var(--warn); }
@media (max-width: 860px) {
  .nt-ch { width: 48px; font-size: 11px; }
  .notes-list { max-height: 60vh; }
  .lec-notes-bar .muted { display: none; }
}
@media print { .wr .t, h2 .t { color: #888; font-size: 9pt; font-weight: 400; } }

/* 교안 문서형 */
.notes-doc { max-height: 620px; overflow-y: auto; padding: 4px 18px 18px; }
.nsec { padding: 16px 0; border-top: 1px solid var(--line); }
.nsec:first-child { border-top: 0; }
.nsec-h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.nsec-h b { font-size: 16px; }
.nsec-h .btn { margin-left: auto; color: var(--accent-ink); }
.nsec .rich { font-size: 15px; }
.nsec-foot { display: flex; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
@media (max-width: 860px) { .notes-doc { max-height: 70vh; padding: 4px 14px 14px; } .nsec-h .btn { margin-left: 0; } }

/* ==========================================================
   2026-09 리뉴얼 — 나도스터디 브랜드(티파니블루) · 휴대폰형 레이아웃
   위: 로고·검색·로그인 고정 / 아래: 메뉴 고정 (PC 도 동일)
   ========================================================== */
:root {
  --brand: #2dc4c4;            /* 나도스터디 티파니블루 (맑은샵 공통) */
  --brand-2: #1fa9aa;
  --accent: #17a6a7;           /* 버튼 바탕 — 흰 글씨가 읽히도록 한 톤 깊게 */
  --accent-soft: #e3f7f7;
  --accent-ink: #0b7577;       /* 글자·링크용 */
  --hdr-h: 64px;
  --tab-h: 66px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --accent: #2dc4c4; --accent-soft: #10302f; --accent-ink: #6fe0e0; }
}
:root[data-theme="dark"] { --accent: #2dc4c4; --accent-soft: #10302f; --accent-ink: #6fe0e0; }

.app { display: block !important; min-height: 100vh; }
.side, #side, .menu-bg { display: none !important; }
.m-only { display: none !important; }

/* 위 고정 헤더 */
.topbar {
  position: fixed !important; top: 0; left: 0; right: 0; z-index: 40; height: var(--hdr-h);
  padding: 0 !important; display: block !important; border-bottom: 1px solid var(--line) !important;
  background: color-mix(in srgb, var(--surface) 92%, transparent) !important;
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
}
.topbar::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--brand), #6fe0d8 60%, var(--brand)); }
.hdr-row { max-width: 1080px; margin: 0 auto; height: 100%; display: flex; align-items: center; gap: 12px; padding: 0 20px; }
.topbar .m-brand { display: flex !important; flex-direction: column; align-items: flex-start; gap: 1px; line-height: 1; }
.topbar .m-brand img { height: 30px; width: auto; }
.brand-tag { font-size: 11.5px; font-weight: 800; color: var(--accent-ink); letter-spacing: .02em; padding-left: 2px; }
.topbar .search { max-width: 360px; height: 38px; margin-left: 12px; }
.acct-btn { background: var(--accent) !important; color: #fff !important; border-color: transparent !important; font-weight: 700; }

/* 본문: 위·아래 고정 영역만큼 띄움 */
.view { padding-top: calc(var(--hdr-h) + 18px) !important; padding-bottom: calc(var(--tab-h) + 40px + env(safe-area-inset-bottom)) !important; }

/* 아래 고정 메뉴 (PC 포함) */
.tabbar {
  display: block !important; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: color-mix(in srgb, var(--surface) 95%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); padding: 0 0 env(safe-area-inset-bottom);
}
.tab-in { max-width: 640px; margin: 0 auto; height: var(--tab-h); display: grid; grid-template-columns: repeat(6, 1fr); align-items: end; }
.tabbar a { display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 100%;
  font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 6px 0 8px; }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a.on { color: var(--accent-ink); }
.tabbar a:hover { color: var(--accent-ink); }
.tabbar .tab-ai { position: relative; justify-content: flex-end; color: var(--accent-ink); }
.tabbar .tab-ai .ai-dot {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle at 30% 25%, #6fe6e0, var(--brand) 55%, #139899);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 45%, transparent), 0 0 0 4px var(--surface);
}
.tabbar .tab-ai .ai-dot svg { width: 26px; height: 26px; }
.tabbar .tab-ai.on .ai-dot { box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 60%, transparent), 0 0 0 4px var(--surface), 0 0 0 7px color-mix(in srgb, var(--brand) 35%, transparent); }

/* 버튼·강조 색을 브랜드로 */
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.06); }

@media (max-width: 860px) {
  :root { --hdr-h: 58px; --tab-h: 62px; }
  .hdr-row { padding: 0 14px; gap: 6px; }
  .topbar .search { display: none; }
  .topbar .search.open { display: flex; position: absolute; left: 12px; right: 12px; top: 10px; max-width: none; margin: 0; z-index: 5; box-shadow: var(--shadow-lg); }
  .topbar .icon-btn[data-act="search-open"] { display: grid !important; }
  .topbar .m-brand img { height: 26px; }
  .brand-tag { font-size: 10.5px; }
  .d-only { display: none !important; }
  .view { padding-left: 16px !important; padding-right: 16px !important; }
  .tabbar a { font-size: 10.5px; }
}
@media print { .topbar, .tabbar { display: none !important; } .view { padding-top: 0 !important; } }

/* 2026-09-25 수정: 상단 키우기(로고 크게) · 하단 메뉴 티파니블루 바탕 + 흰 글자 */
:root { --hdr-h: 84px; --tab-h: 70px; }
.topbar .m-brand img { height: 44px !important; }
.brand-tag { font-size: 13px !important; margin-top: 2px; }
.topbar .search { height: 42px; }
.tabbar { background: var(--brand) !important; border-top: 0 !important; box-shadow: 0 -4px 18px rgba(20, 120, 120, .18); }
.tabbar a, .tabbar a svg { color: rgba(255, 255, 255, .82) !important; }
.tabbar a.on, .tabbar a:hover { color: #fff !important; }
.tabbar a.on { font-weight: 800; }
.tabbar a.on svg { color: #fff !important; }
.tabbar .tab-ai { color: #fff !important; }
.tabbar .tab-ai .ai-dot { background: #fff !important; color: var(--brand) !important; box-shadow: 0 6px 18px rgba(0, 0, 0, .18), 0 0 0 4px var(--brand) !important; }
.tabbar .tab-ai .ai-dot svg { color: var(--brand) !important; }
.tabbar .tab-ai.on .ai-dot { box-shadow: 0 6px 18px rgba(0, 0, 0, .2), 0 0 0 4px var(--brand), 0 0 0 7px rgba(255, 255, 255, .55) !important; }
@media (max-width: 860px) {
  :root { --hdr-h: 70px; --tab-h: 66px; }
  .topbar .m-brand img { height: 36px !important; }
  .brand-tag { font-size: 11.5px !important; }
}
/* 아래 메뉴 7칸 (AI출제문제 · 10개년 기출 분리, 가운데 AI 선생님) */
.tab-in { grid-template-columns: repeat(7, 1fr) !important; max-width: 760px !important; }
@media (max-width: 860px) {
  .tabbar a { font-size: 10px !important; letter-spacing: -0.03em; white-space: nowrap; }
  .tabbar a svg { width: 20px !important; height: 20px !important; }
  .tabbar .tab-ai .ai-dot { width: 50px; height: 50px; }
}

/* 가로로 든 휴대폰: 위·아래 고정 영역을 얇게 해서 강의·본문 자리를 넓힌다 */
@media (orientation: landscape) and (max-height: 520px) {
  :root { --hdr-h: 46px; --tab-h: 46px; }
  .topbar .m-brand img { height: 24px !important; }
  .brand-tag { display: none; }
  .topbar .timer-pill, .topbar .search { display: none !important; }
  .acct-btn { padding: 4px 10px !important; min-height: 0; }
  .tabbar a { flex-direction: row !important; gap: 4px; font-size: 11px !important; padding: 0 !important; }
  .tabbar a svg { width: 17px !important; height: 17px !important; }
  .tab-in { align-items: center !important; }
  .tabbar .tab-ai .ai-dot { position: static !important; transform: none !important; width: 30px !important; height: 30px !important; box-shadow: none !important; }
  .tabbar .tab-ai .ai-dot svg { width: 17px !important; height: 17px !important; }
  .tabbar .tab-ai { justify-content: center !important; }
  /* 강의 화면에서는 아래 메뉴를 숨기고 그림에 자리를 준다 */
  body[data-route="lec"] .tabbar { display: none !important; }
  body[data-route="lec"] .view { padding-bottom: 16px !important; }
  body[data-route="lec"]:not(.lec-fs) .lec-stage.anim .board { max-height: calc(100svh - var(--hdr-h) - 70px); width: auto; aspect-ratio: 9 / 5; margin: 0 auto; }
}

/* 앱 설치 안내 띠 — 아래 메뉴 바로 위 */
.pwa-bar {
  position: fixed; left: 12px; right: 12px; z-index: 45; max-width: 560px; margin: 0 auto;
  bottom: calc(var(--tab-h) + 10px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg);
  animation: pwaIn .35s ease-out;
}
.pwa-bar img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.pwa-bar .t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.pwa-bar .t b { font-size: 14px; }
.pwa-bar .t span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pwa-bar .x { width: 30px; height: 30px; border-radius: 8px; color: var(--muted); font-size: 14px; }
@keyframes pwaIn { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
body[data-route="lec"] .pwa-bar { display: none; }
@media (prefers-reduced-motion: reduce) { .pwa-bar { animation: none; } }

/* ---------- 이용 권한 안내 (로그인 필요 · 수강 안내) ---------- */
.gate { max-width: 520px; margin: 48px auto; padding: 34px 26px 30px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.gate-ic { display: inline-grid; place-items: center; width: 62px; height: 62px; border-radius: 20px; background: color-mix(in srgb, var(--brand, #2dc4c4) 16%, transparent); color: var(--accent-ink, #0b7577); }
.gate-ic svg { width: 30px; height: 30px; }
.gate h2 { margin: 16px 0 8px; font-size: 22px; font-weight: 900; letter-spacing: -0.03em; }
.gate p { margin: 0 0 20px; color: var(--text-2); font-size: 15px; line-height: 1.7; }
.gate p b { color: var(--text); }
.gate-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.gate-btns .btn { min-width: 132px; justify-content: center; }
.modal .gate { margin: 0; padding: 6px 0 0; border: 0; box-shadow: none; background: none; }
@media (max-width: 640px) { .gate { margin: 24px 4px; padding: 26px 18px 24px; } .gate p br { display: none; } .gate-btns .btn { flex: 1 1 100%; } }

/* ---------- 메뉴 첫 화면 히어로 (기본학습 · AI 출제문제 · 10개년 기출 · 오답노트) ---------- */
.ph {
  --g1: #0b7577; --g2: #2dc4c4; --hi: #fff3b0;
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) 210px; align-items: center; gap: 10px;
  margin: 4px 0 20px; padding: 30px 32px 28px; border-radius: 24px; color: #fff;
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .16) 1.2px, transparent 1.3px) 0 0 / 18px 18px,
    linear-gradient(125deg, var(--g1) 0%, var(--g2) 100%);
  box-shadow: 0 16px 34px -18px color-mix(in srgb, var(--g1) 80%, transparent);
}
.ph-study { --g1: #0b7577; --g2: #2dc4c4; }
.ph-quiz { --g1: #2447b8; --g2: #5b8cff; }
.ph-past { --g1: #0c6e46; --g2: #2fb67a; }
.ph-wrong { --g1: #b3262c; --g2: #f0715f; --hi: #ffe8a3; }
.ph-txt { position: relative; z-index: 1; min-width: 0; }
.ph-kick { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 9px; border-radius: 999px; background: rgba(255, 255, 255, .18); font-size: 13.5px; font-weight: 800; }
.ph-kick svg { width: 16px; height: 16px; }
.ph h1 { margin: 12px 0 8px; font-size: 32px; font-weight: 900; line-height: 1.28; letter-spacing: -0.04em; color: #fff; }
.ph h1 em { font-style: normal; color: var(--hi); }
.ph p { margin: 0; max-width: 44em; font-size: 15.5px; line-height: 1.7; color: rgba(255, 255, 255, .92); }
.ph-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ph-chip { display: inline-flex; align-items: baseline; gap: 4px; padding: 7px 13px; border-radius: 12px; background: rgba(255, 255, 255, .95); color: #33454b; font-size: 13.5px; font-weight: 700; }
.ph-chip b { color: var(--g1); font-size: 17px; font-weight: 900; letter-spacing: -0.02em; }
.ph-link { display: inline-flex; align-items: center; gap: 2px; margin-top: 14px; font-size: 14px; font-weight: 800; color: #fff; opacity: .92; border-bottom: 1.5px solid rgba(255, 255, 255, .55); }
.ph-link:hover { opacity: 1; }
.ph-link svg { width: 15px; height: 15px; }
.ph-art { position: relative; height: 170px; }
.ph-b1, .ph-b2 { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.ph-b1 { width: 190px; height: 190px; right: -30px; top: -20px; }
.ph-b2 { width: 70px; height: 70px; left: 6px; bottom: -4px; background: rgba(255, 255, 255, .2); }
.ph-ic {
  position: absolute; right: 26px; top: 22px; display: grid; place-items: center; width: 126px; height: 126px; border-radius: 34px;
  background: #fff; color: var(--g1); transform: rotate(-8deg); box-shadow: 0 18px 30px -12px rgba(0, 0, 0, .35);
}
.ph-ic svg { width: 66px; height: 66px; stroke-width: 1.6; }
.ph-note { margin: -10px 0 16px; }
@media (max-width: 760px) {
  .ph { grid-template-columns: 1fr; padding: 22px 18px 20px; border-radius: 20px; }
  .ph-art { position: absolute; right: -18px; top: -14px; width: 140px; height: 140px; opacity: .5; }
  .ph-b1 { width: 130px; height: 130px; right: -10px; top: 0; }
  .ph-b2 { display: none; }
  .ph-ic { right: 18px; top: 28px; width: 76px; height: 76px; border-radius: 22px; }
  .ph-ic svg { width: 40px; height: 40px; }
  .ph h1 { font-size: 24px; padding-right: 64px; }
  .ph p { font-size: 14.5px; }
  .ph-chip { padding: 6px 10px; font-size: 12.5px; }
  .ph-chip b { font-size: 15px; }
}

/* ---------- 사이트 푸터 (사업자 정보) ---------- */
.view:has(+ .site-foot) { padding-bottom: 28px !important; }
.site-foot { border-top: 1px solid var(--line); background: var(--surface-2, #f4f7f8); color: var(--muted); padding: 22px 16px calc(var(--tab-h, 66px) + 26px + env(safe-area-inset-bottom)); font-size: 12.5px; line-height: 1.7; }
.sf-in { max-width: 1080px; margin: 0 auto; }
.sf-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 10px; }
.sf-links a { color: var(--text-2); font-weight: 700; font-size: 13px; }
.sf-links a b { color: var(--text); }
.sf-info { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.sf-info span { white-space: nowrap; }
.sf-info em { font-style: normal; color: var(--text-2); font-weight: 700; margin-right: 5px; }
.sf-info a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.sf-chk { margin-left: 6px; padding: 1px 7px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none !important; font-size: 11.5px; background: var(--surface); }
.sf-copy { margin: 10px 0 0; font-size: 12px; opacity: .85; }
body[data-route="lec"] .site-foot, body[data-route="quiz"] .site-foot { display: none; }
body[data-route="lec"] .view, body[data-route="quiz"] .view { padding-bottom: calc(var(--tab-h) + 40px + env(safe-area-inset-bottom)) !important; }
@media (max-width: 640px) { .sf-info span { white-space: normal; } .sf-info { flex-direction: column; gap: 1px; } }
@media print { .site-foot { display: none; } }

/* 2026-09-26 헤더 개편: 세로 로고(별+N+나도스터디) 크게 + 옆에 과목명, 그 위에 작게 "AI학습의 최강자" */
:root { --hdr-h: 108px; }
.topbar .m-brand.hb { flex-direction: row !important; align-items: center !important; gap: 14px !important; line-height: 1; }
.topbar .m-brand.hb img.hb-logo { height: 84px !important; width: auto; }
.hb-div { width: 1.5px; height: 50px; border-radius: 2px; background: var(--line-2); flex: none; }
.hb-txt { display: flex; flex-direction: column; gap: 4px; line-height: 1.1; white-space: nowrap; }
.hb-txt small { font-size: 12.5px; font-weight: 800; letter-spacing: .06em; color: var(--brand-2, #1fa9aa); }
.hb-txt b { font-size: 27px; font-weight: 900; letter-spacing: -.035em; color: var(--text); }
@media (max-width: 860px) {
  :root { --hdr-h: 84px; }
  .topbar .m-brand.hb { gap: 9px !important; }
  .topbar .m-brand.hb img.hb-logo { height: 62px !important; }
  .hb-div { height: 34px; }
  .hb-txt { gap: 3px; }
  .hb-txt small { font-size: 10px; letter-spacing: .03em; }
  .hb-txt b { font-size: 18px; }
}
@media (max-width: 400px) {
  .topbar .m-brand.hb img.hb-logo { height: 54px !important; }
  .hb-txt b { font-size: 16px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  :root { --hdr-h: 52px; }
  .topbar .m-brand.hb img.hb-logo { height: 40px !important; }
  .hb-div, .hb-txt small { display: none; }
  .hb-txt b { font-size: 16px; }
}

/* 헤더 과목명: "공인중개사 시험대비" + 위 줄 "AI학습의 최강자"를 과목명 폭에 맞춰 가운데(양옆 가는 선) */
.hb-txt { align-items: stretch; }
.hb-txt b { display: flex; align-items: baseline; }
.hb-exam { font-style: normal; font-size: .6em; font-weight: 800; color: var(--text-2); margin-left: 6px; letter-spacing: -.01em; }
.hb-txt small { display: flex; align-items: center; justify-content: center; gap: 7px; }
.hb-txt small::before, .hb-txt small::after { content: ""; flex: 1 1 0; min-width: 10px; height: 1.5px; border-radius: 2px; background: currentColor; opacity: .4; }
@media (max-width: 860px) { .hb-exam { margin-left: 4px; } .hb-txt small { gap: 5px; } }

/* 집중 루틴 안내 */
.tg-steps { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 8px; line-height: 1.6; }
.tg-steps b { color: var(--accent-ink); }
.tg-quick { margin-right: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); cursor: pointer; }

/* ===== 원서 접수 일정 — 과정 공통 (land·history app.css 에 똑같이. 표는 app.js examTable, 배지는 examBadge) ===== */
.ap-st { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 800; line-height: 1.6; white-space: nowrap; vertical-align: 1px; letter-spacing: -0.01em; }
.st-soon { background: #e6eeff; color: #2150c0; }
.st-open { background: #0f8a55; color: #fff; }
.st-xsoon { background: #fff0dc; color: #a84b06; }
.st-extra { background: #d9590b; color: #fff; }
.st-closed { background: var(--surface-2); color: var(--text-2); }
.st-done { background: var(--surface-2); color: var(--muted); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .st-soon { background: #1c2645; color: #a9bdff; }
  :root:not([data-theme="light"]) .st-xsoon { background: #3a2812; color: #ffbf7a; }
}
:root[data-theme="dark"] .st-soon { background: #1c2645; color: #a9bdff; }
:root[data-theme="dark"] .st-xsoon { background: #3a2812; color: #ffbf7a; }
.ex-sch td small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.ex-sch td > span { display: block; }
.ex-sch .ex-sch-no b { font-size: 16px; }
.ex-sch .ex-tbd { font-style: normal; color: var(--muted); }
.ex-sch .nw { font-style: normal; white-space: nowrap; }
.ex-sch tr.is-done td { opacity: .55; }
.ex-sch-go { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0 0; }
.ex-sch-go .btn svg { width: 16px; height: 16px; margin-left: 2px; }
.ex-sch-go small { font-size: 12.5px; color: var(--muted); }
@media (max-width: 760px) {
  .ex-sch thead { display: none; }
  .ex-sch, .ex-sch tbody, .ex-sch tr { display: block; width: 100%; }
  .ex-sch tr { border: 1px solid var(--line); border-radius: 14px; padding: 6px 12px; margin-bottom: 10px; }
  .ex-sch td { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px dashed var(--line); }
  .ex-sch td:last-child { border-bottom: 0; }
  .ex-sch td::before { content: attr(data-l); font-size: 12.5px; font-weight: 800; color: var(--text-2); }
  .ex-sch td.ex-sch-no { display: block; padding: 8px 0; }
  .ex-sch td.ex-sch-no::before { display: none; }
  .ex-sch td.ex-sch-no > span { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; }
  .ex-sch-go .btn { flex: 1 1 100%; justify-content: center; }
}
/* 홈 시험 안내 배너의 원서 접수 줄 */
.xb-aps { display: flex; flex-direction: column; gap: 4px; }
.xb-ap { font-size: 14px; font-weight: 700; color: #3d4b50; line-height: 1.55; }
.xb-ap em { font-style: normal; font-weight: 900; color: #b07800; margin-right: 6px; }
.xb-ap .ap-st { margin-left: 4px; }
.xb-ap .nw { white-space: nowrap; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .xb-ap { color: var(--text-2); } }
:root[data-theme="dark"] .xb-ap { color: var(--text-2); }
@media (max-width: 760px) { .xb-ap { font-size: 13px; } }

/* 헤더 화면 테마 버튼 (자동·라이트·다크) */
.theme-pill { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; margin-right: 6px; }
.theme-pill svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.theme-pill svg .fill { fill: currentColor; stroke: none; }
.theme-pill:hover { border-color: var(--accent, #17a6a7); }
@media (max-width: 560px) { .theme-pill { padding: 0 9px; } .theme-pill span { display: none; } }

/* ==========================================================
   2026-09-27 영상 + 교안 함께 보기 · 흐름바 단계 이동 · 단락 영상 이전/다음 (lecture.js SPLIT·SEEK·PART, study.js swap)
   나란히: PC 1100px↑ · 휴대폰 가로 / 위아래(영상 고정): 그 밖 / 전체화면은 영상만
   ========================================================== */
/* 학습계획 카드: 영상강의·단락 교안에서는 맨 아래(푸터 바로 위) */
.pl-bottom { margin-top: 28px; }
.pl-bottom .pl-home, .pl-bottom .pl-home.invite { margin: 0; }

/* 머리: 제목 + [교안 함께 보기] */
.lec-head { display: flex; align-items: flex-end; gap: 10px 14px; flex-wrap: wrap; }
.lec-head-tx { flex: 1 1 260px; min-width: 0; }
.lec-head .lsp-tg { margin-bottom: 4px; }
.lsp-tg svg { width: 16px; height: 16px; flex: none; }
.lsp-tg .lsp-st { font-size: 11.5px; font-weight: 800; padding: 1px 7px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.lsp-tg.on { border-color: var(--accent); color: var(--accent-ink); }
.lsp-tg.on .lsp-st { background: var(--accent); color: #fff; }

/* 흐름바 — 눌러/끌어서 단계 이동 */
.lec-bar.seek { position: relative; overflow: visible; height: 6px; margin: 16px 0 14px; cursor: pointer; touch-action: none; -webkit-tap-highlight-color: transparent; }
.lec-bar.seek::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; bottom: -12px; }
.lec-bar.seek > #lec-bar { border-radius: 99px; }
.lec-bar.seek:focus-visible { outline: 2px solid var(--accent); outline-offset: 7px; }
.seek-tick { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: color-mix(in srgb, var(--text) 30%, transparent); pointer-events: none; }
.seek-knob { position: absolute; top: 50%; left: var(--p, 0%); width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--surface), 0 1px 4px rgba(0, 0, 0, .3); pointer-events: none; transition: left .35s, transform .15s; }
.lec-bar.seek:hover .seek-knob, .lec-bar.seek.drag .seek-knob, .lec-bar.seek:focus-visible .seek-knob { transform: scale(1.3); }
.lec-bar.seek.drag .seek-knob, .lec-bar.seek.drag > #lec-bar { transition: none; }
.seek-tip { position: absolute; bottom: 16px; left: clamp(0px, calc(var(--p, 0%) - 90px), calc(100% - 180px)); width: 180px; text-align: center; pointer-events: none;
  font-size: 12px; font-weight: 700; line-height: 1.4; font-style: normal; color: #fff; background: rgba(15, 20, 30, .88); padding: 4px 8px; border-radius: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; z-index: 5; }
.seek-tip[hidden] { display: none; }
body.lec-fs .seek-knob { box-shadow: none; width: 12px; height: 12px; margin: -6px 0 0 -6px; }
body.lec-fs .seek-tick { background: rgba(255, 255, 255, .45); }

/* 단락 영상: 이전·다음 단락 · 연속 재생 · 이어서 보기 */
.lec-wrap.mini .lec-ctrl .btn.sec-nav:disabled { opacity: .45; cursor: default; }
.btn.sec-auto.on { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.btn.sec-resume { border-color: #ff7a18; color: #c55700; font-weight: 800; }
.btn.sec-resume .sr-at { font-size: 12px; font-weight: 700; opacity: .8; margin-left: 4px; }
.btn.sec-resume[hidden] { display: none; }
.lec-wrap.mini .mini-h .lsp-tg { flex: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.sec-resume { color: #ffb070; } }
:root[data-theme="dark"] .btn.sec-resume { color: #ffb070; }

/* 함께 보기 — 공통 */
.lsp:not(.on) > #lsp-n { display: none; }
.lsp.on.vid ~ .lec-notes-bar, .lsp.on.vid ~ .lec-notes { display: none !important; }
.lsp.on.vid { display: grid; gap: 18px; align-items: start; }
.lsp.on.vid > * { min-width: 0; }
.lsp.on.vid > .lsp-v { z-index: 6; }
.lsp.on.vid .lec-stage.anim .board { min-height: 0; }
body.lec-fs .lsp > .lsp-v { position: static !important; z-index: auto !important; box-shadow: none !important; }
#lsp-n { border: 1px solid var(--line); border-radius: var(--radius, 14px); background: var(--surface); padding: 0 18px 14px; }
.lsp-nh { display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; padding: 14px 0 10px; border-bottom: 1px solid var(--line); }
.lsp-nh b { display: inline-flex; align-items: center; gap: 6px; font-size: 15.5px; }
.lsp-nh b svg { width: 17px; height: 17px; color: var(--accent-ink); }
.lsp-sec { padding: 14px 12px; margin: 0 -12px; border-top: 1px solid var(--line); border-radius: 12px; transition: background .3s, box-shadow .3s; }
.lsp-nh + .lsp-sec { border-top: 0; }
.lsp-sec.cur { background: color-mix(in srgb, var(--accent-soft) 75%, transparent); box-shadow: inset 4px 0 0 var(--accent); border-top-color: transparent; }
.lsp-sec.cur + .lsp-sec { border-top-color: transparent; }
.lsp-sec .nsec-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.lsp-sec .nsec-h b { font-size: 16px; }
.lsp-sec.cur .nsec-h b { color: var(--accent-ink); }
.lsp-sec .nsec-h .btn { margin-left: auto; color: var(--accent-ink); }
.lsp-sec .nsec-h .btn svg { width: 14px; height: 14px; }
.lsp-sec .rich { font-size: 15px; }
#lsp-n .nsec-foot { margin-top: 4px; }
.lsp-now { position: sticky; bottom: calc(var(--tab-h) + 14px + env(safe-area-inset-bottom)); z-index: 3; display: flex; align-items: center; gap: 6px; margin: 12px auto 0; height: 38px; padding: 0 18px;
  border: 0; border-radius: 99px; background: var(--accent); color: #fff; font-weight: 800; font-size: 13.5px; box-shadow: 0 6px 18px rgba(0, 0, 0, .22); cursor: pointer; }
.lsp-now[hidden] { display: none; }

/* 나란히: 왼쪽 영상(고정) · 오른쪽 교안 — PC 1100px 이상 */
@media (min-width: 1100px) {
  .view:has(.lsp.on.vid) { max-width: 1320px; }
  .lsp.on.vid { grid-template-columns: minmax(0, 1.3fr) minmax(340px, 1fr); }
  .lsp.on.vid > .lsp-v { position: sticky; top: calc(var(--hdr-h) + 10px); }
  .lsp.on.vid > .sec-video { margin-top: 0; }
  .lsp.on.vid .lec-stage.anim .board-wrap { max-width: calc((100svh - var(--hdr-h) - var(--tab-h) - 170px) * 1.8); margin: 0 auto; }
}
/* 나란히 — 휴대폰 가로 */
@media (orientation: landscape) and (max-height: 520px) {
  .view:has(.lsp.on.vid) { max-width: none; }
  .lsp.on.vid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px; }
  .lsp.on.vid > .lsp-v { position: sticky; top: calc(var(--hdr-h) + 6px); }
  .lsp.on.vid > .sec-video { margin: 0; }
  .lsp.on.vid .lec-stage.anim { margin-left: 0; margin-right: 0; }
  .lsp.on.vid .lec-stage.anim .board { border-width: 5px; border-radius: 10px; }
  .lsp.on.vid .lec-stage.anim .board-wrap { max-width: calc((100svh - var(--hdr-h) - 104px) * 1.8); margin: 0 auto; }
  .lsp.on.vid .lec-listbar, .lsp.on.vid .mini-time { display: none; }
  .lsp.on.vid .lec-bar.seek { margin: 12px 0 6px; }
  .lsp.on.vid .lec-wrap.mini { padding: 6px 8px; }
  .lsp.on.vid .lec-wrap.mini .mini-h { margin-bottom: 4px; font-size: 13px; }
  #lsp-n { padding: 0 12px 10px; }
  body:has(.lsp.on.vid) .tabbar { display: none !important; }
  body:has(.lsp.on.vid) .view { padding-bottom: 16px !important; }
  .lsp.on.vid .lsp-now { bottom: 12px; }
}
/* 위아래: 위 영상(고정) · 아래 교안 — PC 1100px 미만 · 휴대폰 세로 */
@media (max-width: 1099.98px) and (orientation: portrait), (max-width: 1099.98px) and (min-height: 521px) {
  .lsp.on.vid { gap: 12px; }
  .lsp.on.vid > .lsp-v { position: sticky; top: var(--hdr-h); background: var(--bg); padding-top: 6px; box-shadow: 0 10px 14px -12px rgba(0, 0, 0, .35); }
  .lsp.on.vid > .sec-video { margin: 8px 0 0; }
  .lsp.on.vid .lec-stage.anim .board-wrap { max-width: calc(34svh * 1.8); margin: 0 auto; }
  .lsp.on.vid .lec-stage:not(.anim) .board { min-height: 0; }
  .lsp.on.vid .lec-stage:not(.anim) .board-inner { max-height: 26svh; }
  .lsp.on.vid .lec-listbar { display: none; }
  .lsp.on.vid .lec-bar.seek { margin: 12px 0 8px; }
  .lsp.on.vid .lec-subtitle { margin-top: 6px; padding: 8px 12px; min-height: 0; }
  .lsp.on.vid .lec-ctrl { position: static !important; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 4px 0 6px; background: none; }
  .lsp.on.vid .lec-ctrl::-webkit-scrollbar { display: none; }
  .lsp.on.vid .lec-ctrl .btn { flex: 0 0 auto; }
  .lsp.on.vid .lec-ctrl .grow { flex: 1 0 8px; }
  .lsp.on.vid .lec-wrap.mini { padding: 8px 10px; }
  .lsp.on.vid .lec-wrap.mini .mini-h { margin-bottom: 6px; }
}
@media (max-width: 860px) {
  #lsp-n { padding: 0 14px 12px; border-radius: 14px; }
  .lsp-sec { padding: 12px 10px; margin: 0 -10px; }
  .lec-head { align-items: flex-start; }
  .sec-btns .btn.sec-resume { width: 100%; justify-content: center; }
}
@media print { .lsp.on.vid { display: block; } .lsp-now, .lsp-tg, .pl-bottom { display: none !important; } }
.lec-wrap.mini .mini-h b { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lec-wrap.mini .mini-h .grow { flex: 1 0 0; }
@media (max-width: 640px) {
  .lec-wrap.mini .mini-h { flex-wrap: wrap; row-gap: 4px; }
  .lec-wrap.mini .mini-h b { flex: 1 1 100%; }
  .lsp.on.vid .lec-wrap.mini .mini-h { flex-wrap: nowrap; }
  .lsp.on.vid .lec-wrap.mini .mini-h b { flex: 1 1 auto; }
  .lsp.on.vid .lec-wrap.mini .mini-time, .lsp.on.vid .lec-wrap.mini .mini-h .grow { display: none; }
}
@media (orientation: landscape) and (max-height: 520px) {
  body:not(.lec-fs) .lsp.on.vid #lec-stage.anim .board { max-height: none; aspect-ratio: auto; width: auto; }
  .lsp.on.vid .lec-stage.anim .board-wrap { max-width: calc((100svh - var(--hdr-h) - 120px) * 1.8); }
  .lsp.on.vid .lec-wrap.mini .lec-stage.anim .board-wrap { max-width: calc((100svh - var(--hdr-h) - 150px) * 1.8); }
  .lsp.on.vid .lec-ctrl { padding: 4px 0; }
}
/* 전체화면은 함께 보기 크기 제한을 풀고 원래 전체화면 규칙대로 */
body.lec-fs .lsp.on.vid .lec-stage.anim .board-wrap { max-width: none !important; margin: 0 !important; }
body.lec-fs .lsp.on.vid .lec-stage.anim { margin: 0 !important; }
body.lec-fs .lsp.on.vid .lec-stage.anim .board { border-width: 0 !important; border-radius: 0 !important; }

/* 나도AI 티처스: 아래 메뉴 AI 버튼 = 부엉이 담임 */
.tabbar .tab-ai .ai-dot svg.nf-ic { width: 118% !important; height: 118% !important; margin-top: 4px; }

/* 전체 과정(포털 메인) 버튼 — 광고로 한 과정에 들어와도 다른 시험·메인으로 (2026-10-01) */
.home-pill { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 13px; font-weight: 800; white-space: nowrap; margin-right: 6px; text-decoration: none; }
.home-pill svg { width: 17px; height: 17px; }
.home-pill:hover { border-color: var(--accent, var(--brand)); }
@media (max-width: 760px) { .home-pill { padding: 0 9px; margin-right: 4px; } .home-pill span { display: none; } }

/* 좁은 휴대폰: 머리글 오른쪽 버튼이 잘리지 않게 전체 과정 아이콘은 숨김(푸터 「나도스터디 전체 과정」 링크로) */
@media (max-width: 430px) { .home-pill { display: none; } }

/* AI 강사 얼굴(표준 설계 규정 2026-10-02 — 캐릭터 대신) */
.tabbar .tab-ai .ai-dot img.ins-ic { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
img.ins-av { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; background: #e8f4f0; }
.nf-av img.ins-av { width: 34px; height: 34px; }
.ait-av.ins { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex: none; }
img.ins-av.lec { width: 96px; height: 96px; margin: 0 auto; }
/* 연속 재생 단추(lecture.js autoLabel) — 누르면 되는 일 표시 */
.btn.sec-auto b { font-weight: 800; }
