/* ===========================================================================
   EstateSaleEdit · Product Studio
   Warm antique-paper editorial UI for a non-technical resale audience.
   Display: Petrona (vintage character) · Body/UI: Hanken Grotesk (friendly)
   =========================================================================== */

:root {
  /* Surfaces */
  --paper:     #f5efe2;
  --paper-2:   #ece2cf;
  --surface:   #fffdf8;
  --surface-2: #faf4e9;
  --inset:     #f3ecdd;

  /* Ink */
  --ink:       #2b2520;
  --ink-soft:  #574e44;
  --muted:     #6f6557;   /* >=4.5:1 on all card surfaces (WCAG AA) */

  /* Lines */
  --line:      #e7dcc6;
  --line-soft: #f0e8d8;

  /* Accents */
  --rust:      #b35a2b;
  --rust-deep: #99461f;
  --rust-tint: #f6e4d6;
  --brass:     #c2982f;
  --sage:      #3f6d52;
  --sage-tint: #e2ecdf;
  --rose:      #9c3526;   /* AA on rose-tint at small bold sizes */
  --rose-tint: #f4ddd6;
  --gold-tint: #f5ead0;
  --gold-ink:  #7a5a14;   /* readable gold for running/active states (AA on gold-tint) */

  /* Radius */
  --r-sm: 10px;
  --r:    16px;
  --r-lg: 22px;
  --r-pill: 999px;

  /* Shadows (warm-tinted) */
  --sh-sm: 0 1px 2px rgba(74,52,28,.06), 0 2px 6px rgba(74,52,28,.05);
  --sh-md: 0 6px 18px rgba(74,52,28,.08), 0 16px 38px rgba(74,52,28,.07);
  --sh-lg: 0 24px 60px rgba(58,40,22,.18);

  --font-display: "Petrona", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  line-height: 1.55;
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

/* Atmospheric background: warm glow + faint paper grain */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(194,152,47,.16), transparent 58%),
    radial-gradient(980px 680px at 112% 6%, rgba(179,90,43,.13), transparent 55%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--rust-tint); color: var(--rust-deep); }

a { color: var(--rust-deep); }

/* ---------------------------------------------------------------- Topbar -- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 14px clamp(18px, 4vw, 40px);
  background: rgba(250,246,238,.82);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 44px; height: 44px; flex: none;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(74,52,28,.18));
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -.01em; margin: 0; }
.brand-sub { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.flow { display: flex; align-items: center; gap: 9px; }
.flow-step {
  font-size: 12px; letter-spacing: .04em; color: var(--muted);
  padding: 5px 11px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.55); border: 1px solid var(--line-soft);
  transition: background .15s var(--ease), color .15s var(--ease);
}
.flow-step.active { background: var(--rust-tint); color: var(--rust-deep); border-color: transparent; font-weight: 600; }
.flow-arrow { color: var(--line); font-size: 13px; }
@media (max-width: 720px) { .flow { display: none; } }

/* ------------------------------------------------------------------ Main -- */
main {
  max-width: 880px; margin: 0 auto;
  padding: clamp(22px, 4vw, 40px) clamp(16px, 4vw, 28px) 90px;
  display: flex; flex-direction: column; gap: 22px;
}

/* ------------------------------------------------------------ Studio card -- */
.studio-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(20px, 3vw, 30px);
  box-shadow: var(--sh-md);
}
.card-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 3.4vw, 28px); margin: 0; letter-spacing: -.01em; }
.card-lede { color: var(--muted); margin: 5px 0 0; font-size: 14.5px; }

/* ------------------------------------------------------- Fields & inputs -- */
.add-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 16px; margin: 22px 0 18px; }
@media (max-width: 560px) { .add-grid { grid-template-columns: 1fr; } }

.ifield { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.ifield-full { grid-column: 1 / -1; }
.ifield-label {
  font-size: 12.5px; font-weight: 600; color: var(--ink-soft); letter-spacing: .01em;
}
.ifield-label em { font-style: normal; font-weight: 400; color: var(--muted); }

input[type=text], input[type=number], .search, textarea, .price-input {
  font-family: var(--font-body); font-size: 15px; color: var(--ink);
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  padding: 11px 13px;
  width: 100%;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input[type=text]:hover, input[type=number]:hover, textarea:hover, .search:hover { border-color: #d8caae; }
input:focus, textarea:focus, .search:focus {
  outline: none; border-color: var(--rust); background: #fff;
  box-shadow: 0 0 0 4px rgba(179,90,43,.13);
}
textarea { min-height: 130px; resize: vertical; line-height: 1.6; }

/* price input with a $ glyph */
.price-input { display: inline-flex; align-items: center; gap: 4px; padding: 0 13px; }
.price-input:focus-within { border-color: var(--rust); background: #fff; box-shadow: 0 0 0 4px rgba(179,90,43,.13); }
.price-input .ccy { color: var(--muted); font-weight: 600; font-size: 15px; }
.price-input input {
  border: none; background: transparent; padding: 11px 0; box-shadow: none !important;
  font-family: var(--font-display); font-weight: 600; font-size: 18px;
}
.price-input input:focus { box-shadow: none; }

/* --------------------------------------------------------------- Dropzone -- */
.dropzone {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  text-align: center; cursor: pointer;
  padding: 34px 20px;
  border: 2px dashed #d6c7a8; border-radius: var(--r);
  background:
    repeating-linear-gradient(45deg, rgba(179,90,43,.02) 0 10px, transparent 10px 20px),
    var(--surface-2);
  color: var(--muted);
  transition: border-color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
}
.dropzone:hover { border-color: var(--rust); background: #fff; transform: translateY(-1px); }
/* the real file input covers the dropzone: clickable, droppable, and keyboard-focusable */
.dz-input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer;
}
.dropzone:focus-within { border-color: var(--rust); box-shadow: 0 0 0 4px rgba(179,90,43,.35); }
.dropzone.dz-active { border-color: var(--rust); background: #fff; }
.dz-icon { width: 38px; height: 38px; color: var(--rust); margin-bottom: 4px; }
.dz-title { font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--ink); }
.dz-hint { font-size: 13px; }
.dz-count { font-size: 13px; font-weight: 600; color: var(--sage); }

/* ----------------------------------------------------------------- Buttons -- */
.add-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.btn {
  font-family: var(--font-body); font-size: 14.5px; font-weight: 600;
  padding: 11px 20px; border-radius: var(--r-pill);
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .12s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
  display: inline-flex; align-items: center; gap: 7px;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(150deg, var(--rust) 0%, var(--rust-deep) 100%);
  color: #fff; box-shadow: 0 4px 14px rgba(153,70,31,.28);
}
.btn-primary:hover { box-shadow: 0 8px 22px rgba(153,70,31,.34); transform: translateY(-1px); }
.btn-primary:disabled { background: #e4d9c5; color: var(--ink-soft); box-shadow: none; cursor: not-allowed; transform: none; }
.btn-soft {
  background: var(--rust-tint); color: var(--rust-deep); border-color: transparent;
}
.btn-soft:hover { background: #f0d6c2; }
.btn-ghost { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--rust); color: var(--rust-deep); background: var(--surface-2); }

:focus-visible { outline: 3px solid rgba(179,90,43,.75); outline-offset: 2px; border-radius: 6px; }

/* ------------------------------------------------------------------ Queue -- */
.queue { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.queue:empty { margin: 0; }
.queue-item {
  display: flex; align-items: center; gap: 13px;
  padding: 10px 12px 10px 10px; border-radius: var(--r);
  background: var(--surface-2); border: 1px solid var(--line-soft);
  animation: rowIn .4s var(--ease) both;
}
.qthumb { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex: none; background: var(--inset); }
.qi-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.qi-name { font-weight: 600; font-size: 15px; }
.qi-sub { font-size: 12.5px; color: var(--muted); }
.queue-item .pill { margin-left: auto; }
.qi-x {
  width: 44px; height: 44px; margin: -6px -8px -6px 0; flex: none;
  display: grid; place-items: center;
  border: none; background: transparent; border-radius: 50%;
  color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer;
  transition: background .12s var(--ease), color .12s var(--ease);
}
.qi-x:hover { background: var(--rose-tint); color: var(--rose); }
.queue-item[data-status="running"] .qi-x,
.queue-item[data-status="done"] .qi-x { visibility: hidden; }

/* ------------------------------------------------------------------- Pill -- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; letter-spacing: .01em;
  padding: 5px 12px; border-radius: var(--r-pill);
  background: var(--inset); color: var(--muted);
  text-transform: capitalize; white-space: nowrap;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.running { background: var(--gold-tint); color: var(--gold-ink); }
.pill.running::before { animation: pulse 1.1s ease-in-out infinite; }
.pill.done { background: var(--sage-tint); color: var(--sage); }
.pill.error { background: var(--rose-tint); color: var(--rose); }

/* ---------------------------------------------------- Earlier finds panel -- */
.history-card { padding: 0; overflow: hidden; }
.history-card > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center;
  padding: clamp(18px, 2.6vw, 24px) clamp(20px, 3vw, 30px);
}
.history-card > summary::-webkit-details-marker { display: none; }
.summary-text { display: flex; flex-direction: column; }
.summary-text .card-title { font-size: 21px; }
.summary-text .card-lede { margin-top: 2px; }
.history-card > summary::after {
  content: "\25BE"; margin-left: auto; color: var(--muted); font-size: 14px;
  transition: transform .2s var(--ease);
}
.history-card[open] > summary::after { transform: rotate(180deg); }
.search { margin: 0 clamp(20px,3vw,30px); width: auto; }
.history {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px;
  padding: 16px clamp(20px,3vw,30px) clamp(20px,3vw,30px);
}
.hitem {
  display: flex; gap: 12px; align-items: center; text-align: left; padding: 11px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2);
  cursor: pointer; font-family: inherit; color: inherit;
  transition: border-color .14s var(--ease), box-shadow .14s var(--ease), transform .14s var(--ease);
}
.hitem:hover { border-color: var(--rust); box-shadow: var(--sh-md); transform: translateY(-2px); }
.hthumb { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex: none; background: var(--inset); }
.hthumb.ph, .cthumb.ph, .qthumb.ph {
  background: repeating-linear-gradient(45deg, rgba(143,132,117,.16) 0 7px, rgba(143,132,117,.07) 7px 14px);
}
.hmeta { flex: 1; min-width: 0; }
.htitle {
  font-family: var(--font-display); font-weight: 600; font-size: 15px; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.hsub { margin-top: 3px; font-size: 12.5px; color: var(--muted); }

/* --------------------------------------------------------------- Results -- */
.results-section { display: flex; flex-direction: column; gap: 18px; }
#results { display: flex; flex-direction: column; gap: 18px; }
.section-heading {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(20px, 3vw, 25px);
  margin: 6px 0 0; letter-spacing: -.01em;
}

.item-card {
  position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(20px, 3vw, 28px); box-shadow: var(--sh-md);
  animation: cardIn .5s var(--ease) both;
}
.item-card-error { border-color: var(--rose-tint); }

/* researched items collapse to a compact header row; click to expand */
.ic-wrap > summary { list-style: none; cursor: pointer; }
.ic-wrap > summary::-webkit-details-marker { display: none; }
.ic-wrap > summary:hover .ic-title { color: var(--rust-deep); }
.ic-wrap[open] > summary { margin-bottom: 16px; }
.ic-head { display: flex; align-items: center; gap: 14px; }
.ic-head::after {
  content: "\25BE"; color: var(--muted); font-size: 14px; flex: none;
  transition: transform .2s var(--ease);
}
.ic-wrap[open] .ic-head::after { transform: rotate(180deg); }
.item-card-error .ic-head { margin-bottom: 10px; }
.item-card-error .ic-head::after { content: none; }
.ic-photo {
  width: 72px; height: 72px; border-radius: 14px; object-fit: cover; flex: none;
  background: var(--inset); border: 1px solid var(--line);
}
.ic-headmeta { min-width: 0; flex: 1; }
.ic-headprice {
  margin-left: auto; flex: none; white-space: nowrap;
  font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--rust);
}
.ic-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(20px, 3vw, 25px); margin: 0; letter-spacing: -.01em; line-height: 1.2; }
.ic-meta { margin: 6px 0 0; color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; max-width: 75ch; }

/* confidence chip */
.conf {
  font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: var(--r-pill);
  text-transform: capitalize; letter-spacing: .02em;
  background: var(--gold-tint); color: var(--gold-ink);
}
.conf-high { background: var(--sage-tint); color: var(--sage); }
.conf-low { background: var(--rose-tint); color: var(--rose); }

/* valuation band */
.valuation {
  background: linear-gradient(170deg, var(--surface-2), var(--inset));
  border: 1px solid var(--line-soft); border-radius: var(--r);
  padding: 18px 20px; margin-bottom: 18px;
}
.val-stops { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.val-stop { display: flex; flex-direction: column; gap: 3px; }
.val-stop:first-child { align-items: flex-start; }
.val-stop:last-child { align-items: flex-end; }
.val-label { font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.val-num { font-family: var(--font-display); font-weight: 500; font-size: 22px; color: var(--ink-soft); }
.val-sug { align-items: center; }
.val-sug .val-label { color: var(--rust-deep); }
.val-sug .val-num { font-weight: 700; font-size: 38px; color: var(--rust); line-height: 1; letter-spacing: -.02em; }

.val-track {
  position: relative; height: 5px; margin: 16px 2px 0; border-radius: var(--r-pill);
  background: linear-gradient(90deg, #ddd0b6, var(--brass), var(--rust));
}
.val-marker {
  position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--rust);
  transform: translate(-50%, -50%); box-shadow: var(--sh-sm);
}
.val-foot { margin-top: 14px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dot-sep { color: var(--line); }

/* disclosures (reverse image search + comps) */
.disclosure {
  border: 1px solid var(--line-soft); border-radius: var(--r); background: var(--surface-2);
  margin-bottom: 16px; overflow: hidden;
}
.disclosure > summary {
  list-style: none; cursor: pointer; padding: 13px 16px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
  display: flex; align-items: center; gap: 9px;
}
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary::after { content: "\25BE"; margin-left: auto; color: var(--muted); font-size: 12px; transition: transform .2s var(--ease); }
.disclosure[open] > summary::after { transform: rotate(180deg); }
.dis-ico { font-size: 15px; }
.dis-hint { font-weight: 400; color: var(--muted); }
.dis-count {
  margin-left: 2px; font-size: 11.5px; font-weight: 700; color: var(--rust-deep);
  background: var(--rust-tint); padding: 1px 9px; border-radius: var(--r-pill);
}

/* reverse-image-search thumbnails */
.srcthumbs { display: flex; gap: 9px; flex-wrap: wrap; padding: 4px 16px 16px; }
.srcthumb {
  width: 66px; height: 66px; border-radius: 12px; overflow: hidden; display: block;
  border: 1.5px solid var(--line); cursor: pointer; position: relative;
  transition: transform .1s var(--ease), box-shadow .1s var(--ease), border-color .1s var(--ease);
}
.srcthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.srcthumb:hover { transform: translateY(-2px); border-color: var(--rust); box-shadow: var(--sh-md); }

/* comps */
.complist { padding: 4px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.comp {
  display: flex; gap: 12px; align-items: center; padding: 9px 11px;
  border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface);
  text-decoration: none; color: inherit;
  transition: border-color .12s var(--ease), box-shadow .12s var(--ease), transform .12s var(--ease);
}
.comp:hover { border-color: var(--rust); box-shadow: var(--sh-sm); transform: translateY(-1px); }
.cthumb { width: 50px; height: 50px; border-radius: 10px; object-fit: cover; flex: none; background: var(--inset); }
.cmeta { flex: 1; min-width: 0; }
.ctitle { font-size: 13px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cprice-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.cprice { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--ink); }
.csource { font-size: 11.5px; color: var(--muted); margin-left: auto; white-space: nowrap; }
.tag { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-pill); text-transform: uppercase; letter-spacing: .04em; }
.tag-sold { background: var(--sage-tint); color: var(--sage); }
.tag-active { background: var(--gold-tint); color: var(--gold-ink); }

/* editable fields grid */
.ic-fields { display: grid; grid-template-columns: 200px 1fr; gap: 16px; margin-bottom: 16px; }
.ic-fields .ifield-full { grid-column: 1 / -1; }
@media (max-width: 560px) { .ic-fields { grid-template-columns: 1fr; } }

/* card actions */
.ic-actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; padding-top: 4px; }
.saved { color: var(--sage); font-weight: 600; font-size: 13.5px; }
.ic-savepath { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); font-style: italic; max-width: 75ch; }
.errbox {
  color: var(--rose); font-size: 14px; margin-top: 10px;
  background: var(--rose-tint); padding: 12px 14px; border-radius: var(--r-sm);
}
.errbox p { margin: 0 0 8px; }
.errbox .err-detail { font-size: 12.5px; opacity: .85; }
.errbox .btn { margin-top: 2px; }
.notebox {
  color: var(--gold-ink); font-size: 13.5px; margin-top: 10px;
  background: var(--gold-tint); padding: 10px 14px; border-radius: var(--r-sm);
}

/* ----------------------------------------------------------- Publish modal -- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(40,32,24,.5); backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: clamp(20px, 6vh, 60px) 16px; overflow-y: auto;
  animation: fadeIn .2s var(--ease);
}
.modal {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  width: 100%; max-width: 580px; padding: clamp(20px, 3vw, 28px);
  box-shadow: var(--sh-lg); animation: cardIn .3s var(--ease);
}
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.modal-title { font-family: var(--font-display); font-weight: 600; font-size: 23px; margin: 0; }
.modal-sub { font-size: 13px; color: var(--muted); }
.modal-x {
  border: none; background: var(--surface-2); width: 44px; height: 44px; border-radius: 50%;
  font-size: 24px; line-height: 1; cursor: pointer; color: var(--muted); flex: none;
  transition: background .12s var(--ease), color .12s var(--ease);
}
.modal-x:hover { background: var(--rose-tint); color: var(--rose); }

.shopbody { display: flex; flex-direction: column; gap: 16px; }
.shop-section { display: flex; flex-direction: column; gap: 8px; }
.shop-label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.media { display: flex; gap: 8px; flex-wrap: wrap; }
.mthumb {
  width: 64px; height: 64px; border-radius: 12px; position: relative; cursor: pointer;
  border: 1.5px solid var(--line); overflow: hidden; padding: 0; background: none;
  transition: transform .1s var(--ease), border-color .1s var(--ease);
}
.mthumb:hover { transform: translateY(-2px); border-color: var(--rust); }
.mthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mthumb.first { outline: 2.5px solid var(--rust); outline-offset: 1px; border-color: transparent; }
.star {
  position: absolute; top: -5px; left: -5px; z-index: 1;
  background: var(--rust); color: #fff; font-size: 9px; font-weight: 700;
  border-radius: var(--r-pill); padding: 2px 6px; box-shadow: var(--sh-sm);
}
.shop-prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 480px) { .shop-prices { grid-template-columns: 1fr; } }
.shop-prices .price-input input { font-size: 16px; }
.chk { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink-soft); cursor: default; }
.chk input { width: 17px; height: 17px; accent-color: var(--sage); }
.inv-note {
  display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-soft);
  background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--r-sm); padding: 11px 14px;
}
.inv-ico { font-size: 16px; }
.inv-note b { font-family: var(--font-display); }
.shop-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* --------------------------------------------------------------- Utility -- */
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.form-msg {
  margin: 12px 0 0; font-size: 13.5px;
  color: var(--rose); background: var(--rose-tint);
  padding: 10px 14px; border-radius: var(--r-sm);
}
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  z-index: 1100;
  background: var(--ink); color: #fdf8ee;
  font-size: 14px; font-weight: 500; white-space: nowrap;
  padding: 11px 20px; border-radius: var(--r-pill);
  box-shadow: var(--sh-lg);
  animation: rowIn .25s var(--ease);
}

/* small screens: let the valuation band breathe */
@media (max-width: 480px) {
  .valuation { padding: 15px 16px; }
  .val-sug .val-num { font-size: 30px; }
  .val-num { font-size: 18px; }
  .val-stops { gap: 8px; }
  .ic-title, .section-heading, .card-title { font-size: 21px; }
  .ic-photo { width: 56px; height: 56px; }
  .ic-headprice { font-size: 17px; }
}

/* --------------------------------------------------------------- Motion --- */
@keyframes cardIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes rowIn  { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse  { 0%,100% { opacity: .3; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
