/* SellShnell
   Palette: ink navy, cool paper, cobalt for actions, signal yellow for prices + selling.
   The yellow price sticker is the one loud element; everything else stays quiet. */

:root {
  --ink: #15193A;
  --ink-2: #2B3160;
  --paper: #EEF1F7;
  --card: #FFFFFF;
  --line: #D5DBE7;
  --muted: #565E7D;
  --cobalt: #2440F0;
  --cobalt-dark: #1A30C4;
  --sticker: #FFD84A;
  --sticker-dark: #F2C200;
  --danger: #C8102E;
  --ok: #0F7A4A;
  --warn-bg: #FFF5CC;
  --warn-text: #6B5200;
  --bar: var(--ink);            /* top bar background */
  --on-bar: #FFFFFF;            /* text on the top bar */
  --on-bar-muted: #C9CEEA;
  --on-primary: #FFFFFF;        /* text on primary buttons */
  --on-sticker: var(--ink);     /* text on yellow price tags / sell button */
  --field: #FFFFFF;             /* input background */
  --scrim: rgba(21, 25, 58, .75);
  --tint-primary: #E3E7FF;
  --tint-danger: #FCE8EB;
  --tint-ok: #DDF3E8;
  --hard-shadow: var(--ink);
  --bar-2: var(--ink-2);        /* highlight inside the top bar */

  --display: 'Bricolage Grotesque', 'Arial Narrow', Arial, sans-serif;
  --body: 'Atkinson Hyperlegible', 'Segoe UI', Arial, sans-serif;

  --r-sm: 4px;
  --r-md: 8px;
  --gap: 1rem;
  --wrap: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 1rem/1.5 var(--body);
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5rem; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); font-weight: 800; }
h2 { font-size: 1.25rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 .75rem; }
a { color: var(--cobalt); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.optional { font-weight: 400; color: var(--muted); font-size: .875rem; }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--sticker); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }
[hidden] { display: none !important; }

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

/* ── buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font: 700 .95rem/1 var(--body);
  padding: .75rem 1.1rem;
  border-radius: var(--r-sm);
  border: 2px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  background: var(--card); color: var(--ink);
}
.btn:disabled { opacity: .6; cursor: progress; }
.btn-primary { background: var(--cobalt); color: var(--on-primary); }
.btn-primary:hover { background: var(--cobalt-dark); }
.btn-dark { background: var(--bar); color: var(--on-bar); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost-light { background: transparent; color: var(--on-bar); border-color: color-mix(in srgb, var(--on-bar) 35%, transparent); }
.btn-ghost-light:hover { border-color: var(--on-bar); }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.btn-danger-ghost:hover { border-color: var(--danger); }
.btn-sell {
  background: var(--sticker); color: var(--on-sticker);
  font-family: var(--display); font-weight: 800; font-size: 1rem;
  box-shadow: 3px 3px 0 var(--hard-shadow);
}
.btn-sell:hover { background: var(--sticker-dark); }
.btn-sell:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--hard-shadow); }
.btn.big { width: 100%; padding: 1rem; font-size: 1.1rem; }
.small-btn { padding: .5rem .8rem; font-size: .875rem; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--cobalt); text-decoration: underline; cursor: pointer; }
.icon-btn { background: none; border: 0; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--muted); padding: .2rem .5rem; border-radius: var(--r-sm); }
.icon-btn:hover { color: var(--ink); background: var(--paper); }

/* ── forms */
label { display: block; font-weight: 700; font-size: .925rem; margin-bottom: .9rem; }
input, select, textarea {
  display: block; width: 100%; margin-top: .35rem;
  font: 400 1rem/1.4 var(--body); color: var(--ink);
  padding: .65rem .75rem;
  background: var(--field); border: 2px solid var(--line); border-radius: var(--r-sm);
}
input:focus, select:focus, textarea:focus { border-color: var(--cobalt); outline: none; }
textarea { resize: vertical; }
select[size] { padding: .25rem; }
select[size] option { padding: .3rem .4rem; border-radius: 3px; }
fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
legend { font-weight: 700; font-size: .925rem; margin-bottom: .4rem; padding: 0; }
.radio, .check { display: flex; align-items: center; gap: .55rem; font-weight: 400; margin-bottom: .4rem; cursor: pointer; }
.radio input, .check input { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--cobalt); }
.form-error { color: var(--danger); font-weight: 700; min-height: 0; }
.form-error:empty { display: none; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .5rem; }
.actions.spread { justify-content: space-between; }
.actions.spread > div { display: flex; gap: .6rem; flex-wrap: wrap; }
.row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 1rem; }

/* ── top bar */
.topbar {
  background: var(--bar); color: var(--on-bar);
  display: flex; align-items: center; gap: 1rem 1.25rem; flex-wrap: wrap;
  padding: .85rem clamp(1rem, 3vw, 2rem);
}
.logo {
  font: 800 1.6rem/1 var(--display);
  color: var(--on-bar); text-decoration: none; letter-spacing: -0.03em;
  position: relative; padding-bottom: .2rem;
}
.logo::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 5px;
  background: var(--sticker); transform: skewX(-24deg);
}
.portal-name { font: 500 1rem var(--display); color: var(--on-bar-muted); }
.search { flex: 1 1 320px; display: flex; gap: .5rem; max-width: 640px; }
.search input { margin: 0; border-color: transparent; }
.search .btn-dark { background: var(--bar-2); }
.topbar .btn-sell { margin-left: auto; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.who { font-size: .875rem; color: var(--on-bar-muted); }

/* ── ad banner */
.ad-slot {
  position: relative; max-width: var(--wrap); margin: 1rem auto 0; width: calc(100% - 2 * clamp(1rem, 3vw, 2rem));
  aspect-ratio: 6 / 1; max-height: 180px;
  background: var(--card); border-radius: var(--r-md); overflow: hidden;
}
.ad-frame { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.ad-frame.on { opacity: 1; pointer-events: auto; }
.ad-frame a, .ad-frame img { width: 100%; height: 100%; }
.ad-frame img { object-fit: cover; }
.ad-tag { position: absolute; top: .4rem; right: .5rem; z-index: 2; font-size: .7rem; background: var(--scrim); color: #fff; padding: .1rem .4rem; border-radius: 3px; }
@media (prefers-reduced-motion: reduce) { .ad-frame { transition: none; } }

/* ── buyer marketplace */
.market {
  max-width: var(--wrap); margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 250px 1fr; gap: 2rem;
  padding: 1.5rem clamp(1rem, 3vw, 2rem) 3rem;
}
.filters form { position: sticky; top: 1rem; }
.filters-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .75rem; }
.filters-head h2 { margin: 0; }
.price-range { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem; }
.price-range legend { grid-column: 1 / -1; }
.price-range input { margin: 0; }
.only-mobile { display: none; }

.results-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.count { margin: 0; font-weight: 700; }
.results-tools { display: flex; gap: .6rem; align-items: center; }
.sort { display: flex; align-items: center; gap: .5rem; margin: 0; }
.sort select { margin: 0; width: auto; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1.25rem 1rem; }
.grid[aria-busy=true] { opacity: .55; }
.item-card { position: relative; display: flex; }
.item-open {
  all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; width: 100%;
  background: var(--card); border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--line);
}
.item-open:hover { border-color: var(--ink); }
.item-open:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.item-photo { position: relative; display: block; aspect-ratio: 1; background: var(--paper); }
.item-photo img { width: 100%; height: 100%; object-fit: cover; }
.item-open { overflow: visible; }
.item-photo { border-radius: var(--r-md) var(--r-md) 0 0; }
.item-photo img { border-radius: inherit; }

.price-tag {
  display: inline-block;
  background: var(--sticker); color: var(--on-sticker);
  font: 800 1.15rem/1 var(--display); letter-spacing: -0.01em;
  padding: .45rem .6rem .4rem;
  border-radius: 3px;
  transform: rotate(-3deg);
  box-shadow: 2px 2px 0 var(--hard-shadow);
}
.item-photo .price-tag { position: absolute; left: .6rem; bottom: -.7rem; }
.price-tag.big { font-size: 1.8rem; padding: .55rem .8rem .5rem; margin: .4rem 0 1.25rem; transform: rotate(-2deg); }

.item-info { flex: 1; display: flex; flex-direction: column; gap: .2rem; padding: 1.15rem .85rem .8rem; }
.item-title { font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-meta { color: var(--muted); font-size: .875rem; }
.item-foot { display: flex; justify-content: space-between; gap: .5rem; font-size: .8rem; color: var(--muted); margin-top: auto; }
.item-no { font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.more-wrap { text-align: center; margin-top: 2rem; }

.empty { background: var(--card); border: 2px dashed var(--line); border-radius: var(--r-md); padding: 2.5rem 1.5rem; text-align: center; grid-column: 1 / -1; }
.empty p { color: var(--muted); }

/* ── dialogs */
.dialog { border: 0; border-radius: var(--r-md); padding: 0; width: min(560px, calc(100% - 2rem)); max-height: calc(100vh - 2rem); color: var(--ink); background: var(--card); }
.dialog::backdrop { background: var(--scrim); }
.dialog-body { padding: 1.25rem 1.5rem 1.5rem; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .75rem; }
.dialog-head h2 { margin: 0; }
.item-dialog { width: min(1000px, calc(100% - 2rem)); }
.edit-dialog { width: min(760px, calc(100% - 2rem)); }
.item-detail { display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.75rem; }
.gallery-main { aspect-ratio: 1; background: var(--paper); border-radius: var(--r-sm); overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; margin-top: .5rem; }
.thumb { padding: 0; border: 2px solid transparent; border-radius: var(--r-sm); overflow: hidden; cursor: pointer; aspect-ratio: 1; background: var(--paper); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.on { border-color: var(--cobalt); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1rem; margin: 0 0 1rem; }
.facts dt { font-size: .8rem; color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; }
.description { white-space: pre-wrap; max-width: 65ch; }
.detail-text h2 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); font-weight: 800; }
.contact-box { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1rem; }
.contact-info p { display: flex; gap: .75rem; align-items: baseline; margin-bottom: .4rem; }
.contact-info p > span { width: 3.5rem; color: var(--muted); font-size: .875rem; }
.contact-info a { font-weight: 700; font-size: 1.1rem; word-break: break-all; }
.contact-name { font-weight: 700; }

/* ── panels */
.narrow { max-width: 480px; margin: 2.5rem auto; }
.card-panel { background: var(--card); border-radius: var(--r-md); padding: 1.75rem; border: 1px solid var(--line); }
.narrow.card-panel { margin-left: 1rem; margin-right: 1rem; }
@media (min-width: 520px) { .narrow.card-panel { margin-left: auto; margin-right: auto; } }
.code-input { font: 700 1.8rem/1 var(--display); letter-spacing: .4em; text-align: center; }
.login-step .btn { width: 100%; margin-bottom: .75rem; }
.note { background: var(--card); border-left: 4px solid var(--sticker); padding: .75rem 1rem; border-radius: 0 var(--r-sm) var(--r-sm) 0; }

/* ── seller */
.seller-main, .admin-main { max-width: var(--wrap); margin: 0 auto; width: 100%; padding: 1.5rem clamp(1rem, 3vw, 2rem) 3rem; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.dash-head h1 { margin: 0; }
.dash-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.my-listings, .admin-list { display: flex; flex-direction: column; gap: .75rem; }
.my-row {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 1rem; align-items: start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1rem;
}
.my-thumb { width: 96px; height: 96px; object-fit: cover; border-radius: var(--r-sm); background: var(--paper); }
.my-title-line { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .25rem; }
.my-title-line h3 { margin: 0; }
.my-edit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 270px; gap: 0 .6rem; align-items: end; }
.my-edit label { margin-bottom: .5rem; font-size: .8rem; }
.my-edit input { padding: .45rem .6rem; }
.my-buttons { grid-column: 1 / -1; display: flex; gap: .5rem; }
.my-buttons .btn { flex: 1; }
.row-notice { border-radius: var(--r-sm); padding: .6rem .8rem; margin-top: .5rem; display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row-notice p { margin: 0; flex: 1 1 240px; }
.row-notice.warn { background: var(--warn-bg); }
.row-notice.error { background: var(--tint-danger); }

.status { font-size: .75rem; font-weight: 700; padding: .15rem .5rem; border-radius: 99px; white-space: nowrap; }
.st-live { background: var(--tint-ok); color: var(--ok); }
.st-pending { background: var(--warn-bg); color: var(--warn-text); }
.st-rejected { background: var(--tint-danger); color: var(--danger); }
.st-ended { background: var(--paper); color: var(--muted); }
.st-edited { background: var(--tint-primary); color: var(--cobalt-dark); }

.new-form { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem; align-items: start; }
.form-col { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.5rem; }
#catSelect { margin-top: .5rem; height: 12rem; }
.cond { display: flex; flex-wrap: wrap; gap: .5rem; }
.cond legend { width: 100%; }
.pill { display: inline-flex; align-items: center; gap: .45rem; margin: 0; font-weight: 700; padding: .55rem .9rem; border: 2px solid var(--line); border-radius: 99px; cursor: pointer; }
.pill input { width: auto; margin: 0; accent-color: var(--cobalt); }
.pill:has(input:checked) { border-color: var(--cobalt); background: var(--tint-primary); }
.pill:has(input:focus-visible) { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.photos-head { display: flex; justify-content: space-between; align-items: baseline; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: 1.25rem; }
.photo-tile { position: relative; margin: 0; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; background: var(--paper); }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; }
.photo-tile figcaption { position: absolute; left: 0; right: 0; bottom: 0; font-size: .68rem; padding: .2rem .35rem; background: var(--scrim); color: #fff; }
.photo-x { position: absolute; top: .3rem; right: .3rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; border: 0; background: var(--scrim); color: #fff; font-size: 1.2rem; line-height: 1; cursor: pointer; }
.cover { position: absolute; top: .35rem; left: .35rem; background: var(--sticker); font-size: .7rem; font-weight: 700; padding: .1rem .4rem; border-radius: 3px; }
.photo-add { aspect-ratio: 1; border: 2px dashed var(--line); border-radius: var(--r-sm); background: var(--paper); font: 700 .9rem var(--body); color: var(--cobalt); cursor: pointer; }
.photo-add:hover { border-color: var(--cobalt); }
.renewal-notice { background: var(--warn-bg); border-radius: var(--r-sm); padding: 1rem 1.1rem .4rem; margin-bottom: 1rem; }
.renewal-notice h2 { font-size: 1.05rem; }
.renewal-notice p { font-size: .925rem; }

/* ── admin */
.tabs { display: flex; gap: .25rem; flex-wrap: wrap; }
.tabs a { color: var(--on-bar-muted); text-decoration: none; font-weight: 700; padding: .5rem .8rem; border-radius: var(--r-sm); }
.tabs a:hover { color: var(--on-bar); }
.tabs a[aria-current=page] { background: var(--bar-2); color: var(--on-bar); box-shadow: inset 0 -3px 0 var(--sticker); }
.admin .topbar #logoutBtn { margin-left: auto; }
.badge { display: inline-block; min-width: 1.3rem; text-align: center; background: var(--sticker); color: var(--on-sticker); border-radius: 99px; font-size: .75rem; padding: .05rem .35rem; font-weight: 700; }
.admin-card { display: grid; grid-template-columns: 280px 1fr; gap: 1.25rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1rem; }
.admin-photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: .3rem; align-content: start; }
.admin-photos a:first-child { grid-column: span 4; }
.admin-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px; background: var(--paper); }
.admin-photos a:first-child img { aspect-ratio: 4 / 3; }
.admin-facts { margin-bottom: .2rem; }
.admin-desc { white-space: pre-wrap; max-height: 9rem; overflow: auto; background: var(--paper); padding: .6rem .75rem; border-radius: var(--r-sm); font-size: .925rem; }
.admin-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.inline-filter { display: flex; gap: .5rem; flex-wrap: wrap; }
.inline-filter input, .inline-filter select { margin: 0; width: auto; }
.inline-filter input { min-width: 260px; }
.edit-photos { display: grid; grid-template-columns: repeat(5, 1fr); gap: .3rem; margin: .5rem 0 1rem; }
.edit-photos img { aspect-ratio: 1; object-fit: cover; border-radius: 3px; }

.ads-layout { display: grid; grid-template-columns: 360px 1fr; gap: 1.5rem; align-items: start; }
.ad-preview { margin: -.25rem 0 1rem; border-radius: var(--r-sm); max-height: 140px; object-fit: contain; background: var(--paper); }
.ads-list { display: flex; flex-direction: column; gap: .75rem; }
.ad-row { display: grid; grid-template-columns: 220px 1fr; gap: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1rem; }
.ad-row img { width: 100%; border-radius: var(--r-sm); background: var(--paper); object-fit: contain; max-height: 140px; }
.ad-row label { font-size: .8rem; margin-bottom: .5rem; }
.ad-row input, .ad-row select { padding: .45rem .6rem; }

.inbox { display: grid; grid-template-columns: 320px 1fr; gap: 1rem; min-height: 60vh; }
.threads { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; max-height: 75vh; overflow: auto; }
.thread { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: .15rem; width: 100%; padding: .75rem .85rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); }
.thread:hover { border-color: var(--ink); }
.thread:focus-visible { outline: 3px solid var(--cobalt); }
.thread.on { border-color: var(--cobalt); box-shadow: inset 4px 0 0 var(--cobalt); }
.thread.unread .thread-who { font-weight: 800; }
.thread-who { font-weight: 700; }
.thread-last { font-size: .875rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.25rem; display: flex; flex-direction: column; }
.conv-head h2 { word-break: break-all; }
.bubbles { flex: 1; overflow: auto; max-height: 50vh; display: flex; flex-direction: column; gap: .75rem; padding: .5rem 0 1rem; }
.bubble { max-width: 80%; padding: .65rem .85rem; border-radius: var(--r-md); }
.bubble.in { background: var(--paper); align-self: flex-start; }
.bubble.out { background: var(--tint-primary); align-self: flex-end; }
.bubble-meta { font-size: .75rem; color: var(--muted); margin-bottom: .2rem; }
.bubble-body { white-space: pre-wrap; }
.reply-form { border-top: 1px solid var(--line); padding-top: 1rem; }

/* ── place picker (city or ZIP) */
.place-wrap { position: relative; margin-bottom: .9rem; }
.place-wrap > input { margin-top: .35rem; }
.place-list {
  position: absolute; z-index: 30; left: 0; right: 0; margin-top: 2px !important;
  list-style: none; margin: 0; padding: .3rem; max-height: 16rem; overflow: auto;
  background: var(--card); border: 2px solid var(--cobalt); border-radius: var(--r-sm);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .16);
}
.place-list li { padding: .55rem .65rem; border-radius: calc(var(--r-sm) - 2px); cursor: pointer; font-weight: 400; }
.place-list li.on, .place-list li:hover { background: var(--tint-primary); }
.place-status { margin: .3rem 0 0; color: var(--muted); min-height: 1.2em; }
.place-status:empty { min-height: 0; margin: 0; }
.place-wrap.invalid > input { border-color: var(--danger); }
.place-wrap.invalid .place-status { color: var(--danger); font-weight: 700; }
.dist { color: var(--cobalt); font-weight: 700; white-space: nowrap; }

/* ── "update right away" reminder for sellers */
.update-now { background: var(--card); border: 2px solid var(--cobalt); border-radius: var(--r-md); padding: 1rem 1.25rem .4rem; margin-bottom: 1rem; }
.update-now h2 { font-size: 1.1rem; }

/* ── demo mode */
.demo-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem;
  padding: .5rem clamp(1rem, 3vw, 2rem);
  background: var(--sticker); color: var(--on-sticker); font-size: .85rem;
  border-bottom: 2px solid var(--hard-shadow);
}
.demo-bar p { margin: 0; flex: 1 1 380px; }
.demo-actions { display: flex; flex-wrap: wrap; gap: .35rem .5rem; align-items: center; }
.demo-actions a { color: var(--on-sticker); font-weight: 700; }
.demo-btn { font: 700 .8rem/1 var(--body); padding: .4rem .6rem; background: transparent; color: var(--on-sticker); border: 2px solid var(--on-sticker); border-radius: var(--r-sm); cursor: pointer; }
.demo-btn:hover { background: var(--on-sticker); color: var(--sticker); }
.demo-code { background: var(--warn-bg); border-left: 4px solid var(--sticker-dark); padding: .6rem .8rem; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.outbox-dialog { width: min(640px, calc(100% - 2rem)); }
.outbox-mail { border-top: 1px solid var(--line); padding: .8rem 0; }
.outbox-mail h3 { margin: .1rem 0 .3rem; }
.outbox-text { white-space: pre-wrap; margin: 0; font-size: .925rem; }

/* ── footer + toast */
.footer { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: center; justify-content: center; padding: 1.5rem; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); background: var(--card); }
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 1rem); z-index: 1000;
  background: var(--bar); color: var(--on-bar); padding: .85rem 1.2rem; border-radius: var(--r-sm);
  font-weight: 700; max-width: calc(100% - 2rem); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; box-shadow: 4px 4px 0 var(--sticker);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { box-shadow: 4px 4px 0 var(--danger); }
.toast.warn { box-shadow: 4px 4px 0 var(--sticker-dark); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* ── responsive */
@media (max-width: 960px) {
  .new-form, .ads-layout, .inbox { grid-template-columns: 1fr; }
  .admin-card { grid-template-columns: 1fr; }
  .admin-photos { grid-template-columns: repeat(5, 1fr); }
  .admin-photos a:first-child { grid-column: auto; }
  .admin-photos a:first-child img { aspect-ratio: 1; }
}
@media (max-width: 820px) {
  .market { grid-template-columns: 1fr; }
  .only-mobile { display: inline-flex; }
  .filters { display: none; }
  .filters.open { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1rem; }
  .filters form { position: static; }
  .filters .only-mobile { width: 100%; }
  .item-detail { grid-template-columns: 1fr; }
  .my-row { grid-template-columns: 72px 1fr; }
  .my-thumb { width: 72px; height: 72px; }
  .my-edit { grid-column: 1 / -1; width: auto; }
  .ad-row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .topbar .btn-sell { margin-left: 0; }
  .search { order: 3; flex-basis: 100%; }
  .topbar:has(.search) .btn-sell { margin-left: auto; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .item-info { padding: 1.05rem .65rem .65rem; }
  .price-tag { font-size: 1rem; }
  .row-3 { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .dialog-body { padding: 1rem; }
  .sort span { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   OPTION B — "Fresh"
   Light, rounded and friendly. Green actions, mint price pills, white top bar.
   Filters sit in a bar above the results so items get the full width.
   ═══════════════════════════════════════════════════════════════════════ */
:root {
  --ink: #12241D;
  --ink-2: #2E4A3F;
  --paper: #F3F7F4;
  --card: #FFFFFF;
  --line: #D9E5DD;
  --muted: #4F6459;
  --cobalt: #0E7C5A;
  --cobalt-dark: #0A5F45;
  --sticker: #D4F5E1;
  --sticker-dark: #B5ECCB;
  --on-sticker: #0A5F45;
  --bar: #FFFFFF;
  --on-bar: #12241D;
  --on-bar-muted: #4F6459;
  --bar-2: #0E7C5A;
  --hard-shadow: transparent;
  --tint-primary: #E1F3EA;
  --scrim: rgba(18, 36, 29, .6);
  --display: 'Lexend', 'Segoe UI', Arial, sans-serif;
  --body: 'Lexend', 'Segoe UI', Arial, sans-serif;
  --r-sm: 10px;
  --r-md: 18px;
}
body { font-weight: 300; }
strong, b, label, legend, .btn, .item-title, .count, .facts dd { font-weight: 500; }
h1 { font-weight: 600; letter-spacing: -0.02em; }
h2, h3 { font-weight: 500; }

/* top bar: white, quiet */
.topbar { border-bottom: 1px solid var(--line); }
.logo { color: var(--ink); font-weight: 600; letter-spacing: -0.04em; padding-bottom: 0; }
.logo::after {
  left: auto; right: -.55rem; bottom: .2rem; width: .42rem; height: .42rem;
  border-radius: 50%; background: var(--cobalt); transform: none;
}
.search input { border: 2px solid var(--line); background: var(--paper); border-radius: 999px; padding-left: 1.1rem; }
.search .btn-dark { color: #fff; }
.btn { border-radius: 999px; font-weight: 500; }
.btn-sell { background: var(--cobalt); color: #fff; box-shadow: none; font-weight: 500; }
.btn-sell:hover { background: var(--cobalt-dark); }
.btn-sell:active { transform: none; box-shadow: none; }
.tabs a { font-weight: 500; border-radius: 999px; }
.tabs a[aria-current=page] { color: #fff; box-shadow: none; }
.tabs a[aria-current=page] .badge { background: #fff; }

/* price: mint pill, sits inside the photo */
.price-tag { transform: none; box-shadow: none; border-radius: 999px; font-weight: 600; padding: .45rem .8rem; }
.item-photo .price-tag { bottom: .7rem; left: .7rem; background: rgba(255,255,255,.94); color: var(--cobalt-dark); }
.price-tag.big { transform: none; }
.item-info { padding: .9rem 1rem 1rem; }
.item-open { border-color: transparent; }
.item-open:hover { border-color: var(--cobalt); }
.item-photo { border-radius: var(--r-md); margin: .45rem .45rem 0; }
.grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.4rem 1.2rem; }

input, select, textarea { border-radius: var(--r-sm); }
.ad-slot { border-radius: var(--r-md); }
.note { border-left-color: var(--cobalt); border-radius: var(--r-sm); }
.demo-bar { border-bottom: 1px solid var(--sticker-dark); }
.toast { box-shadow: none; border-radius: 999px; background: var(--ink); color: #fff; }

/* filters as a horizontal bar on wide screens */
@media (min-width: 821px) {
  .market { grid-template-columns: 1fr; gap: 1.25rem; }
  .filters form {
    position: static;
    display: grid; grid-template-columns: 1.3fr 1.5fr .75fr auto 1.15fr; gap: 0 1rem; align-items: end;
    background: var(--card); border-radius: var(--r-md); padding: 1.1rem 1.4rem .4rem;
  }
  .filters-head { grid-column: 1 / -1; margin-bottom: .5rem; }
  .filters-head h2 { font-size: 1rem; }
  .filters fieldset { margin-bottom: .9rem; }
  .filters .place-wrap { margin-bottom: 0; }
  .filters .place-status:empty { display: none; }
  .price-range input { padding-left: .6rem; padding-right: .4rem; }
  .filters fieldset:not(.price-range) { display: flex; flex-wrap: wrap; gap: .35rem; }
  .filters fieldset:not(.price-range) legend { width: 100%; }
  .filters .radio { margin: 0; padding: .55rem .8rem; border: 2px solid var(--line); border-radius: 999px; }
  .filters .radio:has(input:checked) { border-color: var(--cobalt); background: var(--tint-primary); }
  .filters .radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
  .filters .radio:has(input:focus-visible) { outline: 3px solid var(--cobalt); outline-offset: 2px; }
}
@media (min-width: 821px) and (max-width: 1180px) {
  .filters form { grid-template-columns: 1fr 1fr 1fr; }
}
