/* Shared styles for casheteo.com — palette and type from the Ca$heteo World design */
:root {
  --verde-osc: #0E2A1D;
  --verde: #133A28;
  --menta: #75E0C1;
  --menta-clara: #DDF5EC;
  --oro: #FFCF0A;
  --rosa: #E8457A;
  --crema: #F4F1DE;
  --texto-suave: #3B5246;
  --exito: #1E7A34;
  --error: #B3261E;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--crema); font-family: Archivo, system-ui, sans-serif; color: var(--verde-osc); overflow-x: hidden; }
img { max-width: 100%; }
input, select, textarea, button { max-width: 100%; }
[hidden] { display: none !important; }

.oculto-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header: wraps cleanly on phones */
header nav a[aria-current="page"] { color: var(--oro) !important; }
header nav a[href="/billete"][aria-current="page"] { color: var(--verde-osc) !important; box-shadow: 0 0 0 3px var(--menta); }
/* (el header del celular está más abajo, en «App en el celular») */

/* Status messages */
.aviso { margin: 0; padding: 12px 14px; border-radius: 12px; font-size: 15px; line-height: 1.45; font-weight: 600; }
.aviso.ok { background: #DFF6E4; color: var(--exito); border: 2px solid var(--exito); }
.aviso.mal { background: #FCE4E2; color: var(--error); border: 2px solid var(--error); }
.aviso.info { background: var(--menta-clara); color: var(--verde); border: 2px solid var(--verde); }

button[disabled], a[aria-disabled="true"] { opacity: .55; cursor: not-allowed !important; }
button.cargando { position: relative; color: transparent !important; }
button.cargando::after { content: ""; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--oro); border-right-color: transparent; animation: gira .7s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* Empty / loading states for live lists */
.vacio { grid-column: 1 / -1; background: #FFFFFF; border: 2px dashed var(--verde); border-radius: 18px; padding: 28px; text-align: center; color: var(--texto-suave); font-size: 16px; line-height: 1.5; }
.esqueleto { grid-column: 1 / -1; height: 120px; border-radius: 18px; background: linear-gradient(90deg, #E9EFE9 0%, #F6F8F4 50%, #E9EFE9 100%); background-size: 200% 100%; animation: brillo 1.2s ease-in-out infinite; }
@keyframes brillo { to { background-position: -200% 0; } }

/* Account dialog */
.modal-fondo { position: fixed; inset: 0; background: rgba(14, 42, 29, .65); display: flex; align-items: flex-start; justify-content: center; padding: 24px 16px; z-index: 50; overflow-y: auto; }
.modal { width: 100%; max-width: 440px; margin: auto 0; background: #FFFFFF; border: 3px solid var(--verde); border-radius: 24px; padding: 26px; box-shadow: 8px 8px 0 var(--verde); display: flex; flex-direction: column; gap: 14px; position: relative; }
.modal h2 { margin: 0; font-family: Ultra, Georgia, serif; font-weight: 400; font-size: 28px; color: var(--verde); padding-right: 36px; }
.modal p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--texto-suave); }
.modal .cerrar { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--verde); background: #FFFFFF; color: var(--verde); font-size: 22px; line-height: 1; cursor: pointer; }
.pestanas { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--menta-clara); border-radius: 999px; padding: 4px; }
.pestanas button { font: inherit; font-weight: 800; font-size: 15px; border: 0; border-radius: 999px; padding: 10px; background: transparent; color: var(--verde); cursor: pointer; }
.pestanas button[aria-selected="true"] { background: var(--verde); color: var(--oro); }

/* Form controls shared by the dialog and the profile page */
.campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.campo label { font-weight: 700; font-size: 14px; }
.campo input, .campo select { font: inherit; font-size: 17px; padding: 13px 14px; border: 2px solid var(--texto-suave); border-radius: 12px; background: #FFFFFF; color: var(--verde-osc); width: 100%; }
.campo input:focus, .campo select:focus, input:focus, select:focus { outline: 3px solid var(--oro); outline-offset: 1px; }
.btn { font: inherit; font-weight: 800; font-size: 17px; background: var(--verde); color: var(--oro); border: 0; border-radius: 999px; padding: 15px 22px; cursor: pointer; text-align: center; text-decoration: none; display: inline-block; }
.btn.oro { background: var(--oro); color: var(--verde-osc); border: 2px solid var(--verde-osc); }
.btn.borde { background: transparent; color: var(--verde); border: 2px solid var(--verde); padding: 11px 18px; font-size: 15px; }
.enlace { font: inherit; font-weight: 700; font-size: 15px; background: transparent; color: var(--verde); border: 0; text-decoration: underline; padding: 6px 0; cursor: pointer; align-self: flex-start; }

/* Profile page */
.perfil-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.tarjeta { background: #FFFFFF; border: 3px solid var(--verde); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tarjeta h2 { margin: 0; font-size: 22px; font-weight: 800; }
.lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.lista li { border: 2px solid var(--menta-clara); border-radius: 14px; padding: 12px 14px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; font-size: 15px; line-height: 1.4; }
.lista li strong { font-size: 16px; }
.chip { display: inline-block; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--menta-clara); color: var(--verde); white-space: nowrap; }
.chip.oro { background: var(--oro); color: var(--verde-osc); }
.chip.rosa { background: var(--rosa); color: #FFFFFF; }
.codigo-grande { font-family: Ultra, Georgia, serif; letter-spacing: 2px; color: var(--verde); }

/* Scratch card page */
.raspa-carta { position: relative; width: 100%; aspect-ratio: 34 / 30; border-radius: 16px; overflow: hidden; background: #FFFFFF; border: 2px solid var(--verde); }
.raspa-carta canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- Portal del comercio ---- */
.servicios-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.servicio { display: flex; gap: 12px; align-items: flex-start; border: 2px solid var(--menta-clara); border-radius: 16px; padding: 14px; cursor: pointer; background: #FFFFFF; }
.servicio:hover { border-color: var(--verde); }
.servicio input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--verde); }
.servicio:has(input:checked) { border-color: var(--verde); background: var(--menta-clara); }
.servicio-cuerpo { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.servicio-precio { font-family: Ultra, Georgia, serif; font-size: 20px; color: var(--verde); }
.detalle-servicio { border: 2px dashed var(--verde); border-radius: 16px; padding: 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 0; }
.detalle-servicio legend { font-weight: 800; font-size: 18px; padding: 0 8px; }
.detalle-servicio .ancho { grid-column: 1 / -1; }
.campo textarea { font: inherit; font-size: 16px; padding: 12px 14px; border: 2px solid var(--texto-suave); border-radius: 12px; background: #FFFFFF; color: var(--verde-osc); width: 100%; min-height: 90px; resize: vertical; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.chico { font-size: 14px; padding: 8px 14px; }

/* =====================================================================
   App en el celular: barra de arriba compacta, menú en fila que se
   desliza, barra de íconos abajo y animación.
   ===================================================================== */
.cab-billete, .tabbar { display: none; }

/* --- Animación (todas las pantallas) --- */
@keyframes entra { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes rebota { 0% { transform: scale(.6); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes late { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,207,10,.55); } 70% { box-shadow: 0 0 0 12px rgba(255,207,10,0); } }
@keyframes reflejo { 0% { transform: translateX(-120%) skewX(-20deg); } 60%, 100% { transform: translateX(260%) skewX(-20deg); } }
@keyframes flota { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
header.cab + section > div, header.cab + section > h1 { animation: entra .5s ease-out both; }
.revela { opacity: 0; transform: translateY(22px) scale(.98); transition: opacity .55s ease, transform .55s cubic-bezier(.2,.8,.2,1); }
.revela.visto { opacity: 1; transform: none; }
.btn, .btn-brinca, .cab-billete, .tabbar a, .chip-tap { transition: transform .12s ease, filter .12s ease; }
.btn:active, .btn-brinca:active, .cab-billete:active, .tabbar a:active { transform: scale(.94); }
.btn.oro, .btn-brinca { position: relative; overflow: hidden; }
.btn.oro::after, .btn-brinca::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); animation: reflejo 3.6s ease-in-out infinite; pointer-events: none; }
.tarjeta { transition: transform .2s ease, box-shadow .2s ease; }
@media (hover: hover) { .tarjeta:hover { transform: translateY(-3px); } }

@media (max-width: 760px) {
  /* Barra de arriba: logo a la izquierda, botón de billete a la derecha */
  header.cab { position: sticky; top: 0; z-index: 40; padding-top: env(safe-area-inset-top); border-bottom-width: 3px !important; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
  header.cab > div { display: grid !important; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px !important; padding: 8px 0 8px 14px !important; }
  header.cab > div > a[href="/"] span { display: none !important; }
  header.cab > div > a[href="/"] { gap: 8px !important; min-width: 0; }
  header.cab > div > a[href="/"] img { height: 40px !important; }
  header.cab > div > a[href="/"] span { font-size: 21px !important; white-space: nowrap; }
  .cab-billete { display: none !important; align-items: center; gap: 6px; background: var(--oro); color: var(--verde-osc); text-decoration: none; font-weight: 800; font-size: 14px; padding: 9px 14px; border-radius: 999px; animation: late 2.4s ease-out infinite; }
  .cab-billete svg { width: 18px; height: 18px; }
  .cab-billete[aria-current="page"] { box-shadow: 0 0 0 3px var(--menta); animation: none; }

  /* El menú se vuelve una fila de botones que se desliza con el dedo */
  header.cab nav[aria-label="Principal"] { display: flex !important; flex-wrap: nowrap !important; gap: 8px !important; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0; padding: 2px 14px 2px 0; font-size: 14px !important; mask-image: linear-gradient(90deg, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); }
  header.cab nav[aria-label="Principal"]::-webkit-scrollbar { display: none; }
  header.cab nav[aria-label="Principal"] a { flex: none; scroll-snap-align: start; padding: 8px 14px !important; border-radius: 999px; background: rgba(244,241,222,.08); border: 1.5px solid rgba(117,224,193,.35); color: #F4F1DE !important; white-space: nowrap; font-weight: 700; transition: background .2s ease, transform .12s ease; }
  header.cab nav[aria-label="Principal"] a:active { transform: scale(.94); }
  header.cab nav[aria-label="Principal"] a[aria-current="page"] { background: var(--oro); border-color: var(--oro); color: var(--verde-osc) !important; }
  header.cab nav[aria-label="Principal"] a[data-cuenta], header.cab nav[aria-label="Principal"] a[href="/billete"] { display: none !important; }

  /* Barra de íconos abajo, como en las apps */
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; position: fixed; left: 0; right: 0; bottom: 0; z-index: 48; background: rgba(14,42,29,.97); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 2px solid var(--oro); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 24px rgba(0,0,0,.22); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; color: #9FCDB9; font-size: 11px; font-weight: 700; letter-spacing: .2px; padding: 4px 0; -webkit-tap-highlight-color: transparent; position: relative; }
  .tabbar svg { width: 25px; height: 25px; }
  .tabbar a[aria-current="page"] { color: var(--oro); }
  .tabbar a[aria-current="page"] svg { animation: rebota .35s ease-out; }
  .tabbar a[aria-current="page"]:not(.tab-centro)::before { content: ""; position: absolute; top: -7px; width: 26px; height: 3px; border-radius: 0 0 3px 3px; background: var(--oro); }
  .tabbar .tab-centro i { display: grid; place-items: center; width: 54px; height: 54px; margin-top: -24px; border-radius: 50%; background: var(--oro); color: var(--verde-osc); border: 3px solid var(--verde-osc); box-shadow: 0 6px 16px rgba(0,0,0,.35); animation: flota 3s ease-in-out infinite; }
  .tabbar .tab-centro svg { width: 28px; height: 28px; }
  .tabbar .tab-centro[aria-current="page"] i { box-shadow: 0 0 0 4px rgba(255,207,10,.35), 0 6px 16px rgba(0,0,0,.35); }

  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  #panel-cupon { scroll-margin-top: 112px !important; }
  .ayuda-btn { bottom: calc(86px + env(safe-area-inset-bottom)) !important; width: 54px !important; height: 54px !important; right: 14px !important; }
  .ayuda-panel { bottom: calc(150px + env(safe-area-inset-bottom)) !important; max-height: calc(100vh - 240px) !important; }
}
@media (max-width: 380px) {
  header.cab > div > a[href="/"] span { display: none; }
}
/* Cuando la abren desde la pantalla de inicio (como app instalada) */
@media (display-mode: standalone) {
  body { -webkit-user-select: none; user-select: none; }
  input, textarea { -webkit-user-select: text; user-select: text; }
}

/* Carrusel de "Más cupones de otros negocios" */
.carrusel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 250px); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 24px; -webkit-overflow-scrolling: touch; margin: 0 -24px; padding: 4px 24px 14px; scrollbar-width: none; }
.carrusel::-webkit-scrollbar { display: none; }
.carrusel > * { scroll-snap-align: start; }
@media (max-width: 760px) { .carrusel { grid-auto-columns: 72%; } }
.cupon-vista > article { box-shadow: 6px 6px 0 #0E2A1D; animation: rebota .4s ease-out; }
#panel-cupon:not([hidden]) > div:first-child { animation: entra .4s ease-out both; }

/* ---- Barra de abajo v2: Ca$hetea · Tienda · Escanear · Avisos · Perfil ---- */
.tabbar button { font: inherit; background: none; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; color: #9FCDB9; font-size: 11px; font-weight: 700; padding: 4px 0; position: relative; -webkit-tap-highlight-color: transparent; transition: transform .12s ease; }
.tabbar button:active { transform: scale(.94); }
.tabbar button svg { width: 25px; height: 25px; }
.tabbar .activo, .tabbar button[aria-expanded="true"] { color: var(--oro); }
.tabbar .activo::before { content: ""; position: absolute; top: -7px; width: 26px; height: 3px; border-radius: 0 0 3px 3px; background: var(--oro); }
.punto-avisos { position: absolute; top: 0; left: 50%; margin-left: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--rosa); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; border: 2px solid var(--verde-osc); animation: rebota .4s ease-out; }

/* Hojas que suben desde abajo */
.hoja-fondo { position: fixed; inset: 0; z-index: 46; background: rgba(5,18,12,.55); opacity: 0; transition: opacity .22s ease; }
.hoja-fondo.arriba { opacity: 1; }
.hoja { position: fixed; left: 0; right: 0; bottom: 0; z-index: 47; max-height: 78vh; overflow-y: auto; background: var(--crema); border-radius: 26px 26px 0 0; border-top: 4px solid var(--oro); padding: 10px 18px calc(96px + env(safe-area-inset-bottom)); box-shadow: 0 -12px 40px rgba(0,0,0,.35); transform: translateY(100%); transition: transform .26s cubic-bezier(.2,.8,.2,1); }
.hoja.arriba { transform: none; }
.hoja-asa { display: block; width: 44px; height: 5px; border-radius: 999px; background: #C9C3A8; margin: 2px auto 12px; }
.hoja h2 { margin: 0 0 6px; font-family: Ultra, Georgia, serif; font-weight: 400; font-size: 26px; color: var(--verde); }
.hoja-sub { margin: 0 0 12px; font-size: 14px; color: var(--texto-suave); }
.hoja-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.hoja-item { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; color: var(--verde-osc); font-weight: 800; font-size: 13px; text-align: center; padding: 14px 6px; background: #fff; border: 2px solid var(--verde); border-radius: 18px; box-shadow: 3px 3px 0 var(--verde); transition: transform .12s ease; }
.hoja-item:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--verde); }
.hoja-item i { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 16px; background: var(--c); color: var(--verde-osc); }
.hoja-item svg { width: 28px; height: 28px; }
.hoja.arriba .hoja-item { animation: entra .35s ease-out both; }
.hoja.arriba .hoja-item:nth-child(2) { animation-delay: .03s; } .hoja.arriba .hoja-item:nth-child(3) { animation-delay: .06s; }
.hoja.arriba .hoja-item:nth-child(4) { animation-delay: .09s; } .hoja.arriba .hoja-item:nth-child(5) { animation-delay: .12s; }
.hoja.arriba .hoja-item:nth-child(6) { animation-delay: .15s; } .hoja.arriba .hoja-item:nth-child(7) { animation-delay: .18s; }
.avisos-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.avisos-lista a { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--verde-osc); background: #fff; border: 2px solid var(--menta-clara); border-radius: 16px; padding: 12px 14px; }
.avisos-lista li.nuevo a { border-color: var(--verde); }
.avisos-lista i { font-style: normal; font-size: 24px; width: 42px; height: 42px; display: grid; place-items: center; background: var(--menta-clara); border-radius: 12px; flex: none; }
.avisos-lista span { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.avisos-lista strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avisos-lista small { font-size: 13px; color: var(--texto-suave); }
.avisos-lista em { font-style: normal; font-size: 11px; font-weight: 800; background: var(--rosa); color: #fff; padding: 3px 8px; border-radius: 999px; flex: none; }
.aviso-vacio { padding: 18px; text-align: center; color: var(--texto-suave); background: #fff; border: 2px dashed var(--menta-clara); border-radius: 16px; font-size: 15px; line-height: 1.5; }
@media (min-width: 761px) { .hoja, .hoja-fondo { display: none !important; } }

/* ---- Categorías de negocios: fila que se desliza ---- */
.cats { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 4px 2px 10px; }
.cats::-webkit-scrollbar { display: none; }
.cats-titulo { margin: 0 0 10px; font-family: Ultra, Georgia, serif; font-weight: 400; font-size: 22px; color: var(--verde); }
.cat { flex: none; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 82px; padding: 10px 8px 8px; font: inherit; font-size: 12.5px; font-weight: 800; color: var(--verde-osc); text-decoration: none; background: #fff; border: 2px solid var(--verde); border-radius: 18px; cursor: pointer; position: relative; transition: transform .12s ease, background .2s ease; }
.cat:active { transform: scale(.94); }
.cat i { font-style: normal; font-size: 26px; line-height: 1; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--menta-clara); }
.cat b { position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--rosa); color: #fff; font-size: 11px; line-height: 20px; }
.cat.vacia { opacity: .55; }
.cat[aria-pressed="true"] { background: var(--verde); color: var(--oro); box-shadow: 0 6px 16px rgba(19,58,40,.3); }
.cat[aria-pressed="true"] i { background: var(--oro); animation: rebota .35s ease-out; }
@media (max-width: 760px) {
  .cats-seccion { padding-left: 0 !important; padding-right: 0 !important; }
  .cats-seccion .cats { padding-left: 16px; padding-right: 16px; scroll-padding: 0 16px; }
  .cats-titulo { padding: 0 16px; }
}

@media (max-width: 760px) {
  .barra-instalar { bottom: calc(84px + env(safe-area-inset-bottom)) !important; }
  body.hoja-abierta .barra-instalar, body.hoja-abierta .ayuda-btn { display: none !important; }
}

/* =====================================================================
   La puerta: lo primero es entrar como Cashetero o como Negocio
   ===================================================================== */
html.sin-sesion body > *:not(.puerta):not(.modal-fondo) { visibility: hidden !important; }
html.sin-sesion body { overflow: hidden; }
.puerta { position: fixed; inset: 0; z-index: 49; overflow-y: auto; display: flex; align-items: center; justify-content: center; padding: calc(24px + env(safe-area-inset-top)) 18px calc(24px + env(safe-area-inset-bottom)); background: radial-gradient(120% 80% at 50% 0%, #1E5A3C 0%, #0E2A1D 55%, #071811 100%); color: #F4F1DE; font-family: Archivo, system-ui, sans-serif; visibility: visible !important; }
.puerta-lluvia { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.puerta-lluvia span { position: absolute; top: -60px; font-family: Ultra, Georgia, serif; color: rgba(255,207,10,.22); animation: cae 9s linear infinite; }
.puerta-lluvia span:nth-child(1) { left: 6%; font-size: 30px; animation-delay: -1s; } .puerta-lluvia span:nth-child(2) { left: 18%; font-size: 22px; animation-delay: -5s; color: rgba(117,224,193,.25); }
.puerta-lluvia span:nth-child(3) { left: 30%; font-size: 38px; animation-delay: -3s; } .puerta-lluvia span:nth-child(4) { left: 42%; font-size: 20px; animation-delay: -7s; color: rgba(232,69,122,.25); }
.puerta-lluvia span:nth-child(5) { left: 54%; font-size: 34px; animation-delay: -2s; } .puerta-lluvia span:nth-child(6) { left: 66%; font-size: 24px; animation-delay: -6s; color: rgba(117,224,193,.25); }
.puerta-lluvia span:nth-child(7) { left: 76%; font-size: 40px; animation-delay: -4s; } .puerta-lluvia span:nth-child(8) { left: 86%; font-size: 22px; animation-delay: -8s; }
.puerta-lluvia span:nth-child(9) { left: 94%; font-size: 30px; animation-delay: -0.5s; color: rgba(232,69,122,.22); } .puerta-lluvia span:nth-child(10) { left: 48%; font-size: 26px; animation-delay: -4.5s; }
@keyframes cae { to { transform: translateY(115vh) rotate(25deg); } }
.puerta-caja { position: relative; width: 100%; max-width: 760px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; animation: entra .6s ease-out both; }
.puerta-logo { width: 150px; height: auto; animation: flota 3.2s ease-in-out infinite; filter: drop-shadow(0 12px 24px rgba(0,0,0,.45)); }
.puerta h1 { margin: 4px 0 0; font-family: Ultra, Georgia, serif; font-weight: 400; font-size: clamp(30px, 6vw, 52px); line-height: 1.05; color: var(--oro); }
.puerta-sub { margin: 0; font-size: 17px; line-height: 1.5; color: var(--menta-clara); max-width: 520px; }
.puerta-opciones { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: 100%; margin-top: 10px; }
.puerta-op { font: inherit; text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 22px 20px; border-radius: 24px; border: 3px solid var(--menta); background: rgba(244,241,222,.06); color: #F4F1DE; cursor: pointer; transition: transform .15s ease, background .2s ease, box-shadow .2s ease; animation: entra .6s ease-out both; }
.puerta-op:nth-child(2) { animation-delay: .12s; }
.puerta-op i { font-style: normal; font-size: 40px; line-height: 1; }
.puerta-op strong { font-family: Ultra, Georgia, serif; font-weight: 400; font-size: 26px; color: #F4F1DE; }
.puerta-op span { font-size: 15px; line-height: 1.45; color: var(--menta-clara); }
.puerta-op.oro { border-color: var(--oro); background: var(--oro); color: var(--verde-osc); }
.puerta-op.oro strong, .puerta-op.oro span { color: var(--verde-osc); }
.puerta-op:hover, .puerta-op:focus-visible { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0,0,0,.35); }
.puerta-op:active, .puerta-op.escogida { transform: scale(.97); }
.puerta-ya { margin: 6px 0 0; font-size: 16px; color: var(--menta-clara); }
.puerta-ya button { font: inherit; font-weight: 800; color: var(--oro); background: none; border: 0; text-decoration: underline; cursor: pointer; padding: 6px; }
.puerta-legal { margin: 0; font-size: 12.5px; color: #8FB7A3; }
.puerta-legal a { color: #BFE3D2; }
@media (max-width: 560px) {
  .puerta-opciones { grid-template-columns: 1fr; }
  .puerta-op { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 14px; padding: 18px; }
  .puerta-op i { font-size: 36px; }
  .puerta-op strong { font-size: 22px; flex: 1; }
  .puerta-op span { flex-basis: 100%; }
  .puerta-logo { width: 118px; }
}

/* ---- Experiencia del negocio ---- */
.tabbar-negocio .tab-centro i { background: var(--menta); }
@media (max-width: 760px) {
  body[data-exp="negocio"] header.cab nav[aria-label="Principal"] { display: none !important; }
  body[data-exp="negocio"] { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* ---- Ajustes del celular: portada más corta y ayuda dentro del menú ---- */
@media (max-width: 760px) {
  #inicio > div:not(.lluvia) { padding: 30px 16px 26px !important; gap: 20px !important; }
  #inicio > div:not(.lluvia) > div:first-child { gap: 14px !important; }
  #inicio h1 { font-size: 40px !important; }
  #inicio > div:not(.lluvia) > div:last-child { display: none !important; }
  .ayuda-btn { display: none !important; }
}
.hoja-item { font: inherit; font-weight: 800; font-size: 13px; cursor: pointer; }

/* ---- Escáner del QR del billete ---- */
.btn-escanear { font: inherit; font-weight: 800; font-size: 18px; display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--oro); color: var(--verde-osc); border: 3px solid var(--verde-osc); border-radius: 18px; padding: 18px 20px; cursor: pointer; box-shadow: 4px 4px 0 var(--verde-osc); transition: transform .12s ease, box-shadow .12s ease; }
.btn-escanear:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--verde-osc); }
.btn-escanear svg { width: 28px; height: 28px; }
.escaner { position: fixed; inset: 0; z-index: 60; background: #000; color: #fff; animation: entra .25s ease-out both; }
.escaner.saliendo { opacity: 0; transition: opacity .18s ease; }
.escaner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.escaner-marco { position: absolute; left: 50%; top: 46%; width: min(68vw, 300px); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 26px; box-shadow: 0 0 0 200vmax rgba(0,0,0,.55); }
.escaner-marco i { position: absolute; width: 46px; height: 46px; border: 6px solid var(--oro); }
.escaner-marco i:nth-child(1) { top: -3px; left: -3px; border-right: 0; border-bottom: 0; border-radius: 26px 0 0 0; }
.escaner-marco i:nth-child(2) { top: -3px; right: -3px; border-left: 0; border-bottom: 0; border-radius: 0 26px 0 0; }
.escaner-marco i:nth-child(3) { bottom: -3px; left: -3px; border-right: 0; border-top: 0; border-radius: 0 0 0 26px; }
.escaner-marco i:nth-child(4) { bottom: -3px; right: -3px; border-left: 0; border-top: 0; border-radius: 0 0 26px 0; }
.escaner-marco b { position: absolute; left: 8%; right: 8%; top: 10%; height: 3px; border-radius: 3px; background: var(--oro); box-shadow: 0 0 14px 3px rgba(255,207,10,.7); animation: barre 1.8s ease-in-out infinite alternate; }
@keyframes barre { to { top: 88%; } }
.escaner.leido .escaner-marco i { border-color: var(--menta); }
.escaner.leido .escaner-marco { animation: rebota .3s ease-out; }
.escaner-arriba { position: absolute; top: calc(14px + env(safe-area-inset-top)); left: 14px; right: 14px; display: flex; justify-content: space-between; }
.escaner-arriba button { font: inherit; font-size: 20px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; }
.escaner-luz.on { background: var(--oro); }
.escaner-abajo { position: absolute; left: 0; right: 0; bottom: calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 0 20px; }
.escaner-abajo p { margin: 0; font-family: Ultra, Georgia, serif; font-size: 24px; color: var(--oro); }
.escaner-estado { font-size: 14px; color: #DDF5EC; }
.escaner-escribir { font: inherit; font-weight: 800; font-size: 16px; background: #fff; color: var(--verde-osc); border: 0; border-radius: 999px; padding: 13px 22px; cursor: pointer; margin-top: 6px; }

/* ---- Mi cuenta como app (celular) ---- */
.perfil-app { display: none; }
@media (max-width: 760px) {
  body[data-page="perfil"] header.cab + section { display: none; }
  #perfil-dentro { padding: 18px 16px 40px !important; gap: 16px !important; }
  .perfil-app { display: flex; flex-direction: column; gap: 14px; animation: entra .4s ease-out both; }
  .perfil-tarjeta { display: flex; align-items: center; gap: 14px; background: var(--verde-osc); color: #F4F1DE; border-radius: 24px; padding: 18px; box-shadow: 0 10px 24px rgba(14,42,29,.25); }
  .perfil-avatar { width: 62px; height: 62px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--oro); color: var(--verde-osc); font-family: Ultra, Georgia, serif; font-size: 30px; border: 3px solid var(--menta); }
  .perfil-tarjeta strong { display: block; font-family: Ultra, Georgia, serif; font-weight: 400; font-size: 24px; color: var(--oro); line-height: 1.1; }
  .perfil-tarjeta small { display: block; font-size: 13px; color: var(--menta-clara); margin-top: 4px; }
  .perfil-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .perfil-stats button { font: inherit; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; background: #fff; border: 2px solid var(--verde); border-radius: 18px; color: var(--verde-osc); cursor: pointer; box-shadow: 3px 3px 0 var(--verde); }
  .perfil-stats b { font-family: Ultra, Georgia, serif; font-weight: 400; font-size: 26px; color: var(--valor, #1E7A34); }
  .perfil-stats span { font-size: 12.5px; font-weight: 800; }
  .perfil-pestanas { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 4px; position: sticky; top: 60px; z-index: 5; background: var(--crema); }
  .perfil-pestanas::-webkit-scrollbar { display: none; }
  .perfil-pestanas button { font: inherit; flex: none; font-weight: 800; font-size: 14px; padding: 9px 16px; border-radius: 999px; border: 2px solid var(--verde); background: #fff; color: var(--verde-osc); cursor: pointer; }
  .perfil-pestanas button[aria-selected="true"] { background: var(--verde); color: var(--oro); }
  #perfil-dentro .perfil-grid > [data-pestana] { display: none; }
  #perfil-dentro .perfil-grid > [data-pestana].pestana-activa:not([hidden]) { display: flex; animation: entra .3s ease-out both; }

  /* Tienda y Rifas: sin la imagen grande arriba; Billete: imagen pequeña */
  body[data-page="tienda"] section[data-catalogo] > div > div:last-child { display: none !important; }
  body[data-page="rifas"] header.cab + section > div > div:last-child { display: none !important; }
  header.cab + section.guilloche > div { padding-top: 28px !important; padding-bottom: 26px !important; gap: 16px !important; }
  body[data-page="billete"] header.cab + section > div { padding-top: 22px !important; gap: 18px !important; }
  body[data-page="billete"] header.cab + section img[src="/img/billete.jpg"] { max-height: 130px; width: auto !important; max-width: 100%; align-self: center; }
  body[data-page="billete"] header.cab + section > div > div:last-child { padding: 20px !important; }
}

@media (max-width: 760px) { body[data-page="billete"] header.cab + section > div > div:last-child { order: -1; } }

/* ---- Pantalla de arranque (app instalada) ---- */
html.arranque body::before, html.arranque body::after { content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; }
html.arranque body::before { background: radial-gradient(120% 80% at 50% 30%, #1E5A3C 0%, #0E2A1D 60%, #071811 100%); animation: arranque-fondo 1.25s ease forwards; }
html.arranque body::after { background: url(/img/logo.png) center 44% / 170px auto no-repeat; animation: arranque-logo 1.25s ease forwards; }
@keyframes arranque-fondo { 0%, 65% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@keyframes arranque-logo { 0% { opacity: 0; transform: scale(.7); } 25% { opacity: 1; transform: scale(1.06); } 40%, 62% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.15); visibility: hidden; } }
