@font-face { font-family: 'Nunito'; src: url(fonts/nunito-latin.woff2) format('woff2'); font-weight: 500 800; font-display: swap; }

/* Colours: blue is the app's colour (not green: Jelajah Ayat; not red/green: they mean Belum hafal / Hafal).
   Each mode has its own accent: Latihan blue, Rumpang amber, Tantangan Waktu violet. */
:root {
  --bg: #F4F7FC; --card: #FFFFFF; --ink: #14213D; --muted: #5B6478; --line: #DCE3EF; --line-soft: #EDF1F7;
  --blue: #2563EB; --blue-dark: #1D4ED8; --blue-soft: #E3ECFD; --blue-ink: #1D4ED8; --on-blue: #FFFFFF;
  --amber: #B45309; --amber-dark: #92400E; --amber-soft: #FFF1D6; --amber-ink: #8A5300; --on-amber: #FFFFFF;
  --violet: #5B34C7; --violet-dark: #4527A0; --violet-soft: #EDE7FD; --violet-ink: #3B1F8F; --on-violet: #FFFFFF;
  --ok: #15803D; --ok-ink: #166534; --ok-soft: #DCFCE7;
  --bad: #C2410C; --bad-ink: #9A3412; --bad-soft: #FFF4EC;
  --gold: #FFD23F; --key-shadow: #D3DBE8;
  --l0: #E9EDF3; --l1: #F08A7E; --l2: #FFD966; --l3: #1F9254;
  --shadow: 0 1px 3px rgba(20, 33, 61, .10);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F172A; --card: #1E293B; --ink: #E5ECF8; --muted: #9AA8BF; --line: #334155; --line-soft: #273449;
    --blue: #60A5FA; --blue-dark: #3B82F6; --blue-soft: #1E3A8A; --blue-ink: #DBE7FF; --on-blue: #0B1530;
    --amber: #F5B451; --amber-dark: #D99A2B; --amber-soft: #3A2A0E; --amber-ink: #F5C46B; --on-amber: #1F1404;
    --violet: #A78BFA; --violet-dark: #8B5CF6; --violet-soft: #2E1F5E; --violet-ink: #DDD3FF; --on-violet: #150B33;
    --ok: #34B86E; --ok-ink: #86EFAC; --ok-soft: #12351F;
    --bad: #F08A5D; --bad-ink: #FDBA8C; --bad-soft: #3A1F12;
    --key-shadow: #0B1220;
    --l0: #334155; --l1: #E0705F; --l2: #E8C24E; --l3: #34B86E;
    --shadow: 0 1px 3px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F172A; --card: #1E293B; --ink: #E5ECF8; --muted: #9AA8BF; --line: #334155; --line-soft: #273449;
  --blue: #60A5FA; --blue-dark: #3B82F6; --blue-soft: #1E3A8A; --blue-ink: #DBE7FF; --on-blue: #0B1530;
  --amber: #F5B451; --amber-dark: #D99A2B; --amber-soft: #3A2A0E; --amber-ink: #F5C46B; --on-amber: #1F1404;
  --violet: #A78BFA; --violet-dark: #8B5CF6; --violet-soft: #2E1F5E; --violet-ink: #DDD3FF; --on-violet: #150B33;
  --ok: #34B86E; --ok-ink: #86EFAC; --ok-soft: #12351F;
  --bad: #F08A5D; --bad-ink: #FDBA8C; --bad-soft: #3A1F12;
  --key-shadow: #0B1220;
  --l0: #334155; --l1: #E0705F; --l2: #E8C24E; --l3: #34B86E;
  --shadow: 0 1px 3px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font-family: Nunito, system-ui, sans-serif; font-size: 16px; line-height: 1.4;
  -webkit-text-size-adjust: 100%; overscroll-behavior-y: none;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: default; }
a { color: var(--blue-dark); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.ic { display: inline-flex; flex: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 13px; }
.center { text-align: center; }
.grow { flex: 1 1 auto; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* Mode accent: blue by default (also for popups, which sit outside the screen), or set on a screen with
   .m-latihan / .m-rumpang / .m-tantangan. */
:root, .m-latihan { --acc: var(--blue); --acc-dark: var(--blue-dark); --acc-soft: var(--blue-soft); --acc-ink: var(--blue-ink); --on-acc: var(--on-blue); }
.m-rumpang { --acc: var(--amber); --acc-dark: var(--amber-dark); --acc-soft: var(--amber-soft); --acc-ink: var(--amber-ink); --on-acc: var(--on-amber); }
.m-tantangan { --acc: var(--violet); --acc-dark: var(--violet-dark); --acc-soft: var(--violet-soft); --acc-ink: var(--violet-ink); --on-acc: var(--on-violet); }

/* ---------- screen frame ---------- */
.screen {
  max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; gap: 16px;
  padding: calc(16px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
}
.topbar { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.topbar .title { font-size: 22px; font-weight: 800; flex: 1; min-width: 0; }
.round-btn {
  flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--card); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; }
.brand .logo { width: 36px; height: 36px; border-radius: 11px; background: var(--blue); color: #fff; display: inline-flex; align-items: center; justify-content: center; }

.card { background: var(--card); border-radius: 20px; padding: 16px; box-shadow: var(--shadow); }
.section-label { font-size: 13px; font-weight: 800; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; padding: 4px 4px 0; }
.h1 { font-size: 28px; font-weight: 800; margin: 0; }
.h2 { font-size: 18px; font-weight: 800; margin: 0; }

.btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%;
  min-height: 60px; border-radius: 18px; padding: 12px 16px; font-size: 20px; font-weight: 800; text-decoration: none;
}
.btn .row { display: flex; align-items: center; gap: 10px; }
.btn small { font-size: 13px; font-weight: 700; opacity: .9; }
.btn.primary { background: var(--acc); color: var(--on-acc); box-shadow: 0 3px 0 var(--acc-dark); }
.btn.primary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--acc-dark); }
.btn.primary:disabled { opacity: .45; box-shadow: none; }
.btn.secondary { background: var(--acc-soft); color: var(--acc-ink); font-size: 18px; min-height: 56px; }
.btn.secondary.danger { background: var(--card); border: 2px solid var(--line); color: var(--bad); }
.link-btn { color: var(--blue-dark); font-weight: 800; font-size: 15px; padding: 10px 6px; }
.link-btn.danger { color: var(--bad); }
:root[data-theme="dark"] .link-btn:not(.danger) { color: var(--blue); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .link-btn:not(.danger) { color: var(--blue); } }

/* ---------- avatars / players ---------- */
.av { flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.av.lg { width: 80px; height: 80px; font-size: 44px; }
.av.md { width: 38px; height: 38px; font-size: 21px; }
.players { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.player-card {
  width: 100%; background: var(--card); border-radius: 22px; padding: 22px 12px 18px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 20px; font-weight: 800;
  overflow-wrap: anywhere; text-align: center;
}
.player-wrap { position: relative; display: grid; }
.player-wrap .player-edit { position: absolute; top: 6px; right: 6px; width: 40px; height: 40px; background: var(--line-soft); box-shadow: none; color: var(--muted); }
.player-card.add { background: transparent; border: 2px dashed var(--line); box-shadow: none; color: var(--blue-dark); }
.player-card.add .av { background: var(--blue-soft); color: var(--blue-ink); }
.who-pill {
  display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px 0 5px; background: var(--card);
  border-radius: 999px; box-shadow: var(--shadow); font-weight: 800; font-size: 17px; min-width: 0;
}
.who-pill .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; gap: 10px; flex: none; margin-left: auto; }
.topbar-actions .on { color: var(--gold); }
:root:not([data-theme="dark"]) .topbar-actions .on { color: #E0A800; }
.avatar-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.avatar-opt { aspect-ratio: 1.4; border-radius: 20px; font-size: 36px; border: 3px solid transparent; display: flex; align-items: center; justify-content: center; }
.avatar-opt[aria-pressed="true"] { border-color: var(--blue); }
.text-input {
  width: 100%; height: 56px; border-radius: 16px; border: 2px solid var(--line); background: var(--card);
  padding: 0 16px; font-size: 20px; font-weight: 700;
}
.text-input:focus { border-color: var(--blue); outline: none; }

/* ---------- Beranda ---------- */
.hello p { margin: 2px 0 0; font-size: 16px; font-weight: 600; }
.peta-card {
  display: flex; flex-direction: column; gap: 12px; width: 100%; text-align: left; background: var(--blue); color: var(--on-blue);
  border-radius: 20px; padding: 16px;
}
.peta-card .head { display: flex; align-items: center; gap: 6px; font-size: 17px; font-weight: 800; }
.peta-card .head .grow { flex: 1; }
.peta-card .head small { font-size: 15px; font-weight: 700; }
.peta-card .big { display: flex; align-items: baseline; gap: 6px; font-weight: 700; }
.peta-card .big b { font-size: 34px; line-height: 1; font-weight: 800; }
.peta-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: rgba(255, 255, 255, .25); }
.peta-bar .h { background: #FFFFFF; } .peta-bar .k { background: var(--l2); }
:root[data-theme="dark"] .peta-bar { background: rgba(11, 21, 48, .25); } :root[data-theme="dark"] .peta-bar .h { background: var(--on-blue); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .peta-bar { background: rgba(11, 21, 48, .25); } :root:not([data-theme="light"]) .peta-bar .h { background: var(--on-blue); } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.peta-card .chip { background: rgba(255, 255, 255, .2); border-radius: 12px; padding: 4px 10px; font-size: 14px; font-weight: 700; }
.mode-card {
  display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; background: var(--card);
  border-radius: 20px; padding: 14px; box-shadow: var(--shadow); min-height: 92px;
}
.mode-card .tag { flex: none; width: 96px; height: 64px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 19px; background: var(--acc-soft); color: var(--acc-ink); }
.mode-card .txt { flex: 1; min-width: 0; }
.mode-card b { display: block; font-size: 19px; }
.mode-card small { display: block; font-size: 14px; color: var(--muted); font-weight: 600; }

/* ---------- pilih tabel ---------- */
.tables { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.tbl {
  position: relative; height: 60px; border-radius: 16px; border: 2px solid var(--line); background: var(--card);
  font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.tbl[aria-pressed="true"] { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
.tbl .badge { position: absolute; top: -9px; right: -7px; font-size: 16px; }
.tbl.campur { height: 56px; font-size: 18px; width: 100%; }
.check-row { display: flex; align-items: center; gap: 12px; min-height: 48px; font-size: 16px; font-weight: 700; }
.check-row input { width: 24px; height: 24px; margin: 0; accent-color: var(--acc); flex: none; }
.check-row.off { color: var(--muted); }
.stepper { display: flex; align-items: center; justify-content: space-between; }
.stepper button { width: 56px; height: 56px; border-radius: 50%; background: var(--acc-soft); color: var(--acc-ink); font-size: 28px; font-weight: 800; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.stepper button:disabled { opacity: .4; }
.stepper .num { font-size: 40px; font-weight: 800; font-variant-numeric: tabular-nums; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; }
.seg.n button { height: 56px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); font-size: 22px; font-weight: 800; }
.seg.n button[aria-pressed="true"] { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
.seg.theme { gap: 4px; background: var(--line-soft); border-radius: 14px; padding: 4px; }
.seg.theme button { border-radius: 10px; min-height: 44px; font-size: 15px; font-weight: 800; color: var(--muted); }
.seg.theme button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.note { display: flex; align-items: center; gap: 12px; background: var(--acc-soft); color: var(--acc-ink); border-radius: 16px; padding: 14px 16px; font-size: 15px; font-weight: 700; }

/* ---------- soal ---------- */
.progress { flex: 1; height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress > div { height: 100%; border-radius: 999px; background: var(--acc); transition: width .3s; }
.count { font-size: 16px; font-weight: 800; color: var(--muted); min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; }
.q-area { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; min-height: 220px; }
.eq { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: min(56px, 13vw); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.eq .op { color: var(--muted); }
.ans {
  position: relative; min-width: 120px; height: 92px; padding: 0 18px; border-radius: 22px; border: 3px solid var(--acc);
  background: var(--card); display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-size: min(56px, 13vw); font-weight: 800;
}
.ans.small { min-width: 80px; height: 84px; padding: 0 10px; }
.ans .caret { width: 4px; height: 52px; border-radius: 2px; background: var(--acc); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ans .caret { animation: none; } .progress > div { transition: none; } }
.ans.ok { border-color: var(--ok); background: var(--ok-soft); color: var(--ok-ink); }
.ans.bad { border-color: var(--bad); background: var(--bad-soft); color: var(--bad-ink); }
.res-mark { position: absolute; top: -14px; right: -14px; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; }
.res-mark.ok { background: var(--ok); } .res-mark.bad { background: var(--bad); }
:root[data-theme="dark"] .res-mark { color: #0B1530; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .res-mark { color: #0B1530; } }
.mode-pill { font-size: 15px; font-weight: 800; color: var(--acc-ink); background: var(--acc-soft); border-radius: 12px; padding: 4px 12px; }
.right-msg { font-size: 26px; font-weight: 800; color: var(--ok-ink); }
.keypad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.key {
  height: 64px; border-radius: 16px; background: var(--card); color: var(--ink); font-size: 30px; font-weight: 800;
  box-shadow: 0 3px 0 var(--key-shadow); display: flex; align-items: center; justify-content: center;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.key:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--key-shadow); }
.key.erase { background: var(--acc-soft); color: var(--acc-ink); }
.key.ok { background: var(--acc); color: var(--on-acc); box-shadow: 0 3px 0 var(--acc-dark); font-size: 22px; }
.key:disabled { opacity: .45; }
.feedback { background: var(--card); border-radius: 22px; padding: 18px 20px; box-shadow: 0 2px 8px rgba(20, 33, 61, .10); display: flex; flex-direction: column; gap: 6px; }
.feedback .lbl { font-size: 17px; font-weight: 800; color: var(--bad-ink); }
.feedback .fact { display: flex; align-items: center; gap: 10px; font-size: 40px; font-weight: 800; flex-wrap: wrap; }
.hl { background: var(--ok-soft); color: var(--ok-ink); border-radius: 14px; padding: 2px 14px; }

/* ---------- hasil ---------- */
.result-top { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding-top: 12px; }
.result-top .party { font-size: 48px; line-height: 1; }
.result-top .score { display: flex; align-items: baseline; gap: 6px; font-size: 18px; font-weight: 800; color: var(--muted); }
.result-top .score b { font-size: 44px; color: var(--acc-ink); }
.result-top .time { font-size: 72px; font-weight: 800; line-height: 1; color: var(--acc-ink); font-variant-numeric: tabular-nums; }
.win-card { display: flex; align-items: center; gap: 14px; background: var(--acc); color: var(--on-acc); border-radius: 20px; padding: 16px; }
.win-card .em { font-size: 40px; line-height: 1; }
.win-card b { display: block; font-size: 20px; }
.win-card small { display: block; font-size: 14px; font-weight: 700; opacity: .92; }
.chip-ok { background: var(--ok-soft); color: var(--ok-ink); border-radius: 12px; padding: 6px 12px; font-size: 18px; font-weight: 800; }
.again-row { display: flex; justify-content: space-between; font-size: 17px; font-weight: 800; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.again-row:first-of-type { border-top: 0; }
.again-row .a { color: var(--ok-ink); }

/* ---------- Peta Hafalan ---------- */
.peta { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 2px; background: var(--card); border-radius: 16px; padding: 8px; box-shadow: var(--shadow); }
.peta .c { aspect-ratio: 1; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; color: var(--muted); }
.lv0 { background: var(--l0); } .lv1 { background: var(--l1); } .lv2 { background: var(--l2); } .lv3 { background: var(--l3); }
.legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.legend span { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.legend i { width: 18px; height: 18px; border-radius: 5px; flex: none; }
.legend .lv0 { box-shadow: inset 0 0 0 1px var(--line); }
.badge-chip { background: var(--blue-soft); color: var(--blue-ink); border-radius: 12px; padding: 6px 10px; font-size: 14px; font-weight: 800; }
.all-row { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--muted); }
.all-row .bar { flex: 1; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.all-row .bar i { display: block; height: 100%; background: var(--l3); }

/* ---------- settings / lists ---------- */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; font-weight: 700; }
.switch-row input { width: 26px; height: 26px; accent-color: var(--blue); flex: none; margin: 0; }
.list-card { background: var(--card); border-radius: 18px; padding: 4px 16px; box-shadow: var(--shadow); }
.list-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 0; text-align: left; color: var(--ink); text-decoration: none; font-weight: 700; }
.list-item .txt { flex: 1; min-width: 0; }
.hist-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.hist-row:last-child { border-bottom: 0; }
.hist-row .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.hist-row .txt { flex: 1; min-width: 0; }
.hist-row b { display: block; font-size: 16px; }
.hist-row small { display: block; color: var(--muted); font-size: 13px; font-weight: 600; }
.hist-row .score { text-align: right; font-size: 17px; font-weight: 800; }
.changelog h3 { font-size: 17px; margin: 14px 0 4px; }
.changelog ul { margin: 0; padding-left: 20px; color: var(--muted); font-size: 15px; }
.changelog li { margin: 3px 0; }

.info-pop { position: fixed; inset: 0; z-index: 30; background: rgba(8, 14, 30, .5); display: flex; align-items: center; justify-content: center; padding: 24px; }
.info-pop .card { max-width: 380px; width: 100%; gap: 10px; padding: 20px; }
.info-pop .info-title { font-size: 19px; }
.info-pop p { margin: 0; color: var(--muted); line-height: 1.5; }
.info-pop .btn { margin-top: 8px; }

.splash { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--muted); text-align: center; padding: 24px; }

.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-size: 15px; font-weight: 700;
  max-width: calc(100% - 32px); z-index: 10; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.install-hint {
  position: fixed; left: 50%; top: calc(10px + env(safe-area-inset-top)); transform: translate(-50%, -16px);
  width: min(440px, calc(100% - 24px)); z-index: 11; display: flex; align-items: center; gap: 10px;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 10px 8px 10px 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .14); opacity: 0; transition: opacity .25s, transform .25s;
}
.install-hint.show { opacity: 1; transform: translate(-50%, 0); }
.install-hint img { border-radius: 9px; flex: none; }
.install-text { flex: 1; font-size: 14px; line-height: 1.35; font-weight: 600; }
.install-go { flex: none; border: 0; border-radius: 10px; padding: 9px 14px; background: var(--blue); color: var(--on-blue); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.install-x { flex: none; border: 0; background: none; color: var(--muted); padding: 6px; display: grid; place-items: center; cursor: pointer; }
.update-hint { top: auto; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translate(-50%, 16px); }
.update-hint.show { transform: translate(-50%, 0); }
body.has-update { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }

/* Touch targets: at least 48 × 48 px to tap, without changing how controls look (invisible ::after area). */
.link-btn, .player-edit, .tbl .badge { position: relative; }
.link-btn::after, .player-edit::after { content: ''; position: absolute; }
.link-btn::after { inset: -12px -4px; }
.player-edit::after { inset: -4px; }
.tbl .badge { pointer-events: none; }
