:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-soft: #eef4fb;
  --text: #172033;
  --muted: #667085;
  --line: #dce4ef;
  --primary: #1769e0;
  --primary-dark: #0f52b8;
  --correct: #14804a;
  --correct-bg: #e8f7ef;
  --wrong: #c5363d;
  --wrong-bg: #fff0f0;
  --warning: #9a6700;
  --shadow: 0 16px 44px rgba(29, 55, 90, .10);
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Malgun Gothic", "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 290px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 24px 20px; background: #0e2342; color: #fff; }
.brand { display: flex; gap: 12px; align-items: center; padding: 0 4px 22px; border-bottom: 1px solid rgba(255,255,255,.13); }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: #2b7cff; font-weight: 800; }
.brand strong, .brand small { display: block; }
.brand small { margin-top: 3px; color: #a9b8d0; font-size: 12px; }
.side-section { padding: 22px 4px; border-bottom: 1px solid rgba(255,255,255,.11); }
.side-section h2 { margin: 0 0 15px; font-size: 13px; color: #b9c7dc; letter-spacing: .08em; text-transform: uppercase; }
.progress-ring { --progress: 0deg; width: 96px; height: 96px; display: grid; place-items: center; margin: 4px auto 18px; border-radius: 50%; background: conic-gradient(#4ea1ff var(--progress), rgba(255,255,255,.13) 0); position: relative; }
.progress-ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #0e2342; }
.progress-ring span { position: relative; font-size: 18px; font-weight: 800; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stats-grid div { padding: 10px; background: rgba(255,255,255,.07); border-radius: 10px; }
.stats-grid strong, .stats-grid span { display: block; }
.stats-grid strong { font-size: 18px; }
.stats-grid span { margin-top: 2px; color: #a9b8d0; font-size: 11px; }
.session-options label { display: block; margin: 12px 0; color: #b9c7dc; font-size: 12px; }
select, input { width: 100%; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--text); padding: 10px 11px; outline: none; }
.session-options select { margin-top: 6px; border-color: rgba(255,255,255,.18); background: #172f53; color: white; }
select:focus, input:focus { border-color: #5b9df3; box-shadow: 0 0 0 3px rgba(47,128,237,.15); }
button, .file-button { border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--text); padding: 10px 14px; font-weight: 700; }
.primary { border-color: var(--primary); background: var(--primary); color: #fff; }
.primary:hover { background: var(--primary-dark); }
.wide { width: 100%; margin-top: 8px; }
.compact-actions { display: grid; gap: 8px; }
.compact-actions button, .file-button { width: 100%; background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.14); color: #eaf1fc; text-align: center; font-size: 12px; }
.file-button input { display: none; }
.compact-actions .danger-text { color: #ffb4b8; }
.dataset-note { color: #8295b2; font-size: 10px; line-height: 1.7; padding: 10px 4px; }

.main { min-width: 0; }
.topbar { height: 68px; display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 0 34px; background: rgba(255,255,255,.82); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 20; }
.search-wrap { width: min(410px, 70vw); display: flex; }
.search-wrap input { border-radius: 9px 0 0 9px; }
.search-wrap button { border-left: 0; border-radius: 0 9px 9px 0; }
.icon-button { width: 42px; height: 42px; padding: 0; font-size: 19px; }
.mobile-only { display: none; }

.welcome, .quiz { width: min(980px, calc(100% - 48px)); margin: 0 auto; padding: 58px 0 70px; }
.welcome { min-height: calc(100vh - 68px); display: flex; flex-direction: column; justify-content: center; }
.eyebrow { color: var(--primary); font-weight: 800; letter-spacing: .12em; font-size: 12px; }
.welcome h1 { margin: 12px 0 22px; font-size: clamp(38px, 6vw, 66px); line-height: 1.08; letter-spacing: -.045em; }
.welcome > p:not(.eyebrow) { max-width: 650px; color: var(--muted); line-height: 1.8; }
.welcome-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 32px 0; }
.welcome-cards div { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: var(--shadow); }
.welcome-cards strong, .welcome-cards span { display: block; }
.welcome-cards strong { font-size: 28px; }
.welcome-cards span { margin-top: 6px; color: var(--muted); font-size: 13px; }
.hero-button { align-self: flex-start; padding: 14px 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hero-button.secondary { background: var(--panel); color: var(--primary); border-color: #9fc2f3; }
.exam-note { margin-top: 14px !important; font-size: 12px; color: var(--muted); }
.exam-result { width: min(760px, calc(100% - 48px)); min-height: calc(100vh - 68px); margin: 0 auto; padding: 70px 0; display: flex; flex-direction: column; justify-content: center; }
.exam-result h1 { margin: 10px 0 22px; font-size: clamp(36px, 6vw, 58px); }
.exam-score { display: flex; align-items: baseline; gap: 16px; margin: 8px 0 18px; }
.exam-score strong { font-size: 42px; }
.exam-score span { color: var(--primary); font-size: 24px; font-weight: 800; }
.exam-result > p:not(.eyebrow) { color: var(--muted); line-height: 1.8; margin-bottom: 26px; }
.exam-mode-banner { margin: 0 0 14px; padding: 10px 12px; border-radius: 9px; background: #eef4ff; color: #24558f; font-size: 12px; font-weight: 700; }

.quiz { padding-top: 34px; }
.quiz-meta, .quiz-nav, .session-progress > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pill { display: inline-flex; padding: 5px 9px; border-radius: 999px; background: #e7f1ff; color: #135ab7; font-size: 11px; font-weight: 800; }
.pill.self { background: #fff3d6; color: #855b00; }
.source-number { margin-left: 8px; color: var(--muted); font-size: 12px; }
.bookmark { border: 0; background: transparent; color: var(--muted); }
.bookmark.active { color: #df9700; }
.question-status { margin: 14px 0; }
.status-badges { display: flex; flex-wrap: wrap; gap: 7px; }
.status-badge { display: inline-flex; align-items: center; min-height: 27px; padding: 5px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; border: 1px solid transparent; }
.status-badge.scope-current { color: #146c43; background: #e8f7ef; border-color: #b8e6cb; }
.status-badge.scope-out { color: #9a3d00; background: #fff0e6; border-color: #ffc79f; }
.status-badge.term-change { color: #24558f; background: #e9f2ff; border-color: #bed8f7; }
.status-badge.legacy-change { color: #8a5200; background: #fff4d6; border-color: #efd187; }
.question-status > p { margin: 8px 0 0; padding: 10px 12px; border-left: 3px solid #d97904; background: #fff8e8; border-radius: 0 8px 8px 0; font-size: 12px; line-height: 1.65; }
.session-progress { margin: 18px 0 16px; color: var(--muted); font-size: 12px; }
.bar { height: 6px; margin-top: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar i { display: block; width: 0; height: 100%; background: var(--primary); border-radius: inherit; transition: width .25s ease; }
.question-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: var(--shadow); }
.question-images { padding: 22px; }
.question-images img, .answer-images img { display: block; width: 100%; height: auto; margin: 0 auto 10px; border-radius: 4px; }
.text-fallback { border-top: 1px solid var(--line); padding: 12px 18px; color: var(--muted); font-size: 12px; }
.text-fallback pre { white-space: pre-wrap; font-family: inherit; line-height: 1.7; color: var(--text); }
.answer-controls { margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.answer-title { margin: 0 0 12px; font-size: 14px; }
.choice-row { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { min-width: 54px; font-size: 16px; }
.choice.selected { border-color: var(--primary); background: #eaf3ff; color: var(--primary-dark); box-shadow: 0 0 0 2px rgba(23,105,224,.12); }
.submit-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-top: 16px; }
.submit-row small { color: var(--muted); }
.self-instruction { margin: 0 0 14px; color: var(--muted); line-height: 1.65; }
.feedback, .explanation { margin-top: 16px; border-radius: 14px; padding: 18px; }
.feedback.correct { border: 1px solid #b8e6cb; background: var(--correct-bg); color: var(--correct); }
.feedback.wrong { border: 1px solid #ffc9cc; background: var(--wrong-bg); color: var(--wrong); }
.feedback.neutral { border: 1px solid #cbdcf1; background: var(--panel-soft); color: #254b78; }
.feedback strong { display: block; margin-bottom: 4px; }
.self-grade { display: flex; gap: 10px; margin-top: 12px; }
.self-grade .correct-button { border-color: #8fd0aa; color: var(--correct); }
.self-grade .wrong-button { border-color: #f0a6aa; color: var(--wrong); }
.explanation { border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); }
.explanation h3 { margin: 0 0 12px; }
.answer-summary { padding: 12px 14px; border-left: 4px solid var(--primary); background: var(--panel-soft); line-height: 1.7; }
.learning-tip { line-height: 1.75; color: var(--text); }
.explanation-section { margin-top: 18px; }
.explanation-section h4, .update-block h4 { margin: 0 0 9px; font-size: 14px; }
.explanation-section > p { line-height: 1.75; }
.choice-analysis { display: grid; gap: 9px; }
.choice-review { padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.choice-review header { display: flex; align-items: center; gap: 8px; }
.choice-review header span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: #dfe7f2; font-weight: 800; font-size: 12px; }
.choice-review header strong { font-size: 12px; }
.choice-review p { margin: 8px 0 5px; line-height: 1.55; font-size: 13px; }
.choice-review small { display: block; color: var(--muted); line-height: 1.65; }
.choice-review.right { border-color: #9fd6b6; background: #eefaf3; }
.choice-review.right header span { color: white; background: var(--correct); }
.choice-review.not-right.chosen { border-color: #e79b9f; background: #fff3f3; }
.choice-review.not-right.chosen header span { color: white; background: var(--wrong); }
.analysis-note { margin: 0; line-height: 1.75; }
.update-block { margin-top: 16px; padding: 14px 15px; border-radius: 10px; border: 1px solid var(--line); }
.update-block p { margin: 7px 0; line-height: 1.7; font-size: 13px; }
.update-block.current { border-color: #a9d9bd; background: #effaf4; }
.update-block.scope-warning { border-color: #f0be83; background: #fff7ea; }
.update-block.terminology { border-color: #abcbed; background: #eff6ff; }
.update-block.legacy { border-color: #e9bd69; background: #fff5d9; }
.update-block a { color: var(--primary-dark); font-weight: 700; }
.explanation-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.answer-images { margin-top: 14px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.quiz-nav { margin-top: 22px; }
.quiz-nav #shortcutHint { color: var(--muted); font-size: 11px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 18px); opacity: 0; pointer-events: none; padding: 11px 18px; border-radius: 10px; background: #111b2c; color: #fff; box-shadow: var(--shadow); transition: .2s ease; z-index: 100; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

body.dark { --bg:#0f1726; --panel:#162237; --panel-soft:#1d2d47; --text:#edf4ff; --muted:#9daec5; --line:#2a3b56; --shadow:0 16px 44px rgba(0,0,0,.25); }
body.dark .topbar { background: rgba(15,23,38,.86); }
body.dark .choice.selected { background:#18365d; }
body.dark .answer-images { background:#fff; }
body.dark .question-status > p, body.dark .update-block, body.dark .choice-review { color: #172033; }

@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 50; width: 290px; transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .mobile-only { display: inline-grid; place-items: center; }
  .topbar { justify-content: space-between; padding: 0 16px; }
  .welcome, .quiz { width: min(100% - 24px, 980px); padding-top: 28px; }
  .welcome-cards { grid-template-columns: 1fr; }
  .question-images { padding: 10px; }
  .quiz-nav #shortcutHint { display: none; }
}

@media print {
  .sidebar, .topbar, .answer-controls, .feedback, .explanation, .quiz-nav, .quiz-meta, .session-progress { display:none !important; }
  .app-shell { display:block; }
  .quiz { width:100%; padding:0; }
  .question-card { border:0; box-shadow:none; }
}

/* p3 · interactive HOTSPOT / select-and-place practice */
.hotspot-image-block { margin-bottom: 14px; }
.hotspot-canvas-label { margin: 0 0 7px; font-size: 11px; font-weight: 800; color: var(--primary-dark); }
.hotspot-canvas-label.muted { color: var(--muted); font-weight: 700; }
.hotspot-stage { position: relative; width: 100%; overflow: hidden; border-radius: 6px; }
.hotspot-stage img { margin-bottom: 0; user-select: none; -webkit-user-drag: none; }
.hotspot-stage.interactive { cursor: crosshair; outline: 2px dashed #8db8ef; outline-offset: 3px; background: #fff; }
.hotspot-stage.interactive:hover { outline-color: var(--primary); }
.hotspot-stage.interactive.locked { cursor: default; outline-style: solid; outline-color: #9aa9ba; }
.hotspot-marker-layer { position: absolute; inset: 0; pointer-events: none; }
.hotspot-marker { position: absolute; z-index: 3; width: 30px; height: 30px; min-width: 30px; padding: 0; transform: translate(-50%,-50%); border: 2px solid #fff; border-radius: 50%; background: #1769e0; color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.28); pointer-events: auto; }
.hotspot-marker span { display: grid; place-items: center; width: 100%; height: 100%; font-size: 12px; font-weight: 900; }
.hotspot-stage.locked .hotspot-marker { background: #52647a; }
.hotspot-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-soft); }
.hotspot-toolbar > strong { font-size: 12px; }
.hotspot-toolbar > div { display: flex; gap: 7px; flex-wrap: wrap; }
.hotspot-toolbar button { padding: 7px 10px; font-size: 11px; }

@media (max-width: 620px) {
  .hotspot-toolbar, .submit-row { align-items: stretch; flex-direction: column; }
  .hotspot-toolbar > div { width: 100%; }
  .hotspot-toolbar button { flex: 1; }
}

/* p3 · explanation v2 */
.explanation-focus { padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.explanation-focus h4 { margin-bottom: 7px; }
.exam-point { padding: 13px 14px; border-left: 4px solid #7a5bd8; background: #f6f3ff; border-radius: 0 10px 10px 0; }
.answer-image-help { margin: 7px 0 12px; color: #52647a; font-size: 12px; line-height: 1.6; }
body.dark .exam-point { color: #172033; }

/* p5: HOTSPOT readability + decoded answer controls */
.question-images img, .answer-images img { width: auto; max-width: 100%; }
.hotspot-image-block { margin-bottom: 18px; }
.hotspot-canvas-label { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:9px; font-size:12px; font-weight:800; color:#31567f; }
.hotspot-canvas-label.muted { color:var(--muted); }
.image-open-button, .image-open-link { font-size:11px; padding:6px 9px; white-space:nowrap; }
.hotspot-stage { margin:0 auto; width:fit-content; max-width:100%; }
.hotspot-stage img { width:auto; max-width:100%; }
.binary-answer-grid { display:grid; gap:10px; }
.binary-answer-row { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:11px 12px; border:1px solid var(--line); border-radius:10px; background:var(--bg); }
.binary-answer-row > div { display:flex; gap:7px; }
.binary-answer-row button.selected { border-color:var(--primary); background:#eaf3ff; color:var(--primary-dark); box-shadow:0 0 0 2px rgba(23,105,224,.12); }
.source-label { display:inline-flex; margin-left:6px; padding:3px 7px; border-radius:999px; background:#edf3fa; color:#52647a; font-size:10px; font-weight:700; vertical-align:middle; }
.decoded-answer ol { margin:8px 0 0 20px; padding:0; }
.decoded-answer li { margin:7px 0; line-height:1.6; }
.answer-effects { display:grid; gap:9px; }
.answer-effects > h4 { margin-bottom:0; }
.answer-effects article { padding:12px 13px; border:1px solid var(--line); border-radius:10px; background:#f8fbff; }
.answer-effects article strong { display:block; line-height:1.55; }
.answer-effects article p { margin:7px 0 0; color:var(--muted); line-height:1.7; }
.answer-image-item { margin:10px 0 16px; text-align:center; }
.answer-image-item .image-open-link { display:inline-block; margin-top:5px; }
@media (max-width: 720px) {
  .hotspot-canvas-label { align-items:flex-start; flex-direction:column; }
  .binary-answer-row { align-items:flex-start; flex-direction:column; }
}
/* p6 anti-leak / deep explanation */
.core-rule { padding: 14px 16px; border-left: 4px solid #6b55c6; background: #f7f4ff; border-radius: 0 10px 10px 0; }
.core-rule p { margin: 0; line-height: 1.78; }
.decoded-setting-row > div { display: flex; flex-wrap: wrap; gap: 7px; }
.decoded-setting-row button { min-width: 72px; }
.binary-answer-row button.selected { border-color: var(--primary); background: #eaf3ff; color: var(--primary-dark); box-shadow: 0 0 0 2px rgba(23,105,224,.12); }

/* p7 reference-grounded explanations */
.reference-explanation { border: 1px solid #bfd7f4; border-radius: 12px; padding: 16px; background: #f7fbff; }
.reference-explanation > p { line-height: 1.75; }
.reference-steps { display: grid; gap: 10px; margin-top: 12px; }
.reference-steps article { padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.reference-steps article strong { display: block; margin-bottom: 6px; }
.reference-steps article p { margin: 0; line-height: 1.72; }
.reference-nuance { margin-top: 12px; padding: 12px 13px; border-left: 4px solid #d08a00; background: #fff9e9; }
.reference-nuance p { margin: 6px 0 0; line-height: 1.7; }
.reference-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.reference-links strong { margin-right: 2px; }
.reference-links a { padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-size: 12px; text-decoration: none; }

/* p8: 606문항 커뮤니티 기반 상세 해설 */
.answer-summary span { line-height: 1.7; }
.answer-source-note { display: inline-block; margin: 9px 0 0 8px; padding: 3px 7px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; opacity: .72; vertical-align: middle; }
.answer-ground { background: color-mix(in srgb, var(--panel) 92%, #eef5ff 8%); }
.application-steps { margin: 10px 0 0 22px; padding: 0; }
.application-steps li { margin: 8px 0; padding-left: 3px; line-height: 1.72; }
.choice-analysis-v2 { display: grid; gap: 8px; margin-top: 10px; }
.choice-analysis-v2 p { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; line-height: 1.65; background: var(--panel); }
.explanation-caution { border: 1px solid #e0a62f; border-radius: 12px; padding: 14px 15px; background: #fff8e8; }
.explanation-caution p { margin: 7px 0 0; line-height: 1.68; }
.current-difference { border: 1px solid #87b5df; border-radius: 12px; padding: 14px 15px; background: #f2f8ff; }
.current-difference article + article { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.current-difference article p { margin: 6px 0; line-height: 1.68; }
.current-difference article a { font-size: 12px; }
.scope-note { border-left: 4px solid #7b8492; padding-left: 13px; }
.explanation code { padding: 1px 5px; border-radius: 5px; background: rgba(127,127,127,.13); font-size: .93em; }
body.dark .explanation-caution { background: rgba(160,110,20,.16); }
body.dark .current-difference { background: rgba(50,100,150,.14); }

/* 모의고사·힌트 확장 */
.check-row{display:flex;align-items:center;gap:8px;font-size:13px;margin:6px 0}
.check-row input{width:auto;margin:0}
.hint-note{font-size:12px;opacity:.7;line-height:1.5;margin:8px 0 0}
.exam-timer{font-variant-numeric:tabular-nums;font-weight:600;padding:6px 12px;border-radius:8px;background:rgba(120,120,140,.15);margin-right:8px}
.exam-timer.urgent{background:rgba(220,60,60,.18);color:#d33}
.hint-box{margin:12px 0}
.hint-toggle{background:transparent;border:1px dashed currentColor;opacity:.75;border-radius:8px;padding:6px 12px;font-size:13px;cursor:pointer}
.hint-toggle:hover{opacity:1}
.hint-body{margin-top:10px;padding:12px 14px;border-radius:10px;background:rgba(255,193,7,.12);border-left:3px solid rgba(255,193,7,.7);font-size:14px;line-height:1.6}
.hint-body.hidden,.hint-box.hidden{display:none}
.status-badge.out{background:rgba(220,120,40,.18);color:#c96a10}
.status-badge.legacy{background:rgba(150,120,200,.2);color:#7a5bb5}
.choice-row.with-text{display:flex;flex-direction:column;gap:8px}
.choice-row.with-text .choice{display:flex;align-items:flex-start;gap:10px;width:100%;text-align:left;padding:12px 14px;line-height:1.5;height:auto;white-space:normal}
.choice-row.with-text .choice-letter{flex:0 0 auto;font-weight:700;min-width:18px}
.choice-row.with-text .choice-text{flex:1 1 auto;font-weight:400}
.question-body{white-space:pre-wrap;font-family:inherit;font-size:15px;line-height:1.75;margin:0 0 16px;padding:18px 20px;border-radius:12px;background:var(--card,rgba(128,128,150,.06))}
.image-fallback{margin-top:4px;border-top:1px solid rgba(128,128,150,.2);padding-top:10px}
.image-fallback>summary{cursor:pointer;font-size:13px;opacity:.75;padding:4px 0}
.image-fallback>summary:hover{opacity:1}
.image-fallback.hidden{display:none}
.rowcount-row{display:flex;align-items:center;gap:10px;font-size:13px;margin:10px 0;opacity:.85}
.rowcount-row button{width:30px;height:30px;padding:0;border-radius:8px;font-size:16px;line-height:1}
.rowcount-row strong{min-width:20px;text-align:center;font-size:15px}
.sync-section input{width:100%;padding:9px 11px;border-radius:8px;font-size:14px;margin:6px 0}
.sync-row{display:flex;gap:8px}
.sync-row button{flex:1;padding:8px 10px;font-size:13px}
.sync-status{font-size:12px;margin:8px 0 0;opacity:.7}
.sync-status.ok{color:#2c8a4a;opacity:1}
.sync-status.bad{color:#c0392b;opacity:1}

/* 모바일 사이드바 닫기 */
.sidebar-overlay{display:none}
.sidebar-close{display:none}
@media (max-width:900px){
  .sidebar-overlay{display:block;position:fixed;inset:0;z-index:49;background:rgba(0,0,0,.45)}
  .sidebar-overlay[hidden]{display:none}
  .sidebar{padding-top:56px}
  .sidebar-close{display:flex;align-items:center;justify-content:center;position:absolute;top:12px;right:12px;
    width:38px;height:38px;padding:0;border-radius:10px;font-size:18px;line-height:1;
    background:rgba(255,255,255,.14);color:#fff;border:1px solid rgba(255,255,255,.25);z-index:2}
  .sidebar-close:hover{background:rgba(255,255,255,.24)}
  body.sidebar-open{overflow:hidden}
}

/* 시작 게이트 */
.gate{display:flex;align-items:center;justify-content:center;min-height:70vh;padding:24px}
.gate.hidden{display:none}
.gate-card{width:100%;max-width:440px;padding:32px 28px;border-radius:18px;background:var(--card,#fff);box-shadow:var(--shadow,0 10px 40px rgba(0,0,0,.12));text-align:center}
.gate-card h1{font-size:22px;margin:0 0 10px}
.gate-card p{font-size:14px;line-height:1.7;opacity:.8;margin:0 0 20px}
.gate-card input{width:100%;padding:12px 14px;border-radius:10px;font-size:15px;margin-bottom:10px}
.gate-error{color:#c0392b;font-size:13px;margin:0 0 10px !important;opacity:1 !important}
.gate-skip{display:block;width:100%;margin-top:10px;background:transparent;border:none;font-size:13px;opacity:.65;cursor:pointer;text-decoration:underline}
.gate-skip:hover{opacity:1}

/* 오답노트 */
.wrongnote{padding:8px 0}
.wrongnote.hidden{display:none}
.wn-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}
.wn-head h1{font-size:22px;margin:0}
.wn-stats{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:18px}
.wn-kpi{flex:1 1 120px;padding:14px;border-radius:12px;background:var(--card,rgba(128,128,150,.08));text-align:center}
.wn-kpi strong{display:block;font-size:24px;line-height:1.2}
.wn-kpi span{font-size:12px;opacity:.7}
.wn-kpi.small strong{font-size:18px}
.wn-actions{display:flex;gap:10px;margin-bottom:18px;flex-wrap:wrap}
.wn-actions button{flex:1 1 180px}
.wn-list{display:flex;flex-direction:column;gap:8px}
.wn-item{display:flex;align-items:center;gap:12px;width:100%;text-align:left;padding:12px 14px;border-radius:10px;background:var(--card,rgba(128,128,150,.06));cursor:pointer}
.wn-item:hover{background:rgba(128,128,150,.16)}
.wn-no{flex:0 0 auto;min-width:38px;font-weight:700;opacity:.6}
.wn-body{flex:1 1 auto;display:flex;flex-direction:column;gap:3px;min-width:0}
.wn-body strong{font-size:13px}
.wn-body em{font-style:normal;font-size:12px;opacity:.65;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wn-cnt{flex:0 0 auto;font-size:12px;opacity:.6}
.wn-empty{opacity:.6;padding:24px;text-align:center}
.whoami{margin:4px 0 10px;font-size:14px}

/* 원문 토론 답안 분포 */
.answer-dist .dist-rows{display:flex;flex-direction:column;gap:6px;margin:8px 0}
.dist-row{display:flex;align-items:center;gap:10px;font-size:13px}
.dist-ans{flex:0 0 auto;min-width:42px;font-weight:700}
.dist-bar{flex:1 1 auto;height:8px;border-radius:4px;background:rgba(128,128,150,.18);overflow:hidden}
.dist-bar i{display:block;height:100%;background:rgba(70,130,220,.75)}
.dist-num{flex:0 0 auto;font-size:12px;opacity:.7;min-width:120px;text-align:right}
.dist-note{font-size:12.5px;opacity:.85;margin:8px 0 0}
.dist-warn{color:#c0392b}
.dist-link{margin:6px 0 0;font-size:12.5px}

/* 세션 결과 리포트 */
.result-grid{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0}
.result-ch{flex:1 1 150px;padding:14px;border-radius:12px;background:var(--card,rgba(128,128,150,.08))}
.result-ch b{display:block;font-size:13px;margin-bottom:6px}
.result-ch .rc-bar{height:8px;border-radius:4px;background:rgba(128,128,150,.2);overflow:hidden;margin:6px 0}
.result-ch .rc-bar i{display:block;height:100%;background:rgba(70,150,90,.8)}
.result-ch .rc-num{font-size:12px;opacity:.75}
.result-ch.low .rc-bar i{background:rgba(210,80,70,.85)}
.result-wrong{margin:16px 0}
.result-wrong h3{font-size:15px;margin:0 0 10px}
.rw-list{display:flex;flex-direction:column;gap:6px}
.rw-item{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:10px;background:rgba(210,80,70,.10);cursor:pointer;text-align:left;width:100%}
.rw-item:hover{background:rgba(210,80,70,.2)}
.rw-no{font-weight:700;min-width:44px;opacity:.75}
.rw-txt{flex:1;min-width:0;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rw-topic{font-size:12px;opacity:.65;flex:0 0 auto}
.rw-empty{opacity:.7;font-size:14px}
.answer-missing{border:1px dashed rgba(200,140,60,.55);background:rgba(255,190,90,.09)}
.answer-text{margin:10px 0 0;padding:12px 14px;border-radius:10px;background:rgba(70,150,90,.12);font-size:14px;line-height:1.7;font-weight:600}

/* 오답 신고 */
.report-bar{display:flex;align-items:center;gap:10px;margin:10px 0 0}
.report-btn{background:transparent;border:1px dashed rgba(200,80,60,.5);color:#c0392b;border-radius:8px;padding:6px 12px;font-size:13px;cursor:pointer}
.report-btn:hover{background:rgba(200,80,60,.1)}
.report-state{font-size:12px;opacity:.7}
.report-modal{position:fixed;inset:0;z-index:80;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.5);padding:20px}
.report-modal.hidden{display:none}
.report-card{width:100%;max-width:520px;max-height:88vh;overflow:auto;padding:26px;border-radius:16px;background:var(--card,#fff);box-shadow:0 18px 50px rgba(0,0,0,.3)}
.report-card h2{margin:0 0 8px;font-size:19px}
.report-q{font-size:13px;opacity:.75;margin:0 0 16px}
.report-card label{display:block;font-size:13px;margin:12px 0 4px}
.report-card select,.report-card textarea{width:100%;padding:10px 12px;border-radius:9px;font-size:14px;font-family:inherit}
.report-hint{font-size:12px;opacity:.65;margin:10px 0 0;line-height:1.6}
.report-actions{display:flex;gap:10px;margin-top:18px}
.report-actions button{flex:1}
.report-msg{font-size:13px;margin:10px 0 0;min-height:18px}
.report-msg.ok{color:#2c8a4a}.report-msg.bad{color:#c0392b}
.report-count{margin:8px 0 0;font-size:12.5px}
.linklike{background:none;border:none;padding:0;color:inherit;opacity:.8;text-decoration:underline;cursor:pointer;font-size:12.5px}
.linklike:hover{opacity:1}
.choice-boxes{display:flex;flex-direction:column;gap:12px;margin:10px 0}
.choice-box{display:flex;flex-direction:column;gap:6px}
.choice-box strong{font-size:13px}
.choice-box select{width:100%;padding:10px 12px;border-radius:9px;font-size:14px}
.choice-result{margin:10px 0 0;padding-left:18px;font-size:13px;line-height:1.7}
.choice-result li.ok{color:#2c8a4a}
.choice-result li.bad{color:#c0392b}
.pos-boxes{display:flex;flex-direction:column;gap:12px;margin:10px 0}
.pos-box strong{display:block;font-size:13px;margin-bottom:6px}
.pos-row{display:flex;gap:8px;flex-wrap:wrap}
.pos-btn{width:42px;height:42px;padding:0;border-radius:10px;font-size:15px;font-weight:600;cursor:pointer}
.pos-btn.selected{background:var(--accent,#2f6fd0);color:#fff;border-color:transparent}
.status-badge.verify{background:rgba(70,130,220,.16);color:#2f6fd0}
.report-fixed{margin:8px 0 0;padding:8px 12px;border-radius:8px;background:rgba(70,150,90,.14);font-size:13px}
.linklike.danger{color:#c0392b;margin-left:10px}
.status-badge.confirmed{background:rgba(70,150,90,.18);color:#2c8a4a}
