[hidden] { display: none !important; }

:root {
  --paper: #F4F6F5;
  --raised: #FFFFFF;
  --sunken: #EDF0EE;
  --ink: #1B211F;
  --ink-soft: #4B534F;
  --ink-faint: #7C857F;
  --line: #DBE1DD;
  --teal: #0E6B5B;
  --teal-soft: #E3EFEC;
  --gold: #A9782A;
  --gold-soft: #F3E7D0;
  --shadow: 0 1px 2px rgba(20,30,26,.04), 0 8px 20px rgba(20,30,26,.06);

  --s-new: #4B6B85;      --s-new-bg: #E7EDF1;
  --s-pending: #B8781E;  --s-pending-bg: #F6E8D2;
  --s-follow: #1D7A8C;   --s-follow-bg: #DCEEF1;
  --s-won: #2E7D4F;      --s-won-bg: #E0F0E5;
  --s-lost: #7C857F;     --s-lost-bg: #E8EAE8;

  --age-ok: #2E7D4F;     --age-ok-bg: #E0F0E5;
  --age-warn: #B8781E;   --age-warn-bg: #F6E8D2;
  --age-bad: #B23B2E;    --age-bad-bg: #F7E1DD;

  --chart-1: #2a78d6;    --chart-2: #1baf7a;
}

/* Modo oscuro desactivado a propósito: la app usa siempre la paleta clara,
   sin importar el modo del sistema. La regla de abajo se deja preparada
   por si en el futuro se añade un interruptor manual claro/oscuro. */
:root[data-theme="dark"] {
  --paper: #14181A; --raised: #1D2321; --sunken: #191F1D;
  --ink: #ECEFEC; --ink-soft: #AAB4AE; --ink-faint: #78827D;
  --line: #2E3A35;
  --teal: #52C2AC; --teal-soft: #1A322D;
  --gold: #E0B36A; --gold-soft: #392C15;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 20px rgba(0,0,0,.4);

  --s-new: #8FB2CC;     --s-new-bg: #1F2C35;
  --s-pending: #E0B36A; --s-pending-bg: #362A15;
  --s-follow: #6FD3E3;  --s-follow-bg: #123137;
  --s-won: #7BCB9B;     --s-won-bg: #16301F;
  --s-lost: #9AA39D;    --s-lost-bg: #232825;

  --age-ok: #7BCB9B; --age-ok-bg: #16301F;
  --age-warn: #E0B36A; --age-warn-bg: #362A15;
  --age-bad: #E5897C; --age-bad-bg: #3A1E19;

  --chart-1: #3987e5; --chart-2: #199e70;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); }
body {
  color: var(--ink);
  font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.num { font-variant-numeric: tabular-nums; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 40px 24px 80px; }

.topbar {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 20px; flex-wrap: wrap; margin-bottom: 22px;
}
.topbar .eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 6px;
}
.topbar h1 {
  font-family: "Piazzolla", Georgia, serif; font-weight: 600;
  font-size: 1.55rem; margin: 0; letter-spacing: -.005em;
}
.topbar-right { display: flex; align-items: center; gap: 18px; }
.topbar-logo { height: 40px; width: auto; display: block; }
.bell-wrap { position: relative; display: inline-flex; }
.bell-wrap svg { color: var(--ink-soft); }
.bell-badge {
  position: absolute; top: -6px; right: -7px;
  background: var(--age-bad); color: #fff;
  font-family: "IBM Plex Mono", monospace; font-size: .62rem; font-weight: 600;
  width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.logout-link {
  font-size: .78rem; color: var(--ink-faint); text-decoration: none;
  border: 1px solid var(--line); border-radius: 7px; padding: 6px 12px;
}
.logout-link:hover { color: var(--ink); border-color: var(--ink-faint); }

.alert {
  display: flex; align-items: center; gap: 10px;
  background: var(--age-warn-bg); color: var(--ink);
  border: 1px solid var(--age-warn);
  border-radius: 8px; padding: 11px 16px; margin-bottom: 22px;
  font-size: .87rem;
}
.alert svg { color: var(--age-warn); flex-shrink: 0; }
.alert strong { font-weight: 600; }

.accion-hoy {
  background: var(--raised); border: 1px solid var(--age-warn); border-radius: 10px;
  padding: 16px 18px; margin-bottom: 22px;
}
.accion-hoy .historico-block-head { margin-bottom: 12px; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-bottom: 26px;
}
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat {
  background: var(--raised); border: 1px solid var(--line);
  border-radius: 10px; padding: 16px 18px; box-shadow: var(--shadow);
}
.stat .label {
  font-family: "IBM Plex Mono", monospace; font-size: .66rem;
  letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft);
  font-weight: 600;
  margin: 0 0 8px;
}
.stat .value {
  font-family: "Piazzolla", Georgia, serif; font-weight: 700;
  font-size: 1.5rem; margin: 0; color: var(--ink);
}
.stat .value.accent { color: var(--teal); }
.stat .delta { font-size: .74rem; color: var(--age-ok); margin: 6px 0 0; }

.stat.stat-destacado {
  background: var(--gold-soft); border: 1.5px solid var(--gold);
  position: relative;
}
.stat-destacado-icon {
  position: absolute; top: 14px; right: 14px;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(169,120,42,.15); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
}
.stat.stat-destacado .label { color: #8A6323; }
.stat.stat-destacado .value { color: var(--gold); font-size: 1.7rem; }

.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 10px;
}
.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chip {
  font-size: .8rem; padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-soft); background: var(--raised);
  cursor: pointer; user-select: none;
}
.chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filter-divider { width: 1px; align-self: stretch; background: var(--line); margin: 0 2px; }
.toolbar-right { display: flex; align-items: center; gap: 12px; }
.search-input {
  font-size: .85rem; padding: 9px 13px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--raised); color: var(--ink); width: 180px; font-family: inherit;
}
.search-input:focus { outline: none; border-color: var(--teal); }
.new-btn {
  background: var(--teal); color: #F4F6F5; font-size: .85rem; font-weight: 600;
  padding: 9px 16px; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer; border: none;
}
.archive-row {
  display: flex; align-items: center; gap: 10px; margin: -6px 0 14px;
  font-size: .78rem; color: var(--ink-soft);
}
.archive-row label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.archive-row { flex-wrap: wrap; row-gap: 4px; }
#archivadosHint, #pospuestosHint { color: var(--ink-faint); }
.toolbar-note {
  font-size: .74rem; color: var(--ink-faint); margin: 0 0 20px;
}

.board {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px;
}
@media (max-width: 900px) { .board { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .board { grid-template-columns: 1fr; } }
.board.board-single { grid-template-columns: minmax(280px, 480px); }
.col { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.col-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 4px 2px;
}
.col-head .name {
  display: flex; align-items: center; gap: 8px;
  font-size: .84rem; font-weight: 600;
}
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.col-head .count {
  font-family: "IBM Plex Mono", monospace; font-size: .68rem; color: var(--ink-faint);
}
.col-total {
  font-family: "IBM Plex Mono", monospace; font-size: .68rem; color: var(--ink-faint);
  padding: 0 2px 6px; margin-top: -6px;
}
.col-empty {
  font-size: .78rem; color: var(--ink-faint); font-style: italic;
  padding: 10px 2px;
}

.card {
  background: var(--raised); border: 1px solid var(--line); border-left: 3px solid var(--line);
  border-radius: 10px;
  padding: 14px 15px; box-shadow: var(--shadow);
}
.card.k-pending { background: var(--s-pending-bg); border-left-color: var(--s-pending); }
.card.k-follow { background: var(--s-follow-bg); border-left-color: var(--s-follow); }
.card.k-won { background: var(--s-won-bg); border-left-color: var(--s-won); }
.card.k-lost { background: var(--s-lost-bg); border-left-color: var(--s-lost); }
.card .patient { font-size: .88rem; font-weight: 600; margin: 0 0 5px; }
.card .treatment { font-size: .78rem; color: var(--ink-faint); margin: 0 0 10px; }
.card .amount {
  font-family: "Piazzolla", Georgia, serif; font-weight: 600; font-size: 1.15rem;
  margin: 0 0 12px;
}
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.age-pill {
  font-family: "IBM Plex Mono", monospace; font-size: .66rem; font-weight: 500;
  padding: 3px 8px; border-radius: 999px; white-space: nowrap;
}
.age-ok { color: var(--age-ok); background: var(--age-ok-bg); }
.age-warn { color: var(--age-warn); background: var(--age-warn-bg); }
.age-bad { color: var(--age-bad); background: var(--age-bad-bg); }
.recontacto-pill { color: var(--gold); background: var(--gold-soft); }

.doctor-tag { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; }
.doctor-avatar {
  width: 17px; height: 17px; border-radius: 50%; background: var(--sunken);
  color: var(--ink-soft); font-size: .58rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.doctor-tag .dname { font-size: .7rem; color: var(--ink-faint); }

.status-select {
  margin-top: 10px; width: 100%; font-size: .74rem; font-weight: 600;
  background: var(--sunken); color: var(--ink-soft); border: 1px solid var(--line);
  padding: 7px 8px; border-radius: 7px; font-family: inherit;
}

.contact-btn {
  margin-top: 8px; width: 100%; display: flex; align-items: center; justify-content: center;
  gap: 7px; background: var(--teal-soft); color: var(--teal); font-size: .78rem; font-weight: 600;
  padding: 8px 10px; border-radius: 7px; border: none; cursor: pointer;
}

.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.card-top .patient { margin: 0; }
.opt-badge {
  font-family: "IBM Plex Mono", monospace; font-size: .6rem; letter-spacing: .03em;
  color: var(--gold); background: var(--gold-soft); padding: 2px 7px; border-radius: 999px;
  white-space: nowrap;
}

.option-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 7px 0; border-bottom: 1px dashed var(--line);
}
.option-row:last-of-type { border-bottom: none; }
.option-row .opt-label { font-size: .74rem; color: var(--ink-soft); line-height: 1.35; }
.option-row .opt-amount {
  font-family: "Piazzolla", Georgia, serif; font-weight: 600; font-size: .92rem;
  white-space: nowrap; flex-shrink: 0;
}

.col.won .card { opacity: .82; }
.col.lost .card { opacity: .6; }

.suggestion {
  border-radius: 10px; padding: 13px 15px; margin-top: 8px;
}
.suggestion.wsp { background: var(--s-follow-bg); border: 1px solid var(--s-follow); }
.suggestion.mail { background: var(--s-new-bg); border: 1px solid var(--s-new); }
.suggestion .label {
  display: flex; align-items: center; gap: 6px;
  font-family: "IBM Plex Mono", monospace; font-size: .64rem;
  letter-spacing: .05em; text-transform: uppercase;
  margin: 0 0 8px;
}
.suggestion.wsp .label { color: var(--s-follow); }
.suggestion.mail .label { color: var(--s-new); }
.suggestion .subject { font-size: .82rem; font-weight: 600; color: var(--ink); margin: 0 0 4px; }
.suggestion p { font-size: .82rem; line-height: 1.5; color: var(--ink); margin: 0 0 12px; }
.suggestion .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.suggestion .btn {
  font-size: .76rem; font-weight: 600; padding: 6px 12px; border-radius: 6px;
  text-decoration: none; border: none; cursor: pointer; display: inline-flex; align-items: center;
}
.btn-primary { background: var(--teal); color: #F4F6F5; }
.btn-ghost.wsp { background: transparent; border: 1px solid var(--s-follow); color: var(--s-follow); }
.btn-ghost.mail { background: transparent; border: 1px solid var(--s-new); color: var(--s-new); }
.channel-toggle { display: flex; gap: 6px; margin-bottom: 8px; }
.channel-toggle span {
  font-size: .7rem; padding: 4px 9px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); color: var(--ink-faint);
}
.channel-toggle span.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.intake, .compare, .historico {
  margin-top: 56px; padding-top: 30px; border-top: 1px solid var(--line);
}
.intake .eyebrow, .compare .eyebrow, .historico .eyebrow {
  font-family: "IBM Plex Mono", monospace; font-size: .72rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--teal); margin: 0 0 8px;
}
.intake h2, .compare h2, .historico h2 {
  font-family: "Piazzolla", Georgia, serif; font-weight: 600; font-size: 1.3rem;
  margin: 0 0 10px;
}
.intake > p, .compare > p, .historico > p {
  font-size: .95rem; line-height: 1.6; color: var(--ink-soft);
  max-width: 60ch; margin: 0 0 26px;
}

.historico-block { margin-bottom: 34px; }
.historico-block:last-child { margin-bottom: 0; }
.historico-block-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.historico-block-head h3 {
  font-family: "Piazzolla", Georgia, serif; font-weight: 600; font-size: 1.02rem; margin: 0;
}
.historico-block-head .count {
  font-family: "IBM Plex Mono", monospace; font-size: .7rem; color: var(--ink-faint);
  background: var(--sunken); padding: 2px 9px; border-radius: 999px;
}
.historico-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 13px;
}
.mes-group { margin-bottom: 22px; }
.mes-group:last-child { margin-bottom: 0; }
.mes-group-title {
  font-size: .8rem; font-weight: 600; color: var(--ink-soft); margin: 0 0 10px;
  text-transform: capitalize;
}
.mes-group .historico-grid { margin-bottom: 0; }

.intake-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
@media (max-width: 780px) { .intake-layout { grid-template-columns: 1fr; } }

.intake-card {
  background: var(--raised); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 26px 28px;
}
.field-label {
  font-family: "IBM Plex Mono", monospace; font-size: .66rem; letter-spacing: .05em;
  text-transform: uppercase; color: var(--ink-faint); margin: 0 0 6px;
}
.field-hint { font-size: .74rem; color: var(--ink-faint); margin: -12px 0 18px; line-height: 1.4; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }
.input-field {
  border: 1px solid var(--line); border-radius: 7px; padding: 10px 13px;
  font-size: .88rem; color: var(--ink); background: var(--sunken);
  margin-bottom: 18px; width: 100%; font-family: inherit;
}
.notes-input { resize: vertical; }

.tag-select { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tag {
  font-size: .8rem; padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-soft); background: var(--sunken);
  cursor: pointer; user-select: none;
}
.tag.selected { background: var(--s-pending-bg); border-color: var(--s-pending); color: var(--s-pending); font-weight: 600; }

.save-btn {
  background: var(--teal); color: #F4F6F5; font-size: .85rem; font-weight: 600;
  padding: 10px 18px; border-radius: 8px; display: inline-block; border: none; cursor: pointer;
}
.form-msg { margin-left: 12px; font-size: .82rem; }
.form-msg.ok { color: var(--age-ok); }
.form-msg.err { color: var(--age-bad); }

.intake-side {
  background: var(--teal-soft); border-radius: 12px; padding: 22px 24px;
  align-self: start;
}
.intake-side .field-label { color: var(--teal); }
.intake-side p { font-size: .85rem; line-height: 1.6; color: var(--ink); margin: 0 0 12px; }
.intake-side p:last-child { margin-bottom: 0; }

.option-block {
  display: grid; grid-template-columns: 1fr 140px 26px; gap: 10px; align-items: start;
  margin-bottom: 10px;
}
@media (max-width: 480px) { .option-block { grid-template-columns: 1fr; } }
.option-block .input-field { margin-bottom: 8px; }
.option-fin-row { display: flex; align-items: center; gap: 8px; font-size: .74rem; color: var(--ink-faint); grid-column: 1 / -1; margin: -6px 0 8px; flex-wrap: wrap; }
.option-fin-row input[type="number"] {
  width: 70px; border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; font-size: .78rem;
}
.remove-opt {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 38px; color: var(--ink-faint); border: 1px solid var(--line);
  border-radius: 7px; background: none; cursor: pointer;
}
.add-opt {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .82rem; color: var(--teal); border: 1px dashed var(--teal);
  border-radius: 7px; padding: 8px 13px; margin-bottom: 22px; cursor: pointer; background: none;
}

.compare-controls {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px; margin-bottom: 24px;
}
.toggle-pair { display: flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; flex-shrink: 0; }
.toggle-pair span { font-size: .82rem; padding: 8px 16px; color: var(--ink-faint); cursor: pointer; }
.toggle-pair span.on { background: var(--teal-soft); color: var(--teal); font-weight: 600; }

.compare-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
@media (max-width: 700px) { .compare-stats { grid-template-columns: 1fr; } }

.desglose-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 780px) { .desglose-cols { grid-template-columns: 1fr; } }
.desglose-col h3 {
  font-family: "Piazzolla", Georgia, serif; font-weight: 600; font-size: 1rem; margin: 0 0 12px;
}
.desglose-table {
  width: 100%; border-collapse: collapse; background: var(--raised);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow);
}
.desglose-table th, .desglose-table td {
  text-align: left; padding: 9px 12px; font-size: .82rem; border-bottom: 1px solid var(--line);
}
.desglose-table th {
  font-family: "IBM Plex Mono", monospace; font-size: .62rem; text-transform: uppercase;
  letter-spacing: .04em; color: var(--ink-faint); background: var(--sunken);
}
.desglose-table tbody tr:last-child td { border-bottom: none; }
.desglose-table .num { font-family: "Piazzolla", Georgia, serif; font-weight: 600; }
.desglose-empty { font-size: .78rem; color: var(--ink-faint); font-style: italic; padding: 10px 2px; }

.chart-card {
  background: var(--raised); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 24px 26px 20px;
}
.chart-legend { display: flex; gap: 20px; margin-bottom: 22px; }
.legend-item { display: flex; align-items: center; gap: 7px; font-size: .8rem; color: var(--ink-soft); }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

.plot { position: relative; height: 165px; margin: 0 0 10px 0; border-bottom: 2px solid var(--line); }
.bars-row { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 20px; }
.month-group { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 4px; height: 100%; position: relative; }
.bar { width: 20px; border-radius: 4px 4px 0 0; position: relative; }
.bar.entregados { background: var(--chart-1); }
.bar.aceptados { background: var(--chart-2); }
.bar-value {
  position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
  font-size: .74rem; font-weight: 700; font-family: "Public Sans", sans-serif;
  color: var(--ink); white-space: nowrap;
}
.month-labels { display: flex; gap: 20px; }
.month-labels span {
  flex: 1; text-align: center; font-size: .74rem; font-weight: 600; color: var(--ink-soft);
  font-family: "Public Sans", sans-serif;
}
.month-labels span.current { color: var(--ink); font-weight: 700; }

footer.note { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
footer.note p { font-size: .82rem; color: var(--ink-faint); line-height: 1.55; max-width: 62ch; margin: 0; }

/* Modal (elegir opción aceptada / motivo de cierre) */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(20,30,26,.45);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal {
  background: var(--raised); border-radius: 12px; padding: 24px; max-width: 380px; width: 100%;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.modal h3 { font-family: "Piazzolla", Georgia, serif; font-size: 1.1rem; margin: 0 0 14px; }
.modal .opt-choice {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer;
}
.modal .opt-choice:hover { border-color: var(--teal); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.modal-actions .peligro {
  margin-right: auto; background: #FFFFFF; color: var(--age-bad); border-color: var(--age-bad);
}
.modal-actions button {
  font-size: .82rem; padding: 8px 14px; border-radius: 7px; border: 1px solid #DBE1DD;
  background: #FFFFFF; color: #1B211F; cursor: pointer; font-family: inherit;
}
.modal-actions button.principal { background: var(--teal); color: #F4F6F5; border-color: var(--teal); font-weight: 600; }
.modal.wide { max-width: 560px; max-height: 88vh; overflow-y: auto; text-align: left; }
.modal.wide .option-block { margin-bottom: 14px; }
.modal-meta {
  font-size: .76rem; color: var(--ink-faint); margin: -6px 0 16px;
  background: var(--sunken); border-radius: 7px; padding: 8px 10px;
}
.modal-close {
  position: absolute; top: 14px; right: 14px; background: none; border: none;
  color: var(--ink-faint); cursor: pointer; padding: 4px;
}
.modal { position: relative; }
