/* Composants. N'utiliser que les variables de theme.css.
   Direction : carnet analogique (papier grainé, scotch, encre épaisse) + stickers cartoon,
   asymétrie volontaire (légères rotations), ombres dures décalées, états actifs "gélatine". */
* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  font-family: var(--font-body); color: var(--on-bg); overflow: hidden;
  background: var(--bg-texture), linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 58%, var(--bg-3) 118%);
  -webkit-tap-highlight-color: transparent; user-select: none;
}
/* Grain d'impression par-dessus tout le décor (effet risographie) */
body::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 3; background: var(--grain); opacity: .14; mix-blend-mode: multiply; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.ico { width: 1.25em; height: 1.25em; vertical-align: -0.22em; }
.muted { color: var(--ink-2); } .small { font-size: .85em; } .center { text-align: center; }
.h-display { font-family: var(--font-display); font-weight: 400; letter-spacing: .01em; line-height: 1.05; }
.hand { font-family: var(--font-hand); font-size: 1.35em; line-height: 1; color: var(--cord-1); }
.label { font-size: .68rem; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
mark { background: linear-gradient(100deg, transparent 2%, var(--mark) 4% 94%, transparent 97%) 0 70% / 100% 55% no-repeat; color: inherit; padding: 0 .15em; animation: hlSweep .8s var(--ease) both; }

/* Stickers : contour blanc découpé + ombre dure (fonctionne sur n'importe quel SVG ou bloc) */
.stk { filter: drop-shadow(2.5px 0 0 var(--sticker)) drop-shadow(-2.5px 0 0 var(--sticker)) drop-shadow(0 2.5px 0 var(--sticker)) drop-shadow(0 -2.5px 0 var(--sticker)) drop-shadow(3px 4px 0 var(--ink)); }
.stk-s { filter: drop-shadow(1.2px 0 0 var(--sticker)) drop-shadow(-1.2px 0 0 var(--sticker)) drop-shadow(0 1.2px 0 var(--sticker)) drop-shadow(0 -1.2px 0 var(--sticker)) drop-shadow(1.5px 2px 0 var(--ink)); }
.wobble { animation: wobble 3.2s ease-in-out infinite; }

/* ---------- Décor du ciel ---------- */
#app { display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr); height: 100%; position: relative; z-index: 1; }
.sky { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.sky::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 45%; background: var(--halftone);
  -webkit-mask-image: linear-gradient(transparent, #000 80%); mask-image: linear-gradient(transparent, #000 80%); opacity: .7; }
.sky-hills { position: absolute; left: 0; right: 0; bottom: 56px; width: 100%; height: 110px; }
.sky .cloud { position: absolute; width: 120px; opacity: .9; animation: drift 38s linear infinite; }
.sky .cloud.c1 { top: 16%; left: -140px; }
.sky .cloud.c2 { top: 38%; left: -140px; width: 86px; animation-duration: 52s; animation-delay: -20s; }
.sky .comet-mini { position: absolute; top: 58%; left: 3%; width: 90px; transform: rotate(18deg); animation: floaty 4s ease-in-out infinite; }
body.is-pip .sky .cloud, body.is-pip .sky .comet-mini { display: none; }

/* Ciel vivant (js/sky.js) : 4 périodes selon l'heure de Paris, fondu entre 2 ciels, lune, soleil, effet de profondeur.
   Les couches débordent de 14 px pour que l'effet de profondeur ne découvre jamais un bord. */
.sky-bg, .sky-stars, .sky-astro, .sky-clouds, .sky-hills-wrap { position: absolute; inset: -14px; will-change: transform; }
.sky-hills-wrap .sky-hills { bottom: 70px; }
.sky-bg { transition: opacity 60s linear; }
.sky-bg.is-next { opacity: 0; }
.sky-bg[data-p="dawn"] { background: linear-gradient(180deg, #7d6bb8 0%, #f4a3b4 50%, #ffd29a 100%); }
.sky-bg[data-p="day"] { background: linear-gradient(180deg, #4aa8ea 0%, #8fd0f5 60%, #d8f1ff 110%); }
.sky-bg[data-p="golden"] { background: linear-gradient(180deg, #33276f 0%, #9a4a8e 38%, #ff8a5c 72%, #ffc65c 108%); }
.sky-bg[data-p="night"] { background: linear-gradient(180deg, #0b0a26 0%, #1b1856 55%, #3a2a78 112%); }
.sky-stars { background: var(--bg-texture); opacity: 0; transition: opacity 3s; }
.sky-stars::after { content: ''; position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(circle, #fff 0 1.4px, transparent 2.2px) 40px 20px / 151px 97px, radial-gradient(circle, #ffe9a8 0 1.2px, transparent 2px) 90px 60px / 173px 131px; }
body.sky-night .sky-stars, body.sky-golden .sky-stars { opacity: 1; }
body.sky-dawn .sky-stars { opacity: .3; }
body.sky-night .sky-stars::after { animation: twinkle 2.8s ease-in-out infinite alternate; }
.sky-moon { position: absolute; top: 10%; right: 12%; width: 54px; opacity: 0; transform: rotate(-12deg); transition: opacity 3s; }
body.sky-night .sky-moon { opacity: 1; }
.sky-sun { position: absolute; left: 16%; bottom: 150px; width: 110px; opacity: 0; transform: translateY(50px); transition: opacity 3s, transform 3s; }
body.sky-dawn .sky-sun { opacity: 1; transform: none; }
body.sky-day .sky-sun { opacity: 1; transform: none; left: auto; right: 9%; bottom: auto; top: 9%; width: 78px; }
body.sky-day .cloud path:first-of-type { fill: #fff; }
body.sky-night .cloud { opacity: .45; }
body.sky-day .sky-hills path:nth-of-type(1) { fill: #4f86c9; }
body.sky-day .sky-hills path:nth-of-type(2) { fill: #2f5f9e; }
body.sky-day .sky-hills ellipse { fill: #bfe9ff; }
body.sky-dawn .sky-hills path:nth-of-type(1) { fill: #8a6bb5; }
body.sky-dawn .sky-hills path:nth-of-type(2) { fill: #5b4790; }
body.sky-dawn .sky-hills ellipse { fill: #ffc0b0; }
body.sky-night .sky-hills ellipse { fill: #6a7fd6; }
body.sky-light .sky::before { opacity: .25; }
/* En journée, les petits textes posés sur le ciel gardent un contour d'encre pour rester lisibles */
body.sky-light .kicker, body.sky-light .ach-group h3, body.sky-light .frames-count { text-shadow: 1.5px 1.5px 0 var(--ink), -1px -1px 0 var(--ink), 1px -1px 0 var(--ink), -1px 1px 0 var(--ink); }
@keyframes twinkle { from { opacity: .15; } to { opacity: .95; } }

/* ---------- Coquille ---------- */
#top { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 14px 18px 4px; }
.title-wrap { position: relative; min-width: 0; }
.kicker { display: block; font-family: var(--font-hand); font-size: 1.25rem; color: var(--sun); transform: rotate(-3deg) translateX(4px); margin-bottom: -2px; }
.view-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.8rem, 7vw, 2.6rem); line-height: 1; position: relative;
  color: var(--on-bg); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 3px 4px 0 var(--ink); animation: titleIn .5s var(--spring) both; }
.underline { position: absolute; left: -4px; bottom: -10px; width: calc(100% + 8px); height: 14px; z-index: -1; }
.top-right { display: flex; gap: 10px; align-items: center; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--on-bg); background: #ffffff18; border: 2px dashed #ffffff55; transition: transform .25s var(--jelly); }
.icon-btn:active { transform: scale(.85) rotate(-10deg); }
.balance { display: flex; align-items: center; gap: 6px; padding: 6px 14px 6px 10px; border-radius: var(--radius-sm); border: var(--border);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow); transform: rotate(2deg);
  font-family: var(--font-display); font-size: 1.15rem; font-variant-numeric: tabular-nums; position: relative; }
.balance.is-earning::after { content: '+ en vocal'; position: absolute; right: -4px; bottom: -20px; font-family: var(--font-hand); font-size: 1rem; color: var(--sun); transform: rotate(-4deg); white-space: nowrap; animation: floaty 2s ease-in-out infinite; }
.balance.bump { animation: bump .45s var(--jelly); }
#view { overflow-y: auto; overflow-x: hidden; padding: 18px 18px 30px; scroll-behavior: smooth; }
.view { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; max-width: 760px; margin: 0 auto; animation: viewIn .4s var(--ease); }

/* Barre d'onglets : bande de papier kraft scotchée, onglet actif = blob jaune qui respire */
#nav { position: relative; display: flex; justify-content: space-around; padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  background: var(--fibers), var(--kraft); border-top: var(--border); box-shadow: 0 -4px 0 #0003; }
#nav::before, #nav::after { content: ''; position: absolute; top: -12px; width: 64px; height: 20px; background: var(--tape-1); transform: rotate(-4deg); }
#nav::before { left: 12%; } #nav::after { right: 14%; background: var(--tape-2); transform: rotate(3deg); }
.nav-btn { position: relative; min-width: 0; display: grid; justify-items: center; gap: 1px; padding: 6px 6px; color: var(--ink); opacity: .72;
  font-family: var(--font-body); font-weight: 900; font-size: .74rem; white-space: nowrap; transition: transform .35s var(--jelly), opacity .2s; }
.nav-btn .ico { width: 1.55em; height: 1.55em; position: relative; z-index: 1; transition: transform .35s var(--jelly); }
.nav-btn span { position: relative; z-index: 1; }
.nav-btn:active { transform: scale(.88, 1.08); }
.nav-btn.is-active { opacity: 1; transform: translateY(-6px); }
.nav-btn.is-active .ico { transform: rotate(-8deg) scale(1.15); }
.nav-btn.is-active::before { content: ''; position: absolute; z-index: 0; left: 50%; top: 50%; width: 64px; height: 50px; margin: -27px 0 0 -32px;
  background: var(--sun); border: var(--border); box-shadow: 3px 3px 0 var(--ink); animation: blob 4s ease-in-out infinite, blobIn .45s var(--jelly); }
.nav-btn .dot { position: absolute; z-index: 2; top: 0; right: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--ink); animation: pulseDot 1.2s infinite; }
body.is-wide .nav-btn { font-size: .82rem; padding: 6px 14px; }
@media (max-width: 380px) { .nav-btn { font-size: .66rem; padding: 6px 2px; } .nav-btn.is-active::before { width: 54px; margin-left: -27px; } }

/* ---------- Papier, scotch, boutons ---------- */
.card { border-radius: var(--radius); padding: 22px 20px 18px; position: relative; }
.paper { background: var(--grain-paper), repeating-linear-gradient(transparent 0 29px, var(--surface-line) 29px 31px) 0 14px, var(--surface);
  color: var(--ink); border: var(--border); box-shadow: var(--shadow); animation: cardIn .5s var(--spring) both; transform: rotate(var(--tilt, -.6deg)); }
.view > .paper:nth-child(2n) { --tilt: .7deg; }
.view > .paper:nth-child(3n) { --tilt: -.3deg; }
/* Morceau de scotch washi en haut de chaque carte, à un angle différent */
.paper::before { content: ''; position: absolute; top: -13px; left: var(--tape-x, 28px); width: 86px; height: 24px; z-index: 2;
  background: repeating-linear-gradient(90deg, #ffffff30 0 6px, transparent 6px 12px), var(--tape-c, var(--tape-1));
  transform: rotate(var(--tape-r, -5deg)); clip-path: polygon(3% 0, 97% 4%, 100% 50%, 97% 100%, 2% 96%, 0 50%); }
.view > .paper:nth-child(2n)::before { --tape-x: auto; right: 34px; --tape-c: var(--tape-2); --tape-r: 4deg; }
.view > .paper:nth-child(3n)::before { --tape-c: var(--tape-3); --tape-r: -2deg; --tape-x: 45%; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: var(--radius-sm); border: var(--border);
  background: var(--accent); color: var(--accent-ink); font-weight: 900; letter-spacing: .02em; box-shadow: var(--shadow);
  transition: transform .3s var(--jelly), box-shadow .15s; }
.btn:hover { transform: rotate(-1.5deg) scale(1.03); }
.btn:active { transform: translate(3px, 4px) scale(1.04, .94); box-shadow: var(--shadow-press); transition-duration: .08s; }
.btn:disabled { background: var(--surface-2); color: var(--ink-2); box-shadow: 2px 3px 0 var(--ink-2); border-color: var(--ink-2); cursor: default; transform: none; }
.btn.is-busy { animation: jelly .6s infinite; }
.btn-ghost { background: var(--surface); color: var(--ink); }
.btn-big { font-family: var(--font-display); font-weight: 400; font-size: 1.2rem; padding: 14px 26px; }
.btn.glow { background: var(--sun); animation: jellyIdle 1.8s ease-in-out infinite; }
.chip { display: inline-block; font-size: .68rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; padding: 4px 10px;
  border-radius: 6px; color: var(--ink); border: 2px solid var(--ink); transform: rotate(-3deg); box-shadow: 2px 2px 0 var(--ink); }
.chip-common { background: var(--r-common); } .chip-rare { background: var(--r-rare); } .chip-epic { background: var(--r-epic); }
.chip-legendary { background: linear-gradient(90deg, var(--accent-2), var(--accent-3), var(--r-legendary), var(--accent-2)); background-size: 200%; animation: shine 2s linear infinite; }
/* Sceau japonais (hanko) tamponné de travers */
.stamp { position: absolute; right: 22px; top: 18px; transform: rotate(-9deg); background: var(--bad); color: #fff; border: 3px solid var(--ink);
  padding: 6px 12px; border-radius: 8px; font-family: var(--font-display); font-size: .95rem; letter-spacing: .08em; box-shadow: 3px 3px 0 var(--ink);
  animation: stampIn .45s var(--spring) both; mix-blend-mode: normal; }
.stamp-tl { position: absolute; top: -16px; right: 18px; left: auto; z-index: 3; }
/* Barre de progression = cordelette tressée encrée, avec une perle au bout */
.progress { height: 18px; border: var(--border); border-radius: 999px; background: var(--surface-2); position: relative; box-shadow: inset 0 3px 0 #0001; }
.progress i { display: block; height: 100%; border-radius: 999px; position: relative; min-width: 14px;
  background: repeating-linear-gradient(-55deg, var(--cord-1) 0 6px, var(--cord-2) 6px 12px, var(--cord-3) 12px 15px, var(--cord-1) 15px 21px);
  background-size: 42px 100%; box-shadow: inset 0 -3px 0 #0003, inset 0 2px 0 #fff6; transition: width .6s var(--ease); animation: cordFlow 1.4s linear infinite; }
.progress i::after { content: ''; position: absolute; right: -8px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%;
  background: var(--cord-1); border: 3px solid var(--ink); }

/* ---------- Missions ---------- */
.mission { display: grid; gap: 10px; padding-top: 26px; }
.mission-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.mission-num { font-family: var(--font-display); font-size: 3.2rem; line-height: .8; color: var(--ink); letter-spacing: -.02em; }
.mission-num small { font-family: var(--font-body); font-weight: 900; font-size: .8rem; letter-spacing: .2em; vertical-align: top; margin-right: 4px; }
.mission-meta { display: grid; gap: 6px; justify-items: start; }
.timer { font-size: .78rem; font-weight: 900; letter-spacing: .06em; color: var(--ink-2); }
.mission-title { font-size: 1.45rem; font-weight: 900; line-height: 1.2; }
.mission-note { justify-self: end; transform: rotate(-3deg); margin: -4px 6px -6px 0; }
.mission .stamp { right: 84px; top: 26px; }
.mission-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.reward { display: flex; align-items: center; gap: 6px; font-family: var(--font-display); font-size: 1.15rem; }
.reward small { font-family: var(--font-body); font-weight: 900; font-size: .72rem; letter-spacing: .1em; color: var(--ink-2); }
.mission .peek { position: absolute; width: 92px; right: 26px; bottom: -48px; transform: rotate(14deg); z-index: 3; animation: floaty 3.4s ease-in-out infinite; }
.mission .phone-stk.peek { width: 58px; bottom: -64px; }
.mission.rarity-legendary { box-shadow: var(--shadow), 0 0 0 6px var(--r-legendary); }
.mission.rarity-epic { box-shadow: var(--shadow), 0 0 0 5px var(--r-epic); }
.mission.flip-in { animation: flipIn .6s var(--spring) both; }
.mission.page-out { animation: pageOut .3s var(--ease) both; }
.slots { list-style: none; padding: 0; display: grid; gap: 8px; }
.slot { display: grid; grid-template-columns: 70px 1fr auto; gap: 10px; align-items: center; font-weight: 900; font-size: .9rem; }
.slot .bar { height: 14px; border-radius: 99px; background: var(--surface-2); border: 2.5px solid var(--ink); overflow: hidden; }
.slot .bar i { display: block; height: 100%; background: repeating-linear-gradient(-55deg, var(--cord-1) 0 6px, var(--cord-2) 6px 12px, var(--cord-3) 12px 15px, var(--cord-1) 15px 21px); background-size: 42px 100%; }
.slot.is-done { color: var(--good); }
.progress-label { font-weight: 900; } .progress-label b { font-family: var(--font-display); font-weight: 400; font-size: 1.4rem; }
.ritual { text-align: center; display: grid; gap: 12px; justify-items: center; padding-top: 34px; }
.ritual .big-q { font-family: var(--font-display); font-size: clamp(1.6rem, 6vw, 2.2rem); line-height: 1.05; }
.ritual .peek { position: absolute; width: 110px; left: -26px; top: -46px; transform: rotate(-12deg); animation: floaty 3s ease-in-out infinite; }
.ritual .hand-side { position: absolute; right: 20px; top: 20px; transform: rotate(8deg); }
.braid { width: 250px; max-width: 80vw; height: 100px; overflow: visible; }
.braid .strands { animation: braidFlow 2.4s linear infinite; }
.braid.is-braiding .strands { animation-duration: .28s; }
.braid.is-braiding { animation: csShake .12s infinite; }
.braid .knot { transform-origin: 120px 48px; transform: scale(0); transition: transform .45s var(--jelly); }
.braid.is-tied .knot { transform: scale(1.1); }

/* ---------- Sanctuaire ---------- */
.chest-stage { display: grid; justify-items: center; gap: 14px; padding-top: 6px; text-align: center; position: relative; }
.chest-stage .torii-stk { position: absolute; width: 96px; left: 4%; top: 30px; transform: rotate(-8deg); opacity: .95; }
.chest-stage .note-right { position: absolute; right: 6%; top: 70px; transform: rotate(7deg); color: var(--sun); display: grid; justify-items: center; }
.chest-stage .note-right .doodle-arrow { width: 54px; transform: scaleX(-1) rotate(30deg); }
.rarity-stars { display: flex; gap: 10px; }
.rarity-stars i { width: 30px; height: 30px; background: var(--on-bg-2); opacity: .35; border: 0;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); transition: .35s var(--jelly); }
.rarity-stars i.on { background: var(--sun); opacity: 1; transform: scale(1.35) rotate(12deg); }
.chest-btn { width: min(76vw, 290px); transition: transform .3s var(--jelly); }
.chest-btn:active { transform: scale(1.06, .92); }
.big-chest { width: 100%; overflow: visible; }
.big-chest .chest-lid { transform-origin: 30px 84px; transition: transform .55s var(--jelly); }
.big-chest .chest-glow { opacity: 0; transition: opacity .4s; }
.big-chest.is-closed { animation: breathe 2.6s ease-in-out infinite; transform-origin: 50% 100%; }
.big-chest.is-closed .chest-lid { animation: lidPeek 3s infinite; }
.big-chest.is-charging { animation: csShake .1s infinite; }
.big-chest.is-open .chest-lid { transform: rotate(-38deg) translateY(-18px); animation: none; }
.big-chest.is-open .chest-glow { opacity: .8; animation: glowPulse 1.2s infinite; }
.big-chest.rarity-epic .chest-glow circle { fill: var(--r-epic); } .big-chest.rarity-legendary .chest-glow circle { fill: var(--r-legendary); }
.prize { font-family: var(--font-display); font-size: 3rem; display: flex; align-items: center; gap: 10px; color: var(--on-bg);
  -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 3px 4px 0 var(--ink); animation: popIn .5s var(--jelly); }
.prize.rarity-legendary { color: var(--r-legendary); }
.hint { background: var(--surface); color: var(--ink); border: var(--border); box-shadow: var(--shadow); padding: 8px 16px; border-radius: var(--radius-sm);
  font-weight: 900; transform: rotate(-1.5deg); max-width: 340px; }

/* ---------- Boutique ---------- */
.item { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: start; }
.item .stamp-tl { right: 104px; }
.item .item-art { grid-column: 2; grid-row: 1 / span 2; width: 74px; transform: rotate(var(--art-r, 8deg)); margin-top: -4px; transition: transform .4s var(--jelly); }
.item:hover .item-art { transform: rotate(-4deg) scale(1.08); }
.item h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.45rem; }
.item footer { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 10px; flex-wrap: wrap; }
.price { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 1.9rem; letter-spacing: -.01em; }
.item.is-featured { --tilt: -1.4deg; background: var(--grain-paper), var(--surface); }
.item:nth-child(2n) .item-art { --art-r: -9deg; }
.item .item-art .comet-stk { width: 118px; margin-left: -44px; }

/* ---------- Classement ---------- */
.seg { display: inline-flex; border: var(--border); border-radius: 999px; overflow: hidden; margin-bottom: 8px; box-shadow: 3px 3px 0 var(--ink); background: var(--surface); }
.seg-btn { padding: 7px 16px; font-weight: 900; font-size: .85rem; transition: background .2s; }
.seg-btn.is-on { background: var(--sun); }
.board { list-style: none; padding: 0; margin-top: 6px; }
.board-row { display: grid; grid-template-columns: 46px 46px 1fr auto; gap: 12px; align-items: center; padding: 9px 6px; border-bottom: 2px dashed var(--surface-line); animation: cardIn .35s var(--spring) both; position: relative; }
.board-row:nth-child(-n+10) { animation-delay: calc(var(--n, 0) * 40ms); }
.board-row.is-me { background: linear-gradient(100deg, transparent 1%, var(--mark) 3% 96%, transparent 99%); border-radius: 10px; }
.board-row .me-tag { position: absolute; right: 70px; top: -6px; transform: rotate(-6deg); font-size: 1.15rem; }
.rank { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: var(--border); font-weight: 900; font-size: .8rem; background: var(--surface-2); box-shadow: 2px 2px 0 var(--ink); }
.podium-1 .rank { background: var(--r-legendary); transform: rotate(-8deg) scale(1.1); } .podium-2 .rank { background: #e3e7ef; } .podium-3 .rank { background: #f0b07a; }
.podium-1 .rank::before { content: ''; position: absolute; width: 26px; height: 14px; margin-top: -40px; background: var(--sun); border: 2px solid var(--ink);
  clip-path: polygon(0 100%, 0 20%, 25% 60%, 50% 0, 75% 60%, 100% 20%, 100% 100%); }
.avatar { width: 42px; height: 42px; border-radius: 50%; border: var(--border); object-fit: cover; background: var(--surface-2); }
.avatar-lg { width: 104px; height: 104px; border-radius: 14px; transform: rotate(-4deg); box-shadow: var(--shadow); }
.name { font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score { font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; color: var(--ink); }
.me-rank { margin-top: 12px; text-align: center; font-weight: 900; }
.me-rank b { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; color: var(--cord-1); }

/* ---------- Ton nom (carte de membre) ---------- */
.member-card { position: relative; background: var(--grain-paper), var(--surface); color: var(--ink); border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow); animation: cardIn .5s var(--spring); transform: rotate(-.8deg); }
.member-card header { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; color: #fff; border-radius: 15px 19px 0 0;
  background: repeating-linear-gradient(-55deg, transparent 0 14px, #ffffff14 14px 20px), var(--chest); border-bottom: var(--border); }
.member-card header .h-display { font-size: 1.5rem; -webkit-text-stroke: 1px var(--ink); paint-order: stroke fill; text-shadow: 2px 2px 0 var(--ink); }
.member-card header small { font-family: var(--font-hand); font-size: 1.35rem; color: var(--sun); transform: rotate(-4deg); }
.member-body { display: grid; grid-template-columns: auto 1fr; gap: 20px; padding: 22px 18px 14px; align-items: center; }
.photo { position: relative; }
.photo::before { content: ''; position: absolute; z-index: 2; top: -10px; left: 50%; width: 64px; height: 20px; margin-left: -32px; background: var(--tape-3); transform: rotate(4deg); }
.member-body h2 { font-size: 1.9rem; }
.member-body .progress { margin: 10px 0 4px; }
.palm { display: inline-block; margin-top: 4px; font-family: var(--font-hand); font-size: 1.3rem; color: var(--cord-1); transform: rotate(-2deg); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; padding: 4px 18px 16px; }
.stats div { background: var(--surface-2); border: 2.5px solid var(--ink); border-radius: var(--radius-sm); padding: 10px 12px; box-shadow: 3px 3px 0 var(--ink); }
.stats div:nth-child(odd) { transform: rotate(-1deg); } .stats div:nth-child(even) { transform: rotate(1.2deg); }
.stats dt { font-size: .66rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.stats dd { font-family: var(--font-display); font-size: 1.6rem; margin: 0; }
.member-card footer { padding: 0 18px 16px; font-family: var(--font-hand); font-size: 1.15rem; color: var(--ink-2); }
.member-card .cord-stk { position: absolute; width: 70px; right: 90px; top: -34px; transform: rotate(-14deg); animation: floaty 3.6s ease-in-out infinite; }

/* ---------- Modales, toasts ---------- */
#layer { position: fixed; inset: 0; pointer-events: none; z-index: 20; }
/* Défile quand la fenêtre est plus haute que l'activité (Discord sur ordinateur peut être très bas) : centrée si elle tient, sinon lisible depuis le haut */
.modal-wrap { position: absolute; inset: 0; display: flex; overflow-y: auto; overscroll-behavior: contain; padding: 30px 16px 16px; background: #120e33b0; pointer-events: auto; animation: fadeIn .2s; }
.modal-wrap.out { animation: fadeOut .2s both; }
.modal { position: relative; margin: auto; flex: none; width: min(470px, 100%); background: var(--grain-paper), var(--surface); color: var(--ink); border: var(--border); border-radius: var(--radius); padding: 26px 22px 20px;
  display: grid; gap: 14px; box-shadow: 8px 10px 0 var(--ink); animation: sheetIn .45s var(--jelly); transform: rotate(-1deg); }
.modal::before { content: ''; position: absolute; top: -13px; left: 50%; width: 96px; height: 24px; margin-left: -48px; background: var(--tape-1); transform: rotate(-3deg); }
.modal h2 { font-size: 1.7rem; }
.row-end { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.login-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(56px, 1fr)); gap: 8px; }
.login-cell { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 10px; background: var(--surface-2); border: 2.5px solid var(--ink); font-weight: 900; }
.login-cell small { font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; }
.login-cell b { font-family: var(--font-display); font-weight: 400; }
.login-cell:nth-child(odd) { transform: rotate(-2deg); } .login-cell:nth-child(even) { transform: rotate(1.5deg); }
.login-cell.is-past { opacity: .45; } .login-cell.is-past::after { content: '✓'; font-weight: 900; color: var(--good); }
.login-cell.is-today { background: var(--sun); box-shadow: 3px 3px 0 var(--ink); animation: lgToday 1.4s infinite; }
#toasts { position: fixed; left: 50%; top: 12px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 30; pointer-events: none; width: min(420px, calc(100% - 32px)); }
.toast { background: var(--grain-paper), var(--surface); color: var(--ink); border: var(--border); border-radius: var(--radius-sm); padding: 10px 14px; font-weight: 900; box-shadow: var(--shadow); animation: toastIn .4s var(--jelly); transform: rotate(-1deg); }
.toast-good { background: var(--grain-paper), var(--mint); } .toast-error { background: var(--grain-paper), #ffb3ae; }
.toast.out { animation: toastOut .3s both; }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }

/* ---------- PiP ---------- */
#pip { position: fixed; inset: 0; padding: 10px 12px; display: grid; align-content: center; gap: 6px; z-index: 1; }
.pip-balance { display: flex; gap: 6px; align-items: center; font-family: var(--font-display); font-size: 1.3rem; -webkit-text-stroke: 1px var(--ink); paint-order: stroke fill; text-shadow: 2px 2px 0 var(--ink); }
.pip-title { font-weight: 900; font-size: .9rem; } .pip-meta { font-family: var(--font-hand); font-size: 1.05rem; color: var(--sun); }
#pip .progress { height: 10px; border-width: 2px; } #pip .progress i::after { display: none; }

/* ---------- Écran de lancement (intro) ---------- */
#splash { position: fixed; inset: 0; z-index: 4; overflow: hidden; display: grid; place-items: center; text-align: center;
  background: var(--bg-texture), linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 58%, var(--bg-3) 118%); }
#splash::after { content: ''; position: absolute; inset: 0; background: var(--grain); opacity: .35; mix-blend-mode: multiply; pointer-events: none; }
#splash.is-shaking .intro { animation: bigShake .4s cubic-bezier(.36, .07, .19, .97); }
#splash.is-out { animation: fadeOut .35s .25s both; }
.intro { position: absolute; inset: 0; }
.intro > * { position: absolute; }
.intro .halftone { left: 0; right: 0; bottom: 0; height: 50%; background: var(--halftone); -webkit-mask-image: linear-gradient(transparent, #000); mask-image: linear-gradient(transparent, #000); }
.intro .i-hills { left: 0; right: 0; bottom: 0; width: 100%; height: 22vh; transform: translateY(100%); }
.intro.p-intro .i-hills { animation: riseUp .7s var(--spring) both; }
.i-hills .sky-hills { position: static; display: block; width: 100%; height: 100%; }
.intro .i-star { opacity: 0; }
.intro.p-intro .i-star { animation: starPop .5s var(--jelly) both, twinkle 1.6s ease-in-out infinite; animation-delay: var(--d), calc(var(--d) + .5s); }
.intro .i-cloud { width: 22vmin; opacity: 0; }
.intro.p-intro .i-cloud.l { animation: slideL .9s var(--spring) both; } .intro.p-intro .i-cloud.r { animation: slideR .9s .1s var(--spring) both; }
.intro .i-comet { width: 46vmin; left: 50%; top: 40%; margin: -14vmin 0 0 -23vmin; opacity: 0; }
.intro.p-intro .i-comet { animation: cometSwoop 1.15s cubic-bezier(.55, 0, .3, 1) .12s both; }
.intro .i-flash { left: 50%; top: 40%; width: 10px; height: 10px; margin: -5px; border-radius: 50%; background: #fff; opacity: 0; }
.intro.p-split .i-flash { animation: flash .55s ease-out both; }
.intro .i-frag { width: 9vmin; left: 50%; top: 40%; margin: -4.5vmin; opacity: 0; }
.intro.p-split .i-frag.b { animation: fragL .7s var(--spring) both; } .intro.p-split .i-frag.p { animation: fragR .7s var(--spring) both; }
.intro .i-title { left: 0; right: 0; top: 50%; margin-top: -11vmin; display: grid; justify-items: center; gap: 0; }
.i-word { display: flex; gap: .02em; font-family: var(--font-display); font-size: clamp(3rem, 15vmin, 8.5rem); line-height: .9; }
.i-word span { display: inline-block; opacity: 0; color: var(--on-bg); -webkit-text-stroke: .045em var(--ink); paint-order: stroke fill; text-shadow: .05em .065em 0 var(--ink); }
.i-word.w2 span { color: var(--sun); }
.i-word span:nth-child(odd) { --r: -7deg; } .i-word span:nth-child(even) { --r: 6deg; }
.intro.p-title .i-word span { animation: stomp .5s var(--jelly) both, letterBob 2.4s ease-in-out infinite; animation-delay: var(--d), calc(var(--d) + .6s); }
.i-hanko { position: relative; margin-top: 2vmin; padding: .35em .5em; background: var(--bad); color: #fff; border: 3px solid var(--ink); border-radius: 8px;
  font-size: clamp(.9rem, 3.4vmin, 1.4rem); font-weight: 900; letter-spacing: .1em; box-shadow: 3px 3px 0 var(--ink); opacity: 0; }
.intro.p-finale .i-hanko { animation: hankoSlam .4s var(--jelly) .3s both; }
.i-sub { font-family: var(--font-hand); font-size: clamp(1.3rem, 5vmin, 2.2rem); color: var(--sun); margin-top: 1vmin; clip-path: inset(0 100% 0 0); }
.intro.p-finale .i-sub { animation: writeIn .7s steps(18) .45s both; }
/* Le fil rouge passe derrière le titre et relie les 2 mots ; il se "dessine" de gauche à droite */
.intro .i-cord { left: 0; width: 100%; top: 50%; margin-top: -6vmin; height: 16vmin; overflow: visible; clip-path: inset(-20% 100% -20% 0); }
.intro.p-finale .i-cord { animation: drawCord .95s cubic-bezier(.6, 0, .3, 1) both; }
.intro .i-knot { left: 50%; top: 50%; width: 8vmin; height: 8vmin; margin: -2vmin 0 0 -4vmin; border-radius: 50%; z-index: 2; background: var(--cord-1); border: 4px solid var(--ink); transform: scale(0); }
.intro.p-knot .i-knot { animation: knotPop .45s var(--jelly) both, glowPulse 1s .45s infinite; }
.i-note { position: absolute; left: 0; right: 0; bottom: max(6vh, 30px); display: grid; justify-items: center; gap: 8px; z-index: 2; }
#splashMsg { font-family: var(--font-hand); font-size: 1.45rem; color: var(--on-bg); transform: rotate(-2deg); max-width: 440px; padding: 0 18px; text-shadow: 2px 2px 0 var(--ink); }
#splashMsg::after { content: ''; display: inline-block; width: 1.2em; text-align: left; animation: dots 1.2s steps(4) infinite; }
.sound-hint { font-weight: 900; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; background: var(--surface); color: var(--ink); border: var(--border);
  border-radius: 999px; padding: 6px 14px; box-shadow: 3px 3px 0 var(--ink); animation: jellyIdle 1.4s ease-in-out infinite; }
#splash:has(#splashActions:not([hidden])) .intro { opacity: .25; }
#splash.is-final #splashMsg::after { display: none; }
#splash:has(#splashActions:not([hidden])) #splashMsg::after { display: none; }
#splashActions { z-index: 2; }
/* Révélation : l'app s'ouvre en cercle depuis le nœud */
#app.is-revealing { z-index: 5; animation: iris .7s cubic-bezier(.7, 0, .2, 1) both; }

/* ---------- Animations ---------- */
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes titleIn { from { opacity: 0; transform: translateY(14px) rotate(-6deg) scale(.9); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(26px) rotate(-4deg) scale(.96); } }
@keyframes flipIn { from { opacity: 0; transform: perspective(800px) rotateY(80deg) scale(.85); } }
@keyframes pageOut { to { opacity: 0; transform: translate(-60px, 20px) rotate(-10deg); } }
@keyframes bump { 40% { transform: rotate(2deg) scale(1.22, .88); } 70% { transform: rotate(2deg) scale(.94, 1.06); } }
@keyframes glowPulse { 0% { box-shadow: 0 0 0 0 var(--sun); } 70% { box-shadow: 0 0 0 16px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes jelly { 25% { transform: scale(1.06, .94); } 50% { transform: scale(.96, 1.05); } 75% { transform: scale(1.02, .98); } }
@keyframes jellyIdle { 0%, 100% { transform: rotate(-1deg) scale(1); } 50% { transform: rotate(1deg) scale(1.04, .97); } }
@keyframes wobble { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes breathe { 0%, 100% { scale: 1 1; } 50% { scale: 1.03 .97; } }
@keyframes blob { 0%, 100% { border-radius: 58% 42% 50% 50% / 52% 60% 40% 48%; } 33% { border-radius: 44% 56% 38% 62% / 60% 44% 56% 40%; } 66% { border-radius: 52% 48% 62% 38% / 42% 52% 48% 58%; } }
@keyframes blobIn { from { scale: .2; rotate: -40deg; } }
@keyframes pulseDot { 50% { transform: scale(1.3); } }
@keyframes stampIn { from { opacity: 0; transform: rotate(-9deg) scale(2.4); } 70% { transform: rotate(-9deg) scale(.92); } }
@keyframes hlSweep { from { background-size: 0 55%; } }
@keyframes shine { to { background-position: 200% 0; } }
@keyframes lidPeek { 0%, 85%, 100% { transform: none; } 90% { transform: rotate(-7deg) translateY(-5px); } }
@keyframes csShake { 0% { transform: translate(-2px, 0) rotate(-1deg); } 100% { transform: translate(2px, -1px) rotate(1deg); } }
@keyframes popIn { from { opacity: 0; transform: scale(.3) rotate(-12deg); } }
@keyframes sheetIn { from { opacity: 0; transform: translateY(40px) rotate(4deg) scale(.9); } }
@keyframes fadeIn { from { opacity: 0; } } @keyframes fadeOut { to { opacity: 0; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-20px) rotate(4deg) scale(.8); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-12px) rotate(-3deg); } }
@keyframes lgToday { 50% { transform: translateY(-4px) rotate(2deg); } }
@keyframes cordFlow { to { background-position: 42px 0; } }
@keyframes braidFlow { to { transform: translateX(-60px); } }
@keyframes drift { to { transform: translateX(calc(100vw + 300px)); } }
/* Intro */
@keyframes bigShake { 0%, 100% { transform: none; } 20% { transform: translate(-12px, 6px) rotate(-1.5deg); } 40% { transform: translate(10px, -8px) rotate(1.2deg); } 60% { transform: translate(-6px, 4px); } 80% { transform: translate(4px, -2px); } }
@keyframes riseUp { to { transform: none; } }
@keyframes starPop { 0% { opacity: 0; transform: scale(0) rotate(-90deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes twinkle { 50% { scale: .8; } }
@keyframes slideL { from { opacity: 0; transform: translateX(-60vw); } to { opacity: .95; } }
@keyframes slideR { from { opacity: 0; transform: translateX(60vw); } to { opacity: .95; } }
@keyframes cometSwoop {
  0% { opacity: 1; transform: translate(-75vw, -55vh) rotate(-24deg) scale(.6); }
  55% { opacity: 1; transform: translate(0, 0) rotate(-8deg) scale(1.15); }
  62% { transform: translate(2vw, 1vh) rotate(-6deg) scale(1.3, .9); }
  100% { opacity: 1; transform: translate(85vw, 60vh) rotate(18deg) scale(.7); } }
@keyframes flash { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(220); } }
@keyframes fragL { 0% { opacity: 1; transform: scale(.3); } 100% { opacity: 1; transform: translate(-34vw, -18vh) rotate(-30deg) scale(1); } }
@keyframes fragR { 0% { opacity: 1; transform: scale(.3); } 100% { opacity: 1; transform: translate(32vw, -22vh) rotate(26deg) scale(1); } }
@keyframes stomp {
  0% { opacity: 0; transform: translateY(-60vh) rotate(calc(var(--r) * -3)) scale(1.6); }
  55% { opacity: 1; transform: translateY(0) rotate(var(--r)) scale(1.35, .62); }
  75% { transform: translateY(-4%) rotate(var(--r)) scale(.9, 1.12); }
  100% { opacity: 1; transform: rotate(var(--r)); } }
@keyframes letterBob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4%; } }
@keyframes hankoSlam { 0% { opacity: 0; transform: rotate(-8deg) scale(3); } 70% { opacity: 1; transform: rotate(-8deg) scale(.9); } 100% { opacity: 1; transform: rotate(-8deg); } }
@keyframes writeIn { to { clip-path: inset(0 0 0 0); } }
@keyframes drawCord { to { clip-path: inset(-20% 0 -20% 0); } }
@keyframes knotPop { 0% { transform: scale(0) rotate(-90deg); } 100% { transform: scale(1); } }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
@keyframes iris { from { clip-path: circle(0% at 50% 52%); } to { clip-path: circle(150% at 50% 52%); } }

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

/* =====================================================================
   v2 : flamme de série, pass, roue, coffres méga-boîte
   ===================================================================== */

/* ---------- En-tête : flamme + avatar ---------- */
.flame-pill { display: flex; align-items: center; gap: 2px; padding: 2px 10px 2px 6px; border-radius: var(--radius-sm); border: var(--border); background: var(--surface);
  color: var(--ink); box-shadow: 3px 3px 0 var(--ink); transform: rotate(-3deg); font-family: var(--font-display); font-size: 1.05rem; transition: transform .3s var(--jelly); }
.flame-pill:active { transform: rotate(-3deg) scale(.9, 1.1); }
.flame-pill.is-cold { background: var(--surface-2); }
.flame-pill.is-cold .flame-ico { filter: grayscale(.6); }
.me-btn { width: 42px; height: 42px; border-radius: 12px; border: var(--border); overflow: hidden; box-shadow: 3px 3px 0 var(--ink); transform: rotate(4deg); transition: transform .3s var(--jelly); background: var(--surface-2); }
.me-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.me-btn.is-active { outline: 4px solid var(--sun); transform: rotate(-4deg) scale(1.06); }
.flame-ico .flame-body { animation: flicker 1.1s ease-in-out infinite; }
.flame-ico.f-ember .flame-body { animation: none; }
.flame-ico.f-blaze .flame-body, .flame-ico.f-blue .flame-body, .flame-ico.f-comet .flame-body { animation-duration: .7s; }
@media (max-width: 460px) {
  #top { padding: 10px 12px 2px; flex-wrap: wrap-reverse; row-gap: 4px; }
  .title-wrap { flex: 1 1 100%; }
  .top-right { margin-left: auto; }
  .top-right { gap: 6px; }
  .balance { font-size: 1rem; padding: 5px 10px 5px 8px; }
  .me-btn { width: 36px; height: 36px; }
  .nav-btn:not(.is-active) span { display: none; }
  .nav-btn { padding: 10px 4px; }
}

/* ---------- Retrouvailles du jour : la flamme ---------- */
.login-flame { position: relative; justify-self: center; margin-top: -54px; width: 96px; height: 100px; display: grid; place-items: end center; }
.login-flame .flame-ico { width: 84px; height: 100px; }
.flame-count { position: absolute; right: -10px; bottom: 4px; min-width: 38px; padding: 2px 8px; border-radius: 10px; background: var(--sun); border: var(--border);
  box-shadow: 2px 2px 0 var(--ink); font-family: var(--font-display); font-size: 1.2rem; text-align: center; transform: rotate(6deg); }
.login-flame.is-growing .flame-ico { animation: flameGrow .7s var(--jelly); }
.login-flame.is-up .flame-ico { animation: flameUp .9s var(--jelly); }
.milestone { font-size: 1.3rem; }
.flame-ladder { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.flame-step { display: grid; justify-items: center; gap: 2px; padding: 8px 2px; border-radius: 10px; border: 2.5px solid var(--ink); background: var(--surface-2); text-align: center; }
.flame-step small { font-size: .62rem; font-weight: 900; line-height: 1.1; }
.flame-step b { font-family: var(--font-display); font-weight: 400; font-size: .9rem; }
.flame-step.is-me { background: var(--sun); box-shadow: 3px 3px 0 var(--ink); transform: rotate(-3deg) scale(1.06); }
.flame-step.is-locked { opacity: .5; }
.milestones { list-style: none; padding: 0; display: grid; gap: 6px; }
.milestones li { display: grid; grid-template-columns: 30px 70px 1fr; gap: 8px; align-items: center; font-weight: 900; padding: 4px 8px; border-radius: 8px; border: 2px dashed var(--surface-line); }
.milestones li.is-done { background: var(--mint); border-style: solid; border-color: var(--ink); }
@media (max-width: 460px) { .flame-ladder { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Probabilités (coffres, roue) ---------- */
.odds { margin-top: 6px; }
.odds summary { cursor: pointer; list-style: none; display: inline-block; padding: 3px 10px; border: 2px dashed var(--ink-2); border-radius: 8px; color: var(--ink-2); }
.odds summary::-webkit-details-marker { display: none; }
.odds[open] summary { background: var(--surface-2); }
.odds ul { list-style: none; padding: 0; margin: 8px 0 4px; display: grid; gap: 3px; font-size: .85rem; font-weight: 700; }
.odds li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; border-bottom: 1px dashed var(--surface-line); }
.odds li span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; border: 1.5px solid var(--ink); background: var(--r-common); vertical-align: 0; }
.odds li.r-rare span::before { background: var(--r-rare); } .odds li.r-epic span::before { background: var(--r-epic); } .odds li.r-legendary span::before { background: var(--r-legendary); }

/* ---------- Sanctuaire : 3 coffres ---------- */
.chest-shelf { position: relative; display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); align-items: start; padding-top: 10px; }
.chest-shelf > .torii-stk { position: absolute; width: 74px; left: -12px; bottom: -58px; transform: rotate(-8deg); z-index: 3; }
.chest-card { display: grid; justify-items: center; gap: 8px; text-align: center; padding-top: 30px; }
.chest-card h3 { font-size: 1.25rem; }
.chest-card.k-epic { --tilt: 1deg; } .chest-card.k-legendary { --tilt: -1.2deg; background: var(--grain-paper), linear-gradient(160deg, #fff6d6, var(--surface) 60%); }
.chest-card.k-legendary::after { content: ''; position: absolute; inset: -6px; border-radius: inherit; border: 3px dashed var(--r-legendary); pointer-events: none; animation: dashSpin 6s linear infinite; }
.chest-note { position: absolute; left: 14px; top: 10px; transform: rotate(-6deg); font-size: 1.15rem; display: flex; align-items: center; gap: 2px; }
.chest-note .doodle-arrow { width: 34px; transform: rotate(30deg); }
.chest-note.dim { color: var(--ink-2); }
.chest-pick { position: relative; width: min(64vw, 190px); transition: transform .35s var(--jelly); }
.chest-pick:hover { transform: translateY(-6px) rotate(-2deg); }
.chest-pick:active { transform: scale(1.08, .9); }
.chest-pick .big-chest { width: 100%; }
.chest-card.k-epic .big-chest.is-closed { animation-duration: 2s; }
.chest-card.k-legendary .big-chest.is-closed { animation: floatChest 2.2s ease-in-out infinite; }
.chest-foot { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.small-price { font-size: 1.3rem; }
/* Le petit chiffre façon méga-boîte : nombre de récompenses */
.drop-count { position: absolute; right: -4px; bottom: 6px; min-width: 40px; padding: 2px 8px; border-radius: 12px; background: var(--surface); color: var(--ink);
  border: var(--border); box-shadow: 3px 3px 0 var(--ink); font-family: var(--font-display); font-size: 1.15rem; transform: rotate(8deg); }
/* Variantes de coffre : couleurs reprises par le SVG via les variables */
.big-chest.k-epic { --chest: #7b3fd0; --chest-2: #a46cf5; --chest-band: #e9e4ff; --cord-1: #ff5fa8; --cord-3: #fff; --glow: #e7d2ff; }
.big-chest.k-legendary { --chest: #f0a216; --chest-2: #ffcf3f; --chest-band: #5cc8ff; --cord-1: #e8343a; --cord-3: #fff; --glow: #fff4c2; }
.mini-chest, .mini-art { display: inline-block; }
.mini-chest .big-chest, .mini-art svg { width: 100%; animation: none; }

/* ---------- Ouverture : la scène ---------- */
.open-stage { position: fixed; inset: 0; pointer-events: auto; display: grid; place-items: center; overflow: hidden; z-index: 25; cursor: pointer; animation: fadeIn .25s; }
.open-stage.out { animation: fadeOut .25s both; }
.os-bg { position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, #3b2c7acc, #0b0820f2 70%); }
.open-stage.k-epic .os-bg { background: radial-gradient(circle at 50% 45%, #7b3fd0dd, #12082af5 70%); }
.open-stage.k-legendary .os-bg { background: radial-gradient(circle at 50% 45%, #f0a216dd, #3a1a00 45%, #07051af8 75%); }
.open-stage.k-legendary .os-bg::after { content: ''; position: absolute; inset: 0; background: var(--bg-texture); opacity: .8; animation: twinkle 1.2s infinite; }
.os-rays { position: absolute; left: 50%; top: 44%; width: 170vmax; height: 170vmax; margin: -85vmax 0 0 -85vmax; opacity: 0; transition: opacity .4s; }
.os-rays .rays { width: 100%; height: 100%; animation: spin 14s linear infinite; }
.os-rays path { fill: #fff3; }
.open-stage.k-epic .os-rays path { fill: #e7d2ff40; } .open-stage.k-legendary .os-rays path { fill: #ffe9a855; }
.open-stage.is-ready .os-rays, .open-stage.is-hit .os-rays { opacity: 1; }
.os-chest { position: relative; width: min(70vw, 300px); margin-top: -12vh; transition: transform .4s var(--jelly); }
.os-chest .big-chest { width: 100%; }
.open-stage.is-building .os-chest { animation: build 1s ease-in infinite; }
.open-stage.k-epic.is-building .os-chest { animation: buildEpic .5s ease-in-out infinite; }
.open-stage.k-legendary.is-building .os-chest { animation: buildLegend .35s ease-in-out infinite; }
.open-stage.is-building .big-chest { animation: csShake .12s infinite; }
.open-stage.k-legendary.is-building .big-chest { animation: csShake .06s infinite; }
.open-stage.is-hit::after { content: ''; position: absolute; inset: 0; background: #fff; animation: hitFlash .55s ease-out both; pointer-events: none; }
.open-stage.is-hit .os-chest { animation: bigShake .45s; }
.os-chest .drop-count.big { right: -8px; bottom: 0; font-size: 2rem; min-width: 64px; padding: 4px 14px; transition: transform .3s var(--jelly); }
/* Récompense rare juste après : le chiffre brille, le coffre s'illumine et sautille */
.drop-count.is-hot { background: var(--sun); animation: hotCount .6s ease-in-out infinite; box-shadow: 0 0 0 4px #fff, 0 0 30px 10px var(--r-legendary); }
.os-chest.is-hyped { animation: hype .55s var(--jelly) infinite; filter: drop-shadow(0 0 26px var(--r-epic)); }
.os-chest.is-hyped.is-legend { filter: drop-shadow(0 0 40px var(--r-legendary)) drop-shadow(0 0 12px #fff); }
.os-chest.is-done { transform: translateY(-12vh) scale(.6); opacity: .6; }
.os-card { position: absolute; top: 50%; margin-top: 10vh; display: grid; justify-items: center; gap: 6px; min-width: 200px; padding: 18px 26px 16px; border-radius: var(--radius);
  background: var(--grain-paper), var(--surface); color: var(--ink); border: var(--border); box-shadow: 6px 7px 0 var(--ink); text-align: center; }
.os-card b { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; }
.os-card .label { padding: 2px 10px; border-radius: 6px; border: 2px solid var(--ink); background: var(--r-common); }
.os-card.r-rare .label { background: var(--r-rare); } .os-card.r-epic .label { background: var(--r-epic); } .os-card.r-legendary .label { background: var(--r-legendary); }
.os-card.r-epic { box-shadow: 6px 7px 0 var(--ink), 0 0 40px var(--r-epic); }
.os-card.r-legendary { box-shadow: 6px 7px 0 var(--ink), 0 0 60px 10px var(--r-legendary); background: var(--grain-paper), linear-gradient(160deg, #fff6d6, var(--surface)); }
.os-card.pop { animation: cardPop .55s var(--jelly); }
.os-card.r-legendary.pop { animation: cardPopBig .9s var(--jelly); }
.os-hint { position: absolute; bottom: 8vh; left: 0; right: 0; text-align: center; font-size: 1.5rem; color: var(--on-bg); text-shadow: 2px 2px 0 var(--ink); animation: hintBob 1.6s ease-in-out infinite; }
.os-summary { position: absolute; top: 34%; left: 50%; transform: translateX(-50%); width: min(92vw, 520px); padding: 20px; border-radius: var(--radius); background: var(--grain-paper), var(--surface);
  color: var(--ink); border: var(--border); box-shadow: 6px 7px 0 var(--ink); animation: sheetIn .45s var(--jelly); }
.os-summary h2 { font-size: 1.6rem; margin-bottom: 10px; }
.loot { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.loot-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; border: 2.5px solid var(--ink); background: var(--surface-2); font-weight: 900; font-size: .85rem;
  animation: popIn .4s var(--jelly) both; animation-delay: calc(var(--k) * 70ms); }
.loot-item small { display: block; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.loot-item.r-rare { background: #d6f1ff; } .loot-item.r-epic { background: #efdcff; } .loot-item.r-legendary { background: #fff0c4; box-shadow: 0 0 0 3px var(--r-legendary); }
.loot-item .mini-chest, .loot-item .mini-art { flex: none; }

/* ---------- Roue ---------- */
.wheel-card { display: grid; justify-items: center; gap: 14px; text-align: center; padding-top: 30px; }
.wheel-note { position: absolute; right: 18px; top: 12px; transform: rotate(5deg); font-size: 1.15rem; display: flex; gap: 4px; align-items: center; }
.wheel-zone { position: relative; width: min(84vw, 340px); aspect-ratio: 1; margin-top: 8px; }
.wheel-disc { width: 100%; height: 100%; will-change: transform; }
.wheel-zone { filter: drop-shadow(5px 7px 0 var(--ink)); } /* ombre posée sur le cadre : elle ne tourne pas avec la roue */
.wheel-svg { width: 100%; height: 100%; display: block; }
.wheel-svg .w-big { font-family: var(--font-display); font-size: 21px; fill: var(--ink); }
.wheel-svg .w-small { font-family: var(--font-body); font-weight: 900; font-size: 10px; letter-spacing: .12em; fill: var(--ink); text-transform: uppercase; }
.wheel-svg .bulb { fill: #fff6c9; stroke: var(--ink); stroke-width: 2; animation: bulb 1.2s steps(2) infinite; animation-delay: calc(var(--i) * 60ms); }
.wheel-zone.is-spinning .bulb { animation-duration: .25s; }
.wheel-pin-wrap { position: absolute; z-index: 2; left: 50%; top: -18px; width: 44px; margin-left: -22px; transform-origin: 50% 20%; }
.wheel-pin-wrap.flick { animation: flick .14s ease-out; }
.wheel-zone.won-epic { filter: drop-shadow(5px 7px 0 var(--ink)) drop-shadow(0 0 26px var(--r-epic)); }
.wheel-zone.won-legendary { filter: drop-shadow(5px 7px 0 var(--ink)) drop-shadow(0 0 40px var(--r-legendary)); }
.wheel-status { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; align-items: center; }
.wheel-status .timer b { font-family: var(--font-display); font-weight: 400; }
.win-pop { position: fixed; left: 50%; top: 42%; z-index: 26; transform: translate(-50%, -50%) rotate(-3deg); display: grid; justify-items: center; gap: 6px; padding: 18px 28px;
  border-radius: var(--radius); background: var(--grain-paper), var(--surface); color: var(--ink); border: var(--border); box-shadow: 7px 8px 0 var(--ink); animation: winIn .55s var(--jelly); text-align: center; }
.win-pop b { font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; }
.win-pop .label { padding: 2px 10px; border-radius: 6px; border: 2px solid var(--ink); background: var(--r-common); }
.win-pop.r-rare .label { background: var(--r-rare); } .win-pop.r-epic .label { background: var(--r-epic); } .win-pop.r-legendary .label { background: var(--r-legendary); }
.win-pop.r-legendary { box-shadow: 7px 8px 0 var(--ink), 0 0 60px 14px var(--r-legendary); }
.win-pop.out { animation: winOut .26s both; }

/* ---------- Pass ---------- */
.pass-head { display: grid; gap: 8px; padding-top: 28px; }
.pass-note { position: absolute; right: 18px; top: 10px; transform: rotate(4deg); font-size: 1.15rem; display: flex; gap: 4px; align-items: center; max-width: 60%; text-align: right; }
.pass-level { display: flex; align-items: baseline; gap: 8px; }
.pass-num { font-family: var(--font-display); font-size: clamp(3.4rem, 14vw, 5rem); line-height: .85; letter-spacing: -.03em; color: var(--cord-1); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 4px 4px 0 var(--ink); }
.pass-of { font-family: var(--font-display); font-size: 1.6rem; display: grid; line-height: 1; }
.pass-of small { font-family: var(--font-body); font-weight: 900; font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); }
.pass-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.pass-track-wrap { overflow-x: auto; overflow-y: visible; margin: 0 -18px; padding: 26px 18px 30px; cursor: grab; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.pass-track-wrap::-webkit-scrollbar { display: none; }
.pass-track-wrap.is-drag { cursor: grabbing; }
.pass-track { list-style: none; padding: 0 30px; margin: 0; display: flex; gap: 14px; align-items: center; position: relative; width: max-content; }
/* Le fil rouge passe derrière tous les paliers ; la partie parcourue est tressée */
.pass-track::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 12px; margin-top: 6px; border-radius: 99px; background: #ffffff30; border: 2.5px solid var(--ink); }
.pass-track::after { content: ''; position: absolute; left: 0; top: 50%; height: 12px; margin-top: 6px; width: var(--fill); border-radius: 99px; border: 2.5px solid var(--ink);
  background: repeating-linear-gradient(-55deg, var(--cord-1) 0 6px, var(--cord-2) 6px 12px, var(--cord-3) 12px 15px, var(--cord-1) 15px 21px); background-size: 42px 100%; animation: cordFlow 1.4s linear infinite; }
.tier { position: relative; z-index: 1; display: grid; justify-items: center; gap: 6px; width: 92px; flex: none; }
.tier:nth-child(odd) { transform: translateY(-4px) rotate(-1.5deg); } .tier:nth-child(even) { transform: translateY(4px) rotate(1.5deg); }
.tier-num { font-family: var(--font-display); font-size: .95rem; padding: 0 8px; border-radius: 8px; background: var(--surface); color: var(--ink); border: 2px solid var(--ink); }
.tier-card { display: grid; justify-items: center; align-content: center; gap: 4px; width: 92px; height: 104px; padding: 8px 6px; border-radius: 14px 16px 12px 18px / 16px 12px 18px 14px;
  background: var(--grain-paper), var(--surface); color: var(--ink); border: var(--border); box-shadow: 3px 4px 0 var(--ink); text-align: center; }
.tier-card small { font-size: .66rem; font-weight: 900; line-height: 1.15; }
.tier-card .mini-chest, .tier-card .mini-art { width: 54px !important; }
.tier.is-big .tier-card { width: 110px; height: 124px; background: var(--grain-paper), #fff2c4; }
.tier.is-big { width: 110px; }
.tier.is-final .tier-card { width: 140px; height: 140px; background: var(--grain-paper), linear-gradient(160deg, #ffe7f3, #dff4ff); box-shadow: 4px 5px 0 var(--ink), 0 0 30px var(--accent-3); }
.tier.is-final { width: 140px; }
.tier.is-final .comet-stk { width: 104px; }
.tier.is-locked .tier-card { filter: saturate(.35); opacity: .7; }
.tier.is-ready .tier-card { background: var(--grain-paper), var(--sun); animation: jellyIdle 1.4s ease-in-out infinite; box-shadow: 3px 4px 0 var(--ink), 0 0 0 4px #fff; }
.tier.is-claimed .tier-card { opacity: .8; }
.tier-check { position: absolute; right: -6px; top: 22px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--good); color: #fff;
  font-style: normal; font-weight: 900; border: 2.5px solid var(--ink); transform: rotate(-12deg); }
.tier.stamp-now .tier-card { animation: stampIn .4s var(--spring); }
.pass-final { display: flex; align-items: center; gap: 18px; background: var(--grain-paper), linear-gradient(120deg, #fff7e8, #ffe7f3); }
.pass-final .final-stk { width: 120px; flex: none; animation: floaty 3s ease-in-out infinite; }
.pass-final h3 { font-size: 1.5rem; }

/* ---------- Classement : 4 onglets ---------- */
.seg.seg-wrap { display: flex; flex-wrap: wrap; border-radius: 16px; }
.seg-wrap .seg-btn { flex: 1 1 auto; }

/* ---------- Profil ---------- */
.stat-flame dd { display: flex; align-items: center; gap: 6px; }
.stat-flame small { display: block; margin-top: 2px; font-size: 1rem; color: var(--cord-1); }
.member-card footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.sound-toggle { font-family: var(--font-body); font-size: .85rem; padding: 7px 12px; }

/* ---------- Animations v2 ---------- */
@keyframes flicker { 0%, 100% { rotate: -2deg; translate: 0 0; } 50% { rotate: 3deg; translate: 0 -1px; } }
@keyframes flameGrow { 40% { scale: 1.35 .8; } 70% { scale: .9 1.15; } }
@keyframes flameUp { 0% { scale: .2; rotate: -30deg; } 60% { scale: 1.3; rotate: 8deg; } 100% { scale: 1; rotate: 0deg; } }
@keyframes dashSpin { to { border-color: var(--accent-3); } }
@keyframes floatChest { 0%, 100% { translate: 0 0; rotate: -1deg; } 50% { translate: 0 -8px; rotate: 1deg; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes build { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes buildEpic { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-14px) scale(1.06); } }
@keyframes buildLegend { 0%, 100% { transform: translateY(-20px) scale(1.08) rotate(-2deg); } 50% { transform: translateY(-34px) scale(1.14) rotate(2deg); } }
@keyframes hitFlash { 0% { opacity: .95; } 100% { opacity: 0; } }
@keyframes hotCount { 0%, 100% { transform: rotate(8deg) scale(1); } 50% { transform: rotate(-4deg) scale(1.25); } }
@keyframes hype { 0%, 100% { transform: translateY(0) scale(1); } 35% { transform: translateY(-22px) scale(1.04, .96); } 60% { transform: translateY(0) scale(1.08, .9); } }
@keyframes cardPop { 0% { opacity: 0; transform: translateY(-80px) scale(.3) rotate(-20deg); } 70% { transform: translateY(6px) scale(1.08) rotate(3deg); } 100% { opacity: 1; transform: rotate(-1.5deg); } }
@keyframes cardPopBig { 0% { opacity: 0; transform: translateY(-120px) scale(.2) rotate(-40deg); } 50% { transform: scale(1.35) rotate(6deg); } 75% { transform: scale(.94) rotate(-3deg); } 100% { opacity: 1; transform: rotate(-1.5deg); } }
@keyframes bulb { 50% { fill: var(--sun); } }
@keyframes flick { 50% { transform: rotate(-22deg); } }
@keyframes winIn { from { opacity: 0; transform: translate(-50%, -20%) rotate(12deg) scale(.4); } }
@keyframes winOut { to { opacity: 0; transform: translate(-50%, -80%) rotate(-10deg) scale(.8); } }

/* =====================================================================
   v3 : gains d'éclats, cadres d'avatar, compagnon
   ===================================================================== */

/* ---------- Gain d'éclats (gain.js) : éclats qui volent vers le compteur ---------- */
#gainLayer { position: fixed; inset: 0; pointer-events: none; z-index: 45; overflow: hidden; }
.gain-shard { position: absolute; left: 0; top: 0; will-change: transform; filter: drop-shadow(0 0 6px #bfeaff); }
.gain-shard .coin { display: block; }
.gain-tag { position: absolute; transform: translateX(-50%); font-family: var(--font-display); font-size: 1.15rem; color: var(--sun); white-space: nowrap;
  -webkit-text-stroke: 1.2px var(--ink); paint-order: stroke fill; text-shadow: 2px 2px 0 var(--ink); animation: gainTag 2s var(--ease) both; }
.gain-tag small { font-family: var(--font-hand); font-size: 1.15rem; -webkit-text-stroke: 0; color: var(--on-bg); }
.gain-tag.t1 { font-size: 1.4rem; } .gain-tag.t2 { font-size: 1.85rem; } .gain-tag.t3 { font-size: 2.4rem; color: #fff6c9; }
.gain-jackpot { position: absolute; left: 50%; top: 40%; display: grid; justify-items: center; animation: jackpot 1.7s var(--jelly) both; }
.gain-jackpot span { font-family: var(--font-display); font-size: clamp(3rem, 16vw, 6rem); line-height: 1; color: var(--sun); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 5px 6px 0 var(--ink), 0 0 40px #ffd84a; }
.gain-jackpot small { font-family: var(--font-hand); font-size: 2rem; color: var(--on-bg); text-shadow: 2px 2px 0 var(--ink); }
.balance.is-hit { animation: balHit .18s var(--jelly); }
@keyframes gainTag { 0% { opacity: 0; transform: translate(-50%, 6px) scale(.5) rotate(-8deg); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.2) rotate(-4deg); }
  30% { transform: translate(-50%, 0) scale(1) rotate(-4deg); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -26px) scale(.95) rotate(-4deg); } }
@keyframes jackpot { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.2) rotate(-20deg); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1.15) rotate(4deg); }
  40% { transform: translate(-50%, -50%) scale(1) rotate(-2deg); } 75% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-2deg); } 100% { opacity: 0; transform: translate(-50%, -160%) scale(.5); } }
@keyframes balHit { 50% { transform: rotate(2deg) scale(1.12, .9); } }

/* ---------- Avatar + cadre (frames.js) ---------- */
.fav { position: relative; display: inline-block; flex: none; width: var(--s); height: var(--s); vertical-align: middle; }
.fav-img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid var(--ink); background: var(--surface-2); }
.fav.has-frame .fav-img { border-width: 2px; }
.fav-frame { position: absolute; left: -28.125%; top: -28.125%; width: 156.25%; height: 156.25%; overflow: visible; pointer-events: none; filter: drop-shadow(1.5px 2.5px 0 #1b163880); }
.fav-frame .fa-spin, .fav-frame .fa-spin-rev, .fav-frame .fa-flicker, .fav-frame .fa-tails, .fav-frame .fa-wing-l, .fav-frame .fa-wing-r { transform-box: view-box; transform-origin: 100px 100px; }
.fav-frame .fa-spin { animation: spin 12s linear infinite; }
.fav-frame .fa-spin-rev { animation: spin 16s linear infinite reverse; }
.fav-frame .fa-spin-self, .fav-frame .fa-twinkle, .fav-frame .fa-pulse { transform-box: fill-box; transform-origin: center; }
.fav-frame .fa-spin-self { animation: spin 3s linear infinite; }
.fav-frame .fa-twinkle { animation: frTwinkle 1.8s ease-in-out infinite; }
.fav-frame .fa-pulse { animation: frPulse 1.6s ease-in-out infinite; }
.fav-frame .fa-flicker { animation: frFlicker .9s ease-in-out infinite alternate; }
.fav-frame .fa-sway { transform-box: view-box; transform-origin: 0 0; animation: frSway 2.4s ease-in-out infinite; animation-delay: var(--d, 0s); }
.fav-frame .fa-float { animation: frFloat 2.6s ease-in-out infinite; }
.fav-frame .fa-neon { animation: frNeon 3.2s steps(1) infinite; }
.fav-frame .fa-rise circle { animation: frRise 2.4s ease-in infinite; }
.fav-frame .fa-fall > g { animation: frFall 3s linear infinite; }
.fav-frame .fa-tails { animation: frTails 3s ease-in-out infinite; }
.fav-frame .fa-wing-l { animation: frWingL 1.6s ease-in-out infinite; } .fav-frame .fa-wing-r { animation: frWingR 1.6s ease-in-out infinite; }
.fav-frame .fa-wave { transform-box: view-box; transform-origin: 0 14px; animation: frWave 1.1s ease-in-out infinite; }
@keyframes frTwinkle { 0%, 100% { scale: 1; opacity: 1; } 50% { scale: .55; opacity: .5; } }
@keyframes frPulse { 0%, 100% { scale: 1; opacity: .85; } 50% { scale: 1.12; opacity: 1; } }
@keyframes frFlicker { from { scale: 1; } to { scale: 1.04; } }
@keyframes frSway { 0%, 100% { rotate: -7deg; } 50% { rotate: 7deg; } }
@keyframes frFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4px; } }
@keyframes frNeon { 0%, 100% { opacity: 1; } 18% { opacity: .3; } 20% { opacity: 1; } 61% { opacity: .4; } 63% { opacity: 1; } }
@keyframes frRise { 0% { translate: 0 0; opacity: 0; } 20% { opacity: 1; } 100% { translate: 0 -60px; opacity: 0; } }
@keyframes frFall { 0% { translate: 0 0; opacity: 0; } 15% { opacity: 1; } 100% { translate: -26px 40px; opacity: 0; } }
@keyframes frTails { 0%, 100% { rotate: -3deg; } 50% { rotate: 3deg; } }
@keyframes frWingL { 0%, 100% { rotate: 0deg; } 50% { rotate: -7deg; } }
@keyframes frWingR { 0%, 100% { rotate: 0deg; } 50% { rotate: 7deg; } }
@keyframes frWave { 0%, 100% { rotate: 0deg; } 50% { rotate: -28deg; } }
/* Raretés des cadres : --rc */
.r-common { --rc: var(--r-common); } .r-rare { --rc: var(--r-rare); } .r-elite { --rc: var(--r-elite); } .r-mythic { --rc: var(--r-mythic); } .r-legendary { --rc: var(--r-legendary); }
.chip-f-common { background: var(--r-common); } .chip-f-rare { background: var(--r-rare); } .chip-f-elite { background: var(--r-elite); } .chip-f-mythic { background: var(--r-mythic); }
.chip-f-legendary { background: linear-gradient(90deg, var(--accent-2), var(--accent-3), var(--r-legendary), var(--accent-2)); background-size: 200%; animation: shine 2s linear infinite; }

/* Avatar de l'en-tête : rond, avec le cadre équipé qui déborde */
.me-btn { width: 44px; height: 44px; border: 0; border-radius: 50%; box-shadow: none; overflow: visible; background: none; display: grid; place-items: center; }
.me-btn .fav-img { box-shadow: 2px 3px 0 var(--ink); }
.me-btn.is-active { outline: 0; }
.me-btn.is-active .fav-img { box-shadow: 2px 3px 0 var(--ink), 0 0 0 3px var(--sun); }
@media (max-width: 460px) { .me-btn { width: 40px; height: 40px; } .me-btn .fav { --s: 34px !important; } }
/* Barre à 8 onglets : sous 860 px, seul l'onglet actif garde son nom */
@media (max-width: 860px) { .nav-btn:not(.is-active) span { display: none; } .nav-btn { padding: 10px 4px; } }
.login-frames { display: flex; gap: 22px; justify-content: center; align-items: center; padding: 14px 0 4px; }
.login-frames .fav { animation: popIn .5s var(--jelly) both; }
.login-frames .hand { transform: rotate(-5deg); }
.mini-frame { display: inline-grid; place-items: center; position: relative; flex: none; }
.mini-frame.is-mystery .fav { filter: brightness(0) opacity(.55); }
.mini-frame.is-mystery b { position: absolute; font-family: var(--font-display); font-weight: 400; font-size: 1.5em; color: var(--sun); -webkit-text-stroke: 1px var(--ink); paint-order: stroke fill; }
.odds li.sub { padding-left: 16px; font-size: .8rem; opacity: .85; } .odds li.r-elite span::before { background: var(--r-elite); }
/* Profil : la photo encadrée ouvre l'onglet Cadres */
.photo { display: grid; place-items: center; padding: 22px; border-radius: 50%; transition: transform .35s var(--jelly); }
.photo:hover { transform: rotate(-4deg) scale(1.04); }
.photo-edit { position: absolute; right: -4px; bottom: 0; z-index: 3; padding: 0 8px; border-radius: 8px; background: var(--sun); color: var(--ink); border: 2px solid var(--ink); font-size: 1.05rem; transform: rotate(-8deg); white-space: nowrap; }
.board-row .fav { justify-self: center; }

/* ---------- Onglet Cadres ---------- */
.frames-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 26px; align-items: center; padding: 34px 22px 22px; }
.frames-note { position: absolute; left: 18px; top: 8px; transform: rotate(-5deg); font-size: 1.15rem; display: flex; align-items: center; gap: 2px; }
.frames-arrow { width: 32px; transform: rotate(70deg) translateY(-4px); }
.hero-preview { position: relative; display: grid; place-items: center; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--rc) 55%, transparent) 0 42%, transparent 70%); }
.hero-preview::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; border: 3px dashed var(--rc); animation: spin 24s linear infinite; }
.hero-preview.pop .fav { animation: popIn .45s var(--jelly); }
.hero-preview.stamp .fav { animation: stampFrame .7s var(--jelly); }
.try-tag { position: absolute; right: 2px; bottom: 6px; z-index: 2; padding: 0 9px; border-radius: 8px; background: var(--surface); color: var(--cord-1); border: 2px solid var(--ink);
  font-family: var(--font-hand); font-size: 1.15rem; transform: rotate(-8deg); }
.hero-info { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.hero-info h2 { font-size: clamp(1.7rem, 6vw, 2.3rem); max-width: 100%; overflow-wrap: anywhere; }
.f-status { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; font-weight: 900; font-size: .85rem; padding: 5px 10px; border-radius: 8px; border: 2px dashed var(--ink-2); }
.f-status.is-eq { background: var(--mint); border-style: solid; border-color: var(--ink); }
.f-status.is-own { background: var(--surface-2); border-style: solid; }
.f-status b { color: var(--cord-1); }
.hero-actions { margin-top: 6px; }
@media (max-width: 560px) {
  .frames-hero { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding-top: 38px; }
  .hero-info { justify-items: center; }
  .hero-preview { width: 180px; height: 180px; }
}
.frames-tools { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.fsearch { display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--surface); color: var(--ink); border: var(--border); box-shadow: 3px 4px 0 var(--ink); transform: rotate(-.6deg); }
.fsearch input { flex: 1; width: 0; min-width: 0; border: 0; background: none; font: inherit; font-weight: 700; color: var(--ink); outline: none; user-select: text; -webkit-user-select: text; }
.fsearch:focus-within { box-shadow: 3px 4px 0 var(--ink), 0 0 0 4px var(--sun); }
.chips-row { display: flex; gap: 7px; flex-wrap: wrap; }
.chips-row + .chips-row { margin-top: 8px; }
.fchip { padding: 5px 11px; border-radius: 999px; border: 2.5px solid var(--ink); background: var(--surface); color: var(--ink); font-weight: 900; font-size: .78rem; box-shadow: 2px 2px 0 var(--ink); transition: transform .3s var(--jelly); }
.fchip small { opacity: .55; }
.fchip:active { transform: scale(.88, 1.06); }
.fchip.is-on { background: var(--sun); transform: rotate(-3deg) translateY(-2px); }
.fchip.rar i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--rc); margin-right: 5px; vertical-align: -1px; }
.frames-count { font-weight: 900; color: var(--on-bg); text-shadow: 1px 1px 0 var(--ink); display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.frames-count b { font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; color: var(--sun); -webkit-text-stroke: 1px var(--ink); paint-order: stroke fill; }
.frames-count .hand { color: var(--sun); font-size: 1.25rem; }
.frames-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(116px, 100%), 1fr)); gap: 18px 12px; padding-bottom: 10px; }
.fcard { position: relative; display: grid; justify-items: center; gap: 4px; padding: 20px 6px 10px; border-radius: var(--radius-sm); background: var(--grain-paper), var(--surface); color: var(--ink);
  border: var(--border); box-shadow: 3px 4px 0 var(--ink); text-align: center; animation: cardIn .4s var(--spring) both; animation-delay: calc(var(--k) * 22ms); transition: transform .3s var(--jelly), box-shadow .15s; }
.fcard:nth-child(3n) { rotate: -1.2deg; } .fcard:nth-child(3n+1) { rotate: .9deg; }
.fcard::after { content: ''; position: absolute; left: 10px; right: 10px; top: 7px; height: 6px; border-radius: 4px; background: var(--rc); border: 1.5px solid var(--ink); }
.fcard:hover { transform: translateY(-4px) rotate(-1.5deg); }
.fcard:active { transform: scale(.94); }
.fcard-art { display: grid; place-items: center; width: 92px; height: 92px; }
.fcard-name { font-family: var(--font-display); font-weight: 400; font-size: .92rem; line-height: 1.1; }
.fcard-foot { display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-size: .68rem; font-weight: 900; color: var(--ink-2); line-height: 1.15; }
.fcard-foot .ico { width: 1.1em; height: 1.1em; flex: none; }
.fcard.is-locked .fcard-art { filter: saturate(.6); opacity: .85; }
.fcard.is-owned .fcard-foot { color: var(--good); }
.fcard.r-mythic { background: var(--grain-paper), linear-gradient(165deg, #ffe0f0, var(--surface) 55%); }
.fcard.r-legendary { background: var(--grain-paper), linear-gradient(165deg, #fff1bd, var(--surface) 55%); }
.fcard.is-eq { background: var(--grain-paper), var(--mint); }
.fcard.is-eq .fcard-foot { color: var(--ink); }
.fcard.is-sel { box-shadow: 3px 4px 0 var(--ink), 0 0 0 4px var(--sun); transform: translateY(-4px); }
.fnew { position: absolute; top: -11px; right: -6px; z-index: 2; padding: 2px 7px; border-radius: 6px; background: var(--accent); color: #fff; border: 2px solid var(--ink);
  font-size: .6rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; transform: rotate(8deg); animation: pulseDot 1.2s infinite; }
.frames-empty { grid-column: 1 / -1; color: var(--sun); padding: 24px; font-size: 1.5rem; }
@keyframes stampFrame { 0% { transform: scale(1.6) rotate(-14deg); opacity: .4; } 60% { transform: scale(.92) rotate(3deg); opacity: 1; } 100% { transform: none; } }

/* ---------- Onglet Compagnon ---------- */
.sp-fire { --hab-1: #ffe9cf; --hab-2: #ffb488; --hab-3: #e8573a; }
.sp-water { --hab-1: #e3f6ff; --hab-2: #92d9ff; --hab-3: #2f7fd0; }
.sp-forest { --hab-1: #eef8d6; --hab-2: #ade49a; --hab-3: #3c8a3f; }
.creature { display: block; overflow: visible; }
.creature .cr-body { animation: crBreathe 2.8s ease-in-out infinite; }
.creature .cr-eye { animation: crBlink 4.2s infinite; }
.creature .cr-tail { animation: crWag 1.7s ease-in-out infinite; }
.creature .cr-flick { transform-box: fill-box; transform-origin: 50% 100%; animation: crFlick .8s ease-in-out infinite alternate; }
.creature .cr-fx > * { animation: crFx 3s ease-in-out infinite; }
.creature .cr-fx.glow > * { filter: drop-shadow(0 0 4px #f4ff8a); animation: crFirefly 3.2s ease-in-out infinite; }
.creature .cr-aura { transform-box: fill-box; transform-origin: center; animation: crAura 2.6s ease-in-out infinite; }
.creature .cr-float { animation: frFloat 2.4s ease-in-out infinite; }
.creature .cr-glow { animation: crGlow 1.8s ease-in-out infinite; }
.creature.sil { filter: brightness(0) opacity(.5); }
.creature.sil .cr-fx, .creature.sil .cr-aura { display: none; }
@keyframes crBreathe { 0%, 100% { scale: 1 1; } 50% { scale: 1.025 .975; } }
@keyframes crBlink { 0%, 92%, 100% { scale: 1 1; } 95% { scale: 1 .1; } }
@keyframes crWag { 0%, 100% { rotate: -6deg; } 50% { rotate: 6deg; } }
@keyframes crFlick { from { scale: 1; } to { scale: 1.07 1.13; } }
@keyframes crFx { 0% { translate: 0 6px; opacity: 0; } 30% { opacity: 1; } 100% { translate: 0 -34px; opacity: 0; } }
@keyframes crFirefly { 0%, 100% { translate: 0 0; opacity: .25; } 50% { translate: 8px -12px; opacity: 1; } }
@keyframes crAura { 0%, 100% { scale: .95; opacity: .75; } 50% { scale: 1.05; opacity: 1; } }
@keyframes crGlow { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }

/* Adoption */
.adopt { display: grid; gap: 10px; justify-items: center; text-align: center; padding-top: 36px; }
.adopt-note { position: absolute; right: 16px; top: 10px; transform: rotate(5deg); font-size: 1.15rem; display: flex; gap: 4px; align-items: center; }
.adopt .big-q { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.6rem, 6vw, 2.2rem); line-height: 1.05; }
.adopt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; width: 100%; margin-top: 10px; }
.adopt-card { position: relative; display: grid; justify-items: center; gap: 5px; padding: 18px 12px 16px; border-radius: var(--radius); color: var(--ink); border: var(--border); box-shadow: 4px 5px 0 var(--ink);
  background: var(--grain-paper), linear-gradient(180deg, var(--hab-1), var(--hab-2)); animation: cardIn .5s var(--spring) both; animation-delay: calc(var(--k) * 90ms); transition: transform .35s var(--jelly); }
.adopt-card:nth-child(2) { rotate: 1.2deg; } .adopt-card:nth-child(3) { rotate: -.9deg; }
.adopt-card:hover { transform: translateY(-6px) rotate(-1.5deg); }
.adopt-card:hover .adopt-art .creature { animation: petHappy .6s var(--jelly); }
.adopt-card:active { transform: scale(.96); }
.adopt-art { display: block; width: 150px; height: 150px; }
.adopt-art .creature { width: 100%; height: 100%; transform-origin: 50% 92%; }
.adopt-card b { font-size: 1.55rem; }
.adopt-card small { font-weight: 700; font-size: .82rem; line-height: 1.3; }
.el-chip { position: absolute; top: -12px; left: 14px; padding: 3px 12px; border-radius: 8px; border: 2.5px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); background: var(--hab-2);
  font-size: .7rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; transform: rotate(-5deg); }
.adopt-evo { display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.adopt-evo .creature { width: 46px; height: 46px; }
.adopt-evo i { font-style: normal; font-weight: 900; color: var(--ink-2); }
.adopt-btn { margin-top: 6px; pointer-events: none; }
.name-art { justify-self: center; width: 130px; height: 130px; margin-top: -70px; }
.name-art .creature { width: 100%; height: 100%; }
.name-input { width: 100%; padding: 10px 14px; border-radius: var(--radius-sm); border: var(--border); background: var(--surface-2); color: var(--ink); outline: none;
  font-family: var(--font-display); font-size: 1.5rem; text-align: center; user-select: text; -webkit-user-select: text; box-shadow: inset 0 3px 0 #0001; }
.name-input:focus { box-shadow: 0 0 0 4px var(--sun); }
.name-err { color: var(--bad); font-weight: 900; text-align: center; }

/* Scène du compagnon : son habitat */
.pet-scene { position: relative; height: clamp(320px, 54vh, 440px); border-radius: var(--radius); border: var(--border); box-shadow: var(--shadow); overflow: hidden; color: var(--ink);
  background: radial-gradient(ellipse at 50% 92%, #fff8 0 18%, transparent 45%), linear-gradient(180deg, var(--hab-1), var(--hab-2) 72%, var(--hab-3));
  transform: rotate(-.5deg); animation: cardIn .5s var(--spring) both; }
.pet-scene::before { content: ''; position: absolute; inset: 0; background: var(--grain); opacity: .25; mix-blend-mode: multiply; pointer-events: none; z-index: 1; }
.pet-scene::after { content: ''; position: absolute; left: -12%; right: -12%; bottom: -46px; height: 110px; border-radius: 50%; background: var(--hab-3); border-top: var(--border); }
.scene-deco { position: absolute; inset: 0; opacity: .55; }
.sp-fire .scene-deco { background: radial-gradient(circle, #ffd84a 0 3px, #ff6b5e 3.5px 5px, transparent 5.5px) 10px 20px / 70px 64px, radial-gradient(circle, #fff6 0 1.5px, transparent 2px) 0 0 / 23px 29px; }
.sp-water .scene-deco { background: radial-gradient(circle, transparent 0 9px, #fff9 9.5px 11px, transparent 11.5px) 6px 12px / 66px 58px, radial-gradient(circle, #fff9 0 2px, transparent 2.5px) 0 0 / 31px 37px; }
.sp-forest .scene-deco { background: radial-gradient(ellipse 4px 8px, #3fae5a 0 99%, transparent) 14px 8px / 52px 60px, radial-gradient(circle, #ffc4de 0 2.5px, transparent 3px) 0 0 / 41px 47px; }
.pet { position: absolute; left: 50%; bottom: 40px; z-index: 2; width: min(80%, 300px); aspect-ratio: 1; transform: translateX(-50%); cursor: pointer; }
.pet .creature { width: 100%; height: 100%; transform-origin: 50% 92%; }
.pet-mood { position: absolute; left: 16px; top: 18px; z-index: 3; max-width: 58%; transform: rotate(-4deg); font-size: 1.35rem; color: var(--ink); }
.pet-lvl { position: absolute; right: 16px; top: 14px; z-index: 3; display: grid; place-items: center; align-content: center; width: 66px; height: 66px; border-radius: 50%;
  background: var(--sun); border: var(--border); box-shadow: 3px 4px 0 var(--ink); transform: rotate(8deg); line-height: .9; }
.pet-lvl small { font-size: .62rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.pet-lvl b { font-family: var(--font-display); font-weight: 400; font-size: 1.8rem; }
.pet-lvl.is-up { animation: lvlUp .8s var(--jelly); }
.pet-name { position: absolute; left: 0; right: 0; bottom: 10px; z-index: 3; display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 10px; }
.pet-name h2 { font-size: 1.85rem; color: var(--on-bg); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); }
.chip-pet { background: var(--surface); }
.pet-bubble { position: absolute; left: 56%; top: 20%; z-index: 4; padding: 4px 14px; border-radius: 18px 18px 18px 4px; background: var(--surface); color: var(--ink); border: var(--border);
  box-shadow: 3px 3px 0 var(--ink); font-family: var(--font-hand); font-size: 1.45rem; transform: rotate(-4deg); white-space: nowrap; }
.pet-bubble.pop { animation: popIn .35s var(--jelly); }
.pet.is-happy .creature { animation: petHappy .6s var(--jelly); }
.pet.is-poked .creature { animation: petPoke .55s var(--jelly); }
.pet.is-eating .creature { animation: petEat .9s ease-in-out; }
.pet.is-drinking .creature { animation: petDrink 1s ease-in-out; }
.pet.is-refuse .creature { animation: petRefuse .5s ease-in-out; }
.pet.is-born .creature { animation: petBorn .9s var(--jelly); }
@keyframes petHappy { 30% { transform: translateY(-14px) scale(1.04, .96); } 60% { transform: translateY(0) scale(1.06, .94); } }
@keyframes petPoke { 20% { transform: scale(1.12, .86); } 45% { transform: translateY(-28px) scale(.94, 1.08) rotate(-4deg); } 70% { transform: translateY(0) scale(1.08, .92); } }
@keyframes petEat { 15%, 45%, 75% { transform: scale(1.06, .9); } 30%, 60%, 90% { transform: scale(.97, 1.04); } }
@keyframes petDrink { 20%, 50%, 80% { transform: rotate(-4deg) translateY(4px); } 35%, 65% { transform: rotate(3deg); } }
@keyframes petRefuse { 20%, 60% { transform: rotate(-6deg); } 40%, 80% { transform: rotate(6deg); } }
@keyframes petBorn { 0% { transform: scale(.1) rotate(-30deg); opacity: 0; } 60% { transform: scale(1.15) rotate(6deg); opacity: 1; } 100% { transform: none; } }
@keyframes lvlUp { 40% { transform: rotate(-12deg) scale(1.5); } }
.pet-float { position: fixed; z-index: 30; transform: translateX(-50%); pointer-events: none; white-space: nowrap; font-family: var(--font-display); font-size: 1.6rem; color: var(--mint);
  -webkit-text-stroke: 1.4px var(--ink); paint-order: stroke fill; text-shadow: 2px 3px 0 var(--ink); animation: gainTag 1.5s var(--ease) both; }
.pet-float.is-soft { font-family: var(--font-hand); font-size: 1.5rem; color: var(--surface); -webkit-text-stroke: 0; }
.pet-heart { position: fixed; z-index: 30; width: 26px; height: 26px; pointer-events: none; animation: heartUp 1.4s var(--ease) both; }
.pet-heart svg { width: 100%; height: 100%; display: block; }
@keyframes heartUp { 0% { opacity: 0; transform: scale(.3); } 20% { opacity: 1; transform: translate(calc(var(--dx) * .3), -16px) scale(1.1); } 100% { opacity: 0; transform: translate(var(--dx), -90px) scale(.8) rotate(20deg); } }
.care-fly { position: fixed; left: 0; top: 0; z-index: 30; width: 48px; height: 48px; pointer-events: none; }
.care-fly .food { width: 100%; height: 100%; filter: drop-shadow(2px 3px 0 var(--ink)); }

/* Panneau de soins */
.pet-panel { display: grid; gap: 14px; }
.pet-xp { display: grid; gap: 6px; }
.gauges { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gauge { display: grid; grid-template-columns: 42px 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); border: 2.5px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.gauge:nth-child(2) { rotate: .8deg; }
.g-ico .food { display: block; width: 40px; height: 40px; }
.g-main { display: grid; gap: 3px; min-width: 0; }
.g-label { font-size: .64rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.g-bar { height: 14px; border-radius: 99px; background: var(--surface); border: 2.5px solid var(--ink); overflow: hidden; }
.g-bar i { display: block; height: 100%; border-radius: 99px; }
.g-hunger .g-bar i { background: repeating-linear-gradient(-55deg, #ff9a3c 0 6px, #ffbd6a 6px 12px); }
.g-thirst .g-bar i { background: repeating-linear-gradient(-55deg, #3fb2f0 0 6px, #8fdcff 6px 12px); }
.g-val { font-family: var(--font-display); font-weight: 400; font-size: 1.2rem; min-width: 50px; text-align: right; }
.gauge.is-filling { animation: jelly .6s; }
.care-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn-big.care-btn { font-size: 1.05rem; gap: 10px; padding: 10px 16px; }
.care-btn .food { width: 34px; height: 34px; flex: none; transition: transform .3s var(--jelly); }
.care-btn:hover .food { transform: rotate(-12deg) scale(1.15); }
.btn-water { background: var(--accent-2); }
.care-cap { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-weight: 900; }
.care-cap b { font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; }
.care-cap .hand { font-size: 1.2rem; }
@media (max-width: 520px) { .gauges, .care-btns { grid-template-columns: 1fr; } }

/* Chemin d'évolution */
.evo-path { display: grid; gap: 10px; }
.evo-row { display: flex; align-items: center; justify-content: center; gap: 6px; }
.evo-step { flex: 1; max-width: 170px; display: grid; justify-items: center; gap: 2px; padding: 8px; border-radius: var(--radius-sm); border: 2.5px dashed var(--ink-2); background: var(--surface-2); text-align: center; }
.evo-step .creature { width: 100%; max-width: 110px; aspect-ratio: 1; }
.evo-step b { font-family: var(--font-display); font-weight: 400; font-size: 1rem; }
.evo-step small { font-size: .7rem; font-weight: 900; letter-spacing: .08em; color: var(--ink-2); }
.evo-step.is-me { border-style: solid; border-color: var(--ink); background: var(--sun); box-shadow: 3px 3px 0 var(--ink); transform: rotate(-2deg); }
.evo-step.is-past { border-style: solid; border-color: var(--ink); }
.evo-arrow { font-family: var(--font-display); font-size: 1.8rem; color: var(--ink-2); }

/* Évolution : grand moment plein écran */
.evo-stage { position: fixed; inset: 0; z-index: 25; pointer-events: auto; display: grid; place-items: center; overflow: hidden; cursor: pointer; animation: fadeIn .3s;
  background: radial-gradient(circle at 50% 45%, var(--hab-2), #120e33ee 55%, #07051af8 80%); }
.evo-stage .os-rays { opacity: .25; }
.evo-stage.is-hit .os-rays { opacity: 1; }
.evo-stage.is-hit::after { content: ''; position: absolute; inset: 0; background: #fff; animation: hitFlash .8s ease-out both; pointer-events: none; }
.evo-stage.out { animation: fadeOut .25s both; }
.evo-title { position: absolute; top: 10vh; left: 0; right: 0; text-align: center; font-size: clamp(1.7rem, 6vw, 2.6rem); color: var(--sun); text-shadow: 2px 2px 0 var(--ink); animation: hintBob 1.6s ease-in-out infinite; }
.evo-creature { width: min(72vw, 360px); aspect-ratio: 1; margin-top: -6vh; }
.evo-creature .creature { width: 100%; height: 100%; }
.evo-creature.is-charging { animation: csShake .1s infinite; }
.evo-creature.is-charging .creature { animation: evoCharge 2.2s ease-in both; }
.evo-creature.is-new .creature { animation: evoPop 1s var(--jelly) both; }
.evo-msg { position: absolute; bottom: 16vh; display: grid; justify-items: center; gap: 4px; padding: 14px 26px; border-radius: var(--radius); background: var(--grain-paper), var(--surface); color: var(--ink);
  border: var(--border); box-shadow: 6px 7px 0 var(--ink), 0 0 50px var(--hab-2); animation: cardPopBig .9s var(--jelly); text-align: center; }
.evo-msg .label { padding: 2px 10px; border-radius: 6px; border: 2px solid var(--ink); background: var(--sun); }
.evo-msg b { font-size: 2.1rem; }
.evo-msg small { font-weight: 900; }
@keyframes evoCharge { 0% { filter: none; } 25% { filter: brightness(0) invert(1) drop-shadow(0 0 20px #fff); } 35% { filter: none; }
  50% { filter: brightness(0) invert(1) drop-shadow(0 0 30px #fff); transform: scale(1.05); } 58% { filter: none; }
  72%, 100% { filter: brightness(0) invert(1) drop-shadow(0 0 50px #fff); transform: scale(1.14); } }
@keyframes evoPop { 0% { filter: brightness(0) invert(1) drop-shadow(0 0 50px #fff); transform: scale(.6); } 45% { filter: brightness(0) invert(1) drop-shadow(0 0 40px #fff); transform: scale(1.2); }
  75% { filter: none; transform: scale(.95); } 100% { filter: none; transform: none; } }
@keyframes hintBob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
/* Compagnon sur grand écran : scène à gauche, soins et évolutions à droite (tout visible pendant les soins) */
@media (min-width: 900px) {
  .view-companion:has(.pet-scene) { max-width: 1000px; grid-template-columns: 1.15fr 1fr; align-items: start; }
  .view-companion .pet-scene { grid-row: span 2; height: clamp(400px, 68vh, 560px); }
  .view-companion .gauges, .view-companion .care-btns { grid-template-columns: 1fr; }
}
/* Onglet actif : marqué par le nœud du fil rouge (js/cord.js), plus par une tache jaune */
.nav-btn.is-active::before { display: none; }
.nav-cord { position: absolute; left: 0; right: 0; height: 12px; z-index: 2; pointer-events: none; }
.cord-line { position: absolute; left: 0; right: 0; top: 2px; height: 8px; border: 2px solid var(--ink); border-radius: 5px; box-shadow: 0 2px 0 #0003;
  background: repeating-linear-gradient(115deg, var(--cord-1) 0 6px, var(--cord-2) 6px 9px, var(--cord-1) 9px 15px, var(--cord-3) 15px 18px); }
.cord-knot { position: absolute; left: -21px; top: -27px; width: 42px; height: 33px; transition: transform .45s var(--spring); }
.cord-knot.no-move { transition: none; }
.cord-knot svg { width: 100%; height: 100%; display: block; filter: drop-shadow(2px 3px 0 var(--ink)); }
.cord-knot.is-tie svg { animation: knotTie .55s var(--jelly) .15s both; }
@keyframes knotTie { 0% { transform: scale(1.25, .75) rotate(-10deg); } 60% { transform: scale(.85, 1.15) rotate(6deg); } 100% { transform: none; } }
body.is-pip .nav-cord { display: none; }
@media (prefers-reduced-motion: reduce) { .cord-knot { transition: none; } .cord-knot.is-tie svg { animation: none; } }
.wheel-svg .w-long { font-size: 15px; }

/* =========================================================
   v4 : activités du compagnon (jeux, défis, balades) et éveil (forme 4)
   ========================================================= */
/* Éveil : décor animé propre à la forme 4 */
.creature .cr-wisp { transform-box: fill-box; transform-origin: 50% 100%; animation: crWisp 2.2s ease-in-out infinite; }
.creature .cr-leaf { transform-box: fill-box; transform-origin: center; animation: crLeaf 4.5s ease-in-out infinite; }
.creature .cr-twinkle { animation: crTwinkle 2.4s ease-in-out infinite; }
.creature.st-4:not(.sil) { filter: drop-shadow(0 0 10px #fff6c8aa); }
.creature.sil .cr-wisp, .creature.sil .cr-leaf, .creature.sil .cr-twinkle { display: none; }
@keyframes crWisp { 0%, 100% { translate: 0 0; scale: 1; opacity: .85; } 50% { translate: 0 -8px; scale: 1.08 .94; opacity: 1; } }
@keyframes crLeaf { 0% { translate: 0 -10px; rotate: -20deg; opacity: 0; } 15% { opacity: 1; } 50% { translate: 8px 14px; rotate: 30deg; } 85% { opacity: 1; } 100% { translate: -4px 40px; rotate: 80deg; opacity: 0; } }
@keyframes crTwinkle { 0%, 100% { scale: .6; opacity: .4; } 50% { scale: 1.15; opacity: 1; } }
.pet-scene.st-4 { background: radial-gradient(ellipse at 50% 92%, #fff8 0 18%, transparent 45%), radial-gradient(circle at 50% 30%, #fff6c855, transparent 60%), linear-gradient(180deg, var(--hab-1), var(--hab-2) 72%, var(--hab-3)); }
.evo-step.is-awaken.is-me { background: linear-gradient(135deg, var(--sun), #ff9ccf); }
.evo-step.is-awaken.is-locked { border-color: var(--r-mythic); }
.evo-stage.is-awaken { background: radial-gradient(circle at 50% 45%, #fff6c8, var(--hab-2) 30%, #120e33ee 60%, #07051af8 85%); }
.evo-stage.is-awaken .evo-title { color: #fff6c8; }
.evo-msg .hand { font-size: 1.15rem; max-width: 300px; text-align: center; line-height: 1.15; }
.adopt-evo .creature { width: 40px; height: 40px; }
@media (max-width: 520px) { .evo-row { gap: 2px; } .evo-step { padding: 6px 3px; } .evo-step b { font-size: .82rem; } .evo-step small { font-size: .6rem; letter-spacing: .02em; } .evo-arrow { font-size: 1.2rem; } }

/* Sous-onglets du compagnon */
.pet-tabs { width: 100%; margin: 2px 0 0; }
.pet-tabs .seg-btn { position: relative; font-size: .9rem; padding: 9px 10px; }
.pet-tabs .seg-btn + .seg-btn { border-left: 2.5px solid var(--ink); }
.pet-tabs .dot { position: absolute; top: 4px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--ink); animation: pulseDot 1.2s infinite; }
.pet-tab { display: grid; gap: 14px; animation: cardIn .35s var(--spring) both; }
.pet-tab > .small { margin: 0; }

/* Jeux */
.game-list, .trip-list { display: grid; gap: 12px; }
.game-card, .trip-card { display: grid; grid-template-columns: 74px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--surface); border: 2.5px solid var(--ink); box-shadow: 3px 4px 0 var(--ink); rotate: calc((var(--k) - 1) * .6deg); transition: transform .25s var(--jelly); }
.game-card:hover, .trip-card:hover { transform: translateY(-3px) rotate(-.6deg); }
.game-art, .trip-art { position: relative; width: 74px; height: 64px; display: grid; place-items: center; }
.game-art svg, .trip-art svg { width: 100%; height: 100%; }
.g-catch .game-art svg { position: absolute; width: 34px; height: 34px; }
.g-catch .game-art svg:nth-child(1) { left: 4px; top: 6px; rotate: -12deg; } .g-catch .game-art svg:nth-child(2) { right: 4px; top: 0; } .g-catch .game-art svg:nth-child(3) { left: 24px; bottom: 0; width: 30px; height: 38px; }
.game-info, .trip-info { display: grid; gap: 2px; min-width: 0; }
.game-info b, .trip-info b { font-size: 1.15rem; line-height: 1.05; }
.game-info small, .trip-info small { font-weight: 700; font-size: .8rem; line-height: 1.3; color: var(--ink-2); }
.trip-info small b { font-family: var(--font-body); font-size: .8rem; color: var(--ink); }
.trip-info .coin { vertical-align: -3px; }
.trip-bonus { font-size: 1.05rem !important; color: var(--accent) !important; }
.trip-card.is-here { background: var(--sun); }
.t-lake .trip-art { rotate: -4deg; } .t-crater .trip-art svg { rotate: -8deg; }
.trip-art { overflow: visible; } .trip-art svg { max-width: 100%; max-height: 100%; }
.cap-n { white-space: nowrap; }
@media (max-width: 420px) {
  .game-card, .trip-card { grid-template-columns: 56px 1fr; }
  .game-art, .trip-art { width: 56px; height: 52px; }
  .game-card > .btn, .trip-card > .btn { grid-column: 1 / -1; }
}

/* Défis du jour */
.quest-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.quest { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface); border: 2.5px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.quest:nth-child(2) { rotate: .5deg; } .quest:nth-child(3) { rotate: -.4deg; }
.q-check { width: 28px; height: 28px; display: grid; place-items: center; border: 2.5px solid var(--ink); border-radius: 7px 9px 6px 10px; background: var(--surface-2); font-family: var(--font-display); font-size: 1.1rem; color: var(--good); }
.q-main { display: grid; gap: 4px; min-width: 0; }
.q-text { font-weight: 900; font-size: .92rem; line-height: 1.2; }
.q-bar { height: 12px; }
.q-bar i::after { display: none; }
.q-reward { font-family: var(--font-display); font-size: .95rem; color: var(--ink-2); white-space: nowrap; }
.q-claim { padding: 8px 12px; animation: jellyIdle 1.6s ease-in-out infinite; white-space: nowrap; }
.q-stamp { font-family: var(--font-hand); font-size: 1.3rem; color: var(--good); rotate: -8deg; white-space: nowrap; }
.quest.is-done:not(.is-claimed) { background: #fff3c4; }
.quest.is-claimed { opacity: .72; }
.quest.is-claimed .q-text { text-decoration: line-through 2px var(--accent); }
.quest-bonus { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--radius-sm); border: 2.5px dashed var(--ink-2); background: var(--surface-2); }
.quest-bonus > div { display: grid; gap: 2px; }
.quest-bonus b { font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; display: flex; align-items: center; gap: 5px; }
.quest-bonus.is-ready { border-style: solid; border-color: var(--ink); background: linear-gradient(135deg, var(--sun), #ff9ccf); box-shadow: 3px 4px 0 var(--ink); animation: jelly .7s; }
.quest-bonus.is-claimed { border-style: solid; }

/* Balade : la maison vide, le petit marcheur au loin, la note scotchée */
.pet-scene.is-away .away-walker { position: absolute; z-index: 2; bottom: 52px; width: 64px; height: 64px; opacity: .9; animation: walkAway 9s linear infinite; }
.away-walker .creature { width: 100%; height: 100%; animation: walkHop .45s ease-in-out infinite alternate; }
@keyframes walkAway { 0% { left: 58%; scale: 1; } 50% { left: 86%; scale: .7; } 50.01% { left: 86%; scale: -.7 .7; } 100% { left: 58%; scale: -1 1; } }
@keyframes walkHop { from { translate: 0 0; } to { translate: 0 -6px; } }
.away-note { position: absolute; z-index: 3; left: 50%; top: 50%; translate: -50% -60%; rotate: -3deg; display: grid; gap: 4px; justify-items: center; text-align: center; width: min(78%, 280px);
  padding: 22px 18px 16px; background: var(--grain-paper), var(--surface); border: var(--border); border-radius: 6px 10px 5px 12px; box-shadow: var(--shadow); }
.away-note .hand { font-size: 1.3rem; color: var(--accent); }
.away-note b { font-size: 1.3rem; line-height: 1.05; }
.away-note small { font-weight: 900; }
.away-note .progress { width: 100%; height: 14px; margin-top: 4px; }
.tape { position: absolute; top: -12px; left: 50%; translate: -50% 0; rotate: 4deg; width: 84px; height: 22px; background: var(--tape-2); border: 1.5px solid #1b163822; }
.trip-claim { animation: jellyIdle 1.6s ease-in-out infinite; white-space: nowrap; padding: 8px 16px; }
.pet.is-home .creature { animation: petHappy .7s var(--jelly) 3; }
.pet.is-leaving { transition: transform 1s ease-in, opacity 1s ease-in; transform: translateX(60%) scale(.4); opacity: 0; }

/* Carte postale (retour de balade) */
.postcard { position: relative; display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center; padding: 18px 14px 14px; margin-top: 6px; border-radius: 6px 10px 5px 12px;
  border: var(--border); box-shadow: 4px 5px 0 var(--ink); rotate: -1.5deg; background: var(--grain-paper), repeating-linear-gradient(transparent 0 25px, var(--surface-line) 25px 27px) 0 10px, var(--surface); }
.postcard-art { width: 110px; height: 90px; display: grid; place-items: center; background: var(--surface-2); border: 2.5px solid var(--ink); border-radius: 6px; rotate: 3deg; padding: 6px; }
.postcard-art svg { width: 100%; height: 100%; }
.postcard-text { display: grid; gap: 2px; }
.postcard-text > .hand:first-child { color: var(--accent); font-size: 1.15rem; }
.postcard-text b { font-size: 1.2rem; line-height: 1.05; }
.postcard-note { font-size: 1.35rem; line-height: 1.1; margin: 6px 0 0; }
.postcard-sign { justify-self: end; font-size: 1.2rem; color: var(--ink-2); margin: 0; }
.postcard-sign::before { content: '— '; }
.postcard-loot { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 16px 0 6px; }
.postcard-loot span { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--surface-2); font-weight: 900; box-shadow: 2px 3px 0 var(--ink); animation: popIn .5s var(--jelly) both; }
.postcard-loot span:nth-child(2) { animation-delay: .12s; } .postcard-loot span:nth-child(3) { animation-delay: .24s; }
.postcard-loot b { font-family: var(--font-display); font-weight: 400; font-size: 1.2rem; }
.postcard-loot .is-bonus { background: var(--sun); }
@media (max-width: 420px) { .postcard { grid-template-columns: 1fr; justify-items: center; text-align: center; } .postcard-sign { justify-self: center; } }

/* ---------- Mini-jeux (plein écran) ---------- */
.mg { position: fixed; inset: 0; z-index: 24; pointer-events: auto; display: grid; grid-template-rows: auto auto 1fr; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
  background: var(--halftone), linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 60%, var(--bg-3) 100%); color: var(--on-bg); animation: fadeIn .25s; }
.mg::before { content: ''; position: absolute; inset: 0; background: var(--bg-texture); opacity: .5; pointer-events: none; }
.mg.out { animation: fadeOut .25s both; }
.mg-hud { position: relative; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 12px 16px 6px; }
.mg-title { white-space: nowrap; font-size: 1.5rem; color: var(--sun); text-shadow: 2px 2px 0 var(--ink); rotate: -2deg; }
.mg-score { white-space: nowrap; margin-left: auto; padding: 4px 14px; border-radius: 999px; background: var(--surface); color: var(--ink); border: var(--border); box-shadow: 3px 3px 0 var(--ink); font-family: var(--font-display); font-size: 1.25rem; }
.mg-score.is-up { animation: jelly .4s; }
.mg-quit { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--surface); color: var(--ink); border: var(--border); box-shadow: 2px 3px 0 var(--ink); font-size: 1.6rem; line-height: 1; font-weight: 900; }
.mg-score[hidden] + .mg-quit, .mg-hud .mg-quit:only-child { margin-left: auto; }
.mg-timer { grid-row: 2; position: relative; z-index: 3; height: 14px; margin: 0 16px; border: var(--border); border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.mg-timer i { display: block; height: 100%; width: 100%; background: repeating-linear-gradient(-55deg, var(--accent-2) 0 8px, #8fdcff 8px 16px); }
.mg-field { grid-row: 3; position: relative; z-index: 2; width: min(100%, 560px); justify-self: center; overflow: hidden; }
.mg-msg { position: fixed; z-index: 5; left: 0; right: 0; top: 30%; text-align: center; font-size: clamp(2rem, 9vw, 3.4rem); color: var(--sun); text-shadow: 3px 3px 0 var(--ink); pointer-events: none; }
.mg-msg.pop { animation: popIn .45s var(--jelly); }
.mg-card { position: fixed; z-index: 6; left: 50%; top: 50%; translate: -50% -50%; width: min(420px, calc(100% - 32px)); color: var(--ink); display: grid; gap: 8px; justify-items: center; text-align: center; animation: popIn .45s var(--jelly); }
.mg-card p { margin: 0; }
.mg-card .row-end { width: 100%; margin-top: 6px; }
.mg-intro-art { display: flex; justify-content: center; align-items: end; gap: 6px; height: 80px; }
.mg-intro-art svg { height: 64px; width: auto; }
.mg-hide .mg-intro-art svg { height: 76px; }
.mg-result { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: center; text-align: left; }
.mg-result .creature { width: 110px; height: 110px; animation: petHappy .8s var(--jelly) 2; }
.mg-result > div { display: grid; gap: 4px; }
.mg-big { font-family: var(--font-display); font-weight: 400; font-size: 2.6rem; line-height: 1; }
.mg-xp { font-family: var(--font-display); font-size: 1.6rem; color: var(--good); }
.mg-xp small { font-family: var(--font-body); font-size: .75rem; color: var(--ink-2); }
.mg-noxp { font-size: 1.2rem; line-height: 1.1; }
@media (max-width: 400px) { .mg-result { grid-template-columns: 1fr; justify-items: center; text-align: center; } }

/* Pluie de comètes */
.mg-pet { position: absolute; left: 0; bottom: 8px; aspect-ratio: 1; will-change: transform; filter: drop-shadow(3px 4px 0 #1b163866); }
.mg-pet .creature { width: 100%; height: 100%; transform-origin: 50% 90%; }
.mg-pet.is-catch .creature { animation: petEat .35s ease-in-out; }
.mg-pet.is-hit .creature { animation: petRefuse .45s ease-in-out, mgHit .45s ease-in-out; }
@keyframes mgHit { 0%, 70% { filter: brightness(.7) sepia(.5); } 100% { filter: none; } }
.mg-item { position: absolute; left: 0; top: 0; width: 44px; height: 44px; will-change: transform; pointer-events: none; }
.mg-item svg { width: 100%; height: 100%; display: block; filter: drop-shadow(2px 3px 0 #1b163866); }
.mg-item.k-shard svg { animation: spinSlow 2.4s linear infinite; }
.mg-item.k-gold svg { animation: spinSlow 1.6s linear infinite reverse; filter: drop-shadow(0 0 8px #ffd84a); }
.mg-item.k-rock { height: 56px; }
@keyframes spinSlow { to { rotate: 360deg; } }

/* Cache-cache */
.mg-hide .mg-field { background: radial-gradient(ellipse at 50% 78%, #fff3 0 30%, transparent 60%); }
.mg-hidepet { position: absolute; left: 0; top: 0; aspect-ratio: 1; opacity: 0; transition: opacity .25s; z-index: 1; }
.mg-hidepet .creature { width: 100%; height: 100%; }
.mg-hidepet.is-show { opacity: 1; }
.mg-hidepet.is-found .creature { animation: petPoke .6s var(--jelly) 2; }
.mg-hat { position: absolute; left: 0; top: 0; z-index: 2; aspect-ratio: 120 / 92; padding: 0; background: none; border: 0; cursor: pointer; filter: drop-shadow(3px 5px 0 #1b163880); }
.mg-hat svg { width: 100%; height: 100%; display: block; }
.mg-hat.is-moving { transition: transform .45s var(--spring); }
.mg-hat:not(:disabled):hover svg { animation: jelly .5s; }
.mg-hat:disabled { cursor: default; }
.mg-hat.is-empty svg { opacity: .55; }

/* Chant des grelots */
.mg-song .mg-field { display: grid; grid-template-rows: 1fr auto; justify-items: center; padding-bottom: 6vh; }
.mg-singer { position: relative; width: min(46vw, 220px); aspect-ratio: 1; align-self: center; }
.mg-singer .creature { width: 100%; height: 100%; transform-origin: 50% 90%; }
.mg-singer.is-sing .creature { animation: petHappy .4s var(--jelly); }
.mg-note { position: absolute; right: -6px; top: 4px; font-size: 2.4rem; font-weight: 900; opacity: 0; -webkit-text-stroke: 1.5px var(--ink); }
.mg-singer.is-sing .mg-note { animation: noteUp .6s ease-out; }
@keyframes noteUp { 0% { opacity: 0; translate: 0 10px; } 30% { opacity: 1; } 100% { opacity: 0; translate: 14px -30px; rotate: 15deg; } }
.mg-bells { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(6px, 3vw, 18px); width: min(100%, 520px); padding: 0 12px; }
.mg-bell { aspect-ratio: 80 / 96; padding: 6px; border-radius: 18px 22px 16px 24px; background: var(--surface); border: var(--border); box-shadow: 3px 5px 0 var(--ink); transition: transform .15s var(--jelly), box-shadow .15s; }
.mg-bell:nth-child(odd) { rotate: -2deg; } .mg-bell:nth-child(even) { rotate: 2deg; translate: 0 -10px; }
.mg-bell svg { width: 100%; height: 100%; display: block; transform-origin: 50% 8%; }
.mg-bell:not(:disabled):active { transform: translateY(3px); box-shadow: var(--shadow-press); }
.mg-bell:disabled { cursor: default; }
.mg-bell.is-ring { background: #fff6c8; box-shadow: 0 0 0 5px var(--bc), 0 0 26px var(--bc); }
.mg-bell.is-ring svg { animation: bellRing .45s ease-in-out; }
.mg-bell.is-wrong { background: var(--bad); animation: petRefuse .4s; }
.mg-bell.is-hint { outline: 4px dashed var(--sun); outline-offset: 4px; }
@keyframes bellRing { 25% { rotate: 14deg; } 50% { rotate: -12deg; } 75% { rotate: 6deg; } }

/* Fenêtres sur écran bas (activité Discord sur ordinateur) : tout tient sans défiler, ou presque */
@media (min-width: 480px) { .login-grid { grid-template-columns: repeat(7, 1fr); } }
@media (max-height: 560px) {
  .modal-wrap { padding-top: 22px; }
  .modal { gap: 8px; padding: 16px 18px 14px; }
  .modal h2 { font-size: 1.35rem; }
  .modal p { margin: 0; font-size: .9rem; }
  .login-flame { margin-top: -34px; width: 64px; height: 66px; }
  .login-flame .flame-ico { width: 56px; height: 66px; }
  .flame-count { font-size: 1rem; min-width: 30px; right: -16px; }
  .login-cell { padding: 4px 2px; }
  .login-cell .coin { width: 14px; height: 14px; }
  .milestone { font-size: 1.1rem; }
  .modal .btn-big { padding: 9px 20px; font-size: 1.05rem; }
}

/* =========================================================
   Missions : 3 emplacements (côte à côte sur grand écran, les uns sous les autres sinon)
   ========================================================= */
.mission-slots { display: grid; gap: 44px; }
.mission-slots .ritual { padding-top: 56px; align-content: center; }
.mission-slots .flip-in { animation: flipIn .6s var(--spring) both; }
.mission-slots .mission .peek { width: 72px; bottom: -36px; }
.mission-slots .mission .phone-stk.peek { width: 46px; bottom: -46px; }
@media (min-width: 980px) {
  .view-missions { max-width: 1200px; }
  .mission-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
  .mission-slots .mission { display: flex; flex-direction: column; gap: 10px; padding: 24px 16px 16px; }
  .mission-slots .mission-num { font-size: 2.5rem; }
  .mission-slots .mission-title { font-size: 1.2rem; }
  .mission-slots .mission-note { align-self: flex-end; }
  .mission-slots .mission-foot { margin-top: auto; padding-top: 6px; }
  .mission-slots .mission .stamp { right: 14px; top: 16px; }
  .mission-slots .ritual .big-q { font-size: 1.6rem; }
  .mission-slots .braid { width: 210px; }
}

/* =========================================================
   Profil : bio, pass de combat, jeu favori ; carte d'un autre joueur
   ========================================================= */
.pf-label { display: inline-flex; align-items: center; gap: 6px; font-size: .66rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.pf-label .ico { width: 1.5em; height: 1.5em; }
.bio-note { position: relative; display: grid; gap: 4px; margin: 6px 18px 18px; padding: 14px 16px 12px; background: var(--surface-2); border: 2.5px solid var(--ink);
  border-radius: var(--radius-sm); box-shadow: 3px 3px 0 var(--ink); transform: rotate(-.5deg); }
.bio-note::before { content: ''; position: absolute; top: -11px; left: 26px; width: 72px; height: 20px; background: var(--tape-1); transform: rotate(-5deg); }
.bio-text { margin: 0; font-family: var(--font-hand); font-size: 1.5rem; line-height: 1.15; white-space: pre-line; overflow-wrap: anywhere; }
.bio-text.is-empty { color: var(--ink-2); font-size: 1.25rem; }
.bio-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.bio-edit { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; padding: 5px 10px; box-shadow: 2px 2px 0 var(--ink); }
.bio-edit .ico { width: 1.2em; height: 1.2em; }
.bio-input { margin-top: 10px; font-family: var(--font-hand); font-size: 1.45rem; line-height: 1.2; text-align: left; resize: none; }
.bio-count { margin: 4px 0 0; text-align: right; }
.pf-highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; padding: 0 18px 18px; }
.pf-tile { display: grid; gap: 6px; align-content: start; padding: 12px 14px; border: var(--border); border-radius: var(--radius-sm); box-shadow: 4px 4px 0 var(--ink); }
.pf-pass { background: color-mix(in srgb, var(--sun) 50%, var(--surface)); transform: rotate(-1deg); }
.pf-fav { background: color-mix(in srgb, var(--accent-2) 32%, var(--surface)); transform: rotate(1deg); }
.pf-big { margin: 0; font-family: var(--font-display); font-size: 1.7rem; line-height: 1; }
.pf-big small { margin-left: 6px; font-family: var(--font-body); font-weight: 900; font-size: .85rem; color: var(--ink-2); }
.pf-pass .progress { height: 14px; margin: 4px 8px 0 0; }
.pf-pass .progress i::after { width: 14px; height: 14px; margin-top: -7px; right: -6px; }
.pf-season { font-size: 1.1rem; color: var(--cord-1); }
.pf-game { display: flex; align-items: center; gap: 10px; }
.pf-game .ag-art { width: 60px; height: 52px; }
.pf-game .ag-art .ch-piece { width: 52px; height: 52px; }
.pf-game .ag-cards { scale: .78; } /* les 2 cartes du Blackjack débordaient sur le nom du jeu */
.pf-game .pf-big { font-size: 1.35rem; }
.pf-none { margin: 2px 0 0; font-size: 1.2rem; line-height: 1.1; color: var(--ink-2); }
/* Joueur cliquable (classements, salon des jeux) : ouvre sa carte */
.pf-link { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; font: inherit; text-align: left; }
.ag-online li { grid-template-columns: minmax(0, 1fr) auto; }
@media (min-width: 560px) { .ag-online li { grid-template-columns: minmax(0, 1fr) auto auto; } }
.board-row[data-profile] { cursor: pointer; transition: transform .25s var(--jelly); }
.board-row[data-profile]:hover { transform: translateX(4px); }
.pf-modal .member-body { padding: 0 0 14px; }
.pf-modal .photo { padding: 16px; }
.pf-modal .member-body h2 { font-size: 1.6rem; overflow-wrap: anywhere; }
.pf-modal .bio-note { margin: 6px 0 18px; }
.pf-modal .pf-highlights, .pf-modal .stats { padding-left: 0; padding-right: 0; }

/* Mission du jour et bonus des 3 missions (au-dessus des emplacements) */
.mission-top { display: grid; gap: 12px; }
.daily { display: grid; grid-template-columns: 1fr auto; gap: 8px 18px; align-items: center; padding: 16px 18px; border: 3px solid var(--ink);
  background: var(--grain-paper), color-mix(in srgb, var(--sun) 28%, var(--surface)); transform: rotate(-.4deg); }
.daily-tag { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.daily-tag .hand { font-size: 1.35rem; color: var(--cord-1); transform: rotate(-2deg); }
.daily .mission-title { font-size: 1.2rem; margin-bottom: 8px; }
.daily .progress-label { margin: 4px 0 0; }
.daily-foot { display: grid; gap: 8px; justify-items: end; }
.daily.is-claimed { opacity: .8; }
.daily.is-claimed .progress i { background: var(--good); animation: none; }
.daily-done { font-size: 1.15rem; color: var(--good); text-align: right; }
.mission-bonus { margin: 0; padding: 8px 14px; border-radius: var(--radius-sm); background: #1b1638e6; position: relative; z-index: 1; color: var(--on-bg); font-weight: 900; font-size: .9rem; justify-self: start; }
.mission-bonus.is-done { color: var(--mint); display: inline-flex; gap: 6px; align-items: center; }
.mission-bonus .ico { width: 1.2em; height: 1.2em; }
@media (max-width: 520px) { .daily { grid-template-columns: 1fr; } .daily-foot { justify-items: start; } }
@media (min-width: 980px) { .view-missions .mission-top { max-width: 760px; } }

/* =========================================================
   Profil enrichi : sous-onglets, titre, vitrine de succès, records, succès, historique, choix du titre et du fond
   ========================================================= */
.pf-subs { justify-self: center; color: var(--ink); }
.pf-subs .seg-btn + .seg-btn { border-left: 2.5px solid var(--ink); }
.pf-title { margin: 0 0 4px; font-family: var(--font-hand); font-size: 1.35rem; line-height: 1.1; color: var(--accent); }
.pf-style { display: flex; gap: 10px; flex-wrap: wrap; padding: 0 18px 14px; }
.pf-style .btn { display: inline-flex; gap: 6px; align-items: center; font-size: .8rem; padding: 6px 12px; box-shadow: 2px 2px 0 var(--ink); }
.pf-style .ico { width: 1.2em; height: 1.2em; }
.pf-showcase { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; width: calc(100% - 36px); margin: 0 18px 16px; padding: 10px 14px;
  border: 2.5px dashed var(--ink-2); border-radius: var(--radius-sm); color: inherit; font: inherit; text-align: left; }
button.pf-showcase { transition: border-color .2s, transform .3s var(--jelly); }
button.pf-showcase:hover { border-style: solid; border-color: var(--ink); transform: rotate(-.5deg); }
.pf-medals { display: flex; gap: 12px; flex-wrap: wrap; }
.pf-medal { display: grid; justify-items: center; gap: 2px; max-width: 92px; text-align: center; }
.pf-medal small { font-size: .68rem; font-weight: 900; line-height: 1.1; }
.pf-records { margin: 0 18px 16px; }
.pf-records dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 4px 16px; margin: 6px 0 0; }
.pf-records dl div { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 2px dotted var(--surface-line); }
.pf-records dt { font-weight: 700; font-size: .85rem; }
.pf-records dd { margin: 0; font-weight: 900; font-size: .85rem; white-space: nowrap; }
.pf-toggles { display: flex; gap: 8px; flex-wrap: wrap; }
.sound-toggle.is-off { opacity: .6; }
.pf-modal .pf-showcase, .pf-modal .pf-records { width: auto; margin-left: 0; margin-right: 0; }
.medal { flex: none; filter: drop-shadow(2px 2px 0 #1b163844); }

.ach-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.ach-head p { margin: 0; }
.ach-group h3 { margin: 6px 4px 8px; color: var(--on-bg); }
.ach-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.ach { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; color: var(--ink);
  background: var(--grain-paper), var(--surface); border: 2.5px solid var(--ink); border-radius: var(--radius-sm); box-shadow: 3px 3px 0 var(--ink); }
.ach.is-locked .ach-medal { filter: grayscale(1) opacity(.45); }
.ach.is-unlocked:not(.is-claimed) { background: var(--grain-paper), color-mix(in srgb, var(--sun) 32%, var(--surface)); }
.ach-txt { display: grid; gap: 2px; min-width: 0; }
.ach-txt b { font-size: .95rem; }
.ach-txt small { font-size: .78rem; }
.ach-bar { height: 8px; margin-top: 3px; border-radius: 99px; background: var(--surface-2); border: 2px solid var(--ink); overflow: hidden; }
.ach-bar i { display: block; height: 100%; background: var(--accent-2); }
.ach-reward { display: inline-flex; gap: 4px; align-items: center; font-weight: 900; color: var(--ink-2); }
.ach-side .btn { padding: 6px 12px; font-size: .82rem; }
.ach-ok .ico, .ch-ok .ico { width: 24px; height: 24px; color: var(--good); }

.hist { list-style: none; padding: 0; margin: 6px 0 0; display: grid; }
.hist li { display: grid; grid-template-columns: 116px 1fr auto; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 2px dashed var(--surface-line); font-size: .9rem; }
.hist-when { color: var(--ink-2); font-size: .78rem; font-weight: 700; }
.hist-delta { font-family: var(--font-display); font-weight: 400; }
.hist-gain .hist-delta { color: var(--good); }
.hist-spend .hist-delta { color: var(--bad); }
.hist-status { padding: 3px 8px; border-radius: 99px; border: 2px solid var(--ink); background: var(--sun); font-size: .72rem; font-weight: 900; white-space: nowrap; }
.hist-status.is-done { background: var(--mint); }
@media (max-width: 460px) { .hist li { grid-template-columns: 1fr auto; } .hist-when { grid-column: 1 / -1; } }

.pick-list { display: grid; gap: 8px; margin: 10px 0; max-height: 50vh; overflow: auto; padding: 2px; }
.pick { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; text-align: left; color: var(--ink);
  background: var(--surface-2); border: 2.5px solid var(--ink); border-radius: var(--radius-sm); font-weight: 900; }
.pick.is-on { background: var(--sun); box-shadow: 3px 3px 0 var(--ink); }
.pick.is-locked { opacity: .55; border-style: dashed; font-weight: 700; }
.pick small { font-size: .75rem; font-weight: 700; color: var(--ink-2); text-align: right; }
.bg-grid { list-style: none; padding: 2px; margin: 10px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; max-height: 55vh; overflow: auto; }
.bg-pick { display: grid; gap: 4px; align-content: start; padding: 8px; background: var(--surface); border: 2.5px solid var(--ink); border-radius: var(--radius-sm); }
.bg-pick.is-on { box-shadow: 0 0 0 4px var(--sun); }
.bg-pick.is-locked .bg-swatch { filter: saturate(.6); opacity: .85; }
.bg-pick b { font-size: .85rem; }
.bg-pick small { font-size: .7rem; line-height: 1.2; color: var(--ink-2); }
.bg-pick .btn { justify-self: start; display: inline-flex; gap: 4px; align-items: center; padding: 5px 10px; font-size: .78rem; }

/* Fonds de carte : --bg-head = bandeau du haut (vif), --bg-paper = teinte légère du papier (le texte reste lisible) */
.bg-card { --bg-head: var(--chest); --bg-paper: linear-gradient(transparent, transparent); }
.member-card.bg-card { background: var(--bg-paper), var(--grain-paper), var(--surface); }
.member-card.bg-card header { background: var(--bg-head); }
.pf-modal.bg-card { margin: -26px -22px -20px; padding: 0 22px 20px; border-radius: inherit; background: var(--bg-paper); }
.pf-modal.bg-card::before { content: ""; display: block; height: 52px; margin: 0 -22px 14px; background: var(--bg-head); border-bottom: var(--border); border-radius: 15px 19px 0 0; }
.bg-swatch { display: block; height: 64px; border-radius: var(--radius-sm); border: 2.5px solid var(--ink); background: var(--grain-paper), var(--surface); }
.bg-swatch.bg-card { background: var(--bg-head); }
.bg_dusk { --bg-head: linear-gradient(115deg, #ffb35a, #ff6b8b 45%, #6b4fc8); --bg-paper: linear-gradient(180deg, #ff9a5a1f, #6b4fc81a); }
.bg_lake { --bg-head: radial-gradient(ellipse 60px 18px at 72% 70%, transparent 0 40%, #ffffff66 42% 47%, transparent 49% 66%, #ffffff40 68% 72%, transparent 74%),
  radial-gradient(ellipse 40px 12px at 24% 40%, transparent 0 40%, #ffffff55 42% 50%, transparent 52%), linear-gradient(180deg, #2b3f8f, #3a8fd0 65%, #8fdcff);
  --bg-paper: linear-gradient(180deg, #5cc8ff12, #5cc8ff2a); }
.bg_sakura { --bg-head: radial-gradient(ellipse 7px 4px at 15% 30%, #fff 60%, transparent 66%), radial-gradient(ellipse 6px 4px at 40% 70%, #fff 60%, transparent 66%),
  radial-gradient(ellipse 7px 4px at 66% 25%, #fff 60%, transparent 66%), radial-gradient(ellipse 5px 3px at 86% 64%, #fff 60%, transparent 66%), linear-gradient(135deg, #ffc2da, #ff7fb0);
  --bg-paper: radial-gradient(ellipse 7px 4px at 80% 20%, #ff9ccf55 60%, transparent 66%) 0 0 / 160px 140px, radial-gradient(ellipse 6px 4px at 20% 70%, #ff9ccf44 60%, transparent 66%) 0 0 / 130px 120px; }
.bg_festival { --bg-head: radial-gradient(circle, #ffe9a8 0 4px, #ffd84a 5px 7px, #e8343a 8px 12px, transparent 13px) 0 55% / 46px 100%, linear-gradient(180deg, #2a1240, #5a1c3c);
  --bg-paper: linear-gradient(180deg, #e8343a14, #ffd84a1c); }
.bg_tokyo { --bg-head: linear-gradient(0deg, #11132e 0 34%, transparent 34%), repeating-linear-gradient(90deg, transparent 0 9px, #ffd84a88 9px 12px, transparent 12px 22px) 0 100% / 100% 40% no-repeat,
  radial-gradient(1.5px 1.5px at 12% 25%, #fff, transparent), radial-gradient(1.5px 1.5px at 58% 15%, #fff, transparent), linear-gradient(180deg, #0d1030, #3a2a80 70%, #ff6b8b);
  --bg-paper: linear-gradient(180deg, #3a2a8014, #ff6b8b14); }
.bg_comet { --bg-head: linear-gradient(162deg, transparent 38%, #5cc8ffcc 45%, transparent 52%), linear-gradient(172deg, transparent 42%, #ff9ccfcc 49%, transparent 56%),
  radial-gradient(circle at 18% 22%, #fff 0 3px, #fff8 4px, transparent 8px), linear-gradient(180deg, #1b1a5a, #4b3487);
  --bg-paper: linear-gradient(165deg, transparent 30%, #5cc8ff14 40%, #ff9ccf14 50%, transparent 60%); }
.bg_twilight { --bg-head: linear-gradient(90deg, #ffb35a, #ff6b8b 35%, #8a5cff 68%, #2b2a7a); --bg-paper: linear-gradient(90deg, #ffb35a14, #8a5cff18); }
.bg_moon { --bg-head: radial-gradient(circle at 82% 45%, #fff7d6 0 16px, #fff7d655 17px 24px, transparent 25px), radial-gradient(1.5px 1.5px at 20% 30%, #fff, transparent),
  radial-gradient(1.5px 1.5px at 45% 70%, #fff, transparent), linear-gradient(180deg, #141a4a, #2c2f7a); --bg-paper: radial-gradient(circle at 90% 0%, #fff7d633, transparent 40%); }
.bg_aurora { --bg-head: radial-gradient(ellipse at 30% -10%, #6dffb0cc, transparent 60%), radial-gradient(ellipse at 75% 0%, #ff9ccfaa, transparent 55%), linear-gradient(100deg, #0f1f3a, #1d4d5a);
  --bg-paper: radial-gradient(ellipse at 30% 0%, #6dffb022, transparent 50%), radial-gradient(ellipse at 80% 0%, #ff9ccf1c, transparent 45%); }
.bg_kumihimo { --bg-head: repeating-linear-gradient(-55deg, var(--cord-1) 0 8px, var(--cord-2) 8px 16px, var(--cord-3) 16px 20px, var(--cord-1) 20px 28px);
  --bg-paper: repeating-linear-gradient(-55deg, transparent 0 40px, #e8343a0d 40px 46px); }
.bg_starfall { --bg-head: linear-gradient(150deg, transparent 30%, #ffffffaa 31%, transparent 34%), linear-gradient(150deg, transparent 62%, #ffffff88 63%, transparent 65%),
  radial-gradient(1.5px 1.5px at 10% 70%, #fff, transparent), radial-gradient(2px 2px at 35% 25%, #ffd84a, transparent), radial-gradient(1.5px 1.5px at 80% 40%, #fff, transparent),
  linear-gradient(180deg, #0b0d2a, #26206a); --bg-paper: radial-gradient(2px 2px at 30% 40%, #ffd84a66, transparent) 0 0 / 90px 90px; }
.bg_podium { --bg-head: linear-gradient(100deg, #d99a00, #ffd84a 30%, #fff2b8 50%, #ffd84a 70%, #d99a00); --bg-paper: linear-gradient(180deg, #ffd84a22, #ffd84a0a); }
.member-card.bg_podium header { background-size: 200% 100%; animation: shine 3s linear infinite; }

/* Défi du serveur (en haut des Missions) */
.challenge { display: grid; gap: 10px; padding: 16px 18px; color: var(--ink); border: 3px solid var(--ink); background: var(--grain-paper), color-mix(in srgb, var(--accent-2) 22%, var(--surface)); }
.ch-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.ch-head .hand { font-size: 1.4rem; color: var(--cord-1); transform: rotate(-2deg); }
.ch-title { font-size: 1.2rem; font-weight: 900; }
.ch-bar { position: relative; height: 22px; margin: 8px 12px 10px; border: var(--border); border-radius: 99px; background: var(--surface-2); }
.ch-bar > i { display: block; height: 100%; min-width: 10px; border-radius: 99px; background: linear-gradient(90deg, var(--accent-2), var(--accent-3)); transition: width .6s var(--ease); }
.ch-mark { position: absolute; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; display: grid; place-items: center; border-radius: 50%;
  background: var(--surface); border: 2.5px solid var(--ink); font-weight: 900; font-size: .75rem; }
.ch-mark.is-on { background: var(--sun); }
.ch-total { margin: 0; font-weight: 700; }
.ch-total small { color: var(--ink-2); }
.ch-tiers { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.ch-tiers li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; background: #ffffff66; border: 2px dashed var(--ink-2); font-size: .9rem; }
.ch-tiers li.is-on { border-style: solid; border-color: var(--ink); }
.ch-tiers .btn { padding: 5px 12px; font-size: .8rem; }
.ch-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.ch-top .label { width: 100%; }
.ch-who { display: inline-flex; align-items: center; gap: 6px; }
.ch-who small { font-weight: 900; font-size: .78rem; }
.ch-prev { display: grid; gap: 6px; padding-top: 8px; border-top: 2px dashed var(--ink-2); }
.ch-prev .hand { margin: 0; font-size: 1.15rem; }

/* Pass : fin de saison */
.pass-season ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.season-rewards li { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.season-rewards b { min-width: 72px; }
.season-result { width: 110px; margin: 0 auto; }
