/* 송성태 영어 게임 엔진 [SS_QUIZ_V1] — 모든 게임이 같이 쓰는 모양
   책마다 바뀌는 색은 game.json의 theme → :root 변수로 들어온다. */
:root {
  --accent: #1E5B35;       /* 표지 제목 색 */
  --accent-soft: #DCE8DF;
  --paper: #EEECE8;        /* 표지 바탕 */
  --mark: #D6246E;         /* 틀림·Vol 표시 */
  --ink: #1c1c1e;
  --muted: #5d5d63;
  --card: #ffffff;
  --line: #d9d6d0;
  --clock: #3A4450;        /* 표지 시계 몸통 */
  --lcd: #C9D8C4;
  --lcd-ink: #1B2A20;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  -webkit-text-size-adjust: 100%;
}
.ssq { max-width: 480px; margin: 0 auto; padding: 16px 16px 28px; }

/* 시계: 표지의 알람시계. 경과 시간과 진행 */
.clock {
  background: var(--clock);
  border-radius: 22px;
  padding: 10px;
  box-shadow: 0 6px 0 #2b333c;
  margin: 4px 0 18px;
}
.clock .lcd {
  background: var(--lcd);
  color: var(--lcd-ink);
  border-radius: 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 6px 16px 4px;
  font-variant-numeric: tabular-nums;
}
.clock .time { font-size: 2.6rem; font-weight: 800; letter-spacing: .04em; line-height: 1.1; }
.clock .prog { font-size: 1.1rem; font-weight: 700; }

.series { margin: 0; color: var(--muted); font-size: .9rem; }
.series b { color: var(--mark); font-weight: 700; }
h1 { margin: 2px 0 6px; font-size: 1.9rem; line-height: 1.25; color: var(--accent); font-weight: 800; }
.lead { margin: 0 0 16px; }
.best { margin: 0 0 18px; color: var(--muted); font-size: .95rem; }

.btn {
  display: block; width: 100%;
  min-height: 52px; padding: 12px 16px;
  border: 0; border-radius: 12px;
  background: var(--accent); color: #fff;
  font: inherit; font-weight: 700; font-size: 1.05rem;
  cursor: pointer; text-align: center; text-decoration: none;
}
.btn.ghost { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.btn + .btn { margin-top: 10px; }
.btn:focus-visible, .choice:focus-visible, a:focus-visible { outline: 3px solid var(--mark); outline-offset: 2px; }

/* 문제 */
.unit { margin: 0; font-size: .95rem; color: var(--muted); }
.unit .no { color: var(--accent); font-weight: 800; margin-right: 6px; }
.tag {
  display: inline-block; margin-left: 6px; padding: 0 8px;
  border-radius: 999px; background: var(--mark); color: #fff;
  font-size: .78rem; font-weight: 700; vertical-align: 2px;
}
.prompt { margin: 6px 0 10px; font-weight: 700; }
.sentence {
  background: var(--card);
  border-left: 5px solid var(--accent);
  border-radius: 0 12px 12px 0;
  padding: 14px 16px;
  margin: 0 0 14px;
  font-family: Georgia, "Times New Roman", "Noto Serif KR", serif;
  font-size: 1.2rem; line-height: 1.55;
  word-break: normal;
}
.blank {
  display: inline-block; min-width: 3.2em; height: 1.1em;
  border-bottom: 2.5px solid var(--ink); vertical-align: -2px;
}
u { text-decoration-thickness: 2px; text-underline-offset: 3px; }

.choices { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.choice {
  width: 100%; min-height: 50px; padding: 10px 14px;
  border: 2px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--ink);
  font: inherit; font-size: 1.05rem; text-align: left; cursor: pointer;
  word-break: normal;
}
.choice.en { font-family: Georgia, "Times New Roman", serif; }
.choice[disabled] { cursor: default; }
.choice.ok  { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.choice.bad { border-color: var(--mark); background: #fbe4ee; text-decoration: line-through; text-decoration-color: var(--mark); }

.feedback { margin: 14px 0 12px; padding: 12px 14px; border-radius: 12px; background: var(--card); }
.feedback .verdict { font-weight: 800; margin-right: 4px; }
.feedback.ok  .verdict { color: var(--accent); }
.feedback.bad .verdict { color: var(--mark); }

/* 결과 */
.score { font-size: 3.4rem; font-weight: 800; color: var(--accent); line-height: 1.1; margin: 0; font-variant-numeric: tabular-nums; }
.score small { font-size: 1.4rem; color: var(--muted); }
.new-best { color: var(--mark); font-weight: 700; }
h2 { font-size: 1.15rem; margin: 22px 0 8px; }
.review { list-style: none; margin: 0; padding: 0; }
.review li { background: var(--card); border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; }
.review .u { font-weight: 700; color: var(--accent); }
.review .s { font-family: Georgia, serif; }
.review a { color: var(--accent); font-weight: 700; }
.bookbox { margin: 22px 0 14px; padding: 16px; border-radius: 16px; background: var(--card); border: 2px solid var(--accent); }
.bookbox p { margin: 0 0 12px; }
.bookbox .t { font-weight: 800; font-size: 1.1rem; margin-bottom: 4px; }

@media (prefers-reduced-motion: no-preference) {
  .choice { transition: background-color .15s, border-color .15s; }
  .feedback { animation: pop .18s ease-out; }
  @keyframes pop { from { transform: translateY(4px); opacity: 0; } to { transform: none; opacity: 1; } }
}
