@font-face {
  font-family: "Geist";
  src: url("/fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #0a0a0a;
  --muted: #4b5563;
  --soft: #6b7280;
  --line: #e5e7eb;
  --surface: #ffffff;
  --page: #fafafa;
  --focus: #0a0a0a;
  --danger: #b91c1c;
  --radius: 20px;
  --bar: 96px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Geist, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

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

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

.page {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  padding-bottom: calc(var(--bar) + env(safe-area-inset-bottom));
}

/* The landing's aqua gradient, as on the store's other screens. */
.hero {
  background: #e6f7f6 url("/img/agua.webp") center / cover no-repeat;
  border-radius: 0 0 28px 28px;
}

.hero-inner {
  padding: calc(20px + env(safe-area-inset-top)) 20px 28px;
}

.store {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.avatar:empty {
  background: rgba(10, 10, 10, 0.08);
}

.store-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}

h1 {
  margin: 20px 0 6px;
  font-size: 32px;
  line-height: 38px;
  font-weight: 600;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.lead {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  color: var(--muted);
  text-wrap: pretty;
}

.composer {
  margin: -14px 16px 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.add {
  display: flex;
  gap: 8px;
}

.add input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--page);
  font-size: 16px;
  transition: border-color 0.15s, background-color 0.15s;
}

.add input::placeholder {
  color: #9ca3af;
}

.add input:focus {
  outline: none;
  border-color: var(--ink);
  background: #fff;
}

.add-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 48px;
  padding: 0 16px 0 14px;
  border: 0;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.1s;
}

.add-button:active {
  transform: scale(0.97);
}

.quick {
  margin-top: 14px;
}

.quick-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--soft);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.chip:active {
  background: var(--page);
}

.chip[aria-pressed="true"] {
  border-color: var(--ink);
}

.cart {
  margin: 24px 16px 0;
}

.cart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 4px 10px;
}

h2 {
  margin: 0;
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.count {
  font-size: 15px;
  color: var(--soft);
  font-variant-numeric: tabular-nums;
}

.lines {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.lines:empty {
  display: none;
}

.line {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px 12px 10px 16px;
  animation: enter 0.22s ease-out;
}

.line + .line {
  border-top: 1px solid var(--line);
}

.line-title {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  line-height: 22px;
  overflow-wrap: anywhere;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--page);
  border: 1px solid var(--line);
}

.stepper button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.stepper button:active {
  background: #fff;
}

.stepper svg {
  width: 18px;
  height: 18px;
}

.stepper .remove {
  color: var(--danger);
}

.qty {
  min-width: 22px;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 16px;
  border: 1px dashed #d1d5db;
  border-radius: var(--radius);
  color: var(--soft);
  text-align: center;
  font-size: 15px;
  line-height: 22px;
}

.empty svg {
  width: 28px;
  height: 28px;
  stroke-width: 1.6;
}

.empty p {
  margin: 0;
}

.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}

.bar > * {
  max-width: 448px;
  margin-left: auto;
  margin-right: auto;
}

.error {
  margin-bottom: 10px;
  font-size: 15px;
  line-height: 22px;
  color: var(--danger);
  text-align: center;
}

.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.15s;
}

.primary:active {
  transform: scale(0.98);
}

.primary:disabled {
  opacity: 0.35;
  cursor: default;
  transform: none;
}

.ghost {
  height: 48px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
}

.done,
.missing {
  position: fixed;
  inset: 0;
  background: #fdeee6 url("/img/durazno.webp") center / cover no-repeat;
  overflow-y: auto;
}

.missing {
  padding: 48px 24px;
  background: var(--page);
}

.done-inner {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(24px + env(safe-area-inset-top)) 20px calc(28px + env(safe-area-inset-bottom));
}

.done-copy {
  margin: 28px 0 auto;
}

.check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  animation: pop 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.check svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.2;
  stroke-dasharray: 24;
  animation: draw 0.3s 0.12s ease-out both;
}

.code {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.done h1 {
  margin-top: 6px;
  font-size: 36px;
  line-height: 40px;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

@keyframes pop {
  from {
    transform: scale(0.6);
  }
}

@keyframes draw {
  from {
    stroke-dashoffset: 24;
  }
  to {
    stroke-dashoffset: 0;
  }
}

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