:root {
  --azul: #29a9e1; --azul-osc: #1477a8;
  --bg: #f6f8fa; --card: #fff; --txt: #14212b; --muted: #66798a; --border: #e1e8ee;
  --ok: #0f7b46; --ok-bg: #e6f6ee; --off: #8a5a00; --off-bg: #fdf1dc; --danger: #c0392b;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e151b; --card: #151f27; --txt: #e6edf3; --muted: #8ea1b1; --border: #26343f;
    --ok: #4ad08a; --ok-bg: #12301f; --off: #f0b44c; --off-bg: #33270f; --danger: #ff7b6b;
  }
}
* { box-sizing: border-box; }
html { font-size: 18px; }
body { margin: 0; background: var(--bg); color: var(--txt); font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; line-height: 1.4; }
main { max-width: 520px; margin: 0 auto; padding: 16px 16px 40px; display: flex; flex-direction: column; gap: 14px; }
header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
h1 { font-size: 1.3rem; margin: 0; }
h2 { font-size: 1.1rem; margin: 0; }
p { margin: 0; }
.columna { display: flex; flex-direction: column; gap: 14px; }
.logo { width: 160px; align-self: center; background: #fff; border-radius: 12px; padding: 10px; }
.muted { color: var(--muted); }
.centro { text-align: center; }
.tarjeta { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.tarjeta.urgente { border: 3px solid var(--danger); }
.fila { text-align: left; font: inherit; color: inherit; cursor: pointer; width: 100%; }
.aviso { background: var(--off-bg); color: var(--off); border-radius: 12px; padding: 14px; font-weight: 700; }
.bien { background: var(--ok-bg); color: var(--ok); border-radius: 12px; padding: 14px; font-weight: 700; }
form { display: flex; flex-direction: column; gap: 12px; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
input, select { font: inherit; min-height: 56px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: var(--txt); }
.btn { font: inherit; font-weight: 700; min-height: 56px; padding: 12px 18px; border-radius: 10px; border: 1px solid var(--azul-osc); background: var(--card); color: var(--txt); cursor: pointer; display: flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; }
.btn-primary { background: var(--azul-osc); color: #fff; }
.btn-danger { background: #c0392b; border-color: #c0392b; color: #fff; }
.btn:disabled { opacity: .6; }
.ayuda { width: min(78vw, 320px); aspect-ratio: 1; align-self: center; margin: 24px 0; border-radius: 50%; border: 10px solid #fff; background: #c0392b; color: #fff; font: 800 3rem system-ui, sans-serif; box-shadow: 0 8px 28px rgba(0, 0, 0, .3); cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.ayuda.apretado { animation: llenar 2s linear forwards; }
@keyframes llenar { from { transform: scale(1); filter: brightness(1); } to { transform: scale(.9); filter: brightness(.65); } }
.modal-fondo { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 10; }
.modal { background: var(--card); border-radius: 12px; padding: 18px; width: 100%; max-width: 480px; max-height: 90vh; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
#toasts { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 20; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--txt); color: var(--bg); border-radius: 10px; padding: 12px 14px; }
.toast.error { background: #c0392b; color: #fff; }
