/* ==========================================================
   Fiu! — Identidad visual oficial
   Violeta #7031D4 · Naranja #FF951F · Blanco crema #FFF4E8
   ========================================================== */
:root {
  --violeta: #7031D4;
  --violeta-700: #5A22B4;
  --violeta-900: #2E1066;
  --violeta-100: #EDE3FB;
  --violeta-50: #F6F0FE;
  --naranja: #FF951F;
  --naranja-700: #E57A00;
  --naranja-100: #FFE8CC;
  --crema: #FFF4E8;
  --tinta: #24123F;
  --gris: #7A6E8C;
  --gris-claro: #E9E1F2;
  --ok: #1FA66A;
  --error: #E0413A;
  --radio: 20px;
  --radio-s: 14px;
  --sombra: 0 6px 20px rgba(46, 16, 102, .12);
  --sombra-fuerte: 0 12px 30px rgba(46, 16, 102, .25);
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --nav-h: 72px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  color: var(--tinta);
  background: var(--violeta-900);
  background-image: radial-gradient(circle at 20% 10%, #4a1ca0 0, transparent 45%), radial-gradient(circle at 90% 90%, #7031d4 0, transparent 40%);
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 16px; }
a { color: inherit; }

/* ---------- Escenario (desktop) ---------- */
.stage { min-height: 100%; display: flex; align-items: center; justify-content: center; gap: 56px; padding: 24px; }
.stage-side { color: var(--crema); max-width: 300px; }
.stage-logo { width: 220px; margin-bottom: 16px; }
.stage-slogan { font-size: 28px; font-weight: 800; margin: 0; }
.stage-sub { font-size: 18px; color: var(--naranja); font-weight: 700; margin: 6px 0 22px; }
.stage-note { opacity: .75; font-size: 14px; line-height: 1.5; }
.stage-links { display: grid; gap: 8px; margin-top: 18px; }
.stage-links a { text-decoration: none; background: rgba(255,255,255,.08); padding: 10px 14px; border-radius: 12px; font-weight: 600; }
.stage-links a:hover { background: rgba(255,255,255,.16); }

.phone {
  position: relative; width: 400px; height: 840px; max-height: calc(100vh - 48px);
  border-radius: 44px; overflow: hidden; background: var(--crema);
  box-shadow: 0 0 0 10px #160634, 0 30px 80px rgba(0,0,0,.5);
}
.phone.wide { width: min(1100px, calc(100vw - 380px)); border-radius: 24px; }

@media (max-width: 860px) {
  body { background: var(--crema); }
  .stage { padding: 0; display: block; }
  .stage-side { display: none; }
  .phone, .phone.wide { width: 100%; height: 100dvh; max-height: none; border-radius: 0; box-shadow: none; }
}

/* ---------- App ---------- */
.app { position: absolute; inset: 0; display: flex; flex-direction: column; }
.screen { flex: 1; overflow-y: auto; overflow-x: hidden; padding-bottom: 24px; animation: entrar .28s ease; scrollbar-width: thin; }
.screen.with-nav { padding-bottom: calc(var(--nav-h) + 20px); }
@keyframes entrar { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.pad { padding: 0 18px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.muted { color: var(--gris); }
.small { font-size: 13px; }
.tiny { font-size: 11px; }
.bold { font-weight: 700; }
.hide { display: none !important; }
.mt { margin-top: 14px; } .mt2 { margin-top: 24px; } .mb { margin-bottom: 14px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
h1 { font-size: 28px; font-weight: 900; }
h2 { font-size: 21px; font-weight: 800; }
h3 { font-size: 17px; font-weight: 700; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 18px 10px; }
.section-title a, .section-title button { color: var(--violeta); font-weight: 700; font-size: 14px; text-decoration: none; }

/* ---------- Topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px; background: var(--crema); }
.topbar.violeta { background: var(--violeta); color: var(--crema); }
.topbar h2 { font-size: 19px; flex: 1; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; background: #fff; box-shadow: var(--sombra); flex: none; position: relative; }
.topbar.violeta .icon-btn { background: rgba(255,255,255,.15); box-shadow: none; color: #fff; }
.badge-dot { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--naranja); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; padding: 0 4px; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 22px; border-radius: 999px; font-weight: 800; font-size: 16px; transition: transform .12s, filter .12s; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--naranja); color: #fff; box-shadow: 0 8px 18px rgba(255,149,31,.4); }
.btn-violeta { background: var(--violeta); color: #fff; box-shadow: 0 8px 18px rgba(112,49,212,.35); }
.btn-ghost { background: #fff; color: var(--violeta); box-shadow: var(--sombra); }
.btn-outline { border: 2px solid var(--violeta); color: var(--violeta); }
.btn-crema { background: var(--crema); color: var(--violeta); }
.btn-block { width: 100%; }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- Tarjetas ---------- */
.card { background: #fff; border-radius: var(--radio); box-shadow: var(--sombra); padding: 16px; }
.card + .card { margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #fff; font-weight: 600; font-size: 13px; box-shadow: var(--sombra); white-space: nowrap; }
.chip.on { background: var(--violeta); color: #fff; }
.tag { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; background: var(--naranja-100); color: var(--naranja-700); }
.tag.violeta { background: var(--violeta-100); color: var(--violeta); }
.tag.verde { background: #DDF5E9; color: var(--ok); }
.tag.gris { background: var(--gris-claro); color: var(--gris); }
.hscroll { display: flex; gap: 12px; overflow-x: auto; padding: 4px 18px 10px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex: none; }

/* ---------- Logo ---------- */
.logo-mark { height: 30px; width: auto; }

/* ---------- Bienvenida ---------- */
.splash { position: absolute; inset: 0; background: var(--violeta); color: var(--crema); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; overflow: hidden; }
.splash .speed { position: absolute; height: 10px; border-radius: 6px; background: var(--naranja); opacity: .25; animation: zum 1.6s linear infinite; }
@keyframes zum { from { transform: translateX(-120%); } to { transform: translateX(520px); } }
.splash .logo { width: 230px; animation: pop .6s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.splash .mascota { width: 290px; margin: 18px 0 6px; animation: corre 1.2s ease-in-out infinite alternate; }
@keyframes corre { from { transform: translateY(0) rotate(-1deg); } to { transform: translateY(-10px) rotate(1deg); } }
.splash h1 { font-size: 30px; text-align: center; }
.splash p { color: var(--naranja); font-weight: 700; font-size: 18px; margin: 8px 0 28px; }

.onb-dots { display: flex; gap: 6px; justify-content: center; margin: 14px 0; }
.onb-dots i { width: 8px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.35); transition: width .2s; }
.onb-dots i.on { width: 22px; background: var(--naranja); }

/* ---------- Formularios ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 700; font-size: 14px; }
.input { height: 52px; border-radius: 16px; border: 2px solid var(--gris-claro); padding: 0 16px; background: #fff; outline: none; transition: border-color .15s; width: 100%; }
.input:focus { border-color: var(--violeta); }
textarea.input { height: 84px; padding: 12px 16px; resize: none; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--gris); font-size: 13px; margin: 16px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--gris-claro); }

.option { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: #fff; border: 2px solid transparent; box-shadow: var(--sombra); cursor: pointer; margin-bottom: 10px; }
.option.on { border-color: var(--violeta); background: var(--violeta-50); }
.option .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--violeta-100); display: grid; place-items: center; font-size: 22px; flex: none; }
.radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--gris-claro); flex: none; }
.option.on .radio { border: 7px solid var(--violeta); }

.seg { display: flex; background: var(--violeta-100); border-radius: 999px; padding: 4px; }
.seg button { flex: 1; height: 42px; border-radius: 999px; font-weight: 700; color: var(--violeta); }
.seg button.on { background: var(--violeta); color: #fff; box-shadow: var(--sombra); }

/* ---------- Home ---------- */
.home-head { background: var(--violeta); color: var(--crema); padding: 14px 18px 64px; border-radius: 0 0 32px 32px; position: relative; overflow: hidden; }
.home-head .addr { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.home-head .addr small { opacity: .7; font-weight: 500; display: block; font-size: 11px; }
.home-head .hello { font-size: 24px; font-weight: 800; margin: 14px 0 2px; max-width: 62%; }
.home-head .hello span { color: var(--naranja); }
.home-head .hero-pet { position: absolute; right: -14px; bottom: 6px; width: 170px; animation: corre 1.4s ease-in-out infinite alternate; }
.coins-pill { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.15); padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: 14px; }
.coin { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FFD08A, var(--naranja) 60%, var(--naranja-700)); color: #fff; font-size: 11px; font-weight: 900; box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); flex: none; }
.coin.lg { width: 30px; height: 30px; font-size: 15px; }

.search { margin: -34px 18px 0; position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 18px; padding: 0 16px; height: 56px; box-shadow: var(--sombra-fuerte); }
.search input { border: 0; outline: 0; flex: 1; height: 100%; background: transparent; }

.cat { width: 78px; text-align: center; }
.cat .ic { width: 66px; height: 66px; margin: 0 auto 6px; border-radius: 22px; display: grid; place-items: center; font-size: 32px; background: #fff; box-shadow: var(--sombra); transition: transform .15s; }
.cat.on .ic { background: var(--violeta); transform: scale(1.06); }
.cat span { font-size: 12px; font-weight: 700; }

.promo-banner { width: 300px; height: 140px; border-radius: 22px; padding: 16px; color: #fff; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--sombra); }
.promo-banner h3 { font-size: 20px; font-weight: 900; max-width: 62%; }
.promo-banner p { margin: 0; font-size: 13px; opacity: .92; max-width: 62%; }
.promo-banner .big-emoji { position: absolute; right: 8px; bottom: 4px; font-size: 76px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.2)); }
.promo-banner img.pet { position: absolute; right: -10px; bottom: -6px; width: 150px; }

/* Food visual ("foto" ilustrada) */
.food { position: relative; overflow: hidden; display: grid; place-items: center; }
.food .em { font-size: 64px; filter: drop-shadow(0 10px 10px rgba(0,0,0,.25)); transform: rotate(-6deg); }
.food::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.35), transparent 50%); pointer-events: none; }

.store-card { width: 250px; background: #fff; border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra); cursor: pointer; }
.store-card .food { height: 120px; }
.store-card .body { padding: 12px 14px 14px; }
.store-card.closed .food { filter: grayscale(.85); opacity: .7; }
.store-row { display: flex; gap: 12px; background: #fff; border-radius: var(--radio); padding: 10px; box-shadow: var(--sombra); margin: 0 18px 12px; cursor: pointer; position: relative; }
.store-row .food { width: 86px; height: 86px; border-radius: 16px; flex: none; }
.store-row .food .em { font-size: 44px; }
.store-row.closed .food { filter: grayscale(.85); opacity: .7; }
.meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--gris); font-weight: 600; margin-top: 4px; }
.fav-btn { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: var(--sombra); font-size: 16px; z-index: 2; }
.fiumba-peek { position: absolute; width: 74px; bottom: -6px; right: 40px; animation: asoma 2s ease-in-out infinite; cursor: pointer; z-index: 3; }
@keyframes asoma { 0%,100% { transform: translateY(18px); } 50% { transform: translateY(0); } }

/* ---------- Comercio ---------- */
.store-hero { height: 210px; position: relative; }
.store-hero .food .em { font-size: 110px; }
.store-hero .back { position: absolute; top: 14px; left: 14px; z-index: 3; }
.store-hero .fav { position: absolute; top: 14px; right: 14px; z-index: 3; }
.store-info { background: var(--crema); margin-top: -28px; border-radius: 28px 28px 0 0; position: relative; padding: 18px 18px 6px; }
.store-logo { width: 68px; height: 68px; border-radius: 20px; display: grid; place-items: center; font-size: 34px; margin-top: -54px; box-shadow: var(--sombra-fuerte); border: 4px solid var(--crema); }
.product { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--gris-claro); cursor: pointer; }
.product .food { width: 92px; height: 92px; border-radius: 18px; flex: none; }
.product .food .em { font-size: 46px; }
.product.off { opacity: .45; pointer-events: none; }
.price { font-weight: 800; color: var(--violeta); }
.old-price { text-decoration: line-through; color: var(--gris); font-size: 13px; margin-left: 6px; }
.tabs-sticky { position: sticky; top: 0; z-index: 4; background: var(--crema); padding: 10px 0; }

/* ---------- Sheet / Modal ---------- */
.overlay { position: absolute; inset: 0; background: rgba(36,18,63,.5); z-index: 50; display: flex; align-items: flex-end; animation: fade .2s; }
.overlay.middle { align-items: center; justify-content: center; padding: 20px; }
@keyframes fade { from { opacity: 0; } }
.sheet { background: var(--crema); width: 100%; max-height: 88%; overflow-y: auto; border-radius: 28px 28px 0 0; padding: 10px 18px 22px; animation: sube .28s cubic-bezier(.2,.9,.3,1.1); }
.sheet::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--gris-claro); margin: 0 auto 12px; }
@keyframes sube { from { transform: translateY(100%); } }
.dialog { background: var(--crema); border-radius: 28px; padding: 22px; width: 100%; max-width: 360px; text-align: center; animation: pop .35s cubic-bezier(.2,1.4,.4,1); }
.qty { display: inline-flex; align-items: center; gap: 4px; background: #fff; border-radius: 999px; box-shadow: var(--sombra); padding: 4px; }
.qty button { width: 34px; height: 34px; border-radius: 50%; background: var(--violeta-100); color: var(--violeta); font-size: 20px; font-weight: 800; }
.qty span { min-width: 26px; text-align: center; font-weight: 800; }

/* ---------- Carrito flotante ---------- */
.cart-fab { position: absolute; left: 14px; right: 14px; bottom: calc(var(--nav-h) + 10px); z-index: 20; height: 58px; border-radius: 18px; background: var(--violeta); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; font-weight: 800; box-shadow: var(--sombra-fuerte); animation: sube .3s; }
.cart-fab.no-nav { bottom: 14px; }
.cart-fab .n { background: var(--naranja); border-radius: 10px; padding: 3px 9px; margin-right: 8px; }

/* ---------- Bottom nav ---------- */
.bottom-nav { position: absolute; left: 0; right: 0; bottom: 0; height: var(--nav-h); background: #fff; display: flex; justify-content: space-around; align-items: center; border-radius: 24px 24px 0 0; box-shadow: 0 -6px 24px rgba(46,16,102,.1); z-index: 30; padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav a { text-decoration: none; display: grid; justify-items: center; gap: 2px; font-size: 11px; font-weight: 700; color: var(--gris); width: 64px; }
.bottom-nav a .i { font-size: 22px; transition: transform .2s; }
.bottom-nav a.on { color: var(--violeta); }
.bottom-nav a.on .i { transform: translateY(-3px) scale(1.15); }
.bottom-nav a.play .i { width: 52px; height: 52px; margin-top: -30px; border-radius: 50%; display: grid; place-items: center; background: var(--naranja); color: #fff; box-shadow: 0 8px 18px rgba(255,149,31,.5); border: 4px solid #fff; }

/* ---------- Mascota / globos ---------- */
.bubble { position: relative; background: #fff; border-radius: 18px; padding: 12px 14px; font-weight: 700; box-shadow: var(--sombra); }
.bubble::after { content: ""; position: absolute; left: 24px; bottom: -8px; border: 8px solid transparent; border-top-color: #fff; border-bottom: 0; }
.mascot-line { display: flex; align-items: flex-end; gap: 10px; }
.mascot-line img { width: 92px; flex: none; }

/* ---------- Seguimiento ---------- */
.track-map { height: 230px; position: relative; overflow: hidden; background: #EFE6F9; }
.track-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.track-rider { position: absolute; width: 74px; transition: left 1.2s ease, top 1.2s ease; transform: translate(-50%, -80%); filter: drop-shadow(0 6px 6px rgba(0,0,0,.25)); }
.pin { position: absolute; transform: translate(-50%, -100%); font-size: 28px; }
.steps { position: relative; margin: 6px 0; }
.step { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; position: relative; }
.step .dot { width: 28px; height: 28px; border-radius: 50%; background: var(--gris-claro); display: grid; place-items: center; font-size: 13px; color: #fff; flex: none; z-index: 1; transition: background .3s; }
.step.done .dot { background: var(--violeta); }
.step.now .dot { background: var(--naranja); box-shadow: 0 0 0 6px rgba(255,149,31,.25); animation: late 1.2s infinite; }
@keyframes late { 50% { box-shadow: 0 0 0 10px rgba(255,149,31,.1); } }
.step:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 36px; bottom: -8px; width: 2px; background: var(--gris-claro); }
.step.done:not(:last-child)::before { background: var(--violeta); }
.step .t { font-weight: 700; }
.step:not(.done):not(.now) .t { color: var(--gris); }
.progress { height: 10px; border-radius: 5px; background: var(--violeta-100); overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--violeta), var(--naranja)); border-radius: 5px; transition: width .6s; }
.mini-track { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 40; background: var(--violeta); color: #fff; border-radius: 16px; padding: 8px 12px; display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; box-shadow: var(--sombra-fuerte); cursor: pointer; }
.mini-track img { width: 38px; }

/* ---------- Gamificación ---------- */
.play-head { background: linear-gradient(160deg, var(--violeta), var(--violeta-900)); color: #fff; padding: 16px 18px 26px; border-radius: 0 0 30px 30px; position: relative; overflow: hidden; }
.game-card { border-radius: 22px; padding: 14px; color: #fff; position: relative; overflow: hidden; min-height: 170px; cursor: pointer; box-shadow: var(--sombra); display: flex; flex-direction: column; justify-content: space-between; }
.game-card h3, .game-card p, .game-card .tag { position: relative; z-index: 1; text-shadow: 0 1px 6px rgba(0,0,0,.25); }
.game-card h3 { font-size: 18px; font-weight: 900; max-width: 80%; }
.game-card p { margin: 4px 0 8px; font-size: 12px; opacity: .95; max-width: 78%; }
.game-card .art { position: absolute; right: -8px; bottom: -6px; width: 92px; opacity: .95; }
.game-card .em { position: absolute; right: 8px; bottom: 4px; font-size: 48px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { background: rgba(255,255,255,.14); border-radius: 16px; padding: 10px 12px; }
.stat b { display: block; font-size: 20px; }
.stat span { font-size: 11px; opacity: .8; font-weight: 600; }

.game-wrap { position: absolute; inset: 0; background: var(--violeta-900); color: #fff; display: flex; flex-direction: column; z-index: 60; }
.game-hud { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px; }
.game-hud .pill { background: rgba(255,255,255,.14); border-radius: 999px; padding: 6px 12px; font-weight: 800; font-size: 14px; }
.game-canvas { flex: 1; position: relative; touch-action: none; overflow: hidden; }
.game-canvas canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.game-over { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(36,18,63,.75); z-index: 5; padding: 20px; animation: fade .3s; }
.game-over .dialog { color: var(--tinta); }

.rank-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border-radius: 16px; margin-bottom: 8px; box-shadow: var(--sombra); }
.rank-row.me { background: var(--violeta-50); border: 2px solid var(--violeta); }
.rank-pos { width: 30px; font-weight: 900; font-size: 18px; color: var(--violeta); text-align: center; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; flex: none; font-size: 15px; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; margin: 10px 0 4px; }
.podium .p { text-align: center; width: 96px; }
.podium .base { border-radius: 16px 16px 0 0; display: grid; place-items: center; font-size: 28px; font-weight: 900; color: #fff; }

.reward { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 18px; padding: 12px; box-shadow: var(--sombra); margin-bottom: 10px; }
.reward .ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; background: var(--naranja-100); flex: none; }
.coupon { display: flex; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: var(--sombra); margin-bottom: 10px; }
.coupon .l { width: 92px; background: var(--violeta); color: #fff; display: grid; place-items: center; text-align: center; font-weight: 900; font-size: 20px; padding: 8px; position: relative; }
.coupon .l::after { content: ""; position: absolute; right: -8px; top: 0; bottom: 0; width: 16px; background: radial-gradient(circle at 8px 8px, var(--crema) 6px, transparent 6.5px) 0 0 / 16px 16px repeat-y; }
.coupon .r { padding: 12px 14px 12px 18px; flex: 1; }
.coupon.used { opacity: .5; }

/* Mascota virtual */
.pet-stage { position: relative; height: 350px; border-radius: 0 0 32px 32px; overflow: hidden; transition: background .4s; }
.pet-figure { position: absolute; left: 58%; bottom: 22px; width: 250px; transform: translateX(-50%); cursor: pointer; }
.pet-figure .layer { position: absolute; }
.pet-figure .base { position: relative; width: 100%; }
.pet-figure.bounce { animation: salto .6s; }
@keyframes salto { 30% { transform: translateX(-50%) translateY(-24px) scale(1.04); } 60% { transform: translateX(-50%) translateY(0) scale(.98); } }
.pet-acc { position: absolute; font-size: 54px; pointer-events: none; filter: drop-shadow(0 4px 4px rgba(0,0,0,.2)); }
.pet-buddy { position: absolute; width: 120px; left: 4px; bottom: 8px; z-index: 2; animation: corre 1s ease-in-out infinite alternate; }
.meter { display: grid; gap: 4px; }
.meter .bar { height: 10px; border-radius: 5px; background: var(--violeta-100); overflow: hidden; }
.meter .bar i { display: block; height: 100%; border-radius: 5px; }
.item-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.item { background: #fff; border-radius: 16px; aspect-ratio: 1; display: grid; place-items: center; font-size: 30px; box-shadow: var(--sombra); position: relative; border: 2px solid transparent; }
.item.on { border-color: var(--violeta); background: var(--violeta-50); }
.item.locked { filter: grayscale(1); opacity: .5; }
.item .cost { position: absolute; bottom: 3px; font-size: 10px; font-weight: 800; color: var(--naranja-700); }
.item .swatch { width: 34px; height: 34px; border-radius: 50%; box-shadow: inset 0 -3px 0 rgba(0,0,0,.2); }
.lock-ov { position: absolute; top: 3px; right: 5px; font-size: 12px; }

/* Álbum */
.sticker { aspect-ratio: 3/4; border-radius: 16px; background: #fff; box-shadow: var(--sombra); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 6px; position: relative; overflow: hidden; }
.sticker .em { font-size: 34px; }
.sticker b { font-size: 11px; line-height: 1.1; margin-top: 4px; }
.sticker.missing { background: repeating-linear-gradient(45deg, var(--violeta-50), var(--violeta-50) 8px, #fff 8px, #fff 16px); box-shadow: none; border: 2px dashed var(--violeta-100); color: var(--gris); }
.sticker.missing .em { filter: grayscale(1) brightness(1.6); opacity: .35; }
.sticker.special { background: linear-gradient(160deg, var(--violeta), var(--naranja)); color: #fff; }
.sticker.limited::before { content: "EDICIÓN LIMITADA"; position: absolute; top: 6px; font-size: 7px; font-weight: 900; background: var(--naranja); color: #fff; padding: 2px 5px; border-radius: 6px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

/* Fiumba */
.fiumba-head { background: linear-gradient(160deg, var(--naranja), #FF6F3C); color: #fff; padding: 16px 18px 20px; border-radius: 0 0 30px 30px; position: relative; overflow: hidden; }
.fiumba-head img { width: 220px; margin: 0 auto; animation: corre 1s ease-in-out infinite alternate; }
.locked-box { text-align: center; padding: 26px 18px; }
.locked-box img { width: 230px; margin: 0 auto; filter: brightness(0) opacity(.25); }
.locked-box.unlocking img { animation: revela 1.4s forwards; }
@keyframes revela { to { filter: none; transform: scale(1.06); } }

/* Toasts */
#toast-root { position: absolute; left: 0; right: 0; top: 12px; z-index: 100; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 14px; }
.toast { background: var(--tinta); color: #fff; border-radius: 16px; padding: 10px 14px; font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 10px; box-shadow: var(--sombra-fuerte); animation: toast 3.2s forwards; max-width: 100%; }
.toast img { width: 36px; }
@keyframes toast { 0% { opacity: 0; transform: translateY(-20px); } 10%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-10px); } }

.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 120; overflow: hidden; }
.confetti i { position: absolute; top: -10px; width: 8px; height: 14px; border-radius: 2px; animation: cae 1.8s ease-in forwards; }
@keyframes cae { to { transform: translateY(900px) rotate(720deg); opacity: .8; } }

.empty { text-align: center; padding: 30px 24px; }
.empty img { width: 170px; margin: 0 auto 12px; }

.notif { display: flex; gap: 12px; padding: 14px; background: #fff; border-radius: 16px; box-shadow: var(--sombra); margin-bottom: 10px; }
.notif.unread { border-left: 4px solid var(--naranja); }
.notif .ic { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--violeta-100); display: grid; place-items: center; flex: none; font-size: 22px; }
.notif .ic img { width: 140%; max-width: none; }

.stars { color: var(--naranja); letter-spacing: 1px; }
.star-pick button { font-size: 34px; color: var(--gris-claro); }
.star-pick button.on { color: var(--naranja); }

.list-item { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--gris-claro); text-decoration: none; cursor: pointer; }
.list-item .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--violeta-100); display: grid; place-items: center; font-size: 20px; flex: none; }
.list-item::after { content: "›"; margin-left: auto; color: var(--gris); font-size: 22px; }

/* ---------- Paneles (comercio / admin) ---------- */
.panel { display: flex; height: 100%; background: #F7F3FC; }
.panel-side { width: 220px; background: var(--violeta); color: #fff; padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; flex: none; overflow-y: auto; }
.panel-side img { width: 110px; margin: 0 8px 16px; }
.panel-side button { text-align: left; padding: 10px 12px; border-radius: 12px; font-weight: 600; color: rgba(255,255,255,.85); }
.panel-side button.on, .panel-side button:hover { background: rgba(255,255,255,.15); color: #fff; }
.panel-main { flex: 1; overflow-y: auto; padding: 22px; }
.panel-main h1 { font-size: 24px; margin-bottom: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: #fff; border-radius: 18px; padding: 14px 16px; box-shadow: var(--sombra); }
.kpi b { display: block; font-size: 24px; color: var(--violeta); }
.kpi span { font-size: 12px; color: var(--gris); font-weight: 600; }
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--sombra); font-size: 14px; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--gris-claro); }
.table th { background: var(--violeta-50); font-size: 12px; text-transform: uppercase; color: var(--gris); }
.switch { width: 46px; height: 26px; border-radius: 13px; background: var(--gris-claro); position: relative; transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch.on { background: var(--ok); }
.switch.on::after { left: 23px; }
.order-card { background: #fff; border-radius: 18px; padding: 14px; box-shadow: var(--sombra); margin-bottom: 12px; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 140px; padding: 10px; background: #fff; border-radius: 16px; box-shadow: var(--sombra); }
.bars div { flex: 1; background: linear-gradient(var(--naranja), var(--violeta)); border-radius: 8px 8px 0 0; position: relative; }
.bars div span { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font-size: 10px; color: var(--gris); }
@media (max-width: 860px) {
  .panel { flex-direction: column; }
  .panel-side { width: 100%; flex-direction: row; overflow-x: auto; padding: 10px; }
  .panel-side img { display: none; }
  .panel-side button { white-space: nowrap; }
  .panel-main { padding: 14px; }
  .table { font-size: 12px; }
}
