/* PRISM 약술 — 서비스 공통 스타일 (문제지 아이덴티티 계승: PRISM 블루·경기바탕·Cinzel) */
@font-face { font-family: 'GyeonggiBatang'; src: url('/assets/fonts/GyeonggiBatang-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'GyeonggiBatang'; src: url('/assets/fonts/GyeonggiBatang-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

:root {
  --blue: #0072BC; --blue-dark: #084d82; --ink: #2a2620; --paper: #FBF8F1;
  --sand: #EEE9DD; --line: #cdc6b5; --muted: #7a7468;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'GyeonggiBatang', 'Apple SD Gothic Neo', serif;
  background: var(--sand); color: var(--ink);
  -webkit-text-size-adjust: 100%;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 18px 16px 90px; }

.brandbar { display: flex; align-items: baseline; justify-content: space-between; padding: 4px 2px 10px; border-bottom: 2px solid var(--blue); }
.brandbar .logo { font-family: Cinzel, serif; font-weight: 700; letter-spacing: 4px; color: var(--blue); font-size: 18px; text-decoration: none; }
.brandbar .sub { font-size: 12.5px; color: var(--muted); letter-spacing: 1px; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px 16px; margin-top: 14px; box-shadow: 0 3px 14px rgba(40,35,25,.06); }
.card h2 { margin: 0 0 10px; font-size: 17px; letter-spacing: 1px; }
.card h2 .en { font-family: Cinzel, serif; font-size: 11px; letter-spacing: 3px; color: var(--blue); display: block; margin-bottom: 4px; }

label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 5px; }
input[type=text] {
  width: 100%; font-size: 17px; padding: 12px 13px; border: 1.5px solid var(--line);
  border-radius: 8px; font-family: inherit; background: var(--paper);
}
input[type=text]:focus { outline: none; border-color: var(--blue); }

.btn {
  display: inline-block; width: 100%; text-align: center; background: var(--blue); color: #fff;
  font-size: 16.5px; font-weight: 700; letter-spacing: 2px; padding: 14px; border: 0;
  border-radius: 8px; cursor: pointer; font-family: inherit; margin-top: 14px; text-decoration: none;
}
.btn:disabled { opacity: .5; }
.btn.ghost { background: #fff; color: var(--blue); border: 1.5px solid var(--blue); }
.btn.small { width: auto; padding: 9px 16px; font-size: 14px; margin: 0; }

.notice { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin-top: 12px; }

.exam-item { display: flex; align-items: center; gap: 12px; padding: 13px 4px; border-bottom: 1px solid var(--line); }
.exam-item:last-child { border-bottom: 0; }
.exam-item .univ { flex: none; background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; padding: 5px 9px; border-radius: 5px; letter-spacing: 1px; }
.exam-item .tt { flex: 1; font-size: 14.5px; }
.exam-item .meta { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.exam-item .done { flex: none; font-size: 12px; color: var(--blue-dark); font-weight: 700; }

.bonus { border: 1.5px solid var(--blue); background: linear-gradient(180deg, #f2f8fd, #fff); }
.bonus .tag { display: inline-block; background: #C8102E; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 2px; padding: 3px 9px; border-radius: 4px; }
.bonus .big { font-size: 18px; font-weight: 700; margin: 8px 0 2px; }
.bonus .val { color: #C8102E; font-weight: 700; }

/* ---- 응시 ---- */
.paper-frame { width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #fff; height: 62vh; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: #fff;
  border-top: 2px solid var(--blue); box-shadow: 0 -8px 30px rgba(40,35,25,.18);
  max-height: 58vh; display: flex; flex-direction: column; border-radius: 14px 14px 0 0;
}
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; cursor: pointer; }
.sheet-head .grip { width: 40px; height: 4px; background: var(--line); border-radius: 2px; margin: 0 auto; }
.sheet-body { overflow-y: auto; padding: 0 16px 16px; }
.q-block { border-top: 1px solid var(--line); padding: 10px 0; }
.q-block .q-title { font-size: 14px; font-weight: 700; color: var(--blue-dark); }
.slot-row { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.slot-row .lab { flex: none; min-width: 52px; font-size: 13px; font-weight: 700; color: var(--blue); }
.slot-row input { flex: 1; font-size: 15px; padding: 9px 10px; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--blue-dark); }
.timer.warn { color: #C8102E; }

/* ---- 성적표 ---- */
.report-sheet { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 22px 18px 60px; margin-top: 14px; overflow: hidden; }
.score-hero { text-align: center; padding: 10px 0 16px; border-bottom: 2px solid var(--blue); }
.score-hero .name { font-size: 14px; color: var(--muted); }
.score-hero .score { font-size: 44px; font-weight: 700; color: var(--blue); line-height: 1.2; }
.score-hero .score small { font-size: 18px; color: var(--muted); font-weight: 400; }
.score-hero .pct { font-size: 13.5px; margin-top: 4px; }
.rtable { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 12.5px; }
.rtable th { background: #EEF3F8; color: var(--blue-dark); padding: 7px 4px; border: 1px solid var(--line); font-size: 11.5px; }
.rtable td { border: 1px solid var(--line); padding: 6px 5px; text-align: center; }
.rtable td.ans { text-align: left; max-width: 150px; overflow-wrap: anywhere; }
.ok { color: var(--blue); font-weight: 700; }
.no { color: #C8102E; font-weight: 700; }
.badge-hard { display: inline-block; background: #C8102E; color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 3px; margin-left: 4px; }
.wm-foot { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: 10.5px; color: #9a9385; padding: 8px; border-top: 1px solid var(--line); background: rgba(255,255,255,.7); }
.wm-tile { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.report-sheet > *:not(.wm-tile) { position: relative; z-index: 1; }
.gbar { height: 10px; background: #e6e0d2; border-radius: 5px; overflow: hidden; margin-top: 6px; }
.gbar > div { height: 100%; background: var(--blue); }

#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; font-size: 14px; padding: 11px 20px; border-radius: 8px;
  opacity: 0; transition: .25s; z-index: 999; pointer-events: none; max-width: 88vw;
}
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.err { background: #8c1a1a; }

@media (min-width: 700px) {
  .paper-frame { height: 70vh; }
}
