/* ===================== Blobble — thème kawaii pastel ===================== */
:root {
  --pink: #ff8fb1; --pink-dark: #e0577f; --lav: #c3a6ff; --lav-dark: #8e6be0; --mint: #7fe0c0; --yellow: #ffd76a; --sky: #7fb8ff;
  --ink: #3b2a4f; --ink-soft: #6b5a80; --card: rgba(255,255,255,0.86); --line: rgba(120,80,160,0.15);
  --gold: #ffc531; --gold-dark: #d99a00; --radius: 22px; --shadow: 0 10px 30px rgba(120,80,160,0.18);
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; -webkit-text-size-adjust: 100%; }
body { font-family: "Nunito", "Segoe UI", system-ui, sans-serif; color: var(--ink); background: #f6effa; touch-action: none; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
input, textarea { user-select: text; -webkit-user-select: text; font-family: inherit; }
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.85em; }
a { color: var(--lav-dark); }
#app { position: fixed; inset: 0; }
#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ---------- boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: 16px; padding: 12px 22px; font-weight: 800; font-size: 16px; color: #fff; background: linear-gradient(180deg, #ff9fc0, var(--pink)); box-shadow: 0 5px 0 var(--pink-dark), 0 8px 18px rgba(224,87,127,0.25); transition: transform .08s, box-shadow .08s, filter .15s; text-decoration: none; }
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--pink-dark); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; filter: grayscale(0.4); }
.btn-secondary { background: linear-gradient(180deg, #d9c8ff, var(--lav)); box-shadow: 0 5px 0 var(--lav-dark), 0 8px 18px rgba(142,107,224,0.2); }
.btn-secondary:active { box-shadow: 0 2px 0 var(--lav-dark); }
.btn-gold { background: linear-gradient(180deg, #ffe38a, var(--gold)); color: #5a3d00; box-shadow: 0 5px 0 var(--gold-dark), 0 8px 18px rgba(217,154,0,0.25); }
.btn-gold:active { box-shadow: 0 2px 0 var(--gold-dark); }
.btn-small { padding: 8px 14px; font-size: 14px; border-radius: 12px; box-shadow: 0 3px 0 var(--pink-dark); }
.btn-small.btn-secondary { box-shadow: 0 3px 0 var(--lav-dark); }
.btn-small.btn-gold { box-shadow: 0 3px 0 var(--gold-dark); }
.btn-play { font-size: 24px; padding: 16px 40px; border-radius: 22px; letter-spacing: 1px; width: 100%; }
.btn-icon { width: 44px; height: 44px; border-radius: 14px; border: none; background: var(--card); color: var(--ink); font-size: 20px; box-shadow: var(--shadow); }
.btn-icon-small { width: 36px; height: 36px; border-radius: 10px; border: none; background: transparent; font-size: 18px; }
.link-btn { background: none; border: none; color: var(--lav-dark); font-weight: 700; text-decoration: underline; padding: 6px; }
.badge { background: var(--pink); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 12px; margin-left: 4px; }

/* ---------- écrans ---------- */
.screen { position: absolute; inset: 0; overflow: auto; -webkit-overflow-scrolling: touch; }
#menu { background: radial-gradient(1200px 700px at 20% -10%, #ffe1ec 0%, transparent 60%), radial-gradient(900px 600px at 100% 100%, #e6dcff 0%, transparent 60%), linear-gradient(180deg, #fbf5ff, #f3ecff); touch-action: pan-y; }
.menu-inner { max-width: 980px; margin: 0 auto; padding: calc(16px + var(--safe-top)) 16px calc(24px + var(--safe-bottom)); min-height: 100%; display: flex; flex-direction: column; gap: 16px; }
.menu-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand h1 { margin: 0; font-size: 52px; font-weight: 900; letter-spacing: -1px; background: linear-gradient(90deg, var(--pink-dark), var(--lav-dark)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand .tagline { margin: 2px 0 0; color: var(--ink-soft); font-weight: 700; }
.brand > div { display: none; }
#mascot { width: 110px; height: 110px; filter: drop-shadow(0 10px 14px rgba(120,80,160,0.25)); }
.menu-user { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pill { background: var(--card); border-radius: 999px; padding: 8px 14px; font-weight: 800; box-shadow: var(--shadow); font-size: 14px; }
.announcement { background: #fff3c4; border: 2px solid #ffd76a; border-radius: 14px; padding: 10px 14px; font-weight: 700; }
.menu-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; backdrop-filter: blur(8px); }
.play-card { display: flex; flex-direction: column; gap: 14px; }
.name-row { display: flex; gap: 10px; }
.name-row input { flex: 1; }
input[type=text], input[type=email], input[type=password], input:not([type]), select { width: 100%; border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 16px; font-weight: 700; color: var(--ink); background: #fff; outline: none; }
input:focus, select:focus { border-color: var(--lav); }
.mode-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mode-tab { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 2px solid var(--line); background: #fff; border-radius: 16px; padding: 10px 6px; font-weight: 800; color: var(--ink); transition: .15s; }
.mode-tab small { font-weight: 600; color: var(--ink-soft); font-size: 11px; }
.mode-tab .mode-icon { font-size: 24px; }
.mode-tab.active { border-color: var(--pink); background: #fff0f5; box-shadow: 0 4px 0 var(--pink); transform: translateY(-2px); }
.private-panel { border: 2px dashed var(--line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.private-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.private-row input { flex: 1; min-width: 120px; text-transform: uppercase; }
.private-create label { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.private-create select { width: auto; padding: 8px 10px; }
.private-or { text-align: center; color: var(--ink-soft); font-weight: 700; }
.private-code { font-size: 22px; text-align: center; }
.private-link { display: flex; gap: 8px; align-items: center; }
.private-link input { flex: 1; font-size: 13px; }
.controls-hint { margin: 0; text-align: center; color: var(--ink-soft); font-weight: 700; font-size: 13px; }
.side-card { display: flex; flex-direction: column; gap: 12px; }
.side-buttons { display: flex; flex-direction: column; gap: 10px; }
.side-buttons .btn { justify-content: flex-start; }
.btn-daily { background: linear-gradient(180deg, #ffe38a, var(--gold)); color: #5a3d00; box-shadow: 0 5px 0 var(--gold-dark); animation: wiggle 2.4s infinite; }
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-2deg); } 90% { transform: rotate(2deg); } 95% { transform: rotate(-1deg); } }
.premium-promo { border: 2px solid var(--gold); background: #fff9e3; border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.banner-ad { display: flex; justify-content: center; min-height: 0; }
.ad-mock-banner { width: 100%; max-width: 728px; height: 90px; border: 2px dashed var(--line); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--ink-soft); font-weight: 700; background: rgba(255,255,255,0.5); }
.menu-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--ink-soft); font-size: 13px; font-weight: 700; margin-top: auto; }
.lang-btn { background: none; border: 2px solid transparent; border-radius: 10px; padding: 4px 8px; font-weight: 800; color: var(--ink-soft); }
.lang-btn.active { border-color: var(--lav); color: var(--ink); background: #fff; }

/* ---------- HUD ---------- */
#hud { position: absolute; inset: 0; pointer-events: none; }
#hud > * { pointer-events: auto; }
.hud-box { position: absolute; background: rgba(255,255,255,0.72); border-radius: 16px; padding: 10px 14px; box-shadow: var(--shadow); backdrop-filter: blur(6px); font-weight: 800; }
#hud-stats { top: calc(12px + var(--safe-top)); left: 12px; display: flex; gap: 14px; font-size: 15px; }
.hud-stat span { color: var(--ink-soft); font-size: 12px; margin-right: 4px; }
#hud-center { top: calc(12px + var(--safe-top)); left: 50%; transform: translateX(-50%); text-align: center; font-size: 18px; }
#hud-round.urgent { color: var(--pink-dark); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: 0.5; } }
#hud-lb { top: calc(12px + var(--safe-top)); right: 12px; min-width: 170px; }
.hud-lb-title { text-align: center; color: var(--lav-dark); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
#hud-lb-list { margin: 0; padding: 0 0 0 20px; font-size: 13px; }
#hud-lb-list li { display: flex; justify-content: space-between; gap: 10px; }
#hud-lb-list li.me { color: var(--pink-dark); }
.lb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
#minimap { position: absolute; right: 12px; bottom: calc(12px + var(--safe-bottom)); }
#btn-ingame-menu { position: absolute; left: 12px; bottom: calc(12px + var(--safe-bottom)); }
#chat { position: absolute; left: 12px; bottom: calc(66px + var(--safe-bottom)); width: 300px; display: flex; flex-direction: column; gap: 6px; }
#chat-log { max-height: 160px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; font-size: 13px; font-weight: 600; padding: 4px; mask-image: linear-gradient(180deg, transparent, #000 25%); }
.chat-msg { background: rgba(255,255,255,0.7); border-radius: 10px; padding: 3px 8px; word-break: break-word; }
.chat-msg.old { opacity: 0.6; }
.chat-msg.system { background: rgba(195,166,255,0.5); font-style: italic; }
.chat-name { color: var(--lav-dark); font-weight: 900; margin-right: 6px; cursor: pointer; }
#chat-form { display: flex; gap: 4px; align-items: center; }
#chat-input { flex: 1; padding: 8px 12px; font-size: 14px; border-radius: 12px; background: rgba(255,255,255,0.85); }
#emote-panel { display: flex; gap: 4px; flex-wrap: wrap; background: rgba(255,255,255,0.9); border-radius: 12px; padding: 6px; }
#emote-panel button { border: none; background: transparent; font-size: 24px; padding: 4px; border-radius: 8px; }
#emote-panel button:hover { background: #ffe1ec; }
#btn-chat-toggle { display: none; position: absolute; left: 66px; bottom: calc(12px + var(--safe-bottom)); }
#touch-controls { position: absolute; right: 12px; bottom: calc(150px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 12px; align-items: flex-end; }
.touch-btn { width: 68px; height: 68px; border-radius: 50%; border: none; background: rgba(255,143,177,0.8); color: #fff; font-weight: 900; font-size: 13px; box-shadow: 0 4px 0 var(--pink-dark), 0 8px 18px rgba(0,0,0,0.15); touch-action: manipulation; }
.touch-btn-big { width: 90px; height: 90px; font-size: 16px; background: rgba(142,107,224,0.85); box-shadow: 0 4px 0 #6b49c9, 0 8px 18px rgba(0,0,0,0.15); }
.touch-btn:active { transform: translateY(3px); box-shadow: none; }

/* ---------- overlays mort / podium ---------- */
.overlay { background: rgba(60,30,90,0.45); display: flex; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(2px); }
.death-card, .podium-card { width: 100%; max-width: 460px; text-align: center; display: flex; flex-direction: column; gap: 12px; animation: pop .35s cubic-bezier(.2,1.4,.4,1); }
@keyframes pop { from { transform: scale(0.7); opacity: 0; } }
.death-card h2, .podium-card h2 { margin: 0; font-size: 26px; }
.death-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.death-stats div { background: #f7f2ff; border-radius: 12px; padding: 8px 4px; display: flex; flex-direction: column; }
.death-stats b { font-size: 18px; }
.death-stats span { font-size: 11px; color: var(--ink-soft); font-weight: 700; }
.death-reward { font-size: 20px; font-weight: 900; }
.xp-pill { font-size: 13px; background: #e6dcff; color: var(--lav-dark); border-radius: 999px; padding: 2px 10px; margin-left: 6px; }
.death-actions { display: flex; flex-direction: column; gap: 10px; }
.death-actions .btn small { font-weight: 700; opacity: 0.85; }
.podium-stage { display: flex; align-items: flex-end; justify-content: center; gap: 8px; margin-top: 8px; }
.podium-slot { display: flex; flex-direction: column; align-items: center; width: 33%; }
.podium-name { font-weight: 900; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-score { color: var(--ink-soft); font-weight: 700; font-size: 13px; }
.podium-block { width: 100%; border-radius: 10px 10px 0 0; color: #fff; font-weight: 900; font-size: 22px; display: flex; align-items: center; justify-content: center; }
.slot-1 .podium-block { height: 90px; background: linear-gradient(180deg, #ffe38a, var(--gold)); }
.slot-2 .podium-block { height: 64px; background: linear-gradient(180deg, #e6e9f0, #b9c0cc); }
.slot-3 .podium-block { height: 46px; background: linear-gradient(180deg, #f0bf95, #c98a58); }

/* ---------- modales ---------- */
#modal-backdrop { position: absolute; inset: 0; background: rgba(60,30,90,0.45); z-index: 20; }
.modal { position: absolute; z-index: 21; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(920px, calc(100% - 20px)); max-height: calc(100% - 20px); overflow: auto; background: #fff; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(60,30,90,0.35); padding: 18px; display: flex; flex-direction: column; gap: 12px; animation: pop .3s cubic-bezier(.2,1.4,.4,1); touch-action: pan-y; }
.modal-small { width: min(440px, calc(100% - 20px)); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.modal-head h2 { margin: 0; font-size: 22px; }
.modal-close { border: none; background: #f3ecff; width: 36px; height: 36px; border-radius: 12px; font-size: 16px; font-weight: 900; color: var(--ink); }
.modal-coins { display: flex; align-items: center; gap: 10px; font-weight: 900; margin-left: auto; }
.shop-layout { display: grid; grid-template-columns: 240px 1fr; gap: 16px; }
.shop-preview { display: flex; flex-direction: column; align-items: center; gap: 6px; background: linear-gradient(180deg, #fff0f5, #f3ecff); border-radius: 16px; padding: 10px; align-self: start; position: sticky; top: 0; }
.shop-preview-name { font-weight: 900; }
.shop-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.shop-tab { border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 800; color: var(--ink); }
.shop-tab.active { background: var(--lav); border-color: var(--lav); color: #fff; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.shop-item { border: 3px solid var(--line); border-radius: 16px; padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; background: #fff; position: relative; }
.shop-item canvas { width: 96px; height: 96px; }
.shop-item-name { font-weight: 900; font-size: 13px; text-align: center; }
.shop-item-rarity { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.shop-item-action { margin-top: auto; display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.shop-item.equipped { border-color: var(--pink); background: #fff0f5; }
.equipped-label { color: var(--pink-dark); font-weight: 900; font-size: 13px; }
.rarity-free .shop-item-rarity { color: #8a8a99; }
.rarity-common { border-color: #cfd6e6; } .rarity-common .shop-item-rarity { color: #6d7a99; }
.rarity-rare { border-color: #7fb8ff; } .rarity-rare .shop-item-rarity { color: #2f7fe0; }
.rarity-epic { border-color: #c3a6ff; } .rarity-epic .shop-item-rarity { color: #8e6be0; }
.rarity-legendary { border-color: var(--gold); background: linear-gradient(180deg, #fffdf3, #fff5d6); } .rarity-legendary .shop-item-rarity { color: var(--gold-dark); }
.product { min-height: 190px; justify-content: center; }
.product-icon { font-size: 44px; }
.product-coins { font-weight: 900; font-size: 18px; }
.product-badge { position: absolute; top: 8px; right: 8px; background: var(--pink); color: #fff; border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 900; }
.product.popular { border-color: var(--pink); }
.product-desc { font-size: 12px; color: var(--ink-soft); text-align: center; font-weight: 700; }
.product-info { grid-column: 1 / -1; }
.auth-tabs { display: flex; gap: 6px; }
.auth-tab { flex: 1; border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 8px; font-weight: 800; color: var(--ink); }
.auth-tab.active { background: var(--pink); border-color: var(--pink); color: #fff; }
#auth-form, #reset-form { display: flex; flex-direction: column; gap: 10px; }
.form-error { background: #ffe1e6; color: #b3213f; border-radius: 10px; padding: 8px 12px; font-weight: 700; font-size: 14px; }
.google-signin { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.or { color: var(--ink-soft); font-weight: 700; }
.profile-top { display: flex; gap: 14px; align-items: flex-start; }
.profile-info { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.profile-name { font-size: 20px; }
.premium-badge { background: linear-gradient(90deg, #ffe38a, var(--gold)); color: #5a3d00; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 900; }
.level-row { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.xp-bar { flex: 1; height: 12px; background: #eee6ff; border-radius: 999px; overflow: hidden; }
.xp-bar div { height: 100%; background: linear-gradient(90deg, var(--lav), var(--pink)); border-radius: 999px; transition: width .4s; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.profile-stats div { background: #f7f2ff; border-radius: 10px; padding: 6px; display: flex; flex-direction: column; align-items: center; }
.profile-stats span { font-size: 11px; color: var(--ink-soft); font-weight: 700; }
.guest-warning { background: #fff3c4; border-radius: 10px; padding: 8px 10px; font-size: 13px; font-weight: 700; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.quests-list { display: flex; flex-direction: column; gap: 8px; }
.quest { display: flex; gap: 10px; align-items: center; background: #f7f2ff; border-radius: 12px; padding: 10px; }
.quest.done { background: #e8fff4; }
.quest.claimed { opacity: 0.55; }
.quest-text { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.quest-bar { height: 8px; background: #fff; border-radius: 999px; overflow: hidden; }
.quest-bar div { height: 100%; background: var(--mint); }
.lb-tabs { display: flex; flex-direction: column; gap: 6px; }
.lb-tabgroup { display: flex; gap: 6px; flex-wrap: wrap; }
.lb-tabgroup button { border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 800; color: var(--ink); font-size: 13px; }
.lb-tabgroup button.active { background: var(--lav); border-color: var(--lav); color: #fff; }
.lb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.lb-list li { display: flex; align-items: center; gap: 10px; background: #f7f2ff; border-radius: 10px; padding: 8px 12px; font-weight: 800; }
.lb-list li.me { background: #fff0f5; outline: 2px solid var(--pink); }
.lb-list .lb-rank { width: 44px; }
.lb-list .lb-name { flex: 1; max-width: none; }
.lb-list .lb-lvl { font-size: 12px; color: var(--ink-soft); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-weight: 700; }
.setting-row select { width: auto; padding: 6px 10px; }
.setting-row input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--pink); }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; }
.chat-actions { display: flex; gap: 8px; justify-content: center; }

/* ---------- consentement / toasts / divers ---------- */
.consent { position: absolute; left: 12px; right: 12px; bottom: calc(12px + var(--safe-bottom)); z-index: 30; background: #fff; border-radius: 16px; box-shadow: 0 12px 40px rgba(60,30,90,0.3); padding: 14px 16px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.consent-text { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 4px; }
.consent-actions { display: flex; gap: 8px; }
#toasts { position: absolute; top: calc(70px + var(--safe-top)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; z-index: 40; pointer-events: none; }
.toast { background: rgba(59,42,79,0.92); color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 800; opacity: 0; transform: translateY(-8px); transition: .3s; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: none; }
.toast-good { background: rgba(46,180,120,0.95); }
.toast-error { background: rgba(224,87,127,0.95); }
.toast-warn { background: rgba(230,160,30,0.95); }
.connecting { position: absolute; inset: 0; z-index: 50; background: rgba(255,255,255,0.6); display: flex; align-items: center; justify-content: center; gap: 12px; font-weight: 900; font-size: 20px; }
.spinner { width: 28px; height: 28px; border: 4px solid var(--lav); border-top-color: var(--pink); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ad-mock { position: fixed; inset: 0; z-index: 100; background: rgba(20,10,30,0.85); display: flex; align-items: center; justify-content: center; }
.ad-mock-box { background: #fff; border-radius: 20px; padding: 30px; text-align: center; display: flex; flex-direction: column; gap: 10px; min-width: 280px; }
.ad-mock-label { color: var(--ink-soft); font-weight: 800; text-transform: uppercase; letter-spacing: 1px; font-size: 12px; }
.ad-mock-kind { font-weight: 900; font-size: 20px; }
.ad-mock-count { font-size: 44px; font-weight: 900; color: var(--pink-dark); }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .brand h1 { font-size: 36px; }
  #mascot { width: 84px; height: 84px; }
  .menu-grid { grid-template-columns: 1fr; }
  .card { padding: 14px; }
  .btn-play { font-size: 20px; padding: 14px; }
  .menu-user { width: 100%; justify-content: center; }
  .shop-layout { grid-template-columns: 1fr; }
  .shop-preview { flex-direction: row; justify-content: center; position: static; }
  .shop-preview canvas { width: 110px; height: 110px; }
  .shop-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .shop-item canvas { width: 80px; height: 80px; }
  .profile-top { flex-direction: column; align-items: center; }
  .death-stats { grid-template-columns: repeat(2, 1fr); }
  #hud-lb { min-width: 130px; padding: 8px 10px; }
  #hud-lb-list { font-size: 12px; }
  .lb-name { max-width: 80px; }
  #hud-stats { gap: 8px; font-size: 13px; padding: 8px 10px; }
  #chat { display: none; width: calc(100% - 24px); bottom: calc(66px + var(--safe-bottom)); }
  #chat.open { display: flex; }
  #btn-chat-toggle { display: block; }
  .ad-mock-banner { height: 60px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .menu-header { display: none; }
  #hud-lb-list li:nth-child(n+6) { display: none; }
}
body.in-game #menu { display: none; }

/* ===================== v1.1 : thème sombre, fil des kills, bonus, succès, tutoriel ===================== */
html.dark { --ink: #f1eaff; --ink-soft: #b9acd6; --card: rgba(40,31,64,0.92); --line: rgba(200,170,255,0.18); --shadow: 0 10px 30px rgba(0,0,0,0.35); }
html.dark body { background: #1c1730; }
html.dark #menu { background: radial-gradient(1200px 700px at 20% -10%, #3a2a5e 0%, transparent 60%), radial-gradient(900px 600px at 100% 100%, #2b2150 0%, transparent 60%), linear-gradient(180deg, #221b3a, #1a1530); }
html.dark input[type=text], html.dark input[type=email], html.dark input[type=password], html.dark input:not([type]), html.dark select { background: #2b2347; color: var(--ink); border-color: var(--line); }
html.dark .modal, html.dark .mode-tab, html.dark .shop-item, html.dark .shop-tab, html.dark .auth-tab, html.dark .lb-tabgroup button, html.dark .modal-close, html.dark .lang-btn.active { background: #2b2347; color: var(--ink); }
html.dark .mode-tab.active { background: #3d2a55; }
html.dark .shop-item.equipped { background: #3d2a55; }
html.dark .rarity-legendary { background: linear-gradient(180deg, #3a3020, #2f2a1e); }
html.dark .shop-preview { background: linear-gradient(180deg, #3a2a52, #2b2347); }
html.dark .death-stats div, html.dark .profile-stats div, html.dark .quest, html.dark .lb-list li, html.dark .private-panel, html.dark .top-widget { background: #2b2347; }
html.dark .quest.done { background: #1f3a30; }
html.dark .lb-list li.me { background: #3d2a55; }
html.dark .hud-box, html.dark .btn-icon { background: rgba(40,31,64,0.8); color: var(--ink); }
html.dark .chat-msg { background: rgba(40,31,64,0.75); }
html.dark #chat-input { background: rgba(40,31,64,0.9); }
html.dark #emote-panel { background: rgba(40,31,64,0.95); }
html.dark .consent, html.dark .ad-mock-box { background: #2b2347; }
html.dark .announcement { background: #3a3020; border-color: #7a6320; }
html.dark .premium-promo { background: #3a3020; }
html.dark .guest-warning { background: #3a3020; }
html.dark .brand h1 { background: linear-gradient(90deg, #ff9fc0, #c3a6ff); -webkit-background-clip: text; background-clip: text; }
html.dark .xp-bar, html.dark .quest-bar { background: #1c1730; }
html.dark .howto-step { background: #2b2347; }
html.dark .ach { background: #2b2347; }
html.reduced-motion * { animation: none !important; transition: none !important; }
#menu-bg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.menu-inner { position: relative; }
.brand-text { display: flex; flex-direction: column; }
#hud-info { position: absolute; top: calc(66px + var(--safe-top)); left: 14px; font-size: 12px; font-weight: 800; color: var(--ink-soft); background: rgba(255,255,255,0.55); border-radius: 999px; padding: 3px 10px; }
html.dark #hud-info { background: rgba(40,31,64,0.6); }
#feed { position: absolute; top: calc(96px + var(--safe-top)); left: 12px; display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
.feed-item { background: rgba(255,255,255,0.7); border-radius: 10px; padding: 3px 10px; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.feed-item b { color: var(--ink); }
.feed-item.me { background: rgba(255,143,177,0.85); color: #fff; } .feed-item.me b { color: #fff; }
html.dark .feed-item { background: rgba(40,31,64,0.75); }
#hud-effects { position: absolute; top: calc(12px + var(--safe-top)); left: 50%; transform: translateX(-50%); display: flex; gap: 8px; pointer-events: none; }
.fx { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.85); border: 2px solid var(--c); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 800; box-shadow: 0 4px 14px rgba(0,0,0,0.12); }
html.dark .fx { background: rgba(40,31,64,0.9); }
.fx-icon { font-size: 16px; } .fx-bar { width: 50px; height: 6px; background: rgba(0,0,0,0.1); border-radius: 999px; overflow: hidden; } .fx-bar div { height: 100%; background: var(--c); }
#hud-center { top: calc(56px + var(--safe-top)); }
.death-killer-row { display: flex; align-items: center; justify-content: center; gap: 10px; }
.death-killer-row canvas { width: 70px; height: 70px; }
.death-row { display: flex; gap: 10px; justify-content: center; }
.top-widget { background: #f7f2ff; border-radius: 14px; padding: 10px 12px; font-size: 13px; }
.top-widget-title { font-weight: 900; margin-bottom: 4px; }
.top-widget ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.top-widget li { display: flex; justify-content: space-between; font-weight: 700; }
.badge.hidden { display: none; }
.shop-item.featured { box-shadow: 0 0 0 3px rgba(255,197,49,0.5); }
.product-badge.promo { background: #2eb478; }
.shop-item-action s { opacity: 0.6; font-weight: 600; margin-right: 2px; }
.profile-tabs { display: flex; gap: 6px; }
.profile-tab { border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 800; color: var(--ink); }
.profile-tab.active { background: var(--lav); border-color: var(--lav); color: #fff; }
.achievements-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ach { background: #f7f2ff; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; opacity: 0.45; filter: grayscale(0.8); font-size: 12px; }
.ach.done { opacity: 1; filter: none; background: #fff4d6; }
.ach-icon { font-size: 30px; } .ach small { color: var(--ink-soft); font-weight: 600; } .ach-reward { font-weight: 900; color: var(--gold-dark); }
.howto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.howto-step { display: flex; flex-direction: column; gap: 4px; background: #f7f2ff; border-radius: 14px; padding: 10px; font-size: 13px; }
.howto-step canvas { width: 100%; height: auto; border-radius: 10px; }
.howto-step span { color: var(--ink-soft); font-weight: 600; }
@media (max-width: 760px) { #hud-effects { top: calc(56px + var(--safe-top)); } #hud-center { top: calc(96px + var(--safe-top)); } .fx-name { display: none; } #feed { top: calc(120px + var(--safe-top)); } .feed-item { font-size: 11px; } }
