:root {
  --night: #141414;
  --white: #fff;
  --orange: #f18110;
  --orange-d: #cc570b;
  --navy: #1c1e69;
  --ink: #141414;
  --radius: 18px;
  --font: ui-rounded, "Arial Rounded MT Bold", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--night);
  color: var(--white);
  font-family: var(--font);
  line-height: 1.4;
  position: relative;
}

/* Fondo: la esquina del kiosco de noche, oscurecida para que se lea todo */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(20,20,20,.35) 0%, rgba(20,20,20,.88) 45%, var(--night) 100%),
    url("../img/bg.webp") center top / cover no-repeat;
}

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

.wrap {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 8px 0 18px; }

.logo {
  display: block;
  width: min(100%, 340px);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.7));
}

.tagline {
  display: inline-block;
  margin: 14px 0 0;
  padding: 4px 14px;
  background: var(--orange);
  color: var(--ink);
  font-weight: 800;
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-radius: 6px;
  transform: rotate(-2deg);
  box-shadow: 3px 3px 0 var(--navy);
}

/* ---------- Botones ---------- */
.links { display: grid; gap: 12px; }

.btn {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 10px 16px;
  background: var(--white);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 5px 0 var(--ink);
  font: 800 1.08rem/1.2 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn:focus-visible, .form input:focus-visible, .form textarea:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

.btn-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--orange);
}
.btn-icon svg, .btn-icon img { display: block; }
.btn-label { flex: 1; text-align: center; padding-right: 42px; } /* centra el texto compensando el icono */

/* Steam: protagonista */
.btn-primary {
  min-height: 78px;
  background: var(--orange);
  color: var(--ink);
  font-size: 1.28rem;
  border-color: var(--ink);
  box-shadow: 0 6px 0 var(--ink), 0 0 0 4px var(--white);
  animation: pulse 2.6s ease-in-out infinite;
}
.btn-primary:hover { box-shadow: 0 8px 0 var(--ink), 0 0 0 4px var(--white); }
.btn-primary:active { box-shadow: 0 1px 0 var(--ink), 0 0 0 4px var(--white); }
.btn-primary .btn-icon { width: 50px; height: 50px; background: var(--white); color: var(--orange); }
.btn-primary .btn-icon svg, .btn-primary .btn-icon img { width: 32px; height: 32px; }
.btn-primary .btn-label { padding-right: 50px; }

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


/* Link sin URL todavia */
.btn.is-pending { cursor: default; }

/* ---------- Idea ---------- */
.idea {
  margin-top: 34px;
  padding: 22px 18px 20px;
  background: rgba(21, 17, 14, .82);
  border: 3px solid var(--orange);
  border-radius: 22px;
  box-shadow: 0 5px 0 var(--navy);
}

.idea h2 {
  margin: 0 0 6px;
  color: var(--orange);
  font-size: 1.45rem;
  line-height: 1.15;
  text-align: center;
}
.idea-text { margin: 0 0 16px; text-align: center; font-size: .95rem; opacity: .92; }

.form label { display: block; margin: 12px 0 5px; font-weight: 800; font-size: .9rem; letter-spacing: .02em; }

.form input[type=text], .form input[type=email], .form textarea {
  display: block;
  width: 100%;
  padding: 13px 14px;
  background: var(--white);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 14px;
  font: 600 1rem/1.3 var(--font); /* 16px+: evita el zoom automatico en iOS */
}
.form textarea { resize: vertical; min-height: 120px; }

.btn-submit {
  width: 100%;
  margin-top: 18px;
  justify-content: center;
  background: var(--orange);
  color: var(--ink);
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.btn-submit:disabled { opacity: .7; cursor: wait; }

/* Honeypot fuera de pantalla (no display:none, algunos bots lo detectan) */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.notice {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 700;
  text-align: center;
  border: 3px solid var(--ink);
}
.notice-ok { background: var(--orange); color: var(--ink); }
.notice-error { background: #ffd9d4; color: #7a0f0a; }

.foot { margin-top: 28px; text-align: center; font-size: .8rem; opacity: .7; }

/* ---------- Pantallas grandes ---------- */
@media (min-width: 600px) {
  .wrap { padding-top: 44px; }
  .logo { width: 380px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary { animation: none; }
  .btn { transition: none; }
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Pagina /contanos ---------- */
.hero-sm { padding-bottom: 4px; }
.hero-sm .logo { width: min(100%, 240px); }
.idea h1 { margin: 0 0 6px; color: var(--orange); font-size: 1.45rem; line-height: 1.15; text-align: center; }
.form .opt { font-weight: 600; opacity: .7; }
.form .hint { margin: 6px 0 0; font-size: .8rem; opacity: .75; }
a.btn-submit { text-decoration: none; }

/* ---------- /back ---------- */
.wrap-back { max-width: 760px; }
.back-login { margin-top: 12vh; }
.form input[type=password] {
  display: block; width: 100%; padding: 13px 14px; background: var(--white); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 14px; font: 600 1rem/1.3 var(--font);
}
.back-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.back-head h1 { margin: 0; color: var(--orange); font-size: 1.6rem; }
.back-card {
  margin-top: 14px; padding: 16px; background: rgba(21, 17, 14, .85);
  border: 3px solid var(--orange); border-radius: 18px; box-shadow: 0 4px 0 var(--navy);
}
.back-card h2 { margin: 0 0 10px; font-size: 1.1rem; color: var(--orange); }
.back-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.back-row label { font-weight: 800; }
.back-card select, .back-card input[type=text], .back-card input[type=number] {
  padding: 10px 12px; background: var(--white); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 12px; font: 600 1rem/1.2 var(--font);
}
.back-add input[name=name] { flex: 1 1 180px; min-width: 0; }
.back-add input[name=qty] { width: 76px; }
.back-btn {
  padding: 9px 14px; background: var(--orange); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 12px; font: 800 .9rem/1.1 var(--font); cursor: pointer;
}
.back-btn:hover { filter: brightness(1.08); }
.back-btn-ghost { background: var(--white); }
.back-btn-danger { background: #ffd9d4; color: #7a0f0a; }
.back-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.back-list li {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; background: rgba(255,255,255,.08); border-radius: 12px;
}
.back-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.back-actions { display: flex; gap: 6px; }
.back-win { color: var(--orange); font-weight: 800; }
.back-muted { opacity: .65; font-weight: 600; font-size: .9rem; }
.back-bulk { margin-top: 14px; }
.back-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.back-nav a {
  padding: 9px 14px; background: var(--white); color: var(--ink); border: 3px solid var(--ink);
  border-radius: 12px; font: 800 .9rem/1.1 var(--font); text-decoration: none;
}
.back-nav a.is-on { background: var(--orange); }
.back-title { margin: 0 0 4px; color: var(--orange); font-size: 1.5rem; }
.back-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-bottom: 6px; overflow-wrap: anywhere; }
.back-q { margin: 10px 0 2px; font-weight: 800; font-size: .85rem; color: var(--orange); }
.back-a { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }


body { overflow-x: clip; }
.links { grid-template-columns: minmax(0, 1fr); }

/* ---------- Home: lanzamiento (una sola pantalla) ---------- */
.home { --orange-l: #ffb347; --line: rgba(255,255,255,.16); --muted: rgba(255,255,255,.74); background: #0f0f12; }
.home::before { display: none; }
.home .launch {
  position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center;
  isolation: isolate; overflow: hidden; text-align: center;
  padding: max(18px, env(safe-area-inset-top)) 0 max(18px, env(safe-area-inset-bottom));
}
/* Solo se ve la parte de arriba de la foto: el logo pintado abajo queda fuera */
.home .launch::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 175%; z-index: -2;
  background: url("../img/bg.webp") center top / cover no-repeat;
}
.home .launch::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(80% 60% at 50% 40%, rgba(15,15,18,.2), rgba(15,15,18,.8) 80%),
    linear-gradient(180deg, rgba(15,15,18,.5) 0%, rgba(15,15,18,.55) 55%, #0f0f12 100%);
}
.home .wrap { max-width: 720px; width: min(720px, 100% - 32px); padding: 0; }
.home .stack { display: flex; flex-direction: column; align-items: center; gap: clamp(10px, 2.2svh, 22px); }

.home .pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 999px;
  background: rgba(241,129,16,.16); border: 1px solid rgba(241,129,16,.6); color: var(--orange-l);
  font-weight: 800; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
}
.home .pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); animation: ping 1.8s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(241,129,16,.7); } 70%, 100% { box-shadow: 0 0 0 10px rgba(241,129,16,0); } }

.home .logo { width: min(72vw, 380px, 44svh); margin: 0; filter: drop-shadow(0 8px 24px rgba(0,0,0,.75)); }
.home .date {
  margin: 0; font-weight: 900; line-height: .95; letter-spacing: -.02em;
  font-size: clamp(2.3rem, min(11vw, 10svh), 5.6rem);
  text-shadow: 0 4px 0 var(--navy), 0 10px 40px rgba(0,0,0,.6);
}
.home .date b { color: var(--orange); }
.home .date-sub { margin: -4px 0 0; font-size: clamp(.92rem, 2.2vw, 1.2rem); color: var(--muted); }
.home .date-sub strong { color: var(--white); }

.home .count { display: flex; justify-content: center; gap: clamp(6px, 1.6vw, 16px); margin: 0; padding: 0; list-style: none; }
.home .count li {
  width: clamp(66px, 19vw, 118px); padding: clamp(8px, 1.6svh, 16px) 4px clamp(7px, 1.2svh, 12px);
  background: rgba(20,20,24,.72); border: 1px solid var(--line); border-radius: 16px; backdrop-filter: blur(10px);
}
.home .count .n { display: block; font-weight: 900; font-size: clamp(1.8rem, min(8.4vw, 7svh), 3.6rem); line-height: 1; font-variant-numeric: tabular-nums; }
.home .count li:last-child .n { color: var(--orange); }
.home .count .l { display: block; margin-top: 6px; font-size: clamp(.58rem, 1.5vw, .74rem); letter-spacing: .16em; text-transform: uppercase; font-weight: 800; color: var(--muted); }
.home .launched { display: none; margin: 0; font-weight: 900; font-size: clamp(1.6rem, 5vw, 3rem); color: var(--orange); }
.home.is-live .count { display: none; }
.home.is-live .launched { display: block; }

.home .btn-main {
  justify-content: center; width: min(100%, 420px); min-height: 64px; padding: 12px 26px;
  background: var(--orange); font-size: 1.15rem;
  box-shadow: 0 6px 0 var(--ink), 0 0 0 4px rgba(255,255,255,.9), 0 0 40px rgba(241,129,16,.45);
}
.home .btn-main:hover { box-shadow: 0 8px 0 var(--ink), 0 0 0 4px #fff, 0 0 54px rgba(241,129,16,.6); }
.home .btn-main:active { box-shadow: 0 1px 0 var(--ink), 0 0 0 4px #fff; }
.home .btn-main img { width: 28px; height: 28px; }

.home .social { display: flex; justify-content: center; gap: 10px; margin: 0; padding: 0; list-style: none; }
.home .social a {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(255,255,255,.08); backdrop-filter: blur(8px);
  color: var(--white); transition: transform .2s, background .2s, color .2s;
}
.home .social a:hover { transform: translateY(-3px); background: var(--orange); color: var(--ink); }
.home .social a:focus-visible, .home .idea-link:focus-visible, .home .close:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.home .social svg { width: 24px; height: 24px; }

.home .idea-link {
  background: none; border: 0; color: var(--muted); font: 700 .92rem var(--font);
  text-decoration: underline; text-underline-offset: 4px; cursor: pointer; padding: 8px;
}
.home .idea-link:hover { color: var(--orange); }
.home .foot { margin: 0; font-size: .75rem; color: rgba(255,255,255,.45); opacity: 1; }

.home dialog {
  position: fixed; width: min(440px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 0;
  border: 3px solid var(--orange); border-radius: 24px; background: #15110e; color: var(--white); box-shadow: 0 6px 0 var(--navy);
}
.home dialog::backdrop { background: rgba(0,0,0,.75); backdrop-filter: blur(4px); }
.home .form-box { padding: 22px; }
.home .form-box h2 { margin: 0 0 6px; padding-right: 30px; color: var(--orange); font-size: 1.4rem; line-height: 1.15; }
.home .form-box .idea-text { margin: 0 0 6px; text-align: left; font-size: .92rem; color: var(--muted); }
.home .form-box .form label:first-of-type { margin-top: 8px; }
.home .form-box .btn-submit { min-height: 56px; }
.home .close {
  position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.1); color: #fff; font-size: 1.3rem; cursor: pointer;
}

@media (max-height: 640px) { .home .pill, .home .foot { display: none; } }
@media (prefers-reduced-motion: reduce) { .home .pill i { animation: none; } .home .social a { transition: none; } }
