/* Pantallas de la app (el escenario de juego y las hojas usan los estilos del menú de pruebas) */
[hidden] { display: none !important; }
#app { max-width: 560px; margin: 0 auto; }
.pad {
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-top: max(18px, env(safe-area-inset-top, 0px)); padding-bottom: 48px;
  display: flex; flex-direction: column; gap: 20px;
}
.top { align-items: center; }
.hola { display: flex; flex-direction: column; line-height: 1.1; }
.hola small { font-weight: 800; color: var(--soft); font-size: 14px; }
.hola b { font-family: var(--display); font-weight: 400; font-size: 28px; letter-spacing: .3px; text-shadow: 0 3px 0 #120D4A; }
.acc { display: flex; gap: 8px; }
.tit { margin: 0; font-family: var(--display); font-weight: 400; font-size: 26px; text-align: center; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .chip { flex: none; }
.nota { margin: 0; font-weight: 800; font-size: 14px; line-height: 1.45; color: var(--soft); }
.vacio { margin: 0; font-weight: 800; font-size: 15px; color: var(--soft); text-align: center; padding: 10px 0; }
.err { margin: 0; font-weight: 900; font-size: 14px; color: #fff; background: var(--pink); border-radius: 12px; padding: 8px 12px; }

/* entrar */
.auth { min-height: 100vh; justify-content: center; box-sizing: border-box; }
.auth .brand { text-align: center; }
.auth .brand h1 { font-size: clamp(44px, 13vw, 64px); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 18px; background: rgba(255,255,255,.12); }
.tabs button { border: 0; border-radius: 14px; padding: 11px 8px; font-family: var(--display); font-size: 18px; color: var(--paper); background: transparent; }
.tabs button.on { background: var(--paper); color: var(--ink); box-shadow: 0 3px 0 #C9C6E6; }
.panel { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 22px; background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 2px rgba(255,255,255,.14); }
.panel label, .lbl { display: flex; flex-direction: column; gap: 6px; font-weight: 900; font-size: 14px; color: var(--soft); text-align: left; width: 100%; }
.lbl { color: #423D74; }
.panel input, .lbl input { border: 0; border-radius: 14px; padding: 13px 12px; font: 800 16px var(--body); color: var(--ink); background: var(--paper); box-shadow: inset 0 0 0 2px #E4E1F5; width: 100%; box-sizing: border-box; }
.btn:disabled { opacity: .45; pointer-events: none; }

/* juego del día */
.dia {
  --c: #4C8DFF; border-radius: 28px; padding: 16px; display: flex; flex-direction: column; gap: 14px; color: var(--paper);
  background: radial-gradient(circle at 80% 0%, rgba(255,255,255,.3), transparent 55%), linear-gradient(170deg, color-mix(in srgb, var(--c) 80%, white), var(--c) 60%, color-mix(in srgb, var(--c) 70%, black));
  box-shadow: 0 8px 0 color-mix(in srgb, var(--c) 50%, black), 0 16px 30px rgba(10,6,50,.4), inset 0 2px 0 rgba(255,255,255,.35);
}
.dia-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.etq { font-family: var(--display); font-size: 15px; letter-spacing: .6px; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; background: rgba(0,0,0,.2); }
.reloj { font-weight: 900; font-size: 13px; color: rgba(255,255,255,.9); font-variant-numeric: tabular-nums; }
.dia-main { display: flex; gap: 14px; align-items: center; }
.emo.big, .emo.sm { flex: none; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: inset 0 -6px 0 rgba(0,0,0,.08), 0 6px 14px rgba(0,0,0,.2); }
.emo.big { width: 92px; height: 92px; font-size: 54px; }
.emo.sm { width: 40px; height: 40px; font-size: 24px; }
.dia-txt { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.dia-txt h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1.05; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.intentos { display: flex; align-items: center; gap: 6px; font-weight: 900; font-size: 14px; }
.bola { width: 14px; height: 14px; border-radius: 50%; background: var(--sun); box-shadow: inset 0 -2px 0 rgba(0,0,0,.2); }
.bola.usada { background: rgba(0,0,0,.25); box-shadow: none; }
.intentos span:last-child { margin-left: 4px; }
.mejor { font-weight: 800; font-size: 14px; color: rgba(255,255,255,.92); }
.regla { margin: 0; font-weight: 800; font-size: 12.5px; line-height: 1.4; color: rgba(255,255,255,.85); }
.dia .btns { margin-top: 0; }

/* grupos */
.grupo, .practicar {
  border: 0; width: 100%; text-align: left; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px;
  padding: 14px 16px; border-radius: 20px; color: var(--ink); background: var(--paper); box-shadow: 0 5px 0 #C9C6E6, 0 10px 20px rgba(10,6,50,.25);
}
.grupo:active, .practicar:active { transform: translateY(4px); box-shadow: 0 1px 0 #C9C6E6; }
.g-nom { font-family: var(--display); font-size: 21px; }
.g-sub { grid-column: 1; font-weight: 800; font-size: 13px; color: #6B6699; }
.g-fl { grid-column: 2; grid-row: 1 / span 2; font-family: var(--display); font-size: 30px; color: #B8B4DC; }
.practicar span:first-child { font-family: var(--display); font-size: 21px; }
.medtot { grid-column: 1; font-weight: 900; font-size: 14px; color: #6B6699; }
.invita { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 20px; background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 2px rgba(255,255,255,.14); }
.invita small { display: block; font-weight: 800; font-size: 13px; color: var(--soft); }
.invita b { font-weight: 900; font-size: 16px; word-break: break-all; }
.invita .btns { margin: 0; }
.btn.wa { text-decoration: none; text-align: center; background: linear-gradient(180deg, #45E07F, #22B85C); box-shadow: 0 6px 0 #13813E, 0 10px 18px rgba(0,0,0,.18); }
.hoyj { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 20px; flex-wrap: wrap; }
.hoyj b { font-weight: 400; }
.x2 { font-family: var(--body); font-weight: 900; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--sun); color: var(--ink); }
.rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rank li { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.1); font-weight: 900; }
.rank li.yo { background: var(--paper); color: var(--ink); }
.rank .pos { font-family: var(--display); font-size: 20px; text-align: center; }
.rank li:nth-child(1) .pos { color: var(--sun); }
.rank li.yo:nth-child(1) .pos { color: #C98A00; }
.rank .nom { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank .pts { font-variant-numeric: tabular-nums; }
.rank .lg { font-size: 12px; padding: 2px 7px; border-radius: 999px; background: var(--mint); color: #08392B; }
.rank-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 20px; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 2px rgba(255,255,255,.14); }
.rank5 { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rank5 li, .rank-yo { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; font-weight: 900; background: rgba(255,255,255,.06); }
.rank5 li.yo, .rank-yo { background: var(--paper); color: var(--ink); }
.rank5 .pos, .rank-yo .pos { font-family: var(--display); font-size: 18px; text-align: center; color: var(--soft); }
.rank5 li:nth-child(1) .pos { color: var(--sun); }
.rank5 li.yo:nth-child(1) .pos { color: #C98A00; }
.rank5 .nom, .rank-yo .nom { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank5 .pts, .rank-yo .pts { font-variant-numeric: tabular-nums; }
.rank-sep { text-align: center; color: var(--soft); font-weight: 900; letter-spacing: 3px; line-height: .8; }
.rank-info { margin: 0; text-align: center; font-weight: 800; font-size: 12.5px; color: var(--soft); }
.dias { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.dmini { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; background: rgba(255,255,255,.1); min-width: 0; }
.d-emo { font-size: 20px; }
.d-d { font-weight: 900; font-size: 12px; color: var(--soft); }
.d-w { font-weight: 900; font-size: 10px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link { border: 0; background: none; color: var(--soft); font-weight: 800; font-size: 14px; text-decoration: underline; align-self: center; }

/* practicar */
.card:disabled { filter: grayscale(.8); opacity: .55; }
.card .meta { font-size: 10.5px; font-weight: 900; color: rgba(255,255,255,.85); letter-spacing: -.2px; }

/* hojas y avisos */
.modal { position: fixed; z-index: 20; align-items: center; }
.modal .sheet h3 { font-size: 28px; }
#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 30; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 16px; background: var(--ink); color: #fff; font-weight: 900; font-size: 15px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }

/* ---------- invitado, cuenta y modo ciego ---------- */
.auth { gap: 18px; }
.claim { margin: -4px 0 0; text-align: center; font-family: var(--display); font-size: 22px; line-height: 1.15; color: var(--soft); }
.claim b { color: var(--sun); font-weight: 400; }
.mini { margin: 0; font-size: 12.5px; font-weight: 800; color: var(--soft); line-height: 1.4; text-align: center; }
.gbox { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.sep { width: 100%; display: flex; align-items: center; gap: 10px; color: var(--soft); font-weight: 900; font-size: 12px; text-transform: uppercase; }
.sep::before, .sep::after { content: ''; flex: 1; height: 2px; background: rgba(255,255,255,.16); border-radius: 2px; }
.aviso { margin: 0; padding: 10px 12px; border-radius: 14px; background: rgba(252,200,2,.14); box-shadow: inset 0 0 0 2px rgba(252,200,2,.35); color: var(--paper); font-weight: 800; font-size: 13px; text-align: center; }
.pie { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px 9px; font-weight: 800; font-size: 12px; color: var(--soft); }
.pie a { color: var(--soft); text-decoration: underline; text-underline-offset: 2px; }
.pie b { color: var(--sun); }
.pie-sheet { color: #6B6699; }
.pie-sheet a { color: #6B6699; }
.guardar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: rgba(252,200,2,.12); box-shadow: inset 0 0 0 2px rgba(252,200,2,.38); }
.guardar div { flex: 1; min-width: 0; }
.guardar b { display: block; font-size: 14px; }
.guardar small { display: block; font-size: 12.5px; color: var(--soft); font-weight: 800; line-height: 1.35; }
.guardar .btn { flex: none; padding: 10px 14px; font-size: 18px; }
.racha { font-family: var(--body); font-size: 12px; background: rgba(252,200,2,.2); color: var(--sun); padding: 3px 8px; border-radius: 999px; vertical-align: middle; }
.pct { font-weight: 900; font-size: 12.5px; color: var(--sun); }
.ciego { padding: 14px; border-radius: 18px; background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 2px rgba(252,200,2,.38); display: flex; flex-direction: column; gap: 8px; }
.ciego b { font-family: var(--display); font-size: 21px; font-weight: 400; }
.ciego p { margin: 0; font-weight: 800; font-size: 13px; line-height: 1.4; color: var(--soft); }
.ciego .btn { margin-top: 2px; }
.rank li.oculto .pts { font-size: 12px; color: var(--soft); font-weight: 800; }
.racha-g { display: block; color: var(--sun) !important; margin-top: 3px; }
.cuenta-box { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 14px; background: #F0EEFB; color: var(--ink); width: 100%; box-sizing: border-box; }
.cuenta-box b { font-family: var(--display); font-size: 24px; font-weight: 400; }
.cuenta-box small { font-weight: 800; font-size: 12.5px; color: #6B6699; }
.sheet > .btn { width: 100%; }
.srow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 2px dashed #E4E1F5; color: var(--ink); width: 100%; }
.srow b { font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow span { display: flex; gap: 6px; flex: none; }
.mini-btn { border: 0; border-radius: 10px; padding: 6px 9px; font: 900 11px var(--body); color: var(--ink); background: #F0EEFB; box-shadow: inset 0 -2px 0 #DAD6F2; }
.mini-btn.alt { background: var(--pink); color: #fff; box-shadow: inset 0 -2px 0 rgba(0,0,0,.2); }
.sel { border: 0; border-radius: 14px; padding: 12px; font: 800 16px var(--body); color: var(--ink); background: var(--paper); box-shadow: inset 0 0 0 2px #E4E1F5; width: 100%; box-sizing: border-box; }
.peligro { color: #FFD1D7; }
.peligro-btn { background: linear-gradient(180deg, #FF8A97, var(--pink)); box-shadow: 0 6px 0 #B83245, 0 10px 18px rgba(0,0,0,.18); }
.lbl-mini { margin: 10px 0 2px; font-weight: 900; font-size: 12px; color: #6B6699; text-transform: uppercase; letter-spacing: .5px; width: 100%; text-align: left; }

/* fin de partida: Otra vez y Compartir a ancho completo; Menú en su fila, centrado */
.btns-fin { flex-wrap: wrap; }
.btns-fin #oRetry,
.btns-fin #oShare { flex: 1 1 100%; }
.btns-fin #oMenu { flex: 0 0 auto; margin: 0 auto; min-width: 140px; padding-left: 26px; padding-right: 26px; }
#oShare { background: linear-gradient(180deg, #FFFFFF, #F0EEFB); color: var(--ink); text-shadow: none; box-shadow: 0 6px 0 #C9C6E6, 0 10px 18px rgba(0,0,0,.18); }
#oShare:active { box-shadow: 0 1px 0 #C9C6E6; }

/* ---------- landing de escritorio ---------- */
#desk { display: flex; align-items: center; justify-content: center; min-height: 100%; box-sizing: border-box; padding: 28px max(16px, env(safe-area-inset-left, 0px)) 28px max(16px, env(safe-area-inset-right, 0px)); }
.land { width: 100%; max-width: 980px; display: flex; flex-direction: column; gap: 22px; }
.land-top { display: flex; align-items: center; justify-content: center; gap: 16px; text-align: left; }
.land-logo { width: 92px; height: 92px; filter: drop-shadow(0 12px 20px rgba(0,0,0,.38)); }
#desk .land h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(42px, 6vw, 64px); line-height: .95; letter-spacing: .5px; color: var(--paper); text-shadow: 0 4px 0 #120D4A, 0 8px 18px rgba(0,0,0,.35); }
#desk .land h1 span { color: var(--sun); }
#desk .land-tag { margin: 4px 0 0; max-width: none; font-weight: 800; font-size: 16px; color: var(--soft); }
#desk .land-claim { margin: 0; max-width: none; text-align: center; font-family: var(--display); font-size: clamp(22px, 3vw, 32px); line-height: 1.15; color: var(--paper); }
#desk .land-claim b { color: var(--sun); font-weight: 400; }
.land-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 22px; align-items: stretch; }
.land-card, .land-qr { border-radius: 28px; padding: 20px; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 2px rgba(255,255,255,.14), 0 18px 40px rgba(0,0,0,.25); display: flex; flex-direction: column; gap: 14px; }
.land-phone { border-radius: 22px; padding: 22px 16px; display: flex; flex-direction: column; align-items: center; gap: 6px; background: radial-gradient(circle at 50% 20%, rgba(252,200,2,.35), transparent 60%), linear-gradient(170deg, #4B3FE0, var(--night)); box-shadow: inset 0 0 0 3px rgba(255,255,255,.25); }
.land-phone span { font-size: 64px; line-height: 1; }
.land-phone small { font-weight: 900; font-size: 13px; color: var(--paper); }
.land-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-weight: 900; font-size: 14px; }
.land-qr { align-items: center; text-align: center; justify-content: center; }
.land-qr img { width: 220px; height: 220px; border-radius: 18px; background: #fff; padding: 8px; box-shadow: 0 10px 24px rgba(0,0,0,.3); }
.land-qr b { font-family: var(--display); font-size: 24px; font-weight: 400; }
.land-qr small { font-weight: 800; font-size: 13px; color: var(--soft); }
.land-qr small span { color: var(--sun); }
.land-qr .btn { width: 100%; text-decoration: none; text-align: center; }
.land-pie { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-weight: 800; font-size: 12px; color: var(--soft); }
.land-pie a { color: var(--soft); }
.land-pie b { color: var(--sun); }
@media (max-width: 760px) { .land-grid { grid-template-columns: 1fr; } .land-top { justify-content: flex-start; } }

