/* ============================================================
   FlipLens design system
   Dark technical aesthetic, lime accent, mobile-first.
   ============================================================ */
:root {
  --bg: #050707;
  --surface: #0b0f0e;
  --surface-2: #101614;
  --line: #232b27;
  --line-soft: #1a201d;
  --text: #f5f7f1;
  --muted: #99a29a;
  --dim: #6f776f;
  --lime: #dfff21;
  --buy: #6ee787;
  --maybe: #ffc95c;
  --pass: #ff8a7a;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 8px 24px rgba(0, 0, 0, .35);
  --pad: clamp(16px, 4vw, 28px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, h5 { margin: 0; line-height: 1.15; letter-spacing: -.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--muted); }
.fine { font-size: 12px; color: var(--dim); }
.center { text-align: center; }
.link { color: var(--lime); font-weight: 700; }

/* ---------- Buttons ---------- */
.primary, .secondary, .ghost, .nav-cta {
  border-radius: var(--radius-sm);
  font-weight: 700;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid transparent;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.primary, .nav-cta { background: var(--lime); color: #080a08; font-weight: 800; }
.primary:active, .nav-cta:active { transform: translateY(1px); }
.secondary { background: transparent; border-color: #49504b; color: var(--text); }
.secondary:hover { border-color: var(--muted); }
.ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.ghost:hover { color: var(--text); border-color: #3a433c; }
.small { min-height: 38px; padding: 8px 14px; font-size: 13px; }
.block { width: 100%; }
.big { min-height: 56px; font-size: 16px; }
.primary:disabled, .secondary:disabled, .ghost:disabled { opacity: .5; cursor: not-allowed; }
.row-buttons { display: flex; gap: 10px; margin-top: 14px; }
.row-buttons.wrap { flex-wrap: wrap; }
.row-buttons > * { flex: 1 1 auto; }

/* ---------- Topbar ---------- */
.topbar {
  height: 64px; display: flex; align-items: center; gap: 22px;
  padding: 0 var(--pad);
  position: sticky; top: 0; z-index: 20;
  background: rgba(5, 7, 7, .9); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.brand { font-size: 19px; font-weight: 800; display: flex; align-items: center; gap: 9px; margin-right: auto; }
.mark {
  width: 28px; height: 28px; border: 3px solid var(--lime); border-radius: 7px 15px 7px 15px;
  display: grid; place-items: center; color: var(--lime); font-size: 14px; flex: none;
}
.mainnav { display: flex; gap: 22px; font-size: 14px; color: var(--muted); }
.mainnav a { padding: 4px 0; border-bottom: 2px solid transparent; }
.mainnav a:hover { color: var(--text); }
.mainnav a.active { color: var(--text); border-bottom-color: var(--lime); }
.nav-cta { min-height: 40px; padding: 9px 16px; font-size: 14px; }

/* ---------- Layout ---------- */
main { max-width: 980px; margin: 0 auto; padding: clamp(24px, 5vw, 44px) var(--pad) 72px; }
.view { display: grid; gap: 18px; animation: rise .25s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, .view { animation: none !important; transition: none !important; } }

.hero-head, .view-head { display: grid; gap: 12px; }
.eyebrow { font-size: 11px; letter-spacing: .18em; color: var(--lime); font-weight: 800; }
h1 { font-size: clamp(32px, 6.5vw, 52px); letter-spacing: -.03em; }
.lede { color: var(--muted); font-size: clamp(15px, 2.2vw, 18px); max-width: 62ch; }

/* ---------- Cards ---------- */
.card, .scan-card, .verdict-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: var(--pad); box-shadow: var(--shadow);
  display: grid; gap: 14px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-kicker { font-size: 11px; letter-spacing: .16em; color: var(--muted); font-weight: 800; }
h3 { font-size: 17px; }
h5 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.chip {
  font-size: 10px; font-weight: 800; letter-spacing: .1em; padding: 5px 9px;
  border: 1px solid var(--line); border-radius: 999px; color: var(--muted); white-space: nowrap;
}
.chip.live { color: var(--buy); border-color: rgba(110, 231, 135, .35); }

/* ---------- Scan ---------- */
.dropzone {
  min-height: 190px; border: 1.5px dashed #3f4a43; border-radius: var(--radius);
  display: grid; place-items: center; align-content: center; gap: 8px; text-align: center;
  color: var(--muted); padding: 24px; cursor: pointer; background: var(--surface-2);
  transition: border-color .15s ease, background .15s ease;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--lime); background: #121a15; }
.camera { font-size: 34px; color: var(--lime); }
.dropzone b { color: var(--text); font-size: 16px; }

.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb { position: relative; width: 78px; height: 78px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb button {
  position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; min-height: 0; padding: 0;
  border-radius: 50%; background: rgba(0, 0, 0, .75); color: #fff; border: 0; font-size: 13px; line-height: 1;
}
.thumb .primary-tag {
  position: absolute; bottom: 0; left: 0; right: 0; background: rgba(223, 255, 33, .9);
  color: #080a08; font-size: 9px; font-weight: 800; text-align: center; letter-spacing: .06em;
}

.tips summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.tips ul { margin-top: 10px; display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.tips li::before { content: "• "; color: var(--lime); }

.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.field { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.field > span { letter-spacing: .04em; }
.input-wrap { display: flex; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.input-wrap i { padding: 0 10px; font-style: normal; color: var(--dim); }
.input-wrap input { flex: 1; min-width: 0; background: none; border: 0; padding: 12px 10px 12px 0; }
.input-wrap input:focus { outline: none; }
.input-wrap:focus-within { border-color: var(--lime); }
select, .field input[type=text] {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px; width: 100%;
}

.status-line { min-height: 18px; font-size: 13px; color: var(--lime); text-align: center; }
.status-line.is-error { color: var(--pass); }

.stages { display: grid; gap: 8px; font-size: 13px; }
.stage { display: flex; align-items: center; gap: 10px; color: var(--dim); }
.stage .dot { width: 16px; text-align: center; }
.stage.active { color: var(--text); }
.stage.done { color: var(--muted); }
.stage.done .dot { color: var(--buy); }
.stage.warn .dot { color: var(--maybe); }

.value-props { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.value-props article { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 18px; background: var(--surface); }
.value-props b { color: var(--lime); display: block; margin-bottom: 6px; }
.value-props p { color: var(--muted); font-size: 14px; }

/* ---------- Verdict ---------- */
.report-actions-top { display: flex; justify-content: space-between; gap: 12px; }
.report-actions-top > * { flex: 0 0 auto; }
.verdict-card { border-width: 2px; }
.verdict-card[data-status=BUY] { border-color: rgba(110, 231, 135, .5); background: linear-gradient(160deg, rgba(110, 231, 135, .08), var(--surface) 55%); }
.verdict-card[data-status=MAYBE] { border-color: rgba(255, 201, 92, .45); background: linear-gradient(160deg, rgba(255, 201, 92, .07), var(--surface) 55%); }
.verdict-card[data-status=PASS] { border-color: rgba(255, 138, 122, .45); background: linear-gradient(160deg, rgba(255, 138, 122, .07), var(--surface) 55%); }
.verdict-main { display: flex; gap: 20px; align-items: center; }
.score-ring {
  --pct: 0; --ring: var(--muted);
  width: 104px; height: 104px; flex: none; border-radius: 50%; display: grid; place-items: center; align-content: center;
  background: conic-gradient(var(--ring) calc(var(--pct) * 1%), var(--line-soft) 0);
  position: relative;
}
.score-ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--surface); }
.score-value { position: relative; font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.score-label { position: relative; font-size: 8px; letter-spacing: .14em; color: var(--muted); font-weight: 800; }
.verdict-text { display: grid; gap: 8px; min-width: 0; }
.verdict-badge {
  justify-self: start; font-size: 13px; font-weight: 800; letter-spacing: .12em;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line);
}
.verdict-badge.buy { background: var(--buy); color: #06210e; border-color: var(--buy); }
.verdict-badge.maybe { color: var(--maybe); border-color: rgba(255, 201, 92, .5); }
.verdict-badge.pass { color: var(--pass); border-color: rgba(255, 138, 122, .5); }
.verdict-badge.unknown { color: var(--muted); }
.verdict-text h2 { font-size: clamp(20px, 4vw, 26px); }
.verdict-text p { color: var(--muted); font-size: 14px; }

/* ---------- Identification ---------- */
.id-body { display: flex; gap: 16px; align-items: flex-start; }
.report-photo { width: 108px; height: 108px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); flex: none; background: var(--surface-2); }
.id-body > div { display: grid; gap: 6px; min-width: 0; }
#itemName { font-size: 21px; }
.item-meta { color: var(--lime); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.edit-form { display: grid; gap: 10px; margin-top: 8px; }
.observations { border-top: 1px solid var(--line-soft); padding-top: 14px; display: grid; gap: 8px; }
.observations ul { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.observations li::before { content: "⚠ "; color: var(--maybe); }

/* ---------- Max buy ---------- */
.maxbuy-card { background: linear-gradient(160deg, rgba(223, 255, 33, .07), var(--surface) 60%); border-color: rgba(223, 255, 33, .35); }
.maxbuy-value { font-size: clamp(40px, 11vw, 60px); font-weight: 800; color: var(--lime); letter-spacing: -.04em; line-height: 1; }
.maxbuy-bar { height: 8px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.maxbuy-fill { height: 100%; border-radius: 999px; background: var(--lime); transition: width .3s ease; }
.maxbuy-fill.over { background: var(--pass); }

/* ---------- Ledger ---------- */
.ledger { display: grid; gap: 2px; font-size: 14px; }
.ledger-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.ledger-row:last-child { border-bottom: 0; }
.ledger-row > span { color: var(--muted); min-width: 0; }
.ledger-row > span small { display: block; margin-top: 2px; }
.ledger-row b { font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; }
.ledger-row.negative b { color: var(--pass); }
.ledger-row.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 14px; font-size: 16px; }
.ledger-row.total span { color: var(--text); font-weight: 700; }
.ledger-row.total b { color: var(--lime); font-size: 20px; font-weight: 800; }
.ledger-row.total.negative b { color: var(--pass); }
.calc-panel { border-top: 1px solid var(--line-soft); padding-top: 16px; display: grid; gap: 12px; }

/* ---------- Why ---------- */
.reasons, .risks, .notes-list { display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
.reasons li::before { content: "✓ "; color: var(--buy); font-weight: 800; }
.risks li::before { content: "⚠ "; color: var(--maybe); }
.notes-list li::before { content: "• "; color: var(--lime); }
.risks-head { margin-top: 6px; }

/* ---------- Evidence ---------- */
.evidence-block { border-top: 1px solid var(--line-soft); padding-top: 14px; display: grid; gap: 10px; }
.evidence-block:first-of-type { border-top: 0; padding-top: 0; }
.evidence-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.evidence-block.locked { opacity: .75; }
.comps { display: grid; gap: 8px; max-height: 340px; overflow: auto; }
.comp {
  display: flex; gap: 12px; align-items: center; border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); padding: 9px; transition: border-color .15s ease;
}
.comp:hover { border-color: #3a433c; }
.comp img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; flex: none; background: var(--surface-2); }
.comp-info { display: grid; gap: 3px; min-width: 0; flex: 1; }
.comp-title { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comp-price { color: var(--lime); font-weight: 800; font-size: 15px; }
.comp-cond { font-size: 11px; color: var(--dim); }

/* ---------- Flips & dashboard ---------- */
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.flips-list { display: grid; gap: 10px; }
.flip-row {
  display: flex; gap: 12px; align-items: center; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px;
}
.flip-row img { width: 58px; height: 58px; object-fit: cover; border-radius: var(--radius-sm); flex: none; background: var(--surface-2); }
.flip-info { display: grid; gap: 3px; min-width: 0; flex: 1; }
.flip-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flip-meta { font-size: 12px; color: var(--muted); }
.flip-right { text-align: right; display: grid; gap: 4px; flex: none; }
.flip-profit { font-weight: 800; color: var(--buy); font-variant-numeric: tabular-nums; }
.flip-profit.negative { color: var(--pass); }
.mini-badge { font-size: 9px; font-weight: 800; letter-spacing: .1em; padding: 3px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.mini-badge.buy { color: var(--buy); border-color: rgba(110, 231, 135, .4); }
.mini-badge.maybe { color: var(--maybe); border-color: rgba(255, 201, 92, .4); }
.mini-badge.pass { color: var(--pass); border-color: rgba(255, 138, 122, .4); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 6px; }
.stat small { font-size: 10px; letter-spacing: .12em; color: var(--muted); font-weight: 800; }
.stat b { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.stat.accent b { color: var(--lime); }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); display: grid; gap: 14px; justify-items: center; }
.empty .camera { font-size: 40px; }

/* ---------- Steps / plans ---------- */
.steps { display: grid; gap: 12px; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 6px; }
.steps b { color: var(--lime); font-size: 12px; letter-spacing: .1em; }
.steps p { color: var(--muted); font-size: 14px; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 12px; align-content: start; }
.plan.featured { border-color: var(--lime); box-shadow: 0 0 0 1px rgba(223, 255, 33, .25), var(--shadow); }
.plan-price { font-size: 34px; font-weight: 800; letter-spacing: -.03em; }
.plan-price small { font-size: 13px; color: var(--muted); font-weight: 500; }
.plan ul { display: grid; gap: 7px; font-size: 14px; color: var(--muted); }
.plan li::before { content: "✓ "; color: var(--lime); font-weight: 800; }

/* ---------- Modals ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(3, 5, 4, .8);
  backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px;
  animation: fade .2s ease both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--pad); width: min(480px, 100%); display: grid; gap: 12px;
  max-height: 88vh; overflow: auto; box-shadow: var(--shadow);
}
.chip-select { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-select button {
  border: 1px solid var(--line); background: var(--surface-2); color: var(--muted);
  border-radius: 999px; padding: 9px 14px; font-size: 13px; min-height: 40px;
}
.chip-select button[aria-pressed=true] { border-color: var(--lime); color: var(--lime); background: rgba(223, 255, 33, .08); }

footer { border-top: 1px solid var(--line-soft); padding: 26px var(--pad); color: var(--dim); font-size: 12px; text-align: center; }
.disclaimer { max-width: 60ch; margin: 0 auto; }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .mainnav { display: none; }
  .topbar { gap: 12px; }
  .verdict-main { flex-direction: column; align-items: flex-start; gap: 16px; }
  .score-ring { width: 92px; height: 92px; }
  .id-body { flex-direction: column; }
  .report-photo { width: 100%; height: 180px; }
  .row-buttons { flex-direction: column; }
  .row-buttons > * { width: 100%; }
  .report-actions-top { flex-direction: row; }
  .report-actions-top > * { flex: 1; }
}

/* ---------- Shelf scan ---------- */
.mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 6px;
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.mode-btn {
  padding: 12px 10px;
  font: inherit;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.mode-btn:hover { color: var(--text); }
.mode-btn.active { color: #10130c; background: var(--lime); }
.mode-btn:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

.shelf-preview {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 12px;
  margin-top: 12px;
}

.shelf-row {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px 10px;
  text-align: left;
  font: inherit;
  color: var(--text);
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.shelf-row:first-child { border-top: 0; }
.shelf-row:hover { background: rgba(255, 255, 255, 0.04); }
.shelf-row:focus-visible { outline: 2px solid var(--lime); outline-offset: -2px; }
.shelf-row.muted-row { cursor: default; }
.shelf-row.muted-row:hover { background: transparent; }

.shelf-rank {
  flex: 0 0 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #10130c;
  background: var(--lime);
  border-radius: 8px;
}
.shelf-rank.ghost-rank { color: var(--muted); background: var(--line); }

.shelf-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.shelf-title { font-weight: 600; }
.shelf-meta { font-size: 0.78rem; color: var(--muted); }
.shelf-value { font-weight: 700; white-space: nowrap; }
.shelf-query { font-size: 0.72rem; color: var(--dim); font-style: italic; }
.warn-note { color: var(--maybe); }

/* Shelf rows are editable, so the row is a container and the label is the button. */
.shelf-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
.shelf-main:disabled { cursor: default; opacity: 0.75; }
.shelf-main:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; border-radius: 6px; }

.shelf-actions { display: flex; gap: 4px; flex: 0 0 auto; }
.icon-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  line-height: 1;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.icon-btn:hover { color: var(--text); border-color: var(--muted); }
.icon-btn:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

.shelf-row.editing { align-items: flex-start; gap: 10px; }
.shelf-edit-input {
  width: 100%;
  padding: 9px 10px;
  margin: 4px 0;
  font: inherit;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.shelf-edit-input:focus { outline: none; border-color: var(--lime); }

.add-row { display: flex; gap: 8px; margin-top: 10px; }
.add-row input {
  flex: 1;
  min-width: 0;
  padding: 11px 12px;
  font: inherit;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.add-row input:focus { outline: none; border-color: var(--lime); }

/* On a phone the title, the value and two controls all compete for one row.
   Stacking value over controls in a narrow column gives the name room to breathe. */
.shelf-row { align-items: flex-start; }
.shelf-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex: 0 0 auto;
}
.shelf-value { line-height: 1.3; }
.icon-btn { width: 28px; height: 28px; font-size: 0.85rem; }
.shelf-title { line-height: 1.3; }
.shelf-meta { line-height: 1.4; }
.chip.loose { color: var(--pass); border-color: var(--pass); }

.market-row { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.market-row:first-child { border-top: 0; }
.market-src { font-size: 0.7rem; letter-spacing: .08em; color: var(--dim); text-transform: uppercase; }
.market-title { font-weight: 600; color: var(--text); text-decoration: none; }
a.market-title:hover { color: var(--lime); }
.market-stats { font-size: 0.82rem; color: var(--muted); }

/* ---------- Accounts ---------- */
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.account-btn {
  min-height: 40px; padding: 8px 14px; font: inherit; font-size: 14px; font-weight: 700;
  color: var(--text); background: transparent; border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
  max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.account-btn:hover { border-color: var(--muted); }
.account-btn.signed-in::before { content: "●"; color: var(--buy); margin-right: 6px; font-size: 10px; vertical-align: 2px; }
.account-btn:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
@media (max-width: 420px) { .nav-cta { display: none; } }

.account-banner {
  display: grid; gap: 10px; padding: 14px 16px; margin-bottom: 14px;
  background: rgba(223, 255, 33, .06); border: 1px solid rgba(223, 255, 33, .35); border-radius: var(--radius);
}
.account-banner p { margin: 0; font-size: 14px; }
.account-banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.account-modal { position: relative; }
.modal-close {
  position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; font-size: 22px; line-height: 1;
  color: var(--muted); background: transparent; border: 0; border-radius: 10px; cursor: pointer;
}
.modal-close:hover { color: var(--text); }
.acct-panel { display: grid; gap: 12px; }
.acct-panel h2 { margin: 0; padding-right: 36px; }
.acct-panel p { margin: 0; }
.acct-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* 16px or larger: iOS Safari zooms the whole page into any smaller input. */
.acct-panel input {
  width: 100%; padding: 12px; font: inherit; font-size: 16px; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.acct-panel input:focus { outline: none; border-color: var(--lime); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 64px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  padding: 6px 10px; font: inherit; font-size: 12px; font-weight: 700;
  color: var(--muted); background: transparent; border: 0; cursor: pointer;
}
.form-error { min-height: 18px; font-size: 13px; color: var(--maybe); }
.form-error:empty { min-height: 0; }
.field-hint { font-size: 11px; line-height: 1.35; color: var(--dim); }
.field-wide { grid-column: 1 / -1; }

/* ---------- List it for sale ---------- */
.sell-card { display: grid; gap: 12px; }
.sell-card h3, .sell-card p, .sell-card h5 { margin: 0; }
.kit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.kit-btn {
  min-height: 44px; padding: 10px 12px; font: inherit; font-size: 14px; font-weight: 700; text-align: left;
  color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer;
}
.kit-btn:hover, .kit-btn:focus-visible { border-color: var(--lime); outline: none; }
.sell-modal { position: relative; width: min(560px, 100%); }
.sell-form h5 { margin: 4px 0 0; }
.sell-form textarea, .sell-form select {
  width: 100%; padding: 12px; font: inherit; font-size: 16px; line-height: 1.4; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.sell-form textarea { resize: vertical; min-height: 80px; }
.sell-form textarea:focus, .sell-form select:focus { outline: none; border-color: var(--lime); }
.sell-form a.primary, .sell-form a.secondary { display: block; text-align: center; text-decoration: none; }
.sell-photos { display: flex; gap: 8px; overflow-x: auto; }
.sell-photos img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); flex: none; }
.sell-count { float: right; color: var(--dim); letter-spacing: 0; }
.sell-count.over { color: var(--pass); font-weight: 700; }
.sell-ebay, .sell-kit, .sell-connect, .sell-aspects, #sellCategoryDetails { display: grid; gap: 12px; }
.sell-ebay .field-grid { grid-template-columns: 1fr; }
.req { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--maybe); margin-left: 4px; }
.sell-notice {
  padding: 12px 14px; font-size: 14px; border-radius: var(--radius-sm);
  background: rgba(223, 255, 33, .06); border: 1px solid rgba(223, 255, 33, .35);
}
.sell-notice p { margin: 0 0 6px; }
.sell-toast {
  position: fixed; left: 16px; right: 16px; bottom: 20px; z-index: 60; margin: 0 auto; max-width: 480px;
  padding: 14px 16px; font-size: 14px; text-align: center; color: var(--text);
  background: var(--surface); border: 1px solid var(--lime); border-radius: var(--radius); box-shadow: var(--shadow);
}
