@property --hue {
  syntax: '<number>';
  inherits: true;
  initial-value: 232;
}

:root {
  --hue: 232;
  --ink: #f4f5fb;
  --ink-2: rgba(244, 245, 251, 0.66);
  --ink-3: rgba(244, 245, 251, 0.4);
  --bg: #0b0c18;
  --surface: #14162a;
  --surface-2: #1c1f37;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #ffb547;
  --danger: #ff5d73;
  --c1: #ff5d73; --c2: #ffb547; --c3: #3ddc97; --c4: #45c4f5; --c5: #8c7cff; --c6: #f56fc0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html, body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  background-color: var(--bg);
  background-image: radial-gradient(140% 80% at 50% 0%,
      hsl(var(--hue) 34% 14%) 0%,
      hsl(calc(var(--hue) + 14) 30% 8%) 55%,
      var(--bg) 100%);
  transition: --hue 1.2s ease;
  color: var(--ink);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
}
button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

#stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  transition: opacity 0.4s ease;
}
/* La démo derrière le menu reste une ambiance, le titre doit primer */
body.is-menu #stage { opacity: 0.35; }

/* ---------- Écrans ---------- */
.screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 20px) 20px calc(env(safe-area-inset-bottom) + 24px);
  text-align: center;
  animation: fade-in 0.28s ease both;
}

.screen-menu {
  background: linear-gradient(to bottom, rgba(11, 12, 24, 0) 45%, rgba(11, 12, 24, 0.82) 100%);
}

.screen-over, .screen-pause {
  justify-content: center;
  background: rgba(11, 12, 24, 0.74);
}

.menu-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.title-block { margin-top: -2vh; }

.kicker {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 2px;
  padding-left: 0.42em;
}

h1 {
  font-size: clamp(58px, 19vw, 96px);
  line-height: 0.9;
  font-weight: 900;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.palette-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 18px;
}
.palette-dots i {
  width: 8px; height: 8px; border-radius: 50%;
  animation: dot-bob 2.4s ease-in-out infinite;
}
.palette-dots i:nth-child(1) { background: var(--c1); animation-delay: 0s; }
.palette-dots i:nth-child(2) { background: var(--c2); animation-delay: .12s; }
.palette-dots i:nth-child(3) { background: var(--c3); animation-delay: .24s; }
.palette-dots i:nth-child(4) { background: var(--c4); animation-delay: .36s; }
.palette-dots i:nth-child(5) { background: var(--c5); animation-delay: .48s; }
.palette-dots i:nth-child(6) { background: var(--c6); animation-delay: .6s; }

.tagline {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
}

.menu-bottom {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.best-line {
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: 14px;
}
.best-line strong { color: var(--ink); font-size: 18px; font-variant-numeric: tabular-nums; margin-left: 4px; }

.hint-line {
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 10px;
}

.play {
  width: 100%;
  max-width: 320px;
  height: 60px;
  border-radius: 999px;
  background: var(--ink);
  color: #10121f;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.01em;
  transition: transform 0.12s ease, opacity 0.2s ease;
}
.play:active { transform: scale(0.97); }
.play.is-locked { opacity: 0.45; pointer-events: none; }

.links {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 14px;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 650;
  color: var(--ink-2);
}
.link-btn svg { fill: currentColor; }
.link-btn:active { background: var(--line); }

.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-2);
}
.icon-btn svg { fill: currentColor; }
.icon-btn:active { background: var(--line); }

#btnSound .ico-off { display: none; }
#btnSound.is-muted .ico-on { display: none; }
#btnSound.is-muted .ico-off { display: block; }

/* ---------- HUD ---------- */
.hud {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  padding-top: calc(env(safe-area-inset-top) + 14px);
  text-align: center;
}

.hud-pause {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 12px);
  left: 12px;
  pointer-events: auto;
  color: var(--ink-3);
}

.hud-score {
  font-size: 68px;
  line-height: 1;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.hud-score.bump { animation: bump 0.22s ease-out; }

.hud-best {
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.hud-hint {
  position: absolute;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 40px);
  transform: translateX(-50%);
  width: min(300px, 86vw);
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink-2);
  animation: hint-pulse 1.6s ease-in-out infinite;
}

/* ---------- Fin de partie ---------- */
.over-card {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.over-reason {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--danger);
}

.over-score {
  font-size: clamp(96px, 32vw, 140px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  margin-top: 8px;
  animation: pop-in 0.4s cubic-bezier(.2, 1.4, .4, 1) both;
}

.over-label {
  font-size: 15px;
  color: var(--ink-2);
}

.over-record {
  margin-top: 12px;
  font-size: 15px;
  font-weight: 800;
  color: var(--accent);
}

.over-stats {
  display: flex;
  width: 100%;
  margin: 28px 0 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.over-stats > div {
  flex: 1;
  padding: 14px 0;
}
.over-stats > div + div { border-left: 1px solid var(--line); }
.over-stats dt { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.12em; }
.over-stats dd { font-size: 24px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }

.pause-text { margin-top: 12px; font-size: 18px; color: var(--ink-2); }
.screen-pause .over-reason { color: var(--ink); font-size: 20px; }

/* ---------- Panneaux (sheets) ---------- */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 12, 0.6);
  animation: fade-in 0.2s ease both;
}

.sheet-panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 84dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  padding: 8px 20px calc(env(safe-area-inset-bottom) + 24px);
  animation: slide-up 0.3s cubic-bezier(.2, .9, .3, 1) both;
}

.sheet-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0 6px;
}
.sheet-head h2 { font-size: 22px; font-weight: 850; flex: 1; text-align: left; }
.sheet-head .icon-btn { margin-right: -10px; }

.balance {
  font-size: 15px;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.sheet-note {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
  text-align: left;
  margin: 4px 0 18px;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin: 8px 0 16px;
  background: var(--surface-2);
  border-radius: 999px;
}
.tab {
  flex: 1;
  padding: 10px 8px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
}
.tab.is-active { background: var(--ink); color: #10121f; }

.board { list-style: none; }
.board li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.board li:last-child { border-bottom: 0; }
.board .rank { width: 24px; color: var(--ink-3); font-weight: 700; text-align: left; }
.board .pts { flex: 1; text-align: left; font-size: 20px; font-weight: 800; }
.board .date { color: var(--ink-3); font-size: 13px; }
.board li.is-last .pts { color: var(--accent); }
.board li:nth-child(1) .rank { color: var(--c2); }
.board .empty { color: var(--ink-2); justify-content: center; border: 0; padding: 28px 0; }

.soon {
  text-align: left;
  padding: 18px;
  background: var(--surface-2);
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
}
.soon-title { font-size: 16px; font-weight: 800; color: var(--ink); margin-bottom: 6px; }

.skins {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 440px) {
  .skins { grid-template-columns: repeat(3, 1fr); }
}

.skin-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 10px 14px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1.5px solid transparent;
  text-align: center;
}
.skin-card.is-equipped { border-color: var(--ink); }
.skin-card.is-locked { cursor: default; }

.skin-orb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  margin: 12px 0 8px;
}
.skin-card.is-locked .skin-orb { opacity: 0.55; }

.skin-name { font-size: 15px; font-weight: 800; }
.skin-status { font-size: 12px; color: var(--ink-3); font-weight: 650; }
.skin-card.is-equipped .skin-status { color: var(--ink); }

/* ---------- Animations ---------- */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.16); } 100% { transform: scale(1); } }
@keyframes pop-in { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes dot-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes hint-pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

@media (max-height: 600px) {
  .palette-dots { margin: 10px 0 12px; }
  .over-stats { margin: 16px 0; }
}

/* =========================================================
   Ajouts : défis, parcours du jour, partage
   ========================================================= */

/* Menu */
.challenge {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.challenge-kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.challenge-text { margin-top: 4px; font-size: 16px; line-height: 1.4; color: var(--ink-2); }
.challenge-text strong { color: var(--ink); font-weight: 800; }

.sub-row {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 320px;
  margin-top: 10px;
}
.sub-btn {
  flex: 1;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 15px;
  font-weight: 750;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.12s ease;
}
.sub-btn:active { transform: scale(0.97); }
.sub-btn small { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }

/* HUD */
.hud-goal {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.hud-goal.is-done { color: var(--c3); }

.banner {
  position: absolute;
  left: 50%;
  top: calc(env(safe-area-inset-top) + 124px);
  transform: translateX(-50%);
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--banner, var(--ink));
  color: #10121f;
  font-size: 15px;
  font-weight: 850;
  white-space: nowrap;
  animation: banner-in 0.35s cubic-bezier(.2, 1.4, .4, 1) both;
}

/* Fin de partie */
.over-rank { margin-top: 12px; }
.rank-chip {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 800;
}
.over-note {
  min-height: 21px;
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink-2);
}
.over-note.is-win { color: var(--accent); font-weight: 800; }
.over-note:empty { display: none; }

.share-btn {
  width: 100%;
  max-width: 320px;
  height: 54px;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #10121f;
  font-size: 17px;
  font-weight: 800;
  transition: transform 0.12s ease;
}
.share-btn svg { flex: none; }
.share-btn:active { transform: scale(0.97); }

/* Panneaux */
.field {
  width: 100%;
  height: 54px;
  padding: 0 18px;
  margin-bottom: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  user-select: text;
  -webkit-user-select: text;
}
.field:focus { outline: 2px solid var(--ink-2); outline-offset: 0; }
#nameForm .play { max-width: none; }
.link-block { display: block; width: 100%; margin-top: 6px; }

.share-preview {
  display: block;
  width: min(100%, 300px);
  margin: 4px auto 16px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.share-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.sheet-note.small { font-size: 13px; margin: 14px 0 0; }

.board .mode { color: var(--ink-3); font-size: 13px; margin-right: 10px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 28px);
  transform: translateX(-50%);
  z-index: 30;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: #10121f;
  font-size: 15px;
  font-weight: 750;
  animation: fade-in 0.2s ease both;
}

@keyframes banner-in {
  from { opacity: 0; transform: translate(-50%, -8px) scale(0.92); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@media (max-height: 680px) {
  .title-block .tagline { display: none; }
  .challenge { padding: 10px 14px; margin-bottom: 10px; }
  .over-stats { margin: 14px 0; }
  .over-score { font-size: clamp(80px, 26vw, 110px); }
}

/* Bouton Jouer sur deux lignes + boutique (achats, formes) */
.play { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 60px; height: auto; padding: 8px 16px; }
.play small { font-size: 12.5px; font-weight: 650; color: rgba(16, 18, 31, 0.6); }
.skin-orb { position: relative; display: grid; place-items: center; }
.skin-core { width: 62%; height: 62%; border-radius: inherit; }
.skin-card.is-locked:not(.is-poor) .skin-status { color: var(--accent); }

/* =========================================================
   Retouches « spatial simple » : moins d'effets, libellés techniques
   ========================================================= */
.title-planet { display: block; margin: 0 auto 10px; color: var(--ink-2); }
.kicker { font-family: var(--mono); font-size: 13px; letter-spacing: 0.2em; padding-left: 0.2em; font-weight: 600; }
h1 { font-weight: 800; letter-spacing: -0.045em; }
.tagline { margin-top: 14px; }

/* Coins moins ronds : on quitte les pilules */
.play, .sub-btn, .share-btn { border-radius: 14px; }
.tabs { border-radius: 12px; }
.tab { border-radius: 9px; }
.banner, .toast { border-radius: 10px; }
.rank-chip { border-radius: 8px; }
.challenge, .soon, .skin-card { border-radius: 14px; }
.sheet-panel { border-radius: 18px 18px 0 0; }
.link-btn { border-radius: 10px; }

/* Petits libellés en chasse fixe, façon tableau de bord */
.best-line, .hud-goal, .over-reason, .over-label, .over-stats dt, .challenge-kicker,
.play small, .sub-btn small, .skin-status, .board .date, .board .mode, .hint-line {
  font-family: var(--mono);
  letter-spacing: 0.04em;
}
.best-line { font-size: 12px; text-transform: uppercase; }
.best-line strong { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.hud-goal { font-size: 11.5px; text-transform: uppercase; }
.over-label { font-size: 12px; text-transform: uppercase; }
.play small, .sub-btn small { font-size: 11px; }
.over-reason { font-size: 12px; letter-spacing: 0.18em; }

/* Halo et ombres plus sobres */
.skin-orb { box-shadow: none; }
.share-preview { box-shadow: none; border: 1px solid var(--line); }

/* Sélecteur de langue */
.lang-switch {
  display: flex;
  padding: 3px;
  gap: 2px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}
.lang-switch button {
  min-width: 40px;
  padding: 7px 8px;
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.lang-switch button.is-active { background: var(--ink); color: #10121f; }

/* Textes sur plusieurs lignes venant des traductions */
.tagline, .hud-hint { white-space: pre-line; }

/* Sans défi, la rangée secondaire est vide : on la masque */
.sub-row:not(:has(.sub-btn:not([hidden]))) { display: none; }

/* =========================================================
   Compte : bouton du menu, connexion par code, classement en ligne
   ========================================================= */
.top-right { display: flex; align-items: center; gap: 4px; }
.account-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 46vw;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.account-btn svg { flex: none; fill: none; stroke: currentColor; stroke-width: 2; }
.account-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-btn.is-signed { color: var(--accent); border-color: rgba(255, 181, 71, 0.35); }
.account-btn:active { transform: translateY(1px); }

.auth-step { display: flex; flex-direction: column; }
.field-label {
  display: block;
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-align: left;
}
.field {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  margin-bottom: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  user-select: text;
  -webkit-user-select: text;
}
.field:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.field-code {
  font-family: var(--mono);
  font-size: 28px;
  letter-spacing: 0.5em;
  text-align: center;
  padding-left: 0.5em;
}
.field-help { margin: -6px 0 12px; font-size: 13px; color: var(--ink-3); text-align: left; }
.auth-error { margin: -4px 0 12px; font-size: 14px; color: var(--danger); text-align: left; }
.auth-dev {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 181, 71, 0.5);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--accent);
  text-align: left;
}
.auth-links { display: flex; justify-content: space-between; margin-top: 10px; }
.auth-step .play { max-width: none; }
.play:disabled { opacity: 0.5; }

.account-info { margin: 6px 0 14px; }
.account-info > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
}
.account-info dt { font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--ink-3); align-self: center; }
.account-info dd { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }

/* Fin de partie : bouton d'enregistrement (sans compte) */
.save-btn { margin-top: 0; margin-bottom: 10px; }
#btnSave:not([hidden]) ~ .share-btn { background: transparent; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }

/* Classement en ligne */
.board-meta { font-family: var(--mono); font-size: 12px; color: var(--ink-3); text-align: left; margin: -4px 0 6px; }
.board .who { flex: 1; text-align: left; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .who + .pts { flex: none; text-align: right; }
.board .empty { flex-direction: column; text-align: center; line-height: 1.5; }

/* =========================================================
   Profil, défis, amis, succès, notifications, administration
   Listes simples et lisibles : une ligne = une phrase + une action.
   ========================================================= */
.badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

/* Cloche à côté du pseudo */
.notif-btn {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--ink-2);
}
.notif-btn svg { fill: none; }
.notif-btn.has-new { color: var(--ink); }
.notif-btn .badge { position: absolute; top: 2px; right: 0; margin: 0; }
.notif-btn:active { background: var(--line); }

/* En-tête du profil */
.profile-id { flex: 1; min-width: 0; text-align: left; }
.profile-id h2 { overflow: hidden; text-overflow: ellipsis; }
.profile-dust { margin-top: 2px; font-size: 14px; font-weight: 700; color: var(--accent); }
.profile-line { margin: 2px 0 14px; font-size: 14px; color: var(--ink-2); text-align: left; line-height: 1.5; }
.ptab { display: inline-flex; align-items: center; justify-content: center; }

/* Titres et aides de section : en phrase, pas en capitales */
.section-title { margin: 20px 0 4px; font-size: 15px; font-weight: 800; color: var(--ink); text-align: left; }
.section-help { margin: 6px 0 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); text-align: left; }
[data-ppanel] > section:first-child .section-title, [data-ppanel] > .section-help:first-child { margin-top: 4px; }

/* Listes */
.rows { list-style: none; }
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.row:last-child { border-bottom: 0; }
.row-main { flex: 1; min-width: 0; }
.row-text { font-size: 15px; line-height: 1.4; color: var(--ink); }
.row-text strong { font-weight: 800; }
.row-sub { margin-top: 2px; font-size: 13px; color: var(--ink-3); line-height: 1.4; }
.row-actions { display: flex; gap: 6px; flex: none; }
.row-empty { list-style: none; padding: 12px 0; font-size: 14px; color: var(--ink-2); text-align: left; line-height: 1.5; }
.row.is-highlight { background: rgba(255, 181, 71, 0.07); margin: 0 -10px; padding-left: 10px; padding-right: 10px; border-radius: 10px; border-bottom-color: transparent; }
.row.is-unread .row-text { font-weight: 700; }
.row.is-unread::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* Pastilles de statut des défis */
.pill {
  flex: none;
  min-width: 64px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  background: var(--surface-2);
  color: var(--ink-2);
}
.pill-turn { background: rgba(255, 181, 71, 0.16); color: var(--accent); }
.pill-won { background: rgba(61, 220, 151, 0.14); color: var(--c3); }
.pill-lost { background: rgba(255, 93, 115, 0.14); color: var(--danger); }
.pill-muted { color: var(--ink-3); }

.mini-btn {
  padding: 9px 13px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 14px;
  font-weight: 700;
}
.mini-btn.is-primary { background: var(--ink); color: #10121f; border-color: transparent; }
.mini-btn:active { transform: translateY(1px); }

.text-btn { padding: 2px 0; margin-right: 12px; font-size: 14px; font-weight: 700; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.invite-line { margin-top: 12px; }
.invite-line span { display: block; margin-bottom: 4px; }

/* Défier un ami */
.play.play-compact { min-height: 50px; max-width: none; font-size: 17px; margin-bottom: 4px; }
.duel-picker { margin: 10px 0 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 15px;
  font-weight: 700;
}
.chip:active { transform: translateY(1px); }

/* Ajout d'ami */
.inline-form { margin-top: 6px; }
.inline-row { display: flex; gap: 8px; }
.inline-row .field { margin-bottom: 0; flex: 1; min-width: 0; height: 48px; }
.inline-row .sub-btn { flex: none; min-height: 48px; padding: 0 18px; }
.inline-form .auth-error { margin: 8px 0 0; }

/* Succès */
.ach .ach-name { font-weight: 800; }
.ach:not(.is-done) .ach-name { color: var(--ink-2); }
.ach-bar { height: 4px; margin-top: 8px; max-width: 220px; border-radius: 2px; background: var(--line); overflow: hidden; }
.ach-bar span { display: block; height: 100%; background: var(--accent); }
.ach-progress { font-size: 12px; }
.ach-reward { flex: none; font-size: 13px; font-weight: 800; color: var(--accent); }
.ach.is-done .ach-reward { color: var(--c3); font-size: 18px; }

.profile-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.profile-email { flex: 1; min-width: 0; font-size: 13px; color: var(--ink-3); text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Administration */
.admin-grant { margin: 4px 0 12px; padding: 14px; border-radius: 14px; background: var(--surface-2); display: flex; flex-direction: column; }
.admin-grant .play { max-width: none; }
#adminSearch { margin-top: 8px; }
.admin-log { list-style: none; font-size: 13px; }
.admin-log li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); text-align: left; }
.log-when { flex: none; font-size: 12px; color: var(--ink-3); padding-top: 1px; }
.log-what { color: var(--ink-2); }

/* =========================================================
   Admin : sous-onglets, tableau d'audience, histogrammes
   ========================================================= */
:root { --chart: #8c7cff; } /* série unique, validée sur le fond des panneaux (contraste et luminosité) */

.subtabs { display: flex; gap: 18px; margin: 4px 0 12px; border-bottom: 1px solid var(--line); }
.subtab {
  padding: 8px 0;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-3);
}
.subtab.is-active { color: var(--ink); border-bottom-color: var(--ink); }

.table-scroll { overflow-x: auto; margin: 10px 0 6px; }
.stats-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.stats-table th, .stats-table td { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.stats-table thead th { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.stats-table tbody th { font-weight: 600; color: var(--ink); }
.stats-table .num { text-align: right; white-space: nowrap; }
.stats-table td.num { font-weight: 700; }
.stats-table tr.is-sub th { padding-left: 16px; font-weight: 500; color: var(--ink-2); }
.stats-table tr.is-sub td { color: var(--ink-2); font-weight: 500; }

.chart { position: relative; margin: 6px 0 4px; }
.chart svg { display: block; width: 100%; height: auto; }
.chart-bar { fill: var(--chart); transition: opacity 0.12s; }
.chart-bar.is-dim { opacity: 0.4; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-axis { fill: var(--ink-3); font-size: 10px; font-family: var(--mono); }
.chart-hit { fill: transparent; cursor: default; }
.chart-tip {
  position: absolute;
  top: -6px;
  transform: translateX(-50%);
  padding: 5px 9px;
  border-radius: 7px;
  background: var(--ink);
  color: #10121f;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
}
.chart-table { margin-top: 4px; font-size: 13px; text-align: left; }
.chart-table summary { cursor: pointer; color: var(--ink-3); font-size: 13px; }
.chart-table table { margin-top: 6px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.chart-table td { padding: 3px 18px 3px 0; color: var(--ink-2); }
.chart-table td.num { text-align: right; color: var(--ink); font-weight: 600; }
.row-num { font-size: 14px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stats-privacy { margin-top: 18px; font-size: 12.5px; color: var(--ink-3); }
[data-apanel="players"] .admin-grant .section-title { margin-top: 0; }

.subtab { display: inline-flex; align-items: center; }
.subtab .badge { margin-left: 5px; }
.subtabs { flex-wrap: wrap; row-gap: 0; }

/* Bouton principal du menu : l'action évidente de l'écran */
.play.play-hero {
  min-height: 78px;
  gap: 3px;
  background: var(--accent);
  color: #1d1406;
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -0.01em;
  animation: hero-pulse 2.6s ease-in-out infinite;
}
.play-hero .play-main { display: inline-flex; align-items: center; gap: 10px; }
.play-hero .play-icon { fill: currentColor; margin-left: -6px; }
.play-hero small { font-family: inherit; letter-spacing: 0; font-size: 13.5px; font-weight: 700; color: rgba(29, 20, 6, 0.72); }
.play.play-hero:active { transform: scale(0.97); animation: none; }
@keyframes hero-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 181, 71, 0.5); }
  55% { box-shadow: 0 0 0 12px rgba(255, 181, 71, 0); }
}

.play small:empty { display: none; }

/* Connexion Google / Discord */
.sso { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin: 2px 0 6px; }
.sso-google { display: flex; justify-content: center; min-height: 44px; }
.sso-google:empty { display: none; }
.sso-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}
.sso-discord { background: #5865f2; color: #fff; }
.sso-discord:active { transform: translateY(1px); }
.sso-or { display: flex; align-items: center; gap: 10px; margin: 6px 0 4px; font-size: 13px; color: var(--ink-3); }
.sso-or::before, .sso-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sso-google > div { margin: 0 auto; }

/* =========================================================
   Pages plein écran (classement, skins, profil, notifications, compte)
   à la place des panneaux qui montent d'en bas : barre avec retour,
   onglets soulignés, sections séparées par des filets.
   ========================================================= */
.sheet.page { align-items: stretch; }
.sheet.page .sheet-backdrop { display: none; }
.sheet.page .sheet-panel {
  max-width: none;
  height: 100%;
  max-height: none;
  border-radius: 0;
  background: var(--bg);
  padding: 0 max(20px, calc((100% - 560px) / 2)) calc(env(safe-area-inset-bottom) + 40px);
  animation: page-in 0.16s ease-out both;
}
@keyframes page-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sheet.page .sheet-panel { animation: none; } }

.sheet.page .sheet-head {
  position: sticky;
  top: 0;
  z-index: 2;
  gap: 6px;
  margin: 0 -4px 6px;
  padding: calc(env(safe-area-inset-top) + 10px) 0 10px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.sheet.page .sheet-head h2 { font-size: 17px; font-weight: 750; letter-spacing: -0.01em; }
.sheet.page .sheet-head .icon-btn { margin-right: 0; }
.page-back { margin-left: -6px; color: var(--ink); }

/* Onglets : texte souligné, plus de capsule */
.sheet.page .tabs {
  justify-content: flex-start;
  gap: 24px;
  padding: 0;
  margin: 6px 0 26px;
  background: none;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
}
.sheet.page .tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 14px 0 12px;
  margin-bottom: -1px;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.sheet.page .tab.is-active { background: none; color: var(--ink); border-bottom-color: var(--accent); }
.sheet.page .tab .badge { margin-left: 7px; }

.sheet.page .sheet-note { margin-top: 14px; }
.sheet.page .board-meta { margin-top: -10px; }

/* Profil : identité sous la barre */
.profile-hero { padding: 22px 0 4px; text-align: left; }
.profile-name { font-size: 30px; font-weight: 850; letter-spacing: -0.03em; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-hero .profile-dust { margin-top: 6px; font-size: 15px; }
.profile-hero .profile-line { margin: 8px 0 0; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.02em; color: var(--ink-3); }

/* Sections : titre en chasse fixe + compteur, filet dessous, beaucoup d'air entre elles */
[data-ppanel] section + section, [data-ppanel] .section-title ~ .section-title { margin-top: 36px; }
.sheet.page .section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 2px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
#duelLists .section-title:not(:first-child) { margin-top: 36px; }
.section-count { color: var(--ink-2); font-variant-numeric: tabular-nums; }
#incomingBlock .section-title { color: var(--accent); border-bottom-color: rgba(255, 181, 71, 0.35); }
#incomingBlock .section-count { color: var(--accent); }

/* Lignes */
.sheet.page .row { gap: 14px; padding: 16px 0; }
.sheet.page .row-text { font-size: 16px; }
.sheet.page .row-text strong { font-weight: 750; }
.sheet.page .row-sub { margin-top: 4px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; }
.sheet.page .row.is-highlight { background: none; margin: 0; padding-left: 0; padding-right: 0; border-radius: 0; border-bottom: 1px solid var(--line); }
.row.is-muted .row-text { color: var(--ink-2); }
.row-planet {
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--planet);
  box-shadow: inset -3px -2px 0 rgba(0, 0, 0, 0.28);
}
.row-empty { padding: 18px 0; }

/* Boutons des lignes : contour, pas de pavé blanc */
.sheet.page .mini-btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: none;
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
}
.sheet.page .mini-btn.is-primary { border-color: var(--accent); color: var(--accent); background: none; }
.sheet.page .mini-btn:active { background: var(--line); }

/* Ajouter un ami : bloc à part, en bas */
.friend-add { padding-top: 4px; }
.friend-add .inline-form { margin-top: 14px; }
.friend-add .section-help { margin-top: 10px; }
.friend-add .invite-line { margin-top: 18px; }

/* Défis */
.sheet.page #btnNewDuel { margin-bottom: 30px; }

/* Succès : une ligne par famille */
#achCount { margin: -8px 0 10px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--ink-3); }
#achGrid { list-style: none; }
.ach-family { padding: 18px 0 20px; border-bottom: 1px solid var(--line); text-align: left; }
.ach-family:last-child { border-bottom: 0; }
.ach-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.ach-family-name { font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.ach-pips { display: flex; gap: 4px; }
.ach-pips i { width: 14px; height: 4px; border-radius: 1px; background: rgba(255, 255, 255, 0.12); }
.ach-pips i.is-on { background: var(--accent); }
.ach-body { display: flex; align-items: flex-start; gap: 14px; }
.ach-family .ach-name { font-size: 17px; font-weight: 750; color: var(--ink); }
.ach-family .ach-bar { max-width: none; margin-top: 12px; height: 3px; }
.ach-family .ach-progress { margin-top: 6px; font-family: var(--mono); font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ach-family .ach-reward { padding-top: 2px; font-family: var(--mono); font-size: 13px; }
.ach-family.is-done .ach-name { color: var(--ink-2); }
.ach-family.is-done .ach-reward { color: var(--c3); font-size: 16px; }
.ach-family.is-done .ach-pips i { background: var(--c3); }
.ach-family.is-done > .ach-progress { color: var(--c3); }

/* Pied du profil */
.sheet.page .profile-foot { margin-top: 40px; padding-top: 16px; }

.nowrap { white-space: nowrap; }

/* Défis : statut en étiquette fine, actions qui passent sous le texte si la place manque */
.sheet.page .row { flex-wrap: wrap; }
.sheet.page .row-main { flex: 1 1 150px; }
.sheet.page .row-actions { margin-left: auto; }
.sheet.page .pill {
  min-width: 0;
  padding: 3px 7px;
  border-radius: 4px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sheet.page .pill-turn { border-color: rgba(255, 181, 71, 0.55); }
.sheet.page .pill-won { border-color: rgba(61, 220, 151, 0.5); }
.sheet.page .pill-lost { border-color: rgba(255, 93, 115, 0.5); }
.sheet.page .play-compact {
  min-height: 50px;
  border-radius: 10px;
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 16px;
  box-shadow: none;
}
.sheet.page .play-compact:active { background: rgba(255, 181, 71, 0.08); }

/* Ajouter un ami : champ et bouton dans le style des pages */
.friend-add .field { border-radius: 8px; background: none; border: 1px solid rgba(255, 255, 255, 0.16); }
.friend-add .sub-btn { border-radius: 8px; background: none; border: 1px solid rgba(255, 255, 255, 0.16); }

/* Skins : cases à filet, sans pavé ni halo flou */
.sheet.page .skins { gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin-top: 8px; }
.sheet.page .skin-card {
  border-radius: 0;
  background: none;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 8px 16px;
}
.sheet.page .skin-card.is-equipped { box-shadow: inset 0 0 0 1.5px var(--ink); }
.sheet.page .skin-name { font-size: 15px; font-weight: 750; }

/* Ligne de bonus sous le score */
.hud-bonus {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.bonus-pips { display: flex; gap: 3px; }
.bonus-pips i { width: 12px; height: 4px; border-radius: 1px; background: rgba(255, 255, 255, 0.16); transition: background 0.15s; }
.bonus-pips i.is-on { background: var(--accent); }
.hud-bonus.is-express .bonus-pips i { background: var(--accent); animation: bump 0.3s ease-out; }
.bonus-text { color: var(--ink-3); animation: fade-in 0.2s ease both; }
.bonus-text.is-good { color: var(--accent); }
.bonus-text.is-bad { color: var(--danger); }
/* Les alertes passent sous la ligne de bonus */
.banner { top: calc(env(safe-area-inset-top) + 140px); }

/* =========================================================
   Fin de partie animée
   ========================================================= */
.over-score.bump { animation: bump 0.28s ease-out; }
.over-stamp {
  margin-top: 10px;
  padding: 4px 10px;
  border: 1.5px solid var(--accent);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.over-stamp.is-in { animation: stamp-in 0.45s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes stamp-in { from { transform: scale(2.2) rotate(-8deg); opacity: 0; } to { transform: scale(1) rotate(-3deg); opacity: 1; } }
.over-stamp:not(.is-in) { transform: rotate(-3deg); }

.loot { width: 100%; margin: 20px 0 6px; border-top: 1px solid var(--line); }
.loot-lines { list-style: none; }
.loot-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-2);
}
.loot-line.is-in { animation: loot-in 0.28s cubic-bezier(.2, 1.2, .4, 1) both; }
@keyframes loot-in { from { transform: translateX(-14px); opacity: 0; } to { transform: none; opacity: 1; } }
.loot-line-value { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.loot-line.is-ach { color: var(--ink); }
.loot-line.is-ach .loot-line-value { color: var(--c3); }
.loot-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 2px 4px;
  opacity: 0;
  transition: opacity 0.2s;
}
.loot-total.is-on { opacity: 1; }
.loot-label { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.loot-total-value { font-size: 24px; font-weight: 850; color: var(--accent); font-variant-numeric: tabular-nums; }
.loot-total-value.bump { animation: bump 0.3s ease-out; }
.loot.is-unsaved .loot-line, .loot.is-unsaved .loot-total-value { opacity: 0.45; text-decoration: line-through; text-decoration-thickness: 1px; }

.over-goals { list-style: none; width: 100%; margin: 10px 0 18px; }
.over-goals:empty { display: none; }
.over-goal { padding: 8px 2px 4px; text-align: left; }
.over-goal-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--ink-2); }
.over-goal-right { font-family: var(--mono); font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.over-goal-bar { height: 4px; margin-top: 7px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.over-goal-bar span { display: block; height: 100%; background: var(--ink-2); transition: width 0.8s cubic-bezier(.2, .8, .3, 1); }
.over-goal.is-ready { cursor: pointer; }
.over-goal.is-ready .over-goal-row { color: var(--accent); font-weight: 700; }
.over-goal.is-ready .over-goal-bar span { background: var(--accent); }

.play.is-ready { animation: hero-pulse 2.2s ease-in-out infinite; }
.fx-star {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  font-size: 14px;
  color: var(--accent);
  text-shadow: 0 0 6px currentColor;
}
@media (prefers-reduced-motion: reduce) {
  .loot-line.is-in, .over-stamp.is-in, .play.is-ready { animation: none; }
}

/* Fin de partie : tout tient à l'écran (défile si besoin), Rejouer est le bouton principal */
.screen-over { justify-content: flex-start; overflow-y: auto; touch-action: pan-y; }
.screen-over .over-card { margin: auto 0; padding: 8px 0 4px; }
.screen-over .over-score { font-size: clamp(76px, 23vw, 108px); }
.screen-over .over-note { font-size: 14px; font-weight: 700; margin-top: 10px; }
.screen-over .over-rank { margin-top: 10px; }
.screen-over .loot { margin-top: 16px; }
.screen-over .loot-line { padding: 7px 2px; }
#btnRetry { background: var(--accent); color: #1d1406; font-size: 20px; font-weight: 900; }
#btnRetry:active { transform: scale(0.97); }
.screen-over .share-btn:not(.save-btn) {
  height: 48px;
  background: none;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  font-size: 16px;
}
