:root {
  color-scheme: dark;
  font-family: system-ui, 'Malgun Gothic', sans-serif;
  font-size: 17px;
  color: #fff;
  background: #111318;
}
.paper-image { margin:18px 0; }
.paper-image img { display:block; width:100%; height:auto; background:#fff; border-radius:6px; }
.paper-image a { display:block; }
.paper-image small { display:block; margin-top:6px; }
.paper-card { padding:16px; }
.paper-card .question { font-size:19px; }
/* 공무원 9급 기출은 제시문·코드가 문제 안에 통째로 들어 있다. 원문을 줄이지 않는 대신 글자 크기를 낮춰 한 화면에 담는다. */
.gichul-card .question { font-size:17px; font-weight:600; line-height:1.7; }
.gichul-card .quiz-choices button { font-size:16px; }
.paper-choices { grid-template-columns:repeat(5,minmax(0,1fr)); position:sticky; bottom:8px; padding:8px; background:#111318ee; border-radius:14px; }
.paper-choices button { text-align:center; padding:12px 0; font-size:24px; }
.paper-choices button:disabled:not(.quiz-correct):not(.quiz-wrong) { opacity:.6; }
#annulledQuestion { margin:16px 0; padding:12px; border:1px solid #79704e; border-radius:12px; }
@media (min-width:850px) { article.paper-card { padding:24px; } .paper-card .paper-image { max-width:720px; margin:20px auto; } }
.study-time h2 { font-size:20px; margin:0; }
.study-credit-award { color:#b4dcc2; font-weight:700; }
.explanation-credit { display:block; margin-top:12px; color:#b4dcc2; }
.study-time { padding:18px; border:1px solid #414854; border-radius:16px; background:#1b2028; }
.study-time-totals { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:16px 0; }
.study-time-totals span,.study-time-totals strong { display:block; }
.study-time-totals span { color:#d1d7e0; margin-bottom:4px; }
.study-time-totals strong { font-size:21px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.study-time p { margin:10px 0; font-size:14px; }
.study-time small { display:block; line-height:1.6; }
.study-time details { margin-top:14px; }
.study-time summary { cursor:pointer; min-height:32px; }
#studyTimeHistory { padding-left:20px; line-height:1.9; font-variant-numeric:tabular-nums; }
* { box-sizing: border-box; }
body { margin: 0; background: #111318; color: #fff; }
header, main { max-width: 1000px; margin: auto; padding: 24px; }
header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
h1 { margin: 4px 0; font-size: 36px; letter-spacing: -.04em; }
h2 { margin: 0 0 8px; font-size: 25px; }
p { color: #fff; line-height: 1.7; }
small, footer, .subject-counts, .status { color: #d1d7e0; }
label { display: block; margin: 18px 0 8px; font-weight: 700; }
select, button {
  min-height: 48px;
  border: 1px solid #535d6b;
  border-radius: 12px;
  background: #1b2028;
  color: #fff;
  font: inherit;
}
select { display: block; width: 100%; margin-top: 8px; padding: 12px 13px; }
select option { background: #1b2028; color: #fff; }
button { padding: 12px 18px; cursor: pointer; }
button:hover { background: #343e4c; }
button:focus-visible, select:focus-visible { outline: 3px solid #a9cfff; outline-offset: 3px; }
button:disabled { cursor: default; opacity: 1; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0; }
.stats div { padding: 16px; border-radius: 16px; background: #202630; }
.stats strong { display: block; margin-bottom: 4px; font-size: 30px; }
.stats span { color: #d1d7e0; font-size: 14px; }
.retention-line { margin: 8px 0; }
.status:empty, #message:empty { display: none; }
article { min-height: 280px; padding: 32px; border: 1px solid #414854; border-radius: 22px; background: #1b2028; box-shadow: 0 8px 30px #0006; }
.question { margin: 18px 0 0; font-size: 25px; font-weight: 700; line-height: 1.65; white-space: pre-wrap; }
.quiz-choices { display: grid; gap: 12px; margin-top: 24px; }
.quiz-choices button { width: 100%; padding: 15px 16px; text-align: left; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.quiz-choices .quiz-correct:disabled { border: 2px solid #82d6a4; background: #183b2b; }
.quiz-choices .quiz-wrong:disabled { border: 2px solid #ff9c9c; background: #49282e; }
.answer { margin: 22px 0; padding: 20px; border-radius: 14px; background: #252e3b; white-space: pre-wrap; line-height: 1.7; }
.answer p { margin-bottom: 0; }
.primary { border-color: #789ac4; background: #344963; font-weight: 700; }
#message { position: sticky; bottom: 10px; padding: 10px; border-radius: 10px; background: #202630; }
footer { margin: 40px 0 10px; font-size: 13px; }
[hidden] { display: none !important; }
@media (min-width: 850px) {
  .question { font-size: 29px; }
  article { padding: 44px; }
}
@media (max-width: 540px) {
  header, main { padding: 18px; }
  header #date { font-size: 13px; }
  .stats { gap: 8px; }
  .stats div { padding: 13px 10px; }
  .stats strong { font-size: 25px; }
  .stats span { font-size: 12px; }
  article { padding: 22px 18px; }
  .question { font-size: 22px; }
  .quiz-choices button { min-height: 56px; padding: 14px; }
}

.sync-line { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin:20px 0; font-size:.9rem; }
/* 로그인·동기화·승인 관리는 과목 선택 화면에서만 보인다. 문제를 푸는 동안에는 방해가 되지 않는다. */
body:not([data-view="home"]) .sync-line { display:none; }
.admin-panel { margin:16px 0; padding:14px; border:1px solid #2c333f; border-radius:12px; }
.admin-panel h2 { font-size:1rem; margin:0 0 8px; }
.request-item { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; padding:10px 0; border-top:1px solid #2c333f; }
.request-item strong { display:block; word-break:break-all; }
.request-item span { display:block; font-size:.85rem; opacity:.8; }
.request-actions { display:flex; gap:8px; }
.lesson { margin-top:20px; padding:16px; border:1px solid #535d6b; border-radius:12px; }
.lesson summary { cursor:pointer; font-weight:700; min-height:32px; }
.lesson .example { white-space:pre-wrap; padding-left:12px; border-left:3px solid #8eacd2; }
.hook { color:#d4e5ff; }
.practice-form { display:grid; gap:12px; margin:20px 0; }
.practice-form input { width:100%; min-width:0; min-height:54px; padding:14px; border:1px solid #8292a8; border-radius:12px; background:#111318; color:#fff; font:inherit; }
.practice-form input:focus-visible { outline:3px solid #a9cfff; outline-offset:3px; }
.practice-form input:disabled { opacity:1; color:#fff; }
.question,.answer { overflow-wrap:anywhere; }
.result-correct { color:#98e7b6; }
.result-wrong { color:#ffb1b1; }
.result-unsure { color:#ffe3a1; }
[hidden] { display:none !important; }
 .content-correction{border:1px solid #eab866;border-radius:12px;padding:12px;margin:10px 0;color:#fff;background:#322b20;white-space:pre-wrap;overflow-wrap:anywhere}

/* Step-by-step screens (v28) */
.menu-list { display:grid; gap:12px; margin:16px 0; }
.menu-item { display:flex; flex-direction:column; align-items:flex-start; gap:4px; width:100%; min-height:64px; padding:16px 18px; text-align:left; }
.menu-item strong { font-size:19px; }
.menu-item span { color:#d1d7e0; font-size:14px; line-height:1.5; }
.menu-item.secondary { margin-top:12px; border-style:dashed; }
.back { min-height:40px; padding:8px 14px; margin-bottom:12px; font-size:15px; }
.range-heading { margin:26px 0 0; font-size:17px; color:#d4e5ff; }
.quiz-bar { display:flex; align-items:center; gap:12px; margin-bottom:12px; }
.quiz-bar .back { margin:0; flex:0 0 auto; }
#scopeLabel { color:#d1d7e0; font-size:15px; overflow-wrap:anywhere; }
.drill-toggle { margin:0 0 0 auto; flex:0 0 auto; min-height:40px; padding:8px 12px; font-size:14px; }
.drill-toggle[aria-pressed="true"] { border-color:#789ac4; background:#344963; font-weight:700; }
.drill-status { color:#d4e5ff; font-weight:700; }
#quizView article { min-height:0; }
#quizView .status { margin:12px 4px; }
.eyebrow { margin:0 0 10px; color:#d1d7e0; font-size:14px; }
.result-banner { padding:16px 18px; border-radius:14px; background:#252e3b; border:2px solid #535d6b; }
.result-banner strong { font-size:23px; }
.result-banner p { margin:6px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.result-banner.result-correct { border-color:#82d6a4; background:#183b2b; }
.result-banner.result-wrong { border-color:#ff9c9c; background:#49282e; }
.result-banner.result-unsure { border-color:#ffe3a1; background:#3a3322; }
.explanation-main { border-color:#8eacd2; }
.explanation-main summary { font-size:18px; }
.explanation-text { white-space:pre-wrap; overflow-wrap:anywhere; }
.recap .question { font-size:19px; }
.recap-choices { position:static; }
.next-review, .source-line { display:block; margin-top:8px; line-height:1.6; }
.next-question { width:100%; margin-top:20px; min-height:56px; font-size:18px; }
.table-wrap { overflow-x:auto; margin:16px 0 24px; }
.subject-table { width:100%; border-collapse:collapse; font-variant-numeric:tabular-nums; }
.subject-table th, .subject-table td { padding:10px 8px; border-bottom:1px solid #414854; text-align:right; white-space:nowrap; }
.subject-table th:first-child, .subject-table td:first-child { text-align:left; }
.subject-table th { color:#d1d7e0; font-weight:600; font-size:14px; }
@media (max-width:540px) { .menu-item strong { font-size:18px; } .result-banner strong { font-size:21px; } }
/* The question owns the top of the quiz screen. */
body[data-view="quiz"] header { display:none; }
body[data-view="quiz"] main { padding-top:14px; }
.range-fold { margin-top:26px; }
.range-fold > summary.range-heading { margin:0; cursor:pointer; min-height:40px; display:list-item; }

/* 사진 보기 문항. 400px 폭에서도 네 장이 2×2로 들어가고, 사진은 잘리지 않는다(제1유형이라도 크롭은 하지 않는다). */
.photo-choices { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; align-items:start; }
.photo-cell { display:grid; gap:6px; min-width:0; }
.photo-choices .photo-choice { display:flex; flex-direction:column; gap:6px; width:100%; padding:8px; text-align:center; overflow-wrap:anywhere; }
.photo-choices .photo-choice img { display:block; width:100%; aspect-ratio:4/3; object-fit:contain; background:#0e1116; border-radius:8px; }
.photo-choices .photo-number { font-size:16px; font-weight:700; }
.photo-name { display:block; text-align:center; line-height:1.45; }
.photo-error { margin-top:10px; }
.photo-credits { margin-top:14px; padding:10px 12px; border:1px solid #2c333f; border-radius:10px; font-size:12px; line-height:1.6; color:#c2c9d4; }
.photo-credits p { margin:0 0 6px; }
.photo-credits p:last-child { margin-bottom:0; }
.photo-credit-head { font-weight:700; color:#e6ebf2; }
@media (max-width: 540px) { .photo-choices .photo-choice { min-height:0; padding:6px; } }
/* 공무원 기출 회차: 연도별 접기(range-fold 안의 range-fold). 휴대폰 한 화면에 연도 머리만 늘어서고, 연 연도만 회차가 보인다. */
.menu-list > .paper-year { margin-top:0; }
.paper-year > summary.range-heading { font-size:16px; color:#c9d9f2; min-height:44px; padding:10px 2px; }
.paper-year > .menu-list { margin:8px 0 6px; }
/* 문제 의견: 문제·해설 화면 아래의 버튼을 누르면 입력칸이 열린다. */
.note-box { margin-top:20px; }
.note-toggle { min-height:44px; padding:10px 14px; font-size:15px; border-style:dashed; }
.note-count { display:block; margin-top:6px; color:#b4dcc2; }
.note-panel { display:grid; gap:10px; margin-top:10px; padding:14px; border:1px solid #535d6b; border-radius:12px; }
.note-panel label { color:#d1d7e0; font-size:14px; }
.note-panel textarea { box-sizing:border-box; width:100%; min-width:0; min-height:120px; padding:12px; border:1px solid #8292a8; border-radius:12px; background:#111318; color:#fff; font:inherit; line-height:1.5; resize:vertical; }
.note-panel textarea:focus-visible { outline:3px solid #a9cfff; outline-offset:3px; }
.note-actions { display:flex; gap:8px; justify-content:flex-end; }
/* 외울 것: 가려 두고 떠올린 뒤 눌러서 확인한다. */
.memorize-bar { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:12px 0; }
.memorize-count { margin-right:auto; color:#b4dcc2; font-weight:700; }
.memorize-bar button { min-height:40px; padding:8px 12px; font-size:14px; }
.memorize-line { margin:20px 0 0; }
.memorize-chant { margin:0 0 8px; font-size:20px; letter-spacing:.15em; color:#d4e5ff; overflow-wrap:anywhere; }
.memorize-grid { display:grid; gap:8px; }
.memorize-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:8px; }
.memorize-cell { display:flex; flex-direction:column; align-items:flex-start; gap:4px; width:100%; min-height:52px; padding:12px 14px; text-align:left; line-height:1.5; overflow-wrap:anywhere; }
.memorize-cell strong { font-size:17px; }
.memorize-cell span { color:#d1d7e0; font-size:14px; }
.memorize-cell .memorize-hidden { color:#8e99a8; }
.memorize-cell.shown { border-color:#789ac4; background:#243247; }
@media (max-width:380px) { .memorize-pair { grid-template-columns:1fr; } }
