:root {
  color-scheme: light;
  --espresso: #33251b;
  --griotte: #5d120b;
  --pipe: #7a210f;
  --sage: #788176;
  --olive: #4a492f;
  --rusk: #ccb999;
  --oat: #f2dece;
  --ciel: #adbcc3;
  --clay: #b08a63;
  --ink: #241b16;
  --muted: #766e64;
  --line: #e5d8c9;
  --paper: #f8f1e8;
  --panel: #fffaf4;
  --accent: var(--griotte);
  --accent-2: var(--sage);
  --gold: #9c8052;
  --soft: #eadcca;
  --shadow: 0 20px 60px rgba(51, 37, 27, 0.11);
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
  --font-mono: "SF Mono", "Courier New", ui-monospace, monospace;
}

/* Production MVP: collection-first, iOS-grade surfaces */
.simple-mode {
  --paper: #edebe5;
  --panel: #fffdf6;
  --line: rgba(51, 37, 27, 0.1);
  --soft: #ece7dc;
  background: var(--paper);
}

.simple-mode .app-shell {
  background:
    linear-gradient(90deg, rgba(51, 37, 27, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, #f8f6ef 0%, #e9e6de 100%);
  background-size: 68px 68px, 100% 100%;
}

.simple-mode main {
  padding: clamp(14px, 3vw, 42px);
}

.simple-mode main > .collection-home {
  width: min(100%, 1120px);
}

.simple-mode .collection-home.panel {
  border: none;
  border-radius: 0;
  padding: clamp(12px, 2.2vw, 22px);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.simple-mode .collection-topbar {
  align-items: center;
  margin-bottom: clamp(16px, 2.4vw, 28px);
}

.simple-mode .collection-topbar h2 {
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 72px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: 0;
}

.simple-mode .add-bag-trigger {
  min-height: 42px;
  border-radius: 999px;
  padding: 0 18px;
  background: var(--espresso);
  border-color: var(--espresso);
  box-shadow: 0 8px 24px rgba(51, 37, 27, 0.12);
}

.simple-mode .collection-overview {
  border: 1px solid rgba(51, 37, 27, 0.08);
  border-radius: 28px;
  padding: clamp(20px, 3.4vw, 36px);
  margin-bottom: 12px;
  background:
    linear-gradient(135deg, rgba(255, 253, 246, 0.94), rgba(237, 230, 211, 0.88)),
    #fffdf6;
  box-shadow: 0 20px 54px rgba(51, 37, 27, 0.06);
}

.simple-mode .collection-overview.is-empty-collection {
  cursor: pointer;
}

.simple-mode .collection-overview.is-empty-collection:focus-visible {
  outline: 3px solid rgba(93, 18, 11, 0.24);
  outline-offset: 4px;
}

.simple-mode .save-across-devices-prompt {
  margin: 0 0 clamp(22px, 3vw, 34px);
}

.simple-mode .collection-overview small {
  color: rgba(51, 37, 27, 0.58);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.simple-mode .collection-overview strong {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 92px);
  font-weight: 500;
  letter-spacing: 0;
}

.simple-mode .collection-overview em {
  color: rgba(51, 37, 27, 0.54);
  font-size: 14px;
  font-style: normal;
  font-weight: 750;
}

.simple-mode .empty-collection-cta {
  width: fit-content;
  min-height: 48px;
  margin-top: 18px;
  border-radius: 999px;
  padding: 0 22px;
  background: var(--griotte);
  color: #fffaf4;
}

.simple-mode #collectionDelta.delta-toggle {
  width: auto;
  min-width: 132px;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 0 0 1px rgba(51, 37, 27, 0.08);
  color: var(--sage);
  font-size: 24px;
  text-align: center;
  text-shadow: none;
}

.simple-mode #collectionDelta.delta-toggle.negative {
  color: #8d1f3d;
}

.simple-mode #collectionDelta.delta-toggle.unknown {
  color: rgba(51, 37, 27, 0.56);
  font-size: 16px;
}

.simple-mode .log-form {
  max-width: 620px;
  margin: 0 auto clamp(24px, 4vw, 36px);
  border: 1px solid rgba(51, 37, 27, 0.08);
  border-radius: 30px;
  padding: clamp(12px, 2vw, 18px);
  background:
    linear-gradient(180deg, rgba(255, 253, 246, 0.98), rgba(245, 241, 232, 0.96)),
    #fffdf6;
  box-shadow: 0 28px 80px rgba(51, 37, 27, 0.14);
}

.simple-mode .add-bag-topline {
  min-height: 44px;
  padding: 2px 4px 4px;
}

.simple-mode .add-bag-topline span {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0;
}

.simple-mode .add-bag-topline .icon-button {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(51, 37, 27, 0.08);
  font-size: 25px;
  line-height: 1;
}

.simple-mode .bag-capture-shell {
  position: relative;
  overflow: visible;
  display: grid;
  gap: 10px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.simple-mode .add-bag-upload,
.simple-mode .add-bag-upload .upload-preview {
  min-height: clamp(230px, 32vw, 320px);
}

.simple-mode .add-bag-upload .upload-preview {
  position: relative;
  overflow: hidden;
  border: 1px dashed rgba(51, 37, 27, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 253, 246, 0.9), rgba(246, 241, 232, 0.88)),
    #f4f1ea;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.simple-mode .add-bag-upload .upload-preview::before,
.simple-mode .add-bag-upload .upload-preview::after {
  display: none;
}

.simple-mode .add-bag-upload .upload-preview::before {
  top: 64px;
  left: calc(50% - 128px);
}

.simple-mode .add-bag-upload .upload-preview::after {
  top: 86px;
  right: calc(50% - 130px);
  transform: rotate(8deg);
}

.simple-mode .add-bag-upload .upload-preview img {
  position: relative;
  z-index: 5;
  max-width: 100%;
  width: 100%;
  height: clamp(220px, 30vw, 300px);
  border-radius: 18px;
  box-shadow: none;
  object-fit: contain;
  background: #fff;
}

.simple-mode .upload-preview.is-loading img {
  filter: saturate(0.9) contrast(0.94);
}

.simple-mode .upload-loading {
  position: absolute;
  inset: auto 18px 18px;
  z-index: 8;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(255, 253, 246, 0.68);
  border-radius: 18px;
  background: rgba(51, 37, 27, 0.72);
  color: #fffdf6;
  box-shadow: 0 18px 50px rgba(51, 37, 27, 0.22);
  backdrop-filter: blur(18px);
}

.simple-mode .upload-loading strong {
  margin: 0;
  color: inherit;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 840;
  line-height: 1.1;
}

.simple-mode .upload-loading small {
  grid-column: 2;
  color: rgba(255, 253, 246, 0.76);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
}

.simple-mode .loader-ring {
  grid-row: 1 / span 2;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 253, 246, 0.34);
  border-top-color: #fffdf6;
  border-radius: 999px;
  animation: bagworth-spin 0.8s linear infinite;
}

.simple-mode .log-form.is-identifying .send-button,
.simple-mode .log-form.is-identifying #saveBagButton {
  cursor: progress;
  opacity: 0.72;
}

@keyframes bagworth-spin {
  to {
    transform: rotate(360deg);
  }
}

.simple-mode .camera-mark {
  position: relative;
  z-index: 2;
  width: 54px;
  height: 54px;
  padding: 13px;
  border-radius: 999px;
  background: #fffdf6;
  box-shadow: 0 12px 36px rgba(51, 37, 27, 0.1);
}

.simple-mode .add-bag-upload .upload-preview strong {
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: 0;
}

.simple-mode .add-bag-upload .upload-preview small {
  position: relative;
  z-index: 2;
  color: rgba(51, 37, 27, 0.56);
  font-size: 14px;
  font-weight: 720;
}

.simple-mode .add-bag-upload .upload-preview:has(img) .camera-mark,
.simple-mode .add-bag-upload .upload-preview:has(img) > strong,
.simple-mode .add-bag-upload .upload-preview:has(img) > small {
  display: none;
}

.simple-mode .capture-command-bar {
  position: static;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid rgba(51, 37, 27, 0.08);
  border-radius: 20px;
  padding: 9px 9px 9px 16px;
  background: rgba(245, 239, 231, 0.92);
  box-shadow: none;
  backdrop-filter: none;
}

.simple-mode .capture-status {
  display: flex;
  align-items: center;
  min-height: 42px;
  margin-top: -2px;
  border: 1px solid rgba(51, 37, 27, 0.08);
  border-radius: 999px;
  padding: 0 16px;
  background: rgba(255, 250, 244, 0.78);
  color: rgba(51, 37, 27, 0.64);
  font-size: 13px;
  font-weight: 780;
}

.simple-mode .capture-status[hidden] {
  display: none;
}

.simple-mode .duplicate-warning {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(93, 18, 11, 0.16);
  border-radius: 18px;
  padding: 12px;
  background: rgba(248, 239, 207, 0.74);
  color: var(--espresso);
}

.simple-mode .duplicate-warning[hidden] {
  display: none;
}

.simple-mode .duplicate-warning span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.simple-mode .duplicate-warning strong {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
}

.simple-mode .duplicate-warning small {
  color: rgba(51, 37, 27, 0.64);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.25;
}

.simple-mode .duplicate-warning div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.simple-mode .duplicate-warning button {
  min-height: 34px;
  border: 1px solid rgba(51, 37, 27, 0.12);
  border-radius: 999px;
  padding: 0 12px;
  background: #fffdf6;
  color: var(--espresso);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.simple-mode .duplicate-warning button:last-child {
  border-color: rgba(51, 37, 27, 0.18);
  background: var(--espresso);
  color: #fffdf6;
}

.simple-mode .duplicate-warning.is-acknowledged {
  border-color: rgba(120, 129, 118, 0.22);
  background: rgba(120, 129, 118, 0.1);
}

.simple-mode .link-command {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.simple-mode .link-command span {
  color: rgba(51, 37, 27, 0.54);
  font-size: 11px;
  font-weight: 850;
}

.simple-mode .link-command input {
  min-height: 34px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 780;
}

.simple-mode .link-command input:focus {
  outline: none;
}

.simple-mode .send-button {
  min-width: 104px;
  height: 42px;
  border: 1px solid rgba(51, 37, 27, 0.12);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fffdf6;
  color: var(--espresso);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.simple-mode .add-bag-details {
  border-color: rgba(51, 37, 27, 0.08);
  border-radius: 18px;
  background: #fbf7f1;
}

.simple-mode .add-bag-details summary {
  color: rgba(51, 37, 27, 0.66);
}

.simple-mode .add-bag-details summary::after {
  content: "+";
  float: right;
  color: rgba(51, 37, 27, 0.5);
}

.simple-mode .add-bag-details[open] summary::after {
  content: "-";
}

.simple-mode .collection-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.6vw, 30px);
  align-items: start;
}

.simple-mode .collection-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: start;
  border: 1px solid rgba(51, 37, 27, 0.1);
  border-radius: 22px;
  padding: clamp(10px, 1.4vw, 14px);
  background:
    linear-gradient(180deg, rgba(255, 253, 246, 0.72), rgba(246, 237, 201, 0.72)),
    #f8efcf;
  box-shadow: 0 18px 42px rgba(51, 37, 27, 0.08);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.simple-mode .collection-row:hover {
  transform: translateY(-3px);
  border-color: rgba(51, 37, 27, 0.18);
  box-shadow: 0 24px 58px rgba(51, 37, 27, 0.12);
}

.simple-mode .collection-row .closet-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 16px;
  background-color: #d8d8d2;
  filter: saturate(1) contrast(1);
  box-shadow: inset 0 0 0 1px rgba(51, 37, 27, 0.06);
}

.simple-mode .collection-row .closet-copy {
  display: grid;
  gap: 9px;
  padding: 16px 0 4px;
}

.simple-mode .collection-row .closet-index {
  display: block;
  color: rgba(51, 37, 27, 0.68);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.simple-mode .collection-row .closet-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(25px, 2.7vw, 36px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: 0;
}

.simple-mode .collection-row .closet-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
}

.simple-mode .collection-row .closet-meta span {
  border: none;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: rgba(51, 37, 27, 0.72);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.simple-mode .collection-row .closet-meta .trust-line {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  padding: 6px 9px;
  border: 1px solid rgba(51, 37, 27, 0.1);
  border-radius: 999px;
  background: rgba(255, 253, 246, 0.62);
  color: rgba(51, 37, 27, 0.62);
  font-size: 11px;
  line-height: 1;
}

.simple-mode .collection-row .closet-meta .trust-line.medium {
  border-color: rgba(120, 129, 118, 0.24);
  color: var(--sage);
}

.simple-mode .collection-row .closet-meta .trust-line.high {
  border-color: rgba(120, 129, 118, 0.34);
  background: rgba(120, 129, 118, 0.1);
  color: var(--sage);
}

.simple-mode .collection-row .closet-value {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px;
  min-width: 0;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(51, 37, 27, 0.16);
}

.simple-mode .collection-row .closet-value strong {
  margin: 0;
  color: inherit;
  font-size: 20px;
  letter-spacing: 0;
}

.simple-mode .collection-row .closet-value small {
  color: rgba(51, 37, 27, 0.48);
  font-size: 12px;
  font-weight: 800;
}

.simple-mode .collection-row .closet-value.positive {
  color: var(--sage);
}

.simple-mode .collection-row .closet-value.negative {
  color: #8d1f3d;
}

.simple-mode .collection-row .closet-value.unknown {
  color: rgba(51, 37, 27, 0.52);
}

.simple-mode .collection-row .closet-value.unknown strong {
  color: rgba(51, 37, 27, 0.6);
}

.simple-mode .collection-row .closet-row-actions {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 5;
}

.simple-mode .card-menu summary {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 253, 246, 0.72);
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 253, 246, 0.88);
  color: var(--espresso);
  box-shadow: 0 10px 28px rgba(51, 37, 27, 0.12);
  cursor: pointer;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  list-style: none;
}

.simple-mode .card-menu summary::-webkit-details-marker {
  display: none;
}

.simple-mode .card-menu-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 142px;
  border: 1px solid rgba(51, 37, 27, 0.1);
  border-radius: 16px;
  padding: 6px;
  display: grid;
  gap: 2px;
  background: rgba(255, 253, 246, 0.96);
  box-shadow: 0 18px 44px rgba(51, 37, 27, 0.16);
  backdrop-filter: blur(18px);
}

.simple-mode .collection-row .closet-row-actions button {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 12px;
  padding: 0 10px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  text-align: left;
  box-shadow: none;
}

.simple-mode .collection-row .closet-row-actions button:hover {
  background: rgba(51, 37, 27, 0.06);
}

.simple-mode .collection-row .closet-row-actions button:last-child {
  color: #8d1f3d;
}

.simple-mode .collection-empty {
  min-height: 300px;
  display: grid;
  place-items: center;
  gap: 10px;
  text-align: center;
  border: 1px solid rgba(51, 37, 27, 0.08);
  border-radius: 26px;
  padding: 28px;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.88), rgba(242, 231, 218, 0.62)),
    #fbf7f1;
}

.simple-mode .collection-empty strong {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1;
  letter-spacing: 0;
}

.simple-mode .collection-empty span {
  max-width: 440px;
  color: rgba(51, 37, 27, 0.62);
  font-size: 15px;
}

.simple-mode .collection-empty .primary-button {
  min-width: 170px;
  border-radius: 999px;
  margin-top: 8px;
}

@media (max-width: 760px) {
  .simple-mode .app-shell {
    display: block;
  }

  .simple-mode .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    height: auto;
    padding: 13px 16px;
    border-right: 0;
    border-bottom: 1px solid rgba(51, 37, 27, 0.08);
    background: rgba(245, 239, 231, 0.92);
    backdrop-filter: blur(18px);
  }

  .simple-mode main {
    padding: 14px;
  }

  .simple-mode .collection-home.panel {
    border-radius: 0;
    border: none;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  .simple-mode .collection-topbar {
    flex-direction: row;
    align-items: center;
    padding: 2px 2px 0;
  }

  .simple-mode .collection-topbar h2 {
    font-size: 34px;
  }

  .simple-mode .collection-overview {
    grid-template-columns: 1fr;
    border-radius: 28px;
    padding: 22px;
  }

  .simple-mode #collectionDelta.delta-toggle {
    width: 100%;
    justify-self: stretch;
  }

  .simple-mode .add-method-grid {
    grid-template-columns: 1fr;
  }

  .simple-mode .add-method-grid .secondary-button {
    width: 100%;
  }

  .simple-mode .log-form {
    border-radius: 22px;
    padding: 10px;
  }

  .simple-mode .bag-capture-shell {
    border-radius: 0;
    padding: 0;
  }

  .simple-mode .add-bag-upload,
  .simple-mode .add-bag-upload .upload-preview {
    min-height: 230px;
  }

  .simple-mode .add-bag-upload .upload-preview::before,
  .simple-mode .add-bag-upload .upload-preview::after {
    width: 106px;
    height: 142px;
  }

  .simple-mode .add-bag-upload .upload-preview::before {
    left: calc(50% - 104px);
  }

  .simple-mode .add-bag-upload .upload-preview::after {
    right: calc(50% - 102px);
  }

  .simple-mode .capture-command-bar {
    grid-template-columns: minmax(0, 1fr);
    border-radius: 16px;
  }

  .simple-mode .send-button {
    width: 100%;
    height: 40px;
  }

  .simple-mode .add-bag-upload .upload-preview img {
    height: 220px;
  }

  .simple-mode .collection-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .simple-mode .collection-row {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    min-height: 0;
    aspect-ratio: auto;
    border-radius: 18px;
    padding: 8px;
    overflow: visible;
  }

  .simple-mode .collection-row .closet-thumb {
    position: static;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border-radius: 13px;
  }

  .simple-mode .collection-row .closet-copy {
    position: static;
    padding: 10px 0 2px;
    background: transparent;
  }

  .simple-mode .collection-row .closet-title {
    color: var(--ink);
    font-size: 20px;
    text-shadow: none;
  }

  .simple-mode .collection-row .closet-meta {
    display: grid;
  }

  .simple-mode .collection-row .closet-meta span,
  .simple-mode .collection-row .closet-meta span:last-child {
    display: block;
    border: none;
    border-radius: 0;
    padding: 0;
    background: transparent;
    color: rgba(51, 37, 27, 0.64);
    font-size: 11px;
  }

  .simple-mode .collection-row .closet-meta .trust-line,
  .simple-mode .collection-row .closet-meta .trust-line:last-child {
    display: inline-flex;
    padding: 5px 7px;
    border: 1px solid rgba(51, 37, 27, 0.1);
    border-radius: 999px;
    background: rgba(255, 253, 246, 0.62);
    font-size: 10px;
    line-height: 1;
  }

  .simple-mode .collection-row .closet-value {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    justify-items: stretch;
    min-width: 0;
    padding: 9px 0 0;
  }

  .simple-mode .collection-row .closet-row-actions {
    position: absolute;
    top: 14px;
    right: 14px;
    margin-top: 0;
  }

  .simple-mode .card-menu summary {
    width: 34px;
    height: 34px;
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

html {
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

h1,
h2,
h3,
.home-value,
.collection-overview strong {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0;
}

button,
.primary-button,
.secondary-button,
.nav-list a,
.brand,
label,
summary {
  font-family: var(--font-ui);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: #f3eadf;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 740;
  letter-spacing: 0;
}

.brand-home {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand-home span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--espresso);
  font-size: 17px;
  line-height: 1;
}

.account-wrap {
  margin-left: auto;
  position: relative;
}

.account-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #fffaf4;
  color: var(--espresso);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease;
}

.account-button.active,
.account-button:hover,
.account-button.signed-in {
  background: var(--espresso);
  color: #fffaf4;
  border-color: var(--espresso);
}

.account-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-initials {
  display: none;
}

.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  width: 178px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: #fffaf4;
  box-shadow: var(--shadow);
}

.account-menu button {
  width: 100%;
  min-height: 38px;
  border: none;
  border-radius: 6px;
  padding: 0 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-weight: 800;
  cursor: pointer;
}

.account-menu button:hover {
  background: #f3eadf;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-list a {
  color: var(--muted);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 680;
}

.nav-list a.active,
.nav-list a:hover {
  background: var(--panel);
  color: var(--ink);
}

.signed-out-app .nav-list {
  display: none;
}

.simple-mode .nav-list {
  display: none;
}

.signed-out-app .brand {
  margin-bottom: 0;
}

.signed-out-app main {
  min-height: 100vh;
  align-content: center;
}

.simple-mode.signed-out-app main {
  align-content: start;
}

.signed-out-app .profile-page {
  max-width: 680px;
  margin: 0 auto;
}

.signed-out-app .profile-page .panel-heading {
  justify-content: center;
  text-align: center;
}

main {
  padding: 28px;
  display: grid;
  gap: 22px;
  min-width: 0;
  max-width: 100vw;
}

main > .page-section {
  width: min(100%, 1180px);
  margin: 0 auto;
  min-width: 0;
  max-width: 100%;
}

.page-section {
  display: none;
  min-width: 0;
  max-width: 100%;
}

.page-section.active-page {
  display: block;
}

.hero.page-section.active-page {
  display: block;
}

.market-page.active-page {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.hero {
  position: relative;
  height: 360px;
  min-height: 360px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--espresso);
  box-shadow: var(--shadow);
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20, 16, 13, 0.72), rgba(20, 16, 13, 0.26) 44%, rgba(20, 16, 13, 0.04));
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding: 32px;
  color: white;
}

.hero h1 {
  max-width: 690px;
  margin: 6px 0;
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1;
  letter-spacing: 0;
}

.hero p {
  max-width: 560px;
  color: rgba(255, 250, 244, 0.84);
  font-size: 17px;
  line-height: 1.55;
  margin: 0;
}

.info-disclosure {
  min-width: 0;
}

.info-disclosure summary {
  width: max-content;
  max-width: 100%;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  background: #fffaf4;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  list-style: none;
}

.info-disclosure[open] summary {
  border-color: rgba(93, 18, 11, 0.24);
  background: #f8f1e8;
  color: var(--ink);
}

.info-disclosure summary::-webkit-details-marker {
  display: none;
}

.hero-info {
  margin-top: 14px;
}

.hero-info summary {
  border-color: rgba(255, 250, 244, 0.28);
  background: rgba(255, 250, 244, 0.14);
  color: rgba(255, 250, 244, 0.9);
}

.hero-info p {
  margin-top: 10px;
}

.hero-stat {
  width: min(250px, 38vw);
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  backdrop-filter: blur(18px);
  background: rgba(51, 37, 27, 0.24);
  display: grid;
  gap: 6px;
}

.hero-stat small,
.hero-stat span {
  color: rgba(255, 255, 255, 0.76);
}

.home-hero {
  height: 330px;
  min-height: 330px;
}

.home-anon .home-hero {
  height: min(620px, calc(100vh - 104px));
  min-height: 500px;
}

.home-hero img {
  min-height: 0;
}

.home-anon .home-hero::after {
  background:
    radial-gradient(circle at 50% 50%, rgba(20, 16, 13, 0.16), rgba(20, 16, 13, 0.7) 70%),
    linear-gradient(180deg, rgba(20, 16, 13, 0.2), rgba(20, 16, 13, 0.78));
}

.home-logged-in,
.home-logged-out {
  display: none;
}

.home-member .home-logged-in {
  display: grid;
}

.home-anon .home-logged-out {
  display: grid;
}

.home-anon .hero-overlay {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.home-anon .home-copy {
  place-items: center;
  max-width: 760px;
  gap: 26px;
}

.home-anon .home-copy h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 0.98;
  text-wrap: balance;
}

.home-value {
  display: block;
  margin: 6px 0 8px;
  font-size: clamp(46px, 6.4vw, 84px);
  line-height: 0.95;
}

.home-cta-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.home-cta-row a {
  min-height: 46px;
  min-width: 148px;
  border: 1px solid rgba(255, 250, 244, 0.24);
  border-radius: 8px;
  padding: 0 18px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: #f8f1e8;
  text-decoration: none;
  font-weight: 900;
}

.home-cta-row a:last-child {
  color: #fffaf4;
  background: rgba(93, 18, 11, 0.84);
}

.home-actions a {
  min-height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: rgba(248, 241, 232, 0.9);
  text-decoration: none;
  font-weight: 850;
}

.delta-toggle {
  width: 100%;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.12;
  text-align: left;
  cursor: pointer;
}

.delta-hint {
  margin-top: -4px;
  font-size: 12px;
}

.delta-toggle.positive {
  color: #d9f5dd;
  text-shadow: 0 0 18px rgba(82, 172, 102, 0.25);
}

.delta-toggle.negative {
  color: #ffd3d0;
  text-shadow: 0 0 18px rgba(141, 31, 61, 0.22);
}

.delta-toggle.unknown {
  color: rgba(255, 250, 244, 0.82);
  text-shadow: none;
}

.delta-toggle:focus-visible {
  outline: 2px solid rgba(255, 250, 244, 0.8);
  outline-offset: 4px;
}

.home-actions a:last-child {
  color: #fffaf4;
  background: rgba(93, 18, 11, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.eyebrow {
  text-transform: uppercase;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.toolbar {
  display: grid;
  grid-template-columns: 180px 180px minmax(220px, 1fr);
  gap: 10px;
  align-items: end;
}

.value-check {
  scroll-margin-top: 16px;
}

.market-page,
.collection-section,
.profile-page {
  scroll-margin-top: 16px;
}

.section-heading {
  margin: 0;
}

.section-heading h2 {
  font-size: 24px;
}

.value-check-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1.2fr);
  gap: 16px;
}

.upload-card {
  min-height: 310px;
  cursor: pointer;
}

.upload-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-preview {
  min-height: 310px;
  border: 1px dashed #d2c3b4;
  border-radius: 8px;
  background: #f7e6d8;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 18px;
  text-align: center;
  overflow: hidden;
}

.upload-preview img {
  width: 100%;
  height: 270px;
  object-fit: cover;
  border-radius: 8px;
}

.upload-preview strong {
  color: var(--ink);
  font-size: 18px;
}

.upload-preview small {
  color: var(--muted);
  line-height: 1.4;
}

.value-form {
  display: grid;
  gap: 14px;
  align-content: start;
}

.value-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.primary-button {
  min-height: 44px;
  border: 1px solid var(--griotte);
  border-radius: 8px;
  background: var(--griotte);
  color: white;
  font-weight: 850;
  cursor: pointer;
}

.value-result {
  margin-top: 16px;
  border: 1px solid rgba(93, 18, 11, 0.16);
  border-radius: 8px;
  padding: 15px;
  background: #f7e8dc;
}

.value-result strong {
  display: block;
  margin: 5px 0 7px;
  font-size: 18px;
}

.value-result p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.value-result ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.value-result-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.result-info {
  margin: 10px 0;
}

.value-result-grid span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fffaf4;
}

.value-result-grid small,
.value-result-grid b {
  display: block;
}

.value-result-grid small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.value-result-grid b {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.25;
}

label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  display: grid;
  gap: 6px;
  min-width: 0;
}

select,
input,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fffaf4;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
  max-width: 100%;
}

textarea {
  min-height: 92px;
  padding: 12px;
  resize: vertical;
}

.dashboard-grid,
.lower-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(500px, 1.5fr);
  gap: 16px;
  min-width: 0;
}

.lower-grid {
  grid-template-columns: minmax(440px, 1fr) minmax(340px, 0.75fr);
}

.panel {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 12px 36px rgba(51, 37, 27, 0.04);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0;
}

.pill {
  white-space: nowrap;
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pill.hot {
  color: white;
  background: var(--accent);
}

.bag-list,
.collection-list,
.alerts-list {
  display: grid;
  gap: 8px;
}

.bag-row,
.collection-row,
.alert-row {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf4;
  padding: 11px;
}

.bag-row {
  cursor: pointer;
  text-align: left;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.bag-row.active {
  border-color: rgba(93, 18, 11, 0.5);
  box-shadow: inset 3px 0 0 var(--accent);
}

.bag-row strong,
.collection-row strong {
  display: block;
  margin-bottom: 3px;
}

.bag-row span,
.collection-row span,
.alert-row span,
.quote-row span {
  color: var(--muted);
  font-size: 13px;
}

.score {
  color: var(--accent);
  font-weight: 850;
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 8px;
  background: #f6e8da;
  white-space: nowrap;
}

.bag-thumb,
.closet-thumb,
.social-thumb {
  display: block;
  border-radius: 8px;
  background-size: 430px auto;
  background-repeat: no-repeat;
  background-color: var(--soft);
}

.bag-thumb {
  width: 62px;
  height: 62px;
}

.closet-thumb {
  width: 104px;
  height: 96px;
  background-size: cover;
  background-position: center;
}

.closet-copy {
  display: grid;
  align-content: center;
  gap: 10px;
  min-width: 0;
}

.closet-title {
  color: var(--ink);
  font-size: clamp(20px, 1.6vw, 28px);
  line-height: 1.02;
}

.closet-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.closet-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  background: #f8ecdf;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.social-thumb {
  width: 54px;
  height: 54px;
}

.quote-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.quote-row > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8ecdf;
  display: grid;
  gap: 6px;
}

.quote-row strong {
  font-size: 23px;
}

.sell-verdict {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(93, 18, 11, 0.16);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
  background: #f7e8dc;
}

.sell-verdict strong {
  display: block;
  margin: 5px 0 4px;
  font-size: 18px;
}

.sell-verdict p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.owned-context {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  border-radius: 8px;
  padding: 11px;
  margin-bottom: 12px;
  background: #f2e4d5;
  color: var(--accent-2);
}

.owned-context span,
.owned-context strong {
  display: block;
  text-align: center;
}

.owned-context span {
  font-size: 12px;
  color: #59665d;
  font-weight: 750;
}

.owned-context strong {
  font-size: 15px;
}

.bag-detail-page {
  display: none;
}

.bag-detail-page.active-page {
  display: block;
}

.back-button {
  width: max-content;
  margin-bottom: 14px;
}

.bag-detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

.bag-detail-image {
  min-height: 420px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  background-color: var(--soft);
}

.bag-detail-copy {
  display: grid;
  align-content: center;
  gap: 14px;
  min-width: 0;
}

.bag-detail-copy h2 {
  font-size: clamp(38px, 5vw, 72px);
  line-height: 0.95;
}

.bag-detail-meta,
.bag-family-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bag-detail-meta span,
.bag-family-stats span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 11px;
  background: #f8ecdf;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.bag-owned-context {
  margin-bottom: 0;
}

.bag-detail-actions {
  margin: 0;
}

.bag-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.75fr);
  gap: 14px;
  margin-top: 18px;
}

.bag-detail-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fffaf4;
}

.bag-detail-card h3 {
  margin: 8px 0;
  font-size: 22px;
}

.bag-detail-card p {
  color: var(--muted);
  line-height: 1.55;
}

.bag-family-stats span {
  display: grid;
  border-radius: 8px;
  min-width: 92px;
}

.bag-family-stats strong {
  color: var(--ink);
  font-size: 24px;
}

.bag-family-stats small {
  color: var(--muted);
  font-weight: 750;
}

.verdict-meta {
  min-width: 170px;
  display: grid;
  align-content: center;
  gap: 7px;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}

.detail-actions button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--espresso);
  color: white;
  font-weight: 850;
  cursor: pointer;
}

.detail-actions button:last-child {
  background: #fffaf4;
  color: var(--ink);
}

.verdict-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 9px;
  background: #fffaf4;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.data-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(120, 129, 118, 0.28);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  background: #f2e4d5;
}

.data-banner strong {
  display: block;
}

.data-banner p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.inline-info {
  margin-top: 8px;
}

.inline-info summary {
  min-height: 28px;
  padding: 5px 9px;
}

.secondary-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf4;
  color: var(--ink);
  min-height: 38px;
  padding: 0 12px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: grid;
  place-items: center;
}

canvas {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffaf4, #f2e5d6);
}

.market-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 12px;
}

.marketplaces {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.marketplace-row,
.collection-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.collection-row {
  grid-template-columns: 104px minmax(0, 1fr) minmax(170px, auto) auto;
  gap: 16px;
  min-height: 124px;
  padding: 14px;
  cursor: pointer;
}

.closet-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.closet-actions .secondary-button {
  min-height: 36px;
}

.closet-row-actions {
  display: grid;
  gap: 8px;
  justify-items: stretch;
}

.closet-row-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fffaf4;
  color: var(--espresso);
  font-weight: 850;
  cursor: pointer;
}

.closet-row-actions button:last-child {
  color: #8d1f3d;
}

.privacy-toggle {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fffaf4;
  color: var(--muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 800;
  min-width: 0;
}

.privacy-toggle input {
  flex: 0 0 auto;
  min-height: 0;
  width: 16px;
  height: 16px;
}

.closet-value {
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 5px;
}

.closet-value button,
.closet-value a {
  min-height: 32px;
  border: 1px solid var(--griotte);
  border-radius: 8px;
  background: var(--griotte);
  color: #fffaf4;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.closet-value strong {
  font-size: 17px;
}

.closet-value small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.closet-value.positive strong {
  color: #0f766e;
}

.closet-value.negative strong {
  color: #8d1f3d;
}

.hide-values .home-value,
.hide-values #portfolioDelta,
.hide-values .closet-value strong,
.hide-values #avgPrice,
.hide-values #athPrice,
.hide-values #atlPrice {
  color: transparent !important;
  text-shadow: 0 0 12px rgba(36, 27, 22, 0.36);
}

.closet-stats {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.collection-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 14px;
  background: #f8ecdf;
}

.collection-overview span {
  display: grid;
  gap: 4px;
}

.collection-overview small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.collection-overview strong {
  color: var(--ink);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.95;
}

.save-across-devices-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(51, 37, 27, 0.08);
  border-radius: 999px;
  padding: 10px 10px 10px 18px;
  background: rgba(255, 253, 246, 0.72);
  color: var(--ink);
}

.save-across-devices-prompt[hidden] {
  display: none;
}

.save-across-devices-prompt span {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.save-across-devices-prompt strong {
  font-size: 14px;
  line-height: 1.1;
}

.save-across-devices-prompt small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.save-across-devices-prompt.is-emphasized {
  box-shadow: 0 16px 40px rgba(51, 37, 27, 0.08);
}

.auth-card,
.log-form,
.profile-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
  background: #f8ecdf;
}

.log-form {
  grid-template-columns: 1fr;
  padding: 18px;
}

.add-bag-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.add-bag-topline span {
  color: var(--ink);
  font-size: 20px;
  font-weight: 850;
}

.add-bag-topline .icon-button {
  background: #fffaf4;
  color: var(--ink);
  font-size: 26px;
}

.add-bag-upload,
.add-bag-upload .upload-preview {
  min-height: 360px;
}

.add-bag-upload .upload-preview {
  border-style: solid;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 250, 244, 0.7), rgba(242, 222, 206, 0.76)),
    #f7e6d8;
}

.camera-mark {
  width: 54px;
  height: 54px;
  fill: none;
  stroke: var(--espresso);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.add-bag-upload .upload-preview strong {
  font-size: clamp(24px, 3.2vw, 38px);
}

.add-bag-upload .upload-preview small {
  max-width: 520px;
}

.add-method-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.link-preview-status {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fffaf4;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.link-preview-status[hidden] {
  display: none;
}

.add-bag-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf4;
}

.add-bag-details summary {
  min-height: 44px;
  padding: 12px 14px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 850;
  list-style: none;
}

.add-bag-details summary::-webkit-details-marker {
  display: none;
}

.add-bag-fields {
  border-top: 1px solid var(--line);
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.log-form[hidden] {
  display: none;
}

.watch-listing-bar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 12px;
}

.watch-listing-bar[hidden] {
  display: none;
}

.watch-form {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin: 0 0 16px;
  background: #f8ecdf;
}

.watch-form[hidden] {
  display: none;
}

.watch-url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.watch-url-row label,
.listing-preview-body label {
  min-width: 0;
}

.watch-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 650;
}

.listing-preview {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  border: 1px solid rgba(93, 18, 11, 0.16);
  border-radius: 8px;
  padding: 14px;
  background: #fffaf4;
}

.listing-preview[hidden] {
  display: none;
}

.listing-preview-img-wrap {
  width: 180px;
  height: 180px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--soft);
}

.listing-preview-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.listing-preview-body {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.listing-preview-meta,
.listing-preview-price-row,
.listing-preview-details {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.listing-preview-body > strong {
  font-size: 18px;
  line-height: 1.18;
}

.listing-preview-price-row {
  align-items: baseline;
  gap: 10px;
}

.listing-price {
  font-size: 22px;
}

.listing-fair-value {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 850;
}

.listing-fair-value.positive {
  background: #d9f5dd;
  color: #0f766e;
}

.listing-fair-value.negative {
  background: #ffd3d0;
  color: #8d1f3d;
}

.listing-fair-value.neutral {
  background: var(--soft);
  color: var(--muted);
}

.listing-description {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.listing-preview-details span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  background: #f8ecdf;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.fetch-error {
  padding: 10px 12px;
  border: 1px solid rgba(141, 31, 61, 0.24);
  border-radius: 8px;
  background: #ffd3d0;
  color: #8d1f3d;
  font-size: 13px;
  font-weight: 750;
}

.fetch-error[hidden] {
  display: none;
}

.signed-in-only[hidden] {
  display: none !important;
}

.auth-card {
  grid-template-columns: 1fr;
  align-items: center;
  max-width: 620px;
  margin: 0 auto;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(255, 250, 244, 0.78), rgba(242, 222, 206, 0.54)),
    #f8ecdf;
}

.signed-out-app .auth-card {
  min-height: 360px;
  justify-content: center;
  box-shadow: var(--shadow);
}

.auth-loading .auth-card {
  pointer-events: none;
}

.signed-out-app .auth-panel-head {
  display: grid;
  justify-items: center;
  gap: 14px;
}

.signed-out-app .auth-panel-head strong {
  font-size: clamp(30px, 5vw, 46px);
}

.signed-out-app .auth-panel-head small,
.signed-out-app .auth-card p {
  max-width: 420px;
  margin-inline: auto;
  text-align: center;
  font-size: 14px;
}

.profile-signed-in .auth-card {
  display: none;
}

.auth-card p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.auth-panel-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.auth-panel-head > span:last-child {
  display: grid;
  gap: 2px;
}

.auth-panel-head strong {
  font-size: 24px;
  line-height: 1.1;
}

.auth-panel-head small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.profile-mini-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--espresso);
  color: #fffaf4;
}

.profile-mini-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.auth-options .primary-button {
  flex: 1 1 260px;
  max-width: 420px;
  padding: 0 14px;
}

.clerk-user-button {
  min-height: 44px;
  display: grid;
  align-items: center;
  justify-items: start;
}

.clerk-sign-in-mount {
  width: min(100%, 430px);
  margin: 4px auto 0;
  display: grid;
  justify-items: center;
}

.clerk-sign-in-mount[hidden] {
  display: none;
}

.clerk-sign-in-mount > div {
  width: 100%;
}

.clerk-mode .auth-options {
  grid-column: 1 / -1;
}

.profile-signed-in .auth-panel-head,
.profile-signed-in .auth-options {
  justify-content: flex-start;
  text-align: left;
}

.profile-signed-in .auth-panel-head strong {
  font-size: 18px;
}

.clerk-mode #authForm > label,
.clerk-mode #authForm > button[type="submit"],
.clerk-mode #authStatus.email-auth-copy {
  display: none;
}

.full-field {
  grid-column: 1 / -1;
}

.log-form button,
.profile-card button {
  grid-column: 1 / -1;
}

.profile-page {
  width: min(100%, 720px);
  min-height: auto;
}

.profile-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.profile-page-head h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
}

.profile-back-link,
.profile-collection-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.profile-back-link {
  order: 2;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 250, 244, 0.78);
  color: var(--espresso);
  font-size: 13px;
  font-weight: 850;
}

.profile-shell {
  display: grid;
  gap: 12px;
}

.profile-public-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(255, 250, 244, 0.98), rgba(247, 237, 225, 0.96)),
    #fffaf4;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  box-shadow: 0 18px 54px rgba(51, 37, 27, 0.08);
}

.profile-card {
  margin: 0;
  min-width: 0;
  overflow: hidden;
}

.profile-edit-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 250, 244, 0.82);
  overflow: hidden;
}

.profile-edit-panel summary {
  min-height: 44px;
  padding: 14px 16px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 850;
  list-style: none;
}

.profile-edit-panel summary::-webkit-details-marker {
  display: none;
}

.profile-edit-panel .profile-card {
  border: none;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: rgba(248, 236, 223, 0.66);
}

.profile-avatar {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--espresso);
  color: #fffaf4;
  font-size: 24px;
  font-weight: 900;
}

.profile-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.profile-identity {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.profile-identity strong {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1;
  overflow-wrap: anywhere;
}

.profile-identity span {
  color: var(--muted);
}

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

.profile-actions .secondary-button,
.profile-collection-link {
  width: auto;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
}

.profile-settings-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 250, 244, 0.72);
  display: grid;
  gap: 6px;
}

.profile-settings-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.profile-toggle {
  justify-content: flex-start;
  min-height: 42px;
}

.shelf-tabs,
.feed-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 10px;
  scrollbar-width: none;
}

.shelf-tabs::-webkit-scrollbar,
.feed-filters::-webkit-scrollbar {
  display: none;
}

.shelf-tabs button,
.feed-filters button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffaf4;
  color: var(--muted);
  padding: 8px 11px;
  font-weight: 850;
  cursor: pointer;
}

.closet-value .text-action {
  min-height: auto;
  border: none;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: rgba(51, 37, 27, 0.58);
  font-size: 12px;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
  box-shadow: none;
}

.shelf-tabs button.active,
.feed-filters button.active {
  background: var(--espresso);
  color: #fffaf4;
  border-color: var(--espresso);
}

.closet-stats span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #f8ecdf;
  display: grid;
  gap: 4px;
}

.closet-stats strong,
.closet-stats small {
  display: block;
}

.closet-stats strong {
  font-size: 24px;
}

.closet-stats small {
  color: var(--muted);
  font-weight: 750;
}

.social-list {
  display: grid;
  gap: 8px;
}

.social-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf4;
  padding: 11px;
  cursor: pointer;
}

.activity-row {
  grid-template-columns: 54px minmax(0, 1fr) auto;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fffaf4;
  color: var(--muted);
  font-weight: 750;
}

.social-row strong,
.social-row span span {
  display: block;
}

.social-row span span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.social-row small {
  display: block;
  margin-top: 5px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}

.social-row em {
  border-radius: 999px;
  padding: 7px 9px;
  background: var(--soft);
  color: var(--accent);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.marketplace-row {
  border-bottom: 1px solid var(--line);
  padding: 0 0 8px;
}

.marketplace-row:last-child {
  border-bottom: 0;
}

.notes {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.history-card {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8ecdf;
}

.history-heading,
.source-card > summary {
  width: 100%;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.history-heading strong {
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal-notes-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fffaf4;
}

.signal-notes-card .notes {
  margin-top: 10px;
}

.history-card h3 {
  margin: 5px 0 8px;
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: 0;
}

.history-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.history-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.history-facts span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #fffaf4;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.source-card {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fffaf4;
}

.source-card > summary {
  margin-bottom: 0;
}

.source-card[open] > summary {
  margin-bottom: 12px;
}

.source-plan {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.source-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 9px;
}

.source-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.source-row strong,
.source-row span span {
  display: block;
}

.source-row span span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  margin-top: 2px;
}

.source-row em {
  border-radius: 999px;
  padding: 6px 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  text-transform: uppercase;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.alert-row {
  display: grid;
  gap: 5px;
}

.alert-row strong {
  color: var(--accent);
}

@media (max-width: 1060px) {
  .app-shell {
    grid-template-columns: 1fr;
    align-content: start;
    min-height: auto;
  }

  .sidebar {
    position: static;
    align-self: start;
    height: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px 8px;
    min-width: 0;
    max-width: 100vw;
    overflow: visible;
  }

  .nav-list {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    gap: 5px;
    padding-bottom: 4px;
    scrollbar-width: none;
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 34px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 34px), transparent 100%);
  }

  .nav-list::-webkit-scrollbar {
    display: none;
  }

  .nav-list::after {
    content: "Swipe";
    flex: 0 0 auto;
    align-self: center;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    opacity: 0.72;
    padding: 0 8px 0 2px;
  }

  .brand {
    flex: 0 0 auto;
    width: 100%;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
  }

  .brand-home {
    flex: 1 1 auto;
    min-width: 0;
  }

  .account-wrap {
    flex: 0 0 auto;
    margin-left: auto;
  }

  .account-button {
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 999px;
    justify-content: center;
  }

  .account-button::after {
    content: none;
  }

  .account-icon {
    width: 18px;
    height: 18px;
  }

  .account-menu {
    left: auto;
    right: 0;
  }

  .nav-list a {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 8px 9px;
    font-size: 13px;
  }

  .dashboard-grid,
  .lower-grid,
  .value-check-grid {
    grid-template-columns: 1fr;
  }

  .profile-public-card {
    grid-template-columns: 82px minmax(0, 1fr);
  }
}

@media (max-width: 1060px) {
  .simple-mode .sidebar {
    padding: 14px 18px;
  }

  .simple-mode .brand {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
  }

  .simple-mode .brand-home {
    flex: 1 1 auto;
    min-width: 0;
  }

  .simple-mode .brand-home span:last-child {
    font-size: 18px;
  }

  .simple-mode .account-wrap {
    flex: 0 0 auto;
    margin-left: auto;
  }

  .simple-mode .account-button {
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
  }

  .simple-mode .account-button::after {
    content: none;
  }

  .simple-mode .account-icon {
    width: 18px;
    height: 18px;
  }

  .simple-mode .account-menu {
    left: auto;
    right: 0;
  }
}

@media (max-width: 760px) {
  main {
    padding: 10px;
    gap: 12px;
  }

  main > .page-section {
    width: 100%;
  }

  .market-page > *,
  .dashboard-grid > *,
  .toolbar > * {
    min-width: 0;
    max-width: 100%;
  }

  .hero,
  .hero img {
    height: 420px;
    min-height: 420px;
  }

  .home-hero,
  .home-hero img {
    height: 360px;
    min-height: 360px;
  }

  .home-anon .home-hero,
  .home-anon .home-hero img {
    height: min(500px, calc(100vh - 116px));
    min-height: 430px;
  }

  .hero-overlay {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 18px;
  }

  .home-anon .hero-overlay {
    align-items: center;
    justify-content: center;
    padding: 22px;
  }

  .hero h1 {
    font-size: 29px;
    line-height: 1.04;
    max-width: 100%;
  }

  .home-anon .home-copy h1 {
    font-size: 34px;
  }

  .home-cta-row {
    width: 100%;
  }

  .home-cta-row a {
    flex: 1 1 132px;
    min-width: 0;
  }

  .home-value {
    font-size: 46px;
  }

  .hero p {
    font-size: 15px;
    max-width: 100%;
  }

  .hero-stat {
    width: 100%;
    padding: 12px;
  }

  .delta-toggle {
    font-size: 24px;
  }

  .panel {
    padding: 14px;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-heading .pill {
    align-self: flex-start;
  }

  .feed-filters {
    flex-wrap: wrap;
    overflow: visible;
    padding-bottom: 0;
  }

  .feed-filters button {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
  }

  .toolbar,
  .quote-row,
  .data-banner,
  .sell-verdict,
  .market-split,
  .bag-detail-hero,
  .bag-detail-grid,
  .auth-card,
  .log-form,
  .profile-card,
  .value-fields,
  .value-result-grid {
    grid-template-columns: 1fr;
  }

  .profile-page {
    overflow: hidden;
    padding: 14px;
  }

  .profile-page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
  }

  .profile-page-head h2 {
    order: 2;
    font-size: 34px;
  }

  .profile-back-link {
    order: 1;
    align-self: flex-start;
    min-height: 36px;
    padding: 0 12px;
  }

  .profile-shell {
    gap: 12px;
  }

  .profile-card,
  .profile-edit-panel .profile-card {
    padding: 12px;
  }

  .profile-public-card {
    grid-template-columns: 68px minmax(0, 1fr);
    align-items: start;
    padding: 12px;
    gap: 12px;
  }

  .profile-avatar {
    width: 64px;
    height: 64px;
    font-size: 20px;
  }

  .profile-identity strong {
    font-size: 24px;
  }

  .profile-actions .secondary-button {
    flex: 1 1 auto;
  }

  .profile-actions,
  .profile-actions .secondary-button,
  .profile-collection-link {
    width: 100%;
  }

  .profile-settings-card {
    padding: 12px;
  }

  .profile-card {
    gap: 12px;
  }

  .profile-card label {
    font-size: 13px;
  }

  .profile-card input,
  .profile-card textarea {
    min-height: 48px;
  }

  .profile-card textarea {
    min-height: 104px;
  }

  .profile-toggle {
    align-items: flex-start;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    min-height: 48px;
  }

  .add-bag-fields {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .collection-overview,
  .add-method-grid {
    grid-template-columns: 1fr;
  }

  .collection-overview .delta-toggle {
    width: 100%;
  }

  .save-across-devices-prompt {
    align-items: stretch;
    border-radius: 22px;
    flex-direction: column;
  }

  .save-across-devices-prompt .secondary-button {
    width: 100%;
  }

  .add-bag-upload,
  .add-bag-upload .upload-preview {
    min-height: 260px;
  }

  .watch-url-row,
  .listing-preview {
    grid-template-columns: 1fr;
  }

  .listing-preview-img-wrap {
    width: 100%;
    height: 220px;
  }

  .upload-card,
  .upload-preview {
    min-height: 210px;
  }

  .upload-preview img {
    height: 190px;
  }

  .data-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .sell-verdict {
    flex-direction: column;
  }

  .owned-context,
  .detail-actions {
    grid-template-columns: 1fr;
  }

  .bag-detail-image {
    min-height: 300px;
  }

  .bag-detail-copy h2 {
    font-size: 38px;
  }

  .verdict-meta {
    min-width: 0;
  }

  .bag-row {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .bag-row .score {
    grid-column: 2;
    justify-self: start;
  }

  .bag-thumb {
    width: 52px;
    height: 52px;
    grid-row: span 2;
  }

  .collection-row {
    position: relative;
    display: block;
    aspect-ratio: 1;
    min-height: 0;
    border: none;
    border-radius: 0;
    padding: 0;
    overflow: hidden;
    background: var(--soft);
  }

  .collection-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
  }

  .collection-row .closet-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
  }

  .collection-row .closet-copy {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    padding: 24px 7px 7px;
    gap: 3px;
    background: linear-gradient(180deg, transparent, rgba(36, 27, 22, 0.72));
  }

  .collection-row .closet-title {
    color: #fffaf4;
    font-size: 12px;
    line-height: 1.05;
    text-shadow: 0 1px 7px rgba(0, 0, 0, 0.55);
  }

  .collection-row .closet-meta {
    display: block;
  }

  .collection-row .closet-meta span {
    display: none;
  }

  .collection-row .closet-meta span:last-child {
    display: block;
    border: none;
    border-radius: 0;
    padding: 0;
    background: transparent;
    color: rgba(255, 250, 244, 0.86);
    font-size: 10px;
    line-height: 1.1;
  }

  .collection-row .closet-value {
    display: none;
  }

  .collection-row .closet-row-actions {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 2;
    display: flex;
    gap: 4px;
  }

  .collection-row .closet-row-actions button {
    min-height: 28px;
    border-color: rgba(255, 250, 244, 0.58);
    border-radius: 999px;
    padding: 0 8px;
    background: rgba(255, 250, 244, 0.86);
    color: var(--espresso);
    font-size: 10px;
  }

  .closet-stats,
  .social-row {
    grid-template-columns: 1fr;
  }

  .activity-row {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .activity-row em {
    grid-column: 2;
    justify-self: start;
  }

  .closet-actions {
    justify-content: stretch;
  }

  .closet-actions .secondary-button,
  .privacy-toggle {
    flex: 1 1 auto;
  }

}

/* Final add-bag intake overrides: keep this form calm and linear. */
.simple-mode .log-form .bag-capture-shell {
  display: grid;
  gap: 12px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.simple-mode .log-form .add-bag-upload,
.simple-mode .log-form .add-bag-upload .upload-preview {
  min-height: 0;
}

.simple-mode .log-form .add-bag-upload .upload-preview {
  min-height: clamp(156px, 21vw, 220px);
  border: 1px dashed rgba(51, 37, 27, 0.18);
  border-radius: 20px;
  background: #f8f3eb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.simple-mode .log-form .add-bag-upload .upload-preview::before,
.simple-mode .log-form .add-bag-upload .upload-preview::after,
.simple-mode .log-form .scan-guide,
.simple-mode .log-form .capture-tip {
  display: none !important;
}

.simple-mode .log-form .add-bag-upload .upload-preview img {
  width: 100%;
  height: clamp(180px, 24vw, 260px);
  border-radius: 18px;
  object-fit: contain;
  background: #fff;
  box-shadow: none;
}

.simple-mode .log-form .add-bag-upload .upload-preview strong {
  font-size: clamp(22px, 2.7vw, 30px);
}

.simple-mode .log-form .capture-command-bar {
  position: static;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid rgba(51, 37, 27, 0.08);
  border-radius: 18px;
  padding: 8px 8px 8px 16px;
  background: rgba(255, 250, 244, 0.7);
  box-shadow: none;
  backdrop-filter: none;
}

@media (max-width: 700px) {
  .simple-mode .log-form .add-bag-upload .upload-preview {
    min-height: 150px;
  }

  .simple-mode .log-form .add-bag-upload .upload-preview img {
    height: 190px;
  }

  .simple-mode .log-form .capture-command-bar {
    grid-template-columns: 1fr;
    border-radius: 16px;
    padding: 10px;
  }

  .simple-mode .capture-status {
    min-height: 38px;
    padding: 0 14px;
    font-size: 12px;
  }

  .simple-mode .duplicate-warning {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .simple-mode .duplicate-warning div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: stretch;
  }

  .simple-mode .duplicate-warning button {
    width: 100%;
    padding: 0 10px;
  }

  .simple-mode .send-button {
    width: 100%;
  }
}

/* Final MVP polish: simple-mode should feel like one focused collection app. */
.simple-mode .closet-stats,
.simple-mode .shelf-tabs,
.simple-mode .watch-listing-bar,
.simple-mode .watch-form {
  display: none !important;
}

.simple-mode .profile-page {
  width: min(100%, 760px);
  border: 0;
  border-radius: 28px;
  background: rgba(255, 253, 246, 0.86);
  box-shadow: 0 22px 70px rgba(51, 37, 27, 0.08);
}

.simple-mode .profile-page-head h2 {
  font-family: var(--font-display);
  font-weight: 500;
}

.simple-mode .profile-public-card,
.simple-mode .profile-settings-card,
.simple-mode .profile-edit-panel {
  border-color: rgba(51, 37, 27, 0.08);
  border-radius: 22px;
  background: rgba(255, 250, 244, 0.78);
}

.simple-mode .auth-card {
  border-color: rgba(51, 37, 27, 0.08);
  border-radius: 24px;
}

@media (max-width: 760px) {
  .simple-mode .profile-page {
    border-radius: 22px;
    padding: 14px;
  }

  .simple-mode .collection-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .simple-mode .collection-row {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    aspect-ratio: auto;
    border: 1px solid rgba(51, 37, 27, 0.1);
    border-radius: 18px;
    padding: 8px;
    overflow: visible;
    background:
      linear-gradient(180deg, rgba(255, 253, 246, 0.72), rgba(246, 237, 201, 0.72)),
      #f8efcf;
  }

  .simple-mode .collection-row .closet-thumb {
    position: static;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border-radius: 13px;
  }

  .simple-mode .collection-row .closet-copy {
    position: static;
    padding: 10px 0 2px;
    background: transparent;
  }

  .simple-mode .collection-row .closet-title {
    color: var(--ink);
    font-size: 20px;
    text-shadow: none;
  }

  .simple-mode .collection-row .closet-meta {
    display: grid;
  }

  .simple-mode .collection-row .closet-meta span,
  .simple-mode .collection-row .closet-meta span:last-child {
    display: block;
    color: rgba(51, 37, 27, 0.64);
    font-size: 11px;
  }

  .simple-mode .collection-row .closet-value {
    display: flex;
  }

  .simple-mode .collection-row .card-menu {
    display: block;
    top: 14px;
    right: 14px;
  }

  .simple-mode .collection-row .card-menu-popover {
    right: -4px;
  }
}

@media (max-width: 760px) {
  html,
  body,
  .simple-mode,
  .simple-mode .app-shell,
  .simple-mode main {
    max-width: 100%;
    overflow-x: hidden;
  }

  .simple-mode main {
    padding: 18px 16px 92px;
  }

  .simple-mode .collection-topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: start;
    margin-bottom: 18px;
    padding: 0;
  }

  .simple-mode .sidebar,
  .simple-mode .brand,
  .simple-mode .brand-home {
    min-width: 0;
  }

  .simple-mode .sidebar {
    width: 100%;
  }

  .simple-mode .brand {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    width: 100%;
    padding-right: 58px;
  }

  .simple-mode .brand-home {
    width: 100%;
  }

  .simple-mode .account-wrap {
    position: fixed;
    top: 14px;
    right: 18px;
    z-index: 30;
    margin-left: 0;
  }

  .simple-mode .collection-topbar h2 {
    font-size: clamp(44px, 14vw, 58px);
  }

  .simple-mode .collection-topbar .closet-actions,
  .simple-mode .collection-topbar .add-bag-trigger {
    justify-self: start;
  }

  .simple-mode .add-bag-trigger {
    min-height: 48px;
    padding: 0 24px;
    font-size: 16px;
  }

  .simple-mode .collection-overview {
    width: 100%;
    margin-bottom: 32px;
    border-radius: 28px;
    padding: 24px;
  }

  .simple-mode .collection-overview.is-empty-collection {
    margin-bottom: 0;
  }

  .simple-mode .collection-overview strong {
    font-size: clamp(60px, 20vw, 82px);
  }

  .simple-mode .collection-overview em {
    max-width: 280px;
    font-size: 16px;
    line-height: 1.25;
  }

  .simple-mode .empty-collection-cta {
    width: 100%;
    max-width: 285px;
    min-width: 0;
    padding: 0 18px;
  }

  .simple-mode .collection-list {
    grid-template-columns: 1fr;
    gap: 18px;
    width: 100%;
  }

  .simple-mode .collection-empty {
    min-height: auto;
    width: 100%;
    max-width: none;
    min-width: 0;
    justify-items: center;
    padding: 34px 24px;
    border-radius: 30px;
  }

  .simple-mode .collection-empty strong {
    max-width: 260px;
    font-size: clamp(38px, 11vw, 48px);
  }

  .simple-mode .collection-empty span {
    max-width: 285px;
    font-size: 16px;
    line-height: 1.22;
  }

  .simple-mode .collection-empty .primary-button {
    width: 100%;
    max-width: 270px;
    min-width: 0;
    padding: 0 18px;
    white-space: normal;
  }
}

/* Final editorial skin: the last word on Bag Worth's visual system. */
.simple-mode {
  --butter: #fff0b5;
  --powder: #c3dbe7;
  --oxblood: #8b120b;
  --espresso: #33251b;
  --paper: #f4f0e8;
  --panel: #fffdf7;
  --line: rgba(51, 37, 27, 0.11);
  --muted: #7d756c;
  --accent: var(--oxblood);
}

.simple-mode .app-shell {
  background:
    linear-gradient(90deg, rgba(51, 37, 27, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, #fbf8ef 0%, #efede4 100%);
  background-size: 82px 82px, 100% 100%;
}

.simple-mode .sidebar {
  background: #f2e7dc;
}

.simple-mode .brand-mark {
  background: var(--espresso);
  box-shadow: none;
}

.simple-mode .account-button {
  background: #fffdf7;
  color: var(--espresso);
  box-shadow: inset 0 0 0 1px rgba(51, 37, 27, 0.1);
}

.simple-mode .collection-overview {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(51, 37, 27, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 240, 181, 0.74), rgba(255, 253, 247, 0.78)),
    #fffdf7;
  box-shadow: none;
}

.simple-mode .collection-overview::after {
  content: "";
  position: absolute;
  right: clamp(18px, 5vw, 58px);
  top: 50%;
  width: clamp(42px, 9vw, 82px);
  height: clamp(42px, 9vw, 82px);
  border-radius: 999px;
  background: var(--powder);
  transform: translateY(-50%);
  opacity: 0.86;
  pointer-events: none;
}

.simple-mode .collection-overview:not(.is-empty-collection)::after {
  background: var(--butter);
  box-shadow: inset 0 0 0 16px var(--powder);
}

.simple-mode .collection-overview > * {
  position: relative;
  z-index: 1;
}

.simple-mode .collection-overview.is-empty-collection {
  background:
    linear-gradient(90deg, rgba(255, 240, 181, 0.82), rgba(195, 219, 231, 0.34)),
    #fffdf7;
}

.simple-mode .collection-overview small {
  color: rgba(51, 37, 27, 0.62);
}

.simple-mode .collection-overview em {
  color: rgba(51, 37, 27, 0.62);
}

.simple-mode .primary-button,
.simple-mode .empty-collection-cta {
  background: var(--oxblood);
  border-color: var(--oxblood);
  color: #fffdf7;
  box-shadow: none;
}

.simple-mode .primary-button:hover,
.simple-mode .empty-collection-cta:hover {
  background: #6f0d08;
  border-color: #6f0d08;
}

.simple-mode .add-bag-trigger {
  background: var(--espresso);
  border-color: var(--espresso);
}

.simple-mode .add-bag-trigger:hover {
  background: var(--oxblood);
  border-color: var(--oxblood);
}

.simple-mode #collectionDelta.delta-toggle {
  background: #fffdf7;
  color: var(--espresso);
  box-shadow: none;
}

.simple-mode .collection-row {
  border-radius: 0;
  background: var(--butter);
  box-shadow: none;
}

.simple-mode .collection-row:nth-child(4n + 2) {
  background: #f7eee0;
}

.simple-mode .collection-row:nth-child(4n + 3) {
  background: rgba(195, 219, 231, 0.7);
}

.simple-mode .collection-row:nth-child(4n + 4) {
  background: #f5e8d2;
}

.simple-mode .collection-row:hover {
  box-shadow: 0 18px 46px rgba(51, 37, 27, 0.1);
}

.simple-mode .collection-row .closet-thumb {
  border-radius: 0;
  background-color: rgba(255, 253, 247, 0.72);
}

.simple-mode .collection-row .closet-index {
  letter-spacing: 0.08em;
}

.simple-mode .collection-row .closet-title {
  letter-spacing: -0.01em;
}

.simple-mode .card-menu summary {
  box-shadow: none;
}

.simple-mode .log-form {
  border-radius: 10px;
  background: #fffdf7;
  box-shadow: 0 22px 70px rgba(51, 37, 27, 0.11);
}

.simple-mode .add-bag-upload .upload-preview {
  border-radius: 8px;
  background:
    radial-gradient(circle at 72% 28%, rgba(255, 240, 181, 0.92) 0 12%, transparent 13%),
    linear-gradient(135deg, rgba(195, 219, 231, 0.72), rgba(255, 253, 247, 0.86)),
    #fffdf7;
}

.simple-mode .add-bag-upload .upload-preview img {
  border-radius: 4px;
}

.simple-mode .capture-command-bar {
  border-radius: 8px;
  background: #f5ecdf;
}

.simple-mode .capture-status,
.simple-mode .duplicate-warning,
.simple-mode .add-bag-details {
  border-radius: 8px;
}

.simple-mode .duplicate-warning {
  background: rgba(255, 240, 181, 0.88);
}

@media (max-width: 760px) {
  .simple-mode .sidebar {
    background: rgba(242, 231, 220, 0.95);
  }

  .simple-mode .collection-topbar {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .simple-mode .collection-topbar .closet-actions,
  .simple-mode .collection-topbar .add-bag-trigger {
    justify-self: end;
  }

  .simple-mode .collection-overview {
    border-radius: 8px;
  }

  .simple-mode .collection-overview::after {
    right: 20px;
    top: 34px;
    transform: none;
  }

  .simple-mode .collection-row {
    border-radius: 0;
  }

  .simple-mode .collection-empty {
    border-radius: 8px;
    text-align: left;
    justify-items: start;
    background:
      linear-gradient(135deg, rgba(255, 240, 181, 0.68), rgba(255, 253, 247, 0.92)),
      #fffdf7;
  }

  .simple-mode .collection-empty span,
  .simple-mode .collection-empty strong {
    max-width: none;
  }
}
