@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/Vazirmatn-var.woff2") format("woff2");
}

:root {
  --bg: #070a12;
  --panel: #0d1421;
  --panel-2: #121a29;
  --line: #1d2940;
  --text: #e8eefb;
  --muted: #7d8ea9;
  --cyan: #35d0ba;
  --gold: #e7b84b;
  --red: #e0555f;
  --radius: 16px;
}

* { box-sizing: border-box; }

html {
  /* iOS Safari still scrolls sideways when one child is a pixel too wide;
     this is the belt-and-braces guard on top of the per-component fixes. */
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(53, 208, 186, 0.09), transparent 60%),
    radial-gradient(900px 500px at 5% 0%, rgba(231, 184, 75, 0.06), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: "Vazirmatn", system-ui, -apple-system, sans-serif;
  font-weight: 400;
  min-height: 100vh;
}

.app { max-width: 1180px; margin: 0 auto; padding: 22px 20px 60px; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  padding: 14px 18px; margin-bottom: 16px;
  background: linear-gradient(180deg, rgba(18, 26, 41, 0.92), rgba(13, 20, 33, 0.92));
  border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 10px; margin-inline-end: auto; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 12px; font-weight: 800; font-size: 19px; color: #071019;
  background: linear-gradient(145deg, var(--cyan), #1f8f9b);
  box-shadow: 0 6px 22px rgba(53, 208, 186, 0.3);
}
.brand strong { display: block; font-size: 15px; }
.brand small { color: var(--muted); font-size: 11px; }

.rank-block { display: flex; align-items: center; gap: 12px; }
.rank-badge {
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 13px; font-weight: 800; font-size: 21px;
  color: #08111c; background: linear-gradient(160deg, var(--gold), #b8842a);
  box-shadow: 0 6px 24px rgba(231, 184, 75, 0.28);
  transition: transform 0.25s ease;
}
.rank-badge.pop { transform: scale(1.18); }
.rank-meta { min-width: 118px; }
.rank-meta > span { font-size: 12px; color: var(--gold); }
.xpbar { height: 6px; border-radius: 99px; background: #1a2436; margin: 5px 0 4px; overflow: hidden; }
.xpbar i { display: block; height: 100%; width: 0%; border-radius: 99px;
  background: linear-gradient(90deg, #1f8f9b, var(--cyan)); transition: width 0.5s ease; }
.rank-meta small { color: var(--muted); font-size: 11px; }

.streak { display: flex; align-items: center; gap: 5px; font-size: 16px; color: var(--gold); }
.streak-label { font-size: 10.5px; color: var(--muted); }

/* ---------- controls ---------- */
.panel {
  background: linear-gradient(180deg, rgba(18, 26, 41, 0.82), rgba(11, 17, 28, 0.82));
  border: 1px solid var(--line); border-radius: var(--radius);
}
.controls {
  display: flex; flex-wrap: wrap; gap: 22px;
  padding: 16px 18px; margin-bottom: 16px; align-items: flex-end;
}
.control label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 7px; }
.control-action { margin-inline-start: auto; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--line); background: #0f1724; color: var(--muted);
  padding: 6px 12px; border-radius: 10px; font: inherit; font-size: 12px; cursor: pointer;
  transition: all 0.15s ease;
}
.chip:hover { border-color: #2b3c58; color: var(--text); }
.chip.on {
  background: rgba(53, 208, 186, 0.14); border-color: var(--cyan); color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(53, 208, 186, 0.2) inset;
}

button.primary, button.ghost {
  font: inherit; font-size: 12.5px; cursor: pointer; border-radius: 11px; padding: 9px 16px;
  transition: all 0.18s ease;
}
button.primary {
  width: 100%; margin-top: 12px;
  background: linear-gradient(145deg, var(--cyan), #1e8f9a); color: #04121a;
  border: none; font-weight: 600;
  box-shadow: 0 8px 24px rgba(53, 208, 186, 0.22);
}
button.primary:hover { transform: translateY(-1px); }
button.ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
button.ghost:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 16px; align-items: start; }
.layout > * { min-width: 0; }
@media (max-width: 900px) { .layout { grid-template-columns: minmax(0, 1fr); } }

/* ---------- week strip ---------- */
.week-strip { display: grid; grid-auto-flow: column; gap: 10px; margin-bottom: 16px; overflow-x: auto; }
.day-card {
  min-width: 118px; padding: 13px 12px; border-radius: 14px; cursor: pointer;
  background: linear-gradient(180deg, #121a29, #0d1421);
  border: 1px solid var(--line); text-align: right; transition: all 0.18s ease;
  position: relative; overflow: hidden;
}
.day-card:hover { transform: translateY(-2px); border-color: #2b3c58; }
.day-card.on { border-color: var(--cyan); box-shadow: 0 0 0 1px rgba(53, 208, 186, 0.25), 0 10px 30px rgba(0, 0, 0, 0.4); }
.day-card.done { opacity: 0.55; }
.day-card .weekday { font-size: 11px; color: var(--muted); }
.day-card .title { font-size: 14px; font-weight: 600; margin: 4px 0 8px; }
.day-card .meta { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); }
.day-card .xp { color: var(--gold); }
.day-card .progress { position: absolute; inset-inline-start: 0; bottom: 0; height: 2px; background: var(--cyan); }

/* ---------- session ---------- */
.session { padding: 18px; }
.session-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.session-head h2 { font-size: 20px; margin: 0; font-weight: 700; letter-spacing: -0.3px; }
.session-head .sub { color: var(--muted); font-size: 12px; }
.session-focus { color: var(--muted); font-size: 11.5px; margin-bottom: 14px; }

.quest {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 12px; margin-bottom: 8px;
  background: #0f1724; border: 1px solid transparent; transition: all 0.18s ease;
}
.quest:hover { border-color: var(--line); background: #111c2b; }
.quest.done { opacity: 0.45; }
.quest.done .quest-name { text-decoration: line-through; }
.quest-thumb {
  width: 46px; height: 46px; border-radius: 10px; object-fit: cover;
  background: #0a1018; border: 1px solid var(--line); flex-shrink: 0;
}
.quest-body { flex: 1; min-width: 0; }
.quest-name { font-size: 13.5px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.quest-meta { display: flex; gap: 8px; font-size: 11px; color: var(--muted); }
.quest-meta b { color: var(--text); font-weight: 600; }
.tag {
  font-size: 9.5px; padding: 2px 7px; border-radius: 6px; font-weight: 600;
  background: rgba(53, 208, 186, 0.12); color: var(--cyan);
}
.tag.rank-S, .tag.rank-A { background: rgba(224, 85, 95, 0.14); color: var(--red); }
.tag.rank-B, .tag.rank-C { background: rgba(231, 184, 75, 0.13); color: var(--gold); }

.quest-xp { font-size: 11.5px; color: var(--gold); min-width: 46px; text-align: center; }
.check {
  width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line);
  background: #0b1320; color: var(--muted); cursor: pointer; font-size: 14px;
  display: grid; place-items: center; transition: all 0.16s ease; flex-shrink: 0;
}
.check:hover { border-color: var(--cyan); color: var(--cyan); }
.check.on { background: var(--cyan); border-color: var(--cyan); color: #04121a; }

.session-foot { display: flex; justify-content: space-between; align-items: center;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

/* ---------- body panel ---------- */
.side-col { display: grid; gap: 16px; position: sticky; top: 16px; }
.side-col > .panel { padding: 16px; }
.body-panel { padding: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.panel-head h2 { font-size: 16px; margin: 0; font-weight: 700; letter-spacing: -0.2px; }
.score { font-size: 12px; color: var(--cyan); }

#bodyMap {
  position: relative; padding: 6px 0 2px; margin: 0 -6px;
  background: radial-gradient(220px 190px at 50% 45%, rgba(53, 208, 186, 0.07), transparent 72%);
  border-radius: 14px;
}
.body-map { display: block; margin: 0 auto; filter: drop-shadow(0 12px 34px rgba(0, 0, 0, 0.6)); }
.bm-muscle {
  transition: fill 0.7s ease;
  stroke: rgba(7, 11, 18, 0.35);
  stroke-width: 2;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.bm-muscle:hover { filter: brightness(1.22); }
.bm-silhouette { stroke: rgba(80, 104, 138, 0.45); stroke-width: 2; vector-effect: non-scaling-stroke; }

.legend { display: flex; flex-wrap: wrap; gap: 7px 11px; justify-content: center; margin-top: 10px; }
.legend-item { display: inline-flex; align-items: center; gap: 4px; font-size: 9.5px; color: var(--muted); }
.legend-item i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }

.body-hint { text-align: center; font-size: 11px; color: var(--muted); margin-top: 10px; line-height: 1.7; }
.body-hint b { color: var(--text); }

/* ---------- leaderboard ---------- */
.board-panel { padding: 16px; }
.tabs { display: flex; gap: 4px; }
.tab {
  font: inherit; font-size: 10.5px; padding: 4px 9px; border-radius: 7px; cursor: pointer;
  background: transparent; border: 1px solid transparent; color: var(--muted);
}
.tab.on { background: rgba(53, 208, 186, 0.12); color: var(--cyan); }

.row {
  display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 9px; font-size: 12px;
}
.row.me { background: rgba(53, 208, 186, 0.08); border: 1px solid rgba(53, 208, 186, 0.2); }
.row .pos { width: 18px; color: var(--muted); font-size: 11px; text-align: center; }
.row .pos.top { color: var(--gold); font-weight: 700; }
.row 
.row .name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .val { color: var(--gold); font-size: 11.5px; }

/* ---------- share card ---------- */
.modal { position: fixed; inset: 0; display: grid; place-items: center; z-index: 50; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4, 7, 12, 0.8); backdrop-filter: blur(6px); }
.share-card {
  position: relative; width: 360px; max-width: 92vw; padding: 22px;
  border-radius: 22px; border: 1px solid rgba(53, 208, 186, 0.25);
  background:
    radial-gradient(500px 260px at 50% -10%, rgba(53, 208, 186, 0.16), transparent 70%),
    linear-gradient(180deg, #101828, #080d16);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  animation: rise 0.28s ease;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
.share-card .sc-head { display: flex; justify-content: space-between; align-items: center; }
.sc-name { font-size: 17px; font-weight: 600; }
.sc-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.sc-rank {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  font-weight: 800; font-size: 20px; color: #08111c; background: linear-gradient(160deg, var(--gold), #b8842a);
}
.sc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0 6px; }
.sc-stats.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sc-top { text-align: center; font-size: 11px; color: var(--muted); margin-top: 10px; }
.sc-top b { color: var(--cyan); }
.sc-stat { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); border-radius: 11px; padding: 8px; text-align: center; }
.sc-stat b { display: block; font-size: 15px; color: var(--cyan); }
.sc-stat span { font-size: 9.5px; color: var(--muted); }
.sc-body { margin: 6px 0 0; }
.sc-foot { text-align: center; font-size: 10px; color: var(--muted); margin-top: 12px; letter-spacing: 0.4px; }

/* ================= views / navigation ================= */
.viewnav {
  display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 16px; padding: 4px;
  background: rgba(13, 20, 33, 0.75); border: 1px solid var(--line);
  border-radius: 13px; width: fit-content; max-width: 100%;
}
.vtab {
  font: inherit; font-size: 12.5px; padding: 9px 16px; border-radius: 999px; cursor: pointer;
  background: transparent; border: none; color: var(--muted); transition: all 0.16s ease;
}
.vtab:hover { color: var(--text); }
.vtab.on { background: rgba(53, 208, 186, 0.14); color: var(--cyan); font-weight: 600; }

/* ================= logger ================= */
.logger { padding: 18px; }
.date-field { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); }
.date-field input {
  font: inherit; font-size: 11.5px; color: var(--text); background: #0f1724;
  border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px;
}
.search-wrap { position: relative; margin: 4px 0 14px; }
#exerciseSearch, #editorSearch {
  width: 100%; font: inherit; font-size: 13px; color: var(--text);
  background: #0f1724; border: 1px solid var(--line); border-radius: 11px;
  padding: 12px 14px; outline: none; transition: border-color 0.16s ease;
}
#exerciseSearch:focus, #editorSearch:focus { border-color: var(--cyan); }
#exerciseSearch::placeholder, #editorSearch::placeholder { color: #5d6d86; }
.search-results {
  position: absolute; inset-inline: 0; top: calc(100% + 6px); z-index: 20;
  max-height: 300px; overflow-y: auto; padding: 6px;
  background: #101a2a; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}
.sr-item { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 9px; cursor: pointer; }
.sr-item:hover, .sr-item.active { background: rgba(53, 208, 186, 0.1); }
.sr-item img { width: 32px; height: 32px; border-radius: 7px; object-fit: cover; background: #0a1018; }
.sr-item .n { font-size: 12.5px; }
.sr-item .m { font-size: 10px; color: var(--muted); }
.sr-empty { padding: 12px; font-size: 12px; color: var(--muted); text-align: center; }

.block { border: 1px solid var(--line); border-radius: 13px; padding: 12px; margin-bottom: 10px; background: #0f1724; }
.block-head { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.block-head img { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; }
.block-head .name { font-size: 13.5px; flex: 1; }
.block-head .pr { font-size: 10px; color: var(--gold); }
.icon-x { background: transparent; border: none; color: var(--muted); cursor: pointer; font-size: 16px; padding: 4px; }
.icon-x:hover { color: var(--red); }

.set-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) minmax(0, 1fr) 22px; gap: 7px; align-items: center; margin-bottom: 6px; }
.set-row .idx { font-size: 10.5px; color: var(--muted); text-align: center; }
.set-row input {
  width: 100%; font: inherit; font-size: 12.5px; text-align: center; color: var(--text);
  background: #0b1320; border: 1px solid var(--line); border-radius: 8px; padding: 7px 4px;
}
.set-row input:focus { border-color: var(--cyan); outline: none; }
.set-row .unit { font-size: 9.5px; color: var(--muted); text-align: center; }
.set-row .del { background: transparent; border: none; color: #4c5b73; cursor: pointer; font-size: 13px; }
.set-row .del:hover { color: var(--red); }
.add-set {
  width: 100%; margin-top: 4px; font: inherit; font-size: 11.5px; padding: 7px;
  background: transparent; border: 1px dashed var(--line); border-radius: 9px;
  color: var(--muted); cursor: pointer;
}
.add-set:hover { border-color: var(--cyan); color: var(--cyan); }

.logger-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.logger-totals { font-size: 11.5px; color: var(--muted); }
.logger-totals b { color: var(--text); }
button.primary.inline { width: auto; margin: 0; padding: 10px 22px; }

.live-stats { display: grid; gap: 9px; }
.live-stat { display: flex; gap: 10px; justify-content: space-between; font-size: 12px; }
.live-stat b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-stat span { color: var(--muted); }
.live-stat b { color: var(--text); }
.live-stat .up { color: var(--cyan); }
.live-stat .down { color: var(--red); }

.recent { display: grid; gap: 8px; }
.recent-item { display: flex; gap: 8px; justify-content: space-between; font-size: 11.5px; padding: 7px 9px;
  background: #0f1724; border-radius: 9px; }
.recent-item span { color: var(--muted); }

/* ================= records ================= */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 14px; margin-bottom: 16px; }
@media (max-width: 760px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { background: rgba(255, 255, 255, 0.02); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.kpi .v { font-size: 22px; font-weight: 700; color: var(--text); }
.kpi .v.up { color: var(--cyan); }
.kpi .v.down { color: var(--red); }
.kpi .l { font-size: 10.5px; color: var(--muted); margin-top: 3px; }

.chart-panel { padding: 16px; margin-bottom: 16px; }
.month-nav { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.icon-btn {
  width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--line);
  background: #0f1724; color: var(--muted); cursor: pointer; font-size: 13px; line-height: 1;
}
.icon-btn:hover { border-color: var(--cyan); color: var(--cyan); }

.chart { display: block; margin: 8px 0 0; }
.chart-grid { stroke: rgba(120, 145, 180, 0.13); stroke-width: 1; stroke-dasharray: 3 4; }
.chart-label { fill: #5d6d86; font-size: 9px; font-family: inherit; }
.chart-bubble rect { fill: rgba(53, 208, 186, 0.16); stroke: rgba(53, 208, 186, 0.45); }
.chart-bubble text { fill: var(--cyan); font-size: 9.5px; font-family: inherit; }
.chart-empty { padding: 40px 10px; text-align: center; color: var(--muted); font-size: 12px; }
.chart-foot { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11px; color: var(--muted); margin-top: 6px; }
.chart-foot b { color: var(--text); }

.trow { display: grid; grid-template-columns: minmax(0, 1fr) 62px 60px 76px; gap: 8px; align-items: center;
  padding: 8px 10px; border-radius: 9px; font-size: 12px; }
.trow:hover { background: rgba(255, 255, 255, 0.02); }
.trow.head { font-size: 10px; color: var(--muted); border-bottom: 1px solid var(--line); border-radius: 0; }
.trow .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.trow .best { color: var(--text); font-weight: 600; }
.trow .delta { font-size: 11px; }
.trow .delta.up { color: var(--cyan); }
.trow .delta.down { color: var(--red); }
.trow .delta.flat { color: var(--muted); }
.spark-empty { color: #4c5b73; }

.pr-feed { display: grid; gap: 8px; }
.pr-item { display: flex; gap: 9px; align-items: center; padding: 8px 10px;
  background: rgba(231, 184, 75, 0.06); border: 1px solid rgba(231, 184, 75, 0.16); border-radius: 10px; }
.pr-item .medal { font-size: 14px; }
.pr-item .body { flex: 1; min-width: 0; }
.pr-item .t { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pr-item .s { font-size: 10px; color: var(--muted); }
.pr-item .gain { font-size: 11px; color: var(--gold); }

.volume-bars { display: grid; gap: 7px; }
.vbar { display: grid; grid-template-columns: 26px minmax(0, 1fr) 48px; gap: 8px; align-items: center; font-size: 10.5px; color: var(--muted); }
.vbar .track { height: 7px; border-radius: 99px; background: #16203300; background-color: #162033; overflow: hidden; }
.vbar .track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #1f7f8a, var(--cyan)); }
.vbar b { color: var(--text); font-weight: 500; text-align: left; }

.data-note { font-size: 10.5px; color: var(--muted); line-height: 1.8; margin-bottom: 10px; }
button.ghost.wide { width: 100%; margin-bottom: 8px; }
button.ghost.danger:hover { border-color: var(--red); color: var(--red); }

/* toast */
.toast {
  position: fixed; inset-inline: 0; bottom: 28px; margin: 0 auto; width: fit-content;
  max-width: calc(100% - 28px); text-align: center;
  padding: 10px 18px; border-radius: 11px; font-size: 12.5px; color: #04121a;
  background: linear-gradient(145deg, var(--cyan), #1e8f9a); font-weight: 600;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5); opacity: 0; transform: translateY(10px);
  transition: all 0.25s ease; pointer-events: none; z-index: 60;
}
.toast.show { opacity: 1; transform: translateY(0); }

.quick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.quick-label { font-size: 10.5px; color: var(--muted); }

/* ================= calendar ================= */
.cal-panel { padding: 16px; margin-bottom: 16px; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.cal-weekdays span { text-align: center; font-size: 10.5px; color: var(--muted); }
.cal-grid { display: grid; gap: 6px; }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-day {
  position: relative; aspect-ratio: 1 / 0.74; border-radius: 11px; cursor: pointer;
  background: #0f1724; border: 1px solid transparent; color: var(--muted);
  font: inherit; font-size: 13px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; transition: all 0.16s ease;
}
.cal-day.blank { background: transparent; cursor: default; }
.cal-day:not(.blank):hover { border-color: #2b3c58; color: var(--text); }
.cal-day.has { background: rgba(53, 208, 186, 0.08); color: var(--text); }
.cal-day.today { border-color: rgba(53, 208, 186, 0.5); }
.cal-day.selected { border-color: var(--cyan); background: rgba(53, 208, 186, 0.16); box-shadow: 0 0 0 1px rgba(53,208,186,.25) inset; }
.cal-day .d { font-size: 13px; }
.cal-day .bars { display: flex; gap: 2px; }
.cal-day .bars i { width: 4px; height: 4px; border-radius: 99px; background: var(--cyan); }
.cal-day .bars i:nth-child(n+3) { opacity: 0.55; }
.cal-day .bars i:nth-child(n+4) { opacity: 0.35; }
.cal-legend { display: flex; justify-content: space-between; margin-top: 12px; font-size: 10px; color: var(--muted); }
.cal-legend-scale { display: inline-flex; align-items: center; gap: 3px; }
.cal-legend-scale i { width: 5px; height: 5px; border-radius: 99px; background: var(--cyan); opacity: 0.5; }
.cal-legend-scale i:last-of-type { opacity: 1; }

.day-panel { padding: 16px; }
.day-panel .panel-head { gap: 10px; }
.empty-day { padding: 26px; text-align: center; color: var(--muted); font-size: 12px;
  border: 1px dashed var(--line); border-radius: 12px; margin-bottom: 14px; }

.day-session { margin-bottom: 14px; }
.sess { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #0f1724; }
.sess-head { display: flex; gap: 8px; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 9px; }
.tag-copy { color: var(--cyan); background: rgba(53, 208, 186, 0.12); padding: 1px 7px; border-radius: 6px; font-size: 9.5px; }
.sess-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 54px; gap: 10px; font-size: 11.5px; padding: 4px 0; }
.sess-row .nm { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sess-row .sets { color: var(--muted); font-size: 10.5px; }
.sess-row .e1rm { color: var(--gold); font-size: 10.5px; text-align: left; }
.sess-actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: 8px; }
.ghost.tiny { padding: 5px 11px; font-size: 10.5px; }

.copy-box { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.copy-title { font-size: 11.5px; color: var(--muted); margin-bottom: 9px; }
.copy-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.copy-controls select {
  font: inherit; font-size: 11.5px; color: var(--text); background: #0f1724;
  border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; flex: 1; min-width: 180px;
}
.inc { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); cursor: pointer; }
.inc input { accent-color: var(--cyan); }
.copy-hint { font-size: 10.5px; color: #5d6d86; margin-top: 8px; }
.month-stats { display: grid; gap: 9px; }

/* ================= sheets (editor / template) ================= */
.sheet {
  position: relative; width: 560px; max-width: 94vw; max-height: 86vh; overflow-y: auto;
  padding: 20px; border-radius: 18px;
  background: linear-gradient(180deg, #111b2b, #0b1220);
  border: 1px solid rgba(53, 208, 186, 0.2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  animation: rise 0.24s ease;
}
.sheet.narrow { width: 380px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.sheet-head .sub { font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.sheet-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.sheet-foot .totals { font-size: 11px; color: var(--muted); }
.sheet-actions { display: flex; gap: 8px; }
.sheet-actions button { font-size: 12px; }
.name-input {
  width: 100%; font: inherit; font-size: 13px; color: var(--text); background: #0b1320;
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; outline: none;
}
.name-input:focus { border-color: var(--cyan); }
.tpl-hint { font-size: 10.5px; color: var(--muted); margin-top: 8px; line-height: 1.8; }

.tpl-list { display: grid; gap: 8px; }
.tpl-item { border: 1px solid var(--line); border-radius: 11px; padding: 9px 10px; background: #0f1724; }
.tpl-item .name { font-size: 12px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpl-item .meta { font-size: 10px; color: var(--muted); }
.tpl-item .acts { display: flex; gap: 6px; margin-top: 7px; }
.tpl-item .acts button { flex: 1; padding: 5px; font-size: 10.5px; }
.tpl-empty { font-size: 11px; color: var(--muted); text-align: center; padding: 12px 0; line-height: 1.8; }

/* ================= programs ================= */
.prog-list { display: grid; gap: 10px; }
.prog-item {
  border: 1px solid var(--line); border-radius: 13px; padding: 12px 14px;
  background: #0f1724; display: flex; gap: 12px; align-items: center; transition: all .16s ease;
}
.prog-item.on { border-color: var(--cyan); background: rgba(53, 208, 186, 0.07); }
.prog-item .body { flex: 1; min-width: 0; }
.prog-item .nm { font-size: 13.5px; margin-bottom: 3px; }
.prog-item .meta { font-size: 10.5px; color: var(--muted); }
.prog-item .acts { display: flex; gap: 6px; }

.switch { position: relative; width: 38px; height: 21px; flex-shrink: 0; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute; inset: 0; border-radius: 99px; background: #1b2536;
  border: 1px solid var(--line); transition: all .18s ease;
}
.switch .track::after {
  content: ""; position: absolute; top: 2px; right: 2px; width: 15px; height: 15px;
  border-radius: 50%; background: #5d6d86; transition: all .18s ease;
}
.switch input:checked + .track { background: rgba(53, 208, 186, 0.25); border-color: var(--cyan); }
.switch input:checked + .track::after { background: var(--cyan); transform: translateX(-17px); }

.day-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px;
  background: #0f1724; border: 1px solid var(--line); margin-bottom: 8px;
}
.day-row .idx {
  width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center;
  background: #182234; color: var(--cyan); font-size: 10.5px; flex-shrink: 0;
}
.day-row .nm { flex: 1; font-size: 12.5px; }
.day-row .meta { font-size: 10px; color: var(--muted); }
.day-row .acts { display: flex; gap: 5px; }

.cal-toggle { display: flex; gap: 6px; align-items: center; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.week-cell {
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 8px; min-height: 108px;
  background: #0f1724; cursor: pointer; text-align: center; display: flex;
  flex-direction: column; gap: 5px; transition: all .16s ease; position: relative;
}
.week-cell:hover { border-color: #2b3c58; }
.week-cell.today { border-color: rgba(53, 208, 186, 0.5); }
.week-cell.selected { border-color: var(--cyan); background: rgba(53, 208, 186, 0.1); }
.week-cell.blank { visibility: hidden; }
.week-cell .wd { font-size: 9.5px; color: var(--muted); }
.week-cell .num { font-size: 16px; }
.week-cell .cnt { font-size: 9.5px; color: var(--cyan); }
.week-cell .vol { font-size: 9px; color: var(--muted); margin-top: auto; }
.week-cell .dot { width: 5px; height: 5px; border-radius: 99px; background: var(--cyan); margin: 0 auto; }

/* staged plan (planning ≠ logging) */
.plan-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: 1.5px solid rgba(53, 208, 186, 0.75);
  background: transparent;
  vertical-align: middle;
}
.week-cell .plan-dot { margin: 0 auto; }
.cal-day .plan-dot { position: absolute; top: 6px; inset-inline-start: 6px; width: 6px; height: 6px; }

.planned-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px dashed rgba(53, 208, 186, 0.35);
  border-radius: 12px;
  background: rgba(53, 208, 186, 0.06);
  font-size: 11.5px;
}
.planned-row .planned-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cyan);
  font-weight: 600;
}
.planned-row .planned-meta { color: var(--muted); font-size: 11px; }
.planned-row #removePlannedDay { margin-inline-start: auto; }

/* program picker in the day panel */
.program-pick {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; margin-bottom: 14px; border-radius: 12px;
  background: rgba(53, 208, 186, 0.06); border: 1px solid rgba(53, 208, 186, 0.18);
}
.program-pick .pick-label { font-size: 11px; color: var(--cyan); }
.program-pick select {
  font: inherit; font-size: 11.5px; color: var(--text); background: #0f1724;
  border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; flex: 1; min-width: 150px;
}
.program-pick.hint-only { font-size: 11px; color: var(--muted); justify-content: center; }
.pick-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; }
.pick-commit { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; flex-wrap: wrap; }
.from-prog { font-size: 10px; color: var(--cyan); margin-bottom: 6px; }

.cov-group { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-bottom: 9px; }
.cov-label { font-size: 10px; color: var(--muted); width: 58px; flex-shrink: 0; }
.cov { font-size: 10px; padding: 2px 8px; border-radius: 7px; background: #162033; color: var(--muted); }
.cov.on { background: rgba(53, 208, 186, 0.16); color: var(--cyan); }
.cov.mid { background: rgba(53, 208, 186, 0.07); color: #7fb3ae; }
.cov.off { background: rgba(224, 85, 95, 0.12); color: var(--red); }

.day-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.day-chip {
  font-size: 10px; padding: 3px 9px; border-radius: 7px;
  background: rgba(53, 208, 186, 0.1); color: var(--cyan);
}

/* training systems */
.system-panel { padding: 14px 16px; margin-bottom: 14px; }
.system-panel > label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 9px; }
.system-chips { flex-wrap: wrap; }
.system-note { font-size: 11px; color: var(--muted); margin-top: 10px; line-height: 1.8; }
.system-note b { color: var(--cyan); font-weight: 500; }
.system-note .warn { color: var(--gold); }

.control-action { display: flex; gap: 8px; flex-wrap: wrap; }

/* ================= profile ================= */

.avatar {
  width: 72px; height: 72px; border-radius: 22px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 24px; font-weight: 700; color: #04121a;
  background: linear-gradient(150deg, var(--cyan), #1f8f9b);
  box-shadow: 0 12px 34px rgba(53, 208, 186, 0.28);
}





.hero-rank .badge {
  width: 58px; height: 58px; border-radius: 17px; display: grid; place-items: center;
  font-size: 26px; font-weight: 800; color: #08111c;
  background: linear-gradient(160deg, var(--gold), #b8842a);
  box-shadow: 0 10px 30px rgba(231, 184, 75, 0.3);
}
.hero-rank span { font-size: 10.5px; color: var(--gold); }



.stat-bar .lbl { color: var(--muted); }
.stat-bar .track { height: 8px; border-radius: 99px; background: #162033; overflow: hidden; }
.stat-bar .track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #1f7f8a, var(--cyan)); }
.stat-bar b { text-align: left; color: var(--text); font-weight: 600; }






.calc .v { font-size: 17px; font-weight: 600; }
.calc .v small { font-size: 10px; color: var(--muted); font-weight: 400; }
.calc .l { font-size: 10px; color: var(--muted); margin-top: 3px; }


.std-row:last-child { border-bottom: none; }
.std-row .nm { color: var(--text); }
.std-row .lv { font-size: 11px; color: var(--cyan); text-align: left; }
.std-row .bar { height: 6px; border-radius: 99px; background: #162033; overflow: hidden; }
.std-row .bar i { display: block; height: 100%; background: linear-gradient(90deg, #1f7f8a, var(--cyan)); }
.std-row.empty .nm, .std-row.empty .lv { color: var(--muted); }



/* ================= Nutrition ================= */
.nutrition-link {
  font-size: 11.5px; font-weight: 600; text-decoration: none;
  color: var(--cyan); border: 1px solid rgba(53, 208, 186, 0.35);
  padding: 7px 12px; border-radius: 10px; white-space: nowrap;
}
.nutrition-link:hover { background: rgba(53, 208, 186, 0.1); }

/* ================= PWA ================= */
.install-btn {
  font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer;
  padding: 8px 14px; border-radius: 10px; border: none;
  color: #04121a; background: linear-gradient(145deg, var(--cyan), #1e8f9a);
  box-shadow: 0 6px 18px rgba(53, 208, 186, 0.25);
}
.install-btn:hover { transform: translateY(-1px); }
.install-btn[hidden] { display: none; }

.net-badge {
  font-size: 10px; padding: 4px 9px; border-radius: 7px;
  background: rgba(224, 85, 95, 0.14); color: var(--red);
  border: 1px solid rgba(224, 85, 95, 0.3);
}
.net-badge[hidden] { display: none; }

/* ---------- small phones (iPhone SE / 12 mini and up) ---------- */
@media (max-width: 430px) {
  .app { padding: 14px 12px 48px; }
  .topbar { padding: 12px; gap: 10px; }
  .brand small { display: none; }
  .rank-badge { width: 40px; height: 40px; font-size: 18px; }
  .rank-meta { min-width: 96px; }
  .vtab { padding: 7px 11px; font-size: 11.5px; }
  .day-card { min-width: 96px; padding: 10px 9px; }
  .week-grid { gap: 5px; }
  .week-cell { min-height: 96px; padding: 8px 4px; border-radius: 10px; }
  .week-cell .wd { font-size: 8px; }
  .week-cell .num { font-size: 14px; }
  .week-cell .cnt { font-size: 8px; }
  .session, .logger, .cal-panel, .day-panel { padding: 13px; }
  .quest { gap: 8px; padding: 9px; }
  .quest-thumb { width: 40px; height: 40px; }
  .sess-row { grid-template-columns: minmax(0, 1fr) auto; }
  .sess-row .e1rm { display: none; }
  .set-row { grid-template-columns: 20px minmax(0, 1fr) minmax(0, 1fr) 20px; gap: 5px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet { padding: 15px; border-radius: 15px; }
  .share-card { padding: 16px; }

  /* iOS Safari zooms the whole page when a focused input is under 16px.
     That zoom is what users read as "the layout is broken". */
}

/* last line of defence: nothing may exceed the viewport width */
img, svg, video, canvas, iframe { max-width: 100%; }
select, input, textarea, button { max-width: 100%; }

.board-note { font-size: 9.5px; color: var(--cyan); margin-bottom: 8px; letter-spacing: .3px; }
#syncPanel .primary { margin-top: 4px; }

/* ================= profile page ================= */
.profile-page { max-width: 560px; margin: 0 auto; }

.profile-head {
  display: flex; align-items: center; gap: 14px; padding: 6px 4px 18px;
}
.profile-head .avatar {
  width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center;
  font-size: 22px; font-weight: 700; color: #04121a; flex-shrink: 0;
  background: linear-gradient(150deg, var(--cyan), #1f8f9b);
  box-shadow: 0 10px 28px rgba(53, 208, 186, 0.24);
}
.profile-head .who { flex: 1; min-width: 0; }
.profile-head .name { font-size: 19px; font-weight: 600; }
.profile-head .meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.profile-head .rank {
  width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center;
  font-size: 20px; font-weight: 800; color: #08111c; flex-shrink: 0;
  background: linear-gradient(160deg, var(--gold), #b8842a);
}

.pgroup {
  background: linear-gradient(180deg, rgba(18, 26, 41, 0.72), rgba(11, 17, 28, 0.72));
  border: 1px solid var(--line); border-radius: 18px;
  margin-bottom: 14px; overflow: hidden;
}
.pgroup-title {
  font-size: 10.5px; color: var(--muted); letter-spacing: .3px;
  padding: 13px 16px 7px;
}

.prow {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 16px; background: transparent; border: none; border-top: 1px solid rgba(29, 41, 64, 0.55);
  color: var(--text); font: inherit; font-size: 13px; text-align: right; cursor: pointer;
  transition: background 0.14s ease;
}
.prow:first-of-type { border-top: none; }
.prow:hover { background: rgba(255, 255, 255, 0.025); }
.prow .lbl { flex: 1; color: var(--text); }
.prow .val { color: var(--muted); font-size: 12.5px; }
.prow .chev { color: #3f5068; font-size: 15px; line-height: 1; }
.prow.readonly { cursor: default; }
.prow.readonly:hover { background: transparent; }
.prow.readonly .val { color: var(--text); }

.pstat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: rgba(29, 41, 64, 0.55); }
.pstat { background: #0d1421; padding: 13px 8px; text-align: center; }
.pstat b { display: block; font-size: 16px; font-weight: 600; }
.pstat span { font-size: 9.5px; color: var(--muted); }

.psheet-list { display: grid; gap: 6px; margin-top: 4px; }
.psheet-option {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 14px; border-radius: 12px; cursor: pointer;
  background: #0f1724; border: 1px solid var(--line); font: inherit; font-size: 13px; color: var(--text);
}
.psheet-option.on { border-color: var(--cyan); background: rgba(53, 208, 186, 0.1); }
.psheet-option .check { color: var(--cyan); font-size: 13px; }
.psheet-num {
  width: 100%; font: inherit; font-size: 22px; text-align: center; color: var(--text);
  background: #0b1320; border: 1px solid var(--line); border-radius: 12px; padding: 14px; outline: none;
}
.psheet-num:focus { border-color: var(--cyan); }

/* ================= design language ================= */
/* borrowed from the reference: small label, big type, pill buttons, air */
.eyebrow {
  display: block; font-size: 10.5px; letter-spacing: .5px; color: var(--muted);
  margin-bottom: 7px;
}

button.primary, button.ghost { border-radius: 999px; }
.chip { border-radius: 999px; }
.icon-btn { border-radius: 50%; }
button.primary { padding: 12px 22px; }

/* ---------- profile, with breathing room ---------- */
.phead {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: 10px 4px 24px;
}
.phead h1 {
  margin: 0; font-size: 32px; font-weight: 800; line-height: 1.15; letter-spacing: -0.6px;
}
.phead p { margin: 7px 0 0; font-size: 12px; color: var(--muted); }
.phead-side { display: flex; align-items: center; gap: 10px; padding-bottom: 4px; }
.phead-side .avatar {
  width: 58px; height: 58px; border-radius: 20px; display: grid; place-items: center;
  font-size: 20px; font-weight: 700; color: #04121a;
  background: linear-gradient(150deg, var(--cyan), #1f8f9b);
  box-shadow: 0 10px 28px rgba(53, 208, 186, 0.24);
}
.phead-side .rank {
  width: 42px; height: 42px; border-radius: 15px; display: grid; place-items: center;
  font-size: 18px; font-weight: 800; color: #08111c;
  background: linear-gradient(160deg, var(--gold), #b8842a);
}

.pgroup { margin-bottom: 20px; border-radius: 20px; }
.pgroup-title { padding: 16px 18px 8px; font-size: 10.5px; letter-spacing: .5px; }
.prow { padding: 16px 18px; font-size: 13.5px; }
.prow .val { font-size: 13px; }
.pstat { padding: 16px 8px; }
.pstat b { font-size: 18px; }

/* ================= bottom navigation ================= */
.app { padding-bottom: 108px; }

.bottom-nav {
  position: fixed; z-index: 40;
  left: 50%; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: calc(100% - 24px); max-width: 480px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px;
  padding: 8px;
  background: rgba(13, 20, 33, 0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
}
.vtab {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 4px; border: none; border-radius: 999px; cursor: pointer;
  background: transparent; color: #6b7c95; font: inherit; font-size: 9.5px;
  transition: color .16s ease, background .16s ease;
}
.vtab svg {
  width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.vtab:hover { color: var(--text); }
.vtab.on { color: var(--cyan); background: rgba(53, 208, 186, 0.12); }

.vtab-primary {
  color: #04121a;
  background: linear-gradient(145deg, var(--cyan), #1e8f9a);
  box-shadow: 0 8px 20px rgba(53, 208, 186, 0.28);
}
.vtab-primary svg { stroke-width: 2.4; }
.vtab-primary:hover { color: #04121a; }
.vtab-primary.on {
  background: linear-gradient(145deg, #5ceada, #23a7b1);
  color: #04121a;
  box-shadow: 0 8px 24px rgba(53, 208, 186, 0.45);
}

@media (max-width: 430px) {
  .bottom-nav { width: calc(100% - 16px); padding: 6px; }
  .vtab { font-size: 9px; }
}

.sc-actions { display: flex; gap: 8px; margin-top: 14px; }
.sc-actions .primary { flex: 1; margin: 0; }

/* D/E: keep the card on screen and the toast above the dock */
.share-card { max-height: min(88vh, 760px); overflow-y: auto; }
.toast { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
@media (max-height: 640px) {
  .share-card { max-height: 94vh; }
  .sc-body .body-map { width: 260px !important; }
}

/* Chevrons as SVG, not as ‹ › characters: the bidi algorithm mirrors those
   in an RTL paragraph, which silently swapped the calendar arrows. */
.icon-btn svg {
  width: 18px; height: 18px; display: block;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ================= site footer ================= */
.site-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 20px calc(112px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.site-footer .legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 6px;
  margin: 0;
  padding: 0;
}
.site-footer .legal-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  color: #b9c7dc;
  text-decoration: none;
  transition: color .16s ease, background .16s ease;
}
.site-footer .legal-links a:hover {
  color: var(--cyan);
  background: rgba(53, 208, 186, 0.08);
}
.site-footer .legal-links a:focus-visible {
  color: var(--cyan);
  background: rgba(53, 208, 186, 0.08);
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
.site-footer .footer-note {
  margin: 0 0 2px;
  font-size: 11px;
  color: var(--muted);
}
@media (max-width: 430px) {
  .site-footer {
    padding: 16px 12px calc(104px + env(safe-area-inset-bottom, 0px));
  }
}
