/* Thingworth app. Brand tokens and shapes follow landing.html:
   cream paper, deep green ink, one loud orange, soft tiles; flat fills,
   crisp ink outlines, pill buttons, the swing-tag price shape. */
:root {
  --cream: #fff7ea;
  --paper: #ffffff;
  --ink: #12372a;
  --soft: #4b6b5e;
  --line: #eadfc9;
  --orange: #ff6b35;
  --sun: #ffd23f;
  --mint: #a4e8c9;
  --pink: #ffb1ca;
  --sky: #b3d9ff;
  --lilac: #cfc0ff;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 24px;
  --edge: 2.5px solid var(--ink);
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1rem/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 8px; }
.wrap { max-width: 920px; margin: 0 auto; padding-inline: var(--gutter); }

h1, h2 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-weight: 650;
  letter-spacing: -.03em;
  line-height: 1.02;
  margin: 0 0 .6rem;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 11vw, 3.8rem); line-height: .96; }
h2 { font-size: 1.5rem; letter-spacing: -.02em; line-height: 1.1; }
.muted { color: var(--soft); }
.small { font-size: .875rem; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--orange); }
a:hover { color: var(--orange); }

/* ---------- site header and footer (same as the home page, index.html) ---------- */
.site-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: max(20px, env(safe-area-inset-left, 0px)); display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; }
.site-nav { padding-block: 14px; position: sticky; top: 0; z-index: 9; margin-bottom: 24px; background: color-mix(in srgb, var(--cream) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1.5px solid var(--line); }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo img { width: 40px; height: 40px; display: block; transition: transform .3s cubic-bezier(.2, 1.6, .4, 1); }
.logo:hover img { transform: rotate(-14deg); }
.logo span { font: 700 1.6rem/1 var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; letter-spacing: -.035em; }
.nav-links { display: flex; align-items: center; gap: 10px 28px; font-weight: 600; font-size: .95rem; }
.nav-links a { text-decoration: none; color: var(--soft); }
.nav-links a:hover { color: var(--ink); }
.nav-links .pill { margin-right: -16px; }
@media (max-width: 820px) {
  .nav-links { gap: 8px; }
  .nav-links a { display: none; }
  .nav-links .pill { margin-right: 0; }
}
/* On a phone the mark alone stands for the logo, so the demo pill and eBay button fit. */
@media (max-width: 480px) {
  .site-nav .logo span { display: none; }
}
.site-foot { padding-block: 36px 44px; font-size: .88rem; color: var(--soft); }
.site-foot .site-wrap { flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.site-foot .logo img { width: 30px; height: 30px; }
.site-foot .logo span { font-size: 1.2rem; }

/* the orange underlined "worth?" from the home page */
h1 .w { position: relative; display: inline-block; color: var(--orange); }
h1 .w svg { position: absolute; left: -3%; bottom: -.16em; width: 106%; height: .22em; overflow: visible; }
h1 .w path { fill: none; stroke: var(--ink); stroke-width: 5; stroke-linecap: round; }

/* ---------- cards ---------- */
.card {
  background: var(--paper);
  border: var(--edge);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-bottom: .4rem; }
.card-head h2 { margin: 0; }
.hero { text-align: center; padding: 28px 18px 22px; }
.tile-sun { background: var(--sun); }
.lede { color: var(--ink); max-width: 34rem; margin: 0 auto 22px; font-size: 1.05rem; }

/* ---------- mode switch ---------- */
.seg { display: flex; width: 100%; max-width: 520px; margin: 0 auto 16px; background: var(--paper); border: var(--edge); border-radius: 999px; padding: 4px; gap: 4px; }
.seg button { flex: 1; font: 700 .9rem/1.2 var(--body); border: 0; background: transparent; color: var(--ink); padding: 11px 10px; border-radius: 999px; cursor: pointer; transition: background-color .15s, color .15s; }
.seg button:hover { background: var(--cream); }
.seg button[aria-selected="true"] { background: var(--ink); color: var(--cream); }

/* ---------- photo drop ---------- */
.drop {
  display: grid; place-items: center;
  min-height: 220px; max-width: 520px; margin: 0 auto 18px;
  border: 2.5px dashed var(--ink); border-radius: var(--radius);
  cursor: pointer; overflow: hidden; background: var(--paper);
  transition: background-color .15s;
}
.drop:hover, .drop.drag { background: var(--cream); border-style: solid; }
.drop img { width: 100%; max-height: 380px; object-fit: contain; display: block; }
.drop-empty { display: grid; gap: 6px; justify-items: center; color: var(--soft); padding: 24px; text-align: center; }
.drop-empty svg { color: var(--ink); width: 44px; height: 44px; padding: 8px; box-sizing: content-box; background: var(--mint); border-radius: 50%; }
.drop-empty strong { color: var(--ink); font: 650 1.2rem/1.1 var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; letter-spacing: -.02em; }
.drop-empty small { font-size: .875rem; max-width: 26em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 1rem/1 var(--body);
  border-radius: 999px; padding: 15px 24px; border: 2px solid var(--ink);
  background: var(--ink); color: var(--cream);
  cursor: pointer; transition: transform .15s ease, background-color .15s ease, color .15s ease;
  min-height: 48px;
}
.btn:hover:not(:disabled) { background: var(--orange); border-color: var(--orange); color: var(--ink); transform: translateY(-2px) rotate(-1deg); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { background: var(--ink); color: var(--cream); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover:not(:disabled) { background: var(--paper); border-color: var(--ink); color: var(--ink); }
.btn.small { padding: 9px 16px; font-size: .875rem; min-height: 40px; white-space: nowrap; }
.btn.wide { width: 100%; max-width: 520px; }

/* ---------- layout ---------- */
.grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid > .card { margin-bottom: 0; }
@media (max-width: 720px) { .grid { grid-template-columns: 1fr; } }

/* ---------- form ---------- */
.field { display: grid; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--soft); margin-bottom: 12px; flex: 1; min-width: 0; }
.field input, .field select, .field textarea {
  font: 500 1rem var(--body); color: var(--ink);
  background: var(--cream); border: 2px solid var(--ink); border-radius: 14px;
  padding: 12px 14px; width: 100%; min-height: 48px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--orange); outline-offset: 2px; background: var(--paper); }
.field textarea { resize: vertical; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > .field { flex: 1 1 140px; }
.row.end { align-items: flex-end; }
.row.end .btn { margin-bottom: 12px; }
.price-field { flex: 0 1 180px; }
.price-input { display: flex; align-items: center; background: var(--cream); border: 2px solid var(--ink); border-radius: 14px; padding-left: 14px; }
.price-input:focus-within { outline: 3px solid var(--orange); outline-offset: 2px; background: var(--paper); }
.price-input span { color: var(--ink); font-size: 1.1rem; font-weight: 700; }
.price-input input { border: 0; background: transparent; outline: 0 !important; border-radius: 14px; }
#step-result > .row, #step-scan > .start-over { margin-top: 4px; }

/* ---------- the tag ---------- */
.tag {
  --hole: var(--paper);
  position: relative; display: inline-flex; align-items: center;
  background: var(--mint); color: var(--ink);
  font: 700 .8125rem/1.1 var(--body);
  padding: 9px 12px 9px 30px;
  clip-path: polygon(15px 0, 100% 0, 100% 100%, 15px 100%, 0 50%);
  border-radius: 0 9px 9px 0;
  max-width: 100%;
  font-variant-numeric: tabular-nums;
}
.tag::before { content: ""; position: absolute; left: 14px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--hole); }
.tag.warn { background: var(--sun); }
.tag:empty { display: none; }

.pill { font: 700 .75rem/1 var(--body); padding: 7px 12px; border-radius: 999px; background: var(--sun); color: var(--ink); border: 2px solid var(--ink); white-space: nowrap; }
.tip { background: var(--cream); border: 2px solid var(--ink); border-radius: 14px; padding: 10px 14px; font-size: .9rem; margin: 0 0 12px; }

/* ---------- valuation ---------- */
.value-card { display: flex; flex-direction: column; background: var(--mint); }
.value-card h2 { margin-bottom: .8rem; }
.big {
  --hole: var(--mint);
  position: relative; display: inline-flex; align-self: flex-start; align-items: center;
  background: var(--ink); color: var(--cream);
  font: 650 clamp(2rem, 9vw, 2.8rem)/1 var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  padding: 14px 20px 14px 46px; margin: 0 0 10px;
  clip-path: polygon(24px 0, 100% 0, 100% 100%, 24px 100%, 0 50%);
  border-radius: 0 14px 14px 0;
  max-width: 100%;
}
.big::before { content: ""; position: absolute; left: 22px; top: 50%; width: 11px; height: 11px; margin-top: -5.5px; border-radius: 50%; background: var(--hole); }
.range { position: relative; height: 14px; border-radius: 999px; background: var(--paper); border: 2px solid var(--ink); margin: 20px 0 6px; }
.range-marker { position: absolute; top: -8px; width: 8px; height: 26px; border-radius: 4px; background: var(--orange); border: 2px solid var(--ink); transform: translateX(-50%); }
.range-labels { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 700; color: var(--ink); }
.prices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.prices div { background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; padding: 10px 12px; }
.prices b { display: block; font: 650 1.3rem/1.2 var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; letter-spacing: -.02em; }
.prices span { font-size: .8rem; color: var(--soft); }

/* ---------- comparable items ---------- */
.comps { list-style: none; margin: 8px 0 0; padding: 0; }
.comps li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 0; border-top: 1.5px solid var(--line); align-items: baseline; }
.comps li.dim { opacity: .45; }
.comps .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.comps .t a { color: inherit; }
.comps .p { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.comps .meta { grid-column: 1 / -1; font-size: .8rem; color: var(--soft); }

/* ---------- listing result ---------- */
.result { background: var(--mint); border: 2px solid var(--ink); border-radius: 14px; padding: 14px; margin-top: 8px; overflow-wrap: anywhere; }
.result.error { background: var(--pink); }
.result pre { white-space: pre-wrap; font-size: .8rem; margin: 8px 0 0; max-height: 240px; overflow: auto; }
.result p { margin: 6px 0 0; }

.listings { list-style: none; padding: 0; margin: 0; }
.listings li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; border-top: 1.5px solid var(--line); }
.listings a { font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.listings li span { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
#listings-section { background: var(--lilac); }
#listings-section .listings li { border-top-color: color-mix(in srgb, var(--ink) 25%, transparent); }

/* ---------- notices ---------- */
.notice { background: var(--sun); border: var(--edge); border-radius: 18px; padding: 12px 16px; margin-bottom: 16px; font-weight: 500; }
.notice.error { background: var(--pink); color: var(--ink); }

/* ---------- busy ---------- */
.busy { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; background: color-mix(in srgb, var(--cream) 88%, transparent); z-index: 10; text-align: center; padding: 20px; }
.busy p { margin: 0; font-weight: 700; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--orange); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.4s; }
  .btn, .logo img { transition: none; }
  .btn:hover:not(:disabled) { transform: none; }
}

/* ---------- step 1 thumbnails ---------- */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; width: 100%; padding: 10px; align-self: stretch; }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; border: 2px solid var(--ink); display: block; }
.thumbs.single { grid-template-columns: 1fr; padding: 0; }
.thumbs.single img { aspect-ratio: auto; max-height: 380px; object-fit: contain; border: 0; border-radius: 0; }
.thumbs .more { display: grid; place-items: center; aspect-ratio: 1; border-radius: 14px; border: 2px dashed var(--ink); color: var(--ink); font-size: 1.6rem; font-weight: 700; }

/* ---------- listing photo strip ---------- */
.strip { display: flex; gap: 10px; flex-wrap: wrap; }
.strip .ph { position: relative; width: 84px; height: 84px; }
.strip .ph img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; border: 2px solid var(--ink); display: block; }
.strip .ph button { position: absolute; top: -8px; right: -8px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--ink); background: var(--cream); color: var(--ink); cursor: pointer; font-size: 16px; font-weight: 700; line-height: 1; padding: 0; }
.strip .ph button:hover { background: var(--orange); }
.strip .add { width: 84px; height: 84px; border-radius: 14px; border: 2px dashed var(--ink); background: transparent; color: var(--ink); font: 700 .8rem var(--body); cursor: pointer; }
.strip .add:hover { background: var(--cream); border-style: solid; }

/* ---------- shelf scan ---------- */
.scan-photo { display: flex; justify-content: center; margin-top: 12px; border-radius: 16px; border: 2px solid var(--ink); overflow: hidden; background: var(--cream); }
.scan-photo .frame { position: relative; line-height: 0; }
.scan-photo img { display: block; max-width: 100%; max-height: 520px; width: auto; height: auto; }
.scan-photo .hit { position: absolute; border: 2.5px solid var(--ink); border-radius: 6px; }
.scan-photo .hit span { position: absolute; top: -2.5px; left: -2.5px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 4px 0 6px 0; border: 2px solid var(--ink); font: 700 .75rem/18px var(--body); text-align: center; color: var(--ink); }
.hit.sell span { background: var(--mint); }
.hit.bundle span { background: var(--sun); }
.hit.letgo span { background: var(--pink); }
.scan-groups { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.scan-groups .card { margin-bottom: 0; }
@media (max-width: 860px) { .scan-groups { grid-template-columns: 1fr; } }
.group.sell { background: var(--mint); }
.group.bundle { background: var(--sun); }
.group.letgo { background: var(--pink); }
.group .muted { color: var(--ink); opacity: .75; }
.scan-list { list-style: none; margin: 0; padding: 0; }
.scan-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 10px; align-items: baseline; padding: 12px 0; border-top: 1.5px solid color-mix(in srgb, var(--ink) 25%, transparent); }
.num { font: 700 .75rem var(--body); color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; min-width: 1.9em; padding: 1px 4px; text-align: center; font-variant-numeric: tabular-nums; }
.scan-list .name { min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.scan-list .val { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.scan-list .sub { grid-column: 2 / -1; font-size: .8rem; color: var(--ink); opacity: .75; }
.scan-list .go { grid-column: 2 / -1; justify-self: start; margin-top: 6px; }
.group .btn.ghost:hover:not(:disabled) { background: var(--paper); }
.bundle-box { border-top: 1.5px solid color-mix(in srgb, var(--ink) 25%, transparent); padding: 12px 0; }
.bundle-box .head { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
.bundle-box ul { list-style: none; padding: 0; margin: 8px 0 10px; font-size: .875rem; }
.bundle-box li { display: flex; gap: 8px; padding: 3px 0; align-items: baseline; }
.chip { font: 700 .7rem/1.2 var(--body); text-transform: uppercase; letter-spacing: .04em; padding: 4px 10px; border-radius: 999px; background: var(--paper); border: 2px solid var(--ink); color: var(--ink); }
.pill, .btn.small { white-space: nowrap; }

@media (max-width: 400px) {
  .logo span { font-size: 1.3rem; }
  .logo img { width: 32px; height: 32px; }
  .card { padding: 16px; }
  .seg button { font-size: .85rem; padding: 10px 6px; }
}
@media (min-width: 721px) {
  .card { padding: 26px; }
  .hero { padding: 40px 28px 32px; }
}

/* ---------- tracker: header switch ---------- */
.seg.nav { margin: 0 auto 20px; max-width: none; }
.count { display: inline-block; min-width: 1.5em; padding: 2px 6px; margin-left: 4px; border-radius: 999px; background: var(--sun); color: var(--ink); border: 2px solid var(--ink); font: 700 .75rem/1.2 var(--body); font-variant-numeric: tabular-nums; }

/* ---------- tracker: status pills ---------- */
.st { display: inline-flex; align-items: center; font: 700 .76rem/1 var(--body); padding: 6px 11px; border-radius: 999px; background: var(--c, var(--line)); border: 1.5px solid var(--ink); white-space: nowrap; }
.tile-mint { background: var(--mint); }

/* ---------- tracker: summary ---------- */
.tr-summary { display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px; margin-bottom: 16px; }
.tr-summary .card { margin-bottom: 0; }
.tr-month .big { --hole: var(--mint); }
.tr-month p { margin: 6px 0 0; }
.tr-dl { margin: 8px 0 0; display: grid; gap: 0; }
.tr-dl div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1.5px solid var(--line); font-variant-numeric: tabular-nums; }
.tr-dl dt { color: var(--soft); }
.tr-dl dd { margin: 0; font-weight: 700; }
.tr-dl .total { border-top: var(--edge); font-size: 1.1rem; }
.tr-dl .total dt { color: var(--ink); font-weight: 700; }
@media (max-width: 720px) { .tr-summary { grid-template-columns: 1fr; } }

.tr-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tr-actions .btn { text-decoration: none; }
.tr-empty { padding: 8px 0 6px; }
.tr-empty .lede-s { font: 650 1.3rem/1.2 var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; margin: 0 0 6px; }

/* ---------- tracker: items ---------- */
.tr-thumb { width: 52px; height: 52px; border-radius: 12px; border: 2px solid var(--ink); background: var(--cream); object-fit: cover; flex: none; display: block; }
.tr-thumb.blank { display: grid; place-items: center; font: 650 1.2rem var(--display); color: var(--soft); }
.tr-cards { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.tr-card { display: grid; gap: 10px; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; background: var(--cream); border: 2px solid var(--ink); border-radius: 18px; padding: 12px; }
.tr-card:hover { background: var(--paper); }
.tr-card .top-line { display: flex; gap: 12px; align-items: center; }
.tr-card .who { min-width: 0; flex: 1; display: grid; gap: 2px; }
.tr-card .name { font-weight: 700; overflow-wrap: anywhere; line-height: 1.25; }
.tr-card .where { font-size: .8rem; color: var(--soft); }
.tr-card .nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tr-card .nums span { display: grid; gap: 1px; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--paper); border: 1.5px solid var(--line); border-radius: 12px; padding: 6px 10px; }
.tr-card .nums small { font-weight: 500; font-size: .72rem; color: var(--soft); }
.made-pos { color: var(--ink); }
.made-neg { color: #a2251a; }
.tr-table-wrap { display: none; }
.tr-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tr-table th { text-align: left; font: 700 .7rem/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--soft); padding: 12px; }
.tr-table td { padding: 12px; border-top: 1.5px solid var(--line); vertical-align: middle; }
.tr-table th:nth-child(n+3), .tr-table td:nth-child(n+3) { text-align: right; font-variant-numeric: tabular-nums; }
.tr-table tbody tr { cursor: pointer; }
.tr-table tbody tr:hover { background: var(--cream); }
.tr-table .thing { display: flex; gap: 12px; align-items: center; }
.tr-table .thing .tr-thumb { width: 44px; height: 44px; }
.tr-table .open { font: 700 1rem var(--body); background: none; border: 0; padding: 0; color: inherit; text-align: left; cursor: pointer; }
.tr-table .open:hover { color: var(--orange); }
.tr-table .where { display: block; font-size: .8rem; color: var(--soft); }
.tr-table td small { display: block; font-size: .72rem; color: var(--soft); }
@media (min-width: 721px) {
  .tr-cards { display: none; }
  .tr-table-wrap { display: block; }
}

/* ---------- tracker: edit form ---------- */
.tr-edit-title { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.tr-edit-title h2 { margin: 0; overflow-wrap: anywhere; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick .btn { min-height: 52px; padding: 12px 10px; }
.quick .btn.on { background: var(--ink); color: var(--cream); }
.sale { border: var(--edge); border-radius: 18px; background: var(--mint); padding: 14px 14px 4px; margin: 0 0 16px; min-width: 0; }
.sale legend { font: 700 .8rem var(--body); background: var(--ink); color: var(--cream); border-radius: 999px; padding: 4px 12px; }
.sale .field { color: var(--ink); }
.sale .btn.wide { max-width: none; margin-bottom: 12px; }
.tr-profit { margin: 0 0 12px; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; display: block; cursor: pointer; }
.chips input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; min-height: 0; cursor: pointer; }
.chips span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--ink); background: var(--cream); color: var(--ink); font: 700 .9rem var(--body); }
.chips input:checked + span { background: var(--c, var(--ink)); color: var(--ink); }
.chips input:checked + span::before { content: "✓"; margin-right: 6px; }
#te-marketplace input:checked + span { background: var(--ink); color: var(--cream); }
.chips input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.te-buttons { margin-top: 8px; }
.te-buttons .btn { flex: 1 1 140px; }
#te-confirm .row { margin-top: 10px; }
#track-result { margin-top: 0; }
.field input[type="date"] { min-width: 0; max-width: 100%; -webkit-appearance: none; appearance: none; text-align: left; }
.row > .field { min-width: 0; }
.tr-edit-title h2 { font-size: 1.25rem; line-height: 1.15; }

/* ---------- one item: labelled photo slots ---------- */
.slots-wrap { max-width: 520px; margin: 0 auto 18px; }
.slots-hint { font-size: .875rem; margin: 0 0 10px; text-align: center; }
.slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 420px) { .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.slot { position: relative; }
.slot-pick {
  display: grid; place-items: center; align-content: center; gap: 6px;
  position: relative; aspect-ratio: 1; padding: 8px; overflow: hidden; cursor: pointer; text-align: center;
  background: var(--paper); border: 2.5px dashed var(--ink); border-radius: 18px;
  transition: background-color .15s;
}
.slot-pick:hover, .slot.drag .slot-pick { background: var(--cream); border-style: solid; }
.slot-pick:focus-within { outline: 3px solid var(--orange); outline-offset: 2px; }
.slot.first:not(.filled) .slot-pick { background: var(--mint); }
.slot-icon { display: grid; color: var(--ink); }
.slot-name { display: grid; gap: 2px; font: 700 .8rem/1.15 var(--body); color: var(--ink); }
.slot-name small { font-weight: 500; color: var(--soft); }
.slot.filled .slot-pick { border-style: solid; padding: 0; place-items: stretch; }
.slot.filled .slot-pick img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot.filled .slot-name { position: absolute; left: 6px; bottom: 6px; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 8px; font-size: .72rem; }
.slot.filled .grade { position: absolute; right: 6px; top: 6px; }
.slot-x { position: absolute; top: -8px; right: -8px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--ink); background: var(--cream); color: var(--ink); cursor: pointer; font-size: 16px; font-weight: 700; line-height: 1; padding: 0; z-index: 1; }
.slot-x:hover { background: var(--orange); }

/* ---------- photo grades ---------- */
.grade { display: inline-block; font: 700 .68rem/1.2 var(--body); text-transform: uppercase; letter-spacing: .04em; padding: 3px 8px; border-radius: 999px; border: 2px solid var(--ink); background: var(--mint); color: var(--ink); }
.grade.ok { background: var(--sun); }
.grade.retake { background: var(--pink); }
.strip .ph .grade { position: absolute; left: 4px; bottom: 4px; font-size: .6rem; padding: 2px 6px; }
.qp-list { list-style: none; margin: 10px 0 12px; padding: 0; }
.qp-list li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 0; border-top: 1.5px solid var(--line); }
.qp-list img { width: 56px; height: 56px; object-fit: cover; border-radius: 12px; border: 2px solid var(--ink); display: block; }
.qp-list b { margin-right: 8px; }
.qp-list p { margin: 4px 0 0; }

/* ---------- one item: questions ---------- */
.q-list { margin: 14px 0 4px; }
.q { border: 0; padding: 14px 0 6px; margin: 0; border-top: 1.5px solid var(--line); min-width: 0; }
.q legend { float: left; width: 100%; padding: 0; font-weight: 700; color: var(--ink); }
.q legend + * { clear: both; }
.q-need { display: inline-block; margin-left: 8px; font: 700 .68rem/1.2 var(--body); text-transform: uppercase; letter-spacing: .04em; padding: 3px 8px; border-radius: 999px; background: var(--sun); border: 2px solid var(--ink); vertical-align: 1px; }
.q-why { margin: 4px 0 8px; }
.q.missing legend { color: #b4232f; }
.q.missing .q-opt span, .q.missing .q-input { border-color: #b4232f; }
.q-input { width: 100%; box-sizing: border-box; font: 500 1rem var(--body); color: var(--ink); background: var(--cream); border: 2px solid var(--ink); border-radius: 12px; padding: 11px 12px; margin: 4px 0 8px; }
.q-input:focus { outline: 3px solid var(--orange); outline-offset: 2px; background: var(--paper); }
.q-opts { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.q-opt { position: relative; }
.q-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.q-opt span { display: inline-block; font: 600 .9rem/1.2 var(--body); padding: 9px 14px; border-radius: 999px; border: 2px solid var(--ink); background: var(--paper); cursor: pointer; }
.q-opt span:hover { background: var(--cream); }
.q-opt input:checked + span { background: var(--ink); color: var(--cream); }
.q-opt input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.q-buttons { margin-top: 8px; }
.quality-card .card-head h2 { font-size: 1.25rem; }

/* ---------- estimate from the new price ---------- */
.new-price { margin-top: 12px; background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; padding: 10px 12px; overflow-wrap: anywhere; }
.new-price p { margin: 0; }
.new-price p + p { margin-top: 4px; color: var(--soft); }
.new-price a { color: inherit; font-weight: 700; }
.value-note { background: var(--sun); border: 2px solid var(--ink); border-radius: 14px; padding: 10px 12px; font-size: .875rem; margin: 0 0 14px; }
