/* OneDrop — sistema de diseño (paleta neutra contenida) */

:root {
  --bg-page: #08090b;
  --bg: #0b0d10;
  --panel: #0e1114;
  --card: #161a1e;
  --header: #111417;
  --line: #242a30;
  --line-strong: #333a42;
  --text: #eceef1;
  --text-2: #a2a9b2;
  --muted: #6e767f;
  --gold: #bf9a58;
  --gold-soft: #d4b778;
  --gold-bg: #2a2214;
  --blue: #7c9cb8;
  --blue-bg: #1b2733;
  --green: #6e9b7c;
  --danger: #b0706e;
  --epic: #8e85a8;
  --radius: 16px;
  --radius-s: 12px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "tnum" 1, "cv05" 1;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  color: var(--text);
  background: transparent;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin-bottom: 0;
}

h2 {
  font-size: 1.55rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 0;
}

h3 {
  font-size: 1.02rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.shell {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3.5vw, 40px);
}

/* ------------------------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(17, 20, 23, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand svg {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 2px 6px rgba(191, 154, 88, 0.35));
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.top-nav .nav-item {
  padding: 6px 2px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-2);
  border-radius: 6px;
  transition: color 140ms ease;
}

.top-nav .nav-item:hover,
.top-nav .nav-item.is-active {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
}

.segment {
  min-height: 30px;
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  border-radius: 9px;
}

.segment.is-active {
  background: var(--text);
  color: var(--bg);
}

.segment:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.segmented.is-locked {
  opacity: 0.85;
}

/* ---------------------------------------------------------------- botones */

.light-button,
.gold-button,
.primary-button,
.ghost-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-s);
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.light-button {
  background: var(--text);
  color: var(--bg);
}

.light-button:hover {
  transform: translateY(-1px);
}

.gold-button,
.primary-button {
  background: var(--gold);
  color: var(--bg);
}

.gold-button:hover,
.primary-button:hover {
  transform: translateY(-1px);
}

.ghost-button {
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line-strong);
}

.ghost-button:hover {
  border-color: var(--muted);
}

.icon-button {
  width: 42px;
  padding: 0;
  background: var(--panel);
  border: 1px solid var(--line);
}

.light-button svg,
.gold-button svg,
.primary-button svg,
.ghost-button svg,
.icon-button svg,
.nav-item svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

/* ------------------------------------------------------------------- main */

.main {
  min-height: 60vh;
  padding: clamp(20px, 4vw, 40px) 0 72px;
}

.view {
  display: none;
}

.view.is-visible {
  display: block;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.section-head.compact {
  margin-bottom: 14px;
}

.section-head p.lede,
.lede {
  margin: 10px 0 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-2);
  text-wrap: pretty;
}

/* -------------------------------------------------------------------- hero */

.hero {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(16px, 2vw, 32px);
  align-items: center;
  padding: clamp(8px, 3vw, 40px) 0 clamp(28px, 4vw, 56px);
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 580px;
}

.hero-text .lede {
  margin: 0;
  font-size: 1.05rem;
  max-width: 480px;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  padding-top: 4px;
  flex-wrap: wrap;
}

.hero-ctas .light-button,
.hero-ctas .ghost-button {
  min-height: 50px;
  padding: 0 26px;
}

.hero-points {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 10px 0 0;
  list-style: none;
}

.hero-points li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.85rem;
  color: var(--text-2);
}

.hero-points li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 340px;
}

/* La imagen se funde con el fondo: sin caja ni borde, mas grande y corrida
   al borde derecho para llenar el hero. Los bordes se desvanecen con mascara. */
.hero-visual img {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  object-position: right center;
  display: block;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 22%, #000 100%),
    linear-gradient(to bottom, transparent 0%, #000 10%, #000 90%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0%, #000 22%, #000 100%),
    linear-gradient(to bottom, transparent 0%, #000 10%, #000 90%, transparent 100%);
  mask-composite: intersect;
}

/* --------------------------------------------------------- franja de cuenta */

.account-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
}

.chip svg {
  width: 16px;
  height: 16px;
  color: var(--blue);
}

.chip b {
  font-size: 0.98rem;
  font-weight: 700;
}

.chip span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.chip-balance {
  border-color: rgba(185, 155, 98, 0.45);
}

.chip-balance svg {
  color: var(--gold);
}

.header-balance {
  min-height: 38px;
  padding: 0 12px;
  cursor: pointer;
  transition: border-color 140ms ease;
}

.header-balance:hover {
  border-color: var(--gold);
}

.header-balance b {
  font-size: 0.88rem;
}

.account-strip .gold-button {
  margin-left: auto;
}

/* ------------------------------------------------------- barra de confianza */

.trust-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 28px;
  padding: 20px 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.trust-bar > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.trust-bar span:first-child {
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.trust-bar span:last-child {
  font-size: 0.88rem;
  color: var(--text-2);
}

/* ------------------------------------------------------------- superficies */

.surface {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
  margin-bottom: 40px;
}

.key-pack-list,
.activity-list,
.economy-list {
  display: grid;
  gap: 10px;
}

.key-pack,
.activity-item,
.economy-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
}

.key-pack strong,
.activity-item strong,
.economy-item strong {
  display: block;
  font-size: 0.92rem;
}

.key-pack small,
.activity-item small,
.economy-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.45;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  background: var(--blue-bg);
  color: var(--blue);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.pill-gold {
  background: var(--gold-bg);
  color: var(--gold);
}

.empty-state {
  min-height: 72px;
  display: grid;
  place-items: center;
  padding: 18px;
  color: var(--muted);
  font-size: 0.88rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-s);
  text-align: center;
}

/* --------------------------------------------------------------- secciones */

.landing-block {
  padding: clamp(28px, 4vw, 48px) 0;
  border-top: 1px solid var(--line);
}

.landing-block .block-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 26px;
  max-width: 620px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-number {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--blue-bg);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.step strong {
  font-size: 1rem;
  font-weight: 600;
}

.step span {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-2);
}

.teaser-layout {
  display: grid;
  grid-template-columns: minmax(260px, 380px) 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

.teaser-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.teaser-copy p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-2);
}

.teaser-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.teaser-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.teaser-card.is-legend {
  border-color: var(--gold);
}

.teaser-card .teaser-art {
  aspect-ratio: 1.6;
  border-radius: var(--radius-s);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.teaser-card .teaser-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8%;
  display: block;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5));
}

.teaser-card .teaser-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
}

.teaser-card .teaser-name small {
  font-weight: 500;
  color: var(--muted);
}

.teaser-card.is-legend .teaser-name small {
  color: var(--gold);
}

.teaser-card > small {
  color: var(--muted);
  font-size: 0.8rem;
}

/* --------------------------------------------------------------------- faq */

.faq-layout {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: clamp(24px, 4vw, 56px);
}

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item button {
  width: 100%;
  min-height: 58px;
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.98rem;
  font-weight: 500;
  text-align: left;
}

.faq-sign {
  flex: none;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
}

.faq-sign::before {
  content: "+";
}

.faq-item.is-open .faq-sign::before {
  content: "–";
}

.faq-answer {
  display: none;
  margin: 0;
  padding: 0 0 18px;
  max-width: 640px;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-2);
  text-wrap: pretty;
}

.faq-item.is-open .faq-answer {
  display: block;
}

/* ---------------------------------------------------------------- recargas */

.inline-field {
  display: grid;
  gap: 6px;
  min-width: min(320px, 100%);
}

label {
  color: var(--text-2);
  font-size: 0.85rem;
  font-weight: 600;
}

input,
select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(124, 156, 184, 0.15);
}

input[type="file"] {
  padding: 9px 12px;
  min-height: 46px;
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.price-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.price-card.is-best {
  border-color: var(--line-strong);
}

.price-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.diamond-count {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.diamond-count svg {
  width: 19px;
  height: 19px;
  color: var(--blue);
}

.price-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.price {
  color: var(--gold);
  font-size: 1.2rem;
  font-weight: 650;
}

.per-diamond {
  color: var(--muted);
  font-size: 0.76rem;
}

/* -------------------------------------------------------------------- cajas */

.keys-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.keys-count {
  display: flex;
  align-items: center;
  gap: 12px;
}

.keys-count svg {
  width: 24px;
  height: 24px;
  color: var(--gold);
}

.keys-count b {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
}

.keys-count span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.key-pack-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.key-pack-inline button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 13px;
  font-weight: 600;
  font-size: 0.85rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  transition: border-color 140ms ease;
}

.key-pack-inline button:hover {
  border-color: var(--gold);
}

.key-pack-inline button svg {
  width: 14px;
  height: 14px;
  color: var(--gold);
}

.key-pack-inline button small {
  color: var(--muted);
  font-weight: 500;
}

.box-stage {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(280px, 1.1fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.box-visual,
.result-panel {
  min-height: 250px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.box-visual {
  position: relative;
  display: grid;
  place-items: center;
}

/* Halo detras del cofre segun la rareza que se este abriendo */
.box-visual::before {
  content: "";
  position: absolute;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.55;
  background: radial-gradient(circle, rgba(212, 183, 120, 0.4), transparent 70%);
  transition: background 300ms ease;
}

.box-visual.box-art-basic::before {
  background: radial-gradient(circle, rgba(191, 154, 88, 0.3), transparent 70%);
}

.box-visual.box-art-elite::before {
  background: radial-gradient(circle, rgba(142, 133, 168, 0.36), transparent 70%);
}

.box-visual.box-art-legend::before {
  background: radial-gradient(circle, rgba(212, 183, 120, 0.42), transparent 70%);
}

.box-visual img {
  position: relative;
  width: 100%;
  height: 100%;
  max-height: 300px;
  object-fit: contain;
  padding: 22px;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.55));
}

.box-visual.is-opening img {
  animation: openPulse 820ms ease-in-out 2;
}

.result-panel {
  display: grid;
  align-content: center;
  padding: 28px;
}

.result-panel p {
  margin-bottom: 0;
  line-height: 1.55;
  color: var(--text-2);
  font-size: 0.92rem;
}

.result-panel h3 {
  margin-bottom: 10px;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.result-panel .win {
  color: var(--gold);
}

.box-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.box-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.box-head h3 {
  margin: 0;
}

.box-floor {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.box-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.prob-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.prob-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  font-size: 0.86rem;
}

.prob-list li strong {
  color: var(--text);
  font-weight: 600;
}

.prob-list li:last-child {
  border-bottom: 0;
}

/* ------------------------------------------------------------------ ruleta */

.spinner-wrap {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  overflow: hidden;
  background: rgba(8, 9, 11, 0.97);
}

.spinner-wrap[hidden] {
  display: none;
}

.spinner-track {
  display: flex;
  gap: 8px;
  will-change: transform;
}

.spinner-cell {
  flex: 0 0 112px;
  height: 128px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  padding: 10px 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  text-align: center;
}

.spinner-cell b {
  font-size: 1.02rem;
  font-weight: 700;
}

.spinner-cell small {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.7rem;
  line-height: 1.25;
}

.spinner-icon {
  display: grid;
  place-items: center;
}

.spinner-icon svg {
  width: 24px;
  height: 24px;
  color: var(--muted);
}

.spinner-cell[data-tier="1"] .spinner-icon svg {
  color: var(--blue);
}

.spinner-cell[data-tier="2"] .spinner-icon svg {
  color: var(--epic);
}

.spinner-cell[data-tier="3"] .spinner-icon svg {
  color: var(--gold);
}

.spinner-cell[data-tier="3"] {
  border-color: rgba(185, 155, 98, 0.5);
}

.spinner-cell.is-winner {
  border-color: var(--gold);
  box-shadow: 0 0 22px rgba(185, 155, 98, 0.45);
  animation: winnerGlow 700ms ease-in-out infinite alternate;
}

.spinner-marker {
  position: absolute;
  left: 50%;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--gold);
  border-radius: 2px;
  transform: translateX(-50%);
  box-shadow: 0 0 14px rgba(185, 155, 98, 0.8);
}

@keyframes winnerGlow {
  from {
    box-shadow: 0 0 10px rgba(185, 155, 98, 0.35);
  }
  to {
    box-shadow: 0 0 26px rgba(185, 155, 98, 0.75);
  }
}

@keyframes openPulse {
  0% {
    transform: scale(1);
    filter: saturate(1);
  }
  55% {
    transform: scale(1.025);
    filter: saturate(1.35) brightness(1.1);
  }
  100% {
    transform: scale(1);
    filter: saturate(1);
  }
}

/* ------------------------------------------------------------------- tablas */

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}

th {
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

td {
  color: var(--text-2);
}

td strong {
  color: var(--text);
}

td small {
  color: var(--muted);
}

tr:last-child td {
  border-bottom: 0;
}

.coupons-surface {
  margin-bottom: 18px;
}

.coupon-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 18px;
  padding: 13px 16px;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  background: var(--gold-bg);
  border: 1px solid rgba(185, 155, 98, 0.55);
  border-radius: var(--radius-s);
  transition: border-color 140ms ease, transform 140ms ease;
}

.coupon-notice:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.coupon-notice svg {
  width: 18px;
  height: 18px;
  color: var(--gold);
  flex: 0 0 auto;
}

.coupon-notice b {
  margin-left: auto;
  color: var(--gold);
  font-weight: 700;
  white-space: nowrap;
}

.coupon-notice[hidden] {
  display: none;
}

.order-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 18px;
  padding: 13px 16px;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  background: var(--blue-bg);
  border: 1px solid rgba(124, 156, 184, 0.55);
  border-radius: var(--radius-s);
  transition: border-color 140ms ease, transform 140ms ease;
}

.order-notice:hover {
  border-color: var(--blue);
  transform: translateY(-1px);
}

.order-notice svg {
  width: 18px;
  height: 18px;
  color: var(--blue);
  flex: 0 0 auto;
}

.order-notice b {
  margin-left: auto;
  color: var(--blue);
  font-weight: 700;
  white-space: nowrap;
}

.order-notice[hidden] {
  display: none;
}

/* --------------------------------------------------------- pasos guiados */

.steps-banner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.step-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 160ms ease, opacity 160ms ease;
}

.step-chip .step-dot {
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.step-chip strong {
  display: block;
  font-size: 0.92rem;
}

.step-chip small {
  color: var(--muted);
  font-size: 0.78rem;
}

.step-chip.is-active {
  border-color: var(--gold);
}

.step-chip.is-active .step-dot {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg);
}

.step-chip.is-done .step-dot {
  background: var(--green);
  border-color: var(--green);
  color: var(--bg);
}

.step-chip.is-done .step-dot::after {
  content: "✓";
}

.step-chip.is-done .step-dot span,
.step-chip.is-done .step-dot {
  font-size: 0;
}

.step-chip.is-done .step-dot::after {
  font-size: 0.9rem;
}

.field-help {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
  font-weight: 400;
}

.prize-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 18px;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
}

.prize-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text-2);
}

.prize-legend b {
  color: var(--text);
}

.prize-legend svg {
  width: 15px;
  height: 15px;
}

.prize-legend span:first-child svg {
  color: var(--muted);
}

.prize-legend span:last-child svg {
  color: var(--blue);
}

/* estados de pedido con color */

.pill[data-state="pendiente"],
.pill[data-state="por reclamar"] {
  background: rgba(124, 156, 184, 0.14);
  color: var(--blue);
}

.pill[data-state="aprobado"],
.pill[data-state="entregado"] {
  background: rgba(110, 155, 124, 0.16);
  color: var(--green);
}

.pill[data-state="rechazado"] {
  background: rgba(176, 112, 110, 0.14);
  color: var(--danger);
}

/* estado de carga en botones */

.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.is-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: calc(50% - 8px);
  left: calc(50% - 8px);
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  color: var(--bg);
  animation: spin 600ms linear infinite;
}

.ghost-button.is-loading::after,
.key-pack-inline button.is-loading::after {
  color: var(--text);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.box-card.is-featured {
  border-color: rgba(191, 154, 88, 0.5);
}

.box-art {
  position: relative;
  display: grid;
  place-items: center;
  height: 140px;
  margin: -4px -4px 4px;
  border-radius: var(--radius-s);
  overflow: hidden;
}

/* Halo sutil detras del cofre segun rareza, para que resalte sobre la tarjeta */
.box-art::before {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  filter: blur(30px);
  opacity: 0.5;
}

.box-art-basic::before {
  background: radial-gradient(circle, rgba(191, 154, 88, 0.28), transparent 70%);
}

.box-art-elite::before {
  background: radial-gradient(circle, rgba(142, 133, 168, 0.32), transparent 70%);
}

.box-art-legend::before {
  background: radial-gradient(circle, rgba(212, 183, 120, 0.4), transparent 70%);
}

.box-art img {
  position: relative;
  height: 140px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5));
}

/* -------------------------------------------------------------------- admin */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stat-card span {
  display: block;
  margin-bottom: 4px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat-card small {
  color: var(--muted);
  font-size: 0.78rem;
}

.users-surface {
  margin-bottom: 18px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
}

.range-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}

.range-control span {
  color: var(--text-2);
  font-size: 0.85rem;
}

input[type="range"] {
  padding: 0;
  accent-color: var(--blue);
}

.economy-item strong[data-health="good"] {
  color: var(--green);
}

.economy-item strong[data-health="warn"] {
  color: var(--gold);
}

.economy-item strong[data-health="bad"] {
  color: var(--danger);
}

.order-actions {
  display: flex;
  gap: 8px;
}

/* ------------------------------------------------------------------ footer */

.site-footer {
  background: var(--header);
  border-top: 1px solid var(--line);
  padding: 48px 0 96px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
}

.footer-col > span:first-child {
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-col a,
.footer-col button {
  padding: 0;
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--text-2);
  text-align: left;
}

.footer-col a:hover,
.footer-col button:hover {
  color: var(--text);
}

.footer-col p {
  margin: 0;
  font-size: 0.83rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 280px;
}

.footer-legal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.footer-legal p {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ------------------------------------------------------------- nav movil */

.mobile-nav {
  position: fixed;
  inset: auto 0 0;
  z-index: 25;
  display: none;
  justify-content: space-around;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  background: rgba(17, 20, 23, 0.97);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}

.mobile-nav .nav-item {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 56px;
  padding: 7px 6px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 600;
  border-radius: 10px;
}

.mobile-nav .nav-item svg {
  width: 19px;
  height: 19px;
}

.mobile-nav .nav-item.is-active {
  color: var(--text);
}

/* ----------------------------------------------------------------- modales */

.modal {
  width: min(520px, calc(100vw - 28px));
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 0;
}

.modal::backdrop {
  background: rgba(4, 5, 7, 0.78);
  backdrop-filter: blur(5px);
}

.modal-body {
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.modal-body label {
  display: grid;
  gap: 7px;
}

.modal-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

.form-error {
  margin: 0;
  padding: 10px 12px;
  color: var(--danger);
  font-size: 0.87rem;
  background: rgba(176, 112, 110, 0.1);
  border: 1px solid rgba(176, 112, 110, 0.35);
  border-radius: var(--radius-s);
  line-height: 1.45;
}

.payment-info {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 16px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
}

.payment-qr {
  display: block;
  width: min(250px, 100%);
  border-radius: var(--radius-s);
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
  transition: transform 140ms ease;
}

.payment-qr:hover {
  transform: scale(1.02);
}

.payment-qr img {
  display: block;
  width: 100%;
  height: auto;
}

.payment-info strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
  color: var(--text);
}

.payment-info small {
  display: block;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.7;
}

.payment-info small b {
  color: var(--gold);
  font-size: 0.95rem;
  font-weight: 700;
}

.terms-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  font-weight: 400;
  font-size: 0.86rem;
  line-height: 1.5;
}

.terms-check input {
  width: 17px;
  min-height: 17px;
  margin-top: 2px;
  accent-color: var(--gold);
}

.rules-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  line-height: 1.55;
  color: var(--text-2);
  font-size: 0.9rem;
}

/* ------------------------------------------------------------------- extras */

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  max-width: min(420px, calc(100vw - 40px));
  padding: 12px 15px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-s);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.4);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.whatsapp-fab {
  position: fixed;
  right: 18px;
  bottom: 20px;
  z-index: 24;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  color: var(--text-2);
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  transition: transform 140ms ease, color 140ms ease;
}

.whatsapp-fab:hover {
  transform: scale(1.06);
  color: var(--text);
}

.whatsapp-fab svg {
  width: 24px;
  height: 24px;
}

.whatsapp-fab[hidden] {
  display: none;
}

/* -------------------------------------------------------------- responsive */

@media (max-width: 1060px) {
  .top-nav {
    gap: 16px;
  }

  .price-grid,
  .box-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-layout,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .stat-grid,
  .trust-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .teaser-layout,
  .faq-layout {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .steps-banner {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

@media (max-width: 820px) {
  .top-nav {
    display: none;
  }

  .mobile-nav {
    display: flex;
  }

  .header-actions .ghost-button span,
  .header-actions .gold-button span {
    display: none;
  }

  .header-actions .ghost-button,
  .header-actions .gold-button {
    width: 42px;
    padding: 0;
  }

  .header-balance {
    padding: 0 10px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 4px;
  }

  .hero-visual {
    min-height: 200px;
    max-height: 240px;
  }

  .hero-visual img {
    min-height: 200px;
  }

  .price-grid,
  .box-grid,
  .teaser-grid {
    grid-template-columns: 1fr;
  }

  .box-stage {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-strip .gold-button {
    margin-left: 0;
    width: 100%;
  }

  .whatsapp-fab {
    bottom: 84px;
  }

  .toast {
    bottom: 84px;
  }

  .site-footer {
    padding-bottom: 120px;
  }
}

@media (max-width: 560px) {
  .header-inner {
    gap: 8px;
  }

  /* En pantallas muy chicas dejamos solo el logo para que quepa el saldo */
  .brand span {
    display: none;
  }

  .header-actions {
    gap: 7px;
  }

  .header-balance {
    padding: 0 10px;
    min-height: 40px;
  }

  .header-balance b {
    font-size: 0.82rem;
  }

  .segment {
    padding: 0 10px;
  }

  .steps-banner {
    gap: 8px;
  }

  .keys-bar {
    padding: 12px 14px;
  }

  .prize-legend {
    flex-direction: column;
    gap: 8px;
  }

  .box-head h3 {
    font-size: 1.05rem;
  }

  h1 {
    font-size: 1.85rem;
  }

  .main {
    padding-top: 16px;
  }

  .modal {
    width: calc(100vw - 20px);
  }

  .modal-body {
    padding: 18px;
  }

  .segmented,
  .account-strip .chip {
    flex: 1 1 auto;
  }
}
