/* Ici ça pêche — style pixel cosy */
:root {
  --bg: #1b1f3a;
  --bg2: #262b4e;
  --paper: #f4e9d0;
  --paper2: #e8d8b4;
  --paper3: #d8c49a;
  --ink: #3a2614;
  --ink2: #7a5a3a;
  --wood: #8a5a2a;
  --wood-d: #5a3a1a;
  --wood-l: #b07a3a;
  --green: #5fa04a;
  --green-d: #3a7a2a;
  --gold: #f2c84b;
  --gold-d: #c8901a;
  --red: #d8503a;
  --blue: #4a8ad8;
  --r0: #9a9a9a;
  --r1: #3fae4f;
  --r2: #3a8ae8;
  --r3: #a05ae8;
  --r4: #e8962a;
  --r5: #e83a7a;
  --px: 3px;
  --font: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  --font-px: 'Pixelify Sans', 'Nunito', system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); font-weight: 600; overflow: hidden; overscroll-behavior: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
img.ico, canvas, .pix { image-rendering: pixelated; image-rendering: crisp-edges; }
img.ico { vertical-align: -3px; }

#backdrop { position: fixed; inset: 0; width: 100vw; height: 100vh; image-rendering: pixelated; z-index: 0; }

#phone {
  position: relative; z-index: 2; margin: 0 auto; height: 100%; height: 100dvh; width: 100%; max-width: 440px;
  background: var(--bg); display: flex; flex-direction: column; overflow: hidden;
}
@media (min-width: 700px) {
  #phone { height: min(940px, calc(100dvh - 32px)); margin-top: max(16px, calc((100dvh - 940px) / 2)); border: 6px solid #14172c; border-radius: 22px; box-shadow: 0 0 0 4px #3a2a1a, 0 20px 60px rgba(0,0,0,.6); }
}

/* panneaux publicitaires en bois (ordinateur) */
.adboard { position: fixed; z-index: 1; top: 50%; transform: translateY(-50%); width: 200px; display: none; }
.adboard.left { left: calc(25vw - 330px + 120px); }
.adboard.right { right: calc(25vw - 330px + 120px); }
@media (min-width: 1060px) { .adboard { display: block; } .adboard.left { left: max(20px, calc(50vw - 220px - 260px)); } .adboard.right { right: max(20px, calc(50vw - 220px - 260px)); } }
.adboard-inner { background: var(--wood); border: 4px solid var(--wood-d); box-shadow: inset 0 0 0 3px var(--wood-l), 0 6px 0 rgba(0,0,0,.35); padding: 10px; border-radius: 4px; }
.adboard-label { color: var(--paper); font-size: 12px; letter-spacing: 3px; text-align: center; margin-bottom: 6px; opacity: .8; }
.adboard-slot { background: var(--paper); min-height: 600px; width: 160px; margin: 0 auto; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--ink2); font-size: 14px; padding: 8px; }
.adboard-post { width: 16px; height: 140px; margin: 0 auto; background: var(--wood-d); box-shadow: inset 4px 0 0 var(--wood); }

/* écran de démarrage */
.boot { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; }
.boot-logo { width: 78%; max-width: 320px; image-rendering: pixelated; animation: float 3s ease-in-out infinite; }
.boot-bar { width: 60%; height: 12px; border: 3px solid var(--paper); }
.boot-bar div { height: 100%; width: 30%; background: var(--gold); animation: load 1.2s ease-in-out infinite alternate; }
@keyframes load { to { width: 100%; } }
@keyframes float { 50% { transform: translateY(-6px); } }

/* barre du haut */
.topbar { display: flex; align-items: center; gap: 6px; padding: 6px 8px; padding-top: max(6px, env(safe-area-inset-top)); background: var(--bg2); border-bottom: 3px solid #14172c; color: var(--paper); }
.cur { display: flex; align-items: center; gap: 5px; background: #14172c; padding: 4px 10px 4px 6px; border-radius: 20px; font-size: 15px; font-weight: 800; min-width: 0; white-space: nowrap; }
.cur.coins { flex: 1.4; } .cur.perles { flex: 0.9; }
.lvl { flex: 1.2; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lvl-top { display: flex; justify-content: space-between; font-size: 12px; }
.icon-btn { background: none; border: 0; padding: 4px; cursor: pointer; color: var(--paper); }

/* scène */
.scene-wrap { position: relative; background: #000; flex: none; }
.scene-wrap canvas { display: block; width: 100%; height: 33vh; height: 33dvh; max-height: 330px; min-height: 180px; object-fit: cover; object-position: 50% 60%; }
.scene-chips { position: absolute; top: 6px; left: 6px; right: 6px; display: flex; gap: 4px; flex-wrap: wrap; pointer-events: none; }
.chip { background: rgba(20,23,44,.72); color: var(--paper); font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 20px; display: inline-flex; gap: 4px; align-items: center; pointer-events: auto; border: 0; }
button.chip { cursor: pointer; }
.chip.boost { background: rgba(200,140,20,.9); color: #fff; }
.chip.online { gap: 5px; margin-left: auto; }
.chip.online .dot { width: 8px; height: 8px; border-radius: 50%; background: #5fe08a; box-shadow: 0 0 6px #5fe08a; display: inline-block; }
.chip.night { background: rgba(40,40,110,.85); }
.float-txt { position: absolute; font-weight: 900; font-size: 18px; color: #fff; text-shadow: 2px 2px 0 #000; pointer-events: none; animation: rise 1.4s ease-out forwards; white-space: nowrap; }
@keyframes rise { to { transform: translateY(-46px); opacity: 0; } }

/* barre d'action */
.actions { display: flex; gap: 6px; padding: 8px; background: var(--wood); border-top: 3px solid var(--wood-d); border-bottom: 3px solid var(--wood-d); }
.cast-btn { flex: 1.6; position: relative; overflow: hidden; height: 58px; font-size: 20px; font-weight: 900; border-radius: 12px; }
.cast-btn .prog { position: absolute; left: 0; bottom: 0; height: 6px; background: rgba(255,255,255,.75); }
.cast-btn.bite { animation: pulse .25s infinite alternate; background: var(--red) !important; box-shadow: 0 4px 0 #8a2a1a !important; }
@keyframes pulse { to { transform: scale(1.04); } }
.sell-btn { flex: 1; height: 58px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; font-size: 15px; }
.sell-btn small { font-size: 12px; opacity: .85; }
.side-col { display: flex; flex-direction: column; gap: 4px; width: 66px; }
.side-col .btn img { vertical-align: -2px; }
.side-col .btn { height: 27px; padding: 0; font-size: 12px; }

/* boutons */
.btn { cursor: pointer; border: 0; border-radius: 9px; padding: 8px 12px; font-weight: 800; color: #fff; background: var(--blue); box-shadow: 0 4px 0 #2a5a9a; transition: transform .05s; user-select: none; }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #2a5a9a; }
.btn.primary { background: var(--green); box-shadow: 0 4px 0 var(--green-d); }
.btn.primary:active:not(:disabled) { box-shadow: 0 1px 0 var(--green-d); }
.btn.gold { background: var(--gold); color: var(--ink); box-shadow: 0 4px 0 var(--gold-d); }
.btn.red { background: var(--red); box-shadow: 0 4px 0 #8a2a1a; }
.btn.ghost { background: var(--paper3); color: var(--ink); box-shadow: 0 4px 0 var(--ink2); }
.btn.purple { background: #8a5ad8; box-shadow: 0 4px 0 #5a3a9a; }
.btn.small { padding: 4px 8px; font-size: 13px; box-shadow: 0 3px 0 rgba(0,0,0,.3); }
.btn:disabled { filter: grayscale(.8) brightness(.85); cursor: default; opacity: .75; }
.btn.full { width: 100%; }

/* contenu */
.panel { flex: 1; overflow-y: auto; overflow-x: hidden; background: var(--paper); -webkit-overflow-scrolling: touch; padding: 8px 8px 16px; }
.panel::-webkit-scrollbar { width: 6px; } .panel::-webkit-scrollbar-thumb { background: var(--paper3); }
.subtabs { display: flex; gap: 4px; margin: -8px -8px 8px; padding: 6px 8px; background: var(--paper2); border-bottom: 2px solid var(--paper3); overflow-x: auto; position: sticky; top: -8px; z-index: 3; scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
.subtab { flex: none; border: 0; background: transparent; color: var(--ink2); padding: 6px 11px; border-radius: 20px; cursor: pointer; font-weight: 800; font-size: 14px; }
.subtab.on { background: var(--wood); color: var(--paper); }
.subtab .dot, .nav-btn .dot { display: inline-block; width: 8px; height: 8px; background: var(--red); border-radius: 50%; margin-left: 3px; vertical-align: 2px; }

.card { background: #fffaf0; border: 2px solid var(--paper3); border-radius: 12px; padding: 10px; margin-bottom: 8px; box-shadow: 0 2px 0 rgba(90,58,26,.08); }
.card.hl { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(242,200,75,.35); }
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.item { display: flex; align-items: center; gap: 10px; padding: 8px; background: #fffaf0; border: 2px solid var(--paper3); border-radius: 12px; margin-bottom: 6px; }
.item .ic { width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--paper2); border-radius: 10px; }
.item .ic img { max-width: 36px; max-height: 36px; image-rendering: pixelated; }
.item .t { font-weight: 800; font-size: 15px; }
.item .d { font-size: 13px; color: var(--ink2); }
.item .btn { flex: none; min-width: 74px; }
.item.locked { opacity: .55; }
.price { font-weight: 700; white-space: nowrap; }
h3 { margin: 4px 0 8px; font-size: 18px; font-family: var(--font-px); font-weight: 700; letter-spacing: .3px; }
h4 { margin: 12px 0 6px; font-size: 15px; color: var(--ink2); font-family: var(--font-px); font-weight: 700; letter-spacing: .3px; }
p { margin: 4px 0 8px; line-height: 1.35; font-size: 14px; }
.muted { color: var(--ink2); } .small { font-size: 12px; }
.center { text-align: center; }
.bar { height: 8px; background: rgba(0,0,0,.25); border-radius: 2px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--gold); transition: width .3s; }
.bar.green .fill { background: var(--green); } .bar.blue .fill { background: var(--blue); } .bar.big { height: 14px; }
.pill { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 8px; background: var(--paper2); color: var(--ink2); font-weight: 600; }
.r0 { color: var(--r0); } .r1 { color: var(--r1); } .r2 { color: var(--r2); } .r3 { color: var(--r3); } .r4 { color: var(--r4); } .r5 { color: var(--r5); }
.bg-r0 { border-color: var(--r0) !important; } .bg-r1 { border-color: var(--r1) !important; } .bg-r2 { border-color: var(--r2) !important; } .bg-r3 { border-color: var(--r3) !important; } .bg-r4 { border-color: var(--r4) !important; } .bg-r5 { border-color: var(--r5) !important; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; font-size: 13px; }
.stats-grid b { float: right; }
input.txt, textarea.txt, select.txt { width: 100%; padding: 10px; border: 2px solid var(--paper3); border-radius: 10px; background: #fff; color: var(--ink); font-size: 16px; }
.log { font-size: 13px; }
.log-line { display: flex; align-items: center; gap: 6px; padding: 3px 0; border-bottom: 1px dashed var(--paper3); }
.log-line img { width: 40px; image-rendering: pixelated; }

/* navigation */
.nav { display: flex; background: var(--bg2); border-top: 3px solid #14172c; padding-bottom: env(safe-area-inset-bottom); }
.nav-btn { flex: 1; background: none; border: 0; color: #a8b0d8; padding: 6px 0 5px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 800; cursor: pointer; position: relative; }
.nav-btn img { width: 24px; height: 24px; image-rendering: pixelated; }
.nav-btn.on { color: var(--gold); background: #14172c; }
.nav-btn .dot { position: absolute; top: 4px; right: calc(50% - 18px); }

/* bestiaire */
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.bcell { background: #fffaf0; border: 2px solid var(--paper3); border-radius: 12px; padding: 4px; text-align: center; cursor: pointer; font-size: 11px; min-height: 86px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; }
.bcell img { max-width: 68px; max-height: 42px; image-rendering: pixelated; margin-top: 3px; }
.bcell.unknown img { filter: brightness(0) opacity(.35); }
.stars { color: var(--gold-d); letter-spacing: 1px; font-size: 12px; }
.stars .off { color: var(--paper3); }

/* toasts */
.toasts { position: absolute; left: 8px; right: 8px; top: 46px; z-index: 50; display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
.toast { background: rgba(20,23,44,.94); color: var(--paper); padding: 8px 12px; border-radius: 12px; font-size: 14px; border-left: 5px solid var(--blue); animation: tin .2s ease-out; transition: opacity .4s, transform .4s; display: flex; align-items: center; gap: 8px; }
.toast img { image-rendering: pixelated; max-height: 34px; max-width: 56px; }
.toast.good { border-color: var(--green); } .toast.bad { border-color: var(--red); } .toast.rare { border-color: var(--r5); background: rgba(60,20,50,.95); }
.toast.out { opacity: 0; transform: translateY(-10px); }
@keyframes tin { from { transform: translateY(-12px); opacity: 0; } }

/* modales */
.modal-back { position: absolute; inset: 0; background: rgba(10,10,25,.6); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 14px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--paper); border: 3px solid var(--wood-d); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.35); width: 100%; max-width: 400px; max-height: 88%; display: flex; flex-direction: column; animation: pop .18s ease-out; }
@keyframes pop { from { transform: scale(.9); } }
.modal-head { display: flex; justify-content: space-between; align-items: center; background: var(--wood); color: var(--paper); padding: 9px 12px; font-weight: 700; font-size: 18px; font-family: var(--font-px); border-radius: 10px 10px 0 0; }
.modal-head .x { background: none; border: 0; color: var(--paper); font-size: 18px; cursor: pointer; }
.modal-body { padding: 10px; overflow-y: auto; }
.modal-btns { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 10px 12px; justify-content: flex-end; }
.modal-btns .btn { flex: 1 1 28%; min-width: 0; }

.catch-card { text-align: center; }
.catch-card img.big { width: 70%; max-width: 220px; image-rendering: pixelated; margin: 6px 0; }
.catch-card .name { font-size: 22px; font-weight: 700; }
.loot-list { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 8px 0; }
.loot { background: #fffaf0; border: 2px solid var(--paper3); border-radius: 10px; padding: 4px 8px; display: flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 600; }
.loot img { image-rendering: pixelated; max-height: 26px; }

.fake-ad { text-align: center; }
.fake-ad-art { background: linear-gradient(#5aa8e8, #3a7aa8); color: #fff; padding: 30px 10px; border-radius: 4px; text-shadow: 2px 2px 0 #1a3a5a; }
.fake-ad-title { font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.ad-count { font-size: 30px; font-weight: 700; margin: 8px; }

/* chat */
.chat { display: flex; flex-direction: column; height: 46vh; min-height: 260px; }
.chat-list { flex: 1; overflow-y: auto; background: #fffaf0; border: 2px solid var(--paper3); border-radius: 4px; padding: 6px; font-size: 14px; }
.msg { margin-bottom: 6px; line-height: 1.3; word-wrap: break-word; }
.msg .who { font-weight: 700; color: var(--blue); }
.msg .who.me { color: var(--green-d); }
.msg .when { font-size: 10px; color: var(--ink2); margin-left: 4px; }
.msg.sys { color: var(--ink2); font-style: italic; font-size: 12px; }
.msg .rep { background: none; border: 0; color: var(--paper3); cursor: pointer; font-size: 11px; }
.chat-input { display: flex; gap: 6px; margin-top: 6px; }
.presets { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }

.lb-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--paper3); font-size: 14px; }
.lb-row.me { background: #fff2c8; }
.lb-rank { width: 30px; font-weight: 700; text-align: center; }
.lb-rank.g1 { color: #d8a020; } .lb-rank.g2 { color: #8a9aa8; } .lb-rank.g3 { color: #b0703a; }
.lb-val { font-weight: 700; }
.tag { font-size: 11px; color: var(--ink2); }

.tiers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.tier { background: #fffaf0; border: 2px solid var(--paper3); border-radius: 10px; text-align: center; padding: 4px 2px; font-size: 11px; cursor: pointer; min-height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.tier.got { opacity: .45; } .tier.ready { border-color: var(--gold); background: #fff2c8; } .tier.locked { filter: grayscale(1); opacity: .7; }
.tier img { max-height: 22px; image-rendering: pixelated; }

.hook-slots { display: flex; gap: 6px; margin-bottom: 8px; }
.hslot { flex: 1; min-width: 0; overflow: hidden; background: #fffaf0; border: 2px dashed var(--paper3); border-radius: 12px; min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; cursor: pointer; padding: 4px; text-align: center; }
.hslot.filled { border-style: solid; }
.hslot.locked { opacity: .5; cursor: default; }
.hslot img { width: 28px; image-rendering: pixelated; }

.zone-strip { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 4px; }
.zbtn { flex: none; background: var(--paper2); border: 2px solid var(--paper3); border-radius: 20px; padding: 5px 11px; font-size: 12px; font-weight: 800; cursor: pointer; color: var(--ink); }
.zbtn.on { background: var(--wood); color: var(--paper); border-color: var(--wood-d); }

.cosm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cosm { background: #fffaf0; border: 2px solid var(--paper3); border-radius: 10px; padding: 6px 4px; text-align: center; font-size: 12px; cursor: pointer; }
.cosm.eq { border-color: var(--green); background: #effae8; }
.cosm .sw { height: 22px; display: flex; gap: 2px; justify-content: center; margin-bottom: 4px; }
.cosm .sw span { width: 16px; height: 16px; border: 2px solid rgba(0,0,0,.3); }

.emblem { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 4px; font-size: 18px; flex: none; }
.vs { display: flex; align-items: center; justify-content: space-around; text-align: center; padding: 6px 0; }
.vs .score { font-size: 26px; font-weight: 700; }
.badge { position: absolute; top: -4px; right: -4px; background: var(--red); color: #fff; border-radius: 8px; font-size: 10px; padding: 0 5px; }
.login-btns { display: flex; flex-direction: column; gap: 8px; }
.login-btns .btn { display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn.google { background: #fff; color: #333; box-shadow: 0 4px 0 #aaa; }
.btn.discord { background: #5865f2; box-shadow: 0 4px 0 #3a44a8; }
.btn.facebook { background: #1877f2; box-shadow: 0 4px 0 #0e4ea8; }
.code-input { letter-spacing: 8px; text-align: center; font-size: 24px !important; }
.welcome img { width: 80%; max-width: 280px; image-rendering: pixelated; display: block; margin: 0 auto 8px; }
.ver { font-size: 11px; color: var(--ink2); text-align: center; margin-top: 10px; }

/* incitation à créer un compte */
.benefits { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.benefits li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.3; text-align: left; }
.benefits li > span:first-child { font-size: 16px; flex: none; width: 22px; text-align: center; }
.signup-card .btn { white-space: nowrap; }

/* ───────────── Boutons d'action : le texte ne déborde plus ───────────── */
.cast-btn { padding: 0 6px; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 5px; }
.cast-btn .cb-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: clamp(14px, 4.7vw, 20px); max-width: 100%; }
.cast-btn small { font-size: 12px; opacity: .8; font-weight: 700; white-space: nowrap; }
.cast-btn.giga { background: linear-gradient(#2ad8e8, #0e8aa8) !important; box-shadow: 0 4px 0 #0a5a78 !important; color: #fff; animation: pulse .12s infinite alternate; }
.sell-btn span { white-space: nowrap; }
.side-col { width: 72px; }
.side-col .btn { display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; min-width: 0; }
.auto-btn.on { background: var(--green) !important; color: #fff; box-shadow: 0 3px 0 var(--green-d); }
.btn { text-align: center; }
.item .btn { max-width: 150px; white-space: nowrap; }

/* ───────────── « Wow » : révélations plein écran ───────────── */
#phone.shake { animation: shake .5s; } #phone.shake2 { animation: shake2 .9s; }
@keyframes shake { 10%,50%,90% { transform: translate(-3px, 2px); } 30%,70% { transform: translate(3px, -2px); } }
@keyframes shake2 { 8%,40%,72% { transform: translate(-6px, 4px) rotate(-.4deg); } 24%,56%,88% { transform: translate(6px, -4px) rotate(.4deg); } }
.scene-flash { position: absolute; inset: 0; opacity: .8; pointer-events: none; animation: sflash .5s ease-out forwards; z-index: 4; }
@keyframes sflash { to { opacity: 0; } }
.wow { position: absolute; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 14px; overflow: hidden; background: radial-gradient(circle at 50% 42%, rgba(8,8,24,.55), rgba(8,8,24,.93) 75%); animation: wowin .35s ease-out; }
.wow.out { opacity: 0; transition: opacity .25s; }
@keyframes wowin { from { opacity: 0; } }
.wow-rays { position: absolute; left: 50%; top: 42%; width: 190vmax; height: 190vmax; margin: -95vmax 0 0 -95vmax; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--c) 42%, transparent) 0deg 8deg, transparent 8deg 22deg); -webkit-mask: radial-gradient(circle, #000 0, transparent 38%); mask: radial-gradient(circle, #000 0, transparent 38%); animation: spin 14s linear infinite; pointer-events: none; }
.wow.t5 .wow-rays, .wow.tg .wow-rays { animation-duration: 8s; }
@keyframes spin { to { transform: rotate(360deg); } }
.wow-glow { position: absolute; left: 50%; top: 42%; width: 340px; height: 340px; margin: -170px 0 0 -170px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 75%, transparent), transparent 68%); animation: wpulse 1.6s ease-in-out infinite; pointer-events: none; }
@keyframes wpulse { 50% { transform: scale(1.18); opacity: .8; } }
.wow-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.wow-card { position: relative; width: 100%; max-width: 340px; text-align: center; color: #fff; animation: wowcard .6s cubic-bezier(.2,1.5,.4,1); display: flex; flex-direction: column; align-items: center; gap: 6px; }
@keyframes wowcard { from { transform: scale(.3) rotate(-6deg); opacity: 0; } }
.wow-tier { font-family: var(--font-px); font-weight: 700; font-size: 22px; letter-spacing: 3px; color: var(--c2); text-shadow: 0 0 12px var(--c), 0 0 28px var(--c), 2px 2px 0 #000; animation: tierin .7s .15s backwards; }
@keyframes tierin { from { transform: translateY(-20px) scale(1.8); opacity: 0; } }
.wow.t5 .wow-tier, .wow.tg .wow-tier { font-size: 26px; background: linear-gradient(90deg, #fff, var(--c2), #fff, var(--c), #fff); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: tierin .7s .15s backwards, shine 2.4s linear infinite; text-shadow: none; filter: drop-shadow(0 0 8px var(--c)) drop-shadow(2px 2px 0 #000); }
@keyframes shine { to { background-position: -300% 0; } }
.wow-fishbox { position: relative; width: 100%; min-height: 150px; display: flex; align-items: center; justify-content: center; }
.wow-fish { max-width: 78%; max-height: 190px; image-rendering: pixelated; filter: drop-shadow(0 0 14px var(--c)) drop-shadow(0 6px 0 rgba(0,0,0,.4)); animation: fishin .9s .1s cubic-bezier(.2,1.6,.4,1) backwards, bob 2.4s 1s ease-in-out infinite; }
.wow.tg .wow-fish { max-height: 230px; max-width: 94%; }
@keyframes fishin { from { transform: scale(0) rotate(-25deg); opacity: 0; filter: brightness(10); } 60% { filter: brightness(2.2) drop-shadow(0 0 20px var(--c)); } }
@keyframes bob { 50% { transform: translateY(-7px) rotate(1.5deg); } }
.wow-name { font-family: var(--font-px); font-size: 26px; font-weight: 700; text-shadow: 0 0 10px var(--c), 2px 2px 0 #000; animation: fadeup .5s .5s backwards; line-height: 1.1; }
.wow-sub { font-size: 15px; font-weight: 800; color: #fff; text-shadow: 1px 1px 0 #000; animation: fadeup .5s .65s backwards; }
.wow-sub img.ico { vertical-align: -3px; }
.wow-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; animation: fadeup .5s .8s backwards; }
.wow-tag { background: var(--c); color: #fff; font-size: 12px; font-weight: 900; padding: 3px 10px; border-radius: 20px; box-shadow: 0 0 10px var(--c); text-transform: uppercase; letter-spacing: .5px; }
.wow-desc { font-size: 13px; font-style: italic; color: #e8e4f4; max-width: 280px; animation: fadeup .5s .9s backwards; }
.wow-bonus { background: rgba(255,255,255,.12); border: 2px solid var(--c); border-radius: 12px; padding: 6px 8px; margin-top: 4px; animation: fadeup .5s 1s backwards; }
.wow-bonus .loot-list { margin: 4px 0 0; } .wow-bonus .loot { color: var(--ink); }
.wow-ok { margin-top: 8px; min-width: 190px; font-size: 17px; animation: fadeup .5s 1.1s backwards, okpulse 1.4s 1.6s ease-in-out infinite; }
@keyframes okpulse { 50% { transform: scale(1.06); } }
@keyframes fadeup { from { transform: translateY(14px); opacity: 0; } }
.wow-chest { animation: chestshake .6s .1s; }
.wow-chest img { width: 120px; image-rendering: pixelated; filter: drop-shadow(0 0 16px var(--c)); }
@keyframes chestshake { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-9deg) scale(1.05); } 40% { transform: rotate(9deg) scale(1.1); } 60% { transform: rotate(-6deg) scale(1.15); } 80% { transform: scale(1.3); filter: brightness(2.5); } }
.wow-loot .loot { opacity: 0; animation: lootpop .45s cubic-bezier(.2,1.6,.4,1) forwards; color: var(--ink); }
.wow-loot .loot:nth-child(1) { animation-delay: .7s; } .wow-loot .loot:nth-child(2) { animation-delay: .95s; } .wow-loot .loot:nth-child(3) { animation-delay: 1.2s; } .wow-loot .loot:nth-child(4) { animation-delay: 1.45s; } .wow-loot .loot:nth-child(5) { animation-delay: 1.7s; }
@keyframes lootpop { from { transform: scale(0) rotate(-12deg); opacity: 0; } to { opacity: 1; } }
.wow-bigicon { font-size: 64px; animation: bob 2s ease-in-out infinite; filter: drop-shadow(0 0 14px var(--c)); }

/* bandeaux : niveau, succès, zone */
.wow-banner { position: absolute; left: 10px; right: 10px; top: 52px; z-index: 70; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; color: #fff; overflow: hidden; background: linear-gradient(100deg, #3a2a8a, #7a3ad8); border: 3px solid #e6c8ff; box-shadow: 0 6px 0 rgba(0,0,0,.35), 0 0 24px rgba(160,90,232,.7); animation: bannerin .6s cubic-bezier(.2,1.5,.4,1); pointer-events: none; }
.wow-banner.ach { background: linear-gradient(100deg, #a8620a, #f0a030); border-color: #fff0b0; box-shadow: 0 6px 0 rgba(0,0,0,.35), 0 0 24px rgba(240,160,48,.8); }
.wow-banner.zone { background: linear-gradient(100deg, #0a6a8a, #2ad8e8); border-color: #d8fbff; }
.wow-banner.gift { background: linear-gradient(100deg, #1a7a3a, #5fd16a); border-color: #e0ffe0; }
.wow-banner.out { opacity: 0; transform: translateY(-20px); transition: all .4s; }
@keyframes bannerin { from { transform: translateY(-80px) scale(.8); opacity: 0; } }
.wb-ic { font-size: 34px; animation: wobble 1s ease-in-out infinite; }
@keyframes wobble { 50% { transform: rotate(10deg) scale(1.15); } }
.wb-t { font-family: var(--font-px); font-weight: 700; font-size: 20px; text-shadow: 2px 2px 0 rgba(0,0,0,.4); line-height: 1.1; }
.wb-s { font-size: 13px; font-weight: 700; opacity: .95; } .wb-go { font-size: 11px; opacity: .85; }
.wb-shine { position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.45) 50%, transparent 65%); transform: translateX(-120%); animation: bshine 1.4s .3s ease-out; }
@keyframes bshine { to { transform: translateX(120%); } }

/* combat de géant */
.giga-fight { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 6; background: rgba(6,20,36,.88); border: 3px solid #2ad8e8; border-radius: 12px; padding: 8px 10px; color: #fff; box-shadow: 0 0 22px rgba(42,216,232,.7); animation: wowcard .35s; }
.giga-fight.hit { animation: gfhit .1s; } @keyframes gfhit { 50% { transform: scale(1.03); } }
.giga-fight.hot { border-color: #ffe070; box-shadow: 0 0 26px rgba(255,224,112,.9); }
.gf-top { display: flex; justify-content: space-between; align-items: center; font-size: 14px; margin-bottom: 5px; }
.gf-time { font-family: var(--font-px); font-size: 20px; color: #ffe070; }
.gf-bar { position: relative; height: 26px; background: #0a1a2a; border: 2px solid #2a4a6a; border-radius: 8px; overflow: hidden; }
.gf-fill { height: 100%; width: 0; background: linear-gradient(90deg, #2a8ad8, #2ad8e8 55%, #ffe070); box-shadow: inset 0 -6px 0 rgba(0,0,0,.18); }
.gf-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 13px; text-shadow: 1px 1px 0 #000; }
.gf-hint { text-align: center; font-size: 11px; opacity: .85; margin-top: 4px; }

/* ───────────── Boutique : avant → après, looks ───────────── */
.fx-lines { margin: 4px 0 2px; display: flex; flex-direction: column; gap: 2px; }
.fx-lines > div { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12px; background: var(--paper2); border-radius: 8px; padding: 2px 8px; }
.fx-lines > div > span:first-child { color: var(--ink2); font-weight: 700; white-space: nowrap; }
.ba { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.ba-a { color: var(--ink2); font-weight: 700; } .ba-ar { color: var(--green-d); font-weight: 900; } .ba-b { color: var(--green-d); font-weight: 900; }
.flash-hl { animation: flashhl 1.2s ease-in-out 3; }
@keyframes flashhl { 50% { box-shadow: 0 0 0 4px var(--gold), 0 0 18px var(--gold); } }
.look-now { padding: 0; overflow: hidden; }
.look-canvas { display: block; width: 100%; height: auto; image-rendering: pixelated; background: #3f739c; }
.look-bar { padding: 8px 10px; }
.cur-perles { display: inline-flex; align-items: center; gap: 4px; }
.packs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-top: 6px; }
.pack { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 14px 2px 6px; border: 2px solid var(--gold-d); border-radius: 12px; background: linear-gradient(#fff6d8, #f6e2a0); cursor: pointer; color: var(--ink); font-size: 13px; }
.pack:active { transform: translateY(2px); }
.pack-bonus { position: absolute; top: -7px; left: 50%; transform: translateX(-50%); background: var(--red); color: #fff; font-size: 10px; font-weight: 900; padding: 1px 5px; border-radius: 8px; white-space: nowrap; }
.pack-ic { height: 28px; } .pack-eur { font-weight: 900; color: var(--green-d); font-size: 12px; }
.cosm2-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.cosm2 { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 6px 8px; border-radius: 12px; border: 3px solid var(--tc); background: #fffaf0; cursor: pointer; font-family: inherit; color: var(--ink); text-align: center; overflow: hidden; }
.cosm2.tier3, .cosm2.tier4 { background: linear-gradient(#fffaf0, color-mix(in srgb, var(--tc) 18%, #fffaf0)); }
.cosm2.tier4 { box-shadow: 0 0 0 1px var(--tc), 0 0 14px color-mix(in srgb, var(--tc) 60%, transparent); }
.cosm2.tier4::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.55) 50%, transparent 62%); transform: translateX(-130%); animation: cshine 3.6s ease-in-out infinite; pointer-events: none; }
@keyframes cshine { 55%, 100% { transform: translateX(130%); } }
.cosm2.eq { outline: 3px solid var(--green); outline-offset: 1px; }
.cosm2.excl { opacity: .85; }
.c2-tier { align-self: stretch; background: var(--tc); color: #fff; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .6px; border-radius: 6px; padding: 1px 0; }
.c2-img { width: 100%; max-width: 156px; aspect-ratio: 104/92; image-rendering: pixelated; border-radius: 8px; background: #1c2444; }
.c2-name { font-weight: 800; font-size: 13px; line-height: 1.15; min-height: 30px; display: flex; align-items: center; }
.c2-price { font-weight: 900; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.look-detail { display: flex; flex-direction: column; gap: 6px; }
.look-detail .look-canvas { border-radius: 10px; border: 3px solid var(--tc); }
.ld-tier { text-align: center; font-size: 13px; font-weight: 800; }
.ld-tier span { color: #fff; padding: 1px 8px; border-radius: 8px; }

/* carte « prochaine zone » cliquable, pubs, quêtes */
.zone-card { cursor: pointer; transition: transform .1s; }
.zone-card:active { transform: scale(.985); }
.zone-card.ready { border-color: var(--green); background: #effae8; animation: zready 1.6s ease-in-out infinite; }
@keyframes zready { 50% { box-shadow: 0 0 0 4px rgba(95,160,74,.35); } }
.zone-go { margin-top: 6px; font-weight: 900; font-size: 13px; color: var(--green-d); }
.ad-cd { background: var(--paper2); border-radius: 8px; padding: 4px 8px; font-size: 13px; font-weight: 800; margin-bottom: 6px; text-align: center; }
.qreset { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; }
.qreset .btn { white-space: normal; line-height: 1.15; }
.ach-rw { font-size: 11px; color: var(--ink2); margin-top: 2px; line-height: 1.3; }
.ach.done { opacity: .7; }

/* mini-tournois */
.mini-banner{display:flex;align-items:center;gap:10px;width:100%;text-align:left;cursor:pointer;font:inherit;color:inherit}
.mini-banner .mb-i{font-size:26px;line-height:1}
.mini-banner .mb-t{font-weight:800;font-variant-numeric:tabular-nums;color:#ffd070;white-space:nowrap}
.mini-banner.live{animation:mbpulse 2.4s ease-in-out infinite}
@keyframes mbpulse{0%,100%{box-shadow:0 0 0 0 rgba(255,208,112,.0)}50%{box-shadow:0 0 12px 2px rgba(255,208,112,.45)}}
.mini-card .mb-t{font-weight:800;color:#ffd070;font-variant-numeric:tabular-nums}

/* notifications cliquables */
.toast.go, .wow-banner.go { cursor: pointer; pointer-events: auto; }
.toast.go::after { content: '›'; margin-left: 8px; font-weight: 900; opacity: .7; }

/* étoiles du bestiaire */
.star-steps { display: flex; gap: 6px; margin-top: 8px; }
.star-steps .ss { flex: 1; text-align: center; padding: 5px 2px; border-radius: 8px; background: rgba(0,0,0,.08); color: #8a7a62; font-size: 11px; display: flex; flex-direction: column; gap: 1px; }
.star-steps .ss b { font-size: 14px; letter-spacing: 1px; }
.star-steps .ss.on { background: #ffe9a0; color: #8a5a00; box-shadow: inset 0 0 0 2px #f0b030; }
