[hidden] { display: none !important; }
/* Web del personal: 100 % monocromo, tipografía del sistema, pensado para el móvil y con poca luz. */
* { box-sizing: border-box; }
html, body { margin: 0; background: #000; color: #fff; }
body {
  font: 18px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100dvh;
  padding: env(safe-area-inset-top) 16px calc(16px + env(safe-area-inset-bottom));
  -webkit-text-size-adjust: 100%;
}
main { max-width: 560px; margin: 0 auto; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

.brand { text-align: center; padding: 20px 0 16px; }
.logo { max-height: 72px; max-width: 70%; }
.logo-text { font-size: 28px; font-weight: 900; letter-spacing: .18em; }

.lbl { display: block; font-size: 16px; letter-spacing: .2em; margin-bottom: 8px; }

.phone-row { display: flex; gap: 8px; align-items: stretch; }
select {
  flex: 0 0 auto; width: 78px; background: #000; border: 2px solid #fff; border-radius: 10px;
  padding: 0 6px; font-size: 16px; appearance: none; -webkit-appearance: none; text-align: center;
}
input[type="tel"], input[type="password"] {
  flex: 1; min-width: 0; width: 100%; background: #000; border: 2px solid #fff; border-radius: 10px;
  padding: 14px 12px; font-size: 32px; font-weight: 700; letter-spacing: 0; outline: none;
  font-variant-numeric: tabular-nums;
}
input:focus, select:focus { border-width: 3px; }
input::placeholder { color: #777; font-weight: 400; }

.big {
  display: block; width: 100%; min-height: 72px; margin-top: 14px; background: #fff; color: #000;
  border: 0; border-radius: 12px; font-size: 30px; font-weight: 900; letter-spacing: .12em;
}
.big:disabled { background: #555; color: #000; }
.big:active:not(:disabled) { transform: scale(.99); }

.send-wrap { position: relative; margin-top: 14px; }
.send-wrap .big { margin-top: 0; }
/* El mensaje tapa el botón (no lo desplaza): así nadie pulsa otra cosa sin querer. */
.msg { display: none; text-align: center; font-weight: 900; }
.msg.show {
  display: flex; flex-direction: column; justify-content: center; position: absolute; left: 0; right: 0; top: 0;
  min-height: 72px; padding: 12px 10px; border: 3px solid #fff; border-radius: 12px; font-size: 28px; z-index: 2;
}
.msg.ok { background: #fff; color: #000; }
.msg.err { background: #000; color: #fff; border-style: dashed; }
.msg small { display: block; font-size: 18px; font-weight: 700; margin-top: 6px; }

.qr-btn {
  display: block; width: 100%; min-height: 56px; margin-top: 18px; background: #000; color: #fff;
  border: 2px solid #fff; border-radius: 12px; font-size: 20px; font-weight: 800; letter-spacing: .12em;
}
.qr-btn.alert { background: #fff; color: #000; animation: pulse 1.2s ease-in-out infinite; }
.qr-btn.off { opacity: .4; }
@keyframes pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .qr-btn.alert { animation: none; } }

.recent h2 { font-size: 14px; letter-spacing: .25em; margin: 26px 0 8px; color: #bbb; }
.recent ol { list-style: none; margin: 0; padding: 0; }
.recent li {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 0; border-top: 1px solid #333;
}
.recent .num { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.recent .time { color: #999; font-size: 14px; text-align: right; }
.recent .st { grid-column: 1 / -1; font-size: 14px; letter-spacing: .06em; color: #ddd; }
.recent li.invite { border: 2px solid #fff; border-radius: 10px; padding: 10px; margin: 6px 0; }
.recent li.invite .st { color: #fff; font-weight: 900; }
.recent .empty { color: #777; border: 0; }

footer { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; color: #999; font-size: 14px; }
.link { background: none; border: 0; color: #fff; text-decoration: underline; padding: 8px 0; font-size: 14px; }

.overlay {
  position: fixed; inset: 0; background: #fff; color: #000; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 20px; z-index: 10;
}
.overlay[hidden] { display: none; }
.qr-box { width: min(88vw, 88vh, 520px); aspect-ratio: 1; }
.qr-box svg { width: 100%; height: 100%; }
.qr-box p { font-size: 22px; font-weight: 800; text-align: center; }
.qr-hint { font-weight: 900; letter-spacing: .1em; font-size: 20px; text-align: center; }
.overlay .big { background: #000; color: #fff; max-width: 520px; }

.offline {
  position: fixed; left: 0; right: 0; top: 0; padding: 10px; text-align: center; font-weight: 900;
  background: #fff; color: #000; letter-spacing: .2em; z-index: 5;
}
.offline[hidden] { display: none; }
