:root {
  --bg: #f5f3ee; --surface: #fff; --surface-2: #faf8f4; --text: #1c2326; --muted: #66707a;
  --border: #e4e0d8; --brand: #1f4e5f; --brand-ink: #fff; --ok: #1f9d5b; --err: #c2412d;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #12171a; --surface: #1a2125; --surface-2: #1f272c; --text: #e8ecee; --muted: #97a3ab;
    --border: #2b353b; --brand: #5fa8bf; --brand-ink: #0d1a1f; --ok: #4cc98a; --err: #ff7a66; color-scheme: dark; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
body.center { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.wrap { max-width: 720px; margin: 0 auto; padding: 24px 16px 60px; display: flex; flex-direction: column; gap: 16px; }
.head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; }
h1 { font-size: 21px; margin: 0; }
h2 { font-size: 17px; margin: 0 0 4px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px; width: min(400px, 100%);
  box-shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 6px 20px rgb(0 0 0 / 6%); display: flex; flex-direction: column; gap: 14px; }
.card.wide { width: 100%; }
.sub { color: var(--muted); margin: 0; font-size: 14px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row input { flex: 1 1 180px; }
p { margin: 0; }
label { font-size: 13px; font-weight: 600; color: var(--muted); }
input { font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px; }
input:focus { outline: none; border-color: var(--brand); }
.btn { font: inherit; font-weight: 600; cursor: pointer; border-radius: 12px; padding: 13px 16px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: transparent; }
.btn.danger, .link.danger { color: var(--err); }
.link { font: inherit; background: none; border: 0; color: var(--muted); cursor: pointer; text-decoration: underline; padding: 6px; }
.numero { font-size: 64px; font-weight: 800; text-align: center; letter-spacing: .05em; color: var(--brand); }
.nombres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.btn.nombre { font-size: 30px; padding: 18px 0; }
.msg { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 14px; background: var(--surface-2); }
.msg.ok { color: var(--ok); }
.msg.err { color: var(--err); }
.details { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.details div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.details dt { font-size: 11px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.details dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.liste li { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.liste li span { display: flex; flex-direction: column; }
.liste small { color: var(--muted); }
.liste li.vide { color: var(--muted); font-style: italic; }
.liste a { color: var(--brand); font-weight: 600; }
