/* style.css 다음에 불러옴: 시스템 글꼴 + 수학이 추가분 + 휴대폰 배치 */
body, button, input, .ph, .ph-slim, .ntag, .info, .pf {
  font-family: "Malgun Gothic", "맑은 고딕", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
}
.page .qt, .page .ch, .page .bogi, .page .sol, .page .ntext, .page .nsol, .page .akey {
  font-family: "Batang", "바탕", "Noto Serif KR", "Times New Roman", Times, serif;
}
.m, i.ov, .fr { font-family: "Times New Roman", Times, "Batang", "바탕", serif; }

.topline { font-size: 12px; color: #667; padding: 4px 12px; background: #fafafa; border-bottom: 1px solid #e5e7eb; }
.foot { font-size: 12px; color: #667; padding: 10px 12px; text-align: center; border-top: 1px solid #e5e7eb; }
.foot a { color: inherit; }

.exams { display: flex; flex-direction: column; gap: 4px; }
.exams button { text-align: left; padding: 6px 8px; border: 1px solid #d5d9e0; border-radius: 6px; background: #fff; cursor: pointer; font-size: 13px; }
.exams button small { display: block; color: #778; font-size: 11px; }
.exams button.on { border-color: #2f5fd0; background: #eef3ff; font-weight: 600; }

.hwp { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.hwp button { padding: 7px 4px; border: 1px solid #d5d9e0; border-radius: 6px; background: #fff; cursor: pointer; font-size: 12px; }
.hwp button:hover { background: #f3f5f9; }
.hwpmsg { font-size: 12px; color: #b4561b; min-height: 1em; margin-top: 4px; }

.ntext { flex:1; min-height:0; font-size: calc(12.5px * var(--s,1)); line-height: 1.55; overflow: hidden; }
.ntext .fig img { max-height: calc(var(--fh, 38mm) * var(--s,1)); }
.ntext .ch { margin-left: 2mm; }
.fig img { max-height: var(--fh, 38mm); max-width: 100%; }
.nsol .st { font-size: 12px; line-height: 1.6; }

@media (max-width: 760px) {
  .app { display: flex; flex-direction: column; height: auto; min-height: 0; }
  .panel { position: static; width: auto; max-width: none; height: auto; max-height: none; overflow: visible; border-right: 0; border-bottom: 1px solid #e5e7eb; }
  .stage { height: auto; overflow: visible; padding: 8px; }
}
@media print { .topline, .foot { display: none !important; } }
/* 다단(한 쪽 문항 수) */
.seg.lay{flex-wrap:wrap}
.seg.lay button{flex:1 1 25%;font-size:12px}
.seg.lay button small{font-size:10px}
.nbody.l-2c{grid-template-rows:1fr;grid-template-columns:1fr 1fr}
.nbody.l-4{grid-template-rows:1fr 1fr;grid-template-columns:1fr 1fr}
.nbody.l-2c .nrow,.nbody.l-4 .nrow{grid-template-columns:1fr;grid-template-rows:minmax(0,1.7fr) minmax(0,1fr)}
.nbody.l-2c .nl,.nbody.l-4 .nl{border-right:0;border-bottom:1px solid #111}
.nbody.l-4 .why{grid-template-columns:1fr 1fr;gap:.8mm 2mm;font-size:8pt;margin-bottom:1.5mm}
.nbody.l-4 .mine{font-size:8pt;margin-bottom:1.5mm}
.nbody.l-4 .ntag{font-size:8pt;margin-bottom:1mm}
.nbody.l-4 .lines.s{flex:0 0 8mm}
.nbody.l-4 .nl,.nbody.l-4 .nr{padding:2mm 3mm}
.nbody.l-4 .ntext{font-size:calc(11px * var(--s,1))}
.nbody.l-4 .nsol{font-size:11px}
.body.l-2r{grid-template-columns:1fr;grid-template-rows:1fr 1fr}
.body.l-2r .colline{display:none}
.body.l-2r .cell{padding-right:0;border-bottom:0}
.body.l-2r .cell + .cell{border-top:1px solid #bbb;padding-top:3mm}
.body.l-2c{grid-template-rows:1fr}

/* 구분선 선택 (대표 16:02~16:06): 가운데 선만(기본) / 선 없음 / 상자 × 연하게 / 진하게(기본) / 두 줄 */
.lw-thin{--lb:1px solid #b8bcc4;--lb2:1px solid #c9ccd2}
.lw-bold{--lb:1.4px solid #111;--lb2:1px solid #111}
.lw-double{--lb:3.5px double #111;--lb2:3px double #111}
.nbody .nrow{border:0;border-radius:0}
.nbody .nl{border:0}
.nbody.ln-box .nrow{border:var(--lb)}
.nbody.ln-box .nl{border-right:var(--lb2)}
.nbody.ln-box.l-2c .nl,.nbody.ln-box.l-4 .nl{border-right:0;border-bottom:var(--lb2)}
.nbody.ln-mid{position:relative}
.nbody.ln-mid::after{content:"";position:absolute;top:0;bottom:0;left:50%;border-left:var(--lb)}
.body .colline{border-left:var(--lb2)}
.body.ln-none .colline{display:none}

/* 학원 로고·이름 (대표 16:06) */
.logo-row{display:flex;gap:6px;align-items:center;margin-top:4px}
.logo-row input{flex:1;min-width:0;font-size:12px}
.logo-row button{font-size:12px;padding:5px 8px;border:1px solid #d5d9e0;border-radius:6px;background:#fff}
.logo-prev{display:block;max-height:40px;max-width:160px;margin-top:6px;border:1px dashed #ccd;padding:2px}
.ph-brand{display:flex;align-items:center;gap:2.5mm;margin-bottom:1.5mm;font-family:"Malgun Gothic","Noto Sans KR",sans-serif;font-size:10pt;font-weight:700;color:#222}
.ph-brand img{max-height:12mm;max-width:40mm;object-fit:contain}
.ph-mini{height:5mm;vertical-align:-1mm;margin-right:2mm}
.logo-pick{flex:1;text-align:center;font-size:12.5px;padding:6px 8px;border:1.5px solid #1f4e9c;color:#1f4e9c;border-radius:6px;cursor:pointer;background:#f3f6fc}
.logo-pick input{display:none!important}
.logo-prev[hidden]{display:none!important}

.apply{border:1px solid #d6def0;border-radius:10px;padding:12px 14px;background:#f6f8fd}
.apply .soon{font-size:11px;font-weight:700;color:#fff;background:#e08a00;border-radius:20px;padding:2px 8px}
.apply-l{margin:0 0 10px;padding-left:18px;font-size:13px;line-height:1.7;color:#333}
.apply-b{display:block;text-align:center;background:#1f4e9c;color:#fff;border-radius:8px;padding:10px;font-weight:700;text-decoration:none;font-size:14px}
@media print{.apply{display:none}}

/* 11-27 공개판 추가: 시험판 띠 · 의견 보내기 · 캐릭터 */
.brand{position:relative;padding-right:60px}
.brand-mascot{position:absolute;right:0;top:0;width:52px;height:52px}
.beta{background:#12305f;color:#fff;text-align:center;font-size:13px;font-weight:700;padding:6px 10px;letter-spacing:.02em}
.empty .mascot{display:block;margin:0 auto 10px;width:96px;height:96px}
.res-mascot{display:flex;align-items:center;gap:10px;background:#eef4ff;border:1px solid #cfe0ff;border-radius:12px;padding:6px 12px;margin:8px auto 10px;max-width:793px;font-size:14px;color:#1f2937}
.res-mascot img{width:56px;height:56px;flex:none}
.res-mascot[hidden]{display:none}
.fb-btn{position:fixed;right:14px;bottom:14px;z-index:50;background:#2563eb;color:#fff;font-weight:700;font-size:15px;padding:12px 18px;border-radius:999px;text-decoration:none;box-shadow:0 4px 14px rgba(0,0,0,.18);min-height:44px;display:inline-flex;align-items:center}
.fb-btn:active{background:#1d4ed8}
.fb-toast{position:fixed;left:50%;bottom:72px;transform:translateX(-50%);z-index:51;background:#111827;color:#fff;font-size:14px;padding:10px 16px;border-radius:10px;max-width:90vw;text-align:center}
.fb-toast[hidden]{display:none}
.foot{padding-bottom:72px}
.foot .aca{display:inline-block;margin-top:4px;font-size:12px;color:#667}
@media print{.beta,.fb-btn,.fb-toast,.res-mascot{display:none !important}}
