/* Minefield : galerie de mine éclairée à la lanterne. Dalles de pierre taillée (dessinées une à une dans un canvas,
   voir ui.js → drawSlabs), cadre de fer et de laiton, gemmes dont la couleur suit le multiplicateur atteint.
   Le décor est dessiné une fois par taille et par niveau de danger (ui.js → drawDecor) ; tout ce qui bouge ici
   n'anime que transform / opacity. Deux variables pilotées par ui.js : --danger (nombre de mines choisi, 0 à 1)
   et --tension (risque de la prochaine case pendant la manche, 0 à 1). */
:root {
  --bg: #06080c;
  --panel: #151a23;
  --panel-2: #0f131a;
  --panel-3: #0a0d12;
  --border: #2a3242;
  --border-light: #4a556c;
  --muted: #98a4ba;
  --accent: #e9b54a;
  --green: #22c55e;
  --brass: #d9a441;
  --brass-hi: #ffe7a8;
  --brass-lo: #6f4c14;
  --amber: #ffb347;
  --cyan: #57e0ff;
  --ice: #c8f6ff;
  --blast: #ff5a36;
  --danger-c: #ff4d5e;
  --win: #5ef2a0;
  --gold: #f5c531;
  --tile-side: #1b212c;
  --panel-w: 324px;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* lettrage étroit des plaques et des compteurs (présent sur macOS et iOS ; repli condensé ailleurs) */
  --disp: "Avenir Next Condensed", "DIN Condensed", Bahnschrift, "Roboto Condensed", "sans-serif-condensed", "Arial Narrow", Inter, -apple-system, "Segoe UI", sans-serif;
}
/* paliers de gemme : cinq teintes du plus clair au plus sombre, lues par les symboles SVG et par l'alcôve de la case */
.g-t0 { --g1: #f2fdff; --g2: #c2f4ff; --g3: #7fdcff; --g4: #36aef5; --g5: #1568c9; --gs: 58%; }
.g-t1 { --g1: #e8f0ff; --g2: #aac6ff; --g3: #5f8dff; --g4: #2f5be6; --g5: #1a2f9c; --gs: 61%; }
.g-t2 { --g1: #eafff2; --g2: #a8f7c8; --g3: #4fe08c; --g4: #18b565; --g5: #0b7044; --gs: 64%; }
.g-t3 { --g1: #f7ebff; --g2: #dcb8ff; --g3: #b07cff; --g4: #7c43e6; --g5: #47209c; --gs: 67%; }
.g-t4 { --g1: #ffeaf2; --g2: #ffb3cd; --g3: #ff6a9c; --g4: #e62a6a; --g5: #96103f; --gs: 70%; }
.g-t5 { --g1: #fffbe0; --g2: #ffe98f; --g3: #ffc93a; --g4: #f08a0c; --g5: #a85a00; --gs: 76%; }

body {
  font-family: var(--font);
  --page-bg:
    radial-gradient(70% 42% at 50% -10%, rgba(255,170,80,.13), transparent 70%),
    radial-gradient(50% 40% at 100% 105%, rgba(60,140,200,.12), transparent 70%),
    linear-gradient(180deg, #080b10 0%, #06080c 60%, #050608 100%);
}
kbd { font: 700 10px/1 var(--font); letter-spacing: .02em; }
.topbar { background: linear-gradient(180deg, #1b212c, #10141b); border-bottom-color: #000; box-shadow: inset 0 -1px 0 rgba(233,181,74,.18); }
.logo .mn-logo { display: inline-block; font: 800 22px/1 var(--disp); font-style: normal; letter-spacing: 2.6px; color: var(--brass-hi); background: linear-gradient(180deg, #fff4cf 8%, #f0c160 46%, #a8711c 96%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 1px 0 rgba(0,0,0,.8)); }
.topbar .balance { background: var(--panel-3); border: 1px solid rgba(233,181,74,.28); border-radius: 20px; padding: 6px 12px; color: #fff; }
.topbar .balance .cur { color: var(--muted); }
.mn-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.mn-fly { position: fixed; inset: 0; z-index: 25; pointer-events: none; overflow: hidden; contain: strict; }
.mn-flyer { position: absolute; left: 0; top: 0; display: block; will-change: transform, opacity; }
.mn-flyer svg { display: block; width: 100%; height: 100%; }

/* ========= disposition ========= */
.mn { display: grid; grid-template-columns: var(--panel-w) minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr); gap: 8px; padding: 8px; height: calc(100vh - var(--topbar-h)); height: calc(100dvh - var(--topbar-h)); min-height: 0; }
.mn-history { grid-column: 2; grid-row: 1; min-width: 0; }
.mn-session { grid-column: 3; grid-row: 1; }
.mn-stage { grid-column: 2 / span 2; grid-row: 2; }
.mn-panel { grid-column: 1; grid-row: 1 / span 2; }

/* ========= historique (puces) et session ========= */
.mn-history .history-bar, .mn-session { height: 34px; border-radius: 11px; background: linear-gradient(180deg, #1b212c, #11151c); border: 1px solid #2b3344; box-shadow: inset 0 1px 0 rgba(255,255,255,.07); }
.mn-history .history-bar { padding: 0 6px 0 10px; gap: 8px; }
.mn-history-ico { display: inline-flex; color: #7f8ba3; flex: 0 0 auto; }
.mn-history .history-chips:empty::before { content: attr(data-empty); font-size: 12px; color: #77839b; white-space: nowrap; align-self: center; }
.mn-history .history-toggle { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 8px; padding: 4px 7px; color: #b6c0d2; }
.mn-history .history-toggle:hover, .mn-history .history-toggle.open { background: rgba(233,181,74,.16); color: #fff; }
.mn-history .history-expanded { top: 38px; background: #151a23; border-color: #2b3344; }
.mn-history .chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: 7px; font: 700 14px/1 var(--disp); letter-spacing: .4px; font-variant-numeric: tabular-nums; background: #0a0d12; border: 1px solid rgba(255,255,255,.1); transition: transform .12s, border-color .15s; }
.mn-history .chip:hover { outline: none; transform: translateY(-1px); border-color: rgba(255,255,255,.5); }
.mn-history .chip.won { color: #8dffc4; border-color: rgba(94,242,160,.36); background: linear-gradient(180deg, #123425, #0a1a14); }
.mn-history .chip.won.big { color: #ffe27a; border-color: rgba(245,197,49,.55); background: linear-gradient(180deg, #3c2c08, #1a1306); }
.mn-history .chip.lost { color: #ff9c8a; border-color: rgba(255,90,54,.4); background: linear-gradient(180deg, #3a130c, #190a08); padding: 0 6px; }
.mn-history .chip svg { width: 15px; height: 15px; display: block; }
.mn-history .chip:first-child { animation: mnChipIn .35s cubic-bezier(.2,1.4,.4,1) both; }
.mn-history .history-expanded .empty { width: 100%; }
.mn-session { display: inline-flex; align-items: center; gap: 0; padding: 0 4px; color: var(--muted); transition: border-color .15s; }
.mn-session:hover { border-color: rgba(233,181,74,.5); }
.mn-session .ss { display: inline-flex; align-items: baseline; gap: 6px; padding: 0 10px; white-space: nowrap; }
.mn-session .ss + .ss { border-left: 1px solid rgba(255,255,255,.08); }
.mn-session .ss em { font-style: normal; font-size: 11px; font-weight: 600; color: #8490a6; }
.mn-session .ss b { font: 700 16px/1 var(--disp); letter-spacing: .4px; color: #e8edf6; font-variant-numeric: tabular-nums; }
.mn-session .ss svg { width: 14px; height: 14px; align-self: center; }
.mn-session .ss.net.pos b { color: var(--win); }
.mn-session .ss.net.neg b { color: #ff8f7a; }
.mn-session .ss.bump b { animation: mnBump .45s cubic-bezier(.2,1.6,.4,1); }

/* ========= scène ========= */
.mn-stage {
  --danger: 0; --tension: 0;
  --cry: 87,224,255; --cry2: 167,139,255;
  position: relative; display: flex; flex-direction: column; min-height: 0; overflow: hidden; isolation: isolate;
  border-radius: 16px; padding: 18px 12px 8px; border: 1px solid #2b3344;
  background: radial-gradient(ellipse 70% 60% at 50% 40%, #1a2a3e 0%, #0c121c 55%, #06080c 100%);   /* visible le temps que le canvas soit dessiné */
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.6), 0 10px 30px rgba(0,0,0,.5);
}
.mn-stage[data-tier="1"] { --cry: 255,206,110; --cry2: 120,220,255; }
.mn-stage[data-tier="2"] { --cry: 255,150,70; --cry2: 255,206,110; }
.mn-stage[data-tier="3"] { --cry: 255,84,58; --cry2: 255,150,70; }
.mn-decor { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; border-radius: inherit; }
.mn-stage.rumble .mn-decor { animation: mnRumble .7s linear; }

/* ----- ambiance : chaleur, lueurs des cristaux, poussière, braises, gouttes, éboulis, lanterne ----- */
.mn-amb { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; border-radius: inherit; }
.amb-heat { position: absolute; inset: 0; opacity: var(--danger); transition: opacity .6s; background: radial-gradient(120% 62% at 50% 112%, rgba(255,80,24,.5), rgba(255,60,20,.14) 46%, transparent 72%), linear-gradient(180deg, rgba(120,14,0,.2), transparent 36%); }
.amb-glows b { position: absolute; width: var(--s, 90px); height: var(--s, 90px); margin: calc(var(--s, 90px) / -2) 0 0 calc(var(--s, 90px) / -2); border-radius: 50%; background: radial-gradient(circle, rgba(var(--cry), .55) 0%, rgba(var(--cry), .18) 36%, rgba(var(--cry), 0) 68%); opacity: .35; animation: mnPulse 4.4s ease-in-out infinite alternate; will-change: opacity; }
.amb-glows b:nth-child(2n) { background: radial-gradient(circle, rgba(var(--cry2), .5) 0%, rgba(var(--cry2), .16) 36%, rgba(var(--cry2), 0) 68%); animation-duration: 5.6s; animation-delay: -2.1s; }
.amb-glows b:nth-child(3n) { animation-duration: 3.7s; animation-delay: -1.2s; }
.amb-glows b:nth-child(5n) { animation-delay: -3.3s; }
.mn-stage.tense .amb-glows b { animation: mnPulse 1.1s ease-in-out infinite alternate, mnJitter .14s steps(2) infinite; }
.amb-dust i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: radial-gradient(circle, #fff 0%, rgba(255,220,170,.9) 40%, rgba(255,200,140,0) 70%); opacity: 0; animation: mnDust 14s linear infinite; }
.amb-dust i:nth-child(1) { left: 4%; top: 78%; animation-duration: 15s; }
.amb-dust i:nth-child(2) { left: 9%; top: 42%; animation-duration: 19s; animation-delay: -6s; width: 4px; height: 4px; }
.amb-dust i:nth-child(3) { left: 14%; top: 90%; animation-duration: 13s; animation-delay: -3s; }
.amb-dust i:nth-child(4) { left: 21%; top: 60%; animation-duration: 22s; animation-delay: -11s; width: 2px; height: 2px; }
.amb-dust i:nth-child(5) { left: 3%; top: 24%; animation-duration: 17s; animation-delay: -9s; }
.amb-dust i:nth-child(6) { left: 96%; top: 84%; animation-duration: 16s; animation-delay: -2s; width: 4px; height: 4px; }
.amb-dust i:nth-child(7) { left: 90%; top: 50%; animation-duration: 21s; animation-delay: -13s; }
.amb-dust i:nth-child(8) { left: 84%; top: 94%; animation-duration: 14s; animation-delay: -7s; width: 2px; height: 2px; }
.amb-dust i:nth-child(9) { left: 78%; top: 66%; animation-duration: 18s; animation-delay: -4s; }
.amb-dust i:nth-child(10) { left: 97%; top: 30%; animation-duration: 20s; animation-delay: -15s; }
.amb-dust i:nth-child(11) { left: 30%; top: 98%; animation-duration: 12s; animation-delay: -5s; }
.amb-dust i:nth-child(12) { left: 68%; top: 99%; animation-duration: 13s; animation-delay: -8s; width: 4px; height: 4px; }
/* braises : seulement quand le champ est très miné */
.amb-embers { position: absolute; inset: 0; opacity: calc((var(--danger) - .42) * 2.4); transition: opacity .6s; }
.amb-embers i { position: absolute; bottom: -6px; width: 3px; height: 3px; border-radius: 50%; background: radial-gradient(circle, #fff3c4 0%, #ffb300 40%, rgba(255,90,20,0) 72%); opacity: 0; animation: mnEmber 6s linear infinite; }
.amb-embers i:nth-child(1) { left: 6%; animation-duration: 5.2s; }
.amb-embers i:nth-child(2) { left: 16%; animation-duration: 7.4s; animation-delay: -2s; width: 4px; height: 4px; }
.amb-embers i:nth-child(3) { left: 31%; animation-duration: 6.1s; animation-delay: -4s; }
.amb-embers i:nth-child(4) { left: 47%; animation-duration: 8s; animation-delay: -1s; width: 2px; height: 2px; }
.amb-embers i:nth-child(5) { left: 62%; animation-duration: 5.6s; animation-delay: -3s; }
.amb-embers i:nth-child(6) { left: 77%; animation-duration: 7s; animation-delay: -5s; width: 4px; height: 4px; }
.amb-embers i:nth-child(7) { left: 88%; animation-duration: 6.4s; animation-delay: -2.6s; }
.amb-embers i:nth-child(8) { left: 95%; animation-duration: 5s; animation-delay: -.8s; width: 2px; height: 2px; }
/* gouttes qui tombent des stalactites (déclenchées une à une par ui.js) */
.amb-drips i { position: absolute; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%; background: linear-gradient(180deg, rgba(200,246,255,.2), rgba(200,246,255,.95)); opacity: 0; }
.amb-drips i.go { animation: mnDrip 1.15s cubic-bezier(.55,0,1,.55) forwards; }
/* éboulis lointains : quelques cailloux et un filet de poussière qui tombent du plafond */
.amb-rubble i { position: absolute; top: 12px; width: 5px; height: 4px; border-radius: 30% 50% 40% 60%; background: #46505f; box-shadow: inset -1px -1px 0 rgba(0,0,0,.5); opacity: 0; }
.amb-rubble i:nth-child(2n) { width: 3px; height: 3px; background: #6a7484; }
.amb-rubble i:nth-child(3n) { width: 2px; height: 26px; border-radius: 1px; background: linear-gradient(180deg, rgba(210,200,180,0), rgba(210,200,180,.5)); box-shadow: none; }
.amb-rubble i.go { animation: mnRubble var(--d, 1.3s) cubic-bezier(.5,0,.9,.5) var(--w, 0s) forwards; }
/* lanterne de mineur : suspendue à la poutre quand il y a de la marge, posée au sol sinon */
.amb-lamp { position: absolute; left: var(--lx, 60px); top: var(--ly, 14px); width: 0; height: 0; --rope: 46px; display: none; }
.amb-lamp.hang, .amb-lamp.stand { display: block; }
.amb-lamp.hang { transform-origin: 0 0; animation: mnSwing 5.6s ease-in-out infinite alternate; }
.lp-rope { position: absolute; left: -1px; top: 0; width: 2px; height: var(--rope); background: linear-gradient(180deg, #2c2116, #7a5c34); }
.lp-body { position: absolute; left: -19px; top: calc(var(--rope) - 3px); width: 38px; height: 56px; display: block; }
.lp-halo { position: absolute; left: -150px; top: calc(var(--rope) - 122px); width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(255,214,140,.5) 0%, rgba(255,170,70,.17) 32%, rgba(255,150,50,0) 68%); animation: mnFlick 3.1s ease-in-out infinite; }
.lp-flame { transform-box: fill-box; transform-origin: 50% 100%; animation: mnFlame .9s ease-in-out infinite alternate; }
.amb-lamp.stand { --rope: 0px; }
.amb-lamp.stand .lp-rope { display: none; }
.amb-lamp.stand .lp-body { top: -40px; left: -12px; width: 24px; height: 36px; }
.amb-lamp.stand .lp-halo { left: -80px; top: -104px; width: 160px; height: 160px; }
.mn-stage[data-tier="3"] .lp-halo { animation-duration: .9s; }
/* le cadrage se resserre avec le risque : vignette qui s'épaissit, et qui se contracte à chaque battement de cœur */
.mn-dim { position: absolute; inset: -9%; z-index: 1; pointer-events: none; opacity: calc(var(--tension) * .82); transition: opacity .7s; background: radial-gradient(ellipse 56% 54% at var(--bx, 50%) var(--by, 54%), rgba(0,0,0,0) 46%, rgba(0,0,0,.5) 76%, rgba(0,0,0,.9) 100%); }
.mn-stage.beat .mn-dim { animation: mnBeat .36s ease-out; }

/* ----- affichage : plaques de fer suspendues à la poutre ----- */
.mn-status { position: relative; z-index: 2; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mn-hud { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1.1fr); gap: 8px; width: min(100%, 600px); align-items: stretch; }
.mn-status .st {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; padding: 6px 10px 6px; border-radius: 9px; text-align: center;
  background:
    radial-gradient(circle 2.6px at 8px 8px, #c3ccd9 0 35%, #2a303a 75%, rgba(42,48,58,0) 100%),
    radial-gradient(circle 2.6px at calc(100% - 8px) 8px, #c3ccd9 0 35%, #2a303a 75%, rgba(42,48,58,0) 100%),
    linear-gradient(180deg, #2e3542 0%, #1b202a 44%, #10141b 100%);
  border: 1px solid #000; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), inset 0 1px 0 rgba(255,255,255,.2), 0 8px 18px rgba(0,0,0,.6);
  transition: box-shadow .25s;
}
/* deux chaînes qui montent jusqu'à la poutre */
.mn-status .st::before { content: ""; position: absolute; left: 7px; right: 7px; bottom: 100%; height: 12px; pointer-events: none; background: repeating-linear-gradient(180deg, #8a6a3a 0 2px, #3b2c18 2px 4px) 0 0 / 2px 100% no-repeat, repeating-linear-gradient(180deg, #8a6a3a 0 2px, #3b2c18 2px 4px) 100% 0 / 2px 100% no-repeat; }
.mn-status .st small { display: block; font-size: 11px; font-weight: 600; color: #98a4ba; white-space: nowrap; line-height: 1.2; }
.mn-status .st b { display: block; font: 700 27px/1.1 var(--disp); letter-spacing: .6px; color: #f2f5fa; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mn-status .st em { display: block; font-style: normal; font-size: 11px; font-weight: 600; color: #8490a6; min-height: 14px; line-height: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* la valeur à encaisser est la vedette : liseré de laiton, chiffres dorés, halo qui respire dès qu'il y a de quoi encaisser */
.mn-status .st.win { box-shadow: inset 0 0 0 1.5px rgba(217,164,65,.75), inset 0 1px 0 rgba(255,236,170,.35), 0 8px 18px rgba(0,0,0,.6); background: radial-gradient(circle 2.6px at 8px 8px, #ffe7a8 0 35%, #6f4c14 75%, rgba(111,76,20,0) 100%), radial-gradient(circle 2.6px at calc(100% - 8px) 8px, #ffe7a8 0 35%, #6f4c14 75%, rgba(111,76,20,0) 100%), linear-gradient(180deg, #3a2e16 0%, #1f1a12 46%, #12110f 100%); }
.mn-status .st.win small { color: #e7cd8e; }
.mn-status .st.win b { font-size: 36px; line-height: 1.04; color: #ffd75a; background: linear-gradient(180deg, #fffbe0 0%, #ffd75a 45%, #f59a1b 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.mn-status .st.win em { color: #bfa566; letter-spacing: 1px; }
.st-glow { position: absolute; inset: -8px; border-radius: 16px; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at 50% 50%, rgba(255,205,70,.5), rgba(255,170,40,0) 70%); z-index: -1; }
.mn-status.idle .st.mult b, .mn-status.idle .st.win b { color: #6f7b90; background: none; -webkit-text-fill-color: currentColor; }
.mn-status.live .st.mult { box-shadow: inset 0 0 0 1px rgba(87,224,255,.5), inset 0 1px 0 rgba(255,255,255,.2), 0 8px 18px rgba(0,0,0,.6), 0 0 16px rgba(87,224,255,.2); }
.mn-status.cash .st.win { box-shadow: inset 0 0 0 1.5px #ffd75a, inset 0 1px 0 rgba(255,236,170,.4), 0 8px 18px rgba(0,0,0,.6), 0 0 22px rgba(245,197,49,.3); }
.mn-status.cash .st-glow { animation: mnGlow 1.7s ease-in-out infinite; }
.mn-status .st.bump b { animation: mnBump .42s cubic-bezier(.2,1.6,.4,1); }
.mn-status .st.catch { animation: mnCatch .3s ease-out; }
.mn-status.won .st.win { box-shadow: inset 0 0 0 1.5px var(--win), inset 0 1px 0 rgba(200,255,230,.3), 0 8px 18px rgba(0,0,0,.6), 0 0 22px rgba(94,242,160,.3); background: linear-gradient(180deg, #123a28 0%, #0d1f18 50%, #0a1210 100%); }
.mn-status.won .st.win small, .mn-status.won .st.win em { color: #a6f5cf; }
.mn-status.won .st.win b { background: linear-gradient(180deg, #f0fff7, #5ef2a0 55%, #1fbf78); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.mn-status.lost .st.mult, .mn-status.lost .st.win { box-shadow: inset 0 0 0 1.5px rgba(255,90,54,.7), 0 8px 18px rgba(0,0,0,.6); background: linear-gradient(180deg, #3e150e 0%, #1f0d0a 50%, #120908 100%); }
.mn-status.lost .st.mult b { color: #ff8f7a; }
.mn-status.lost .st.win small, .mn-status.lost .st.win em { color: #ffb5a6; }
.mn-status.lost .st.win b { background: none; -webkit-text-fill-color: currentColor; color: #ff8f7a; }
/* prochaine case : chance qu'elle soit sûre (jauge) et ce qu'elle rapporterait */
.mn-status .st.next { --safe-c: #5ef2a0; }
.nx-row { display: inline-flex; align-items: center; justify-content: center; gap: 6px; line-height: 1; }
.nx-row .ring { width: 24px; height: 24px; flex: 0 0 auto; transform: rotate(-90deg); }
.rg-bg { fill: none; stroke: rgba(255,255,255,.12); stroke-width: 6; }
.rg-val { fill: none; stroke: var(--safe-c); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 88 100; transition: stroke-dasharray .45s cubic-bezier(.3,1,.4,1), stroke .4s; }
.mn-status .st.next b { display: inline-block; color: var(--safe-c); transition: color .4s; }
.nx-row i { font-style: normal; font-size: 11px; font-weight: 700; color: #b6c0d2; align-self: flex-end; padding-bottom: 5px; }
.mn-status .st.next em { color: #cfd6e4; }
.mn-status .st.next em u { text-decoration: none; color: var(--gold); font-weight: 800; }
.mn-status .st.next.hot { box-shadow: inset 0 0 0 1px rgba(255,90,54,.6), inset 0 1px 0 rgba(255,255,255,.2), 0 8px 18px rgba(0,0,0,.6), 0 0 16px rgba(255,90,54,.22); }
.mn-status .st.next.off .nx-row, .mn-status .st.next.off em { opacity: .35; }

/* rail de gemmes : une alvéole par case sûre, les diamants trouvés s'y rangent dans l'ordre */
.mn-rail { display: flex; align-items: center; gap: 8px; width: min(100%, 600px); }
.rl-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px 0 4px; border-radius: 8px; font: 700 15px/1 var(--disp); letter-spacing: .4px; font-variant-numeric: tabular-nums; background: #0a0d12; border: 1px solid #000; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 3px 8px rgba(0,0,0,.5); }
.rl-chip svg { width: 18px; height: 18px; display: block; }
.rl-chip.mines { color: #ffc9bd; box-shadow: inset 0 0 0 1px rgba(255,90,54,.5), 0 3px 8px rgba(0,0,0,.5); }
.rl-chip.gems { color: #dff8ff; box-shadow: inset 0 0 0 1px rgba(87,224,255,.5), 0 3px 8px rgba(0,0,0,.5); }
.rl-chip.gems.bump { animation: mnBump .4s cubic-bezier(.2,1.6,.4,1); }
.rl-track { position: relative; flex: 1 1 auto; min-width: 0; display: grid; grid-template-columns: repeat(var(--n, 22), minmax(0, 1fr)); align-items: center; height: 24px; padding: 0 5px; border-radius: 12px; background: linear-gradient(180deg, #040507, #10141b); box-shadow: inset 0 2px 4px #000, 0 0 0 1px rgba(255,255,255,.09), 0 3px 8px rgba(0,0,0,.45); }
.sk { position: relative; justify-self: center; width: min(100%, 15px); height: 15px; }
.sk::before { content: ""; position: absolute; left: 50%; top: 50%; width: 62%; height: 62%; max-width: 9px; max-height: 9px; transform: translate(-50%, -50%) rotate(45deg); border-radius: 1.5px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
.sk.res::before { box-shadow: inset 0 0 0 1px rgba(200,246,255,.6); }
.sk.on::before { width: 78%; height: 78%; max-width: 11px; max-height: 11px; background: linear-gradient(135deg, var(--g1) 0%, var(--g3) 50%, var(--g5) 100%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.55); }
.sk.on::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; background: radial-gradient(circle, var(--g3), transparent 68%); opacity: .4; }
.sk.pop { animation: mnSkIn .42s cubic-bezier(.2,1.8,.4,1); }
.mn-rail.lost .sk.on { opacity: .28; transition: opacity .5s .3s; }
.mn-rail.lost .sk.on::after { display: none; }
.mn-rail.won .sk.on { animation: mnSkWin .5s calc(var(--i, 0) * 28ms) ease-out both; }

/* ----- plateau : cadre de fer riveté, équerres de laiton, fosse sombre ----- */
.mn-board-area { position: relative; z-index: 2; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 10px 0 6px; }
.mn-board-wrap { --board: 300px; --lab: 27px; --gap: 8px; --rv: 3.2px; position: relative; display: grid; grid-template-columns: var(--lab) var(--board) var(--lab); grid-template-rows: var(--lab) var(--board) var(--lab); }
.mn-board-wrap.shake { animation: mnShake .62s cubic-bezier(.36,.07,.19,.97) both; }
.mn-frame {
  position: absolute; inset: 0; border-radius: calc(var(--lab) * .6 + 4px); pointer-events: none; isolation: isolate;
  background:
    linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,0) 20%, rgba(0,0,0,.3) 100%),
    linear-gradient(135deg, #4a5364 0%, #232a36 22%, #3b4452 46%, #171c25 70%, #2e3643 100%);
  box-shadow: 0 0 0 1px #000, 0 0 0 2.5px rgba(255,255,255,.08), 0 22px 46px rgba(0,0,0,.75), 0 0 80px rgba(255,180,90,.1), inset 0 1.5px 0 rgba(255,255,255,.4), inset 0 -2px 0 rgba(0,0,0,.6);
}
/* rivets : pastilles répétées au milieu de chaque bande */
.mn-frame::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; --b: calc(var(--lab) - var(--gap)); --rg: radial-gradient(circle var(--rv) at 50% 50%, #e3e9f2 0, #8792a6 40%, #171b23 80%, rgba(23,27,35,0) 100%);
  background: var(--rg) 12.5% 0 / 20% var(--b) repeat-x, var(--rg) 12.5% 100% / 20% var(--b) repeat-x, var(--rg) 0 12.5% / var(--b) 20% repeat-y, var(--rg) 100% 12.5% / var(--b) 20% repeat-y;
}
/* fosse du plateau, bordée d'un liseré lumineux qui change de teinte selon l'état de la manche */
.mn-frame::after {
  content: ""; position: absolute; inset: calc(var(--lab) - var(--gap)); border-radius: calc(var(--lab) * .3 + 6px);
  background: radial-gradient(120% 100% at 50% 0%, #151c28 0%, #090c12 55%, #040506 100%);
  box-shadow: inset 0 0 0 1.5px var(--rim, rgba(255,214,150,.55)), inset 0 0 20px var(--rim-in, rgba(255,180,90,.16)), inset 0 8px 26px rgba(0,0,0,.85), 0 0 14px var(--rim-out, rgba(255,180,90,.22)), 0 0 0 1px #000;
  transition: box-shadow .35s;
}
.mn-stage[data-state="playing"] .mn-frame::after { --rim: #a8f0ff; --rim-in: rgba(87,224,255,.36); --rim-out: rgba(87,224,255,.6); }
.mn-stage[data-state="won"] .mn-frame::after { --rim: #ffe27a; --rim-in: rgba(245,197,49,.4); --rim-out: rgba(245,197,49,.7); }
.mn-stage[data-state="lost"] .mn-frame::after { --rim: #ff8062; --rim-in: rgba(255,70,30,.45); --rim-out: rgba(255,70,30,.7); }
/* braise sous les dalles : elle filtre entre les joints quand le champ est très miné */
.mn-frame .lava { position: absolute; inset: calc(var(--lab) - var(--gap) + 2px); border-radius: calc(var(--lab) * .3 + 4px); opacity: calc(var(--danger) * 1.15 - .12); transition: opacity .6s; overflow: hidden; z-index: 1; }
.mn-frame .lava::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 50% at 30% 70%, rgba(255,120,30,.75), transparent 70%), radial-gradient(55% 45% at 75% 30%, rgba(255,70,20,.65), transparent 70%), linear-gradient(180deg, rgba(120,20,0,.5), rgba(255,90,20,.5)); animation: mnLava 3.2s ease-in-out infinite alternate; }
/* bandes de signalisation : elles apparaissent sur le cadre à partir d'une dizaine de mines */
.mn-frame .hz { position: absolute; left: calc(var(--lab) * 1.7); right: calc(var(--lab) * 1.7); bottom: calc((var(--lab) - var(--gap)) * .2); height: calc((var(--lab) - var(--gap)) * .6); border-radius: 2px; background: repeating-linear-gradient(-45deg, #f2c200 0 7px, #15181d 7px 14px); opacity: calc((var(--danger) - .36) * 1.9); transition: opacity .5s; box-shadow: inset 0 0 0 1px rgba(0,0,0,.6); z-index: 2; }
/* équerres de laiton aux quatre coins : deux bras biseautés et un rivet, retournés par symétrie */
.mn-frame .c { position: absolute; left: 0; top: 0; width: var(--cs, 58px); height: var(--cs, 58px); --t: calc(var(--lab) - var(--gap)); overflow: hidden; border-top-left-radius: calc(var(--lab) * .6 + 4px); z-index: 3; }
.mn-frame .c::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: var(--t); clip-path: polygon(0 0, 100% 0, calc(100% - var(--t) * .7) 100%, 0 100%);
  background: radial-gradient(circle calc(var(--rv) + .6px) at calc(var(--t) * .62) 55%, #fff6d8 0, #b98a2a 55%, #4f3608 92%, rgba(79,54,8,0) 100%), linear-gradient(180deg, #fff0bf 0%, #e8c468 22%, #c99a34 62%, #8a6316 100%); }
.mn-frame .c::after { content: ""; position: absolute; left: 0; top: var(--t); width: var(--t); height: calc(100% - var(--t)); clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--t) * .7), 0 100%); background: linear-gradient(90deg, #e8c468 0%, #c99a34 45%, #8a6316 100%); }
.mn-frame .c.tr { left: auto; right: 0; transform: scaleX(-1); }
.mn-frame .c.bl { top: auto; bottom: 0; transform: scaleY(-1); }
.mn-frame .c.br { left: auto; top: auto; right: 0; bottom: 0; transform: scale(-1, -1); }
.mn-cols { grid-column: 2; grid-row: 1; display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: var(--gap); position: relative; z-index: 1; }
.mn-rows { grid-column: 1; grid-row: 2; display: grid; grid-template-rows: repeat(5, 1fr); padding-right: var(--gap); position: relative; z-index: 1; }
.mn-cols span, .mn-rows span { display: flex; align-items: center; justify-content: center; font: 700 13px/1 var(--disp); color: #d5dbe6; text-shadow: 0 1px 0 rgba(0,0,0,.9); user-select: none; }
.mn-board { grid-column: 2; grid-row: 2; position: relative; z-index: 1; display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(5, 1fr); gap: calc(var(--board) * .026); }
.mn-torch { position: absolute; left: 0; top: 0; width: calc(var(--board) * .7); height: calc(var(--board) * .7); margin: calc(var(--board) * -.35) 0 0 calc(var(--board) * -.35); border-radius: 50%; pointer-events: none; z-index: 3; opacity: 0; transition: opacity .35s; background: radial-gradient(circle, rgba(255,222,160,.2) 0%, rgba(255,196,120,.08) 38%, rgba(255,190,110,0) 66%); will-change: transform; }
.mn-board-wrap.torch .mn-torch { opacity: 1; }
.mn-fx { position: absolute; inset: -70px; width: calc(100% + 140px); height: calc(100% + 140px); pointer-events: none; z-index: 5; }
.mn-flash { position: absolute; inset: -30px; border-radius: 30px; pointer-events: none; z-index: 4; opacity: 0; background: radial-gradient(circle at var(--fx, 50%) var(--fy, 50%), rgba(255,240,200,.95) 0%, rgba(255,150,60,.6) 20%, rgba(255,70,30,.34) 44%, rgba(255,60,20,0) 74%); }
.mn-flash.on { animation: mnFlash .8s ease-out; }
.mn-flash.gold { background: radial-gradient(circle at 50% 50%, rgba(255,250,220,.75) 0%, rgba(255,214,110,.4) 30%, rgba(255,190,60,0) 70%); }

/* palier franchi : tampon bref au-dessus du plateau */
.mn-stamp { position: absolute; left: 50%; top: calc(var(--lab) * .5); z-index: 6; pointer-events: none; display: flex; align-items: baseline; gap: 8px; padding: 4px 14px 5px; border-radius: 10px; white-space: nowrap; transform: translate(-50%, -50%); background: linear-gradient(180deg, #2a2213, #14100a); box-shadow: inset 0 0 0 1.5px var(--brass), 0 8px 22px rgba(0,0,0,.7), 0 0 26px rgba(245,197,49,.35); }
.mn-stamp b { font: 800 30px/1 var(--disp); letter-spacing: 1px; color: #ffd75a; background: linear-gradient(180deg, #fffbe0, #ffd75a 45%, #f59a1b); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.mn-stamp span { font-size: 12px; font-weight: 700; color: var(--g2, #ffe7a8); }
.mn-stamp span:empty { display: none; }
.mn-stamp.in { animation: mnStamp 1.25s cubic-bezier(.2,1.5,.4,1) both; }
.mn-stamp.low { top: calc(100% - var(--lab) * .5); }

/* ----- cartouche de gain ----- */
.mn-win { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 6; pointer-events: none; }
.mn-win-rays { position: absolute; left: calc(var(--board) * -.62); top: calc(var(--board) * -.62); width: calc(var(--board) * 1.24); height: calc(var(--board) * 1.24); border-radius: 50%; background: repeating-conic-gradient(from 0deg, rgba(255,220,110,.4) 0deg 8deg, rgba(255,220,110,0) 8deg 20deg); -webkit-mask: radial-gradient(circle, #000 12%, rgba(0,0,0,.5) 36%, transparent 68%); mask: radial-gradient(circle, #000 12%, rgba(0,0,0,.5) 36%, transparent 68%); opacity: 0; }
.mn-win.in .mn-win-rays { animation: mnSpin 14s linear infinite, mnRaysIn .5s ease-out forwards; }
.mn-win.small .mn-win-rays { display: none; }
.mn-win-card { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); text-align: center; white-space: nowrap; padding: 12px 30px 14px; border-radius: 14px; border: 2px solid transparent; background: linear-gradient(180deg, #2a2416 0%, #17140e 60%, #0d0c09 100%) padding-box, linear-gradient(180deg, #fff0bf, #d9a441 40%, #7a5417) border-box; box-shadow: 0 0 0 4px rgba(0,0,0,.55), 0 0 46px rgba(245,197,49,.4), 0 22px 50px rgba(0,0,0,.75), inset 0 1px 0 rgba(255,255,255,.2); }
.mn-win.in .mn-win-card { animation: mnWinIn .5s cubic-bezier(.2,1.5,.4,1) both; }
.mn-win.out .mn-win-card { animation: mnWinOut .28s ease-in both; }
.mn-win.out .mn-win-rays { animation: mnRaysOut .28s ease-in both; }
.mn-win-title { font: 800 15px/1 var(--disp); letter-spacing: 3px; color: #ffe27a; margin-bottom: 5px; padding-left: 3px; }
.mn-win-mult { font: 800 50px/1 var(--disp); letter-spacing: 1px; color: #ffd75a; background: linear-gradient(180deg, #fffbe0 0%, #ffd75a 45%, #f59a1b 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.mn-win-amt { font: 800 26px/1 var(--disp); letter-spacing: .6px; color: var(--win); margin-top: 6px; font-variant-numeric: tabular-nums; text-shadow: 0 0 16px rgba(94,242,160,.4); }
.mn-win-sub { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 12px; font-weight: 700; color: #c2cbd9; margin-top: 7px; }
.mn-win-sub svg { width: 16px; height: 16px; }
.mn-win-sub i { font-style: normal; opacity: .5; margin: 0 3px; }
.mn-win-rec { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; padding: 3px 10px 3px 7px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #2a1a00; background: linear-gradient(180deg, #ffe98a, #f5c531 55%, #d99a0b); box-shadow: 0 0 16px rgba(245,197,49,.5); animation: mnBump .6s .35s cubic-bezier(.2,1.6,.4,1) both; }
.mn-win-rec svg { width: 14px; height: 14px; }
.mn-win.small .mn-win-card { padding: 8px 20px 9px; box-shadow: 0 0 0 3px rgba(0,0,0,.5), 0 14px 30px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.2); }
.mn-win.small .mn-win-title { font-size: 12px; margin-bottom: 3px; }
.mn-win.small .mn-win-mult { font-size: 32px; }
.mn-win.small .mn-win-amt { font-size: 20px; margin-top: 3px; }
.mn-win.small .mn-win-sub { display: none; }
.mn-win.clear .mn-win-title { font-size: 21px; letter-spacing: 4px; color: #fff3b0; text-shadow: 0 0 18px rgba(245,197,49,.7); }

/* ----- pied de scène : engagement provably fair et action contextuelle (case au hasard, même mise) ----- */
.mn-foot { position: relative; z-index: 2; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 30px; }
.mn-hash { display: inline-flex; gap: 6px; align-items: center; min-width: 0; max-width: 100%; height: 26px; font-size: 11px; color: #a4afc3; padding: 0 12px 0 8px; border-radius: 8px; background: rgba(8,10,14,.86); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 3px 10px rgba(0,0,0,.5); transition: color .15s, border-color .15s; }
.mn-hash:hover { color: #fff; border-color: rgba(233,181,74,.6); }
.mn-hash span { white-space: nowrap; }
.mn-hash code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: #e7cf95; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mn-hash .shield { flex: 0 0 auto; color: var(--brass); }
.mn-ctx { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 8px; border-radius: 9px; font-size: 12px; font-weight: 800; white-space: nowrap; color: #ffe7a8; background: linear-gradient(180deg, #3d3423, #1f1a10); box-shadow: inset 0 0 0 1px rgba(233,181,74,.6), inset 0 1px 0 rgba(255,236,170,.25), 0 3px 0 #000, 0 6px 14px rgba(0,0,0,.5); transition: transform .08s, filter .15s; animation: mnCtxIn .3s cubic-bezier(.2,1.5,.4,1) both; }
.mn-ctx:hover { filter: brightness(1.18); }
.mn-ctx:active { transform: translateY(2px); box-shadow: inset 0 0 0 1px rgba(233,181,74,.6), 0 1px 0 #000; }
.mn-ctx svg { width: 16px; height: 16px; flex: 0 0 auto; }
.mn-ctx span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mn-ctx kbd, .bb-key { display: none; padding: 3px 5px; border-radius: 4px; color: rgba(255,255,255,.85); background: rgba(0,0,0,.4); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
.mn-ctx.again { color: #d9ffe9; background: linear-gradient(180deg, #1d4a33, #0f2419); box-shadow: inset 0 0 0 1px rgba(94,242,160,.6), inset 0 1px 0 rgba(200,255,230,.25), 0 3px 0 #000, 0 6px 14px rgba(0,0,0,.5); }
.mn-stage .toasts { z-index: 7; }
.toast.info { background: #151a23; border-color: var(--brass); }

/* ========= dalles ========= */
.tile { --th: calc(var(--board) * .011); --hz: calc(var(--board) * .012); --lz: calc(var(--board) * .06); position: relative; perspective: calc(var(--board) * .95); border-radius: 15%; outline: none; -webkit-tap-highlight-color: transparent; }
.tile:disabled { cursor: default; }
.tile.open { z-index: 1; }
.tile.hit, .tile.arming, .tile.lift, .tile.flip { z-index: 3; }
/* logement de la dalle, visible pendant qu'elle se retourne */
.tile-pit { position: absolute; inset: 4%; border-radius: 14%; background: radial-gradient(circle at 50% 40%, #0d1118, #030405 78%); box-shadow: inset 0 3px 8px #000; }
/* Retournement : la dalle est un vrai bloc (dessus, dessous et deux tranches), qui pivote autour de son centre.
   Seuls transform et opacity sont animés ; will-change, les tranches et l'ombrage n'existent que pendant le mouvement de
   la case touchée (classe .flip, retirée à la fin de l'animation par ui.js). La cascade de fin de manche et la remise à
   zéro pivotent de la même façon, sans tranches ni ombrage (plus sobres, et 25 dalles à la fois restent légères). Toutes les étapes d'une animation gardent la même liste de fonctions
   (translateZ rotateY rotateX) pour que l'angle soit interpolé tel quel, dépassement de 180° compris. */
.tile-inner { position: absolute; inset: 0; transform-style: preserve-3d; transform-origin: 50% 50% calc(var(--hz) * -1); }
.tile.flip .tile-inner { will-change: transform; }
.tile.open .tile-inner { transform: translateZ(0) rotateY(180deg) rotateX(0); }
.tile.lift .tile-inner { animation: mnLift .19s cubic-bezier(.25,1.45,.5,1) both; }
.tile.drop .tile-inner { animation: mnDrop .22s cubic-bezier(.4,0,.6,1) both; }
.tile.open .tile-inner { animation: mnFlip .4s linear both; }
.tile.open.lifted .tile-inner { animation: mnFlipFrom .36s linear both; }
.tile.open.mine .tile-inner { animation: mnSlam .26s linear both; }
.tile.open.mine.lifted .tile-inner { animation: mnSlamFrom .24s linear both; }
.tile.open.dim .tile-inner { animation: mnCasc .32s var(--cd, 0ms) linear both; }
.tile.closing:not(.open) .tile-inner { animation: mnUnflip .34s linear both; }
/* tranches de la dalle (visibles seulement de profil, pendant le retournement) */
.tile.flip .tile-inner::before, .tile.flip .tile-inner::after { content: ""; position: absolute; top: 9%; bottom: 9%; left: calc(var(--hz) * -1); width: calc(var(--hz) * 2); border-radius: 2px; background: linear-gradient(180deg, #6a7688 0%, #3a4352 22%, #232a35 70%, #12161c 100%); transform: translateZ(calc(var(--hz) * -1)) rotateY(-90deg); }
.tile.flip .tile-inner::after { left: calc(100% - var(--hz)); transform: translateZ(calc(var(--hz) * -1)) rotateY(90deg); }
/* ombrage des faces : le dessus s'assombrit en se détournant de la lanterne, le dessous s'éclaire en arrivant
   (pseudo-éléments créés seulement pendant le mouvement, comme les tranches : rien de plus à recalculer au repos) */
.tile.flip .face.front::before, .tile.flip .face.back::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; background: linear-gradient(90deg, rgba(4,6,10,.55), rgba(4,6,10,.92)); z-index: 3; }
.tile.flip .face.back::after { background: linear-gradient(270deg, rgba(4,6,10,.92), rgba(4,6,10,.5)); }
.tile.flip.lift .face.front::before { animation: mnShLift .19s ease-out both; }
.tile.flip.open .face.front::before { animation: mnShF .4s linear both; }
.tile.flip.open .face.back::after { animation: mnShB .4s linear both; }
.tile.flip.open.lifted .face.front::before { animation: mnShFL .36s linear both; }
.tile.flip.open.lifted .face.back::after { animation: mnShBL .36s linear both; }
.tile.flip.open.mine .face.front::before { animation: mnShFM .26s linear both; }
.tile.flip.open.mine .face.back::after { animation: mnShBM .26s linear both; }
.tile.flip.open.mine.lifted .face.front::before { animation: mnShFML .24s linear both; }
.tile.flip.open.mine.lifted .face.back::after { animation: mnShBML .24s linear both; }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 15%; display: flex; align-items: center; justify-content: center; overflow: hidden; }
/* dessus : dalle de pierre dessinée dans un canvas (chaque dalle a sa teinte, ses éclats, ses fissures et son repère gravé) */
.face.front { background: linear-gradient(160deg, #4a5566, #2a323e 55%, #1c222b); box-shadow: 0 var(--th) 0 var(--tile-side), 0 calc(var(--th) + 1.5px) 0 #05070a, 0 calc(var(--th) * 2.6) calc(var(--th) * 3) rgba(0,0,0,.65); transition: transform .14s cubic-bezier(.3,1.5,.5,1), box-shadow .14s; }
.slab { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.face.front::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .15s; background: radial-gradient(circle at 50% 38%, rgba(255,226,170,.34) 0%, rgba(255,200,120,.12) 46%, rgba(255,200,120,0) 76%); box-shadow: inset 0 0 0 1.5px rgba(255,226,170,.8); }
/* face révélée : alcôve creusée, teintée par la gemme qu'elle contient */
.face.back { transform: rotateY(180deg) translateZ(calc(var(--hz) * 2)); background: radial-gradient(circle at 50% 42%, #173048 0%, #0b1622 55%, #05080d 100%); background: radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--g4, #36aef5) 36%, #0c141e) 0%, #0b131c 58%, #05070b 100%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), inset 0 4px 12px #000; }
.tile.gem:not(.dim) .face.back { box-shadow: inset 0 0 0 1px var(--g3, #7fdcff), inset 0 4px 12px #000, inset 0 0 20px rgba(255,255,255,.07); }
.tile.mine .face.back { background: radial-gradient(circle at 50% 44%, #6a1a10 0%, #2e0d08 54%, #120605 100%); box-shadow: inset 0 0 0 1px rgba(255,110,80,.7), inset 0 4px 12px #000, inset 0 0 18px rgba(255,70,30,.25); }
.tile.dim .face.back { background: #090c12; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07), inset 0 4px 10px #000; }
.tile.dim.mine .face.back { background: radial-gradient(circle at 50% 46%, #47130c 0%, #1e0a07 60%, #100605 100%); box-shadow: inset 0 0 0 1px rgba(255,110,80,.55), inset 0 4px 10px #000; }
.mn-board.won .tile.dim.mine .face.back { background: #130b0b; box-shadow: inset 0 0 0 1px rgba(255,110,80,.26), inset 0 4px 10px #000; }
.tile.dim.defused .face.back { background: #0a1410; box-shadow: inset 0 0 0 1px rgba(94,242,160,.4), inset 0 4px 10px #000; }
.face svg.gem { position: relative; width: var(--gs, 60%); height: var(--gs, 60%); display: block; }
.face svg.bomb { position: relative; width: 70%; height: 70%; display: block; }
.tile.dim svg.gem { width: 38%; height: 38%; opacity: .42; }
.tile.dim svg.bomb { width: 56%; height: 56%; opacity: .95; }
.mn-board.won .tile.dim svg.bomb { opacity: .55; }
.tile.dim.defused svg.bomb { opacity: .5; }
.gem-sh { position: absolute; left: 22%; right: 22%; bottom: 13%; height: 9%; border-radius: 50%; background: radial-gradient(ellipse, rgba(0,0,0,.6), rgba(0,0,0,0) 70%); }
.rv-halo { position: absolute; inset: 4%; border-radius: 50%; background: radial-gradient(circle, var(--g3, #7fdcff) 0%, rgba(255,255,255,0) 66%); opacity: .34; pointer-events: none; }
.tile.mine .rv-halo { background: radial-gradient(circle, rgba(255,150,90,.55) 0%, rgba(255,70,30,.2) 42%, rgba(255,70,30,0) 70%); opacity: 1; }
.tile.hit .rv-halo { inset: -6%; border-radius: 0; opacity: 1; background: radial-gradient(circle, #fff6c2 0%, #ffc93a 26%, #ff7a1a 52%, #d7261a 78%); clip-path: polygon(50% 0, 60% 22%, 80% 8%, 76% 32%, 100% 34%, 82% 50%, 100% 68%, 76% 68%, 82% 94%, 60% 80%, 50% 100%, 40% 80%, 18% 94%, 24% 68%, 0 68%, 18% 50%, 0 34%, 24% 32%, 20% 8%, 40% 22%); animation: mnStar .5s cubic-bezier(.2,1.5,.4,1) both; }
.tile.dim .rv-halo, .tile.dim .tw, .tile.dim .gem-shine, .tile.dim .fuse, .tile.dim .gem-sh, .tile.dim .rays { display: none; }
/* la gemme jaillit de l'alcôve, tourne, puis respire doucement */
.tile.gem:not(.dim) svg.gem { animation: mnGemPop .5s .15s linear both, mnGemIdle 3.4s 1s ease-in-out infinite alternate; }
.tile.lifted.gem:not(.dim) svg.gem { animation-delay: .1s, .95s; }
.tile:nth-child(2n).gem:not(.dim) svg.gem { animation-duration: .5s, 4.1s; }
.tile.gem:not(.dim) .rv-halo { animation: mnHaloIn .55s .15s ease-out backwards; }
.tile.lifted.gem:not(.dim) .rv-halo { animation-delay: .1s; }
/* mine : la bombe apparaît d'un coup sec, cerclée d'un éclat rouge bref (pas d'éclat lumineux ni d'étincelles) */
.tile.mine.arming .rv-halo { animation: mnMineSnap .26s linear both; }
.tile.mine.arming.lifted .rv-halo { animation-duration: .24s; }
/* éclat de la révélation d'un diamant (case touchée seulement) : lumière, onde et quelques étincelles autour de la dalle.
   Éléments posés une fois par ui.js dans chaque case, animés en transform/opacity, opacité 0 au repos. */
.tile-fx { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.tile-fx i { position: absolute; display: block; opacity: 0; }
.tile-fx .fl { inset: -42%; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.95) 0%, color-mix(in srgb, var(--g2, #c2f4ff) 70%, transparent) 16%, color-mix(in srgb, var(--g3, #7fdcff) 30%, transparent) 38%, transparent 64%); }
.tile-fx .rg { inset: 2%; border-radius: 22%; border: 2px solid var(--g2, #c2f4ff); box-shadow: 0 0 6px var(--g3, #7fdcff), inset 0 0 6px var(--g3, #7fdcff); }
.tile-fx .sp { left: 50%; top: 50%; width: 15%; height: 15%; margin: -7.5% 0 0 -7.5%; background: radial-gradient(circle, #fff 28%, var(--g2, #c2f4ff) 62%); clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); }
.tile-fx .sp:nth-child(3) { --a: 12deg; --d: -330%; }
.tile-fx .sp:nth-child(4) { --a: 75deg; --d: -400%; width: 11%; height: 11%; margin: -5.5% 0 0 -5.5%; }
.tile-fx .sp:nth-child(5) { --a: 138deg; --d: -360%; }
.tile-fx .sp:nth-child(6) { --a: 200deg; --d: -420%; width: 10%; height: 10%; margin: -5% 0 0 -5%; }
.tile-fx .sp:nth-child(7) { --a: 258deg; --d: -340%; }
.tile-fx .sp:nth-child(8) { --a: 318deg; --d: -390%; width: 12%; height: 12%; margin: -6% 0 0 -6%; }
.tile.gem:not(.dim) .tile-fx .fl { animation: mnFxFlash .42s .16s cubic-bezier(.2,.6,.35,1) backwards; }
.tile.gem:not(.dim) .tile-fx .rg { animation: mnFxRing .46s .2s cubic-bezier(.15,.6,.3,1) backwards; }
.tile.gem:not(.dim) .tile-fx .sp { animation: mnFxSpark .56s .2s cubic-bezier(.2,.7,.35,1) backwards; }
.tile.gem:not(.dim) .tile-fx .sp:nth-child(2n) { animation-delay: .24s; animation-duration: .5s; }
.tile.lifted.gem:not(.dim) .tile-fx .fl { animation-delay: .11s; }
.tile.lifted.gem:not(.dim) .tile-fx .rg, .tile.lifted.gem:not(.dim) .tile-fx .sp { animation-delay: .15s; }
.tile.lifted.gem:not(.dim) .tile-fx .sp:nth-child(2n) { animation-delay: .19s; }
/* diamant d'or : couronne de rayons derrière la gemme */
.rays { position: absolute; inset: -12%; border-radius: 50%; background: repeating-conic-gradient(from 0deg, rgba(255,214,110,.5) 0deg 9deg, rgba(255,214,110,0) 9deg 24deg); -webkit-mask: radial-gradient(circle, #000 20%, transparent 62%); mask: radial-gradient(circle, #000 20%, transparent 62%); animation: mnSpin 12s linear infinite; }
/* scintillement : une étoile qui clignote et un reflet qui balaie la gemme de temps en temps */
.tw { position: absolute; left: 17%; top: 13%; width: 24%; height: 24%; background: #fff; clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%); opacity: 0; pointer-events: none; animation: mnTwinkle 2.8s .9s ease-in-out infinite; }
.tile:nth-child(3n) .tw { left: 60%; top: 52%; width: 18%; height: 18%; animation-duration: 3.4s; animation-delay: 1.6s; }
.tile:nth-child(3n + 1) .tw { left: 58%; top: 10%; animation-duration: 3.1s; animation-delay: 2.2s; }
/* reflet découpé à la silhouette exacte de la gemme (même boîte que le SVG, polygone de chaque taille) */
.gem-shine { position: absolute; left: calc(50% - var(--gs, 60%) / 2); top: calc(50% - var(--gs, 60%) / 2); width: var(--gs, 60%); height: var(--gs, 60%); pointer-events: none; clip-path: polygon(9.4% 39.1%, 28.1% 14.1%, 71.9% 14.1%, 90.6% 39.1%, 50% 90.6%); }
.tile.g-t2 .gem-shine { clip-path: polygon(31.3% 9.4%, 68.8% 9.4%, 90.6% 31.3%, 90.6% 68.8%, 68.8% 90.6%, 31.3% 90.6%, 9.4% 68.8%, 9.4% 31.3%); }
.tile.g-t3 .gem-shine { clip-path: polygon(50% 6.3%, 87.5% 28.1%, 87.5% 71.9%, 50% 93.8%, 12.5% 71.9%, 12.5% 28.1%); }
.tile.g-t4 .gem-shine { clip-path: polygon(50% 6.3%, 90.6% 34.4%, 75% 89.1%, 25% 89.1%, 9.4% 34.4%); }
.gem-shine::before { content: ""; position: absolute; top: -10%; left: 0; width: 26%; height: 120%; background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.85), rgba(255,255,255,0)); transform: translateX(-160%) skewX(-18deg); animation: mnGlint .42s .42s cubic-bezier(.4,0,.3,1) both, mnSweep 3.8s 1.6s ease-in-out infinite; }
.tile.lifted .gem-shine::before { animation-delay: .36s, 1.6s; }
.tile:nth-child(2n) .gem-shine::before { animation-delay: .42s, 2.3s; }
.tile:nth-child(5n) .gem-shine::before { animation-delay: .42s, 3.1s; }
.tile.lifted:nth-child(2n) .gem-shine::before, .tile.lifted:nth-child(5n) .gem-shine::before { animation-delay: .36s; }
/* mine : mèche qui crépite pendant le quart de seconde de suspens, puis anneau rouge sur la case touchée */
.fuse { position: absolute; left: 61.2%; top: 20.7%; width: 26%; height: 26%; margin: -13% 0 0 -13%; border-radius: 50%; background: radial-gradient(circle, #fff 0%, rgba(255,214,90,.9) 25%, rgba(255,120,20,.5) 50%, rgba(255,120,20,0) 70%); pointer-events: none; animation: mnFuse .5s steps(3) infinite; }
.tile.arming svg.bomb { animation: mnBombIn .26s linear both, mnArm .13s .26s ease-in-out infinite alternate; }
.tile.arming .fuse { width: 44%; height: 44%; margin: -22% 0 0 -22%; animation-duration: .18s; }
.tile.hit svg.bomb { animation: mnBombShake .5s both; }
.hit-ring { position: absolute; inset: 3%; border-radius: 14%; box-shadow: inset 0 0 0 2.5px #ff8062; opacity: 0; pointer-events: none; }
.tile.hit .hit-ring { animation: mnRing 1.1s .5s ease-in-out infinite; }
/* éclairage des dalles voisines quand une gemme sort, ou lueur de l'explosion */
.tile::before { content: ""; position: absolute; inset: 0; border-radius: 15%; pointer-events: none; z-index: 2; opacity: 0; background: radial-gradient(circle at var(--lx, 50%) var(--ly, 50%), var(--lc, rgba(190,240,255,.75)) 0%, rgba(255,255,255,0) 82%); }
.tile.lit::before { animation: mnLit .7s ease-out; }
.tile.lit2::before { animation: mnLit2 .7s ease-out; }
/* fissures laissées par l'explosion sur les cases voisines */
.tile-crack { position: absolute; inset: 0; border-radius: 15%; pointer-events: none; z-index: 2; opacity: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M52 0L47 18L58 31L44 47L55 63L41 78L50 100M47 18L30 24L22 20M58 31L78 28M44 47L22 52M55 63L80 70L88 64' fill='none' stroke='%23000' stroke-opacity='.8' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M53.2 1L48.2 18L59.2 31L45.2 47L56.2 63L42.2 78' fill='none' stroke='%23fff' stroke-opacity='.22' stroke-width='.8'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.tile:nth-child(2n) .tile-crack { transform: rotate(90deg); }
.tile:nth-child(3n) .tile-crack { transform: rotate(180deg) scaleX(-1); }
.tile:nth-child(5n) .tile-crack { transform: rotate(-90deg); }
.tile.cracked .tile-crack { opacity: .7; transition: opacity .12s; }
.tile.cracked.open .tile-crack { opacity: .38; }
/* onde de choc : chaque dalle est repoussée depuis la case touchée, avec un retard proportionnel à la distance */
.tile.shock { animation: mnShock .6s var(--sd, 0ms) cubic-bezier(.2,.8,.3,1) both; }
/* mise posée : les dalles tressaillent en vague ; au repos, un reflet de lanterne balaie le plateau de temps en temps */
.tile.wake { animation: mnWake .42s var(--sd, 0ms) cubic-bezier(.3,1.4,.5,1) both; }
.tile.wake::before { --lc: rgba(255,226,170,.5); animation: mnLit .5s var(--sd, 0ms) ease-out both; }
.mn-gleam { grid-column: 2; grid-row: 2; position: relative; z-index: 2; overflow: hidden; pointer-events: none; border-radius: 3%; }
.mn-gleam::before { content: ""; position: absolute; top: -6%; bottom: -6%; left: 0; width: 34%; opacity: 0; background: linear-gradient(100deg, rgba(255,236,200,0) 0%, rgba(255,236,200,.17) 45%, rgba(255,236,200,.05) 60%, rgba(255,236,200,0) 100%); transform: translateX(-140%) skewX(-14deg); }
.mn-stage[data-state="idle"] .mn-gleam::before { animation: mnGleam 7.5s 2.5s ease-in-out infinite; }
/* grille nettoyée : vague dorée qui traverse le plateau */
.tile.sweep::before { --lc: rgba(255,226,130,.9); animation: mnLit .8s var(--sd, 0ms) ease-out both; }
/* curseur clavier : anneau blanc et or qui pulse autour de la case */
.tile:focus-visible .tile-inner { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 15%; }
.tile.cursor::after { content: ""; position: absolute; inset: -5px; border-radius: 19%; border: 2px solid #fff; box-shadow: 0 0 0 2px #f5c531, 0 0 16px 2px rgba(245,197,49,.75), inset 0 0 10px rgba(245,197,49,.5); pointer-events: none; z-index: 4; animation: mnCursor 1s ease-in-out infinite; }
/* survol : la dalle se soulève sous la lampe ; appui : elle s'enfonce (seulement quand la case est jouable) */
@media (hover: hover) {
  .mn-board.live .tile:not(.open):not(:disabled):hover .face.front, .mn-board.picking .tile:not(.open):not(:disabled):hover .face.front { transform: translateY(calc(var(--th) * -1.1)); box-shadow: 0 calc(var(--th) * 2.1) 0 var(--tile-side), 0 calc(var(--th) * 2.1 + 1.5px) 0 #05070a, 0 calc(var(--th) * 4.4) calc(var(--th) * 4.6) rgba(0,0,0,.6), 0 0 22px rgba(255,200,120,.3); }
  .mn-board.live .tile:not(.open):not(:disabled):hover .face.front::after, .mn-board.picking .tile:not(.open):not(:disabled):hover .face.front::after { opacity: 1; }
}
.mn-board.live .tile:not(.open):not(:disabled), .mn-board.picking .tile:not(.open):not(:disabled) { cursor: pointer; }
.mn-board.live .tile:not(.open):not(:disabled):active .face.front, .mn-board.picking .tile:not(.open):not(:disabled):active .face.front, .tile.press .face.front { transform: translateY(calc(var(--th) * .8)); box-shadow: 0 calc(var(--th) * .2) 0 var(--tile-side), 0 calc(var(--th) * .8) calc(var(--th) * 1.2) rgba(0,0,0,.6); transition-duration: .04s; }
.mn-board.live .tile:not(.open):not(:disabled):active .face.front::after, .tile.press .face.front::after { opacity: 1; }
.tile.picked .face.front { box-shadow: 0 var(--th) 0 #6b4a0a, 0 calc(var(--th) * 2.6) calc(var(--th) * 3) rgba(0,0,0,.65), 0 0 16px rgba(245,197,49,.4); }
.tile.picked .face.front::after { opacity: 1; background: radial-gradient(circle at 50% 50%, rgba(245,197,49,.3), rgba(245,197,49,.08) 70%); box-shadow: inset 0 0 0 2px var(--brass); }
.pick-dot { position: absolute; left: 50%; top: 50%; width: 46%; height: 46%; margin: -23% 0 0 -23%; border-radius: 50%; background: radial-gradient(circle at 36% 30%, #fff6c2, #f5c531 50%, #c98a06); color: #2a1a00; font: 800 clamp(11px, calc(var(--board) * .042), 24px)/1 var(--disp); font-style: normal; display: none; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,.6), inset 0 -2px 0 rgba(120,70,0,.4); z-index: 1; }
.tile.picked .pick-dot { display: flex; animation: mnSkIn .3s cubic-bezier(.2,1.7,.4,1); }
.mn-board.picking .tile:not(:disabled) { cursor: copy; }

@keyframes mnLift { 0% { transform: translateZ(0) rotateY(0deg) rotateX(0); } 100% { transform: translateZ(var(--lz)) rotateY(-14deg) rotateX(7deg); } }
@keyframes mnDrop { 0% { transform: translateZ(var(--lz)) rotateY(-14deg) rotateX(7deg); } 100% { transform: translateZ(0) rotateY(0deg) rotateX(0); } }
@keyframes mnFlip { 0% { transform: translateZ(0) rotateY(0deg) rotateX(0deg); animation-timing-function: ease-out; } 16% { transform: translateZ(calc(var(--lz) * 0.5)) rotateY(-12deg) rotateX(5deg); animation-timing-function: cubic-bezier(.5,0,.75,.55); } 50% { transform: translateZ(calc(var(--lz) * 1.4)) rotateY(112deg) rotateX(2deg); animation-timing-function: cubic-bezier(.25,.55,.45,1); } 74% { transform: translateZ(0) rotateY(193deg) rotateX(0deg); animation-timing-function: cubic-bezier(.45,0,.55,1); } 88% { transform: translateZ(0) rotateY(177deg) rotateX(0deg); animation-timing-function: ease-out; } 100% { transform: translateZ(0) rotateY(180deg) rotateX(0deg); } }
@keyframes mnFlipFrom { 0% { transform: translateZ(var(--lz)) rotateY(-14deg) rotateX(7deg); animation-timing-function: cubic-bezier(.5,0,.75,.55); } 40% { transform: translateZ(calc(var(--lz) * 1.45)) rotateY(108deg) rotateX(3deg); animation-timing-function: cubic-bezier(.25,.55,.45,1); } 68% { transform: translateZ(0) rotateY(194deg) rotateX(0deg); animation-timing-function: cubic-bezier(.45,0,.55,1); } 84% { transform: translateZ(0) rotateY(176deg) rotateX(0deg); animation-timing-function: ease-out; } 100% { transform: translateZ(0) rotateY(180deg) rotateX(0deg); } }
@keyframes mnSlam { 0% { transform: translateZ(0) rotateY(0deg) rotateX(0deg); animation-timing-function: ease-out; } 14% { transform: translateZ(calc(var(--lz) * 0.4)) rotateY(-8deg) rotateX(4deg); animation-timing-function: cubic-bezier(.6,0,1,.6); } 76% { transform: translateZ(0) rotateY(180deg) rotateX(0deg); animation-timing-function: ease-out; } 86% { transform: translateZ(calc(var(--hz) * -1.6)) rotateY(180deg) rotateX(0deg); animation-timing-function: ease-out; } 100% { transform: translateZ(0) rotateY(180deg) rotateX(0deg); } }
@keyframes mnSlamFrom { 0% { transform: translateZ(var(--lz)) rotateY(-14deg) rotateX(7deg); animation-timing-function: cubic-bezier(.6,0,1,.6); } 70% { transform: translateZ(0) rotateY(180deg) rotateX(0deg); animation-timing-function: ease-out; } 80% { transform: translateZ(calc(var(--hz) * -1.6)) rotateY(180deg) rotateX(0deg); animation-timing-function: ease-out; } 100% { transform: translateZ(0) rotateY(180deg) rotateX(0deg); } }
@keyframes mnCasc { 0% { transform: translateZ(0) rotateY(0deg) rotateX(0deg); animation-timing-function: cubic-bezier(.45,0,.7,.6); } 55% { transform: translateZ(calc(var(--lz) * 0.3)) rotateY(125deg) rotateX(0deg); animation-timing-function: cubic-bezier(.3,.6,.5,1); } 82% { transform: translateZ(0) rotateY(184deg) rotateX(0deg); animation-timing-function: cubic-bezier(.45,0,.55,1); } 100% { transform: translateZ(0) rotateY(180deg) rotateX(0deg); } }
@keyframes mnUnflip { 0% { transform: translateZ(0) rotateY(180deg) rotateX(0deg); animation-timing-function: cubic-bezier(.45,0,.7,.6); } 50% { transform: translateZ(calc(var(--lz) * 0.5)) rotateY(75deg) rotateX(0deg); animation-timing-function: cubic-bezier(.3,.6,.5,1); } 80% { transform: translateZ(0) rotateY(-6deg) rotateX(0deg); animation-timing-function: cubic-bezier(.45,0,.55,1); } 100% { transform: translateZ(0) rotateY(0deg) rotateX(0deg); } }
@keyframes mnShLift { 0% { opacity: 0; } 100% { opacity: 0.18; } }
@keyframes mnShF { 0% { opacity: 0; } 42% { opacity: 0.9; } 100% { opacity: 0.9; } }
@keyframes mnShB { 0% { opacity: 0.9; } 42% { opacity: 0.85; } 74% { opacity: 0; } 100% { opacity: 0; } }
@keyframes mnShFL { 0% { opacity: 0.18; } 34% { opacity: 0.9; } 100% { opacity: 0.9; } }
@keyframes mnShBL { 0% { opacity: 0.9; } 34% { opacity: 0.85; } 68% { opacity: 0; } 100% { opacity: 0; } }
@keyframes mnShFM { 0% { opacity: 0; } 60% { opacity: 0.9; } 100% { opacity: 0.9; } }
@keyframes mnShBM { 0% { opacity: 0.9; } 60% { opacity: 0.85; } 76% { opacity: 0; } 100% { opacity: 0; } }
@keyframes mnShFML { 0% { opacity: 0.18; } 56% { opacity: 0.9; } 100% { opacity: 0.9; } }
@keyframes mnShBML { 0% { opacity: 0.9; } 56% { opacity: 0.85; } 70% { opacity: 0; } 100% { opacity: 0; } }
@keyframes mnShake { 10%, 90% { transform: translate3d(-2px, 1px, 0); } 20%, 80% { transform: translate3d(5px, -3px, 0); } 30%, 50%, 70% { transform: translate3d(-9px, 3px, 0) rotate(-.5deg); } 40%, 60% { transform: translate3d(9px, -2px, 0) rotate(.5deg); } }
@keyframes mnShock { 0% { transform: translate(0, 0) rotate(0); } 22% { transform: translate(var(--sx, 0), var(--sy, 0)) rotate(var(--sr, 0deg)); } 55% { transform: translate(calc(var(--sx, 0) * -.3), calc(var(--sy, 0) * -.3)) rotate(calc(var(--sr, 0deg) * -.3)); } 100% { transform: translate(0, 0) rotate(0); } }
@keyframes mnRumble { 0%, 100% { transform: translate(0, 0); } 15% { transform: translate(-1px, 1px); } 30% { transform: translate(1px, 0); } 45% { transform: translate(-1px, -1px); } 60% { transform: translate(1px, 1px); } 80% { transform: translate(0, -1px); } }
@keyframes mnFlash { 0% { opacity: 0; } 10% { opacity: 1; } 100% { opacity: 0; } }
@keyframes mnWinIn { from { transform: translate(-50%, -50%) scale(.4); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
@keyframes mnWinOut { from { transform: translate(-50%, -50%) scale(1); opacity: 1; } to { transform: translate(-50%, -62%) scale(.92); opacity: 0; } }
@keyframes mnRaysIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes mnRaysOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes mnSpin { to { transform: rotate(360deg); } }
@keyframes mnGemPop { 0% { transform: translateY(26%) scale(.3) rotate(-24deg); opacity: 0; animation-timing-function: cubic-bezier(.2,.7,.4,1); } 12% { opacity: 1; } 40% { transform: translateY(-9%) scale(1.22) rotate(7deg); opacity: 1; animation-timing-function: cubic-bezier(.45,0,.55,1); } 64% { transform: translateY(2%) scale(.94) rotate(-2deg); opacity: 1; animation-timing-function: cubic-bezier(.45,0,.55,1); } 82% { transform: translateY(-1%) scale(1.03) rotate(.5deg); opacity: 1; animation-timing-function: ease-out; } 100% { transform: translateY(0) scale(1) rotate(0); opacity: 1; } }
@keyframes mnHaloIn { 0% { opacity: 0; transform: scale(.4); } 35% { opacity: .95; transform: scale(1.12); } 100% { opacity: .34; transform: scale(1); } }
@keyframes mnGlint { 0% { transform: translateX(-160%) skewX(-18deg); } 100% { transform: translateX(520%) skewX(-18deg); } }
@keyframes mnMineSnap { 0%, 52% { opacity: 0; transform: scale(1.35); } 62% { opacity: 1; transform: scale(1.12); } 100% { opacity: 1; transform: scale(1); } }
@keyframes mnBombIn { 0%, 50% { transform: scale(.55); } 66% { transform: scale(1.2); } 100% { transform: scale(1); } }
@keyframes mnFxFlash { 0% { opacity: 0; transform: scale(.3); } 16% { opacity: 1; } 100% { opacity: 0; transform: scale(1.3); } }
@keyframes mnFxRing { 0% { opacity: 0; transform: scale(.6); } 8% { opacity: .95; } 100% { opacity: 0; transform: scale(1.5); } }
@keyframes mnFxSpark { 0% { opacity: 0; transform: rotate(calc(var(--a, 0deg) + var(--fr, 0deg))) translateY(-40%) scale(.2) rotate(0deg); } 18% { opacity: 1; } 55% { opacity: 1; transform: rotate(calc(var(--a, 0deg) + var(--fr, 0deg))) translateY(calc(var(--d, -360%) * .8)) scale(1) rotate(60deg); } 100% { opacity: 0; transform: rotate(calc(var(--a, 0deg) + var(--fr, 0deg))) translateY(var(--d, -360%)) scale(.1) rotate(120deg); } }
@keyframes mnLit2 { 0% { opacity: 0; } 22% { opacity: 1; } 100% { opacity: 0; } }
@keyframes mnGemIdle { from { transform: translateY(1.5%) rotate(-2deg); } to { transform: translateY(-2.5%) rotate(2deg); } }
@keyframes mnLit { 0% { opacity: 0; } 22% { opacity: 1; } 100% { opacity: 0; } }
@keyframes mnBombShake { 0%, 100% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(-3px, 1px) rotate(-7deg) scale(1.12); } 50% { transform: translate(3px, -1px) rotate(7deg) scale(1.16); } 75% { transform: translate(-2px, 0) rotate(-3deg) scale(1.06); } }
@keyframes mnArm { from { transform: scale(1) rotate(-2deg); } to { transform: scale(1.1) rotate(2deg); } }
@keyframes mnRing { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes mnTwinkle { 0%, 62%, 100% { opacity: 0; transform: scale(.3) rotate(0deg); } 78% { opacity: 1; transform: scale(1) rotate(45deg); } 92% { opacity: 0; transform: scale(.4) rotate(90deg); } }
@keyframes mnSweep { 0%, 55% { transform: translateX(-160%) skewX(-18deg); } 85%, 100% { transform: translateX(520%) skewX(-18deg); } }
@keyframes mnFuse { 0% { transform: scale(.7); opacity: .7; } 50% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(.85); opacity: .85; } }
@keyframes mnCursor { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .6; transform: scale(1.05); } }
@keyframes mnDust { 0% { transform: translate3d(0, 0, 0); opacity: 0; } 12% { opacity: .75; } 50% { transform: translate3d(14px, -70px, 0); opacity: .45; } 88% { opacity: .6; } 100% { transform: translate3d(-8px, -150px, 0); opacity: 0; } }
@keyframes mnEmber { 0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0; } 10% { opacity: 1; } 60% { transform: translate3d(18px, -140px, 0) scale(.8); opacity: .8; } 100% { transform: translate3d(-10px, -260px, 0) scale(.4); opacity: 0; } }
@keyframes mnDrip { 0% { transform: translateY(0) scaleY(.6); opacity: 0; } 12% { opacity: .9; transform: translateY(0) scaleY(1); } 92% { opacity: .9; transform: translateY(var(--fall, 120px)) scaleY(1.5); } 100% { opacity: 0; transform: translateY(var(--fall, 120px)) scale(2.6, .3); } }
@keyframes mnRubble { 0% { transform: translate(0, 0) rotate(0); opacity: 0; } 8% { opacity: .9; } 85% { opacity: .9; } 100% { transform: translate(var(--rx, 6px), var(--fall, 160px)) rotate(200deg); opacity: 0; } }
@keyframes mnPulse { from { opacity: .2; } to { opacity: .8; } }
@keyframes mnJitter { 0% { transform: translate(-1.2px, .8px); } 100% { transform: translate(1.2px, -.8px); } }
@keyframes mnSwing { from { transform: rotate(-3.2deg); } to { transform: rotate(3.2deg); } }
@keyframes mnFlick { 0%, 100% { opacity: .82; } 22% { opacity: 1; } 41% { opacity: .7; } 58% { opacity: .95; } 77% { opacity: .78; } }
@keyframes mnFlame { from { transform: scale(1, 1) rotate(-3deg); } to { transform: scale(.88, 1.12) rotate(3deg); } }
@keyframes mnBeat { 0% { transform: scale(1); } 28% { transform: scale(.955); } 100% { transform: scale(1); } }
@keyframes mnLava { from { opacity: .55; } to { opacity: 1; } }
@keyframes mnStar { from { transform: scale(.2) rotate(-30deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes mnGlow { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes mnBump { 0% { transform: scale(1); } 40% { transform: scale(1.2); } 100% { transform: scale(1); } }
@keyframes mnCatch { 0% { transform: scale(1); } 40% { transform: scale(1.045); } 100% { transform: scale(1); } }
@keyframes mnChipIn { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes mnCtxIn { from { transform: translateY(6px) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes mnSkIn { 0% { transform: scale(.2); } 60% { transform: scale(1.5); } 100% { transform: scale(1); } }
@keyframes mnSkWin { 0% { transform: translateY(0) scale(1); } 40% { transform: translateY(-5px) scale(1.5); } 100% { transform: translateY(0) scale(1); } }
@keyframes mnStamp { 0% { transform: translate(-50%, -50%) scale(.3) rotate(-8deg); opacity: 0; } 14% { transform: translate(-50%, -50%) scale(1.14) rotate(2deg); opacity: 1; } 24% { transform: translate(-50%, -50%) scale(1) rotate(0); } 78% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 100% { transform: translate(-50%, -90%) scale(.96); opacity: 0; } }
@keyframes mnCashPulse { 0%, 100% { opacity: .2; transform: scale(1); } 50% { opacity: .85; transform: scale(1.02); } }
@keyframes mnWake { 0% { transform: translateY(0); } 40% { transform: translateY(calc(var(--board) * -.012)); } 100% { transform: translateY(0); } }
@keyframes mnGleam { 0%, 72% { transform: translateX(-140%) skewX(-14deg); opacity: 0; } 76% { opacity: 1; } 94% { opacity: 1; } 100% { transform: translateX(340%) skewX(-14deg); opacity: 0; } }
@keyframes mnRung { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }

/* ========= panneau de commandes ========= */
.mn-panel { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow-y: auto; padding: 10px; border-radius: 16px; background: linear-gradient(180deg, #1b212c 0%, #12161e 30%, #0c0f15 62%); border: 1px solid #2b3344; box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 10px 30px rgba(0,0,0,.5); scrollbar-width: thin; scrollbar-color: #3a4558 transparent; }
.mn-tabs { display: flex; gap: 4px; flex: 0 0 auto; padding: 4px; border-radius: 12px; background: #07090d; box-shadow: inset 0 2px 6px #000, 0 0 0 1px rgba(255,255,255,.07); }
.mn-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; border-radius: 9px; font-size: 13px; font-weight: 800; color: #8792a6; transition: color .15s, background .15s; }
.mn-tabs button:hover:not(:disabled) { color: #fff; }
.mn-tabs button.active { color: #241600; background: linear-gradient(180deg, #ffe9ac 0%, #e2b452 52%, #b98424 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -2px 0 rgba(90,50,0,.3), 0 3px 10px rgba(217,164,65,.3); }
.mn-tabs button:disabled { opacity: .6; }
.mn-field { display: flex; flex-direction: column; gap: 7px; flex: 0 0 auto; padding: 9px 10px 10px; border-radius: 12px; background: rgba(0,0,0,.26); border: 1px solid rgba(255,255,255,.055); transition: opacity .2s; }
.mn-label { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: #a4afc3; min-height: 18px; }
.mn-label b { color: #fff; font: 700 18px/1 var(--disp); letter-spacing: .4px; font-variant-numeric: tabular-nums; }
.mn-label .lab { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.mn-label .ic { width: 17px; height: 17px; flex: 0 0 auto; }
.mn-label-r { font-size: 11px; }
#amountMax { font-weight: 600; color: #6f7b90; font-variant-numeric: tabular-nums; }
.mn-panel .amount-box { height: 48px; padding: 0 7px; border-radius: 11px; background: #05070a; border: 1px solid rgba(255,255,255,.12); box-shadow: inset 0 2px 8px #000; transition: border-color .15s, box-shadow .15s; }
.mn-panel .amount-box:focus-within { border-color: var(--brass); box-shadow: inset 0 2px 8px #000, 0 0 0 3px rgba(217,164,65,.18); }
.mn-panel .amount-input { font: 700 27px/1 var(--disp); letter-spacing: .6px; font-variant-numeric: tabular-nums; }
.mn-panel .amt-btn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid #000; background: linear-gradient(180deg, #3a4352, #222835); color: #e6ebf3; font-size: 20px; box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 2px 0 #000; }
.mn-panel .amt-btn:hover { color: #fff; background: linear-gradient(180deg, #4a5466, #2a3140); }
.mn-panel .amt-btn:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.15); }
.mn-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.mn-chips button { height: 30px; min-width: 0; border-radius: 8px; font: 700 15px/1 var(--disp); letter-spacing: .4px; font-variant-numeric: tabular-nums; color: #cbd3e0; background: linear-gradient(180deg, #303847, #1c212b); border: 1px solid #000; box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 2px 0 #000; transition: color .12s, transform .06s; }
.mn-chips button:hover { color: #fff; background: linear-gradient(180deg, #3b4454, #232935); }
.mn-chips button:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.1); }
.mn-chips button.active { color: #241600; background: linear-gradient(180deg, #ffe9ac, #e2b452 55%, #b98424); box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 2px 0 #4a3206, 0 0 14px rgba(217,164,65,.35); }
.mn-chips.bets { display: flex; gap: 8px; }
.mn-chips.bets .grp { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; flex: 4 1 0; min-width: 0; }
.mn-chips.bets .grp.mods { flex: 3.2 1 0; padding-left: 8px; border-left: 1px solid rgba(255,255,255,.09); }
.mn-chips .mods button { background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); border-color: transparent; color: #a4afc3; font-size: 14px; }
.mn-chips .mods button:hover { background: rgba(255,255,255,.11); color: #fff; }
.mn-chips.mines { grid-template-columns: repeat(5, 1fr); }
.mn-chips.mines button.active { color: #fff; background: linear-gradient(180deg, #ff7a5c, #e0391c 55%, #a8200c); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 2px 0 #4a0c02, 0 0 14px rgba(255,90,54,.4); }
.mn-chips.rounds { grid-template-columns: repeat(4, 1fr); }
/* niveau de risque : cinq barres et un mot */
.mn-risk { display: inline-flex; align-items: center; gap: 3px; --rc: #5ef2a0; }
.mn-risk i { width: 4px; height: 11px; border-radius: 1.5px; background: rgba(255,255,255,.14); transition: background .2s; }
.mn-risk em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--rc); margin-left: 4px; white-space: nowrap; transition: color .2s; }
.mn-risk[data-level="0"] i:nth-child(-n + 1), .mn-risk[data-level="1"] i:nth-child(-n + 2), .mn-risk[data-level="2"] i:nth-child(-n + 3), .mn-risk[data-level="3"] i:nth-child(-n + 4), .mn-risk[data-level="4"] i:nth-child(-n + 5) { background: var(--rc); }
.mn-risk[data-level="1"] { --rc: #c8e85a; }
.mn-risk[data-level="2"] { --rc: #ffd24a; }
.mn-risk[data-level="3"] { --rc: #ff9a3c; }
.mn-risk[data-level="4"] { --rc: #ff5a4a; }
/* curseur du nombre de mines : du bleu glace (peu de mines) au rouge (champ miné), poignée en forme de bombe */
.mn-slider { position: relative; padding: 2px 0 0; }
.mn-range { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 10px; border-radius: 6px; margin: 7px 0 5px; outline: none; cursor: pointer; background: linear-gradient(90deg, rgba(5,7,10,0) var(--p, 8%), #05070a var(--p, 8%)), linear-gradient(90deg, #57e0ff 0%, #f5c531 50%, #ff5a36 100%); box-shadow: inset 0 1px 3px #000, 0 0 0 1px rgba(255,255,255,.12); }
.mn-range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 34% 28%, #a6b0c0 0%, #3a4250 38%, #0a0c10 78%); border: 0; box-shadow: 0 0 0 2px #ffcf7a, 0 3px 8px rgba(0,0,0,.7), 0 0 12px rgba(255,180,90,.45); cursor: grab; }
.mn-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 34% 28%, #a6b0c0 0%, #3a4250 38%, #0a0c10 78%); border: 0; box-shadow: 0 0 0 2px #ffcf7a, 0 3px 8px rgba(0,0,0,.7); cursor: grab; }
.mn-range:focus-visible { box-shadow: inset 0 1px 3px #000, 0 0 0 2px var(--brass); }
.mn-minfo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 1px; }
.mn-minfo span { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 0 8px; }
.mn-minfo span:first-child { padding-left: 0; }
.mn-minfo span + span { border-left: 1px solid rgba(255,255,255,.08); }
.mn-minfo em { font-style: normal; font-size: 11px; line-height: 1.2; color: #8490a6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mn-minfo b { font: 700 18px/1 var(--disp); letter-spacing: .4px; color: #f2f5fa; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mn-minfo span:nth-child(2) b, .mn-minfo span:nth-child(3) b { color: var(--gold); }
.mn-autobox { gap: 8px; border-color: rgba(217,164,65,.3); }
.mn-autobox > .mn-label b { color: var(--gold); }
.mn-link { color: var(--brass); font-size: 12px; font-weight: 700; }
.mn-link:hover { text-decoration: underline; }
.mn-hint { font-size: 12px; color: #b6c0d2; line-height: 1.35; padding: 6px 8px; border-radius: 8px; background: rgba(217,164,65,.08); border-left: 2px solid var(--brass); font-variant-numeric: tabular-nums; }
.mn-hint b { color: var(--gold); font-weight: 800; }
.mn-rounds { display: flex; flex-direction: column; gap: 6px; }
.mn-switches { display: flex; flex-direction: column; gap: 8px; }
.mn-switch { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 600; color: #d5dbe6; cursor: pointer; }
.mn-panel .switch .slider { background: #323b4b; }
.mn-panel .switch input:checked + .slider { background: #20c05c; }
/* échelle des gains : le palier atteint, le prochain, le maximum ; elle avance d'un cran à chaque diamant */
.mn-ladder { --ldh: 27px; --rows: 5; gap: 5px; }
.ld { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 6px; height: var(--ldh); padding: 0 9px 0 7px; border-radius: 7px; font-variant-numeric: tabular-nums; white-space: nowrap; flex: 0 0 auto; }
.ld-k { display: inline-flex; align-items: center; gap: 4px; font: 700 14px/1 var(--disp); letter-spacing: .3px; color: #8490a6; }
.ld-k::before { content: ""; width: 7px; height: 7px; transform: rotate(45deg); border-radius: 1px; background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); flex: 0 0 auto; }
.ld-m { font: 700 17px/1 var(--disp); letter-spacing: .4px; color: #aab4c6; }
.ld-p { font-size: 12px; font-weight: 600; color: #77839b; }
.ld.done .ld-k::before, .ld.cur .ld-k::before { background: linear-gradient(135deg, var(--g1), var(--g3) 50%, var(--g5)); box-shadow: none; }
.ld.done .ld-k, .ld.done .ld-m { color: #c8d1df; }
.ld.cur { background: linear-gradient(180deg, rgba(87,224,255,.2), rgba(87,224,255,.08)); box-shadow: inset 0 0 0 1px rgba(87,224,255,.55); animation: mnRung .4s ease-out; }
.ld.cur .ld-k, .ld.cur .ld-m { color: #fff; }
.ld.cur .ld-p { color: #c8f6ff; font-weight: 800; }
.ld.next { background: linear-gradient(180deg, rgba(217,164,65,.2), rgba(217,164,65,.07)); box-shadow: inset 0 0 0 1px rgba(217,164,65,.7); }
.ld.next .ld-k { color: #ffe7a8; }
.ld.next .ld-m { color: #ffd75a; }
.ld.next .ld-p { color: #e7cd8e; }
.ld.pb .ld-k::after { content: ""; width: 13px; height: 13px; margin-left: 1px; background: var(--gold); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.5 8.2l4.6 3.9L12 5.5l3.9 6.6 4.6-3.9-1.7 9.8H5.2z'/%3E%3Crect x='5.2' y='19' width='13.6' height='1.9' rx='.9'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.5 8.2l4.6 3.9L12 5.5l3.9 6.6 4.6-3.9-1.7 9.8H5.2z'/%3E%3Crect x='5.2' y='19' width='13.6' height='1.9' rx='.9'/%3E%3C/svg%3E") center / contain no-repeat; }
.ld-max { background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.ld-max .ld-k { color: #ffe7a8; }
.ld-max .ld-k::before { display: none; }
.ld-max .ld-m { color: #f2f5fa; }
.ld-max .ld-p.cap::after { content: " max"; font-size: 10px; color: #ffb5a6; }
.ld-view { position: relative; height: calc(var(--ldh) * var(--rows)); overflow: hidden; border-radius: 7px; }
.ld-view.more { -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0) 0, #000 26px); mask-image: linear-gradient(180deg, rgba(0,0,0,0) 0, #000 26px); }
.ld-list { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column-reverse; transition: transform .45s cubic-bezier(.3,1.2,.4,1); will-change: transform; }
.mn-ladder.tiny { display: none; }
.ld-pb { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--gold); white-space: nowrap; }
.ld-pb svg { width: 13px; height: 13px; }
/* boutons d'action : gros, en relief ; MISER devient RETIRER avec le montant qui grimpe */
.mn-actions { margin-top: auto; flex: 0 0 auto; position: sticky; bottom: -10px; z-index: 3; padding: 8px 0 10px; margin-bottom: -10px; background: linear-gradient(180deg, rgba(12,15,21,0), #0c0f15 34%); }
.mn-actions .bet-btn { position: relative; width: 100%; min-height: 68px; border-radius: 14px; overflow: hidden; isolation: isolate; transition: transform .08s, filter .15s; }
.mn-actions .bet-btn .bet-btn-label { font: 800 25px/1.05 var(--disp); letter-spacing: 2.4px; padding-left: 2.4px; }
.mn-actions .bet-btn .bet-btn-amount { font: 700 16px/1.2 var(--disp); letter-spacing: .8px; opacity: .94; font-variant-numeric: tabular-nums; }
.mn-actions .bet-btn.bet { color: #fff; text-shadow: 0 1px 2px rgba(0,60,10,.7); background: linear-gradient(180deg, #5cf07a 0%, #22c34a 48%, #0f9a36 100%); box-shadow: inset 0 0 0 1.5px rgba(205,255,215,.75), inset 0 2px 0 rgba(255,255,255,.5), inset 0 -4px 0 rgba(0,70,20,.45), 0 4px 0 #06541c, 0 12px 24px rgba(20,210,80,.26); }
.mn-actions .bet-btn.bet:hover { background: linear-gradient(180deg, #74ff90 0%, #2ad656 48%, #12aa3c 100%); }
.mn-actions .bet-btn.cashout { color: #2a1500; text-shadow: 0 1px 0 rgba(255,245,200,.6); background: linear-gradient(180deg, #fff0a0 0%, #ffc93a 42%, #f08a0c 100%); box-shadow: inset 0 0 0 1.5px rgba(255,250,215,.85), inset 0 2px 0 rgba(255,255,255,.65), inset 0 -4px 0 rgba(150,70,0,.45), 0 4px 0 #7a3f00, 0 12px 26px rgba(255,170,30,.34); }
.mn-actions .bet-btn.cashout:hover { background: linear-gradient(180deg, #fff6c0 0%, #ffd452 42%, #ff9a1a 100%); }
.mn-actions .bet-btn.cashout .bet-btn-label { font-size: 16px; letter-spacing: 2.6px; }
.mn-actions .bet-btn.cashout .bet-btn-amount { font-size: 30px; font-weight: 800; line-height: 1.05; opacity: 1; }
.mn-actions .bet-btn.cashout::before { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 3px rgba(255,255,255,.9), inset 0 0 22px rgba(255,255,255,.7); opacity: 0; animation: mnCashPulse 1.3s ease-in-out infinite; pointer-events: none; z-index: -1; }
.mn-actions .bet-btn.cashout.wait .bet-btn-label { font-size: 19px; letter-spacing: 1.6px; }
.mn-actions .bet-btn.cashout.wait .bet-btn-amount { font-size: 14px; font-weight: 700; }
.mn-actions .bet-btn.cancel { color: #fff; background: linear-gradient(180deg, #ff7a5c 0%, #e0391c 48%, #a8200c 100%); box-shadow: inset 0 0 0 1.5px rgba(255,215,205,.75), inset 0 2px 0 rgba(255,255,255,.45), inset 0 -4px 0 rgba(90,10,0,.45), 0 4px 0 #4a0c02, 0 12px 24px rgba(229,60,20,.26); }
.mn-actions .bet-btn.cancel:hover { background: linear-gradient(180deg, #ff9078 0%, #f04a2c 48%, #b82a12 100%); }
.mn-actions .bet-btn:active { transform: translateY(3px) scale(.995); }
.mn-actions .bet-btn:disabled { pointer-events: none; color: #8792a6; text-shadow: none; background: linear-gradient(180deg, #2c3442, #1b202a); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.12), 0 4px 0 #07090d; }
.mn-actions .bet-btn:disabled::before, .mn-actions .bet-btn:disabled .bb-key { display: none; }
.bb-key { position: absolute; right: 8px; top: 8px; color: inherit; opacity: .8; background: rgba(0,0,0,.22); box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); text-shadow: none; }
.mn-panel-hint { font-size: 12px; color: #98a4ba; text-align: center; min-height: 16px; line-height: 1.3; }
.mn-keys { display: none; flex-wrap: wrap; justify-content: center; gap: 4px 12px; font-size: 11px; color: #77839b; }
.mn-keys span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.mn-keys kbd { padding: 3px 5px; border-radius: 4px; color: #cbd3e0; background: #0a0d12; box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), 0 1px 0 #000; }
.locked #amountField, .locked #minesField, .locked .mn-autobox .mn-chips, .locked .mn-switches, .locked #autoClear { opacity: .5; pointer-events: none; }
/* raccourcis clavier affichés seulement là où il y a un clavier */
@media (hover: hover) and (pointer: fine) and (min-width: 1001px) {
  .mn-ctx kbd, .bb-key { display: inline-block; }
  .mn-keys { display: flex; }
}

/* ========= fenêtres ========= */
.modal { background: #151a23; border-color: #2b3344; }
.modal-head { background: linear-gradient(180deg, #232a36, #1a202a); box-shadow: inset 0 -1px 0 rgba(233,181,74,.25); }
.modal-title { font: 700 19px/1.2 var(--disp); letter-spacing: .8px; color: var(--brass-hi); }
.modal-body h4 { font: 700 16px/1.2 var(--disp); letter-spacing: .6px; color: #f2f5fa; }
.modal-body code { font-family: ui-monospace, Menlo, monospace; font-size: 11px; color: #e7cf95; }
.modal-body .btn.primary { background: linear-gradient(180deg, #ffe9ac, #e2b452 55%, #b98424); color: #241600; border-color: #000; }
.steps .step { position: relative; background: #0f131a; border: 1px solid rgba(255,255,255,.06); padding: 14px 12px; }
.steps .step .ico, .steps .step .ico.g, .steps .step .ico.r, .steps .step .ico.o { width: 64px; height: 64px; border-radius: 16px; background: radial-gradient(circle at 50% 40%, #232a36, #0a0d12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 6px 14px rgba(0,0,0,.5); }
.steps .step .ico svg { width: 42px; height: 42px; }
.steps .step .ico .mini-slab { width: 40px; height: 40px; border-radius: 8px; background: linear-gradient(160deg, #5a6678, #2f3845 55%, #1c222b); box-shadow: inset 0 2px 0 rgba(255,255,255,.25), inset 0 -3px 0 rgba(0,0,0,.4), 0 3px 0 #0d1016; }
.steps .step .n { position: absolute; left: 10px; top: 8px; font: 700 15px/1 var(--disp); color: var(--brass); }
.steps .step b { font: 700 17px/1.2 var(--disp); letter-spacing: .5px; }
.mn-gems { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin: 8px 0 4px; }
.mn-gems div { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px 6px; border-radius: 9px; background: #0f131a; border: 1px solid rgba(255,255,255,.06); text-align: center; }
.mn-gems svg { width: 30px; height: 30px; }
.mn-gems b { font-size: 11px; color: #e6ebf3; }
.mn-gems span { font: 700 13px/1 var(--disp); color: var(--g3); }
.mn-round { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.mn-mini { display: grid; grid-template-columns: repeat(5, 32px); gap: 3px; padding: 6px; border-radius: 10px; background: #07090d; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.mn-mini i { position: relative; height: 32px; border-radius: 6px; background: linear-gradient(160deg, #3a4352, #222835); display: flex; align-items: center; justify-content: center; font: 700 12px/1 var(--disp); font-style: normal; color: #fff; }
.mn-mini i svg { width: 22px; height: 22px; }
.mn-mini i.g { background: #0f2230; box-shadow: inset 0 0 0 1px rgba(87,224,255,.5); }
.mn-mini i.g u { position: absolute; right: 2px; bottom: 1px; text-decoration: none; font-size: 10px; color: #c8f6ff; text-shadow: 0 1px 2px #000; }
.mn-mini i.m { background: #2e0d08; box-shadow: inset 0 0 0 1px rgba(255,110,80,.35); }
.mn-mini i.hit { box-shadow: inset 0 0 0 2px #ff5a36, 0 0 10px rgba(255,90,54,.6); }
.mn-mini-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 11px; color: var(--muted); max-width: 184px; }
.mn-mini-legend span { display: inline-flex; align-items: center; gap: 4px; }
.mn-mini-legend svg { width: 13px; height: 13px; }
.mn-mini-legend .hitbox { width: 11px; height: 11px; border-radius: 3px; background: #2e0d08; box-shadow: inset 0 0 0 2px #ff5a36; }
.mn-ic { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; }
.fair-rows tr { cursor: pointer; }
.mybets-table tr[data-row]:hover td { background: rgba(255,255,255,.04); cursor: pointer; }
.mn-recs { display: flex; flex-wrap: wrap; gap: 6px; }
.mn-recs span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; background: #0f131a; border: 1px solid rgba(255,255,255,.07); font-size: 12px; color: #cbd3e0; white-space: nowrap; }
.mn-recs span b { font: 700 15px/1 var(--disp); color: var(--gold); }
.mn-recs svg { width: 15px; height: 15px; }
.mn-keylist { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; align-items: center; }
.mn-keylist kbd { padding: 4px 6px; border-radius: 5px; color: #e6ebf3; background: #0a0d12; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 1px 0 #000; white-space: nowrap; justify-self: start; }

/* ========= responsive ========= */
/* ordinateur : l'échelle des gains prend toute la hauteur laissée libre par le panneau (ui.js compte les paliers visibles) */
@media (min-width: 1001px) and (min-height: 521px) {
  .mn-ladder { --fluid: 1; flex: 1 1 0; min-height: 0; overflow: hidden; }
  .mn-ladder .ld-view { flex: 1 1 0; min-height: 0; height: auto; }
}
@media (min-width: 1001px) and (max-width: 1240px) { .mn-session .ss em { display: none; } }
@media (min-width: 1001px) and (max-height: 780px) { .mn-keys { display: none; } }
/* grand écran : l'affichage grandit avec le plateau */
@media (min-width: 1500px) and (min-height: 940px) {
  .mn-hud, .mn-rail { width: min(100%, 740px); }
  .mn-status .st { padding: 8px 12px; }
  .mn-status .st small { font-size: 12px; }
  .mn-status .st b { font-size: 32px; }
  .mn-status .st.win b { font-size: 44px; }
  .mn-status .st em { font-size: 12px; }
  .nx-row .ring { width: 30px; height: 30px; }
  .mn-board-wrap { --lab: 30px; --gap: 9px; --cs: 72px; --rv: 3.6px; }
}
@media (max-width: 1000px) {
  .mn { display: flex; flex-direction: column; height: auto; min-height: calc(100vh - var(--topbar-h)); min-height: calc(100dvh - var(--topbar-h)); }
  .mn-stage { flex: none; order: 1; }
  .mn-history { order: 0; }
  .mn-panel { order: 2; overflow: visible; }
  .mn-session { order: 3; width: 100%; height: auto; padding: 8px 4px; justify-content: space-around; }
  .mn-session .ss { flex-direction: column; align-items: center; gap: 3px; flex: 1 1 0; padding: 0 4px; white-space: normal; text-align: center; }
  .mn-session .ss svg { display: none; }
  .mn-board-area { flex: none; width: 100%; aspect-ratio: 1 / .96; padding: 8px 14px 4px; }
  /* la grille d'abord ; le bouton d'action reste collé au bas de l'écran, toujours visible sans défiler */
  .mn-actions { order: 10; position: sticky; bottom: 0; margin: 0 -10px -10px; padding: 10px 10px calc(10px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(180deg, rgba(12,15,21,0), rgba(12,15,21,.94) 22%, #0c0f15 60%); border-radius: 0 0 16px 16px; }
  .mn-panel-hint { order: 9; }
  .mn-ladder { --rows: 5; }
}
@media (max-width: 640px) {
  .logo .mn-logo { font-size: clamp(12px, 3.75vw, 17px); letter-spacing: .5px; }
  .topbar .logo { column-gap: 0; }
  .mn { padding: 4px; gap: 4px; }
  .mn-stage { padding: 16px 6px 6px; border-radius: 14px; }
  .mn-status { gap: 6px; }
  .mn-hud { gap: 5px; grid-template-columns: minmax(0, .9fr) minmax(0, 1.15fr) minmax(0, 1.1fr); }
  .mn-status .st { padding: 4px 4px 4px; border-radius: 8px; }
  .mn-status .st::before { left: 5px; right: 5px; }
  .mn-status .st small { font-size: 10px; }
  .mn-status .st b { font-size: 22px; }
  .mn-status .st.win b { font-size: 29px; }
  .mn-status .st em { font-size: 10px; min-height: 12px; line-height: 12px; }
  .nx-row { gap: 4px; }
  .nx-row .ring { width: 19px; height: 19px; }
  .nx-row i { font-size: 10px; padding-bottom: 4px; }
  .mn-rail { gap: 5px; }
  .rl-chip { height: 22px; font-size: 14px; padding: 0 6px 0 3px; }
  .rl-chip svg { width: 16px; height: 16px; }
  .rl-track { height: 22px; padding: 0 3px; }
  .mn-board-wrap { --lab: 14px; --gap: 6px; --rv: 1.8px; --cs: 30px; }
  .mn-cols, .mn-rows { visibility: hidden; }
  .mn-frame .hz { height: 3px; bottom: 2.5px; }
  .mn-fx { inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); }
  .mn-win-card { padding: 10px 22px 12px; }
  .mn-win-mult { font-size: 40px; }
  .mn-win-amt { font-size: 22px; }
  .mn-stamp b { font-size: 24px; }
  .mn-foot { gap: 6px; }
  .mn-hash > span { display: none; }
  .mn-panel { padding: 8px 8px 10px; gap: 8px; border-radius: 14px; }
  .mn-actions { margin: 0 -8px -10px; padding: 10px 8px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .mn-round { grid-template-columns: 1fr; }
  .mn-mini { justify-content: center; }
  .mn-mini-legend { max-width: none; justify-content: center; }
  .mn-gems { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .modal-body .mybets-table { font-size: 11px; }
  .modal-body .mybets-table td, .modal-body .mybets-table th { padding: 4px 3px; }
}
/* ===== téléphone en paysage : affichage à gauche, grille carrée au centre, commandes à droite ===== */
@media (orientation: landscape) and (max-height: 520px) {
  .logo .mn-logo { font-size: 18px; letter-spacing: 1.6px; }
  .mn { display: grid; grid-template-columns: minmax(0, 1fr) 266px; grid-template-rows: auto minmax(0, 1fr); gap: 4px; padding: 4px; height: calc(100vh - var(--topbar-h)); height: calc(100dvh - var(--topbar-h)); min-height: 0; }
  .mn-history { grid-column: 1; grid-row: 1; order: 0; }
  .mn-history .history-bar { height: 26px; border-radius: 9px; }
  .mn-history .chip { height: 18px; font-size: 13px; }
  .mn-history .chip svg { width: 13px; height: 13px; }
  .mn-history .history-expanded { top: 30px; }
  .mn-session { display: none; }
  .mn-stage { grid-column: 1; grid-row: 2; order: 0; padding: 14px 6px 4px; display: grid; grid-template-columns: 134px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; column-gap: 6px; border-radius: 12px; }
  .mn-status { grid-column: 1; grid-row: 1; justify-content: flex-start; gap: 5px; min-height: 0; }
  .mn-hud { grid-template-columns: 1fr; gap: 5px; width: 100%; }
  .mn-status .st { padding: 2px 6px 3px; border-radius: 8px; }
  .mn-status .st::before { display: none; }
  .mn-status .st.win::before { display: block; height: 10px; }
  .mn-status .st small { font-size: 10px; }
  .mn-status .st b { font-size: 19px; }
  .mn-status .st.win b { font-size: 25px; }
  .mn-status .st em { font-size: 10px; min-height: 12px; line-height: 12px; }
  .mn-status .st.mult em { display: none; }
  .mn-status .st.win { order: -1; }
  .nx-row .ring { width: 18px; height: 18px; }
  .nx-row i { font-size: 10px; padding-bottom: 3px; }
  .mn-rail { flex-wrap: wrap; gap: 4px; justify-content: space-between; width: 100%; }
  .rl-track { order: 3; flex: 1 0 100%; height: auto; grid-template-columns: repeat(var(--cols, 8), minmax(0, 1fr)); row-gap: 1px; padding: 3px 4px; border-radius: 9px; }
  .sk { height: 12px; }
  .rl-chip { height: 20px; font-size: 13px; padding: 0 6px 0 2px; }
  .rl-chip svg { width: 14px; height: 14px; }
  .mn-foot { grid-column: 1; grid-row: 2; flex-direction: column-reverse; gap: 4px; min-height: 0; padding-top: 4px; }
  .mn-hash { height: 20px; font-size: 10px; padding: 0 7px 0 5px; max-width: 134px; }
  .mn-hash > span { display: none; }
  .mn-ctx { height: 26px; font-size: 11px; padding: 0 8px 0 6px; max-width: 134px; }
  .mn-ctx svg { width: 14px; height: 14px; }
  .mn-board-area { grid-column: 2; grid-row: 1 / span 2; flex: 1 1 auto; width: auto; aspect-ratio: auto; min-height: 0; padding: 0; }
  .mn-board-wrap { --lab: 15px; --gap: 5px; --rv: 2px; --cs: 26px; }
  .mn-cols, .mn-rows { visibility: visible; }
  .mn-cols span, .mn-rows span { font-size: 9px; }
  .mn-frame .hz { height: 3px; bottom: 3px; }
  .mn-fx { inset: -30px; width: calc(100% + 60px); height: calc(100% + 60px); }
  .mn-win-card { padding: 7px 18px 9px; border-radius: 12px; }
  .mn-win-title { font-size: 11px; margin-bottom: 2px; }
  .mn-win-mult { font-size: 30px; }
  .mn-win-amt { font-size: 18px; margin-top: 3px; }
  .mn-win-sub { margin-top: 3px; font-size: 11px; }
  .mn-win-rec { margin-top: 4px; font-size: 11px; }
  .mn-win.clear .mn-win-title { font-size: 15px; letter-spacing: 2px; }
  .mn-stamp b { font-size: 20px; }
  .mn-panel { grid-column: 2; grid-row: 1 / span 2; order: 0; padding: 6px; gap: 5px; overflow-y: auto; border-radius: 12px; }
  .mn-panel > * { order: 0; }
  .mn-ladder { --ldh: 22px; --rows: 3; }
  .ld-m { font-size: 15px; }
  .mn-tabs { padding: 3px; border-radius: 10px; }
  .mn-tabs button { height: 24px; font-size: 12px; border-radius: 7px; }
  .mn-field { gap: 4px; padding: 5px 6px 6px; border-radius: 10px; }
  .mn-label { font-size: 11px; min-height: 14px; }
  .mn-label b { font-size: 15px; }
  .mn-label .ic { width: 14px; height: 14px; }
  .mn-panel .amount-box { height: 32px; border-radius: 9px; }
  .mn-panel .amount-input { font-size: 20px; }
  .mn-panel .amt-btn { width: 24px; height: 24px; font-size: 16px; border-radius: 6px; }
  .mn-chips { gap: 4px; }
  .mn-chips button { height: 23px; font-size: 13px; border-radius: 6px; }
  .mn-chips.bets { gap: 5px; }
  .mn-chips.bets .grp { gap: 3px; }
  .mn-chips.bets .grp.mods { padding-left: 5px; }
  .mn-chips .mods button { font-size: 12px; }
  .mn-range { margin: 5px 0 3px; height: 8px; }
  .mn-range::-webkit-slider-thumb { width: 18px; height: 18px; }
  .mn-minfo em { font-size: 10px; }
  .mn-minfo b { font-size: 15px; }
  .mn-minfo span { padding: 0 5px; }
  .mn-risk em { font-size: 11px; }
  .mn-autobox { gap: 4px; }
  .mn-hint { font-size: 11px; padding: 4px 6px; }
  .mn-rounds { flex-direction: row; align-items: center; gap: 6px; }
  .mn-rounds .mn-label { flex: 0 0 auto; font-size: 10px; }
  .mn-rounds .mn-chips { flex: 1; }
  .mn-switches { flex-direction: row; gap: 6px; }
  .mn-switch { flex: 1; font-size: 11px; gap: 4px; }
  .mn-actions { order: 0; position: sticky; bottom: -6px; margin: auto 0 -6px; padding: 4px 0 6px; border-radius: 0; background: linear-gradient(180deg, rgba(12,15,21,0), #0c0f15 34%); }
  .mn-actions .bet-btn { min-height: 46px; border-radius: 11px; }
  .mn-actions .bet-btn .bet-btn-label { font-size: 18px; }
  .mn-actions .bet-btn .bet-btn-amount { font-size: 13px; }
  .mn-actions .bet-btn.cashout .bet-btn-label { font-size: 12px; }
  .mn-actions .bet-btn.cashout .bet-btn-amount { font-size: 21px; }
  .mn-actions .bet-btn.cashout.wait .bet-btn-label { font-size: 15px; }
  .mn-actions .bet-btn.cashout.wait .bet-btn-amount { font-size: 12px; }
  .mn-panel-hint { display: none; }
}
/* réglage « Animation » du profil coupé (ui.js pose .calm sur la scène) : les dalles se montrent sans mouvement */
.mn-stage.calm .tile .tile-inner, .mn-stage.calm .tile .rv-halo, .mn-stage.calm .gem-shine::before, .mn-stage.calm .tile svg.gem, .mn-stage.calm .tile svg.bomb, .mn-stage.calm .tile.lit::before, .mn-stage.calm .tile.lit2::before { animation: none !important; }
.mn-stage.calm .tile-fx, .mn-stage.calm .tw, .mn-stage.calm .gem-shine, .mn-stage.calm .rays, .mn-stage.calm .fuse { display: none; }
/* mouvement réduit : plus de dérive, de balayage ni de secousse ; les états restent lisibles */
@media (prefers-reduced-motion: reduce) {
  .amb-dust, .amb-embers, .amb-drips, .amb-rubble { display: none; }
  .amb-glows b, .amb-lamp.hang, .lp-halo, .lp-flame, .mn-frame .lava::before { animation: none !important; }
  .amb-glows b { opacity: .5; }
  .tw, .gem-shine, .fuse, .mn-win-rays, .rays, .mn-torch { display: none; }
  .mn-gleam { display: none; }
  .tile.wake, .tile.wake::before { animation: none !important; }
  .mn-board-wrap.shake, .mn-flash.on, .mn-stage.rumble .mn-decor, .mn-stage.beat .mn-dim, .tile.shock, .tile.lit::before, .tile.lit2::before, .tile.sweep::before, .tile.cursor::after, .tile.hit svg.bomb, .tile.arming svg.bomb, .tile.hit .rv-halo, .tile.hit .hit-ring, .tile.gem:not(.dim) svg.gem, .mn-status .st.bump b, .mn-status .st.catch, .mn-status.cash .st-glow, .mn-actions .bet-btn.cashout::before, .mn-history .chip:first-child, .sk.pop, .mn-rail.won .sk.on, .ld.cur, .mn-ctx, .mn-win-rec, .tile.picked .pick-dot, .mn-session .ss.bump b, .rl-chip.gems.bump { animation: none !important; }
  .tile .tile-inner, .tile .rv-halo, .gem-shine::before, .tile.arming svg.bomb { animation: none !important; }
  .tile-fx { display: none; }
  .tile.hit .hit-ring { opacity: 1; }
  .mn-win.in .mn-win-card, .mn-win.out .mn-win-card, .mn-stamp.in { animation-duration: .01s !important; }
  .ld-list, .rg-val, .face.front, .mn-dim { transition: none; }
  .mn-status.cash .st-glow { opacity: .7; }
}
