* { box-sizing: border-box; margin: 0; }

/* Author `display` rules must not uncover elements marked hidden. */
[hidden] { display: none !important; }

:root {
  --red: #d01012;
  --yellow: #f7d117;
  --bg: #f5f4f0;
  --card: #ffffff;
  --text: #1c1c1c;
  --muted: #6b6b6b;
  --green: #1a7f37;
  --radius: 12px;
  --tap: 48px;
}

body {
  font-family: -apple-system, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: env(safe-area-inset-bottom);
  touch-action: manipulation;
}

button, .chip, .mode-btn, .export, a { -webkit-tap-highlight-color: transparent; }

header {
  background: var(--red);
  color: #fff;
  padding: calc(10px + env(safe-area-inset-top)) 16px 0;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 8px;
}
.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
header h1 { font-size: 1.25rem; letter-spacing: -0.04em; }
.wordmark { font-weight: 800; letter-spacing: -0.04em; }
.wordmark span { color: #ff5a5c; }
header .wordmark span, .phone-top .wordmark span { color: var(--yellow); }
#btn-top-scan {
  min-height: 44px;
  padding: 8px 14px;
  border: none;
  background: var(--yellow);
  color: var(--text);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}
.account-row, .user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.about-link {
  min-height: 44px;
  padding: 8px 10px;
  border: none;
  background: transparent;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
#user-label {
  font-size: 0.82rem;
  max-width: 38vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.95;
}
#btn-logout, #btn-signin {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: transparent;
  color: #fff;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
}
nav { display: flex; gap: 4px; }
.guest-note {
  font-size: 0.8rem;
  line-height: 1.35;
  opacity: 0.95;
  padding: 0 2px 8px;
}
.guest-save-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  max-height: 46vh;
  overflow: auto;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: #fff;
  color: var(--text);
  border-top: 1px solid #e6d36a;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.12);
}
.guest-save-copy {
  margin: 0 0 8px;
  font-weight: 800;
  line-height: 1.3;
}
.guest-save-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.guest-save-actions .social-btn {
  flex: 1 1 9.5rem;
  width: auto;
  min-height: 44px;
  padding: 8px 10px;
  font-size: 0.92rem;
}
#guest-password-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
#guest-password-form label {
  flex: 1 1 140px;
  margin-bottom: 0;
}
#guest-password-form button.primary {
  flex: 1 1 100%;
}
body.guest-result #view-scan {
  padding-bottom: calc(168px + env(safe-area-inset-bottom));
}
body.guest-result.guest-password #view-scan {
  padding-bottom: calc(46vh + 24px);
}
.tab {
  flex: 1;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  min-height: var(--tap);
  padding: 10px 4px;
  font-size: 0.78rem;
  line-height: 1.15;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
}
.tab.active { background: var(--bg); color: var(--text); font-weight: 600; }

main { padding: 16px; max-width: 640px; margin: 0 auto; }
.hint { color: var(--muted); margin-bottom: 12px; line-height: 1.4; }
.status { margin-top: 8px; color: var(--muted); min-height: 1.2em; line-height: 1.35; }
.status.ok { color: var(--green); }
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
}
.form-error {
  color: var(--red);
  font-size: 0.92rem;
  margin: 8px 0;
}
.form-error:empty { display: none; }

.mode, .chips { display: flex; gap: 8px; margin-bottom: 12px; }
.mode-btn, .chip {
  flex: 1;
  min-height: var(--tap);
  border: 1px solid #c9c6bd;
  background: var(--card);
  border-radius: 10px;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  padding: 10px 8px;
}
.mode-btn.active, .chip.active {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.mode-btn.locked,
#btn-sweep.locked { opacity: 0.45; }

.photo-slots { display: flex; gap: 12px; margin-bottom: 16px; }
.photo-slot {
  flex: 1;
  aspect-ratio: 3 / 4;
  min-height: 140px;
  background: var(--card);
  border: 2px dashed #c9c6bd;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  color: var(--muted);
  cursor: pointer;
  overflow: hidden;
  text-align: center;
  padding: 8px;
}
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot.filled { border-style: solid; border-color: var(--green); }

button.primary, .export {
  display: block;
  width: 100%;
  min-height: var(--tap);
  padding: 14px;
  font-size: 1.05rem;
  font-weight: 600;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}
button.primary:disabled { opacity: 0.4; }
button.secondary {
  width: 100%;
  margin-top: 8px;
  min-height: var(--tap);
  padding: 12px;
  font-size: 1rem;
  background: var(--card);
  border: 1px solid #c9c6bd;
  border-radius: var(--radius);
  cursor: pointer;
}

h2 { font-size: 1.05rem; margin: 16px 0 8px; }
.modal-card h2 { margin-top: 0; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: end center;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}
#copies-sheet { z-index: 32; }
#item-sheet { z-index: 36; }
#about-sheet { z-index: 40; }
#auth-modal { z-index: 45; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 12, 0.55);
}
.modal-card {
  position: relative;
  width: min(480px, 100%);
  max-height: min(92vh, 720px);
  overflow: auto;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}
@media (min-width: 700px) {
  .modal { place-items: center; }
}

.assessment {
  background: #fff8dc;
  border: 1px solid var(--yellow);
  border-radius: var(--radius);
  padding: 12px;
  font-size: 0.92rem;
  margin-bottom: 12px;
}
.assessment .flag { color: #9a6700; font-weight: 600; }

.candidates { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.candidates li {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--card);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 10px;
  min-height: 72px;
  cursor: pointer;
}
.candidates li.selected { border-color: var(--red); }
.candidates li.ai-pick { box-shadow: 0 0 0 2px var(--yellow); }
.candidates img { width: 56px; height: 56px; object-fit: contain; background: #fff; border-radius: 8px; }
.candidates .meta { flex: 1; min-width: 0; }
.candidates .meta .name { font-weight: 600; font-size: 0.95rem; }
.candidates .meta .sub { color: var(--muted); font-size: 0.85rem; }
.badge {
  font-size: 0.72rem;
  background: var(--yellow);
  border-radius: 6px;
  padding: 2px 6px;
  font-weight: 700;
}

form label { display: block; margin-bottom: 10px; font-size: 0.9rem; color: var(--muted); }
form input, form select, form textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px;
  margin-top: 4px;
  font-size: 1rem;
  border: 1px solid #c9c6bd;
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
}
.inline { display: flex; gap: 8px; align-items: center; }
.inline input { flex: 1; }
.inline-btn {
  min-height: 44px;
  min-width: 96px;
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #c9c6bd;
  background: var(--card);
  font-weight: 600;
  cursor: pointer;
}
.split { display: flex; gap: 12px; }
.split label { flex: 1; }
.price-box { margin: 12px 0; font-size: 0.92rem; color: var(--muted); }
.price-box strong { color: var(--green); }

.filters { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.filters select {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #c9c6bd;
  background: var(--card);
  font-size: 1rem;
  flex: 1 1 140px;
  min-width: 0;
}
.inventory-query { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.inventory-query input[type="search"] {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #c9c6bd;
  background: var(--card);
  font-size: 1rem;
}
.inventory-filters { margin-bottom: 0; }
.location-field { position: relative; }
.location-suggest {
  list-style: none;
  position: relative;
  z-index: 4;
  margin: 4px 0 0;
  padding: 4px;
  background: var(--card);
  border: 1px solid #c9c6bd;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.location-suggest button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: none;
  background: transparent;
  text-align: left;
  font: inherit;
  cursor: pointer;
  border-radius: 6px;
}
.location-suggest button:hover,
.location-suggest button:focus { background: #f3f1ea; }
.quality-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.quality-bang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  background: #fff4cc;
  color: #6a5200;
  font-weight: 800;
  font-size: 0.75rem;
  border: 1px solid #e2b100;
}
.quality-wrap { position: relative; flex: 0 0 auto; }
.quality-flag {
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #e2b100;
  background: #fff8d6;
  color: #6a5200;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
}
.quality-tip {
  display: none;
  position: absolute;
  z-index: 6;
  right: 0;
  top: calc(100% + 6px);
  width: min(240px, 70vw);
  padding: 10px;
  background: var(--card);
  border: 1px solid #c9c6bd;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  font-size: 0.85rem;
  line-height: 1.35;
}
.quality-tip p { margin-bottom: 8px; }
.quality-wrap:hover .quality-tip,
.quality-wrap:focus-within .quality-tip,
.quality-wrap.open .quality-tip { display: block; }
.quality-tip .secondary { min-height: 44px; width: 100%; }
.ai-notes {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #f7f6f2;
  border-radius: 8px;
  white-space: pre-wrap;
}
.row-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; }
.totals { font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; }
.export { margin-bottom: 12px; }
.export:disabled { opacity: 0.45; cursor: not-allowed; }
.trial-banner {
  margin: 0;
  padding: 10px 16px 12px;
  background: #2a0d0d;
  color: #ffe08a;
  font-size: 0.92rem;
  line-height: 1.45;
}

.removed-items { margin: 0 0 16px; }
.removed-items h2 { font-size: 1rem; margin: 0 0 4px; }
.removed-items ul { list-style: none; display: flex; flex-direction: column; gap: 8px; padding: 0; margin: 8px 0 0; }
.removed-items li { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.inventory { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.inventory li.empty { display: block; }
.inventory li.item-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px;
}
.item-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.item-top .item-open { flex: 1; min-width: 0; width: auto; }
.row-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 auto;
}
.row-actions button {
  min-height: 44px;
  min-width: 76px;
  padding: 8px 12px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
  border-radius: 8px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-appearance: none;
  appearance: none;
  white-space: nowrap;
}
.row-actions .delete-btn {
  border: 1px solid #f0c2c2;
  background: #fff;
  color: var(--red);
}
.row-actions .edit-btn {
  border: none;
  background: var(--yellow);
  color: var(--text);
}
.item-open {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 72px;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.row-open {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 0;
  font: inherit;
  cursor: pointer;
  min-height: 44px;
}
.inventory li.empty .primary { margin-top: 12px; }
.inventory img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: #eee; flex-shrink: 0; }
.thumb-frame {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f1ea;
}
.thumb-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  background: transparent;
  image-orientation: from-image;
}
.thumb-frame img.own-photo {
  object-fit: cover;
  object-position: center center;
}
.thumb-frame .photo-placeholder { width: 100%; height: 100%; border-radius: 0; }
.thumb-frame .qty-badge {
  right: 3px;
  bottom: 3px;
  min-width: 0;
  padding: 1px 5px;
  font-size: 0.62rem;
}
.photo-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: #eee;
  border: 1px dashed #c9c6bd;
  color: var(--muted);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.15;
  padding: 4px;
}
.inventory .meta { flex: 1; min-width: 0; }
.inventory .name { font-weight: 600; }
.inventory .sub { color: var(--muted); font-size: 0.85rem; }
.inventory .value { font-size: 0.9rem; margin-top: 2px; }
.item-where { margin-top: 4px; font-size: 1rem; font-weight: 700; line-height: 1.3; }
.item-where.missing { color: var(--muted); font-weight: 600; }
.segment {
  display: flex;
  width: 100%;
  gap: 4px;
  padding: 4px;
  background: #eceae4;
  border-radius: 12px;
}
.segment-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 48px;
  padding: 8px 6px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.15;
  white-space: normal;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-appearance: none;
  appearance: none;
}
.segment-btn[aria-pressed="true"] {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
  font-weight: 700;
}
.field-label { font-size: 0.9rem; color: var(--muted); margin: 4px 0 6px; }
#item-form .segment { margin-bottom: 12px; }
#item-sheet.modal {
  padding: 8px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
}
#item-sheet .item-sheet-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  max-height: calc(100dvh - 16px - env(safe-area-inset-bottom));
}
.sheet-body {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px 16px;
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  padding: 12px 16px;
  border-bottom: 1px solid #eceae4;
  background: var(--card);
}
.sheet-head h2 { margin: 0; min-width: 0; }
.sheet-close {
  min-height: 44px;
  padding: 8px 14px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid #c9c6bd;
  background: var(--card);
  cursor: pointer;
  flex-shrink: 0;
}
.sheet-photos { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 12px; }
.sheet-photos:empty { display: none; }
.sheet-photos img, .sheet-photos .photo-placeholder { width: 96px; height: 96px; flex-shrink: 0; }
.sheet-note { font-size: 0.95rem; color: var(--muted); margin-bottom: 8px; line-height: 1.35; }
.sheet-note:empty { display: none; }
.sheet-delete { color: var(--red); font-weight: 700; }
.pill, .type-pill {
  font-size: 0.72rem;
  border-radius: 6px;
  padding: 2px 6px;
  background: #e8e6df;
  font-weight: 600;
}
.pill.listed { background: var(--yellow); }
.pill.sold { background: #c8e6c9; }
.type-pill.set { background: #dbeafe; }
.type-pill.part { background: #e7f5d8; }
.pill.retail { margin-left: 4px; }
.pill.retail.available { background: #c8e6c9; color: #145c28; }
.pill.retail.retired { background: #f6d0d0; color: #8a1f1f; }
.pill.retail.upcoming { background: var(--yellow); color: #1c1c1c; }
.pill.retail.unknown, .pill.retail.na { background: #e8e6df; color: var(--muted); }
.retail-note { color: var(--muted); }
.empty {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px 16px;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
}

.viewfinder {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 62vh;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
}
#vf-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.vf-frame {
  position: absolute;
  inset: 8%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 18px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}
#btn-shutter {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 16px;
  width: 68px;
  height: 68px;
  min-width: 64px;
  min-height: 64px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: rgba(255, 255, 255, 0.25);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  cursor: pointer;
}
#btn-shutter:active { background: #fff; }
.sweep-flash {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 18%;
  z-index: 3;
  padding: 14px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--red);
  font-weight: 800;
  font-size: 1.25rem;
  text-align: center;
  pointer-events: none;
}
.sweep-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.sweep-bar[hidden] { display: none; }
.sweep-count {
  min-width: 2.2rem;
  font-weight: 800;
  font-size: 1.15rem;
  text-align: center;
}
.bulk-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bulk-line {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  background: var(--card);
  border-radius: 12px;
  padding: 8px;
}
.bulk-art {
  width: 72px;
  height: 72px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bulk-art img { width: 100%; height: 100%; object-fit: contain; }
.bulk-body .name { font-weight: 700; }
.bulk-body .sub { color: var(--muted); font-size: 0.82rem; margin: 2px 0 6px; }
.bulk-controls { display: flex; gap: 8px; align-items: center; }
.bulk-controls input {
  width: 4.5rem;
  min-height: 44px;
}
.bulk-body select { width: 100%; margin-top: 6px; min-height: 44px; }

.live-strip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 96px;
  display: flex;
  gap: 8px;
  padding: 0 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.live-strip::-webkit-scrollbar { display: none; }
.live-chip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 260px;
  min-height: 52px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 6px 12px 6px 6px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.live-chip img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
  flex-shrink: 0;
}
.live-chip .meta { min-width: 0; display: block; }
.live-chip .name {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-chip .sub {
  display: block;
  font-size: 0.72rem;
  color: #d8d5cc;
}
.vf-hint { margin-top: 10px; text-align: center; }
#live-step .secondary { margin-top: 4px; }

.add-back {
  display: block;
  width: 100%;
  margin: 10px 0;
  min-height: var(--tap);
  padding: 12px;
  text-align: center;
  background: var(--card);
  border: 1px dashed #c9c6bd;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.95rem;
  cursor: pointer;
}

.price-box { display: flex; flex-direction: column; gap: 8px; }
.price-row:empty { display: none; }
.price-ai {
  background: var(--card);
  border: 1px solid #e3e0d7;
  border-radius: 8px;
  padding: 8px 10px;
}
.est-tag {
  font-size: 0.7rem;
  font-weight: 700;
  background: #e8e6df;
  color: var(--muted);
  border-radius: 6px;
  padding: 2px 6px;
  margin-left: 4px;
  vertical-align: 1px;
  white-space: nowrap;
}
.est-notes { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
.est-sources { margin-top: 4px; font-size: 0.78rem; }
.est-sources a { color: var(--muted); }
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #c9c6bd;
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: -2px;
  margin-right: 4px;
}
@keyframes spin { to { transform: rotate(360deg); } }

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

@media (min-width: 420px) {
  .tab { font-size: 0.92rem; }
}
@media (max-width: 380px) {
  .mode-btn, .chip { font-size: 0.86rem; padding: 8px 4px; }
  .tab { font-size: 0.7rem; padding: 10px 2px; }
  #user-label { display: none; }
}

.auth-social {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}
.auth-social[hidden] { display: none; }
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: var(--tap);
  padding: 12px 14px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid #c9c6bd;
  background: var(--card);
  color: var(--text);
}
.social-btn:disabled { opacity: 0.5; cursor: wait; }
.social-btn .social-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.social-apple {
  background: #000;
  color: #fff;
  border-color: #000;
}
.social-google {
  background: #fff;
  color: #3c4043;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 0.85rem;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #d8d4ca;
}
.auth-divider span { flex-shrink: 0; }

/* --- Landing -------------------------------------------------------------- */

body.marketing { background: var(--bg); color: var(--text); }

.boot-splash {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.05em;
  font-size: 2rem;
}
.boot-splash span { color: var(--yellow); }

.landing {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
}
.land-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: calc(10px + env(safe-area-inset-top)) 32px 10px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--red);
  color: #fff;
  flex-wrap: wrap;
}
.land-nav { display: flex; gap: 2px; flex: 1; }
.land-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 8px;
}
.land-nav a:hover { background: rgba(255, 255, 255, 0.12); }
.land-cta {
  min-height: 44px;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  background: var(--yellow);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.land-top .wordmark { font-size: 1.35rem; color: #fff; }
.land-top .wordmark span { color: var(--yellow); }
.land-actions, .landing-user {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px 10px;
  flex-wrap: wrap;
}
.land-text {
  min-height: 44px;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
#landing-user-label {
  font-weight: 800;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
}
#btn-landing-signin {
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: transparent;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.land-wrap {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 40px 32px 8px;
}
.hero-copy { min-width: 0; }
.kicker {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(2.3rem, 4.2vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  margin: 0 0 12px;
  max-width: 16em;
  color: var(--text);
}
.lede, .section-lead {
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 20px;
  max-width: 38rem;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.cta {
  flex: 0 1 auto;
  min-height: 48px;
  min-width: 168px;
  padding: 12px 18px;
  border: none;
  border-radius: var(--radius);
  background: var(--yellow);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.store-note {
  margin: 0 0 18px;
  max-width: 40rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}
.cta-ghost {
  background: var(--card);
  color: var(--text);
  border: 1px solid #c9c6bd;
}
.land-status { min-height: 0; margin-top: 8px; color: var(--red); font-size: 0.9rem; }
.land-status:empty { display: none; }
.phone-handoff {
  display: flex;
  gap: 14px;
  align-items: center;
  max-width: 28rem;
  margin-top: 4px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  scroll-margin-top: 84px;
}
.phone-handoff p { margin: 0 0 6px; line-height: 1.4; font-size: 0.95rem; color: var(--muted); }
.phone-url { font-weight: 800; word-break: break-all; margin: 0; color: var(--text); font-size: 1.05rem; }
.phone-qr canvas { display: block; width: 112px; height: 112px; }

.hero-stage {
  position: relative;
  margin-top: 28px;
  min-width: 0;
}
.device-laptop {
  margin-left: 72px;
  background: #1c1c1c;
  border-radius: 16px;
  padding: 10px 10px 12px;
  box-shadow: 0 22px 48px rgba(28, 28, 28, 0.16);
}
.device-dots {
  display: flex;
  gap: 6px;
  padding: 2px 6px 8px;
}
.device-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3d3d3d;
  display: block;
}
.device-dots i:nth-child(1) { background: #ff5f57; }
.device-dots i:nth-child(2) { background: #febc2e; }
.device-dots i:nth-child(3) { background: #28c840; }
.device-screen {
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg);
  line-height: 0;
}
.device-screen img { display: block; width: 100%; height: auto; }
.device-phone {
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: 16px;
  width: 168px;
  background: #1c1c1c;
  border-radius: 26px;
  padding: 8px;
  box-shadow: 0 16px 36px rgba(28, 28, 28, 0.28);
}
.device-phone::before {
  content: "";
  display: block;
  width: 46px;
  height: 4px;
  margin: 1px auto 6px;
  border-radius: 4px;
  background: #3a3a3a;
}
.device-phone .device-screen { border-radius: 18px; }

.land-section { margin-top: 64px; }
.land-section h2, .how h2, .showcase h2, .match-proof h2 {
  font-size: clamp(1.6rem, 3vw, 2.05rem);
  letter-spacing: -0.04em;
  margin: 0 0 8px;
  color: var(--text);
}
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
  margin: 0;
}
.steps li {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 14px 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  min-width: 0;
}
.steps h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}
.steps li > p:not(.step-num) { margin: 0; color: var(--muted); line-height: 1.45; font-size: 0.95rem; }
.step-num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0 0 8px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--text);
  font-weight: 800;
  font-size: 0.85rem;
}
.step-visual {
  margin: 0 0 12px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
  max-height: 220px;
  line-height: 0;
  box-shadow: inset 0 0 0 1px rgba(28, 28, 28, 0.06);
}
.step-visual img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: top center;
}
.step-visual.bezel {
  width: 168px;
  max-height: none;
  margin: 0 auto 12px;
  padding: 8px;
  background: #1c1c1c;
  border-radius: 24px;
  box-shadow: none;
}
.step-visual.bezel img {
  height: 230px;
  border-radius: 16px;
}

.showcase h2 { margin-bottom: 8px; }
#showcase-lead { color: var(--muted); line-height: 1.5; margin: 0 0 16px; max-width: 44rem; }
.demo-wall {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.demo-card {
  background: var(--card);
  color: var(--text);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.landing .art-frame img { opacity: 1; }
.landing .landing-wall { margin-top: 0; }
.landing .wall-card { background: var(--card); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }

.match-proof {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(280px, 1fr);
  gap: 28px;
  align-items: center;
}
.match-panel {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.match-panel h3 { margin: 0 0 10px; font-size: 1.05rem; }
.landing .match-panel .candidates li { background: var(--bg); }

.land-foot {
  width: min(1120px, 100%);
  margin: 56px auto 0;
  padding: 20px 32px calc(36px + env(safe-area-inset-bottom));
  border-top: 1px solid #e4e1d8;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}
.land-foot p + p { margin-top: 8px; }
.land-foot a { color: inherit; font-weight: 600; }
#scan-status:empty { display: none; }

/* Search is the resting Scan state. Photo controls open for an explicit action. */
#view-scan { max-width: 1080px; margin: 0 auto; }
.scan-search-entry { padding: clamp(24px, 5vw, 64px) 0 32px; }
.scan-eyebrow { font-size: .75rem; font-weight: 800; letter-spacing: .12em; color: var(--muted); margin-bottom: 12px; }
.scan-search-entry h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.045em; line-height: 1.1; }
.scan-search-lead { color: var(--muted); margin: 16px 0 28px; line-height: 1.6; }
.scan-search-form { padding: 24px; background: var(--card); border: 1px solid #ded8ce; border-radius: 16px; }
.scan-search-form > label { display: block; font-weight: 700; margin-bottom: 10px; }
.scan-search-fields { display: flex; gap: 12px; align-items: stretch; }
.scan-search-fields input { flex: 1; min-width: 0; margin: 0; }
.scan-search-input-wrap { position: relative; flex: 1; min-width: 0; display: flex; }
.scan-search-input-wrap input { width: 100%; padding-right: 58px; }
.scan-search-fields .scan-search-camera { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 8px; border: 0; border-radius: 9px; background: transparent; color: var(--text, #161412); }
.scan-search-fields .scan-search-camera:hover { background: #fff1b5; }
.scan-search-camera:focus-visible { outline: 3px solid #195fce; outline-offset: 1px; }
.scan-search-camera svg { pointer-events: none; }
.scan-search-filter { flex: 0 0 145px; margin: 0; }
.scan-search-filter select { height: 100%; margin: 0; }
.scan-search-fields button { margin: 0; width: auto; min-width: 105px; }
.scan-search-status { color: var(--muted); line-height: 1.5; margin: 16px 0; min-height: 1.5em; }
.scan-search-results { list-style: none; padding: 0; display: grid; gap: 12px; }
.scan-search-results li { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 18px; border: 1px solid #ded8ce; border-radius: 12px; background: var(--card); }
.scan-search-results img, .scan-catalog-placeholder { width: 84px; height: 84px; object-fit: contain; background: white; border-radius: 8px; }
.scan-catalog-placeholder { display: grid; place-items: center; font-size: .75rem; color: var(--muted); text-align: center; }
.scan-search-results h2 { font-size: 1rem; line-height: 1.4; margin: 0 0 5px; }
.scan-search-results p { font-size: .85rem; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }
.scan-search-results button { width: auto; margin: 0; }
.scan-photo-entry { margin-top: 32px; padding-top: 28px; border-top: 1px solid #ded8ce; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.scan-photo-entry h2 { font-size: 1.05rem; margin: 0 0 6px; }
.scan-photo-entry p { color: var(--muted); font-size: .95rem; line-height: 1.5; }
.scan-photo-entry-actions { display: flex; gap: 10px; flex-shrink: 0; }
.scan-photo-entry-actions button { width: auto; margin: 0; }
.scan-photo-panel-head { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; margin: 16px 0 24px; }
.scan-photo-panel-head button { width: auto; margin: 0; }
.scan-photo-panel-head h2 { font-size: 1.2rem; }
#scan-photo-panel:has(#bulk-step:not([hidden]) #photo-review-root:not([hidden])) .scan-photo-panel-head { display: none; }
.scan-catalog-review { background: #fff9e3; padding: 18px; border-radius: 12px; margin: 18px 0; }
.scan-catalog-review p { line-height: 1.5; margin-bottom: 14px; }
.scan-catalog-review input[type="number"] { max-width: 150px; }
#scan-photo-panel:has(#live-step:not([hidden])) { display: flex; flex-direction: column; min-height: 0; flex: 1; }
@media (max-width: 600px) {
  .scan-search-entry { padding: 26px 6px; }
  .scan-search-form { padding: 16px; }
  .scan-search-fields { flex-wrap: wrap; gap: 10px; }
  .scan-search-fields input { flex-basis: 100%; }
  .scan-search-input-wrap { flex-basis: 100%; }
  .scan-search-filter { flex: 1; }
  .scan-search-fields button { min-width: 90px; }
  .scan-photo-entry { align-items: stretch; flex-direction: column; }
  .scan-photo-entry-actions { flex-wrap: wrap; }
  .scan-photo-entry-actions button { flex: 1; }
  .scan-search-results li { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .scan-search-results img, .scan-catalog-placeholder { width: 64px; height: 70px; }
  .scan-search-results button { grid-column: 1 / -1; }
  .scan-photo-panel-head { gap: 12px; }
}

@media (min-width: 960px) {
  .hero {
    display: grid;
    grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
    column-gap: 36px;
    align-items: center;
  }
  .story { grid-template-columns: 1.15fr 1fr 1fr; }
  .magic-grid { grid-template-columns: 220px minmax(0, 1fr); }
  .sell-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tier-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .map-teaser { grid-template-columns: minmax(0, 1.1fr) minmax(240px, 0.7fr); }
}
@media (max-width: 959px) {
  .steps { grid-template-columns: 1fr; }
  .match-proof { grid-template-columns: 1fr; }
  .demo-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .land-top, .land-wrap, .land-foot { padding-left: 20px; padding-right: 20px; }
  .device-laptop { margin-left: 48px; }
  .device-phone { width: 132px; }
}

.hero-photo { margin: 8px 0 0; min-width: 0; }
.hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(28, 28, 28, 0.12);
}
.hero-photo figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}
@media (max-width: 900px) {
  .hero-photo img {
    width: auto;
    max-width: min(100%, 420px);
    max-height: 560px;
    margin: 0 auto;
    object-fit: cover;
  }
}
.demo-line { margin: 0 0 14px; font-weight: 800; letter-spacing: -0.02em; max-width: 36rem; }
.price-line { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.price-line a {
  color: var(--text);
  background: var(--card);
  border: 1px solid #e4e1d8;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.85rem;
  font-weight: 800;
  text-decoration: none;
}
.connects { margin: 0 0 16px; }
.connects p {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.connects ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.connects li {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 12px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e4e1d8;
}
.connects img, .brand-logo, .mini-logo { display: block; width: auto; object-fit: contain; }
.connects img { height: 22px; max-width: 120px; }
.story {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 8px;
}
.beat {
  margin: 0;
  background: var(--card);
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 8px 24px rgba(28, 28, 28, 0.06);
  min-width: 0;
}
.beat figcaption {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-weight: 800;
}
.beat figcaption span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--yellow);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
}
.pile {
  position: relative;
  height: 230px;
  border-radius: 12px;
  background: #f3f1ea;
  overflow: hidden;
}
.pile img { position: absolute; height: auto; }
.pile .p1 { width: 46%; left: 2%; top: 8%; }
.pile .p2 { width: 22%; left: 38%; top: 6%; }
.pile .p3 { width: 20%; right: 6%; top: 4%; }
.pile .p4 { width: 22%; left: 8%; bottom: 6%; }
.pile .p5 { width: 40%; left: 28%; bottom: 4%; }
.pile .p6 { width: 18%; right: 4%; bottom: 8%; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-top: 1px solid #eeeae3;
}
.mini-list li:first-child { border-top: none; }
.mini-list img:not(.mini-logo) {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: #f3f1ea;
  border-radius: 8px;
}
.mini-list b { display: block; font-size: 0.88rem; line-height: 1.2; }
.mini-logo { height: 14px; max-width: 88px; margin-top: 4px; }
.brick-rail {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
}
.brick-rail li {
  background: #fff;
  border-radius: 12px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #e4e1d8;
}
.brick-rail img { width: 86%; height: 86%; object-fit: contain; }
.magic-grid, .sell-grid, .tier-grid, .map-teaser {
  display: grid;
  gap: 14px;
}
.sell-card, .tier-card, .map-card {
  background: var(--card);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.sell-art {
  width: 100%;
  height: 140px;
  object-fit: contain;
  background: #f3f1ea;
  border-radius: 12px;
}
.brand-logo { height: 22px; max-width: 120px; margin: 10px 0 6px; }
.sell-card h3, .tier-card h3 { margin: 0 0 6px; font-size: 1.1rem; }
.sell-card p, .tier-card p { margin: 0; color: var(--muted); line-height: 1.45; }
.tier-price { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.04em; color: var(--text) !important; margin: 0 0 8px !important; }
.tier-price span { font-size: 0.95rem; font-weight: 700; color: var(--muted); }
.tier-pro { box-shadow: inset 0 0 0 2px var(--red); }
.lock-preview {
  margin-top: 16px;
  max-width: 520px;
  background: var(--card);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.lock-kicker { margin: 0 0 8px; font-weight: 800; }
.menu-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  margin-bottom: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #c9c6bd;
  background: #fff;
  text-align: left;
}
.menu-row strong { display: block; }
.menu-row span { display: block; color: var(--muted); font-size: 0.85rem; line-height: 1.3; }
.menu-row em {
  margin-left: auto;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #e7f6ec;
  color: var(--green);
  border-radius: 999px;
  padding: 4px 8px;
}
.menu-row.locked {
  background: #eceae4;
  color: #4a4a4a;
  border-style: dashed;
}
.menu-row.locked span { color: #6a6a6a; }
.menu-row.locked em { background: #e4e1d8; color: #3a3a3a; }
.lock-upgrade { margin: 4px 0 0; font-weight: 800; }
.invite-row { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 0; margin: 0; }
.invite-row li { background: var(--card); border-radius: 16px; padding: 16px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }
.invite-row p { margin: 8px 0 2px; font-weight: 800; }
.invite-row span { color: var(--muted); font-size: 0.85rem; }
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--yellow);
  font-weight: 800;
}
.map-card {
  position: relative;
  min-height: 180px;
  background:
    radial-gradient(circle at 20% 40%, rgba(208, 16, 18, 0.08), transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(247, 209, 23, 0.25), transparent 42%),
    #fff;
  overflow: hidden;
}
.map-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 6px rgba(208, 16, 18, 0.15);
}
.map-dot.d1 { left: 22%; top: 38%; }
.map-dot.d2 { left: 48%; top: 28%; }
.map-dot.d3 { left: 63%; top: 58%; }
.map-dot.d4 { left: 78%; top: 36%; background: #1c1c1c; }
.map-card p {
  position: absolute;
  left: 14px;
  bottom: 12px;
  margin: 0;
  font-weight: 800;
}
.land-section, #phone-handoff { scroll-margin-top: 84px; }
@media (max-width: 959px) {
  .brick-rail { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .invite-row { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .land-nav { order: 3; width: 100%; }
}

/* --- Collection wall + item sheet ---------------------------------------- */

main#view-collection { max-width: 960px; }
.privacy-inline {
  font-size: 0.8rem;
  color: var(--muted);
  margin: -2px 0 12px;
  line-height: 1.35;
}
.wall {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.wall.is-empty { display: block; }
.wall-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: none;
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: default;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.wall-open {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.wall-open:active { transform: scale(0.99); }
.estimate-block {
  margin: 0 0 12px;
  padding: 10px;
  border-radius: 10px;
  background: #f7f6f2;
}
.estimate-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.estimate-kicker {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.estimate-amount {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--green);
  line-height: 1.2;
}
.estimate-amount.missing { color: var(--muted); font-size: 0.92rem; }
.estimate-source-name { color: var(--muted); font-size: 0.78rem; margin-top: 2px; }
.estimate-picker select {
  width: 100%;
  min-height: 44px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #c9c6bd;
  background: #fff;
  padding: 8px;
  color: inherit;
}
.estimate-default, .estimate-note, .estimate-link, .estimate-error {
  margin: 6px 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--muted);
}
.estimate-link { color: var(--green); font-weight: 700; }
.estimate-error { color: var(--red); }
.wall-card .estimate-block, .pick-row .estimate-block, .copy-row .estimate-block {
  margin: 0;
  border-radius: 0;
  background: transparent;
  border-top: 1px solid #eee;
}
.row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
@media (min-width: 560px) {
  .item-card .estimate-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
  .item-card .estimate-picker { flex: 0 1 240px; }
}
.art-frame {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #f3f1ea;
  display: grid;
  place-items: center;
}
.art-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  object-position: center;
  padding: 8px;
  opacity: 0;
  image-orientation: from-image;
}
.art-frame img.own-photo {
  object-fit: cover;
  object-position: center center;
  padding: 0;
}
.art-frame img.ready { opacity: 1; }
.qty-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  min-width: 36px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(17, 10, 10, 0.88);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  pointer-events: none;
}
.art-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  color: #8a8178;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: #f3f1ea;
}
.art-type, .art-status, .art-frame .avail {
  position: absolute;
  z-index: 1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}
.art-type {
  top: 8px;
  left: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 3px 7px;
}
.art-status { top: 8px; right: 8px; }
.art-frame .avail {
  left: 8px;
  bottom: 8px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 7px;
}
.avail.available { background: #e5f6ea; color: #146c2e; }
.avail.retired { background: #1c1c1c; color: #fff; }
.wall-copy { padding: 8px 10px 12px; min-width: 0; }
.wall-name {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wall-sub {
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wall-prices { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.wall-prices:empty, .value:empty { display: none; }
.price-chip {
  font-size: 0.68rem;
  font-weight: 700;
  background: #f3f1ea;
  border-radius: 6px;
  padding: 3px 6px;
}
.price-chip.market { background: #e7f6ec; color: var(--green); }
.price-chip.msrp { background: #fff4cc; color: #5c4a00; }
.price-chip.muted { color: var(--muted); font-weight: 600; }
.wall-delta { margin-top: 4px; font-size: 0.72rem; font-weight: 800; }
.wall-delta.up { color: var(--green); }
.wall-delta.down { color: var(--red); }
.wall-delta.flat { color: var(--muted); }
.wall-empty {
  background: var(--card);
  border-radius: 16px;
  padding: 28px 16px;
  text-align: center;
}
.wall-empty p { color: var(--muted); line-height: 1.4; margin-bottom: 8px; }
.wall-empty .primary { margin-top: 8px; }

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.sheet-head h2 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.25;
}
.sheet-close {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #c9c6bd;
  background: var(--card);
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}
.sheet-art .art-frame {
  aspect-ratio: 4 / 3;
  max-height: 240px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
}
.item-kicker { color: var(--muted); font-size: 0.85rem; margin-bottom: 4px; }
.item-market { font-size: 0.92rem; font-weight: 600; margin-bottom: 12px; line-height: 1.35; }
.sheet-hint { font-size: 0.8rem; margin: -4px 0 10px; }
button.secondary.danger { color: var(--red); font-weight: 700; }

.plan-badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--yellow);
  color: var(--text);
  border-radius: 999px;
  padding: 3px 8px;
  flex-shrink: 0;
}
.plan-badge.pro { background: #1c1c1c; color: var(--yellow); }
.plan-badge.collector { background: #fff; color: var(--red); }
#btn-upgrade {
  min-height: 44px;
  padding: 8px 12px;
  border: none;
  background: var(--yellow);
  color: var(--text);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}
.tool {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  margin-bottom: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #c9c6bd;
  background: var(--card);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.tool.locked {
  background: #eceae4;
  color: #4a4a4a;
  border-style: dashed;
}
.tool-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tool-title { font-weight: 700; }
.tool-detail { color: var(--muted); font-size: 0.85rem; line-height: 1.3; }
.tool.locked .tool-detail { color: #6a6a6a; }
.tool-lock {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #e4e1d8;
  color: #3a3a3a;
  border-radius: 999px;
  padding: 4px 8px;
}
.tool:not(.locked) .tool-lock { background: #e7f6ec; color: var(--green); }
.pro-tag {
  display: inline-block;
  margin-left: 6px;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--yellow);
  color: var(--text);
  border-radius: 6px;
  padding: 2px 6px;
  vertical-align: 2px;
}
.upgrade-note {
  color: var(--text);
  background: #fff6cc;
  border: 1px solid #e6d36a;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.tier-list { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }
.tier {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f3f1ea;
  font-size: 0.9rem;
}
.tier.needed { outline: 2px solid var(--red); background: #fff; }
.tier.current { box-shadow: inset 3px 0 0 var(--yellow); }
.tier-limit { color: var(--muted); font-size: 0.8rem; }
#upgrade-actions .primary { margin-bottom: 8px; }
#ebay-panel { margin-top: 8px; }
#ebay-panel h2 { margin-bottom: 8px; }
#ebay-body .primary, #ebay-body .secondary { margin-top: 8px; }
.pick-row { display: flex; gap: 8px; align-items: flex-start; }
.pick-row .row-body { flex: 1; }
.pick-row .row-open { flex: 1; }
.pick-row .row-main .row-open { flex: 1; }
.pick-row .pick-box { margin-top: 22px; }
.pick-box { width: 22px; height: 22px; flex-shrink: 0; }
.pick-row .copy-row { width: auto; flex: 1; min-width: 0; }
.sold-on {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
}
.sold-on-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
}
.sold-on-btn {
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid #e4e0d6;
  border-radius: 8px;
  background: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
}
.warn-note {
  color: #8a4b08;
  background: #fff6e8;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.85rem;
  line-height: 1.35;
  margin: 0 0 12px;
}
fieldset {
  border: 1px solid #e4e0d6;
  border-radius: 12px;
  margin: 8px 0 12px;
  padding: 10px 12px 4px;
}
fieldset legend { font-weight: 700; padding: 0 4px; }
.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0 12px;
}
.metric-card {
  background: var(--card);
  border-radius: 12px;
  padding: 12px;
}
.metric-card span { color: var(--muted); font-size: 0.8rem; }
.metric-card strong { display: block; font-size: 1.2rem; margin-top: 2px; }
.metric-chart {
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  margin-bottom: 12px;
}
.metric-chart svg { width: 100%; height: auto; display: block; }
.metric-chart p, .metric-table { font-size: 0.85rem; color: var(--muted); }
.metric-table { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.metric-table li { display: flex; justify-content: space-between; gap: 8px; }
@media (max-width: 640px) {
  .pick-row { flex-wrap: wrap; }
  .sold-on { width: 100%; flex-direction: row; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
  .sold-on-btn { min-height: 44px; }
}

.export-note {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
  margin: 8px 0 18px;
}
#view-export h2 { margin-top: 0; }
#view-export .export { margin-bottom: 0; }

.copies { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.copy-row {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  background: #f7f5ef;
  overflow: hidden;
}
.copy-open {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 8px;
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.copy-open .meta { flex: 1; min-width: 0; }
.copy-open .name { font-weight: 700; }
.copy-open .sub { color: var(--muted); font-size: 0.85rem; margin-top: 2px; }

@media (min-width: 640px) {
  .wall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .wall { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.intel-panel, .saved-handoff {
  margin: 8px 0 14px;
  padding: 12px;
  border: 1px solid #c9c6bd;
  border-radius: var(--radius);
  background: var(--card);
}
.intel-panel h2, .saved-handoff p { margin: 0 0 8px; }
#view-collection > .secondary { margin-bottom: 12px; }

.choice-grid { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.choice-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  min-height: 72px;
  margin: 0 0 10px;
  padding: 14px;
  text-align: left;
  background: var(--card);
  border: 1px solid #c9c6bd;
  border-radius: var(--radius);
  cursor: pointer;
}
.choice-grid .choice-card { margin: 0; }
.choice-card strong { font-size: 1.02rem; color: var(--text); }
.choice-card span { font-size: 0.9rem; color: var(--muted); font-weight: 400; line-height: 1.35; }
.choice-card.selected { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.choice-card.locked {
  background: #eceae4;
  color: #4a4a4a;
  border-style: dashed;
}
.choice-card.locked span { color: #6a6a6a; }
.pro-tag {
  display: inline-block;
  margin-left: 6px;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--yellow);
  color: var(--text);
  border-radius: 6px;
  padding: 2px 6px;
  vertical-align: 2px;
}
.guide-back {
  min-height: 44px;
  margin: 8px 0;
  padding: 8px 0;
  border: none;
  background: transparent;
  color: var(--red);
  font-weight: 700;
  cursor: pointer;
}
.guide-steps { margin: 0 0 12px 1.1rem; }
.guide-steps li { margin: 12px 0; }
.guide-steps img, .guide-job img {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 8px;
  border: 1px solid #d8d4ca;
  border-radius: 8px;
  background: #fff;
}
.guide-job { margin: 8px 0 16px; }
.guide-advanced { margin-top: 16px; }
.upgrade-note {
  color: var(--text);
  background: #fff6cc;
  border: 1px solid #e6d36a;
  border-radius: 8px;
  padding: 10px 12px;
}
.check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.92rem;
  line-height: 1.35;
}
.check-row input { width: 22px; height: 22px; margin-top: 2px; flex-shrink: 0; }
#guide-whatnot a, .guide-steps a { color: var(--red); }

/* Phone scan: pack header, tabs, and mode into one screen with the shutter.
   Desktop landing and the collection wall are outside this query. */
@media (max-width: 768px) {
  #app-shell > header {
    padding: calc(2px + env(safe-area-inset-top)) 8px 0;
  }
  #app-shell .topbar {
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    padding-bottom: 0;
  }
  #app-shell .brand-row {
    flex: 0 0 auto;
    gap: 6px;
  }
  #app-shell header h1 { font-size: 1.05rem; }
  #app-shell #btn-top-scan {
    min-height: 44px;
    padding: 6px 10px;
    font-size: 0.88rem;
  }
  #app-shell .account-row {
    flex: 1 1 auto;
    justify-content: flex-end;
    min-width: 0;
    gap: 0;
  }
  #app-shell .user-chip {
    flex: 0 1 auto;
    min-width: 0;
    gap: 2px;
  }
  #app-shell #user-label {
    font-size: 0.78rem;
    max-width: 6.5rem;
  }
  #app-shell .about-link,
  #app-shell #btn-logout,
  #app-shell #btn-signin {
    min-height: 44px;
    padding: 6px 8px;
    font-size: 0.82rem;
  }
  #app-shell .guest-note {
    font-size: 0.75rem;
    line-height: 1.25;
    padding: 0 2px 4px;
  }
  #app-shell .tab {
    min-height: 44px;
    padding: 6px 2px;
  }
  #view-scan { padding: 8px 10px 8px; }
  #view-scan .mode {
    gap: 6px;
    margin-bottom: 6px;
  }
  #view-scan .mode-btn {
    min-height: 44px;
    padding: 6px 2px;
    font-size: 0.78rem;
  }
  #view-scan #scan-hint {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.25;
  }

  /* Live camera fills the small viewport (Safari toolbars showing) so the
     shutter stays on the first screen. Other tabs and the result sheet scroll. */
  body.in-app:has(#view-scan:not([hidden])):has(#live-step:not([hidden])) {
    height: 100svh;
    overflow: hidden;
    padding-bottom: 0;
  }
  body.in-app:has(#view-scan:not([hidden])):has(#live-step:not([hidden])) #app-shell {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  body.in-app:has(#view-scan:not([hidden])):has(#live-step:not([hidden])) #app-shell > header {
    flex: none;
  }
  body.in-app:has(#view-scan:not([hidden])):has(#live-step:not([hidden])) #view-scan {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: calc(6px + env(safe-area-inset-bottom));
  }
  body.in-app:has(#view-scan:not([hidden])):has(#live-step:not([hidden])) #scan-setup,
  body.in-app:has(#view-scan:not([hidden])):has(#live-step:not([hidden])) #btn-manual-set,
  body.in-app:has(#view-scan:not([hidden])):has(#live-step:not([hidden])) #scan-status {
    flex: none;
  }
  body.in-app:has(#view-scan:not([hidden])):has(#live-step:not([hidden])) #live-step {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  body.in-app:has(#view-scan:not([hidden])):has(#live-step:not([hidden])) .viewfinder {
    flex: 1 1 0;
    width: 100%;
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
  }
  body.in-app:has(#view-scan:not([hidden])):has(#live-step:not([hidden])) .vf-hint {
    flex: none;
    margin: 4px 0 0;
    font-size: 0.78rem;
    line-height: 1.2;
  }
  body.in-app:has(#view-scan:not([hidden])):has(#live-step:not([hidden])) #btn-use-files,
  body.in-app:has(#view-scan:not([hidden])):has(#live-step:not([hidden])) #btn-manual-set {
    min-height: 44px;
    margin-top: 4px;
    padding: 8px 10px;
    font-size: 0.9rem;
  }
} /* phone scan only; shared cards and account styles apply at every width */

/* Pro market intel. Locked panels match the dashed upgrade treatment. */
#upgrade-modal { z-index: 50; }
.deal-strip { margin: 0 0 12px; }
.deal-strip.locked { background: transparent; }
.deal-title { font-weight: 800; margin: 0 0 6px; }
.deal-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.deal-list button {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  font: inherit;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}
.deal-strip:not(.locked) {
  background: #fff4cc;
  border-radius: 12px;
  padding: 10px 12px;
}
.intel-locked-btn, .intel-panel.locked {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  margin-bottom: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px dashed #c9c6bd;
  background: #eceae4;
  color: #4a4a4a;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.intel-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.intel-copy strong { font-weight: 700; color: #3a3a3a; }
.intel-copy span, .intel-panel .hint { color: #6a6a6a; font-size: 0.85rem; line-height: 1.35; }
.intel-lock, .tool-lock {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #e4e1d8;
  color: #3a3a3a;
  border-radius: 999px;
  padding: 4px 8px;
}
.intel-panel {
  background: var(--card);
  border: 1px solid #e4e0d6;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
}
.intel-panel h3 { margin: 0 0 4px; font-size: 0.95rem; }
.intel-panel .hint { margin: 0 0 8px; }
.price-chart { width: 100%; height: 112px; margin: 4px 0 6px; color: #146c2e; }
.price-chart svg { width: 100%; height: 100%; display: block; }
.chart-scale { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 0.75rem; }
.spark { width: 88px; height: 28px; color: #146c2e; display: block; }
.wall-partout, .row-partout { margin-top: 4px; font-size: 0.72rem; font-weight: 700; color: #3d4a40; }
.price-chip.deal { background: #fff4cc; color: #5c4a00; }
.price-chip.partout { background: #e7eef8; color: #1d3d6e; }
.intel-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.intel-actions .secondary, .intel-actions .primary { margin: 0; flex: 1; }
.watch-row { display: flex; gap: 8px; align-items: end; }
.watch-row label { flex: 1; margin: 0; }
.partout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.partout-stat {
  background: #f7f5ef;
  border-radius: 10px;
  padding: 8px 10px;
}
.partout-stat b { display: block; font-size: 1rem; }
.partout-stat span { color: var(--muted); font-size: 0.75rem; }
.partout-delta { margin-top: 8px; font-weight: 800; }
.partout-delta.up { color: var(--green); }
.partout-delta.down { color: var(--red); }
.tier-list { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }
.tier {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f3f1ea;
  font-size: 0.9rem;
}
.tier.needed { outline: 2px solid var(--red); background: #fff; }
.tier.current { box-shadow: inset 3px 0 0 var(--yellow); }
.tier-limit { color: var(--muted); font-size: 0.8rem; flex-basis: 100%; }
@media (max-width: 420px) {
  .partout-grid { grid-template-columns: 1fr; }
  .watch-row { flex-direction: column; align-items: stretch; }
}

.plan-badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--yellow);
  color: var(--text);
  border-radius: 999px;
  padding: 3px 8px;
  flex-shrink: 0;
}
.plan-badge.pro { background: #1c1c1c; color: var(--yellow); }
.plan-badge.collector { background: #fff; color: var(--red); }
#btn-upgrade {
  min-height: 44px;
  padding: 8px 12px;
  border: none;
  background: var(--yellow);
  color: var(--text);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}
.tab.locked { opacity: 0.72; }

.tools-block { margin-top: 20px; }
.tool {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  margin-bottom: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #c9c6bd;
  background: var(--card);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.tool.locked {
  background: #eceae4;
  color: #4a4a4a;
  border-style: dashed;
}
.tool-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tool-title { font-weight: 700; }
.tool-detail { color: var(--muted); font-size: 0.85rem; line-height: 1.3; }
.tool.locked .tool-detail { color: #6a6a6a; }
.tool-lock {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #e4e1d8;
  color: #3a3a3a;
  border-radius: 999px;
  padding: 4px 8px;
}
.tool:not(.locked) .tool-lock { background: #e7f6ec; color: var(--green); }
.tool-panel { margin-top: 8px; }
.tier-list { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }
.tier {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f3f1ea;
  font-size: 0.9rem;
}
.tier.needed { outline: 2px solid var(--red); background: #fff; }
.tier.current { box-shadow: inset 3px 0 0 var(--yellow); }
.tier-limit { color: var(--muted); font-size: 0.8rem; }
.shared-list { list-style: none; padding: 0; margin: 8px 0 16px; display: flex; flex-direction: column; gap: 8px; }
.shared-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--card);
  border-radius: 10px;
  padding: 10px 12px;
}
.shared-list button {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #f0c2c2;
  background: #fff;
  color: var(--red);
  font-weight: 700;
  cursor: pointer;
}
#upgrade-actions .primary { margin-bottom: 8px; }
#upgrade-actions .hint { margin-top: 8px; }
.pricing-cards { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.price-card {
  background: var(--card);
  border: 1px solid #c9c6bd;
  border-radius: 12px;
  padding: 12px 14px;
}
.price-card.current { box-shadow: inset 3px 0 0 var(--yellow); }
.price-card h3 { font-size: 1rem; margin: 0 0 2px; }
.price-amount { font-weight: 800; margin-bottom: 4px; }
.price-card p { color: var(--muted); font-size: 0.88rem; margin: 0 0 8px; }
.price-card .primary, .price-card .secondary { margin-top: 0; }
#view-find { max-width: 960px; }
.find-actions { display: flex; gap: 8px; margin-bottom: 8px; }
.find-actions .primary, .find-actions .secondary { flex: 1; }
#find-map {
  height: 46vh;
  min-height: 240px;
  border-radius: var(--radius);
  background: #e4e1d8;
  overflow: hidden;
}
#find-map img { max-width: none; }
.map-credit { font-size: 0.75rem; color: var(--muted); margin: 6px 0 12px; }
.map-credit a { color: inherit; }
.find-card { margin: 12px 0; }
#find-retail:not(:empty) {
  background: #fff;
  border: 1px solid #e0ddd4;
  border-radius: var(--radius);
  padding: 12px;
  color: var(--text);
}
.find-retail-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.find-card h2 { font-size: 1.05rem; margin-bottom: 6px; }
.find-sub { font-size: 0.95rem; margin: 14px 0 6px; }
.find-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.find-place, .trade-row {
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid #e0ddd4;
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
}
.find-place.selected { border-color: var(--red); box-shadow: inset 3px 0 0 var(--red); }
.find-place strong, .trade-row strong { display: block; margin-bottom: 2px; }
.find-meta { color: var(--muted); font-size: 0.88rem; line-height: 1.35; }
.find-kind {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.find-kind.lego_store { color: var(--red); }
.find-kind.bricks_minifigs { color: #1d4e89; }
.find-pin {
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  background: var(--red);
}
.find-pin-bm { background: #1d4e89; }
.find-pin-on { box-shadow: 0 0 0 3px var(--yellow); }
.find-detail-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.find-out {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid #c9c6bd;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.find-about { margin: 8px 0 24px; color: var(--muted); font-size: 0.88rem; }
.find-about summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.find-about ul { margin: 8px 0 0 18px; }
.find-about li { margin-bottom: 6px; }
#trade-mine .trade-row { cursor: default; }
.trade-remove {
  margin-top: 8px;
  min-height: 40px;
  border: 1px solid #c9c6bd;
  background: transparent;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

/* --- Privacy policy ------------------------------------------------------- */

.privacy-page { background: var(--bg); color: var(--text); }
.privacy-wrap {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: calc(28px + env(safe-area-inset-top)) 20px calc(48px + env(safe-area-inset-bottom));
}
.privacy-mark { font-size: 1.35rem; }
.privacy-mark a { color: inherit; text-decoration: none; }
.privacy-wrap h1 { font-size: 2rem; letter-spacing: -0.03em; margin: 18px 0 8px; }
.privacy-updated { color: var(--muted); margin-bottom: 16px; }
.privacy-wrap h2 { font-size: 1.15rem; margin: 28px 0 8px; }
.privacy-wrap p, .privacy-wrap li { line-height: 1.55; }
.privacy-wrap p + p { margin-top: 10px; }
.privacy-wrap ul { margin: 8px 0 0 1.2rem; }
.privacy-wrap li + li { margin-top: 6px; }
.privacy-wrap a { color: var(--red); }
.privacy-wrap code { font-size: 0.95em; }
.privacy-home { margin-top: 28px; }

/* --- Creator invite ------------------------------------------------------- */

.invite-page { background: #f4efe8; color: #1a1412; }
.invite-wrap {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: calc(28px + env(safe-area-inset-top)) 20px 48px;
}
.invite-mark { font-size: 1.35rem; margin-bottom: 22px; }
.invite-mark span { color: var(--red); }
.invite-who { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.invite-kicker { font-weight: 800; font-size: 1.05rem; }
.invite-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  flex-shrink: 0;
}
.invite-avatar-fallback {
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.4rem;
  background: var(--yellow);
  color: #1c1c1c;
}
.invite-page h1 {
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
  margin: 0 0 14px;
  max-width: 12ch;
}
.invite-page .lede { max-width: 38rem; }
.invite-offer {
  font-size: 1.05rem;
  line-height: 1.45;
  margin: 0 0 18px;
  max-width: 38rem;
}
.invite-steps, .invite-share {
  margin-top: 28px;
  background: #fffdf9;
  border-radius: 22px;
  padding: 18px 18px 20px;
}
.invite-steps h2, .invite-share h2 { font-size: 1.2rem; margin: 0 0 10px; letter-spacing: -0.03em; }
.invite-steps ol { margin: 0 0 12px 1.1rem; display: grid; gap: 8px; }
.invite-steps li, .invite-steps p, .invite-share p { line-height: 1.45; color: #3f3833; }
.invite-share label { display: block; font-weight: 700; margin: 12px 0; }
.invite-optional { font-weight: 500; color: #6b645e; }
.invite-share input {
  display: block;
  width: 100%;
  margin-top: 6px;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #d8d4ca;
  font: inherit;
  background: #fff;
}
.invite-link { font-weight: 700; word-break: break-all; color: #1a1412; }
.invite-status { min-height: 1.2em; font-weight: 700; }
.invite-from { font-size: 0.92rem; }
.invite-page .land-foot { padding: 28px 0 0; }



/* --- MCP setup ------------------------------------------------------------ */

.mcp-page { background: var(--bg); color: var(--text); }
.mcp-wrap {
  width: min(800px, 100%);
  margin: 0 auto;
  padding: calc(28px + env(safe-area-inset-top)) 20px calc(48px + env(safe-area-inset-bottom));
}
.mcp-mark { font-size: 1.35rem; }
.mcp-mark a { color: inherit; text-decoration: none; }
.mcp-wrap h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}
.mcp-wrap h2 { font-size: 1.35rem; letter-spacing: -0.03em; margin: 32px 0 8px; }
.mcp-wrap h3 { font-size: 1.05rem; margin: 0 0 8px; }
.mcp-wrap p, .mcp-wrap li { line-height: 1.55; }
.mcp-wrap p + p { margin-top: 10px; }
.mcp-wrap a { color: var(--red); }
.mcp-honest {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid #e6d36a;
  font-weight: 700;
}
.mcp-picker {
  position: relative;
  margin: 16px 0 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.mcp-legend {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.mcp-tab-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}
.mcp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 14px;
}
.mcp-tabs label {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #c9c6bd;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
#mcp-tab-claude:checked ~ .mcp-tabs label[for="mcp-tab-claude"],
#mcp-tab-code:checked ~ .mcp-tabs label[for="mcp-tab-code"],
#mcp-tab-codex:checked ~ .mcp-tabs label[for="mcp-tab-codex"],
#mcp-tab-chatgpt:checked ~ .mcp-tabs label[for="mcp-tab-chatgpt"],
#mcp-tab-other:checked ~ .mcp-tabs label[for="mcp-tab-other"],
#mcp-tab-local:checked ~ .mcp-tabs label[for="mcp-tab-local"] {
  background: var(--yellow);
  border-color: var(--yellow);
}
#mcp-tab-claude:focus-visible ~ .mcp-tabs label[for="mcp-tab-claude"],
#mcp-tab-code:focus-visible ~ .mcp-tabs label[for="mcp-tab-code"],
#mcp-tab-codex:focus-visible ~ .mcp-tabs label[for="mcp-tab-codex"],
#mcp-tab-chatgpt:focus-visible ~ .mcp-tabs label[for="mcp-tab-chatgpt"],
#mcp-tab-other:focus-visible ~ .mcp-tabs label[for="mcp-tab-other"],
#mcp-tab-local:focus-visible ~ .mcp-tabs label[for="mcp-tab-local"] {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}
.mcp-panel { display: none; }
#mcp-tab-claude:checked ~ .mcp-panels .mcp-panel-claude,
#mcp-tab-code:checked ~ .mcp-panels .mcp-panel-code,
#mcp-tab-codex:checked ~ .mcp-panels .mcp-panel-codex,
#mcp-tab-chatgpt:checked ~ .mcp-panels .mcp-panel-chatgpt,
#mcp-tab-other:checked ~ .mcp-panels .mcp-panel-other,
#mcp-tab-local:checked ~ .mcp-panels .mcp-panel-local {
  display: block;
}
.mcp-snippet { margin: 10px 0 16px; }
.mcp-code {
  margin: 0;
  padding: 12px 14px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: var(--radius);
  background: #1c1c1c;
  color: #f5f4f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.45;
}
.mcp-code-inline {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}
.mcp-snippet-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.mcp-copy {
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #c9c6bd;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.mcp-copy.is-copied {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.mcp-copied {
  margin: 0;
  min-height: 1.2em;
  font-weight: 700;
  color: var(--green);
}
.mcp-advanced { margin: 8px 0 4px; }
.mcp-advanced summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.mcp-soon {
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid #e4e1d8;
}
.mcp-steps { margin: 8px 0 0 1.2rem; display: grid; gap: 8px; }
.mcp-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 12px; }
.mcp-table { width: 100%; border-collapse: collapse; min-width: 36rem; background: #fff; }
.mcp-table caption {
  text-align: left;
  font-weight: 800;
  margin-bottom: 8px;
}
.mcp-table th, .mcp-table td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid #e4e1d8;
  font-size: 0.95rem;
}
.mcp-table th[scope="row"], .mcp-table thead th:first-child {
  position: sticky;
  left: 0;
  background: #fff;
  min-width: 7.5rem;
}
.mcp-table thead th { font-size: 0.95rem; }
.mcp-faq { display: grid; gap: 8px; margin-top: 8px; }
.mcp-faq details {
  background: #fff;
  border-radius: var(--radius);
  padding: 4px 14px;
}
.mcp-faq summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.mcp-faq details p { margin: 0 0 12px; }
.mcp-home { margin-top: 28px; }

/* Collection accessibility: valid list containers and readable brand/fallbacks. */
header .wordmark{font-size:20px;font-weight:800}
.art-fallback{color:#625e58}

header .wordmark span{font-size:inherit}

header .wordmark span{font-size:20px!important;font-weight:800}
