/* ==========================================================================
   Cartable Malin — socle visuel
   Concept : des « autocollants » épais (contour encre + ombre franche) posés
   sur un ciel d'après-midi ; chaque question s'écrit sur une feuille Séyès
   (le papier grands carreaux des cahiers d'école).
   Thème unique, volontairement lumineux (pas de mode sombre).
   ========================================================================== */
:root {
  color-scheme: light;
  /* Couleurs */
  --ink: #231a4a;          /* contours, texte */
  --ink-soft: #5b5388;
  --sky: #6fd0f6;
  --sky-2: #c4efff;
  --paper: #fffdf5;
  --sun: #ffd23f;
  --sun-deep: #ff9f1c;
  --tomato: #ff5e57;
  --grass: #3fc26b;
  --grape: #9b6bff;
  --grape-deep: #6a45d8;
  --ocean: #2e86de;
  --peach: #ffcfa8;
  --blush: #ff8fab;
  --cloud: #ffffff;
  --ok: #2fb35a;
  --ko: #ff5e57;
  /* Papier Séyès */
  --seyes-bold: #a9bdf0;
  --seyes-thin: #dfe6fa;
  --seyes-margin: #f28b82;
  /* Typo : Baloo 2 pour les titres ; Andika, police dessinée pour les enfants qui apprennent à lire */
  --font-display: "Baloo 2", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Andika", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  /* Formes */
  --stroke: 4px;
  --radius: 22px;
  --radius-sm: 14px;
  --lift: 6px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow: hidden;
  font-family: var(--font-body);
  font-size: clamp(16px, 0.9vw + 10px, 21px);
  line-height: 1.4;
  color: var(--ink);
  background: var(--sky);
  background-image: linear-gradient(180deg, var(--sky) 0%, var(--sky-2) 78%);
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  overscroll-behavior: none;
}
input, textarea { -webkit-user-select: text; user-select: text; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 4px solid var(--sun-deep); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 1.05; margin: 0; text-wrap: balance; }

/* Nuages qui dérivent derrière tout */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60px 26px at 12% 18%, var(--cloud) 98%, transparent 100%),
    radial-gradient(44px 30px at 15% 14%, var(--cloud) 98%, transparent 100%),
    radial-gradient(70px 28px at 72% 10%, var(--cloud) 98%, transparent 100%),
    radial-gradient(48px 34px at 75% 6%, var(--cloud) 98%, transparent 100%),
    radial-gradient(56px 22px at 46% 30%, rgba(255,255,255,.75) 98%, transparent 100%),
    radial-gradient(80px 26px at 90% 40%, rgba(255,255,255,.6) 98%, transparent 100%);
  opacity: .85;
  animation: clouds 60s linear infinite alternate;
}
@keyframes clouds { from { transform: translateX(-3%); } to { transform: translateX(3%); } }

/* ---------- Structure de l'appli (un seul écran) ---------- */
#app {
  position: relative;
  z-index: 1;
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  padding-left: var(--gutter);
  padding-right: var(--gutter-r);
}
.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-block: 10px 6px;
  min-height: 74px;
}
.topbar__title {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(24px, 2.2vw + 12px, 38px);
  line-height: 1;
  color: var(--paper);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 4px 0 var(--ink);
  letter-spacing: .5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.logo span { color: var(--sun); }
.topbar__game {
  min-width: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(20px, 1.4vw + 12px, 30px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.level-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .8em;
  padding: 2px 10px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--sun);
  white-space: nowrap;
}
.screen {
  position: relative;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-block: 6px max(16px, env(safe-area-inset-bottom, 0px));
}
.screen--center { display: grid; place-items: center; }
/* Zone d'un jeu : occupe toute la hauteur disponible sous la barre du haut */
.game-host { min-height: 100%; display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: 1100px; margin-inline: auto; }

/* ---------- Boutons « autocollants » ---------- */
.btn {
  --c: var(--paper);
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45em;
  min-height: 64px;
  padding: 10px 24px;
  border: var(--stroke) solid var(--ink);
  border-radius: 18px;
  background: var(--c);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(18px, .8vw + 13px, 24px);
  line-height: 1.1;
  box-shadow: 0 var(--lift) 0 var(--ink);
  cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease, filter .15s;
  text-align: center;
}
.btn:active, .btn.is-pressed { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.btn[disabled] { filter: grayscale(.7) opacity(.55); cursor: default; }
.btn--sun { --c: var(--sun); }
.btn--grass { --c: var(--grass); color: var(--paper); text-shadow: 0 2px 0 rgba(35,26,74,.35); }
.btn--tomato { --c: var(--tomato); color: var(--paper); text-shadow: 0 2px 0 rgba(35,26,74,.35); }
.btn--grape { --c: var(--grape); color: var(--paper); text-shadow: 0 2px 0 rgba(35,26,74,.35); }
.btn--ocean { --c: var(--ocean); color: var(--paper); text-shadow: 0 2px 0 rgba(35,26,74,.35); }
.btn--sky { --c: var(--sky-2); }
.btn--big { min-height: 84px; font-size: clamp(22px, 1.2vw + 14px, 32px); padding-inline: 32px; border-radius: 22px; }
.btn--small { min-height: 48px; padding: 6px 16px; font-size: 18px; border-width: 3px; --lift: 4px; border-radius: 14px; }
.btn--icon { min-width: 56px; min-height: 56px; padding: 0; font-size: 26px; border-radius: 16px; }
.btn--ghost { background: rgba(255,255,255,.55); }

/* Puces à cocher (réglages) */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  appearance: none;
  min-height: 52px;
  min-width: 52px;
  padding: 6px 16px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  box-shadow: 0 4px 0 var(--ink);
  cursor: pointer;
  transition: transform .08s, box-shadow .08s, background .12s;
}
.chip:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.chip[aria-pressed="true"] { background: var(--sun); }
.chip--grass[aria-pressed="true"] { background: var(--grass); color: var(--paper); }
.chip--grape[aria-pressed="true"] { background: var(--grape); color: var(--paper); }
.chip--ocean[aria-pressed="true"] { background: var(--ocean); color: var(--paper); }

/* ---------- Cartes ---------- */
.card {
  background: var(--paper);
  border: var(--stroke) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 var(--lift) 0 var(--ink);
  padding: clamp(14px, 2vw, 26px);
}
.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 1.4vw + 14px, 34px);
}
.label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Feuille Séyès : lignes fines tous les 2 mm, épaisses tous les 8 mm, marge rouge */
.seyes {
  --u: 9px;
  --margin: 46px;
  background-color: var(--paper);
  background-image:
    linear-gradient(90deg, transparent calc(var(--margin) - 1.5px), var(--seyes-margin) calc(var(--margin) - 1.5px), var(--seyes-margin) calc(var(--margin) + 1.5px), transparent calc(var(--margin) + 1.5px)),
    repeating-linear-gradient(90deg, transparent 0 calc(var(--u) * 4 - 1px), var(--seyes-bold) calc(var(--u) * 4 - 1px) calc(var(--u) * 4)),
    repeating-linear-gradient(180deg, transparent 0 calc(var(--u) * 4 - 1.5px), var(--seyes-bold) calc(var(--u) * 4 - 1.5px) calc(var(--u) * 4)),
    repeating-linear-gradient(180deg, transparent 0 calc(var(--u) - 1px), var(--seyes-thin) calc(var(--u) - 1px) var(--u));
}

/* ---------- Bulle de la mascotte ---------- */
.owl { display: block; width: 100%; height: auto; overflow: visible; }
.owl .owl-eyes-happy, .owl .owl-brows { display: none; }
.owl[data-mood="happy"] .owl-eyes-open { display: none; }
.owl[data-mood="happy"] .owl-eyes-happy { display: inline; }
.owl[data-mood="oops"] .owl-brows { display: inline; }
.owl[data-mood="oops"] .owl-pupils { transform: translate(0, 4px); }
.owl[data-mood="think"] .owl-pupils { transform: translate(4px, -4px); }
.owl .owl-pupils { transition: transform .2s; }
.owl-wrap { position: relative; display: flex; align-items: flex-end; gap: 10px; }
.owl-box { width: var(--owl-size, 110px); flex: 0 0 auto; animation: bob 3.2s ease-in-out infinite; }
.owl-box.is-jump { animation: jump .55s ease; }
.owl-box.is-shake { animation: shake .45s ease; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes jump { 0% { transform: translateY(0) scale(1); } 35% { transform: translateY(-22px) scale(1.06, .95); } 70% { transform: translateY(0) scale(.96, 1.05); } 100% { transform: none; } }
@keyframes shake { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
.bubble {
  position: relative;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 20px;
  padding: 10px 16px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(18px, .9vw + 12px, 24px);
  line-height: 1.2;
  box-shadow: 0 4px 0 var(--ink);
  max-width: 34ch;
  margin-bottom: 30px;
}
.bubble::after {
  content: "";
  position: absolute;
  left: -14px;
  bottom: 12px;
  width: 22px;
  height: 22px;
  background: var(--paper);
  border-left: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  transform: rotate(45deg) skew(10deg, 10deg);
}
.bubble:empty { visibility: hidden; }
.bubble.is-pop { animation: pop .3s ease; }
@keyframes pop { 0% { transform: scale(.85); } 60% { transform: scale(1.05); } 100% { transform: scale(1); } }

/* ---------- Étoiles ---------- */
.stars { display: inline-flex; gap: 6px; align-items: center; }
.star { width: 1em; height: 1em; display: inline-block; }
.star svg { width: 100%; height: 100%; display: block; overflow: visible; }
.star--on path { fill: var(--sun); }
.star--off path { fill: rgba(255,255,255,.7); }
.star path { stroke: var(--ink); stroke-width: 7; stroke-linejoin: round; }
.star.is-in { animation: starIn .45s cubic-bezier(.3,1.6,.6,1) both; }
@keyframes starIn { 0% { transform: scale(0) rotate(-40deg); } 100% { transform: scale(1) rotate(0); } }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 4px 14px 4px 8px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  box-shadow: 0 4px 0 var(--ink);
  white-space: nowrap;
}
.pill .star { font-size: 28px; }
.pill__avatar { font-size: 28px; line-height: 1; }
.profile-pill { cursor: pointer; }
.profile-pill:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }

/* ---------- Écran « Qui joue ? » ---------- */
.who { display: grid; gap: 24px; justify-items: center; padding-block: 8px 24px; }
.who__head { display: flex; align-items: flex-end; gap: 12px; }
.who__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 980px;
}
.avatar-tile {
  appearance: none;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 18px 12px 16px;
  border: var(--stroke) solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 var(--lift) 0 var(--ink);
  cursor: pointer;
  transition: transform .08s, box-shadow .08s;
}
.avatar-tile:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.avatar-tile__face {
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  font-size: 62px;
  line-height: 1;
  border: var(--stroke) solid var(--ink);
  border-radius: 50%;
  background: var(--face, var(--sun));
}
.avatar-tile__name { font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1.1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar-tile__meta { display: flex; gap: 8px; align-items: center; font-family: var(--font-display); font-weight: 800; color: var(--ink-soft); }
.avatar-tile--add .avatar-tile__face { background: var(--paper); border-style: dashed; font-size: 54px; }

/* Formulaire de profil */
.form { display: grid; gap: 18px; width: 100%; max-width: 760px; }
.field { display: grid; gap: 8px; }
.input {
  width: 100%;
  min-height: 64px;
  padding: 8px 18px;
  border: var(--stroke) solid var(--ink);
  border-radius: 18px;
  background: var(--paper);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  color: var(--ink);
}
.avatar-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 10px; }
.avatar-pick button {
  appearance: none;
  height: 68px;
  font-size: 40px;
  line-height: 1;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 4px 0 var(--ink);
  cursor: pointer;
}
.avatar-pick button[aria-pressed="true"] { background: var(--sun); transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }

/* ---------- Accueil ---------- */
.home { display: grid; gap: clamp(16px, 2.4vw, 28px); padding-block: 4px 24px; }
.home__hello { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.home__hello h1 { font-size: clamp(30px, 3vw + 14px, 56px); color: var(--paper); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 5px 0 var(--ink); }
.games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(16px, 2vw, 26px);
}
.game-card {
  --c: var(--grass);
  appearance: none;
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
  min-height: 170px;
  padding: 20px 22px;
  text-align: left;
  border: var(--stroke) solid var(--ink);
  border-radius: 28px;
  background: var(--c);
  box-shadow: 0 8px 0 var(--ink);
  cursor: pointer;
  overflow: hidden;
  transition: transform .08s, box-shadow .08s;
}
.game-card:active { transform: translateY(5px); box-shadow: 0 3px 0 var(--ink); }
.game-card::before {
  content: "";
  position: absolute;
  inset: auto -40px -60px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
}
.game-card__art {
  position: relative;
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  font-size: 66px;
  line-height: 1;
  border: var(--stroke) solid var(--ink);
  border-radius: 24px;
  background: var(--paper);
  transform: rotate(-4deg);
  box-shadow: 0 5px 0 var(--ink);
}
.game-card__body { position: relative; display: grid; gap: 6px; min-width: 0; }
.game-card__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 1.6vw + 16px, 40px); line-height: 1; color: var(--paper); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--ink); }
.game-card__sub { font-weight: 700; font-size: 18px; color: var(--ink); background: rgba(255,255,255,.75); border-radius: 10px; padding: 2px 10px; justify-self: start; }
.game-card__meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.soon { display: grid; gap: 12px; }
.soon__row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.soon__item {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 12px 8px;
  border: 3px dashed rgba(35,26,74,.45);
  border-radius: 18px;
  background: rgba(255,255,255,.4);
  font-family: var(--font-display);
  font-weight: 800;
  text-align: center;
  color: var(--ink-soft);
}
.soon__item b { font-size: 34px; line-height: 1; filter: grayscale(.35); }
.home__foot { display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-between; align-items: center; }

/* ---------- Feuille modale (niveaux, confirmations) ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) var(--gutter-r) max(16px, env(safe-area-inset-bottom, 0px)) var(--gutter);
  background: rgba(35,26,74,.45);
  animation: fade .18s ease;
  overflow-y: auto;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%;
  max-width: 760px;
  display: grid;
  gap: 18px;
  animation: rise .28s cubic-bezier(.2,1.3,.5,1);
}
@keyframes rise { from { transform: translateY(40px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.level-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.level-btn {
  appearance: none;
  position: relative;
  display: grid;
  gap: 6px;
  justify-items: start;
  text-align: left;
  padding: 18px 20px;
  border: var(--stroke) solid var(--ink);
  border-radius: 22px;
  background: var(--c, var(--sun));
  box-shadow: 0 var(--lift) 0 var(--ink);
  cursor: pointer;
}
.level-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.level-btn__code { font-family: var(--font-display); font-weight: 800; font-size: 44px; line-height: 1; }
.level-btn__name { font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1.1; }
.level-btn__desc { font-size: 17px; }
.level-btn__tag { position: absolute; top: -14px; right: 14px; padding: 2px 10px; border: 3px solid var(--ink); border-radius: 999px; background: var(--paper); font-family: var(--font-display); font-weight: 800; font-size: 15px; transform: rotate(4deg); }

/* ---------- Résultats ---------- */
.results { text-align: center; justify-items: center; }
.results__stars { font-size: clamp(64px, 8vw, 96px); gap: 14px; }
.results__stars .star:nth-child(2) { transform: translateY(-14px); }
.results__stars .star:nth-child(2).is-in { animation-name: starInUp; }
@keyframes starInUp { 0% { transform: translateY(-14px) scale(0) rotate(-40deg); } 100% { transform: translateY(-14px) scale(1); } }
.results__title { font-size: clamp(34px, 3vw + 18px, 58px); }
.results__score { font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 2vw + 20px, 48px); line-height: 1; font-variant-numeric: tabular-nums; }
.results__lines { display: grid; gap: 6px; width: 100%; max-width: 460px; }
.results__line { display: flex; justify-content: space-between; gap: 12px; font-size: 20px; border-bottom: 2px dashed rgba(35,26,74,.18); padding-block: 4px; }
.results__line b { font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.record {
  display: inline-block;
  padding: 4px 16px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--tomato);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  transform: rotate(-3deg);
  animation: pop .5s ease .6s both;
}
.mistakes { width: 100%; max-width: 560px; text-align: left; }
.mistakes ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mistakes li { padding: 4px 12px; border: 2px solid var(--ink); border-radius: 12px; background: #fff1ef; font-family: var(--font-display); font-weight: 800; font-size: 19px; }

/* ---------- Espace parents ---------- */
.parents { display: grid; gap: 20px; padding-block: 4px 24px; }
.parents__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 20px; align-items: start; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 8px; border-bottom: 2px dashed rgba(35,26,74,.15); }
.toggle-row:last-child { border-bottom: 0; }
.switch {
  appearance: none;
  position: relative;
  width: 88px;
  height: 52px;
  flex: 0 0 auto;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: #ddd8f0;
  cursor: pointer;
  transition: background .15s;
}
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 38px; height: 38px; border: 3px solid var(--ink); border-radius: 50%; background: var(--paper); transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--grass); }
.switch[aria-checked="true"]::after { transform: translateX(36px); }
.kid-block { display: grid; gap: 12px; }
.kid-block__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.kid-block__head h3 { font-size: 28px; flex: 1; min-width: 0; }
.history { width: 100%; border-collapse: collapse; font-size: 17px; }
.history td, .history th { padding: 6px 8px; border-bottom: 1px solid rgba(35,26,74,.12); text-align: left; vertical-align: top; }
.history th { font-family: var(--font-display); font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-soft); }
.history td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
.hold {
  position: relative;
  overflow: hidden;
}
.hold__fill { position: absolute; inset: 0; background: rgba(63,194,107,.45); transform-origin: left; transform: scaleX(0); pointer-events: none; }
.muted { color: var(--ink-soft); }
.danger-zone { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Confettis ---------- */
.confetti { position: fixed; inset: 0; z-index: 80; pointer-events: none; }

/* ---------- Petits écrans (téléphone) ---------- */
@media (max-width: 560px) {
  .topbar { min-height: 64px; gap: 8px; }
  .btn--icon { font-size: 22px; }
  .pill { min-height: 44px; font-size: 17px; padding-inline: 6px 10px; }
  .pill .star, .pill__avatar { font-size: 22px; }
  .hide-sm { display: none !important; }
  .game-card { grid-template-columns: 1fr; justify-items: start; min-height: 0; }
  .game-card__art { width: 86px; height: 86px; font-size: 50px; }
  .who__grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .avatar-tile__face { width: 84px; height: 84px; font-size: 50px; }
}

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