/* ==========================================================================
   Meatball the Cat — v2
   Un thème = un jeu de couleurs. Halloween est le thème actif ; Noël n'aura
   qu'à redéfinir les variables sous [data-theme="christmas"].
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Nunito:wght@400;600;700;800&family=Gochi+Hand&display=swap");

:root {
  --bg:        #1b1429;
  --bg-2:      #241a37;
  --surface:   #2d2245;
  --surface-2: #382a55;
  --line:      #4a3a6b;
  --text:      #f6eedf;
  --text-soft: #c9bcd9;
  --text-faint:#9586ad;
  --accent:    #f28c28;
  --accent-2:  #ffb15c;
  --accent-ink:#2a1606;
  --purple:    #9a7be0;
  --slime:     #9be36d;

  --r-common:  #c9a46a;
  --r-rare:    #7fb2ff;
  --r-holo:    #ff7ad9;
  --r-glitch:  #35f0e6;

  --display: "Fredoka", "Trebuchet MS", sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Gochi Hand", "Ink Free", "Comic Sans MS", cursive;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 18px 40px -18px rgba(0,0,0,.65);
  --ease-out: cubic-bezier(.2,.8,.2,1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(154,123,224,.22), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(242,140,40,.12), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* « Réduire les animations » activé sur le téléphone : on calme le jeu
   (plus de rotations ni de secousses) sans tout éteindre ; les confettis
   deviennent des étincelles qui apparaissent sur place. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rays, .stage .cat.bop,
  .pack-slot.golden:not(.open), .envelope .hint, .watch-frame img { animation: none !important; }
}
html { overflow-x: clip; }
/* Pas de zoom par double-tap sur les boutons (on tape vite sur « Spin »). */
a, button, input, select, label, .slot { touch-action: manipulation; }

/* ---------- Boutons ------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: 0; border-radius: 999px; cursor: pointer;
  font-family: var(--display); font-weight: 600; font-size: 17px; text-decoration: none;
  transition: transform .15s var(--ease-out), box-shadow .15s, background .15s, opacity .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn:focus-visible, .chip:focus-visible, .slot:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 0 #b3600f, 0 14px 30px -10px rgba(242,140,40,.6); }
.btn-primary:hover { background: var(--accent-2); }
.btn-primary:active { box-shadow: 0 3px 0 #b3600f; transform: translateY(3px); }
.btn-primary[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-ghost { background: var(--surface); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-google { background: #fff; color: #1f1f1f; font-family: var(--body); font-weight: 700; font-size: 15px; min-height: 42px; padding: 0 16px; }
.btn-google svg { width: 18px; height: 18px; }
.btn-lg { min-height: 58px; padding: 0 30px; font-size: 20px; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 15px; }

/* ---------- En-tête ------------------------------------------------------ */
.preview-bar {
  background: repeating-linear-gradient(-45deg, #3b2c12, #3b2c12 12px, #33270f 12px, #33270f 24px);
  color: #ffd9a8; font-size: 13px; text-align: center; padding: 6px 12px;
}
.preview-bar button { background: none; border: 0; text-decoration: underline; cursor: pointer; color: #fff; padding: 0 4px; }

.site-header { position: sticky; top: 0; z-index: 40; padding-top: env(safe-area-inset-top); background: rgba(27,20,41,.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(74,58,107,.6); }
.header-inner { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand img { width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--accent); }
.brand span { font-family: var(--display); font-weight: 700; font-size: 19px; white-space: nowrap; }
.brand sup { font-size: 10px; color: var(--text-faint); }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; padding: 8px 14px; border-radius: 999px; font-family: var(--display); font-weight: 500; color: var(--text-soft); }
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
/* Bouton EN | FR (ajouté par js/i18n.js) */
.lang-toggle { display: flex; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); flex: none; }
.lang-toggle a { min-width: 34px; min-height: 30px; display: grid; place-items: center; padding: 0 8px; border-radius: 999px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: .04em; color: var(--text-soft); }
.lang-toggle a:hover { color: var(--text); }
.lang-toggle a[aria-current="true"] { background: var(--accent); color: var(--accent-ink); }
/* Petit téléphone : logo, nom, EN | FR et « Se connecter » tiennent sur une ligne. */
@media (max-width: 430px) {
  .header-inner { gap: 8px; }
  .brand { gap: 7px; }
  .brand img { width: 34px; height: 34px; }
  .brand span { font-size: 14.5px !important; }
  #auth-slot .btn-google { white-space: nowrap; padding: 0 12px; font-size: 13.5px; min-height: 38px; }
  .user-chip .nm { max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 389px) { .brand span { display: none; } }   /* le logo seul : le nom chevaucherait EN | FR */
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 14px; cursor: pointer; }
.user-chip .av { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-family: var(--display); }
.user-chip .pts { color: var(--accent-2); }

.tabbar { display: none; }
@media (max-width: 760px) {
  .header-inner { gap: 10px; }
  .lang-toggle a { min-width: 30px; padding: 0 6px; font-size: 12px; }
  .nav { display: none; }
  .brand span { font-size: 17px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(3, 1fr);
    position: fixed; inset: auto 0 0 0; z-index: 45;
    background: rgba(27,20,41,.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 9px 0 8px; text-decoration: none; font-size: 12px; font-weight: 700; color: var(--text-faint); }
  .tabbar a svg { width: 24px; height: 24px; }
  .tabbar a[aria-current="page"] { color: var(--accent-2); }
  body { padding-bottom: 72px; }
}

/* ---------- Divers ------------------------------------------------------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-2); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 700; color: var(--text-soft); }
.chip b { color: var(--text); font-variant-numeric: tabular-nums; }
.panel { background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.section { padding: 64px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); }
.muted { color: var(--text-soft); }

/* ==========================================================================
   La carte. Toutes les tailles en cqw (% de la largeur de la carte) : la
   même carte marche à 90 px dans le rouleau et à 380 px en grand.
   ========================================================================== */
.mbcard {
  --frame: url("../assets/brand/frame-sm.webp");
  container-type: inline-size;
  position: relative;
  width: 100%;
  aspect-ratio: 1000 / 1464;
  border-radius: 5.5% / 3.76%;
  isolation: isolate;
  user-select: none;
  -webkit-user-select: none;
}
.mbcard.big { --frame: url("../assets/brand/frame.webp"); }
.mbcard .frame { position: absolute; inset: 0; background: var(--frame) center / 100% 100% no-repeat; border-radius: inherit; z-index: 0; }
.mbcard .art { position: absolute; left: 9%; top: 14.5%; width: 82%; height: 61%; z-index: 1; }
.mbcard .art i { position: absolute; inset: 0; background: center / contain no-repeat; filter: drop-shadow(0 1.2cqw 1.2cqw rgba(60,35,10,.35)); }
.mbcard .rar, .mbcard .num, .mbcard .title { position: absolute; z-index: 3; font-family: var(--hand); color: #6b4630; text-align: center; line-height: 1; white-space: nowrap; }
.mbcard .rar { left: 5.5%; top: 3.6%; width: 27.5%; height: 8.6%; display: grid; place-items: center; font-size: 6.4cqw; padding-top: .6cqw; }
.mbcard .num { left: 76%; top: 4.2%; width: 15%; height: 9%; display: grid; place-items: center; font-size: 6.6cqw; }
.mbcard .title { left: 14.5%; top: 77.8%; width: 70.5%; height: 8%; display: grid; place-items: center; font-size: 7cqw; overflow: hidden; }
.mbcard .title.long { font-size: 5.8cqw; }
.mbcard .fx { position: absolute; inset: 0; border-radius: inherit; z-index: 2; pointer-events: none; }

/* Rare : le même cadre passé au bleu acier. */
.mbcard.r-rare .frame { filter: hue-rotate(178deg) saturate(.75) brightness(1.12); }
.mbcard.r-rare .rar, .mbcard.r-rare .num, .mbcard.r-rare .title { color: #23405f; }

/* Holo : le cadre change de couleur, un éclat blanc passe vite sur la carte,
   des paillettes scintillent. */
.mbcard.r-holo .frame { animation: holoHue 4s linear infinite; }
@keyframes holoHue { from { filter: hue-rotate(0deg) saturate(1.7) brightness(1.06); } to { filter: hue-rotate(360deg) saturate(1.7) brightness(1.06); } }
.mbcard.r-holo .fx {
  overflow: hidden;
  background: linear-gradient(125deg, #ff3fb0, #ffcf3f, #3fffa0, #3fbfff, #a43fff, #ff3fb0, #ffcf3f);
  background-size: 300% 300%;
  mix-blend-mode: overlay;
  opacity: .55;
  animation: holoRainbow 3s linear infinite;
}
@keyframes holoRainbow { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
/* L'éclat : traverse la carte en 0,7 s, puis une courte pause. */
.mbcard.r-holo .fx::after {
  content: ""; position: absolute; inset: -10% -60%;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.95) 50%, transparent 60%);
  mix-blend-mode: soft-light;
  transform: translateX(-70%);
  animation: holoGlare 2.2s cubic-bezier(.45, 0, .25, 1) infinite;
}
@keyframes holoGlare { 0% { transform: translateX(-70%); } 32%, 100% { transform: translateX(70%); } }
/* Les paillettes. */
.mbcard.r-holo .fx::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 18% 22%, #fff 0 .7cqw, transparent 1.2cqw),
    radial-gradient(circle at 78% 30%, #fff 0 .5cqw, transparent 1cqw),
    radial-gradient(circle at 30% 70%, #fff 0 .6cqw, transparent 1.1cqw),
    radial-gradient(circle at 84% 76%, #fff 0 .8cqw, transparent 1.3cqw),
    radial-gradient(circle at 55% 12%, #fff 0 .5cqw, transparent 1cqw);
  mix-blend-mode: screen;
  animation: holoSparkle 1.6s ease-in-out infinite alternate;
}
@keyframes holoSparkle { from { opacity: .15; } to { opacity: 1; } }
.mbcard.r-holo .rar, .mbcard.r-holo .num, .mbcard.r-holo .title { color: #5a2a6b; }

/* Glitch : cadre sombre, lignes d'écran qui défilent, et toutes les ~2 s une
   « panne » : le dessin se déchire en bandes cyan / magenta. */
.mbcard.r-glitch .frame { filter: grayscale(1) brightness(.32) contrast(1.6) drop-shadow(1cqw 0 0 rgba(53,240,230,.9)) drop-shadow(-1cqw 0 0 rgba(255,46,180,.9)); }
.mbcard.r-glitch .art i { filter: drop-shadow(1.4cqw 0 0 rgba(53,240,230,.7)) drop-shadow(-1.4cqw 0 0 rgba(255,46,180,.7)); animation: glitchJump 2.4s steps(1) infinite; }
/* Deux copies du dessin (même image grâce à « inherit »), teintées, découpées en bandes. */
.mbcard.r-glitch .art i::before, .mbcard.r-glitch .art i::after {
  content: ""; position: absolute; inset: 0;
  background: inherit; opacity: 0;
  mix-blend-mode: screen;
}
.mbcard.r-glitch .art i::before { filter: brightness(.6) sepia(1) saturate(9) hue-rotate(140deg); animation: glitchCyan 2.4s steps(1) infinite; }
.mbcard.r-glitch .art i::after  { filter: brightness(.6) sepia(1) saturate(9) hue-rotate(290deg); animation: glitchPink 2.4s steps(1) infinite; }
.mbcard.r-glitch .fx {
  overflow: hidden;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.3) 0 .5cqw, transparent .5cqw 1.4cqw);
  background-size: 100% 2.8cqw;
  mix-blend-mode: multiply;
  animation: glitchLines .6s linear infinite;
}
@keyframes glitchLines { to { background-position: 0 2.8cqw; } }
/* Bande lumineuse qui descend comme sur un vieil écran. */
.mbcard.r-glitch .fx::after {
  content: ""; position: absolute; left: 0; right: 0; height: 14%; top: -14%;
  background: linear-gradient(transparent, rgba(53,240,230,.35), transparent);
  mix-blend-mode: screen;
  animation: glitchRoll 3.4s linear infinite;
}
@keyframes glitchRoll { to { transform: translateY(820%); } }
.mbcard.r-glitch .rar, .mbcard.r-glitch .num, .mbcard.r-glitch .title { color: #35f0e6; text-shadow: .5cqw 0 #ff2eb4; animation: glitchText 2.4s steps(1) infinite; }
/* Une « panne » longue (~0,45 s, 7 secousses) puis une courte, toutes les 2,4 s :
   assez longue pour se voir sur une petite carte de téléphone. */
@keyframes glitchJump {
  0%, 24%, 44%, 76%, 86%, 100% { transform: none; clip-path: none; }
  26% { transform: translate(6cqw, -1cqw) skewX(-12deg); clip-path: inset(8% 0 52% 0); }
  29% { transform: translate(-7cqw, 1cqw); clip-path: inset(46% 0 10% 0); }
  32% { transform: translate(4cqw, 0) skewX(8deg); clip-path: inset(0 0 30% 0); }
  35% { transform: translate(-5cqw, 0); clip-path: inset(25% 0 35% 0); }
  38% { transform: translate(3cqw, 1cqw) skewX(-6deg); clip-path: none; }
  41% { transform: translate(-2cqw, 0); clip-path: inset(60% 0 0 0); }
  78% { transform: translate(-5cqw, 0); clip-path: inset(60% 0 0 0); }
  82% { transform: translate(4cqw, 0) skewX(6deg); clip-path: inset(0 0 55% 0); }
}
@keyframes glitchCyan {
  0%, 24%, 44%, 76%, 86%, 100% { opacity: 0; transform: none; clip-path: none; }
  26% { opacity: 1; transform: translateX(-8cqw); clip-path: inset(18% 0 62% 0); }
  29% { opacity: 1; transform: translateX(7cqw); clip-path: inset(55% 0 25% 0); }
  32% { opacity: 1; transform: translateX(-4cqw); clip-path: inset(30% 0 50% 0); }
  35% { opacity: 1; transform: translateX(9cqw); clip-path: inset(5% 0 80% 0); }
  38% { opacity: 1; transform: translateX(-6cqw); clip-path: inset(66% 0 14% 0); }
  41% { opacity: 1; transform: translateX(3cqw); clip-path: inset(40% 0 45% 0); }
  78% { opacity: 1; transform: translateX(6cqw); clip-path: inset(70% 0 12% 0); }
  82% { opacity: 1; transform: translateX(-5cqw); clip-path: inset(12% 0 70% 0); }
}
@keyframes glitchPink {
  0%, 24%, 44%, 76%, 86%, 100% { opacity: 0; transform: none; clip-path: none; }
  27% { opacity: 1; transform: translateX(8cqw); clip-path: inset(40% 0 38% 0); }
  30% { opacity: 1; transform: translateX(-6cqw); clip-path: inset(8% 0 78% 0); }
  33% { opacity: 1; transform: translateX(7cqw); clip-path: inset(72% 0 8% 0); }
  36% { opacity: 1; transform: translateX(-9cqw); clip-path: inset(28% 0 56% 0); }
  39% { opacity: 1; transform: translateX(5cqw); clip-path: inset(50% 0 30% 0); }
  79% { opacity: 1; transform: translateX(-7cqw); clip-path: inset(20% 0 66% 0); }
  83% { opacity: 1; transform: translateX(6cqw); clip-path: inset(58% 0 26% 0); }
}
@keyframes glitchText {
  0%, 24%, 44%, 100% { text-shadow: .5cqw 0 #ff2eb4; transform: none; }
  26% { text-shadow: -1.5cqw 0 #ff2eb4, 1.5cqw 0 #35f0e6; transform: translateX(1.5cqw); }
  32% { text-shadow: 1.2cqw 0 #ff2eb4, -1cqw 0 #35f0e6; transform: translateX(-1cqw); }
  38% { text-shadow: -1cqw 0 #ff2eb4, 1cqw 0 #35f0e6; transform: translateX(.8cqw); }
}

/* « Réduire les animations » activé (souvent le cas sur iPhone) : le Glitch
   garde ses déchirures, c'est sa signature, mais plus espacées (toutes les
   4,8 s) ; l'éclat Holo passe plus lentement. */
@media (prefers-reduced-motion: reduce) {
  .mbcard.r-holo .fx::after { animation-duration: 4s; }
  .mbcard.r-glitch .art i, .mbcard.r-glitch .art i::before, .mbcard.r-glitch .art i::after,
  .mbcard.r-glitch .rar, .mbcard.r-glitch .num, .mbcard.r-glitch .title { animation-duration: 4.8s; }
  .mbcard.r-glitch .fx { animation-duration: 2s; }
}

/* Carte manquante : silhouette. */
.mbcard.missing .frame { filter: grayscale(1) brightness(.42); }
.mbcard.missing .art i { filter: brightness(0) opacity(.5); }
.mbcard.missing .rar, .mbcard.missing .title, .mbcard.missing .num { color: #c9c2d4; opacity: .7; }

/* Dos de carte : l'image dessinée par le propriétaire (DOS_CARTE.png, mise
   au format des cartes par tools/make_card_back.py). */
.mbcard-back {
  position: absolute; inset: 0; border-radius: 5.5% / 3.76%; overflow: hidden;
  background: url("../assets/brand/card-back.webp") center / 100% 100% no-repeat;
}

/* ==========================================================================
   Accueil
   ========================================================================== */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(42px, 7vw, 76px); font-weight: 700; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { font-size: 19px; color: var(--text-soft); max-width: 40ch; margin: 18px 0 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.countdown { margin-top: 22px; display: flex; gap: 8px; flex-wrap: wrap; }
.fan { position: relative; height: 470px; perspective: 1200px; }
.fan .mbcard { position: absolute; width: 250px; top: 50%; left: 50%; transition: transform .5s var(--ease-out); box-shadow: 0 30px 50px -20px rgba(0,0,0,.7); }
.fan .c1 { transform: translate(-115%, -48%) rotate(-12deg); }
.fan .c2 { transform: translate(-50%, -54%); z-index: 2; }
.fan .c3 { transform: translate(15%, -48%) rotate(12deg); }
.fan:hover .c1 { transform: translate(-128%, -50%) rotate(-16deg); }
.fan:hover .c3 { transform: translate(28%, -50%) rotate(16deg); }
.fan .tag { position: absolute; z-index: 5; font-family: var(--display); font-weight: 600; font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1100px) { .steps { grid-template-columns: repeat(2, 1fr); } }
.step { padding: 24px; }
.step .n { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-family: var(--display); font-weight: 700; font-size: 20px; margin-bottom: 14px; }
.step h3 { font-size: 22px; margin-bottom: 6px; }

.rarity-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.rarity-row figure { margin: 0; text-align: center; }
.rarity-row figcaption { margin-top: 12px; font-family: var(--display); font-weight: 600; }
.rarity-row figcaption small { display: block; font-family: var(--body); font-weight: 700; font-size: 13px; color: var(--text-faint); }

.prize { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; padding: 30px; }

.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.social { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-weight: 700; transition: background .15s, transform .15s; }
.social:hover { background: var(--surface-2); transform: translateY(-2px); }
.social svg { width: 20px; height: 20px; fill: currentColor; }

.site-footer { border-top: 1px solid var(--line); padding: 36px 0 44px; margin-top: 40px; color: var(--text-soft); font-size: 14px; }
.footer-grid { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--text); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .fan { height: 360px; order: -1; }
  .fan .mbcard { width: 190px; }
  .steps { grid-template-columns: 1fr; }
  .rarity-row { grid-template-columns: repeat(2, 1fr); }
  .prize { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}
@media (max-width: 420px) {
  .fan { height: 300px; }
  .fan .mbcard { width: 150px; }
}

/* Téléphone : les deux boutons de l'accueil côte à côte, même taille ;
   les boutons des réseaux en grille 2 × 2 ; le pied de page centré. */
@media (max-width: 640px) {
  .hero-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero-cta .btn { min-height: 56px; padding: 6px 10px; font-size: 16px; line-height: 1.15; white-space: normal; text-align: center; justify-content: center; }
  .countdown { justify-content: center; gap: 6px; }
  .countdown .chip { font-size: 13px; padding: 6px 10px; gap: 4px; }
  .codes .socials { display: grid; grid-template-columns: 1fr 1fr; }
  .codes .social { justify-content: center; padding: 10px 12px; font-size: 17px; }
  .footer-grid { justify-content: center; text-align: center; }
  .footer-grid .socials, .footer-links { justify-content: center; }
}

/* ==========================================================================
   Collection : machine à tirer + album
   ========================================================================== */
.col-head { padding: 34px 0 10px; display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.col-head h1 { font-size: clamp(32px, 5vw, 48px); }
.themes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.theme-tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-family: var(--display); font-weight: 600; cursor: pointer; }
.theme-tab[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.theme-tab[disabled] { opacity: .5; cursor: not-allowed; }

.machine { position: relative; margin: 22px 0 18px; padding: 22px 0 26px; overflow: hidden; }
.machine-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 22px 16px; flex-wrap: wrap; }
.machine-top h2 { font-size: 24px; }
.reel-window {
  position: relative; height: var(--reel-h, 250px); overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.reel { position: absolute; left: 0; top: 50%; display: flex; gap: var(--reel-gap, 14px); will-change: transform; transform: translate3d(0,-50%,0); }
.reel .mbcard { width: var(--reel-w, 150px); flex: none; transition: transform .35s var(--ease-out), filter .35s; }
.reel.spinning .mbcard { filter: blur(var(--blur, 0px)); }
.reel .mbcard.win { transform: scale(1.12); }
.reel.done .mbcard:not(.win) { filter: brightness(.45) saturate(.6); }
.pointer { position: absolute; left: 50%; top: 0; bottom: 0; width: 0; z-index: 4; pointer-events: none; }
.pointer::before, .pointer::after { content: ""; position: absolute; left: -13px; border: 13px solid transparent; }
.pointer::before { top: 54px; border-top-color: var(--accent); filter: drop-shadow(0 2px 4px rgba(0,0,0,.6)); }
.pointer::after { bottom: 58px; border-bottom-color: var(--accent); filter: drop-shadow(0 -2px 4px rgba(0,0,0,.6)); }
.pointer-line { position: absolute; left: 50%; top: 80px; bottom: 84px; width: 2px; margin-left: -1px; background: linear-gradient(transparent, rgba(255,177,92,.65), transparent); z-index: 4; }
.machine-actions { display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px 22px 0; }
.next-spin { font-size: 14px; color: var(--text-soft); }
.next-spin b { font-variant-numeric: tabular-nums; color: var(--text); }
.sound-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; display: grid; place-items: center; }
.sound-btn svg { width: 20px; height: 20px; fill: currentColor; }

.redeem { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 18px 22px; margin-bottom: 30px; }
.redeem label { font-family: var(--display); font-weight: 600; font-size: 18px; margin-right: auto; }
.redeem label small { display: block; font-family: var(--body); font-weight: 600; font-size: 13px; color: var(--text-faint); }
.redeem input { flex: 1 1 200px; min-height: 48px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: 700 17px var(--body); letter-spacing: .12em; text-transform: uppercase; }
.redeem input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.redeem .msg { flex-basis: 100%; font-size: 14px; min-height: 1.4em; }
.redeem .msg.ok { color: var(--slime); }
.redeem .msg.err { color: #ff8f8f; }

.album-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.album-head h2 { font-size: 28px; }
.progress { flex: 1 1 220px; max-width: 360px; }
.progress-bar { height: 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.progress-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: inherit; transition: width .8s var(--ease-out); }
.progress small { display: flex; justify-content: space-between; margin-top: 6px; color: var(--text-soft); font-weight: 700; }
.filters { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; align-items: center; }
.filters .filters-share { margin-left: auto; }
.filters .chip { cursor: pointer; }
.filters .chip[aria-pressed="true"] { background: var(--surface-2); color: var(--text); border-color: var(--purple); }

.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 16px; }
.slot { position: relative; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; border-radius: 12px; transition: transform .2s var(--ease-out); }
.slot:hover { transform: translateY(-4px); }
.slot .dots { display: flex; gap: 5px; justify-content: center; margin-top: 8px; }
.slot .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); }
.slot .dots i.on.common { background: var(--r-common); border-color: var(--r-common); }
.slot .dots i.on.rare   { background: var(--r-rare); border-color: var(--r-rare); }
.slot .dots i.on.holo   { background: var(--r-holo); border-color: var(--r-holo); }
.slot .dots i.on.glitch { background: var(--r-glitch); border-color: var(--r-glitch); }
.slot.new::after { content: "NEW"; position: absolute; top: -8px; right: -6px; z-index: 5; background: var(--slime); color: #12300a; font: 700 11px var(--display); padding: 3px 8px; border-radius: 999px; }
@media (max-width: 520px) {
  .album { grid-template-columns: repeat(3, 1fr); gap: 14px 10px; }
  .slot .dots i { width: 7px; height: 7px; }
}

/* ---------- Fenêtres ----------------------------------------------------- */
.overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(10,6,18,.78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.dialog { width: min(440px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; padding: 26px; text-align: center; position: relative; }
.dialog h2 { font-size: 26px; margin-bottom: 8px; }
.dialog .close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface-2); cursor: pointer; font-size: 20px; }
.field { text-align: left; margin: 16px 0; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.field input[type=text], .field input[type=password], .field input[type=email] { width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: 600 17px var(--body); }
.check { display: flex; gap: 10px; align-items: flex-start; text-align: left; margin: 10px 0; font-size: 15px; color: var(--text-soft); cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin-top: 2px; flex: none; }

/* Révélation d'une carte. */
.reveal { display: grid; justify-items: center; gap: 18px; text-align: center; }
.reveal-stage { position: relative; width: min(320px, 74vw, calc((100vh - 250px) / 1.464)); min-width: 180px; perspective: 1400px; }
.flipper { position: relative; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.3,1.4,.4,1); }
.flipper.flipped { transform: rotateY(180deg); }
.flipper > .mbcard-back { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flipper > .mbcard { backface-visibility: hidden; -webkit-backface-visibility: hidden; transform: rotateY(180deg); }
.burst { pointer-events: none; position: absolute; inset: -40%; z-index: -1; border-radius: 50%; opacity: 0; background: radial-gradient(circle, var(--glow, var(--r-common)) 0%, transparent 62%); transition: opacity .6s .5s; }
.flipper.flipped ~ .burst { opacity: .55; }
.rays { pointer-events: none; position: absolute; inset: -55%; z-index: -2; opacity: 0; background: repeating-conic-gradient(from 0deg, var(--glow) 0 6deg, transparent 6deg 18deg); -webkit-mask-image: radial-gradient(circle, #000 20%, transparent 62%); mask-image: radial-gradient(circle, #000 20%, transparent 62%); animation: spin 14s linear infinite; transition: opacity .6s .6s; }
.flipper.flipped ~ .rays.on { opacity: .35; }
@keyframes spin { to { transform: rotate(360deg); } }
.reveal-text { opacity: 0; transform: translateY(10px); transition: opacity .4s 1s, transform .4s 1s; }
.reveal.done .reveal-text { opacity: 1; transform: none; }
.rarity-badge { display: inline-block; font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .12em; padding: 5px 14px; border-radius: 999px; color: #160f22; background: var(--glow); }
.reveal-text h2 { font-size: 34px; margin: 10px 0 4px; }
.reveal-text .pts { font-family: var(--display); font-weight: 600; font-size: 20px; color: var(--accent-2); }
.reveal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 110; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate3d(var(--dx), 110vh, 0) rotate(var(--rot)); } }

/* Détail d'une carte. */
.detail { width: min(760px, 100%); display: grid; grid-template-columns: 300px 1fr; gap: 28px; text-align: left; align-items: center; }
.detail .versions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.detail .versions button { background: none; border: 2px solid transparent; border-radius: 10px; padding: 3px; cursor: pointer; }
.detail .versions button[aria-pressed="true"] { border-color: var(--accent); }
.detail .versions small { display: block; text-align: center; font-size: 12px; font-weight: 700; color: var(--text-soft); margin-top: 4px; }
.tilt { transition: transform .2s ease-out; transform-style: preserve-3d; will-change: transform; }
@media (max-width: 640px) {
  .detail { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .detail .tilt { width: min(260px, 70vw); }
}

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 120; background: var(--text); color: var(--bg); font-weight: 700; padding: 12px 20px; border-radius: 999px; box-shadow: var(--shadow); animation: fadeIn .2s; }

/* ==========================================================================
   Classement
   ========================================================================== */
.podium { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; align-items: end; margin: 26px 0 30px; }
.podium .p { padding: 22px 14px 18px; text-align: center; position: relative; min-width: 0; }
.podium .p1 { padding-top: 34px; border-color: #e8b83a; }
.podium .medal { width: 92px; height: 92px; margin: 0 auto 10px; position: relative; }
.podium .p1 .medal { width: 116px; height: 116px; }
.medal img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 5px solid var(--m, #e8b83a); box-shadow: 0 0 0 3px var(--bg), 0 0 30px -4px var(--m, #e8b83a); }
.medal span { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); background: var(--m, #e8b83a); color: #1d1405; font: 700 14px var(--display); padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.podium .p2 { --m: #c9d1dc; }
.podium .p3 { --m: #d58b52; }
.podium .name { font-family: var(--display); font-weight: 600; font-size: 19px; margin-top: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium .score { font-weight: 800; color: var(--accent-2); font-variant-numeric: tabular-nums; }
.podium .prize-note { font-size: 12px; color: var(--text-faint); margin-top: 6px; }
.lb { list-style: none; margin: 0; padding: 6px; }
.lb li { display: grid; grid-template-columns: 44px 1fr auto auto; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 12px; }
.lb li:nth-child(odd) { background: rgba(255,255,255,.025); }
.lb li.me { background: rgba(242,140,40,.14); outline: 1px solid rgba(242,140,40,.5); }
.lb .rk { font-family: var(--display); font-weight: 700; color: var(--text-faint); text-align: center; }
.lb .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb .cards { font-size: 13px; color: var(--text-faint); }
.lb .sc { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent-2); min-width: 70px; text-align: right; }
@media (max-width: 560px) {
  .podium { gap: 8px; }
  .podium .medal { width: 64px; height: 64px; }
  .podium .p1 .medal { width: 82px; height: 82px; }
  .podium .name { font-size: 15px; }
  .podium .p { padding: 18px 6px 14px; }
  .podium .p1 { padding-top: 26px; }
  .podium .score { font-size: 14px; }
  .podium .prize-note { font-size: 11px; }
}
@media (max-width: 360px) {
  .podium { gap: 6px; }
  .podium .medal { width: 54px; height: 54px; }
  .podium .p1 .medal { width: 68px; height: 68px; }
  .podium .name { font-size: 13px; }
  .podium .score { font-size: 13px; }
}

/* Petits écrans : l'en-tête garde le nom de la marque, la puce joueur se
   réduit à l'initiale + les points. */
.btn-google .short { display: none; }
@media (max-width: 520px) {
  .header-inner { gap: 10px; }
  .brand img { width: 36px; height: 36px; }
  .brand span { font-size: 16px; }
  .user-chip .nm { display: none; }
  .user-chip { padding-right: 10px; font-size: 13px; }
  .btn-google .long { display: none; }
  .btn-google .short { display: inline; }
}

/* ==========================================================================
   Meatball Greetings : cartes de vœux interactives
   ========================================================================== */
.greet-builder { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; padding: 34px 0 20px; }
.greet-builder h1 { font-size: clamp(34px, 5vw, 52px); margin: 10px 0 10px; }
.occasions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 20px 0 6px; }
.occ { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; font-family: var(--display); font-weight: 600; font-size: 17px; text-align: left; }
.occ span { font-size: 24px; }
.occ[aria-pressed="true"] { border-color: var(--accent); background: rgba(242,140,40,.14); }
.greet-form .field input[type=text] { font-size: 19px; }
.share-box { margin-top: 18px; padding: 18px; }
.share-box .link { display: flex; gap: 8px; margin: 10px 0; }
.share-box input { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text-soft); font: 600 16px var(--body); }

.paper {
  --paper: #f4e9da; --paper-ink: #4a3426;
  position: relative; border-radius: 24px; overflow: hidden;
  background:
    radial-gradient(circle at 20% 15%, rgba(255,255,255,.7), transparent 40%),
    radial-gradient(rgba(201,164,106,.25) 1.5px, transparent 2px) 0 0 / 22px 22px,
    var(--paper);
  color: var(--paper-ink);
}
.paper[data-o="birthday"] { --paper: #fde7c8; }
.paper[data-o="thanks"]   { --paper: #e3f1e4; }
.paper[data-o="love"]     { --paper: #fbdde3; }
.paper[data-o="hello"]    { --paper: #e2ecf8; }
.greet-preview { aspect-ratio: 4 / 5; display: grid; place-items: end center; padding: 20px; position: sticky; top: 90px; }
.greet-preview img { width: 78%; max-height: 62%; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(74,52,38,.25)); }

.bubble {
  position: absolute; left: 50%; top: 9%; transform: translateX(-50%);
  max-width: 86%; padding: 14px 20px; border-radius: 22px;
  background: #fff; color: #3b2a20; border: 3px solid #4a3426;
  font: 400 clamp(22px, 4.6vw, 34px)/1.15 var(--hand); text-align: center;
  box-shadow: 0 6px 0 rgba(74,52,38,.18);
}
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -16px; margin-left: -10px; border: 13px solid transparent; border-top-color: #4a3426; border-bottom: 0; }
.bubble::before { content: ""; position: absolute; left: 50%; bottom: -10px; margin-left: -7px; z-index: 1; border: 10px solid transparent; border-top-color: #fff; border-bottom: 0; }
.bubble b { color: #d96a12; font-weight: 400; }
.bubble.pop { animation: pop .35s cubic-bezier(.3,1.6,.5,1); }
@keyframes pop { from { transform: translateX(-50%) scale(.6); opacity: 0; } }

/* Le destinataire */
body.viewing .site-header, body.viewing .site-footer, body.viewing .tabbar, body.viewing .preview-bar, body.viewing .greet-builder { display: none; }
body.viewing { padding-bottom: 0; }
.viewer { min-height: 100svh; display: grid; place-items: center; padding: 16px; }
.stage { width: min(460px, 100%); aspect-ratio: 4 / 5.4; max-height: calc(100svh - 120px); display: grid; place-items: end center; padding: 22px; }
.stage .cat { width: 82%; max-height: 58%; object-fit: contain; transform-origin: 50% 100%; filter: drop-shadow(0 12px 16px rgba(74,52,38,.25)); opacity: 0; }
.stage .cat.in { animation: catIn .7s cubic-bezier(.3,1.5,.5,1) forwards; }
.stage .cat.bop { animation: bop .45s ease-in-out infinite alternate; opacity: 1; }
@keyframes catIn { from { opacity: 0; transform: translateY(40%) scale(.6); } to { opacity: 1; transform: none; } }
@keyframes bop { from { transform: rotate(-3deg) translateY(0); } to { transform: rotate(3deg) translateY(-4%); } }
.viewer-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 16px; opacity: 0; transition: opacity .6s; }
.viewer-actions.on { opacity: 1; }
.viewer-brand { display: flex; align-items: center; gap: 8px; justify-content: center; margin-bottom: 12px; font-family: var(--display); font-weight: 600; text-decoration: none; }
.viewer-brand img { width: 30px; height: 30px; border-radius: 50%; }

.envelope { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; cursor: pointer; background: inherit; border: 0; padding: 0; font: inherit; color: inherit; }
.env { position: relative; width: 78%; aspect-ratio: 3 / 2; perspective: 900px; }
.env .body { position: absolute; inset: 0; border-radius: 10px; background: linear-gradient(160deg, #e9a25c, #d27f34); box-shadow: 0 18px 30px -12px rgba(74,52,38,.5); }
.env .body::before { content: ""; position: absolute; inset: 0; border-radius: 10px; background: linear-gradient(to top right, transparent 49.5%, rgba(0,0,0,.08) 50%) left / 50% 100% no-repeat, linear-gradient(to top left, transparent 49.5%, rgba(0,0,0,.08) 50%) right / 50% 100% no-repeat; }
.env .flap { position: absolute; left: 0; right: 0; top: 0; height: 62%; transform-origin: 50% 0; background: #c46f27; clip-path: polygon(0 0, 100% 0, 50% 100%); transition: transform .7s ease; z-index: 2; }
.env .seal { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); z-index: 3; width: 22%; aspect-ratio: 1; border-radius: 50%; background: url("../assets/brand/logo-2.webp") center / cover; border: 4px solid #8f3f0d; transition: opacity .3s; }
.env .to { position: absolute; left: 0; right: 0; bottom: 10%; text-align: center; z-index: 3; font: 400 clamp(22px, 5vw, 30px) var(--hand); color: #fff7ec; }
.envelope .hint { position: absolute; bottom: 9%; left: 0; right: 0; text-align: center; font-family: var(--display); font-weight: 600; color: #7a5a44; animation: breathe 1.4s ease-in-out infinite alternate; }
@keyframes breathe { to { opacity: .45; transform: translateY(-3px); } }
.envelope.open .flap { transform: rotateX(180deg); }
.envelope.open .seal { opacity: 0; }
.envelope.gone { animation: envOut .6s ease forwards; pointer-events: none; }
@keyframes envOut { to { opacity: 0; transform: translateY(30%) scale(.9); } }

@media (max-width: 860px) {
  .greet-builder { grid-template-columns: 1fr; }
  .greet-preview { position: relative; top: 0; max-width: 420px; width: 100%; margin: 0 auto; order: -1; }
}

/* Ticket doré et série complète */
.machine-top h2 { margin-right: auto; }
.ticket-chip { border-color: #e8b83a; color: #ffe39a; }
.btn-gold { background: linear-gradient(180deg, #ffe07a, #e8b83a); color: #3a2603; box-shadow: 0 6px 0 #a87b12, 0 14px 30px -10px rgba(232,184,58,.7); }
.btn-gold:hover { background: linear-gradient(180deg, #fff0a8, #f0c64e); }
.btn.nudge { animation: nudge .6s cubic-bezier(.3,1.6,.5,1) 2; }
@keyframes nudge { 50% { transform: scale(1.08); } }
.full-set { margin-top: 6px; font-family: var(--display); font-weight: 700; color: #ffd54a; text-shadow: 0 0 18px rgba(255,213,74,.6); }
.slot.full .mbcard { box-shadow: 0 0 0 3px #e8b83a, 0 0 22px -2px rgba(255,213,74,.8); }
.slot.full::before { content: "★ FULL SET"; position: absolute; top: -9px; left: 50%; transform: translateX(-50%); z-index: 5; white-space: nowrap; background: #e8b83a; color: #3a2603; font: 700 11px var(--display); padding: 3px 9px; border-radius: 999px; }

/* Progression par rareté */
.rows { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: -4px 0 20px; }
.row-meter { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); transition: transform .15s, background .15s; }
.row-meter:hover { background: var(--surface-2); }
.row-meter[aria-pressed="true"] { background: var(--surface-2); border-color: var(--c); box-shadow: 0 0 0 2px var(--c); }
.row-meter .row-top { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.row-meter .row-top b { font-family: var(--display); font-weight: 600; color: var(--c); }
.row-meter .row-top span { font-weight: 800; font-variant-numeric: tabular-nums; }
.row-meter .progress-bar { height: 8px; position: relative; }
.row-meter .progress-bar .goal { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--text); opacity: .7; }
.row-meter .progress-bar i { background: var(--c); }
.row-meter small { display: block; margin-top: 6px; font-size: 12px; color: var(--text-faint); }
.row-meter.done { border-color: var(--c); box-shadow: 0 0 18px -6px var(--c); }
.row-meter.done small { color: var(--text); font-weight: 700; }
@media (max-width: 700px) { .rows { grid-template-columns: repeat(2, 1fr); } }

.dob { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.dob select { min-height: 48px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: 600 16px var(--body); }

/* Compteurs de garanties */
.chip.pity { font-size: 13px; padding: 5px 10px; }
.chip.pity b { color: var(--accent-2); }
#pity-glitch b { color: var(--r-glitch); }
.btn-gold small { font-family: var(--body); font-weight: 700; font-size: 13px; opacity: .8; }
.full-set { display: block; }

/* Watch & Spin */
.watch-dialog { width: min(380px, 100%); }
.watch-frame { position: relative; width: min(300px, 100%, calc((100vh - 220px) * 9 / 16)); aspect-ratio: 9 / 16; margin: 14px auto 16px; border-radius: 16px; overflow: hidden; background: #000; display: grid; place-items: center; }
.watch-frame iframe, .watch-frame #yt { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.watch-frame img { width: 80%; animation: bop .45s ease-in-out infinite alternate; }

/* Ouverture d'un paquet */
.reveal.pack { width: min(760px, 100%); }
.pack-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(8px, 2.4vw, 22px); width: 100%; max-width: min(640px, calc((100vh - 300px) / 1.464 * 3)); margin: 0 auto; perspective: 1400px; }
.pack-slot { position: relative; transition: transform .5s cubic-bezier(.3,1.5,.5,1); }
.pack-slot::after { content: ""; position: absolute; inset: -18%; z-index: -1; border-radius: 50%; background: radial-gradient(circle, var(--glow) 0%, transparent 65%); opacity: 0; transition: opacity .6s .3s; pointer-events: none; }
.pack-slot.open { transform: translateY(-6px); }
.pack-slot.open::after { opacity: .45; }
.pack-slot.golden:not(.open) { animation: shake 1.4s ease-in-out infinite; }
@keyframes shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-2.5deg); } 75% { transform: rotate(2.5deg); } }
.pack-list { list-style: none; margin: 4px 0 0; padding: 0; text-align: left; font-size: 15px; display: grid; gap: 6px; }
.pack-list li { padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.05); }
.pack-list .full-set { display: inline; margin-left: 6px; }

/* Pages Privacy / Terms */
.legal { max-width: 760px; padding: 40px 0 20px; }
.legal h1 { font-size: clamp(36px, 6vw, 52px); margin: 10px 0 12px; }
.legal .lede { font-size: 19px; color: var(--text-soft); margin-bottom: 18px; }
.legal h2 { font-size: 24px; margin: 30px 0 10px; }
.legal p, .legal li { color: var(--text-soft); }
.legal li { margin: 6px 0; }
.legal a { color: var(--accent-2); }

/* Junior Mode */
.linkish { display: block; margin: 14px auto 0; background: none; border: 0; padding: 6px; color: var(--accent-2); font: 700 14px var(--body); text-decoration: underline; cursor: pointer; }
.junior-list { list-style: none; padding: 0; margin: 14px 0 6px; text-align: left; display: grid; gap: 8px; font-size: 14px; color: var(--text-soft); }
.junior-list li { padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.05); }
.user-chip.junior .av { background: var(--slime); color: #12300a; }

/* Protection des dessins : pas de menu « appui long » sur iPhone / Android. */
.mbcard, .mbcard *, .mbcard-back, .greet-preview img, .stage img, .watch-frame img, .brand img {
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none;
}
.greet-preview img, .stage .cat { pointer-events: none; }

.confetti.soft i { top: auto; width: 9px; height: 9px; border-radius: 50%; opacity: 0; animation: sparkle 1.4s ease-out forwards; }
@keyframes sparkle { 0% { opacity: 0; transform: scale(.3); } 30% { opacity: 1; transform: scale(1.2); } 100% { opacity: 0; transform: scale(.6); } }
.watch-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.watch-links { display: flex; gap: 14px; justify-content: center; margin: -4px 0 14px; font-size: 14px; }
.watch-links a { color: var(--accent-2); }

.dialog h2 { padding: 0 34px; }

/* Cadeaux et parrainage */
.gifts { display: grid; gap: 10px; margin-top: 18px; }
.gift { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-color: #e8b83a; box-shadow: 0 0 24px -8px rgba(232,184,58,.6); }
.gift > div { flex: 1; display: grid; }
.gift-ico { font-size: 30px; animation: bop .6s ease-in-out infinite alternate; }
.invite { display: grid; grid-template-columns: 1fr auto; gap: 14px 24px; align-items: center; padding: 20px 22px; margin-bottom: 30px; }
.invite h2 { font-size: 22px; margin-bottom: 6px; }
.invite-link { display: flex; gap: 8px; min-width: 0; }
.invite-link input { flex: 1; min-width: 0; width: 260px; min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text-soft); font: 600 16px var(--body); }
.invite-stats { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 760px) { .invite { grid-template-columns: 1fr; } .invite-link input { width: auto; } }

/* Le bouton Google est une iframe : sans ceci, le thème sombre du site lui
   ajoute un fond blanc carré derrière sa forme arrondie. */
#gbtn { color-scheme: light; }
#gbtn iframe { color-scheme: light; background: transparent !important; }

/* Avatars : une carte du joueur dans un rond, anneau couleur de la rareté */
.ava { --s: 32px; --ring: var(--accent); position: relative; display: inline-block; flex: none; width: var(--s); height: var(--s); border-radius: 50%; overflow: hidden; background: #f4e9da; border: 3px solid var(--ring); }
.ava i { position: absolute; inset: 0; background-repeat: no-repeat; background-size: cover; background-position: center; }
.ava.r-common { --ring: var(--r-common); }
.ava.r-rare   { --ring: var(--r-rare); }
.ava.r-holo   { border-color: transparent; background: linear-gradient(#f4e9da, #f4e9da) padding-box, conic-gradient(#ff3fb0, #ffcf3f, #3fffa0, #3fbfff, #a43fff, #ff3fb0) border-box; }
.ava.r-glitch { --ring: var(--r-glitch); box-shadow: -2px 0 0 #ff2eb4, 2px 0 0 #35f0e6; }
.user-chip .ava { --s: 32px; border-width: 2px; }
.medal .medal-ava { width: 100%; height: 100%; border-width: 5px; box-shadow: 0 0 0 3px var(--bg), 0 0 0 7px var(--m, #e8b83a), 0 0 30px -4px var(--m, #e8b83a); }
.lb .nm { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lb .nm b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Album : aide « touche une carte » et bouton de partage */
.album-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.tap-hint { margin: 0; font-size: 14px; color: var(--text-soft); }
.slot .dots i.just { animation: dotJust .6s ease-in-out 6 alternate; }
@keyframes dotJust { from { transform: scale(1); box-shadow: none; } to { transform: scale(1.9); box-shadow: 0 0 10px 2px currentColor; } }
.slot .dots i.just.holo { color: var(--r-holo); } .slot .dots i.just.glitch { color: var(--r-glitch); }
.slot .dots i.just.rare { color: var(--r-rare); } .slot .dots i.just.common { color: var(--r-common); }
.slot-tip {
  position: absolute; left: 50%; bottom: calc(100% + 6px); z-index: 6; transform: translateX(-50%);
  white-space: nowrap; background: var(--accent); color: #2a1606; font: 700 13px var(--display);
  padding: 7px 12px; border-radius: 999px; box-shadow: 0 8px 20px -6px rgba(0,0,0,.6);
  animation: tipBob 1s ease-in-out infinite alternate; pointer-events: none;
}
.slot-tip::after { content: ""; position: absolute; left: 50%; top: 100%; margin-left: -7px; border: 7px solid transparent; border-top-color: var(--accent); }
@keyframes tipBob { from { transform: translate(-50%, 0); } to { transform: translate(-50%, -5px); } }

/* Album public (/album?u=…) */
.album-hero { display: flex; align-items: center; gap: 22px; padding: 24px; margin: 24px 0 28px; flex-wrap: wrap; }
.album-hero .hero-ava { border-width: 5px; }
.album-hero .hero-txt { flex: 1; min-width: 220px; }
.album-hero h1 { font-size: clamp(30px, 6vw, 46px); margin: 4px 0 10px; overflow-wrap: anywhere; }
.hero-stats, .hero-rows { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-rows { margin-top: 8px; }
.hero-rows .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin-right: 6px; vertical-align: 1px; }
a.chip { color: inherit; text-decoration: none; }
.album-cta { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 24px; margin-top: 36px; }
.album-cta h2 { font-size: 24px; margin-bottom: 4px; }
.podium .p.has-album { cursor: pointer; }
.lb .nm a { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.lb .nm a:hover b { text-decoration: underline; }

/* Carte manquante : aucun effet de rareté (avant, une Holo manquante brillait). */
.mbcard.missing .fx, .mbcard.missing .fx::before, .mbcard.missing .fx::after { display: none; }
.mbcard.missing .frame, .mbcard.missing .art i, .mbcard.missing .rar, .mbcard.missing .num, .mbcard.missing .title { animation: none; }
.mbcard.missing .art i::before, .mbcard.missing .art i::after { display: none; }
.mbcard.missing.r-glitch .frame { filter: grayscale(1) brightness(.42); }

/* Fiche d'une carte : les 4 petites cartes exactement de la même taille. */
.detail .versions button { display: block; width: 100%; min-width: 0; }
.detail .versions .mbcard { width: 100%; }

/* Album public : les compteurs par rareté sont des boutons de vue. */
.hero-rows button.chip { cursor: pointer; font: inherit; font-size: 14px; font-weight: 700; }
.hero-rows button.chip[aria-pressed="true"] { border-color: var(--c); box-shadow: 0 0 0 2px var(--c); color: var(--text); }

/* « Got a code? » replié sur téléphone : une ligne, ouverte au toucher. */
.code-open { display: none; }
.redeem.folded { padding: 0; }
.redeem.folded > :not(.code-open) { display: none; }
.redeem.folded .code-open {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 52px; padding: 0 18px;
  background: none; border: 0; color: var(--text); font: 600 16px var(--body); cursor: pointer; text-align: left;
}
.redeem.folded .code-open b { font-family: var(--display); font-weight: 600; font-size: 17px; }
.redeem.folded .code-open span { margin-left: auto; color: var(--accent); font-weight: 800; }
@media (max-width: 640px) {
  .redeem { padding: 14px 16px; }
  .redeem label { flex-basis: 100%; }
  .redeem input { flex: 1 1 0; min-width: 0; }
}

/* « Invite your friends » replié sur téléphone, comme les codes. */
.fold-open { display: none; }
.invite.folded { display: block; padding: 0; }
.invite.folded > :not(.fold-open) { display: none; }
.invite.folded .fold-open {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 52px; padding: 0 18px;
  background: none; border: 0; color: var(--text); font: 600 16px var(--body); cursor: pointer; text-align: left;
}
.invite.folded .fold-open b { font-family: var(--display); font-weight: 600; font-size: 17px; }
.invite.folded .fold-open span { margin-left: auto; color: var(--accent); font-weight: 800; }

/* Meatballs : pastille, fabrication dans la fiche, tableau d'explication */
.mb-chip { cursor: pointer; font: inherit; font-size: 14px; font-weight: 700; color: var(--text-soft); }
.mb-chip:hover { background: var(--surface-2); }
.detail .make { text-align: left; margin: 4px 0 14px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.detail .make-title { margin: 0 0 10px; font-weight: 700; font-size: 15px; display: flex; justify-content: space-between; gap: 8px; }
.detail .make-title span { color: var(--text-faint); font-weight: 600; font-size: 13px; }
.detail .make-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.detail .make-btns .btn .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin-right: 6px; }
.detail .make-btns .btn.confirm { background: var(--accent); color: #2a1606; border-color: var(--accent); }
.detail .make-btns .btn:disabled { opacity: .45; cursor: not-allowed; }
.mb-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 15px; }
.mb-table th { font-size: 12px; color: var(--text-faint); font-weight: 700; text-align: center; padding: 4px; }
.mb-table td { text-align: center; padding: 8px 4px; border-top: 1px solid var(--line); }
.mb-table td:first-child { text-align: left; }

/* Règles visibles : ligne 🧆 au-dessus de l'album, « How it works » en bas */
.mb-hint { display: block; width: 100%; margin: 0 0 12px; padding: 0; background: none; border: 0; text-align: left; color: var(--text-soft); font: 600 14px var(--body); cursor: pointer; }
.mb-hint u { color: var(--accent); }
.how { padding: 24px; margin-top: 36px; }
.how h2 { font-size: 26px; margin-bottom: 14px; }
.how-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 28px; }
.how-grid h3 { font-size: 18px; margin-bottom: 4px; }
.how-grid p { margin: 0; font-size: 15px; line-height: 1.5; }
@media (max-width: 700px) { .how-grid { grid-template-columns: 1fr; } }

/* « Support Meatball » (Buy Me a Coffee) : discret, jamais en Junior Mode */
.support-link { color: var(--accent); }
.support-box { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 24px; }
.support-box p { margin: 0; max-width: 60ch; }
.is-junior .support-link, .is-junior .support { display: none !important; }

/* Petit bouton-lien dans un texte (« How? ») */
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 800; color: var(--accent); text-decoration: underline; cursor: pointer; }

/* « Got a code? » sur ordinateur : le texte à gauche, le champ et le bouton côte à côte à droite */
@media (min-width: 641px) {
  .redeem { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 300px) auto; gap: 8px 12px; align-items: center; }
  .redeem label { margin: 0; }
  .redeem input { width: 100%; }
  .redeem .msg { grid-column: 1 / -1; min-height: 0; }
  .redeem .msg:empty { display: none; }
}

/* « Follow Meatball » : rappel de s'abonner (codes + prochaines collections) */
.follow-lede { margin: -8px 0 18px; font-size: 17px; color: var(--text-soft); max-width: 62ch; }
.follow-lede b { color: var(--text); }
.follow-row { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; flex-basis: 100%; grid-column: 1 / -1; padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--line); font-size: 14px; color: var(--text-soft); }
.follow-row b { color: var(--text); }
.follow-row .socials { gap: 8px; flex-wrap: nowrap; }
.follow-row .social { padding: 8px; }
.follow-row .social svg { width: 18px; height: 18px; }
/* Junior Mode : on ne pousse pas les moins de 13 ans à s'abonner aux réseaux sociaux. */
.is-junior .follow-row, .is-junior .follow-lede, .is-junior .community { display: none !important; }

/* Objectifs de la communauté (abonnés → récompenses pour tous) */
.community { padding: 18px 20px; margin-top: 22px; display: grid; gap: 12px; border-color: #e8b83a; }
.community[hidden] { display: none; }
.community-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.community-head h3 { margin: 0; }
.community-head span { color: var(--text-soft); font-weight: 700; }
.community-head span b { color: var(--text); font-size: 20px; }
.community-goals { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.community-goals li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.community-goals li.reached { border-color: #5ecb7a; }
.community-goals .ico { font-size: 26px; }
.community-goals div { display: grid; }
.community-goals small { color: var(--text-soft); font-size: 14px; }
.community p { margin: 0; font-size: 14px; }
.community p b { color: var(--text); }

/* Carte d'essai (visiteur sans compte) et aide à la connexion */
.reveal-text .keep-note { margin: 8px 0 0; font-size: 17px; color: var(--text); }
.reveal-text .keep-note b { color: var(--accent-2); }
.hint-box { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--text-soft); text-align: left; }
.hint-box b { color: var(--text); }
.btn-facebook { display: flex; width: 280px; max-width: 100%; margin: 8px auto 0; justify-content: center; gap: 10px; background: #1877f2; color: #fff; font-family: var(--body); font-weight: 700; font-size: 15px; min-height: 42px; padding: 0 16px; border-radius: 999px; text-decoration: none; }
.btn-facebook svg { width: 20px; height: 20px; fill: currentColor; }

/* Visiteur : « Spin a free card » et « Rules » côte à côte, la phrase en dessous sur toute la largeur */
#guest-note { flex-basis: 100%; text-align: center; }
#rules-btn { text-decoration: none; }
.pitch { margin: 6px 0 14px; max-width: 46ch; font-size: 17px; color: var(--text-soft); }
@media (max-width: 420px) {
  .machine-actions .btn-lg { padding: 0 20px; font-size: 18px; }
}

/* Fenêtre de connexion : « ou », puis le compte avec un pseudo */
.or-line { display: flex; align-items: center; gap: 12px; margin: 14px auto 12px; width: 280px; max-width: 100%; color: var(--text-soft); font-size: 13px; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-name { display: flex; width: 280px; max-width: 100%; margin: 0 auto; justify-content: center; min-height: 42px; font-family: var(--body); font-weight: 700; font-size: 15px; }
.field small { display: block; margin-top: 6px; }

/* Visiteur (pas connecté) : le tour gratuit d'abord, sans faire défiler sur un téléphone */
.visitor .themes, .visitor .countdown .chip:not(:first-child) { display: none; }
@media (max-width: 640px) {
  .visitor .col-head { padding: 18px 0 6px; gap: 10px; }
  .visitor .pitch { margin-bottom: 0; }
}

/* Golden ticket : un pack de 5 cartes sur une seule rangée */
.pack-row.wide { grid-template-columns: repeat(5, 1fr); max-width: min(760px, calc((100vh - 300px) / 1.464 * 5)); gap: clamp(5px, 1.6vw, 16px); }
.golden-note { flex-basis: 100%; margin: 6px 0 0; padding: 8px 12px; border-radius: 12px; background: rgba(255, 213, 74, .12); border: 1px solid rgba(255, 213, 74, .45); color: #ffe08a; font-size: 14px; }

/* Bandeau « Get the Meatball app » (PWA) et étapes iPhone */
.install-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 18px 0; position: relative; }
.install-bar img { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.install-bar div { flex: 1; min-width: 0; }
.install-bar b { display: block; font-family: var(--display); font-size: 17px; }
.install-bar small { display: block; color: var(--text-faint); font-size: 13px; }
.install-bar .btn { flex: none; min-height: 40px; padding: 0 18px; }
.install-bar .close { position: static; flex: none; background: none; border: 0; color: var(--text-faint); font-size: 22px; line-height: 1; padding: 4px; cursor: pointer; }
.install-steps { text-align: left; margin: 14px 0 12px; padding-left: 22px; }
.install-steps li { margin-bottom: 10px; }
@media (max-width: 420px) {
  .install-bar { gap: 10px; padding: 10px 10px 10px 12px; }
  .install-bar img { width: 42px; height: 42px; }
  .install-bar b { font-size: 15px; line-height: 1.25; }
  .install-bar small { font-size: 12px; }
  .install-bar .btn { padding: 0 14px; }
}

/* Amis (21 oct.) : la boîte « Battle your friends » et le bandeau « X just passed you! » */
.friends-box { padding: 22px; margin-top: 18px; }
.friends-box h2 { font-size: 24px; margin-bottom: 6px; }
.friend-code, .friend-add { display: flex; align-items: center; gap: 10px; }
.friend-code { justify-content: space-between; margin: 16px 0 12px; }
.friend-code span { display: block; color: var(--text-faint); font-size: 13px; }
.friend-code b { font-family: var(--display); font-size: 26px; letter-spacing: .08em; color: var(--accent); line-height: 1.1; }
.friend-code .btn, .friend-add .btn { flex: none; min-width: 132px; }
.friend-add input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .08em; font: inherit; font-weight: 700; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.rival-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 18px 0; border-color: rgba(255, 84, 104, .6); box-shadow: 0 0 22px -8px rgba(255, 84, 104, .8); }
.rival-bar .rival-emoji { font-size: 34px; flex: none; }
.rival-bar div { flex: 1; min-width: 0; }
.rival-bar b { display: block; font-family: var(--display); font-size: 18px; }
.rival-bar small { display: block; color: var(--text-faint); font-size: 13px; }
.rival-bar .btn { flex: none; min-height: 40px; padding: 0 16px; }
.rival-bar .close { position: static; flex: none; background: none; border: 0; color: var(--text-faint); font-size: 22px; line-height: 1; padding: 4px; cursor: pointer; }
@media (max-width: 420px) { .rival-bar { gap: 10px; padding: 10px; } .rival-bar .rival-emoji { font-size: 28px; } .rival-bar b { font-size: 16px; } }
.cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-friend:not(:empty) { margin-top: 14px; }

/* Téléphones (21 oct.) : boutons côte à côte plutôt que les uns sous les autres. */
@media (max-width: 420px) {
  .themes .theme-tab { padding: 7px 11px; gap: 6px; font-size: 14px; }
  .lb li { grid-template-columns: 34px 1fr auto; gap: 10px; padding: 10px; }
  .lb .cards { display: none; }
  .wide-only { display: none; }
  .friend-code .btn, .friend-add .btn { min-width: 118px; }
}
@media (max-width: 360px) {
  .themes { gap: 6px; }
  .themes .theme-tab { padding: 6px 7px; gap: 4px; font-size: 13px; }
  .filters .chip { padding-left: 10px; padding-right: 10px; }
  .filters .filters-share { padding: 0 12px; }
}

/* Album d'un joueur sur téléphone (21 oct.) : l'avatar à côté du pseudo, les compteurs en
   4 tuiles égales, les 4 raretés en grille 2 × 2, le bouton ami sur toute la largeur. */
@media (max-width: 560px) {
  .album-hero { padding: 18px; margin: 16px 0 22px; }
  /* la grille seulement quand l'album est là (pas pendant « Loading… » ni « Album not found ») */
  .album-hero:has(> .hero-ava) { display: grid; grid-template-columns: 72px 1fr; column-gap: 14px; row-gap: 0; align-items: center; }
  .album-hero:has(> .hero-ava) .hero-txt { display: contents; }
  .album-hero .hero-ava { grid-row: 1 / span 2; width: 72px !important; height: 72px !important; border-width: 4px; }
  .album-hero:has(> .hero-ava) .eyebrow { grid-column: 2; align-self: end; font-size: 12px; }
  .album-hero:has(> .hero-ava) h1 { grid-column: 2; align-self: start; font-size: 28px; margin: 2px 0 0; line-height: 1.1; }
  .album-hero .hero-stats, .album-hero .hero-rows, .album-hero .hero-friend { grid-column: 1 / -1; }
  .hero-stats { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin-top: 16px; }
  .hero-stats .chip { flex-direction: column; justify-content: center; gap: 2px; padding: 10px 4px; border-radius: 14px; font-size: 12px; text-align: center; line-height: 1.2; }
  .hero-stats .chip b { font-size: 17px; color: var(--text); }
  .hero-rows { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 10px; }
  .hero-rows .chip { justify-content: center; min-width: 0; white-space: nowrap; }
  .album-hero .hero-friend:not(:empty) { margin-top: 12px; }
  .hero-friend .btn, .hero-friend .chip { width: 100%; justify-content: center; }
}
@media (max-width: 360px) {
  .hero-rows button.chip { padding: 6px 8px; font-size: 13px; }
  .hero-stats .chip b { font-size: 15px; }
}
