/* ============================================================
   ICSE/ISC PCB Prep — design system
   Light, calm, high-contrast, mobile-first; sidebar ≥ 960px.
   ============================================================ */
:root {
  --bg: #f4f6fa;
  --bg-soft: #eef2f8;
  --surface: #ffffff;
  --surface-2: #fbfcfe;
  --ink: #0e1726;
  --ink-2: #35415a;
  --muted: #6b7794;
  --line: #e4e9f2;
  --line-strong: #d3dbe9;
  --brand: #0f6b5f;
  --brand-600: #0d7d6e;
  --brand-50: #eaf6f3;
  --indigo: #4f46e5;
  --indigo-50: #eef0ff;
  --amber: #b45309;
  --amber-50: #fdf4e7;
  --danger: #b42318;
  --danger-50: #fef1ef;
  --ok: #067647;
  --ok-50: #e9f7ef;
  --bio: #059669;
  --chem: #d97706;
  --phy: #2563eb;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px -18px rgba(15, 23, 42, .28);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, .05), 0 24px 60px -24px rgba(15, 23, 42, .3);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 12% -8%, #e9f3f1 0%, transparent 60%),
              radial-gradient(900px 500px at 100% 0%, #eef0ff 0%, transparent 55%),
              var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.22; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: 26px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 2px; border-radius: 6px; }

/* ---------- layout ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  display: none;
  width: 252px;
  flex: 0 0 252px;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  height: 100vh;
  flex-direction: column;
  gap: 8px;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 18px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px; flex: 0 0 38px;
  background: linear-gradient(150deg, #0f6b5f, #0b8f7a 55%, #22b39a);
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 16px -8px rgba(15, 107, 95, .8);
}
.brand-mark svg { width: 21px; height: 21px; }
.brand-name { font-weight: 750; font-size: 15px; letter-spacing: -0.01em; }
.brand-sub { font-size: 11.5px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }

.nav { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 11px; border: 0; background: transparent;
  color: var(--ink-2); font-weight: 550; font-size: 14px; text-align: left; width: 100%;
  transition: background .15s ease, color .15s ease;
}
.nav-item svg { width: 18px; height: 18px; opacity: .8; flex: 0 0 18px; }
.nav-item:hover { background: var(--bg-soft); color: var(--ink); }
.nav-item.active { background: var(--brand-50); color: var(--brand); }
.nav-item.active svg { opacity: 1; }
.nav-badge {
  margin-left: auto; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 99px; display: grid; place-items: center; padding: 0 5px;
}
.side-foot { margin-top: auto; padding: 14px 10px 4px; border-top: 1px solid var(--line); }
.side-foot .who { font-size: 13px; font-weight: 600; }
.side-foot .pin { font-size: 11.5px; color: var(--muted); }

.main { flex: 1; min-width: 0; padding: 18px 16px 96px; }
.wrap { max-width: 1080px; margin: 0 auto; }

.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.topbar .brand-mark { width: 34px; height: 34px; flex-basis: 34px; border-radius: 10px; }
.topbar-title { font-weight: 700; font-size: 15px; }
.topbar-sub { font-size: 11.5px; color: var(--muted); }
.topbar-spacer { flex: 1; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--indigo-50); color: var(--indigo);
  display: grid; place-items: center; font-weight: 700; font-size: 13px; border: 1px solid #dfe3ff;
}

.page-head { margin-bottom: 18px; }
.page-head .eyebrow {
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--brand);
  font-weight: 700; margin-bottom: 6px;
}
.page-head p { color: var(--muted); margin-top: 6px; max-width: 68ch; }

/* ---------- mobile bottom nav ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; justify-content: space-around; align-items: stretch;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tab {
  border: 0; background: none; color: var(--muted); font-size: 10.5px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 10px;
  border-radius: 10px; position: relative; flex: 1; max-width: 88px;
}
.tab svg { width: 21px; height: 21px; }
.tab.active { color: var(--brand); }
.tab .nav-badge { position: absolute; top: 2px; right: 12px; }

/* ---------- cards & grids ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.card.pad-0 { padding: 0; overflow: hidden; }
.card-tight { padding: 14px; }
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: 1fr; }
.grid.cols-3 { grid-template-columns: 1fr; }
.grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.mono { font-family: var(--mono); }
.center { text-align: center; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 14px; } .mt-4 { margin-top: 20px; }
.hidden { display: none !important; }

/* ---------- hero / today card ---------- */
.hero {
  border-radius: 22px; padding: 22px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0b4f46 0%, #0f6b5f 45%, #10836f 100%);
  box-shadow: var(--shadow-lg);
}
.hero::after {
  content: ""; position: absolute; inset: auto -60px -90px auto; width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 62%); border-radius: 50%;
}
.hero .eyebrow { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .8; font-weight: 700; }
.hero h1 { font-size: 24px; margin: 8px 0 6px; }
.hero p { opacity: .9; font-size: 13.5px; }
.hero-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero .btn { background: #fff; color: #0b4f46; border-color: transparent; font-weight: 700; }
.hero .btn:hover { background: #eef7f5; }
.hero .btn.ghost-light { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.32); }
.hero .btn.ghost-light:hover { background: rgba(255,255,255,.2); }

.subject-strip { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.pill-dark { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); color: #fff; }

/* ---------- stat tiles ---------- */
.stat { padding: 15px 16px; }
.stat .label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 650; }
.stat .value { font-size: 26px; font-weight: 750; letter-spacing: -0.03em; margin-top: 4px; }
.stat .value small { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.stat .delta { font-size: 12px; margin-top: 2px; color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  padding: 10px 16px; border-radius: 11px; font-weight: 600; font-size: 14px;
  transition: transform .06s ease, background .15s ease, border-color .15s ease, box-shadow .15s;
  min-height: 42px; text-align: center;
}
.btn svg { width: 17px; height: 17px; }
.btn:hover { background: var(--surface-2); border-color: var(--line-strong); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 8px 18px -10px rgba(15,107,95,.9); }
.btn.primary:hover { background: var(--brand-600); }
.btn.indigo { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.btn.ghost { background: transparent; }
.btn.soft { background: var(--brand-50); border-color: #d4ebe6; color: var(--brand); }
.btn.danger { background: var(--danger-50); border-color: #f7d5d0; color: var(--danger); }
.btn.sm { min-height: 34px; padding: 6px 12px; font-size: 12.5px; border-radius: 9px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px;
  font-size: 11.5px; font-weight: 650; background: var(--bg-soft); color: var(--ink-2);
  border: 1px solid transparent; white-space: nowrap;
}
.chip.bio { background: #e7f7f1; color: #046c52; }
.chip.chem { background: #fdf1e2; color: #9a4d05; }
.chip.phy { background: #e9efff; color: #1d4ed8; }
.chip.ok { background: var(--ok-50); color: var(--ok); }
.chip.warn { background: var(--amber-50); color: var(--amber); }
.chip.bad { background: var(--danger-50); color: var(--danger); }
.chip.info { background: var(--indigo-50); color: #3730a3; }
.chip.grey { background: #f1f4f9; color: var(--muted); }
.chip.outline { background: transparent; border-color: var(--line-strong); color: var(--muted); }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 8px; }
.dot.bio { background: var(--bio); } .dot.chem { background: var(--chem); } .dot.phy { background: var(--phy); }

/* ---------- progress ---------- */
.bar { height: 8px; border-radius: 99px; background: #edf1f7; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 99px; background: var(--brand); transition: width .5s ease; }
.bar.bio > span { background: var(--bio); } .bar.chem > span { background: var(--chem); } .bar.phy > span { background: var(--phy); }
.bar.thin { height: 6px; }
.bar.thick { height: 10px; }

.ring { position: relative; display: grid; place-items: center; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-label { position: absolute; text-align: center; }
.ring .ring-label b { font-size: 24px; display: block; letter-spacing: -0.03em; }
.ring .ring-label span { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- lists ---------- */
.list { display: flex; flex-direction: column; }
.list-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 4px;
  border-bottom: 1px solid var(--line); min-width: 0;
}
.list-row:last-child { border-bottom: 0; }
.list-row .grow { min-width: 0; flex: 1; }
.list-row .title { font-weight: 600; font-size: 13.5px; }
.list-row .sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }

/* ---------- section headers ---------- */
.sec-head { display: flex; align-items: baseline; gap: 10px; margin: 22px 0 10px; }
.sec-head h2 { font-size: 16.5px; }
.sec-head .spacer { flex: 1; }
.sec-head a, .sec-head button { font-size: 12.5px; font-weight: 650; background: none; border: 0; color: var(--brand); }

/* ---------- exam runner ---------- */
.exam-shell { max-width: 900px; margin: 0 auto; }
.exam-top {
  position: sticky; top: 0; z-index: 30; margin: 0 -16px 16px; padding: 10px 16px;
  background: rgba(244, 246, 250, .92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.exam-top .title { font-weight: 700; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exam-top .sub { font-size: 11.5px; color: var(--muted); }
.timer {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-weight: 700;
  font-size: 13.5px; padding: 6px 10px; border-radius: 9px; background: #fff; border: 1px solid var(--line-strong);
  flex: 0 0 auto;
}
.timer.warn { color: var(--danger); background: var(--danger-50); border-color: #f4cdc7; }
.timer svg { width: 15px; height: 15px; }

.exam-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.exam-progress .bar { flex: 1; }

.q-card { padding: 18px; }
.q-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.q-num {
  width: 30px; height: 30px; border-radius: 9px; background: var(--brand-50); color: var(--brand);
  display: grid; place-items: center; font-weight: 750; font-size: 13px; flex: 0 0 30px;
}
.q-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.q-prompt { font-size: 14.5px; font-weight: 550; line-height: 1.6; white-space: pre-wrap; }
.q-body { margin-top: 14px; }

.opt {
  display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; border-radius: 11px;
  border: 1px solid var(--line-strong); background: #fff; margin-bottom: 8px; width: 100%;
  text-align: left; font-size: 13.5px; line-height: 1.5; transition: all .12s ease;
}
.opt:hover { border-color: #b9c5d8; background: var(--surface-2); }
.opt .key {
  width: 22px; height: 22px; border-radius: 7px; background: var(--bg-soft); color: var(--ink-2);
  display: grid; place-items: center; font-weight: 700; font-size: 11.5px; flex: 0 0 22px;
}
.opt.sel { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 3px rgba(15,107,95,.08); }
.opt.sel .key { background: var(--brand); color: #fff; }

.uploader { display: grid; gap: 8px; }
.upload-zone {
  border: 1.5px dashed var(--line-strong); border-radius: 13px; padding: 14px;
  background: var(--surface-2); text-align: center;
}
.upload-zone .row { justify-content: center; flex-wrap: wrap; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.thumb { position: relative; width: 76px; height: 96px; border-radius: 9px; overflow: hidden; border: 1px solid var(--line-strong); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button {
  position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(14, 23, 38, .68); color: #fff; border: 0; font-size: 12px; line-height: 1; display: grid; place-items: center;
}

textarea, input[type=text], input[type=password], input[type=time], select {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 11px; padding: 11px 13px;
  font-family: inherit; font-size: 14px; color: var(--ink); background: #fff; resize: vertical;
  min-height: 44px;
}
textarea { min-height: 92px; line-height: 1.55; }
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15,107,95,.1); }
label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 12.5px; font-weight: 650; color: var(--ink-2); margin-bottom: 6px; }

.note {
  display: flex; gap: 9px; padding: 11px 13px; border-radius: 11px; font-size: 12.5px;
  background: var(--indigo-50); color: #3730a3; line-height: 1.5;
}
.note svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 1px; }
.note.warn { background: var(--amber-50); color: #8a4b09; }
.note.ok { background: var(--ok-50); color: #05603a; }
.note.bad { background: var(--danger-50); color: #912018; }

/* ---------- result ---------- */
.score-hero { display: grid; gap: 18px; align-items: center; }
.score-hero .big { font-size: 40px; font-weight: 780; letter-spacing: -0.04em; line-height: 1; }
.score-hero .big small { font-size: 15px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.review { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.review + .review { margin-top: 10px; }
.review > summary { list-style: none; }
.review > summary::-webkit-details-marker { display: none; }
.review-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; background: var(--surface-2); }
.review-head .grow { flex: 1; min-width: 0; }
.review-body { padding: 14px; border-top: 1px solid var(--line); font-size: 13.5px; }
.kv { display: flex; gap: 8px; font-size: 12.5px; margin-bottom: 6px; }
.kv b { flex: 0 0 auto; color: var(--ink-2); }
.answer-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; margin: 8px 0; white-space: pre-wrap; }
.scheme { display: flex; flex-direction: column; gap: 7px; margin-top: 8px; }
.scheme-item { display: flex; gap: 9px; align-items: flex-start; padding: 8px 10px; border-radius: 9px; background: #f8fafd; border: 1px solid var(--line); font-size: 12.5px; }
.scheme-item.met { background: var(--ok-50); border-color: #cdeadd; }
.scheme-item .mark { width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex: 0 0 17px; display: grid; place-items: center; font-size: 10px; margin-top: 1px; }
.scheme-item.met .mark { background: var(--ok); border-color: var(--ok); color: #fff; }
.scheme-item .pts { margin-left: auto; font-weight: 700; font-size: 11.5px; color: var(--muted); flex: 0 0 auto; }
.scheme-item input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--brand); margin-top: 1px; }

/* ---------- weakness ---------- */
.weak-card { padding: 15px 16px; }
.weak-card.critical { border-left: 3px solid var(--danger); }
.weak-card.high { border-left: 3px solid #e8590c; }
.weak-card.watch { border-left: 3px solid #d9a300; }
.spark { display: flex; gap: 3px; align-items: flex-end; height: 26px; }
.spark i { width: 7px; border-radius: 2px; background: var(--line-strong); display: block; min-height: 3px; }
.spark i.bad { background: #e08b8b; } .spark i.mid { background: #e3c07a; } .spark i.good { background: #7fbe9f; }

/* ---------- schedule ---------- */
.week-label { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 700; margin: 20px 0 8px; }
.day-row {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto;
  align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line);
  background: #fff; min-width: 0;
}
.day-row:last-child { border-bottom: 0; }
.day-date { text-align: center; }
.day-date b { display: block; font-size: 15px; line-height: 1.1; }
.day-date span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.day-body { min-width: 0; }
.day-title { display: flex; align-items: center; gap: 7px; font-weight: 650; font-size: 13.5px; line-height: 1.3; }
.day-title span:last-child { min-width: 0; overflow-wrap: anywhere; }
.day-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.day-meta .chip { font-size: 10.5px; padding: 1px 7px; }
.day-status, .day-action { justify-self: end; }
.day-row.focus { background: var(--brand-50); }
.day-row.missed { background: #fffaf9; }
.seg { display: inline-flex; background: #eef1f7; border-radius: 10px; padding: 3px; gap: 2px; }
.seg button {
  border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted);
}
.seg button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15,23,42,.12); }

/* ---------- focus map ---------- */
.topic-row { padding: 11px 14px; border-bottom: 1px solid var(--line); }
.topic-row:last-child { border-bottom: 0; }
.year-chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.year-chips span { font-family: var(--mono); font-size: 10.5px; background: #f1f4f9; color: var(--muted); padding: 1px 6px; border-radius: 5px; }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 22px; }
.auth-card { width: 100%; max-width: 430px; }
.auth-card .brand { justify-content: center; padding-bottom: 8px; }
.auth-lead { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.tabs { display: flex; background: #eef1f7; padding: 4px; border-radius: 12px; margin-bottom: 16px; }
.tabs button { flex: 1; border: 0; background: none; padding: 9px; border-radius: 9px; font-weight: 650; font-size: 13px; color: var(--muted); }
.tabs button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15,23,42,.1); }

/* ---------- toast / modal ---------- */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 88px; z-index: 90; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); }
.toast {
  background: #101827; color: #fff; padding: 11px 14px; border-radius: 12px; font-size: 13px;
  box-shadow: var(--shadow-lg); animation: rise .22s ease;
}
.toast.ok { background: #04543f; } .toast.bad { background: #7a1c12; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.modal-back { position: fixed; inset: 0; background: rgba(9, 16, 28, .5); z-index: 80; display: grid; place-items: center; padding: 18px; }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 430px; padding: 22px; box-shadow: var(--shadow-lg); }
.modal h3 { margin-bottom: 6px; }
.modal .actions { display: flex; gap: 8px; margin-top: 18px; }
.modal .actions .btn { flex: 1; }

.footer-note { text-align: center; color: var(--muted); font-size: 11.5px; margin: 26px 0 6px; line-height: 1.6; }

/* ---------- misc ---------- */
.empty { text-align: center; padding: 28px 14px; color: var(--muted); font-size: 13px; }
.empty svg { width: 34px; height: 34px; opacity: .35; margin-bottom: 8px; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.skeleton { background: linear-gradient(90deg, #eef1f7 25%, #f7f9fc 50%, #eef1f7 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 520px) {
  .day-row { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; padding: 11px 12px; }
  .day-status { display: none; }
  .exam-top { gap: 7px; }
  .exam-top .sub { font-size: 11px; }
  .exam-top .btn.sm { padding: 7px 11px; }
  .exam-top .title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}

@media (min-width: 720px) {
  .grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .score-hero { grid-template-columns: auto 1fr; gap: 26px; }
  .main { padding: 26px 28px 60px; }
  .exam-top { margin: 0 0 18px; border-radius: 14px; border: 1px solid var(--line); padding: 10px 14px; }
  h1 { font-size: 30px; }
}

@media (min-width: 960px) {
  .sidebar { display: flex; }
  .tabbar { display: none; }
  .main { padding-bottom: 48px; }
  .toasts { bottom: 24px; }
  .topbar { display: none; }
}
@media print {
  .sidebar, .tabbar, .exam-top, .btn { display: none !important; }
}
