:root {
  --verde: #34C759; --azul: #0A84FF; --rojo: #FF5B5B; --texto: #333;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Quicksand', system-ui, sans-serif;
  color: var(--texto);
  min-height: 100vh;
  background: linear-gradient(135deg, #FFE259, #FFA751);
}
#app { max-width: 640px; margin: 0 auto; padding: 16px; }
.card { background: #fff; border-radius: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: 24px; margin-bottom: 16px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 12px; padding: 14px 24px; font-size: 1rem;
  font-family: inherit; font-weight: 700; color: #fff; cursor: pointer;
  min-height: 48px; width: 100%;
}
.btn.verde { background: var(--verde); }
.btn.azul { background: var(--azul); }
.btn.rojo { background: var(--rojo); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.card .btn + .btn { margin-top: 12px; }
.carga-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(255, 226, 89, 0.35);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.carga-overlay.visible { opacity: 1; pointer-events: auto; }
.carga-box {
  background: #fff; border-radius: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.2);
  padding: 28px 40px; text-align: center; font-family: inherit; color: var(--texto);
}
.carga-hora { display: block; font-size: 3rem; animation: cargaPulso 1s ease-in-out infinite; }
.carga-box p { margin-top: 12px; font-weight: 700; }
@keyframes cargaPulso { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }
input[type=text] {
  width: 100%; padding: 12px; border: 2px solid #eee; border-radius: 12px;
  font-family: inherit; font-size: 1rem; margin-bottom: 12px;
}
select {
  width: 100%; padding: 12px; border: 2px solid #eee; border-radius: 12px;
  font-family: inherit; font-size: 1rem; background: #fff; color: var(--texto);
}
.field { margin-bottom: 16px; }
.field > label { display: block; font-weight: 700; margin-bottom: 6px; }
.chips { display: flex; gap: 8px; }
.chip {
  flex: 1; padding: 10px 0; border: 2px solid #e5e5ea; border-radius: 12px;
  background: #fff; color: var(--texto); font-family: inherit; font-size: .95rem;
  font-weight: 700; cursor: pointer; text-align: center;
}
.chip.activo { background: var(--azul); border-color: var(--azul); color: #fff; }
.field.stepper { text-align: center; }
.stepper-row { display: inline-flex; align-items: center; gap: 14px; }
.stepper-btn {
  width: 36px; height: 36px; border: none; border-radius: 8px;
  background: var(--azul); color: #fff; font-size: 1.2rem; font-weight: 700;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.stepper-val { font-size: 1.3rem; font-weight: 700; min-width: 24px; }
.crear-btn { margin-top: 8px; }
.toast {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 9999; padding: 12px 20px; border-radius: 12px;
  font-family: inherit; font-weight: 700; font-size: .95rem; color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); animation: toastIn .25s ease;
  max-width: 90vw; text-align: center;
}
.toast.exito { background: var(--verde); }
.toast.error { background: var(--rojo); }
.toast.oculto { animation: toastOut .4s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toastOut { to { opacity: 0; transform: translate(-50%, -12px); } }
.codigo { font-size: 2rem; font-weight: 700; text-align: center; letter-spacing: .2em; }
.status-pie { text-align: center; margin-top: 0; background: #895a044d; }
.status-pie a {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--texto); text-decoration: none; font-weight: 600; font-size: .95rem;
}
.screen { animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.podio { display: flex; align-items: flex-end; justify-content: center; gap: 16px; padding: 16px 0; }
.podio .p1 { order: 2; transform: translateY(-20px); }
.podio .p2 { order: 1; } .podio .p3 { order: 3; }
.crown { font-size: 1.6rem; }
.avatar { font-size: 2.4rem; }
.avatar.big { font-size: 3rem; }
.row { display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot.ok { background: var(--verde); } .dot.error { background: var(--rojo); }
table.reveal { width: 100%; border-collapse: collapse; }
table.reveal th, table.reveal td { border: 1px solid #eee; padding: 8px; text-align: center; }
table.reveal th { background: #f7f7f7; }
.retar { background: #FFD60A; color: #333; border: none; border-radius: 8px; padding: 4px 8px; cursor: pointer; font-weight: 700; }
.retar.activo { background: var(--rojo); color: #fff; }
.estado-msg { font-size: .85rem; color: #666; margin-top: 8px; text-align: center; }
.soluciones { margin-top: 16px; padding: 12px; background: #f7f7f7; border-radius: 12px; }
.soluciones h4 { margin-bottom: 8px; }
.soluciones ul { list-style: none; }
.soluciones li { padding: 2px 0; font-size: .95rem; }
.mi-reto { font-size: .85rem; color: #b8860b; text-align: center; margin-top: 6px; }
.timer { font-size: 1.6rem; font-weight: 700; text-align: center; }
.letra { width: 84px; height: 84px; border-radius: 50%; background: #FFD60A; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 3rem; font-weight: 700;
  margin: 0 auto 16px; }
