/* Almarai (SIL Open Font License), bundled so the app keeps its look offline. */
@font-face { font-family: "Almarai"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/almarai-400-ar.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: "Almarai"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/almarai-400-lat.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Almarai"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/almarai-700-ar.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: "Almarai"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/almarai-700-lat.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Almarai"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/almarai-800-ar.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: "Almarai"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/almarai-800-lat.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Light and clean. White cards on a cool grey ground, near-black for the main action, one warm accent for
   progress and highlights. Phone-first single column with a fixed tab bar; the workout view hides the bar. */
:root {
  --bg: #F3F4F6;
  --surface: #FFFFFF;
  --ink: #0F1318;
  --muted: #626B78;
  --line: #E3E6EB;
  --soft: #F0F1F4;
  --accent: #FF5A1F;
  --accent-deep: #C7400C;
  --accent-soft: #FFEDE4;
  --good: #128A4B;
  --good-soft: #E2F5EA;
  --bad: #B3261E;
  --nav-h: 62px;
  --r-card: 20px;
  --r-ctl: 14px;
  --shadow: 0 1px 2px rgba(15, 19, 24, .04), 0 8px 24px rgba(15, 19, 24, .06);
  --font: "Almarai", system-ui, -apple-system, "SF Arabic", "Segoe UI", "Noto Sans Arabic", Tahoma, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.3; text-wrap: balance; }
h1 { font-size: 1.55rem; font-weight: 800; }
h2 { font-size: 1.1rem; font-weight: 800; }
h3 { font-size: .95rem; font-weight: 800; }
p { margin: 0; }
button { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
bdi { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 2px; }

#app {
  max-width: 32rem;
  margin-inline: auto;
  padding-inline: 16px;
  padding-block: calc(env(safe-area-inset-top, 0px) + 16px) calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 28px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
#app.no-nav { padding-block-end: calc(env(safe-area-inset-bottom, 0px) + 28px); }

.muted { color: var(--muted); font-size: .9rem; }
.fine { color: var(--muted); font-size: .82rem; }
.center { text-align: center; }
.error { color: var(--bad); font-size: .9rem; font-weight: 700; }
.grow { flex: 1 1 auto; min-width: 0; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.eyebrow { font-size: .78rem; font-weight: 800; letter-spacing: .02em; color: var(--accent-deep); }

/* headers */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.top h1 { font-size: 1.35rem; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.chip-btn { appearance: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 14px; font-size: .85rem; font-weight: 700; cursor: pointer; min-height: 36px; }
.ptop, .wtop { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 8px; text-align: center; }
.icon-gap { width: 44px; }
.icon-btn { appearance: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.wtitle { display: flex; flex-direction: column; line-height: 1.3; }

/* cards */
.card { background: var(--surface); border-radius: var(--r-card); padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.block { display: flex; flex-direction: column; gap: 10px; }
.block-title { font-size: 1rem; padding-inline: 4px; }
.hint { font-size: .92rem; background: var(--accent-soft); color: var(--ink); border-radius: var(--r-ctl); padding: 10px 14px; }

/* buttons */
.btn {
  appearance: none; font-weight: 800; cursor: pointer; text-align: center;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: var(--r-ctl); padding: 10px 16px; min-height: 48px;
}
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.block { width: 100%; }
.btn.big { min-height: 56px; font-size: 1.08rem; border-radius: 16px; }
.btn:disabled { opacity: .4; cursor: default; }
.link { appearance: none; border: 0; background: none; color: var(--accent-deep); font-weight: 700; font-size: .85rem; cursor: pointer; padding: 6px 4px; }

/* week */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day {
  appearance: none; cursor: pointer; min-width: 0; border: 1px solid transparent; background: var(--surface);
  border-radius: 14px; padding: 8px 2px 7px; display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.day .d { font-size: clamp(.68rem, 2.9vw, .84rem); font-weight: 800; }
.day .mark { font-size: clamp(.6rem, 2.5vw, .74rem); color: var(--muted); min-height: 1.2em; display: grid; place-items: center; }
.day .mark svg { width: 16px; height: 16px; color: var(--good); }
.day.off { background: transparent; border-color: var(--line); }
.day.today { border-color: var(--accent); }
.day[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.day[aria-pressed="true"] .mark { color: #C9CED6; }
.day[aria-pressed="true"] .mark svg { color: #7BE0A8; }

/* hero */
.hero {
  position: relative; overflow: hidden; isolation: isolate; background: var(--ink); color: #fff;
  border-radius: 24px; padding: 22px 18px 18px; display: flex; flex-direction: column; gap: 8px; min-height: 216px; justify-content: flex-end;
  box-shadow: var(--shadow);
}
.hero-bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center 30%; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(15, 19, 24, .35) 0%, rgba(15, 19, 24, .78) 55%, rgba(15, 19, 24, .96) 100%); }
.hero .eyebrow { color: #FFB393; }
.hero h2 { font-size: 1.7rem; font-weight: 800; }
.hero-meta { color: #D5D9E0; font-size: .92rem; margin-block-end: 6px; }
.rest-card h2 { font-size: 1.5rem; }

/* rows */
.row {
  appearance: none; width: 100%; text-align: start; cursor: pointer; border: 0; background: var(--surface);
  border-radius: 16px; padding: 8px; display: flex; align-items: center; gap: 12px; min-height: 64px; box-shadow: var(--shadow);
}
.row.static { cursor: default; box-shadow: none; background: var(--soft); }
.card .row { box-shadow: none; background: var(--soft); }
.card-row { padding: 14px 16px; }
.row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.row-main b { font-weight: 800; }
.row-sub { color: var(--muted); font-size: .84rem; }
.thumb { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex: none; background: var(--soft); }
.chev { flex: none; color: var(--muted); display: grid; place-items: center; }
.chev svg { width: 18px; height: 18px; }
.state { flex: none; font-size: .85rem; font-weight: 800; color: var(--muted); padding-inline-end: 6px; }
.row-done .state { color: var(--good); }
.row-cur { outline: 2px solid var(--ink); }

/* level */
.level { display: flex; flex-direction: column; gap: 8px; }
.bar { height: 8px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }

/* movement photos */
.media { position: relative; margin: 0; aspect-ratio: 3 / 2; border-radius: 22px; overflow: hidden; background: var(--ink); box-shadow: var(--shadow); }
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media .b { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .media .b { animation: flip 2.6s ease-in-out infinite; }
  .bar i { transition: inline-size .25s ease; }
}
@keyframes flip { 0%, 38% { opacity: 0; } 50%, 88% { opacity: 1; } 100% { opacity: 0; } }

.wname { display: flex; flex-direction: column; gap: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: .84rem; font-weight: 700; }
.chip.opt { color: var(--accent-deep); border-color: var(--accent-soft); background: var(--accent-soft); }

/* how-to */
.how summary { cursor: pointer; font-weight: 800; font-size: 1.05rem; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.how summary::-webkit-details-marker { display: none; }
.how summary::after { content: "+"; font-size: 1.4rem; font-weight: 400; color: var(--muted); line-height: 1; }
.how[open] summary::after { content: "−"; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: st; display: flex; flex-direction: column; gap: 10px; }
.steps li { counter-increment: st; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; }
.steps li::before { content: counter(st); width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: .85rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.tips { margin: 0; padding-inline-start: 1.2em; display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: .92rem; }

/* workout */
.segs { display: flex; gap: 4px; }
.segs i { flex: 1 1 0; height: 5px; border-radius: 999px; background: var(--line); }
.segs i.on { background: var(--good); }
.segs i.cur { background: var(--ink); }
.set-dots { display: flex; gap: 6px; }
.dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: .85rem; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.dot.cur { border-color: var(--ink); color: var(--ink); }
.dot.on { background: var(--good); border-color: var(--good); color: #fff; }
.dot svg { width: 16px; height: 16px; }

.stepper { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stepper label { font-weight: 800; display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.stepper label .muted { font-size: .8rem; font-weight: 400; }
.st-ctl { direction: ltr; display: grid; grid-template-columns: 52px 84px 52px; gap: 6px; flex: none; }
.st-btn { appearance: none; height: 52px; border-radius: var(--r-ctl); border: 0; background: var(--soft); font-size: 1.6rem; font-weight: 700; line-height: 1; cursor: pointer; }
.st-btn:active { background: var(--line); }
.st-val {
  font: inherit; font-size: 1.45rem; font-weight: 800; font-variant-numeric: tabular-nums; text-align: center;
  width: 100%; min-width: 0; height: 52px; padding: 0 4px; color: var(--ink); background: var(--surface);
  border: 2px solid var(--line); border-radius: var(--r-ctl);
}
.st-val:focus { outline: 0; border-color: var(--ink); }

.done-sets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.done-sets li { display: flex; align-items: center; gap: 10px; background: var(--good-soft); border-radius: 12px; padding: 6px 12px; font-size: .92rem; }
.done-sets b { margin-inline-start: auto; font-weight: 800; }
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

/* rest overlay */
#timer {
  position: fixed; inset: 0; z-index: 20; background: var(--ink); color: #fff;
  display: grid; place-items: center; padding: calc(env(safe-area-inset-top, 0px) + 24px) 20px calc(env(safe-area-inset-bottom, 0px) + 24px);
}
.rest { width: 100%; max-width: 22rem; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.rest .eyebrow { color: #FFB393; font-size: 1rem; }
.ring { position: relative; width: min(64vw, 240px); aspect-ratio: 1; }
.ring svg { width: 100%; height: 100%; }
.ring-bg { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 7; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; }
.ring-time { position: absolute; inset: 0; display: grid; place-items: center; font-size: 3.4rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.rest-next { color: #D5D9E0; }
.rest-next b { color: #fff; }
.rest-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; }
.rest-actions .btn { background: rgba(255, 255, 255, .1); border-color: transparent; color: #fff; min-height: 54px; }
.rest-actions .btn.primary { background: var(--accent); color: var(--ink); }
body.resting { overflow: hidden; }

/* summary */
.done-hero { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding-block: 24px 4px; }
.big-check { width: 76px; height: 76px; border-radius: 50%; background: var(--good); color: #fff; display: grid; place-items: center; }
.big-check svg { width: 40px; height: 40px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.stats.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats div { background: var(--soft); border-radius: 14px; padding: 10px 8px; text-align: center; min-width: 0; }
.stats dt { font-size: .76rem; color: var(--muted); }
.stats dd { margin: 0; font-size: 1.12rem; font-weight: 800; }
.stats dd.sub { font-size: .82rem; font-weight: 400; color: var(--muted); }
.spark { width: 100%; height: 84px; color: var(--accent); }
.spark-fill { fill: var(--accent-soft); stroke: none; }
.dots { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.wdot { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: clamp(.62rem, 2.6vw, .78rem); color: var(--muted); }
.wdot i { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: #fff; }
.wdot i svg { width: 16px; height: 16px; }
.wdot.off i { border-style: dashed; }
.wdot.on i { background: var(--good); border-color: var(--good); }

/* library */
.filters { display: flex; gap: 6px; overflow-x: auto; padding-block: 2px; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
.filters::-webkit-scrollbar { display: none; }
.filter { appearance: none; flex: none; cursor: pointer; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 16px; font-weight: 700; min-height: 40px; }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { appearance: none; cursor: pointer; text-align: start; border: 0; padding: 0; background: var(--surface); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.tile img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: var(--soft); }
.tile-text { display: flex; flex-direction: column; padding: 10px 12px 12px; line-height: 1.4; min-width: 0; }
.tile-text b { font-weight: 800; font-size: .95rem; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; font-weight: 700; border: 0; padding: 0; margin: 0; min-width: 0; }
.field legend { padding: 0; margin-block-end: 4px; }
.field input[type="text"], .inline input, .backup {
  font: inherit; font-size: 1rem; font-weight: 400; width: 100%; min-height: 50px; padding: 8px 14px;
  color: var(--ink); background: var(--soft); border: 2px solid transparent; border-radius: var(--r-ctl);
}
.field input[type="text"]:focus, .inline input:focus { outline: 0; border-color: var(--ink); background: var(--surface); }
.radio { display: flex; align-items: center; gap: 10px; font-weight: 400; min-height: 44px; }
.radio input { width: 22px; height: 22px; accent-color: var(--ink); }
.inline { display: flex; align-items: flex-end; gap: 8px; }
.inline label { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; font-weight: 700; }
.inline .btn { min-height: 50px; }
.backup { font-family: ui-monospace, Menlo, monospace; font-size: .75rem; min-height: 0; }

/* login */
.auth { display: flex; flex-direction: column; gap: 16px; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding-block: 28px 8px; }
.brand img { border-radius: 20px; box-shadow: var(--shadow); }
.brand h1 { font-size: 1.8rem; font-weight: 800; }

/* segmented control */
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; background: var(--soft); border-radius: var(--r-ctl); padding: 4px; }
.seg button { appearance: none; font-weight: 800; cursor: pointer; min-height: 44px; border: 0; background: transparent; border-radius: 11px; }
.seg button[aria-pressed="true"] { background: var(--surface); box-shadow: var(--shadow); }

/* guide */
.read ul, .read ol { margin: 0; padding-inline-start: 1.25em; display: flex; flex-direction: column; gap: 6px; }
.key { background: var(--accent-soft); border-radius: var(--r-ctl); padding: 10px 14px; }
.key b { color: var(--accent-deep); }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: start; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; font-weight: 800; color: var(--muted); }

/* tab bar */
#nav {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
#nav button {
  appearance: none; font-size: .74rem; font-weight: 700; cursor: pointer;
  height: var(--nav-h); border: 0; background: transparent; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
#nav svg { width: 24px; height: 24px; }
#nav button[aria-current="page"] { color: var(--ink); }
#nav button[aria-current="page"] svg { color: var(--accent); }
