/* blip : nuit aubergine + une couleur de « blip » qui change à chaque manche. */
:root {
  --night: #1c1230;
  --plum: #2a1d45;
  --plum-hi: #382959;
  --text: #fbf7ff;
  --muted: #b9abd8;
  --line: rgba(251, 247, 255, 0.15);
  --ink: #1c1230;

  --blip: #ff7a2f; /* redéfinie par le JS, manche par manche */
  --good: #5cf2a6;
  --bad: #ff5c6c;
  --near: #ffe14d;

  --display: "Funnel Display", system-ui, sans-serif;
  --body: "Funnel Sans", system-ui, sans-serif;
  --r-s: 12px;
  --r-m: 18px;
  --r-l: 28px;
  color-scheme: dark;
}

/* Enregistrée pour pouvoir animer le passage d'une couleur à l'autre. */
@property --blip { syntax: "<color>"; inherits: true; initial-value: #ff7a2f; }
:root { transition: --blip 700ms ease; }

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

html { background: var(--night); }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--night);
  color: var(--text);
  font: 400 1rem/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--blip); outline-offset: 3px; }
img { display: block; }
p, h1, h2, h3 { text-wrap: pretty; } /* pas de mot orphelin en fin de paragraphe */

.shell {
  width: min(34rem, 100%);
  margin: 0 auto;
  padding: 1.25rem 1rem 4rem;
}
.muted { color: var(--muted); margin: 0.25rem 0 0; }
.screen { animation: screen-in 260ms cubic-bezier(.2, .8, .2, 1); }
@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } }
.link-btn {
  margin-top: 0.9rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-btn:hover { color: var(--text); }

/* ---- Boutons & champs ------------------------------------------------------- */

.btn {
  padding: 0.9rem 1.4rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.02rem;
  white-space: nowrap;
  transition: transform 120ms ease, background-color 200ms;
}
.btn:not(:disabled):active { transform: scale(0.96); }
.btn:disabled { opacity: 0.4; }
.btn--blip:disabled { opacity: 1; background: var(--plum-hi); color: var(--muted); }
.btn--blip { background: var(--blip); color: var(--ink); }
.btn--line { border-color: var(--line); background: none; }
.btn--line:not(:disabled):hover { border-color: var(--text); }
.btn--ink { background: var(--ink); color: var(--text); }
.btn--line-ink { border-color: rgba(28, 18, 48, 0.35); background: none; color: var(--ink); }

.input {
  width: 100%;
  padding: 1rem 1.2rem;
  border: 2px solid transparent;
  border-radius: var(--r-m);
  background: var(--plum);
  font-size: 1.1rem;
}
.input::placeholder { color: var(--muted); }
.input:focus { outline: none; border-color: var(--blip); }

.row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.75rem; }
.row > .btn { flex: 1 1 auto; }
.row--center { justify-content: center; }

/* ---- Accueil ------------------------------------------------------------------ */

.home { display: flex; flex-direction: column; }
.home__side { display: contents; }
.home .settings { order: 10; }
.hero { padding: 1.5rem 0 2rem; }
.logo {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(4.5rem, 25vw, 6.5rem); /* « blipdle » tient de 320 px à la colonne desktop (24rem) */
  white-space: nowrap; /* jamais « bli / pdle » */
  line-height: 0.8;
  letter-spacing: 0.005em; /* plus serré, le « p » et le « d » se touchent */
  padding-bottom: 0.16em; /* place pour la descendante du « p » */
}
.logo__i { position: relative; display: inline-block; margin: 0 0.045em 0 0.015em; }
.logo__dot {
  position: absolute;
  left: 50%;
  top: -0.02em;
  width: 0.18em;
  height: 0.18em;
  margin-left: -0.09em;
  border-radius: 50%;
  background: var(--blip);
  box-shadow: 0 0 0.35em var(--blip);
  animation: breathe 2.6s ease-in-out infinite;
}
@keyframes breathe { 50% { transform: scale(1.22); } }
.hero__line { margin: 0.6rem 0 0; font-size: 1.15rem; color: var(--muted); white-space: pre-line; }

.daily {
  padding: 1.4rem 1.4rem 1.5rem;
  border-radius: var(--r-l);
  background: var(--blip);
  color: var(--ink);
}
.daily__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.2rem 0.75rem; }
.daily__title { margin: 0; font: 800 clamp(1.45rem, 6.8vw, 2rem)/1.05 var(--display); letter-spacing: -0.02em; }
.daily__num { font: 700 1.1rem/1 var(--display); opacity: 0.7; font-variant-numeric: tabular-nums; white-space: nowrap; }
.daily__meta { margin: 0.4rem 0 0; font-weight: 500; }
.daily__result { display: flex; gap: 0.9rem; align-items: center; margin-top: 1rem; }
.daily__result img { width: 56px; height: 56px; border-radius: var(--r-s); }
.daily__result strong { display: block; font-family: var(--display); font-size: 1.1rem; line-height: 1.2; }
.daily__grid { font-size: 1.2rem; letter-spacing: 0.06em; }
.daily__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }
.daily :focus-visible { outline-color: var(--ink); } /* l'anneau habituel a la couleur de la carte */

.free { margin-top: 2.75rem; }

.resume {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
  padding: 1rem 1.2rem;
  border: 2px solid var(--blip);
  border-radius: var(--r-l);
  background: var(--plum);
  text-align: left;
}
.resume:hover { background: var(--plum-hi); }
.resume__title { display: block; font: 700 1.1rem var(--display); }
.resume__meta { display: block; color: var(--muted); font-size: 0.9rem; }

/* Statistiques du défi : sur la carte colorée (encre) ou sur fond nuit (--dark). */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 1.1rem;
  text-align: center;
}
.stat b { display: block; font: 800 1.6rem/1.1 var(--display); font-variant-numeric: tabular-nums; }
.stat span { font-size: 0.78rem; opacity: 0.75; }
.dist { grid-column: 1 / -1; display: grid; gap: 4px; margin-top: 0.6rem; text-align: left; }
.dist__row { display: grid; grid-template-columns: 1rem 1fr; gap: 0.5rem; align-items: center; font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.dist__bar {
  min-width: 1.6rem;
  padding: 0.05rem 0.45rem;
  border-radius: 6px;
  background: rgba(28, 18, 48, 0.22);
  font-weight: 700;
  text-align: right;
}
.dist__row.is-today .dist__bar { background: var(--ink); color: var(--blip); }
.stats--dark { padding: 1rem; border-radius: var(--r-m); background: var(--plum); }
.stats--dark .dist__bar { background: var(--plum-hi); }
.stats--dark .dist__row.is-today .dist__bar { background: var(--blip); color: var(--ink); }
.section-title { margin: 0; font: 800 2rem/1.05 var(--display); letter-spacing: -0.02em; }
.free .input { margin-top: 1rem; }

.shelf { margin-top: 1.75rem; }
.shelf__title { margin: 0; font: 700 1.15rem var(--display); }
.covers {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 42%;
  gap: 0.9rem;
  margin: 0.9rem -1rem 0;
  padding: 0 1rem 0.4rem;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 1rem;
  scrollbar-width: none;
}
.covers::-webkit-scrollbar { display: none; }
.covers li { scroll-snap-align: start; }
.skel { display: block; aspect-ratio: 1; border-radius: var(--r-m); background: var(--plum); animation: skel 1s ease-in-out infinite alternate; }
.skel--line { aspect-ratio: auto; height: 0.9rem; width: 70%; margin-top: 0.6rem; border-radius: 6px; }
@keyframes skel { to { opacity: 0.45; } }
.covers button {
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
}
.covers img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--r-m);
  background: var(--plum);
  object-fit: cover;
  transition: transform 200ms cubic-bezier(.2, .8, .2, 1);
}
.covers button:hover img, .covers button:focus-visible img { transform: translateY(-4px) rotate(-1.5deg); }
.covers .name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 0.55rem;
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.2;
}
.covers .count { display: block; color: var(--muted); font-size: 0.85rem; }
.covers .paste {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: var(--r-m);
  background: var(--blip);
  color: var(--ink);
  font: 800 1.4rem var(--display);
}

/* ---- Partie --------------------------------------------------------------------- */

.topbar { display: flex; align-items: center; gap: 0.8rem; }
.back {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--plum);
}
.back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.back:hover { background: var(--plum-hi); }
.topbar__text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.topbar__title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-family: var(--display); font-weight: 700; }
.topbar__sub { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); font-size: 0.85rem; }
.topbar__score {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--plum);
  font: 700 1rem var(--display);
  font-variant-numeric: tabular-nums;
}
.topbar__score:empty { display: none; }
.back--help { font: 700 1.1rem var(--display); }

.rounds { display: flex; gap: 4px; margin: 0.9rem 0 0; padding: 0; list-style: none; }
.rounds:empty { display: none; }
.rounds li { flex: 1; height: 4px; border-radius: 2px; background: var(--line); transition: background-color 300ms; }
.rounds .is-won { background: var(--good); }
.rounds .is-lost { background: var(--bad); }
.rounds .is-now { background: var(--blip); }

.stage { display: grid; justify-items: center; padding: 1.25rem 0 1.5rem; }
.stage.is-wrong { animation: shake 360ms ease; }
@keyframes shake {
  20% { transform: translateX(-10px); }
  45% { transform: translateX(8px); }
  70% { transform: translateX(-5px); }
}

/* L'orbe : anneau des paliers + blob audio-réactif + disque de la pochette. */
.orb {
  position: relative;
  width: min(80vw, 330px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  -webkit-tap-highlight-color: transparent;
}
.orb:focus-visible { outline-offset: -6px; }
.orb canvas { transition: opacity 250ms; }
.orb.is-loading canvas { opacity: 0.35; }
body.is-busy { cursor: progress; }
[aria-busy="true"] { opacity: 0.5; }
.hint { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.85rem; }
@media (hover: none) { .hint { display: none; } }
.ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.orb canvas { position: absolute; inset: -14%; width: 128%; height: 128%; pointer-events: none; }
.ring path { fill: none; stroke-linecap: round; stroke-width: 3.2; stroke: var(--line); transition: stroke 300ms; }
.ring path.is-on { stroke: var(--blip); }
.ring path.progress { stroke: var(--text); stroke-width: 1.4; }
.disc {
  position: absolute;
  inset: 17%;
  width: 66%;
  height: 66%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 6px var(--night), 0 0 60px color-mix(in srgb, var(--blip) 55%, transparent);
  animation: spin 9s linear infinite paused, disc-in 600ms cubic-bezier(.2, .9, .3, 1.2);
}
.orb.is-playing .disc { animation-play-state: running, running; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes disc-in { from { transform: scale(0.2); opacity: 0; } }

.readout { position: relative; display: grid; justify-items: center; margin-top: 0.6rem; }
.readout .clock { transition: opacity 150ms; }
.readout.is-flashing .clock { opacity: 0; }
.flash {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  font: 800 2.2rem/1 var(--display);
  letter-spacing: -0.02em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}
.flash small { display: block; font-size: 0.5em; color: var(--muted); letter-spacing: 0; text-align: center; }
.flash.is-on { animation: flash 1.4s ease forwards; }
.flash.is-wrong { color: var(--bad); }
.flash.is-artist { color: var(--near); }
.flash.is-skip { color: var(--text); }
@keyframes flash {
  0% { opacity: 0; transform: scale(0.7); }
  14% { opacity: 1; transform: scale(1.06); }
  24% { transform: scale(1); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-10px); }
}
.clock {
  margin: 0;
  font: 800 3.4rem/1 var(--display);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.clock small { margin-left: 0.12em; font-size: 0.45em; color: var(--muted); font-weight: 600; letter-spacing: 0; }

.dots { display: flex; gap: 0.5rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.dots li { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line); }
.dots .is-current { box-shadow: inset 0 0 0 2px var(--blip); }
.dots .is-skip { background: var(--muted); box-shadow: none; opacity: 0.45; }
.dots .is-wrong { background: var(--bad); box-shadow: none; }
.dots .is-artist { background: var(--near); box-shadow: none; }
.dots .is-correct { background: var(--good); box-shadow: none; }

.combo { position: relative; }
.suggestions {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  border-radius: var(--r-m);
  background: var(--plum-hi);
  box-shadow: 0 24px 48px rgba(10, 4, 24, 0.55);
  max-height: 21rem;
  overflow-y: auto;
}
.suggestions li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.4rem;
  border-radius: var(--r-s);
  cursor: pointer;
}
.suggestions li[aria-selected="true"] { background: var(--blip); color: var(--ink); }
.suggestions img { width: 44px; height: 44px; border-radius: 8px; }
.suggestions .t { display: block; font-family: var(--display); font-weight: 700; line-height: 1.2; }
.suggestions .a { display: block; font-size: 0.9rem; opacity: 0.75; }
.suggestions mark { background: none; color: inherit; box-shadow: inset 0 -0.4em color-mix(in srgb, var(--blip) 45%, transparent); }
.suggestions li[aria-selected="true"] mark { box-shadow: inset 0 -0.4em rgba(28, 18, 48, 0.2); }
.combo.is-searching::after {
  content: "";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border: 2px solid var(--line);
  border-top-color: var(--blip);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
.suggestions .none { display: block; padding: 0.5rem; cursor: default; color: var(--muted); }

.attempts { margin: 1.25rem 0 0; padding: 0; list-style: none; }
.attempts li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.4rem;
  padding: 0.65rem 0.9rem;
  border-radius: var(--r-s);
  background: var(--plum);
}
.attempts .what { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.attempts .chip {
  flex: none;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
}
.attempts .is-skip .what { color: var(--muted); }
.attempts .is-skip .chip { background: var(--plum-hi); color: var(--muted); }
.attempts .is-wrong .chip { background: var(--bad); }
.attempts .is-artist .chip { background: var(--near); }
.attempts .is-correct .chip { background: var(--good); }

.reveal { text-align: center; }
.reveal__verdict { margin: 0; font: 700 1rem var(--display); }
.reveal__verdict.is-won { color: var(--good); }
.reveal__verdict.is-lost { color: var(--bad); }
.reveal__title { margin: 0.3rem 0 0; font: 800 clamp(1.8rem, 8vw, 2.4rem)/1.05 var(--display); letter-spacing: -0.02em; }
.reveal__artist { margin: 0.3rem 0 0; color: var(--muted); font-size: 1.1rem; }
.reveal .row { margin-top: 1.25rem; }
.reveal__link { display: inline-block; margin-top: 0.6rem; color: var(--blip); font-weight: 600; text-underline-offset: 3px; }
.reveal .stats { margin-top: 1.25rem; }
.end__best { margin: 0.5rem 0 0; font: 700 1.1rem var(--display); color: var(--muted); }
.end__best.is-new { color: var(--near); }

/* ---- Fin --------------------------------------------------------------------------- */

.score {
  margin: 2rem 0 0;
  font: 800 clamp(5.5rem, 30vw, 9rem)/0.9 var(--display);
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  color: var(--blip);
}
.score small { margin-left: 0.15em; font-size: 0.25em; color: var(--muted); letter-spacing: 0; }
.mosaic {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
}
.mosaic li { position: relative; }
.mosaic img { width: 100%; aspect-ratio: 1; border-radius: var(--r-s); object-fit: cover; }
.mosaic .lost img { filter: grayscale(1); opacity: 0.35; }
.mosaic .pts {
  position: absolute;
  left: 4px;
  bottom: 4px;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--good);
  color: var(--ink);
  font: 700 0.75rem/1.5 var(--display);
}

/* ---- Réglages & crédit ------------------------------------------------------------- */

.settings {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.setting { display: flex; flex-direction: column; gap: 0.4rem; flex: 1 1 11rem; }
.setting__label { color: var(--muted); font-size: 0.85rem; }

.chev { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0.7; }

/* Langue et pays : pastilles qui ouvrent la feuille de choix. */
.pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.9rem 0.55rem 0.6rem;
  border: 0;
  border-radius: 999px;
  background: var(--plum);
  font-weight: 600;
  text-align: left;
}
.pill:hover { background: var(--plum-hi); }
.pill .flag { font-size: 1.35rem; line-height: 1; }
.pill .chev { margin-left: auto; }

.shelf__pick {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  border-bottom: 2px solid transparent;
}
.shelf__pick:hover { border-bottom-color: var(--blip); }

/* Feuille de choix du pays : monte du bas sur mobile, centrée sur grand écran. */
.sheet {
  flex-direction: column;
  width: 100%;
  max-width: 30rem;
  max-height: 85dvh;
  margin: auto auto 0;
  padding: 1.5rem 1.25rem max(1.25rem, env(safe-area-inset-bottom));
  border: 0;
  border-radius: var(--r-l) var(--r-l) 0 0;
  background: var(--plum);
  color: var(--text);
}
.sheet[open] { display: flex; animation: sheet-up 300ms cubic-bezier(.2, .9, .3, 1); }
.sheet::backdrop { background: rgba(10, 5, 25, 0.7); backdrop-filter: blur(4px); }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
.sheet__title { margin: 0; font: 800 1.6rem/1.15 var(--display); }
.sheet__close { width: 100%; margin-top: 1rem; }
#picker-list { overflow-y: auto; min-height: 0; }
.choice-group { margin-top: 1.1rem; }
.choice-group__title { margin: 0 0 0.5rem; color: var(--muted); font: 600 0.85rem var(--body); }
.choice-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.choice {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.75rem 0.8rem;
  border: 2px solid transparent;
  border-radius: var(--r-m);
  background: var(--plum-hi);
  text-align: left;
  font-weight: 600;
}
.choice:hover { border-color: var(--line); }
.choice[aria-pressed="true"] { border-color: var(--blip); background: color-mix(in srgb, var(--blip) 16%, var(--plum-hi)); }
.choice__icon { font-size: 1.8rem; line-height: 1; }
.choice__label { min-width: 0; line-height: 1.2; overflow-wrap: anywhere; } /* « United Kingdom » passe sur 2 lignes plutôt que d'être coupé */
@media (max-width: 380px) {
  .choice { gap: 0.5rem; padding: 0.65rem 0.6rem; }
  .choice__icon { font-size: 1.4rem; }
}
@media (min-width: 600px) {
  .sheet { margin: auto; border-radius: var(--r-l); padding-bottom: 1.5rem; }
  .sheet[open] { animation-name: pop; }
}

.credit {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2.5rem;
  color: var(--muted);
  font-size: 0.8rem;
}
.credit p { margin: 0; }
.credit a { color: var(--text); text-underline-offset: 2px; }
.credit__logo { height: 22px; width: auto; }

/* ---- Grand écran ------------------------------------------------------------------- */

@media (min-width: 600px) {
  .covers {
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.25rem 1rem;
    margin: 0.9rem 0 0;
    padding: 0;
    overflow: visible;
  }
}

@media (min-width: 960px) {
  body[data-screen="home"] .shell { width: min(76rem, 100%); padding-inline: 2rem; }
  .home {
    display: grid;
    grid-template-columns: minmax(0, 24rem) minmax(0, 1fr);
    grid-template-areas: "hero free" "side free";
    grid-template-rows: auto 1fr;
    column-gap: 4.5rem;
    align-items: start;
  }
  .hero { grid-area: hero; padding-top: 2.5rem; }
  .home__side { grid-area: side; display: flex; flex-direction: column; position: sticky; top: 1.5rem; }
  .home .settings { margin-top: 1.75rem; }
  .free { grid-area: free; margin-top: 2.5rem; }
  .orb { width: 360px; }
}

/* ---- Comment jouer ---------------------------------------------------------------------- */

.howto {
  width: min(26rem, calc(100% - 2rem));
  padding: 1.6rem;
  border: 0;
  border-radius: var(--r-l);
  background: var(--plum);
  color: var(--text);
}
.howto[open] { animation: pop 260ms cubic-bezier(.2, .9, .3, 1.2); }
.howto::backdrop { background: rgba(10, 5, 25, 0.7); backdrop-filter: blur(4px); }
@keyframes pop { from { opacity: 0; transform: scale(0.94); } }
.howto__title { margin: 0; font: 800 1.8rem/1.1 var(--display); }
.howto__steps { margin: 1.2rem 0 0; padding: 0; list-style: none; counter-reset: step; }
.howto__steps li { position: relative; padding: 0 0 0.9rem 2.6rem; counter-increment: step; }
.howto__steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.1rem;
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--blip);
  color: var(--ink);
  font: 800 0.95rem var(--display);
}
.howto__legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin: 0.4rem 0 1.4rem; padding: 0; list-style: none; font-size: 0.9rem; }
.howto__legend li { display: flex; align-items: center; gap: 0.4rem; }
.howto .btn { width: 100%; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot.is-correct { background: var(--good); }
.dot.is-artist { background: var(--near); }
.dot.is-wrong { background: var(--bad); }
.dot.is-skip { background: var(--muted); opacity: 0.45; }

.fx { position: fixed; inset: 0; z-index: 20; width: 100%; height: 100%; pointer-events: none; }

.toast {
  position: fixed;
  left: 50%;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  z-index: 30;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(24rem, calc(100% - 2rem));
  margin: 0;
  padding: 0.8rem 1.1rem;
  border-radius: var(--r-m);
  background: var(--text);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 12px 32px rgba(8, 4, 20, 0.5);
  animation: toast-in 220ms cubic-bezier(.2, .8, .2, 1);
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }
.noscript { margin: 1rem; }
.notice {
  margin: 1.25rem 0 0;
  padding: 0.9rem 1rem;
  border-radius: var(--r-s);
  background: var(--plum);
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Sur la carte de l'accueil, les chiffres suffisent : la répartition reste sur la révélation. */
.daily .dist { display: none; }
