:root { color-scheme: light; }
* { box-sizing: border-box; }
body { margin:0; font-family:-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; background:#f5f6f8; color:#1d2433; line-height:1.5; }
.wrap { max-width:820px; margin:0 auto; padding:24px 18px 90px; }
header { text-align:center; margin-bottom:14px; }
h1 { font-size:1.5rem; margin:0 0 4px; color:#0f2a52; }
.subtitle { color:#5a6478; font-size:0.92rem; margin:0; }
.card { background:#fff; border:1px solid #e3e7ee; border-radius:14px; padding:20px; margin-bottom:16px; box-shadow:0 1px 2px rgba(20,40,80,.04); }
.card h2 { font-size:1.05rem; margin:0 0 14px; color:#0f2a52; }
.label { font-size:0.82rem; font-weight:700; color:#5a6478; text-transform:uppercase; letter-spacing:.03em; margin:0 0 8px; }
.field-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.field label { display:block; font-size:0.82rem; font-weight:700; color:#5a6478; margin-bottom:5px; }
.field input { width:100%; padding:11px 12px; border:1.5px solid #d3dbe8; border-radius:9px; font-size:0.95rem; }
.field input:focus { outline:none; border-color:#2f6fd6; box-shadow:0 0 0 2px #eef5ff; }
.choices { display:grid; gap:10px; }
.day-grid { grid-template-columns:1fr; }
.qty-grid { grid-template-columns:repeat(3,1fr); }
.choice { display:flex; align-items:center; gap:10px; padding:12px 14px; border:2px solid #e3e7ee; border-radius:10px; cursor:pointer; transition:all .15s; background:#fff; font-size:0.95rem; text-align:left; }
.choice:hover { border-color:#b9cdf0; background:#f7faff; }
.choice.sel { border-color:#2f6fd6; background:#eef5ff; box-shadow:0 0 0 1px #2f6fd6 inset; }
.choice .big { font-size:1.3rem; font-weight:800; color:#2f6fd6; }
.choice .day-t { display:flex; flex-direction:column; }
.choice .day-t b { color:#0f2a52; }
.choice .day-t span { font-size:0.78rem; color:#5a6478; }
.qty-grid .choice { justify-content:center; flex-direction:column; gap:2px; padding:16px 8px; }
.qty-grid .small { font-size:0.72rem; color:#5a6478; }
.start-btn { display:block; width:100%; margin-top:6px; padding:15px; background:#2f6fd6; color:#fff; border:none; border-radius:12px; font-size:1.05rem; font-weight:700; cursor:pointer; transition:background .15s; }
.start-btn:hover { background:#2559b3; }
.start-btn:disabled { background:#9bb4dd; cursor:not-allowed; }
.hist-empty { color:#8a93a6; font-size:0.9rem; }
table.hist { width:100%; border-collapse:collapse; font-size:0.88rem; }
table.hist th, table.hist td { text-align:left; padding:8px 10px; border-bottom:1px solid #eef1f6; }
table.hist th { color:#5a6478; font-weight:700; font-size:0.78rem; text-transform:uppercase; }
table.hist td.sc { font-weight:700; }
.hist-actions { display:flex; gap:10px; margin-top:12px; flex-wrap:wrap; }
.mini-btn { padding:8px 14px; background:#eef2f8; color:#1d2433; border:1.5px solid #d3dbe8; border-radius:8px; font-weight:600; cursor:pointer; font-size:0.85rem; text-decoration:none; display:inline-block; }
.mini-btn:hover { background:#e1e8f3; }
.mini-btn.danger { color:#b3322d; border-color:#f0cdcb; background:#fdeeed; }
.progress-bar { position:sticky; top:0; z-index:10; background:#f5f6f8; padding:12px 0 10px; }
.bar-top { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.bar-top .quiz-title { font-weight:700; color:#0f2a52; font-size:0.95rem; }
.bar-track { height:8px; background:#e1e5ec; border-radius:99px; overflow:hidden; }
.bar-fill { height:100%; width:0; background:#2f6fd6; border-radius:99px; transition:width .3s ease; }
.bar-label { font-size:0.8rem; color:#5a6478; margin-top:6px; text-align:center; }
.q { background:#fff; border:1px solid #e3e7ee; border-radius:12px; padding:16px 18px; margin-bottom:14px; box-shadow:0 1px 2px rgba(20,40,80,.04); }
.q-head { font-weight:600; margin-bottom:12px; display:flex; gap:8px; }
.q-num { color:#2f6fd6; font-weight:700; flex-shrink:0; }
.opt { display:flex; align-items:flex-start; gap:10px; padding:9px 11px; margin:6px 0; border:1.5px solid #e3e7ee; border-radius:9px; cursor:pointer; transition:all .15s; }
.opt:hover { border-color:#b9cdf0; background:#f7faff; }
.opt input { margin-top:3px; accent-color:#2f6fd6; }
.opt .letter { font-weight:700; color:#5a6478; flex-shrink:0; }
.opt.correct { border-color:#2ca15a; background:#eafaf0; }
.opt.wrong { border-color:#d6453f; background:#fdeeed; }
.opt.locked { cursor:default; pointer-events:none; }
.mark { margin-left:auto; font-weight:700; flex-shrink:0; }
.mark.ok { color:#2ca15a; } .mark.no { color:#d6453f; }
.justif { margin-top:12px; padding:12px 14px; background:#f3f7fc; border:1px solid #dbe6f5; border-left:4px solid #2f6fd6; border-radius:8px; font-size:0.9rem; }
.justif .lbl { font-weight:700; color:#0f2a52; }
.justif .ans { font-weight:700; color:#2ca15a; }
.justif blockquote { margin:8px 0 0; padding-left:10px; border-left:3px solid #b9cdf0; color:#3a455c; font-style:italic; }
.justif cite { display:block; margin-top:6px; font-size:0.8rem; color:#5a6478; font-style:normal; }
.submit-btn { display:block; width:100%; margin:24px 0 8px; padding:15px; background:#2f6fd6; color:#fff; border:none; border-radius:12px; font-size:1.05rem; font-weight:700; cursor:pointer; }
.submit-btn:hover { background:#2559b3; }
.submit-btn:disabled { background:#9bb4dd; cursor:not-allowed; }
.result { display:none; background:#fff; border:1px solid #e3e7ee; border-radius:14px; padding:26px; text-align:center; margin-bottom:20px; box-shadow:0 2px 10px rgba(20,40,80,.07); }
.result.show { display:block; }
.score-num { font-size:3rem; font-weight:800; margin:6px 0; }
.score-pct { font-size:1.1rem; color:#5a6478; }
.grade-msg { font-size:1.05rem; font-weight:600; margin:10px 0 4px; }
.res-actions { display:flex; gap:10px; justify-content:center; flex-wrap:wrap; margin-top:16px; }
.unanswered-note { color:#d6453f; font-size:0.88rem; margin-top:8px; min-height:1.1em; text-align:center; }
.note-line { color:#d6453f; font-size:0.85rem; margin-top:8px; min-height:1.05em; }
.foot { text-align:center; margin-top:8px; }
.foot a { color:#5a6478; font-size:0.8rem; text-decoration:none; }
.hidden { display:none; }
