:root { --ink:#1f2933; --muted:#6b7280; --line:#d8dde3; --bg:#fafafa; --accent:#1d4ed8; --ok:#15803d; --bad:#b91c1c; }
* { box-sizing: border-box; }
body { margin:0; font:17px/1.55 system-ui, sans-serif; color:var(--ink); background:var(--bg); }
header { display:flex; align-items:center; gap:16px; flex-wrap:wrap; padding:10px 20px; background:#fff; border-bottom:1px solid var(--line); }
h1 { font-size:20px; margin:0; }
h2 { font-size:19px; margin:0 0 8px; }
nav { display:flex; gap:4px; flex:1; }
nav button { border:0; background:none; padding:8px 14px; font:inherit; cursor:pointer; border-bottom:3px solid transparent; }
nav button.active { border-color:var(--accent); font-weight:600; }
main { max-width:820px; margin:0 auto; padding:20px; }
#banner { background:#fff7e0; border-bottom:1px solid #f0d78c; padding:8px 20px; font-size:15px; }
.muted { color:var(--muted); font-size:15px; }
button, select, input { font:inherit; }
button.primary { background:var(--accent); color:#fff; border:0; padding:10px 20px; border-radius:6px; cursor:pointer; margin-top:12px; }
button.primary:disabled { opacity:.5; cursor:default; }
button.link { background:none; border:0; color:var(--accent); cursor:pointer; padding:0; text-decoration:underline; }
.card { background:#fff; border:1px solid var(--line); border-radius:8px; padding:14px 16px; margin:10px 0; }
.card.click { cursor:pointer; }
.card.click:hover { border-color:var(--accent); }
.row { display:flex; gap:20px; flex-wrap:wrap; margin:10px 0; }
input[type=number] { width:70px; padding:4px 6px; }
img.pv { max-width:100%; max-height:320px; margin:10px 0; border:1px solid var(--line); }
.qtext { white-space:pre-line; font-weight:600; }
.qvi { white-space:pre-line; font-style:italic; color:var(--muted); margin:2px 0 8px; }
.opt { display:block; padding:6px 10px; margin:4px 0; border:1px solid var(--line); border-radius:6px; cursor:pointer; }
.opt:hover { background:#f1f5f9; }
.opt.ok { border-color:var(--ok); background:#ecfdf3; }
.opt.bad { border-color:var(--bad); background:#fef2f2; }
.explain { white-space:pre-line; background:#f8fafc; border-left:3px solid var(--accent); padding:8px 12px; margin-top:8px; font-size:16px; }
#timer-bar { position:sticky; top:0; background:#fff; border-bottom:1px solid var(--line); padding:8px 0; display:flex; justify-content:space-between; font-weight:600; z-index:2; }
#timer.low { color:var(--bad); }
.tag { font-size:13px; background:#eef2ff; color:var(--accent); padding:1px 8px; border-radius:10px; }
.score { font-size:22px; font-weight:700; margin:6px 0 14px; }
details { margin-top:8px; }
ol { padding-left:22px; }
.tip { background:#fffbeb; padding:8px 12px; border-radius:6px; }
.err { color:var(--bad); }
.checks label { display:block; margin:4px 0; }
nav button.admin { margin-left:auto; font-size:13px; color:var(--muted); border:1px solid var(--line); border-radius:4px; padding:4px 10px; align-self:center; }
nav button.admin.active { color:var(--ink); border-color:var(--ink); }
h3.cat { font-size:16px; margin:22px 0 4px; padding-bottom:4px; border-bottom:1px solid var(--line); }
.cat-row { margin:14px 0 2px; }
.checks .indent { margin-left:20px; }
button.chip { font:inherit; font-size:14px; padding:3px 12px; border:1px solid var(--line); border-radius:14px; background:#fff; cursor:pointer; }
button.chip.on { border-color:var(--ink); background:var(--ink); color:#fff; }
.levels { align-items:center; gap:8px; }
.levels .hint { flex-basis:100%; font-size:13px; }
.lv { font-size:12px; border:1px solid currentColor; border-radius:10px; padding:0 7px; white-space:nowrap; }
.lv-easy { color:#15803d; }
.lv-medium { color:#b45309; }
.lv-hard { color:#b91c1c; }
.hint-line { font-size:13px; margin:-4px 0 8px; }
.qlv { float:right; margin-left:8px; }
button.admin-link { font:inherit; font-size:13px; color:var(--muted); background:#fff; border:1px solid var(--line); border-radius:4px; padding:4px 10px; cursor:pointer; }
#admin-dlg { border:1px solid var(--line); border-radius:8px; padding:16px; width:min(340px, 92vw); }
#admin-dlg input { width:100%; padding:8px; font:inherit; margin:4px 0 8px; }
