/* 문제은행 공통 스타일.
   방향: 업무용 도구. 얇은 선·촘촘한 글자·둥글기 최소·그림자 없음. 색은 잉크(검정 계열) + 강조색 하나(짙은 초록)만. */
:root {
  --bg: #f3f3f1; --card: #ffffff; --ink: #1b1f1d; --ink-2: #3d4440; --muted: #737a76; --line: #dcdedb; --line-2: #ebecea;
  --accent: #1f5c45; --accent-soft: #e8efeb; --bad: #b3261e; --hover: #f7f7f5;
  --r: 3px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141615; --card: #1c1f1d; --ink: #e9ebe9; --ink-2: #c7cbc8; --muted: #8e9591; --line: #333835; --line-2: #262a28;
    --accent: #6cc39c; --accent-soft: #1d2c25; --bad: #f08a80; --hover: #222624;
  }
}
:root[data-theme="dark"] {
  --bg: #141615; --card: #1c1f1d; --ink: #e9ebe9; --ink-2: #c7cbc8; --muted: #8e9591; --line: #333835; --line-2: #262a28;
  --accent: #6cc39c; --accent-soft: #1d2c25; --bad: #f08a80; --hover: #222624;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: 'Pretendard', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
       font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; font-feature-settings: 'tnum'; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }

/* 머리줄 */
.top { position: sticky; top: 0; z-index: 20; height: 48px; background: var(--card); border-bottom: 1px solid var(--line);
       display: flex; align-items: stretch; gap: 28px; padding: 0 20px; }
.top .logo { display: flex; align-items: center; font-weight: 700; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; text-decoration: none; }
.top nav { display: flex; gap: 20px; overflow-x: auto; scrollbar-width: none; }
.top nav a { display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--muted); font-size: 14px; white-space: nowrap;
             border-bottom: 2px solid transparent; margin-bottom: -1px; }
.top nav a:hover { color: var(--ink); }
.top nav a.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.top nav a.off { pointer-events: none; color: var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .top nav a.off { color: #4a504c; } }
.top .logout { display: flex; align-items: center; font-size: 13px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.top .logout:hover { color: var(--ink); }
.top nav .cnt { font-size: 12px; font-weight: 600; color: var(--card); background: var(--accent); border-radius: 2px; padding: 0 5px; line-height: 17px; }
.top nav .cnt:empty { display: none; }

.syncwarn { background: #fdf3e7; color: #7a4a10; border-bottom: 1px solid #efd9b8; padding: 7px 20px; font-size: 13px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .syncwarn { background: #3a2c17; color: #f0cf9c; border-color: #5a4425; } }

/* 단추 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 11px; border: 1px solid var(--line);
       border-radius: var(--r); background: var(--card); color: var(--ink); font-size: 13px; cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--hover); border-color: #c8cbc7; }
.btn:disabled { opacity: .4; cursor: default; background: var(--card); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--card); font-weight: 600; }
.btn.primary:hover { opacity: .88; }
.btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.btn.ghost { border-color: transparent; background: none; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); background: var(--hover); }

/* 난이도: 숫자 + 7칸 막대(색으로 꾸미지 않고 채움으로만) */
.lv { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.lv i { display: inline-flex; gap: 2px; }
.lv i b { width: 4px; height: 10px; background: var(--line); }
.lv i b.f { background: var(--ink-2); }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--card); padding: 8px 14px;
         border-radius: var(--r); font-size: 13px; opacity: 0; transition: opacity .15s; pointer-events: none; z-index: 50; }
.toast.show { opacity: 1; }
