/* Saute Mouton — interface « arcade » : couleurs vives, gros boutons ronds à contour épais, tout au pouce. */
:root {
  --ink: #2a1650;
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  --font: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Baloo 2", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; background: #2aa9ff; overscroll-behavior: none; }
body {
  font-family: var(--font); font-weight: 900; color: #fff;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none;
  position: fixed; inset: 0;
}
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; touch-action: manipulation; }
.hidden { display: none !important; }
.grow { flex: 1 1 0; min-height: 8px; }
.ic { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.28em; overflow: visible;
  stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; fill: none; paint-order: normal; }
.ic * { paint-order: normal; }
.ic.img { object-fit: contain; pointer-events: none; }
.st:not(.on) .ic.img, .hearts span:not(.on) .ic.img { filter: grayscale(1) brightness(.45); opacity: .55; }
.rowi { display: inline-flex; align-items: center; gap: 10px; }

/* ── Écrans ── */
.screen {
  position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: calc(var(--st) + 14px) 18px calc(var(--sb) + 18px);
  max-width: 520px; margin: 0 auto;
}
.screen.s-pause, .screen.s-result, .screen.s-shop, .screen.s-settings, .screen.s-coins, .screen.s-langs, .screen.s-vip { max-width: none; background: rgba(34, 14, 78, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.screen.s-pause > *, .screen.s-result > *, .screen.s-shop > *, .screen.s-settings > *, .screen.s-coins > *, .screen.s-langs > *, .screen.s-vip > * { width: 100%; max-width: 480px; }
.screen.s-home { background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(30, 10, 70, .45) 100%); }

.top { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; }
.top h2 { font-size: 26px; letter-spacing: .5px; -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; }
.top .sp { width: 52px; }

.pill {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-radius: 22px;
  background: rgba(30, 12, 70, .78); border: 3px solid var(--ink); font-size: 19px; box-shadow: 0 3px 0 rgba(0, 0, 0, .25);
}
.pill .ic { width: 24px; height: 24px; }
button.pill { color: #fff; font-weight: 900; }
button.pill:active { transform: translateY(2px); }
.pill .plus { font-style: normal; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(180deg, #8ff06a, #22b455); border: 2px solid var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: 17px; line-height: 1; margin-right: -6px; }
.ic.gold { color: #ffe45c; }

.round {
  width: 52px; height: 52px; border-radius: 50%; font-size: 24px; line-height: 1; flex: none;
  background: linear-gradient(180deg, #ffffff, #dfe6ff); color: var(--ink);
  border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
}
.round:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }

/* ── Titre ── */
.logoimg { width: min(68vw, 300px); height: auto; margin-top: -1vh; filter: drop-shadow(0 8px 0 rgba(30, 12, 70, .35)); animation: bob 2.6s ease-in-out infinite; pointer-events: none; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-1.5deg) scale(1.02); } }

/* ── Boutons : bonbons brillants — reflet en haut, liseré clair, socle épais, ombre colorée ── */
.btn {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; flex-direction: row; overflow: hidden;
  min-height: 60px; padding: 10px 16px; border-radius: 24px; font-size: 21px; letter-spacing: .4px; color: #fff;
  border: 4px solid var(--ink);
  box-shadow: 0 8px 0 var(--ink), 0 14px 18px rgba(24, 8, 60, .38), inset 0 0 0 3px rgba(255, 255, 255, .32), inset 0 -9px 0 rgba(0, 0, 0, .16);
  -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill;
  transition: transform .07s, box-shadow .07s, filter .07s;
}
.btn::before {                                        /* le reflet */
  content: ""; position: absolute; left: 7px; right: 7px; top: 6px; height: 40%; pointer-events: none;
  border-radius: 16px 16px 60% 60% / 14px 14px 22px 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, .06));
}
.btn > * { position: relative; z-index: 1; }
.btn:active { transform: translateY(6px); filter: brightness(.94);
  box-shadow: 0 2px 0 var(--ink), 0 4px 6px rgba(24, 8, 60, .3), inset 0 0 0 3px rgba(255, 255, 255, .32), inset 0 -4px 0 rgba(0, 0, 0, .16); }
.btn em { font-style: normal; font-size: 28px; line-height: 1; display: flex; align-items: center; justify-content: center;
  width: 50px; height: 50px; border-radius: 50%; background: rgba(255, 255, 255, .92); border: 3px solid var(--ink); box-shadow: inset 0 -4px 0 rgba(42, 22, 80, .14); }
.btn em .ic { width: 30px; height: 30px; }
.btn small { display: block; font-size: 14px; opacity: .97; -webkit-text-stroke: 3px var(--ink); }
.btn.big { width: 100%; min-height: 92px; font-size: 40px; border-radius: 32px; flex-direction: column; gap: 0; line-height: 1.05; border-width: 5px;
  box-shadow: 0 10px 0 var(--ink), 0 18px 24px rgba(24, 8, 60, .42), inset 0 0 0 4px rgba(255, 255, 255, .36), inset 0 -11px 0 rgba(0, 0, 0, .16); }
.btn.big::before { border-radius: 22px 22px 60% 60% / 18px 18px 26px 26px; }
.btn.big::after {                                     /* éclat qui balaie le bouton principal */
  content: ""; position: absolute; top: -20%; bottom: -20%; width: 28%; left: -40%; transform: skewX(-22deg); pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .55), rgba(255, 255, 255, 0)); animation: sweep 2.8s ease-in-out infinite;
}
@keyframes sweep { 0%, 55% { left: -40%; } 100% { left: 130%; } }
.btn.big .ic { width: 1.1em; height: 1.1em; }
.btn.wide { width: 100%; }
.btn.sm { min-height: 44px; font-size: 16px; border-radius: 16px; border-width: 3px; padding: 4px 14px; -webkit-text-stroke: 3px var(--ink);
  box-shadow: 0 5px 0 var(--ink), inset 0 0 0 2px rgba(255, 255, 255, .3), inset 0 -5px 0 rgba(0, 0, 0, .14); }
.btn.sm::before { left: 4px; right: 4px; top: 3px; border-radius: 11px 11px 50% 50% / 9px 9px 14px 14px; }
.btn.sm:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn.sm .ic { width: 20px; height: 20px; }
.yellow { background: linear-gradient(180deg, #fff06a 0%, #ffc52e 48%, #ff8f14 100%); }
.blue { background: linear-gradient(180deg, #7fe3ff 0%, #3aa0ff 50%, #2a62f0 100%); }
.pink { background: linear-gradient(180deg, #ffa6dc 0%, #ff5fa8 50%, #f0307c 100%); }
.green { background: linear-gradient(180deg, #b0ff7a 0%, #46cf5e 50%, #17a046 100%); }
.red { background: linear-gradient(180deg, #ff9f8f 0%, #f5483f 50%, #d01f24 100%); }
.grey { background: linear-gradient(180deg, #d9dcf2 0%, #a0a5cc 50%, #777ca8 100%); }
.pulse { animation: pulse 1.25s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.035); } }
.pulse:active { animation: none; }
.row3 { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.row3 .btn { flex-direction: column; gap: 3px; font-size: 16px; min-height: 100px; padding: 10px 4px 12px; }
.row3 .btn .skinimg.mini { width: 44px; height: 44px; margin: 0; }
.row2 { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row2 .btn { font-size: 17px; padding: 8px 6px; }
.best { font-size: 16px; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; min-height: 22px; }
.round { position: relative; overflow: hidden; background: linear-gradient(180deg, #ffffff, #cfd8ff) !important; box-shadow: 0 6px 0 var(--ink), 0 10px 12px rgba(24, 8, 60, .3), inset 0 -5px 0 rgba(42, 22, 80, .14) !important; }
.round:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink) !important; }

/* ── Panneaux ── */
.panel {
  width: 100%; border-radius: 28px; padding: 18px 16px; display: flex; flex-direction: column; gap: 14px;
  background: linear-gradient(180deg, #7a52ff, #5a2fe0); border: 4px solid var(--ink);
  box-shadow: 0 8px 0 var(--ink), inset 0 4px 0 rgba(255, 255, 255, .28);
}
.panel.center { align-items: center; text-align: center; }
.panel.center h2 { font-size: 40px; -webkit-text-stroke: 8px var(--ink); paint-order: stroke fill; line-height: 1.05; }
.panel h2.good { color: #ffe45c; }
.panel h2.bad { color: #ffb3c7; }
.panel .sub { font-size: 17px; opacity: .92; margin-top: -8px; }
.panel.scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; max-height: calc(100vh - var(--st) - var(--sb) - 130px); }
.pop { animation: pop .35s cubic-bezier(.2, 1.5, .5, 1) both; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }

/* ── Niveaux ── */
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tab { height: 58px; border-radius: 16px; background-size: cover; background-position: 50% 62%; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); opacity: .6; filter: saturate(.7); }
.tab.on { opacity: 1; filter: none; transform: translateY(-3px); box-shadow: 0 7px 0 var(--ink), 0 0 0 3px #fff inset; }
.wbanner { height: 92px; border-radius: 18px; border: 3px solid var(--ink); background-size: cover; background-position: 50% 60%; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; box-shadow: inset 0 -40px 30px -20px rgba(30, 12, 70, .55); }
.w-meadow { background: linear-gradient(180deg, #a8f06a, #3fbf4f); }
.w-beach { background: linear-gradient(180deg, #ffe7a3, #ff9a4d); }
.w-snow { background: linear-gradient(180deg, #e8f6ff, #7cc4ff); }
.w-candy { background: linear-gradient(180deg, #ff9fe0, #b24dff); }
.wname { font-size: 24px; text-align: center; -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.lvl {
  aspect-ratio: 1; border-radius: 22px; border: 4px solid var(--ink); box-shadow: 0 6px 0 var(--ink), inset 0 3px 0 rgba(255, 255, 255, .5);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.lvl:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.lvl b { font-size: 34px; -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; line-height: 1; }
.lvl.locked { background: linear-gradient(180deg, #8a80b8, #5c5290); }
.lvl.locked b { font-size: 30px; }
.lvl.cur { animation: pulse 1.1s ease-in-out infinite; }
.stars { font-size: 15px; display: flex; gap: 1px; }
.st { color: rgba(30, 12, 70, .45); }
.st.on { color: #ffe45c; }
.st .ic { stroke-width: 2.6; }
.bigstars { font-size: 60px; line-height: 1; display: flex; gap: 4px; padding-top: 10px; }
.bigstars .st { color: rgba(30, 12, 70, .5); display: inline-block; }
.bigstars .st:nth-child(2) { transform: translateY(-12px) scale(1.15); }
.bigstars .st.on { color: #ffe45c; animation: star .45s cubic-bezier(.2, 1.8, .5, 1) both; }
@keyframes star { from { scale: 2.6; opacity: 0; rotate: -40deg; } }
.gain { font-size: 30px; display: flex; align-items: center; gap: 8px; -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; }
.gain .ic { width: 34px; height: 34px; }
.gain small { font-size: 18px; opacity: .8; }
.score { font-size: 26px; -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; }
.score b { font-size: 68px; color: #ffe45c; -webkit-text-stroke: 9px var(--ink); }

/* ── Moutons (boutique) ── */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card {
  border-radius: 20px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .16); border: 3px solid var(--ink);
}
.card.on { background: linear-gradient(180deg, #ffe45c, #ffb02e); }
.card b { font-size: 16px; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; }
.tag { min-height: 42px; display: inline-flex; align-items: center; gap: 4px; font-size: 15px; color: var(--ink); }
.skinimg { width: 104px; height: 104px; object-fit: contain; filter: drop-shadow(0 4px 0 rgba(30, 12, 70, .3)); pointer-events: none; }
.skinimg.mini { width: 44px; height: 44px; margin: -4px 0; filter: none; }
.art { width: min(52vw, 200px); height: auto; margin: -6px 0 -8px; filter: drop-shadow(0 6px 0 rgba(30, 12, 70, .3)); pointer-events: none; }
.art.dizzy { margin-top: 0; animation: dizzy 1.6s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes dizzy { 0%, 100% { rotate: -5deg; } 50% { rotate: 5deg; } }

/* ── Réglages ── */
.line > span { display: inline-flex; align-items: center; gap: 8px; }
.line { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 20px; min-height: 50px; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; }
.toggle { position: relative; width: 84px; height: 46px; border-radius: 24px; background: #5c5290; border: 3px solid var(--ink); box-shadow: inset 0 3px 0 rgba(0, 0, 0, .2); font-size: 14px; }
.toggle i { position: absolute; top: 3px; left: 3px; width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); transition: left .15s; }
.toggle.on { background: linear-gradient(180deg, #8ff06a, #22b455); }
.toggle.on i { left: 41px; }
.seg { display: flex; border: 3px solid var(--ink); border-radius: 16px; overflow: hidden; }
.seg button { width: 54px; height: 42px; background: #5c5290; font-size: 16px; }
.seg button.on { background: linear-gradient(180deg, #ffe45c, #ff9d1e); }
.ver { text-align: center; font-size: 12px; opacity: .7; font-weight: 700; }

/* ── En jeu ── */
.hud { position: fixed; z-index: 10; left: 0; right: 0; top: 0; padding: calc(var(--st) + 10px) 14px 0; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.hud .round { pointer-events: auto; width: 46px; height: 46px; font-size: 15px; letter-spacing: -1px; }
.pz { display: block; width: 17px; height: 18px; border-left: 6px solid var(--ink); border-right: 6px solid var(--ink); }
.hudrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hearts { font-size: 32px; line-height: 1; display: flex; gap: 3px; min-width: 104px; }
.hearts span { color: rgba(30, 12, 70, .45); display: flex; }
.hearts .ic { width: 32px; height: 32px; stroke-width: 2.6; }
.hearts span.on { color: #ff3d6e; }
.prog { display: flex; align-items: center; gap: 10px; font-size: 15px; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; }
.prog span { white-space: nowrap; margin-right: 8px; }
.bar { position: relative; flex: 1; height: 18px; border-radius: 10px; background: rgba(30, 12, 70, .6); border: 3px solid var(--ink); margin-right: 14px; }
#progfill { height: 100%; width: 0; border-radius: 7px; background: linear-gradient(180deg, #ffe45c, #ff9d1e); }
.bar i, .bar u { position: absolute; top: 50%; transform: translate(-50%, -50%); font-style: normal; text-decoration: none; display: flex; }
.bar .dot { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); box-shadow: inset -5px 0 0 var(--ink); }
.bar u { left: 100%; font-size: 20px; transform: translate(-30%, -62%); }
.dist { align-self: center; font-size: 34px; -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill; color: #ffe45c; }

.hint {
  position: fixed; z-index: 11; left: 50%; top: calc(var(--st) + 128px); transform: translate(-50%, 0) scale(.8); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 10px;
  width: max-content; max-width: 88vw; text-align: center; padding: 12px 18px; border-radius: 20px; font-size: 21px;
  background: #fff; color: var(--ink); border: 4px solid var(--ink); box-shadow: 0 6px 0 var(--ink); transition: opacity .2s, transform .2s;
}
.hint .ic { width: 34px; height: 34px; }
.hint.show { opacity: 1; transform: translate(-50%, 0) scale(1); animation: nudge .7s ease-in-out infinite; }
@keyframes nudge { 50% { translate: 0 -6px; } }
.praise {
  position: fixed; z-index: 11; left: 0; right: 0; top: 36%; text-align: center; pointer-events: none; opacity: 0;
  font-size: 40px; color: #ffe45c; -webkit-text-stroke: 9px var(--ink); paint-order: stroke fill;
}
.praise.big { font-size: 52px; color: #fff; }
.praise.show { animation: praise 1.3s ease-out both; }
@keyframes praise { 0% { opacity: 0; transform: scale(.3) rotate(-8deg); } 18% { opacity: 1; transform: scale(1.15) rotate(-3deg); } 30% { transform: scale(1) rotate(-3deg); } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-40px) rotate(-3deg); } }
.toast {
  position: fixed; z-index: 40; left: 50%; bottom: calc(var(--sb) + 28px); transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  padding: 10px 18px; border-radius: 18px; background: var(--ink); font-size: 16px; white-space: nowrap;
}
.toast.show { animation: toast 2s ease both; }
@keyframes toast { 10%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

@media (max-height: 640px) {
  .logoimg { width: min(62vw, 280px); }
  .btn.big { min-height: 70px; font-size: 30px; }
  .row3 .btn { min-height: 68px; }
}
@media (prefers-reduced-motion: reduce) { .logoimg, .pulse, .lvl.cur, .hint.show, .art.dizzy { animation: none; } }

/* ── Écran de chargement (même illustration que l'écran de lancement natif) ── */
#loading { position: fixed; inset: 0; z-index: 60; background: #2aa9ff url(../img/splash.jpg) center / cover no-repeat; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: calc(var(--st) + 4vh) 24px calc(var(--sb) + 6vh); transition: opacity .45s ease; }
#loading.gone { opacity: 0; pointer-events: none; }
#loading img { width: min(80vw, 380px); height: auto; filter: drop-shadow(0 8px 0 rgba(30, 12, 70, .35)); }
#loading .lbar { width: min(72vw, 320px); height: 26px; border-radius: 14px; background: rgba(30, 12, 70, .7); border: 4px solid var(--ink); box-shadow: 0 5px 0 var(--ink); overflow: hidden; }
#loading .lbar i { display: block; height: 100%; width: 4%; border-radius: 9px; background: linear-gradient(180deg, #ffe45c, #ff9d1e); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .5); transition: width .2s; }

/* ── Carte des niveaux : un chemin sinueux à remonter, monde après monde ── */
.screen.s-levels { max-width: none; padding: 0; gap: 0; background: #1d0f45; }
.maptop { position: absolute; z-index: 3; left: 0; right: 0; top: 0; padding: calc(var(--st) + 12px) 16px 22px; background: linear-gradient(180deg, rgba(29, 15, 69, .92) 55%, rgba(29, 15, 69, 0)); pointer-events: none; }
.maptop > * { pointer-events: auto; }
.map { width: 100%; max-width: 520px; height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; overscroll-behavior: contain; padding-bottom: var(--sb); }
.mapsec { position: relative; width: 100%; aspect-ratio: 2 / 3; background-size: cover; background-position: center; box-shadow: inset 0 0 0 3px rgba(29, 15, 69, .5); }
.mappath { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; }
.mappath path { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.mappath .p1 { stroke: rgba(42, 22, 80, .55); stroke-width: 26px; }
.mappath .p2 { stroke: #fff6d8; stroke-width: 16px; stroke-dasharray: 2 22; }
.node { position: absolute; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #ffe45c, #ff9d1e); border: 4px solid var(--ink); box-shadow: 0 7px 0 var(--ink), inset 0 4px 0 rgba(255, 255, 255, .55); color: #fff; }
.node:active { transform: translateY(4px); box-shadow: 0 3px 0 var(--ink); }
.node b { font-size: 26px; line-height: 1; -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; }
.node .stars { position: absolute; bottom: -20px; font-size: 14px; background: rgba(29, 15, 69, .8); border-radius: 10px; padding: 2px 5px; }
.node.done { background: linear-gradient(180deg, #8ff06a, #22b455); }
.node.lock { background: linear-gradient(180deg, #a7a0cf, #6c6398); box-shadow: 0 5px 0 var(--ink); }
.node.lock b { font-size: 24px; }
.node.cur { animation: pulse 1.1s ease-in-out infinite; }
.pawn { position: absolute; bottom: 56px; left: 50%; margin-left: -34px; animation: hop .9s ease-in-out infinite; pointer-events: none; }
.pawn .skinimg { width: 68px; height: 68px; }
@keyframes hop { 50% { transform: translateY(-10px); } }
.wtag { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); padding: 6px 18px; border-radius: 18px; background: rgba(29, 15, 69, .85); border: 3px solid var(--ink); font-size: 18px; white-space: nowrap; }

/* ── Boutique de pièces (achats in-app) ── */
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pack { position: relative; border-radius: 20px; padding: 18px 4px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: #fff;
  background: linear-gradient(180deg, #5fd4ff, #2a7dff); border: 4px solid var(--ink); box-shadow: 0 6px 0 var(--ink), inset 0 3px 0 rgba(255, 255, 255, .45); }
.pack.p1 { background: linear-gradient(180deg, #ff8fd0, #ff3d8b); }
.pack.p2 { background: linear-gradient(180deg, #ffe45c, #ff9d1e); }
.pack:active, .offer:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.pack b { font-size: 24px; -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; line-height: 1; }
.pile { display: flex; align-items: flex-end; justify-content: center; height: 46px; }
.pile .ic { width: 40px; height: 40px; margin: 0 -9px; }
.pile .ic:nth-child(2) { width: 48px; height: 48px; z-index: 1; }
.pprice, .oprice { background: #fff; color: var(--ink); border-radius: 12px; border: 3px solid var(--ink); padding: 4px 8px; font-size: 15px; white-space: nowrap; }
.ribbon { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: #ff3d3d; border: 3px solid var(--ink); border-radius: 10px; padding: 1px 8px; font-size: 11px; white-space: nowrap; }
.offer { width: 100%; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 20px; color: #fff; text-align: left;
  background: linear-gradient(180deg, #8ff06a, #22b455); border: 4px solid var(--ink); box-shadow: 0 6px 0 var(--ink), inset 0 3px 0 rgba(255, 255, 255, .45); }
.flock { display: flex; flex: none; }
.flock .skinimg { width: 50px; height: 50px; margin: 0 -9px; filter: none; }
.otext { flex: 1; display: flex; flex-direction: column; min-width: 0; padding-left: 8px; }
.otext b { font-size: 18px; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; }
.otext small { font-size: 12px; font-weight: 700; opacity: .95; }
.link { align-self: center; color: #fff; font-size: 14px; text-decoration: underline; opacity: .9; padding: 8px 12px; }
.busy { position: fixed; inset: 0; z-index: 50; background: rgba(20, 8, 50, .55); display: none; align-items: center; justify-content: center; }
.busy.show { display: flex; }
.busy i { width: 54px; height: 54px; border-radius: 50%; border: 7px solid rgba(255, 255, 255, .3); border-top-color: #ffe45c; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Moutons verrouillés, langues, flèche des astuces ── */
.card.locked .skinimg { filter: grayscale(1) brightness(.55); opacity: .7; }
.tag.lockt { color: #fff; opacity: .9; }
.tag .ic { width: 18px; height: 18px; }
.langs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lng { min-height: 46px; border-radius: 14px; border: 3px solid var(--ink); background: rgba(255, 255, 255, .16); color: #fff; font-size: 16px; }
.lng.on { background: linear-gradient(180deg, #ffe45c, #ff9d1e); color: var(--ink); }
.hint .arrow { display: flex; animation: slide .7s ease-in-out infinite; }
.hint .arrow.right { transform: scaleX(-1); }
.hint .arrow .ic { width: 30px; height: 30px; }
@keyframes slide { 50% { translate: -8px 0; } }
.hint .arrow.right { animation-name: slider; }
@keyframes slider { 50% { translate: 8px 0; } }
.btn.big small .ic { width: 18px; height: 18px; }
.s-result .top { position: absolute; left: 0; right: 0; top: 0; padding: calc(var(--st) + 14px) 18px 0; max-width: none !important; }

/* Image de fin gore : elle tombe et tremble au lieu de se balancer. */
.art.gore { width: min(64vw, 250px); animation: gorein .5s cubic-bezier(.2, 1.6, .5, 1) both, shiver .12s linear 4 .5s; filter: drop-shadow(0 6px 0 rgba(60, 0, 10, .45)); }
@keyframes gorein { from { transform: scale(1.7) rotate(-8deg); opacity: 0; } }
@keyframes shiver { 25% { translate: -3px 1px; } 75% { translate: 3px -1px; } }
.mapsec { background-size: cover; }

/* Inviter des amis pour continuer : une pastille par ami déjà invité. */
.btn.invite { justify-content: space-between; padding-left: 18px; padding-right: 18px; }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 16px; height: 16px; border-radius: 50%; background: rgba(42, 22, 80, .45); border: 3px solid var(--ink); }
.dots i.on { background: #8ff06a; }

/* ── Décompte de fin de niveau : pièces qui défilent, jauge, étoiles aux seuils ── */
.tally { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 0 6px 6px; }
.tcount { display: flex; align-items: center; gap: 8px; font-size: 22px; -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; }
.tcount .ic { width: 40px; height: 40px; }
.tcount b { font-size: 46px; color: #ffe45c; -webkit-text-stroke: 8px var(--ink); min-width: 1.6em; text-align: right; font-variant-numeric: tabular-nums; }
.tcount small { opacity: .85; }
.tbar { position: relative; width: 100%; height: 24px; border-radius: 14px; background: rgba(30, 12, 70, .6); border: 4px solid var(--ink); margin-bottom: 8px; }
#tfill { height: 100%; width: 0; border-radius: 9px; background: linear-gradient(180deg, #fff06a, #ff9d1e); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .5); }
.tbar i { position: absolute; top: 50%; transform: translate(-50%, -50%); font-style: normal; display: flex; }
.tbar i .ic { width: 26px; height: 26px; filter: drop-shadow(0 2px 0 var(--ink)); }
.tally.done .tcount b { animation: pop .35s cubic-bezier(.2, 1.8, .5, 1); }
/* Note des niveaux terminés, bien lisible sur la carte. */
.node .stars { bottom: -24px; font-size: 17px; padding: 3px 7px; border: 2px solid var(--ink); background: rgba(29, 15, 69, .92); }

/* ── Abonnement VIP ── */
.vipbtn { display: inline-flex; align-items: center; gap: 5px; height: 40px; padding: 0 14px 0 10px; border-radius: 22px; font-size: 17px; color: var(--ink);
  background: linear-gradient(180deg, #fff06a, #ff9d1e); border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink), inset 0 2px 0 rgba(255, 255, 255, .6); animation: pulse 1.6s ease-in-out infinite; }
.vipbtn .ic { width: 24px; height: 24px; }
.vipbtn.on { animation: none; background: linear-gradient(180deg, #b0ff7a, #46cf5e); }
.panel.vip { align-items: center; text-align: center; background: linear-gradient(180deg, #8a52ff, #4a1fc8); }
.viphead { position: relative; height: 120px; display: flex; align-items: flex-end; justify-content: center; }
.viphead img { width: 110px; height: 110px; object-fit: contain; }
.viphead .ic { position: absolute; top: -8px; left: 50%; width: 54px; height: 54px; transform: translateX(-50%) rotate(-8deg); z-index: 1; }
.vipon { font-size: 20px; color: #b0ff7a; -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; display: flex; align-items: center; gap: 6px; }
.perks { list-style: none; width: 100%; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.perks li { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 16px; background: rgba(255, 255, 255, .14); border: 3px solid var(--ink); font-size: 16px; }
.perks li > .ic, .perks li > .skinimg { width: 34px; height: 34px; flex: none; margin: 0; }
.plans { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 6px 14px; border-radius: 22px; color: #fff;
  background: linear-gradient(180deg, #7fe3ff, #2a62f0); border: 4px solid var(--ink); box-shadow: 0 7px 0 var(--ink), inset 0 0 0 3px rgba(255, 255, 255, .3); }
.plan.best { background: linear-gradient(180deg, #fff06a, #ff8f14); }
.plan:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--ink); }
.plan b { font-size: 19px; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; line-height: 1.1; }
.plan small { font-size: 13px; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.legal { font-size: 11px; font-weight: 700; opacity: .85; line-height: 1.35; }
.legalrow { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 10px; }
.legalrow .link { font-size: 12px; padding: 4px 6px; }
.offer.vipoffer { background: linear-gradient(180deg, #fff06a, #ff8f14); }
.vipoffer .flock .ic { width: 46px; height: 46px; }
.top .vipbtn { margin-left: auto; }

/* ── Mini tuto du niveau 1 : jeu figé, une main montre le geste ── */
.tuto { position: fixed; inset: 0; z-index: 12; pointer-events: none; opacity: 0; transition: opacity .2s; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 22px; padding: 0 20px 24vh; }
.tuto.show { opacity: 1; }
.tuto.off { opacity: 0; }
.tuto.hold { background: radial-gradient(circle at 50% 66%, rgba(20, 8, 50, 0) 0, rgba(20, 8, 50, .6) 72%); }
.tuto.coins { justify-content: flex-start; padding: calc(var(--st) + 128px) 20px 0; }
.tuto .say { display: flex; align-items: center; gap: 10px; max-width: 88vw; text-align: center; padding: 14px 22px; border-radius: 22px; font-size: 25px; background: #fff; color: var(--ink); border: 4px solid var(--ink); box-shadow: 0 6px 0 var(--ink); animation: nudge .8s ease-in-out infinite; }
.tuto .say .ic { width: 34px; height: 34px; flex: none; }
.tuto .pad { position: relative; width: 220px; height: 130px; }
.tuto .ring { position: absolute; left: 50%; top: 6px; width: 70px; height: 70px; margin-left: -35px; border-radius: 50%; border: 6px solid #ffd21f; box-shadow: 0 0 0 3px var(--ink); animation: tuRing 1s ease-out infinite; }
.tuto .hand { position: absolute; left: 50%; top: 30px; margin-left: -34px; display: flex; filter: drop-shadow(0 5px 0 rgba(20, 8, 50, .45)); }
.tuto .hand .ic { width: 96px; height: 96px; }
.tuto.tap .hand { animation: tuTap 1s ease-in-out infinite; }
.tuto.swipe .ring { display: none; }
.tuto.swipe .hand { animation: tuLeft 1.1s ease-in-out infinite; }
.tuto.swipe.right .hand { animation-name: tuRight; }
@keyframes tuRing { 0% { transform: scale(.5); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes tuTap { 0%, 100% { transform: translateY(14px); } 45% { transform: translateY(0) scale(.92); } }
@keyframes tuLeft { 0% { transform: translateX(70px); opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateX(-70px); opacity: 0; } }
@keyframes tuRight { 0% { transform: translateX(-70px); opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateX(70px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tuto .say, .tuto .hand, .tuto .ring { animation: none; } }

/* ── Morts animées ── */
.veil { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 15; pointer-events: none; display: none; }
.veil.on { display: block; opacity: .93; }
.clip { position: fixed; inset: 0; z-index: 55; background: #000; display: flex; align-items: center; justify-content: center; }
.clip img, .clip video { width: 100%; height: 100%; object-fit: cover; }
.gorebox { position: relative; width: min(64vw, 250px); margin: -6px 0 -8px; }
.gorebox .art { display: block; width: 100%; margin: 0; }
.gorebox canvas { position: absolute; left: -21.5%; top: -6%; width: 143%; height: 150%; pointer-events: none; }
.g-saw .g-m, .g-saw .g-r { position: absolute; left: 0; top: 0; }
.g-saw .g-l { clip-path: inset(0 55% 0 0); transform-origin: 30% 100%; animation: gorein .5s cubic-bezier(.2, 1.6, .5, 1) both, splitL 1.5s ease-in-out .55s infinite alternate; }
.g-saw .g-r { clip-path: inset(0 0 0 55%); transform-origin: 70% 100%; animation: gorein .5s cubic-bezier(.2, 1.6, .5, 1) both, splitR 1.5s ease-in-out .55s infinite alternate; }
.g-saw .g-m { clip-path: inset(0 45% 0 45%); animation: gorein .5s cubic-bezier(.2, 1.6, .5, 1) both, sawvib .09s linear .55s infinite; }
@keyframes splitL { from { transform: none; } to { transform: translateX(-11px) rotate(-5deg); } }
@keyframes splitR { from { transform: none; } to { transform: translateX(11px) rotate(5deg); } }
@keyframes sawvib { 0%, 100% { transform: translateY(-1.5px); } 50% { transform: translateY(1.5px); } }
.g-crush .art { transform-origin: 50% 100%; animation: crushin .6s cubic-bezier(.3, 1.4, .5, 1) both, quake .5s ease-in-out .7s infinite; }
@keyframes crushin { 0% { transform: translateY(-70%) scaleY(1.4); opacity: 0; } 55% { transform: scale(1.25, .6); opacity: 1; } 75% { transform: scale(.94, 1.08); } }
@keyframes quake { 0%, 60%, 100% { transform: none; } 70% { transform: scale(1.03, .96) translateX(-2px); } 85% { transform: scale(.98, 1.02) translateX(2px); } }
.g-spikes .art { transform-origin: 50% 100%; animation: spikein .6s cubic-bezier(.5, 0, .9, .6) both, twitch 2.2s ease-in-out .7s infinite; }
@keyframes spikein { 0% { transform: translateY(-110%); opacity: 0; } 70% { transform: translateY(0) scale(1.12, .86); opacity: 1; } 85% { transform: scale(.96, 1.05); } }
@keyframes twitch { 0%, 80%, 100% { transform: none; } 84% { transform: rotate(-2.5deg) translateY(-2px); } 90% { transform: rotate(2deg); } 95% { transform: rotate(-1deg); } }
.g-acid .art { transform-origin: 50% 100%; animation: gorein .5s cubic-bezier(.2, 1.6, .5, 1) both, melt 1.8s ease-in-out .55s infinite; }
@keyframes melt { 0%, 100% { transform: none; } 40% { transform: scale(1.04, .93) skewX(1.5deg); } 70% { transform: scale(.99, 1.01) skewX(-1.5deg); } }
.g-legs .art { animation: gorein .5s cubic-bezier(.2, 1.6, .5, 1) both, crawl 1.3s ease-in-out .55s infinite; }
@keyframes crawl { 0%, 100% { transform: translateX(-5px) rotate(-1.5deg); } 50% { transform: translateX(7px) rotate(1.5deg) scaleX(1.03); } }
.g-lava { width: min(52vw, 200px); margin: 0 0 -8px; }
@media (prefers-reduced-motion: reduce) { .gorebox .art { animation: none !important; } }
