:root {
  --blue: #1e3a8a; --blue2: #3b82f6; --ink: #1e293b; --muted: #64748b; --line: #e2e8f0;
  --bg: #f1f5f9; --card: #fff; --pick: #dbeafe; --ok: #15803d; --warn: #b45309; --bad: #b91c1c;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
button { font: inherit; cursor: pointer; }
.wrap { max-width: 760px; margin: 0 auto; padding: 16px 16px 120px; }
.hero { background: linear-gradient(120deg, var(--blue), var(--blue2)); color: #fff; border-radius: 16px; padding: 22px 20px; margin-bottom: 18px; }
.hero h1 { margin: 0 0 4px; font-size: 24px; }
.hero p { margin: 0; opacity: .92; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.mock { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 16px; margin-bottom: 10px; }
.mock b { font-size: 17px; }
.chip { font-size: 12px; border-radius: 999px; padding: 3px 10px; white-space: nowrap; background: #e2e8f0; color: var(--muted); }
.chip.go { background: #fef3c7; color: var(--warn); }
.chip.done { background: #dcfce7; color: var(--ok); }
.btn { display: block; width: 100%; border: 0; border-radius: 12px; padding: 15px; font-weight: bold; font-size: 17px; background: var(--blue); color: #fff; }
.btn.ghost { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
.btn:disabled { opacity: .5; }
.muted { color: var(--muted); font-size: 14px; }
/* exam */
.bar { position: sticky; top: 0; z-index: 5; background: rgba(241,245,249,.96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.bar .in { max-width: 760px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.timer { font-weight: bold; font-variant-numeric: tabular-nums; background: var(--blue); color: #fff; border-radius: 8px; padding: 4px 10px; }
.timer.low { background: var(--bad); }
.tabs { display: flex; gap: 6px; overflow-x: auto; max-width: 760px; margin: 0 auto; padding: 0 16px 10px; scrollbar-width: none; }
.tabs button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; white-space: nowrap; color: var(--ink); }
h2.sec { color: var(--blue); margin: 26px 0 4px; font-size: 20px; scroll-margin-top: 110px; }
.ins { color: var(--muted); font-style: italic; font-size: 14px; margin: 0 0 12px; }
.q { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 12px; scroll-margin-top: 110px; }
.q.blank-hl { border-color: var(--warn); box-shadow: 0 0 0 2px #fde68a; }
.stem { font-weight: 600; margin-bottom: 10px; }
.stem .n { color: var(--blue); margin-right: 4px; }
.opt { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 11px 12px; margin-top: 8px; color: var(--ink); }
.opt .l { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid #cbd5e1; display: grid; place-items: center; font-weight: bold; font-size: 13px; color: var(--muted); }
.opt.on { border-color: var(--blue2); background: var(--pick); }
.opt.on .l { background: var(--blue); border-color: var(--blue); color: #fff; }
.passage { background: #fff; border-left: 4px solid var(--blue); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.passage h3 { margin: 0 0 8px; color: var(--blue); font-size: 17px; }
.passage p { margin: 0 0 8px; }
.audio { background: #fff; border: 1px dashed #94a3b8; border-radius: 14px; padding: 14px; margin: 18px 0 12px; }
.audio .t { font-weight: bold; color: #475569; font-size: 14px; margin-bottom: 10px; }
.play { display: flex; align-items: center; gap: 12px; }
.play button { flex: none; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--blue); color: #fff; font-size: 20px; }
.play button:disabled { background: #94a3b8; }
.prog { flex: 1; height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.prog i { display: block; height: 100%; width: 0; background: var(--blue2); }
.foot { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); z-index: 6; }
.foot .in { max-width: 760px; margin: 0 auto; display: flex; gap: 10px; align-items: center; }
.foot .count { flex: none; font-size: 14px; color: var(--muted); }
.modal { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: grid; place-items: center; padding: 16px; z-index: 20; }
.modal .box { background: #fff; border-radius: 16px; padding: 20px; max-width: 420px; width: 100%; }
.modal .box h3 { margin: 0 0 8px; }
.row { display: flex; gap: 10px; margin-top: 16px; }
.big { font-size: 46px; font-weight: 800; color: var(--blue); margin: 6px 0; }
table.s { width: 100%; border-collapse: collapse; margin-top: 10px; }
table.s td { padding: 8px 4px; border-bottom: 1px solid var(--line); }
table.s td:last-child { text-align: right; font-weight: bold; }
input.f { width: 100%; padding: 13px; border: 1px solid #cbd5e1; border-radius: 10px; font: inherit; margin: 6px 0 12px; }
.link { word-break: break-all; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 14px; }

.bar .tr { display: flex; align-items: center; gap: 8px; }
.pausebtn { border: 1px solid var(--line); background: #fff; color: var(--ink, #1e293b); border-radius: 8px; padding: 5px 10px; font: inherit; font-size: 14px; cursor: pointer; }
.modal.pausedbg { background: rgba(15,23,42,.92); }
