/* Carnets course et vélo : une colonne de 600 px, comme le carnet de musculation.
   Onglets en bas sur téléphone, en pilule collante en haut sur ordinateur. */
.j-app { --t: var(--accent); }
.j-intro { max-width: 600px; margin: 0 auto; padding: 36px 20px 12px; display: grid; gap: 10px; }
.j-intro h1 { font-size: clamp(30px, 5vw, 42px); }
.j-intro .links { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; color: var(--muted); }
.j-intro .links a { text-decoration: none; font-weight: 500; }

#j-view {
  max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 32px;
  padding-block: 12px 150px;
  padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px));
  font-size: 15px;
}
#j-view.swap { animation: rise .5s var(--ease) both; }
.j-eyebrow, .j-h3 { font-size: 13px; color: var(--muted); font-weight: 500; }
.j-h3 { margin-bottom: 10px; }
.j-h2 { font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.j-muted { font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.j-stack { display: flex; flex-direction: column; gap: 12px; }
.j-stack .j-h3, .j-stack .j-muted { margin: 0; }
.j-row { display: flex; flex-wrap: wrap; gap: 8px; }
.j-row.end { justify-content: flex-end; }
.j-i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Boutons */
.j-btn {
  font: 500 15px/1 var(--body); border: 0; border-radius: 12px; padding: 12px 16px; min-height: 44px; cursor: pointer;
  background: var(--field); color: var(--ink); transition: background .25s var(--ease), transform .2s var(--ease), opacity .25s;
}
.j-btn:hover { background: color-mix(in srgb, var(--accent) 16%, var(--field)); }
.j-btn:active { transform: scale(.97); }
.j-btn.primary { background: var(--accent); color: var(--accent-ink); }
.j-btn.primary:hover { background: color-mix(in srgb, var(--accent) 75%, #000); }
.j-btn.big { width: 100%; min-height: 54px; font-size: 16px; display: flex; align-items: center; justify-content: center; text-align: center; }
.j-btn.sm { min-height: 34px; padding: 8px 12px; font-size: 14px; border-radius: 10px; }
.j-btn.danger { background: transparent; color: var(--z5); }
.j-btn.danger.solid { background: var(--z5); color: var(--accent-ink); }

/* Semaine */
.j-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.j-wd { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0; border-radius: 12px; font-size: 11.5px; color: var(--muted); }
.j-wd b { font: 500 15px/1 var(--body); color: var(--ink); font-variant-numeric: tabular-nums; }
.j-wd.today { background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .06); }
.j-wd.today b { color: var(--accent); font-weight: 700; }
.j-dots { display: flex; gap: 3px; height: 6px; }
.j-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }

.j-goal { display: grid; gap: 8px; }
.j-big { font-family: var(--display); font-size: 52px; line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; }
.j-big b { color: var(--accent); font-weight: 600; }
.j-big span { font: 500 18px/1 var(--body); color: var(--muted); }
.j-goal .j-muted { margin: 0; }
.j-bar { height: 10px; border-radius: 99px; background: var(--field); overflow: hidden; }
.j-bar span { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .9s var(--ease); animation: grow 1s var(--ease) both; transform-origin: left; }
.j-bar.thin { height: 6px; }
.j-bar.warn span { background: var(--z4); }

.j-alert { display: grid; gap: 2px; padding: 14px 16px; border-radius: 14px; background: color-mix(in srgb, var(--z4) 14%, var(--surface)); font-size: 14px; }
.j-alert span { color: var(--muted); }
.j-empty { display: grid; gap: 6px; text-align: center; padding: 28px 12px; color: var(--muted); }
.j-empty b { color: var(--ink); font-size: 18px; font-weight: 600; }

/* Sorties */
.j-month { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); margin-bottom: -26px; }
.j-month span:first-child { text-transform: capitalize; font-weight: 500; color: var(--ink); }
#j-view > .j-sess { margin-top: -32px; }
#j-view > .j-month + .j-sess { margin-top: 0; }
.j-sess { border-bottom: 1px solid var(--line); }
.j-sbtn { width: 100%; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; padding: 14px 0; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.j-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--t); align-self: start; margin-top: 6px; }
.j-mid { display: grid; gap: 2px; min-width: 0; }
.j-t1 { font-weight: 600; }
.j-sub { font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.j-right { font-size: 13px; color: var(--muted); white-space: nowrap; }
.j-detail { padding: 0 0 16px 22px; display: grid; gap: 8px; animation: rise .35s var(--ease) both; }
.j-detail > div:not(.j-row) { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.j-detail > div span { color: var(--muted); }
.j-detail b { font-weight: 500; }
.j-note { margin: 0; color: var(--muted); font-size: 14px; }

/* Progrès */
.j-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.j-v { font: 600 30px/1.1 var(--display); margin-top: 4px; font-variant-numeric: tabular-nums; }
.j-v small { font: 400 13px var(--body); color: var(--muted); }
.j-tiles .j-muted { margin-top: 2px; }
@media (max-width: 400px) { .j-tiles { grid-template-columns: 1fr 1fr; } }
.j-weeks { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; }
.j-wk { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10px; color: var(--muted); }
.j-wkbar { height: 90px; width: 100%; max-width: 22px; border-radius: 6px; background: var(--field); position: relative; display: flex; align-items: flex-end; overflow: hidden; }
.j-wkbar span { width: 100%; border-radius: 6px; background: color-mix(in srgb, var(--accent) 45%, var(--field)); animation: rise-bar .9s var(--ease) both; transform-origin: bottom; }
.j-wkbar span.hit { background: var(--accent); }
.j-wkbar i { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--muted); }
@keyframes rise-bar { from { transform: scaleY(0); } }
.j-types { display: grid; gap: 10px; }
.j-type { display: grid; grid-template-columns: 130px minmax(0, 1fr) 42px; gap: 10px; align-items: center; font-size: 14px; }
.j-type span:first-child { display: flex; align-items: center; gap: 8px; }
.j-type i { width: 8px; height: 8px; border-radius: 50%; }
.j-type b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.j-chart { width: 100%; height: auto; display: block; }
.j-chart text { fill: var(--muted); font: 10px var(--body); }
.j-chart .g { stroke: var(--line); }
.j-chart .ln { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.j-chart .pt { fill: var(--bg); stroke: var(--accent); stroke-width: 1.3; }
.j-chart .end { fill: var(--accent); }

/* Records */
.j-recs { display: grid; }
.j-rec { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.j-rec span { display: grid; gap: 2px; font-weight: 500; }
.j-rec small { font-weight: 400; color: var(--muted); font-size: 13px; }
.j-rec b { font: 600 24px/1 var(--display); color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Matériel */
.j-gear { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.j-gear.retired { opacity: .6; }
.j-gtop { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.j-gtop span { color: var(--muted); font-variant-numeric: tabular-nums; }
.j-gear .j-btn.sm { min-height: 30px; padding: 6px 10px; background: transparent; color: var(--muted); }
.j-gear .j-btn.sm.danger { color: var(--z5); }
.j-old { border: 0; padding: 0; }
.j-old summary { font-size: 14px; color: var(--muted); padding: 8px 0; }

/* Champs (dans les réglages et la fenêtre) */
.j-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.j-f { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; min-width: 0; }
.j-f small { font-weight: 400; }
.j-f input, .j-f select, .j-f textarea, .j-panel textarea { font-size: 16px; padding: 11px 12px; }
.j-panel textarea { width: 100%; font: 400 15px/1.4 var(--body); color: var(--ink); background: var(--field); border: 1px solid transparent; border-radius: 12px; resize: vertical; }
.j-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.j-chip {
  display: inline-flex; align-items: center; gap: 7px; border: 0; cursor: pointer;
  font: 500 14px/1 var(--body); padding: 9px 13px; border-radius: 99px; background: var(--field); color: var(--ink);
  transition: background .25s var(--ease), color .25s, box-shadow .25s;
}
.j-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--t); }
.j-chip[aria-pressed="true"] { background: var(--surface); box-shadow: 0 0 0 2px var(--t) inset; }
.j-rpe { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.j-rpe button {
  border: 0; cursor: pointer; height: 38px; border-radius: 9px; font: 500 14px/1 var(--body); color: var(--ink);
  background: var(--field); transition: background .25s var(--ease), color .25s;
}
.j-rpe button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.j-live { display: flex; gap: 24px; min-height: 44px; align-items: center; padding: 8px 14px; border-radius: 12px; background: var(--accent-soft); }
.j-live span { display: grid; gap: 2px; font: 600 20px/1 var(--display); font-variant-numeric: tabular-nums; }
.j-live small { font: 500 12px var(--body); color: var(--muted); }
.j-live .j-muted { display: block; margin: 0; font: 400 13.5px/1.4 var(--body); }

/* Onglets */
.j-tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; border-top: 1px solid var(--line);
  background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: max(4px, env(safe-area-inset-left, 0px)); padding-right: max(4px, env(safe-area-inset-right, 0px));
}
.j-tabs .in { max-width: 600px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); }
.j-tab { border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 60px; font: 400 10.5px var(--body); color: var(--muted); transition: color .3s var(--ease), background .3s var(--ease); }
.j-tab[aria-current="page"] { color: var(--accent); font-weight: 500; }
@media (min-width: 820px) {
  .j-tabs { position: sticky; top: 64px; bottom: auto; border: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 8px 20px 0; }
  .j-tabs .in { display: flex; gap: 4px; padding: 4px; width: max-content; max-width: 100%; background: var(--field); border-radius: 999px; }
  .j-tab { flex-direction: row; height: 40px; padding: 0 16px; gap: 8px; font-size: 14px; border-radius: 999px; }
  .j-tab[aria-current="page"] { background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
  #j-view { padding-bottom: 80px; }
}

/* Fenêtre et message */
.j-sheet { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .35); animation: fade .25s var(--ease); }
.j-panel {
  width: 100%; max-width: 600px; max-height: 90%; overflow: auto; background: var(--bg); border-radius: 22px 22px 0 0;
  padding-block: 24px calc(24px + env(safe-area-inset-bottom, 0px));
  padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 18px; animation: sheet-up .45s var(--ease) both;
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } }
@media (min-width: 640px) { .j-sheet { align-items: center; } .j-panel { border-radius: 22px; } }
.j-toast {
  position: fixed; left: 50%; top: calc(70px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); z-index: 50;
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 99px; font-size: 14px; max-width: calc(100% - 40px); text-align: center;
  animation: toast-in .4s var(--ease);
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -8px); } }

/* Habillage v2 : blocs en cartes, comme le reste du site */
.j-intro .eyebrow { display: inline-flex; align-items: center; gap: 8px; }
#j-view > section:not(.j-empty):not(.j-alert) { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; }
#j-view > section .j-sess:last-child, .j-recs .j-rec:last-child, .j-gear:last-of-type { border-bottom: 0; }
#j-view > .j-sess { background: var(--surface); padding-inline: 18px; margin-top: 0 !important; }
#j-view > .j-month { margin-bottom: -20px; padding-inline: 4px; }
#j-view > .j-month + .j-sess { border-radius: var(--radius) var(--radius) 0 0; }
#j-view > .j-sess:not(:has(+ .j-sess)) { border-radius: 0 0 var(--radius) var(--radius); border-bottom: 0; }
#j-view > .j-month + .j-sess:not(:has(+ .j-sess)) { border-radius: var(--radius); }
#j-view > .j-sess + .j-month { margin-top: 8px; }
.j-btn.primary.big { box-shadow: 0 12px 26px -14px color-mix(in srgb, var(--accent) 70%, transparent); }
.j-wd.today { box-shadow: var(--shadow); }

/* ---------- Plan suivi ---------- */
.j-wd.planned .j-dots i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--accent); }
.j-plan { display: grid; gap: 4px; }
.j-plan-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.j-plan-head > div { display: grid; gap: 4px; min-width: 0; }
.j-plan-head > div > b { font: 600 19px/1.2 var(--body); }
.j-plan-count { display: grid; justify-items: end; gap: 2px; flex: none; }
.j-plan-count b { font: 700 22px/1 var(--body); color: var(--accent); font-variant-numeric: tabular-nums; }
.j-plan-count small { font-size: 12px; color: var(--muted); }
.j-plan-today { display: grid; gap: 8px; padding: 14px 16px; border-radius: 14px; background: color-mix(in srgb, var(--t, var(--accent)) 10%, var(--surface)); border-left: 4px solid var(--t, var(--accent)); }
.j-plan-today p { margin: 0; font-size: 16px; line-height: 1.4; font-weight: 500; }
.j-plan-today.rest { border-left-color: var(--line); background: var(--field); font-size: 15px; line-height: 1.45; margin: 0; }
.j-plan-today.rest b { font-weight: 600; }
.j-plan-today.done p { color: var(--muted); }
.j-plan-ok { font-size: 14px; font-weight: 600; color: var(--z2, #1d8f5a); }
.j-plan-ok::before { content: "✓ "; }
.j-prow { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: start; padding: 9px 0; border-top: 1px solid var(--line); }
.j-prow:first-of-type { border-top: 0; }
.j-prow p { margin: 3px 0 0; font-size: 14.5px; line-height: 1.4; }
.j-prow-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; color: var(--muted); }
.j-prow-top > span { font-weight: 600; color: var(--ink); }
.j-prow-top i { font-style: normal; padding: 2px 8px; border-radius: 99px; font-size: 12px; background: color-mix(in srgb, var(--t) 14%, var(--surface)); color: color-mix(in srgb, var(--t) 75%, var(--ink)); }
.j-prow-top em { font-style: normal; margin-left: auto; font-size: 12px; }
.j-prow.done p { color: var(--muted); }
.j-prow.missed em { color: var(--z4); }
.j-prow.today .j-prow-top > span { color: var(--accent); }
.j-pcheck { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; padding: 0; transition: background .2s, border-color .2s, transform .15s; }
.j-pcheck svg { width: 16px; height: 16px; fill: none; stroke: var(--accent-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.j-pcheck[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.j-pcheck[aria-pressed="true"] svg { opacity: 1; }
.j-pcheck:disabled { cursor: default; opacity: .75; }
.j-pcheck:not(:disabled):active { transform: scale(.9); }
.j-pcheck:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.j-plan-rate { display: grid; gap: 6px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.j-plan-rate > div:first-child { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 14px; color: var(--muted); }
.j-plan-rate b { font: 700 20px/1 var(--body); color: var(--ink); }
.j-plan-rate small { font-size: 13px; color: var(--muted); }
.j-plan-links { justify-content: space-between; align-items: center; margin-top: 12px; font-size: 14px; }
.j-plan-links a { color: var(--accent); font-weight: 500; }
.j-link { background: none; border: 0; padding: 6px 0; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }
.j-plan-end { margin: 0 0 10px; font-size: 15px; line-height: 1.45; }
.j-plan-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.j-plan-cta > div { display: grid; gap: 3px; flex: 1 1 220px; }
.j-plan-cta span { font-size: 14px; color: var(--muted); line-height: 1.4; }
.j-plan-cta a { text-decoration: none; }
.j-pre { margin: -4px 0 4px; padding: 10px 12px; border-radius: 10px; background: var(--field); }

/* ---------- Import GPX et tracé ---------- */
.j-gpx { display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--field); }
.j-gpx > label { justify-self: start; cursor: pointer; }
.j-gpx details summary { cursor: pointer; font-size: 13.5px; color: var(--muted); }
.j-gpx details p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.j-route { display: block; width: 100%; max-width: 420px; height: auto; border-radius: 12px; background: var(--surface); margin: 6px 0; }
#f-route:empty { display: none; }

/* Réserve la place avant le premier affichage (évite que la page saute) */
#j-view { min-height: calc(100vh - 140px); }
.j-tabs .in { min-height: 61px; }
@media (min-width: 820px) { .j-tabs .in { min-height: 44px; } }

/* ---------- Carnet multisport et charge d'entraînement ---------- */
.m-legend { margin-top: 8px; font-size: 13px; }
.m-charge { display: grid; gap: 12px; }
.m-ch-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.m-zone { flex: none; padding: 5px 12px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--ink); background: color-mix(in srgb, var(--z) 22%, var(--surface)); border: 1px solid color-mix(in srgb, var(--z) 55%, transparent); }
.m-gauge { width: 100%; max-width: 420px; height: auto; display: block; }
.m-gauge text { fill: var(--muted); font: 11px var(--body); }
.m-gauge .m-needle { fill: var(--ink); }
.m-gauge .m-needle-l { stroke: var(--ink); stroke-width: 2.5; }
.m-ch-text { margin: 0; font-size: 15px; line-height: 1.5; }
.m-by { display: grid; gap: 6px; }
.m-by-row { display: grid; grid-template-columns: minmax(90px, 140px) 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.m-by-bar { height: 8px; border-radius: 4px; background: var(--field); overflow: hidden; }
.m-by-bar span { display: block; height: 100%; border-radius: 4px; background: var(--c); }
.m-by-row b { font-variant-numeric: tabular-nums; min-width: 3ch; text-align: right; }
.m-weeks { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; align-items: end; }
.m-wk { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.m-wk small { font-size: 10.5px; font-variant-numeric: tabular-nums; min-height: 13px; }
.m-wk em { font-style: normal; }
.m-wkbar { height: 130px; width: 100%; max-width: 30px; border-radius: 6px; background: var(--field); display: flex; flex-direction: column-reverse; overflow: hidden; }
.m-wkbar span { display: block; width: 100%; }
.m-key { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.m-key i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.m-explain p { margin: 0; font-size: 15px; line-height: 1.55; }
.m-sport-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.m-sport-h i { width: 12px; height: 12px; border-radius: 50%; background: var(--t); }
.m-sport-h b { font-size: 18px; }
.m-sports { max-height: 172px; overflow-y: auto; padding: 2px; }
.j-seg2 { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--field); gap: 2px; }
.j-seg2 button { border: 0; background: none; font: inherit; font-size: 14px; padding: 8px 14px; border-radius: 9px; color: inherit; cursor: pointer; }
.j-seg2 button[aria-pressed="true"] { background: var(--surface); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.1); }

/* Carnet multisport : champs propres à chaque sport */
.m-extra { display: grid; gap: 14px; }
.m-extra:empty { display: none; }
.m-opt { font-style: normal; font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 4px; }
.m-score { display: flex; align-items: flex-end; gap: 10px; }
.m-score label { display: grid; gap: 4px; flex: 1; max-width: 140px; }
.m-score small { color: var(--muted); font-size: 12px; }
.m-score b { padding-bottom: 12px; color: var(--muted); }
.m-nok, .m-nok a { font-weight: 400; }
.j-detail .m-nok { font-size: 13px; color: var(--muted); }
.j-f.wide { grid-column: 1 / -1; }
/* Choix d'un champ (pas un sport) : pas de pastille de couleur, contour à la couleur de la page */
.m-extra .j-chip { --t: var(--accent); }
.m-extra .j-chip::before { display: none; }
.j-live span:not(.j-muted) { white-space: nowrap; }
/* Néon nuit : Unbounded est large, les grands chiffres sont un peu réduits */
.j-big { font-size: clamp(40px, 11vw, 56px); letter-spacing: -.04em; }
.j-v { font-size: 25px; letter-spacing: -.03em; }
.j-rec b { font-size: 21px; letter-spacing: -.02em; }
.j-live span { font-size: 17px; }

/* ---------- Choix du sport : grandes tuiles avec pictogramme ---------- */
.m-gl { margin: 4px 0 -4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.m-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 8px; }
.m-tile {
  display: grid; justify-items: center; align-content: center; gap: 8px; min-height: 100px; padding: 12px 6px;
  border: 0; border-radius: 16px; cursor: pointer; text-align: center;
  background: color-mix(in srgb, var(--t) 9%, var(--surface)); color: var(--ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t) 18%, transparent);
  font: 600 13.5px/1.2 var(--body);
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s;
}
.m-tile-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; color: var(--t); background: color-mix(in srgb, var(--t) 16%, transparent); }
.m-tile:hover { background: color-mix(in srgb, var(--t) 15%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t) 45%, transparent), 0 10px 26px -14px var(--t); }
.m-tile:active { transform: scale(.95); }
.m-tile.on { box-shadow: inset 0 0 0 2px var(--t); }
.m-tile:focus-visible, .m-pick:focus-visible { outline: 3px solid var(--t); outline-offset: 2px; }
@media (max-width: 420px) { .m-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* En-tête du formulaire : le sport choisi */
.m-pick {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left;
  width: 100%; padding: 10px 14px 10px 10px; border: 0; border-radius: 16px; cursor: pointer; color: var(--ink);
  background: color-mix(in srgb, var(--t) 12%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t) 30%, transparent);
}
.m-pick .m-tile-ic { grid-row: 1 / 3; width: 48px; height: 48px; }
.m-pick b { font: 800 19px/1.1 var(--display); letter-spacing: -.02em; }
.m-pick small { font-size: 13px; color: var(--t); font-weight: 600; }
/* Raccourcis date et durée */
.m-q { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.m-q .j-chip { --t: var(--accent); }
.m-q .j-chip::before { display: none; }
.m-q input[type="date"] { flex: 1 1 140px; min-width: 0; }
.m-q + input { margin-top: 8px; }
/* Pictogramme dans la liste des séances */
.m-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: var(--t); background: color-mix(in srgb, var(--t) 15%, transparent); align-self: start; }
/* Bouton « + » toujours à portée de pouce sur téléphone */
.j-fab { display: none; }
@media (max-width: 759px) {
  .j-fab {
    display: grid; place-items: center; position: fixed; z-index: 10; right: max(16px, env(safe-area-inset-right, 0px));
    bottom: calc(76px + env(safe-area-inset-bottom, 0px)); width: 58px; height: 58px; border: 0; border-radius: 20px; cursor: pointer;
    background: var(--grad); color: var(--accent-ink); box-shadow: 0 14px 30px -10px rgba(255, 107, 149, .7);
    transition: transform .15s var(--ease);
  }
  .j-fab:active { transform: scale(.92); }
  body:has(.j-sheet:not([hidden])) .j-fab { display: none; }
}

/* ================= Nutrition ================= */
.n-date { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: -16px; }
.n-date b { font: 700 18px/1.2 var(--display); letter-spacing: -.02em; text-transform: capitalize; text-align: center; }
.n-date .j-btn.sm { width: 40px; padding: 0; justify-content: center; }
.n-sum { display: grid; gap: 14px; }
.n-kcal { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.n-kcal > div { display: grid; gap: 2px; }
.n-kcal b { font: 800 clamp(34px, 9vw, 44px)/1 var(--display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.n-kcal small { color: var(--muted); font-size: 13.5px; }
.n-left { text-align: right; }
.n-left b { font-size: clamp(24px, 6vw, 30px); color: var(--accent); }
.n-left b.over { color: var(--z5); }
.n-bar { display: block; height: 6px; border-radius: 99px; background: var(--field); overflow: hidden; }
.n-bar.big { height: 10px; }
.n-bar span { display: block; height: 100%; border-radius: inherit; background: var(--grad); transition: width .5s var(--ease); }
.n-macros { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.n-macros.wk { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.n-m { display: grid; gap: 4px; }
.n-m > span { font-size: 13px; color: var(--muted); }
.n-m b { font: 700 18px/1.1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.n-m b small { font: 500 12.5px var(--body); color: var(--muted); letter-spacing: 0; }
.n-p .n-bar span { background: #53b8ff; } .n-c .n-bar span { background: #ffc94d; } .n-f .n-bar span { background: #ff7a45; } .n-k .n-bar span { background: var(--grad); }
/* Trois façons d'ajouter */
.n-ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: -12px; }
.n-way { display: grid; justify-items: center; gap: 4px; padding: 14px 6px; border: 0; border-radius: 16px; cursor: pointer; text-align: center; color: var(--ink);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font: 600 13.5px/1.2 var(--body); transition: transform .15s var(--ease), box-shadow .2s; }
.n-way svg { width: 26px; height: 26px; color: var(--accent); margin-bottom: 4px; }
.n-way small { font-weight: 400; font-size: 12px; color: var(--muted); }
.n-way:first-child { background: color-mix(in srgb, #ff6b95 14%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, #ff6b95 40%, transparent); }
.n-way:first-child svg { color: #ff8fb0; }
.n-way:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent); }
/* Repas */
.n-meal { padding-top: 14px !important; padding-bottom: 8px !important; }
.n-mh { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; margin-bottom: 4px; }
.n-mi { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.n-mh b { font-weight: 700; }
.n-mk { font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.n-mh .j-btn.sm { width: 36px; padding: 0; justify-content: center; }
.n-meal .j-muted { margin: 4px 0 8px; }
.n-item, .n-r { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border: 0; border-top: 1px solid var(--line);
  background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.n-item > span:first-child, .n-r > span:first-child { display: grid; gap: 1px; min-width: 0; }
.n-item b, .n-r b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.n-item small, .n-r small { font-size: 12.5px; color: var(--muted); }
.n-item > span:last-child, .n-r > span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.n-r:first-of-type { border-top: 0; }
/* Recherche */
.n-search { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 14px; background: var(--field); color: var(--muted); }
.n-search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--ink); font: 400 16px var(--body); padding: 13px 0; outline: none; }
.n-search:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.n-res { display: grid; max-height: 46vh; overflow-y: auto; margin-inline: -4px; padding-inline: 4px; overscroll-behavior: contain; }
.n-res .m-gl { margin: 10px 0 2px; }
.n-food { display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--field); }
.n-food small { color: var(--muted); font-size: 13px; }
.n-meals .j-chip { --t: var(--accent); }
.n-meals .j-chip::before { display: none; }
.j-panel .j-btn svg { flex: none; }
/* Scanner */
.n-cam { position: relative; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.n-cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.n-aim { position: absolute; left: 12%; right: 12%; top: 34%; bottom: 34%; border: 2px solid rgba(255, 255, 255, .85); border-radius: 12px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .28); }
/* Photos */
.n-shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.n-shot { display: grid; justify-items: center; align-content: start; gap: 4px; padding: 10px 8px 12px; border-radius: 16px; cursor: pointer; text-align: center;
  background: var(--field); box-shadow: inset 0 0 0 1.5px dashed var(--line); border: 1.5px dashed color-mix(in srgb, var(--ink) 22%, transparent); }
.n-shot.has { border-style: solid; border-color: var(--accent); }
.n-shot img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.n-shot-ic { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 10px; color: var(--muted); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.n-shot-ic svg { width: 30px; height: 30px; }
.n-shot b { font-size: 13px; font-weight: 700; }
.n-shot b small, .n-shot > small { font-weight: 400; font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.n-wait { display: grid; justify-items: center; gap: 14px; padding: 18px 0; text-align: center; }
.n-spin { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--field); border-top-color: #ff6b95; animation: n-spin 0.9s linear infinite; }
@keyframes n-spin { to { transform: rotate(360deg); } }
.n-rem { margin: 0; padding: 10px 14px; border-radius: 12px; font-size: 14px; background: color-mix(in srgb, var(--accent) 10%, var(--field)); }
.n-pres { display: grid; }
.n-pi { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.n-pi:first-child { border-top: 0; }
.n-pi.off { opacity: .45; }
.n-pi > span { display: grid; gap: 1px; min-width: 0; }
.n-pi small { font-size: 12.5px; color: var(--muted); }
.n-pi em { font-style: normal; color: var(--z4); }
.n-pc input { width: 22px; height: 22px; accent-color: var(--accent); }
.n-pg { display: flex; align-items: center; gap: 4px; }
.n-pg input { width: 72px; text-align: right; font: 600 16px var(--body); color: var(--ink); background: var(--field); border: 1px solid transparent; border-radius: 10px; padding: 8px 10px; }
/* Semaine */
.n-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; align-items: end; margin-top: 12px; }
.n-wd { display: grid; justify-items: center; gap: 6px; }
.n-wd small { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.n-wd > span { position: relative; width: 100%; max-width: 34px; height: 140px; border-radius: 8px; background: var(--field); overflow: hidden; }
.n-wd i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 8px; background: var(--grad); }
.n-wd em { position: absolute; left: -2px; right: -2px; height: 2px; background: var(--ink); opacity: .55; }
.n-wd b { font-size: 12px; color: var(--muted); text-transform: uppercase; }
.n-wd.today b { color: var(--accent); }
@media (max-width: 420px) { .n-shots { gap: 6px; } .n-shot { padding: 8px 6px 10px; } }
.n-search input:focus, .n-search input:focus-visible { outline: none; box-shadow: none; border: 0; background: none; }
.n-srcl { font-size: 12px !important; opacity: .8; }

/* ================= Onglets des carnets : en haut, sous le titre, sur tous les écrans ================= */
.j-tabs, #carnet .tabs {
  position: sticky; top: 66px; bottom: auto; z-index: 9; border: 0; background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  padding: 8px 16px; margin: 0;
}
.j-tabs .in, #carnet .tabs .in {
  display: flex; gap: 4px; padding: 4px; width: max-content; max-width: 100%; margin: 0 auto; min-height: 0;
  background: var(--field); border-radius: 999px; overflow-x: auto; scrollbar-width: none;
}
.j-tabs .in::-webkit-scrollbar, #carnet .tabs .in::-webkit-scrollbar { display: none; }
.j-tab, #carnet .tabs button {
  flex: none; flex-direction: row; height: 38px; padding: 0 14px; gap: 7px; font: 600 13.5px var(--body); border-radius: 999px; white-space: nowrap;
}
.j-tab svg, #carnet .tabs button svg { width: 17px; height: 17px; }
.j-tab[aria-current="page"], #carnet .tabs button[aria-current="page"], #carnet .tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
#j-view { padding-bottom: 40px; }
/* Téléphone : les onglets se partagent toute la largeur, aucun n'est coupé */
@media (max-width: 560px) {
  .j-tabs, #carnet .tabs { padding: 8px 10px; }
  .j-tabs .in, #carnet .tabs .in { width: 100%; gap: 2px; overflow: visible; }
  .j-tab, #carnet .tabs button { flex: 1 1 auto; min-width: 0; padding: 0 4px; justify-content: center; font-size: clamp(11px, 3.35vw, 13px); letter-spacing: -.01em; }
  .j-tab svg, #carnet .tabs button svg { display: none; }
}
/* D'où vient l'objectif du jour */
.n-burn { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 14px; color: var(--muted); }
.n-burn span { display: inline-flex; align-items: center; gap: 7px; }
.n-burn b { color: var(--ink); font-variant-numeric: tabular-nums; }
.n-burn i { width: 9px; height: 9px; border-radius: 3px; background: #6f7aa8; }
.n-burn i.z-sport { background: var(--c-velo, #4fd19e); }
.n-burn-t { margin: 6px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.n-burn-t a { color: var(--c-food, #ffc94d); }

/* Carnet de séances : dernière séance */
.lastc { display: flex; align-items: center; gap: 12px; }

/* ================= Téléphone : carnets plus compacts ================= */
@media (max-width: 560px) {
  .j-intro h1, .cf-intro h1 { font-size: clamp(22px, 7vw, 27px); }
  .j-intro, .cf-intro { padding-top: 20px; padding-bottom: 12px; gap: 8px; }
  .j-intro .links { font-size: 13px; gap: 4px 12px; }
  .j-h2 { font-size: 18px; }
  #j-view > section:not(.j-empty):not(.j-alert) { padding: 15px 16px; border-radius: 18px; }
  #j-view { gap: 14px; }
  .j-big span { font-size: 15px; }
  .j-btn { font-size: 14.5px; min-height: 40px; padding: 10px 14px; }
  .j-btn.big { min-height: 46px; font-size: 15px; }
  .j-tab, .j-tabs .in button { height: 34px; }
  .j-tabs, #carnet .tabs { padding-top: 6px; padding-bottom: 6px; }
  .j-fab { width: 52px; height: 52px; }
  .n-kcal b { font-size: 30px; }
  .n-ways { gap: 8px; }
  .n-way { padding: 12px 6px; }
  .n-way b { font-size: 13.5px; }
  .n-way small { font-size: 11.5px; }
  .n-burn { font-size: 13px; }
  .n-burn-t { font-size: 12.5px; }
  .j-panel { padding: 18px 16px; }
}

/* Fenêtres au-dessus de l'en-tête et de la barre du bas ; messages en bas, au-dessus de la barre */
.j-sheet { z-index: 70; }
.j-toast { top: auto; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 75; pointer-events: none; }
.j-sheet:not([hidden]) ~ .j-toast { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 980px) { .j-toast { bottom: 28px; } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* Import d'activités */
.imp-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; font: 600 14px var(--body); color: var(--accent); cursor: pointer; }
.imp-h { display: flex; align-items: center; gap: 10px; } .imp-h .j-h2 { flex: 1; }
.imp-help summary { cursor: pointer; font-size: 14px; color: var(--muted); }
.imp-help ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13.5px; color: var(--muted); }
.imp-pick { cursor: pointer; }
.imp-rows { display: grid; gap: 6px; max-height: 44vh; overflow: auto; }
.imp-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--field); }
.imp-row span { display: grid; gap: 2px; min-width: 0; } .imp-row b { font-size: 14px; } .imp-row small { font-size: 12.5px; color: var(--muted); }
.imp-row select { font-size: 14px; padding: 6px 8px; max-width: 128px; }
.imp-row.dup { opacity: .65; }
.imp-err { color: #ff8f9d; font-size: 13.5px; margin: 0; }
#imp-list { display: grid; gap: 12px; }

/* Rappels (calendrier) */
.rp-f { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.rp-f legend { font-weight: 700; font-size: 15px; margin-bottom: 8px; padding: 0; }
.rp-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.rp-days button { height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--field); color: var(--ink); font: 700 15px var(--body); cursor: pointer; }
.rp-days button[aria-pressed="true"] { background: var(--grad); color: #0d1024; border-color: transparent; }
.rp-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--field); cursor: pointer; }
.rp-row span { display: grid; gap: 1px; } .rp-row small { color: var(--muted); font-size: 12.5px; }
.rp-row input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); }
.rp-row input[type="time"] { font-size: 16px; padding: 8px 10px; }
.rp-sum { margin: 0; font-size: 14px; }
#rp-go.off { opacity: .45; pointer-events: none; }
a.j-btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }

/* ================= Tests physiques ================= */
#j-view > section.ts-top { display: grid; gap: 12px; }
.ts-g { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#j-view > section.ts-grid-wrap.ts-grid-wrap.ts-grid-wrap { background: none; box-shadow: none; padding: 0; display: grid; gap: 10px; }
.ts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.ts-card { position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name name" "val spark" "lv spark" "d spark"; align-items: end; gap: 4px 10px;
  text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; color: var(--ink); font: inherit; cursor: pointer; }
.ts-card:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.ts-name { grid-area: name; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.ts-val { grid-area: val; font: 800 24px/1.1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ts-none { font: 600 14px var(--body); color: var(--muted); }
.ts-lv { grid-area: lv; justify-self: start; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--field); color: var(--muted); white-space: nowrap; }
.ts-lv.l1 { background: color-mix(in srgb, #ffcf5c 18%, transparent); color: #ffcf5c; }
.ts-lv.l2 { background: color-mix(in srgb, #4fd19e 18%, transparent); color: #4fd19e; }
.ts-lv.l3 { background: color-mix(in srgb, #9a83ff 22%, transparent); color: #c4b5ff; }
.ts-d { grid-area: d; font-size: 12.5px; font-weight: 600; }
.ts-d.up { color: #4fd19e; } .ts-d.down { color: #ff8f9d; }
.ts-spark { grid-area: spark; width: 96px; height: 34px; align-self: center; }
.ts-spark polyline { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.ts-spark circle { fill: var(--accent); }
.ts-sh { display: flex; align-items: center; gap: 10px; } .ts-sh .j-h2 { flex: 1; }
.ts-how summary { cursor: pointer; font-weight: 600; font-size: 14.5px; }
.ts-how p { margin: 8px 0 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
.ts-add { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.ts-add .j-f small { display: none; }
.ts-hist { display: grid; margin-top: 6px; }
.ts-hist > div { display: grid; grid-template-columns: 1fr auto auto 32px; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ts-hist b { font-variant-numeric: tabular-nums; }
.ts-del { width: 30px; height: 30px; border-radius: 9px; border: 0; background: var(--field); color: var(--muted); font-size: 18px; cursor: pointer; }
.ts-ref { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 14px; }
.ts-ref td { padding: 7px 0; border-bottom: 1px solid var(--line); } .ts-ref td.n { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .ts-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .ts-card { grid-template-columns: 1fr; grid-template-areas: "name" "val" "lv" "d" "spark"; padding: 12px; border-radius: 16px; }
  .ts-val { font-size: 20px; }
  .ts-spark { width: 100%; height: 26px; }
  .ts-add { grid-template-columns: 1fr 1fr; } .ts-add .j-btn { grid-column: 1 / -1; }
}
.ts-hist .ts-lv, .ts-ref .ts-lv { grid-area: auto; }
