/* Écran de jeu : carte plein écran, dossard, bande d'info, barre d'onglets, volet. (chargé après 01-base.css, l'ordre compte pour la cascade) */

/* ---------- Écran de jeu : carte plein écran, dossard en haut, barre d'onglets en bas ---------- */
#main {
  overflow: hidden;
}
#map {
  position: absolute;
  inset: 0;
  background: #f1f0ec;
  z-index: 0;
}
.leaflet-control-attribution {
  font-size: 10px;
}
.leaflet-bottom.leaflet-right {
  bottom: var(--sheet-h);
}

/* Haut : dossard (compte à rebours) à gauche, rôle et menu à droite, posés sur la carte */
#topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1002;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}
#topbar > * {
  pointer-events: auto;
}
#topbar > .banner,
#topbar > .gps-warn,
#topbar > #toasts {
  margin: 0 12px;
}
.top-pill {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px 0;
  padding-top: max(10px, env(safe-area-inset-top));
  pointer-events: none !important;
}
.top-pill > * {
  pointer-events: auto;
}
.top-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.top-right .chip,
.top-right .icon-btn {
  height: 40px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
}
.top-right .chip {
  padding: 0 12px;
  color: var(--text);
  font-size: 0.82rem;
}
.top-right .icon-btn {
  width: 40px;
}
.cd-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-2);
  min-width: 120px;
  cursor: default;
}
.cd-card:empty {
  display: none;
}
.cd-card .cd-in {
  padding: 7px 14px 6px;
}
.cd-card small {
  display: block;
  font: 700 0.7rem var(--cond);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--role);
  white-space: nowrap;
}
.cd-card b {
  display: block;
  font: 800 2.5rem/1 var(--cond);
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.cd-card b.code {
  letter-spacing: 0.14em;
  font-size: 2rem;
}
.cd-card.urgent b {
  color: var(--danger);
}
.cd-card.urgent small {
  color: var(--danger);
}
.cd-card.paused b {
  color: var(--muted);
}
.cd-card.share {
  cursor: pointer;
}
.gauge {
  height: 3px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.gauge i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  background: var(--role);
}
.urgent .gauge i {
  background: var(--danger);
}
.urgent b {
  animation: cd-pulse 1s infinite;
}
@keyframes cd-pulse {
  50% {
    opacity: 0.55;
  }
}
@media (prefers-reduced-motion: reduce) {
  .urgent b {
    animation: none;
  }
}
.code {
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-size: 0.85rem;
}
.banner {
  padding: 12px 14px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  background: var(--surface);
  border: 1px solid var(--line);
}
.banner-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}
.banner .ic {
  width: 22px;
  height: 22px;
}
.banner.capture {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
.banner.capture .muted {
  color: #fde3e3;
}
.banner.capture .btn {
  background: #fff;
  border-color: #fff;
  color: var(--danger-text);
}
.banner.zone {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.banner.zone .muted {
  color: var(--on-accent);
  opacity: 0.75;
}
.banner.pause {
  background: var(--warn-50);
  color: var(--warn-text);
}
.banner .btn-row {
  margin-top: 10px;
}
.banner-close {
  float: right;
  margin: -6px -6px 0 8px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.1);
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.banner-close .ic {
  width: 18px;
  height: 18px;
}
.gps-warn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  color: var(--danger-text);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  box-shadow: var(--shadow-2);
  border: 1px solid var(--line);
}

/* Boutons de la carte : une colonne à droite */
.map-nav {
  position: absolute;
  right: 12px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s;
}
.map-nav.top {
  top: calc(var(--top-h) + 10px);
}
.map-nav.bottom {
  bottom: calc(var(--sheet-h) + 12px);
}
#main.sheet-expanded .map-nav,
#main.sheet-expanded .leaflet-control-attribution {
  opacity: 0;
  pointer-events: none;
}
.fab-mini,
.fab {
  background: var(--bg);
  color: var(--text);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.fab-mini {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  border: 1px solid var(--line) !important;
  box-shadow: var(--shadow-2);
}
.fab {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  border: 1px solid var(--line) !important;
  box-shadow: var(--shadow-2);
}
.fab .ic {
  width: 22px;
  height: 22px;
}
.fab.follow {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text) !important;
}
.fab-mini:active,
.fab:active {
  background: var(--surface-2);
}
.fab.follow:active {
  background: #333;
}
.fab-mini.active {
  color: var(--bg);
  background: var(--text);
}
#targetBtn.obj {
  color: var(--accent);
}
#targetBtn.rev {
  color: var(--danger);
}
/* Micro de l'équipe (talkie-walkie) : rouge pendant l'enregistrement, gris quand le doigt est sorti (annulation) */
#teamMicBtn {
  position: relative;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
#teamMicBtn.recording {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger) !important;
  animation: mic-pulse 1.4s infinite;
}
#teamMicBtn.recording.cancel {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--line) !important;
  animation: none;
}
@keyframes mic-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(227, 23, 30, 0.55);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(227, 23, 30, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(227, 23, 30, 0);
  }
}
.team-rec-tip {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  pointer-events: none;
  padding: 6px 10px;
  border-radius: var(--radius);
  background: var(--text);
  color: var(--bg);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-2);
}

/* Bande d'info au-dessus de la barre d'onglets (onglet Carte) */
.ribbon {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 10px);
  z-index: 1001;
  max-width: 536px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  cursor: pointer;
}
.ribbon > .ic {
  width: 22px;
  height: 22px;
  color: var(--role);
}
.ribbon .rb-text {
  flex: 1;
  min-width: 0;
}
.ribbon .rb-title {
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ribbon .rb-sub {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ribbon .phase {
  flex: none;
  font: 700 0.74rem var(--cond);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  max-width: 40%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ribbon .phase .muted {
  font: inherit;
}
.rb-ic {
  display: flex;
  color: var(--role);
}
.rb-ic .ic {
  width: 22px;
  height: 22px;
}
.rb-ic.tone-red {
  color: var(--danger);
}
.rb-ic.tone-green {
  color: var(--obj);
}
.rb-ic.tone-yellow {
  color: var(--gold);
}
.rb-ic.tone-blue {
  color: var(--muted);
}

/* Barre d'onglets, avec l'action du moment au centre */
.tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1003;
  display: flex;
  align-items: flex-start;
  gap: 2px;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding: 0 4px env(safe-area-inset-bottom);
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.tab {
  font: 700 0.68rem var(--cond);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex: 1 1 0;
  min-width: 0;
  height: var(--tab-h);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}
.tab .ic {
  width: 22px;
  height: 22px;
}
.tab span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tab.active {
  color: var(--text);
}
.tab.active::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 24%;
  right: 24%;
  height: 3px;
  background: var(--role);
}
.tab .badge {
  position: absolute;
  top: 7px;
  left: calc(50% + 6px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--radius-pill);
  background: var(--danger);
  color: #fff;
  font:
    700 0.62rem/16px Barlow,
    sans-serif;
  letter-spacing: 0;
  text-align: center;
}
.tab .badge.dot {
  min-width: 8px;
  width: 8px;
  height: 8px;
  padding: 0;
  top: 10px;
}
.tab .badge.warn {
  background: var(--warn);
}
.tab-act {
  flex: 1.35 1 0;
  height: calc(var(--tab-h) + 8px);
  margin-top: -16px;
  border-radius: var(--radius);
  color: #fff;
  background: var(--danger);
  gap: 2px;
  font-size: 0.82rem;
  box-shadow: 0 8px 20px -8px rgba(227, 23, 30, 0.7);
}
.tab-act .ic {
  width: 26px;
  height: 26px;
  stroke-width: 2;
}
.tab-act.orange {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 8px 20px -8px rgba(255, 90, 0, 0.7);
}
.tab-act.ink {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.6);
}
.tab-act:disabled {
  background: var(--surface-2);
  color: var(--muted);
  box-shadow: none;
  border: 1px solid var(--line);
  cursor: default;
}
.tab-act:not(:disabled):active {
  transform: translateY(1px);
}

/* Page de l'onglet ouvert : plein écran sous le dossard, ou à mi-hauteur (Terrain) */
#sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
  margin: 0 auto;
  max-width: 560px;
  z-index: 1001;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
#sheet.collapsed {
  display: none;
}
#sheet.half,
#sheet.expanded {
  border-top: 1px solid var(--line);
  border-radius: 10px 10px 0 0;
  box-shadow: 0 -8px 30px -14px rgba(0, 0, 0, 0.4);
  transition: height 0.2s ease;
}
#sheet.half {
  height: 52vh;
  height: 52dvh;
  max-height: calc(100dvh - var(--top-h) - var(--tab-h));
}
#sheet.expanded {
  top: var(--top-h);
}
#sheet.dragging {
  transition: none;
}
#sheetHandle {
  flex: none;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 26px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
#sheetHandle span {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
}
#sheetHandle:active span {
  background: var(--muted);
}
#main.sheet-expanded #sheet {
  max-width: none;
}
#main.sheet-expanded #sheetContent {
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
}
#sheetContent {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overflow-x: hidden;
  padding: 4px 18px 16px;
  display: flex;
  flex-direction: column;
  touch-action: pan-y;
}
#sheetContent p {
  margin: 0;
}
.muted {
  color: var(--muted);
  font-size: 0.875rem;
}
.center {
  text-align: center;
}
.page-title {
  margin: 14px 0 2px;
  font: 800 1.9rem/1 var(--cond);
  text-transform: uppercase;
}
.page-sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

/* Sections du panneau */
.section {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.section:last-child {
  border-bottom: none;
}
.section-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title {
  margin: 0;
  font: 800 0.8rem var(--cond);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  flex: 1;
}
.peek-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid currentColor;
  color: var(--role);
}
.peek-icon .ic {
  width: 22px;
  height: 22px;
}
.tone-blue {
  color: var(--accent);
}
.tone-red {
  color: var(--danger);
}
.tone-yellow {
  color: var(--gold);
}
.tone-green {
  color: var(--ok);
}
/* paliers du chaud/froid : mêmes couleurs que la bulle sur la carte */
.tone-burning {
  color: var(--heat-burning);
}
.tone-hot {
  color: var(--heat-hot);
}
.tone-warm {
  color: var(--heat-warm);
}
.tone-cold {
  color: var(--heat-cold);
}
.tone-jammed {
  color: var(--heat-jammed);
}
.section-head .count {
  color: var(--muted);
  font-size: 0.8rem;
}
.hint {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 0.85rem;
}
.hint.warn {
  color: var(--warn-text);
}
.hint .ic {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

/* Menu : localisation par l'app OwnTracks */
.menu-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.menu-block .setting select {
  max-width: 48%;
}
.hint.ko {
  color: var(--danger-text);
}
.ot-steps {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
}
.ot-steps a:not(.btn) {
  color: var(--text);
  font-weight: 700;
}
a.btn {
  text-decoration: none;
  margin-top: 6px;
}
.ot-url {
  display: flex;
  gap: 6px;
  align-items: center;
}
.ot-url input {
  flex: 1;
  min-width: 0;
  font-size: 0.8rem;
  padding: 8px 10px;
}
.chip.ot {
  background: var(--ok-50);
  color: var(--ok-text);
}

/* Encadré code de partie */
.code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.overline {
  font: 700 0.72rem var(--cond);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.code-big {
  font: 800 1.9rem/1.1 var(--cond);
  letter-spacing: 0.24em;
  color: var(--text);
}

/* Listes (joueurs, points, réglages) */
.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 6px 0;
}
.row + .row {
  border-top: 1px solid var(--surface-2);
}
.row-main {
  flex: 1;
  min-width: 0;
}
.row-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-sub {
  color: var(--muted);
  font-size: 0.8rem;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 800 0.95rem var(--cond);
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--line);
  position: relative;
  text-transform: uppercase;
}
.avatar.tracked {
  border-color: var(--danger);
  color: var(--danger);
}
.avatar.hunter {
  border-color: var(--hunter);
  color: var(--hunter-text);
}
.avatar.spectator {
  border-color: var(--muted);
  color: var(--muted);
}
.avatar.off::after {
  content: '';
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--offline);
  border: 2px solid var(--bg);
}
.avatar:not(.off)::after {
  content: '';
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ok);
  border: 2px solid var(--bg);
}
select.role-select {
  padding: 6px 28px 6px 12px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface-2)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%2374787C' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E")
    no-repeat right 6px center / 18px;
  border-color: transparent;
  cursor: pointer;
}
select.role-select.tracked {
  background-color: var(--danger-50);
  color: var(--danger-text);
}
select.role-select.hunter {
  background-color: var(--hunter-50);
  color: var(--hunter-text);
}
select.role-select.spectator {
  background-color: var(--surface-2);
  color: var(--muted);
}

/* Réglages façon « Paramètres » Android */
.setting {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 6px 0;
  cursor: default;
}
.setting + .setting {
  border-top: 1px solid var(--surface-2);
}
.setting .row-main {
  display: flex;
  flex-direction: column;
}
.num-input {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.num-input input {
  width: 72px;
  text-align: right;
  padding: 8px 10px;
  font-variant-numeric: tabular-nums;
}
.num-input .unit {
  color: var(--muted);
  font-size: 0.85rem;
  width: 26px;
}
.switch {
  position: relative;
  width: 40px;
  height: 24px;
  flex: none;
}
.switch input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
  z-index: 1;
  width: 100%;
  height: 100%;
}
.switch span {
  position: absolute;
  inset: 0;
  background: var(--line);
  border-radius: var(--radius);
  transition: background 0.15s;
  pointer-events: none;
}
.switch span::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s;
}
.switch input:checked + span {
  background: var(--accent);
}
.switch input:checked + span::after {
  transform: translateX(16px);
}

/* Points d'objectif */
.pt-num {
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font: 800 0.95rem var(--cond);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.pt-name {
  flex: 1;
  min-width: 0;
  border-color: transparent;
  background: transparent;
  padding: 6px 8px;
}
.pt-name:hover {
  border-color: var(--line);
}
.pt-actions {
  display: flex;
  flex: none;
}
.empty {
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* Pied de panneau collant (bouton « Lancer ») */
.sheet-footer {
  position: sticky;
  bottom: -16px;
  margin: 0 -16px -16px;
  padding: 12px 16px 16px;
  background: var(--bg);
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.checklist .chip .ic {
  width: 14px;
  height: 14px;
}

/* Outils du master en partie */
.tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.tool {
  font: 700 0.82rem var(--cond);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 76px;
  padding: 10px 4px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
}
.tool .ic {
  width: 26px;
  height: 26px;
  color: var(--text);
}
.tool:active {
  background: var(--surface-2);
}
.tool.green .ic {
  color: var(--ok);
}
.tool.yellow .ic {
  color: var(--warn-text);
}
.tool.red {
  color: var(--danger-text);
}
.tool.red .ic {
  color: var(--danger);
}
.tool.on {
  background: var(--accent-50);
  border-color: var(--accent);
  color: var(--text);
}

/* Statut de partie */
.status {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.stat {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
}
.stat b {
  display: block;
  font: 800 1.5rem/1.1 var(--cond);
  font-variant-numeric: tabular-nums;
}
.stat .overline {
  margin-bottom: 2px;
}
.objective-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 1.05rem;
}
.objective-line .ic {
  color: var(--accent);
}

.progress {
  display: flex;
  gap: 4px;
}
.progress span {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
}
.progress span.done {
  background: var(--text);
}
.progress span.cur {
  background: var(--accent);
}

.winner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 0 6px;
  font: 800 1.9rem/1.05 var(--cond);
  text-transform: uppercase;
  text-align: center;
}
.winner .peek-icon {
  width: 56px;
  height: 56px;
}
.winner .peek-icon .ic {
  width: 30px;
  height: 30px;
}
.summary {
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  padding-top: 12px;
}

/* Modes de jeu actifs (puces sous le résumé des réglages) */
.modes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding-top: 8px;
}
.hint.ok {
  color: var(--ok-text);
}

/* Pouvoirs : cartes du tracké, radar et chaud/froid */
.tools.two {
  grid-template-columns: repeat(2, 1fr);
}
.tool:disabled {
  opacity: 0.45;
  cursor: default;
}
.tool.power .ic {
  color: var(--accent);
}
.tool:not(:disabled):is(#radarBtn, #hotColdBtn, #compassBtn) {
  border-color: var(--accent);
  background: var(--accent-50);
}
.tool small {
  color: var(--muted);
  font:
    600 0.78rem Barlow,
    sans-serif;
  letter-spacing: 0;
  text-transform: none;
  font-variant-numeric: tabular-nums;
}

/* Dernière partie : trophées et tableau */
.last-game summary {
  list-style: none;
  cursor: pointer;
}
.last-game summary::-webkit-details-marker {
  display: none;
}
.last-game summary .ic {
  color: var(--muted);
}
.last-game .peek-icon {
  width: 36px;
  height: 36px;
}
.last-game .peek-icon .ic {
  width: 20px;
  height: 20px;
}
table.stats {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
table.stats th {
  text-align: left;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 4px;
  border-bottom: 1px solid var(--line);
}
table.stats td {
  padding: 8px 4px;
  border-bottom: 1px solid var(--surface-2);
}
table.stats td:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}
table.stats .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.avatar.sm {
  width: 26px;
  height: 26px;
  font-size: 0.8rem;
}
.avatar.sm::after {
  display: none;
}

/* Barre du replay (remplace le bandeau du bas pendant la lecture) */
.replaying #sheet,
.replaying #targetBtn,
.replaying #teamMicBtn,
.replaying #banner {
  display: none !important;
}
.replay-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0 auto;
  max-width: 560px;
  z-index: 1001;
  background: var(--bg);
  border-top: 1px solid var(--line);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.12);
  padding: 8px 16px max(12px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.replay-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.replay-top .section-title {
  flex: none;
}
.replay-time {
  flex: 1;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.replay-bar input[type='range'] {
  width: 100%;
  padding: 0;
  margin: 4px 0;
  border: none;
  background: none;
  box-shadow: none;
  accent-color: var(--accent);
}
.replay-controls {
  display: flex;
  gap: 8px;
}
.replay-controls .btn.primary {
  flex: 1;
}
.replay-controls .btn.tonal {
  min-width: 72px;
  font-variant-numeric: tabular-nums;
}
.replay-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 0.8rem;
  color: var(--muted);
}
.replay-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: -1px;
}
.replay-pin.caught {
  border-style: dashed;
}
