/* GemBridge Opportunities (buyers) */
.boot { min-height: 70dvh; display: grid; place-items: center; color: var(--ink-3); }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 58px; }
.brand-link { text-decoration: none; min-width: 0; }
.brand-link .brand-sub { display: none; }
@media (min-width: 420px) { .brand-link .brand-sub { display: inline; } }

.tabs-top { display: none; gap: 4px; margin-left: auto; }
.tabs-top .tab { padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.tabs-top .tab[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.tab-count { font-size: 11px; font-weight: 600; min-width: 18px; height: 18px; border-radius: 9px; background: var(--gold); color: #fff; display: inline-grid; place-items: center; padding: 0 5px; }

.tabs-bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: 1fr 1fr;
  background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tabs-bottom .tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 9px; text-decoration: none; color: var(--ink-3); font-size: 11px; font-weight: 500; position: relative; -webkit-tap-highlight-color: transparent; }
.tabs-bottom .tab svg { width: 22px; height: 22px; }
.tabs-bottom .tab:nth-child(2) svg { fill: none; stroke: currentColor; stroke-width: 1.8; }
.tabs-bottom .tab[aria-current="page"] { color: var(--ink); }
.tabs-bottom .tab[aria-current="page"]:nth-child(2) svg { fill: var(--heart); stroke: var(--heart); }
.tabs-bottom .tab-count { position: absolute; top: 4px; left: calc(50% + 6px); }
@media (min-width: 760px) {
  .tabs-top { display: flex; }
  .tabs-bottom { display: none; }
}

.acct { position: relative; flex: none; }
.acct summary { list-style: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); font-weight: 600; font-size: 14px; cursor: pointer; }
.acct summary::-webkit-details-marker { display: none; }
.acct-menu { position: absolute; right: 0; top: 44px; width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 14px; display: grid; gap: 4px; z-index: 40; }
.acct-name { font-weight: 600; }
.acct-phone { font-size: 13px; color: var(--ink-3); margin-bottom: 10px; }

.view { padding-top: 14px; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
body.has-bar .view { padding-bottom: calc(170px + env(safe-area-inset-bottom)); }
@media (min-width: 760px) { .view { padding-bottom: 64px; } body.has-bar .view { padding-bottom: 120px; } }

/* Toolbar */
.toolbar { display: grid; gap: 10px; margin-bottom: 16px; }
.fy { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chip svg { width: 15px; height: 15px; }
.chip-fy[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.chip-fy[aria-pressed="true"] svg { color: var(--gold); }
.fy-summary { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 6px 0; color: var(--ink-2); font-size: 13px; text-align: left; }
.fy-summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fy-summary svg { width: 14px; height: 14px; flex: none; color: var(--ink-3); }
.tool-row { display: flex; gap: 8px; }
.search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); }
.search:focus-within { border-color: var(--gold); }
.search svg { width: 17px; height: 17px; color: var(--ink-3); flex: none; }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 16px; height: 100%; }
.search input::-webkit-search-cancel-button { filter: grayscale(1); }
.tool-row .chip { height: 42px; flex: none; }
@media (min-width: 760px) {
  .toolbar { grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); align-items: center; margin: 8px 0 22px; }
}

/* Grid + cards */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
#cat-state .grid { margin-top: 0; }

.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s ease, transform .2s ease; min-width: 0; }
@media (hover: hover) { .card:hover { box-shadow: var(--shadow); transform: translateY(-2px); } }
.card-hit { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 0; -webkit-tap-highlight-color: transparent; }
.card-media { position: relative; aspect-ratio: 1; background: var(--surface-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.lab { position: absolute; left: 8px; bottom: 8px; font-size: 10px; font-weight: 600; letter-spacing: 0.08em; padding: 3px 7px; border-radius: 6px; background: rgba(255,255,255,0.86); color: #2a2722; }
.fy-tag { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; letter-spacing: 0.04em; padding: 3px 8px; border-radius: 999px; background: #1b1a17; color: #f3e6c8; }
.fy-tag svg { width: 10px; height: 10px; color: #cfae6f; }
.card-body { padding: 10px 12px 12px; display: grid; gap: 2px; }
.card-title { font-family: var(--serif); font-size: 19px; font-weight: 600; line-height: 1.15; margin: 0 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-spec { margin: 0; font-size: 13px; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.card-origin { margin: 0; font-size: 12.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; line-height: 1.45; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--ink-2); min-width: 0; }
.pin { display: inline-flex; align-items: center; gap: 3px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pin svg { width: 13px; height: 13px; flex: none; color: var(--gold); }
.ref { font-size: 11px; letter-spacing: 0.06em; color: var(--ink-3); font-variant-numeric: tabular-nums; flex: none; }
.card-price { margin: 6px 0 0; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; letter-spacing: 0.04em; color: var(--gold); font-weight: 500; }
.heart { position: absolute; top: 8px; right: 8px; width: 38px; height: 38px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255,255,255,0.9); box-shadow: 0 2px 8px rgba(0,0,0,0.08); -webkit-tap-highlight-color: transparent; }
.heart svg { width: 19px; height: 19px; fill: none; stroke: #2a2722; stroke-width: 1.7; transition: transform .2s ease; }
.heart[aria-pressed="true"] svg { fill: var(--heart); stroke: var(--heart); transform: scale(1.06); }
.heart:active svg { transform: scale(0.85); }
.card.gone .card-media img { filter: grayscale(0.8); opacity: 0.6; }
.card-skel { border-color: var(--line); }

.more { display: grid; place-items: center; padding: 28px; color: var(--ink-3); }
.end { text-align: center; color: var(--ink-3); font-size: 13px; padding: 28px 0 8px; margin: 0; }
#cat-state > .notice { margin-top: 8px; }
#sentinel { height: 1px; }

/* Detail */
.detail { display: grid; gap: 18px; }
@media (min-width: 760px) { .detail { grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; } }
.carousel { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 1; }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.car-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.9); color: #2a2722; display: none; place-items: center; box-shadow: var(--shadow); }
.car-btn svg { width: 18px; height: 18px; }
.car-btn.prev { left: 10px; } .car-btn.next { right: 10px; }
@media (hover: hover) { .car-btn { display: grid; } }
.dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.6); box-shadow: 0 0 0 1px rgba(0,0,0,0.12); transition: width .2s; }
.dot.on { width: 18px; border-radius: 3px; background: #fff; }
.illus { position: absolute; left: 10px; top: 10px; font-size: 11px; color: #5a554d; background: rgba(255,255,255,0.8); padding: 3px 8px; border-radius: 999px; }
.eyebrow { margin: 0 0 2px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.detail-title { font-family: var(--serif); font-weight: 600; font-size: 32px; line-height: 1.1; margin: 0 0 8px; }
.detail-title span { color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.detail-loc { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; color: var(--ink-2); }
.detail-loc svg { width: 16px; height: 16px; color: var(--gold); }
.price { margin: 0 0 16px; font-weight: 500; color: var(--gold); letter-spacing: 0.02em; }
.gone-banner { background: var(--warn-soft); color: var(--warn); padding: 10px 12px; border-radius: var(--radius-sm); margin: 0 0 12px; font-size: 14px; }
.facts { margin: 0 0 16px; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.fy-note { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-2); margin: 0 0 14px; }
.fy-note svg { width: 14px; height: 14px; color: var(--gold); flex: none; }
.detail-actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-bottom: 10px; }
.heart-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.heart-btn[aria-pressed="true"] svg { fill: var(--heart); stroke: var(--heart); }

/* Sheets content */
.group { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.group legend { margin-bottom: 10px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Wishlist */
.wl-head { margin: 6px 0 14px; }
.wl-head h1 { font-family: var(--serif); font-weight: 600; font-size: 34px; margin: 0 0 4px; line-height: 1.1; }
.wl-tools { display: flex; justify-content: flex-end; margin-bottom: 8px; font-size: 14px; }
.wl-sub { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin: 26px 0 10px; }
.wl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 900px) { .wl-list { grid-template-columns: 1fr 1fr; } }
.wl-row { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; transition: border-color .15s, box-shadow .15s; }
.wl-row.sel { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.wl-row.gone { background: transparent; }
.wl-row.gone img { filter: grayscale(0.85); opacity: 0.55; }
.cb { position: relative; display: grid; place-items: center; width: 32px; height: 44px; flex: none; cursor: pointer; }
.cb input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.cb-box { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line-strong); display: grid; place-items: center; background: var(--surface); color: transparent; }
.cb-box svg { width: 15px; height: 15px; }
.cb input:checked + .sr-only + .cb-box { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.cb input:focus-visible + .sr-only + .cb-box { outline: 2px solid var(--gold); outline-offset: 2px; }
.cb-space { width: 32px; flex: none; }
.wl-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; border: 0; background: none; padding: 0; text-align: left; }
.wl-main img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; background: var(--surface-2); }
.wl-text { min-width: 0; display: grid; gap: 2px; }
.wl-title { font-family: var(--serif); font-weight: 600; font-size: 18px; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-ct { font-family: var(--font); font-size: 13px; font-weight: 500; color: var(--ink-2); }
.wl-meta { font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-foot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); min-width: 0; }
.wl-remove { width: 36px; height: 36px; border-color: transparent; background: transparent; color: var(--ink-3); }

.interest-bar { position: fixed; left: 0; right: 0; bottom: calc(57px + env(safe-area-inset-bottom)); z-index: 25; background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(0,0,0,0.05); }
.interest-bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.ib-text { font-size: 13px; color: var(--ink-2); min-width: 0; }
.interest-bar .btn { flex: none; }
@media (min-width: 760px) { .interest-bar { bottom: 0; } .interest-bar .wrap { justify-content: flex-end; gap: 20px; } }

/* Interest sheet */
.int-list { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.int-list li { display: flex; gap: 12px; align-items: center; font-size: 14px; min-width: 0; }
.int-list li > span { min-width: 0; }
.int-list img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; }
.done { text-align: center; padding: 26px 4px 10px; }
.done-icon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.done-icon svg { width: 30px; height: 30px; }
.done h2 { font-family: var(--serif); font-weight: 600; font-size: 34px; margin: 0 0 8px; }
.done p { margin: 0 auto 10px; max-width: 36ch; color: var(--ink-2); }
