:root {
  --paper: #f3eee4;
  --ink: #1f1a16;
  --muted: #6f675e;
  --line: #ddd4c6;
  --card: #fffcf7;
  --accent: #7a2e3a;
  --accent-dark: #5c222c;
  --accent-soft: #f8ecee;
  --ok: #2f5d3a;
  --ok-soft: #e4efe6;
  --warn: #8a4b12;
  --warn-soft: #f6ead8;
  --shadow: 0 12px 40px rgba(31, 26, 22, 0.08);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Avenir Next", "Segoe UI", sans-serif;
  --tap: 44px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
}

body {
  background-image:
    radial-gradient(ellipse at top, rgba(122, 46, 58, 0.06), transparent 46%),
    linear-gradient(180deg, #f7f2e9 0%, var(--paper) 220px);
}

a { color: var(--accent); }

button, input, select, textarea { font: inherit; }

img { max-width: 100%; display: block; }

:focus-visible {
  outline: 3px solid rgba(122, 46, 58, 0.35);
  outline-offset: 2px;
}

.wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 calc(96px + env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.action-row.compact {
  gap: 4px;
}

.field-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.field-action .btn {
  white-space: nowrap;
  align-self: stretch;
}

.home-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.home-add-row .filter-field {
  margin: 0;
  display: grid;
  gap: 4px;
}

.home-add-row .filter-field span {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.home-add-action {
  display: flex;
  align-items: end;
}

.hp-tile-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.brand-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  line-height: 1;
}

.brand-logo img {
  width: min(168px, 42vw);
  height: auto;
  max-height: 72px;
  object-fit: contain;
  object-position: left center;
}

.login-logo {
  width: min(200px, 72vw);
  max-height: 88px;
  object-fit: contain;
  margin-bottom: 16px;
}

.brand small {
  display: block;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 22px;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0 0 10px; }

h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.15; }
h2 { font-size: 1.25rem; }

.lede, p { color: var(--muted); line-height: 1.55; }

.lede { margin: 0 0 20px; font-size: 1.02rem; }

.hint {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: 0;
}

label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 14px 0 6px;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  padding: 12px 14px;
  min-height: var(--tap);
}

input:focus, select:focus, textarea:focus {
  border-color: #c9a3a8;
  box-shadow: 0 0 0 4px rgba(122, 46, 58, 0.08);
  outline: none;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.folder-catalog {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.folder-catalog .choice {
  min-height: 0;
}

.folder-catalog select:disabled {
  opacity: 0.7;
}

.choice {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  cursor: pointer;
  background: #fff;
  display: block;
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  color: inherit;
  min-height: 92px;
}

.choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(122, 46, 58, 0.12);
}

.choice input { width: auto; margin: 0 8px 0 0; }

.choice strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 500;
  margin: 2px 0 4px;
}

.price-choices {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.price-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 0;
  padding: 10px 12px;
  border-radius: 12px;
}

.price-choice input {
  margin: 0;
  flex: 0 0 auto;
}

.price-choice strong {
  display: inline;
  margin: 0;
  font-size: 1rem;
  font-family: var(--sans, inherit);
  font-weight: 600;
}

@media (max-width: 720px) {
  .price-choices { grid-template-columns: 1fr; }
}

.btn {
  appearance: none;
  border: 0;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 12px 18px;
  min-height: var(--tap);
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { background: var(--accent-dark); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:disabled:hover { background: var(--accent); }

.btn.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn.secondary:hover { background: #f6f0e6; }

.btn.warning {
  background: var(--warn);
  color: #fff;
  border: 0;
}

.btn.warning:hover { background: #6d3a0d; }
.btn.warning:disabled:hover { background: var(--warn); }

.btn.save {
  background: var(--ok);
  color: #fff;
}

.btn.save:hover { background: #244830; }
.btn.save:disabled:hover { background: var(--ok); }

.warn-dot {
  display: inline-grid;
  place-items: center;
  width: 1.15em;
  height: 1.15em;
  border-radius: 999px;
  background: #fff;
  color: var(--warn);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
}

.price-alert-banner {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 0.92rem;
  font-weight: 650;
}

.price-alert {
  margin: 4px 0 0;
  color: var(--warn);
  font-size: 0.82rem;
  font-weight: 700;
}

.price-alert-inline {
  color: var(--warn);
  font-weight: 700;
}

.btn.cleanup {
  background: #6b4ea3;
  color: #fff;
}

.btn.cleanup:hover { background: #563d86; }
.btn.cleanup:disabled:hover { background: #6b4ea3; }

.btn.ghost {
  background: transparent;
  color: var(--accent);
  padding: 8px 0;
  min-height: auto;
}

.btn.ghost:hover { background: transparent; text-decoration: underline; }

.btn.whatsapp {
  background: #128c7e;
  color: #fff;
}

.btn.whatsapp:hover { background: #0e7368; }

.btn.block { width: 100%; }

.stack { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  background: #efe4d6;
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.2;
}

.badge.novedades { background: #f3d6dc; color: var(--accent-dark); }
.badge.novedades_km { background: #e4d6f3; color: #5a3d7a; }
.badge.resto { background: #dde8d8; color: var(--ok); }
.badge.carpeta { background: #f3e6d0; color: #6b4a2a; }
.badge.expired, .badge.invalid { background: #ead9d4; color: var(--accent-dark); }
.badge.done { background: var(--ok-soft); color: var(--ok); }
.badge.gate { background: var(--warn-soft); color: var(--warn); }
.badge.opened { background: #e8e3f2; color: #43365f; }
.badge.catalog { background: #e8e3f2; color: #43365f; }
.badge.locked { background: #ead9d4; color: var(--accent-dark); }
.badge.urgent { background: #f3d6dc; color: var(--accent-dark); }
.badge.quiet {
  background: transparent;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0;
  border: 1px solid var(--line);
}
.badge.submitted { background: var(--warn-soft); color: var(--warn); }
.badge.locked { background: #e8e3f2; color: #43365f; }
.badge.imported { background: var(--ok-soft); color: var(--ok); }
.badge.client_review { background: #f3e6c8; color: #6d5420; }
.badge.cancelled { background: #ead9d4; color: var(--accent-dark); }
.badge.test { background: #e8e3f2; color: #43365f; }

dialog {
  border: none;
  border-radius: 16px;
  padding: 24px;
  max-width: 420px;
  width: calc(100% - 32px);
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
}

dialog::backdrop {
  background: rgba(0,0,0,.35);
}

dialog textarea {
  width: 100%;
  min-height: 88px;
  margin-top: 8px;
}

.table-wrap {
  overflow: auto;
  margin-top: 12px;
  /* Evita que el panel se vuelva interminable cuando hay muchas filas.
     El scroll debe ser del listado, no del documento completo. */
  max-height: min(60vh, 720px);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th, td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.role-select {
  width: min(100%, 140px);
  min-height: 38px;
  padding: 6px 10px;
}

.url {
  font-size: 0.82rem;
  word-break: break-all;
  background: #f6f0e6;
  padding: 10px 12px;
  border-radius: 10px;
}

.flash {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f3d6dc;
  color: var(--accent-dark);
}

.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.catalog-title {
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

.catalog-sentinel {
  height: 1px;
  margin: 0 0 96px;
  pointer-events: none;
}

.catalog-sentinel[hidden] {
  display: none;
}

.catalog-family {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 2px;
  padding: 14px 2px 8px;
  border-bottom: 1px solid var(--line);
}

.catalog-family:first-child {
  margin-top: 0;
  padding-top: 0;
}

.catalog-family h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}

.catalog-family .meta {
  flex-shrink: 0;
  font-size: 0.82rem;
}

.family-tag {
  color: var(--accent) !important;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.product {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  content-visibility: auto;
  contain-intrinsic-size: auto 340px;
}

.product.in-cart {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(122, 46, 58, 0.1);
}

.product .photo {
  aspect-ratio: 1 / 1;
  width: 100%;
  background:
    linear-gradient(180deg, #f4ece0, #ece4d6);
  overflow: hidden;
  position: relative;
}

.product .photo.placeholder::after {
  content: "CL";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  color: #c9bba8;
  font-size: 1.4rem;
  letter-spacing: 0.12em;
}

.product .photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #f7f1ea;
}

.product .photo .photo-zoom {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.product .photo .mark {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(31, 26, 22, 0.45);
  color: rgba(255, 252, 247, 0.9);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px 64px 150px;
  background: rgba(31, 26, 22, 0.82);
  backdrop-filter: blur(4px);
  touch-action: none;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 252, 247, 0.14);
  color: #fffcf7;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.lightbox-close {
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  font-size: 1.6rem;
}

.lightbox-nav {
  top: 50%;
  width: 48px;
  height: 48px;
  font-size: 2.1rem;
  transform: translateY(-50%);
}

.lightbox-prev { left: max(10px, env(safe-area-inset-left)); }
.lightbox-next { right: max(10px, env(safe-area-inset-right)); }

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 252, 247, 0.26);
}

.lightbox-stage {
  width: min(920px, 100%);
  height: min(72vh, 820px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 12px;
  background: #1a1613;
  touch-action: none;
  user-select: none;
}

.lightbox-stage.zoomed {
  cursor: grab;
}

.lightbox-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
  transform-origin: center center;
  animation: lightbox-in 0.18s ease;
}

@keyframes lightbox-in {
  from { opacity: 0.35; }
  to { opacity: 1; }
}

.lightbox-img.zoomed {
  cursor: grab;
}

.lightbox-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(14px, env(safe-area-inset-bottom));
  margin: 0;
  text-align: center;
  color: rgba(255, 252, 247, 0.72);
  font-size: 0.78rem;
  pointer-events: none;
}

.lightbox-counter {
  color: #fffcf7;
  font-variant-numeric: tabular-nums;
}

.lightbox-cart {
  position: absolute;
  left: 50%;
  bottom: max(48px, calc(env(safe-area-inset-bottom) + 36px));
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: min(260px, calc(100vw - 24px));
  padding: 10px 14px 12px;
  border-radius: 16px;
  background: rgba(28, 18, 20, 0.78);
  border: 1px solid rgba(255, 252, 247, 0.14);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.lightbox-cart[hidden] {
  display: none;
}

.lightbox-cart.in-cart {
  border-color: rgba(212, 168, 178, 0.5);
}

.lightbox-cart-info {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: #fffcf7;
}

.lightbox-sku {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.lightbox-price {
  color: rgba(255, 252, 247, 0.72);
  font-size: 0.78rem;
}

.lightbox-qty button {
  width: 40px;
  height: 40px;
  background: #fffaf7;
}

.lightbox-qty button:disabled {
  opacity: 0.38;
  cursor: default;
}

.lightbox-qty input {
  width: 56px;
  height: 40px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
  .lightbox {
    padding: 64px 8px 128px;
  }

  .lightbox-stage {
    width: 100%;
    height: calc(100dvh - 200px);
  }

  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 1.75rem;
  }
}

.product .body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product h3 {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  height: 1.2em;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meta { color: var(--muted); font-size: 0.8rem; }

.qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.qty button {
  width: var(--tap);
  height: var(--tap);
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  flex: none;
}

.qty button:hover { background: #f6f0e6; }

.qty input {
  width: 64px;
  min-height: 40px;
  text-align: center;
  padding: 8px;
}

.cartbar {
  position: sticky;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  border-radius: 14px;
  margin-top: 18px;
  box-shadow: 0 10px 30px rgba(31, 26, 22, 0.28);
}

.cartbar p { color: #efe7db; margin: 0; line-height: 1.2; }
.cartbar .meta { color: #cfc4b5; font-size: 0.82rem; line-height: 1.2; }
.cartbar .btn {
  min-height: 36px;
  padding: 8px 14px;
}

.back-to-top {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(68px + env(safe-area-inset-bottom));
  z-index: 35;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.back-to-top:hover {
  background: #fff;
  border-color: var(--accent);
  color: var(--accent);
}

.back-to-top[hidden] {
  display: none;
}

.narrow { width: min(420px, calc(100% - 32px)); margin: 10vh auto 40px; }

.search {
  margin: 0;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%236f675e' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='5.5'/%3E%3Cpath d='M12.5 12.5 L16 16'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 14px center;
  background-size: 18px 18px;
  padding-left: 44px;
}

.empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--muted);
}

.empty h2 { margin-bottom: 8px; }

.password-wrap { position: relative; }

.password-wrap input { padding-right: 88px; }

.password-wrap .ghost {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
}

.staff-layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

body.staff[data-composer="off"] .staff-layout {
  grid-template-columns: 1fr;
}

.composer { position: sticky; top: 16px; }

.composer-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: inherit;
}

.composer-summary::-webkit-details-marker { display: none; }

.composer-summary-title {
  font-family: var(--serif, Georgia, "Times New Roman", serif);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}

.composer-summary-hint {
  flex: none;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 999px;
  padding: 5px 10px;
}

.composer[open] .composer-summary {
  margin-bottom: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.composer[open] .composer-summary-hint { display: none; }

.how {
  margin: 0 0 22px;
}

.flow-intro h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
}

.flow-intro p {
  margin: 0 0 14px;
  color: var(--muted);
  max-width: 62ch;
}

.flow {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 8px;
  margin: 0;
  padding: 0;
  align-items: stretch;
}

.flow > li:not(.flow-arrow) {
  background: rgba(255, 252, 247, 0.86);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 14px 16px;
}

.flow-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 12%, white);
  color: var(--accent);
}

.flow strong {
  display: block;
  margin-bottom: 4px;
}

.flow > li:not(.flow-arrow) > span:last-child {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.flow-arrow {
  width: 18px;
  align-self: center;
  height: 2px;
  background: var(--accent);
  position: relative;
}

.flow-arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: -4px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid var(--accent);
}

.how-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.how-slide {
  background: rgba(255, 252, 247, 0.7);
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}

.how-slide strong {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.how-slide span { color: var(--muted); font-size: 0.88rem; line-height: 1.4; }

.how-dots {
  display: none;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.how-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: color-mix(in srgb, var(--ink) 18%, transparent);
  cursor: pointer;
}

.how-dot.is-active {
  background: var(--accent);
  width: 18px;
}

.preview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 22px;
  padding: 14px 16px;
  background: rgba(255, 252, 247, 0.85);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.preview-row strong {
  display: block;
  margin-bottom: 4px;
}

.preview-row .meta {
  display: block;
  max-width: 42rem;
}

body.staff[data-role="viewer"] .preview-row {
  flex-direction: column;
  align-items: stretch;
}

.preview-folder {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.preview-folder select {
  width: auto;
  min-width: 12rem;
  max-width: 18rem;
  min-height: 42px;
  padding: 8px 12px;
}

@media (max-width: 900px) {
  .preview-folder {
    flex: 1 1 100%;
  }

  .preview-folder select,
  .preview-folder .btn {
    width: 100%;
    max-width: none;
  }
}

.preview-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 16px;
  padding: 12px 14px;
  background: #f3ebe1;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.preview-banner strong {
  flex: 0 0 auto;
}

.preview-banner span {
  flex: 1 1 220px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.preview-banner .btn {
  flex: 0 0 auto;
}

.step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  margin: 18px 0 8px;
  align-items: start;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  margin-top: 2px;
}

.step h2 {
  font-size: 1rem;
  margin: 0 0 4px;
}

.success-panel {
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  background: var(--ok-soft);
  border: 1px solid #c9dece;
}

.success-panel h2 { color: var(--ok); margin-bottom: 6px; }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  background: #efe7db;
  border-radius: 14px;
  margin-bottom: 14px;
}

.tabs button {
  flex: 1 1 120px;
  border: 0;
  background: transparent;
  border-radius: 11px;
  padding: 10px 12px;
  min-height: 42px;
  cursor: pointer;
  color: var(--muted);
}

.tabs button[aria-selected="true"] {
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.panel[hidden],
.how[hidden],
.staff-layout[hidden],
.bell-wrap[hidden],
.preview-row[hidden],
.role-intro[hidden],
.how-again[hidden] { display: none !important; }

.role-intro {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 252, 247, 0.9);
  border: 1px solid var(--line);
}

.role-intro h2 {
  margin: 0;
  font-size: 1.2rem;
}

.role-intro p {
  margin: 6px 0 0;
  color: var(--muted);
  max-width: 62ch;
}

.how-dismiss {
  margin: 14px 0 0;
}

.invite-setup {
  margin: 16px 0 0;
  color: var(--ink);
  font-size: 0.95rem;
}

.invite-advanced {
  margin-top: 14px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 10px 14px 14px;
  background: rgba(255, 252, 247, 0.55);
}

.invite-advanced summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent-dark);
}

.invite-advanced summary::-webkit-details-marker { display: none; }

.invite-advanced[open] summary {
  margin-bottom: 8px;
}

.step-plain {
  grid-template-columns: 1fr;
}

.advanced-preview {
  margin-top: 8px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(132px, 160px)) minmax(140px, 180px);
  gap: 10px 12px;
  align-items: end;
  margin-bottom: 12px;
}

.toolbar .filter-field {
  display: grid;
  gap: 4px;
  margin: 0;
  min-width: 0;
}

.toolbar .filter-field span {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.2;
}

.toolbar .filter-search {
  min-width: 0;
}

.toolbar .search,
.toolbar .filter-date,
.toolbar .filter-staff {
  width: 100%;
  min-height: 44px;
  margin: 0;
}

.toolbar .filter-staff-wrap[hidden] {
  display: none !important;
}

.reviewer-counts {
  margin: -2px 0 14px;
  line-height: 1.45;
}

.toolbar:not(:has(.filter-staff-wrap:not([hidden]))) {
  grid-template-columns: minmax(0, 1fr) repeat(2, minmax(132px, 160px));
}

.team-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  margin: 20px 0;
  align-items: start;
}

.team-form .team-field {
  min-width: 0;
}

.team-form .team-field label {
  margin-top: 0;
}

.team-form .team-field .hint {
  display: block;
  margin-top: 6px;
}

.team-form .team-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.team-form .team-actions .flash {
  flex: 1 1 100%;
  margin: 0;
}

.team-form .team-actions .btn {
  min-width: 160px;
}

@media (max-width: 900px) {
  .toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .toolbar .filter-search {
    grid-column: 1 / -1;
  }

  .toolbar:not(:has(.filter-staff-wrap:not([hidden]))) {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .toolbar,
  .toolbar:not(:has(.filter-staff-wrap:not([hidden]))) {
    grid-template-columns: 1fr;
  }

  .toolbar .filter-search {
    grid-column: auto;
  }

  .team-form {
    grid-template-columns: 1fr;
  }

  .team-form .team-actions .btn {
    width: 100%;
  }

  .field-action {
    grid-template-columns: 1fr;
  }

  .field-action .btn {
    width: 100%;
  }

  .home-add-row {
    grid-template-columns: 1fr;
  }

  .home-add-action .btn,
  .preview-row .action-row .btn,
  .action-row .btn {
    width: 100%;
  }

  .action-row.compact .btn {
    width: auto;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.role-guide {
  margin: 12px 0 0;
}

.role-guide-table td {
  vertical-align: top;
}

.role-guide-table td:nth-child(2),
.role-guide-table td:nth-child(3) {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.tab-count {
  display: inline-grid;
  min-width: 1.4em;
  height: 1.4em;
  place-items: center;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  vertical-align: middle;
}

.bell-wrap {
  position: relative;
}

.bell-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.bell-btn[aria-expanded="true"],
.bell-btn:hover {
  border-color: #cbbfad;
  background: #fff;
}

.bell-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 1.35em;
  height: 1.35em;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}

.bell-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(360px, calc(100vw - 24px));
  max-height: min(440px, calc(100dvh - 24px));
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  z-index: 40;
  overflow: hidden;
}

.bell-panel[hidden] {
  display: none !important;
}

.bell-panel.is-placed {
  position: fixed;
  top: var(--bell-top);
  left: var(--bell-left);
  right: auto;
  width: var(--bell-width);
  max-width: calc(100vw - 24px);
  max-height: var(--bell-max-h);
  z-index: 45;
}

.bell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  flex: none;
}

.bell-head strong {
  font-family: var(--serif);
  font-size: 1.05rem;
}

.bell-head-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bell-head .ghost {
  font-size: 0.82rem;
  padding: 6px 8px;
  min-height: 0;
}

.bell-head #bell-mute[aria-pressed="true"] {
  color: var(--muted);
}

.bell-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.bell-item {
  width: 100%;
  display: block;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
  background: transparent;
  padding: 12px 14px 12px 11px;
  cursor: pointer;
  color: var(--muted);
}

.bell-item:last-child { border-bottom: 0; }

.bell-item:hover { background: var(--accent-soft); }

.bell-item.unread {
  background: #fff3e6;
  border-left-color: var(--accent);
  color: var(--ink);
}

.bell-item .title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-weight: 500;
  color: inherit;
}

.bell-item .title > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.bell-item.unread .title {
  font-weight: 700;
  color: var(--ink);
}

.bell-item .meta {
  margin-top: 4px;
  color: inherit;
  opacity: 0.85;
}

.bell-item .title .bell-time {
  margin-top: 0;
  flex-shrink: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.bell-item.unread .meta {
  opacity: 1;
  color: var(--muted);
}

.bell-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
}

.client-picker { position: relative; }

.suggest {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  max-height: 240px;
  overflow: auto;
}

.suggest li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.suggest li:hover,
.suggest li.active { background: var(--accent-soft); }

.suggest .meta { flex-basis: 100%; margin: 0; }

.suggest li.empty-suggest {
  cursor: default;
  opacity: 0.85;
}

.suggest li.empty-suggest:hover,
.suggest li.empty-suggest.active { background: transparent; }

.item-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(12px);
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
  z-index: 50;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.portal-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(243, 238, 228, 0.92);
  backdrop-filter: blur(14px);
  margin: -22px -4px 16px;
  padding: 16px 4px 12px;
}

.stock-note {
  margin: 10px 0 12px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.card .stock-note {
  margin: 0 0 16px;
}

.my-orders-entry {
  margin: 0 0 12px;
}

.my-orders-entry .btn,
.home-top-actions [data-open-orders] {
  min-height: var(--tap);
}

.reorder-note {
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
}

.reorder-note strong {
  display: block;
  font-size: 1.02rem;
}

.reorder-note p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.reorder-note ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.reorder-note li + li {
  margin-top: 4px;
}

.reorder-note .btn {
  margin-top: 12px;
  min-height: var(--tap);
}

.my-order-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.my-order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.my-order-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
  justify-items: start;
}

.my-order-copy .meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.my-order-row .btn {
  flex: 0 0 auto;
  min-height: var(--tap);
}

.my-orders-entry {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fav-filter[aria-pressed="true"],
.fav-filter[aria-pressed="true"]:hover {
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-color: var(--accent);
}

.fav-heart {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: var(--tap);
  height: var(--tap);
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 252, 247, 0.94);
  color: var(--muted);
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}

.fav-heart svg {
  width: 22px;
  height: 22px;
}

.fav-heart path {
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.fav-heart.is-on {
  color: var(--accent);
  border-color: var(--accent);
}

.fav-heart.is-on path {
  fill: currentColor;
}

.fav-missing {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}

.fav-missing strong {
  display: block;
  font-size: 0.95rem;
}

.fav-missing ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.fav-missing li + li {
  margin-top: 4px;
}

.client-favorites {
  flex: 0 1 auto;
  min-height: 0;
  max-height: min(220px, 36dvh);
  overflow: auto;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.client-favorites h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.client-favorites .lede,
.client-favorites .meta {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.client-favorites-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.client-favorites-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.client-favorites-list strong,
.client-favorites-list .meta {
  display: block;
  overflow-wrap: anywhere;
}

.portal-tools {
  display: grid;
  gap: 10px;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}

.chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  min-height: 36px;
  cursor: pointer;
  white-space: nowrap;
  color: var(--ink);
}

.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.mega-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
  margin-top: 4px;
}

.mega-item {
  position: relative;
}

.mega-all,
.mega-parent,
.mega-child {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}

.mega-all,
.mega-parent {
  border-radius: 999px;
  padding: 8px 12px;
  min-height: 36px;
  white-space: nowrap;
}

.mega-all[aria-pressed="true"],
.mega-parent[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.mega-caret {
  font-size: 0.75em;
  opacity: 0.85;
}

.mega-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  min-width: 220px;
  max-width: min(320px, 80vw);
  display: grid;
  gap: 4px;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.mega-panel[hidden] {
  display: none;
}

.mega-child {
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
  background: transparent;
}

.mega-child:hover {
  background: var(--accent-soft);
}

.mega-child[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-dark);
  font-weight: 600;
}

@media (max-width: 720px) {
  .mega-menu {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .mega-panel {
    position: fixed;
    left: 12px;
    right: 12px;
    top: auto;
    bottom: calc(88px + env(safe-area-inset-bottom));
    max-width: none;
    min-width: 0;
  }
}

.review-list { display: grid; gap: 12px; margin: 16px 0; }

.review-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.review-item img, .review-thumb {
  width: 72px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  background: #ece4d6;
}

.review-item .photo-zoom {
  width: 72px;
  height: 90px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: 10px;
  display: block;
}

.review-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.review-actions .qty { margin-top: 0; }
.review-actions .btn {
  padding: 8px 12px;
  min-height: 38px;
}

.totals {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 16px;
  font-size: 1.02rem;
}

.warn-note {
  background: var(--warn-soft);
  color: var(--warn);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.9rem;
  margin: 0 0 16px;
}

.terms-box {
  margin: 16px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
}

.terms-box-open {
  padding: 14px 14px 12px;
}

.terms-heading {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 650;
  color: var(--ink);
}

.terms-box-open .terms-list {
  margin: 12px 0 0;
}

.terms-box-open .terms-accept {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.gate-short .gate-line { margin-bottom: 8px; }
.gate-short .btn.block { margin-top: 8px; }
.linkish {
  border: 0;
  padding: 0;
  background: none;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}
.terms-dialog {
  width: min(520px, calc(100% - 32px));
  border: 0;
  border-radius: 18px;
  padding: 22px;
  background: var(--card);
  color: var(--ink);
}
.terms-dialog::backdrop { background: rgba(31, 26, 22, 0.45); }
.terms-dialog .terms-list { margin: 12px 0 0; padding-left: 1.2rem; }
.terms-dialog .terms-list li + li { margin-top: 8px; }

.suggest-wa { margin-top: 8px; }
.client-history-head,
#order-view-actions { margin-top: 8px; }

.terms-details {
  margin: 0 0 12px;
}

.terms-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
}

.terms-details summary::-webkit-details-marker {
  display: none;
}

.terms-details summary::before {
  content: '▸ ';
  color: var(--muted);
}

.terms-details[open] summary::before {
  content: '▾ ';
}

.terms-list {
  margin: 10px 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
  display: grid;
  gap: 8px;
}

.terms-version {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.terms-accept {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.4;
  cursor: pointer;
}

.terms-accept input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.login-mark {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  margin-bottom: 12px;
}

.status-page { max-width: 520px; margin: 0 auto;}

.order-stamp {
  margin: -8px 0 16px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.45;
}

.feedback-card {
  margin-top: 16px;
}

.feedback-card h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
}

.feedback-stars {
  border: 0;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  gap: 4px;
}

.feedback-stars label {
  cursor: pointer;
  font-size: 1.85rem;
  line-height: 1;
  color: #d4c9b8;
  transition: color 0.12s ease, transform 0.12s ease;
}

.feedback-stars label span[aria-hidden="true"] {
  display: block;
}

.feedback-stars label:hover,
.feedback-stars label.is-on {
  color: var(--accent);
  transform: translateY(-1px);
}

.feedback-stars input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.feedback-stars-done {
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.hint-inline {
  color: var(--muted);
  font-weight: 400;
}

.feedback-card textarea {
  width: 100%;
  resize: vertical;
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
}

.feedback-rating {
  white-space: nowrap;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.feedback-avg {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0;
  white-space: nowrap;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.panel-head h2 { margin: 0; }

.order-client-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.order-client-main .badge {
  font-size: 0.7rem;
  padding: 2px 7px;
}

.order-by {
  display: block;
  margin-top: 2px;
}

.order-contact {
  line-height: 1.35;
  font-size: 0.9rem;
}

.order-contact > span {
  display: block;
}

.order-qty .feedback-rating {
  display: inline-block;
  margin-left: 6px;
}

.order-total {
  display: block;
  margin-top: 2px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.order-first-tag {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.82rem;
}

.order-first {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.35;
}

.review-before {
  flex: 0 0 auto;
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line, #e4ddd4);
  border-radius: 14px;
  background: #f7f1ea;
  line-height: 1.35;
}

.review-before-kicker,
.review-before-size,
.review-before-total,
.review-before-first {
  margin: 0;
}

.review-before-kicker {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.review-before-size {
  margin-top: 4px;
  font-weight: 600;
}

.review-before-total {
  margin-top: 2px;
  font-size: 1.45rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.review-before-first {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.review-line-money {
  margin-top: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

#order-view-dialog[open] {
  display: flex;
  flex-direction: column;
}

#order-view-dialog {
  width: min(720px, calc(100vw - 16px));
  max-width: calc(100vw - 16px);
  max-height: calc(100dvh - 16px);
  padding: 16px 16px 12px;
  overflow: hidden;
}

#order-view-dialog::backdrop {
  background: rgba(26, 22, 18, 0.55);
}

.order-view {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(100dvh - 48px);
}

.order-view h2 {
  margin: 0;
}

.order-view .lede {
  margin: 6px 0 0;
}

.order-view-lines {
  display: grid;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  margin: 12px 0 0;
  padding: 0 2px 8px 0;
}

.order-view-line {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line, #e4ddd4);
}

.order-view-line.is-price-alert {
  margin: 0 -8px;
  padding: 8px;
  border-radius: 12px;
  background: var(--warn-soft);
  border-bottom-color: transparent;
}

.order-view-photo,
.order-view-photo img {
  width: 52px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  background: #f7f1ea;
}

.order-view-copy {
  min-width: 0;
}

.order-view-copy strong,
.order-view-copy .meta {
  display: block;
  overflow-wrap: anywhere;
}

.order-view-money {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.order-view-money span {
  display: block;
}

.order-view-money span + span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.order-view .action-row {
  flex: 0 0 auto;
  margin-top: 8px;
  padding-top: 10px;
  background: #fff;
  border-top: 1px solid var(--line, #e4ddd4);
}

.client-history {
  flex: 0 1 auto;
  min-height: 0;
  max-height: min(280px, 42dvh);
  overflow: auto;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.client-history h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.client-history .lede,
.client-history .meta {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.client-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.client-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.client-history-row.is-current {
  margin: 0 -8px;
  padding: 8px;
  border-radius: 12px;
  background: var(--accent-soft);
  border-bottom-color: transparent;
}

.client-history-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
  justify-items: start;
}

.client-history-copy strong,
.client-history-copy .meta {
  overflow-wrap: anywhere;
}

.client-history-row .btn {
  min-height: var(--tap);
}

@media (max-width: 720px) {
  .home-top-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .home-top-actions .btn,
  .my-orders-entry .btn,
  .reorder-note .btn,
  .my-order-row .btn,
  .client-history-row .btn {
    width: 100%;
  }

  .my-order-row,
  .client-history-row {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }
}

.order-actions .item-actions {
  margin-top: 0;
  flex-wrap: wrap;
}

.order-actions .btn {
  white-space: nowrap;
}

.invite-share {
  margin-top: 8px;
}

.btn.ghost.danger-ghost {
  color: var(--muted);
  border-color: transparent;
  background: transparent;
}

.btn.ghost.danger-ghost:hover {
  color: #8b2e2e;
  background: rgba(139, 46, 46, 0.06);
}

.muted { color: var(--muted); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* —— Staff: acento y densidad por persona (no toca el catálogo) —— */
body.staff {
  --accent: #7a2e3a;
  --accent-dark: #5c222c;
  --accent-soft: #f8ecee;
  --accent-glow: rgba(122, 46, 58, 0.12);
  --accent-wash: rgba(122, 46, 58, 0.06);
  background-image:
    radial-gradient(ellipse at top, var(--accent-wash), transparent 46%),
    linear-gradient(180deg, #f7f2e9 0%, var(--paper) 220px);
}

body.staff[data-accent="vino"] {
  --accent: #7a2e3a;
  --accent-dark: #5c222c;
  --accent-soft: #f8ecee;
  --accent-glow: rgba(122, 46, 58, 0.12);
  --accent-wash: rgba(122, 46, 58, 0.06);
}

body.staff[data-accent="bosque"] {
  --accent: #2f5d3a;
  --accent-dark: #1e3d26;
  --accent-soft: #e4efe6;
  --accent-glow: rgba(47, 93, 58, 0.12);
  --accent-wash: rgba(47, 93, 58, 0.07);
}

body.staff[data-accent="navy"] {
  --accent: #2c3d5c;
  --accent-dark: #1d2a42;
  --accent-soft: #e8eef6;
  --accent-glow: rgba(44, 61, 92, 0.12);
  --accent-wash: rgba(44, 61, 92, 0.07);
}

body.staff[data-accent="oro"] {
  --accent: #8a6a2a;
  --accent-dark: #6b521c;
  --accent-soft: #f6ead8;
  --accent-glow: rgba(138, 106, 42, 0.14);
  --accent-wash: rgba(138, 106, 42, 0.08);
}

body.staff :focus-visible {
  outline-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

body.staff input:focus,
body.staff select:focus,
body.staff textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

body.staff .choice:has(input:checked) {
  box-shadow: 0 0 0 3px var(--accent-glow);
}

body.staff .flash:not(.ok) {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

body.staff[data-density="compact"] {
  --tap: 38px;
}

body.staff[data-density="compact"] .wrap {
  width: min(1280px, calc(100% - 24px));
  padding-top: 14px;
}

body.staff[data-density="compact"] .topbar,
body.staff[data-density="compact"] .how,
body.staff[data-density="compact"] .preview-row {
  margin-bottom: 12px;
}

body.staff[data-density="compact"] .how-track { gap: 8px; }
body.staff[data-density="compact"] .how-slide { padding: 8px 10px; border-radius: 10px; }
body.staff[data-density="compact"] .how-slide span { font-size: 0.82rem; }

body.staff[data-density="compact"] .preview-row { padding: 10px 12px; }

body.staff[data-density="compact"] .card {
  padding: 14px 16px;
  border-radius: 14px;
}

body.staff[data-density="compact"] .staff-layout { gap: 14px; }
body.staff[data-density="compact"] .composer { top: 10px; }
body.staff[data-density="compact"] .composer-summary-title { font-size: 1.2rem; }

body.staff[data-density="compact"] h1 { font-size: 1.45rem; }
body.staff[data-density="compact"] .lede { margin-bottom: 12px; font-size: 0.95rem; }

body.staff[data-density="compact"] .step { margin: 10px 0 4px; gap: 8px; }
body.staff[data-density="compact"] .choice {
  padding: 10px;
  min-height: 0;
  border-radius: 12px;
}

body.staff[data-density="compact"] .tabs {
  margin-bottom: 8px;
  padding: 3px;
}

body.staff[data-density="compact"] .tabs button {
  padding: 7px 10px;
  min-height: 34px;
}

body.staff[data-density="compact"] table { font-size: 0.84rem; }
body.staff[data-density="compact"] th,
body.staff[data-density="compact"] td { padding: 6px 6px; }
body.staff[data-density="compact"] .table-wrap {
  margin-top: 8px;
  max-height: min(72vh, 860px);
}

body.staff[data-density="compact"] .btn { padding: 8px 14px; }
body.staff[data-density="compact"] input:not(.search),
body.staff[data-density="compact"] select,
body.staff[data-density="compact"] textarea { padding: 8px 10px; }
body.staff[data-density="compact"] input.search {
  padding: 8px 10px 8px 40px;
  background-position: 12px center;
}
body.staff[data-density="compact"] .badge { padding: 3px 8px; font-size: 0.72rem; }
body.staff[data-density="compact"] .bell-btn { width: 36px; height: 36px; border-radius: 10px; }

html.review-lock,
html.review-lock body {
  overflow: hidden;
  overscroll-behavior: none;
}

html.review-lock body {
  position: fixed;
  width: 100%;
}

#review-dialog:not([open]),
#order-view-dialog:not([open]) {
  display: none;
}

#review-dialog[open] {
  display: flex;
  flex-direction: column;
}

#review-dialog {
  width: min(720px, calc(100vw - 16px));
  max-width: calc(100vw - 16px);
  max-height: calc(100dvh - 16px);
  padding: 16px 16px 12px;
  overflow: hidden;
  overscroll-behavior: contain;
}

#review-dialog::backdrop {
  background: rgba(26, 22, 18, 0.55);
}

#review-dialog form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  gap: 0;
}

#review-dialog h2 {
  margin: 0;
}

#review-dialog .review-head {
  flex: 0 0 auto;
}

#review-dialog .review-identity {
  margin: 4px 0 0;
  color: var(--ink);
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.3;
}

#review-dialog .review-first-pill,
#review-dialog .review-help-btn,
#review-dialog .lbl-short {
  display: none;
}

#review-dialog .lede {
  margin: 6px 0 0;
}

#review-dialog .action-row {
  flex: 0 0 auto;
  margin-top: 8px;
  padding-top: 10px;
  position: relative;
  z-index: 2;
  background: #fff;
  border-top: 1px solid var(--line, #e4ddd4);
}

.review-editor {
  display: grid;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  overscroll-behavior: contain;
  margin: 12px 0 0;
  padding: 0 2px 16px 0;
  -webkit-overflow-scrolling: touch;
}

.review-line {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line, #e4ddd4);
  border-radius: 14px;
}

.review-line.is-price-alert {
  border-color: #e2c4a2;
  background: #fffaf3;
}

.review-line-main {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.review-line-copy {
  min-width: 0;
}

.review-line-copy strong,
.review-line-copy .meta {
  display: block;
  overflow-wrap: anywhere;
}

.review-line .review-thumb,
.review-line-photo,
.review-line-photo img {
  width: 64px;
  height: 80px;
  border-radius: 10px;
  object-fit: cover;
  background: #f7f1ea;
}

.review-line-photo {
  display: block;
  padding: 0;
  border: 0;
  overflow: hidden;
  cursor: zoom-in;
}

.review-shot .photo-zoom {
  display: block;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #f7f1ea;
  cursor: zoom-in;
}

.review-line-photo img,
.review-shot .photo-zoom img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.staff-lightbox {
  z-index: 120;
}

.review-line input {
  min-width: 0;
  max-width: 100%;
}

.review-qty-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 6px 10px;
  min-width: 0;
}

.review-qty {
  display: grid;
  flex: 0 0 88px;
  width: 88px;
  gap: 4px;
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.review-qty-was {
  flex: 1 1 7rem;
  min-width: 7rem;
  margin: 0 0 8px;
  color: var(--muted, #6b6258);
  font-size: 0.78rem;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
}

.review-qty input {
  width: 100%;
  height: 44px;
  margin: 0;
  text-align: center;
  font-size: 1.05rem;
}

.review-note {
  display: grid;
  gap: 4px;
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted, #6b6258);
  text-transform: uppercase;
}

.review-note input {
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0 12px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.95rem;
}

.review-photo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.review-photo-actions .meta,
.review-upload-status {
  margin: 0;
  color: var(--muted, #6b6258);
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
}

.review-upload-status {
  flex: 1 1 100%;
}

.review-file-input {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.review-shot button[data-remove-photo] {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: #8a3b32;
  font: inherit;
  font-size: 0.75rem;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  text-align: center;
}

.replacement-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.replacement-photo,
.replacement-row .photo-zoom {
  width: 72px;
  height: 72px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #f7f1ea;
}

.replacement-photo img,
.replacement-row img {
  width: 72px;
  height: 72px;
  object-fit: cover;
}

.review-line .replacement-row {
  margin-top: 0;
}

.review-line .replacement-row:empty {
  display: none;
}

.review-disclaimer {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f6f0e6;
  color: #5c5348;
  font-size: 0.92rem;
}

.client-review-page {
  gap: 12px;
}

.client-review-hero h1 {
  margin: 4px 0 8px;
  font-size: clamp(1.55rem, 5vw, 1.9rem);
}

.client-review-hero .eyebrow {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a7d6f;
}

.review-summary {
  display: inline-flex;
  margin: 10px 0 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3e6c8;
  color: #6d5420;
  font-size: 0.84rem;
  font-weight: 600;
}

.client-review-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.client-review-card {
  padding: 14px;
  border-radius: 18px;
  background: #fffdf9;
  border: 1px solid #ebe2d6;
  box-shadow: 0 8px 24px rgba(40, 28, 18, 0.04);
}

.client-review-card.is-changed {
  border-color: #e2cfa3;
}

.client-review-card.has-replace {
  background: linear-gradient(180deg, #fffdf9 0%, #faf4ea 100%);
}

.client-review-head {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.client-review-photo,
.client-review-photo img {
  width: 88px;
  height: 110px;
  border-radius: 14px;
  object-fit: cover;
  background: #f7f1ea;
}

.client-review-photo {
  padding: 0;
  border: 0;
  display: block;
  overflow: hidden;
  cursor: zoom-in;
}

.client-review-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.client-review-copy strong {
  font-size: 1.02rem;
  line-height: 1.25;
}

.qty-chip,
.qty-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f6f0e6;
  color: #5c5348;
  font-size: 0.78rem;
}

.qty-chip strong,
.qty-pill strong {
  font-size: 1.2rem;
  color: #1a1612;
  font-variant-numeric: tabular-nums;
}

.qty-compare {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.qty-pill.was {
  background: #f1ebe3;
  color: #7a7166;
}

.qty-pill.was strong {
  color: #5c5348;
  font-size: 1.05rem;
}

.qty-pill.now {
  background: #eaf3e8;
  color: #35573a;
}

.qty-pill.now strong {
  color: #244528;
}

.qty-arrow {
  color: #a39586;
  font-size: 1.1rem;
}

.replace-block {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #e4ddd4;
}

.replace-label {
  margin: 0 0 6px;
  font-size: 0.84rem;
  font-weight: 650;
  color: #4d4338;
}

.replace-note {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #ebe2d6;
  color: #4d4338;
  font-size: 0.92rem;
  line-height: 1.35;
}

.replace-gone {
  margin: 6px 0 0;
  color: #8a3b32;
  font-size: 0.9rem;
  line-height: 1.35;
}

.replace-option {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: auto;
  min-width: 88px;
  max-width: 148px;
}

.replace-sku {
  margin: 0;
  max-width: 140px;
  color: #4d4338;
  font-size: 0.72rem;
  line-height: 1.2;
  letter-spacing: 0;
  text-align: center;
  overflow-wrap: anywhere;
}

.replace-choice,
.replace-none {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.78rem;
  color: #4d4338;
  cursor: pointer;
}

.replace-none {
  margin-top: 10px;
}

.replace-choice input,
.replace-none input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: #6d3a34;
}

.replace-on { display: none; }

.replace-option:has(:checked) .replace-off { display: none; }
.replace-option:has(:checked) .replace-on { display: inline; font-weight: 700; color: #244528; }

.replace-option:has(:checked) .replacement-photo {
  outline: 2px solid #6d3a34;
  outline-offset: 2px;
}

.client-review-card .replacement-row {
  align-items: flex-start;
}

.replace-hint {
  margin: 0 0 10px;
  color: #6f675e;
  font-size: 0.84rem;
  line-height: 1.35;
}

.replace-option .replace-qty {
  display: none;
  margin-top: 2px;
}

.replace-option:has(:checked) .replace-qty {
  display: flex;
}

.replace-option .replace-qty button {
  width: 32px;
  height: 32px;
}

.replace-option .replace-qty input {
  width: 44px;
  min-height: 32px;
  padding: 4px;
}

.review-drop {
  margin-top: 12px;
}

.client-review-card.is-dropped {
  opacity: 0.62;
}

.client-review-card.is-dropped .replacement-row,
.client-review-card.is-dropped .replace-hint,
.client-review-card.is-dropped .replace-label,
.client-review-card.is-dropped .replace-note {
  display: none;
}

.client-review-footer {
  position: sticky;
  bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 5;
  margin-top: 4px;
  box-shadow: 0 -10px 30px rgba(40, 28, 18, 0.08);
}

.client-review-accept {
  width: 100%;
  margin-top: 12px;
  min-height: 48px;
}

@media (max-width: 720px) {
  .client-review-head {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .client-review-photo,
  .client-review-photo img {
    width: 76px;
    height: 96px;
  }

  .qty-compare {
    width: 100%;
  }

  .qty-pill {
    flex: 1 1 auto;
    justify-content: center;
  }
}

.review-shot {
  display: grid;
  gap: 4px;
  width: 140px;
  justify-items: stretch;
}

.review-shot-sku {
  display: grid;
  gap: 2px;
  margin: 0;
  color: var(--muted, #6b6258);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.review-shot-sku input {
  width: 100%;
  height: 36px;
  margin: 0;
  padding: 0 8px;
  font-size: 0.82rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.prefs-icons {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0 16px;
}

.prefs-icon {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  min-height: 44px;
  padding: 4px 2px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: inherit;
  line-height: 1;
}

.prefs-icon-glyph {
  font-size: 1.25rem;
  line-height: 1.2;
}

.prefs-icon-tag {
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.prefs-icon-role { border-style: dashed; }

.prefs-icon.is-on {
  border-color: var(--accent);
  border-style: solid;
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(122, 46, 58, 0.12);
}

.staff-glyph { margin-right: 4px; }

@media (max-width: 720px) {
  .prefs-icons { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

.prefs-accents { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.prefs-accent {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 0;
  padding: 12px;
}

.prefs-accent strong {
  display: inline;
  margin: 0;
  font-size: 1rem;
}

.prefs-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(31, 26, 22, 0.12);
}

.prefs-swatch[data-accent="vino"] { background: #7a2e3a; }
.prefs-swatch[data-accent="bosque"] { background: #2f5d3a; }
.prefs-swatch[data-accent="navy"] { background: #2c3d5c; }
.prefs-swatch[data-accent="oro"] { background: #8a6a2a; }

/* —— Portal cliente: lookbook / boutique —— */
body.portal {
  --paper: #f3e9e4;
  --ink: #1c1214;
  --muted: #7a6568;
  --line: #e4d3cc;
  --card: #fffaf7;
  --accent: #9a2f4a;
  --accent-dark: #721f35;
  --accent-soft: #f8e6ea;
  --gold: #b8926a;
  --shadow: 0 18px 48px rgba(28, 18, 20, 0.08);
  --serif: "Cormorant Garamond", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse 90% 55% at 12% -8%, rgba(154, 47, 74, 0.14), transparent 55%),
    radial-gradient(ellipse 70% 45% at 92% 8%, rgba(184, 146, 106, 0.18), transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(154, 47, 74, 0.06), transparent 55%),
    linear-gradient(180deg, #f8efe9 0%, var(--paper) 280px);
  font-family: var(--sans);
}

body.portal .wrap {
  width: min(1220px, calc(100% - 28px));
  padding-top: 18px;
}

body.portal .portal-head {
  background: rgba(243, 233, 228, 0.88);
  border-bottom: 1px solid rgba(228, 211, 204, 0.7);
  margin: -18px -6px 20px;
  padding: 14px 6px 14px;
}

body.portal .catalog-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

body.portal .catalog-kicker {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

body.portal .catalog-title {
  font-family: var(--serif);
  font-size: clamp(1.55rem, 3.4vw, 2.15rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  line-height: 1.05;
  color: var(--ink);
}

body.portal .price-alert-banner {
  margin: 0 0 12px;
}

body.portal .stock-note {
  margin: 12px 0 14px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
}

body.portal .badge {
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: rgba(255, 250, 247, 0.9);
  border: 1px solid var(--line);
}

body.portal .badge.novedades,
body.portal .badge.urgent {
  background: linear-gradient(135deg, #f8e0e6, #f3d0d8);
  border-color: transparent;
  color: var(--accent-dark);
}

body.portal .badge.novedades_km {
  background: linear-gradient(135deg, #ebe0f6, #e0d0f0);
  border-color: transparent;
  color: #5a3d7a;
}

body.portal .badge.resto {
  background: #e8f0e6;
  border-color: transparent;
}

body.portal .badge.carpeta {
  background: #f6ecdc;
  border-color: transparent;
  color: #6b4a2a;
}

body.portal .search {
  border-radius: 999px;
  border: 1px solid var(--line);
  background-color: rgba(255, 250, 247, 0.95);
  min-height: 46px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

body.portal .search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(154, 47, 74, 0.12);
  outline: none;
}

body.portal .mega-all,
body.portal .mega-parent {
  background: rgba(255, 250, 247, 0.92);
  border-color: var(--line);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

body.portal .mega-all:hover,
body.portal .mega-parent:hover {
  border-color: #d4a8b2;
  color: var(--accent-dark);
}

body.portal .mega-all[aria-pressed="true"],
body.portal .mega-parent[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(154, 47, 74, 0.22);
}

body.portal .mega-panel {
  border-radius: 16px;
  border-color: var(--line);
  background: #fffaf8;
}

body.portal .catalog-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
  gap: 18px;
}

body.portal .catalog-family {
  margin: 18px 0 4px;
  padding: 22px 4px 12px;
  border-bottom: 0;
  position: relative;
}

body.portal .catalog-family:first-child {
  margin-top: 0;
  padding-top: 0;
}

body.portal .catalog-family::after {
  content: "";
  position: absolute;
  left: 4px;
  bottom: 4px;
  width: min(72px, 30%);
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: 2px;
}

body.portal .catalog-family h2 {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--ink);
}

body.portal .catalog-family .meta {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

body.portal .product {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transition: transform 0.35s ease;
}

body.portal .product:hover {
  transform: translateY(-3px);
}

body.portal .product.in-cart {
  border: 0;
  box-shadow: none;
}

body.portal .product.in-cart .photo {
  box-shadow: 0 0 0 2px var(--accent), 0 16px 36px rgba(154, 47, 74, 0.16);
}

body.portal .product.just-added .photo {
  animation: portal-card-pulse 0.55s ease;
}

@keyframes portal-card-pulse {
  0% { box-shadow: 0 0 0 0 rgba(154, 47, 74, 0.35); }
  70% { box-shadow: 0 0 0 10px rgba(154, 47, 74, 0); }
  100% { box-shadow: 0 0 0 2px var(--accent), 0 16px 36px rgba(154, 47, 74, 0.16); }
}

body.portal .product .photo {
  aspect-ratio: 1 / 1;
  width: 100%;
  border-radius: 6px;
  background:
    linear-gradient(160deg, #f6ebe4, #eadfd6);
  box-shadow: 0 14px 34px rgba(28, 18, 20, 0.08);
}

body.portal .product .photo.placeholder::after {
  color: #c9aea8;
  font-family: var(--serif);
  font-style: italic;
  letter-spacing: 0.18em;
}

body.portal .product .body {
  padding: 5px 2px 4px;
  gap: 5px;
}

body.portal .product h3 {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  height: 1.2em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.portal .product .meta {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

body.portal .product .meta.family-tag {
  color: var(--gold) !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 600;
}

body.portal .qty {
  gap: 5px;
}

body.portal .qty button {
  border-color: var(--line);
  background: #fffaf7;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

body.portal .qty button:hover {
  background: var(--accent-soft);
  border-color: #d4a8b2;
  color: var(--accent-dark);
}

body.portal .qty input {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fffaf7;
}

body.portal .product .qty button {
  width: 24px;
  height: 24px;
  max-height: 24px;
  font-size: 0.95rem;
}

body.portal .product .qty input {
  height: 24px;
  max-height: 24px;
  min-height: 0;
  padding: 0 4px;
}

body.portal .cartbar {
  background: linear-gradient(120deg, #2a171c 0%, #1c1214 55%, #3a1f28 100%);
  border: 1px solid rgba(184, 146, 106, 0.28);
  border-radius: 14px;
  padding: 8px 12px;
  box-shadow: 0 12px 28px rgba(28, 18, 20, 0.28);
}

body.portal .cartbar p {
  font-family: var(--serif);
  font-size: 0.98rem;
  color: #f7ebe6;
}

body.portal .cartbar .meta {
  color: #d2b5a8;
  font-size: 0.78rem;
}

body.portal .cartbar .btn {
  background: linear-gradient(135deg, #c45a72, var(--accent));
  box-shadow: 0 6px 14px rgba(154, 47, 74, 0.28);
  min-width: 148px;
  min-height: 36px;
  padding: 8px 14px;
}

body.portal .cartbar .btn:hover {
  background: linear-gradient(135deg, #d06a80, var(--accent-dark));
}

body.portal .cartbar .btn:disabled {
  background: #5a3d45;
  box-shadow: none;
}

body.portal .back-to-top {
  background: #fffaf7;
  border-color: var(--line);
  color: var(--accent-dark);
}

body.portal .back-to-top:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

body.portal .empty {
  padding: 64px 16px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--muted);
}

body.portal .btn {
  letter-spacing: 0.02em;
}

@media (max-width: 720px) {
  body.portal .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  body.portal .catalog-title {
    font-size: 1.45rem;
  }

  body.portal .catalog-family {
    margin-top: 10px;
    padding-top: 16px;
  }

  body.portal .catalog-family:first-child {
    margin-top: 0;
    padding-top: 0;
  }

  body.portal .product h3 {
    font-size: 0.92rem;
  }

  body.portal .cartbar {
    gap: 8px;
    padding: 8px 10px;
  }

  body.portal .cartbar .btn {
    min-width: 0;
    width: 100%;
    min-height: 34px;
    padding: 7px 12px;
  }
}

@media (max-width: 900px) {
  .staff-layout { grid-template-columns: 1fr; }
  .composer { position: static; }
  .preview-row { flex-direction: column; align-items: stretch; }

  .how { margin-bottom: 14px; }

  .flow-intro p { margin-bottom: 10px; }

  .flow {
    display: flex;
    grid-template-columns: none;
    gap: 10px;
    align-items: stretch;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .flow::-webkit-scrollbar { display: none; }

  .flow > li:not(.flow-arrow) {
    flex: 0 0 min(78%, 280px);
    scroll-snap-align: start;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 10px;
    align-items: center;
    padding: 12px 12px 14px;
  }

  .flow-mark {
    width: 40px;
    height: 40px;
    margin: 0;
    border-radius: 12px;
  }

  .flow-mark svg {
    width: 28px;
    height: 28px;
  }

  .flow strong { margin: 0; }

  .flow > li:not(.flow-arrow) > span:last-child {
    grid-column: 1 / -1;
    margin-top: 8px;
  }

  .flow-arrow { display: none; }

  .how-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .how-track::-webkit-scrollbar { display: none; }

  .how-slide {
    flex: 0 0 min(86%, 320px);
    scroll-snap-align: start;
  }

  .how-dots { display: flex; }

  .composer:not([open]) {
    padding-top: 14px;
    padding-bottom: 14px;
  }
}

@media (max-width: 720px) {
  .row, .choices { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product .body { padding: 10px; }
  .qty button { width: 38px; height: 38px; }
  .cartbar { flex-direction: column; align-items: stretch; text-align: left; gap: 8px; padding: 8px 10px; }
  .review-item { grid-template-columns: 56px 1fr; }
  .review-line { display: flex; }
  .review-line-main { grid-template-columns: 64px minmax(0, 1fr); }
  .review-line .review-qty-wrap {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  #review-dialog {
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border-radius: 0;
    padding:
      max(8px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
  }

  #review-dialog form {
    flex: 1 1 auto;
    max-height: none;
  }

  #review-dialog .review-title {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  #review-dialog .review-head-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  #review-dialog .review-identity {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #review-dialog .review-first-pill:not([hidden]) {
    display: inline-flex;
    flex: none;
    align-items: center;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--warn-soft);
    color: var(--warn);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
  }

  #review-dialog .review-help-btn {
    display: inline-grid;
    flex: none;
    place-items: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
  }

  #review-dialog .review-help-text {
    display: none;
    font-size: 0.88rem;
    line-height: 1.35;
  }

  #review-dialog .review-help-text.is-open {
    display: block;
  }

  #review-dialog .review-before {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 4px;
    margin: 2px 0 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    line-height: 1.3;
  }

  #review-dialog .review-before-kicker { display: none; }

  #review-dialog .review-before-size,
  #review-dialog .review-before-total {
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 600;
  }

  #review-dialog .review-before-total:not([hidden])::before {
    content: "· ";
    font-weight: 500;
  }

  #review-dialog .review-before-first {
    flex-basis: 100%;
    margin: 0;
    font-size: 0.75rem;
  }

  #review-dialog .review-before.is-first .review-before-first { display: none; }

  #review-dialog .review-editor { margin-top: 8px; }

  #review-dialog .lede {
    font-size: 0.88rem;
    line-height: 1.35;
  }

  #review-dialog .action-row {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
  }

  #review-dialog .lbl-long { display: none; }
  #review-dialog .lbl-short { display: inline; }

  #review-dialog .action-row .btn {
    width: auto;
    min-height: 44px;
    padding: 8px 12px;
    white-space: nowrap;
    font-size: 0.92rem;
  }

  #review-dialog .action-row .btn[type="submit"] {
    width: 100%;
  }
  .review-item img, .review-thumb { width: 56px; height: 70px; }
  .review-item .photo-zoom { width: 56px; height: 70px; }
  .review-actions { grid-column: 1 / -1; align-items: flex-start; }

  .js-cards thead { display: none; }
  .js-cards tr {
    display: block;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 10px;
  }
  .js-cards td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    padding: 6px 0;
  }
  .js-cards td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex: none;
  }
  .js-cards td:last-child { display: block; }

  /* Pedidos: card limpia, sin etiquetas CUÁNDO/CLIENTE/… */
  .orders-table tr.order-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 10px;
    padding: 14px;
  }

  .orders-table tr.order-row td {
    display: block;
    padding: 0;
    justify-content: initial;
  }

  .orders-table tr.order-row td::before { display: none; content: none; }

  .orders-table .order-client {
    grid-column: 1;
    grid-row: 1;
  }

  .orders-table .order-status {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: start;
  }

  .orders-table .order-when {
    grid-column: 1 / -1;
    grid-row: 2;
    color: var(--muted);
    font-size: 0.82rem;
  }

  .orders-table .order-contact {
    grid-column: 1 / -1;
    grid-row: 3;
    font-size: 0.88rem;
    color: var(--ink);
  }

  .orders-table .order-contact > span {
    display: inline;
  }

  .orders-table .order-contact > span + span::before {
    content: " · ";
    color: var(--muted);
  }

  .orders-table .order-qty {
    grid-column: 1 / -1;
    grid-row: 4;
    margin-top: 2px;
    font-weight: 600;
  }

  .orders-table .order-actions {
    grid-column: 1 / -1;
    grid-row: 5;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }

  .orders-table .order-actions .item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .orders-table .order-actions .btn {
    min-height: 36px;
    padding: 7px 12px;
  }

  /* Links: card limpia sin columna Acciones vacía */
  .invites-table tr.invite-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 10px;
    padding: 14px;
  }

  .invites-table tr.invite-row td {
    display: block;
    padding: 0;
    justify-content: initial;
  }

  .invites-table tr.invite-row td::before { display: none; content: none; }

  .invites-table .invite-client {
    grid-column: 1;
    grid-row: 1;
  }

  .invites-table .invite-catalog {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: start;
  }

  .invites-table .invite-status {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .invites-table .invite-time {
    grid-column: 1 / -1;
    grid-row: 3;
    color: var(--muted);
    font-size: 0.82rem;
  }

  .invites-table .invite-share {
    margin-top: 8px;
  }

  body.staff[data-density="compact"] .js-cards tr {
    padding: 8px 10px;
    margin-bottom: 8px;
    border-radius: 10px;
  }

  body.staff[data-density="compact"] .js-cards td {
    padding: 4px 0;
  }

  body.staff[data-density="compact"] .orders-table tr.order-row,
  body.staff[data-density="compact"] .invites-table tr.invite-row {
    padding: 12px;
    gap: 4px 8px;
  }

  body.staff[data-density="compact"] .orders-table tr.order-row td,
  body.staff[data-density="compact"] .invites-table tr.invite-row td {
    padding: 0;
  }
}

/* —— Portada tipo Shopify —— */
.home-page {
  padding-bottom: 24px;
}

.home-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.home-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.home-top .btn {
  min-height: 40px;
  padding: 8px 16px;
}

.home-section {
  margin: 0 0 56px;
}

.home-hero {
  --hero-card: #fffaf7;
  --hero-gold: var(--gold, #b8926a);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 40px 56px;
  align-items: center;
  padding: clamp(30px, 4.6vw, 64px);
  border: 1px solid rgba(154, 47, 74, 0.12);
  border-radius: 32px;
  background:
    radial-gradient(ellipse 60% 70% at 100% 0%, rgba(184, 146, 106, 0.22), transparent 60%),
    radial-gradient(ellipse 55% 60% at 0% 100%, rgba(154, 47, 74, 0.1), transparent 60%),
    linear-gradient(140deg, #fffaf7 0%, #fbeeea 55%, #f5e1dc 100%);
  box-shadow: 0 30px 60px -30px rgba(114, 31, 53, 0.28);
}

.home-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 420px;
  aspect-ratio: 1;
  left: -250px;
  bottom: -290px;
  border: 1px solid rgba(184, 146, 106, 0.45);
  border-radius: 50%;
  box-shadow: 0 0 0 36px rgba(184, 146, 106, 0.06);
}

.home-hero.no-art {
  grid-template-columns: minmax(0, 1fr);
}

.home-hero-copy > * {
  animation: home-hero-rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.home-hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.home-hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.home-hero-copy > :nth-child(4) { animation-delay: 0.24s; }
.home-hero-copy > :nth-child(5) { animation-delay: 0.32s; }

.home-hero-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--hero-gold);
}

.home-hero-kicker::before {
  content: "";
  width: 34px;
  height: 1px;
  background: currentColor;
}

.home-hero-copy h1 {
  font-family: var(--serif);
  font-size: clamp(2.7rem, 5.8vw, 5rem);
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin: 0 0 22px;
}

.home-hero-copy h1 span,
.home-hero-copy h1 em {
  display: block;
}

.home-hero-copy h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}

.home-hero-lede {
  max-width: 30rem;
  margin: 0 0 30px;
  font-size: 1.06rem;
  line-height: 1.6;
  color: var(--muted);
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.home-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 14px 26px 14px 30px;
  font-size: 1rem;
  box-shadow: 0 14px 28px -12px rgba(154, 47, 74, 0.55);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.home-hero-cta svg {
  width: 20px;
  height: 20px;
  transition: transform 0.25s ease;
}

.home-hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px -12px rgba(154, 47, 74, 0.6);
}

.home-hero-cta:hover svg {
  transform: translateX(4px);
}

.home-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 36px;
  margin: 34px 0 0;
  padding: 22px 0 0;
  list-style: none;
  border-top: 1px solid rgba(154, 47, 74, 0.14);
}

.home-hero-stats li {
  display: grid;
  gap: 4px;
}

.home-hero-stats strong {
  font-family: var(--serif);
  font-size: 2.1rem;
  font-weight: 600;
  font-variant-numeric: lining-nums;
  line-height: 1;
  color: var(--accent);
}

.home-hero-stats span {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.home-hero-art {
  position: relative;
  height: clamp(360px, 38vw, 480px);
}

.home-hero-glow {
  position: absolute;
  inset: 12% 10% 6% 14%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(154, 47, 74, 0.2), transparent 68%);
  filter: blur(8px);
}

.home-hero-frame {
  position: absolute;
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 6px solid var(--hero-card);
  box-shadow: 0 26px 50px -18px rgba(28, 18, 20, 0.35);
  animation: home-hero-float 7s ease-in-out infinite alternate;
}

.home-hero-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-hero-frame.is-product img {
  object-fit: contain;
  padding: 10%;
}

.home-hero-frame-main {
  top: 0;
  bottom: 0;
  left: 20%;
  width: 50%;
  border-radius: 999px 999px 28px 28px;
}

.home-hero-frame-a {
  top: 8%;
  left: -8%;
  width: 36%;
  aspect-ratio: 1;
  border-radius: 50%;
  rotate: -6deg;
  animation-delay: -2.5s;
}

.home-hero-frame-b {
  right: 0;
  bottom: 7%;
  width: 31%;
  aspect-ratio: 4 / 5;
  border-radius: 24px;
  rotate: 5deg;
  animation-delay: -4.5s;
}

.home-hero-seal {
  position: absolute;
  top: 1%;
  right: 3%;
  width: clamp(84px, 9vw, 112px);
  filter: drop-shadow(0 12px 18px rgba(28, 18, 20, 0.16));
  animation: home-hero-spin 26s linear infinite;
}

.home-hero-seal circle {
  fill: var(--hero-card);
  stroke: rgba(184, 146, 106, 0.55);
  stroke-width: 1;
}

.home-hero-seal text {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  fill: var(--accent);
}

.home-hero-seal-star {
  fill: var(--hero-gold);
}

@keyframes home-hero-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes home-hero-float {
  from { translate: 0 -6px; }
  to { translate: 0 8px; }
}

@keyframes home-hero-spin {
  to { rotate: 360deg; }
}

.home-collections-title {
  text-align: center;
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin: 0 0 28px;
}

.home-collection-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 28px 18px;
}

.home-collection-tile {
  display: grid;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  text-align: center;
}

.home-collection-photo {
  aspect-ratio: 1;
  overflow: hidden;
  background: #fff;
  border-radius: 4px;
}

.home-collection-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.home-collection-tile:hover .home-collection-photo img {
  transform: scale(1.04);
}

.home-collection-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.home-collage-note {
  margin: -8px 0 16px;
  text-align: center;
  font-size: 0.82rem;
}

.home-collage {
  display: grid;
  gap: 14px;
}

.home-collage .home-collection-tile {
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
  height: 100%;
  min-height: 0;
}

.home-collage .home-collection-photo {
  position: relative;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  border-radius: 14px;
}

.home-collage .home-collection-photo img {
  position: absolute;
  inset: 0;
}

.home-collage-editorial,
.home-collage-mosaico,
.home-collage-revista {
  height: var(--collage-h, 480px);
}

.home-collage-editorial {
  grid-template-columns: 1.35fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.home-collage-editorial .home-collection-tile:nth-child(1) {
  grid-row: 1 / span 2;
}

.home-collage-mosaico {
  grid-template-columns: 1.45fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.home-collage-mosaico .home-collection-tile:nth-child(1) {
  grid-row: 1 / span 2;
}

.home-collage-revista {
  grid-template-columns: 1.05fr 0.9fr 1fr;
  grid-template-rows: 1.15fr 0.85fr;
}

.home-collage-revista .home-collection-tile:nth-child(1) {
  grid-row: 1 / span 2;
}

.home-collage-revista .home-collection-tile:nth-child(2) {
  grid-column: 2 / span 2;
}

.home-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 32px;
  padding: 8px 8px 0;
  border-top: 1px solid var(--line);
}

.home-feature {
  text-align: center;
}

.home-feature-icon {
  width: 28px;
  height: 28px;
  margin: 0 auto 12px;
  color: var(--accent);
}

.home-feature-icon svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.home-feature-icon svg * {
  transform-box: fill-box;
}

/* truck: avanza y ruedas giran */
.home-feature-icon--truck svg {
  animation: hf-truck-drive 2.8s ease-in-out infinite;
}

.home-feature-icon--truck .hf-truck-wheel {
  transform-origin: center;
  animation: hf-truck-spin 1.4s linear infinite;
}

@keyframes hf-truck-drive {
  0%, 100% { transform: translateX(0); }
  35% { transform: translateX(3px); }
  70% { transform: translateX(-2px); }
}

@keyframes hf-truck-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* lock: el aro se asienta al cerrar */
.home-feature-icon--lock .hf-lock-shackle {
  transform-origin: center bottom;
  animation: hf-lock-click 2.6s ease-in-out infinite;
}

.home-feature-icon--lock .hf-lock-body {
  transform-origin: center;
  animation: hf-lock-settle 2.6s ease-in-out infinite;
}

@keyframes hf-lock-click {
  0%, 55%, 100% { transform: translateY(0); }
  20% { transform: translateY(-2.5px); }
  35% { transform: translateY(0.5px); }
  42% { transform: translateY(0); }
}

@keyframes hf-lock-settle {
  0%, 35%, 50%, 100% { transform: scale(1); }
  42% { transform: scale(1.04, 0.96); }
}

/* heart: latido */
.home-feature-icon--heart .hf-heart {
  transform-origin: center;
  animation: hf-heart-beat 1.5s ease-in-out infinite;
}

@keyframes hf-heart-beat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.14); }
  28% { transform: scale(1); }
  42% { transform: scale(1.1); }
  56% { transform: scale(1); }
}

/* clock: manecillas giran */
.home-feature-icon--clock .hf-clock-hand {
  transform-origin: 12px 12px;
  transform-box: view-box;
  animation: hf-clock-tick 8s linear infinite;
}

@keyframes hf-clock-tick {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* spark: brillo y giro */
.home-feature-icon--spark .hf-spark {
  transform-origin: center;
  animation: hf-spark-twinkle 2.2s ease-in-out infinite;
}

@keyframes hf-spark-twinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(1.12) rotate(28deg); opacity: 0.72; }
}

/* gift: moño y cajita con bounce */
.home-feature-icon--gift .hf-gift-bow {
  transform-origin: center bottom;
  animation: hf-gift-bow 2.4s ease-in-out infinite;
}

.home-feature-icon--gift .hf-gift-box {
  transform-origin: center bottom;
  animation: hf-gift-box 2.4s ease-in-out infinite;
}

@keyframes hf-gift-bow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  30% { transform: translateY(-2px) rotate(-6deg); }
  60% { transform: translateY(-1px) rotate(5deg); }
}

@keyframes hf-gift-box {
  0%, 100% { transform: translateY(0); }
  30% { transform: translateY(-1px); }
  60% { transform: translateY(0.5px); }
}

.home-feature h3 {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 8px;
}

.home-feature p {
  margin: 0 auto;
  max-width: 22rem;
  font-size: 0.88rem;
}

.home-tiktok-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 22px;
}

.home-tiktok-kicker {
  margin: 0 0 4px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.home-tiktok h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--accent);
  line-height: 0.95;
  margin: 0 0 8px;
}

.home-tiktok-handle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.home-tiktok-handle:hover { text-decoration: underline; }

.home-social-icon {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
  display: block;
}

.home-social-icon-tiktok,
.home-social-icon-instagram {
  overflow: visible;
}

.home-tiktok-grid,
.home-carousel-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}

.home-carousel-track::-webkit-scrollbar { display: none; }

.home-carousel-track.is-jumping {
  scroll-snap-type: none;
  scroll-behavior: auto;
}

.home-carousel-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.home-carousel-btn {
  appearance: none;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1.5px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 999px;
  background: var(--card);
  color: var(--accent);
  box-shadow: 0 6px 18px rgba(31, 26, 22, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.home-carousel-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.home-carousel-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(122, 46, 58, 0.22);
  transform: translateY(-1px);
}

.home-carousel-btn:active {
  transform: translateY(0) scale(0.96);
  box-shadow: 0 4px 12px rgba(31, 26, 22, 0.1);
}

.home-carousel-btn:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 2px;
}

.home-tiktok-handles {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin: 0;
}

.home-tiktok-card video,
.home-tiktok-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-tiktok-card {
  position: relative;
  flex: 0 0 min(220px, 68vw);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: #111;
  border-radius: 16px;
  scroll-snap-align: start;
}

.home-tiktok-card iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.home-tiktok-open,
.home-tiktok-card-link,
.home-tiktok-empty {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
}

.home-tiktok-open {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 10px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
}

.home-tiktok-card-link,
.home-tiktok-empty {
  min-height: 220px;
  padding: 20px;
  border-radius: 16px;
  background: #111;
  text-align: center;
}

.home-tiktok-empty {
  aspect-ratio: auto;
  min-height: 140px;
  align-items: center;
}

.home-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.home-banner.image-left .home-banner-media { order: -1; }

.home-banner-copy h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--accent);
  line-height: 1;
  margin: 0 0 12px;
}

.home-banner-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #fff;
}

.home-richtext {
  max-width: 40rem;
  margin: 0 auto;
  text-align: center;
}

.home-richtext h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--accent);
}

.home-richtext p {
  white-space: pre-wrap;
}

.home-back {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  min-height: auto;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.home-back:hover { text-decoration: underline; }

.catalog-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.catalog-nav .catalog-brand {
  min-width: 0;
}

body.portal .home-back {
  font-family: var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.hp-section {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin: 0 0 12px;
  background: #fff;
}

.hp-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.hp-section-head strong {
  font-size: 0.92rem;
}

.hp-tile-row {
  display: grid;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.hp-tile-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.hp-section input[type="range"] {
  accent-color: var(--accent);
}

.hp-section label {
  display: block;
  margin-top: 8px;
}

.hp-section input:not([type="checkbox"]),
.hp-section select,
.hp-section textarea {
  width: 100%;
  margin-top: 4px;
}

@media (max-width: 980px) {
  .home-hero,
  .home-banner,
  .home-features {
    grid-template-columns: 1fr;
  }

  .home-tiktok-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-tiktok-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-collection-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 14px;
  }

  .home-hero {
    gap: 36px;
  }

  .home-hero-art {
    height: 340px;
    max-width: 520px;
    width: 100%;
    justify-self: center;
  }
}

@media (max-width: 640px) {
  .home-collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-collage-editorial,
  .home-collage-mosaico,
  .home-collage-revista {
    grid-template-columns: 1fr 1fr;
    height: min(var(--collage-h, 480px), 130vw);
    gap: 10px;
  }

  .home-collage-editorial {
    grid-template-rows: 1.35fr 1fr;
  }

  .home-collage-revista {
    grid-template-rows: 1.2fr 1fr 1fr;
  }

  .home-collage-mosaico {
    grid-template-rows: 1.35fr 1fr 1fr;
  }

  .home-collage-editorial .home-collection-tile,
  .home-collage-mosaico .home-collection-tile,
  .home-collage-revista .home-collection-tile {
    grid-column: auto;
    grid-row: auto;
  }

  .home-collage-editorial .home-collection-tile:nth-child(1),
  .home-collage-mosaico .home-collection-tile:nth-child(1),
  .home-collage-revista .home-collection-tile:nth-child(1),
  .home-collage-revista .home-collection-tile:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .home-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-hero {
    padding: 28px 22px 30px;
    border-radius: 26px;
  }

  body.portal .home-hero-copy h1 {
    font-size: clamp(2.4rem, 12.5vw, 3.2rem);
  }

  .home-hero-cta {
    width: 100%;
    justify-content: center;
  }

  .home-hero-stats {
    gap: 12px 28px;
    margin-top: 26px;
  }

  .home-hero-stats strong {
    font-size: 1.8rem;
  }

  .home-hero-art {
    height: 270px;
  }

  .home-hero-frame {
    border-width: 4px;
  }
}

/* —— Temporada: emojis cayendo suaves (portada + catálogo; debajo del cartbar) —— */
.season-fall {
  position: fixed;
  inset: 0;
  z-index: 12;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.season-fall-emoji {
  position: absolute;
  top: -2.5em;
  left: var(--x);
  font-size: var(--size, 1.2rem);
  line-height: 1;
  opacity: 0.18;
  filter: saturate(0.9);
  animation: season-fall-down var(--dur, 14s) linear var(--delay, 0s) infinite;
  will-change: transform;
}

body.portal.season-halloween .season-fall-emoji {
  opacity: 0.2;
}

body.portal.season-muertos .season-fall-emoji {
  opacity: 0.19;
}

@keyframes season-fall-down {
  0% {
    transform: translate3d(0, -8vh, 0) rotate(0deg);
  }
  100% {
    transform: translate3d(var(--drift, 0px), 108vh, 0) rotate(var(--spin, 18deg));
  }
}

@media (prefers-reduced-motion: reduce) {
  .season-fall { display: none; }

  * { transition: none !important; animation: none !important; }
}

.picking-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.pick-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line, #e4ddd4);
  border-radius: 16px;
  background: #fffdf9;
}

.pick-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.pick-card-top strong {
  font-size: 1.15rem;
  line-height: 1.25;
}

.pick-progress {
  display: grid;
  gap: 6px;
}

.pick-progress-track {
  height: 10px;
  border-radius: 999px;
  background: #efe7dc;
  overflow: hidden;
}

.pick-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2f6b45;
}

.pick-progress-label,
.review-send-hint {
  margin: 8px 0 0;
  font-weight: 650;
}

.btn.pick-action {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  font-size: 1.05rem;
}

.review-line.is-mine {
  border-color: #9cbfa8;
  background: #f7fbf8;
}

.review-line.is-done {
  border-color: #b7d4c2;
}

.review-line.is-locked,
.review-line.is-free,
.review-line.is-readonly {
  background: #faf7f3;
}

.line-owner {
  margin: 4px 0 0;
  font-weight: 700;
}

.line-owner.is-mine { color: #24573a; }
.line-owner.is-locked { color: #6d5420; }

.review-readonly-qty {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

#review-dialog .review-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#review-dialog .review-action-row .btn[type="submit"] {
  flex: 1 1 220px;
  min-height: 52px;
  font-size: 1.05rem;
}

#review-dialog .review-action-row .btn[hidden] {
  display: none !important;
}

.public-link-row {
  align-items: stretch;
}

.public-link-row .url {
  margin-top: 8px;
}

.public-link-row .action-row {
  align-self: center;
}

body.public-catalog .portal-head .ask-general {
  margin-top: 4px;
}

body.public-catalog .price-tag {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0;
}

body.public-catalog .price-tag strong {
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

body.public-catalog .price-tag span {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

body.public-catalog .product .name {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
  min-height: 2.5em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.public-catalog .ask {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  font-size: 0.78rem;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  text-decoration: none;
}

body.public-catalog .ask-general[hidden] {
  display: none !important;
}

body.public-catalog .public-bar {
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: auto;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  border-radius: 14px;
  margin: 0;
  box-shadow: 0 10px 30px rgba(31, 26, 22, 0.28);
}

body.public-catalog .public-bar p {
  color: #efe7db;
  margin: 0;
  line-height: 1.2;
}

body.public-catalog .public-bar .meta {
  color: #cfc4b5;
  font-size: 0.82rem;
}

body.public-catalog .public-bar .btn {
  min-height: 40px;
  white-space: normal;
  text-align: center;
}

@media (max-width: 720px) {
  body.public-catalog .portal-head .topbar {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
  }

  body.public-catalog .brand-logo img {
    width: 108px;
    height: auto;
  }

  body.public-catalog .catalog-title {
    font-size: 1.45rem;
  }

  body.public-catalog .portal-head .ask-general {
    width: 100%;
  }

  body.public-catalog .public-bar {
    flex-direction: row;
    align-items: center;
  }

  body.public-catalog .public-bar .btn {
    flex: 0 1 auto;
  }

  body.public-catalog .catalog-nav {
    gap: 8px;
  }
}

.sales-periods {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.sales-periods .btn {
  flex: 1 1 120px;
}

.sales-periods .btn.secondary[aria-pressed="true"],
.sales-periods .btn.secondary[aria-pressed="true"]:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.sales-custom { margin-bottom: 12px; }

.sales-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 8px;
}

.sales-totals article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
}

.sales-totals span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sales-totals strong {
  display: block;
  margin-top: 4px;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--ink);
}

.sales-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.sales-block {
  background: rgba(255, 252, 247, 0.7);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  min-width: 0;
}

.sales-span { margin-top: 14px; }

.sales-block h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.sales-products,
.sales-clients {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sales-product,
.sales-client {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.sales-product div,
.sales-client div { min-width: 0; }

.sales-product strong,
.sales-client strong {
  display: block;
  overflow-wrap: anywhere;
}

.sales-thumb {
  width: 48px;
  height: 60px;
  object-fit: cover;
  border-radius: 10px;
  background: #f6f0e6;
  flex: none;
}

.sales-thumb-empty {
  display: grid;
  place-items: center;
  font-family: var(--serif);
  color: var(--accent-dark);
}

.sales-product .meta,
.sales-client span,
.sales-product .badge {
  display: block;
  margin-top: 2px;
}

.sales-product .meta,
.sales-client span {
  color: var(--muted);
  font-size: 0.86rem;
}

.sales-chart { margin-top: 4px; }

.sales-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 120px;
}

.sales-bar {
  flex: 1 1 0;
  min-width: 2px;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
}

.sales-bar.is-zero {
  height: 4px !important;
  background: var(--line);
}

.sales-axis {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 6px;
}

.adoption-block { margin-top: 22px; }
.adoption-sub { margin: 18px 0 8px; font-size: 1.05rem; }
.adoption-totals { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 720px) {
  .sales-totals,
  .sales-grid,
  .adoption-totals { grid-template-columns: 1fr 1fr; }

  .sales-periods .btn { flex: 1 1 calc(50% - 8px); }

  .sales-totals strong { font-size: 1.35rem; }
}
