@font-face {
  font-family: "Bardy";
  src: url("../fonts/Bardy.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --naranja: #fd5200;
  --naranja-sombra: #5e0001;
  --rojo: #d20200;
  --cafe: #591b0b;
  --crema: #fdead3;
  --crema-2: #fff6eb;
  --blanco: #fffdf9;
  --verde: #006f3f;
  --verde-suave: #e2ffe4;
  --linea: rgba(89, 27, 11, 0.14);
  --radio: 50px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --space-8: 8px;
  --space-16: 16px;
  --space-24: 24px;
  --pad-x: clamp(16px, 3.4vw, 48px);
  --wrap-home: min(72rem, calc(100% - 2 * var(--pad-x)));
  --wrap-form: min(45rem, calc(100% - 2 * var(--pad-x)));
  --tap: 44px;
  --home-radius: 24px;
  --home-shadow: 0 14px 30px rgba(89, 27, 11, 0.06);
  --home-border: 1px solid var(--linea);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: "Poppins", sans-serif;
  background: var(--crema);
  color: var(--cafe);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

body.page-enter .rise {
  animation: rise 0.7s var(--ease) both;
}
body.page-enter .rise-2 { animation-delay: 0.08s; }
body.page-enter .rise-3 { animation-delay: 0.16s; }
body.page-enter .rise-4 { animation-delay: 0.24s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes pulse-soft {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  min-width: min(520px, calc(100% - 32px));
  padding: 14px 18px;
  border-radius: 18px;
  font-weight: 600;
  font-size: 14px;
  animation: rise 0.45s var(--ease);
  box-shadow: 4px 7px 0 var(--naranja-sombra);
}
.toast.ok { background: var(--verde-suave); color: var(--verde); }
.toast.mal { background: #ffe4dd; color: var(--rojo); }

.auth-error {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #ffe4dd;
  color: var(--rojo);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.35;
}

.hero {
  min-height: 100svh;
  position: relative;
  overflow: hidden;
  color: #fff;
  display: grid;
  grid-template-rows: auto 1fr;
  padding:
    max(16px, env(safe-area-inset-top, 0px))
    max(16px, env(safe-area-inset-right, 0px))
    max(28px, env(safe-area-inset-bottom, 0px))
    max(16px, env(safe-area-inset-left, 0px));
  background: #fd5200;
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(89, 27, 11, 0.28) 0%, rgba(253, 82, 0, 0.55) 48%, #fd5200 100%),
    var(--hero) center 30% / cover no-repeat;
  transform: scale(1.06);
  animation: ken 18s ease-in-out infinite alternate;
}

@keyframes ken {
  from { transform: scale(1.06) translateY(0); }
  to { transform: scale(1.12) translateY(-2%); }
}

.hero > *:not(.hero-media) { position: relative; z-index: 1; }
.hero-media { z-index: 0; }
.hero .btn-ghost { background: #fff; color: var(--naranja); border-color: #fff; }

.store-pick input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
  flex-shrink: 0;
}
.brand img { height: clamp(32px, 8vw, 44px); width: auto; }
.brand span {
  font-family: Bardy, sans-serif;
  font-size: 22px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.nav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
}
.pill-link {
  background: rgba(255, 255, 255, 0.14);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  text-decoration: none;
  padding: 9px 14px;
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radio);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  backdrop-filter: blur(8px);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.pill-link:hover { background: #fff; color: var(--naranja); transform: translateY(-1px); }

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  max-width: 640px;
  padding-bottom: 12px;
}

.kicker {
  font-family: Poppins, sans-serif;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 11px;
  margin: 0 0 10px;
}

h1, h2, h3, .display {
  font-family: Bardy, sans-serif;
  font-weight: 400;
  line-height: 0.92;
  margin: 0 0 14px;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2.05rem, 9.4vw, 5.4rem);
  letter-spacing: 1px;
  line-height: 0.94;
  overflow-wrap: anywhere;
}
h2 {
  font-size: clamp(1.55rem, 5vw, 2.625rem);
  color: var(--naranja);
  overflow-wrap: anywhere;
}
.section-title { color: var(--cafe); }
.lead {
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 500;
  line-height: 1.45;
  max-width: 38ch;
  margin: 0 0 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 3px solid var(--naranja);
  cursor: pointer;
  text-decoration: none;
  font-family: Bardy, sans-serif;
  font-size: clamp(15px, 1.4vw, 20px);
  text-transform: uppercase;
  padding: 14px 22px;
  min-height: 52px;
  max-width: 100%;
  border-radius: var(--radio);
  background: var(--naranja);
  color: var(--crema);
  box-shadow: 4px 7px 0 var(--naranja-sombra);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.btn:hover { transform: translate(2px, 3px); box-shadow: 2px 3px 0 var(--naranja-sombra); }
.btn:active { transform: translate(4px, 7px); box-shadow: 0 0 0 var(--naranja-sombra); }
.btn-block { width: 100%; }
.btn-dark {
  background: var(--cafe);
  border-color: var(--cafe);
  box-shadow: 4px 7px 0 #2a0c04;
}
.btn-ghost {
  background: var(--blanco);
  color: var(--cafe);
  border-color: var(--cafe);
  box-shadow: 4px 7px 0 rgba(89, 27, 11, 0.25);
}
.btn-ok {
  background: var(--verde);
  border-color: var(--verde);
  box-shadow: 4px 7px 0 #01351e;
}
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }

.wrap {
  width: var(--wrap-home);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 48px) 0 clamp(56px, 10vw, 88px);
}
.home-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
}

.card {
  background: var(--blanco);
  border-radius: clamp(20px, 4vw, 28px);
  padding: clamp(16px, 3.2vw, 28px);
  margin-bottom: 16px;
  border: 1px solid var(--linea);
  box-shadow: 0 18px 40px rgba(89, 27, 11, 0.08);
  min-width: 0;
}

.steps {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
}
.step-dot {
  flex: 1;
  height: 7px;
  border-radius: 99px;
  background: rgba(253, 82, 0, 0.18);
  overflow: hidden;
}
.step-dot.on { background: var(--naranja); }
.step-dot.on::after {
  content: "";
  display: block;
  height: 100%;
  background: #fff6;
  animation: shine 0.8s var(--ease);
}
@keyframes shine {
  from { transform: translateX(-100%); width: 40%; }
  to { transform: translateX(250%); width: 40%; }
}

.field { margin-top: 16px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.input,
input:not([type="file"]):not([type="radio"]):not([type="hidden"]):not([type="checkbox"]),
select,
textarea {
  width: 100%;
  border: 2px solid transparent;
  background: var(--crema-2);
  border-radius: 22px;
  padding: 16px 18px;
  font-family: Poppins, sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--cafe);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}
input:focus,
select:focus,
.input:focus {
  outline: none;
  border-color: var(--naranja);
  background: #fff;
  transform: translateY(-1px);
}

.hint {
  color: rgba(89, 27, 11, 0.72);
  font-size: 13px;
  line-height: 1.45;
  margin: 8px 0 0;
}

.pin-input {
  font-size: clamp(1.15rem, 4.8vw, 2rem);
  letter-spacing: clamp(0.08em, 1.6vw, 0.28em);
  text-align: center;
  font-weight: 700;
}
.code-input {
  font-size: clamp(1.05rem, 3.8vw, 1.4rem);
  letter-spacing: 0.12em;
  text-align: center;
  font-weight: 700;
  text-transform: uppercase;
}

.dropzone,
.field label.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 132px;
  border: 2px dashed rgba(253, 82, 0, 0.45);
  background: #fff6ef;
  border-radius: 24px;
  padding: 18px;
  cursor: pointer;
  text-align: center;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  margin: 0;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}
.dropzone:hover,
.dropzone.drag {
  border-color: var(--naranja);
  background: #fff;
  transform: scale(1.01);
}
.dropzone input { display: none; }
.dropzone b {
  font-family: Bardy, sans-serif;
  font-size: 18px;
  text-transform: uppercase;
  color: var(--naranja);
}
.dropzone span { font-size: 13px; color: rgba(89, 27, 11, 0.7); }
.preview { margin-top: 10px; }
.preview img,
.preview video {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 18px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 1.6vw, 12px);
}

.stat {
  background: var(--cafe);
  color: #fff;
  border-radius: 24px;
  padding: clamp(12px, 2vw, 18px) clamp(8px, 1.4vw, 12px);
  text-align: center;
  min-width: 0;
}
.stat b {
  display: block;
  font-family: Bardy, sans-serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 400;
}
.stat span { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.8; }

.store-grid {
  display: grid;
  gap: var(--space-16);
  grid-template-columns: 1fr;
}

a.store-pick { text-decoration: none; color: inherit; }

.store-pick {
  position: relative;
  border: 2px solid transparent;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  color: var(--cafe);
  width: 100%;
  padding: 0 0 16px;
  font: inherit;
  box-shadow: 0 14px 30px rgba(89, 27, 11, 0.08);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.store-pick:hover { transform: translateY(-4px); }
.store-pick.on,
.store-pick:has(input:checked) {
  border-color: var(--naranja);
  box-shadow: 4px 7px 0 var(--naranja-sombra);
}
.store-pick img { height: 120px; width: 100%; object-fit: cover; }
.store-pick strong {
  display: block;
  padding: 12px 14px 0;
  font-family: Bardy, sans-serif;
  font-size: 22px;
  text-transform: uppercase;
}
.store-pick small { display: block; padding: 4px 14px 0; color: rgba(89, 27, 11, 0.7); }

.product-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  margin-bottom: 8px;
}
.product-pick {
  position: relative;
  display: block;
  border: 2px solid transparent;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  color: var(--cafe);
  padding: 0 0 12px;
  box-shadow: 0 10px 22px rgba(89, 27, 11, 0.08);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.product-pick.on,
.product-pick:has(input[type="checkbox"]:checked) {
  border-color: var(--naranja);
  box-shadow: 3px 5px 0 var(--naranja-sombra);
}
.product-pick img { height: 88px; width: 100%; object-fit: cover; display: block; }
.product-pick input[type="checkbox"] {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 18px;
  height: 18px;
  accent-color: var(--naranja);
}
.product-pick strong {
  display: block;
  padding: 8px 12px 0;
  font-family: Bardy, sans-serif;
  font-size: 16px;
  text-transform: uppercase;
  line-height: 1.15;
}
.product-pick small { display: block; padding: 2px 12px 0; color: rgba(89, 27, 11, 0.7); }
.product-pick .qty-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 0;
  font-size: 13px;
}
.product-pick .qty { width: 72px; min-height: 36px; padding: 4px 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-block;
  background: #fff3eb;
  color: var(--cafe);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
}

.caja-shell {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at top, #7a2a12, #591b0b 46%, #2a0c04);
  color: #fff;
  padding:
    max(16px, env(safe-area-inset-top, 0px))
    max(14px, env(safe-area-inset-right, 0px))
    max(36px, env(safe-area-inset-bottom, 0px))
    max(14px, env(safe-area-inset-left, 0px));
}
.caja-shell h2 { color: #fff; }
.caja-shell .card { color: var(--cafe); }
.caja-shell .card h2 { color: var(--naranja); }

.cupo {
  font-family: Bardy, sans-serif;
  font-size: clamp(2.75rem, 16vw, 8rem);
  line-height: 0.86;
  text-align: center;
  margin: 28px 0 6px;
  animation: pulse-soft 3.6s ease-in-out infinite;
  overflow-wrap: anywhere;
}

.roles {
  display: grid;
  gap: var(--space-16);
  margin-top: 0;
  grid-template-columns: 1fr;
}

.role {
  background: #fff;
  color: var(--cafe);
  border-radius: 24px;
  padding: 16px;
  text-decoration: none;
  border: 1px solid var(--linea);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.role:hover {
  transform: translateY(-6px);
  box-shadow: 4px 7px 0 var(--naranja-sombra);
}
.role img { height: 120px; width: 100%; object-fit: cover; border-radius: 18px; margin-bottom: 12px; }
.role strong {
  font-family: Bardy, sans-serif;
  font-size: 22px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}

.gallery {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
  margin-top: 14px;
}
.ugc {
  margin: 0;
  background: var(--crema-2);
  border-radius: 18px;
  overflow: hidden;
}
.ugc video,
.ugc img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  background: #111;
  border-radius: 0;
}
.ugc figcaption {
  display: block;
  padding: 10px 12px 12px;
  font-size: 12px;
  font-weight: 600;
}
.reel-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-height: 180px;
  padding: 18px;
  background: var(--naranja);
  color: #fff;
  text-decoration: none;
}
.reel-card strong {
  font-family: Bardy, sans-serif;
  font-size: 28px;
  text-transform: uppercase;
}

.premio-qr { text-align: center; padding: 32px 22px; }
.codigo {
  font-family: Bardy, sans-serif;
  font-size: clamp(1.4rem, 6.4vw, 2.5rem);
  letter-spacing: 0.08em;
  margin: 10px 0 18px;
  color: var(--naranja);
  overflow-wrap: anywhere;
}

.demo-note { font-size: 12px; opacity: 0.9; margin-top: 16px; font-weight: 500; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
th, td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--linea); }
th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(89, 27, 11, 0.55);
}

.marquee {
  overflow: hidden;
  margin: 0;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  gap: var(--space-16);
  animation: marquee 22s linear infinite;
}
.marquee-track img {
  height: 88px;
  width: 118px;
  object-fit: cover;
  border-radius: 16px;
}

.step-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.back-link,
.step-meta .back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--naranja);
  font-weight: 700;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
}
.back-link .chev {
  width: 9px;
  height: 9px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
.back-form { margin: 0; }
.back-form-hidden { display: none; }
.step-dot-form { flex: 1; margin: 0; display: flex; }
.step-dot-form .step-dot {
  flex: 1;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.actions,
.actions-nav {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}
.app-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--naranja);
  font-weight: 700;
  text-decoration: none;
  margin-bottom: 6px;
}
.app-back .chev {
  width: 9px;
  height: 9px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}

.badge {
  display: inline-block;
  background: var(--naranja);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
}

.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(22px); }
.js .reveal.in { animation: rise 0.7s var(--ease) both; }

.status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--crema);
}
.status-pill.canjeado { background: var(--verde-suave); color: var(--verde); }
.status-pill.premio_activo { background: #ffe4d4; color: var(--naranja); }

.site-head {
  background: var(--naranja);
  color: #fff;
  padding:
    max(12px, env(safe-area-inset-top, 0px))
    max(16px, env(safe-area-inset-right, 0px))
    12px
    max(16px, env(safe-area-inset-left, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-head .brand img { height: 40px; }

.inner {
  width: var(--wrap-form);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 32px) 0 clamp(64px, 10vw, 96px);
}
.inner.auth {
  min-height: calc(100vh - 72px);
  min-height: calc(100dvh - 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.thumb {
  height: 132px;
  background: var(--naranja);
  overflow: hidden;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: screen;
}
.thumb.photo img {
  object-fit: cover;
  mix-blend-mode: normal;
}

.marquee {
  background: var(--naranja);
  padding: var(--space-16);
  border-radius: var(--home-radius);
}
.marquee-track img {
  background: transparent;
  mix-blend-mode: screen;
  flex: 0 0 auto;
}

.role .thumb {
  border-radius: 18px;
  margin-bottom: 12px;
}
.role img {
  height: auto;
  margin-bottom: 0;
  border-radius: 0;
}

.home-grid {
  display: grid;
  gap: var(--space-16);
  grid-template-columns: 1fr;
  align-items: stretch;
}
.home-tile {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  max-width: 100%;
  background: #fff;
  color: var(--cafe);
  text-decoration: none;
  border: var(--home-border);
  border-radius: var(--home-radius);
  overflow: hidden;
  box-shadow: var(--home-shadow);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.home-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(89, 27, 11, 0.1);
}
.home-tile:focus-visible {
  outline: 2px solid var(--naranja);
  outline-offset: 3px;
}
.home-tile-media {
  height: 140px;
  background: var(--naranja);
  overflow: hidden;
  flex: 0 0 auto;
}
.home-tile-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: screen;
}
.home-tile-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  padding: var(--space-16);
  flex: 1 1 auto;
}
.home-tile-body strong {
  display: block;
  margin: 0;
  padding: 0;
  font-family: Bardy, sans-serif;
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  line-height: 1.05;
  text-transform: uppercase;
}
.home-tile-body .hint,
.home-tile-body small {
  display: block;
  margin: 0;
  padding: 0;
  color: rgba(89, 27, 11, 0.72);
  font-size: 14px;
  line-height: 1.45;
}

.step-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.step-meta span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--naranja);
}

.how {
  display: grid;
  gap: var(--space-16);
  margin: 0;
  grid-template-columns: 1fr;
}
.how-card {
  background: #fff;
  border-radius: var(--home-radius);
  padding: var(--space-24) var(--space-16);
  border: var(--home-border);
  box-shadow: var(--home-shadow);
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}
.how-n {
  font-family: Bardy, sans-serif;
  font-size: 42px;
  color: var(--naranja);
  line-height: 1;
  margin-bottom: var(--space-8);
}
.how-card h3 {
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  color: var(--cafe);
  margin: 0 0 var(--space-8);
}
.how-card p { margin: 0; font-size: 14px; line-height: 1.45; color: rgba(89, 27, 11, 0.8); }

.section-pad { padding-top: 0; }
.section-pad h2 { margin-bottom: var(--space-8); }
.section-lead {
  margin: 0 0 var(--space-24);
  max-width: 56ch;
  color: rgba(89, 27, 11, 0.78);
}

.foot {
  background: var(--naranja);
  color: #fff;
  padding: 36px 20px 28px;
  text-align: center;
}
.foot img.logo { height: 48px; margin: 0 auto 16px; }
.socials { display: flex; justify-content: center; gap: 14px; margin: 12px 0 18px; }
.socials img { width: 36px; height: 36px; }
.foot p {
  margin: 0 auto;
  max-width: 42ch;
  font-size: 13px;
  font-weight: 500;
  opacity: 0.92;
}
.foot small { display: block; margin-top: 16px; opacity: 0.7; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }

.qr-box {
  width: min(220px, 100%);
  aspect-ratio: 1;
  height: auto;
  margin: 0 auto 8px;
  background: #fff;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 4px 7px 0 var(--naranja-sombra);
  padding: 12px;
}
.qr-box img,
.qr-box canvas {
  max-width: 100%;
  height: auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.page-form .card { padding: clamp(18px, 3.5vw, 28px) clamp(16px, 3vw, 24px) clamp(18px, 3vw, 24px); }

table tbody tr { transition: background 0.2s var(--ease); }
table tbody tr:hover { background: var(--crema-2); }

.empty {
  text-align: center;
  padding: 28px 12px;
  color: rgba(89, 27, 11, 0.65);
}

.input-row { display: grid; gap: 14px; grid-template-columns: 1fr; }

.caja-shell .site-head { background: transparent; padding: 0 0 18px; position: static; }
.caja-shell .wrap { width: var(--wrap-form); }

.who {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  padding: 10px 16px;
  margin: 8px auto 6px;
  max-width: 640px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}
.who span + span::before {
  content: "·";
  margin-right: 16px;
  opacity: 0.5;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--crema-2);
  border-radius: 18px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
}
.check input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--naranja);
  flex-shrink: 0;
}

.stamp {
  display: inline-block;
  font-family: Bardy, sans-serif;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--naranja);
  border: 2px solid var(--naranja);
  padding: 6px 12px;
  border-radius: 999px;
  transform: rotate(-6deg);
  margin-bottom: 10px;
}

input:not([type="file"]):not([type="radio"]):not([type="hidden"]):not([type="checkbox"]),
select,
textarea,
.input,
.btn,
.card,
.store-pick,
.role,
.home-tile {
  max-width: 100%;
}

.step-meta { flex-wrap: wrap; }
.lead { overflow-wrap: anywhere; }
.caja-shell .wrap { width: min(45rem, 100%); }
.caja-shell .topbar { align-items: flex-start; }
.caja-shell h2 { overflow-wrap: anywhere; }

/* —— Teléfonos pequeños (SE / 320–379) —— */
@media (max-width: 379px) {
  .nav-pills:has(> :nth-child(3)) {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .pill-link {
    padding: 8px 10px;
    font-size: 11px;
    letter-spacing: 0;
  }
  .hero .topbar,
  .site-head {
    flex-direction: column;
    align-items: stretch;
  }
  .hero .brand,
  .site-head .brand { justify-content: flex-start; }
  .grid-3 { grid-template-columns: 1fr; }
  .stat b { font-size: clamp(26px, 10vw, 36px); }
  .marquee-track img {
    height: 72px;
    width: 96px;
  }
  .how-card h3 { font-size: 22px; }
  .store-pick strong,
  .role strong { font-size: 20px; }
}

/* —— Teléfonos (hasta 639) —— */
@media (max-width: 639px) {
  .hero .topbar,
  .site-head {
    flex-direction: column;
    align-items: stretch;
  }
  .nav-pills:has(> :nth-child(3)) {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn,
  .page-head .btn,
  .card form .btn { width: 100%; }
  .hero-copy { max-width: none; }
  .lead { max-width: none; }
  .who { border-radius: 20px; }
  .who span {
    flex: 1 1 100%;
  }
  .who span + span::before {
    display: none;
  }
  .check { font-size: 12px; }
  .foot { padding: 28px 16px 24px; }
  .caja-shell .topbar {
    flex-direction: row;
    align-items: flex-start;
  }
}

/* Tablas en tarjeta en móvil / phablet */
@media (max-width: 699px) {
  .stack-table thead { display: none; }
  .stack-table,
  .stack-table tbody,
  .stack-table tr,
  .stack-table td {
    display: block;
    width: 100%;
  }
  .stack-table tr {
    padding: 4px 0 12px;
    border-bottom: 1px solid var(--linea);
  }
  .stack-table tr:last-child { border-bottom: 0; }
  .stack-table td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 8px 0;
    border: 0;
    text-align: right;
  }
  .stack-table td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(89, 27, 11, 0.55);
    text-align: left;
    flex: 0 0 38%;
  }
  .stack-table td small { display: block; }
}

@media (max-width: 899px) {
  .stack-table.stack-md thead { display: none; }
  .stack-table.stack-md,
  .stack-table.stack-md tbody,
  .stack-table.stack-md tr,
  .stack-table.stack-md td {
    display: block;
    width: 100%;
  }
  .stack-table.stack-md tr {
    padding: 4px 0 12px;
    border-bottom: 1px solid var(--linea);
  }
  .stack-table.stack-md td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 8px 0;
    border: 0;
    text-align: right;
  }
  .stack-table.stack-md td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(89, 27, 11, 0.55);
    text-align: left;
    flex: 0 0 38%;
  }
}

@media (min-width: 380px) and (max-width: 639px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat span { font-size: 9px; }
  .stat b { overflow-wrap: anywhere; }
}

@media (hover: none) {
  .btn:hover { transform: none; box-shadow: 4px 7px 0 var(--naranja-sombra); }
  .btn-ok:hover { box-shadow: 4px 7px 0 #01351e; }
  .btn-ghost:hover { box-shadow: 4px 7px 0 rgba(89, 27, 11, 0.25); }
  .store-pick:hover,
  .role:hover,
  .home-tile:hover { transform: none; }
}

@media (min-width: 640px) {
  .store-grid,
  .product-grid,
  .roles,
  .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-grid-steps { grid-template-columns: 1fr; }
  .input-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .actions-nav { grid-template-columns: 1fr 2fr; align-items: stretch; }
  .hero {
    padding:
      max(28px, env(safe-area-inset-top, 0px))
      max(40px, env(safe-area-inset-right, 0px))
      48px
      max(40px, env(safe-area-inset-left, 0px));
  }
  .who { border-radius: 999px; }
}

@media (min-width: 768px) {
  .how,
  .home-grid-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-tile-media { height: 148px; }
  .how-card { padding: var(--space-24); }
  .hero .topbar,
  .site-head { flex-wrap: nowrap; }
  .nav-pills { flex-wrap: nowrap; }
}

@media (min-width: 900px) {
  .hero { min-height: 100dvh; }
}

@media (min-width: 1024px) {
  .store-grid,
  .product-grid,
  .roles,
  .home-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-wrap { gap: 32px; }
  .section-lead { max-width: 62ch; }
  .hero {
    padding:
      max(36px, env(safe-area-inset-top, 0px))
      max(64px, env(safe-area-inset-right, 0px))
      64px
      max(64px, env(safe-area-inset-left, 0px));
  }
  .hero-copy { max-width: 680px; }
}

@media (min-width: 1280px) {
  :root { --wrap-home: min(80rem, calc(100% - 2 * var(--pad-x))); }
  .home-grid { gap: var(--space-24); }
  .home-tile-media { height: 160px; }
  .home-tile-body { padding: var(--space-16) var(--space-24) var(--space-24); }
}

@media (min-width: 1440px) {
  :root { --wrap-home: min(88rem, calc(100% - 2 * var(--pad-x))); }
  .hero-copy { max-width: 720px; }
}

@media (min-width: 1920px) {
  :root { --wrap-home: min(96rem, calc(100% - 2 * var(--pad-x))); }
  .home-tile-media { height: 176px; }
}

/* Landscape en teléfono / tablet pequeña: no obligar a un viewport de alto completo */
@media (orientation: landscape) and (max-height: 540px) {
  .hero {
    min-height: 100%;
    min-height: 100svh;
    grid-template-rows: auto auto;
    padding: max(10px, env(safe-area-inset-top, 0px)) 24px max(16px, env(safe-area-inset-bottom, 0px));
  }
  .hero-copy {
    justify-content: flex-start;
    padding: 8px 0 0;
    max-width: 54rem;
  }
  h1 { font-size: clamp(1.7rem, 8vh, 3.2rem); }
  .lead { margin-bottom: 12px; font-size: 14px; }
  .inner.auth {
    min-height: 0;
    justify-content: flex-start;
    padding-top: 16px;
    padding-bottom: 32px;
  }
  .cupo { font-size: clamp(2.4rem, 18vh, 5rem); margin: 12px 0 4px; }
  .caja-shell { padding-top: max(10px, env(safe-area-inset-top, 0px)); }
}

@media (orientation: landscape) and (max-height: 430px) {
  .hero-actions { flex-direction: row; }
  .hero-actions .btn { width: auto; }
  .kicker { margin-bottom: 4px; }
}

.wrap-admin {
  width: min(72rem, calc(100% - 2 * var(--pad-x)));
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 22px;
}

.admin-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  background: var(--blanco);
  border: 1px solid var(--linea);
  color: var(--cafe);
}

.admin-nav a.on {
  background: var(--naranja);
  color: var(--crema);
  border-color: var(--naranja);
}

.readonly-banner {
  background: #fff6eb;
  border: 1px dashed var(--linea);
  padding: 12px 16px;
  border-radius: 18px;
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.45;
}

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

.meter-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.meter-list li {
  margin-bottom: 14px;
}

.meter-list span {
  font-size: 13px;
}

.meter-list strong {
  float: right;
  font-size: 13px;
}

.meter {
  height: 10px;
  background: rgba(253, 82, 0, 0.15);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 6px;
}

.meter > span {
  display: block;
  height: 100%;
  background: var(--naranja);
}

.hour-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 88px;
}

.hour-bar {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  min-width: 0;
}

.hour-bar span {
  display: block;
  width: 100%;
  background: var(--naranja);
  border-radius: 4px 4px 0 0;
  min-height: 3px;
}

.badge-self {
  display: inline-block;
  background: #fff3cd;
  color: #7a4b00;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 99px;
  margin-left: 6px;
}

.auth-error {
  background: #ffe8e4;
  color: var(--rojo);
  padding: 12px 14px;
  border-radius: 16px;
  font-weight: 600;
}

@media (min-width: 860px) {
  .insight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

body.app-shell {
  min-height: 100dvh;
  overflow-x: clip;
}
body.app-shell.caja-shell {
  padding: 0;
  background: #2a0c04;
}

.app {
  display: flex;
  min-height: 100dvh;
  min-height: 100svh;
}

.app-scrim {
  position: fixed;
  inset: 0;
  background: rgba(42, 12, 4, 0.45);
  z-index: 35;
  border: 0;
}

.app-sidebar {
  width: 268px;
  flex: 0 0 268px;
  display: flex;
  flex-direction: column;
  background: #3a1408;
  color: var(--crema);
  padding:
    max(16px, env(safe-area-inset-top, 0px))
    14px
    max(16px, env(safe-area-inset-bottom, 0px));
  min-height: 100dvh;
  transition: width 0.22s var(--ease), flex-basis 0.22s var(--ease), transform 0.22s var(--ease);
  z-index: 40;
}

.app-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 18px;
}
.app-brand img { height: 36px; }
.app-collapse,
.app-burger {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 253, 249, 0.1);
  cursor: pointer;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.app-collapse-icon {
  width: 10px;
  height: 10px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  display: block;
}
body.sidebar-collapsed .app-collapse-icon { transform: rotate(-135deg); }

.app-who {
  margin: 0 8px 18px;
  min-width: 0;
}
.app-who strong,
.app-who small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-who .kicker { color: #ffb48a; }
.app-who small { opacity: 0.72; font-size: 12px; margin-top: 2px; }

.app-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.app-menu a,
.app-out {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  color: inherit;
}
.app-menu a:hover,
.app-out:hover { background: rgba(255, 253, 249, 0.08); }
.app-menu a.on {
  background: var(--naranja);
  color: var(--crema);
}
.app-out { margin-top: auto; opacity: 0.9; }

.nav-ico {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  position: relative;
  border-radius: 6px;
  border: 2px solid currentColor;
}
.nav-ico-stats { border-width: 0; box-shadow: inset 3px 0 0 currentColor, inset 10px -6px 0 -4px currentColor, inset 17px -12px 0 -4px currentColor; }
.nav-ico-clientes,
.nav-ico-equipo { border-radius: 99px; }
.nav-ico-canjes { border-radius: 4px 10px 4px 10px; }
.nav-ico-videos { border-style: solid; clip-path: polygon(20% 10%, 90% 50%, 20% 90%); border: 0; background: currentColor; }
.nav-ico-promo { border-radius: 99px 99px 4px 99px; }
.nav-ico-tasas { border-radius: 99px; box-shadow: inset 0 0 0 4px currentColor; }
.nav-ico-combos { border-radius: 5px; }
.nav-ico-menu { border-radius: 4px; box-shadow: inset 9px 0 0 -7px currentColor, inset 0 9px 0 -7px currentColor; }
.nav-ico-sedes { border-radius: 99px 99px 4px 4px; }
.nav-ico-canje { border-radius: 99px; }
.nav-ico-movimientos { border-width: 0; border-top: 2px solid currentColor; box-shadow: 0 6px 0 -4px currentColor, 0 12px 0 -4px currentColor; height: 16px; }
.nav-ico-bitacora { border-radius: 2px; box-shadow: inset 0 8px 0 -6px currentColor; }
.nav-ico-out { border: 0; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; width: 12px; height: 12px; transform: rotate(-45deg); border-radius: 0; }

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--crema);
  color: var(--cafe);
}
.caja-shell .app-main {
  background: transparent;
  color: #fff;
}
.app-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px var(--pad-x) 8px;
}
.app-top h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3.4vw, 2.1rem);
}
.caja-shell .app-top h2 { color: #fff; }
.caja-shell .app-back { color: #ffd7c4; }
.app-top-copy { min-width: 0; flex: 1; }
.app-top-copy .hint { margin: 4px 0 0; }
.app-burger { display: none; flex-direction: column; gap: 5px; background: var(--naranja); }
.app-burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--crema);
}
.caja-shell .app-burger { background: rgba(255, 253, 249, 0.14); }

.app-cupo {
  font-family: Bardy, sans-serif;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  white-space: nowrap;
}

.app-content {
  flex: 1;
  width: min(72rem, calc(100% - 2 * var(--pad-x)));
  margin: 0 auto;
  padding: 8px 0 48px;
}

body.sidebar-collapsed .app-sidebar {
  width: 84px;
  flex-basis: 84px;
}
body.sidebar-collapsed .app-who,
body.sidebar-collapsed .nav-label {
  display: none;
}
body.sidebar-collapsed .app-menu a,
body.sidebar-collapsed .app-out {
  justify-content: center;
  padding-inline: 10px;
}
body.sidebar-collapsed .app-sidebar-head { justify-content: center; }
body.sidebar-collapsed .app-brand { display: none; }

@media (max-width: 899px) {
  .app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    transform: translateX(-105%);
    box-shadow: 18px 0 40px rgba(0, 0, 0, 0.18);
  }
  body.sidebar-open .app-sidebar { transform: none; }
  body.sidebar-collapsed .app-sidebar {
    width: 268px;
    flex-basis: 268px;
  }
  body.sidebar-collapsed .app-who,
  body.sidebar-collapsed .nav-label { display: block; }
  body.sidebar-collapsed .app-brand { display: block; }
  body.sidebar-collapsed .app-menu a,
  body.sidebar-collapsed .app-out { justify-content: flex-start; padding-inline: 12px; }
  .app-collapse { display: none; }
  .app-burger { display: inline-flex; }
}

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

.menu-edit {
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--linea);
}
.menu-edit-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  align-items: start;
}
.menu-edit .thumb {
  border-radius: 18px;
  height: 140px;
}
.store-menu {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin: 12px 0 8px;
}
.store-menu-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--linea);
  border-radius: 16px;
  background: var(--crema-2);
  cursor: pointer;
}
.store-menu-item .thumb {
  height: 88px;
  border-radius: 12px;
}
.store-menu-item strong { font-size: 13px; line-height: 1.2; }
.store-menu-item small { opacity: 0.7; font-size: 12px; }
.profit-kpis .stat b { font-size: clamp(1.1rem, 2.4vw, 1.6rem); }

@media (max-width: 699px) {
  .menu-edit-grid { grid-template-columns: 1fr; }
}

.busy {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(89, 27, 11, 0.45);
  color: #fffdf9;
  text-align: center;
}
.busy[hidden] { display: none; }
.busy-spin {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255, 253, 249, 0.25);
  border-top-color: #fffdf9;
  border-radius: 99px;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
body.is-busy { cursor: wait; }
