@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage";
  src: url("fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  /* Verde botella del taller, amarillo de cinta métrica */
  --shell: #1e3d33;
  --shell-2: #28503f;
  --shell-ink: #f3f6f2;
  --shell-ink-2: #b9cdc4;
  --tape: #f2c62b;
  --tape-ink: #1f1b0c;
  --tape-red: #c0271d;

  --ground: #eef2ef;
  --surface: #ffffff;
  --ink: #15241f;
  --ink-2: #4b5c55;
  --ink-3: #6b7a74;
  --line: #dbe3df;
  --line-strong: #c3cec9;
  --late: #b3261e;
  --late-bg: #fbe8e6;
  --ok: #1f6b47;

  /* Tonos derivados del color del menú y de la cinta (app.js los recalcula al cambiar el tema) */
  --shell-line: rgba(243, 246, 242, 0.5);
  --shell-press: #17312a;
  --soft: #e3ebe7;
  --soft-2: #e0e7e3;
  --press: var(--press);
  --hover: #f5f8f6;
  --ring: rgba(30, 61, 51, 0.14);
  --tape-press: #e5b81c;
  --tape-glow: rgba(242, 198, 43, 0.25);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  --radius: 14px;
  --gutter: 16px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --display: "Bricolage", "Figtree", system-ui, sans-serif;
  --text: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
  background: var(--ground);
  scrollbar-color: var(--line-strong) transparent;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.45;
  caret-color: var(--shell);
}

::selection { background: var(--tape); color: var(--tape-ink); }

h1, h2, h3, p { margin: 0; }

button, a, [role="button"], label.boton {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

input, textarea, select {
  font: inherit;
  font-size: 17px;
  color: var(--ink);
}

:focus-visible {
  outline: 2.5px solid var(--shell);
  outline-offset: 2px;
}

.icono {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.num { font-variant-numeric: tabular-nums; }

/* ---------- Vistas ---------- */

.vista {
  min-height: 100dvh;
  padding-bottom: calc(112px + var(--safe-bottom));
}

/* Solo se anima el contenido: un transform en .vista desplazaría los botones fijos */
.vista.entra > :not(.flotante):not(.barra-guardar) {
  animation: entrar 280ms var(--ease-out) backwards;
}

@keyframes entrar {
  from { opacity: 0.35; transform: translateX(22px); }
}

/* ---------- Cabecera ---------- */

.cabecera {
  background: var(--shell);
  color: var(--shell-ink);
  padding: calc(var(--safe-top) + 14px) var(--gutter) 18px;
}

.cabecera :focus-visible { outline-color: var(--tape); }

.cabecera-fila {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Etiqueta cosida: el nombre va como una etiqueta de prenda */
.marca {
  display: inline-flex;
  align-items: baseline;
  padding: 9px 15px 10px;
  background: var(--shell-2);
  border-radius: 7px;
  outline: 1.5px dashed var(--shell-line);
  outline-offset: -5px;
  font-family: var(--display);
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--shell-ink);
}
.marca b { font-weight: 700; }
.marca span { font-weight: 400; }

.boton-icono {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  transition: background 160ms var(--ease-out), transform 120ms var(--ease-out);
}
.boton-icono:active { transform: scale(0.94); background: rgba(255, 255, 255, 0.12); }

.resumen {
  margin-top: 14px;
  color: var(--shell-ink-2);
  font-size: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.resumen strong { color: var(--shell-ink); font-weight: 600; }
.resumen .alerta {
  color: #ffd2cc;
  font-weight: 600;
}

.cabecera--inicio { padding-bottom: 52px; }

/* ---------- Cinta métrica de la semana ---------- */

.cinta-zona {
  margin: -38px var(--gutter) 0;
  position: relative;
}

.cinta {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--tape);
  color: var(--tape-ink);
  border-radius: 8px;
  box-shadow: 0 8px 18px -10px rgba(21, 36, 31, 0.55), 0 1px 0 rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

/* rayitas de milímetros en el borde superior */
.cinta::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 7px;
  background: repeating-linear-gradient(90deg, rgba(31, 27, 12, 0.55) 0 1px, transparent 1px 7px);
  pointer-events: none;
}

.dia {
  position: relative;
  padding: 13px 0 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-height: 82px;
  transition: background 160ms var(--ease-out), color 160ms var(--ease-out);
}
.dia + .dia::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 15px;
  width: 1.5px;
  background: rgba(31, 27, 12, 0.75);
}
.dia-semana { font-size: 13px; font-weight: 500; opacity: 0.8; }
.dia-num {
  font-family: var(--display);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.dia--hoy .dia-num { color: var(--tape-red); }
.dia-puntos {
  display: flex;
  gap: 3px;
  height: 14px;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
}
.punto {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.dia:active { background: rgba(31, 27, 12, 0.1); }
.dia[aria-pressed="true"] { background: var(--tape-ink); color: var(--tape); }
.dia[aria-pressed="true"] .dia-num { color: var(--tape); }
.dia[aria-pressed="true"]::before { background: transparent; }
.dia[aria-pressed="true"] + .dia::before { background: transparent; }

/* ---------- Contenido ---------- */

.contenido { padding: 18px var(--gutter) 0; }

.pestanas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 4px;
  gap: 4px;
  background: var(--soft-2);
  border-radius: 13px;
}
.pestana {
  min-height: 46px;
  border-radius: 10px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink-2);
  transition: background 180ms var(--ease-out), color 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}
.pestana[aria-selected="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(21, 36, 31, 0.12), 0 2px 6px -2px rgba(21, 36, 31, 0.12);
}
.pestana .cuenta { font-weight: 500; color: var(--ink-3); }

.filtro-dia {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 0 6px 0 16px;
  border-radius: 13px;
  background: var(--tape-ink);
  color: var(--tape);
  font-weight: 600;
}
.filtro-dia button {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--surface);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.buscador {
  position: relative;
  margin-top: 12px;
}
.buscador .icono {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
  pointer-events: none;
}
.buscador input {
  width: 100%;
  height: 50px;
  padding: 0 14px 0 46px;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  outline: none;
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.buscador input::placeholder { color: var(--ink-3); }
.buscador input:focus { border-color: var(--shell); box-shadow: 0 0 0 3px var(--ring); }

.lista {
  margin-top: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.fila { display: flex; }
.fila + .fila { border-top: 1px solid var(--line); }
.fila.sale { animation: fila-sale 240ms var(--ease-out) forwards; }
@keyframes fila-sale { to { opacity: 0; transform: translateX(28px); } }

.fila-abrir {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 15px 16px;
  text-align: left;
  transition: background 140ms var(--ease-out);
}
.fila-abrir:active { background: var(--press); }

/* Botón «Listo» al lado de cada costura por hacer */
.fila-listo {
  flex: none;
  width: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-left: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  transition: background 140ms var(--ease-out);
}
.fila-listo .circulo {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--tape);
  color: var(--tape-ink);
  transition: transform 120ms var(--ease-out);
}
.fila-listo .icono { width: 20px; height: 20px; stroke-width: 2.5; }
.fila-listo:active { background: var(--press); }
.fila-listo:active .circulo { transform: scale(0.9); }

.plazo { font-weight: 600; color: var(--ink); }
.plazo--vencido { color: var(--late); }

.nota-plazo {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--soft);
  color: var(--ink-2);
  font-size: 15.5px;
  text-wrap: pretty;
}
.nota-plazo strong { color: var(--ink); }
.nota-plazo--vencido { background: var(--late-bg); color: var(--late); }
.nota-plazo--vencido strong { color: var(--late); }

.fila-nombre {
  display: block;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fila-trabajo {
  display: block;
  margin-top: 2px;
  color: var(--ink-2);
  font-size: 15.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fila-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 14.5px;
  white-space: nowrap;
}
.saldo { color: var(--ink-2); }
.saldo strong { color: var(--ink); font-weight: 600; }

.fecha { font-weight: 600; color: var(--ink); }
.fecha--hoy {
  padding: 1px 8px;
  border-radius: 6px;
  background: var(--tape);
  color: var(--tape-ink);
}
.fecha--tarde { color: var(--late); }
.fecha--suave { color: var(--ink-3); font-weight: 500; }

.estado-chip {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  background: var(--soft);
  color: var(--shell);
}
.estado-chip--listo { background: var(--tape); color: var(--tape-ink); }
.estado-chip--entregado { background: #eceeed; color: var(--ink-3); }

.vacio {
  margin-top: 14px;
  padding: 34px 24px;
  text-align: center;
  color: var(--ink-2);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
}
.vacio h2 {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  text-wrap: balance;
}
.vacio p { text-wrap: pretty; max-width: 30ch; margin: 0 auto; }

.aviso-copia {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--soft);
  color: var(--ink-2);
  font-size: 15.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.aviso-copia button {
  flex: none;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--shell);
  color: var(--shell-ink);
  font-weight: 600;
  font-size: 15px;
}

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

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 20px;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 120ms var(--ease-out), background 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.boton:active { transform: scale(0.97); }
.boton--ancho { width: 100%; }
.boton--primario {
  background: var(--shell);
  color: var(--shell-ink);
  box-shadow: 0 6px 16px -8px rgba(21, 36, 31, 0.6);
}
.boton--primario:active { background: var(--shell-press); }
.boton--cinta {
  background: var(--tape);
  color: var(--tape-ink);
  box-shadow: 0 6px 16px -9px rgba(0, 0, 0, 0.28);
}
.boton--cinta:active { background: var(--tape-press); }
.boton--borde {
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--line-strong);
}
.boton--borde:active { background: var(--press); }
.boton--peligro { color: var(--late); background: var(--surface); border: 1.5px solid #efc9c5; }
.boton--peligro:active { background: var(--late-bg); }
.boton--texto {
  min-height: 46px;
  padding: 0 12px;
  color: var(--ink-2);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.flotante {
  position: fixed;
  left: var(--gutter);
  right: var(--gutter);
  bottom: calc(16px + var(--safe-bottom));
  z-index: 5;
  min-height: 58px;
  max-width: 560px;
  margin: 0 auto;
  font-size: 18px;
  box-shadow: 0 12px 26px -10px rgba(21, 36, 31, 0.7);
}

/* ---------- Barra superior de subvistas ---------- */

.barra {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: -10px;
}
.barra h1 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
}

.titulo-pedido {
  margin-top: 14px;
  font-family: var(--display);
  font-size: 30px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.subtitulo-pedido {
  margin-top: 6px;
  color: var(--shell-ink-2);
  font-size: 17px;
  overflow-wrap: anywhere;
}

/* ---------- Puntadas de estado ---------- */

.puntadas {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 22px;
}
.puntadas::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 16.66%;
  right: 16.66%;
  border-top: 2px dashed var(--shell-line);
}
.paso {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  font-size: 14.5px;
  color: var(--shell-ink-2);
}
.paso-nudo {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--shell);
  border: 2px solid var(--shell-line);
}
.paso--hecho .paso-nudo { background: var(--shell-ink); border-color: var(--shell-ink); }
.paso--actual { color: var(--shell-ink); font-weight: 600; }
.paso--actual .paso-nudo {
  background: var(--tape);
  border-color: var(--tape);
  box-shadow: 0 0 0 4px var(--tape-glow);
}

/* ---------- Detalle ---------- */

.acciones-contacto {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.bloque {
  margin-top: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 16px;
}
.bloque-titulo {
  margin: 24px 2px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
}
.bloque-titulo + .bloque { margin-top: 8px; }

.dato {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 13px 0;
}
.dato + .dato { border-top: 1px solid var(--line); }
.dato-etiqueta { color: var(--ink-2); }
.dato-valor { font-weight: 600; text-align: right; }
.dato--total .dato-valor { font-size: 19px; }
.dato--debe .dato-valor { color: var(--late); }
.dato--pagado .dato-valor { color: var(--ok); }

.texto-libre {
  padding: 13px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 65ch;
}
.texto-libre--vacio { color: var(--ink-3); }

.accion-principal { margin-top: 18px; display: grid; gap: 10px; }

.pie-detalle {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.deshacer {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

/* ---------- Formulario ---------- */

.formulario { padding: 20px var(--gutter) 0; }

.campo { margin-bottom: 22px; }
.campo label, .campo .etiqueta {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 16px;
}
.campo .opcional { font-weight: 400; color: var(--ink-3); }

.entrada {
  width: 100%;
  min-height: 54px;
  padding: 12px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 13px;
  background: var(--surface);
  outline: none;
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.entrada::placeholder { color: var(--ink-3); }
.entrada:focus { border-color: var(--shell); box-shadow: 0 0 0 3px var(--ring); }
textarea.entrada { min-height: 96px; resize: vertical; line-height: 1.45; }
.entrada[aria-invalid="true"] { border-color: var(--late); box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.12); }
.error {
  margin-top: 6px;
  color: var(--late);
  font-size: 15px;
  font-weight: 500;
}

select.entrada {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%234b5c55' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 44px;
}

input[type="date"].entrada { min-height: 54px; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.chip {
  min-height: 42px;
  padding: 0 15px;
  border-radius: 21px;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  font-size: 15.5px;
  font-weight: 500;
  transition: transform 120ms var(--ease-out), background 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
.chip:active { transform: scale(0.95); background: var(--press); }
.chip[aria-pressed="true"] {
  background: var(--shell);
  border-color: var(--shell);
  color: var(--shell-ink);
}

.dos-columnas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dinero { position: relative; }
.dinero span {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-2);
  font-weight: 600;
  pointer-events: none;
}
.dinero .entrada { padding-left: 30px; font-variant-numeric: tabular-nums; }

.saldo-form {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--soft);
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}
.saldo-form .num { font-size: 18px; }

.barra-guardar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  padding: 12px var(--gutter) calc(12px + var(--safe-bottom));
  background: linear-gradient(to top, var(--ground) 70%, transparent);
}
.barra-guardar .boton { max-width: 560px; margin: 0 auto; display: flex; }

/* ---------- Ajustes ---------- */

.ajustes { padding: 20px var(--gutter) 0; }
.ajustes .bloque { padding: 16px; }
.ajustes h2 {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 6px;
}
.ajustes p { color: var(--ink-2); text-wrap: pretty; }
.ajustes .botones { display: grid; gap: 10px; margin-top: 14px; }
.ajustes .nota { margin-top: 10px; font-size: 15px; color: var(--ink-3); }

/* ---------- Hoja (diálogo inferior) ---------- */

.hoja-fondo {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(15, 28, 24, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fundido 200ms var(--ease-out) both;
}
.hoja {
  width: 100%;
  max-width: 560px;
  max-height: 88dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  padding: 10px 20px calc(20px + var(--safe-bottom));
  animation: subir 320ms var(--ease-drawer) both;
}
.hoja::before {
  content: "";
  display: block;
  width: 40px;
  height: 5px;
  border-radius: 3px;
  background: var(--line-strong);
  margin: 0 auto 16px;
}
.hoja h2 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
}
.hoja p { margin-top: 8px; color: var(--ink-2); text-wrap: pretty; }
.hoja .botones { display: grid; gap: 10px; margin-top: 20px; }

.hoja-fondo.sale { animation: fundido-sale 180ms var(--ease-out) both; }
.hoja-fondo.sale .hoja { animation: bajar 180ms var(--ease-out) both; }

@keyframes fundido { from { opacity: 0; } }
@keyframes fundido-sale { to { opacity: 0; } }
@keyframes subir { from { transform: translateY(100%); } }
@keyframes bajar { to { transform: translateY(100%); } }

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

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(90px + var(--safe-bottom));
  z-index: 30;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--shell-ink);
  font-weight: 500;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out);
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast.con-accion {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 6px 6px 18px;
  white-space: nowrap;
}
.toast.con-accion.visible { pointer-events: auto; }
.toast button {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 9px;
  color: var(--tape);
  font-weight: 700;
}
.toast button:active { background: rgba(255, 255, 255, 0.1); }

/* ---------- Colores en Ajustes ---------- */

.muestras {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px 8px;
  margin-top: 14px;
}
.muestra {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--ink-2);
  text-align: center;
  line-height: 1.2;
}
.muestra-color {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  display: grid;
  place-items: center;
  transition: transform 120ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.muestra:active .muestra-color { transform: scale(0.92); }
.muestra[aria-checked="true"] { color: var(--ink); font-weight: 600; }
.muestra[aria-checked="true"] .muestra-color {
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 5.5px var(--ink);
}
.muestra .icono { width: 22px; height: 22px; stroke-width: 2.5; opacity: 0; }
.muestra[aria-checked="true"] .icono { opacity: 1; }

.subtitulo-ajuste {
  margin-top: 20px;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Pantallas anchas: la app se queda con ancho de celular ---------- */

@media (min-width: 640px) {
  .vista { max-width: 560px; margin: 0 auto; }
  .cabecera { border-radius: 0 0 20px 20px; }
}

/* Celulares muy angostos */
@media (max-width: 350px) {
  :root { --gutter: 12px; }
  .pestana { font-size: 14px; }
  .dia-num { font-size: 20px; }
  .marca { font-size: 19px; }
}

@media (hover: hover) and (pointer: fine) {
  .fila-abrir:hover { background: var(--hover); }
  .boton--borde:hover, .chip:hover { border-color: var(--ink-3); }
  .boton-icono:hover { background: rgba(255, 255, 255, 0.1); }
  .dia:hover { background: rgba(31, 27, 12, 0.07); }
  .dia[aria-pressed="true"]:hover { background: var(--tape-ink); }
}

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