/* 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; }
.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); }
