/* 혁신수학 HYUK_T — 보라(오답노트 표지·Rewind 머리글) + 금색(표지 띠) */
:root {
  --bg: #f4f2f8; --card: #fff; --ink: #1c1530; --muted: #6d6680; --line: #e6e1ef;
  --brand: #481c70; --brand-2: #6a35a0; --brand-soft: #f1eaf8; --brand-deep: #2c0f47;
  --gold: #baa868; --gold-soft: #f6f1df;
  --ok: #1f9d62; --ok-soft: #e3f6ec;
  --bad: #d64545; --bad-soft: #fde8e8; --warn: #b7791f; --warn-soft: #fdf3dc;
  --serif: "Playfair Display", "Times New Roman", serif;
  --wrap: 1200px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.6 "Pretendard", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif; letter-spacing: -0.01em; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.in { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* ---------- 상단: 유틸 바 · 로고 · 메뉴 바 (대형 학원 사이트 구성) ---------- */
.util { background: var(--brand-deep); color: #cdbfe0; font-size: 12.5px; }
.util .in { display: flex; justify-content: space-between; align-items: center; height: 34px; gap: 12px; }
.util-tag { font-family: var(--serif); font-style: italic; letter-spacing: .02em; color: var(--gold); }
.util-links { display: flex; gap: 16px; align-items: center; }
.util a { color: #e6dcf3; }
.util a:hover { color: #fff; }
.util .who { color: #fff; font-weight: 600; }

header.top { background: #fff; }
header.top .in { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.logo:hover { text-decoration: none; }
/* 색상 테마 (설정 > 웹페이지 디자인) */
.theme-teal { --brand: #00a3b4; --brand-2: #00b6c7; --brand-soft: #e2f6f8; --brand-deep: #00616d; --bg: #f1f4f5; --line: #dce8ea; --gold: #00b6c7; --gold-soft: #e9f8fa; }
.theme-teal .mainvis { background: linear-gradient(180deg, #f3f6f7 0%, #e3eaec 100%); color: var(--ink); }
.theme-teal .mainvis::after { background: var(--brand-2); }
.theme-teal .mv-copy, .theme-teal .mv-sub { color: #3b4b50; }
.theme-teal .mv-copy b { color: var(--brand-deep); }
.theme-teal .mv-tags span { background: #fff; border-color: #cfe6ea; color: #2c4a50; }
.theme-teal .mv-eyebrow { color: var(--brand); border-color: #9fdbe3; }
.theme-teal .util { background: #00616d; }
.theme-teal .gnb { background: var(--brand); }
.theme-teal .gnb a.on::after { background: #fff; }
.theme-teal .logo-mono, .theme-teal .logo-mark { box-shadow: inset 0 -4px 0 #7fe0ea; }
.theme-teal .mv-logo.white { display: none; }
.mv-logo.color { display: none; }
.theme-teal .mv-logo.color { display: inline; }
.theme-teal .welcome::after { color: rgba(255, 255, 255, .1); }
.theme-green { --brand: #4f7a43; --brand-2: #6f9a5f; --brand-soft: #edf4e8; --brand-deep: #2c4a26; --bg: #f3f6f0; --line: #e1e8dc; }
.theme-navy { --brand: #1f2f55; --brand-2: #344a7c; --brand-soft: #e9edf6; --brand-deep: #121c36; --bg: #f2f4f8; --line: #e0e5ee; }
.theme-green .mainvis { background: radial-gradient(1200px 400px at 85% -10%, #86ad74 0%, transparent 60%), linear-gradient(120deg, var(--brand-deep) 0%, var(--brand) 60%, #5e8a52 100%); }
.theme-navy .mainvis { background: radial-gradient(1200px 400px at 85% -10%, #3d5a96 0%, transparent 60%), linear-gradient(120deg, var(--brand-deep) 0%, var(--brand) 60%, #2a3f6e 100%); }

/* 로고 종류 */
.logo-img { height: 52px; width: auto; }
.logo-line { width: 72px; height: 52px; background: var(--brand);
  -webkit-mask: url(/static/brand/logo_mark_white.png) center / contain no-repeat; mask: url(/static/brand/logo_mark_white.png) center / contain no-repeat; }
.logo-mono { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; color: #fff;
  background: linear-gradient(140deg, var(--brand-2), var(--brand-deep)); font-weight: 900; font-size: 24px; box-shadow: inset 0 -4px 0 var(--gold); }
.logo-banner img { height: 58px; width: auto; border-radius: 8px; display: block; }
.logo-text.wm b { font-size: 26px; font-weight: 900; color: var(--brand); letter-spacing: 0.02em; }
.logo-text.wm b i { font-style: normal; font-size: .5em; vertical-align: .45em; margin: 0 .05em; color: var(--gold); }
.logo-text.wm small { letter-spacing: .28em; font-size: 10.5px; }

/* 설정: 고르는 칸 */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pick { cursor: pointer; display: block; color: var(--ink); margin: 0; }
.pick input { position: absolute; opacity: 0; }
.pick-box { display: flex; align-items: center; justify-content: center; min-height: 92px; padding: 12px; background: #fff;
  border: 2px solid var(--line); border-radius: 14px; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.pick-box .logo { transform: scale(.82); white-space: nowrap; }
.logo-text { white-space: nowrap; }
.pick input:checked + .pick-box { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.pick-name { display: block; text-align: center; font-weight: 700; font-size: 14px; margin-top: 6px; }
.pick input:checked ~ .pick-name::before { content: "✓ "; color: var(--brand); }
.pick-box.swatch { gap: 6px; }
.pick-box.swatch i { width: 46px; height: 46px; border-radius: 12px; display: block; }
.pick-box.swatch i:nth-child(1) { background: var(--brand-deep); }
.pick-box.swatch i:nth-child(2) { background: var(--brand); }
.pick-box.swatch i:nth-child(3) { background: var(--brand-soft); border: 1px solid var(--line); }
.pick-box.photo { height: 150px; background: linear-gradient(140deg, var(--brand-2), var(--brand-deep)); }
.pick-box.photo img { height: 100%; width: auto; }
.pick-box.photo .muted { color: #e9e1f3; }

/* 과제 오답노트: 스크린샷 붙여넣기 */
.clipbox { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 6px 0 12px; background: #fcfbfe; }
.pastezone { margin-top: 8px; border: 2px dashed #cdbfe0; border-radius: 12px; padding: 18px 10px; text-align: center; background: #fff; outline: none; }
.pastezone:focus, .pastezone.over { border-color: var(--brand); background: var(--brand-soft); }
.pastezone canvas { max-width: 100%; cursor: crosshair; touch-action: none; border-radius: 6px; }
.cliplist { display: grid; gap: 8px; margin-top: 10px; }
.clipitem { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: #fff; }
.clipitem img { height: 56px; max-width: 160px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.clipitem img.solthumb { height: 40px; opacity: .85; }
.clipmeta { flex: 1; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- 브로슈어 섹션: 혁信 헤드라인 · 이유 4가지 · 혁신로드 · 교재 · 후기 ---------- */
.mv-head { font-weight: 900; font-size: 64px; line-height: 1.08; letter-spacing: -0.04em; margin: 4px 0 10px; color: var(--brand-2); font-style: italic; }
.mainvis:not(.light) .mv-head { color: #fff; }
.theme-teal .mainvis .mv-head { color: var(--brand-2); text-shadow: 0 2px 0 rgba(255, 255, 255, .6); }
.theme-teal .mainvis .mv-logo { display: none; }
.mv-head .shin { font-family: "Nanum Brush Script", "Gungsuh", serif; font-weight: 400; font-size: .9em; }
.mv-inno { font-weight: 900; font-style: italic; font-size: 34px; line-height: 1.15; letter-spacing: -0.03em; color: inherit; }
.theme-teal .mv-inno { color: var(--brand-2); }
.mv-profile { margin-top: 16px; font-size: 14px; line-height: 1.75; }
.mv-profile b { font-size: 18px; letter-spacing: .2em; }
.mv-profile .now { font-weight: 800; }
.mv-profile .past { opacity: .85; font-size: 13px; }

.sec { margin: 34px 0; }
.sec-head { margin-bottom: 18px; }
.sec-head .kicker { color: var(--brand); font-weight: 800; font-size: 15px; }
.sec-head h2 { font-size: 30px; margin: 2px 0 6px; color: var(--brand-2); font-weight: 900; letter-spacing: -0.04em; }
.sec-head p { color: var(--muted); margin: 0; line-height: 1.75; }
.why { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 700px) { .why { grid-template-columns: 1fr; } }
.why .w { position: relative; background: #fff; border: 1.5px solid var(--brand-2); border-radius: 16px; padding: 18px 20px 20px; }
.why .w h3 { margin: 0 0 8px; font-size: 18px; color: var(--brand); }
.why .w ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.75; font-weight: 600; }
.why .w .n { position: absolute; right: 16px; bottom: 6px; font: italic 900 44px/1 "Pretendard", sans-serif; color: var(--brand-2); opacity: .9; }
.road { width: 100%; border-collapse: separate; border-spacing: 0; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.road th { background: #8e959a; color: #fff; text-align: center; padding: 12px; font-size: 14px; }
.road th.lv { background: var(--brand-2); width: 90px; }
.road td { text-align: center; padding: 16px 10px; font-weight: 700; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); }
.books { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.books .shelf { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; text-align: center; }
.books .shelf h3 { margin: 0 0 2px; }
.books .shelf .sub { color: var(--muted); font-size: 13px; }
.books .covers { display: flex; justify-content: center; gap: 12px; margin: 14px 0 10px; }
.books .covers figure { margin: 0; }
.books .covers img { height: 210px; width: auto; border-radius: 6px; box-shadow: 0 10px 22px rgba(0,0,0,.18); }
.books .covers figcaption { font-size: 12.5px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.reviews-wrap { background: var(--brand-2); border-radius: 22px; padding: 30px 24px; }
.reviews-wrap .sec-head { text-align: center; }
.reviews-wrap .sec-head h2, .reviews-wrap .sec-head .kicker { color: #fff; }
.theme-teal .btn.gold { background: #fff; border-color: #fff; color: var(--brand-deep); }
.theme-teal .class-card .lv { color: rgba(255, 255, 255, .78); }
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 22px 18px; }
.bubble { position: relative; background: #fff; border-radius: 14px; padding: 18px 20px; font-size: 13.5px; line-height: 1.75; color: #34393b; }
.bubble::after { content: ""; position: absolute; bottom: -14px; left: 26px; border: 14px solid transparent; border-top-color: #fff; border-bottom: 0; border-left: 0; }
.bubble:nth-child(even)::after { left: auto; right: 26px; border-left: 14px solid transparent; border-right: 0; }
.bubble b { display: block; color: var(--brand-2); font-size: 16px; margin-bottom: 6px; }
.contact { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; justify-content: center; color: #fff; margin-top: 26px; font-weight: 600; }
.contact a { color: #fff; }
.contact .label { font-weight: 900; }

/* 메인 배너 사진 */
.mainvis.has-photo .in { grid-template-columns: 1.15fr .75fr .95fr; gap: 26px; }
.mv-photo { align-self: end; margin-bottom: -60px; display: flex; justify-content: center; }
.mv-photo img { max-height: 470px; width: auto; filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .35)); }
.mv-logo { height: 96px; width: auto; margin-bottom: 8px; }

.logo-mark { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px;
  background: linear-gradient(140deg, var(--brand-2), var(--brand-deep)); color: #fff;
  font: 800 30px/1 var(--serif); box-shadow: inset 0 -4px 0 var(--gold); }
.logo-mark.sm { width: 26px; height: 26px; font-size: 17px; border-radius: 7px; box-shadow: inset 0 -2px 0 var(--gold); }
.logo-text b { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.logo-text em { font-style: normal; font-weight: 800; font-size: 22px; color: var(--brand); }
.logo-text small { display: block; font-size: 12px; color: var(--muted); margin-top: -2px; }
.top-badge { font-size: 12px; font-weight: 700; color: var(--brand); background: var(--brand-soft);
  border: 1px solid #dccbef; padding: 4px 12px; border-radius: 99px; }

.gnb { background: var(--brand); position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 10px rgba(44, 15, 71, .18); }
.gnb .in { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.gnb a { color: #e9def6; font-weight: 700; font-size: 15px; padding: 14px 18px; white-space: nowrap; position: relative; }
.gnb a:hover { color: #fff; text-decoration: none; background: rgba(255, 255, 255, .06); }
.gnb a.on { color: #fff; }
.gnb a.on::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 4px; border-radius: 4px 4px 0 0; background: var(--gold); }

main { max-width: var(--wrap); margin: 0 auto; padding: 26px 16px 60px; min-height: 50vh; }
h1 { font-size: 24px; margin: 4px 0 18px; letter-spacing: -0.03em; }
h1::before { content: ""; display: inline-block; width: 6px; height: 22px; margin-right: 10px; vertical-align: -3px;
  border-radius: 3px; background: linear-gradient(var(--brand), var(--gold)); }
h2 { font-size: 17px; margin: 0 0 12px; letter-spacing: -0.02em; }
h3 { font-size: 15px; margin: 14px 0 8px; }

/* ---------- 바닥글 ---------- */
.foot { background: #1d1230; color: #a99cbf; font-size: 13px; padding: 26px 0 30px; margin-top: 30px; }
.foot .in { display: grid; gap: 6px; }
.foot-brand { color: #fff; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a { color: #cbbde2; }
.foot-copy { font-family: var(--serif); font-style: italic; color: var(--gold); }

/* ---------- 공통 요소 ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 18px;
  box-shadow: 0 1px 2px rgba(28, 21, 48, .04); }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--brand); }
.stat b { display: block; font-size: 26px; letter-spacing: -0.03em; color: var(--brand-deep); }
.stat span { color: var(--muted); font-size: 13px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px 9px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-weight: 700; font-size: 13px; background: #faf8fd; }
td.num, th.num { text-align: right; }
.scroll { overflow-x: auto; }
.btn { display: inline-block; border: 1px solid #d9d1e6; background: #fff; color: var(--ink); padding: 7px 15px;
  border-radius: 9px; font: inherit; font-weight: 700; cursor: pointer; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--brand-soft); border-color: #cdb8e6; text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #2b2210; }
.btn.big { padding: 12px 22px; font-size: 16px; }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 3px 10px; font-size: 13px; }
input[type=text], input[type=password], input[type=date], input[type=number], select, textarea {
  font: inherit; padding: 8px 10px; border: 1px solid #d3cbe0; border-radius: 9px; background: #fff; max-width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid #cdb8e6; border-color: var(--brand-2); }
textarea { width: 100%; }
/* 반 여러 개 고르기 (시험) */
.clsm { position: relative; }
.clsm > summary { list-style: none; cursor: pointer; padding: 8px 28px 8px 10px; border: 1px solid #d3cbe0; border-radius: 9px;
  background: #fff; min-width: 130px; max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; }
.clsm > summary::-webkit-details-marker { display: none; }
.clsm > summary::after { content: "▾"; position: absolute; right: 10px; color: var(--muted); }
.clsm[open] > summary { outline: 2px solid #cdb8e6; border-color: var(--brand-2); }
.clsm-box { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; background: #fff; border: 1px solid #d3cbe0;
  border-radius: 9px; padding: 8px 12px; min-width: 180px; max-height: 300px; overflow: auto; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.clsm-box .g { font-size: 12px; color: var(--muted); margin: 6px 0 2px; }
.clsm-box .g:first-child { margin-top: 0; }
.clsm-box label { display: flex; gap: 6px; align-items: center; font-size: 14px; color: inherit; margin: 0; padding: 3px 0; cursor: pointer; }
/* 시험지 목록: 정답·해설 점검 결과 */
.iss { margin-top: 4px; }
.iss > summary { cursor: pointer; list-style: none; display: inline-block; }
.iss > summary::-webkit-details-marker { display: none; }
.iss ul { margin: 6px 0; padding-left: 18px; font-size: 13px; }
.iss li { margin: 2px 0; }
label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 3px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.flash { background: var(--brand-soft); border: 1px solid #dccbef; padding: 11px 15px; border-radius: 11px; margin-bottom: 16px; }
.muted { color: var(--muted); }
code { word-break: break-all; }
.small { font-size: 13px; }
.pill { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: 12px; background: #efecf4; color: #4f4766; margin: 1px 2px; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.o { color: var(--ok); font-weight: 700; }
.x { color: var(--bad); font-weight: 700; }
.bar { height: 9px; background: #ece8f2; border-radius: 9px; overflow: hidden; min-width: 80px; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 9px; }
.bar.low i { background: var(--bad); } .bar.mid i { background: #e0a030; } .bar.high i { background: var(--ok); }
.qimg { max-width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.wrongq { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 12px; background: #fff; }
.wrongq .h { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
details summary { cursor: pointer; color: var(--brand); font-weight: 600; margin-top: 6px; }
.comments li { margin-bottom: 6px; }
.hero { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.drop { border: 2px dashed #cdbfe0; border-radius: 12px; padding: 18px; text-align: center; background: #fbf9fe; }
svg.trend { width: 100%; max-width: 640px; height: auto; }
svg.trend .grid { stroke: #ebe7f1; }
svg.trend .axis { font-size: 10px; fill: #9a92ab; }
svg.trend .mine { fill: none; stroke: var(--brand); stroke-width: 2.5; }
svg.trend .avg { fill: none; stroke: #c2b8d2; stroke-width: 2; stroke-dasharray: 5 4; }
svg.trend .dot { fill: var(--brand); }
svg.trend .val { font-size: 11px; fill: var(--ink); text-anchor: middle; }
.video { aspect-ratio: 16/9; width: 100%; border: 0; border-radius: 12px; background: #000; overflow: hidden; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
/* 학생 내 성적: 시험지 결과 / 과제 결과 제목, 과제 완성도 배지 */
.s-sec { font-size: 18px; margin: 22px 0 10px; }
.hwg { display: inline-block; min-width: 30px; padding: 2px 8px; border-radius: 8px; text-align: center; font-weight: 800;
  background: var(--brand-soft); color: var(--brand); white-space: nowrap; }
.hwg-A, .hwg-B { background: #e3f4e6; color: #1f7a35; }
.hwg-E, .hwg-F { background: #fde8e8; color: #b42318; }
.hwg-미제출 { background: #555; color: #fff; }
.hwg-영상 { background: #0f9aa8; color: #fff; }
.tabs label { flex: 1; text-align: center; padding: 9px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; color: var(--ink); font-size: 15px; }
.tabs input { display: none; }
.tabs label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.tabs input:checked + span { color: var(--brand); font-weight: 800; }
.keytbl input[type=text] { width: 100%; min-width: 56px; padding: 4px 6px; }
.keytbl input.tags { min-width: 260px; }
.keytbl input[type=number] { width: 60px; padding: 4px 6px; }
.thumb { max-width: 100%; border: 1px solid var(--line); border-radius: 8px; }

/* ---------- 메인 배너 (로그인 첫 화면) ---------- */
.mainvis { position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 400px at 85% -10%, #7c45b6 0%, transparent 60%),
              linear-gradient(120deg, var(--brand-deep) 0%, var(--brand) 55%, #5a2a8a 100%); }
.mainvis::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 120px, #cfc08a 120px 128px); }
.mainvis .in { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; padding-top: 54px; padding-bottom: 60px; }
.mv-eyebrow { display: inline-block; font-size: 13px; font-weight: 700; color: var(--gold); border: 1px solid rgba(186, 168, 104, .6);
  border-radius: 99px; padding: 3px 12px; margin-bottom: 18px; }
.mv-title { font: 800 74px/0.95 var(--serif); margin: 0; letter-spacing: -0.01em; }
.mv-title::before { display: none; }
.mv-title .J { font-size: 1.45em; vertical-align: -0.12em; }
.mv-title small { font-size: .42em; font-weight: 600; font-style: italic; margin: 0 .15em; }
.mv-sub { font: italic 500 20px var(--serif); color: #e7dbf5; margin: 16px 0 0; }
.mv-line { height: 5px; width: 260px; background: var(--gold); border-radius: 3px; margin: 22px 0; }
.mv-copy { font-size: 17px; color: #e9e1f3; line-height: 1.7; margin: 0; }
.mv-copy b { color: #fff; }
.mv-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.mv-tags span { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); padding: 4px 12px; border-radius: 99px; font-size: 13px; }
.login-card { background: #fff; color: var(--ink); border-radius: 18px; padding: 26px; box-shadow: 0 18px 50px rgba(20, 6, 35, .35); }
.login-card h2 { font-size: 20px; }
.login-card .btn.primary { padding: 12px; font-size: 16px; }

/* ---------- 바로가기 아이콘 (퀵메뉴) ---------- */
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 22px; }
.quick a, .quick div { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 10px; color: var(--ink); font-weight: 700;
  transition: transform .15s, box-shadow .15s, border-color .15s; }
.quick a:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 10px 24px rgba(72, 28, 112, .12); border-color: #d9c8ee; }
.quick .ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 26px;
  background: var(--brand-soft); }
.quick small { font-weight: 400; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.quick .badge { background: var(--bad); color: #fff; font-size: 11px; border-radius: 99px; padding: 0 7px; }

.sec-title { display: flex; align-items: baseline; justify-content: space-between; margin: 8px 0 12px; }
.sec-title h2 { font-size: 20px; margin: 0; }
.sec-title h2 em { font-style: normal; color: var(--brand); }

.class-card { border-radius: 16px; padding: 20px; color: #fff; position: relative; overflow: hidden; min-height: 132px;
  background: linear-gradient(135deg, var(--brand-2), var(--brand-deep)); }
.class-card.g2 { background: linear-gradient(135deg, #3f3a8f, #1f1b52); }
.class-card .lv { font: italic 600 13px var(--serif); color: var(--gold); }
.class-card h3 { font-size: 22px; margin: 4px 0 10px; color: #fff; }
.class-card .cls { display: flex; gap: 6px; flex-wrap: wrap; }
.class-card .cls span { background: rgba(255, 255, 255, .14); padding: 3px 12px; border-radius: 99px; font-size: 14px; font-weight: 600; }
.class-card::after { content: "∫"; position: absolute; right: 14px; bottom: -26px; font: 120px/1 var(--serif); color: rgba(255, 255, 255, .08); }

.banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-radius: 16px; padding: 20px 22px;
  background: var(--gold-soft); border: 1px solid #e7dcb6; }
.banner b { font-size: 17px; }
.banner .row { align-items: center; }
.banner.naver { background: #eefaf1; border-color: #c4ecd0; }
.btn.naver { background: #03c75a; border-color: #03c75a; color: #fff; }

/* 사용자 환영 띠 (학생·선생님 첫 화면) */
.welcome { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(120deg, var(--brand-deep), var(--brand) 70%); color: #fff; border-radius: 18px; padding: 22px 26px; margin-bottom: 20px;
  position: relative; overflow: hidden; }
.welcome::after { content: "Just solve it"; position: absolute; right: 22px; bottom: -12px; font: italic 800 56px var(--serif); color: rgba(255, 255, 255, .07); }
.welcome h1 { margin: 0; color: #fff; font-size: 24px; }
.welcome h1::before { display: none; }
.welcome p { margin: 4px 0 0; color: #ddd0ee; }

/* ---------- 시험 결과 보드: 탭 · 정오표 ---------- */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; flex-wrap: wrap; background: #fff; }
.seg button { border: 0; background: #fff; padding: 8px 15px; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.seg button + button, .seg a + a button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--brand); color: #fff; }
table.mx { font-size: 13px; white-space: nowrap; }
table.mx th, table.mx td { text-align: center; padding: 5px 6px; border: 1px solid var(--line); }
table.mx td.num, table.mx th.num { text-align: right; }
table.mx .sl, table.mx .sl2 { position: sticky; background: #fff; z-index: 1; }
table.mx .sl { left: 0; min-width: 40px; }
table.mx .sl2 { left: 40px; min-width: 64px; text-align: left; }
table.mx thead th, table.mx tfoot th { background: #faf8fd; }
table.mx .keyrow th { color: var(--brand); font-weight: 800; }
.cell-o { color: var(--ok); background: var(--ok-soft); font-weight: 700; }
.cell-x { color: var(--bad); background: var(--bad-soft); font-weight: 700; }
.cell-b { color: #b0aabd; background: #f7f5fa; }
th.r-low { background: var(--bad-soft) !important; color: var(--bad); }
th.r-mid { background: var(--warn-soft) !important; color: var(--warn); }
th.r-high { background: var(--ok-soft) !important; color: var(--ok); }
#ratetbl th, #ratetbl td:nth-child(-n+2), #ratetbl td:nth-child(4), #ratetbl .pill { white-space: nowrap; }
td.dist-ans { background: var(--ok-soft); color: var(--ok); font-weight: 700; }
.printonly { display: none; }
@media print {
  .util, header.top, .gnb, .foot, .noprint, .flash, form, .btn { display: none !important; }
  .printonly { display: block; }
  body { background: #fff; font-size: 11px; }
  main { padding: 0; max-width: none; }
  .card { border: 0; padding: 0; box-shadow: none; }
  h1::before { display: none; }
  #board section[hidden] { display: block !important; break-before: page; }
  #board ~ *, .grid.g4 { display: none !important; }
  .scroll { overflow: visible; }
  table.mx { font-size: 10px; }
  table.mx th, table.mx td { padding: 2px 3px; }
}
@media (max-width: 860px) {
  .mainvis .in { grid-template-columns: 1fr; gap: 26px; padding-top: 34px; padding-bottom: 40px; }
  .mv-title { font-size: 52px; }
  .mainvis.has-photo .in { grid-template-columns: 1fr; }
  .mv-photo { display: none; }
}
/* 학생 휴대폰 아래 탭 (작은 화면에서만) */
.tabbar { display: none; }
@media (max-width: 640px) {
  body { font-size: 15px; }
  .util-tag { display: none; }
  .util .in { height: 30px; font-size: 12px; }
  .util-links { gap: 12px; }
  .util-links .ext { display: none; }              /* 휴대폰에서 윗줄에 안 보일 링크 (바닥글에 있음) */
  header.top .in { height: 56px; }
  .logo-img, .logo-banner img { height: 40px; }
  .logo-mark, .logo-mono { width: 38px; height: 38px; font-size: 22px; }
  .logo-text b, .logo-text em { font-size: 19px; }
  .logo-text small { display: none; }
  .top-badge { display: none; }
  .gnb a { padding: 11px 12px; font-size: 14px; }
  main { padding: 16px 12px 40px; }
  h1 { font-size: 20px; margin-bottom: 14px; }
  .card { padding: 14px; border-radius: 12px; margin-bottom: 12px; }
  .grid { gap: 12px; }
  .g4 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 12px 14px; }
  .stat b { font-size: 21px; }
  th, td { padding: 6px 5px; }
  th, .btn { white-space: nowrap; }
  table { font-size: 13.5px; }
  .m-hide { display: none !important; }
  body.student .quick { display: none; }           /* 아래 탭과 같은 바로가기 */
  .welcome { padding: 16px 18px; border-radius: 14px; margin-bottom: 14px; }
  .welcome h1 { font-size: 19px; }
  .welcome::after { display: none; }
  .banner { flex-direction: column; align-items: flex-start; }
  /* 바로가기: 2칸, 아이콘 옆에 글자 */
  .quick { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
  .quick a, .quick div { flex-direction: row; text-align: left; padding: 12px; gap: 10px; border-radius: 12px; font-size: 14px; }
  .quick .ic { width: 38px; height: 38px; font-size: 20px; border-radius: 11px; flex: none; }
  .quick small { display: none; }
  /* 입력칸: 글자 16px (아이폰이 확대하지 않게), 줄마다 꽉 차게 */
  input[type=text], input[type=password], input[type=date], input[type=number], select, textarea { font-size: 16px; }
  form.row > div, form .row > div { flex: 1 1 100%; }
  form.row input, form .row input[type=text], form .row select { width: 100% !important; min-width: 0 !important; }
  body.student form .row > button, body.student form.row > button { flex: 1 1 100%; padding: 12px; }
  .btn { padding: 9px 15px; }
  .btn.sm { padding: 5px 11px; }
  /* 로그인 첫 화면: 로그인 칸을 맨 위로 */
  .mainvis .in { padding-top: 20px; padding-bottom: 34px; gap: 22px; }
  .mainvis .login-card { order: -1; padding: 18px; }
  /* 아이디·비밀번호 칸이 가장 먼저: 윗줄·제목 숨기고 학생/선생님 선택은 로그인 버튼 아래로 */
  body:has(.mainvis) .util { display: none; }
  body:has(.mainvis) header.top .in { height: 48px; }
  .mainvis .in:has(.login-card) { padding-top: 12px; }
  .login-card > h2, .login-card > .mv-tags { display: none; }
  .login-card form { display: flex; flex-direction: column; }
  .login-card form .tabs { order: 9; margin: 12px 0 0; }
  .login-card form > label { margin-top: 0; }
  .mv-head { font-size: 44px; }
  .mv-inno { font-size: 26px; }
  .sec { margin: 24px 0; }
  .sec-head h2 { font-size: 24px; }
  .books .covers img { height: 160px; }
  .reviews-wrap { padding: 22px 14px; border-radius: 16px; }
  .road th, .road td { padding: 10px 6px; font-size: 13px; }
  .foot { padding-bottom: 20px; }
  /* 학생: 위 메뉴 대신 아래 탭 */
  body.student .gnb { display: none; }
  body.student { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff;
    border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgba(28, 21, 48, .08); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 0 7px;
    font-size: 11.5px; font-weight: 700; color: var(--muted); }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a b { font-size: 20px; line-height: 1.2; }
  .tabbar a { font-size: 11px; letter-spacing: -0.03em; }
  .tabbar a.on { color: var(--brand); }
}
