/* "Sell this" (sell.js). app.css tokens only; a bottom sheet on phones, a centred panel from 720px.
   Type roles: 16 heading, 15 body, 13 meta, and the display face for the price. */
dialog.sell-sheet { padding: 0; border: 1px solid var(--card-border); background: var(--bg); color: var(--text);
  width: 100%; max-width: 100%; max-height: 92vh; margin: auto 0 0; border-radius: 18px 18px 0 0; display: flex; flex-direction: column; overflow: hidden; }
dialog.sell-sheet:not([open]) { display: none; }
dialog.sell-sheet::backdrop { background: var(--backdrop); }

.ss-head { display: grid; grid-template-columns: 48px minmax(0, 1fr) 36px; align-items: center; gap: 12px; padding: 16px var(--inset); border-bottom: 1px solid var(--hairline); flex: none; }
.ss-thumb { width: 48px; height: 48px; border-radius: var(--r-thumb); background: var(--elevated); overflow: hidden; display: grid; place-items: center; color: var(--icon-muted); }
.ss-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ss-who { min-width: 0; }
.ss-who h2 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.ss-who p { margin: 2px 0 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-close { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--elevated); color: var(--secondary); display: grid; place-items: center; }
.ss-close svg { width: 16px; height: 16px; }

.ss-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px var(--inset) 8px; }
.ss-sites { display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(-1 * var(--inset)); padding: 0 var(--inset); scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--inset), #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 var(--inset), #000 calc(100% - 40px), transparent); }
.ss-sites::-webkit-scrollbar { display: none; }
.ss-sites .chip { flex: none; white-space: nowrap; }
.ss-sites .chip:last-child { margin-right: 24px; }
.ss-tip { margin: 12px 0 14px; font-size: 13px; line-height: 1.45; color: var(--secondary); }

.ss-card { padding: 0 6px 0 16px; }
.ss-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.ss-row:last-child { border-bottom: 0; }
.ss-field { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ss-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.ss-count { font-weight: 500; font-variant-numeric: tabular-nums; }
.ss-value { font-size: 15px; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }
.ss-title { font-weight: 600; }
.ss-desc { white-space: pre-wrap; color: var(--secondary); }
.ss-meta { font-size: 13px; line-height: 1.45; color: var(--muted); }

.ss-price { display: flex; align-items: baseline; gap: 2px; font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1; color: var(--text); }
.ss-price span { color: var(--secondary); }
.ss-price input { font: inherit; color: inherit; background: transparent; border: 0; border-bottom: 2px solid transparent; padding: 0; width: 6.5ch; outline: none; border-radius: 0; }
.ss-price input:hover { border-bottom-color: var(--chip-border); }
.ss-price input:focus { border-bottom-color: var(--accent); }

.ss-copy { width: 44px; height: 44px; margin-top: -10px; border: 0; border-radius: 50%; background: transparent; color: var(--secondary); display: grid; place-items: center; cursor: pointer; }
.ss-copy:hover { background: var(--elevated); color: var(--text); }
.ss-copy.done, .btn.done .ss-copy-icon { color: var(--accent-text); }
.btn.primary.done .ss-copy-icon { color: var(--on-accent); }
.ss-copy-icon { display: inline-grid; place-items: center; }
.ss-note { margin: 12px 2px 8px; }
.sell-sheet .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.ss-foot { flex: none; display: grid; gap: 10px; padding: 12px var(--inset) calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--hairline); background: var(--bg); }
.ss-foot.two { grid-template-columns: 1fr 1fr; }

/* A Flip deal: the hit, then its margin and Sell this, inside one card. */
.card.deal { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.card.deal > .hit { border: 0; border-radius: 0; }
.deal-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 10px 10px 12px; border-top: 1px solid var(--hairline); }

@media (min-width: 720px) {
  dialog.sell-sheet { width: 600px; margin: auto; border-radius: 18px; max-height: 88vh; }
}
.btn.ss-wide { width: 100%; }

/* Reverb and Discogs drafts */
.draft-body { display: grid; gap: 12px; align-content: start; }
.draft-body .ss-tip { margin: 0; }
.draft-connect, .draft-search { display: grid; gap: 8px; }
.draft-error { margin: 0; padding: 10px 12px; border-radius: var(--r-control); background: var(--accent-soft); color: var(--accent-text); font-size: 13.5px; }
.draft-releases { display: grid; gap: 8px; }
.draft-release { display: grid; gap: 2px; text-align: left; padding: 10px 14px; border-radius: var(--r-control); border: 1px solid var(--chip-border); background: var(--card); color: var(--text); }
.draft-release span { font-size: 13px; color: var(--secondary); }
.draft-release[aria-checked="true"] { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.draft-body .chips { margin: 0; }
