/* DalePuja — frontend público. Tema oscuro vibrante, mobile-first. */

:root {
  --bg: #0b0620;
  --bg2: #120a2e;
  --card: #1a1042;
  --card2: #22155a;
  --line: rgba(255, 255, 255, 0.1);
  --line2: rgba(255, 255, 255, 0.18);
  --txt: #ffffff;
  --mut: #bdb4e6;
  --y: #ffd400;
  --o: #ff7a00;
  --p: #ff2e88;
  --c: #00e5ff;
  --g: #b6ff00;
  --v: #8a3dff;
  --red: #ff3355;
  --hot: linear-gradient(135deg, #ffd400 0%, #ff7a00 45%, #ff2e88 100%);
  --cool: linear-gradient(135deg, #00e5ff 0%, #8a3dff 100%);
  --head: "Arial Black", "Segoe UI Black", "Helvetica Neue", Impact, system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 20px;
  --burst: polygon(50% 0%, 56.6% 12.6%, 67.1% 3%, 69% 17.1%, 82.1% 11.7%, 79.1% 25.6%, 93.3% 25%, 85.7% 37%, 99.2% 41.3%, 88% 50%, 99.2% 58.7%, 85.7% 63%, 93.3% 75%, 79.1% 74.4%, 82.1% 88.3%, 69% 82.9%, 67.1% 97%, 56.6% 87.4%, 50% 100%, 43.4% 87.4%, 32.9% 97%, 31% 82.9%, 17.9% 88.3%, 20.9% 74.4%, 6.7% 75%, 14.3% 63%, 0.8% 58.7%, 12% 50%, 0.8% 41.3%, 14.3% 37%, 6.7% 25%, 20.9% 25.6%, 17.9% 11.7%, 31% 17.1%, 32.9% 3%, 43.4% 12.6%);
  --bottom-nav: 64px;
  --dock-h: 76px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--txt);
  font: 16px/1.45 var(--body);
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(138, 61, 255, 0.35), transparent 60%),
    radial-gradient(800px 500px at 110% 10%, rgba(255, 46, 136, 0.25), transparent 60%),
    radial-gradient(900px 600px at 50% 120%, rgba(0, 229, 255, 0.14), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  padding-bottom: calc(var(--bottom-nav) + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--c); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--head); font-weight: 900; line-height: 1.08; margin: 0 0 0.4em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.7rem, 6vw, 2.8rem); }
h2 { font-size: clamp(1.25rem, 4vw, 1.6rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 0.8em; }
s { color: var(--mut); text-decoration-thickness: 2px; }
button, input { font: inherit; }
input, select, textarea { font-size: max(16px, 1rem); }
:focus-visible { outline: 3px solid var(--y); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.muted { color: var(--mut); }
.small { font-size: 0.85rem; }
.grad { background: var(--hot); -webkit-background-clip: text; background-clip: text; color: transparent; }
.center { text-align: center; }

/* ---------------------------------------------------------------- encabezado */

.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 6, 32, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-in {
  max-width: 1240px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--txt); text-decoration: none !important; flex-shrink: 0; }
.brand-logo { width: 34px; height: 34px; transition: transform 0.3s; }
.brand:hover .brand-logo { transform: rotate(-20deg) scale(1.08); }
.brand-txt { font-family: var(--head); font-size: 1.3rem; letter-spacing: -0.02em; }
.brand-txt b { background: var(--hot); -webkit-background-clip: text; background-clip: text; color: transparent; }
.top-nav { display: none; gap: 4px; margin-left: 18px; }
.top-nav a {
  color: var(--mut); font-weight: 700; padding: 8px 12px; border-radius: 999px; text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.top-nav a:hover { color: var(--txt); background: rgba(255, 255, 255, 0.07); }
.top-nav a.is-active { color: #1a0b3d; background: var(--y); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.net {
  font-size: 0.72rem; font-weight: 700; color: #1a0b3d; background: var(--y);
  padding: 3px 8px; border-radius: 999px; animation: blink 1s steps(2) infinite;
}
.admin-link {
  display: none;
  font-size: 0.8rem; font-weight: 800; color: var(--g); border: 1px solid rgba(182, 255, 0, 0.5);
  padding: 4px 8px; border-radius: 8px;
}
.wallet {
  position: relative;
  display: flex; align-items: center; gap: 6px;
  padding: 5px 12px 5px 6px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 212, 0, 0.2), rgba(255, 122, 0, 0.2));
  border: 2px solid var(--y);
  color: var(--txt); text-decoration: none !important;
  transition: transform 0.15s;
}
.wallet:hover { transform: scale(1.05); }
.wallet:active { transform: scale(0.96); }
.wallet-star {
  width: 24px; height: 24px; flex-shrink: 0;
  background: var(--y); clip-path: var(--burst);
  animation: spin 8s linear infinite;
}
.wallet-num { font-family: var(--head); font-size: 1.1rem; min-width: 1ch; }
.wallet-lab { font-size: 0.72rem; color: var(--mut); font-weight: 700; }
.wallet.is-empty { border-color: var(--red); background: rgba(255, 51, 85, 0.15); }
.wallet.is-empty .wallet-star { background: var(--red); }
.wallet-up { animation: walletUp 0.8s ease; }
.wallet-down { animation: walletDown 0.6s ease; }
.user-btn {
  max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 800; color: #1a0b3d; background: var(--c);
  padding: 7px 14px; border-radius: 999px; text-decoration: none !important;
  transition: transform 0.15s, box-shadow 0.2s;
}
.user-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0, 229, 255, 0.4); }
.user-btn.is-user { display: none; color: var(--txt); background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line2); }

/* Cinta de ganadores */
.ticker { display: none; align-items: center; border-top: 1px solid var(--line); background: rgba(255, 46, 136, 0.12); overflow: hidden; height: 32px; }
.tk-label {
  flex-shrink: 0; height: 100%; display: flex; align-items: center; padding: 0 10px;
  font-family: var(--head); font-size: 0.7rem; letter-spacing: 0.06em; color: #1a0b3d; background: var(--hot);
}
.tk-view { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.tk-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.ticker:hover .tk-track { animation-play-state: paused; }
.tk-item { display: inline-flex; align-items: center; gap: 5px; padding: 0 18px; white-space: nowrap; color: var(--txt); font-size: 0.85rem; text-decoration: none !important; }
.tk-star { color: var(--y); }
.tk-price { color: var(--y); }
.tk-pct { font-family: var(--head); font-size: 0.7rem; color: #1a0b3d; background: var(--g); padding: 1px 6px; border-radius: 6px; }
.tk-sep { width: 40px; }

/* ---------------------------------------------------------------- estructura */

.view { max-width: 1240px; margin: 0 auto; padding: 14px 12px 32px; outline: none; }
.loading { padding: 60px 0; text-align: center; color: var(--mut); font-weight: 700; animation: blink 1.2s ease-in-out infinite; }
.panel {
  background: linear-gradient(180deg, rgba(34, 21, 90, 0.75), rgba(26, 16, 66, 0.75));
  border: 1px solid var(--line); border-radius: var(--r); padding: 16px;
}
.panel.center { text-align: center; padding: 32px 18px; }
.panel.narrow { max-width: 520px; margin: 30px auto; }
.panel-title { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; margin-bottom: 12px; }
.empty { color: var(--mut); padding: 18px; text-align: center; border: 2px dashed var(--line2); border-radius: 16px; }
.empty.big { padding: 40px 18px; font-size: 1.1rem; }
.row-btns { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.row-btns.center { justify-content: center; }
.page-head { margin: 10px 0 20px; }
.sect { margin: 26px 0 0; min-width: 0; }
.sect-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.sect-title { margin: 0; display: flex; align-items: center; gap: 8px; }
.sect-count { color: var(--mut); font-size: 0.85rem; font-weight: 700; }
.sect-more { font-weight: 800; }
.tag-live {
  font-family: var(--head); font-size: 0.7rem; letter-spacing: 0.06em; color: #fff;
  background: var(--red); padding: 3px 8px; border-radius: 6px; animation: pulseSoft 1.6s ease-in-out infinite;
}
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(255, 51, 85, 0.7); animation: ping 1.6s infinite; flex-shrink: 0; }

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

.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px; border: 0; border-radius: 14px; cursor: pointer;
  font-family: var(--head); font-size: 0.95rem; letter-spacing: 0.01em; text-transform: uppercase;
  color: #1a0b3d; background: var(--hot); text-decoration: none !important;
  box-shadow: 0 5px 0 #a3134f, 0 10px 24px rgba(255, 46, 136, 0.3);
  transition: transform 0.08s, box-shadow 0.08s, filter 0.2s;
}
.btn:hover { filter: brightness(1.08) saturate(1.1); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #a3134f, 0 4px 12px rgba(255, 46, 136, 0.3); }
.btn:disabled { filter: grayscale(0.8) brightness(0.7); cursor: not-allowed; transform: none; }
.btn.is-busy { cursor: progress; filter: brightness(0.85); }
.btn-ghost { color: var(--txt); background: rgba(255, 255, 255, 0.06); border: 2px solid var(--line2); box-shadow: none; }
.btn-ghost:active { box-shadow: none; }
.btn-xl { min-height: 56px; font-size: 1.1rem; width: 100%; }

/* Botón PUJAR */
.bid {
  position: relative; overflow: hidden; isolation: isolate;
  width: 100%; border: 0; cursor: pointer; color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: 18px; padding: 10px 14px;
  background: linear-gradient(135deg, #ff2e88 0%, #ff5a3d 55%, #ff9a00 100%);
  box-shadow: 0 6px 0 #9e0f4b, 0 14px 30px rgba(255, 46, 136, 0.45);
  transition: transform 0.07s, box-shadow 0.07s, filter 0.2s, background 0.3s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.bid:hover:not(:disabled) { filter: brightness(1.1) saturate(1.1); }
.bid:active:not(:disabled) { transform: translateY(5px) scale(0.99); box-shadow: 0 1px 0 #9e0f4b, 0 6px 14px rgba(255, 46, 136, 0.4); }
.bid-main { font-family: var(--head); font-size: 1.3rem; letter-spacing: 0.02em; line-height: 1.05; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); }
.bid-sub { font-size: 0.78rem; font-weight: 800; opacity: 0.95; }
.bid-main, .bid-sub { position: relative; z-index: 1; }
.bid-md { min-height: 64px; }
.bid-lg { min-height: 78px; }
.bid-lg .bid-main { font-size: 1.6rem; }
.bid-xl { min-height: 96px; border-radius: 22px; }
.bid-xl .bid-main { font-size: clamp(2rem, 9vw, 2.6rem); }
.bid-xl .bid-sub { font-size: 0.9rem; }
.bid-shine {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.45) 50%, transparent 65%);
  transform: translateX(-120%); animation: shine 2.8s ease-in-out infinite;
}
.bid.is-busy { filter: brightness(0.85); cursor: progress; }
.bid.is-busy .bid-main { animation: blink 0.5s steps(2) infinite; }
.bid-is-ready .bid-main::after { content: ""; }
.bid-is-leading {
  background: linear-gradient(135deg, #2ee88a, #b6ff00);
  color: #0b2a12; box-shadow: 0 6px 0 #1d8a4f, 0 14px 30px rgba(46, 232, 138, 0.4);
  cursor: default;
}
.bid-is-leading .bid-main { text-shadow: none; }
.bid-is-leading .bid-main::before { content: "\2713  "; }
.bid-is-nocred { background: linear-gradient(135deg, #ffd400, #ff9a00); color: #2a1300; box-shadow: 0 6px 0 #a35f00, 0 14px 30px rgba(255, 212, 0, 0.35); }
.bid-is-nocred .bid-main { text-shadow: none; }
.bid-is-login { background: var(--cool); box-shadow: 0 6px 0 #3b1b8a, 0 14px 30px rgba(0, 229, 255, 0.35); }
.bid-is-ended, .bid-is-sched { background: #3a3160; box-shadow: 0 4px 0 #231c40; cursor: not-allowed; color: #d8d2f5; }
.bid-is-ended .bid-shine, .bid-is-sched .bid-shine, .bid-is-leading .bid-shine { display: none; }
.bid-pop { animation: bidPop 0.5s ease; }
.bid-win { animation: bidPop 0.6s ease; }
.bid-nope { animation: nope 0.4s ease; }
.ripple {
  position: absolute; border-radius: 50%; pointer-events: none; z-index: 0;
  background: rgba(255, 255, 255, 0.55); transform: scale(0); animation: ripple 0.65s ease-out forwards;
}
.float-txt {
  position: absolute; left: 50%; top: 0; z-index: 5; pointer-events: none;
  font-family: var(--head); font-size: 1rem; white-space: nowrap;
  transform: translate(-50%, 0); animation: floatUp 1.1s ease-out forwards;
}
.float-up { color: var(--g); }
.float-down { color: var(--red); }
.float-bid { color: #fff; top: 40%; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }

/* ---------------------------------------------------------------- estallidos y sellos */

.burst {
  position: relative; width: 86px; height: 86px;
  display: grid; place-items: center; text-align: center;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45));
  transform: rotate(-10deg);
}
.burst::before {
  content: ""; position: absolute; inset: 0; background: var(--y); clip-path: var(--burst);
  animation: spin 14s linear infinite;
}
.burst-pink::before { background: var(--p); }
.burst-txt {
  position: relative; max-width: 74%;
  /* --fs: tamaño base del contexto; --k: lo achica components.js si hay una palabra larga,
     así nunca se corta una palabra al medio. */
  font-family: var(--head); font-size: calc(var(--fs, 0.72rem) * var(--k, 1)); line-height: 1.02; text-transform: uppercase;
  color: #1a0b3d;
}
.burst-pink .burst-txt { color: #fff; }
.card-badge { position: absolute; top: 6px; left: 6px; z-index: 3; animation: wobble 3s ease-in-out infinite; }

.stamp {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  width: 74px; height: 74px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #ff5c7f, #d6002f);
  border: 3px dashed rgba(255, 255, 255, 0.85); outline: 3px solid #d6002f;
  transform: rotate(12deg);
  box-shadow: 0 6px 18px rgba(214, 0, 47, 0.5);
}
.stamp b { font-family: var(--head); font-size: 1.05rem; line-height: 1; letter-spacing: -0.03em; }
.stamp small { font-size: 0.62rem; font-weight: 800; text-transform: uppercase; opacity: 0.9; }
.stamp-pop { animation: stampPop 0.5s ease; }

.sold {
  position: absolute; inset: 0; z-index: 4; display: grid; place-items: center;
  background: rgba(11, 6, 32, 0.45);
}
.sold span {
  font-family: var(--head); font-size: clamp(1.4rem, 7vw, 2.4rem); color: var(--y);
  border: 5px solid var(--y); border-radius: 12px; padding: 4px 16px;
  transform: rotate(-14deg); text-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
  animation: stampIn 0.5s cubic-bezier(0.2, 2, 0.4, 1);
  background: rgba(11, 6, 32, 0.6);
}

.ribbon {
  position: absolute; top: -12px; left: 18px; z-index: 6;
  font-family: var(--head); font-size: 0.78rem; letter-spacing: 0.08em; color: #1a0b3d;
  background: var(--hot); padding: 5px 14px; border-radius: 8px;
  box-shadow: 0 6px 16px rgba(255, 122, 0, 0.45);
}
.ribbon::before { content: "\2605  "; }

.rays {
  position: absolute; inset: -60%; z-index: 0; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255, 212, 0, 0.13) 0deg 8deg, transparent 8deg 18deg);
  animation: spin 40s linear infinite;
}

/* ---------------------------------------------------------------- tarjetas */

.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0;
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 2px solid var(--line); border-radius: var(--r); padding: 10px 10px 12px;
  transition: transform 0.2s, border-color 0.3s, box-shadow 0.3s;
}
.card:hover { transform: translateY(-3px); border-color: rgba(0, 229, 255, 0.45); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4); }
.card-link { display: block; color: var(--txt); text-decoration: none !important; }
.card-media {
  position: relative; overflow: hidden; border-radius: 14px; aspect-ratio: 4 / 3;
  background: radial-gradient(circle at 50% 45%, rgba(138, 61, 255, 0.35), rgba(11, 6, 32, 0.4) 70%);
}
.card-media .pimg, .detail-media .pimg { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; transition: transform 0.35s; }
.card:hover .card-media .pimg { transform: scale(1.05) rotate(-1deg); }
.card-head { padding: 8px 2px 0; }
.card-title { font-size: 1.05rem; margin: 0; overflow-wrap: anywhere; }
.card-desc { color: var(--mut); margin: 6px 0 0; font-size: 0.95rem; }
.card-live { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-pricebox { display: flex; flex-direction: column; min-width: 0; }
.card-kicker { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mut); }
.card-leader { font-weight: 700; font-size: 0.9rem; color: var(--mut); min-height: 1.3em; overflow-wrap: anywhere; }
.card-leader.is-me, .detail-leader.is-me { color: var(--g); }
.card-retail { font-size: 0.8rem; color: var(--mut); }
.card.is-ended { opacity: 0.92; }
.card.is-hot { border-color: var(--red); animation: hotGlow 1s ease-in-out infinite; }
.card.is-closing { border-color: var(--y); }
.card.is-mine { border-color: var(--g); box-shadow: 0 0 0 2px rgba(182, 255, 0, 0.25), 0 10px 30px rgba(182, 255, 0, 0.15); }
.card-flash { animation: cardFlash 0.85s ease-out; }

.price { font-family: var(--head); color: var(--y); line-height: 1; letter-spacing: -0.02em; white-space: nowrap; display: inline-block; text-shadow: 0 0 24px rgba(255, 212, 0, 0.35); }
.price-lg { font-size: 1.55rem; }
.price-xl { font-size: clamp(2rem, 8vw, 2.8rem); }
.price-xxl { font-size: clamp(2.4rem, 11vw, 4rem); }
.price-jump { animation: priceJump 0.6s cubic-bezier(0.2, 1.8, 0.4, 1); }

/* Destacada */
.hero-wrap { margin-top: 10px; }
.card-hero { padding: 14px; border-width: 3px; border-color: rgba(255, 212, 0, 0.55); background: linear-gradient(160deg, #2b1670, #1a1042 60%, #2a0f4a); }
.card-hero:hover { transform: none; }
.card-hero .card-media { aspect-ratio: 16 / 11; }
.card-hero .card-title { font-size: clamp(1.4rem, 5.5vw, 2.2rem); }
.card-hero .card-badge .burst { width: 104px; height: 104px; }
.card-hero .card-badge .burst-txt { --fs: 0.85rem; }
.card-hero .stamp { width: 90px; height: 90px; }
.card-hero .stamp b { font-size: 1.35rem; }
.hero-empty { text-align: center; padding: 40px 10px; }

/* ---------------------------------------------------------------- reloj */

.clock { position: relative; flex-shrink: 0; display: grid; place-items: center; }
.clock-sm { width: 78px; height: 78px; }
.clock-md { width: 100px; height: 100px; }
.clock-lg { width: 132px; height: 132px; }
.clock-xl { width: 168px; height: 168px; }
.ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring-bg { fill: rgba(11, 6, 32, 0.65); stroke: rgba(255, 255, 255, 0.1); stroke-width: 8; }
.ring-fg { fill: none; stroke: var(--c); stroke-width: 8; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.7)); transition: stroke 0.3s; }
.clock-face { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 8px; }
.clock-num { font-family: var(--head); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.clock-lab { font-size: 0.56rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--mut); line-height: 1.1; max-width: 9em; }
.clock-sm .clock-num { font-size: 1.45rem; }
.clock-md .clock-num { font-size: 1.9rem; }
.clock-lg .clock-num { font-size: 2.6rem; }
.clock-lg .clock-lab { font-size: 0.66rem; }
.clock-xl .clock-num { font-size: 3.4rem; }
.clock-xl .clock-lab { font-size: 0.75rem; }
.clock.is-idle .ring-fg { stroke: var(--v); stroke-dasharray: 6 8 !important; filter: none; }
.clock.is-idle .clock-num { color: #d9cdff; }
.clock.is-sched .ring-fg { stroke: var(--v); filter: none; }
.clock.is-sched .clock-num { font-size: 1.05em; }
.clock-sm.is-sched .clock-num { font-size: 1rem; }
.clock-md.is-sched .clock-num { font-size: 1.2rem; }
.clock-lg.is-sched .clock-num, .clock-xl.is-sched .clock-num { font-size: 1.6rem; }
.clock.is-hot .ring-fg { stroke: var(--red); filter: drop-shadow(0 0 10px rgba(255, 51, 85, 0.9)); }
.clock.is-hot .clock-num { color: #ff6b84; }
.clock.is-hot { animation: heartbeat 1s ease-in-out infinite; }
.clock.is-closing .ring-fg { stroke: var(--y); }
.clock.is-closing .clock-num { color: var(--y); animation: blink 0.6s steps(2) infinite; }
.clock.is-closing .clock-lab { color: var(--y); }
.clock.is-ended .ring-fg { stroke: transparent; filter: none; }
.clock.is-ended .clock-num { color: var(--mut); }
.num-tick { animation: numTick 0.35s ease-out; }
.clock-reset { animation: clockReset 0.6s ease; }
.clock-reset .ring-bg { animation: ringFlash 0.6s ease; }

/* ---------------------------------------------------------------- portada */

.home-cols { display: grid; grid-template-columns: 1fr; gap: 18px; }
.feed { margin-top: 26px; align-self: start; }
.feed-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.feed-row {
  display: grid; grid-template-columns: 10px 1fr auto; grid-template-areas: "dot txt price" "dot txt time"; gap: 0 8px; align-items: center;
  padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); font-size: 0.88rem;
}
.feed-row.is-me { background: rgba(182, 255, 0, 0.1); }
.feed-new { animation: feedIn 0.5s ease-out; }
.feed-dot { grid-area: dot; width: 8px; height: 8px; border-radius: 50%; background: var(--p); }
.feed-txt { grid-area: txt; min-width: 0; overflow-wrap: anywhere; }
.feed-txt a { color: var(--txt); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.3); }
.feed-price { grid-area: price; font-family: var(--head); color: var(--y); font-size: 0.85rem; text-align: right; }
.feed-time { grid-area: time; color: var(--mut); font-size: 0.72rem; text-align: right; }
.feed-empty { color: var(--mut); font-size: 0.9rem; margin: 0; padding: 10px; border: 2px dashed var(--line2); border-radius: 12px; }

.minis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mini {
  display: flex; flex-direction: column; color: var(--txt); text-decoration: none !important;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: transform 0.2s, border-color 0.2s;
}
.mini:hover { transform: translateY(-2px); border-color: var(--line2); }
.mini.is-me { border-color: var(--g); }
.mini-media { position: relative; aspect-ratio: 4 / 3; background: radial-gradient(circle, rgba(138, 61, 255, 0.3), transparent 70%); }
.mini-media .pimg { width: 100%; height: 100%; object-fit: contain; filter: saturate(0.8); }
.mini-pct { position: absolute; top: 6px; right: 6px; font-family: var(--head); font-size: 0.75rem; color: #1a0b3d; background: var(--g); padding: 2px 6px; border-radius: 6px; transform: rotate(6deg); }
.mini-body { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; font-size: 0.82rem; }
.mini-title { font-size: 0.9rem; overflow-wrap: anywhere; }
.mini-win { color: var(--mut); overflow-wrap: anywhere; }
.mini-win b { color: var(--txt); }
.mini-price { font-family: var(--head); color: var(--y); }
.mini-price s { font-family: var(--body); font-size: 0.75rem; }
.mini-save { color: var(--g); font-weight: 800; }
.sect-title-win { color: var(--y); letter-spacing: 0.04em; }
.mini-win { display: flex; flex-direction: column; line-height: 1.1; margin-bottom: 4px; }
.mini-win-k { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mut); }
.mini-win .mini-who { font-family: var(--head); font-size: 1.15rem; color: var(--y); overflow-wrap: anywhere; }
.mini-when { color: var(--mut); font-size: 0.74rem; }
.end-price { font-family: var(--head); font-size: 1.5rem; color: var(--y); }
.end-save { color: var(--g); font-weight: 800; font-size: 1.05rem; }

.promo-how {
  margin-top: 30px; display: grid; gap: 10px; padding: 18px; border-radius: var(--r);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.14), rgba(138, 61, 255, 0.2)); border: 1px solid rgba(0, 229, 255, 0.3);
}
.how-step { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.how-step b { flex-shrink: 0; width: 38px; height: 38px; display: grid; place-items: center; font-family: var(--head); color: #1a0b3d; background: var(--c); clip-path: var(--burst); }
.promo-how .btn { justify-self: start; }

/* ---------------------------------------------------------------- detalle */

.back { display: inline-block; margin: 4px 0 12px; font-weight: 700; color: var(--mut); }
.detail-grid { display: grid; gap: 16px; }
.detail-media {
  position: relative; overflow: hidden; border-radius: var(--r); aspect-ratio: 4 / 3;
  background: radial-gradient(circle at 50% 45%, rgba(138, 61, 255, 0.4), rgba(11, 6, 32, 0.6) 70%);
  border: 2px solid var(--line);
}
.detail-media .card-badge .burst { width: 110px; height: 110px; }
.detail-media .card-badge .burst-txt { --fs: 0.9rem; }
.detail-media .stamp { width: 92px; height: 92px; }
.detail-media .stamp b { font-size: 1.4rem; }
.detail-panel { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.detail-top { display: flex; gap: 8px; }
.detail-title { margin: 0; overflow-wrap: anywhere; }
.pill { font-family: var(--head); font-size: 0.72rem; letter-spacing: 0.06em; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); }
.pill-live { background: var(--red); animation: pulseSoft 1.6s ease-in-out infinite; }
.pill-scheduled { background: var(--v); }
.pill-ended { background: #4a4170; }
.detail-live {
  display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: var(--r);
  background: rgba(11, 6, 32, 0.55); border: 2px solid var(--line);
}
.detail.is-hot .detail-live { border-color: var(--red); animation: hotGlow 1s ease-in-out infinite; }
.detail.is-mine .detail-live { border-color: var(--g); }
.detail-pricebox { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.detail-leader { font-weight: 800; color: var(--mut); overflow-wrap: anywhere; }
.detail.card-flash .detail-live { animation: cardFlash 0.85s ease-out; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.facts > div { padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); min-width: 0; }
.facts dt { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mut); }
.facts dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.fact-save { background: rgba(182, 255, 0, 0.1) !important; border-color: rgba(182, 255, 0, 0.35) !important; }
.fact-save b { color: var(--g); font-family: var(--head); }
.detail-cols { display: grid; gap: 16px; margin-top: 18px; }
.detail-desc { white-space: pre-line; }
.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hist-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); }
.hist-row.is-top { background: linear-gradient(90deg, rgba(255, 212, 0, 0.18), rgba(255, 255, 255, 0.04)); border: 1px solid rgba(255, 212, 0, 0.4); }
.hist-row.is-me .hist-name { color: var(--g); }
.hist-name { font-weight: 800; overflow-wrap: anywhere; min-width: 0; }
.hist-price { font-family: var(--head); color: var(--y); }
.hist-time { color: var(--mut); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.hist-new { animation: feedIn 0.5s ease-out; }
.end-banner {
  display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center;
  padding: 16px; border-radius: var(--r); background: rgba(255, 255, 255, 0.07); border: 2px solid var(--line2);
}
.end-banner strong { font-family: var(--head); font-size: 1.5rem; color: var(--y); overflow-wrap: anywhere; }
.end-banner.is-won { background: linear-gradient(135deg, rgba(182, 255, 0, 0.25), rgba(0, 229, 255, 0.2)); border-color: var(--g); }
.end-banner.is-won strong { font-size: 2.4rem; background: var(--hot); -webkit-background-clip: text; background-clip: text; color: transparent; }
.banner-in { animation: stampIn 0.6s cubic-bezier(0.2, 1.6, 0.4, 1); }

/* ---------------------------------------------------------------- formularios */

.auth { display: grid; place-items: center; padding: 20px 0; }
.auth-card {
  position: relative; width: 100%; max-width: 440px; padding: 30px 18px 20px; border-radius: 24px;
  background: linear-gradient(180deg, var(--card2), var(--card)); border: 2px solid var(--line2);
}
.auth-burst { position: absolute; top: -26px; right: -6px; }
.auth-burst .burst { width: 76px; height: 76px; }
.auth-burst .burst-txt { --fs: 0.95rem; }
.auth-foot { text-align: center; margin: 14px 0 0; color: var(--mut); }
.form { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field-lab { font-weight: 800; font-size: 0.9rem; }
.field-hint { color: var(--mut); font-size: 0.78rem; }
.field input {
  font-size: max(16px, 1rem);
  min-height: 48px; padding: 10px 14px; border-radius: 12px; color: var(--txt);
  background: rgba(11, 6, 32, 0.7); border: 2px solid var(--line2); transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus { outline: none; border-color: var(--c); box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.2); }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 700; cursor: pointer; padding: 10px 12px; border-radius: 12px; background: rgba(255, 212, 0, 0.08); border: 2px solid rgba(255, 212, 0, 0.35); }
.check input { width: 22px; height: 22px; accent-color: var(--y); flex-shrink: 0; margin: 0; }
.check b { color: var(--y); }
.form-err { margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(255, 51, 85, 0.15); border: 1px solid var(--red); color: #ffb3c0; font-weight: 700; }

/* ---------------------------------------------------------------- créditos */

.credits-head, .account-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin: 8px 0 16px; }
.credits-head > div:first-child, .account-head > div:first-child { flex: 1 1 260px; }
.balance, .stat-main {
  display: flex; flex-direction: column; align-items: center; padding: 12px 22px; border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 212, 0, 0.2), rgba(255, 122, 0, 0.18)); border: 2px solid var(--y);
}
.balance span, .stat span { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mut); }
.balance-num { font-family: var(--head); font-size: 2.6rem; line-height: 1; color: var(--y); }
.balance-inline b { color: var(--y); }
.balance .promo-line, .stat .promo-line { margin-top: 4px; font-size: 0.78rem; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--g); }
.banner { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 16px; margin-bottom: 18px; font-weight: 600; }
.banner strong { font-family: var(--head); font-size: 1.1rem; letter-spacing: 0.04em; }
.banner-test {
  color: #1a0b3d; border: 3px dashed #1a0b3d;
  background: repeating-linear-gradient(-45deg, #ffd400 0 18px, #ffe45c 18px 36px);
  box-shadow: 0 0 0 3px var(--y);
}
.banner-off { background: rgba(255, 51, 85, 0.15); border: 2px solid var(--red); }
.banner-mp { background: rgba(0, 229, 255, 0.12); border: 2px solid var(--c); }
.packs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; padding-top: 8px; }
.pack {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-width: 0;
  padding: 18px 8px 10px; border-radius: 18px; background: linear-gradient(180deg, var(--card2), var(--card)); border: 2px solid var(--line2);
  transition: transform 0.2s, border-color 0.2s;
}
.pack:hover { transform: translateY(-3px); border-color: var(--c); }
.pack-tagged { border-color: var(--p); box-shadow: 0 0 0 3px rgba(255, 46, 136, 0.22), 0 10px 26px rgba(255, 46, 136, 0.22); }
.pack-best { border-color: var(--y); box-shadow: 0 0 0 3px rgba(255, 212, 0, 0.22), 0 10px 26px rgba(255, 212, 0, 0.2); }
.pack-tag {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%); z-index: 2; max-width: calc(100% - 12px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: var(--head); font-size: 0.66rem; letter-spacing: 0.04em; text-transform: uppercase;
  color: #fff; background: var(--p); padding: 4px 10px; border-radius: 999px; box-shadow: 0 4px 12px rgba(255, 46, 136, 0.45);
}
.pack-best .pack-tag { color: #1a0b3d; background: var(--y); box-shadow: 0 4px 12px rgba(255, 212, 0, 0.45); }
.pack-total { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.pack-total b { font-family: var(--head); font-size: clamp(1.7rem, 8vw, 2.6rem); line-height: 1; background: var(--hot); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.pack-total span { font-weight: 800; text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.08em; margin-top: 2px; }
.pack-prices { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 4px; min-width: 0; max-width: 100%; }
.pack-price { font-family: var(--head); font-size: clamp(1rem, 4.6vw, 1.35rem); white-space: nowrap; }
.pack-list { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; flex-wrap: wrap; justify-content: center; }
.pack-list s { white-space: nowrap; }
.pack-off { font-family: var(--head); font-size: 0.72rem; color: #1a0b3d; background: var(--g); padding: 1px 6px; border-radius: 6px; }
.pack-unit { font-size: 0.74rem; color: var(--mut); margin-bottom: 6px; }
.pack-btn { width: 100%; min-height: 48px; padding: 8px 10px; font-size: 0.9rem; margin-top: auto; }

/* Pago */
.pay h1 { font-size: 2rem; }
.pay-ok { border-color: var(--g); background: linear-gradient(180deg, rgba(182, 255, 0, 0.15), rgba(26, 16, 66, 0.8)); }
.pay-ok h1 { color: var(--g); }
.pay-pending { border-color: var(--y); }
.pay-pending h1 { color: var(--y); }
.pay-rejected { border-color: var(--red); }
.pay-rejected h1 { color: #ff8099; }
.pay .row-btns { justify-content: center; }

/* ---------------------------------------------------------------- cuenta */

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; flex: 1 1 300px; max-width: 460px; }
.stat { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 12px 6px; border-radius: 18px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line2); }
.stat b { font-family: var(--head); font-size: 1.6rem; line-height: 1.1; }
.account-cols { display: grid; gap: 16px; margin-top: 16px; }
.wins { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.win { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 16px; background: rgba(255, 255, 255, 0.05); color: var(--txt); text-decoration: none !important; }
.win .pimg { width: 80px; height: 64px; object-fit: contain; flex-shrink: 0; }
.win-body { display: flex; flex-direction: column; gap: 3px; font-size: 0.85rem; min-width: 0; }
.win-body strong { overflow-wrap: anywhere; }
.status { align-self: flex-start; font-size: 0.72rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); }
.status-pending_payment { background: var(--y); color: #1a0b3d; }
.status-paid { background: var(--c); color: #1a0b3d; }
.status-shipped { background: var(--v); }
.status-delivered { background: var(--g); color: #1a0b3d; }
.status-void { background: #4a4170; }
.table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.table th { text-align: left; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mut); padding: 6px 6px; border-bottom: 1px solid var(--line2); }
.table td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: break-word; }
.table .num { text-align: right; white-space: nowrap; font-weight: 800; }
.table .pos { color: var(--g); }
.table .neg { color: #ff8099; }

/* ---------------------------------------------------------------- ganadores y ayuda */

.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.wcard { display: flex; flex-direction: column; border-radius: var(--r); overflow: hidden; background: linear-gradient(180deg, var(--card2), var(--card)); border: 2px solid var(--line); color: var(--txt); text-decoration: none !important; transition: transform 0.2s, border-color 0.2s; }
.wcard:hover { transform: translateY(-3px) rotate(-0.4deg); border-color: var(--y); }
.wcard.is-me { border-color: var(--g); }
.wcard-media { position: relative; aspect-ratio: 4 / 3; background: radial-gradient(circle, rgba(255, 122, 0, 0.3), transparent 70%); }
.wcard-media .pimg { width: 100%; height: 100%; object-fit: contain; }
.wcard-burst { position: absolute; top: 6px; right: 6px; }
.wcard-burst .burst-txt { --fs: 0.95rem; }
.wcard-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.wcard-who { font-size: 1.05rem; overflow-wrap: anywhere; }
.trophy { color: var(--y); }
.wcard-title { color: var(--mut); overflow-wrap: anywhere; }
.wcard-prices { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }

.steps { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 12px; }
.step { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--r); background: linear-gradient(180deg, var(--card2), var(--card)); border: 1px solid var(--line2); }
.step h3 { margin-bottom: 4px; }
.step p { margin: 0; color: var(--mut); }
.step-n { flex-shrink: 0; width: 52px; height: 52px; display: grid; place-items: center; font-family: var(--head); font-size: 1.3rem; color: #1a0b3d; background: var(--y); clip-path: var(--burst); }
.honest { padding: 18px; border-radius: var(--r); border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.04); margin-bottom: 20px; }
.honest ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.example { padding: 18px; border-radius: var(--r); background: rgba(0, 229, 255, 0.08); border: 1px solid rgba(0, 229, 255, 0.35); margin-bottom: 20px; }

/* ---------------------------------------------------------------- pie y navegación */

.foot { border-top: 1px solid var(--line); margin-top: 30px; color: var(--mut); font-size: 0.85rem; }
.foot-in { max-width: 1240px; margin: 0 auto; padding: 20px 14px; }
.foot-brand b { font-family: var(--head); color: var(--txt); }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; }

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: calc(var(--bottom-nav) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(14, 8, 38, 0.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line2);
}
.bn-item { min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--mut); font-size: 0.68rem; font-weight: 800; text-decoration: none !important; -webkit-tap-highlight-color: transparent; transition: color 0.2s, transform 0.1s; }
.bn-item:active { transform: scale(0.92); }
.bn-item.is-active { color: var(--y); }
.bn-ico { width: 24px; height: 24px; display: grid; place-items: center; font-family: var(--head); font-size: 1.05rem; line-height: 1; }
.bn-ico-live::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(255, 51, 85, 0.3); }
.bn-ico-star::before { content: "\2605"; }
.bn-ico-plus { width: 46px; height: 46px; margin-top: -22px; border-radius: 50%; background: var(--hot); color: #1a0b3d; font-size: 1.6rem; box-shadow: 0 6px 18px rgba(255, 46, 136, 0.5); border: 3px solid var(--bg); }
.bn-ico-plus::before { content: "+"; }
.bn-ico-help::before { content: "?"; }
.bn-ico-user::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 3px solid currentColor; }
.bn-cta { color: var(--txt); }

.toasts {
  position: fixed; z-index: 90; left: 10px; right: 10px; bottom: calc(var(--bottom-nav) + 12px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.has-dock .toasts { bottom: calc(var(--bottom-nav) + var(--dock-h) + 20px + env(safe-area-inset-bottom, 0px)); }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px;
  padding: 12px 12px 12px 16px; border-radius: 14px; font-weight: 700; font-size: 0.92rem;
  background: #2a1d63; border: 2px solid var(--line2); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  animation: toastIn 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.toast-msg { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.toast-ok { border-color: var(--g); }
.toast-warn { border-color: var(--y); }
.toast-error { border-color: var(--red); background: #3d1430; }
.toast-act { flex-shrink: 0; font-weight: 900; color: #1a0b3d; background: var(--y); padding: 6px 10px; border-radius: 10px; text-decoration: none !important; }
.toast-x { flex-shrink: 0; width: 30px; height: 30px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, 0.08); color: var(--txt); cursor: pointer; font-size: 1.1rem; }
.toast-out { opacity: 0; transform: translateY(10px); transition: opacity 0.3s, transform 0.3s; }

.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 100; }

/* ---------------------------------------------------------------- pantallas grandes */


@media (min-width: 700px) {
  .view { padding: 20px 20px 40px; }
  .detail-grid { grid-template-columns: 1.1fr 1fr; align-items: start; }
  .detail-media { position: sticky; top: 110px; }
  .detail-cols { grid-template-columns: 1.2fr 1fr; }
  .account-cols { grid-template-columns: 1fr 1fr; }
  .promo-how { grid-template-columns: repeat(3, 1fr); align-items: center; }
  .toasts { left: auto; right: 20px; width: 380px; }
}

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .bottom-nav { display: none; }
  .toasts { bottom: 20px; }
  .top-nav { display: flex; }
  .user-btn.is-user { display: inline-block; }
  .admin-link { display: inline-block; }
  .ticker { display: flex; }
  .has-dock .toasts { bottom: 20px; }
  .top-in { padding: 10px 20px; }
  .brand-logo { width: 40px; height: 40px; }
  .brand-txt { font-size: 1.5rem; }
  .home-cols { grid-template-columns: minmax(0, 1fr) 320px; }
  .feed { position: sticky; top: 120px; margin-top: 26px; max-height: calc(100vh - 140px); overflow: auto; }
  /* Destacada: foto a la izquierda, título y acción a la derecha */
  .card-hero {
    display: grid; column-gap: 22px; row-gap: 14px; padding: 18px;
    grid-template-columns: 1.25fr 1fr; grid-template-rows: auto auto auto auto 1fr;
    grid-template-areas: "media head" "media live" "media leader" "media btn" "media retail";
  }
  .card-hero > .card-link { display: contents; }
  .card-hero .card-media { grid-area: media; align-self: start; }
  .card-hero .card-head { grid-area: head; padding-top: 6px; }
  .card-hero > .card-live { grid-area: live; padding: 16px; border-radius: 18px; background: rgba(11, 6, 32, 0.45); }
  .card-hero > .card-leader { grid-area: leader; font-size: 1.05rem; }
  .card-hero > .bid { grid-area: btn; }
  .card-hero > .card-retail { grid-area: retail; }
  .card-hero .card-media { aspect-ratio: 16 / 10; }
}

@media (max-width: 380px) {
  .wallet-lab { display: none; }
  .wallet { padding-right: 10px; }
  .brand-txt { font-size: 1.15rem; }
  .facts { grid-template-columns: 1fr; }
  .clock-xl { width: 140px; height: 140px; }
  .clock-xl .clock-num { font-size: 2.8rem; }
  .detail-live { gap: 12px; padding: 12px; }
}

/* ---------------------------------------------------------------- animaciones */

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: 0.35; } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255, 51, 85, 0.7); } 80%, 100% { box-shadow: 0 0 0 10px rgba(255, 51, 85, 0); } }
@keyframes pulseSoft { 50% { filter: brightness(1.3); } }
@keyframes wobble { 0%, 100% { transform: rotate(-4deg) scale(1); } 50% { transform: rotate(4deg) scale(1.06); } }
@keyframes shine { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
@keyframes ripple { to { transform: scale(2.4); opacity: 0; } }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, 6px) scale(0.8); } 20% { opacity: 1; transform: translate(-50%, -6px) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -38px) scale(1); } }
@keyframes bidPop { 0% { transform: scale(1); } 30% { transform: scale(1.06); } 60% { transform: scale(0.98); } 100% { transform: scale(1); } }
@keyframes nope { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes walletUp { 0% { transform: scale(1); } 30% { transform: scale(1.25); box-shadow: 0 0 0 8px rgba(182, 255, 0, 0.35); border-color: var(--g); } 100% { transform: scale(1); } }
@keyframes walletDown { 0% { transform: scale(1); } 30% { transform: scale(0.9); border-color: var(--red); } 100% { transform: scale(1); } }
@keyframes stampPop { 0% { transform: rotate(12deg) scale(1); } 40% { transform: rotate(-4deg) scale(1.3); } 100% { transform: rotate(12deg) scale(1); } }
@keyframes stampIn { 0% { transform: rotate(-14deg) scale(3); opacity: 0; } 100% { transform: rotate(-14deg) scale(1); opacity: 1; } }
@keyframes priceJump { 0% { transform: translateY(0) scale(1); } 30% { transform: translateY(-8px) scale(1.18); color: #fff; text-shadow: 0 0 30px rgba(255, 212, 0, 0.9); } 100% { transform: none; } }
@keyframes cardFlash { 0% { box-shadow: 0 0 0 0 rgba(255, 212, 0, 0.9), inset 0 0 0 2px rgba(255, 212, 0, 0.9); } 100% { box-shadow: 0 0 0 18px rgba(255, 212, 0, 0), inset 0 0 0 2px rgba(255, 212, 0, 0); } }
@keyframes hotGlow { 50% { box-shadow: 0 0 0 3px rgba(255, 51, 85, 0.35), 0 0 34px rgba(255, 51, 85, 0.45); } }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.1); } 30% { transform: scale(0.97); } 45% { transform: scale(1.05); } }
@keyframes numTick { 0% { transform: scale(1.45); } 100% { transform: scale(1); } }
@keyframes clockReset { 0% { transform: scale(1); } 15% { transform: scale(1.18) rotate(-6deg); } 30% { transform: scale(1.1) rotate(6deg); } 45% { transform: rotate(-4deg); } 60% { transform: rotate(3deg); } 100% { transform: none; } }
@keyframes ringFlash { 0% { fill: rgba(0, 229, 255, 0.6); } 100% { fill: rgba(11, 6, 32, 0.65); } }
@keyframes feedIn { 0% { transform: translateX(-12px); background: rgba(255, 212, 0, 0.35); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes toastIn { 0% { transform: translateY(16px) scale(0.95); opacity: 0; } 100% { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .tk-view { overflow-x: auto; }
}

.detail.is-ended .bid { display: none; }
.stats .stat-main { padding: 12px 6px; }
.view { overflow-x: clip; }

/* ================================================================ 2026-12-04: celular primero */

/* Grilla de subastas: en el celular una columna; en pantallas anchas las tarjetas
   se estiran para llenar la fila (sin huecos vacíos cuando hay pocas). */
@media (min-width: 600px) {
  .grid { display: flex; flex-wrap: wrap; gap: 14px; }
  .grid > .card { flex: 1 1 260px; }
  .grid .card-media { max-height: 300px; aspect-ratio: auto; height: clamp(180px, 22vw, 300px); }
}
@media (min-width: 700px) {
  .grid-n1 > .card {
    display: grid; column-gap: 18px; row-gap: 10px; align-items: start;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    grid-template-areas: "link live" "link leader" "link btn" "link retail";
  }
  .grid-n1 > .card > .card-link { grid-area: link; }
  .grid-n1 > .card > .card-live { grid-area: live; }
  .grid-n1 > .card > .card-leader { grid-area: leader; }
  .grid-n1 > .card > .bid { grid-area: btn; }
  .grid-n1 > .card > .card-retail { grid-area: retail; }
}
.card-title { font-size: clamp(1rem, 4.2vw, 1.15rem); }

/* Detalle en el celular: reloj y precio arriba, foto abajo, PUJAR fijo sobre la barra. */
@media (max-width: 699.98px) {
  body.has-dock { padding-bottom: calc(var(--bottom-nav) + var(--dock-h) + 18px + env(safe-area-inset-bottom, 0px)); }
  .detail .back { margin: 0 0 8px; font-size: 0.9rem; }
  .detail-grid { display: flex; flex-direction: column; gap: 12px; }
  .detail-panel { display: contents; }
  .detail-top { order: 1; }
  .detail-title { order: 2; font-size: clamp(1.3rem, 6.2vw, 1.8rem); }
  .detail-live { order: 3; padding: 12px; gap: 14px; }
  .end-banner { order: 4; }
  .detail-media { order: 5; aspect-ratio: 16 / 10; }
  .facts { order: 7; }
  .detail-live .clock-xl { width: clamp(104px, 32vw, 132px); height: clamp(104px, 32vw, 132px); }
  .detail-live .clock-xl .clock-num { font-size: clamp(2.2rem, 10vw, 2.8rem); }
  .detail-live .clock-xl .clock-lab { font-size: 0.62rem; }
  .detail-live .price-xxl { font-size: clamp(2rem, 10vw, 3rem); }
  .detail .bid {
    position: fixed; z-index: 55; left: 10px; right: 10px; width: auto;
    bottom: calc(var(--bottom-nav) + env(safe-area-inset-bottom, 0px) + 8px);
    min-height: var(--dock-h); border-radius: 20px; padding: 8px 14px;
  }
  .detail .bid-xl .bid-main { font-size: clamp(1.7rem, 8vw, 2.2rem); }
  .detail .bid-xl .bid-sub { font-size: 0.82rem; }
}

/* ---------------------------------------------------------------- aviso de email */

.email-banner { background: linear-gradient(90deg, rgba(255, 212, 0, 0.18), rgba(255, 46, 136, 0.18)); border-bottom: 1px solid rgba(255, 212, 0, 0.45); }
.eb-in { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 6px 12px; font-size: 0.9rem; line-height: 1.25; }
.eb-ico { flex-shrink: 0; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-family: var(--head); color: #1a0b3d; background: var(--y); }
.eb-txt { flex: 1; min-width: 0; }
.eb-txt b { color: var(--y); }
.eb-btn {
  flex-shrink: 0; min-height: 44px; padding: 0 14px; border: 0; border-radius: 12px; cursor: pointer;
  font-weight: 900; font-size: 0.85rem; color: #1a0b3d; background: var(--y);
}
.eb-btn:active { transform: scale(0.96); }

/* ---------------------------------------------------------------- hoja inferior (email) */

.sheet {
  position: fixed; inset: auto 0 0 0; margin: auto auto 0; width: 100%; max-width: min(520px, 100%); max-height: 92vh; overflow: auto;
  padding: 12px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  color: var(--txt); background: linear-gradient(180deg, var(--card2), var(--card));
  border: 0; border-top: 3px solid var(--y); border-radius: 24px 24px 0 0;
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.5);
}
.sheet[open] { animation: sheetUp 0.3s cubic-bezier(0.2, 1.2, 0.4, 1); }
.sheet::backdrop { background: rgba(5, 2, 16, 0.72); }
.sheet-grip { width: 44px; height: 5px; border-radius: 3px; background: var(--line2); margin: 0 auto 12px; }
.sheet-x { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, 0.08); color: var(--txt); font-size: 1.4rem; cursor: pointer; }
.sheet-title { font-size: clamp(1.2rem, 5.4vw, 1.5rem); padding-right: 46px; margin-bottom: 6px; }
.sheet-sub { font-size: 0.9rem; margin: 0; }
.sheet-form { margin-top: 14px; gap: 10px; }
.sheet-form input {
  min-height: 52px; padding: 10px 14px; border-radius: 12px; color: var(--txt); font-size: max(16px, 1rem);
  background: rgba(11, 6, 32, 0.7); border: 2px solid var(--line2);
}
.sheet-form input:focus { outline: none; border-color: var(--c); box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.2); }
.sheet-later { min-height: 44px; border: 0; background: none; color: var(--mut); font-weight: 700; cursor: pointer; text-decoration: underline; }
@media (min-width: 700px) {
  .sheet { inset: 0; margin: auto; border: 2px solid var(--y); border-radius: 24px; padding-bottom: 20px; }
}

/* ---------------------------------------------------------------- Mi cuenta: email */

.acc-email { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 4px; }
.acc-email-lab { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mut); }
.acc-email-val { font-weight: 700; overflow-wrap: anywhere; min-width: 0; }
.acc-email-val.is-none { color: var(--mut); font-style: italic; font-weight: 600; }
.acc-email.is-needed .acc-email-val { color: var(--y); }
.btn-sm { min-height: 44px; padding: 6px 14px; font-size: 0.8rem; border-radius: 12px; }

/* ---------------------------------------------------------------- ruleta de bienvenida */

.wheel-sec {
  position: relative; overflow: hidden; isolation: isolate;
  margin: 4px 0 20px; padding: 14px 14px 16px; border-radius: 24px;
  display: grid; grid-template-areas: "head" "stage" "foot"; justify-items: center; gap: 10px; text-align: center;
  background:
    radial-gradient(420px 260px at 50% 55%, rgba(255, 212, 0, 0.22), transparent 70%),
    linear-gradient(160deg, #2b1670, #1a1042 55%, #3a0f4a);
  border: 2px solid rgba(255, 212, 0, 0.55);
  box-shadow: 0 14px 40px rgba(255, 122, 0, 0.18);
}
.wheel-head { grid-area: head; min-width: 0; }
.wheel-kicker {
  display: inline-block; font-family: var(--head); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: #1a0b3d; background: var(--hot); padding: 3px 10px; border-radius: 999px; margin-bottom: 6px;
}
.wheel-title { margin: 0; font-size: clamp(1.1rem, 5vw, 1.7rem); }
.wheel-stage {
  grid-area: stage; position: relative; margin-top: 6px;
  width: min(300px, 74vw, 40vh); width: min(300px, 74vw, 40svh); aspect-ratio: 1 / 1;
}
.wheel-glow {
  position: absolute; inset: -8%; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 212, 0, 0.45), rgba(255, 46, 136, 0.15) 55%, transparent 70%);
  animation: wheelGlow 2.4s ease-in-out infinite;
}
.wheel-rot { position: absolute; inset: 0; will-change: transform; }
.wheel-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.wheel-rim { fill: #1a0b3d; stroke: var(--y); stroke-width: 3; }
.wseg-fill { stroke: rgba(11, 6, 32, 0.55); stroke-width: 1.2; }
.wseg-a .wseg-fill { fill: #5b2bd6; }
.wseg-b .wseg-fill { fill: #ff2e88; }
.wseg-max .wseg-fill { stroke: #fff3a0; stroke-width: 1.6; }
.wseg-max { filter: drop-shadow(0 0 5px rgba(255, 212, 0, 0.95)); animation: goldPulse 1.4s ease-in-out infinite; }
.wseg-num { font-family: var(--head); font-size: 24px; fill: #fff; }
.wseg-lab { font-family: var(--body); font-size: 7.5px; font-weight: 800; letter-spacing: 0.04em; fill: rgba(255, 255, 255, 0.88); text-transform: uppercase; }
.wseg-max .wseg-num { font-size: 31px; fill: #4a1d00; }
.wseg-max .wseg-lab { fill: #4a1d00; }
.wseg-star { font-size: 11px; fill: #4a1d00; }
.wseg.is-win .wseg-fill { stroke: #fff; stroke-width: 3.5; }
.wbulb { fill: #fff3a0; }
.wbulb-a { animation: bulb 0.9s steps(2) infinite; }
.wbulb-b { animation: bulb 0.9s steps(2) 0.45s infinite; }
.is-spinning .wbulb-a, .is-spinning .wbulb-b { animation-duration: 0.25s; }
.wheel-hub {
  position: absolute; left: 50%; top: 50%; z-index: 2; width: 24%; height: 24%; transform: translate(-50%, -50%);
  display: grid; place-items: center; border-radius: 50%;
  background: var(--hot); border: 4px solid #1a0b3d; box-shadow: 0 0 0 3px var(--y), 0 6px 16px rgba(0, 0, 0, 0.45);
  font-family: var(--head); font-size: clamp(0.7rem, 3.2vw, 0.9rem); color: #1a0b3d;
}
.wheel-pointer {
  position: absolute; left: 50%; top: -4%; z-index: 3; width: 13%; height: 15%; transform: translateX(-50%);
  background: linear-gradient(180deg, #ffffff, var(--y) 60%, var(--o));
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: 50% 0;
}
.is-spinning .wheel-pointer { animation: pointerTick 0.14s ease-in-out infinite alternate; }
.wheel-result {
  position: absolute; left: 50%; top: 50%; z-index: 4; width: 52%; height: 52%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #3a1d8f, #12082f 75%); border: 4px solid var(--y);
  box-shadow: 0 0 0 6px rgba(255, 212, 0, 0.25), 0 0 40px rgba(255, 212, 0, 0.6);
  animation: resultPop 0.6s cubic-bezier(0.2, 1.8, 0.4, 1);
}
.wr-k { font-family: var(--head); font-size: clamp(0.75rem, 3.6vw, 1rem); text-transform: uppercase; letter-spacing: 0.06em; }
.wr-n { font-family: var(--head); font-size: clamp(2.6rem, 14vw, 4rem); line-height: 0.95; color: var(--y); text-shadow: 0 0 22px rgba(255, 212, 0, 0.8); }
.wr-u { font-weight: 800; font-size: 0.8rem; text-transform: uppercase; color: var(--mut); }
.wheel-foot { grid-area: foot; width: 100%; max-width: 380px; }
.wheel-msg { margin: 0 0 8px; font-weight: 800; color: var(--y); }
.wheel-msg:empty { display: none; }
.wheel-btn { width: 100%; min-height: 56px; }
.wheel-go { font-size: 1.35rem; letter-spacing: 0.06em; animation: goPulse 1.6s ease-in-out infinite; }
.wheel-small { margin: 8px 0 0; font-size: 0.9rem; color: var(--mut); }
.wheel-sec.is-closed .wheel-rot { filter: grayscale(0.7) brightness(0.7); }
@media (min-width: 700px) {
  .wheel-sec {
    grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "stage head" "stage foot";
    justify-items: start; align-items: center; text-align: left; column-gap: 34px; padding: 22px 30px;
  }
  .wheel-head { align-self: end; }
  .wheel-foot { align-self: start; }
  .wheel-stage { width: 280px; }
}

@keyframes sheetUp { 0% { transform: translateY(40px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes wheelGlow { 50% { transform: scale(1.06); opacity: 0.75; } }
@keyframes goldPulse { 50% { filter: drop-shadow(0 0 11px rgba(255, 212, 0, 1)) brightness(1.15); } }
@keyframes bulb { 50% { fill: #ff7a00; } }
@keyframes pointerTick { from { transform: translateX(-50%) rotate(-9deg); } to { transform: translateX(-50%) rotate(5deg); } }
@keyframes resultPop { 0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0; } 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
@keyframes goPulse { 50% { box-shadow: 0 5px 0 #a3134f, 0 0 0 6px rgba(255, 212, 0, 0.35), 0 10px 30px rgba(255, 46, 136, 0.5); } }

@media (prefers-reduced-motion: reduce) {
  .wheel-rot { transition: none !important; }
}

@media (min-width: 700px) {
  .packs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding-top: 14px; }
  .pack { padding: 22px 12px 14px; }
}

/* ================================================================ 2026-12-04: la casa */

/* Insignia CASA: gris celeste, mayúsculas y casita. Nunca se parece a un apodo. */
.house-tag {
  display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; flex-shrink: 0;
  padding: 2px 8px 2px 6px; border-radius: 6px; white-space: nowrap;
  background: #d7e6f2; color: #0f2a44; border: 1px solid #9fc0dc;
  font-family: var(--body); font-size: 0.72rem; font-weight: 900; letter-spacing: 0.08em; line-height: 1.3;
}
.house-ico { width: 13px; height: 13px; fill: currentColor; flex-shrink: 0; }
.house-tag-txt { display: inline-block; }

.card-leader.is-house, .detail-leader.is-house { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: #cfe2f3; }
.card.is-house .card-live { border-color: rgba(159, 192, 220, 0.55); }
.detail.is-house .detail-live { border-color: rgba(159, 192, 220, 0.7); }

.feed-row.is-house { background: rgba(159, 192, 220, 0.12); }
.feed-row.is-house .feed-dot { background: #9fc0dc; }
.feed-row.is-house .house-tag { margin-right: 2px; }

.hist-row.is-house { background: rgba(159, 192, 220, 0.12); }
.hist-row.is-house.is-top { background: linear-gradient(90deg, rgba(159, 192, 220, 0.28), rgba(255, 255, 255, 0.04)); border: 1px solid rgba(159, 192, 220, 0.6); }
.hist-row.is-house .hist-name { display: flex; align-items: center; gap: 8px; color: #cfe2f3; font-weight: 700; }
.hist-row.is-house .hist-price { color: #cfe2f3; }

.pill-cancelled { background: #3d5a73; }

/* ================================================================ 2026-12-04: referidos */

/* Estrella de promo (CSS puro, con el mismo estallido del sitio). */
.ref-star {
  position: relative; flex-shrink: 0; display: grid; place-items: center;
  width: 78px; height: 78px; transform: rotate(-12deg);
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45));
}
.ref-star::before {
  content: ""; position: absolute; inset: 0; clip-path: var(--burst);
  background: linear-gradient(135deg, #fff3a0, var(--y) 45%, #ff9a00);
  animation: spin 14s linear infinite;
}
.ref-star b { position: relative; font-family: var(--head); font-size: 1.35rem; line-height: 1; color: #1a0b3d; letter-spacing: -0.03em; }

/* Cartel gancho de la portada */
.ref-hook {
  position: relative; overflow: hidden; isolation: isolate;
  margin: 18px 0 0; padding: 14px 14px 14px 12px; border-radius: 22px;
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "star txt" "btn btn"; align-items: center; gap: 10px 12px;
  background:
    radial-gradient(260px 160px at 12% 30%, rgba(255, 212, 0, 0.35), transparent 70%),
    linear-gradient(120deg, #ff2e88 0%, #a3249c 42%, #5b2bd6 100%);
  border: 3px solid var(--y);
  box-shadow: 0 0 0 4px rgba(255, 212, 0, 0.18), 0 14px 34px rgba(255, 46, 136, 0.35);
}
.ref-hook::before {
  content: ""; position: absolute; inset: -80%; z-index: -1; pointer-events: none;
  background: repeating-conic-gradient(from 0deg at 18% 50%, rgba(255, 255, 255, 0.09) 0deg 7deg, transparent 7deg 16deg);
  animation: spin 50s linear infinite;
}
.ref-hook-shine {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.28) 50%, transparent 65%);
  transform: translateX(-120%); animation: shine 4.5s ease-in-out infinite;
}
.ref-hook-star { grid-area: star; animation: wobble 3s ease-in-out infinite; }
.ref-hook-txt { grid-area: txt; min-width: 0; }
.ref-hook-title {
  margin: 0 0 4px; font-size: clamp(1.35rem, 6.6vw, 2.1rem); line-height: 1; color: var(--y);
  text-shadow: 0 3px 0 rgba(26, 11, 61, 0.55), 0 0 22px rgba(255, 212, 0, 0.45);
}
.ref-hook-sub { margin: 0; font-weight: 800; font-size: 0.95rem; line-height: 1.3; color: #fff; }
.ref-hook-btn {
  grid-area: btn; width: 100%; min-height: 52px; font-size: 1.15rem; letter-spacing: 0.06em;
  color: #1a0b3d; background: var(--y); box-shadow: 0 5px 0 #a35f00, 0 10px 24px rgba(0, 0, 0, 0.3);
}
.ref-hook-btn:active { box-shadow: 0 1px 0 #a35f00; }
@media (min-width: 600px) {
  .ref-hook { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "star txt btn"; padding: 16px 22px; gap: 18px; }
  .ref-hook-star { width: 92px; height: 92px; }
  .ref-hook-btn { width: auto; padding: 10px 34px; }
}

/* Bloque compacto (Mi cuenta y Créditos) */
.ref-strip {
  display: flex; align-items: center; gap: 12px; margin: 14px 0; padding: 8px 14px 8px 8px; min-height: 64px;
  border-radius: 18px; color: var(--txt); text-decoration: none !important;
  background: linear-gradient(100deg, rgba(255, 46, 136, 0.28), rgba(138, 61, 255, 0.28));
  border: 2px solid rgba(255, 212, 0, 0.7);
  transition: transform 0.15s, border-color 0.2s;
}
.ref-strip:hover { transform: translateY(-2px); border-color: var(--y); }
.ref-strip .ref-star { width: 50px; height: 50px; }
.ref-strip .ref-star b { font-size: 0.95rem; }
.ref-strip-txt { flex: 1; min-width: 0; font-size: 0.95rem; line-height: 1.3; }
.ref-strip-txt b { color: var(--y); font-family: var(--head); font-weight: 900; }
.ref-strip-go { font-family: var(--head); font-size: 1.6rem; color: var(--y); line-height: 1; }

/* Empujón discreto */
.ref-nudge {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; min-height: 44px; padding: 4px 2px;
  font-size: 0.9rem; font-weight: 700; color: var(--mut);
}
.ref-nudge b { color: var(--y); text-decoration: underline; text-underline-offset: 3px; }
.ref-nudge-star { color: var(--y); }
.wheel-foot .ref-nudge { justify-content: center; width: 100%; }

/* Navegación */
.bottom-nav.has-invite { grid-template-columns: repeat(5, 1fr); }
.bn-ico-gift { position: relative; }
.bn-ico-gift::before {
  content: ""; width: 18px; height: 15px; margin-top: 5px; border: 3px solid currentColor; border-radius: 3px;
  background: linear-gradient(90deg, transparent 6px, currentColor 6px 9px, transparent 9px);
}
.bn-ico-gift::after {
  content: ""; position: absolute; top: 1px; left: 50%; width: 12px; height: 6px; transform: translateX(-50%);
  border: 3px solid currentColor; border-bottom: 0; border-radius: 6px 6px 0 0;
}
.bn-badge {
  position: absolute; top: -8px; left: 14px; z-index: 1;
  font-family: var(--head); font-size: 0.58rem; line-height: 1; padding: 2px 4px; border-radius: 6px;
  color: #1a0b3d; background: var(--y); box-shadow: 0 0 0 2px var(--bg);
}
.bn-invite { color: var(--txt); }
.bn-invite.is-active { color: var(--y); }
.top-nav a.tn-invite { color: var(--y); }
.top-nav a.tn-invite.is-active { color: #1a0b3d; }

/* ---------------------------------------------------------------- página #/invitar */

.inv { max-width: 760px; margin: 0 auto; display: grid; gap: 16px; }
.inv-hero {
  position: relative; overflow: hidden; isolation: isolate; text-align: center;
  padding: 26px 16px 20px; border-radius: 26px;
  background:
    radial-gradient(360px 220px at 50% 40%, rgba(255, 212, 0, 0.28), transparent 70%),
    linear-gradient(160deg, #3b1896, #1d0c52 55%, #4a0f4a);
  border: 3px solid rgba(255, 212, 0, 0.7);
  box-shadow: 0 16px 40px rgba(255, 46, 136, 0.25);
}
.inv-rays {
  position: absolute; inset: -60%; z-index: -1; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255, 212, 0, 0.12) 0deg 8deg, transparent 8deg 18deg);
  animation: spin 40s linear infinite;
}
.inv-star { position: absolute; top: 10px; right: 10px; width: 78px; height: 78px; animation: wobble 3s ease-in-out infinite; }
.inv-star b { font-size: 0.8rem; }
.inv-kicker {
  display: inline-block; font-family: var(--head); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: #1a0b3d; background: var(--hot); padding: 4px 12px; border-radius: 999px;
}
.inv-title { margin: 10px 0 8px; display: flex; flex-direction: column; align-items: center; line-height: 0.95; }
.inv-big {
  font-size: clamp(5rem, 30vw, 8.5rem); letter-spacing: -0.04em; color: var(--y);
  text-shadow: 0 6px 0 rgba(26, 11, 61, 0.6), 0 0 40px rgba(255, 212, 0, 0.55);
}
.inv-unit { font-size: clamp(1.7rem, 8vw, 2.6rem); text-transform: uppercase; }
.inv-per { margin-top: 6px; font-size: clamp(1.1rem, 5vw, 1.5rem); color: var(--c); text-transform: uppercase; }
.inv-sub { max-width: 440px; margin: 0 auto; font-weight: 700; color: #e9e4ff; }

.inv-card { background: linear-gradient(180deg, rgba(34, 21, 90, 0.85), rgba(26, 16, 66, 0.85)); border: 1px solid var(--line2); border-radius: var(--r); padding: 16px; min-width: 0; }
.inv-h2 { display: flex; align-items: center; gap: 8px; font-size: 1.2rem; margin: 0 0 12px; }

.inv-link-row { display: flex; gap: 8px; }
.inv-link-in {
  flex: 1; min-width: 0; min-height: 52px; padding: 10px 14px; border-radius: 14px;
  color: var(--y); font-weight: 800; background: rgba(11, 6, 32, 0.75); border: 2px dashed rgba(255, 212, 0, 0.6);
  text-overflow: ellipsis;
}
.inv-link-in:focus { outline: none; border-style: solid; border-color: var(--y); box-shadow: 0 0 0 4px rgba(255, 212, 0, 0.25); }
.inv-copy { flex-shrink: 0; min-width: 104px; min-height: 52px; }
.inv-copy.is-done { background: linear-gradient(135deg, #2ee88a, #b6ff00); box-shadow: 0 5px 0 #1d8a4f; }
.inv-copy-st { display: block; min-height: 1.3em; margin-top: 6px; font-size: 0.85rem; font-weight: 700; color: var(--g); }

.inv-shares { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 6px; }
.inv-share {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 8px 12px;
  border: 0; border-radius: 16px; cursor: pointer; font: inherit; font-family: var(--head); font-size: 1rem;
  color: #fff; text-decoration: none !important; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
  transition: transform 0.08s, filter 0.2s;
}
.inv-share:hover { filter: brightness(1.1); }
.inv-share:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35); }
.inv-share-ico { width: 26px; height: 26px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.22); font-size: 0.9rem; line-height: 1; }
.inv-share-wa { background: #1fa855; grid-column: 1 / -1; min-height: 62px; font-size: 1.15rem; }
.inv-share-wa .inv-share-ico::before { content: "\2706"; }
.inv-share-x { background: #111; border: 2px solid #444; }
.inv-share-x .inv-share-ico::before { content: "X"; font-family: var(--head); }
.inv-share-tg { background: #229ed9; }
.inv-share-tg .inv-share-ico::before { content: "\27A4"; }
.inv-share-fb { background: #1877f2; }
.inv-share-fb .inv-share-ico::before { content: "f"; font-family: var(--head); font-size: 1.1rem; }
.inv-share-native { background: var(--cool); }
.inv-share-native .inv-share-ico::before { content: "\2197"; }

.inv-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.inv-steps li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 12px 6px; border-radius: 16px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); font-weight: 800; font-size: 0.85rem; line-height: 1.2; }
.inv-steps b { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font-family: var(--head); color: #1a0b3d; background: var(--hot); }

.inv-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.inv-stat { display: flex; flex-direction: column; align-items: center; padding: 12px 6px; border-radius: 16px; background: rgba(11, 6, 32, 0.55); border: 2px solid rgba(0, 229, 255, 0.45); }
.inv-stat-y { border-color: rgba(255, 212, 0, 0.7); }
.inv-stat-l, .inv-stat-u { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mut); }
.inv-stat-n { font-family: var(--head); font-size: clamp(2.2rem, 11vw, 3rem); line-height: 1.05; color: var(--c); }
.inv-stat-y .inv-stat-n { color: var(--y); }
.inv-stats-pop .inv-stat { animation: bidPop 0.6s ease; }
.inv-empty { margin: 0; padding: 14px; text-align: center; color: var(--mut); border: 2px dashed var(--line2); border-radius: 14px; }
.inv-recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.inv-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); min-width: 0; }
.inv-ava { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; font-family: var(--head); color: #1a0b3d; background: var(--cool); }
.inv-row-name { flex: 1; min-width: 0; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-row-plus { flex-shrink: 0; font-family: var(--head); color: var(--g); }
.inv-row-time { flex-shrink: 0; font-size: 0.8rem; color: var(--mut); }
.inv-row-new { animation: invRowIn 0.9s cubic-bezier(0.2, 1.4, 0.4, 1); }

.inv-art-sub { margin: -4px 0 12px; color: var(--mut); font-weight: 700; font-size: 0.92rem; }
.inv-posters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: end; }
.inv-poster { margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.inv-frame { position: relative; border-radius: 14px; overflow: hidden; border: 2px solid var(--line2); background: #1d0c52; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4); }
.inv-frame.is-loading::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.12) 50%, transparent 70%);
  animation: shine 1.4s linear infinite;
}
.inv-canvas { display: block; width: 100%; height: auto; }
.inv-poster-cap { display: flex; flex-direction: column; gap: 6px; }
.inv-poster-cap > b { font-family: var(--head); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.04em; }
.inv-poster-btns { display: grid; gap: 6px; }
.inv-poster-btns .btn { width: 100%; padding: 6px 8px; }

.inv-cta { display: grid; gap: 8px; text-align: center; }
.inv-small { margin: 0; color: var(--mut); }

@media (min-width: 600px) {
  .inv-shares { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .inv-share-wa, .inv-share-native { grid-column: 1 / -1; }
  .inv-poster-btns { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
  .inv-hero { padding: 34px 24px 26px; }
  .inv-star { width: 104px; height: 104px; top: 16px; right: 16px; }
  .inv-star b { font-size: 1rem; }
}
@media (min-width: 900px) {
  .inv { max-width: 900px; }
  .inv-posters { gap: 24px; }
  .inv-poster-story { padding: 0 10%; }
}

@keyframes invRowIn { 0% { transform: translateY(-14px) scale(0.96); background: rgba(182, 255, 0, 0.45); opacity: 0; } 100% { transform: none; opacity: 1; } }
/* Tarjetas de ganadores: la foto no estira la tarjeta. */
.mini-media { overflow: hidden; background-color: #fff; }
.mini-media .pimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: none; }
