/* Tipografía BP STUDIO: Lexend en todo; botones y títulos en Bold 700 como mínimo */
:where(button,input,select,textarea){font-family:inherit}
:where(button,[role=button],h1,h2,h3,h4,h5,h6,th,label){font-weight:700}
/*!
 * POMBERO MYTHOLOGY · BP STUDIO — estilos (versión casino)
 * Dirección aprobada: Lexend, monte nocturno, superficies oscuras, oro sutil, tablero limpio y controles modernos.
 * Celular primero: barra de la app fija abajo, sin desplazamiento lateral. Respeta «reducir movimiento».
 */
@font-face { font-family: 'Lexend'; src: url('fonts/lexend-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #030d0b;
  --ink: #eef5ef;
  --muted: #8da99c;
  --muted2: #6f8b7d;
  --line: rgba(255, 255, 255, .07);
  --line-gold: rgba(214, 192, 130, .26);
  --gold: #ebca7b;
  --gold-hi: #fff0b6;
  --gold-lo: #ddb454;
  --cream: #f3e8c4;
  --surface: rgba(7, 24, 16, .93);
  --surface2: rgba(9, 26, 19, .95);
  --green: #5fd38f;
  --font: 'Lexend', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --cell: 54px;
  --gap: 4px;
  --pitch: 58px;
  --spd: 1;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tab-h: 62px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; max-width: 100%; overflow-x: hidden; background: var(--bg); color: var(--ink); font: 400 14px/1.5 var(--font); }
body { overscroll-behavior: none; }
button, select, input { font: inherit; color: inherit;font-weight:700}
button { cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; }
button:disabled { cursor: default; opacity: .45; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
small { display: block; font-size: 9px; letter-spacing: 1.4px; color: var(--muted); text-transform: uppercase; }
strong { font-weight: 700; font-variant-numeric: tabular-nums; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
svg .fill { fill: currentColor; stroke: none; }

/* ───────────── Fondo ───────────── */
.app { position: relative; min-height: 100dvh; isolation: isolate; }
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.sky-img { position: absolute; inset: -2%; background: url('assets/bg.webp') center/cover no-repeat; transform: scale(1.04); animation: sky-drift 60s ease-in-out infinite alternate; }
@media (max-aspect-ratio: 4/5) { .sky-img { background-image: url('assets/bg-m.webp'); } }
.sky-moon { position: absolute; right: 12%; top: 4%; width: 26vmin; height: 26vmin; border-radius: 50%; background: radial-gradient(circle, rgba(220, 240, 255, .16), transparent 62%); animation: moon-breathe 9s ease-in-out infinite; }
.mist i { position: absolute; left: -30%; width: 160%; height: 30%; bottom: 8%; background: radial-gradient(ellipse at center, rgba(190, 220, 205, .10), transparent 65%); filter: blur(8px); animation: mist 38s linear infinite; }
.mist i:nth-child(2) { bottom: 26%; opacity: .6; animation-duration: 55s; animation-direction: reverse; }
.sky-shade { position: absolute; inset: 0; background: linear-gradient(rgba(2, 12, 10, .80), rgba(4, 27, 18, .42) 40%, rgba(2, 11, 9, .94)); transition: background .8s; }
.fireflies i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff3a6; box-shadow: 0 0 8px 2px rgba(255, 233, 120, .55); opacity: 0; animation: firefly var(--d, 9s) ease-in-out var(--dl, 0s) infinite; left: var(--x); top: var(--y); }
.app.bonus .sky-shade { background: linear-gradient(rgba(1, 14, 12, .70), rgba(10, 52, 34, .40) 45%, rgba(1, 10, 8, .92)); }
.app.bonus .fireflies i { background: #d9ffb0; box-shadow: 0 0 10px 3px rgba(170, 255, 140, .6); }
@keyframes sky-drift { to { transform: scale(1.09) translate(-1.2%, -.8%); } }
@keyframes moon-breathe { 50% { opacity: .55; transform: scale(1.06); } }
@keyframes mist { from { transform: translateX(-12%); } to { transform: translateX(12%); } }
@keyframes firefly {
  0% { opacity: 0; transform: translate(0, 0); }
  20% { opacity: .9; }
  50% { opacity: .35; transform: translate(var(--mx, 30px), var(--my, -40px)); }
  80% { opacity: .85; }
  100% { opacity: 0; transform: translate(calc(var(--mx, 30px) * -.4), calc(var(--my, -40px) * 1.6)); }
}

/* ───────────── Marca ───────────── */
.brandword { display: inline-flex; flex-direction: column; line-height: 1; }
.brandword b { font-weight: 800; letter-spacing: 1.6px; color: var(--cream); }
.brandword span { font-size: .52em; letter-spacing: .5em; color: #c7ab69; margin-top: .45em; font-weight: 700; }

/* ───────────── Botones ───────────── */
.btn-gold { background: linear-gradient(130deg, #f7e7ad, var(--gold-lo)); color: #172617; font-weight: 700; border-radius: 14px; padding: 13px 22px; box-shadow: 0 6px 24px rgba(0, 0, 0, .3), inset 0 1px rgba(255, 255, 255, .55); transition: transform .15s, filter .15s; }
.btn-gold:hover:enabled { filter: brightness(1.06); transform: translateY(-1px); }
.btn-gold:active:enabled { transform: translateY(1px) scale(.99); }
.btn-ghost { border: 1px solid var(--line-gold); background: rgba(255, 255, 255, .03); color: var(--cream); border-radius: 14px; padding: 12px 20px; font-weight: 700; }
.btn-pill { border-radius: 99px; padding: 14px 28px; }
.btn-xl { font-size: 16px; padding: 16px 30px; border-radius: 99px; min-width: 220px; }
.link-btn { color: #a8b79f; font-size: 11px; padding: 6px 10px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: rgba(17, 41, 30, .55); border: 1px solid var(--line); color: #bcd0bf; flex: none; }
.icon-btn[aria-pressed="true"] { color: var(--gold); border-color: rgba(235, 202, 123, .3); }
#sound-quick .mute { display: none; }
#sound-quick[aria-pressed="false"] .mute { display: inline; }
#sound-quick[aria-pressed="false"] .wave { display: none; }

/* ───────────── Pantallas ───────────── */
.screen { min-height: 100dvh; }
.screen-loading, .screen-welcome { display: grid; place-items: center; padding: 24px 16px calc(24px + var(--safe-b)); text-align: center; }
.load-panel { display: grid; justify-items: center; gap: 14px; width: min(320px, 100%); }
.load-logo { width: 150px; height: 150px; object-fit: contain; filter: drop-shadow(0 12px 30px rgba(0, 0, 0, .6)); animation: float 4.5s ease-in-out infinite; }
.load-panel .brandword { font-size: 26px; }
.load-bar { width: 100%; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.load-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); transition: width .25s; box-shadow: 0 0 12px rgba(235, 202, 123, .6); }
.load-sub { font-size: 11px; color: var(--muted); letter-spacing: 1px; }

.wel-panel { width: min(440px, 100%); display: grid; justify-items: center; gap: 12px; padding: 26px 20px; border-radius: 28px; background: linear-gradient(180deg, rgba(8, 28, 19, .82), rgba(3, 14, 10, .9)); border: 1px solid var(--line-gold); box-shadow: 0 30px 80px rgba(0, 0, 0, .55); backdrop-filter: blur(10px); animation: rise .6s cubic-bezier(.2, .8, .2, 1) both; }
.wel-art { position: relative; width: 170px; height: 170px; }
.wel-logo { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 14px 30px rgba(0, 0, 0, .65)); animation: float 5s ease-in-out infinite; }
.wel-art .cigar-smoke { left: 17%; top: 22%; width: 13%; height: 26%; }
.eyebrow { font-size: 9px; letter-spacing: 2.4px; color: #c1b681; }
.wel-title { margin: 0; font-size: clamp(34px, 9vw, 46px); line-height: .95; font-weight: 800; letter-spacing: -1.5px; color: var(--cream); text-shadow: 0 4px 26px rgba(0, 0, 0, .6); }
.wel-title em { display: block; font-style: normal; font-size: 11px; letter-spacing: 8px; font-weight: 700; color: #c7ab69; margin-top: 10px; }
.wel-points { list-style: none; margin: 4px 0 6px; padding: 0; display: grid; gap: 6px; font-size: 12.5px; color: #b9c9bb; }
.wel-points b { color: var(--gold); font-weight: 700; }
.wel-entry { width: 100%; display: grid; gap: 6px; text-align: left; }
.wel-entry label { font-size: 11px; color: var(--muted); }
.wel-entry input { min-height: 46px; border-radius: 12px; border: 1px solid var(--line-gold); background: rgba(0, 0, 0, .35); padding: 0 12px; }
.wel-entry .btn-gold { margin-top: 8px; }
.wel-msg { min-height: 18px; margin: 0; color: #ffb3a1; font-size: 12px; }
.wel-legal { margin: 0; font-size: 10.5px; color: var(--muted2); letter-spacing: .4px; }

/* ───────────── Juego ───────────── */
.screen-game { height: 100dvh; display: grid; grid-template-rows: auto 1fr auto auto; overflow: hidden; }
.topbar { display: flex; align-items: center; gap: 10px; padding: calc(8px + env(safe-area-inset-top, 0px)) 14px 8px; background: rgba(4, 14, 11, .82); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); position: relative; z-index: 4; }
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand img { width: 38px; height: 38px; object-fit: contain; }
.brand .brandword { font-size: 12px; }
.bal { margin-left: auto; text-align: right; min-width: 0; }
.bal strong { display: block; font-size: 15px; color: var(--cream); white-space: nowrap; }
.chip { font-size: 9px; letter-spacing: 1.3px; padding: 4px 9px; border-radius: 99px; border: 1px solid var(--line-gold); color: var(--gold); max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app.offline .topbar::after { content: 'Reconectando…'; position: absolute; left: 50%; top: 100%; transform: translate(-50%, 6px); font-size: 11px; background: #3a2a10; color: #ffe2a6; padding: 4px 12px; border-radius: 99px; }

.stage { min-height: 0; display: grid; grid-template-columns: 170px minmax(0, 1fr) 220px; grid-template-areas: "l board r"; gap: 22px; align-items: center; padding: 12px 22px; max-width: 1440px; width: 100%; margin: 0 auto; }
.side-l { grid-area: l; text-align: center; }
.board-wrap { grid-area: board; min-width: 0; display: grid; justify-items: center; }
.side-r { grid-area: r; text-align: center; min-width: 0; }

.emblem img { width: 96px; height: 96px; object-fit: contain; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .6)); animation: emblem 4s ease-in-out infinite; }
.side-title { font: 700 12px/1.5 var(--font); letter-spacing: 1px; color: #c8d7bc; margin: 8px 0 4px; }
.side-note { font-size: 9.5px; color: #799582; line-height: 1.7; margin: 0 0 6px; }
.gauges { display: grid; gap: 10px; }
.gauge { padding: 11px 8px; border: 1px solid var(--line); border-radius: 14px; background: rgba(8, 32, 21, .7); box-shadow: inset 0 1px rgba(255, 255, 255, .03); transition: border-color .3s, background .3s, box-shadow .3s; }
.gauge strong { display: block; font-size: 26px; font-weight: 700; margin-top: 2px; color: #e8eacb; line-height: 1.1; }
.g-mult strong { color: #e6c97c; }
.g-bonus strong { font-size: 16px; color: #e6c97c; }
.gauge.bump { animation: bump .45s cubic-bezier(.3, 1.6, .5, 1); }
.g-mult[data-tier="gold"], .g-mult[data-tier="diamond"], .g-mult[data-tier="legend"] { border-color: rgba(209, 179, 94, .5); background: radial-gradient(rgba(130, 112, 43, .35), rgba(10, 37, 24, .85)); box-shadow: 0 0 22px rgba(235, 202, 123, .18); }
.g-mult[data-tier="diamond"] strong, .g-mult[data-tier="legend"] strong { color: #fff3c9; text-shadow: 0 0 14px rgba(255, 230, 150, .7); }
.app.bonus .g-free { border-color: rgba(122, 220, 140, .45); box-shadow: 0 0 20px rgba(95, 211, 143, .16); }
.app.bonus .g-free strong { color: #c9ffb8; }

.board-top { width: var(--boardw, 100%); display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 6px 8px; min-height: 30px; }
#banner { font-size: 9px; letter-spacing: 1.6px; color: #83a591; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#banner.hot { color: var(--gold); }
#round-win { font-size: 16px; color: var(--gold); white-space: nowrap; }
#round-win.flash { animation: win-flash .55s ease-out; }
.board-frame { position: relative; padding: 8px; border-radius: 20px; background: linear-gradient(180deg, rgba(10, 30, 20, .94), rgba(4, 16, 11, .95)); border: 1px solid rgba(191, 168, 102, .30); box-shadow: 0 25px 65px rgba(0, 0, 0, .55), inset 0 1px rgba(255, 255, 255, .05); transition: border-color .5s, box-shadow .5s; }
.app.bonus .board-frame { border-color: rgba(159, 210, 121, .5); box-shadow: 0 0 42px rgba(92, 181, 111, .18), 0 25px 65px rgba(0, 0, 0, .55); }
.board-frame.shake { animation: shake .42s; }
.board { position: relative; width: calc(6 * var(--pitch) - var(--gap)); height: calc(5 * var(--pitch) - var(--gap)); border-radius: 12px; }
.tile { position: absolute; left: calc(var(--c) * var(--pitch)); top: calc(var(--r) * var(--pitch)); width: var(--cell); height: var(--cell); border-radius: calc(var(--cell) * .16); background: radial-gradient(ellipse at 50% 30%, rgba(26, 56, 39, .38), rgba(8, 25, 14, .45)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .025); }
.tile.col-hot { box-shadow: inset 0 0 0 1px rgba(255, 233, 160, .35), 0 0 18px rgba(255, 220, 120, .18); }
.board-clip { position: absolute; inset: 0; overflow: hidden; border-radius: 12px; }
.fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 6; }

.sym { position: absolute; left: calc(var(--c) * var(--pitch)); top: calc(var(--r) * var(--pitch)); width: var(--cell); height: var(--cell); display: grid; place-items: center; will-change: transform; z-index: 1; }
.sym img { width: 92%; height: 92%; object-fit: contain; filter: drop-shadow(0 calc(var(--cell) * .06) calc(var(--cell) * .05) rgba(0, 0, 0, .55)); pointer-events: none; user-select: none; }
.sym.s7::before, .sym.s8::before { content: ''; position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 226, 140, .28), transparent 65%); animation: halo 2.4s ease-in-out infinite; }
.sym.s7::before { background: radial-gradient(circle, rgba(120, 255, 160, .28), transparent 66%); }
.sym.lit::before { animation-duration: .9s; inset: -6%; }
.sym.dim { opacity: .38; filter: saturate(.6); transition: opacity .18s; }
.sym.win { z-index: 3; }
.sym.win img { animation: win-pulse .62s ease-in-out infinite; }
.sym.win::after { content: ''; position: absolute; inset: 3%; border-radius: 22%; box-shadow: 0 0 0 2px rgba(255, 233, 160, .85), 0 0 22px rgba(255, 210, 100, .55), inset 0 0 18px rgba(255, 220, 130, .35); animation: ring .62s ease-in-out infinite; }
.sym.new-mult img { animation: mult-in .55s cubic-bezier(.3, 1.6, .5, 1); }
.sym.gone { opacity: .25; }

.reel-loop { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(6, var(--cell)); gap: var(--gap); z-index: 2; pointer-events: none; }
.reel-col { position: relative; overflow: hidden; border-radius: calc(var(--cell) * .16); background: rgba(9, 32, 21, .65); }
.reel-col::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(2, 12, 8, .85), transparent 22%, transparent 78%, rgba(2, 12, 8, .85)); }
.reel-strip { display: grid; gap: var(--gap); animation: reel calc(.34s * var(--spd)) linear infinite; filter: blur(1.4px) saturate(.9); }
.reel-strip img { width: var(--cell); height: var(--cell); object-fit: contain; padding: 4%; }
.reel-col.slow .reel-strip { animation-duration: calc(.6s * var(--spd)); }
.reel-col.slow { box-shadow: 0 0 0 1px rgba(255, 233, 160, .5), 0 0 24px rgba(255, 220, 120, .3); }

.pop { position: absolute; z-index: 7; transform: translate(-50%, -50%); font-weight: 800; font-size: clamp(13px, calc(var(--cell) * .3), 22px); color: #fff3c4; text-shadow: 0 2px 0 #4a3510, 0 0 14px rgba(255, 210, 110, .8); white-space: nowrap; pointer-events: none; animation: pop 1.1s cubic-bezier(.2, .8, .2, 1) forwards; }
.fly { position: fixed; z-index: 60; pointer-events: none; display: grid; place-items: center; }
.fly img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 14px rgba(255, 220, 120, .8)); }

.status { min-height: 34px; padding: 8px 6px 0; font-size: 11px; color: #aabfa7; text-align: center; max-width: var(--boardw, 100%); }

.portrait { position: relative; width: 100%; aspect-ratio: 1; isolation: isolate; }
.portrait > img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 28px rgba(0, 0, 0, .7)); animation: float 5s ease-in-out infinite; transform-origin: 50% 85%; }
.portrait .aura { position: absolute; inset: 6%; border-radius: 50%; background: radial-gradient(circle, rgba(235, 202, 123, calc(.10 + var(--glow, 0) * .35)), transparent 66%); transition: background .6s; z-index: 0; }
.app[data-mood="1"] .portrait { --glow: .25; } .app[data-mood="2"] .portrait { --glow: .55; } .app[data-mood="3"] .portrait { --glow: 1; }
.portrait.hop > img { animation: hop .5s cubic-bezier(.3, 1.5, .5, 1); }
.portrait.party > img { animation: party .6s ease-in-out 3; }
.portrait.sulk > img { animation: sulk .9s ease-in-out; }
.portrait.tense > img { animation: tense .5s ease-in-out infinite; }
.cigar-smoke { position: absolute; left: 19%; top: 61%; width: 12%; height: 23%; pointer-events: none; z-index: 2; mix-blend-mode: screen; }
.cigar-smoke i { position: absolute; bottom: 0; left: 20%; width: 65%; height: 38%; border-radius: 50%; background: radial-gradient(ellipse, rgba(220, 231, 210, .34), transparent 70%); filter: blur(3px); opacity: 0; animation: smoke 4.6s ease-out infinite; }
.cigar-smoke i:nth-child(2) { animation-delay: 1.5s; } .cigar-smoke i:nth-child(3) { animation-delay: 3s; }
.speech { position: relative; font: 500 13px/1.55 var(--font); color: #c4cdb6; padding: 12px 14px; margin: 10px auto 0; max-width: 210px; border-radius: 14px; background: rgba(6, 22, 15, .78); border: 1px solid var(--line); }
.speech.say { animation: say .4s cubic-bezier(.2, .9, .3, 1.2); }

/* Controles */
.controls { display: grid; grid-template-columns: 1fr auto 76px 1fr; align-items: center; gap: 16px; width: min(1010px, calc(100% - 28px)); margin: 4px auto 10px; padding: 12px 18px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface2); box-shadow: 0 15px 35px rgba(0, 0, 0, .35); position: relative; z-index: 3; }
.ctl strong { display: block; font-size: 18px; color: #edf0d9; letter-spacing: -.3px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctl-win strong.flash { animation: win-flash .55s ease-out; color: var(--gold-hi); }
.stepper { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.step { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-gold); color: var(--gold); font-size: 18px; line-height: 1; display: grid; place-items: center; background: rgba(255, 255, 255, .03); }
.bet-val { min-width: 92px; height: 36px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); font-weight: 700; color: #e3ebd9; white-space: nowrap; }
.spin { position: relative; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; color: #182217; background: radial-gradient(circle at 35% 30%, #fff6cc, #f0d07a 45%, #c9973c); box-shadow: 0 0 0 6px rgba(237, 207, 123, .07), 0 10px 30px rgba(0, 0, 0, .5), inset 0 -4px 8px rgba(120, 80, 10, .35); transition: transform .15s, filter .15s; justify-self: center; }
.spin svg { width: 38px; height: 38px; stroke-width: 2; }
.spin:hover:not(:disabled) { transform: scale(1.04); filter: brightness(1.05); }
.spin:active:not(:disabled) { transform: scale(.96); }
.spin.turning svg { animation: spin-btn .7s linear infinite; }
.spin.skip svg { animation: spin-btn .35s linear infinite; }
.spin.stop { background: radial-gradient(circle at 35% 30%, #ffe2d0, #f0a07a 45%, #b5562c); }
.spin.stop svg { display: none; }
.spin-count { position: absolute; font-weight: 800; font-size: 20px; }
.spin::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(255, 233, 160, .0); }
.spin.ready::after { animation: breathe-ring 2.6s ease-in-out infinite; }
.ripple { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255, 240, 190, .9); animation: ripple .6s ease-out forwards; pointer-events: none; }
.ctl-quick { display: flex; gap: 8px; justify-content: flex-end; }
.quick { display: grid; justify-items: center; gap: 2px; min-width: 54px; padding: 8px 8px 6px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: #9daf9d; font-size: 10px; }
.quick svg { width: 18px; height: 18px; }
.quick[aria-pressed="true"] { color: var(--gold); border-color: rgba(235, 202, 123, .35); background: rgba(235, 202, 123, .07); }

/* Barra de la app */
.tabbar { display: grid; grid-template-columns: repeat(4, 1fr); padding: 4px 8px calc(4px + var(--safe-b)); background: rgba(3, 12, 9, .94); border-top: 1px solid var(--line); backdrop-filter: blur(16px); position: relative; z-index: 4; }
.tabbar button { display: grid; justify-items: center; gap: 2px; padding: 7px 4px; color: #7f998b; font-size: 10px; border-radius: 12px; }
.tabbar button svg { width: 21px; height: 21px; }
.tabbar button.on { color: var(--gold); }
.tabbar button:active { background: rgba(255, 255, 255, .04); }

/* Capa de evento */
.overlay { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 18px; background: rgba(0, 6, 4, .72); backdrop-filter: blur(8px); animation: fade .3s both; }
.ov-fx, .cel-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ov-card { position: relative; width: min(400px, 100%); text-align: center; padding: 26px 22px 20px; border-radius: 26px; background: radial-gradient(ellipse at 50% 10%, #29472d, #071b14 65%); border: 1px solid rgba(214, 192, 130, .3); box-shadow: 0 30px 100px rgba(0, 0, 0, .7); isolation: isolate; animation: card-in .55s cubic-bezier(.2, .9, .25, 1.15) both; }
.ov-halo { position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: radial-gradient(rgba(235, 207, 118, .12), transparent 60%); pointer-events: none; }
#ov-art { width: 148px; height: 148px; object-fit: contain; display: block; margin: -4px auto 12px; filter: drop-shadow(0 12px 26px rgba(0, 0, 0, .6)); animation: art-in .7s cubic-bezier(.15, .7, .2, 1.2) both, float 4s ease-in-out .7s infinite; }
.ov-kicker { display: block; font-size: 9px; letter-spacing: 2.6px; color: #9bbd97; animation: caption .6s .12s both; }
.ov-card h2 { margin: 6px 0 0; font-size: 24px; letter-spacing: -.6px; color: #eddeb5; }
.ov-big { display: block; color: #f5e3a0; font-size: clamp(40px, 11vw, 64px); letter-spacing: -2px; line-height: 1.15; text-shadow: 0 4px 30px rgba(212, 174, 59, .3); animation: caption .6s .2s both; }
.ov-sub { font-size: 12.5px; color: #a7bea6; margin: 8px auto 12px; max-width: 300px; }
.ov-rows { display: grid; gap: 6px; margin: 0 auto 14px; max-width: 300px; }
.ov-rows:empty { display: none; }
.ov-row { display: flex; justify-content: space-between; font-size: 12px; color: #a7bea6; border-bottom: 1px solid var(--line); padding: 4px 0; }
.ov-row b { color: var(--cream); font-weight: 700; }
.ov-hint { display: block; margin-top: 12px; font-size: 9px; letter-spacing: 1.2px; }

/* GANASTE */
.cel { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; overflow: hidden; background: radial-gradient(ellipse at 50% 38%, rgba(40, 69, 45, .985), rgba(3, 20, 13, .995) 65%); animation: fade .35s both; }
.cel-rays { position: absolute; inset: -40%; background: repeating-conic-gradient(transparent 0deg 12deg, rgba(232, 202, 105, .07) 13deg 19deg, transparent 20deg 30deg); animation: rays 40s linear infinite; }
.cel[data-tier="3"] .cel-rays, .cel[data-tier="4"] .cel-rays, .cel[data-tier="5"] .cel-rays { background: repeating-conic-gradient(transparent 0deg 10deg, rgba(255, 220, 120, .12) 11deg 18deg, transparent 19deg 28deg); animation-duration: 22s; }
.cel-flash { position: absolute; inset: 0; background: radial-gradient(circle at 50% 42%, rgba(255, 244, 200, .85), transparent 55%); opacity: 0; pointer-events: none; }
.cel-flash.go { animation: flash .7s ease-out; }
.cel-copy { position: relative; z-index: 2; width: min(460px, 100%); text-align: center; display: grid; justify-items: center; }
.cel-art { width: min(170px, 38vw); height: auto; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .6)); animation: art-in .7s cubic-bezier(.15, .7, .2, 1.25) both, party .9s ease-in-out .7s infinite; }
.cel-crown { color: #ebce87; font-size: 15px; letter-spacing: 10px; margin: 2px 0 2px 10px; }
.cel-word { font-size: clamp(30px, 9vw, 52px); font-weight: 800; letter-spacing: 6px; color: #f3e1a3; text-shadow: 0 4px 26px rgba(212, 174, 59, .45); animation: word-in .6s cubic-bezier(.2, .9, .25, 1.3) both; }
.cel-amount { display: block; font-size: clamp(34px, 11vw, 70px); line-height: 1.15; letter-spacing: -2px; color: #fff0bf; margin: 6px 0 2px; white-space: nowrap; text-shadow: 0 4px 34px rgba(212, 174, 59, .5); }
.cel-amount.tick { animation: tick .16s ease-out; }
.cel-amount.done { animation: slam .55s cubic-bezier(.2, 1.6, .4, 1); }
.cel-tier { font-size: 13px; font-weight: 700; letter-spacing: 3px; color: #c9e7b6; text-transform: uppercase; min-height: 20px; }
.cel-tier.up { animation: caption .45s both; }
.cel-steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 10px 0 4px; }
.cel-steps li { width: 26px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .12); transition: background .3s; font-size: 0; }
.cel-steps li.on { background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); box-shadow: 0 0 10px rgba(255, 220, 120, .6); }
.cel-note { font-size: 9px; letter-spacing: 1.4px; color: #90a38a; margin: 6px 0 0; min-height: 13px; }
.share { margin-top: 6px; }
.share > p { font-size: 11px; color: #bacbb2; margin: 8px 0; }
.share-buttons { display: flex; justify-content: center; gap: 12px; }
.share-buttons button { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .05); border: 1px solid rgba(230, 217, 161, .2); color: #e4e5c9; transition: transform .15s, background .15s; }
.share-buttons button:hover { background: rgba(231, 206, 119, .14); transform: translateY(-2px); }
.share-buttons svg { width: 20px; height: 20px; }
.share-status { font-size: 10px; color: #a8b79f; min-height: 14px; margin: 4px auto 0; max-width: 300px; }
#cel-btn { margin-top: 14px; }
.cel-hint { margin-top: 8px; }
.cel.done .cel-amount { color: #fff6d6; }

/* Diálogos */
dialog { width: min(560px, calc(100vw - 24px)); max-height: 86dvh; overflow: auto; border: 1px solid rgba(214, 192, 130, .25); border-radius: 22px; padding: 22px 18px 18px; background: #071c15; color: #d1ddcf; box-shadow: 0 30px 100px rgba(0, 0, 0, .75); font-size: 13px; line-height: 1.7; }
dialog[open] { animation: card-in .35s cubic-bezier(.2, .9, .25, 1.1) both; }
dialog::backdrop { background: rgba(0, 0, 0, .7); backdrop-filter: blur(8px); }
dialog h2 { margin: 0 0 10px; font-size: 20px; color: #eddeb5; }
.dlg-note { font-size: 11.5px; color: var(--muted); margin: 6px 0; }
.dlg-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.dlg-actions.one > * { flex: 1; }
.dlg-actions .btn-ghost, .dlg-actions .btn-gold { flex: 1; min-width: 130px; }
.bet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.bet-grid button { min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); font-weight: 700; }
.bet-grid button[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); background: rgba(235, 202, 123, .08); }
.paytable { display: grid; gap: 4px; margin: 6px 0 12px; }
.pt { display: grid; grid-template-columns: 44px repeat(3, 1fr); gap: 6px; align-items: center; font-size: 12px; padding: 3px 4px; border-radius: 10px; background: rgba(255, 255, 255, .025); }
.pt img { width: 40px; height: 40px; object-fit: contain; }
.pt b { text-align: right; font-weight: 700; color: var(--cream); }
.pt-h { background: none; color: var(--muted); font-size: 10px; }
.pt-h span { text-align: right; } .pt-h span:first-child { text-align: left; }
.rules-text p { margin: 0 0 9px; }
.rules-text b { color: var(--gold); font-weight: 700; }
.hist { display: grid; gap: 8px; }
.hist button { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; text-align: left; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .025); }
.hist .w { color: var(--gold); font-weight: 700; text-align: right; } .hist .l { color: var(--muted); text-align: right; }
.hist small { letter-spacing: .4px; text-transform: none; }
.hist small.v { text-align: right; } .hist small.v.ok { color: var(--green); }
.hist-empty { color: var(--muted); text-align: center; }
#round-detail table { width: 100%; border-collapse: collapse; font-size: 12px; margin: 6px 0; }
#round-detail td, #round-detail th { padding: 5px 4px; border-bottom: 1px solid var(--line); text-align: left; }
#round-detail td.n { text-align: right; font-variant-numeric: tabular-nums; }
#round-detail h4 { margin: 14px 0 4px; color: var(--gold); font-size: 13px; }
#round-detail code { display: block; word-break: break-all; font-size: 11px; color: #cfd6df; background: rgba(0, 0, 0, .3); padding: 6px 8px; border-radius: 8px; }
#round-detail .ok { color: var(--green); } #round-detail .bad { color: #ff9b85; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.set-row.col { display: grid; justify-content: stretch; }
.set-row input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--gold); }
.set-row input[type="range"] { width: 50%; accent-color: var(--gold); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.seg button { min-height: 40px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); font-size: 12px; }
.seg button[aria-checked="true"] { border-color: var(--gold); color: var(--gold); background: rgba(235, 202, 123, .08); }
#set-recargar { width: 100%; margin-top: 12px; }

/* ───────────── Animaciones ───────────── */
@keyframes float { 50% { transform: translateY(-6px); } }
@keyframes emblem { 50% { transform: translateY(-4px) rotate(-3deg); filter: drop-shadow(0 8px 22px rgba(120, 255, 160, .35)); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.98); } }
@keyframes bump { 40% { transform: scale(1.12); filter: brightness(1.4); } }
@keyframes win-flash { 40% { transform: scale(1.12); filter: brightness(1.6); } }
@keyframes shake { 20% { transform: translate(-4px, 2px); } 40% { transform: translate(4px, -2px); } 60% { transform: translate(-3px, 1px); } 80% { transform: translate(2px, -1px); } }
@keyframes halo { 50% { opacity: .35; transform: scale(.9); } }
@keyframes win-pulse { 50% { transform: scale(1.1); filter: brightness(1.18) drop-shadow(0 0 10px rgba(255, 220, 120, .8)); } }
@keyframes ring { 50% { opacity: .55; } }
@keyframes mult-in { from { transform: scale(.2) rotate(-120deg); filter: brightness(2.2); } }
@keyframes reel { from { transform: translateY(-50%); } to { transform: translateY(0); } }
@keyframes pop { 0% { opacity: 0; transform: translate(-50%, -20%) scale(.6); } 18% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); } 70% { opacity: 1; transform: translate(-50%, -85%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -120%) scale(.96); } }
@keyframes hop { 40% { transform: translateY(-14px) scale(1.04); } 70% { transform: translateY(2px) scale(.99); } }
@keyframes party { 25% { transform: rotate(-4deg) scale(1.05); } 75% { transform: rotate(4deg) scale(1.05); } }
@keyframes sulk { 40% { transform: translateY(5px) scale(.98); } }
@keyframes tense { 50% { transform: translateY(-2px) scale(1.01); } }
@keyframes smoke { 0% { opacity: 0; transform: translate(0, 0) scale(.4); } 15% { opacity: .6; } 55% { opacity: .22; transform: translate(-25%, -140%) scale(1.1); } 100% { opacity: 0; transform: translate(30%, -310%) scale(1.8); } }
@keyframes say { from { opacity: .3; transform: translateY(6px) scale(.97); } }
@keyframes spin-btn { to { transform: rotate(360deg); } }
@keyframes breathe-ring { 50% { border-color: rgba(255, 233, 160, .35); transform: scale(1.04); } }
@keyframes ripple { from { transform: scale(.8); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes card-in { from { opacity: 0; transform: translateY(16px) scale(.94); } }
@keyframes art-in { from { opacity: 0; transform: translateY(18px) scale(.7) rotate(-8deg); } }
@keyframes caption { from { opacity: 0; transform: translateY(8px); } }
@keyframes rays { to { transform: rotate(360deg); } }
@keyframes flash { 0% { opacity: 0; } 25% { opacity: .9; } 100% { opacity: 0; } }
@keyframes word-in { from { opacity: 0; transform: scale(1.6); letter-spacing: 18px; } }
@keyframes tick { 50% { transform: scale(1.04); } }
@keyframes slam { 0% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* ───────────── Pantallas medianas ───────────── */
@media (max-width: 1100px) {
  .stage { grid-template-columns: 130px minmax(0, 1fr) 160px; gap: 14px; padding: 10px 14px; }
  .speech { font-size: 11.5px; }
  .emblem img { width: 78px; height: 78px; }
}

/* ───────────── Celular (vertical) ───────────── */
@media (max-width: 820px), (max-aspect-ratio: 1/1) {
  :root { --tab-h: 58px; }
  .topbar { padding: calc(6px + env(safe-area-inset-top, 0px)) 10px 6px; gap: 8px; }
  .brand img { width: 32px; height: 32px; }
  .brand .brandword { font-size: 10px; }
  .bal strong { font-size: 14px; }
  .chip { display: none; }
  .icon-btn { width: 36px; height: 36px; }
  .stage { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "board board" "l r"; align-content: start; gap: 8px 10px; padding: 8px 10px 0; }
  .board-wrap { width: 100%; }
  .board-frame { padding: 6px; border-radius: 16px; }
  .board-top { padding: 0 4px 6px; min-height: 26px; }
  #round-win { font-size: 15px; }
  .status { min-height: 30px; padding-top: 6px; font-size: 10.5px; }
  .side-l { align-self: stretch; }
  .side-l .emblem, .side-title, .side-note { display: none; }
  .gauges { grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; height: 100%; }
  .gauge { padding: 7px 6px; border-radius: 12px; display: grid; align-content: center; }
  .gauge small { font-size: 7.5px; letter-spacing: .9px; }
  .gauge strong { font-size: 21px; }
  .g-bonus strong { font-size: 13.5px; }
  .side-r { display: flex; align-items: center; gap: 8px; }
  .portrait { width: 74px; height: 74px; flex: none; }
  .speech { display: none; }
  .controls { grid-template-columns: minmax(0, 1fr) auto 64px; grid-template-areas: "win bet spin" "quick quick spin"; gap: 6px 10px; width: calc(100% - 20px); margin: 6px auto 8px; padding: 10px 12px; border-radius: 18px; }
  .ctl-win { grid-area: win; min-width: 0; }
  .ctl-bet { grid-area: bet; }
  .spin { grid-area: spin; width: 64px; height: 64px; }
  .spin svg { width: 32px; height: 32px; }
  .ctl-quick { grid-area: quick; justify-content: flex-start; }
  .quick { grid-auto-flow: column; gap: 6px; min-width: 0; padding: 6px 12px; font-size: 10.5px; align-items: center; }
  .ctl strong { font-size: 15px; }
  .step { width: 30px; height: 30px; font-size: 16px; }
  .bet-val { min-width: 76px; height: 32px; font-size: 12.5px; }
}
/* Celular alto: el Pombero arriba (con su globo), el tablero al medio y los indicadores abajo. */
@media (max-width: 820px) and (min-height: 700px), (max-aspect-ratio: 1/1) and (min-height: 700px) {
  .stage { grid-template-columns: minmax(0, 1fr); grid-template-areas: "r" "board" "l"; align-content: space-evenly; gap: 8px; }
  .side-r { justify-content: center; gap: 10px; }
  .portrait { width: 82px; height: 82px; }
  .speech { display: block; margin: 0; max-width: 230px; text-align: left; font-size: 12px; line-height: 1.45; padding: 9px 13px; border-radius: 14px 14px 14px 4px; }
  .gauges { height: auto; }
  .gauge { padding: 9px 6px; }
}
@media (max-width: 360px) {
  .brand .brandword { display: none; }
  .gauge strong { font-size: 18px; }
  .portrait { width: 62px; height: 62px; }
  .bet-val { min-width: 64px; padding: 0 6px; }
  .controls { padding: 8px 10px; grid-template-columns: minmax(0, 1fr) auto 56px; grid-template-areas: "bet bet spin" "win quick spin"; }
  .ctl-bet .stepper { justify-content: flex-start; }
  .ctl-quick { justify-content: flex-end; }
  .quick span { display: none; }
  .quick { padding: 7px 9px; }
  .spin { width: 56px; height: 56px; }
}
/* Celular acostado / pantallas bajas */
@media (min-aspect-ratio: 1/1) and (max-height: 520px) {
  .topbar { padding-top: 4px; padding-bottom: 4px; }
  .stage { grid-template-columns: 120px minmax(0, 1fr) 120px; grid-template-areas: "l board r"; padding: 4px 10px 0; gap: 10px; }
  .emblem, .side-title, .side-note, .speech { display: none; }
  .gauges { gap: 6px; } .gauge { padding: 6px; } .gauge strong { font-size: 18px; }
  .controls { margin: 2px auto 4px; padding: 6px 12px; }
  .spin { width: 58px; height: 58px; }
  .tabbar button { padding: 4px; } .tabbar button span { display: none; }
}

/* ───────────── Movimiento reducido / animaciones suaves ───────────── */
.app.calm .sky-img, .app.calm .mist i, .app.calm .fireflies, .app.calm .cel-rays { animation: none; }
.app.calm .fireflies { display: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .fireflies, .cigar-smoke, .mist, .cel-rays, .reel-loop { display: none !important; }
}
