:root{
  --wine:#5b0016;
  --wine2:#7a0020;
  --bg:#0f0a0c;
  --card:#160e11;
  --text:#f5eef1;
  --muted:#d6c5cb;
  --green:#19c37d;
  --shadow: 0 14px 40px rgba(0,0,0,.45);
  --radius: 18px;

  /* Altura REAL del menú inferior (sin safe-area) */
  --footer-h: 88px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background: radial-gradient(1200px 700px at 50% 10%, rgba(122,0,32,.30), transparent 55%),
              radial-gradient(900px 600px at 80% 70%, rgba(91,0,22,.35), transparent 60%),
              var(--bg);
  color:var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Centrado “como móvil” en escritorio */
.page-center{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
}

.device{
  width:min(420px, 100%);
  height:min(860px, 100vh);
  background: linear-gradient(180deg, rgba(122,0,32,.25), rgba(0,0,0,.15));
  border:1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow);
  border-radius: 26px;
  overflow:hidden;
  position:relative;
}

/* 📱 Móvil: pega el “móvil” arriba y usa viewport real */
@media (max-width: 520px){
  .page-center{
    padding:0;
    align-items:stretch;
    justify-content:flex-start; /* evita que la cabecera baje */
    min-height:100dvh;
  }

  .device{
    width:100%;
    height:100vh;  /* fallback */
    height:100svh; /* estable */
    height:100dvh; /* real */
    border-radius:0;
    border:none;
    box-shadow:none;
  }
}

/* Header fijo */
.header{
  position:sticky;
  top:0;
  z-index:20;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 12px;
  background: linear-gradient(180deg, rgba(91,0,22,.92), rgba(91,0,22,.65));
  border-bottom:1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(10px);
}

.btn{
  border:none;
  cursor:pointer;
  padding:10px 12px;
  border-radius: 14px;
  font-weight:800;
  letter-spacing:.2px;
  white-space:nowrap;
}

.btn-primary{
  background: linear-gradient(180deg, #ff4b6e, #c7002f);
  color:white;
  box-shadow: 0 10px 22px rgba(199,0,47,.35);
}

.btn-primary:active{ transform: translateY(1px); }

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.brand-logo{
  width:34px;
  height:34px;
  border-radius: 10px;
  object-fit:cover;
  border:1px solid rgba(255,255,255,.15);
}

.brand-text{
  font-family: 'Poppins', Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: .2px;
  overflow:hidden;
  text-overflow:ellipsis;
}



/* Contenido */
.content{
  height: calc(100% - 72px);

  /* Reserva exacta para el menú inferior + safe-area (sin empujar de más) */
  padding: 14px 12px calc(var(--footer-h) + env(safe-area-inset-bottom) + 10px) 12px;

  overflow:auto;
}

.grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:12px;
}

/* Cards */
.card{
  background: rgba(22,14,17,.92);
  border:1px solid rgba(255,255,255,.10);
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: 0 12px 26px rgba(0,0,0,.35);
}

.card-media{
  position:relative;
  width:100%;
  aspect-ratio: 1 / 1;
  overflow:hidden;
  cursor:pointer;
}

.card-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  filter: saturate(1.06) contrast(1.02);
}

.status{
  position:absolute;
  right:10px;
  top:10px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.45);
  border:1px solid rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  font-weight:800;
}

.status-dot{
  width:10px;
  height:10px;
  border-radius:999px;
  background:var(--green);
  box-shadow: 0 0 0 5px rgba(25,195,125,.14);
}

.status-text{ font-size: 13px; }

.code{
  position:absolute;
  right:12px;
  top:54px;
  padding:8px 10px;
  border-radius: 12px;
  background: rgba(0,0,0,.45);
  border:1px solid rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  font-weight:800;
  font-size: 14px;
}

.card-body{ padding: 12px 12px 14px 12px; }

.card-title{
  font-family: 'Poppins', Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin: 2px 0 6px 0;
}

.card-text{
  color: var(--muted);
  line-height: 1.35;
  font-size: 14.2px;
  margin:0;
}

/* Footer fijo - MENÚ INFERIOR pegado a la base */
.footer{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  z-index:25;

  /* Altura fija del menú (sin sumar padding que lo "baje") */
  height: calc(var(--footer-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);

  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.55) 25%, rgba(91,0,22,.92));
  border-top:1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(10px);
}

.footer-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  width:100%;
  height:100%;
}

.footer-cell{
  padding: 10px 8px 8px;
  text-decoration:none;
  color: var(--text);

  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;
}

.footer-left{
  border-right: 1px solid rgba(255,255,255,.10);
}

/* NÚMEROS MÁS GRANDES */
.footer-number{
  font-weight:900;
  font-size: 28px;
  letter-spacing: .4px;
  line-height: 1.05;
}

/* ¡Pruébalo Gratis! */
.footer-badge{
  display:inline-block;
  margin-top:6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,75,110,.18);
  border:1px solid rgba(255,75,110,.35);
  font-weight:900;
}

/* texto pequeño izquierda */
.footer-small{
  margin-top:6px;
  font-size: 11px;
  color: rgba(255,255,255,.85);
  line-height: 1.1;
}

/* ERODY MÁS PEQUEÑO */
.footer-legal{
  margin-top:6px;
  font-size: 9px;
  line-height: 1.15;
  color: rgba(255,255,255,.82);
}

/* Modales */
.modal{
  position:absolute;
  inset:0;
  display:none;
  z-index:50;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
}

.modal[aria-hidden="false"]{ display:block; }

.modal-panel{
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(91,0,22,.75), rgba(0,0,0,.25));
}

.modal-header{
  position:sticky;
  top:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 12px;
  background: linear-gradient(180deg, rgba(91,0,22,.92), rgba(91,0,22,.68));
  border-bottom:1px solid rgba(255,255,255,.10);
}

.modal-title{
  font-family: "Playfair Display", serif;
  font-size: 18px;
  font-weight:700;
}

.icon-btn{
  border:none;
  cursor:pointer;
  font-size: 18px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.10);
  color: white;
  border:1px solid rgba(255,255,255,.14);
}

.modal-body{
  height: calc(100% - 58px);
  padding: 14px;
  overflow:auto;
}

/* Prompt instalación */
.install{
  position:absolute;
  inset:0;
  z-index:60;
  display:none;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
}

.install[aria-hidden="false"]{ display:flex; align-items:flex-end; justify-content:center; }

.install-card{
  width:100%;
  margin: 0 12px 14px 12px;
  background: rgba(22,14,17,.96);
  border:1px solid rgba(255,255,255,.10);
  border-radius: 20px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.install-title{
  font-family: "Playfair Display", serif;
  font-size: 18px;
  margin-bottom: 6px;
}

.install-text{
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.35;
}

.install-actions{
  display:flex;
  gap:10px;
  margin-top: 12px;
}

.install-actions .btn{ flex:1; }

.btn-secondary{
  background: rgba(255,255,255,.10);
  color:white;
  border:1px solid rgba(255,255,255,.14);
}

/* Overlay orientación */
.rotate-overlay{
  position:fixed;
  inset:0;
  z-index:9999;
  display:none;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(10px);
}

.rotate-overlay[aria-hidden="false"]{ display:flex; align-items:center; justify-content:center; }

.rotate-card{
  width:min(360px, 92vw);
  padding: 18px;
  border-radius: 22px;
  background: rgba(22,14,17,.96);
  border:1px solid rgba(255,255,255,.12);
  box-shadow: var(--shadow);
  text-align:center;
}

.rotate-icon{ font-size: 34px; margin-bottom: 6px; }

.rotate-title{
  font-family: "Playfair Display", serif;
  font-size: 20px;
  margin-bottom: 6px;
}

.rotate-text{ color: var(--muted); font-size: 13.5px; line-height: 1.35; }
