/* Stadiumville Play: sin fuentes ni recursos externos */
:root {
  --bg: #14213d;
  --panel: #1f3158;
  --ink: #ffffff;
  --muted: #c9d3ea;
  --gold: #ffd23f;
  --on-gold: #1b1b2f;
  --line: #5f77ad;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 17px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; min-height: 100vh; min-height: 100dvh; -webkit-text-size-adjust: 100%; }
#app { max-width: 480px; margin: 0 auto; padding: 0 16px 24px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
[hidden] { display: none !important; }
a { color: var(--gold); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.top { padding: 10px 0 2px; }
.brand { color: var(--ink); font-weight: 800; text-decoration: none; letter-spacing: .02em; display: inline-block; min-height: 44px; line-height: 44px; }
h1 { font-size: 26px; line-height: 1.15; margin: 4px 0 8px; }
h2 { font-size: 20px; margin: 18px 0 8px; }
h3 { font-size: 18px; margin: 0 0 4px; }
.lead { color: var(--muted); margin: 0 0 14px; }
.small { font-size: 14px; color: var(--muted); margin: 6px 0; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin: 0; }
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 6px #0b3d91; border-radius: 10px; }

.card { display: block; background: var(--panel); border: 2px solid var(--line); border-radius: 18px; padding: 14px; margin: 12px 0; color: var(--ink); text-decoration: none; }
.daily { border-color: var(--gold); background: linear-gradient(135deg, #2b4a8c, #1f3158); }
.daily-name { display: block; font-size: 28px; font-weight: 800; margin: 2px 0 8px; }
.daily-go { display: inline-block; background: var(--gold); color: var(--on-gold); font-weight: 800; padding: 12px 18px; border-radius: 999px; min-height: 44px; }

.grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid a { display: flex; flex-direction: column; justify-content: center; min-height: 84px; padding: 10px 12px; border-radius: 16px; background: var(--panel); border: 2px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 700; }
.grid a small { font-weight: 400; color: var(--muted); font-size: 13px; }
.grid a.today { border-color: var(--gold); }
.grid .ic { font-size: 26px; line-height: 1; }
.last { color: var(--muted); font-size: 14px; }

.btn { display: block; width: 100%; min-height: 48px; padding: 12px 16px; margin: 10px 0 0; border-radius: 999px; border: 2px solid #fff; background: transparent; color: #fff; font: 700 17px system-ui, sans-serif; text-align: center; text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.btn.store { background: #fff; border-color: #fff; color: #14213d; }
.btn:active { transform: scale(.98); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.row .btn { margin-top: 0; display: flex; align-items: center; justify-content: center; }

#stage { position: relative; width: min(100%, calc((100vh - 150px) * 9 / 16)); width: min(100%, calc((100dvh - 150px) * 9 / 16)); margin: 0 auto; aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; background: #000; border: 2px solid var(--line); }
#cv { display: block; width: 100%; height: 100%; touch-action: none; -webkit-tap-highlight-color: transparent; }
#hud { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; padding: 10px 12px; font-weight: 800; font-size: 17px; pointer-events: none; }
#hud span { background: rgba(10, 20, 45, .82); padding: 4px 10px; border-radius: 999px; }
#intro { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; text-align: center; padding: 20px; background: rgba(10, 20, 45, .93); }
#intro h2 { font-size: 32px; margin: 4px 0 10px; }
.friend { font-weight: 700; color: var(--gold); }
button.tap { margin: 10px auto 0; max-width: 480px; }

.bigscore { font-size: 88px; line-height: 1; font-weight: 900; margin: 4px 0 6px; color: var(--gold); }
.bigscore small { font-size: 22px; color: var(--muted); font-weight: 600; }
.cmp { font-size: 22px; font-weight: 800; background: var(--panel); border: 2px solid var(--gold); border-radius: 16px; padding: 10px 14px; }
.parts { list-style: none; padding: 0; color: var(--muted); }
label { font-weight: 700; display: block; margin-bottom: 6px; }
input[type=text] { width: 100%; min-height: 48px; font: 17px system-ui, sans-serif; padding: 8px 12px; border-radius: 12px; border: 2px solid var(--line); background: #0d1730; color: #fff; }
footer { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  .btn:active { transform: none; }
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Dentro de una pagina del sitio (iframe): solo el juego */
.emb #app { padding: 0 10px 10px; max-width: none; }
.emb .top, .emb .seo, .emb footer, .emb #other, .emb #menu .lead { display: none; }
.emb #stage { width: min(100%, calc((100vh - 70px) * 9 / 16)); width: min(100%, calc((100dvh - 70px) * 9 / 16)); }

.top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
.sitenav { display: flex; gap: 2px; flex-wrap: wrap; }
.sitenav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 600; padding: 0 8px; min-height: 44px; display: inline-flex; align-items: center; }
.sitenav a:hover { color: #fff; text-decoration: underline; }
.seo { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 4px; }
.seo p { color: var(--muted); font-size: 16px; }
.guides { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.guides a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border: 2px solid var(--line); border-radius: 12px; color: #fff; text-decoration: none; font-weight: 600; }
.guides a:hover { border-color: var(--gold); }
