:root { --bg:#f5f6f8; --fg:#1b1f24; --card:#fff; --line:#d5d9df; --accent:#2457c5; --bad:#b3261e; --ok:#1b7a3d; }
@media (prefers-color-scheme: dark) { :root { --bg:#15181c; --fg:#e6e8eb; --card:#1f2429; --line:#363c44; --accent:#7ba3ff; --bad:#ff8b84; --ok:#6fd08c; } }
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--fg); font:16px/1.5 system-ui, sans-serif; }
main { max-width: 900px; margin: 0 auto; padding: 16px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:8px; padding:20px; margin:16px auto; max-width:480px; }
.card.wide { max-width:none; }
label { display:block; margin:12px 0 4px; font-weight:600; }
.row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin:8px 0; }
.row label { margin:0; display:inline-flex; gap:4px; font-weight:400; }
input[type=text], input:not([type]), input[type=password], input[type=number], input[type=datetime-local], select, textarea {
  width:100%; padding:8px; border:1px solid var(--line); border-radius:6px; background:var(--bg); color:inherit; font:inherit; }
.row input:not([type=checkbox]) { width:auto; flex:1; min-width:120px; }
button, a.btn, label.btn { padding:8px 14px; border:1px solid var(--accent); background:var(--accent); color:#fff; border-radius:6px; cursor:pointer; font:inherit; text-decoration:none; }
button:disabled { opacity:.4; cursor:default; }
button.danger { background:var(--bad); border-color:var(--bad); }
.bar { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; padding:8px 0; border-bottom:1px solid var(--line); }
.timer { font-size:1.6rem; font-variant-numeric:tabular-nums; font-weight:700; }
.timer.low { color:var(--bad); }
.error { color:var(--bad); min-height:1.5em; }
.hint { color:#6b7480; font-size:.9rem; }
.code { font:700 1.8rem monospace; letter-spacing:.1em; text-align:center; padding:12px; border:2px dashed var(--accent); }
.code-inline { font-family:monospace; font-weight:700; }
.question { background:var(--card); border:1px solid var(--line); border-radius:8px; padding:20px; margin:16px 0; }
.qtext { white-space:pre-wrap; margin:8px 0; }
.option { display:flex; gap:10px; align-items:flex-start; padding:10px; border:1px solid var(--line); border-radius:6px; margin:8px 0; cursor:pointer; font-weight:400; }
.actions { display:flex; gap:8px; flex-wrap:wrap; }
.nav { display:flex; gap:6px; flex-wrap:wrap; margin-top:16px; }
.dot { padding:6px 10px; background:var(--card); color:var(--fg); border-color:var(--line); }
.dot.done { border-color:var(--ok); }
.dot.current { background:var(--accent); color:#fff; }
.item { border:1px solid var(--line); border-radius:6px; padding:12px; margin:10px 0; }
.tag { background:var(--line); border-radius:4px; padding:2px 6px; font-size:.8rem; }
.correct { color:var(--ok); } .picked { font-weight:700; }
.answer { white-space:pre-wrap; background:var(--bg); padding:8px; border-radius:6px; }
table { width:100%; border-collapse:collapse; font-size:.9rem; }
th, td { border-bottom:1px solid var(--line); padding:6px; text-align:left; }
tr.expired td { color:var(--bad); } tr.submitted td { color:var(--ok); }
body.admin main { max-width:1200px; }
/* Anti-copy while taking the exam (deterrent only) */
body.exam { -webkit-user-select:none; user-select:none; }
body.exam input, body.exam textarea { -webkit-user-select:text; user-select:text; }
@media print { body.exam main { display:none; } }
[hidden] { display: none !important; }
.screens { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:10px; }
.tile { border:1px solid var(--line); border-radius:6px; overflow:hidden; cursor:pointer; background:#000; }
.tile img { display:block; width:100%; min-height:120px; object-fit:contain; }
.tile .cap { background:var(--card); padding:4px 8px; font-size:.8rem; }
.tile.stale { opacity:.5; outline:2px solid var(--bad); }
.tile.big { grid-column:1 / -1; }
.tile .feeds { display:flex; align-items:flex-start; background:#000; }
.tile .screenimg { flex:1; min-width:0; }
.tile .camimg { width:30%; min-height:0; align-self:flex-start; border-left:1px solid var(--line); }
.tile .feeds img:only-child { width:100%; }
.rules ol { padding-left:1.4rem; } .rules li { margin:8px 0; }
.custom-rules { border-left:4px solid var(--accent); padding:4px 12px; margin:12px 0; }
