/* 올마이티 논술 자습실 — 올마이티 주황·먹색, 그리고 원고지의 붉은 괘선 */
:root {
  --brand: #e97d35;           /* 올마이티 로고 주황 */
  --brand-2: #d96a22;
  --brand-ink: #b4520f;       /* 흰 바탕 위 주황 글자(대비 확보) */
  --brand-soft: #fdf0e6;
  --charcoal: #373434;        /* 로고 글자 먹색 */
  --paper: #f6f5f3;
  --sheet: #ffffff;
  --ink: #262424;
  --ink-2: #4f4b4a;
  --ink-3: #7d7877;
  --line: #e7e4e1;
  --line-2: #d3cfcb;
  --rule: #c9573f;            /* 원고지 괘선 */
  --rule-soft: #e9b9ab;
  --navy: #373434;            /* 주 단추 = 로고 먹색 */
  --navy-2: #4a4646;
  --hum: #2f4680;             /* 인문 */
  --math: #1f6f6a;            /* 수리 */
  --short: #b4520f;           /* 약술 */
  --good: #2e7d5b;
  --warn: #b7791f;
  --bad: #b3402e;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(28, 35, 51, .06), 0 6px 20px rgba(28, 35, 51, .06);
  --font: 'Pretendard', 'Malgun Gothic', '맑은 고딕', 'Apple SD Gothic Neo', sans-serif;
  --serif: 'Noto Serif KR', 'Nanum Myeongjo', 'Batang', '바탕', serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.65;
  word-break: keep-all; overflow-wrap: anywhere;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.3; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
p { margin: 0; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--navy-2); outline-offset: 2px; border-radius: 4px; }

/* ── 머리 ── */
.top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 20px;
  padding: 0 clamp(16px, 4vw, 40px); height: 62px;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
  box-shadow: inset 0 3px 0 var(--brand);
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 17px; letter-spacing: -.02em; flex: none; }
.brand-logo { height: 28px; width: auto; display: block; }
.brand-name { padding-left: 12px; border-left: 1px solid var(--line-2); color: var(--charcoal); white-space: nowrap; }
.nav { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; overflow-y: hidden; align-self: stretch; align-items: center; scrollbar-width: none; }
.nav a { padding: 19px 12px; border-radius: 8px; color: var(--ink-2); font-weight: 650; font-size: 15px; white-space: nowrap; position: relative; }
.nav a:hover { background: #f3f1ef; }
.nav a.on { color: var(--charcoal); }
.nav a.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 2px; background: var(--brand); }
.who { display: flex; align-items: center; gap: 4px; flex: none; font-size: 14px; color: var(--ink-2); }
.who-name { font-weight: 650; white-space: nowrap; }
.nav[hidden] + .who { margin-left: auto; }

.view { max-width: 1180px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 40px) 80px; outline: none; }
.view.wide { max-width: 1500px; }

/* ── 공통 부품 ── */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--ink-3); font-size: 14px; margin-bottom: 14px; }
.crumbs a:hover { color: var(--navy); text-decoration: underline; }
.crumbs span.sep { opacity: .5; }
.page-title { font-size: clamp(24px, 3.2vw, 32px); font-weight: 800; }
.page-sub { color: var(--ink-2); margin-top: 6px; max-width: 70ch; }
.section { margin-top: 36px; }
.section > h2 { font-size: 19px; font-weight: 750; margin-bottom: 14px; }
.card { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 20px 22px; }
.muted { color: var(--ink-3); }
.small { font-size: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--sheet);
  font-weight: 650; font-size: 15px; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s;
}
.btn:hover { border-color: var(--ink-3); background: #fff; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-2); border-color: var(--navy-2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: rgba(34, 51, 91, .07); }
.btn.sm { padding: 6px 11px; font-size: 14px; }
.btn.lg { padding: 13px 22px; font-size: 16px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: #eceae2; color: var(--ink-2); white-space: nowrap; }
.badge.hum { background: #e3e8f4; color: var(--hum); }
.badge.math { background: #dcedeb; color: var(--math); }
.badge.short { background: #f6e6d8; color: var(--short); }
.badge.good { background: #dff0e7; color: var(--good); }
.badge.warn { background: #f7ecd4; color: var(--warn); }
.badge.bad { background: #f6dfda; color: var(--bad); }
.notice { padding: 13px 16px; border-radius: 9px; background: #f7ecd4; border: 1px solid #e8d3a2; color: #6b4a10; font-size: 15px; }
.notice.info { background: #e6ebf6; border-color: #c8d2ea; color: #26365f; }
.notice.bad { background: #f6dfda; border-color: #e6bdb4; color: #7a2a1c; }
.notice a { text-decoration: underline; font-weight: 700; }
.empty { padding: 44px 20px; text-align: center; color: var(--ink-3); }
.spin { width: 18px; height: 18px; border: 2.5px solid var(--line-2); border-top-color: var(--navy); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 9px; font-size: 15px; opacity: 0; pointer-events: none; transition: .2s; z-index: 99; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
input[type=text], input[type=password], input[type=search], select, textarea.plain {
  padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; width: 100%;
}
textarea.plain { min-height: 180px; line-height: 1.7; resize: vertical; }
label.field { display: block; font-weight: 650; font-size: 14px; margin-bottom: 6px; color: var(--ink-2); }

/* ── 첫 화면 ── */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 36px; align-items: center; padding: 22px 0 8px; }
.hero h1 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 850; letter-spacing: -.03em; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p { margin-top: 14px; font-size: 17.5px; color: var(--ink-2); max-width: 46ch; }
.hero-sheet { justify-self: end; transform: rotate(1.5deg); padding: 18px 26px 18px 18px; }
.hero-sheet .wg-sheet { --cell: 26px; }
.types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.type-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; position: relative; overflow: hidden; transition: transform .12s, box-shadow .12s; }
.type-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(28,35,51,.08), 0 12px 30px rgba(28,35,51,.1); }
.type-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
.type-card h3 { font-size: 21px; font-weight: 800; color: var(--c); }
.type-card .how { color: var(--ink-2); font-size: 15px; }
.type-card .stat { margin-top: auto; padding-top: 10px; font-size: 14px; color: var(--ink-3); }
.type-card .stat b { color: var(--ink); font-size: 16px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: st; }
.step { padding: 16px 18px; border-top: 2px solid var(--ink); }
.step::before { counter-increment: st; content: counter(st, decimal-leading-zero); font-weight: 800; color: var(--brand-ink); font-size: 14px; }
.step h4 { margin: 4px 0 4px; font-size: 16.5px; }
.step p { color: var(--ink-2); font-size: 14.5px; }

/* ── 유형 탭 · 대학 목록 ── */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line-2); margin: 18px 0 22px; overflow-x: auto; }
.tabs a, .tabs button { padding: 10px 16px; font-weight: 700; color: var(--ink-3); border: 0; background: none; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs .on { color: var(--ink); border-bottom-color: var(--brand); }
.univ-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.univ { padding: 15px 17px; display: flex; flex-direction: column; gap: 4px; transition: border-color .12s, transform .12s; }
.univ:hover { border-color: var(--navy-2); transform: translateY(-1px); }
.univ b { font-size: 17px; }
.univ .yrs { font-size: 13px; color: var(--ink-3); }
.qlist { display: flex; flex-direction: column; }
.qgroup { margin-bottom: 22px; }
.qgroup h3 { font-size: 16px; font-weight: 750; padding: 0 2px 8px; display: flex; gap: 8px; align-items: center; }
.qitem { display: grid; grid-template-columns: minmax(90px, 150px) 1fr auto; gap: 14px; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.qitem:last-child { border-bottom: 0; }
.qitem:hover { background: #fff; }
.qitem .qno { font-weight: 750; }
.qitem .qmeta { color: var(--ink-2); font-size: 14.5px; }
.qitem .qtags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ── 풀이 화면 ── */
.solve-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 16px; }
.solve-head h1 { font-size: 23px; font-weight: 800; }
.solve { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.solve.single { grid-template-columns: minmax(0, 1fr); }
.pane { min-width: 0; }
.pane-head { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pane-head h2 { font-size: 16px; font-weight: 750; }
.problem-body { padding: 14px 18px 20px; max-height: calc(100vh - 150px); overflow: auto; }
.problem-body img { display: block; width: 100%; margin: 0 auto 6px; }
.answer-pane { position: sticky; top: 72px; }
.answer-body { padding: 16px 18px 18px; max-height: calc(100vh - 210px); overflow: auto; }
.timer { font-variant-numeric: tabular-nums; font-weight: 750; font-size: 17px; min-width: 64px; text-align: center; }
.timer.over { color: var(--bad); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: #fff; }
.seg button { padding: 7px 13px; border: 0; background: none; font-weight: 650; font-size: 14.5px; cursor: pointer; color: var(--ink-2); }
.seg button.on { background: var(--navy); color: #fff; }
.counter { font-size: 14.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.counter b { color: var(--ink); }
.counter.under b { color: var(--warn); }
.counter.over b { color: var(--bad); }
.counter.ok b { color: var(--good); }
.submit-bar { display: flex; gap: 10px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* 생성된 연습문제 본문 */
.gen { font-size: 16px; line-height: 1.85; }
.gen .inst { color: var(--ink-2); font-size: 14.5px; padding: 10px 14px; background: #f3f0e7; border-radius: 8px; margin-bottom: 16px; white-space: pre-wrap; }
.gen .passage { border: 1px solid var(--line-2); border-radius: 6px; padding: 14px 16px; margin: 12px 0; background: #fff; font-family: var(--serif); }
.gen .passage .lab { font-family: var(--font); font-weight: 800; margin-bottom: 6px; display: flex; gap: 8px; align-items: baseline; }
.gen .passage .src { font-family: var(--font); font-weight: 500; font-size: 13px; color: var(--ink-3); }
.gen .q { margin: 16px 0; padding-left: 14px; border-left: 3px solid var(--ink); }
.gen .q .qh { font-weight: 800; }
.gen .subj-head { margin: 26px 0 4px; padding: 6px 12px; background: var(--ink); color: #fff; border-radius: 4px; font-size: 16px; font-weight: 800; }
.gen .subj-head .cond { color: #fff; opacity: .75; font-weight: 500; font-size: 14px; margin-left: 4px; }
.gen .q .cond { color: var(--ink-3); font-size: 14px; }
.prose { white-space: pre-wrap; }

/* ── 원고지 ── */
.wg { position: relative; --cell: 30px; cursor: text; }
.wg-sheet { --cell: 30px; display: inline-block; padding: 10px 34px 10px 10px; background: var(--sheet); border: 1.5px solid var(--rule); position: relative; }
.wg-row { display: flex; position: relative; margin-bottom: 7px; border: 1px solid var(--rule); width: max-content; }
.wg-row:last-child { margin-bottom: 0; }
.wg-cell { width: var(--cell); height: var(--cell); border-left: 1px solid var(--rule-soft); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: calc(var(--cell) * .62); line-height: 1; color: var(--ink); flex: none; }
.wg-cell:first-child { border-left: 0; }
.wg-cell.half { font-size: calc(var(--cell) * .5); letter-spacing: -.02em; }
.wg-cell.beyond { background: rgba(179, 64, 46, .07); }
.wg-cell.minmark { box-shadow: inset -3px 0 0 var(--warn); }
.wg-cell.maxmark { box-shadow: inset -3px 0 0 var(--bad); }
.wg-cell.sel { background: rgba(47, 70, 128, .18); }
.wg.focused .wg-cell.caret { box-shadow: inset 2px 0 0 var(--navy); animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { box-shadow: none; } }
.wg-mark { position: absolute; right: -30px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--rule); font-variant-numeric: tabular-nums; }
.wg-input { position: absolute; top: 0; left: 0; width: 2px; height: 30px; opacity: 0; border: 0; padding: 0; resize: none; overflow: hidden; }
.wg-wrap { overflow-x: auto; padding-bottom: 6px; }
.wg-legend { font-size: 13px; color: var(--ink-3); margin-top: 8px; }

/* ── 업로드 ── */
.drop { display: block; border: 2px dashed var(--line-2); border-radius: 10px; padding: 26px 18px; text-align: center; background: #fff; cursor: pointer; transition: border-color .12s, background .12s; }
.drop:hover, .drop.drag { border-color: var(--navy-2); background: #f3f6fc; }
.drop b { display: block; font-size: 16.5px; margin-bottom: 4px; }
.drop span { display: block; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 12px; }
.thumb { position: relative; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: #fff; aspect-ratio: 3 / 4; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .pdf { display: grid; place-items: center; height: 100%; font-weight: 800; color: var(--ink-3); font-size: 13px; padding: 6px; text-align: center; }
.thumb button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(28,35,51,.75); color: #fff; cursor: pointer; line-height: 1; }
.thumb .n { position: absolute; left: 5px; bottom: 4px; background: rgba(28,35,51,.75); color: #fff; font-size: 12px; padding: 0 6px; border-radius: 4px; }

/* ── 채점 결과 ── */
.result-top { display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center; }
.score { width: 148px; height: 148px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--sc) calc(var(--p) * 1%), #e9e5da 0); position: relative; }
.score::after { content: ''; position: absolute; inset: 11px; border-radius: 50%; background: var(--sheet); }
.score > div { position: relative; z-index: 1; text-align: center; line-height: 1.15; }
.score b { font-size: 36px; font-weight: 850; letter-spacing: -.03em; }
.score span { display: block; font-size: 14px; color: var(--ink-3); }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.crit { padding: 14px 0; border-bottom: 1px solid var(--line); }
.crit:last-child { border-bottom: 0; }
.crit-head { display: flex; gap: 12px; align-items: baseline; }
.crit-head b { flex: 1; }
.crit-head .pts { font-variant-numeric: tabular-nums; font-weight: 750; white-space: nowrap; }
.bar { height: 6px; border-radius: 3px; background: #e9e5da; margin: 7px 0 8px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--navy-2); border-radius: 3px; }
.crit .ev { color: var(--ink-3); font-size: 14.5px; border-left: 3px solid var(--line-2); padding-left: 10px; margin-bottom: 6px; }
.blist { margin: 0; padding-left: 20px; }
.blist li { margin: 6px 0; }
.blist.plus li::marker { color: var(--good); }
.blist.minus li::marker { color: var(--bad); }
.fix { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 10px; }
.fix > div { padding: 11px 14px; }
.fix .o { background: #fbf1ee; }
.fix .s { background: #eef6f1; }
.fix .why { grid-column: 1 / -1; background: #fff; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 14.5px; }
.fix .tag { display: block; font-size: 12px; font-weight: 800; letter-spacing: .04em; margin-bottom: 3px; color: var(--ink-3); }
.sol-imgs img { display: block; width: 100%; border: 1px solid var(--line); margin-bottom: 8px; background: #fff; }
.grading { text-align: center; padding: 70px 20px; }
.grading .spin { width: 38px; height: 38px; border-width: 4px; }
.grading h2 { margin-top: 18px; font-size: 21px; }
details.fold { border-top: 1px solid var(--line); }
details.fold summary { padding: 14px 22px; cursor: pointer; font-weight: 750; list-style: none; display: flex; align-items: center; gap: 8px; }
details.fold summary::before { content: '▸'; color: var(--ink-3); transition: transform .15s; }
details.fold[open] summary::before { transform: rotate(90deg); }
details.fold > div { padding: 0 22px 20px; }

/* ── 경향 리포트 ── */
.profile h3 { font-size: 16px; font-weight: 800; margin: 20px 0 8px; color: var(--navy); }
.profile h3:first-child { margin-top: 0; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 14px; }
.kv dt { color: var(--ink-3); font-weight: 650; }
.kv dd { margin: 0; }
.qtype { padding: 10px 0; border-bottom: 1px dashed var(--line-2); }
.qtype:last-child { border-bottom: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── 표 ── */
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 13.5px; color: var(--ink-3); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.link { cursor: pointer; }
.tbl tr.link:hover td { background: #fff; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── 좁은 화면 ── */
@media (max-width: 980px) {
  .solve { grid-template-columns: minmax(0, 1fr); }
  .answer-pane { position: static; }
  .problem-body, .answer-body { max-height: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-sheet { display: none; }
  .types, .steps { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
  .result-top { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .fix { grid-template-columns: 1fr; }
  .qitem { grid-template-columns: 1fr; gap: 4px; }
  .qitem .qtags { justify-content: flex-start; }
  .wg, .wg-sheet { --cell: 26px; }
}
@media (max-width: 560px) {
  .brand-name { display: none; }
  .nav a { padding: 8px 9px; font-size: 14.5px; }
  .wg, .wg-sheet { --cell: 15.5px; }
  .wg-sheet { padding: 6px 26px 6px 6px; }
  .wg-row { margin-bottom: 4px; }
  .kv { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ── 인쇄 ── */
#print-root { display: none; }
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  body { background: #fff; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block; }
  .p-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid #000; padding-bottom: 6px; margin-bottom: 12px; font-size: 12pt; }
  .p-head b { font-size: 14pt; }
  .p-name { display: flex; gap: 22px; font-size: 10.5pt; }
  .p-name span { display: inline-block; min-width: 38mm; border-bottom: 1px solid #000; }
  .p-problem img { display: block; width: 100%; margin-bottom: 2mm; break-inside: avoid; }
  .p-problem .gen { font-size: 11pt; }
  .wg-sheet.print { --cell: 8.2mm; border: 0; padding: 0 9mm 0 0; background: none; display: block; }
  .wg-sheet.print .wg-row { margin-bottom: 2.6mm; break-inside: avoid; width: max-content; }
  .wg-sheet.print .wg-cell { font-size: 5.2mm; }
  .wg-sheet.print .wg-mark { right: -8mm; font-size: 7pt; }
  .p-lines div { height: 9.2mm; border-bottom: 1px solid #b9b9b9; }
  .p-box { border: 1.5px solid #000; min-height: 240mm; }
  .p-foot { margin-top: 4mm; font-size: 8.5pt; color: #555; }
}

/* ── 진행률 ── */
.pbar-wrap { display: flex; align-items: center; gap: 10px; }
.pbar { flex: 1; height: 9px; border-radius: 5px; background: #e9e5da; overflow: hidden; min-width: 120px; }
.pbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-2), var(--brand)); border-radius: 5px; transition: width .9s ease; }
.pbar-num { font-variant-numeric: tabular-nums; font-weight: 800; min-width: 44px; text-align: right; }
.pbar-box { max-width: 520px; margin: 0 auto; text-align: left; }

/* ── 약술형 시험 세트 ── */
.setbar { position: sticky; top: 64px; z-index: 20; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; margin-bottom: 16px; }
.setq { margin-bottom: 16px; }
.setq .problem-body { max-height: none; }
.setans { padding: 0 18px 16px; }
.setans textarea.plain { min-height: 80px; }
.setans .sol { margin-top: 10px; }
.setans .sol img { display: block; width: 100%; border: 1px solid var(--line); margin-bottom: 6px; background: #fff; }
.mark { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0 2px; }
.shortq { margin-bottom: 12px; }
.shortq label { display: block; font-weight: 750; font-size: 14.5px; margin-bottom: 4px; }
@media (max-width: 980px) { .setbar { top: 58px; } }

/* ── 올마이티 브랜드 부품 ── */
.btn.accent { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 750; }
.btn.accent:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn.block { display: flex; width: 100%; }
.badge.accent { background: var(--brand-soft); color: var(--brand-ink); }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .14em; color: var(--brand-ink); margin-bottom: 10px; }
.quota-line { margin-top: 16px !important; font-size: 15px !important; color: var(--ink-2); }
.quota-line b { color: var(--brand-ink); font-size: 17px; }
.mini-h { font-size: 15px; font-weight: 800; margin: 18px 0 10px; color: var(--charcoal); }
.me-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.meter { margin-bottom: 12px; }
.meter-head { display: flex; justify-content: space-between; font-size: 14.5px; }
.meter .bar i { background: var(--brand); }
.bar i { background: var(--charcoal); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 20px; }
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.kpi span { font-size: 13.5px; color: var(--ink-3); font-weight: 650; }
.kpi b { font-size: 28px; font-weight: 850; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi:first-child b { color: var(--brand-ink); }
.tbl-scroll { overflow-x: auto; }
.tbl-scroll .tbl td, .tbl-scroll .tbl th { white-space: nowrap; }
input[type=tel], input[type=number] { padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: transparent; }

/* ── 바닥 ── */
.foot { max-width: 1180px; margin: 0 auto; padding: 26px clamp(16px, 4vw, 40px) 40px; display: flex; gap: 18px; align-items: center; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px; }
.foot img { height: 20px; width: auto; opacity: .75; flex: none; }

/* ── 로그인 ── */
.view.auth { max-width: 460px; padding-top: clamp(28px, 8vh, 80px); }
.auth-card { padding: 34px 30px 26px; text-align: center; border-top: 4px solid var(--brand); }
.auth-logo { height: 40px; width: auto; margin: 0 auto 18px; display: block; }
.auth-card h1 { font-size: 26px; font-weight: 850; letter-spacing: -.02em; }
.auth-sub { color: var(--ink-3); font-size: 14.5px; margin: 4px 0 24px !important; }
.auth-form { text-align: left; display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.auth-form .field { margin: 6px 0 0; }
.auth-form input, .auth-form select { font-size: 17px; padding: 12px 14px; }
.auth-form #code { letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; font-size: 22px; }
.auth-form .btn.lg { margin-top: 8px; }
.auth-note { font-size: 13.5px; color: var(--ink-3); margin-top: 8px !important; text-align: left; }
.auth-step { text-align: left; font-size: 14.5px; color: var(--ink-2); margin-bottom: 10px !important; }
.agree { text-align: left; font-size: 14px; background: #faf9f8; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-top: 8px; }
.agree label { display: flex; gap: 8px; align-items: center; font-weight: 700; cursor: pointer; }
.agree ul { margin: 8px 0 0; padding-left: 18px; color: var(--ink-3); font-size: 13px; }
.auth-wait { background: var(--brand-soft); border-radius: 10px; padding: 20px 18px; margin-bottom: 16px; text-align: left; }
.auth-wait b { display: block; font-size: 17px; margin-bottom: 6px; color: var(--brand-ink); }
.auth-wait.bad { background: #f6dfda; }
.auth-wait.bad b { color: var(--bad); }

/* ── 인쇄물 브랜드 ── */
.p-brand { display: none; }
.p-mark { display: none; }
@media print {
  .p-brand { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4mm; font-size: 9pt; color: #555; }
  .p-brand img { height: 7mm; width: auto; }
  .p-mark { display: block; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
  .p-mark img { position: absolute; left: 50%; top: 50%; width: 120mm; transform: translate(-50%, -50%) rotate(-30deg); opacity: .06; }
  .foot { display: none !important; }
}

@media (max-width: 980px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .me-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .top { flex-wrap: wrap; height: auto; padding-top: 10px; gap: 6px 12px; }
  .brand-logo { height: 22px; }
  .nav { order: 3; width: 100%; margin: 0 -6px; padding-bottom: 4px; }
  .nav a.on::after { bottom: 2px; }
  .nav a { padding: 10px; }
  .nav a:hover { background: none; }
  .who { margin-left: auto; }
  .who-name { display: none; }
  .setbar { top: 98px; }
  .foot { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .brand-name { display: inline; font-size: 15px; padding-left: 10px; }
  .auth-card { padding: 28px 20px 22px; }
}

/* 로그인 탭 · 비밀번호 */
.auth-tabs { display: flex; width: 100%; margin-bottom: 18px; }
.auth-tabs button { flex: 1; padding: 10px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.two .field { margin-top: 6px; }
.pwbox { margin-top: 14px; font-size: 14px; }
.pwbox summary { cursor: pointer; color: var(--ink-2); font-weight: 650; }
.pwbox .auth-form input { font-size: 15px; padding: 9px 12px; }
.temp-pw { font-size: 18px; letter-spacing: .08em; color: var(--brand-ink); background: var(--brand-soft); padding: 2px 8px; border-radius: 6px; }

/* 답안지 양식 내려받기 */
.forms{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px}
.form-dl{display:flex;flex-direction:column;gap:6px;padding:18px 20px;border-top:4px solid var(--c);color:inherit;text-decoration:none}
.form-dl b{font-size:17px}
.form-dl .dl{margin-top:6px;font-weight:700;color:var(--brand)}
.form-dl:hover{box-shadow:0 4px 14px rgba(0,0,0,.08)}
