:root {
  --bg: #10130e;
  --bg2: #171b13;
  --panel: #1c2118;
  --panel2: #232a1e;
  --ink: #ece7d8;
  --ink-soft: #c7c3b4;
  --muted: #8f9680;
  --line: rgba(236, 231, 216, 0.12);
  --line2: rgba(236, 231, 216, 0.22);
  --accent: #e4b24c;
  --accent-ink: #2a2110;
  --win: #a8d84b;
  --loss: #e4572e;
  --warn: #e0863a;
  --info: #6cc0d8;
  --info-ink: #10130e;
  --chart: #3987e5; /* barres des graphiques (validé dataviz, fond sombre) */
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  /* Display condensé « dossard / tableau d'affichage » — sans dépendance, replis système. */
  --display:
    'Roboto Condensed', 'Arial Narrow', 'Franklin Gothic Medium', 'Helvetica Neue Condensed', 'Liberation Sans Narrow',
    var(--sans);
  --radius: 14px;
  --r-sm: 10px;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #efe9db;
    --bg2: #f4efe4;
    --panel: #fbf8f0;
    --panel2: #f2ecdd;
    --ink: #20241a;
    --ink-soft: #41473a;
    --muted: #5f6754;
    --line: rgba(32, 36, 26, 0.12);
    --line2: rgba(32, 36, 26, 0.24);
    --accent: #86600f;
    --accent-ink: #fff6e3;
    --win: #4f8112;
    --loss: #c63f1c;
    --warn: #a3500d;
    --warn: #a3500d;
    --info: #1f7d97;
    --info-ink: #ffffff;
    --chart: #2a78d6; /* barres des graphiques (validé dataviz, fond clair) */
  }
}
:root[data-theme='dark'] {
  --bg: #10130e;
  --bg2: #171b13;
  --panel: #1c2118;
  --panel2: #232a1e;
  --ink: #ece7d8;
  --ink-soft: #c7c3b4;
  --muted: #8f9680;
  --line: rgba(236, 231, 216, 0.12);
  --line2: rgba(236, 231, 216, 0.22);
  --accent: #e4b24c;
  --accent-ink: #2a2110;
  --win: #a8d84b;
  --loss: #e4572e;
  --warn: #e0863a;
  --info: #6cc0d8;
  --info-ink: #10130e;
  --chart: #3987e5; /* barres des graphiques (validé dataviz, fond sombre) */
}
:root[data-theme='light'] {
  --bg: #efe9db;
  --bg2: #f4efe4;
  --panel: #fbf8f0;
  --panel2: #f2ecdd;
  --ink: #20241a;
  --ink-soft: #41473a;
  --muted: #5f6754;
  --line: rgba(32, 36, 26, 0.12);
  --line2: rgba(32, 36, 26, 0.24);
  --accent: #86600f;
  --accent-ink: #fff6e3;
  --win: #4f8112;
  --loss: #c63f1c;
  --warn: #a3500d;
  --info: #1f7d97;
  --info-ink: #ffffff;
  --chart: #2a78d6; /* barres des graphiques (validé dataviz, fond clair) */
}
* {
  box-sizing: border-box;
}
/* L'attribut hidden doit TOUJOURS gagner, même contre un display:flex/grid de classe
   (sinon topbar, barre d'onglets et badges restent visibles sur l'écran de connexion). */
[hidden] {
  display: none !important;
}
html,
body {
  margin: 0;
}
body {
  background: radial-gradient(900px 500px at 90% -10%, rgba(228, 178, 76, 0.06), transparent 60%), var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  text-wrap: balance;
}
button {
  font-family: inherit;
  color: inherit; /* sinon les <button> (ex. .lg-item) tombent en noir et deviennent illisibles */
  cursor: pointer;
}
input,
select {
  font-family: inherit;
  color: inherit;
}
.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
a {
  color: var(--accent);
}

/* top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(var(--bg2), var(--bg));
  border-bottom: 1px solid var(--line2);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 10px 14px;
  padding-top: calc(10px + env(safe-area-inset-top));
}
/* marque : dossard (bib) + nom de la ligue façon maillot */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  padding: 2px;
  margin: -2px;
  border-radius: 10px;
  flex: 0 1 auto;
  min-width: 0;
}
.brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.brand .bib {
  flex: none;
  position: relative;
  width: 34px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 5px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  transform: rotate(-4deg);
  transition:
    transform 0.18s ease,
    filter 0.18s ease;
}
/* perforations du dossard, en haut */
.brand .bib::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 5px;
  right: 5px;
  height: 3px;
  border-radius: 3px;
  background: radial-gradient(circle at 2px 1px, rgba(0, 0, 0, 0.3) 1px, transparent 1.4px) 0 0 / 6px 3px repeat-x;
  opacity: 0.6;
}
.brand .bib i {
  font-family: var(--display);
  font-style: normal;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.02em;
  margin-top: 2px;
}
.brand:hover .bib {
  transform: rotate(-4deg) translateY(-1px);
  filter: brightness(1.06);
}
.brand .wordmark {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 18px;
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.brand .wordmark b {
  color: var(--accent);
}
/* Sur petits écrans, boutons compacts (icône seule pour les libellés longs). */
@media (max-width: 460px) {
  .topbar .btn-label {
    display: none;
  }
}
.topbar .sp {
  flex: 1;
}
.iconbtn {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  border-radius: 9px;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 600;
}
.iconbtn:hover {
  border-color: var(--line2);
  color: var(--ink);
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 18px 16px 90px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.h-sec {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 12px;
}
.h-sec h2 {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.h-sec .rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.muted {
  color: var(--muted);
}
.hint {
  font-size: 13px;
  color: var(--muted);
}
.center {
  text-align: center;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 12px 28px -22px rgba(0, 0, 0, 0.7);
}
.card + .card {
  margin-top: 12px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.row.wrap {
  flex-wrap: wrap;
}
/* barre de forçage des phases (créateur) — classe dédiée pour éviter la collision
   de nom avec le conteneur de page « .wrap » (qui a un gros padding bas). */
.phasebar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

label.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
input.in,
select.in {
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  padding: 12px 13px;
  font-size: 16px;
  color: var(--ink);
  width: 100%;
}
input.in:focus,
select.in:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.btn {
  border: none;
  border-radius: var(--r-sm);
  padding: 13px 18px;
  font-size: 15px;
  font-weight: 800;
  background: var(--accent);
  color: var(--accent-ink);
  width: 100%;
}
.btn:hover {
  filter: brightness(1.08);
}
.btn:disabled {
  opacity: 0.45;
}
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line2);
  color: var(--ink-soft);
  font-weight: 700;
}
.btn.sm {
  padding: 9px 13px;
  font-size: 13px;
  width: auto;
}
.btn.mini {
  padding: 7px 11px;
  font-size: 12.5px;
  width: auto;
}
.btn.danger {
  background: transparent;
  border: 1px solid var(--loss);
  color: var(--loss);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid var(--line2);
  color: var(--ink-soft);
  white-space: nowrap;
}
.pill.ok {
  color: var(--win);
  border-color: var(--win);
}
.pill.warn {
  color: var(--accent);
  border-color: var(--accent);
}
.pill.lock {
  color: var(--loss);
  border-color: var(--loss);
}
.tag-code {
  font-family: var(--mono);
  font-size: 20px;
  letter-spacing: 0.22em;
  font-weight: 800;
  color: var(--accent);
}

/* league list */
.lg-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  width: 100%;
  text-align: left;
}
.lg-item:hover {
  border-color: var(--accent);
}
.lg-item .nm {
  font-weight: 800;
  font-size: 15px;
}
.lg-item .me {
  font-size: 12px;
  color: var(--muted);
}
.lg-item .chev {
  margin-left: auto;
  color: var(--muted);
  font-size: 20px;
}

/* tabs */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin: 6px 0 16px;
  overflow-x: auto;
}
.tabs button {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  padding: 12px 14px;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
}
.tabs button.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
/* accueil global : cartes « à faire » */
.todo-emoji {
  font-size: 22px;
  line-height: 1;
  flex: 0 0 auto;
}
.todo-item .nm {
  font-weight: 800;
}

/* barre d'onglets bas (navigation racine, mobile-first) */
.bottomnav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  background: var(--panel);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottomnav button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  padding: 8px 4px 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.bottomnav button .ni {
  font-size: 20px;
  line-height: 1;
  filter: grayscale(1);
  opacity: 0.75;
}
.bottomnav button.active {
  color: var(--accent);
}
.bottomnav button.active .ni {
  filter: none;
  opacity: 1;
}
/* le contenu ne doit pas passer sous la barre */
#app {
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}

/* chips de sélection (ligue, dans 🏆 Classements) */
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 6px;
}
.chip {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.chip.active {
  border-color: var(--accent);
  color: var(--ink);
}

/* accordéons de l'accueil : agir sans quitter la page */
.todo-wrap.open .todo-item {
  border-radius: var(--radius) var(--radius) 0 0;
  border-color: var(--accent);
}
.todo-body {
  border: 1px solid var(--accent);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--panel);
  padding: 14px;
}
.todo-body .betcard {
  border-color: var(--line);
}

/* pastille « actions restantes » sur l'onglet 🏠 */
.bottomnav .ni {
  position: relative;
}
.navbadge {
  position: absolute;
  top: -4px;
  right: -10px;
  background: var(--loss, #e5484d);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  padding: 3px 5px;
  border-radius: 999px;
  filter: none;
}

/* groupe de paris (onglet 🎰 Paris) */
.betsgroup .bg-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.betsgroup:hover {
  border-color: var(--accent);
}

/* member / predict rows */
.mrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.mrow:last-child {
  border-bottom: none;
}
.ava {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--panel2);
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--accent);
  border: 1px solid var(--line2);
  flex: none;
}
.mrow .info {
  min-width: 0;
}
.mrow .nm {
  font-weight: 700;
  font-size: 14.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mrow .sub {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mrow .right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.timein {
  width: 120px;
  text-align: center;
  font-family: var(--mono);
  font-size: 16px;
  padding: 10px;
}
.self {
  color: var(--accent);
}

/* leaderboard */
.lb {
  width: 100%;
  border-collapse: collapse;
}
.lb th,
.lb td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.lb th {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.lb td.num {
  text-align: right;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.lb .rk {
  width: 30px;
  color: var(--muted);
  font-family: var(--mono);
}
.lb tr.top1 td {
  background: linear-gradient(90deg, rgba(228, 178, 76, 0.1), transparent);
}
.lb tr.me td {
  box-shadow: inset 3px 0 0 var(--info);
}
.medal {
  font-size: 16px;
}

/* classement (nouveau) */
.lb-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lbrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.lbrow.top {
  border-color: var(--accent);
  background: linear-gradient(90deg, rgba(228, 178, 76, 0.1), transparent);
}
.lbrow.me {
  box-shadow: inset 3px 0 0 var(--info);
}
.lbrk {
  flex: none;
  width: 28px;
  text-align: center;
  font-family: var(--mono);
  font-size: 18px;
  color: var(--muted);
}
.lbrow.top .lbrk {
  font-size: 20px;
}
.lbmain {
  flex: 1;
  min-width: 0;
}
.lbhead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.lbhead b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lbpts {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
  flex: none;
}
.lbpts small {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.bar {
  height: 6px;
  border-radius: 6px;
  background: var(--bg2);
  overflow: hidden;
  margin: 6px 0 4px;
}
.bar span {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--accent), var(--win));
}
.lbsub {
  font-size: 12px;
  color: var(--muted);
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 30px 12px;
  font-size: 14px;
}
.toast {
  position: fixed;
  left: 50%;
  /* au-dessus de la barre d'onglets du bas (sinon le message passe dessous) */
  bottom: calc(84px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: 0.28s;
  z-index: 100;
  max-width: 90vw;
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.err {
  background: var(--loss);
  color: #fff;
}
.seg {
  display: inline-flex;
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: 11px;
  padding: 3px;
  gap: 2px;
}
.seg button {
  background: none;
  border: none;
  color: var(--muted);
  padding: 9px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
}
.seg button.active {
  background: var(--accent);
  color: var(--accent-ink);
}
.hero {
  text-align: center;
  padding: 26px 8px 10px;
}
.hero .lead {
  color: var(--ink-soft);
  font-size: 16px;
  max-width: 34ch;
  margin: 8px auto 0;
}
.or-sep {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.or-sep::before,
.or-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
/* Bouton Google : couleurs imposées par la charte Google (clair / sombre), logo « G » officiel en SVG. */
.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: var(--r-sm);
  text-decoration: none;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: #131314;
  color: #e3e3e3;
  border: 1px solid #8e918f;
  transition:
    background-color 0.15s,
    box-shadow 0.15s;
}
.google-btn:hover {
  background: #1f1f20;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.google-btn .g {
  flex: none;
  width: 18px;
  height: 18px;
}
@media (prefers-color-scheme: light) {
  .google-btn {
    background: #ffffff;
    color: #1f1f1f;
    border-color: #747775;
  }
  .google-btn:hover {
    background: #f8f9fa;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3);
  }
}
:root[data-theme='dark'] .google-btn {
  background: #131314;
  color: #e3e3e3;
  border-color: #8e918f;
}
:root[data-theme='dark'] .google-btn:hover {
  background: #1f1f20;
}
:root[data-theme='light'] .google-btn {
  background: #ffffff;
  color: #1f1f1f;
  border-color: #747775;
}
:root[data-theme='light'] .google-btn:hover {
  background: #f8f9fa;
}
.copy-link {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.copy-link input {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-family: var(--mono);
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--ink-soft);
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(30px, 9vw, 46px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.005em;
}
.hero h1 b {
  color: var(--accent);
}
.hero p {
  color: var(--muted);
  margin: 8px 0 0;
}
/* signature : ligne d'arrivée en damier */
.finish-line {
  height: 14px;
  width: min(240px, 62%);
  margin: 16px auto 2px;
  border-radius: 3px;
  background-image: repeating-conic-gradient(var(--ink) 0% 25%, transparent 0% 50%);
  background-size: 14px 14px;
  opacity: 0.42;
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}
/* onglets de course (créateur) : jeu / admin, pleine largeur */
.racetabs {
  display: flex;
  width: 100%;
  margin: 2px 0 18px;
}
.racetabs button {
  flex: 1;
  padding: 10px 12px;
}
.searchbox {
  position: relative;
}
.results {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  margin-top: 6px;
  max-height: 240px;
  overflow: auto;
}
.results button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  color: var(--ink);
  font-size: 13.5px;
}
.results button:hover {
  background: var(--panel2);
}
.kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  padding: 4px 0;
}

/* formulaire d'estimation */
.estim-head {
  display: flex;
  gap: 12px;
  align-items: center;
}
.estim-emoji {
  font-size: 30px;
  flex: none;
}
.estim-title {
  font-weight: 800;
  font-size: 16px;
}
.run-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 14px;
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  background: var(--bg2);
  cursor: pointer;
}
.run-toggle input {
  width: 22px;
  height: 22px;
}
.estim-input {
  max-width: 160px;
  text-align: center;
  font-size: 24px;
  font-weight: 800;
}
/* nom réel grisé à côté du pseudo */
.realname {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.88em;
}
/* carte de pari + curseur */
.betcard {
  padding: 14px 16px;
}
/* pari déjà posé : liseré vert discret + fond posé */
.betcard.done {
  border-color: color-mix(in srgb, var(--win) 45%, var(--line2));
  box-shadow:
    inset 3px 0 0 var(--win),
    0 12px 28px -22px rgba(0, 0, 0, 0.7);
}
.bc-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
}
.bc-who {
  min-width: 0;
  flex: 1;
}
.bc-who .nm {
  font-weight: 800;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bc-tags {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}
/* ancre : l'estimation du coureur, point de référence du curseur */
.bc-anchor {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.1;
}
.bc-anchor .mono {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
}
.bc-anchor small {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.bc-flag {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--win);
  margin: -4px 0 8px;
}
.betadjust {
  display: flex;
  align-items: center;
  gap: 8px;
}
.stepb {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 9px;
  border: 1px solid var(--line2);
  background: var(--bg2);
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}
.stepb:active {
  background: var(--panel2);
}
.sliderwrap {
  position: relative;
  padding-top: 18px;
}
.vignettes {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 0;
  height: 16px;
  pointer-events: none;
}
.readbar {
  height: 8px;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--info), var(--line2), var(--loss));
}
.vig {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  min-width: 18px;
  height: 16px;
  padding: 0 3px;
  border-radius: 8px;
  background: var(--info);
  color: var(--bg);
  font: 700 10px var(--mono);
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 2px var(--panel);
}
/* repère de l'estimation du coureur sur la piste (là où le curseur pivote) */
.slider-anchor {
  position: absolute;
  top: 20px;
  height: 20px;
  width: 0;
  border-left: 2px solid var(--ink-soft);
  transform: translateX(-1px);
  opacity: 0.8;
  pointer-events: none;
  z-index: 0;
}
.betline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 2px 0 8px;
}
.bettime {
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
}
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--info), var(--line2), var(--loss));
  outline: none;
  margin: 6px 0;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--panel);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}
.slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--panel);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}
.slider:focus {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 20px;
}
/* Piste de pari entre deux embouts : 🔥 plus rapide / 🐌 plus lent */
.trackrow {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 10px;
}
.trackrow .sliderwrap {
  min-width: 0;
}
.cap {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 1px;
  border-radius: 50%;
  font-size: 17px;
  line-height: 1;
}
.cap-fast {
  background: rgba(108, 192, 216, 0.16);
  background: color-mix(in srgb, var(--info) 18%, transparent);
  box-shadow: inset 0 0 0 1.5px var(--info);
}
.cap-slow {
  background: rgba(228, 87, 46, 0.16);
  background: color-mix(in srgb, var(--loss) 18%, transparent);
  box-shadow: inset 0 0 0 1.5px var(--loss);
}
/* Mode optimiste : la piste s'arrête à l'estimation (🎯), pas de zone « plus lent » */
.cap-est {
  background: var(--panel2);
  box-shadow: inset 0 0 0 1.5px var(--ink-soft);
}
.trackrow:has(.cap-est) .slider {
  background: linear-gradient(90deg, var(--info), var(--line2));
}
.trackrow:has(.cap-est) .slider-anchor {
  display: none;
}
.tk-est {
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}
.tk-est b {
  color: var(--ink-soft);
}
@media (min-width: 700px) {
  .cap {
    width: 36px;
    height: 36px;
    font-size: 19px;
    margin-bottom: -1px;
  }
}
.coteline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
.cote-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg2);
  border: 1px solid var(--risk, var(--accent));
  border-radius: 12px;
  padding: 6px 14px;
  min-width: 76px;
  transition: border-color 0.15s ease;
}
.cote-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--risk, var(--accent));
  line-height: 1;
}
.cote-lab {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
/* la cote change de couleur selon l'audace du pari */
.cote-badge[data-risk='safe'] {
  --risk: var(--info);
}
.cote-badge[data-risk='mid'] {
  --risk: var(--accent);
}
.cote-badge[data-risk='hot'] {
  --risk: #e0863a;
}
.cote-badge[data-risk='max'] {
  --risk: var(--loss);
}
.gain {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  color: var(--ink-soft);
}
.gain-top b {
  color: var(--win);
  font-size: 18px;
}
.gain-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 8px;
  font-size: 12px;
}
/* étiquette « langage clair » de l'audace du pari */
.riskchip {
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--info);
}
.cote-badge[data-risk='mid'] ~ .gain .riskchip {
  color: var(--accent);
}
.cote-badge[data-risk='hot'] ~ .gain .riskchip {
  color: #e0863a;
}
.cote-badge[data-risk='max'] ~ .gain .riskchip {
  color: var(--loss);
}
/* allure au km, sous le champ de pronostic */
.betpace {
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin: -4px 0 8px;
  min-height: 14px;
}
/* colonne bouton + état de validation */
.betact {
  flex-shrink: 0;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}
.betstatus {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.betstatus.warn {
  color: var(--accent);
}
.betstatus.ok {
  color: var(--win);
}
/* pari modifié mais pas encore validé : on attire l'œil sur le bouton */
.btn.mini.attn {
  animation: attn-pulse 1.4s ease-in-out infinite;
}
@keyframes attn-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
  }
  50% {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 48%, transparent);
  }
}
.betcard.dirty {
  border-color: var(--accent);
  box-shadow:
    inset 3px 0 0 var(--accent),
    0 12px 28px -22px rgba(0, 0, 0, 0.7);
}
.betlist {
  border-top: 1px solid var(--line);
  margin-top: 6px;
  padding-top: 6px;
}

/* --- page résultats : histoire coureur par coureur --- */
.resrunner {
  padding: 14px 16px;
}
.rr-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.rr-id {
  flex: 1;
  min-width: 0;
}
.rr-id .nm {
  font-weight: 800;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rr-meta {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.rr-time {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.05;
}
.rr-real {
  font-size: 21px;
  font-weight: 800;
  color: var(--ink);
}
.rr-time small {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.rr-time.pending .rr-real {
  color: var(--muted);
}
.rr-deltaline {
  margin-top: 10px;
}
.rr-delta {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--line2);
}
.rr-delta.faster {
  color: var(--win);
  border-color: color-mix(in srgb, var(--win) 55%, var(--line2));
}
.rr-delta.slower {
  color: var(--loss);
  border-color: color-mix(in srgb, var(--loss) 55%, var(--line2));
}
.rr-delta.exact {
  color: var(--accent);
  border-color: var(--accent);
}
.rr-preds {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.rr-preds-lab {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 6px;
}
.pred {
  display: grid;
  grid-template-columns: 18px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 9px;
  font-size: 13.5px;
}
.pred.win {
  background: linear-gradient(90deg, rgba(228, 178, 76, 0.13), transparent);
}
.pred-rk {
  text-align: center;
}
.pred-who {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pred-bet {
  color: var(--ink-soft);
  font-size: 12.5px;
  white-space: nowrap;
}
.pred-cote {
  color: var(--muted);
  font-size: 11px;
}
.pred-pts {
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
}
.pred-pts.got {
  color: var(--win);
}
.pred-empty {
  font-size: 13px;
  color: var(--muted);
  padding: 2px 0;
}

/* notifications */
.notif-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 10px;
  background: var(--loss);
  color: #fff;
  font: 800 11px var(--mono);
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 2px var(--bg2);
}
/* overlay notifications (se ferme au clic sur le fond) */
.ov {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(8, 10, 6, 0.55);
  backdrop-filter: blur(2px);
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: calc(64px + env(safe-area-inset-top)) 14px 14px;
}
.ov[hidden] {
  display: none;
}
.ov-panel {
  width: 100%;
  max-width: 400px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: ov-in 0.18s ease;
}
@keyframes ov-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.ov-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.ov-body {
  padding: 12px 14px;
  overflow-y: auto;
}
@media (max-width: 560px) {
  .ov {
    justify-content: center;
    align-items: flex-end;
    padding: 0;
  }
  .ov-panel {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 16px 16px 0 0;
  }
}
.notif {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.notif + .notif {
  margin-top: 10px;
}
.notif.unread {
  border-color: var(--accent);
  background: linear-gradient(90deg, rgba(228, 178, 76, 0.08), transparent);
}
.notif .ic {
  flex: none;
  font-size: 18px;
}
.notif .tx {
  font-size: 14.5px;
  color: var(--ink-soft);
}
.notif .tx b {
  color: var(--ink);
}
.notif {
  cursor: pointer;
}
.notif:hover {
  border-color: var(--line2);
}
.notif .go {
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}
.notif-x {
  margin-left: auto;
  flex: none;
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 14px;
  padding: 2px 4px;
  cursor: pointer;
}
.notif-x:hover {
  color: var(--loss);
}
/* épreuves auto-remplies */
.eplist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.eplist label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line2);
  border-radius: 10px;
  background: var(--bg2);
  cursor: pointer;
  font-size: 14px;
}
.eplist label:hover {
  border-color: var(--accent);
}
.eplist input {
  width: 18px;
  height: 18px;
}
.eplist .d {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-family: var(--mono);
}
.info-box {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.info-box b {
  color: var(--ink);
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* En-tête mobile : cloche + avatar restent sur la même ligne que la marque. */
@media (max-width: 420px) {
  .topbar {
    flex-wrap: nowrap;
  }
}
/* « Ajouter une course » replié (évite qu'un nouveau membre croie devoir le remplir). */
.addrace > summary {
  list-style: none;
  cursor: pointer;
}
.addrace > summary::-webkit-details-marker {
  display: none;
}
.addrace[open] > summary {
  opacity: 0.7;
}

/* ---------- accessibilité : lisibilité et cibles tactiles (≥ 44 px) ---------- */
label.field {
  font-size: 13px;
}
.hint {
  font-size: 14px;
}
.eyebrow {
  font-size: 12px;
}
.stepb {
  width: 44px;
  height: 44px;
}
.iconbtn {
  min-height: 44px;
  min-width: 44px;
}
.btn.sm,
.btn.mini {
  min-height: 44px;
}
.btn.mini {
  font-size: 14px;
}
.slider {
  height: 10px;
  margin: 12px 0;
}
.slider::-webkit-slider-thumb {
  width: 34px;
  height: 34px;
}
.slider::-moz-range-thumb {
  width: 34px;
  height: 34px;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

a.btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* badges façon MPG */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 16px;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 7px;
}
.badge small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}
/* duel */
.duelrow {
  display: grid;
  grid-template-columns: 1fr 64px 64px;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.duelrow b {
  text-align: right;
}
.duelrow b.win {
  color: var(--win);
}
.duelrow.head {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
}
.duelrow.total {
  border-bottom: none;
  font-weight: 700;
}
.linkbtn {
  background: none;
  border: none;
  color: var(--muted);
  text-decoration: underline;
  font-size: 12px;
  padding: 4px;
  cursor: pointer;
}
.badge .bn {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
}

/* carte de pari sur petit écran : rien ne déborde */
.bc-tags .pill {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bc-who .nm {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.betline {
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.betadjust {
  flex: 1;
  justify-content: center;
  min-width: 0;
}
.vig {
  cursor: default;
}

/* ---------- PC : la barre d'onglets monte dans l'en-tête ----------
   En bas d'écran, elle se retrouvait sous la barre des tâches (Linux notamment). */
@media (min-width: 1000px) {
  .bottomnav {
    top: 0;
    bottom: auto;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    height: calc(64px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 0 0;
    background: transparent;
    border-top: none;
    gap: 4px;
  }
  .bottomnav button {
    flex: none;
    flex-direction: row;
    gap: 6px;
    padding: 8px 14px;
    font-size: 14px;
    border-radius: 10px;
    align-self: center;
  }
  .bottomnav button:hover {
    background: var(--panel2);
    color: var(--ink);
  }
  .bottomnav button.active {
    background: var(--panel);
  }
  .wrap {
    padding-bottom: 40px;
  }
  .toast {
    bottom: 22px;
  }
}

/* vignettes des paris : survolables (info-bulle immédiate) sans gêner le curseur */
.vig {
  pointer-events: auto;
}
.vig[data-tip]:hover::after,
.vig[data-tip].tip-on::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  white-space: pre-line;
  width: max-content;
  max-width: min(78vw, 300px);
  text-align: left;
  background: var(--ink);
  color: var(--bg);
  font: 600 12px/1.5 var(--sans);
  padding: 5px 8px;
  border-radius: 7px;
  z-index: 30;
  pointer-events: none;
}

/* ---------- 📊 tableau de bord ---------- */
.cols-wrap {
  position: relative;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line2);
  padding-top: 4px;
}
.cols-max {
  position: absolute;
  top: -1px;
  left: 0;
  transform: translateY(-100%);
  font-size: 11px;
}
.cols {
  height: 120px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
}
.cols .col {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  cursor: default;
  outline: none;
}
.cols .col span {
  width: 100%;
  max-width: 24px;
  background: var(--chart);
  border-radius: 4px 4px 0 0;
}
.cols .col:hover span,
.cols .col:focus span {
  filter: brightness(1.15);
}
.cols .col:hover::after,
.cols .col:focus::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  white-space: pre-line;
  width: max-content;
  max-width: min(78vw, 300px);
  text-align: left;
  background: var(--ink);
  color: var(--bg);
  font: 600 12px/1.5 var(--sans);
  padding: 4px 8px;
  border-radius: 6px;
  z-index: 5;
  pointer-events: none;
}
.cols .col:first-child:hover::after,
.cols .col:first-child:focus::after {
  left: 0;
  transform: none;
}
.cols .col:last-child:hover::after,
.cols .col:last-child:focus::after {
  left: auto;
  right: 0;
  transform: none;
}
.cols-axis {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}
/* Liste détaillée des paris (sous les ronds) */
.betslist {
  margin-top: 6px;
  font-size: 14px;
}
.betslist summary {
  cursor: pointer;
  color: var(--ink-soft);
  font-weight: 700;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}
.betslist summary::-webkit-details-marker {
  display: none;
}
.betslist summary::before {
  content: '▸';
  color: var(--accent);
  transition: transform 0.15s ease;
}
.betslist[open] summary::before {
  transform: rotate(90deg);
}
.betslist ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.betslist li {
  display: grid;
  grid-template-columns: 1fr auto 5.5em;
  gap: 10px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}
.betslist li .nm {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.betslist li > :last-child {
  text-align: right;
}

/* Saisie des résultats : chrono + bouton abandon empilés */
.resin {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.dnfbtn.on {
  background: var(--loss);
  border-color: var(--loss);
  color: #fff;
}

/* Sur PC, le survol des bulles donne les paris : la liste ne sert qu'au tactile */
@media (hover: hover) and (pointer: fine) {
  .betslist {
    display: none;
  }
}

/* ---------- Saisie de temps « Chrono » : trois cases h / min / s ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.tf {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.tf-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.tf-boxes {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  align-self: flex-start;
}
.tf-in {
  height: 46px;
  padding: 0 4px;
  text-align: center;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: 9px;
  -webkit-appearance: none;
  appearance: none;
}
.tf-h {
  width: calc(1ch + 18px);
}
.tf-m,
.tf-s {
  width: calc(2ch + 18px);
}
.tf-in::placeholder {
  color: var(--muted);
  opacity: 0.6;
}
.tf-in:focus {
  outline: none;
  border: 2px solid var(--accent);
}
.tf-u {
  font-size: 13px;
  color: var(--muted);
  margin-right: 4px;
}
.tf-msg {
  margin: 0;
  min-height: 0;
  font-size: 13px;
  color: var(--muted);
}
.tf-msg:empty {
  display: none;
}
.tf-msg.error,
.tf.is-error .tf-msg {
  color: var(--loss);
  font-weight: 700;
}
.tf-msg.warn,
.tf.is-warn .tf-msg {
  color: var(--warn);
  font-weight: 700;
}
.tf.is-error .tf-in {
  border-color: var(--loss);
}
.tf.is-warn .tf-in {
  border-color: var(--warn);
}
/* Dans la carte de pari : −pas [ cases ] +pas, centré ; le message passe sous la ligne. */
.betadjust .tf {
  align-items: center;
  flex: none;
}
.betadjust .tf-boxes {
  align-self: center;
}
.betadjust .tf-u {
  margin-right: 2px;
}
.stepb {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.betcard > .tf-msg {
  margin: -2px 0 6px;
  text-align: center;
}
.estim-locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 12px;
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: 12px;
}
.estim-locked b {
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
}
/* Résultats (admin) : la ligne passe à la ligne pour laisser la place aux cases et au message. */
.resrow {
  flex-wrap: wrap;
}
.resrow .resin {
  align-items: flex-end;
}
.dnf-txt {
  font-weight: 700;
  color: var(--loss);
}
.res-save {
  position: sticky;
  bottom: 12px;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2;
}

/* Bulles regroupées (paris trop proches) et info-bulles calées sur le bord le plus proche */
/* Bulle regroupée : même couleur que les bulles simples, chiffre + effet de pile */
.vig {
  color: var(--info-ink);
}
.vig.grp {
  min-width: 20px;
  margin-left: -2px; /* recentre l'ensemble bulle + pile sur la position moyenne */
  background: var(--info);
  color: var(--info-ink);
  font-variant-numeric: tabular-nums;
  box-shadow:
    0 0 0 2px var(--panel),
    4px -3px 0 0 var(--info),
    4px -3px 0 2px var(--panel);
}
.vig.tip-r[data-tip]:hover::after,
.vig.tip-r[data-tip].tip-on::after {
  left: auto;
  right: -4px;
  transform: none;
}
.vig.tip-l[data-tip]:hover::after,
.vig.tip-l[data-tip].tip-on::after {
  left: -4px;
  transform: none;
}

/* ---------- 🎯 Paris v2 : bandeau « En jeu » + une carte par course ---------- */
.pp-c0 {
  --hue: var(--accent);
}
.pp-c1 {
  --hue: var(--win);
}
.pp-c2 {
  --hue: var(--info);
}
.pp-c3 {
  --hue: var(--warn);
}
.pp-c4 {
  --hue: var(--loss);
}
.pp-c5 {
  --hue: var(--chart);
}
.pp-hero {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 12px 28px -22px rgba(0, 0, 0, 0.7);
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}
.pp-kpi {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.pp-big {
  font-family: var(--display);
  font-weight: 800;
  font-size: 44px;
  line-height: 0.95;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.pp-big small {
  font-size: 18px;
  font-weight: 700;
  margin-left: 4px;
}
.pp-stats {
  text-align: right;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
}
.pp-stats b {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.pp-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 800;
  text-align: left;
}
.pp-alert span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pp-alert span em {
  font-style: normal;
  font-weight: 600;
}
.pp-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
/* Téléphone : une seule pile dans l'ordre des dates (les colonnes s'effacent) */
.pp-col {
  display: contents;
}
.pp-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px -22px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  cursor: pointer;
  transition:
    border-color 0.15s,
    transform 0.1s;
}
.pp-card:hover,
.pp-card.is-hot {
  border-color: var(--accent);
}
.pp-card:active {
  transform: scale(0.99);
}
.pp-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.pp-head {
  padding: 14px 16px 10px;
}
.pp-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pp-title h3 {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pp-chev {
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}
.pp-cd {
  flex: none;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid var(--line2);
  color: var(--ink-soft);
}
.pp-cd.soon {
  border-color: var(--accent);
  color: var(--accent);
}
.pp-cd.now {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.pp-meta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}
.pp-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 16px;
  border-top: 1px solid var(--line);
}
button.pp-row {
  width: 100%;
  background: none;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  text-align: left;
  font: inherit;
}
.pp-ava {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  background: color-mix(in srgb, var(--hue, var(--muted)) 26%, var(--panel));
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--hue, var(--muted)) 70%, transparent);
}
.pp-who {
  min-width: 0;
}
.pp-nm {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pp-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.3;
  white-space: nowrap;
}
.pp-sub b {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  font-weight: 700;
}
.pp-gap {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  margin-left: 8px;
}
.pp-odds {
  text-align: right;
  line-height: 1.1;
}
.pp-cote {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}
.pp-max {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.pp-r0 .pp-cote {
  color: var(--muted);
  font-weight: 700;
}
.pp-r2 .pp-cote,
.pp-r3 .pp-cote {
  color: var(--accent);
}
.pp-me {
  background: var(--panel2);
}
.pp-me .pp-ava {
  background: var(--ink);
  color: var(--panel);
  box-shadow: none;
  font-size: 12px;
}
.pp-me .pp-time {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 18px;
  font-weight: 800;
}
.pp-rest {
  padding: 8px 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.pp-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.pp-gain {
  color: var(--muted);
}
.pp-gain b {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  font-size: 16px;
  font-weight: 800;
}
.pp-edit {
  color: var(--ink-soft);
  font-weight: 700;
}
.pp-done {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  margin: 16px auto 0;
  padding: 8px 16px;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.pp-done:hover {
  color: var(--ink);
}
.pp-empty {
  text-align: center;
  padding: 36px 16px;
}
.pp-empty .e {
  font-size: 44px;
}
.pp-empty p {
  margin: 8px 0 16px;
  color: var(--muted);
}
@media (min-width: 900px) {
  .wrap:has(> .pp) {
    max-width: 1100px;
  }
  /* PC : deux colonnes qui s'empilent chacune de leur côté (pas de trous entre les cartes) */
  .pp-grid {
    flex-direction: row;
    align-items: flex-start;
  }
  .pp-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-width: 0;
  }
  .pp-hero {
    grid-template-columns: 1fr minmax(0, 420px);
    align-items: center;
  }
  .pp-hero.solo {
    grid-template-columns: 1fr;
  }
}

.pp-big .pp-upto {
  font-size: 15px;
  font-weight: 700;
  margin: 0 6px 0 0;
}
/* Petits téléphones (≤ 380 px) : chrono > 1 h + écart > 10 min doivent tenir sur la ligne */
@media (max-width: 380px) {
  .pp-sub {
    font-size: 12px;
  }
  .pp-gap {
    margin-left: 4px;
  }
  .pp-row {
    gap: 10px;
  }
}
/* Très petits écrans (≤ 340 px, ex. iPhone SE 1re génération) : l'écart passe sous le chrono */
@media (max-width: 340px) {
  .pp-sub {
    white-space: normal;
  }
  .pp-gap {
    display: block;
    margin-left: 0;
  }
  .pp-dot {
    display: none;
  }
}

/* =====================================================================
   À COPIER DANS style.css (fin de fichier). Tokens existants uniquement.
   ===================================================================== */

/* ---------- En-tête : partie droite (cloche + avatar) ---------- */
.tb-right {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-right: -6px;
}
.tb-bell {
  position: relative;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: none;
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
}
/* même traitement que les icônes des onglets : grisé au repos, en couleur si actif/nouveau */
.tb-bell .ni {
  filter: grayscale(1);
  opacity: 0.75;
  transition:
    filter 0.15s,
    opacity 0.15s;
}
.tb-bell:hover,
.tb-bell[aria-expanded='true'] {
  background: var(--panel2);
}
.tb-bell:hover .ni,
.tb-bell[aria-expanded='true'] .ni,
.tb-bell.has-new .ni {
  filter: none;
  opacity: 1;
}
.tb-bell .notif-badge {
  top: 4px;
  right: 2px;
  font-size: 10px;
  box-shadow: 0 0 0 2px var(--bg2);
}
.tb-bell.ring .ni {
  animation: tb-ring 0.7s ease 1;
  transform-origin: 50% 8%;
}
@keyframes tb-ring {
  0%,
  100% {
    transform: none;
  }
  20% {
    transform: rotate(16deg);
  }
  40% {
    transform: rotate(-14deg);
  }
  60% {
    transform: rotate(9deg);
  }
  80% {
    transform: rotate(-5deg);
  }
}
.tb-me {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 6px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink);
}
.tb-me:hover {
  background: var(--panel2);
}
.tb-me .pp-ava {
  flex: none;
  font-family: var(--display);
  font-size: 16px;
}
.tb-nm {
  display: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  max-width: 14ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tb-me[aria-current='page'] .pp-ava {
  box-shadow:
    0 0 0 2px var(--bg2),
    0 0 0 4px var(--accent);
}
.tb-me[aria-current='page'] .tb-nm {
  color: var(--accent);
}
.tb-bell:focus-visible,
.tb-me:focus-visible,
.tb-x:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
@media (min-width: 1000px) {
  .tb-me {
    padding: 6px 14px 6px 6px;
  }
  .tb-nm {
    display: block;
  }
}

/* ---------- Panneau notifications ---------- */
.ov-head {
  padding: 4px 6px 4px 16px;
}
.ov-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ov-n {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--accent);
  color: var(--accent-ink);
}
.ov-acts {
  display: flex;
  align-items: center;
}
.ov-clear {
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.ov-clear:hover {
  color: var(--ink);
}
.tb-x {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  font-size: 16px;
}
.tb-x:hover {
  background: var(--panel2);
  color: var(--ink);
}
.ov-empty {
  display: grid;
  gap: 2px;
  padding: 28px 12px 32px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}
.ov-empty .e {
  font-size: 40px;
  line-height: 1.2;
}
.ov-empty b {
  color: var(--ink);
  font-size: 15px;
}

/* ---------- Profil (fiche joueur) ---------- */
.me {
  max-width: 560px;
  margin: 0 auto;
}
.pp-hero.me-hero {
  grid-template-columns: 1fr;
}
.me-id {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.pp-ava.me-ava {
  width: 64px;
  height: 64px;
  flex: none;
  font-family: var(--display);
  font-size: 30px;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--hue, var(--muted)) 70%, transparent);
}
.me-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 30px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.me-sub {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}
.me-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  padding-top: 12px;
  text-align: center;
}
.me-stats > div + div {
  border-left: 1px solid var(--line);
}
.me-stats b {
  display: block;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
}
.me-stats > div:first-child b {
  color: var(--accent);
}
.me-stats span {
  font-size: 12px;
  color: var(--muted);
}
.me-form {
  display: grid;
  gap: 14px;
}
.me-form label.field {
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  color: var(--ink-soft);
}
.me-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.me-help {
  margin-top: -8px;
  font-size: 13px;
  color: var(--muted);
}
.me-list {
  padding: 0;
  overflow: hidden;
}
.me-li {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 6px 16px;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
}
.me-li:first-child {
  border-top: 0;
}
a.me-li:hover,
button.me-li:hover {
  background: var(--panel2);
}
a.me-li:focus-visible,
button.me-li:focus-visible,
.me-logout:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.me-ic {
  width: 24px;
  flex: none;
  text-align: center;
  font-size: 18px;
}
.me-lt {
  flex: 1;
  min-width: 0;
}
.me-seg {
  flex: none;
}
.me-seg button {
  min-height: 44px;
  padding: 0 11px;
  font-size: 13px;
}
.me-logout {
  display: block;
  min-height: 44px;
  margin: 18px auto 0;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--loss);
  font-size: 15px;
  font-weight: 800;
}
.me-logout:hover {
  background: var(--panel2);
}
/* Suppression du compte : sous « Se déconnecter », plus discret ; la confirmation s'ouvre en place. */
.me-del-ask {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 700;
}
.me-del {
  margin-top: 18px;
}

/* Acceptation des conditions (inscription) + mentions légales de l'écran d'accueil */
.terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-soft);
  cursor: pointer;
}
.terms input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.terms a,
.terms-g a,
.legal-foot a {
  color: var(--accent);
}
.terms-g {
  margin-top: -4px;
  font-size: 12.5px;
}
.legal-foot {
  margin-top: 18px;
  font-size: 13px;
}

/* ---------- Admin (tableau de bord) ---------- */
.wrap:has(> .ad) {
  max-width: 1100px;
}
.ad-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 14px;
}
.ad-head h2 {
  flex: 1;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ad-refresh {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.ad-refresh:hover {
  color: var(--ink);
  border-color: var(--line2);
}
.ad-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.ad-kpi {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2px 8px;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px -22px rgba(0, 0, 0, 0.7);
  min-width: 0;
}
.ad-kpi-l {
  grid-column: 1 / -1;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.ad-kpi-v {
  font-family: var(--display);
  font-weight: 800;
  font-size: 36px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ad-kpi:first-child .ad-kpi-v {
  color: var(--accent);
}
.ad-kpi-v small {
  margin-left: 2px;
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
}
.ad-d {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  padding-bottom: 3px;
}
.ad-d.up {
  color: var(--win);
}
.ad-d.down {
  color: var(--loss);
}
.ad-d.flat {
  color: var(--muted);
}
.ad-spark {
  grid-column: 1 / -1;
  position: relative;
  height: 28px;
  margin-top: 8px;
}
.ad-spark svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.ad-spark polyline {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.75;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.ad-spark i {
  position: absolute;
  right: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--panel);
  transform: translateY(-50%);
}
.ad-since {
  grid-column: 1 / -1;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}
.ad-mini {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 10px -16px 0;
  padding: 0 16px 2px;
  scrollbar-width: none;
}
.ad-mini::-webkit-scrollbar {
  display: none;
}
.ad-chip {
  flex: none;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-size: 13px;
  color: var(--muted);
}
.ad-chip b {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  color: var(--ink);
}
.ad-watch {
  padding: 0;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--warn) 60%, var(--line));
}
.ad-watch-h {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ad-watch-h .ov-n {
  background: var(--warn);
  color: var(--bg);
}
.ad-al {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 8px 16px;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
}
button.ad-al:hover {
  background: var(--panel2);
}
.ad-al .e {
  font-size: 20px;
  text-align: center;
}
.ad-al b {
  display: block;
  font-size: 15px;
  line-height: 1.25;
}
.ad-al small {
  display: block;
  font-size: 13px;
  color: var(--muted);
}
.ad-ok {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-weight: 700;
}
.ad-ok span {
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}
.ad-chart {
  display: grid;
  gap: 12px;
}
.ad-chart-h {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ad-chart .seg {
  max-width: 100%;
  overflow-x: auto;
}
.ad-chart .seg button {
  min-height: 44px;
  padding: 0 10px;
  font-size: 13px;
  white-space: nowrap;
}
.ad-total {
  font-size: 14px;
  color: var(--muted);
}
.ad-total b {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 20px;
  color: var(--ink);
}
.ad-chart .cols {
  height: 140px;
  gap: 3px;
}
.ad-chart .cols .col span {
  max-width: 28px;
  background: color-mix(in srgb, var(--accent) 62%, var(--panel));
}
.ad-chart .cols .col.today span,
.ad-chart .cols .col:hover span,
.ad-chart .cols .col:focus span {
  background: var(--accent);
  filter: none;
}
.ad-chart .col-v {
  position: absolute;
  font: normal 800 12px var(--mono);
  color: var(--accent);
}
.ad-axis7 {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.ad-nodata {
  padding: 26px 8px;
  text-align: center;
  color: var(--muted);
}
.ad-nodata .e {
  font-size: 32px;
  display: block;
}
.ad-funnel {
  display: grid;
  gap: 12px;
}
.ad-step {
  display: grid;
  grid-template-columns: 104px 1fr 48px;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
}
.ad-step-t {
  height: 14px;
  border-radius: 7px;
  background: var(--panel2);
  overflow: hidden;
}
.ad-step-t i {
  display: block;
  height: 100%;
  border-radius: 7px;
  background: var(--accent);
}
.ad-step.leak .ad-step-t i {
  background: var(--warn);
}
.ad-step > b {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  text-align: right;
}
.ad-leak {
  margin-left: 4px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  color: var(--warn);
}
.ad-list {
  padding: 0;
  overflow: hidden;
}
.ad-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 16px;
  border-top: 1px solid var(--line);
}
/* Ligue du tableau de bord : bouton ⋯ (suppression, confirmation en place dessous) */
.ad-row.ad-row-more {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  padding-right: 12px;
}
.ad-row-more .ad-sub {
  white-space: normal; /* le bouton ⋯ prend de la place : les compteurs passent à la ligne plutôt que d'être coupés */
}
.ad-list > .ad-row:first-child {
  border-top: 0;
}
button.ad-row {
  width: 100%;
  background: none;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  color: var(--ink);
  font: inherit;
  text-align: left;
}
button.ad-row:hover {
  background: var(--panel2);
}
.ad-row .pp-cd {
  min-width: 46px;
  text-align: center;
}
.ad-nm {
  display: block;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ad-sub {
  display: block;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ad-nums {
  display: flex;
  gap: 14px;
  text-align: right;
}
.ad-num b {
  display: block;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}
.ad-num small {
  font-size: 11px;
  color: var(--muted);
}
.ad-row.warn .ad-num.low b,
.ad-sub .low,
.ad-ago.low {
  color: var(--warn);
}
.ad-row.warn .ad-nm::before {
  content: '⚠ ';
  color: var(--warn);
}
.ad-ago {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.ad-more {
  display: block;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
}
.ad-more:hover {
  background: var(--panel2);
  color: var(--ink);
}
.ad-srcs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 16px 12px;
  border-top: 1px solid var(--line);
}
.ad-srcs .pill b {
  font-family: var(--mono);
  color: var(--ink);
}
@media (min-width: 760px) {
  .ad-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .ad-mini {
    margin: 10px 0 0;
    padding: 0;
    flex-wrap: wrap;
  }
}
@media (min-width: 900px) {
  .ad-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 0 20px;
    align-items: start;
  }
}

/* =====================================================================
   Membres (.mb-*), Admin de course (.adm-*, .rs-*, .ins-*), communs.
   ===================================================================== */

/* ---------- Communs : interrupteur, lignes de réglage, confirmation en place ---------- */
.sw {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  position: relative;
  width: 44px;
  height: 26px;
  margin: 0;
  /* éteint : piste neutre claire avec bord, curseur gris ; allumé : piste accent, curseur clair */
  border: 1.5px solid var(--muted);
  border-radius: 999px;
  background: var(--bg2);
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.sw::after {
  content: '';
  position: absolute;
  top: 3.5px;
  left: 3.5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition:
    transform 0.15s,
    background 0.15s;
}
.sw:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.sw:checked::after {
  width: 20px;
  height: 20px;
  top: 1.5px;
  left: 1.5px;
  background: var(--accent-ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transform: translateX(18px);
}
.sw:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
label.me-li {
  cursor: pointer;
}
.me-lt small {
  display: block;
  margin-top: 1px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.3;
}
.me-val {
  flex: none;
  max-width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.me-chev {
  flex: none;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}
button.me-li[aria-expanded='true'] .me-chev {
  transform: rotate(90deg);
}
.me-li.is-danger {
  color: var(--loss);
}
.me-note {
  margin: 8px 4px 0;
  font-size: 13px;
  color: var(--muted);
}
/* confirmation intégrée (jamais de confirm()) */
.cf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 12px;
  border-top: 1px solid var(--line);
  background: var(--panel2);
}
.cf p {
  flex: 1 1 100%;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.cf .btn {
  min-height: 44px;
  min-width: 96px;
}
.cf .btn:first-of-type {
  margin-left: auto;
}
.cf,
.adm-edit {
  scroll-margin-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); /* jamais sous la barre d'onglets */
}
.btn.danger.solid {
  background: var(--loss);
  border-color: var(--loss);
  color: var(--panel);
}
.btn.tall {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
.btn.h44 {
  min-height: 44px;
}
.wrap:has(.mb),
.wrap:has(.adm) {
  max-width: 640px;
}

/* ---------- MEMBRES ---------- */
.mb-inv {
  display: grid;
  gap: 8px;
}
.mb-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.mb-2 .btn {
  min-height: 44px;
  padding: 0 8px;
}
.mb-code {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 0 4px 0 14px;
  border: 1px dashed var(--line2);
  border-radius: var(--r-sm);
  background: var(--bg2);
  color: var(--ink);
  font: inherit;
  text-align: left;
}
.mb-code span {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.mb-code b {
  flex: 1;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--accent);
}
.mb-code i {
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  padding: 0 10px;
}
.mb-code:hover {
  border-color: var(--accent);
}
.mb-code:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.mb-li .pp-ava {
  flex: none;
}
.mb-li .me-lt {
  line-height: 1.25;
}
.mb-nm {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mb-tag {
  flex: none;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid var(--line2);
  color: var(--ink-soft);
}
.mb-tag.me {
  border-color: var(--accent);
  color: var(--accent);
}
.mb-more {
  flex: none;
  width: 44px;
  height: 44px;
  margin-right: -4px;
  border: 1px solid var(--line2);
  border-radius: 50%;
  background: var(--bg2);
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}
.mb-more:hover,
.mb-more[aria-expanded='true'] {
  background: var(--panel2);
  border-color: var(--ink-soft);
}
.mb-leave {
  margin-top: 12px;
}
.mb-more:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.mb-ren {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 16px 12px;
  border-top: 1px solid var(--line);
  background: var(--panel2);
}
.mb-ren input.in {
  flex: 1 1 160px;
  min-height: 44px;
  padding: 9px 12px;
}

/* ---------- ADMIN DE COURSE ---------- */
.mb > .mb-sec:first-child > .h-sec,
.adm > .adm-sec:first-child > .h-sec {
  margin-top: 4px;
}
.adm-phase {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 12px 16px 14px;
}
.adm-seg {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
}
.adm-seg {
  grid-template-columns: 0.8fr 1.35fr 0.85fr 1.15fr;
}
.adm-seg button {
  min-height: 44px;
  padding: 0 2px;
  font-size: 13px;
  white-space: nowrap;
}
@media (max-width: 379px) {
  .adm-seg button {
    font-size: 12px;
  }
}
/* Suppression de la course : isolée tout en bas, après un séparateur */
.adm-danger {
  margin-top: 28px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.adm-danger .me-logout {
  margin-top: 8px;
}
.adm-danger .card {
  margin-top: 8px;
}
.adm-seg button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.adm-edit {
  display: grid;
  gap: 12px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
  background: var(--panel2);
}
.adm-edit label.field,
.adm-edit .field-t {
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  color: var(--ink-soft);
}
.adm-edit .field-t {
  font-weight: 700;
  margin-bottom: -6px;
}
.adm-ep {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.adm-km {
  position: relative;
}
.adm-km input.in {
  padding-right: 34px;
  min-height: 44px;
  text-align: right;
  font-family: var(--mono);
}
.adm-km::after {
  content: 'km';
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;
}
.adm-add {
  justify-self: start;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}
.adm-addbox {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 8px;
}
.adm-addbox select.in {
  min-height: 44px;
  padding: 9px 10px;
  font-size: 15px;
}
.adm-addbox .btn {
  grid-column: 1 / -1;
  justify-self: start;
}
.adm-act {
  display: flex;
  gap: 8px;
}
.adm-act .btn {
  min-height: 48px;
}
.adm-act .btn {
  flex: 1;
  width: auto;
}

/* Inscrits (estimations / paris) */
.ins {
  display: grid;
  gap: 10px;
}
.ins-note {
  margin: -2px 0 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.ins-found {
  margin: 0 -16px;
  border-top: 1px solid var(--line);
}
.ins-found .me-li {
  min-height: 52px;
  font-size: 14.5px;
}
.ins-sep {
  height: 1px;
  margin: 6px -16px 4px;
  background: var(--line);
}
.ins-lab {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}
.ins input.in {
  min-height: 48px;
}
.ins-link {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: var(--r-sm);
  background: var(--panel2);
  font-size: 14px;
}
.ins-link input {
  display: none;
}
.ins-link.no-clip input {
  display: block;
}

/* Saisie des chronos (résultats) */
.rs {
  padding: 0;
  overflow: visible;
}
.rs-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 12px;
}
.rs-head h3 {
  flex: 1;
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}
.rs-n {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid var(--line2);
  color: var(--ink-soft);
}
.rs-n.ok {
  border-color: var(--win);
  color: var(--win);
}
.rs-imp {
  display: flex;
  width: calc(100% - 32px);
  margin: 0 16px 14px;
}
.rs-ep {
  display: flex;
  justify-content: space-between;
  padding: 7px 16px;
  border-top: 1px solid var(--line);
  background: var(--bg2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.rs-th {
  display: none;
}
/* Ligne de chrono : nom + estimation + « Abandon » en haut, cases h/min/s + allure dessous
   (même présentation à toutes les largeurs mobiles ; tableau sur PC). */
.rs-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  grid-template-areas:
    'ava who act'
    '. tf tf';
  align-items: center;
  column-gap: 10px;
  row-gap: 6px;
  padding: 10px 12px 12px 16px;
  border-top: 1px solid var(--line);
}
.rs-row.is-dnf {
  grid-template-areas: 'ava who act';
  padding-bottom: 10px;
}
.rs-row .pp-ava {
  grid-area: ava;
}
.rs-who {
  grid-area: who;
  min-width: 0;
}
.rs-who .pp-nm {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rs-sub {
  display: flex;
  flex-wrap: wrap;
  column-gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.rs-sub b {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--ink-soft);
}
.rs-sub > span:first-child {
  white-space: nowrap;
}
.rs-st {
  font-weight: 800;
}
.rs-st::before {
  content: '·';
  margin-right: 6px;
  font-weight: 400;
  color: var(--muted);
}
.rs-st.mod {
  color: var(--accent);
}
.rs-st.del {
  color: var(--loss);
}
.rs-st.todo {
  color: var(--ink-soft);
  font-weight: 700;
}
.rs-cell {
  grid-area: tf;
  min-width: 0;
}
.rs-row .tf {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}
.rs-row .tf-boxes {
  gap: 2px;
  align-self: auto;
  align-items: center;
}
.rs-row .tf-in {
  height: 44px;
  font-size: 18px;
  border-radius: 8px;
}
.rs-row .tf-h {
  width: calc(1ch + 14px);
}
.rs-row .tf-m,
.rs-row .tf-s {
  width: calc(2ch + 16px);
}
.rs-row .tf-in::placeholder {
  opacity: 0.8;
}
.rs-row .tf-u {
  font-size: 12px;
  margin-right: 4px;
}
.rs-row .tf-u:last-child {
  margin-right: 0;
}
.rs-row .tf-msg {
  font-size: 13px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}
.rs-row .tf.is-error .tf-msg,
.rs-row .tf.is-warn .tf-msg {
  flex-basis: 100%;
  font-family: var(--sans);
}
/* « Abandon » : bouton texte, à l'écart des cases ; une fois actif → « Abandon · Annuler » */
.rs-dnf {
  grid-area: act;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line2);
  border-radius: 999px;
  background: none;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}
.rs-dnf:hover {
  border-color: var(--loss);
  color: var(--loss);
}
.rs-dnf:focus-visible,
.rs-undo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.rs-out {
  grid-area: act;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 800;
  color: var(--loss);
}
.rs-out > span[aria-hidden] {
  color: var(--muted);
  font-weight: 400;
}
.rs-undo {
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 379px) {
  .rs-st {
    flex-basis: 100%;
  }
  .rs-st::before {
    display: none;
  }
  .rs-dnf {
    padding: 0 11px;
  }
}
.rs-row.is-dnf .pp-ava,
.rs-row.is-dnf .rs-who {
  opacity: 0.55;
}
.rs-row.is-draft {
  box-shadow: inset 3px 0 0 var(--accent);
}
.adm-main:has(.rs-bar) {
  padding-bottom: 12px; /* ≥ 24 px entre le bouton collant et la section suivante */
}
.rs-bar {
  position: sticky;
  bottom: calc(66px + env(safe-area-inset-bottom, 0px));
  z-index: 5;
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.55);
}
.rs-bar[hidden] {
  display: none;
}
.rs-bar .btn {
  min-height: 48px;
}
.rs-bar .cf {
  margin: -10px -10px 0;
  border-top: 0;
  border-radius: var(--radius) var(--radius) 0 0;
}
#resConfirm:empty {
  display: none;
}
.rs-imp {
  justify-content: center;
  align-items: center;
}

/* ---------- PC : deux colonnes ---------- */
@media (min-width: 1000px) {
  .wrap:has(.mb),
  .wrap:has(.adm) {
    max-width: 1040px;
  }
  .mb,
  .adm {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    column-gap: 24px;
    align-items: start;
  }
  .mb {
    grid-template-areas: 'list inv' 'list set';
    grid-template-rows: auto 1fr;
  }
  .mb-sec.inv {
    grid-area: inv;
  }
  .mb-sec.list {
    grid-area: list;
  }
  .mb-sec.set {
    grid-area: set;
  }
  .mb-sec.inv > .h-sec,
  .adm-side > .h-sec {
    margin-top: 4px;
  }
  .adm-side {
    position: sticky;
    top: 80px;
  }
  .adm-side:has(.adm-edit, .cf) {
    position: static; /* formulaire ouvert : tout doit rester accessible au défilement */
  }
  .rs-th {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 270px 112px;
    column-gap: 10px;
    padding: 8px 12px 8px 16px;
    border-top: 1px solid var(--line);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .rs-row,
  .rs-row.is-dnf {
    grid-template-columns: 32px minmax(0, 1fr) 270px 112px;
    grid-template-areas: 'ava who tf act';
    min-height: 64px;
    padding: 8px 12px 8px 16px;
  }
  .rs-row.is-dnf .rs-out {
    grid-column: 3 / -1;
    justify-self: start;
  }
  .rs-row .tf {
    flex-wrap: nowrap;
  }
  .rs-dnf {
    justify-self: end;
  }
  .rs-bar {
    bottom: 16px;
  }
}

/* Méta de la course : le badge de phase passe à la ligne proprement (pas de « · » orphelin) */
.race-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 8px;
}
/* Membres, petits écrans : « Copier le message » et « Copier le lien » restent sur une ligne */
@media (max-width: 360px) {
  #copyInviteMsg,
  #copyInvite,
  #shareInvite {
    white-space: nowrap;
    font-size: 13px;
    padding-inline: 8px;
  }
}

/* ---------- « 🔒 Je fige mon chrono pour voir les paris » (.fz-*) ---------- */

/* Carte d'attente : les paris existent mais restent masqués tant que le chrono est modifiable. */
.fz-tease {
  border-style: dashed;
  border-color: var(--line2);
  box-shadow: none;
  background: var(--bg2);
}
.fz-count {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.fz-count .fz-n {
  flex: none;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: var(--panel2);
  border: 1px solid var(--line2);
  font: 800 15px var(--mono);
  color: var(--ink-soft);
}
.fz-tease .hint {
  margin: 0;
}
.fz-go {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink);
  border-color: var(--accent);
}
.fz-go:disabled {
  border-color: var(--line2);
}

/* Confirmation en place (jamais de confirm()) : remplace le bouton. */
.fz-cf {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1.5px solid var(--accent);
  border-radius: var(--r-sm);
  background: var(--panel);
  scroll-margin-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}
.fz-cf .fz-q {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}
.fz-cf .fz-q b {
  font-family: var(--mono);
}
.fz-cf p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}
.fz-cf .fz-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fz-cf .btn {
  min-height: 44px;
}
.fz-cf .btn:first-child {
  flex: 1 1 auto;
}

/* État figé : sous-ligne de l'encadré « Mon estimation » et rappel du bonus. */
.estim-locked .fz-sub {
  font-size: 12.5px;
  color: var(--muted);
}
.fz-bonus {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.fz-bonus b {
  font-family: var(--mono);
  color: var(--ink);
}
.fz-out {
  align-self: flex-start;
  background: none;
  border: none;
  padding: 10px 0;
  min-height: 44px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.fz-out:hover {
  color: var(--loss);
}

/* Bloc « 👀 » : en-tête + mention « visible par toi seul » quand la ligue n'a pas les paris en direct. */
.fz-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
}
.fz-solo {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  border: 1px solid var(--line2);
  border-radius: 20px;
  padding: 2px 8px;
}
.fz-empty {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}
.fz-ok {
  animation: fzIn 0.5s ease;
}
@keyframes fzIn {
  from {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
  to {
    outline: 2px solid transparent;
    outline-offset: 6px;
  }
}

/* Carte de pari (côté parieur) : la cote du coureur figé est définitive. */
.fz-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--win);
}

/* =====================================================================
   Distance + D+ par épreuve (.ep-*), admin D+ (.adm-dp) — maquette dplus validée.
   ===================================================================== */
/* Puce d'épreuve : même famille que .pill, chiffres alignés. */
.ep-chip {
  font-variant-numeric: tabular-nums;
}
/* Épreuve = puce + nom court (si le nom apporte une info). */
.ep-it {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}
.ep-nm {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  color: var(--muted);
}

/* En-tête de course : une rangée de puces sous la date. */
.ep-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  margin: 8px auto 2px;
  max-width: 560px;
}
.ep-row .ep-chip {
  font-size: 12.5px;
  padding: 4px 10px;
  color: var(--ink);
}
.ep-row .ep-nm {
  max-width: 22ch;
}

/* Choix « Ma distance » : boutons segmentés (2-3 épreuves), sinon <select>. */
.ep-pick {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.ep-pick legend {
  padding: 0;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.ep-seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 3px;
  padding: 3px;
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: 11px;
}
.ep-seg label {
  position: relative;
  display: block;
  cursor: pointer;
}
.ep-seg input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.ep-seg .ep-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--ink-soft);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.ep-seg .ep-opt b {
  font-size: 15px;
  line-height: 1.15;
}
.ep-seg .ep-opt small {
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.ep-seg input:checked + .ep-opt {
  background: var(--accent);
  color: var(--accent-ink);
}
.ep-seg input:checked + .ep-opt small {
  color: var(--accent-ink);
  opacity: 0.85;
}
.ep-seg input:focus-visible + .ep-opt {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.ep-seg input:disabled + .ep-opt {
  opacity: 0.55;
  cursor: default;
}

/* Page Paris : puce d'épreuve à côté du prénom (courses multi-épreuves). */
.pp-nm .ep-chip {
  margin-left: 6px;
  font-size: 10.5px;
  padding: 1px 7px;
  vertical-align: 1px;
}

/* Admin : km + D+ par épreuve. */
.adm-ep.has-dp {
  grid-template-columns: minmax(0, 1fr) 84px 100px;
  gap: 8px;
}
.adm-dp {
  position: relative;
}
.adm-dp input.in {
  padding-right: 46px;
  min-height: 44px;
  text-align: right;
  font-family: var(--mono);
}
.adm-dp::after {
  content: 'm D+';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;
}
.adm-ep-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px 100px;
  gap: 8px;
}

/* Catalogue « Courses à venir déjà suivies » : puces sous le nom. */
.mrow .ep-cat {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin-top: 5px;
}
/* Bandeau « En jeu » : l'alerte (texte sur une ligne) ne doit pas élargir la carte au-delà de l'écran */
@media (max-width: 899px) {
  .pp-hero {
    grid-template-columns: minmax(0, 1fr);
  }
}
.pp-hero > *,
.pp-alert {
  min-width: 0;
}

/* ---------- Légal : retouches du designer ---------- */
.terms {
  min-height: 44px;
  align-items: center;
  margin: 14px 0 12px;
  font-size: 14px;
}
.terms input {
  width: 24px;
  height: 24px;
}
.terms-g {
  font-size: 13px;
}
.legal-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 14px;
  margin-top: 10px;
}
.legal-foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
/* « Se déconnecter » n'est pas destructif : pas de rouge (réservé à « Supprimer mon compte ») */
#logoutBtn2.me-logout {
  color: var(--ink-soft);
}
.me-del-ask {
  margin-top: 28px;
  color: var(--loss);
  font-weight: 700;
  font-size: 14px;
}
.me-del {
  border: 1px solid color-mix(in srgb, var(--loss) 45%, var(--line));
}
.me-del .cf {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}
.me-del .cf p {
  font-size: 15px;
  line-height: 1.45;
}
.me-del .btn {
  width: 100%;
  min-height: 44px;
}

/* ---------- Entrée (connexion / inscription / invitation) ---------- */
.entry-hero {
  text-align: center;
  padding: 14px 0 4px;
}
.entry-hero .bib-xl {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 50px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--display);
  font-weight: 800;
  font-size: 24px;
  transform: rotate(-5deg);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}
.entry-hero h1 {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 30px;
  margin-top: 12px;
  letter-spacing: 0.01em;
}
.entry-hero h1 b {
  color: var(--accent);
}
.entry-hero.mini {
  padding-top: 4px;
}
.entry-hero.mini h1 {
  font-size: 22px;
  margin-top: 0;
}
.entry-hero .tag {
  color: var(--ink-soft);
  font-size: 16px;
  margin: 4px 0 0;
}
.free-pill {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-top: 10px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--win);
  border: 1px solid color-mix(in srgb, var(--win) 55%, transparent);
  background: color-mix(in srgb, var(--win) 10%, transparent);
}
.auth-card {
  margin-top: 16px;
}
.auth-card .seg {
  display: flex;
  width: 100%;
}
.auth-card .seg button {
  flex: 1;
  min-height: 44px;
}
.auth-card .btn,
.join-card .btn,
.create-form .btn,
.create-toggle {
  min-height: 48px;
}
.field-c {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lbl-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.lbl-row a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: -12px 0;
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: var(--accent);
}
.in-wrap {
  position: relative;
  display: block;
}
.in-wrap .in {
  padding-right: 58px;
}
.in-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 44px;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--accent);
  font-weight: 800;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
}
.in-btn.dice {
  font-size: 22px;
}
.name-row {
  gap: 10px;
  align-items: flex-end;
}
.name-row .field {
  flex: 1;
  min-width: 0;
}
.hint.tight {
  margin: -6px 0 0;
}
.terms-err {
  color: var(--loss);
  font-size: 13px;
  font-weight: 700;
  margin: -6px 0 0 32px;
}
.terms.is-err input {
  outline: 2px solid var(--loss);
  outline-offset: 2px;
}
.howto {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
}
.howto div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 6px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  line-height: 1.25;
}
.howto .e {
  display: block;
  font-size: 22px;
  margin-bottom: 4px;
}
.rules-link {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-weight: 700;
  font-size: 14px;
  padding: 10px;
}
.entry .legal-foot {
  text-align: center;
}
/* ticket d'invitation (remplace .invite-banner) */
.ticket {
  position: relative;
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: var(--radius);
  text-align: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, var(--panel)), var(--panel));
  border: 1.5px dashed var(--accent);
}
.ticket .eyebrow {
  color: var(--accent);
}
.ticket .tk-name {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 26px;
  line-height: 1.1;
  margin: 4px 0 2px;
  color: var(--ink);
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.ticket .tk-sub {
  font-size: 14px;
  color: var(--ink-soft);
}
.ticket .tk-sub b {
  color: var(--ink);
}
/* démo jouable (PC seulement, voir « Entrée v2 » en fin de fichier) */
.entry-pitch {
  display: none;
}
@media (min-width: 960px) {
  .wrap:has(> .entry) {
    max-width: 1100px;
  }
  .entry {
    display: grid;
    grid-template-columns: 1.1fr 420px;
    gap: 56px;
    align-items: center;
    max-width: 1040px;
    margin: 0 auto;
    padding: 24px 0;
  }
  .entry .entry-hero {
    text-align: left;
  }
  .entry .entry-hero h1 {
    font-size: 46px;
  }
  .entry .entry-hero.mini h1 {
    font-size: 26px;
  }
  .entry .entry-pitch {
    display: block;
  }
  .entry .howto-m {
    display: none;
  }
  .entry .auth-card {
    margin-top: 0;
  }
}

/* ---------- Rejoindre / créer une ligue ---------- */
.join-card {
  border: 1.5px solid var(--accent);
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 12%, var(--panel)), var(--panel) 60%);
  transition: opacity 0.15s;
}
.join-card.dim {
  opacity: 0.75;
}
.join-card h2 {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 20px;
  letter-spacing: 0.02em;
}
.join-card .in-wrap {
  margin-top: -6px;
}
.in.code-in {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
  padding-right: 70px;
  padding-left: 70px;
}
.in.code-in.no-paste {
  padding-left: 13px;
  padding-right: 13px;
}
.code-in::placeholder {
  letter-spacing: 0.22em;
  color: color-mix(in srgb, var(--muted) 60%, transparent);
}
.join-prev {
  min-height: 22px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.join-prev .hint {
  font-weight: 600;
}
.join-prev.ok {
  color: var(--win);
}
.join-prev.ko {
  color: var(--loss);
}
.join-prev.load {
  color: var(--muted);
  font-weight: 600;
}
.join-prev a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: -11px 0;
}
.join-prev .lg-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  overflow-wrap: anywhere;
  background: color-mix(in srgb, var(--win) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--win) 50%, transparent);
}
.or-line {
  margin: 16px 0 10px;
}
.create-wrap {
  margin-top: 12px;
}
.create-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.create-form .lbl-row label.field {
  display: block;
}
.cancel-link {
  background: none;
  border: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  min-height: 44px;
  padding: 0 8px;
  margin: -10px -8px -10px 0;
  text-transform: none;
  letter-spacing: 0;
}
.create-form > .in {
  margin-top: -6px;
}
.code-alert {
  border-radius: var(--r-sm);
  padding: 14px;
  border: 1.5px solid var(--warn);
  background: color-mix(in srgb, var(--warn) 12%, var(--panel));
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.code-alert p {
  margin: 0;
  font-size: 15px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.code-alert p b {
  font-family: var(--mono);
  letter-spacing: 0.08em;
}
.code-alert .acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.code-alert .acts .btn {
  flex: 1 1 180px;
  min-height: 48px;
}
.in.is-warn {
  border-color: var(--warn);
  outline: 2px solid var(--warn);
  outline-offset: 1px;
}
.home-hi {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 26px;
  text-align: center;
  margin: 6px 0 2px;
  overflow-wrap: anywhere;
}
.home-sub {
  text-align: center;
  color: var(--ink-soft);
  margin: 0 0 14px;
  font-size: 15px;
}

/* ---------- Pages règles / légal (habillage commun) ---------- */
.page-head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  padding-top: calc(8px + env(safe-area-inset-top));
  background: linear-gradient(var(--bg2), var(--bg));
  border-bottom: 1px solid var(--line2);
}
.page-head .back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line2);
  background: var(--panel);
  color: var(--ink);
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
}
.page-head .sp {
  flex: 1;
}
.page-head .brand .wordmark {
  font-size: 15px;
}
.page-head .thm {
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line2);
  background: var(--panel);
  color: var(--ink);
  font-size: 18px;
}
.toc-chips {
  position: sticky;
  top: 61px;
  z-index: 4;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.toc-chips::-webkit-scrollbar {
  display: none;
}
.toc-chips a {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none;
  background: var(--panel);
}
.toc-chips a[aria-current='true'] {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.pg {
  padding: 18px 16px 40px;
  max-width: 720px;
  margin: 0 auto;
  min-width: 0;
}
.pg [id] {
  scroll-margin-top: 130px;
}
.pg-hero {
  text-align: center;
  padding: 6px 0 4px;
}
.pg-hero h1 {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 30px;
}
.pg-hero h1 b {
  color: var(--accent);
}
.pg-hero p {
  color: var(--ink-soft);
  margin: 6px auto 0;
  max-width: 34ch;
}
.pg h2.sec-t {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 19px;
  letter-spacing: 0.03em;
  margin: 26px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pg h2.sec-t::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
details.acc {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
details.acc + details.acc {
  margin-top: 10px;
}
details.acc summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  min-height: 56px;
}
details.acc summary::-webkit-details-marker {
  display: none;
}
details.acc summary .t {
  font-weight: 800;
  font-size: 15.5px;
  display: block;
}
details.acc summary .s {
  font-size: 13px;
  color: var(--muted);
  display: block;
}
details.acc summary .chev {
  margin-left: auto;
  flex: none;
  color: var(--accent);
  font-weight: 800;
  font-size: 20px;
  transition: transform 0.15s;
}
details.acc[open] summary .chev {
  transform: rotate(90deg);
}
details.acc .body {
  padding: 0 14px 14px;
  font-size: 14.5px;
  color: var(--ink-soft);
}
details.acc summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: var(--radius);
}
.brief {
  background: var(--panel2);
  border: 1px solid var(--line2);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.brief .eyebrow {
  color: var(--accent);
}
.brief ul {
  margin: 6px 0 0;
  padding-left: 20px;
  font-size: 14.5px;
  color: var(--ink);
}
.brief li + li {
  margin-top: 4px;
}
.end-cta {
  margin-top: 28px;
  text-align: center;
}
.end-cta .btn {
  width: auto;
  min-height: 48px;
  padding: 0 28px;
}
@media (min-width: 960px) {
  .pg-2col {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 32px;
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 24px;
  }
  .pg-2col .toc-chips {
    position: sticky;
    top: 76px;
    flex-direction: column;
    border: none;
    align-self: start;
    padding: 24px 0;
    background: none;
    overflow: visible;
  }
  .pg-2col .toc-chips a {
    justify-content: flex-start;
  }
  .pg-2col .pg {
    margin: 0;
  }
  .pg [id] {
    scroll-margin-top: 80px;
  }
}
@media print {
  .page-head,
  .toc-chips {
    position: static;
  }
  details > * {
    display: block;
  }
  details.acc summary .chev {
    display: none;
  }
}

/* ====== Entrée v2 : téléphone validé + PC « démo jouable » (maquette entree-pc-B) ====== */
/* ---------- Entrée : téléphone (inchangé, validé) ---------- */
#app.wrap:has(> .entry) {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  max-width: 460px;
  min-height: 100vh;
  min-height: 100svh;
  padding: max(20px, env(safe-area-inset-top)) 16px max(8px, env(safe-area-inset-bottom));
}
.entry {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}
.entry-l,
.entry-r {
  display: contents;
}
.entry .entry-hero {
  margin-top: auto;
  padding-top: 0;
}
.entry .rules-link {
  margin-bottom: auto;
}
.entry .entry-hero .tag {
  text-wrap: balance;
}
.entry .legal-foot {
  margin-top: 16px;
}

/* ---------- Entrée PC (≥ 960 px) : le jeu en démo à gauche, le formulaire à droite ---------- */
@media (min-width: 960px) {
  #app.wrap:has(> .entry) {
    display: block;
    max-width: none;
    min-height: 0;
    padding: 0;
  }
  .entry {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(420px, 1fr);
    gap: 0;
    max-width: none;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    align-items: stretch;
  }

  /* Scène de gauche : « tableau de course », suit le thème. */
  /* Collant : en inscription (formulaire long), la démo reste visible pendant qu'on défile. */
  .entry-l {
    position: sticky;
    top: 0;
    align-self: start;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    min-height: 100vh;
    padding: 28px clamp(36px, 5vw, 96px) 36px;
    overflow: hidden;
    background:
      radial-gradient(900px 520px at 0% 100%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 65%),
      repeating-radial-gradient(ellipse at -10% 130%, transparent 0 70px, var(--line) 70px 72px),
      color-mix(in srgb, var(--accent) 11%, var(--bg2));
    border-right: 1px solid var(--line);
  }
  .entry-l > * {
    position: relative;
    width: 100%;
    max-width: 640px;
  }

  /* Marque : une ligne en haut, discrète (la démo porte le message). */
  .entry .entry-l .entry-hero {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 0;
    text-align: left;
  }
  .entry .entry-l .entry-hero .bib-xl {
    width: 42px;
    height: 36px;
    font-size: 17px;
    border-radius: 7px;
  }
  .entry .entry-l .entry-hero h1,
  .entry .entry-l .entry-hero.mini h1 {
    margin: 0;
    font-size: 22px;
    line-height: 1;
  }
  .entry .entry-l .entry-hero .tag {
    display: none;
  }
  .entry .entry-l .entry-hero .free-pill {
    margin: 0 0 0 auto;
  }
  .entry .entry-l .ticket {
    max-width: 640px;
    margin-top: 22px;
    padding: 14px 18px;
    text-align: left;
  }
  .entry .entry-l .ticket .tk-name {
    font-size: 24px;
  }

  /* Démo : centrée verticalement dans la scène. */
  .entry .entry-pitch {
    display: block;
    margin: auto 0;
    padding-top: 28px;
  }
  .dm-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
  }
  .dm-kicker::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--win);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--win) 22%, transparent);
  }
  .dm-title {
    margin: 0;
    font-family: var(--display);
    font-weight: 800;
    text-transform: uppercase;
    font-size: clamp(34px, 3.3vw, 54px);
    line-height: 1.02;
    letter-spacing: 0.005em;
    color: var(--ink);
    text-wrap: balance;
  }
  .dm-title > span {
    display: block;
    white-space: nowrap;
  }
  .dm-title .mono {
    font-family: var(--display);
    color: var(--accent);
  }
  .dm-sub {
    margin: 12px 0 0;
    max-width: 34em;
    font-size: 16px;
    line-height: 1.45;
    color: var(--ink-soft);
  }
  .dm-sub b {
    color: var(--ink);
  }

  .dm-board {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    margin-top: 22px;
  }
  .dm-card.betcard {
    position: relative;
    margin: 0;
    padding: 18px 20px 16px;
    border-color: var(--line2);
    box-shadow:
      0 1px 0 var(--line),
      0 30px 60px -34px rgba(0, 0, 0, 0.65);
  }
  .dm-card .bc-anchor .mono {
    font-size: 19px;
  }
  .dm-bet {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    margin: 0 0 4px;
  }
  .dm-bet-lab {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .dm-bet-val {
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
    color: var(--ink);
  }
  .dm-bet-pace {
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--muted);
  }
  .dm-card .trackrow {
    margin-top: 4px;
    align-items: center;
  }
  .dm-card .slider {
    cursor: grab;
  }
  .dm-card .slider:active {
    cursor: grabbing;
  }
  .dm-card .sliderwrap {
    padding-bottom: 22px;
  }
  .dm-flag {
    position: absolute;
    bottom: 0;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 18px;
    padding: 0 6px;
    border-radius: 6px;
    background: var(--ink);
    color: var(--bg);
    font: 700 11px var(--mono);
    white-space: nowrap;
    pointer-events: none;
  }
  .dm-flag::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -5px;
    border: 3px solid transparent;
    border-bottom: 3px solid var(--ink);
    border-top: 0;
    transform: translateX(-50%);
  }
  .dm-flagrail {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 0;
    height: 18px;
  }
  .dm-card .coteline {
    margin-top: 14px;
  }
  .dm-card .cote-badge {
    min-width: 88px;
  }
  .dm-card .cote-val {
    font-size: 26px;
  }
  .dm-go.btn.mini {
    padding: 10px 14px;
    font-size: 13px;
    white-space: nowrap;
  }

  /* Jour J : on choisit le vrai chrono, on voit les points tomber. */
  .dm-real {
    margin: 14px 0 0;
    padding: 12px 14px;
    border: 1px dashed var(--line2);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--panel) 55%, transparent);
  }
  .dm-real legend {
    padding: 0 6px;
    margin-left: -6px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .dm-real-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
  }
  .dm-chips {
    display: flex;
    gap: 6px;
  }
  .dm-chips label {
    position: relative;
  }
  .dm-chips input {
    position: absolute;
    opacity: 0;
    inset: 0;
    margin: 0;
    cursor: pointer;
  }
  .dm-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 36px;
    padding: 0 11px;
    border-radius: 999px;
    border: 1px solid var(--line2);
    background: var(--panel);
    font-family: var(--mono);
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink-soft);
  }
  .dm-chips input:checked + .dm-chip {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--bg);
  }
  .dm-chips input:focus-visible + .dm-chip {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
  .dm-res {
    flex: 1;
    min-width: 200px;
    font-size: 14px;
    color: var(--ink-soft);
  }
  .dm-res b {
    margin: 0 3px;
    font-family: var(--mono);
    font-size: 20px;
    color: var(--win);
  }
  .dm-res .dm-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--accent);
    border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    vertical-align: 2px;
  }

  /* Chambrage : visible quand la scène est assez large. */
  .dm-chat {
    display: none;
  }
  .dm-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  /* Colonne formulaire. */
  .entry-r {
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    min-height: 100vh;
    padding: 32px clamp(28px, 4vw, 72px) 10px;
  }
  .entry-r > * {
    width: 100%;
    max-width: 400px;
  }
  .entry .entry-r .auth-card {
    margin-top: auto;
    padding: 22px;
    box-shadow: 0 28px 60px -38px rgba(0, 0, 0, 0.6);
  }
  .entry .entry-r .rules-link {
    margin-bottom: auto;
  }
  .entry .entry-r .legal-foot {
    margin-top: 20px;
  }
}

/* Écran large : la carte et le chambrage côte à côte. */
@media (min-width: 1500px) {
  .entry-l > * {
    max-width: 860px;
  }
  .dm-title,
  .dm-sub {
    max-width: 640px;
  }
  .dm-board {
    grid-template-columns: minmax(0, 580px) minmax(200px, 1fr);
    align-items: center;
  }
  .dm-chat {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .dm-chat li {
    display: flex;
    gap: 8px;
    align-items: flex-end;
  }
  .dm-chat li:nth-child(2) {
    margin-left: 22px;
  }
  .dm-chat .ava {
    width: 28px;
    height: 28px;
    font-size: 10.5px;
  }
  .dm-chat p {
    margin: 0;
    padding: 9px 12px;
    border-radius: 14px 14px 14px 4px;
    background: var(--panel);
    border: 1px solid var(--line);
    font-size: 13.5px;
    line-height: 1.35;
    color: var(--ink-soft);
    box-shadow: 0 14px 28px -24px rgba(0, 0, 0, 0.6);
  }
  .dm-chat p b {
    display: block;
    font-size: 11.5px;
    color: var(--ink);
  }
}

/* Écran bas (1280×800 avec invitation) : on resserre. */
@media (min-width: 960px) and (max-height: 840px) {
  .entry .entry-pitch {
    padding-top: 18px;
  }
  .dm-title {
    font-size: clamp(32px, 3.3vw, 46px);
  }
  .dm-board {
    margin-top: 16px;
  }
  .entry-l:has(.ticket) .dm-sub {
    display: none;
  }
  .entry .entry-r .auth-card {
    padding: 18px 22px;
    gap: 10px;
  }
  .entry-r {
    padding-top: 20px;
  }
}

@media (min-width: 960px) and (prefers-reduced-motion: no-preference) {
  .dm-res b {
    display: inline-block;
    transition: transform 0.2s ease;
  }
  .dm-res.bump b {
    transform: scale(1.12);
  }
  .dm-chat li {
    animation: dm-in 0.5s ease both;
  }
  .dm-chat li:nth-child(2) {
    animation-delay: 0.9s;
  }
  .dm-chat li:nth-child(3) {
    animation-delay: 1.8s;
  }
  @keyframes dm-in {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
  }
}

/* ====== 💬 Chambrage v2 : bandeau, puces, fil en <dialog> ====== */
.ch-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  margin-top: 12px;
  padding: 8px 12px;
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: var(--radius);
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.ch-strip.new {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line2));
}
.ch-ic {
  position: relative;
  font-size: 22px;
  line-height: 1;
  flex: none;
}
.ch-dot {
  position: absolute;
  top: -7px;
  right: -9px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  box-sizing: border-box;
  border-radius: 999px;
  background: var(--loss);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
  border: 2px solid var(--panel);
}
.ch-prev {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink-soft);
}
.ch-prev b {
  color: var(--ink);
}
.ch-go {
  color: var(--muted);
  font-size: 20px;
  flex: none;
}
.ch-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: var(--bg2);
  color: var(--ink-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  position: relative;
  cursor: pointer;
}
.ch-chip::after {
  content: '';
  position: absolute;
  inset: -6px -2px; /* zone tactile ≥ 44 px */
}
.ch-chip.hot {
  border-color: var(--accent);
  color: var(--ink);
}
/* Accueil : ligne de chambrage en 2 lignes (course, puis message) et puce 💬 n sur les courses. */
.ch-strip.ch-home {
  margin: 4px 0 0;
  min-height: 56px;
}
.ch-home .ch-prev {
  display: flex;
  flex-direction: column;
  white-space: normal;
}
.ch-home .ch-race {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ch-home .ch-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}
/* « On me vise » : liseré rouge (pas .me, déjà pris par la page profil). */
.ch-strip.ch-vise {
  border-color: color-mix(in srgb, var(--loss) 45%, var(--line2));
  box-shadow: inset 3px 0 0 var(--loss);
}
.todo-wrap,
.ch-row {
  position: relative;
}
.has-ch .chev {
  padding-left: 64px; /* place réservée à la puce, entre le texte et le chevron */
}
.ch-chip.ch-acc {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
}
.todo-wrap.open .ch-chip.ch-acc {
  top: 32px; /* reste sur l'en-tête quand l'accordéon est déplié */
}
.mypart-line {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

/* La feuille : en bas sur téléphone, panneau à droite sur PC. */
dialog.ch-sheet {
  margin: auto 0 0;
  width: 100%;
  max-width: none;
  height: 90dvh;
  max-height: none;
  padding: 0;
  border: none;
  border-top: 1px solid var(--line2);
  border-radius: 22px 22px 0 0;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 -20px 40px -20px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  box-sizing: border-box;
}
dialog.ch-sheet[open] {
  display: flex;
  flex-direction: column;
}
dialog.ch-sheet::backdrop {
  background: rgba(0, 0, 0, 0.5);
}
body:has(dialog.ch-sheet[open]) {
  overflow: hidden;
}
@media (min-width: 900px) {
  dialog.ch-sheet {
    margin: 0 0 0 auto;
    width: 400px;
    height: 100dvh;
    border-radius: 0;
    border-top: none;
    border-left: 1px solid var(--line2);
  }
  dialog.ch-sheet .sh-grab {
    display: none;
  }
}
.sh-grab {
  width: 40px;
  height: 4px;
  border-radius: 4px;
  background: var(--line2);
  margin: 8px auto 0;
  flex: none;
}
.sh-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 8px 16px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.sh-head h2 {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 17px;
  margin: 0;
}
.sh-head small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.sh-head .sp {
  flex: 1;
}
.sh-x {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
}
.ch-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 12px 8px;
}
.ch-log > :first-child {
  margin-top: auto; /* peu de messages : collés en bas, comme une messagerie */
}
.daysep {
  align-self: center;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 0;
}
.msg {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  align-self: flex-start; /* sinon un message court est centré dans le fil */
  max-width: 88%;
  flex: none;
}
.msg .ava {
  width: 30px;
  height: 30px;
  font-size: 11px;
}
.msg.me {
  margin: 0; /* la classe .me du profil centre sinon la bulle (margin auto) */
  max-width: 88%;
  align-self: flex-end;
  flex-direction: row-reverse;
}
.msg-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.msg.me .msg-col {
  align-items: flex-end;
}
.bub {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 16px 16px 16px 4px;
  padding: 7px 11px 6px;
  font-size: 15px;
  line-height: 1.35;
  color: var(--ink);
  cursor: pointer;
  overflow-wrap: anywhere;
  -webkit-tap-highlight-color: transparent;
}
.msg.me .bub {
  background: color-mix(in srgb, var(--accent) 17%, var(--panel));
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  border-radius: 16px 16px 4px 16px;
}
.bub.sel,
.bub:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.bub .who {
  font-weight: 800;
  font-size: 13px;
  color: var(--accent);
  margin-right: 6px;
}
.bub .to,
.ch-to {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-soft);
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 8px;
  vertical-align: 1px;
}
.bub .to.me-t,
.ch-to.me-t {
  background: color-mix(in srgb, var(--loss) 14%, var(--bg2));
  border-color: color-mix(in srgb, var(--loss) 40%, var(--line));
  color: var(--ink);
}
.ch-to {
  padding: 0 7px;
  line-height: 18px;
}
.bub .tx {
  display: block;
  margin-top: 3px;
}
.bub .t {
  font-size: 11px;
  color: var(--muted);
  float: right;
  margin: 6px 0 0 10px;
  font-family: var(--mono);
}
.reacts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: -4px;
  padding: 0 6px;
  position: relative;
  z-index: 1;
}
.rx {
  min-height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: var(--panel);
  color: var(--ink-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  position: relative;
}
.rx::after {
  content: '';
  position: absolute;
  inset: -8px -2px;
}
.rx.mine {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, var(--panel));
  color: var(--ink);
}
.actbar {
  display: flex;
  flex-wrap: wrap; /* très petit écran + créateur (toutes les actions) : passe sur 2 lignes */
  justify-content: center;
  align-items: center;
  align-self: flex-start;
  flex: none;
  gap: 2px;
  margin: -4px 0 0; /* sous la bulle, toute la largeur du fil (créateur : 6 actions) */
  max-width: 100%;
  padding: 3px;
  border-radius: 26px;
  background: var(--panel);
  border: 1px solid var(--line2);
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.6);
  box-sizing: border-box;
}
.actbar.me {
  align-self: flex-end;
  margin: -4px 0 0; /* neutralise .me (profil) */
  max-width: 100%;
}
.actbar button {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  border: none;
  background: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--ink);
}
.actbar button.on {
  background: color-mix(in srgb, var(--accent) 20%, transparent);
}
.actbar .sep {
  width: 1px;
  height: 24px;
  background: var(--line2);
  margin: 0 2px;
  flex: none;
}
.actbar .tl {
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
  width: auto;
  padding: 0 14px;
  border-radius: 999px;
}
.actbar .del {
  color: var(--loss);
}
/* Petits écrans : on garde « ↩ Répondre » lisible ; la barre du créateur (6 actions) passe sur 2 lignes. */
@media (max-width: 379px) {
  .actbar .tl {
    padding: 0 8px;
    font-size: 12px;
  }
}
.sys {
  align-self: center;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 94%;
  font-size: 13.5px;
  color: var(--ink-soft);
  background: var(--bg2);
  border: 1px dashed var(--line2);
  border-radius: 999px;
  padding: 4px 4px 4px 12px;
  flex: none;
  box-sizing: border-box;
}
.sys:not(:has(.btn-ch)) {
  padding-right: 12px;
  min-height: 36px;
}
.sys b {
  color: var(--ink);
}
.btn-ch {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  flex: none;
}
.btn-ch::after {
  content: '';
  position: absolute;
  inset: -4px 0;
}
.recap {
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: var(--radius);
  padding: 10px 10px 6px 12px;
  flex: none;
}
.recap h3 {
  margin: 0 0 4px;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 13px;
  color: var(--muted);
}
.rc-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.rc-row:first-of-type {
  border-top: none;
}
.rc-row .e {
  font-size: 20px;
  width: 26px;
  text-align: center;
  flex: none;
}
.rc-row .d {
  flex: 1;
  min-width: 0;
}
.rc-row .d small {
  color: var(--muted);
  font-family: var(--mono);
  margin-left: 4px;
}
.ch-empty {
  margin: auto;
  text-align: center;
  padding: 20px;
}
.ch-empty .big {
  font-size: 44px;
}
.ch-empty p {
  font-size: 17px;
  font-weight: 800;
  margin: 6px 0 0;
}
.comp {
  border-top: 1px solid var(--line);
  padding: 8px 12px max(12px, env(safe-area-inset-bottom));
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: none;
}
.tgt {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 13px;
  font-weight: 800;
  padding-left: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
}
.tgt span.m {
  color: var(--muted);
  font-family: var(--mono);
  font-weight: 600;
  margin-left: 4px;
}
.tgt button {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  position: relative;
}
.tgt button::after {
  content: '';
  position: absolute;
  inset: -6px -4px;
}
.sugg {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.sugg[hidden] {
  display: none;
}
.sugg button {
  flex: none;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: var(--bg2);
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
}
.comp-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.comp-row .in {
  flex: 1;
  min-width: 0;
  border-radius: 999px;
  min-height: 44px;
  padding: 0 16px;
}
.send {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}
.send:disabled {
  opacity: 0.6;
}
.ftoast {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 150px;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  background: var(--ink);
  color: var(--bg);
  border-radius: 12px;
  padding: 4px 4px 4px 14px;
  min-height: 48px;
  box-sizing: border-box;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6);
  z-index: 2;
}
.ftoast[hidden] {
  display: none;
}
.ftoast button {
  min-height: 40px;
  padding: 0 14px;
  border: none;
  background: none;
  color: var(--bg); /* l'accent sur --ink manque de contraste dans les deux thèmes */
  font: inherit;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* Ligne du jeu « ✏️ Paul passe de 45:00 à 42:30 (🔥 −2:30) » */
.sys .sys-d {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--ink-soft);
  font-weight: 700;
}
.sys:has(.sys-d) {
  border-radius: 18px;
}

.pred-cote s {
  opacity: 0.7;
  text-decoration-thickness: 1px;
}
.pred-cote b {
  color: var(--warn);
  font-weight: 700;
}

/* ====== 📰 La Une (Classements semaine / saison) ====== */
.cl-scope {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 2px 0 12px;
}
.une {
  margin-bottom: 12px;
}
.une .une-t {
  margin: 4px 0 0;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.une .une-p {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}
.une .une-p span {
  white-space: nowrap;
}
.cl-scope .hint {
  flex-basis: 100%;
  margin-top: -4px;
}
.une .une-b {
  margin: 10px 0 0;
  padding-top: 9px;
  border-top: 1px dashed var(--line2);
  font-size: 14px;
  color: var(--ink-soft);
}

/* ====== 📈 Fiche d'un pote (maquette E validée : surnom, tendance, forme, graphe des écarts) ====== */
dialog.ch-sheet.pf-sheet {
  /* modal = position fixe sur tout l'écran : on l'ancre en bas pour que la hauteur suive le contenu */
  inset: auto 0 0 0;
  height: auto;
  max-height: 90dvh;
}
@media (min-width: 900px) {
  dialog.ch-sheet.pf-sheet {
    inset: 0 0 0 auto;
    height: 100dvh;
    max-height: none;
  }
}
button.pf-nm {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
/* ====== NOUVEAU : portes d'entrée ====== */
/* pastille « 📈 Ses perfs » dans .bc-tags (même gabarit que .ch-chip) */
.pf-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: var(--bg2);
  color: var(--ink-soft);
  font: inherit;
  font-size: 12.5px;
  font-weight: 800;
  position: relative;
  cursor: pointer;
}
.pf-chip::after {
  content: '';
  position: absolute;
  inset: -8px -2px;
} /* zone tactile ≥ 44 px */
.pf-chip .d {
  font-family: var(--mono);
  font-weight: 800;
}
.pf-chip .d.slower {
  color: var(--loss);
}
.pf-chip .d.faster {
  color: var(--win);
}
.pf-chip .d.exact {
  color: var(--accent);
}
/* pseudo cliquable au classement : soulignement pointillé discret + chevron */
.lbrow.tap {
  cursor: pointer;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
}
.lbrow.tap:active {
  background: var(--panel2);
}
.pf-nm {
  text-decoration: underline dotted color-mix(in srgb, var(--ink) 35%, transparent);
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}

/* ====== feuille dans le cadre téléphone ====== */
.fc-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 16px 20px;
  scrollbar-width: thin;
}
.fc-foot {
  flex: none;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}
.fc-foot .btn {
  width: 100%;
  min-height: 48px;
  font-size: 15px;
}
.sh-head .pp-ava {
  flex: none;
  width: 38px;
  height: 38px;
  font-size: 16px;
}
.sh-head h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sh-head > div:nth-child(2) {
  min-width: 0;
}

/* verdict */
.fc-verdict {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--bg2);
  border: 1px solid var(--line2);
}
.fc-verdict .v1 {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
}
.fc-verdict .v1 .mono {
  font-weight: 800;
}
.fc-verdict .v2 {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}
.fc-verdict.slower {
  border-color: color-mix(in srgb, var(--loss) 45%, var(--line2));
}
.fc-verdict.faster {
  border-color: color-mix(in srgb, var(--win) 45%, var(--line2));
}
.fc-verdict.exact {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line2));
}
.c-slower {
  color: var(--loss);
}
.c-faster {
  color: var(--win);
}
.c-exact {
  color: var(--accent);
}
.fc-stats {
  margin-top: 14px;
  border-top: none;
  padding-top: 0;
}
.me-stats.fc-stats > div:first-child b {
  color: inherit;
}
.me-stats.fc-stats b {
  font-size: 20px;
}
.me-stats.fc-stats b.c-slower {
  color: var(--loss);
}
.me-stats.fc-stats b.c-faster {
  color: var(--win);
}
.me-stats.fc-stats b.c-exact {
  color: var(--accent);
}
.me-stats.fc-stats b small {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}
.fc-body .h-sec {
  margin: 18px 0 8px;
}
.fc-body .h-sec h2 {
  font-size: 14px;
}

/* liste des perfs */
.pf-list {
  display: flex;
  flex-direction: column;
}
.pf-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  align-items: center;
}
.pf-row:first-child {
  border-top: none;
}
.pf-row .t {
  min-width: 0;
  font-size: 14px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pf-row .t small {
  font-weight: 600;
  color: var(--muted);
  font-size: 12px;
  margin-left: 4px;
}
.pf-row .s {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 13px;
  color: var(--ink-soft);
  flex-wrap: wrap;
}
.pf-row .s .mono b {
  color: var(--ink);
}
.pf-row .r {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.pf-row .rr-delta {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  padding: 2px 9px;
  white-space: nowrap;
}
.pf-row .badge {
  font-size: 13px;
  padding: 0 6px;
}
.pf-row.next .t {
  color: var(--ink-soft);
}
.pf-row.next .rr-delta {
  border-style: dashed;
  color: var(--muted);
  font-family: var(--sans);
}
.pf-row.dnf .rr-delta {
  color: var(--muted);
  font-family: var(--sans);
}
.pf-more {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  border: none;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
}

/* B : fiche joueur */
.fb-hero {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 0 4px;
}
.fb-hero .pp-ava.me-ava {
  width: 60px;
  height: 60px;
  font-size: 28px;
}
.fb-hero .me-name {
  font-size: 26px;
}
.fb-nick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 3px 10px 3px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  font-weight: 800;
  font-size: 13.5px;
}
.fb-nick i {
  font-style: normal;
  font-size: 17px;
}
.fb-quote {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  margin-top: 4px;
}
.fb-form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}
.fb-form .dots {
  display: flex;
  gap: 6px;
}
.fb-form .dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.18);
}
.dot.g {
  background: var(--win);
}
.dot.o {
  background: var(--warn);
}
.dot.r {
  background: var(--loss);
}
.dot.t {
  background: var(--accent);
}
.dot.k {
  background: var(--muted);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
  color: var(--panel);
  line-height: 1;
}
.dot.k::before {
  content: '×';
}
.dot.e {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--line2);
}
.fb-form .lab b {
  color: var(--ink);
}
.fb-rec {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.fb-rec > div {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  min-width: 0;
}
.fb-rec small {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.fb-rec b {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 16px;
}
.fb-rec .e {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.fb-bet {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--bg2);
  border: 1px solid var(--line2);
  font-size: 14px;
}
.fb-bet .ic {
  font-size: 22px;
}
.fb-bet b {
  color: var(--accent);
}
.fb-bet small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

/* C : graphe des écarts + conseil */
.fc-tip {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line2));
  background: color-mix(in srgb, var(--accent) 9%, var(--panel));
}
.fc-tip .k {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.fc-tip .l {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
  font-size: 14px;
}
.fc-tip .l .mono {
  font-size: 15px;
}
.fc-tip .l .to {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
}
.fc-tip .s {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}
.gx {
  margin-top: 6px;
}
.gx-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 54px;
  align-items: center;
  gap: 0 8px;
  min-height: 40px;
}
.gx-lab {
  min-width: 0;
  font-size: 13px;
  line-height: 1.2;
}
.gx-lab b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gx-lab small {
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
}
.gx-tr {
  position: relative;
  align-self: stretch;
}
.gx-tr .band {
  position: absolute;
  top: 0;
  bottom: 0;
  background: color-mix(in srgb, var(--win) 13%, transparent);
}
.gx-tr .ax {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: var(--line2);
  margin-left: -0.75px;
}
.gx-tr .bar {
  position: absolute;
  top: 50%;
  height: 14px;
  margin-top: -7px;
  border-radius: 4px;
}
.gx-tr .bar.slower {
  background: var(--loss);
}
.gx-tr .bar.faster {
  background: var(--win);
}
.gx-tr .bar.exact {
  background: var(--accent);
}
.gx-tr .bar.clip::after {
  content: '◂';
  position: absolute;
  left: -11px;
  top: -4px;
  font-size: 13px;
  color: var(--win);
}
.gx-tr .bar.clipr::after {
  content: '▸';
  position: absolute;
  right: -11px;
  top: -4px;
  font-size: 13px;
  color: var(--loss);
}
.gx-tr .dnfm {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  background: var(--panel);
  border: 1px dashed var(--line2);
  border-radius: 999px;
  padding: 0 7px;
  white-space: nowrap;
}
.gx-v {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  font-weight: 800;
  text-align: right;
}
.gx-row + .gx-row {
  border-top: 1px solid var(--line);
}
.gx-scale {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 54px;
  gap: 0 8px;
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 700;
}
.gx-scale .sc {
  position: relative;
  height: 16px;
}
.gx-scale .sc span {
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
}
.gx-leg {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 6px;
}
.gx-leg i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  vertical-align: -1px;
  margin-right: 4px;
}
.fc-line {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
}
.fc-line b {
  color: var(--ink);
  font-family: var(--mono);
}
.gx-det {
  grid-column: 1 / -1;
  font-size: 12.5px;
  color: var(--ink-soft);
  padding: 0 0 8px;
}

/* vides */
.fc-empty {
  text-align: center;
  padding: 26px 10px 10px;
}
.fc-empty .big {
  font-size: 46px;
  line-height: 1;
}
.fc-empty p {
  font-size: 17px;
  font-weight: 800;
  margin: 10px 0 2px;
}
.fc-empty small {
  color: var(--muted);
  font-size: 13px;
}

/* D/E */
.fd-head {
  padding-top: 4px;
}
.fd-head > div:nth-child(2) {
  min-width: 0;
}
.fd-l1 {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.fd-l1 h2 {
  flex: 0 1 auto;
  min-width: 0;
}
.fb-nick.sm {
  margin: 0;
  padding: 1px 8px 1px 5px;
  font-size: 12px;
  gap: 4px;
  white-space: nowrap;
  flex: none;
}
.fb-nick.sm i {
  font-size: 14px;
}
.fb-nick .prov {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  margin-left: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.fd-l1 small {
  white-space: nowrap;
  flex: none;
}
.fd-l2 {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px;
  margin-top: 3px;
  min-width: 0;
}
.fd-l2 .q {
  font-size: 12px;
  font-style: italic;
  color: var(--muted);
  white-space: normal;
  line-height: 1.3;
  min-width: 0;
}
.fb-nick.sm.prov {
  border-style: dashed;
}
.fd-trend {
  border-color: var(--line2);
  background: var(--bg2);
}
.fd-trend .k {
  color: var(--muted);
}
.fd-trend .l {
  display: block;
  font-size: 15px;
  line-height: 1.35;
}
.fc-tip .s b {
  color: var(--ink);
}
.fd-form {
  display: flex;
  align-items: center;
  gap: 4px 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}
.fd-form .dots {
  display: flex;
  gap: 6px;
}
.fd-form .dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}
.fd-leg {
  display: flex;
  align-items: center;
  gap: 3px 8px;
  flex-wrap: wrap;
  font-size: 11px;
  width: 100%;
}
.fd-leg .dot {
  display: inline-grid;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: -4px;
  font-size: 8px;
}
.fd-form + .h-sec {
  margin-top: 12px;
}
@media (min-width: 900px) {
  .pf-sheet .fd-head {
    padding-top: 18px;
  }
}

.pf-real {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ====== ➕ Ajouter une course (maquette B : recherche 3 sites, cartes « dossard », feuille récap) ====== */
/* ====== page « Ajouter une course » ====== */
.ar-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px -6px 6px;
}
.ar-back {
  min-width: 44px;
  min-height: 44px;
  border: none;
  background: none;
  color: var(--ink-soft);
  font-size: 22px;
  cursor: pointer;
}
.ar-head h2 {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 20px;
  margin: 0;
}
/* le champ : le cœur de la page */
.ar-q {
  position: relative;
}
.ar-q input.in {
  font-size: 18px;
  padding: 16px 44px 16px 46px;
  border-radius: 14px;
  border-width: 1.5px;
  background: var(--panel);
}
.ar-q .lo {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 19px;
  pointer-events: none;
}
.ar-q .x {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
}
.ar-srcs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  margin: 8px 2px 0;
}
.ar-srcs .ok {
  color: var(--win);
  font-weight: 800;
}
.ar-srcs .wait {
  animation: pulse 1s infinite alternate;
}
@keyframes pulse {
  to {
    opacity: 0.35;
  }
}

/* ligne de résultat (A / C) */
.ar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 12px;
  align-items: center;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.ar-list > .ar-row:first-child {
  border-top: none;
}
.ar-nm {
  font-weight: 800;
  font-size: 15px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ar-nm .hl {
  color: var(--accent);
}
.ar-meta {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 3px;
}
.ar-meta b {
  color: var(--ink);
}
.ar-row .ep-cat,
.ar-card .ep-cat,
.sh .ep-cat {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin-top: 6px;
}
.ep-cat .ep-chip {
  font-size: 12px;
}
.ep-cat .nm {
  font-weight: 600;
  color: var(--muted);
  margin-left: 2px;
}
.ep-cat .pill.dash {
  border-style: dashed;
  color: var(--muted);
}
.ar-src {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 6px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.ar-src .lg {
  color: var(--accent);
  font-weight: 800;
}
.ar-row .btn.sm {
  min-height: 40px;
  min-width: 84px;
}
.ar-done {
  font-size: 13px;
  font-weight: 800;
  color: var(--win);
  white-space: nowrap;
  text-align: right;
}
.ar-done small {
  display: block;
  font-weight: 700;
  color: var(--muted);
  font-size: 11.5px;
}
.ar-wait {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  white-space: nowrap;
  text-align: right;
}
.ar-wait small {
  display: block;
  font-weight: 700;
  color: var(--muted);
  font-size: 11.5px;
}
.ar-row.added {
  background: color-mix(in srgb, var(--win) 7%, transparent);
  margin: 0 -10px;
  padding-left: 10px;
  padding-right: 10px;
  border-radius: 12px;
  border-top-color: transparent;
}
.ar-row.pending {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  margin: 0 -10px;
  padding-left: 10px;
  padding-right: 10px;
  border-radius: 12px;
  border-top-color: transparent;
}
.ar-row.mine .ar-nm {
  color: var(--ink-soft);
}

/* secours */
.ar-alt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 18px;
  border-top: 1px dashed var(--line2);
  padding-top: 8px;
}
.ar-alt button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border: none;
  background: none;
  color: var(--ink-soft);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  padding: 0 2px;
  cursor: pointer;
}
.ar-alt button i {
  font-style: normal;
  width: 22px;
  text-align: center;
}
.ar-alt button small {
  color: var(--muted);
  font-weight: 600;
  margin-left: auto;
  font-size: 12px;
}
.ar-empty {
  text-align: center;
  padding: 28px 8px 6px;
}
.ar-empty .big {
  font-size: 40px;
}
.ar-empty p {
  font-weight: 800;
  margin: 8px 0 2px;
}
.ar-empty small {
  color: var(--muted);
  font-size: 13px;
}

/* B : cartes façon dossard */
.ar-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  margin-top: 10px;
}
.ar-card:active {
  border-color: var(--accent);
}
.ar-card.mine {
  opacity: 0.6;
  cursor: default;
}
.ar-bib {
  border-radius: 10px;
  background: var(--bg2);
  border: 1px solid var(--line2);
  text-align: center;
  padding: 6px 0;
  align-self: start;
}
.ar-bib b {
  display: block;
  font-family: var(--display);
  font-size: 24px;
  line-height: 1;
}
.ar-bib small {
  display: block;
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 2px;
}
.ar-bib.hot {
  border-color: var(--accent);
}
.ar-bib.hot b {
  color: var(--accent);
}
.ar-card .ar-meta {
  margin-top: 2px;
}
.ar-card .plus {
  justify-self: end;
}
.ar-top {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.ar-top .ar-nm {
  flex: 1;
}
.ar-top .pl {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 20px;
  line-height: 1;
}
.ar-top .pl.ok {
  background: none;
  border: 1.5px solid var(--win);
  color: var(--win);
  font-size: 15px;
}
.ar-sheet .ar-sh {
  padding: 4px 18px 20px;
}
.ar-sheet h3 {
  font-size: 18px;
  margin: 0;
  line-height: 1.25;
}
.ar-sheet .ar-meta {
  font-size: 14px;
}
.ar-sheet .note {
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 14px;
}
.ar-sheet .btn {
  width: 100%;
  min-height: 50px;
  font-size: 16px;
}
.ar-sheet .btn + .btn {
  margin-top: 8px;
}
.ar-sheet .done {
  text-align: center;
  padding-top: 8px;
}
.ar-sheet .done .big {
  font-size: 54px;
  line-height: 1;
}
.ar-sheet .done h3 {
  font-size: 22px;
  margin-top: 8px;
}
.ar-list-b {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.ar-manual {
  margin-top: 12px;
}

.ar-list-b .ar-card {
  margin-top: 0;
}
.ar-rm {
  display: block;
  margin: -2px 4px 0 auto;
  font-size: 12px;
  color: var(--muted);
  min-height: 36px;
}
