/* Hallmark · v2.0.0 · update of an existing app, not a redesign: layout kept, pages added (home with sample question, auth, progress chart, leaderboard), Floor kept · weakest: P, the palette is still the stock blue of a generic dashboard; a tryout brand colour would be the next step */
/* waive: 24b on the 1024px container (max-width kept for the existing layout) · answered: 40 contrast raised on every pill, button and error state; chart line validated with the dataviz palette script in both modes */

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --text: #1d2433;
  --muted: #5d6578;
  --border: #e2e6ef;
  --primary: #1d4bb8;
  --primary-ink: #f8faff;
  --focus: #1d4bb8;
  --ok: #0f5c2b;
  --ok-bg: #e6f6ec;
  --no: #a51f1f;
  --no-bg: #fbe8e8;
  --warn: #7a4a00;
  --warn-bg: #fff4dd;
  --twk: #6b2fb3;
  --tiu: #076275;
  --tkp: #8a4a06;
  --chart-line: #1d4bb8;
  --chart-grid: #e2e6ef;
  --highlight: #eef3ff;
  --backdrop: rgba(15, 20, 32, 0.45);
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 4px 12px rgba(16, 24, 40, 0.04);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1420;
    --surface: #171e2e;
    --text: #e7ebf3;
    --muted: #a7b0c2;
    --border: #2a3347;
    --primary: #7aa2ff;
    --primary-ink: #0b1020;
    --focus: #9dbcff;
    --ok: #7fd9a0;
    --ok-bg: #123622;
    --no: #ff9a9a;
    --no-bg: #3a1717;
    --warn: #ffd27a;
    --warn-bg: #3a2a0c;
    --twk: #c9a6ff;
    --tiu: #7fd3e6;
    --tkp: #ffbf7a;
    --chart-line: #6690f5;
    --chart-grid: #2a3347;
    --highlight: #1d2a47;
    --backdrop: rgba(0, 0, 0, 0.6);
  }
}

:root[data-theme="dark"] {
  --bg: #0f1420;
  --surface: #171e2e;
  --text: #e7ebf3;
  --muted: #a7b0c2;
  --border: #2a3347;
  --primary: #7aa2ff;
  --primary-ink: #0b1020;
  --focus: #9dbcff;
  --ok: #7fd9a0;
  --ok-bg: #123622;
  --no: #ff9a9a;
  --no-bg: #3a1717;
  --warn: #ffd27a;
  --warn-bg: #3a2a0c;
  --twk: #c9a6ff;
  --tiu: #7fd3e6;
  --tkp: #ffbf7a;
  --chart-line: #6690f5;
  --chart-grid: #2a3347;
  --highlight: #1d2a47;
  --backdrop: rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  overflow-x: clip;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  flex-direction: column;
}

main { flex: 1; width: 100%; }
main:focus { outline: none; }

.container {
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
}

h1, h2, h3 {
  line-height: 1.25;
  margin: 0 0 8px;
  text-wrap: balance;
  overflow-wrap: break-word;
  min-width: 0;
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 8px; text-wrap: pretty; }

a { color: var(--primary); }

.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.error-text { color: var(--no); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 20;
}
.skip-link:focus { top: 8px; }

::selection { background: var(--highlight); color: var(--text); }

/* ---------- Focus & motion ---------- */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Header & footer ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}
.brand {
  font-weight: 800;
  font-size: 1.125rem;
  color: var(--text);
  text-decoration: none;
}
.brand span { color: var(--primary); }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav .who {
  color: var(--muted);
  font-size: 0.875rem;
  margin: 0 8px;
  max-width: 16ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu-btn { display: none; }
.nav a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text);
}
.nav a.active { background: var(--bg); font-weight: 700; }
.nav-cta { margin-left: 4px; }

/* Ponsel: header satu baris; navigasi user masuk dibuka lewat tombol Menu. */
@media (max-width: 767px) {
  .header-inner { flex-wrap: nowrap; }
  .menu-btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
  }
  .site-header:not(.is-guest) .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 8px max(16px, env(safe-area-inset-right)) 16px max(16px, env(safe-area-inset-left));
  }
  .site-header:not(.is-guest) .nav.open { display: flex; }
  .site-header:not(.is-guest) .nav a:not(.btn) { padding: 12px; }
  .site-header:not(.is-guest) .nav .who { order: -1; max-width: none; margin: 4px 12px 8px; }
  .site-header:not(.is-guest) .nav .btn { width: 100%; }
  .site-header.is-guest .menu-btn { display: none; }
  .site-header.is-guest .nav { flex-wrap: nowrap; }
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
  padding: 16px 0;
  margin-top: 40px;
}

/* ---------- Basic components ---------- */
.card {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  min-height: 44px;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.ghost { background: transparent; }
.btn.full { width: 100%; margin-top: 12px; }
.btn:not(:disabled):active { transform: translateY(1px); }

/* Efek hover hanya untuk perangkat dengan pointer yang bisa hover (tidak menempel di layar sentuh). */
@media (hover: hover) {
  .nav a:not(.btn):hover { background: var(--bg); }
  .btn:not(:disabled):hover { border-color: var(--primary); }
  .btn.primary:not(:disabled):hover { filter: brightness(0.94); }
  .menu-btn:hover { border-color: var(--primary); }
  .option:hover { border-color: var(--primary); }
  .nav-btn:hover { border-color: var(--primary); }
  input:hover, select:hover { border-color: var(--muted); }
}
.menu-btn:active { transform: translateY(1px); }

input[type="text"], input[type="email"], input[type="password"], select {
  font: inherit;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  width: 100%;
  min-height: 44px;
  caret-color: var(--primary);
}
input:focus-visible, select:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
input:user-invalid { border-color: var(--no); }

label { display: block; font-weight: 600; font-size: 0.875rem; }
label input, label select { margin-top: 8px; font-weight: 400; }
.hint { display: block; font-weight: 400; color: var(--muted); margin-top: 4px; min-height: 1lh; }

.stack { display: flex; flex-direction: column; gap: 16px; }

.pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  background: var(--bg);
  color: var(--text);
  white-space: nowrap;
}
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.no { background: var(--no-bg); color: var(--no); }

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 700;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
}
.badge.TWK { color: var(--twk); }
.badge.TIU { color: var(--tiu); }
.badge.TKP { color: var(--tkp); }

.toast {
  position: fixed;
  bottom: max(24px, calc(env(safe-area-inset-bottom) + 16px));
  left: 50%;
  transform: translate(-50%, 16px);
  background: var(--text);
  color: var(--surface);
  padding: 12px 16px;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: calc(100% - 32px);
  z-index: 100;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--no); color: var(--primary-ink); }

.error { color: var(--no); background: var(--no-bg); border-color: var(--no-bg); }
.error .btn { margin-top: 8px; }

.dialog {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 24px;
  width: min(420px, calc(100% - 32px));
}
.dialog::backdrop { background: var(--backdrop); }
.dialog-text { font-size: 1.0625rem; }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- Page scaffolding ---------- */
.page-loading { margin-top: 24px; }
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0;
}
.page-head > div { min-width: 0; flex: 1 1 320px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.page-foot { margin-top: 24px; }
.section { margin-top: 48px; }
.section-title { margin-top: 32px; }

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
}

/* ---------- Home ---------- */
.hero {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  padding: 32px 0 8px;
}
@media (min-width: 860px) {
  .hero { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; padding-top: 48px; }
}
.hero h1 { font-size: clamp(2rem, 5vw, 2.75rem); line-height: 1.1; }
.lede { font-size: 1.125rem; color: var(--muted); max-width: 40ch; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

.sample .q-text { font-size: 1.125rem; }
.sample form .btn { margin-top: 4px; }
.sample-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.feedback { border-radius: 8px; padding: 12px 16px; margin-top: 16px; background: var(--ok-bg); }
.feedback.is-wrong { background: var(--no-bg); }
.feedback-verdict { font-weight: 700; }
.feedback.is-right .feedback-verdict { color: var(--ok); }
.feedback.is-wrong .feedback-verdict { color: var(--no); }
.option-score { margin-left: auto; }

.subtest-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  margin-top: 16px;
}
.subtest h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.feature-row {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

/* ---------- Auth ---------- */
.auth { max-width: 440px; margin: 40px auto; padding: 24px; }
.auth form { margin-top: 16px; }

/* ---------- Packages ---------- */
.package { display: flex; flex-direction: column; gap: 8px; }
.package .meta {
  list-style: none;
  margin: 4px 0 8px;
  padding: 0;
  display: grid;
  gap: 4px;
  font-size: 0.9375rem;
}
.package .note { font-size: 0.8125rem; color: var(--muted); }
.package-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }

/* ---------- Tryout ---------- */
.tryout-bar {
  position: sticky;
  top: var(--header-h, 56px);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg);
  padding: 12px 0;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.timer {
  font-variant-numeric: tabular-nums;
  font-size: 1.5rem;
  font-weight: 800;
  padding: 4px 16px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.timer.warn { color: var(--no); background: var(--no-bg); border-color: var(--no-bg); }

.tryout-body {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 12px;
}
@media (min-width: 820px) {
  /* 5 tombol x 44px + 4 celah x 8px + padding kartu 32px = 284px */
  .tryout-body { grid-template-columns: minmax(0, 1fr) 296px; align-items: start; }
  .navigator { position: sticky; top: calc(var(--header-h, 56px) + 88px); }
}

.navigator {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.nav-btn {
  font: inherit;
  font-weight: 700;
  font-size: 0.875rem;
  aspect-ratio: 1 / 1;
  min-width: 44px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}
.nav-btn:active { transform: translateY(1px); }
.nav-btn.done { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.nav-btn.current { outline: 2px solid var(--text); outline-offset: 2px; }

.q-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.q-head .pts { margin-left: auto; font-weight: 700; }
.q-text { font-size: 1.0625rem; font-weight: 500; white-space: pre-wrap; }

.options { display: grid; gap: 8px; margin: 16px 0; padding: 0; border: 0; min-width: 0; }
.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 400;
  font-size: 1rem;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.option input { margin-top: 4px; accent-color: var(--primary); }
.option.selected { border-color: var(--primary); background: var(--highlight); }
.option.correct { border-color: var(--ok); background: var(--ok-bg); }
.option.wrong { border-color: var(--no); background: var(--no-bg); }
.option:has(input:disabled) { cursor: default; }
.option .key { font-weight: 800; min-width: 20px; }

.q-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.q-actions .btn { flex: 1; }

/* ---------- Result & review ---------- */
.summary { display: grid; gap: 16px; margin: 16px 0; }
.summary-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.total { font-size: 2.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.total span { font-size: 1rem; color: var(--muted); font-weight: 600; }

.subs { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr)); }
.sub .score { font-size: 1.75rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.sub .score span { font-size: 0.9375rem; color: var(--muted); }
.sub.pass { border-color: var(--ok); }
.sub.fail { border-color: var(--no); }

.review { display: grid; gap: 16px; margin-top: 16px; }
.review-options { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.review-options li {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.9375rem;
}
.review-options li.correct { background: var(--ok-bg); border-color: var(--ok-bg); }
.review-options li.wrong { background: var(--no-bg); border-color: var(--no-bg); }
.review-options li.chosen { background: var(--highlight); border-color: var(--primary); }
.review-options .key { font-weight: 800; margin-right: 4px; }
.explain {
  font-size: 0.9375rem;
  color: var(--muted);
  border-top: 1px dashed var(--border);
  padding-top: 8px;
  margin-top: 8px;
}

/* ---------- Progress ---------- */
.tiles {
  display: grid;
  gap: 12px;
  /* 140px: dua kotak per baris di ponsel, empat di laptop */
  grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr));
  margin-bottom: 16px;
}
.tile-label { color: var(--muted); font-size: 0.875rem; margin: 0; }
.tile-value { font-size: 1.75rem; font-weight: 800; font-variant-numeric: tabular-nums; margin: 4px 0; }

.chart-card { margin-bottom: 16px; }
.chart-box { position: relative; width: 100%; margin-top: 8px; }
.chart { display: block; max-width: 100%; height: auto; font-family: var(--font); }
.chart-grid { stroke: var(--chart-grid); stroke-width: 1; }
.chart-axis { fill: var(--muted); font-size: 12px; }
.chart-line { fill: none; stroke: var(--chart-line); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot { fill: var(--chart-line); stroke: var(--surface); stroke-width: 2; }
.chart-value { fill: var(--text); font-size: 13px; font-weight: 700; }
.chart-cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-hit { fill: transparent; cursor: crosshair; }
.chart-tip {
  position: absolute;
  pointer-events: none;
  display: grid;
  gap: 2px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 8px 12px;
  font-size: 0.875rem;
  white-space: nowrap;
}
.chart-tip[hidden] { display: none; }
.chart-tip span { color: var(--muted); }

.empty { display: grid; gap: 12px; justify-items: start; }

/* ---------- Profile ---------- */
.profile-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 16px;
}
@media (min-width: 900px) {
  .profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
.profile-grid h2, .rank-list { margin-bottom: 12px; }
.rank-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.rank-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.rank-list li:last-child { border-bottom: 0; }
.form-status { color: var(--ok); font-weight: 600; margin: 0; min-height: 1lh; }
.form-status:empty { min-height: 0; }
input[readonly] { background: var(--bg); color: var(--muted); }
.danger-zone { border-color: var(--no); }
.btn.danger { background: var(--no); border-color: var(--no); color: var(--primary-ink); }
@media (hover: hover) {
  .btn.danger:not(:disabled):hover { filter: brightness(0.94); border-color: var(--no); }
}
.nav a.who { text-decoration: none; }

/* ---------- Leaderboard ---------- */
.picker { min-width: 220px; }
.my-rank { margin: 0; }
tr.is-me td { background: var(--highlight); font-weight: 600; }
tr.gap td { text-align: center; color: var(--muted); }
.rank { font-weight: 800; }

/* ---------- Tables ---------- */
/* position: relative menahan elemen absolut (label tersembunyi) di dalam area gulir tabel. */
.table-wrap { position: relative; overflow-x: auto; margin-top: 16px; }
.table-wrap h2 { margin-bottom: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
th, td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { font-size: 0.875rem; font-weight: 600; color: var(--muted); }
th.num, td.num { text-align: right; }

/* Ponsel & iPad potret: tabel jadi baris bertumpuk dengan label, tanpa gulir samping. */
@media (max-width: 899px) {
  table.stack-sm thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  table.stack-sm, table.stack-sm tbody, table.stack-sm tr, table.stack-sm td { display: block; width: 100%; }
  table.stack-sm tr { border-bottom: 1px solid var(--border); padding: 8px 0; }
  table.stack-sm tr:last-child { border-bottom: 0; }
  table.stack-sm td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    border: 0;
    padding: 4px 0;
    white-space: normal;
    text-align: right;
    overflow-wrap: anywhere;
  }
  table.stack-sm td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: left;
    flex: none;
  }
  table.stack-sm td[data-label=""] { justify-content: flex-start; }
  table.stack-sm td[data-label=""]::before { content: none; }
  table.stack-sm tr.is-me { background: var(--highlight); border-radius: 8px; padding: 8px; }
  table.stack-sm tr.is-me td { background: transparent; }
  table.stack-sm tr.gap td { justify-content: center; }
  table.stack-sm tr.gap td::before { content: none; }
}

/* ---------- Mobile ---------- */
@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
  .card { padding: 16px; }
  .timer { font-size: 1.25rem; }
  .q-actions .btn { min-width: 0; font-size: 0.875rem; }
  .nav { width: 100%; }
}
