:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-muted: #f5f5f4;
  --ink: #1c1917;
  --muted: #78716c;
  --filter-active: #57534e;
  --line: #e7e5e4;
  --accent: #750014;
  --accent-dark: #5f0010;
  --accent-light: #fef2f2;
  --shadow: 0 1px 3px rgba(0,0,0,0.06),
    0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.07);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.10);
  --radius: 10px;
  --radius-lg: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system,
    BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4, p, label, input, button {
  font-family: inherit;
}

h1, h2, h3 {
  letter-spacing: 0;
  line-height: 1.15;
  font-weight: 700;
  margin-top: 0;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
h3 { font-size: 1.1rem; font-weight: 600; }

p {
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.95rem;
  margin: 0;
}

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

.shell {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
}

#inventory { position: relative; scroll-margin-top: 72px; }

.eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---- Header ---- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250,250,249,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
  overflow: visible;
}

.header-body {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
  align-items: center;
  justify-items: center;
  gap: 18px;
  min-height: 46px;
}

.actions { margin-left: 0; }

.header .actions {
  height: 38px;
  padding: 0 22px;
  justify-self: start;
  margin-right: 0;
}

.market-tagline {
  justify-self: center;
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 720;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.market-tagline-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  cursor: pointer;
}

.market-tagline-link:focus-visible {
  border-radius: 4px;
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  margin-left: 0;
  min-width: 0;
  overflow: visible;
}

.header-tools {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 10px;
  min-width: 0;
}

.language-menu {
  position: relative;
  z-index: 60;
}

.language-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 56px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.language-menu summary::-webkit-details-marker {
  display: none;
}

.language-menu summary:hover,
.language-menu[open] summary {
  border-color: var(--ink);
}

.language-caret {
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
}

.language-menu[open] .language-caret {
  transform: rotate(225deg) translate(-1px, -1px);
}

.language-menu-panel {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  display: grid;
  min-width: 104px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.language-option {
  display: flex;
  align-items: center;
  height: 30px;
  padding: 0 9px;
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.language-option:hover {
  color: var(--ink);
  background: var(--surface-muted);
}

.language-option.is-active {
  color: #fff;
  background: var(--filter-active);
}

.brand-mark {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  width: 150px;
  height: 38px;
  overflow: visible;
}

.brand-mark svg {
  display: block;
  width: 150px;
  height: 102px;
  margin-top: 6px;
  overflow: visible;
  filter: drop-shadow(0 12px 22px rgba(112,52,58,0.18));
  pointer-events: none;
}

/* ---- Filters ---- */

.cat-toggle { display: none; }

.filter-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 32px;
  margin-bottom: 24px;
  position: relative;
  z-index: 20;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 0;
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  transition: all 150ms ease;
  user-select: none;
}

.filter-menu {
  position: relative;
}

.filter-menu summary {
  list-style: none;
}

.filter-menu summary::-webkit-details-marker {
  display: none;
}

.category-trigger {
  gap: 9px;
}

.filter-caret {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transform-origin: center;
  transition: transform 160ms ease;
}

.filter-menu[open] .filter-caret {
  transform: rotate(225deg) translate(-1px,-1px);
}

.filter-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  min-width: 190px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.filter-menu-panel .filter-pill {
  justify-content: flex-start;
  width: 100%;
  border-radius: 6px;
}

.favorites-filter {
  width: 38px;
  padding: 0;
  font-size: 1.02rem;
}

.favorites-filter span[aria-hidden="true"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.02rem;
  height: 1.02rem;
  line-height: 1;
}

.verified-filter {
  width: 38px;
  padding: 0;
}

.verified-filter-icon {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

#cat-verified:checked ~ .filter-bar .verified-filter-icon {
  filter: invert(1);
}

.filter-pill:hover {
  border-color: var(--ink);
  color: var(--ink);
}

#cat-all:checked ~ .filter-bar label[for="cat-all"],
#cat-verified:checked ~ .filter-bar label[for="cat-verified"],
#cat-favorites:checked ~ .filter-bar label[for="cat-favorites"],
#cat-electronics:checked ~ .filter-bar label[for="cat-electronics"],
#cat-furniture:checked ~ .filter-bar label[for="cat-furniture"],
#cat-instruments:checked ~ .filter-bar label[for="cat-instruments"],
#cat-other:checked ~ .filter-bar label[for="cat-other"],
#cat-bikes:checked ~ .filter-bar label[for="cat-bikes"],
#cat-clothes:checked ~ .filter-bar label[for="cat-clothes"],
#cat-books:checked ~ .filter-bar label[for="cat-books"],
#cat-kitchen:checked ~ .filter-bar label[for="cat-kitchen"],
#cat-sports:checked ~ .filter-bar label[for="cat-sports"],
#cat-children:checked ~ .filter-bar label[for="cat-children"] {
  background: var(--filter-active);
  color: #fff;
  border-color: var(--filter-active);
}

#cat-favorites:checked ~ .filter-bar label[for="cat-favorites"] {
  background: #fff5f5;
  color: var(--accent);
  border-color: rgba(112,52,58,0.34);
}

#cat-favorites:checked ~ .filter-bar label[for="cat-favorites"] span[aria-hidden="true"] {
  font-size: 0;
}

#cat-favorites:checked ~ .filter-bar label[for="cat-favorites"] span[aria-hidden="true"]::before {
  content: "\2665";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.02rem;
  height: 1.02rem;
  font-size: 1.02rem;
  line-height: 1;
}

#cat-electronics:checked ~ .filter-bar .category-trigger,
#cat-furniture:checked ~ .filter-bar .category-trigger,
#cat-instruments:checked ~ .filter-bar .category-trigger,
#cat-other:checked ~ .filter-bar .category-trigger,
#cat-bikes:checked ~ .filter-bar .category-trigger,
#cat-clothes:checked ~ .filter-bar .category-trigger,
#cat-books:checked ~ .filter-bar .category-trigger,
#cat-kitchen:checked ~ .filter-bar .category-trigger,
#cat-sports:checked ~ .filter-bar .category-trigger,
#cat-children:checked ~ .filter-bar .category-trigger {
  background: var(--filter-active);
  color: #fff;
  border-color: var(--filter-active);
}

.market-trust-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 8px;
  margin: -6px 0 18px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 520;
  line-height: 1.35;
}

.market-trust-strip span:not([aria-hidden="true"]) {
  white-space: nowrap;
}

.market-trust-strip span[aria-hidden="true"] {
  color: #c4bbb5;
}

.verified-note {
  display: none;
  align-items: flex-start;
  gap: 8px;
  max-width: 540px;
  margin: -8px 0 18px;
  padding: 7px 9px;
  border: 1px solid rgba(112,52,58,0.16);
  border-radius: 8px;
  background: rgba(112,52,58,0.035);
  color: var(--accent-dark);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.35;
}

.verified-note img {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  object-fit: contain;
  margin-top: 0;
}

.verified-note-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.verified-note-copy strong {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 650;
}

.verified-note-copy p {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 5px;
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 450;
}

.verified-note-copy p span {
  font-size: 0.68rem;
  line-height: 1.25;
}

.verified-note-copy a {
  color: var(--accent);
  font-weight: 650;
  text-decoration: none;
}

.verified-note-copy a:hover {
  text-decoration: underline;
}

#cat-verified:checked ~ .verified-note {
  display: flex;
}

#cat-electronics:checked ~ .items .card,
#cat-furniture:checked ~ .items .card,
#cat-instruments:checked ~ .items .card,
#cat-other:checked ~ .items .card,
#cat-bikes:checked ~ .items .card,
#cat-clothes:checked ~ .items .card,
#cat-books:checked ~ .items .card,
#cat-kitchen:checked ~ .items .card,
#cat-sports:checked ~ .items .card,
#cat-children:checked ~ .items .card,
#cat-verified:checked ~ .items .card,
#cat-favorites:checked ~ .items .card {
  display: none;
}

#cat-electronics:checked ~ .items .card[data-category="electronics"],
#cat-furniture:checked ~ .items .card[data-category="furniture"],
#cat-instruments:checked ~ .items .card[data-category="instruments"],
#cat-other:checked ~ .items .card[data-category="other"],
#cat-bikes:checked ~ .items .card[data-category="bikes"],
#cat-clothes:checked ~ .items .card[data-category="clothes"],
#cat-books:checked ~ .items .card[data-category="books"],
#cat-kitchen:checked ~ .items .card[data-category="kitchen"],
#cat-sports:checked ~ .items .card[data-category="sports"],
#cat-children:checked ~ .items .card[data-category="children"],
#cat-verified:checked ~ .items .card[data-verified="true"],
#cat-favorites:checked ~ .items .card.is-favorite-card {
  display: flex;
}

/* ---- Cards ---- */

.section {
  padding: 0 0 80px;
}

.items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 200ms ease,
    border-color 200ms ease;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card:hover {
  border-color: #d6d3d1;
  box-shadow: var(--shadow-md);
}

.card-gallery {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  background: var(--surface);
  overflow: hidden;
}

.gallery-count {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.36);
  color: #5f5650;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0;
  pointer-events: none;
  backdrop-filter: none;
  box-shadow: 0 5px 14px rgba(28,25,23,0.11);
  text-shadow: 0 1px 5px rgba(255,255,255,0.84);
}

button.gallery-count {
  font-family: inherit;
  cursor: pointer;
  pointer-events: auto;
}

button.gallery-count:hover {
  background: rgba(255,255,255,0.48);
  border-color: rgba(255,255,255,0.66);
}

.gallery-count-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: -1px;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

.gallery-count-icon {
  display: block;
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.gallery-count-number {
  min-width: 0.72em;
  text-align: center;
}

.modal-gallery {
  height: clamp(200px, 40vw, 380px);
  border-radius: 8px;
  margin-bottom: 20px;
}

.card-gal-toggle { display: none; }
.card-gal-slide {
  display: none;
  width: 100%;
  height: 100%;
  position: relative;
}

.card-image-link {
  display: block;
  width: 100%;
  height: 100%;
}

.card-gal-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.card .card-gallery .card-gal-slide img {
  object-fit: cover;
  object-position: center;
}

.card .modal-gallery .card-gal-slide img {
  object-fit: contain;
}

@media (min-width: 601px) {
  .card {
    aspect-ratio: auto;
  }

  .card > .card-gallery {
    flex: 0 0 auto;
    aspect-ratio: 1 / 1;
  }

  .modal-gallery {
    height: auto;
    aspect-ratio: 4 / 5;
  }
}

.badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
  padding: 4px 8px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 0;
}

.badge-new {
  background: #edf7ed;
  color: #2f6b3a;
}

.badge-used {
  background: #f0efed;
  color: #5f5650;
}

.card-info {
  display: block;
  flex: 0 0 auto;
  min-height: 96px;
}

.card-info-link {
  display: block;
  min-width: 0;
  color: inherit;
}

.card-info-link:hover .card-title {
  color: var(--accent-dark);
}

.card-gal-toggle:nth-of-type(1):checked ~ .card-gal-slide:nth-of-type(1),
.card-gal-toggle:nth-of-type(2):checked ~ .card-gal-slide:nth-of-type(2),
.card-gal-toggle:nth-of-type(3):checked ~ .card-gal-slide:nth-of-type(3),
.card-gal-toggle:nth-of-type(4):checked ~ .card-gal-slide:nth-of-type(4),
.card-gal-toggle:nth-of-type(5):checked ~ .card-gal-slide:nth-of-type(5),
.card-gal-toggle:nth-of-type(6):checked ~ .card-gal-slide:nth-of-type(6),
.card-gal-toggle:nth-of-type(7):checked ~ .card-gal-slide:nth-of-type(7),
.card-gal-toggle:nth-of-type(8):checked ~ .card-gal-slide:nth-of-type(8) {
  display: block;
}

.card-gal-nav {
  position: absolute;
  top: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  cursor: pointer;
  color: #fff;
  font-size: 24px;
  z-index: 5;
  opacity: 0.9;
  background: rgba(28,25,23,0.64);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: opacity 200ms ease;
  user-select: none;
  backdrop-filter: blur(8px);
}

.card-gal-nav:hover { opacity: 1; }

.card-gal-nav.prev { left: 10px; }
.card-gal-nav.next { right: 10px; }

.item-copy {
  padding: 12px;
}

.card-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.16;
  min-height: 1.16em;
  margin-bottom: 16px;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0;
  color: var(--ink);
}

.card-title-with-signals {
  margin-bottom: 8px;
}

.card-signals {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 20px;
  margin: 0 0 10px;
}

.card-signal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f5f5f4;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.card-signal-new {
  background: #edf7ed;
  color: #2f6b3a;
}

.card-signal-verified {
  background: rgba(117,0,20,0.06);
  color: var(--accent-dark);
}

.card-signal-verified-link {
  padding-left: 6px;
  transition: background 160ms ease, transform 160ms ease;
}

.card-signal-verified-link:hover {
  background: rgba(117,0,20,0.1);
  color: var(--accent-dark);
  transform: translateY(-1px);
}

.card-signal-icon {
  display: block;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  object-fit: contain;
}

.card-signal-unverified {
  background: #f1f0ee;
  color: #78716c;
}

.price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 20px;
  color: #211d1a;
  font-size: 1.08rem;
  font-weight: 790;
  line-height: 1.2;
  margin-bottom: 5px;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.price .badge {
  flex: 0 0 auto;
}

.listing-condition {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex: 0 0 auto;
}

.price-value {
  margin-left: auto;
  min-width: 0;
  text-align: right;
  white-space: nowrap;
}

.price-offer {
  color: var(--accent-dark);
  font-size: 1.04rem;
  font-weight: 760;
}

html[lang="de-CH"] .price-offer,
html[lang="fr-CH"] .price-offer {
  font-size: 0.92rem;
}

.price-reserved .price-value {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  color: var(--accent-dark);
  font-size: 0.96rem;
  font-weight: 760;
}

.reserved-info {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  outline: none;
}

.reserved-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(117,0,20,0.3);
  border-radius: 999px;
  background: rgba(117,0,20,0.06);
  color: var(--accent-dark);
  font-size: 0.64rem;
  font-weight: 780;
  line-height: 1;
  cursor: help;
}

.reserved-tooltip {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 20;
  width: 190px;
  max-width: 72vw;
  padding: 7px 8px;
  border: 1px solid rgba(117,0,20,0.14);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 22px rgba(28,25,23,0.16);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.32;
  text-align: left;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translateY(3px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.reserved-info:hover .reserved-tooltip,
.reserved-info:focus .reserved-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.listing-submeta {
  font-size: 0.76rem;
  font-weight: 450;
  line-height: 1.25;
  color: var(--muted);
}

.listing-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.listing-meta-row span {
  min-width: 0;
  font-size: 0.7rem;
  font-weight: 400;
}

.listing-delivery {
  text-align: right;
  white-space: nowrap;
}

/* ---- Buttons ---- */

.actions, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 180ms ease;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}

.actions:hover, button:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

button.favorite-button,
.favorite-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  width: 38px;
  min-width: 38px;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: 999px;
  background: rgba(255,255,255,0.88);
  color: #6a5d55;
  box-shadow: 0 8px 18px rgba(28,25,23,0.16);
  cursor: pointer;
  transition: transform 160ms ease,
    color 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
  backdrop-filter: blur(10px);
}

button.favorite-button:hover,
.favorite-button:hover {
  transform: translateY(-1px);
  background: #fff;
  border-color: rgba(112,52,58,0.28);
  color: var(--accent);
}

button.favorite-button.is-favorite,
.favorite-button.is-favorite {
  background: #fff5f5;
  border-color: rgba(112,52,58,0.34);
  color: var(--accent);
}

.favorite-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 1.25rem;
  line-height: 1;
}

button.card-favorite,
.favorite-button.card-favorite {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 8;
  width: 36px;
  min-width: 36px;
  height: 36px;
  border-color: rgba(255,255,255,0.34);
  background: rgba(255,255,255,0.22);
  color: var(--accent);
  box-shadow: 0 5px 12px rgba(28,25,23,0.08);
  backdrop-filter: none;
}

button.card-favorite:hover,
.favorite-button.card-favorite:hover {
  border-color: rgba(255,255,255,0.54);
  background: rgba(255,255,255,0.38);
}

button.card-favorite.is-favorite,
.favorite-button.card-favorite.is-favorite {
  border-color: rgba(112,52,58,0.34);
  background: rgba(255,245,245,0.46);
}

.card-favorite .favorite-icon {
  font-size: 1.12rem;
  text-shadow: 0 1px 4px rgba(255,255,255,0.7),
    0 1px 7px rgba(28,25,23,0.22);
}

.detail-favorite {
  height: 40px;
  width: 40px;
  min-width: 40px;
  padding: 0;
  flex-shrink: 0;
}

button.detail-favorite.is-favorite,
.favorite-button.detail-favorite.is-favorite,
.detail-favorite.is-favorite .favorite-icon {
  color: var(--accent);
}

/* ---- Modals ---- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal:target,
.modal.is-open { display: flex; }

body:has(.modal:target),
body.item-modal-open,
body.verification-modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(28,25,23,0.3);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: clamp(24px, 5vw, 48px);
}

.verification-panel {
  width: min(430px, 100%);
  padding: 24px;
  border-radius: 14px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: clamp(20px, 4vw, 36px);
}

.modal-close {
  font-size: 1.5rem;
  line-height: 1;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface-muted);
  border: 0;
  cursor: pointer;
  font-family: inherit;
  transition: all 150ms ease;
  margin-top: -4px;
  margin-right: -8px;
}

.modal-close:hover {
  background: var(--line);
  color: var(--ink);
}

.modal-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(24px, 5vw, 56px);
}

.item-modal {
  z-index: 120;
}

.verified-status-modal {
  z-index: 150;
}

.item-modal-panel {
  width: min(1040px, 100%);
}

.item-modal .item-head {
  gap: 16px;
  padding-right: 54px;
}

.item-modal .item-head > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.item-modal .item-head h2 {
  overflow-wrap: anywhere;
}

.item-modal .item-modal-close-fixed {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  margin-top: 0;
  margin-right: 0;
}

.item-modal-loading,
.item-modal-error {
  min-height: 240px;
  display: grid;
  place-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

.item-modal-error p {
  margin: 0;
}

.modal-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-price-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.detail-price-copy {
  min-width: 0;
}

.detail-save-action.detail-favorite {
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  gap: 0;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-muted);
  font-size: 0.76rem;
  font-weight: 650;
}

.detail-save-action .favorite-icon {
  width: 15px;
  height: 15px;
  font-size: 1rem;
}

.modal-details h4 {
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0;
  color: var(--muted);
  margin: 0;
}

.modal-details p {
  color: var(--ink);
  font-size: 0.95rem;
  letter-spacing: 0;
}

.verification-head {
  align-items: flex-start;
  margin-bottom: 18px;
}

.verification-head h2 {
  margin: 2px 0 0;
  font-size: 1.28rem;
}

.verification-eyebrow {
  display: block;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.verification-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.verification-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.verification-hero-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  opacity: 0.5;
  filter: grayscale(1) brightness(1.62) contrast(0.58);
}

.verified-status-modal .verification-hero-icon img {
  opacity: 1;
  filter: none;
}

.verification-level-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 36px;
}

.verification-current-icon {
  display: block;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  object-fit: contain;
}

.verification-legend {
  display: grid;
  gap: 6px;
  padding: 0;
}

.verification-legend-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.verification-legend-row small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 550;
  line-height: 1.2;
}

.verification-level-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 999px;
}

.verification-level-dot-bronze {
  background: #b87333;
}

.verification-level-dot-silver {
  background: #aeb7c2;
}

.verification-level-dot-gold {
  background: #d6a51d;
}

.verification-body p {
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.55;
}

.verification-body strong {
  color: var(--ink);
}

.verification-note-box {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(117,0,20,0.16);
  border-radius: 8px;
  background: rgba(117,0,20,0.035);
}

.verification-note-box p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.verification-item-note {
  padding-top: 6px;
  border-top: 1px solid rgba(117,0,20,0.12);
}

.verification-terms-preview {
  display: grid;
  gap: 8px;
  padding-top: 2px;
}

.verification-terms-preview h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 720;
  letter-spacing: 0;
}

.verification-term-row {
  display: grid;
  gap: 2px;
}

.verification-term-row strong {
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 700;
}

.verification-term-row span {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.verification-terms-link {
  width: max-content;
  max-width: 100%;
  margin-top: 1px;
  font-size: 0.76rem;
}

.verified-status-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.verified-status-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.verification-verifier-cta {
  display: grid;
  justify-items: start;
  gap: 1px;
  margin-top: -2px;
}

.verification-verifier-cta-secondary {
  justify-items: center;
  margin-top: 10px;
  text-align: center;
}

.verification-verifier-cta-secondary .verification-small {
  max-width: 260px;
  color: var(--muted) !important;
  font-size: 0.68rem !important;
  line-height: 1.35;
}

.verification-verifier-cta-secondary .verified-status-link {
  color: var(--muted);
  font-size: inherit;
  font-weight: 600;
  text-decoration: none;
}

.verification-verifier-cta-secondary .verified-status-link:hover {
  color: var(--ink);
  text-decoration: underline;
}

.verification-inline-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(117,0,20,0.16);
  border-radius: 8px;
  background: rgba(117,0,20,0.035);
}

.verification-inline-panel-unverified {
  gap: 12px;
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: transparent;
}

.verification-inline-panel-verified {
  margin-top: 14px;
}

.verification-inline-head {
  display: grid;
  gap: 2px;
}

.verification-inline-head h4 {
  margin: 0;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 720;
  letter-spacing: 0;
}

.verification-inline-panel p {
  margin: 0;
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.45;
}

.verification-option {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(117,0,20,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.76);
}

.verification-inline-panel-unverified .verification-option {
  padding: 0;
  border: 0;
  background: transparent;
}

.verification-option-inspection {
  grid-template-columns: minmax(0, 1fr) 16px;
  gap: 6px;
  align-items: start;
}

.verification-option-full.bid-toggle {
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px;
}

.verification-inline-panel-unverified .verification-option-full.bid-toggle {
  padding: 0;
}

.verification-option-full .bid-track {
  margin-top: 2px;
}

.verification-option-copy,
.verification-option-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.verification-option-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.verification-option-title .reserved-tooltip {
  right: auto;
  left: 0;
  width: 220px;
}

.verification-option-inspection > .reserved-info .reserved-tooltip {
  right: 0;
  left: auto;
  width: 220px;
}

.verification-option-copy strong,
.verification-option-head strong {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
}

.verification-option-copy span,
.verification-option-head span {
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.35;
}

.verification-option-copy small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.verification-progress {
  display: grid;
  gap: 5px;
}

.verification-progress-bar {
  position: relative;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(117,0,20,0.12);
}

.verification-progress-bar::before {
  content: "";
  display: block;
  width: var(--verification-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.verification-progress small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
}

.verification-inline-panel .verification-small {
  font-size: 0.76rem !important;
  line-height: 1.35;
}

.verification-inline-panel .verification-actions {
  margin-top: 2px;
}

.verification-inline-panel .verification-verifier-cta {
  margin-top: -1px;
}

.verification-inline-panel-verified {
  gap: 11px;
  padding: 0;
  border: 0;
  background: transparent;
}

.verification-inline-status {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
}

.verification-inline-icon {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.verification-inline-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.verification-inline-copy strong {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
}

.verification-inline-copy span {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.verification-inline-copy small {
  padding-top: 4px;
  border-top: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.verification-inline-copy .verified-status-link {
  width: max-content;
  max-width: 100%;
  margin-top: 2px;
  font-size: 0.74rem;
}

.reservation-panel {
  display: grid;
  gap: 9px;
  padding: 0;
  border: 0;
  background: transparent;
}

.reservation-panel-active {
  padding: 0;
  border: 0;
  background: transparent;
}

.reservation-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.reservation-head h4 {
  margin: 0;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 720;
  letter-spacing: 0;
}

.reservation-head .reserved-tooltip {
  right: auto;
  left: 0;
  width: 220px;
}

.reservation-small {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.reservation-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.reservation-options input {
  display: none;
}

.reservation-options label {
  display: grid;
  gap: 1px;
  min-width: 0;
  padding: 7px 5px;
  border: 1px solid rgba(28,25,23,0.12);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  text-align: center;
  cursor: pointer;
  transition: border-color 150ms ease,
    background 150ms ease,
    color 150ms ease;
}

.reservation-options label strong {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.15;
}

.reservation-options label span {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.2;
}

.reservation-options input:checked + label {
  border-color: rgba(117,0,20,0.34);
  background: rgba(117,0,20,0.075);
  color: var(--accent);
}

.reservation-options input:checked + label span {
  color: var(--accent);
}

.reservation-active-row {
  display: grid;
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
}

.reservation-active-row span {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
}

.reservation-active-row strong {
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 720;
  line-height: 1.25;
}

.verification-small {
  color: var(--muted) !important;
  font-size: 0.86rem !important;
}

.verification-verifier-cta .verification-small {
  font-size: 0.74rem !important;
  line-height: 1.25;
}

.verification-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.verification-action,
.verification-cancel {
  height: 40px;
  padding: 0 18px;
}

.verification-inline-panel .verification-action {
  min-height: 36px;
  height: auto;
  padding: 8px 16px;
  border-color: rgba(28,25,23,0.16);
  background: #f4f5f6;
  color: #5f6368;
  font-size: 0.8rem;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}

.verification-inline-panel .verification-action:hover,
.verification-inline-panel .verification-action:focus {
  border-color: rgba(28,25,23,0.24);
  background: #eceff1;
  color: var(--ink);
}

.item-detail-page .item-head h1,
.item-modal .item-head h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 650;
  line-height: 1.16;
  letter-spacing: 0;
  color: var(--ink);
  margin: 0;
}

.item-detail-page .modal-details p,
.item-modal .modal-details p {
  color: var(--muted);
  font-weight: 450;
  line-height: 1.55;
}

.item-detail-page .detail-price,
.item-modal .detail-price {
  color: #211d1a;
  font-size: 1.08rem;
  font-weight: 790;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.item-detail-page .detail-price.price-offer,
.item-modal .detail-price.price-offer {
  color: var(--accent-dark);
  font-size: 1.04rem;
  font-weight: 760;
}

.item-detail-page .detail-price.price-reserved,
.item-modal .detail-price.price-reserved {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-dark);
  font-size: 1.02rem;
  font-weight: 760;
}

.item-detail-page .detail-price .reserved-tooltip,
.item-modal .detail-price .reserved-tooltip {
  right: auto;
  left: 0;
}

.item-detail-page .detail-meta-line,
.item-modal .detail-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 450;
  line-height: 1.3;
}

.item-detail-page .detail-description,
.item-modal .detail-description {
  font-size: 0.88rem;
  line-height: 1.5;
}

.detail-meta-dot {
  color: #b8aaa4;
}

.detail-condition-row {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

/* ---- Detail pages ---- */

.detail-page {
  padding-top: 32px;
}

.item-detail-page {
  padding-top: 12px;
}

.page-panel {
  width: min(960px, 100%);
  margin: 18px auto 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 48px);
}

.seller-panel {
  max-width: 760px;
}

.seller-page {
  padding-top: 12px;
}

.seller-page .seller-panel {
  margin-top: 0;
  padding-top: 28px;
}

.item-detail-page .page-panel {
  margin-top: 0;
  padding-top: 28px;
}

.legal-panel {
  max-width: 720px;
}

.legal-panel h1 {
  margin-bottom: 18px;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
}

.legal-panel h2 {
  margin: 26px 0 12px;
  color: var(--ink);
  font-size: 1.14rem;
  font-weight: 720;
  letter-spacing: 0;
}

.legal-panel h3 {
  margin: 18px 0 6px;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0;
}

.legal-section {
  scroll-margin-top: 92px;
}

.legal-verification-levels {
  display: grid;
  gap: 14px;
  margin: 18px 0 20px;
}

.legal-verification-level {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
}

.legal-verification-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.legal-verification-level h3 {
  margin-top: 0;
}

.legal-verification-level p {
  margin-bottom: 0;
}

.legal-panel p {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.65;
  margin-bottom: 14px;
}

.legal-panel p:last-child {
  margin-bottom: 0;
}

.legal-panel a {
  color: var(--accent);
  text-decoration: none;
}

.legal-panel a:hover {
  text-decoration: underline;
}

.seller-head {
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.seller-head h1 {
  margin: 0;
}

.seller-head .back-arrow {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  font-size: 1.55rem;
  box-shadow: var(--shadow);
}

.item-head > div {
  min-width: 0;
  flex: 1 1 auto;
}

.item-head .detail-favorite {
  flex: 0 0 auto;
  margin-left: auto;
}

.seller-title-note {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.48em;
  font-weight: 600;
}

.back-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-md);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
}

.back-arrow:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---- Forms ---- */

form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink);
}

input, select, textarea {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 0.85rem;
  background: var(--surface);
  transition: border-color 150ms ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--ink);
}

::placeholder {
  font-size: 0.85rem;
  opacity: 0.5;
}

.photo-upload-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.photo-upload-row .photo-upload-zone {
  min-width: 0;
  width: auto;
  margin-bottom: 0;
}

.photo-upload-extra .upload-hint h3 {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 4px;
}

.photo-upload-zone {
  display: block;
  position: relative;
  height: 160px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted) center/cover no-repeat;
  cursor: pointer;
  transition: all 150ms ease;
  overflow: hidden;
}

.photo-upload-zone:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.photo-upload-main.has-preview {
  border-style: solid;
  border-color: #2e7d32;
  background-color: transparent;
}
.photo-upload-zone .photo-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.photo-preview-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: 3px;
  padding: 4px;
  background: var(--surface-muted);
  z-index: 0;
}

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

.photo-preview-grid[data-count="1"] {
  grid-template-columns: 1fr;
}

.photo-preview-grid span {
  display: block;
  min-width: 0;
  overflow: hidden;
  border-radius: 6px;
  background: #e8ecef;
}

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

.photo-preview-grid .photo-preview-more {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  background: rgba(28,25,23,0.72);
}

.photo-upload-extra.has-preview .photo-preview {
  display: none;
}

.photo-upload-zone.has-preview .upload-hint {
  display: none;
}
.photo-upload-main.has-preview::after {
  content: "\2713";
  position: absolute;
  top: 8px;
  right: 46px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2e7d32;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
  z-index: 1;
}

.photo-clear {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 999px;
  background: rgba(28,25,23,0.72);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
  backdrop-filter: blur(8px);
}

.photo-upload-zone.has-preview .photo-clear {
  display: inline-flex;
}

.photo-clear:hover {
  background: rgba(117,0,20,0.9);
  border-color: rgba(255,255,255,0.9);
  color: #fff;
}

.photo-upload-extra.has-preview[data-count]:not([data-count="1"])::before {
  content: attr(data-count) " photos";
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 1;
}

.photo-upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.upload-hint {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  pointer-events: none;
}

.upload-hint h3 {
  margin-bottom: 2px;
  color: var(--ink);
}

.upload-hint p {
  margin: 0;
  font-size: 0.85rem;
}

.upload-state-selected { display: none; color: #2e7d32; }
.photo-upload-main input:valid ~ .upload-hint .upload-state-initial { display: none; }
.photo-upload-main input:valid ~ .upload-hint .upload-state-selected { display: block; }
.photo-upload-main input:valid { cursor: pointer; }
.photo-upload-main:has(input:valid) {
  border-color: #2e7d32;
  background-color: #f1f8e9;
  border-style: solid;
}

.modal-details-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-details-form .buy-action + .reservation-panel {
  margin-top: 8px;
}

.modal-details-form textarea {
  min-height: 80px;
  field-sizing: content;
  resize: vertical;
  overflow: hidden;
}

.email-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
}

.verify-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  margin-top: 24px;
}
.verify-form input[name="code"] {
  font-family: ui-monospace, monospace;
  font-size: 1.4rem;
  letter-spacing: 0.25em;
  text-align: center;
  text-transform: uppercase;
}


.modal-form-side h3 {
  font-size: 0.95rem;
  letter-spacing: 0;
  margin-bottom: 12px;
}

.seller-listing-form {
  display: none;
}

body.seller-authenticated .seller-auth-form {
  display: none;
}

body.seller-authenticated .seller-listing-form {
  display: flex;
}

.seller-auth-status {
  display: none;
  margin-bottom: 18px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.seller-authenticated .seller-auth-status {
  display: flex;
}

.seller-auth-status p {
  min-width: 0;
  color: var(--muted);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.seller-auth-status form {
  flex: 0 0 auto;
}

.seller-upload-status {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(112, 24, 43, 0.08);
}

.seller-upload-status p {
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.45;
}

/* ---- Seller modal ---- */

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.form-actions .buy-action { margin-left: auto; }
.form-actions:has(.btn-reset) .buy-action {
  margin-left: 0;
}

.btn-reset, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 180ms ease;
}

.btn-secondary {
  border: 1px solid #d4d4d4;
  background: #e7e5e4;
  color: #44403c;
}
.btn-secondary:hover {
  background: #d6d3d1;
  border-color: #a8a29e;
}

.btn-reset {
  border: 1px solid #d32f2f;
  background: none;
  color: #d32f2f;
}
.btn-reset:hover {
  background: #fef2f2;
  border-color: #b71c1c;
  color: #b71c1c;
}

/* ---- Category pick (details/summary) ---- */
.category-pick {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  background: var(--surface-muted);
}
.category-pick summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  font-size: 0.9rem;
  color: var(--muted);
}
.category-pick summary::-webkit-details-marker { display: none; }
.category-pick summary strong {
  color: var(--ink);
  font-weight: 600;
}
.category-pick .change-link {
  color: var(--accent, #2563eb);
  font-weight: 600;
  text-decoration: underline;
}
.category-pick[open] summary { margin-bottom: 10px; }
.category-pick select { width: 100%; }

/* ---- Bid toggle (auction-style switch) ---- */
.bid-toggle {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  cursor: pointer;
}
.bid-toggle input { display: none; }
.bid-track {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: var(--line);
  transition: background 150ms ease;
}
.bid-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform 150ms ease;
}
.bid-toggle input:checked ~ .bid-track {
  background: var(--accent, #2563eb);
}
.bid-toggle input:checked ~ .bid-track .bid-thumb {
  transform: translateX(20px);
}
.bid-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-weight: 600;
  color: var(--ink);
}
.bid-text small {
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--muted);
}

.batch-toggle { display: none; }

.batch-slot-1,
.batch-slot-2,
.batch-slot-3,
.batch-slot-4,
.batch-slot-5,
.batch-slot-6,
.batch-slot-7,
.batch-slot-8,
.batch-slot-9 {
  display: none;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

#show-slot-1:checked ~ .batch-slot-1,
#show-slot-2:checked ~ .batch-slot-2,
#show-slot-3:checked ~ .batch-slot-3,
#show-slot-4:checked ~ .batch-slot-4,
#show-slot-5:checked ~ .batch-slot-5,
#show-slot-6:checked ~ .batch-slot-6,
#show-slot-7:checked ~ .batch-slot-7,
#show-slot-8:checked ~ .batch-slot-8,
#show-slot-9:checked ~ .batch-slot-9 {
  display: block;
}

.batch-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 56px;
  width: 100%;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
  cursor: pointer;
  color: var(--ink);
  transition: all 150ms ease;
  padding: 10px 16px;
  margin-top: 8px;
}

.batch-add-main {
  font-weight: 600;
  font-size: 0.95rem;
}
.batch-add-sub {
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--muted);
}

.batch-add:hover {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}
.batch-add:hover .batch-add-sub {
  color: var(--accent);
}

.batch-add-2,
.batch-add-3,
.batch-add-4,
.batch-add-5,
.batch-add-6,
.batch-add-7,
.batch-add-8,
.batch-add-9 { display: none; }

#show-slot-1:checked ~ .batch-add-1 { display: none; }
#show-slot-1:checked ~ .batch-add-2 { display: flex; }
#show-slot-2:checked ~ .batch-add-2 { display: none; }
#show-slot-2:checked ~ .batch-add-3 { display: flex; }
#show-slot-3:checked ~ .batch-add-3 { display: none; }
#show-slot-3:checked ~ .batch-add-4 { display: flex; }
#show-slot-4:checked ~ .batch-add-4 { display: none; }
#show-slot-4:checked ~ .batch-add-5 { display: flex; }
#show-slot-5:checked ~ .batch-add-5 { display: none; }
#show-slot-5:checked ~ .batch-add-6 { display: flex; }
#show-slot-6:checked ~ .batch-add-6 { display: none; }
#show-slot-6:checked ~ .batch-add-7 { display: flex; }
#show-slot-7:checked ~ .batch-add-7 { display: none; }
#show-slot-7:checked ~ .batch-add-8 { display: flex; }
#show-slot-8:checked ~ .batch-add-8 { display: none; }
#show-slot-8:checked ~ .batch-add-9 { display: flex; }
#show-slot-9:checked ~ .batch-add-9 { display: none; }

.batch-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  width: 100%;
  background: none;
  border: 2px dashed var(--line);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: 16px;
  transition: all 150ms ease;
}

.batch-remove:hover {
  background: none;
  border-color: var(--accent);
  color: var(--accent);
}

/* ---- Notice pages ---- */

.notice {
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
  padding: 80px 0;
}

.notice h1 { margin-bottom: 16px; }

.notice-image {
  max-width: 280px;
  margin: 0 auto 24px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.notice-image img {
  width: 100%;
  height: auto;
  display: block;
}

.notice p {
  margin-bottom: 32px;
  font-size: 1rem;
}

/* ---- Footer ---- */

.footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 86px 0 48px;
  margin-top: 64px;
}

.footer-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
}

.footer-logo {
  height: 30px;
  margin-bottom: 7px;
  opacity: 0.92;
  filter: drop-shadow(0 10px 20px rgba(112,52,58,0.12));
}

.footer-contact {
  color: var(--accent);
  font-size: 0.85rem;
}

.footer-safety {
  max-width: 620px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 400;
  line-height: 1.45;
}

.footer-legal {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  width: 100%;
  margin-top: 16px;
  padding-top: 4px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 400;
  line-height: 1.35;
}

.footer-legal a {
  color: var(--muted);
  font-weight: 400;
  text-decoration: none;
}

.footer-legal a:hover {
  color: var(--accent);
}

/* ---- Responsive ---- */

@media (max-width: 900px) {
  .header-body {
    grid-template-columns: auto 1fr auto;
  }
  .market-tagline {
    font-size: 0.78rem;
    font-weight: 700;
  }
  .items { grid-template-columns: repeat(2, 1fr); }
  .modal-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .modal-panel { padding: 28px 24px; }
  .page-panel { padding: 28px 24px; }
  .form-grid { grid-template-columns: 1fr; gap: 14px; }
}

@media (min-width: 1377px) {
  .header-tools .brand-link { transform: none; }
}

@media (max-width: 600px) {
  .brand-mark {
    width: 118px;
    height: 34px;
  }
  .brand-mark svg {
    width: 118px;
    height: 80px;
    margin-top: 5px;
  }
  .header { padding: 4px 0; }
  .header-body {
    min-height: 40px;
    gap: 7px;
  }
  .header .actions {
    height: 34px;
    padding: 0 18px;
  }
  .market-tagline { display: none; }
  .header-tools { gap: 7px; }
  .header-tools .brand-link { transform: none; }
  .language-menu summary {
    width: 48px;
    height: 34px;
  }
  .shell { width: calc(100% - 28px); }
  h2 { font-size: 1.4rem; }

  .section { padding: 0 0 48px; }

  .detail-page { padding-top: 20px; }
  .item-detail-page { padding-top: 10px; }
  .seller-page { padding-top: 10px; }
  .back-arrow {
    width: 44px;
    height: 44px;
    font-size: 1.55rem;
  }

  .filter-bar {
    flex-wrap: nowrap;
    overflow: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    margin-top: 10px;
    margin-bottom: 16px;
    padding-bottom: 4px;
  }
  .filter-bar::-webkit-scrollbar { display: none; }
  .filter-pill {
    flex-shrink: 0;
    height: 32px;
    padding: 0 14px;
    font-size: 0.78rem;
  }
  .filter-menu-panel {
    min-width: 178px;
  }
  .favorites-filter,
  .verified-filter {
    width: 34px;
    padding: 0;
  }
  .verified-filter-icon {
    width: 20px;
    height: 20px;
  }

  .items { grid-template-columns: 1fr; gap: 12px; }
  .card-gallery { height: auto; }
  .card-info {
    min-height: 92px;
  }
  .item-copy { padding: 10px 11px 11px; }
  .card-title {
    font-size: 0.93rem;
    margin-bottom: 12px;
  }
  .price {
    font-size: 1.02rem;
    margin-bottom: 4px;
  }
  .price-offer { font-size: 1rem; }
  .listing-submeta { font-size: 0.74rem; }

  .card-gallery,
  .modal-gallery {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .card-gallery::-webkit-scrollbar,
  .modal-gallery::-webkit-scrollbar {
    display: none;
  }
  .card-gal-slide {
    display: block !important;
    flex: 0 0 100%;
    scroll-snap-align: start;
  }
  .gallery-count {
    top: 8px;
    right: 8px;
    height: 22px;
    padding: 0 8px 0 9px;
    font-size: 0.68rem;
  }
  .card-gal-nav {
    width: 34px;
    height: 34px;
    font-size: 22px;
    opacity: 0.92;
  }
  .card-gal-nav.prev { left: 8px; }
  .card-gal-nav.next { right: 8px; }

  .modal { padding: 0; }
  .modal-panel {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    border: none;
    padding: 20px 18px;
    -webkit-overflow-scrolling: touch;
  }
  .modal-head { margin-bottom: 20px; }
  .page-panel {
    margin-top: 14px;
    border-radius: var(--radius);
    padding: 20px 18px;
  }
  .photo-upload-zone { height: 120px; }

  .batch-slot-1,
  .batch-slot-2,
  .batch-slot-3,
  .batch-slot-4,
  .batch-slot-5,
  .batch-slot-6,
  .batch-slot-7,
  .batch-slot-8,
  .batch-slot-9 { padding-top: 14px; }

  .actions, button {
    height: 40px;
    padding: 0 20px;
    font-size: 0.85rem;
  }
  .favorite-button {
    height: 36px;
    width: 36px;
    min-width: 36px;
    padding: 0;
    font-size: 0.85rem;
  }
  .card-favorite {
    right: 9px;
    bottom: 9px;
    width: 34px;
    min-width: 34px;
    height: 34px;
  }
  .detail-favorite {
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
  }

  .form-actions { gap: 8px; }
  .btn-reset, .btn-secondary,
  .form-actions .buy-action {
    padding: 0 16px;
  }

  .footer { padding: 62px 0 32px; margin-top: 32px; }
  .footer-logo {
    height: 24px;
    margin-bottom: 5px;
  }

  .notice { padding: 48px 0; }
  .notice p {
    font-size: 0.95rem;
    margin-bottom: 24px;
  }
}

@media (max-width: 340px) {
  .price { gap: 6px; }
  .listing-condition { gap: 3px; }
  .card-signal {
    padding: 0 6px;
    font-size: 0.6rem;
  }
  .badge { padding-inline: 6px; }
  html[lang="de-CH"] .price-offer,
  html[lang="fr-CH"] .price-offer {
    font-size: 0.86rem;
  }
}
