:root {
  --bg: #0b0b0c;
  --card: #151517;
  --card-2: #1c1c1f;
  --line: #26262a;
  --text: #f4f4f5;
  --muted: #9a9aa2;
  --accent: #e8ff59;
  --ok: #3ddc84;
  --radius: 18px;

  /* Curvas fuertes (las de CSS por defecto se sienten flojas) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.locked { overflow: hidden; }
.wrap {
  max-width: 560px; margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 16px max(48px, env(safe-area-inset-bottom));
}
header.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.brand { font-weight: 800; letter-spacing: .04em; text-transform: uppercase; font-size: 15px; }
.chip { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.hello { font-size: 26px; font-weight: 800; margin: 0 0 4px; line-height: 1.15; letter-spacing: -.01em; overflow-wrap: anywhere; }
.sub { color: var(--muted); font-size: 14px; margin: 0; line-height: 1.45; }
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.meta div span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.meta .full { grid-column: 1 / -1; }
.meta div b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }

/* Entrada escalonada: solo al abrir la página (algo que el cliente ve pocas veces) */
.enter { opacity: 0; transform: translateY(8px); animation: enter 400ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes enter { to { opacity: 1; transform: none; } }

/* Barra de avance: se llena de izquierda a derecha para indicar el estado */
.steps { display: flex; gap: 6px; margin: 18px 0 8px; }
.steps i { flex: 1; height: 5px; border-radius: 9px; background: var(--line); overflow: hidden; position: relative; }
.steps i::after {
  content: ""; position: absolute; inset: 0; background: var(--accent); border-radius: inherit;
  transform: scaleX(0); transform-origin: left;
}
.steps i.on::after { animation: fill 500ms var(--ease-out) forwards; animation-delay: calc(250ms + var(--s, 0) * 120ms); }
@keyframes fill { to { transform: scaleX(1); } }
.steplabels { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.steplabels .on { color: var(--text); font-weight: 600; }

.item-head { display: flex; gap: 14px; align-items: center; }
.thumb { width: 76px; height: 76px; border-radius: 12px; background: var(--card-2); flex-shrink: 0; overflow: hidden; }
.item-title { font-weight: 700; font-size: 16px; margin: 0 0 6px; font-variant-numeric: tabular-nums; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.preparing { background: #2a2a2e; color: var(--muted); }
.badge.qc { background: rgba(232,255,89,.12); color: var(--accent); }
.badge.qc::before { animation: pulse 1.6s ease-in-out infinite; }
.badge.shipped { background: rgba(61,220,132,.12); color: var(--ok); }
@keyframes pulse { 50% { opacity: .35; } }
.gl { margin-left: 6px; font-size: 12px; color: var(--ok); font-weight: 700; }

/* Las imágenes aparecen suavemente cuando terminan de cargar, sin "pop" */
img.fade { opacity: 0; transition: opacity 300ms ease; display: block; width: 100%; height: 100%; object-fit: cover; }
img.fade.loaded { opacity: 1; }

h3.sec { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 20px 0 10px; font-weight: 600; }
.qc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.qc-grid button { padding: 0; border: 0; background: var(--card-2); border-radius: 10px; overflow: hidden; aspect-ratio: 1; cursor: zoom-in; transition: transform 160ms var(--ease-out); }
.qc-grid button:active { transform: scale(0.97); }
.qc-grid button { position: relative; }
.qc-more {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(0,0,0,.55); color: #fff; font-size: 20px; font-weight: 800; letter-spacing: -.01em;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.qc-all { width: 100%; margin-top: 10px; padding: 11px 12px; }
.empty { color: var(--muted); font-size: 14px; background: var(--card-2); border-radius: 12px; padding: 14px; line-height: 1.45; }

.track { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--card-2); border-radius: 12px; padding: 12px 14px; }
.track code { font-family: inherit; font-size: 15px; font-weight: 700; letter-spacing: .03em; word-break: break-all; font-variant-numeric: tabular-nums; }
.track small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 2px; }

/* Avisos: interruptor estilo iOS */
.alerts-row { display: flex; align-items: center; gap: 12px; }
.alerts-icon {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center;
  background: var(--card-2); color: var(--muted); transition: background-color 250ms ease, color 250ms ease;
}
.alerts-icon.on { background: rgba(232,255,89,.14); color: var(--accent); }
.alerts-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.alerts-text b { font-size: 15px; letter-spacing: -.01em; }
.alerts-text span { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.alerts-note { margin: 12px 0 0; font-size: 12.5px; color: #ffb366; line-height: 1.4; }
.switch {
  position: relative; width: 51px; height: 31px; flex-shrink: 0; border: 0; border-radius: 999px; padding: 0;
  background: #39393d; cursor: pointer; touch-action: manipulation;
  transition: background-color 250ms ease, transform 160ms var(--ease-out);
}
.switch:active { transform: scale(0.96); }
.switch span {
  position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,.25), 0 1px 1px rgba(0,0,0,.16);
  transition: transform 300ms var(--ease-drawer), width 160ms var(--ease-out);
}
.switch:active span { width: 31px; } /* la perilla se estira al presionar, como en iOS */
.switch[aria-checked="true"] { background: var(--ok); }
.switch[aria-checked="true"] span { transform: translateX(20px); }
.switch[aria-checked="true"]:active span { transform: translateX(16px); }
.switch[disabled] { opacity: .6; cursor: progress; }
.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ios-steps { margin: 14px 0 0; padding: 0 0 0 20px; display: grid; gap: 8px; font-size: 13.5px; color: #d6d6da; line-height: 1.45; }
.ios-steps svg { vertical-align: -3px; color: #0a84ff; }
.alert-dot { margin-left: 6px; font-size: 12px; }

/* Historial del envío: menú desplegable estilo Apple.
   - Respuesta en el toque (pointer-down), sin esperar a soltar.
   - Abre con curva tipo iOS, cierra más rápido; es una transición, así que se puede
     invertir a medio camino sin saltos.
   - El contenido "se materializa" (opacidad + desenfoque + leve desplazamiento) en vez de solo aparecer. */
.tl {
  margin-top: 12px; border-radius: 16px; overflow: hidden;
  background: rgba(255,255,255,.035);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 0 0 1px var(--line);
  transition: background-color 300ms ease;
}
.tl.open { background: rgba(255,255,255,.05); }
.tl-toggle {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px;
  background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: transform 160ms var(--ease-out), opacity 160ms ease;
}
.tl-toggle:active { transform: scale(0.985); opacity: .85; transition-duration: 80ms; }
.tl-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 16px; }
.tl-sum { flex: 1; min-width: 0; display: grid; gap: 2px; }
.tl-label { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; font-size: 12px; font-weight: 600; color: var(--muted); }
.tl-label em {
  font-style: normal; font-size: 11px; font-weight: 700; color: var(--ok);
  background: rgba(61,220,132,.12); padding: 2px 8px; border-radius: 999px;
  overflow: hidden; text-overflow: ellipsis;
}
.tl-latest { font-size: 15px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; overflow-wrap: anywhere; }
.tl-when { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-chev {
  flex-shrink: 0; color: var(--muted);
  transition: transform 450ms var(--ease-drawer), color 200ms ease;
}
.tl.open .tl-chev { transform: rotate(180deg); color: var(--text); }

/* Altura animada con grid 0fr -> 1fr (se puede interrumpir y revertir) */
.tl-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 300ms var(--ease-out); }
.tl.open .tl-panel { grid-template-rows: 1fr; transition-duration: 500ms; transition-timing-function: var(--ease-drawer); }
.tl-clip {
  min-height: 0; overflow: hidden;
  opacity: 0; filter: blur(4px); transform: translateY(-6px);
  transition: opacity 180ms ease, filter 180ms ease, transform 300ms var(--ease-out);
}
.tl.open .tl-clip { opacity: 1; filter: none; transform: none; transition: opacity 320ms ease 60ms, filter 320ms ease 60ms, transform 500ms var(--ease-drawer); }
.tl-note { margin: 0; padding: 12px 14px 0; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

.tl-list { list-style: none; margin: 0; padding: 14px 14px 6px; }
.tl-item {
  position: relative; display: flex; gap: 14px; padding-bottom: 20px;
  opacity: 0; transform: translateY(4px); transition: opacity 150ms ease, transform 150ms ease;
}
.tl.open .tl-item { opacity: 1; transform: none; transition: opacity 300ms ease, transform 400ms var(--ease-out); transition-delay: calc(100ms + var(--k) * 30ms); }
.tl-item:last-child { padding-bottom: 10px; }
.tl-item:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 32px; bottom: 4px; width: 2px; border-radius: 2px; background: var(--line); }
.tl-dot {
  width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center;
  background: var(--card-2); box-shadow: 0 0 0 1px var(--line); color: var(--muted);
}
.tl-dot.live, .tl-item.latest .tl-dot { background: var(--accent); box-shadow: 0 0 0 5px rgba(232,255,89,.14); color: #000; }
.tl-body { min-width: 0; padding-top: 3px; }
.tl-title { margin: 0 0 3px; font-size: 14px; font-weight: 600; line-height: 1.35; color: #d6d6da; overflow-wrap: anywhere; }
.tl-item.latest .tl-title { font-weight: 700; color: var(--text); }
.tl-loc { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.tl-time { font-size: 12px; color: #6f6f77; font-variant-numeric: tabular-nums; }

@media (hover: hover) and (pointer: fine) {
  .tl-toggle:hover .tl-chev { color: var(--text); }
}

/* Todo lo que se presiona responde al toque */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 13px 16px; font-weight: 700; font-size: 14px;
  cursor: pointer; text-decoration: none; font-family: inherit; touch-action: manipulation;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--accent); color: #000; width: 100%; margin-top: 10px; }
.btn.wa { background: #25d366; color: #fff; width: 100%; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); padding: 8px 12px; font-size: 13px; }
.btn:focus-visible, .qc-grid button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Texto del botón "Copiar" -> "¡Copiado!": el blur une los dos estados */
.swap { display: inline-block; min-width: 4.6em; text-align: center; transition: filter 200ms ease, opacity 200ms ease; }
.swap.out { filter: blur(2px); opacity: 0; }

.link { color: var(--muted); font-size: 13px; display: inline-block; margin-top: 10px; text-decoration: none; transition: color 200ms ease; }

@media (hover: hover) and (pointer: fine) {
  .btn.ghost:hover { border-color: #3a3a40; }
  .link:hover { color: var(--text); }
  .qc-grid button img { transition: opacity 300ms ease, transform 300ms var(--ease-out); }
  .qc-grid button:hover img.loaded { transform: scale(1.04); }
}

/* Visor de fotos: entra con fade + escala leve; sale más rápido de lo que entra */
.lightbox {
  position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.94); opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 150ms ease, visibility 0s linear 150ms;
}
.lightbox.open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 220ms var(--ease-out), visibility 0s; }
.lightbox .stage { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; touch-action: none; }
.lightbox img {
  max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none;
  transform: scale(0.96); transition: transform 150ms ease, opacity 150ms ease;
}
.lightbox.open img { transform: none; transition: transform 300ms var(--ease-out), opacity 150ms ease; }
.lightbox img.dragging { transition: none; }
.lightbox .close { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px; z-index: 1; background: rgba(0,0,0,.5); }
.lightbox .nav { position: absolute; top: 50%; translate: 0 -50%; font-size: 22px; z-index: 1; background: rgba(0,0,0,.5); }
.lightbox .prev { left: 10px; } .lightbox .next { right: 10px; }
.lightbox .count { position: absolute; bottom: max(18px, env(safe-area-inset-bottom)); left: 50%; translate: -50% 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; background: rgba(0,0,0,.5); padding: 5px 10px; border-radius: 999px; }
@media (hover: none) { .lightbox .nav { display: none; } }

/* Esqueleto mientras carga: muestra la forma de lo que viene */
.skel { background: var(--card-2); border-radius: 8px; position: relative; overflow: hidden; }
.skel::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.05), transparent);
  animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

.center { text-align: center; padding: 60px 10px; color: var(--muted); line-height: 1.5; }
.spinner { width: 24px; height: 24px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.6s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
footer { text-align: center; color: var(--muted); font-size: 12px; margin-top: 26px; }

/* Admin */
input[type=text], input[type=password], input[type=search] {
  width: 100%; background: var(--card-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 12px; padding: 12px 14px; font-size: 16px; font-family: inherit;
  transition: border-color 200ms ease;
}
input:focus { outline: none; border-color: var(--accent); }
.row { display: flex; gap: 12px; align-items: center; }
.row .thumb { width: 52px; height: 52px; border-radius: 10px; }
.row .grow { flex: 1; min-width: 0; }
.row .grow b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .grow span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
@media (min-width: 480px) { .actions { grid-template-columns: repeat(4, 1fr); } }

/* Panel: nuevo pedido / editar */
.mform { display: grid; gap: 12px; }
.mtitle { margin: 0 0 2px; font-size: 18px; letter-spacing: -.01em; }
.mform label { display: grid; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mform label em { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 500; }
.mform input[type=url], .mform input[type=number], .mform textarea {
  width: 100%; background: var(--card-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 12px; padding: 12px 14px; font-size: 16px; font-family: inherit; text-transform: none; letter-spacing: 0; font-weight: 400;
  transition: border-color 200ms ease; resize: vertical;
}
.mform input:focus, .mform textarea:focus { outline: none; border-color: var(--accent); }
.mform input[type=text] { text-transform: none; letter-spacing: 0; font-weight: 400; }
.mform .guia-inline .btn { flex: 1; width: auto; margin: 0; }
.mphotos { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: -4px; }
.mlist { display: contents; }
.mthumb { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--card-2); }
.mthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mthumb button {
  position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.7); color: #fff; font-size: 11px; cursor: pointer; display: grid; place-items: center;
}
.mform label.mpick {
  width: 64px; height: 64px; display: grid; place-items: center; border-radius: 10px; border: 1.5px dashed #3a3a40;
  color: var(--text); font-size: 12px; text-transform: none; letter-spacing: 0; cursor: pointer; text-align: center;
  transition: border-color 200ms ease, transform 160ms var(--ease-out);
}
.mform label.mpick:active { transform: scale(0.96); }
.mtools { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.mtools .btn { padding: 7px 12px; }
.mtag { flex: 1; font-size: 12px; color: var(--accent); font-weight: 600; }

/* Panel: editor de la guía de México */
.guia-toggle { width: 100%; margin-top: 8px; justify-content: flex-start; color: var(--muted); }
.guia-toggle.has { color: var(--text); border-color: rgba(61,220,132,.4); }
.guia-toggle[aria-expanded="true"] { border-color: var(--accent); color: var(--text); }
.guia-editor { margin-top: 10px; padding: 14px; border-radius: 14px; background: var(--card-2); display: grid; gap: 14px; }
.guia-editor label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.guia-now { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.guia-now small { display: block; font-size: 11px; color: var(--muted); }
.guia-now b { display: block; font-size: 15px; letter-spacing: .02em; word-break: break-all; }
.guia-now span { font-size: 12px; color: var(--muted); }
.guia-form { display: grid; gap: 8px; }
.guia-inline { display: flex; gap: 8px; }
.guia-inline > * { flex: 1; min-width: 0; }
.guia-inline .btn.primary { flex: 0 0 auto; width: auto; margin: 0; }
.guia-editor input[type=datetime-local] {
  background: var(--card); border: 1px solid var(--line); color: var(--text); border-radius: 12px; padding: 10px; font-size: 14px; font-family: inherit; color-scheme: dark;
}
.guia-editor input[type=text] { background: var(--card); }
.guia-note { margin: 0; font-size: 12.5px; color: #ffb366; line-height: 1.4; }
.guia-empty { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.guia-manual ul { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.guia-manual li { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--card); font-size: 13px; }
.guia-manual li span { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.guia-manual li em { grid-column: 2; font-style: normal; color: var(--muted); font-size: 12px; }
.guia-manual li button { grid-row: 1 / span 2; grid-column: 3; border: 0; background: none; color: var(--muted); font-size: 14px; cursor: pointer; padding: 6px; }

/* Título: se toca 5 veces para abrir el panel, así que no debe seleccionar texto ni hacer zoom */
#brand { user-select: none; -webkit-user-select: none; touch-action: manipulation; cursor: default; }

/* Panel maestro: hoja que sube desde abajo (curva tipo iOS), baja más rápido de lo que sube */
.panel { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.6); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 200ms ease, visibility 0s linear 250ms; }
.panel.open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 250ms ease, visibility 0s; }
.panel-sheet {
  position: absolute; inset: max(12px, env(safe-area-inset-top)) 0 0; margin: 0 auto; max-width: 600px;
  background: var(--bg); border: 1px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0;
  overflow-y: auto; overscroll-behavior: contain; padding: 0 16px max(24px, env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform 250ms var(--ease-out);
}
.panel.open .panel-sheet { transform: none; transition: transform 450ms var(--ease-drawer); }
.panel-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 16px 0 12px; background: var(--bg); }
.panel-login { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-top: 6px; }
.panel-err { color: #ff6b6b; margin-top: 10px; min-height: 1em; }
.filters { display: flex; gap: 6px; overflow-x: auto; margin: 12px 0 14px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter {
  flex-shrink: 0; display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 7px 12px; font-family: inherit; font-weight: 600; font-size: 13px; line-height: 1; cursor: pointer; touch-action: manipulation;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}
.filter:active { transform: scale(0.97); }
.filter.on { background: var(--text); color: #000; border-color: var(--text); }
.filter span { font-variant-numeric: tabular-nums; opacity: .6; }
.toast {
  position: fixed; bottom: max(20px, env(safe-area-inset-bottom)); left: 50%; z-index: 20;
  background: var(--accent); color: #000; font-weight: 700; padding: 10px 16px; border-radius: 999px; font-size: 14px;
  translate: -50% 0; transform: translateY(calc(100% + 24px)); opacity: 0;
  transition: transform 200ms ease, opacity 200ms ease;
}
.toast.show { transform: none; opacity: 1; transition: transform 400ms var(--ease-drawer), opacity 200ms ease; }

/* Confirmar par */
.confirm-card { border-color: rgba(232,255,89,.35); }
.confirm-card h2 { font-size: 18px; margin: 0 0 4px; }
.confirmed { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 14px; border-radius: 12px; background: rgba(61,220,132,.12); color: var(--ok); font-weight: 700; font-size: 14px; }
.confirmed .check {
  width: 28px; height: 28px; border-radius: 50%; background: var(--ok); color: #000; display: grid; place-items: center; flex-shrink: 0;
  animation: pop 400ms var(--ease-out) both;
}
@keyframes pop { from { transform: scale(0.9); opacity: 0; } }

/* Menos movimiento: se quedan los cambios de opacidad, se quitan los desplazamientos */
@media (prefers-reduced-motion: reduce) {
  .enter { transform: none; animation-name: fadeOnly; }
  @keyframes fadeOnly { to { opacity: 1; } }
  .steps i.on::after { animation: none; transform: none; }
  .btn:active, .qc-grid button:active { transform: none; }
  .lightbox img, .lightbox.open img { transform: none; }
  .toast { transform: none; }
  .panel-sheet, .panel.open .panel-sheet { transform: none; }
  .filter:active { transform: none; }
  .confirmed .check { animation: none; }
  .tl-toggle:active { transform: none; }
  .tl-chev, .tl-panel, .tl.open .tl-panel { transition: none; }
  .tl-clip, .tl.open .tl-clip { transform: none; filter: none; transition: opacity 200ms ease; }
  .tl-item, .tl.open .tl-item { transform: none; transition: opacity 200ms ease; transition-delay: 0ms; }
  .badge.qc::before, .skel::after { animation: none; }
}
