/* Carnita Asada
   Dirección: carnicería de barrio. Pared verde menta, azulejo blanco,
   letras de rótulo en rojo con sombra mostaza. Lo demás, sobrio y muy legible. */

:root {
  color-scheme: light;
  --pared: #DDEEE6;
  --pared-2: #CDE4D9;
  --azulejo: #FFFFFF;
  --junta: #BCD6C9;
  --carbon: #24201D;
  --carbon-2: #554E48;
  --rojo: #C4262E;
  --rojo-tinta: #A81E26;
  --rojo-suave: #F8E1DF;
  --rotulo: #C4262E;
  --mostaza: #F2B33D;
  --mostaza-suave: #FCEFCF;
  --cilantro: #2D7A4E;
  --cilantro-suave: #D9EFE1;
  --on-cilantro: #FFFFFF;
  --velo: rgba(24, 20, 18, 0.5);

  --font-display: 'Bungee', 'Arial Black', Impact, sans-serif;
  --font-body: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --tabbar-h: 64px;
  --gutter: 16px;
  --r-panel: 16px;
  --r-control: 12px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --pared: #13201B;
    --pared-2: #1B2C25;
    --azulejo: #1D2B25;
    --junta: #2F443A;
    --carbon: #F1EDE6;
    --carbon-2: #B4BDB7;
    --rojo-tinta: #FF8E92;
    --rojo-suave: #3A1E20;
    --rotulo: #F0585E;
    --mostaza-suave: #3A3020;
    --cilantro: #5CC08B;
    --cilantro-suave: #1B3528;
    --on-cilantro: #0E2218;
    --velo: rgba(0, 0, 0, 0.6);
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--pared);
  color: var(--carbon);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--rojo-tinta); }

:focus-visible {
  outline: 3px solid var(--mostaza);
  outline-offset: 2px;
}

.boot {
  padding: 40vh var(--gutter) 0;
  text-align: center;
  color: var(--carbon-2);
}

/* ---------- Rótulo: la única pieza llamativa ---------- */

.rotulo {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--rotulo);
  font-size: clamp(2.5rem, 12.5vw, 4.25rem);
  line-height: 1.08; /* espacio para tildes y la Ñ */
  letter-spacing: 0.01em;
  text-shadow: 0.05em 0.05em 0 var(--mostaza);
  overflow-wrap: anywhere;
  text-wrap: balance;
}

/* ---------- Estructura ---------- */

.view {
  width: min(100%, 600px);
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) var(--gutter) calc(var(--tabbar-h) + var(--safe-b) + 32px);
}

.view-head {
  padding: 20px 0 16px;
}

.view-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.85rem;
  line-height: 1.05;
  color: var(--rotulo);
  text-shadow: 0.05em 0.05em 0 var(--mostaza);
}

.view-sub {
  margin-top: 6px;
  color: var(--carbon-2);
}

.panel {
  background: var(--azulejo);
  border: 1px solid var(--junta);
  border-radius: var(--r-panel);
  padding: 18px;
}

.panel + .panel,
.panel + section,
section + .panel { margin-top: 16px; }

.panel h2,
.section-title {
  font-size: 1.2rem;
  line-height: 1.3;
  font-weight: 700;
}

.hint {
  color: var(--carbon-2);
  font-size: 0.95rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--r-control);
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  background: transparent;
  transition: background-color 0.15s, transform 0.08s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; }
.btn.block { width: 100%; }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 0.95rem; }

.btn.primary { background: var(--rojo); color: #fff; }
.btn.primary:hover:not(:disabled) { background: #AD1F27; }
.btn.ghost { border-color: var(--junta); background: var(--azulejo); color: var(--carbon); }
.btn.ghost:hover:not(:disabled) { border-color: var(--carbon-2); }
.btn.danger { color: var(--rojo-tinta); }
.btn.solid-danger { background: var(--rojo); color: #fff; }

.link-btn {
  border: 0;
  background: none;
  padding: 6px 0;
  color: var(--rojo-tinta);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Entrada ---------- */

.login {
  width: min(100%, 460px);
  margin: 0 auto;
  min-height: 100dvh;
  padding: calc(env(safe-area-inset-top, 0px) + 12vh) var(--gutter) 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.login-lead {
  margin-top: 14px;
  font-size: 1.15rem;
  max-width: 30ch;
}

.login-date {
  margin-top: 10px;
  font-weight: 700;
}

.login-form { display: grid; gap: 16px; }

.field { display: grid; gap: 6px; }
.field > span { font-weight: 700; font-size: 0.98rem; }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 10px 14px;
  border-radius: var(--r-control);
  border: 2px solid var(--junta);
  background: var(--azulejo);
  font-size: 1.0625rem;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--carbon-2); outline: none; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { outline: 3px solid var(--mostaza); outline-offset: 1px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.form-error {
  color: var(--rojo-tinta);
  font-weight: 700;
  min-height: 0;
}
.form-error:empty { display: none; }

/* ---------- Asistencia ---------- */

.hero { padding: 28px 0 22px; }

.hero-meta {
  margin-top: 18px;
  display: grid;
  gap: 4px;
  font-size: 1.15rem;
}
.hero-meta .when { font-weight: 700; }
.hero-meta .where { color: var(--carbon-2); }

.countdown {
  display: inline-block;
  justify-self: start;
  margin-top: 10px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--mostaza);
  color: #24201D;
  font-weight: 700;
  font-size: 0.95rem;
}

.hero-notes {
  margin-top: 14px;
  max-width: 60ch;
  white-space: pre-line;
}

.hero .link-btn { margin-top: 8px; }

.rsvp h2 { margin-bottom: 14px; }

.seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.seg-btn {
  min-height: 54px;
  border-radius: var(--r-control);
  border: 2px solid var(--junta);
  background: var(--azulejo);
  font-weight: 700;
  font-size: 1rem;
  padding: 0 6px;
}
.seg-btn:hover { border-color: var(--carbon-2); }
.seg-btn[aria-pressed="true"][data-value="si"] { background: var(--cilantro); border-color: var(--cilantro); color: var(--on-cilantro); }
.seg-btn[aria-pressed="true"][data-value="quizas"] { background: var(--mostaza); border-color: var(--mostaza); color: #24201D; }
.seg-btn[aria-pressed="true"][data-value="no"] { background: var(--carbon); border-color: var(--carbon); color: var(--pared); }

.guests {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--junta);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.guests-label { font-weight: 700; }
.guests-label small { display: block; font-weight: 400; color: var(--carbon-2); font-size: 0.9rem; }

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.stepper button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--junta);
  background: var(--azulejo);
  font-size: 1.4rem;
  line-height: 1;
  display: grid;
  place-items: center;
}
.stepper button:hover:not(:disabled) { border-color: var(--carbon-2); }
.stepper button:disabled { opacity: 0.4; cursor: default; }
.stepper output {
  min-width: 2.2ch;
  text-align: center;
  font-weight: 700;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}

.rsvp .hint { margin-top: 12px; }

.roll { margin-top: 28px; }
.roll-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.roll-total { font-weight: 700; font-variant-numeric: tabular-nums; }
.roll-total strong { font-size: 1.5rem; }
.roll-break { color: var(--carbon-2); font-size: 0.95rem; margin-bottom: 12px; }

.people {
  background: var(--azulejo);
  border: 1px solid var(--junta);
  border-radius: var(--r-panel);
  overflow: hidden;
}
.person {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 16px;
}
.person + .person { border-top: 1px solid var(--junta); }
.person-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.person-name .you { color: var(--carbon-2); font-size: 0.92rem; }
.person-plus {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--cilantro);
}
.person-tag {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--carbon-2);
  border: 1px solid var(--junta);
  border-radius: 999px;
  padding: 1px 8px;
}

.avatar {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  background: var(--rojo);
}
.avatar.big { width: 56px; height: 56px; font-size: 1.3rem; }
.av-0 { background: #C4262E; color: #fff; }
.av-1 { background: #F2B33D; color: #24201D; }
.av-2 { background: #2D7A4E; color: #fff; }
.av-3 { background: #3E3833; color: #fff; }
.av-text-0 { color: var(--rojo-tinta); }
.av-text-1 { color: #9A6608; }
.av-text-2 { color: var(--cilantro); }
.av-text-3 { color: var(--carbon-2); }
@media (prefers-color-scheme: dark) {
  .av-3 { background: #6B635C; }
  .av-text-1 { color: var(--mostaza); }
}

.empty {
  padding: 18px 16px;
  color: var(--carbon-2);
}

.groups { margin-top: 12px; display: grid; gap: 10px; }
.group {
  background: var(--azulejo);
  border: 1px solid var(--junta);
  border-radius: var(--r-panel);
  overflow: hidden;
}
.group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.group > summary::-webkit-details-marker { display: none; }
.group > summary::after {
  content: '';
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.15s;
}
.group[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.group .people { border: 0; border-top: 1px solid var(--junta); border-radius: 0; }
.group-count { color: var(--carbon-2); font-weight: 400; margin-left: 4px; }

.invite { margin-top: 20px; }

/* ---------- Lista ---------- */

.stage {
  border-radius: var(--r-panel);
  padding: 14px 16px;
  background: var(--mostaza-suave);
  border: 1px solid var(--mostaza);
}
.stage.stage-seleccion { background: var(--cilantro-suave); border-color: var(--cilantro); }
.stage-step { font-size: 0.92rem; color: var(--carbon-2); }
.stage-text { margin-top: 2px; }

.admin-bar {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border: 0;
  background: none;
  padding: 0;
  font-weight: 700;
}
.switch-track {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: var(--pared-2);
  border: 2px solid var(--junta);
  position: relative;
  transition: background-color 0.15s;
}
.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s;
}
.switch[aria-checked="true"] .switch-track { background: var(--cilantro); border-color: var(--cilantro); }
.switch[aria-checked="true"] .switch-thumb { transform: translateX(20px); }

.mine {
  margin-top: 16px;
}
.mine h2 { margin-bottom: 8px; }
.mine li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
}
.mine li + li { border-top: 1px dashed var(--junta); }
.mine .qty { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

.filters {
  margin-top: 18px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chip {
  flex: none;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 2px solid var(--junta);
  background: var(--azulejo);
  font-weight: 700;
  font-size: 0.95rem;
}
.chip[aria-pressed="true"] { background: var(--carbon); border-color: var(--carbon); color: var(--pared); }

.category { margin-top: 26px; }
.category-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.category-title span { font-weight: 400; font-size: 0.92rem; color: var(--carbon-2); }

.items {
  background: var(--azulejo);
  border: 1px solid var(--junta);
  border-radius: var(--r-panel);
  overflow: hidden;
}
.item { padding: 14px 16px; }
.item + .item { border-top: 1px solid var(--junta); }

.item-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.item-name { font-size: 1.08rem; font-weight: 700; line-height: 1.3; }
.item-notes { color: var(--carbon-2); font-size: 0.95rem; margin-top: 2px; }
.item-qty {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
}
.item-qty.loose { font-weight: 400; color: var(--carbon-2); font-size: 0.95rem; white-space: normal; max-width: 9em; }

.meter {
  margin-top: 10px;
  height: 8px;
  border-radius: 999px;
  background: var(--junta);
  overflow: hidden;
}
.meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--mostaza);
}
.item.done .meter span { background: var(--cilantro); }

.item-who {
  margin-top: 8px;
  font-size: 0.95rem;
  color: var(--carbon-2);
}
.item-who strong { color: var(--carbon); font-weight: 700; }

.item-foot {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.item-left { font-size: 0.95rem; font-weight: 700; }
.item.done .item-left { color: var(--cilantro); }
.item-actions { display: flex; gap: 8px; margin-left: auto; }
.btn.mine-btn { background: var(--mostaza-suave); border-color: var(--mostaza); color: var(--carbon); }

.list-empty { padding: 22px 18px; }
.list-empty p + p { margin-top: 8px; }
.list-empty .actions { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Chat ---------- */

.chat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 96px;
}

.chat-empty {
  padding: 24px 4px;
  color: var(--carbon-2);
}

.chat-day {
  align-self: center;
  margin: 16px 0 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--carbon-2);
  background: var(--pared-2);
  padding: 2px 12px;
  border-radius: 999px;
}

.msg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 85%;
  margin-top: 8px;
}
.msg.grouped { margin-top: 0; }
.msg.mine { align-self: flex-end; align-items: flex-end; }

.msg-name {
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0 0 2px 12px;
}

.bubble {
  background: var(--azulejo);
  border: 1px solid var(--junta);
  border-radius: 4px 18px 18px 18px;
  padding: 8px 12px 6px;
  overflow-wrap: anywhere;
}
.msg.grouped .bubble { border-radius: 18px; }
.msg.mine .bubble {
  background: var(--mostaza-suave);
  border-color: var(--mostaza);
  border-radius: 18px 4px 18px 18px;
}
.msg.mine.grouped .bubble { border-radius: 18px; }
.bubble p { white-space: pre-wrap; }
.bubble time {
  display: block;
  margin-top: 2px;
  text-align: right;
  font-size: 0.78rem;
  color: var(--carbon-2);
  font-variant-numeric: tabular-nums;
}
.msg.can-delete .bubble { cursor: pointer; }

.msg-del {
  margin-top: 4px;
  border: 0;
  background: none;
  color: var(--rojo-tinta);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 4px 8px;
}
/* Oculto hasta tocar la burbuja, pero alcanzable con teclado. */
.msg:not(.open) .msg-del:not(:focus-visible) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.composer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--tabbar-h) + var(--safe-b));
  z-index: 15;
  background: var(--pared);
  border-top: 1px solid var(--junta);
}
.composer-inner {
  width: min(100%, 600px);
  margin: 0 auto;
  padding: 10px var(--gutter);
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.composer textarea {
  flex: 1;
  min-height: 46px;
  max-height: 140px;
  padding: 11px 16px;
  border-radius: 23px;
  border: 2px solid var(--junta);
  background: var(--azulejo);
  resize: none;
  line-height: 1.35;
}
.composer textarea:focus { outline: none; border-color: var(--carbon-2); }
.send {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: var(--rojo);
  color: #fff;
  display: grid;
  place-items: center;
}
.send:disabled { opacity: 0.5; }
.send svg { width: 22px; height: 22px; }

/* ---------- Tú ---------- */

.me-row { display: flex; align-items: center; gap: 14px; }
.me-name { font-size: 1.3rem; font-weight: 700; line-height: 1.25; }
.me-phone { color: var(--carbon-2); font-variant-numeric: tabular-nums; }
.me .hint { margin-top: 14px; }

.panel .btn { margin-top: 14px; }
.panel p + p { margin-top: 8px; }

.org-people { margin-top: 18px; }
.org-people h3 { font-size: 1.05rem; margin-bottom: 8px; }
.org-person {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 8px 4px;
  border: 0;
  border-top: 1px solid var(--junta);
  background: none;
  text-align: left;
}
.org-person:hover { background: var(--pared); }
.org-person .info { flex: 1; min-width: 0; }
.org-person .info small { display: block; color: var(--carbon-2); font-variant-numeric: tabular-nums; }
.org-person .chev {
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--carbon-2);
  border-bottom: 2px solid var(--carbon-2);
  transform: rotate(-45deg);
  margin-right: 8px;
}

.logout { margin-top: 24px; }

/* ---------- Barra de pestañas ---------- */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  background: var(--azulejo);
  border-top: 1px solid var(--junta);
  padding-bottom: var(--safe-b);
}
.tabbar-inner {
  width: min(100%, 600px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.tab {
  position: relative;
  height: var(--tabbar-h);
  border: 0;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--carbon-2);
  font-size: 0.8rem;
  font-weight: 700;
}
.tab svg { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--rojo-tinta); }
.tab[aria-current="page"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 28%;
  right: 28%;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--rojo);
}
.badge {
  position: absolute;
  top: 7px;
  left: calc(50% + 6px);
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--rojo);
  color: #fff;
  font-size: 0.75rem;
  line-height: 20px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ---------- Hoja inferior (dialog) ---------- */

.sheet {
  width: min(100%, 600px);
  max-width: 100%;
  max-height: 92dvh;
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: 22px 22px 0 0;
  background: var(--azulejo);
  color: var(--carbon);
  overflow: auto;
}
.sheet::backdrop { background: var(--velo); }
.sheet[open] { animation: sheet-in 0.22s ease-out; }
@keyframes sheet-in {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@media (min-width: 640px) {
  .sheet { margin: auto; border-radius: 22px; }
}

.sheet-body {
  padding: 22px var(--gutter) calc(22px + var(--safe-b));
  display: grid;
  gap: 16px;
}
.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.sheet-head h2 { font-size: 1.35rem; line-height: 1.25; }
.close {
  flex: none;
  width: 40px;
  height: 40px;
  margin: -6px -6px 0 0;
  border: 0;
  border-radius: 50%;
  background: var(--pared);
  font-size: 1.4rem;
  line-height: 1;
}
.sheet-lead { color: var(--carbon-2); }
.sheet-actions {
  display: flex;
  flex-wrap: wrap-reverse;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 4px;
}
.sheet-actions .btn { flex: 1 1 140px; }
.sheet-stack { display: grid; gap: 10px; }

.qty-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.qty-row input {
  width: 7rem;
  text-align: center;
  font-weight: 700;
  font-size: 1.3rem;
  font-variant-numeric: tabular-nums;
}
.qty-row .unit { font-weight: 700; color: var(--carbon-2); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Avisos ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 84px);
  z-index: 50;
  transform: translate(-50%, 12px);
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--carbon);
  color: var(--pared);
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--rojo); color: #fff; }

.offline {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 8px var(--gutter);
  background: var(--carbon);
  color: var(--pared);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
}

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