/* Yours Next — "Journal": white page, black ink, big serif names,
   hairline rules and small letter-spaced labels. Covers run edge to edge. */
:root {
  --page: #FFFFFF;
  --soft: #F6F5F2;           /* quiet fills: empty states, inputs */
  --ink: #111111;
  --ink-2: #4A4945;
  --muted: #77756F;
  --hair: #E8E8E6;           /* hairline rules */
  --mat: #F0EEE9;            /* passe-partout around every cover */
  --sage: #6E7F63;           /* the one accent: Free / Give Away */
  --danger: #A23B2A;
  --rose: #C4908C;            /* saved hearts: dusty rose */
  --serif: "Cormorant Garamond", "Cormorant", Garamond, Georgia, serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", Helvetica, -apple-system, system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--sans); font-size: 15px; -webkit-text-size-adjust: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 2px; }
.wrap { max-width: 560px; margin: 0 auto; }
.pad { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
.hidden { display: none !important; }
.caps { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }

/* top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.brand { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink); }
.brand .dot { display: none; }
.icon-btn { width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--hair); background: var(--page); display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.text-btn { border: 0; background: none; padding: 8px 0; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* shop header: centred, like a masthead */
.shop-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding-block: 10px 18px; }
.avatar { position: relative; width: 92px; height: 92px; flex: none; border-radius: 999px; border: 1px solid var(--ink); background: var(--page); color: var(--ink); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 40px; cursor: pointer; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 999px; display: block; }
.avatar-edit { position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; border-radius: 999px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; }
.avatar.busy { opacity: .6; }
.shop-name { font-family: var(--serif); font-weight: 600; font-size: 34px; line-height: 1; margin: 4px 0 0; text-wrap: balance; }
.shop-bio { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--ink-2); margin: 0; max-width: 32ch; }
.shop-meta { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-variant-numeric: tabular-nums; }

.chips { display: flex; gap: 22px; border-top: 1px solid var(--ink); padding-top: 10px; margin-bottom: 12px; }
.chip { border: 0; background: none; padding: 0 0 7px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid transparent; border-radius: 0; }
.chip[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }

/* grid: three per row, edge-to-edge covers */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 8px; }
.card { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tile { position: relative; display: block; aspect-ratio: 4 / 5; background: var(--mat); overflow: hidden; border-radius: 10px; padding: 7% 8%; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge { position: absolute; left: 8px; top: 8px; background: var(--sage); color: #fff; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; padding: 4px 7px; }
.tile .state { position: absolute; inset: auto 0 0 0; padding: 18px 6px 6px; font-size: 10.5px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.5)); }
.tile.pending img { filter: saturate(.6) brightness(.95); }
.tile .bar { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--ink); transition: width .2s; }
.meta { display: flex; flex-direction: column; gap: 1px; }
.meta .t { font-family: var(--serif); font-size: 15px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta .t.muted { color: var(--muted); font-style: italic; }
.meta .row2 { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.meta .p { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; font-variant-numeric: tabular-nums; white-space: nowrap; }
.meta .p.free { color: var(--sage); }
.meta .p.none { color: var(--muted); }
.meta .p.need { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.meta .c { display: none; }
.card.give .tile { box-shadow: none; }
.empty { text-align: center; color: var(--ink-2); padding: 48px 24px; line-height: 1.5; }
.empty strong { display: block; font-family: var(--serif); font-size: 24px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.stats { font-size: 11px; letter-spacing: .06em; color: var(--muted); padding-block: 18px 8px; font-variant-numeric: tabular-nums; }

/* bottom action */
.bottom { position: fixed; left: 0; right: 0; bottom: 0; background: var(--page); border-top: 1px solid var(--ink); padding-top: 12px; padding-bottom: calc(12px + var(--safe-b)); z-index: 5; }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 50px; border: 0; border-radius: 0; background: var(--ink); color: #fff; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; }
.btn:active { background: #333; }
.btn.ghost { background: var(--page); color: var(--ink); border: 1px solid var(--ink); }
.btn.danger { background: var(--page); color: var(--danger); border: 1px solid var(--hair); }
.btn.small { height: 36px; width: auto; padding: 0 14px; font-size: 10.5px; }
.spacer-bottom { height: calc(90px + var(--safe-b)); }

/* sheet */
.sheet-back { position: fixed; inset: 0; background: rgba(17,17,17,.3); z-index: 20; display: flex; align-items: flex-end; }
.sheet { width: 100%; max-width: 560px; margin: 0 auto; background: var(--page); border-top: 1px solid var(--ink); padding-top: 18px; padding-bottom: calc(16px + var(--safe-b)); display: flex; flex-direction: column; gap: 14px; }
.sheet h2 { font-family: var(--serif); font-weight: 600; font-size: 26px; margin: 0; }

/* forms: underline fields */
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.input { width: 100%; min-height: 44px; border: 0; border-bottom: 1px solid var(--hair); border-radius: 0; background: transparent; padding: 10px 0; font-size: 16px; }
.input:focus { outline: 0; border-bottom-color: var(--ink); }
textarea.input { resize: vertical; min-height: 70px; line-height: 1.45; font-family: var(--serif); font-size: 18px; }
.money { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--hair); min-height: 44px; }
.money input { border: 0; outline: 0; background: transparent; font-family: var(--serif); font-size: 24px; font-weight: 600; width: 100%; min-width: 0; }
.money span { font-family: var(--serif); font-size: 24px; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--ink); }
.seg button { border: 0; background: var(--page); padding: 11px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.save-state { font-size: 12px; color: var(--muted); min-height: 16px; }
.save-state.err { color: var(--danger); }

/* item page */
.gallery { position: relative; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: var(--soft); }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 4 / 5; display: flex; align-items: center; justify-content: center; background: var(--soft); }
.slide img, .slide video { width: 100%; height: 100%; object-fit: contain; display: block; }
.slide.cover { background: var(--mat); padding: 8% 9%; }
.slide.cover img { object-fit: cover; }
.dots { display: flex; gap: 4px; justify-content: center; padding-block: 10px 0; }
.dots span { width: 14px; height: 1.5px; background: var(--hair); }
.dots span.on { background: var(--ink); }
.float-back { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); left: max(14px, env(safe-area-inset-left)); background: rgba(255,255,255,.9); border-color: transparent; }
.item-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding-block: 14px 6px; }
.item-title { font-family: var(--serif); font-size: 32px; line-height: 1.02; margin: 0; font-weight: 600; text-wrap: balance; min-width: 0; overflow-wrap: anywhere; }
.item-price { font-family: var(--serif); font-size: 26px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.item-price.free { color: var(--sage); }
.section { padding-block: 12px; display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--hair); }
.section-title { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 14px; }
.dot { width: 7px; height: 7px; border-radius: 999px; background: var(--sage); display: inline-block; margin-right: 8px; }
.dot.wait { background: #C9A227; }
.dot.bad { background: var(--danger); }
.toggle { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.toggle input { width: 18px; height: 18px; accent-color: var(--ink); }

.strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.thumb { position: relative; flex: none; width: 70px; height: 88px; overflow: hidden; border: 1px solid var(--hair); background: var(--soft); padding: 0; border-radius: 0; }
.thumb .view { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.thumb .more { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--ink); padding: 0; cursor: pointer; }
.thumb.sel { outline: 2px solid var(--sage); outline-offset: 2px; }
.strip { padding: 4px 4px 4px; margin: -4px; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.main { border: 1.5px solid var(--ink); }
.thumb .tag { position: absolute; left: 0; bottom: 0; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; padding: 3px 5px; background: var(--ink); color: #fff; }
.thumb.add { border-style: dashed; border-color: #BDBBB5; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10px; letter-spacing: .08em; color: var(--muted); text-align: center; }
.hint { font-size: 12px; color: var(--muted); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(86px + var(--safe-b)); background: var(--ink); color: #fff; padding: 10px 16px; font-size: 13px; z-index: 30; max-width: calc(100% - 40px); }

/* login */
.login { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding-block: 24px; }
.login h1 { font-family: var(--serif); font-weight: 600; font-size: 44px; letter-spacing: .02em; margin: 0; text-align: center; }
.login p { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ink-2); margin: 0 0 18px; text-align: center; }
.error { color: var(--danger); font-size: 14px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* AI suggestions: always marked, always editable */
.ai-tag { display: inline-block; margin-left: 6px; padding: 1px 5px; border: 1px solid var(--sage); color: var(--sage); font-size: 9px; letter-spacing: .12em; vertical-align: 1px; }
.ai-note { font-size: 12.5px; color: var(--ink-2); border-left: 2px solid var(--sage); padding: 4px 0 4px 10px; }
.opt { text-transform: none; letter-spacing: 0; color: #9A958A; }
select.input { -webkit-appearance: none; appearance: none; background: transparent; }

/* Archive: sold / given-away items */
.badge.done { background: var(--ink); }
.card.closed .tile img { filter: grayscale(.35) opacity(.72); }
.card.closed .meta .t { color: var(--muted); }
.grid-note { grid-column: 1 / -1; padding: 28px 8px; text-align: center; }

/* Quick actions on the shop grid */
.card { position: relative; }
.card-a { display: flex; flex-direction: column; gap: 5px; min-width: 0; color: inherit; text-decoration: none; }
.card .more { position: absolute; top: 6px; right: 6px; z-index: 2; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(255,255,255,.94); color: var(--ink); display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.card .check { position: absolute; top: 6px; right: 6px; z-index: 2; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--ink); background: rgba(255,255,255,.94); display: flex; align-items: center; justify-content: center; pointer-events: none; }
.card.picked .check { background: var(--ink); color: #fff; }
.card.picked .tile { outline: 2px solid var(--ink); outline-offset: -2px; }
.select-btn { margin-left: auto; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; padding: 0 0 7px; }
.sel-bar { display: flex; gap: 10px; }
.sel-bar .btn { flex: 1; }
.btn.danger-fill { background: var(--danger); color: #fff; border: 0; }
.btn.danger-fill:disabled { opacity: .4; }
#menuConfirm:not(.hidden) { display: flex; }

/* ---------- Bottom navigation ---------- */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: rgba(255,255,255,.97); border-top: 1px solid var(--hair); padding-bottom: var(--safe-b); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.nav-in { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; height: 64px; padding: 0 6px; }
.nav-i, .nav-add { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; padding-bottom: 9px; color: var(--muted); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; cursor: pointer; }
.nav-i.on { color: var(--ink); }
.nav-i.on svg { stroke-width: 2; }
.nav-add { color: var(--ink); }
.nav-plus { width: 42px; height: 42px; border-radius: 999px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; margin-bottom: 1px; }
.spacer-bottom { height: calc(96px + var(--safe-b)); }
.toast { bottom: calc(84px + var(--safe-b)); }

/* ---------- Feeds: Discover, Give Away ---------- */
.masthead { text-align: center; padding-block: 18px 22px; display: flex; flex-direction: column; gap: 6px; }
.page-title { font-family: var(--serif); font-weight: 600; font-size: 40px; line-height: 1; margin: 0; }
.page-sub { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--ink-2); margin: 0; }
.rule { border-top: 1px solid var(--ink); margin-bottom: 14px; }
.chips.scroll { overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips .chip { flex: none; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
.grid.two .meta .t { font-size: 17px; }
.grid.two .meta .p { font-size: 11px; }
.meta .seller { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.card { color: inherit; }
.upload-overlay { position: fixed; inset: 0; z-index: 40; background: rgba(255,255,255,.94); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 24px; }

/* ---------- Public shop ---------- */
.avatar.static { cursor: default; }
.handle { font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.as-buyer { text-align: center; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; background: var(--soft); padding: 8px; margin-top: 4px; }
.share-row { display: flex; gap: 8px; align-items: center; justify-content: center; color: var(--muted); font-size: 11px; }
.share-row .text-btn { padding: 4px 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hair); }

/* ---------- Buyer's item page ---------- */
.float-share { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: max(14px, env(safe-area-inset-right)); background: rgba(255,255,255,.9); border-color: transparent; }
.view-strip { padding-top: 12px; }
.view-strip .thumb { width: 54px; height: 68px; }
.facts { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-bottom: 4px; }
.item-desc { font-family: var(--serif); font-size: 19px; line-height: 1.45; color: var(--ink-2); margin: 10px 0 0; white-space: pre-line; }
.closed-note { font-size: 13px; color: var(--ink-2); padding-bottom: 6px; }
.seller-row { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); padding: 14px 0; margin-top: 22px; }
.avatar.mini { width: 46px; height: 46px; font-size: 20px; cursor: inherit; }
.seller-txt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.seller-name { font-family: var(--serif); font-size: 20px; font-weight: 600; line-height: 1.1; }
.seller-sub { font-size: 12px; color: var(--muted); }
.seller-go { color: var(--ink); font-size: 10px; }
.meta .p { overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* Avatar crop */
.crop-stage { position: relative; width: min(300px, 100%); aspect-ratio: 1; margin: 0 auto; overflow: hidden; background: var(--soft); touch-action: none; cursor: grab; user-select: none; }
.crop-stage img { position: absolute; left: 0; top: 0; max-width: none; pointer-events: none; transform-origin: 0 0; }
.crop-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(255,255,255,.72); border: 1px solid rgba(17,17,17,.5); pointer-events: none; }
.crop-zoom { display: flex; align-items: center; gap: 10px; width: min(300px, 100%); margin: 0 auto; color: var(--muted); }
.crop-zoom input { flex: 1; accent-color: var(--ink); }

/* Position in the shop */
.unused-move-row { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--ink); }
.move-row button { border: 0; border-left: 1px solid var(--hair); background: var(--page); padding: 10px 2px 9px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.move-row button:first-child { border-left: 0; }
.move-row button:active { background: var(--soft); }
.sel-bar .btn { padding: 0 6px; letter-spacing: .12em; }

/* Arrange: drag to reorder */
.chips .tools { margin-left: auto; display: flex; gap: 16px; }
.chips .tools .text-btn { padding: 0 0 7px; color: var(--ink-2); }
.chips.arr-on .chip, .chips.arr-on .tools { visibility: hidden; }
.grid.arranging .card.arr { touch-action: pan-y; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.grid.arranging .card.arr img { -webkit-user-drag: none; pointer-events: none; }
.grid.arranging .card.arr .tile { animation: arr-wiggle .9s ease-in-out infinite alternate; }
.grid.arranging .card.arr:nth-child(2n) .tile { animation-delay: -.45s; }
@keyframes arr-wiggle { from { transform: rotate(-.6deg); } to { transform: rotate(.6deg); } }
.card.placeholder { opacity: .2; }
.card.ghost { position: fixed; z-index: 50; pointer-events: none; transform: scale(1.06); box-shadow: 0 12px 30px rgba(0,0,0,.18); background: var(--page); border-radius: 10px; }
.card.ghost .tile { animation: none; }
.arr-hint { text-align: center; padding-bottom: 10px; }
@media (prefers-reduced-motion: reduce) { .grid.arranging .card.arr .tile { animation: none; } }

.toolbar { display: flex; justify-content: flex-end; gap: 18px; margin: -4px 0 10px; }
.toolbar .text-btn { display: inline-flex; align-items: center; gap: 5px; padding: 4px 0; color: var(--ink-2); }
.toolbar.arr-on { visibility: hidden; }

/* ---------- Computer screens ---------- */
.nav-brand { display: none; }
.mouse-only { display: none; }
@media (hover: hover) and (pointer: fine) { .mouse-only { display: inline; } .touch-only { display: none; } }

@media (min-width: 900px) {
  .wrap.wide { max-width: 1180px; }
  .wrap.wide .pad, .wrap.wide.pad, .wrap.wide > .pad { padding-left: 40px; padding-right: 40px; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 20px; }
  .grid.two { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 20px; }
  .meta .t, .grid.two .meta .t { font-size: 18px; }
  .meta .p { font-size: 11px; }
  .chips { gap: 28px; }
  .masthead { padding-block: 34px 30px; }
  .page-title { font-size: 52px; }
  .shop-name { font-size: 42px; }
  .card .more { opacity: 0; transition: opacity .15s; }
  .card:hover .more, .card .more:focus-visible { opacity: 1; }
  .card .tile img { transition: transform .35s ease; }
  a.card:hover .tile img, .card-a:hover .tile img { transform: scale(1.025); }

  /* navigation moves to the top */
  .nav { top: 0; bottom: auto; border-top: 0; border-bottom: 1px solid var(--hair); padding-bottom: 0; }
  .nav-in { max-width: 1180px; height: 64px; padding: 0 40px; display: flex; align-items: center; gap: 30px; }
  .nav-brand { display: block; margin-right: auto; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--ink); }
  .nav-i, .nav-add { flex-direction: row; align-items: center; padding: 0; gap: 7px; font-size: 10.5px; letter-spacing: .14em; }
  .nav-i svg { width: 18px; height: 18px; }
  .nav-i.on { box-shadow: 0 1px 0 var(--ink); }
  .nav-add { order: 10; background: var(--ink); color: #fff; height: 38px; padding: 0 16px 0 10px; border-radius: 999px; }
  .nav-plus { width: auto; height: auto; background: none; margin: 0; }
  .nav-plus svg { width: 16px; height: 16px; }
  body:has(.nav) { padding-top: 64px; }
  .topbar .brand { visibility: hidden; }
  .spacer-bottom { height: 60px; }
  .toast { bottom: 32px; }

  /* the buyer's item page: photos left, details right */
  .view-layout { max-width: 1180px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; padding: 32px 40px 0; align-items: start; }
  .view-media { position: sticky; top: 96px; }
  .view-media .pad { padding: 0; }
  .view-info.pad { padding: 0; }
  .view-info .item-head { padding-top: 0; }
  .view-info .item-title { font-size: 44px; }
  .view-info .item-price { font-size: 32px; }
  .view-cta { position: static; border-top: 0; padding: 24px 0 0; background: none; }
  .view-cta .wrap.pad { padding: 0; max-width: none; }
  .view-layout + .spacer-bottom, .view-layout .spacer-bottom { height: 40px; }
  .slide.cover { border-radius: 4px; }
}
@media (min-width: 1280px) {
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 899px) { .nav-desktop-only .nav { display: none; } }

/* Select: small quiet circle (variant A) */
.card .check { top: 7px; right: 7px; width: 18px; height: 18px; border: 1.2px solid rgba(17,17,17,.55); background: rgba(255,255,255,.9); box-sizing: border-box; }
.card .check svg { width: 10px; height: 10px; }
.card.picked .check { background: var(--ink); border-color: var(--ink); }
.card.picked .tile { outline: none; }

/* Highlights: round category covers */
.highlights { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; padding: 4px 0 20px; margin: 0 -2px; }
.highlights::-webkit-scrollbar { display: none; }
.hl { flex: none; width: 64px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--ink-2); cursor: pointer; }
.hl-ring { width: 60px; height: 60px; border-radius: 50%; padding: 2px; border: 1px solid #d9d5cc; box-sizing: border-box; transition: border-color .15s; }
.hl.on .hl-ring { border: 1.5px solid var(--ink); }
.hl-in { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: var(--mat); display: flex; align-items: center; justify-content: center; color: var(--ink); }
.hl-in img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.25); }
.hl-t { font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.hl.on .hl-t { color: var(--ink); }
.hl-n { font-size: 9px; color: var(--muted); margin-top: -4px; }
@media (min-width: 900px) { .highlights { justify-content: center; gap: 22px; } .hl { width: 76px; } .hl-ring { width: 72px; height: 72px; } }

/* Sign in & welcome */
.login-brand { display: block; text-align: center; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; }
.login-slogan { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--ink-2); text-align: center; margin: 6px 0 26px; }
.login-step { display: flex; flex-direction: column; gap: 14px; }
.login-h { font-family: var(--serif); font-weight: 600; font-size: 32px; line-height: 1.05; margin: 0; text-align: left; }
.login-step .hint { font-size: 13px; line-height: 1.45; }
.code-input { font-size: 28px; letter-spacing: .3em; font-variant-numeric: tabular-nums; }
.login-links { display: flex; justify-content: space-between; }
.pw-login { margin-top: 40px; font-size: 12px; color: var(--muted); }
.pw-login summary { cursor: pointer; }
.handle-row { display: flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--hair); }
.handle-row span { color: var(--muted); font-size: 15px; white-space: nowrap; }
.handle-row .input { border-bottom: 0; padding-left: 0; }
.hint.ok { color: var(--sage); }
.hint.bad { color: var(--danger); }
.login .login-h { font-size: 32px; text-align: left; letter-spacing: 0; }
.login p.hint { font-family: var(--sans); font-style: normal; font-size: 13px; color: var(--muted); text-align: left; margin: 0; }

/* ---------- Messages ---------- */
.nav-ic { position: relative; display: inline-flex; }
.nav-badge { position: absolute; top: -5px; right: -9px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 9.5px; letter-spacing: 0; line-height: 16px; text-align: center; font-variant-numeric: tabular-nums; }
.inbox-list { display: flex; flex-direction: column; }
.conv { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hair); color: inherit; }
.conv-img { flex: none; width: 54px; height: 68px; background: var(--mat); border-radius: 6px; overflow: hidden; }
.conv-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.conv-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.conv-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.conv-name { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.conv-time { font-size: 11px; color: var(--muted); white-space: nowrap; }
.conv-item { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-last { font-size: 14px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv.unread .conv-last { color: var(--ink); font-weight: 600; }
.conv-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); }

.chat-page { min-height: 100vh; display: flex; flex-direction: column; }
.chat-head { position: sticky; top: 0; z-index: 5; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--hair); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.chat-head-in { display: flex; align-items: center; gap: 12px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); padding-bottom: 8px; }
.chat-name { font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1.1; }
.chat-role { font-size: 11px; color: var(--muted); }
.chat-item { display: flex; align-items: center; gap: 12px; padding-top: 6px; padding-bottom: 10px; color: inherit; }
.chat-item .conv-img { width: 40px; height: 50px; }
.chat-item-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-item-title { font-family: var(--serif); font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item-price { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.chat-item.gone { font-size: 12px; color: var(--muted); }
.chat-msgs { flex: 1; display: flex; flex-direction: column; gap: 6px; padding-top: 16px; padding-bottom: 150px; width: 100%; }
.chat-day { align-self: center; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 10px 0 4px; }
.bubble { align-self: flex-start; max-width: 80%; background: var(--soft); padding: 9px 13px 6px; border-radius: 16px 16px 16px 4px; }
.bubble.mine { align-self: flex-end; background: var(--ink); color: #fff; border-radius: 16px 16px 4px 16px; }
.bubble-text { font-size: 15.5px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble-time { font-size: 10px; opacity: .55; text-align: right; margin-top: 2px; }
.chat-empty { align-self: center; text-align: center; color: var(--muted); font-family: var(--serif); font-style: italic; font-size: 17px; margin-top: 30px; max-width: 30ch; }
.chat-compose { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--page); border-top: 1px solid var(--hair); padding-top: 10px; padding-bottom: calc(10px + var(--safe-b)); }
.chat-compose-in { display: flex; flex-direction: column; gap: 8px; }
.chat-row { display: flex; gap: 8px; align-items: flex-end; }
.chat-row textarea.input { font-family: var(--sans); font-size: 16px; min-height: 44px; max-height: 140px; resize: none; border: 1px solid var(--hair); border-radius: 22px; padding: 11px 16px; line-height: 1.35; }
.chat-row textarea.input:focus { border-color: var(--ink); }
.chat-send { width: 44px; height: 44px; flex: none; border-radius: 50%; padding: 0; }
.chat-attach { width: 40px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); cursor: pointer; }
.chat-attach:hover { opacity: .7; }
.bubble.has-media { padding: 4px 4px 6px; }
.bubble.has-media .bubble-text { padding: 6px 9px 0; }
.bubble.has-media .bubble-time { padding: 0 8px; }
.bubble-media { display: block; width: 100%; max-width: 260px; max-height: 340px; object-fit: cover; border-radius: 12px; background: var(--mat); }
.bubble.uploading { font-size: 13px; letter-spacing: .04em; opacity: .7; padding: 12px 16px; }
.chat-quick { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chat-quick:empty { display: none; }
.chip-q { flex: none; border: 1px solid var(--hair); background: var(--page); border-radius: 999px; padding: 7px 12px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
@media (min-width: 900px) { .chat-page { padding-top: 0; } body:has(.chat-page) { padding-top: 0; } }

/* Photo tips */
.tips { max-height: 92vh; overflow-y: auto; }
.tips-sub { margin: -6px 0 0; font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--ink-2); }
.tips-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.tips-list li { display: flex; align-items: center; gap: 14px; font-size: 14.5px; line-height: 1.4; color: var(--ink-2); }
.tips-list b { color: var(--ink); font-weight: 600; }
.tip-ic { flex: none; width: 58px; height: 58px; border-radius: 50%; background: var(--mat); display: flex; align-items: center; justify-content: center; color: var(--ink); }
.tips-note { margin: 0; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--hair); padding-top: 12px; }
.tips-skip { align-self: center; }
.tips-link { display: inline-block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hair); margin-top: 8px; }
.empty .tips-link { display: block; margin-top: 14px; }

/* Saved & Follow */
.heart { position: absolute; right: 7px; bottom: 7px; z-index: 2; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.94); display: flex; align-items: center; justify-content: center; color: var(--ink); cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.heart svg path, .heart-big svg path { fill: none; transition: fill .15s; }
.heart.on, .heart-big.on { color: var(--rose); }
.heart.on svg path, .heart-big.on svg path { fill: var(--rose); }
.heart:active, .heart-big:active { transform: scale(.9); }
.float-heart { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: calc(max(14px, env(safe-area-inset-right)) + 50px); background: rgba(255,255,255,.9); border-color: transparent; }
.saved-link { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); font-size: 12px; font-variant-numeric: tabular-nums; }
.feed-tabs { display: flex; justify-content: center; gap: 26px; margin: -8px 0 16px; }
.feed-tabs a { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding-bottom: 5px; border-bottom: 1px solid transparent; }
.feed-tabs a.on { color: var(--ink); border-bottom-color: var(--ink); }
/* dictate the description */
.dictate { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.mic-btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--hair); background: var(--page); color: var(--ink); border-radius: 999px; padding: 8px 14px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.mic-btn[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.mic-btn[aria-pressed="true"] svg { animation: micPulse 1.2s ease-in-out infinite; }
@keyframes micPulse { 50% { opacity: .35; } }
.mic-lang { border: 0; background: none; font-size: 11px; letter-spacing: .14em; color: var(--muted); padding: 8px 4px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.mic-live { font-size: 13px; color: var(--muted); }

/* automatic translation */
.tr-note { font-size: 12px; color: var(--muted); margin: -4px 0 14px; }
.tr-toggle { border: 0; background: none; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.bubble .tr-note { margin: 4px 0 0; font-size: 11px; color: inherit; opacity: .6; }
.bubble .tr-toggle { color: inherit; }

/* Discover area filter */
.area-row { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.area-pick { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.area-pick { position: relative; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; padding: 6px 0; }
.area-pick select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* "Other town…" picker */
.place-box { margin-top: 10px; }
.place-list { display: flex; flex-direction: column; margin-top: 6px; border: 1px solid var(--hair); border-radius: 12px; overflow: hidden; }
.place-list:empty { display: none; }
.place-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; border: 0; background: #fff; padding: 11px 14px; cursor: pointer; font-size: 15px; color: var(--ink); }
.place-opt + .place-opt { border-top: 1px solid var(--hair); }
.place-opt small { font-size: 12px; color: var(--muted); }
.place-opt:hover { background: var(--mat); }
.place-note { padding: 11px 14px; font-size: 13px; color: var(--muted); }

/* condition chips, reserved */
.cond { display: flex; flex-wrap: wrap; gap: 8px; }
.cond button { border: 1px solid var(--hair); background: var(--page); color: var(--ink); border-radius: 999px; padding: 9px 14px; font-size: 13px; }
.cond button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.badge.res { background: var(--page); color: var(--ink); }
.reserved-note { margin: 4px 0 10px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
#resBtn.on { background: var(--ink); color: #fff; }

/* "these photos look like one item" */
.merge-box { margin: 0 0 14px; }
.merge-in { background: var(--mat); padding-top: 16px; padding-bottom: 16px; }
.merge-head { font-family: var(--serif); font-size: 21px; line-height: 1.2; margin-bottom: 10px; }
.merge-thumbs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 10px; }
.merge-thumbs img { width: 64px; height: 80px; object-fit: cover; border-radius: 8px; background: #fff; flex: none; }
.merge-thumbs img:first-child { outline: 2px solid var(--ink); outline-offset: 1px; }
.merge-btns { display: flex; gap: 10px; margin-top: 12px; }
.merge-btns .btn { flex: 1; }
.sel-bar #selCombine:disabled { opacity: .4; }
.feed-tabs .tab-n { font-variant-numeric: tabular-nums; letter-spacing: 0; }
.feed-tabs .tab-n:empty { display: none; }
.follow-btn { margin-top: 6px; min-width: 120px; }
.follow-btn.on { background: var(--page); color: var(--ink); border: 1px solid var(--ink); }
.drop { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--danger); }
.meta .was { font-size: 10.5px; color: var(--muted); text-decoration: line-through; }
/* "saved by N people": white pill on the photo, seen only by the seller */
.save-pill { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px;
  background: #fff; color: var(--ink); font-size: 11px; font-weight: 600; padding: 4px 8px 4px 7px; border-radius: 999px;
  box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.save-pill svg { color: var(--rose); }
.saves-note { margin: -2px 0 6px; }
.shop-list { display: flex; flex-direction: column; }
.shop-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hair); color: inherit; }
a.chip { text-decoration: none; }

/* Legal pages, footer, report, account */
.site-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; padding-top: 28px; padding-bottom: calc(100px + var(--safe-b)); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); max-width: 1180px; margin: 0 auto; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--ink); }
.spacer-bottom + .site-foot, .site-foot { margin-top: -60px; }
@media (min-width: 900px) { .site-foot { padding-bottom: 40px; margin-top: 0; } }
/* language: "EN ▾" and a small list */
.lang-menu { position: relative; display: inline-block; }
.lang-menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; letter-spacing: .14em; color: var(--ink); padding: 8px 4px; min-height: 32px; user-select: none; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu[open] summary svg { transform: rotate(180deg); }
.lang-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 60; min-width: 190px; background: #fff; border: 1px solid var(--hair); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.10); padding: 6px 0; text-align: left; }
.lang-pop a { display: block; padding: 12px 18px; font-size: 15px; color: var(--ink); white-space: nowrap; }
.lang-pop a span { color: var(--muted); }
.lang-pop a.on { font-weight: 600; }
.lang-pop a + a { border-top: 1px solid var(--hair); }
.lang-pop a:hover { background: var(--mat); }
.site-foot .lang-menu { flex-basis: 100%; text-align: center; margin-bottom: 2px; }
.site-foot .lang-pop { top: auto; bottom: calc(100% + 4px); right: 50%; transform: translateX(50%); }
.topbar-end { display: inline-flex; align-items: center; gap: 12px; }
.login-lang { display: flex; justify-content: flex-end; margin: -8px -5px 8px 0; }
.legal-note { margin: 4px 0 0; }
.legal-title { font-family: var(--serif); font-weight: 600; font-size: 38px; line-height: 1.05; margin: 18px 0 12px; }
.legal-tabs { display: flex; flex-wrap: wrap; gap: 8px 18px; border-top: 1px solid var(--ink); padding-top: 10px; margin-bottom: 8px; }
.legal-tabs a { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-bottom: 4px; border-bottom: 1px solid transparent; }
.legal-tabs a.on { color: var(--ink); border-bottom-color: var(--ink); }
.legal-body { font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.legal-body > p:first-child { font-family: var(--serif); font-size: 20px; line-height: 1.4; color: var(--ink); }
.legal-body h3 { font-family: var(--serif); font-size: 21px; font-weight: 600; color: var(--ink); margin: 26px 0 6px; }
.legal-body ul { padding-left: 18px; }
.legal-body table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0; display: block; overflow-x: auto; }
.legal-body th, .legal-body td { text-align: left; vertical-align: top; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--hair); }
.legal-body th { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.agree input { width: 18px; height: 18px; margin-top: 1px; flex: none; accent-color: var(--ink); }
.agree a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.report-link { display: inline-block; margin-top: 18px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hair); }
.report-reasons { display: flex; flex-direction: column; gap: 10px; }
.radio { display: flex; gap: 10px; align-items: center; font-size: 15px; }
.radio input { width: 18px; height: 18px; accent-color: var(--ink); }
.account { display: flex; flex-direction: column; gap: 14px; }
.account .row { border-bottom: 1px solid var(--hair); padding: 10px 0; }
.account-links { font-size: 12px; color: var(--muted); }
.account-links a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.danger-zone { margin-top: 28px; border-top: 1px solid var(--hair); padding-top: 16px; display: flex; flex-direction: column; gap: 10px; }
#delAccConfirm.hidden { display: none !important; }
