/* ------------------------------------------------------------------ */
/* Tokens                                                              */
/* ------------------------------------------------------------------ */

:root {
  --paper: #F2F4F7;
  --sheet: #FFFFFF;
  --ink: #15203B;
  --ink-2: #545E74;
  --ink-3: #7F889C;
  --rule: #D6DCE6;
  --rule-2: #E6EAF0;
  --pen: #2343C4;
  --pen-ink: #FFFFFF;
  --pen-soft: #E6EBFB;

  /* Estados: fondo sólido + texto encima */
  --present: #1C7A52;     --present-fg: #FFFFFF;
  --absent: #C0362C;      --absent-fg: #FFFFFF;
  --justified: #E9B949;   --justified-fg: #15203B;
  --other: #2343C4;       --other-fg: #FFFFFF;
  --none: #DCE1EA;        --none-fg: #545E74;
  --missing: #C0362C;

  --focus: 0 0 0 3px color-mix(in srgb, var(--pen) 40%, transparent);

  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-s: 6px;
  --r-m: 10px;
  --r-l: 18px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0F1524;
    --sheet: #161E31;
    --ink: #E8ECF4;
    --ink-2: #A6AEC0;
    --ink-3: #737D93;
    --rule: #2B3651;
    --rule-2: #1F2840;
    --pen: #8099FF;
    --pen-ink: #0F1524;
    --pen-soft: #1E2A52;

    --present: #52C792;     --present-fg: #0B1A13;
    --absent: #F08176;      --absent-fg: #2A0D0A;
    --justified: #EBC05E;   --justified-fg: #241A05;
    --other: #8099FF;       --other-fg: #0F1524;
    --none: #2B3651;        --none-fg: #A6AEC0;
    --missing: #F08176;

    color-scheme: dark;
  }
}

/* ------------------------------------------------------------------ */
/* Base                                                                */
/* ------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

h1, h2, p { margin: 0; }

button, input, select { font: inherit; color: inherit; }

button { cursor: pointer; }
button:disabled { cursor: default; }

:focus-visible { outline: none; box-shadow: var(--focus); }

/* ------------------------------------------------------------------ */
/* Botones                                                             */
/* ------------------------------------------------------------------ */

.btn-primary,
.btn-quiet,
.btn-danger,
.btn-danger-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  white-space: nowrap;
}

.btn-primary { background: var(--pen); color: var(--pen-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--pen) 88%, var(--ink)); }
.btn-primary:disabled { opacity: .55; }

.btn-quiet { background: transparent; border-color: var(--rule); color: var(--ink); }
.btn-quiet:hover { background: var(--rule-2); }

.btn-danger { background: var(--absent); color: var(--absent-fg); }
.btn-danger:disabled { opacity: .55; }

.btn-danger-quiet { background: transparent; color: var(--absent); padding: 0 8px; }
.btn-danger-quiet:hover { text-decoration: underline; text-underline-offset: 3px; }

.btn-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: transparent;
}
.btn-icon:hover { background: var(--rule-2); }
.btn-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.btn-link {
  background: none;
  border: 0;
  padding: 4px 2px;
  color: var(--pen);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* ------------------------------------------------------------------ */
/* Marca                                                               */
/* ------------------------------------------------------------------ */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

/* 3×3 cuadritos: ocho llenos y uno pendiente */
.brand-mark {
  width: 20px;
  height: 20px;
  background:
    linear-gradient(var(--present) 0 0) 0 0 / 6px 6px,
    linear-gradient(var(--present) 0 0) 7px 0 / 6px 6px,
    linear-gradient(var(--absent) 0 0) 14px 0 / 6px 6px,
    linear-gradient(var(--present) 0 0) 0 7px / 6px 6px,
    linear-gradient(var(--justified) 0 0) 7px 7px / 6px 6px,
    linear-gradient(var(--present) 0 0) 14px 7px / 6px 6px,
    linear-gradient(var(--present) 0 0) 0 14px / 6px 6px,
    linear-gradient(var(--present) 0 0) 7px 14px / 6px 6px;
  background-repeat: no-repeat;
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 14px;
  width: 6px;
  height: 6px;
  border: 1.5px solid var(--missing);
  border-radius: 1px;
}

/* ------------------------------------------------------------------ */
/* Ingreso                                                             */
/* ------------------------------------------------------------------ */

.demo-strip {
  background: var(--pen-soft);
  color: var(--ink);
  font-size: .875rem;
  text-align: center;
  padding: 8px 16px;
}

.login {
  min-height: 100dvh;
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: 64px;
}

.login-copy { max-width: 34rem; }

.login h1 {
  margin-top: 48px;
  font-size: clamp(2.5rem, 3.2vw + 1.4rem, 4rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.login-lead {
  margin-top: 20px;
  font-size: 1.125rem;
  color: var(--ink-2);
  max-width: 30rem;
}

.login-error {
  margin-top: 24px;
  padding: 12px 14px;
  border-left: 3px solid var(--absent);
  background: color-mix(in srgb, var(--absent) 10%, var(--sheet));
  border-radius: 0 var(--r-s) var(--r-s) 0;
  font-size: .9375rem;
}

.login-action { margin-top: 32px; min-height: 44px; }

.login-note { margin-top: 16px; font-size: .875rem; color: var(--ink-3); }

.login-art { justify-self: center; width: min(100%, 420px); }

.login-art-month {
  font-weight: 800;
  font-size: 1.25rem;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.mini {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
}

.mini span {
  aspect-ratio: 1;
  border-radius: var(--r-s);
  background: var(--rule-2);
  animation: llenar .42s cubic-bezier(.2, .7, .2, 1) both;
  animation-delay: calc(var(--i) * 28ms + 150ms);
}
.mini .is-done { background: var(--present); }
.mini .is-none { background: var(--none); }
.mini .is-off { background: transparent; box-shadow: inset 0 0 0 1px var(--rule); }
.mini .is-missing { background: var(--hatch); box-shadow: inset 0 0 0 1.5px var(--missing); }
.mini .is-pad { visibility: hidden; animation: none; }

@keyframes llenar {
  from { opacity: 0; transform: scale(.6); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; gap: 40px; padding-top: 32px; align-items: start; }
  .login h1 { margin-top: 32px; }
  .login-art { width: min(100%, 320px); justify-self: start; }
}

/* ------------------------------------------------------------------ */
/* Cabecera y grupos                                                   */
/* ------------------------------------------------------------------ */

.top {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 24px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.who { display: flex; align-items: center; gap: 10px; min-width: 0; }

.who-name {
  font-size: .9375rem;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 22ch;
}

.avatar {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  background: var(--pen-soft);
  color: var(--pen);
  display: grid;
  place-items: center;
  font-size: .8125rem;
  font-weight: 700;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.groups {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--rule);
}
.groups::-webkit-scrollbar { display: none; }

.group-tab {
  position: relative;
  flex: none;
  background: none;
  border: 0;
  padding: 12px 14px 14px;
  font-weight: 600;
  color: var(--ink-2);
  border-radius: var(--r-s) var(--r-s) 0 0;
}
.group-tab:hover { color: var(--ink); }
.group-tab[aria-selected="true"] { color: var(--ink); }
.group-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--pen);
}
.group-tab .ro {
  margin-left: 6px;
  font-size: .75rem;
  font-weight: 500;
  color: var(--ink-3);
}

/* ------------------------------------------------------------------ */
/* Tablero                                                             */
/* ------------------------------------------------------------------ */

.board {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  grid-template-areas:
    "cal pend"
    "regs pend";
  align-items: start;
  column-gap: 40px;
  row-gap: 48px;
}

.cal { grid-area: cal; }
.pend { grid-area: pend; }
.regs { grid-area: regs; }

.board.is-loading .cal,
.board.is-loading .pend,
.board.is-loading .regs { opacity: .45; pointer-events: none; transition: opacity .2s; }

@media (max-width: 920px) {
  .board {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "cal" "pend" "regs";
    row-gap: 36px;
  }
}

/* ------------------------------------------------------------------ */
/* Calendario                                                          */
/* ------------------------------------------------------------------ */

.cal-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.month {
  font-size: clamp(2.25rem, 2.6vw + 1.5rem, 3.5rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.035em;
}
.month .year { font-weight: 400; color: var(--ink-3); letter-spacing: -0.02em; }

.cal-nav { display: flex; align-items: center; gap: 6px; }

.cal-sub { margin-top: 10px; color: var(--ink-2); }

.weekdays,
.grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.weekdays {
  margin-top: 24px;
  margin-bottom: 8px;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--ink-3);
}
.weekdays span { padding-left: 10px; }

.day {
  --bg: var(--sheet);
  --fg: var(--ink);
  position: relative;
  min-height: 88px;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--r-m);
  background: var(--bg);
  color: var(--fg);
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  box-shadow: inset 0 0 0 1px var(--rule);
}

.day-n { font-weight: 700; font-size: 1.0625rem; line-height: 1; }
.day-s { font-size: .8125rem; font-weight: 600; line-height: 1.1; }

.day:not(:disabled):hover { box-shadow: inset 0 0 0 2px var(--pen); }

.day.is-done { --bg: var(--present); --fg: var(--present-fg); box-shadow: none; }
.day.is-none { --bg: var(--none); --fg: var(--none-fg); box-shadow: none; }

.day.is-done:not(:disabled):hover,
.day.is-none:not(:disabled):hover { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--fg) 55%, transparent); }

.day-v { font-size: 1.625rem; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.day-n + .day-v,
.day-n + .day-s { margin-top: auto; }

/* Nota: punto en la esquina */
.day.has-note::after {
  content: "";
  position: absolute;
  top: 9px;
  right: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: .85;
}

/* Día habitual sin registro pero la reunión se hizo otro día de esa semana */
.day.is-moved { --bg: transparent; box-shadow: inset 0 0 0 1px var(--rule-2); }
.day.is-moved .day-n { color: var(--ink-3); }
.day.is-moved .day-s { color: var(--ink-3); font-weight: 500; }

:root { --hatch: repeating-linear-gradient(135deg, transparent 0 7px, color-mix(in srgb, var(--missing) 22%, transparent) 7px 9px); }

.day.is-missing {
  --fg: var(--missing);
  background: var(--hatch), var(--sheet);
  box-shadow: inset 0 0 0 1.5px var(--missing);
}
.day.is-missing .day-n { color: var(--ink); }

.day.is-future { --bg: transparent; box-shadow: inset 0 0 0 1px var(--rule); }
.day.is-future .day-n { color: var(--ink-2); }

.day.is-off { --bg: transparent; box-shadow: none; }
.day.is-off .day-n { color: var(--ink-3); font-weight: 500; }

.day.is-empty { --bg: transparent; }
.day.is-empty .day-n { color: var(--ink-2); }

.day.is-pad { visibility: hidden; }

.day.is-today::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: calc(var(--r-m) + 4px);
  border: 2px solid var(--ink);
  pointer-events: none;
}

.day.is-flash { animation: destello 1.1s ease-out 1; }
@keyframes destello {
  0% { transform: scale(1); }
  20% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.legend {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: .9375rem;
  color: var(--ink-2);
}
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend b { color: var(--ink); font-weight: 700; }
.legend i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--sw);
}
.legend .is-done i { --sw: var(--present); }
.legend .is-none i { --sw: var(--none); }
.legend .is-note i { width: 7px; height: 7px; margin: 0 3.5px; border-radius: 50%; --sw: var(--ink-2); }
.legend .is-missing i { background: var(--hatch), var(--sheet); box-shadow: inset 0 0 0 1.5px var(--missing); }

.resumen {
  margin-top: 22px;
  border-collapse: collapse;
  font-size: .9375rem;
  min-width: min(100%, 460px);
}
.resumen th,
.resumen td { padding: 8px 18px 8px 0; text-align: left; border-top: 1px solid var(--rule-2); white-space: nowrap; }
.resumen thead th { border-top: 0; padding-top: 0; font-size: .8125rem; font-weight: 600; color: var(--ink-3); }
.resumen tbody th { font-weight: 600; color: var(--ink-2); }
.resumen td { color: var(--ink-2); }
.resumen td b { color: var(--ink); font-weight: 800; font-size: 1.125rem; }

@media (max-width: 640px) {
  .weekdays, .grid { gap: 4px; }
  .weekdays span { padding-left: 0; text-align: center; }
  .day { min-height: 0; aspect-ratio: 1 / 1.1; padding: 5px 6px; border-radius: 8px; }
  .day-n { font-size: .75rem; }
  .day-v { font-size: 1rem; }
  .day-s { display: none; }
  .day.is-off, .day.is-future, .day.is-empty, .day.is-moved, .day.is-missing { align-items: center; justify-content: center; }
  .day.is-off .day-n, .day.is-future .day-n, .day.is-empty .day-n, .day.is-moved .day-n, .day.is-missing .day-n { font-size: 1rem; }
  .day.has-note::after { top: 5px; right: 5px; width: 5px; height: 5px; }
  .resumen th, .resumen td { padding-right: 12px; }
  .day.is-today::before { inset: -3px; border-radius: 11px; }
}

/* ------------------------------------------------------------------ */
/* Fechas sin registro                                                 */
/* ------------------------------------------------------------------ */

.pend {
  position: sticky;
  top: 20px;
  background: var(--sheet);
  border-radius: var(--r-l);
  padding: 22px 22px 18px 26px;
  box-shadow: inset 0 0 0 1px var(--rule);
  overflow: hidden;
}
/* línea roja de margen, como la del cuaderno */
.pend::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: color-mix(in srgb, var(--missing) 55%, transparent);
}
.pend.is-clear::before { background: color-mix(in srgb, var(--present) 55%, transparent); }

.pend h2 { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.pend-range { margin-top: 6px; color: var(--ink-2); font-size: .9375rem; }

.pend-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  max-height: 340px;
  overflow-y: auto;
}
.pend-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--rule-2);
}
.pend-list li:first-child { border-top: 0; }
.pend-date { background: none; border: 0; padding: 2px 0; text-align: left; color: var(--ink); }
.pend-date:hover { color: var(--pen); }
.pend-date small { display: block; color: var(--ink-3); font-size: .8125rem; font-weight: 500; }

.pend-settings { margin-top: 14px; border-top: 1px solid var(--rule); padding-top: 12px; }
.pend-settings summary { cursor: pointer; color: var(--ink-2); font-size: .9375rem; font-weight: 600; }
.pend-settings summary:hover { color: var(--ink); }

.pend-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .875rem;
  color: var(--ink-2);
  font-weight: 600;
}
.field input {
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--rule);
  border-radius: var(--r-s);
  background: var(--sheet);
  color: var(--ink);
  font-weight: 400;
  width: 100%;
}

.pend-help { margin-top: 10px; font-size: .875rem; color: var(--ink-2); }

/* ------------------------------------------------------------------ */
/* Registros del mes                                                   */
/* ------------------------------------------------------------------ */

.regs h2 { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em; }

.regs-empty { margin-top: 12px; color: var(--ink-2); }

.tbl { width: 100%; margin-top: 14px; border-collapse: collapse; font-size: .9375rem; }
.tbl th {
  text-align: left;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--ink-3);
  padding: 0 12px 10px 0;
  border-bottom: 1px solid var(--rule);
}
.tbl td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--rule-2); vertical-align: top; }
.tbl td:last-child, .tbl th:last-child { padding-right: 0; text-align: right; }
.tbl .who-cell { color: var(--ink-2); }
.tbl .who-cell small { display: block; color: var(--ink-3); font-size: .8125rem; }
.tbl .date-cell { font-weight: 600; white-space: nowrap; }
.tbl .date-cell small { display: block; color: var(--ink-3); font-size: .8125rem; font-weight: 500; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  white-space: nowrap;
}
.tag::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--sw, var(--other)); }
.tag.is-done { --sw: var(--present); }
.tag.is-none { --sw: var(--none); }
.tag.is-done b { font-size: 1.0625rem; font-weight: 800; }
.tbl .note-cell { color: var(--ink-2); max-width: 26ch; white-space: normal; }

@media (max-width: 640px) {
  .tbl thead { display: none; }
  .tbl tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--rule-2);
  }
  .tbl td { padding: 0; border: 0; }
  .tbl .date-cell { grid-column: 1; }
  .tbl .tag-cell { grid-column: 2; grid-row: 1; text-align: right; }
  .tbl .who-cell { grid-column: 1 / -1; font-size: .875rem; }
  .tbl .note-cell { grid-column: 1 / -1; max-width: none; font-size: .875rem; }
  .tbl .act-cell { grid-column: 1 / -1; text-align: left !important; }
  .tbl .is-blank { display: none; }
  .tbl .m-only { display: inline; }
}

/* ------------------------------------------------------------------ */
/* Diálogo                                                             */
/* ------------------------------------------------------------------ */

.sheet {
  width: min(460px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: var(--r-l);
  background: var(--sheet);
  color: var(--ink);
  box-shadow: 0 24px 64px -12px rgba(10, 18, 40, .35), 0 0 0 1px var(--rule);
}
.sheet::backdrop { background: color-mix(in srgb, #050912 55%, transparent); backdrop-filter: blur(2px); }
.sheet[open] { animation: subir .22s cubic-bezier(.2, .7, .2, 1); }
@keyframes subir {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.sheet form { padding: 24px; display: grid; gap: 20px; }

.sheet-head h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.sheet-head p { margin-top: 4px; color: var(--ink-2); }

.asis { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.asis-num input {
  width: 9rem;
  min-height: 60px;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  padding: 0 14px;
}
.asis-num.is-disabled { opacity: .45; }

.toggle { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 60px; cursor: pointer; font-weight: 600; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle span::before {
  content: "";
  display: inline-block;
  vertical-align: -6px;
  width: 40px;
  height: 24px;
  margin-right: 10px;
  border-radius: 999px;
  background: var(--rule);
  box-shadow: inset 0 0 0 2px var(--rule);
  transition: background .15s;
}
.toggle span::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border-radius: 50%;
  background: var(--sheet);
  transition: transform .15s;
}
.toggle input:checked + span::before { background: var(--ink); box-shadow: none; }
.toggle input:checked + span::after { transform: translateX(16px); }
.toggle input:focus-visible + span::before { box-shadow: var(--focus); }

.field-opt { font-weight: 400; color: var(--ink-3); }
.field textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--rule);
  border-radius: var(--r-s);
  background: var(--sheet);
  color: var(--ink);
  font: inherit;
  font-weight: 400;
  resize: vertical;
  min-height: 64px;
}

.sheet-hint { font-size: .875rem; color: var(--ink-2); padding-left: 10px; border-left: 2px solid var(--pen); }
.sheet-hint:empty { display: none; }

.sheet-meta { font-size: .875rem; color: var(--ink-2); }
.sheet-meta:empty { display: none; }

.sheet-error { color: var(--absent); font-weight: 600; font-size: .9375rem; }

.m-only { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.sheet-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spacer { flex: 1; }

.sheet-confirm {
  padding: 16px;
  border-radius: var(--r-m);
  background: color-mix(in srgb, var(--absent) 9%, var(--sheet));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--absent) 35%, transparent);
  display: grid;
  gap: 12px;
}

@media (max-width: 640px) {
  .sheet {
    width: 100%;
    max-width: 100%;
    margin: auto 0 0;
    border-radius: var(--r-l) var(--r-l) 0 0;
  }
  .sheet-foot .btn-primary,
  .sheet-foot .btn-danger { order: -1; flex-basis: 100%; min-height: 48px; }
  .sheet form { padding: 22px 16px calc(22px + env(safe-area-inset-bottom)); }
  .sheet[open] { animation-name: subir-movil; }
  @keyframes subir-movil {
    from { transform: translateY(40px); opacity: .4; }
    to { transform: none; opacity: 1; }
  }
}

/* ------------------------------------------------------------------ */
/* Aviso                                                               */
/* ------------------------------------------------------------------ */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 16px);
  max-width: min(92vw, 520px);
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: .9375rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 10;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: var(--absent); color: var(--absent-fg); border-radius: var(--r-m); }

/* ------------------------------------------------------------------ */
/* Móvil general                                                       */
/* ------------------------------------------------------------------ */

@media (max-width: 640px) {
  .top { padding: 14px 16px 8px; }
  .who-name { display: none; }
  .groups { padding: 0 8px; }
  .board { padding: 20px 16px 64px; }
  .pend { position: relative; top: auto; }
  .cal-head { align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
