/* ==========================================================================
   AUTOHAUS SENKAN — sell.css
   "Dein Auto verkaufen" wizard (partials/sell-form.html + js/sell.js).
   Everything is scoped to .sell and builds on the tokens and primitives
   defined in base.css.
   ========================================================================== */

.sell {
  --sell-kratzer: #f2b84b;
  --sell-delle: #ff9a4d;
  --sell-schaden: #ff6b5e;
  --sell-pad: clamp(18px, 3.4vw, 46px);
  --sell-top: calc(var(--nav-h) + 28px);
  position: relative;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.sell [hidden] { display: none !important; }

/* Scoped refinements of base primitives (AA contrast, touch targets) */
.sell .field__hint { color: var(--text-dim); }
.sell .input::placeholder,
.sell .textarea::placeholder { color: rgba(237, 233, 227, 0.42); }
.sell .field__error { display: none; align-items: flex-start; gap: 8px; line-height: 1.4; }
.sell .field.is-invalid .field__error { display: flex; }
.sell .field__error::before {
  content: '!';
  flex: none; display: grid; place-items: center;
  width: 16px; height: 16px; margin-top: 0.5px;
  border-radius: 50%;
  background: var(--danger); color: var(--bg);
  font: 700 11px/1 var(--font-body);
}
.sell .field.is-invalid .chip span { border-color: rgba(255, 107, 94, 0.6); }
.sell .field.is-invalid .check__box { border-color: var(--danger); }
.sell .sell-switch { min-height: 44px; }
.sell .sell-check { padding: 10px 0; }
.sell .select.is-empty { color: var(--text-dim); }
.sell .chips { gap: 8px; }

/* ==========================================================================
   Layout
   ========================================================================== */
.sell__layout { display: grid; gap: clamp(36px, 6vh, 60px); }
.sell-intro, .sell-main { min-width: 0; }

@media (min-width: 1024px) {
  .sell__layout {
    grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
    gap: clamp(48px, 5.5vw, 112px);
    align-items: start;
  }
}
/* sell.js lowers --sell-sticky-top when the intro is taller than the viewport,
   so its bottom (the shifter) always stays in view. */
@media (min-width: 1024px) {
  .sell-intro { position: sticky; top: var(--sell-sticky-top, var(--sell-top)); }
}

/* ==========================================================================
   Intro
   ========================================================================== */
/* The intro column is a size container so "VERKAUFEN." (one unbreakable, extra-wide word)
   always fits its column: ~8.4em wide at font-stretch 125%. */
.sell-intro { container-type: inline-size; }
.sell-title { margin-top: 18px; font-size: min(clamp(2.5rem, 10.5vw, 4.25rem), 11.4cqi); }
@media (min-width: 1024px) {
  .sell-title { font-size: min(clamp(2.5rem, 4.5vw, 4.25rem), 11.4cqi); }
}
.sell-lead { margin-top: 22px; }

.sell-flow { margin-top: 34px; }
.sell-flow__title,
.sell-gearbox__count {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.sell-flow__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.sell-flow__item { position: relative; display: grid; gap: 10px; align-content: start; }
.sell-flow__item:not(:last-child)::after {
  content: '';
  position: absolute; top: 15px; left: 40px; right: 2px;
  height: 1px;
  background: linear-gradient(90deg, rgba(170, 142, 107, 0.7), rgba(170, 142, 107, 0.08));
}
.sell-flow__num {
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(170, 142, 107, 0.55);
  background: rgba(170, 142, 107, 0.08);
  font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--bronze-hi);
}
.sell-flow__text { font-size: 0.9375rem; line-height: 1.3; font-weight: 600; }
.sell-flow__note { margin-top: 16px; font-size: 0.875rem; color: var(--text-dim); }

/* Gearbox panel (desktop progress) */
.sell-gearbox { display: none; }
@media (min-width: 1024px) {
  .sell-gearbox {
    display: grid;
    grid-template-columns: clamp(108px, 11vw, 160px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(14px, 1.8vw, 28px);
    margin-top: 30px;
    padding: 18px 16px 18px 18px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background:
      radial-gradient(90% 120% at 0% 50%, rgba(170, 142, 107, 0.1), transparent 65%),
      rgba(17, 17, 19, 0.6);
  }
}
.sell-gearbox__count { margin: 0 0 8px 10px; color: var(--bronze-hi); }

.sell-gears { display: grid; }
.sell-gear {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  text-align: left;
  font-size: 0.875rem;
  white-space: nowrap;
  color: rgba(237, 233, 227, 0.46);
  transition: color var(--dur-fast) ease, background var(--dur-fast) ease;
}
.sell-gear:not(:disabled) { color: var(--text-dim); }
.sell-gear:not(:disabled):hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.sell-gear:disabled { cursor: default; }
.sell-gear__num {
  flex: none; display: grid; place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid currentColor;
  font-family: var(--font-mono); font-size: 0.6875rem; line-height: 1;
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.sell-gear__num svg { width: 12px; height: 12px; }
.sell-gear.is-done .sell-gear__num { border-color: rgba(170, 142, 107, 0.7); color: var(--bronze-hi); }
.sell-gear[aria-current='step'] { color: var(--text); background: rgba(170, 142, 107, 0.1); }
.sell-gear[aria-current='step'] .sell-gear__num { background: var(--bronze-grad); border-color: transparent; color: var(--on-bronze); }
@media (pointer: coarse) { .sell-gear { min-height: 44px; } }

/* H-pattern shifter (shared by the desktop panel and the mobile header) */
.sell-gb { display: block; width: 100%; height: auto; overflow: visible; }
.sell-gb__slot { fill: none; stroke: rgba(255, 255, 255, 0.065); stroke-width: 22; stroke-linecap: round; stroke-linejoin: round; }
.sell-gb__groove { fill: none; stroke: rgba(237, 233, 227, 0.24); stroke-width: 1.5; stroke-linecap: round; }
.sell-gb__trail {
  fill: none;
  stroke: var(--bronze-hi);
  stroke-width: 3;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 620;
  stroke-dashoffset: 620;
}
.sell-gb__trail--glow { stroke: var(--bronze); stroke-width: 6; opacity: 0.7; }
.sell-gb__label {
  font-family: var(--font-mono);
  font-size: 19px; font-weight: 600;
  fill: rgba(237, 233, 227, 0.4);
  text-anchor: middle;
  dominant-baseline: central;
  transition: fill 0.4s ease, stroke 0.4s ease;
}
.sell-gb__label--check { fill: none; stroke: rgba(237, 233, 227, 0.4); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sell-gb__label.is-done { fill: var(--text-dim); }
.sell-gb__label--check.is-done { fill: none; stroke: var(--text-dim); }
.sell-gb__label.is-active { fill: var(--bronze-hi); }
.sell-gb__label--check.is-active { fill: none; stroke: var(--bronze-hi); }
.sell-gb__halo { fill: rgba(214, 186, 145, 0.14); }
.sell-gb__pulse { fill: none; stroke: var(--bronze-hi); stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.sell-gb__rim { fill: none; stroke: rgba(40, 28, 16, 0.35); stroke-width: 1; }
.sell-gb__shine { fill: rgba(255, 255, 255, 0.62); }
.sell-gb.is-complete .sell-gb__slot { stroke: rgba(170, 142, 107, 0.14); }
.sell-gb.is-complete .sell-gb__pulse { animation: sell-pulse 1.4s var(--ease-out) 0.15s 2; }

.sell-gb--mini .sell-gb__slot { stroke-width: 34; stroke: rgba(255, 255, 255, 0.07); }
.sell-gb--mini .sell-gb__groove { stroke-width: 5; }
.sell-gb--mini .sell-gb__trail { stroke-width: 9; }

/* ==========================================================================
   Card
   ========================================================================== */
.sell-card { padding: var(--sell-pad); scroll-margin-top: calc(var(--nav-h) + 16px); }
.sell-card__bar {
  position: absolute; top: -1px; left: 28px; right: 28px;
  height: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(237, 233, 227, 0.06);
}
.sell-card__bar > span {
  display: block; height: 100%;
  background: var(--bronze-grad);
  transform: scaleX(var(--p, 0.2));
  transform-origin: left center;
  transition: transform 0.9s var(--ease-out);
}
.sell-card__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px 16px;
  padding-bottom: 18px;
  margin-bottom: clamp(24px, 3.4vw, 36px);
  border-bottom: 1px solid var(--line);
}
.sell-card__progress { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sell-mini { flex: none; width: 48px; }
@media (min-width: 1024px) { .sell-mini { display: none; } }
.sell-card__step { display: grid; gap: 3px; min-width: 0; line-height: 1.2; }
.sell-card__count {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bronze-hi);
}
.sell-card__name { font-size: 1rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sell-draft { display: flex; align-items: center; gap: 10px; flex: none; }
.sell-draft__status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}
.sell-draft__dot {
  flex: none; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px rgba(122, 214, 162, 0.8);
}
.sell-draft__status.is-pulse .sell-draft__dot { animation: sell-blink 0.9s ease; }
.sell-draft__reset {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; min-width: 44px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 0.8125rem;
  white-space: nowrap;
  transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease, background var(--dur-fast) ease;
}
.sell-draft__reset svg { flex: none; width: 16px; height: 16px; }
.sell-draft__reset:hover { color: var(--text); border-color: var(--line-strong); }
.sell-draft__reset.is-confirm { color: #ffb0a8; border-color: rgba(255, 107, 94, 0.5); background: rgba(255, 107, 94, 0.08); }
@media (max-width: 559.98px) {
  .sell-draft__long { display: none; }
  .sell-draft__reset:not(.is-confirm) { padding: 0; }
  .sell-draft__reset:not(.is-confirm) .sell-draft__reset-text {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
}
@media (max-width: 419.98px) {
  .sell-draft__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .sell-card__head:has(.sell-draft__reset.is-confirm) .sell-draft__status { display: none; }
}

.sell-noscript { padding: 16px 0; color: var(--text-dim); }
.sell-noscript a { color: var(--bronze-hi); text-decoration: underline; }
.no-js .sell-form, .no-js .sell-card__head { display: none; }

.sell-notice {
  margin-bottom: 26px;
  padding: 14px 16px 14px 44px;
  position: relative;
  border-radius: var(--radius);
  border: 1px solid rgba(170, 142, 107, 0.35);
  background: rgba(170, 142, 107, 0.08);
  font-size: 0.9375rem;
  line-height: 1.5;
  animation: sell-fade-up 0.6s var(--ease-out);
}
.sell-notice::before {
  content: '';
  position: absolute; left: 16px; top: 17px;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--bronze-hi);
  background: radial-gradient(circle, var(--bronze-hi) 0 2.5px, transparent 3px);
}

/* ==========================================================================
   Steps
   ========================================================================== */
.sell-form { container: sellform / inline-size; }
.sell-steps { position: relative; }
.sell-steps.is-sizing { overflow: hidden; }
.sell-step { container: sellstep / inline-size; }
.sell-step__head { margin-bottom: clamp(24px, 3.2vw, 34px); }
.sell-step__title {
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1;
  font-size: clamp(1.45rem, 1.05rem + 1.5vw, 2.3rem);
}
.sell-step__title:focus { outline: none; }
.sell-step__lead { margin-top: 12px; max-width: 54ch; color: var(--text-dim); }

.sell-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px 16px;
  align-items: start;
}
.sell-col-2 { grid-column: 1 / -1; }
@container sellstep (min-width: 540px) {
  .sell-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.sell .sell-fieldset { display: block; min-width: 0; margin: 0; padding: 0; border: 0; }
.sell .sell-fieldset > legend { display: block; padding: 0; margin: 0 0 10px; }
.sell .sell-fieldset > .field__hint,
.sell .sell-fieldset > .field__error { margin-top: 8px; }

.sell-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.sell-sep {
  display: flex; align-items: center; gap: 14px;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bronze-hi);
}
.sell-sep::after {
  content: '';
  flex: 1; height: 1px;
  background: linear-gradient(90deg, rgba(170, 142, 107, 0.45), rgba(170, 142, 107, 0));
}

.sell-reveal:not([hidden]) { animation: sell-fade-up 0.5s var(--ease-out); }

/* Inputs with a unit / counter on the right */
.sell-affix { position: relative; }
.sell-affix .input { padding-right: 58px; }
.sell-affix--wide .input { padding-right: 78px; }
.sell-affix__unit {
  position: absolute; top: 50%; right: 18px;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  pointer-events: none;
  transition: color var(--dur-fast) ease;
}
.sell-affix__unit.is-complete { color: var(--ok); }
.sell-fin { font-family: var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.sell-fin::placeholder { font-family: var(--font-body); letter-spacing: 0; text-transform: none; }
.sell-fin-field .sell-affix { max-width: 440px; }

.sell-link { color: var(--bronze-hi); text-decoration: underline; text-underline-offset: 3px; }
.sell-textbtn {
  justify-self: start;
  min-height: 44px;
  padding: 0;
  font-size: 0.875rem;
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--dur-fast) ease;
}
.sell-textbtn:hover { color: var(--text); }

/* ==========================================================================
   Kilometerstand + odometer
   ========================================================================== */
.sell-km__panel {
  display: grid; gap: 14px;
  padding: 16px;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 140% at 50% -20%, rgba(170, 142, 107, 0.13), transparent 60%),
    #09090a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
@container sellstep (min-width: 540px) {
  .sell-km__panel { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 22px; padding: 14px 14px 14px 22px; }
}
.sell-odo {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem);
  line-height: 1;
  color: var(--bronze-hi);
  font-variant-numeric: tabular-nums;
  user-select: none;
  cursor: text;
}
.sell-odo__wheel {
  position: relative;
  width: 0.8em; height: 1.36em;
  overflow: hidden;
  border-radius: 6px;
  background: linear-gradient(180deg, #030303 0%, #161618 46%, #161618 54%, #030303 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  transition: color 0.45s ease;
}
.sell-odo__wheel::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.78) 0%, transparent 30%, transparent 70%, rgba(0, 0, 0, 0.78) 100%);
}
.sell-odo__strip {
  display: block;
  transform: translateY(calc(var(--d, 0) * -1.36em));
  transition: transform 0.75s cubic-bezier(0.2, 0.9, 0.25, 1) calc(var(--i, 0) * 30ms);
}
.sell-odo__strip > span { display: grid; place-items: center; height: 1.36em; }
.sell-odo__wheel.is-lead { color: rgba(220, 195, 156, 0.26); }
.sell-odo__sep {
  align-self: flex-end;
  width: 4px; height: 4px;
  margin: 0 2px 0.3em;
  border-radius: 50%;
  background: rgba(220, 195, 156, 0.4);
}
.sell-odo__unit {
  align-self: flex-end;
  margin: 0 0 0.42em 6px;
  font-size: 0.34em;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ==========================================================================
   Damage map
   ========================================================================== */
.sell-dmg {
  display: grid; gap: 18px;
  padding: clamp(16px, 2.6vw, 26px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(60% 50% at 30% 45%, rgba(170, 142, 107, 0.08), transparent 70%),
    rgba(255, 255, 255, 0.015);
}
.sell-dmg__head { display: grid; gap: 6px; }
.sell-dmg__body { display: grid; gap: 22px; }
@container sellstep (min-width: 540px) {
  .sell-dmg__body { grid-template-columns: minmax(210px, 0.9fr) minmax(0, 1.1fr); align-items: start; gap: 28px; }
}
.sell-dmg__stage {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 22px;
  grid-template-rows: auto auto auto;
  align-items: center; justify-items: center;
  gap: 6px 4px;
  width: 100%; max-width: 280px;
  margin-inline: auto;
}
.sell-dmg__dir {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.sell-dmg__dir--front { grid-column: 2; grid-row: 1; }
.sell-dmg__dir--rear { grid-column: 2; grid-row: 3; }
.sell-dmg__dir--left { grid-column: 1; grid-row: 2; writing-mode: vertical-rl; transform: rotate(180deg); }
.sell-dmg__dir--right { grid-column: 3; grid-row: 2; writing-mode: vertical-rl; }
.sell-dmg__map { grid-column: 2; grid-row: 2; width: 100%; max-width: 214px; }
.sell-dmg__svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: manipulation; }

.sell-zone { cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.sell-zone__hit { fill: transparent; }
.sell-zone__shape {
  fill: rgba(255, 255, 255, 0.025);
  stroke: rgba(237, 233, 227, 0.45);
  stroke-width: 1.25;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  transform-box: fill-box;
  transform-origin: center;
  transition: fill 0.25s ease, stroke 0.25s ease;
}
.sell-zone:hover .sell-zone__shape { fill: rgba(220, 195, 156, 0.12); stroke: var(--bronze-hi); }
.sell-zone[data-state='kratzer'] .sell-zone__shape { fill: url(#sell-pat-kratzer); stroke: var(--sell-kratzer); }
.sell-zone[data-state='delle'] .sell-zone__shape { fill: url(#sell-pat-delle); stroke: var(--sell-delle); }
.sell-zone[data-state='beschaedigt'] .sell-zone__shape { fill: url(#sell-pat-beschaedigt); stroke: var(--sell-schaden); }
.sell-zone.is-pop .sell-zone__shape { animation: sell-pop 0.45s var(--ease-out); }
.sell-dmg__deco { fill: none; stroke: rgba(237, 233, 227, 0.2); stroke-width: 1; vector-effect: non-scaling-stroke; pointer-events: none; }
.sell-dmg__deco .sell-dmg__lamp { stroke: rgba(220, 195, 156, 0.6); stroke-width: 1.5; stroke-linecap: round; }
.sell-dmg__deco .sell-dmg__tail { stroke: rgba(255, 107, 94, 0.55); stroke-width: 1.5; stroke-linecap: round; }
.sell-dmg__ring {
  fill: none;
  stroke: var(--bronze-hi);
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.sell-dmg__ring.is-visible { opacity: 1; }

.sell-dmg__side { display: grid; gap: 16px; align-content: start; min-width: 0; }
.sell-dmg__readout {
  min-height: 1.4em;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bronze-hi);
}
.sell-dmg__legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 0.8125rem; color: var(--text-dim); }
.sell-dmg__legend li { display: inline-flex; align-items: center; gap: 8px; }
.sell-sw { flex: none; width: 14px; height: 14px; border-radius: 4px; border: 1px solid; }
.sell-sw--ok { border-color: rgba(237, 233, 227, 0.45); background: rgba(255, 255, 255, 0.03); }
.sell-sw--kratzer { border-color: var(--sell-kratzer); background: repeating-linear-gradient(45deg, var(--sell-kratzer) 0 1.5px, rgba(242, 184, 75, 0.14) 1.5px 4.2px); }
.sell-sw--delle { border-color: var(--sell-delle); background: radial-gradient(circle, var(--sell-delle) 0 1.3px, transparent 1.7px) 0 0 / 5px 5px, rgba(255, 154, 77, 0.16); }
.sell-sw--beschaedigt { border-color: var(--sell-schaden); background: repeating-linear-gradient(45deg, var(--sell-schaden) 0 2px, rgba(255, 107, 94, 0.42) 2px 4.2px); }

.sell-dmg__marked { display: grid; gap: 10px; }
.sell-dmg__marked-title { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); }
.sell-dmg__empty { font-size: 0.875rem; color: var(--text-dim); }
.sell-dmg__items { display: grid; gap: 6px; }
.sell-dmg__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 4px 4px 4px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.875rem;
  animation: sell-fade-up 0.35s var(--ease-out);
}
.sell-dmg__item-name { overflow-wrap: anywhere; }
.sell-dmg__item-state { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; }
.sell-dmg__item[data-state='kratzer'] .sell-dmg__item-state { color: var(--sell-kratzer); }
.sell-dmg__item[data-state='delle'] .sell-dmg__item-state { color: var(--sell-delle); }
.sell-dmg__item[data-state='beschaedigt'] .sell-dmg__item-state { color: var(--sell-schaden); }
.sell-dmg__remove {
  position: relative;
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  color: var(--text-dim);
  transition: color var(--dur-fast) ease, background var(--dur-fast) ease;
}
.sell-dmg__remove::before { content: ''; position: absolute; inset: -3px; }
.sell-dmg__remove:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.sell-dmg__remove svg { width: 16px; height: 16px; }

/* ==========================================================================
   Stepper (Vorbesitzer)
   ========================================================================== */
.sell-stepper {
  display: inline-grid;
  grid-template-columns: 56px minmax(56px, auto) 56px;
  align-items: center;
  width: max-content;
  height: 56px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.025);
}
.sell-stepper__btn {
  display: grid; place-items: center;
  height: 100%;
  border-radius: var(--radius-pill);
  color: var(--text);
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease, opacity var(--dur-fast) ease;
}
.sell-stepper__btn svg { width: 18px; height: 18px; }
.sell-stepper__btn:hover { background: rgba(255, 255, 255, 0.06); }
.sell-stepper__btn[aria-disabled='true'] { opacity: 0.32; cursor: default; background: none; }
.sell-stepper__value {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Photos
   ========================================================================== */
.sell-drop { position: relative; display: grid; gap: 10px; }
.sell-drop__input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.sell-drop__zone {
  display: grid; justify-items: center; gap: 10px;
  padding: clamp(30px, 6vw, 52px) 20px;
  border-radius: var(--radius-lg);
  border: 1.5px dashed rgba(170, 142, 107, 0.5);
  background:
    radial-gradient(70% 90% at 50% 0%, rgba(170, 142, 107, 0.12), transparent 70%),
    rgba(255, 255, 255, 0.015);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.sell-drop__zone:hover { border-color: var(--bronze-hi); background-color: rgba(170, 142, 107, 0.06); }
.sell-drop__input:focus-visible + .sell-drop__zone { outline: 2px solid var(--bronze-hi); outline-offset: 3px; }
.sell-drop.is-over .sell-drop__zone {
  border-color: var(--bronze-hi);
  background-color: rgba(170, 142, 107, 0.12);
  transform: scale(1.01);
}
.sell-drop.is-full .sell-drop__zone { opacity: 0.5; pointer-events: none; }
.sell-drop__icon {
  display: grid; place-items: center;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--bronze-grad);
  color: var(--on-bronze);
  box-shadow: 0 14px 40px -14px var(--bronze-glow);
  transition: transform 0.5s var(--ease-snap);
}
.sell-drop__icon svg { width: 28px; height: 28px; }
.sell-drop__zone:hover .sell-drop__icon, .sell-drop.is-over .sell-drop__icon { transform: scale(1.08) rotate(-4deg); }
.sell-drop__title {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sell-drop__sub { font-size: 0.9375rem; color: var(--text-dim); }
.sell-drop__fine { display: none; }
@media (hover: hover) and (pointer: fine) {
  .sell-drop__fine { display: inline; }
  .sell-drop__coarse { display: none; }
}
.sell-drop__hint { text-align: center; }

.sell-photos-bar {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 6px 16px;
  margin: 22px 0 12px;
}
.sell-photos-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bronze-hi);
}
.sell-photos-msg { font-size: 0.875rem; color: var(--warn); }
.sell-photos-msg:empty { display: none; }

.sell-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.sell-photos:empty { display: none; }
.sell-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  animation: sell-photo-in 0.5s var(--ease-out);
}
.sell-photo img { width: 100%; height: 100%; object-fit: cover; animation: sell-fade 0.5s ease; }
.sell-photo.is-cover { border-color: rgba(220, 195, 156, 0.7); box-shadow: 0 0 0 1px rgba(220, 195, 156, 0.35); }
.sell-photo.is-processing::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.07) 50%, transparent 80%);
  animation: sell-shimmer 1.2s linear infinite;
}
.sell-photo__spinner {
  position: absolute; left: 50%; top: 50%;
  width: 20px; height: 20px; margin: -10px 0 0 -10px;
  border-radius: 50%;
  border: 2px solid rgba(220, 195, 156, 0.85);
  border-right-color: transparent;
  animation: sell-spin 0.75s linear infinite;
}
.sell-photo:not(.is-processing) .sell-photo__spinner { display: none; }
.sell-photo__btn {
  position: absolute;
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(6, 6, 7, 0.72);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: var(--text);
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease, transform var(--dur-fast) ease;
}
.sell-photo__btn::before { content: ''; position: absolute; inset: -5px; }
.sell-photo__btn svg { width: 15px; height: 15px; }
.sell-photo__btn:hover { background: var(--text); color: var(--bg); }
.sell-photo__btn--remove { top: 5px; right: 5px; }
.sell-photo__btn--cover { bottom: 5px; left: 5px; }
.sell-photo.is-cover .sell-photo__btn--cover,
.sell-photo.is-processing .sell-photo__btn--cover { display: none; }
.sell-photo__badge {
  position: absolute; bottom: 7px; left: 7px;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  background: var(--bronze-grad);
  color: var(--on-bronze);
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.2;
}
.sell-photo:not(.is-cover) .sell-photo__badge,
.sell-photo.is-cover .sell-photo__num { display: none; }
.sell-photo__num {
  position: absolute; right: 8px; bottom: 6px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

.sell-shots { display: grid; gap: 12px; margin-top: 28px; }
.sell-shots__list { display: flex; flex-wrap: wrap; gap: 8px; }
.sell-shots__list li {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 36px;
  padding: 6px 14px 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px dashed var(--line-strong);
  font-size: 0.875rem;
  color: var(--text-dim);
}
.sell-shots__list li::before {
  content: '';
  flex: none; width: 14px; height: 14px;
  background: var(--bronze-hi);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5A2.5 2.5 0 0 1 6 6h1.7l1.6-2.2h5.4L16.3 6H18a2.5 2.5 0 0 1 2.5 2.5v8.5a2.5 2.5 0 0 1-2.5 2.5H6A2.5 2.5 0 0 1 3.5 17z'/%3E%3Ccircle cx='12' cy='12.6' r='3.7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5A2.5 2.5 0 0 1 6 6h1.7l1.6-2.2h5.4L16.3 6H18a2.5 2.5 0 0 1 2.5 2.5v8.5a2.5 2.5 0 0 1-2.5 2.5H6A2.5 2.5 0 0 1 3.5 17z'/%3E%3Ccircle cx='12' cy='12.6' r='3.7'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ==========================================================================
   Wunschpreis
   ========================================================================== */
.sell-price {
  gap: 12px;
  padding: clamp(18px, 2.6vw, 28px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(170, 142, 107, 0.11), transparent 60%),
    rgba(255, 255, 255, 0.015);
}
.sell-price__display {
  display: flex; align-items: baseline; flex-wrap: nowrap;
  gap: 0.14em;
  min-width: 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--line-strong);
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 800;
  /* --price-fit (set by sell.js) shrinks long amounts so they never overflow */
  font-size: calc(clamp(2.5rem, 1.4rem + 5.4vw, 4.75rem) * var(--price-fit, 1));
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  cursor: text;
  transition: border-color var(--dur) var(--ease-out);
}
.sell-price__display:focus-within { border-bottom-color: var(--bronze-hi); }
.sell-price.is-invalid .sell-price__display { border-bottom-color: var(--danger); }
.sell-price__grow { display: inline-grid; flex: none; min-width: 0.7em; }
.sell-price__grow > * { grid-area: 1 / 1; min-width: 0; font: inherit; letter-spacing: inherit; }
.sell-price__mirror { visibility: hidden; white-space: pre; padding: 0 0.04em; }
.sell-price__input {
  width: 100%;
  padding: 0 0.04em;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  caret-color: var(--bronze-hi);
  outline: none;
  -webkit-appearance: none; appearance: none;
}
.sell-price__input::placeholder { color: rgba(237, 233, 227, 0.24); }
.sell-price__cur {
  flex: none;
  background: var(--bronze-grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.sell-price__range { margin-top: 6px; }
.sell-price__scale {
  display: flex; justify-content: space-between;
  margin-top: -2px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.sell-price__opts { display: flex; flex-wrap: wrap; gap: 4px 28px; margin-top: 6px; }
.sell-price.is-open .sell-price__display,
.sell-price.is-open .sell-price__range,
.sell-price.is-open .sell-price__scale { opacity: 0.42; transition: opacity var(--dur) var(--ease-out); }
.sell-price.is-open .sell-price__display:focus-within { opacity: 1; }

.sell-place { display: grid; grid-template-columns: minmax(92px, 0.4fr) minmax(0, 1fr); gap: 12px; }
@container sellstep (min-width: 540px) {
  .sell-place { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}

.sell-hp {
  position: absolute !important;
  left: -10000px; top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ==========================================================================
   Check (summary) + sending
   ========================================================================== */
.sell-sum { display: grid; gap: 14px; }
.sell-sum__group {
  padding: 14px 18px 8px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}
.sell-sum__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.sell-sum__title {
  display: flex; align-items: baseline; gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bronze-hi);
}
.sell-sum__title span { color: var(--text-dim); }
.sell-sum__edit {
  min-height: 44px;
  margin-right: -8px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--dur-fast) ease, background var(--dur-fast) ease;
}
.sell-sum__edit:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.sell-sum__list { margin: 0; }
.sell-sum__row {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.sell-sum__row dt { font-size: 0.875rem; color: var(--text-dim); }
.sell-sum__row dd { margin: 0; font-size: 0.9375rem; overflow-wrap: anywhere; white-space: pre-line; }
.sell-sum__row--price dd {
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.1;
  white-space: normal;
}
@container sellform (max-width: 419.98px) {
  .sell-sum__row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .sell-sum__group { padding-inline: 14px; }
  .sell-sum__title { letter-spacing: 0.12em; }
}
.sell-sum__photos { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 12px; border-top: 1px solid var(--line); scrollbar-width: thin; }
.sell-sum__photos li { flex: none; position: relative; }
.sell-sum__photos img { width: 92px; height: 69px; object-fit: cover; border-radius: 8px; }
.sell-sum__photos li:first-child img { outline: 1px solid rgba(220, 195, 156, 0.7); outline-offset: -1px; }
.sell-sum__empty { padding: 10px 0 12px; border-top: 1px solid var(--line); font-size: 0.875rem; color: var(--text-dim); }

.sell-send { display: grid; gap: 10px; margin-top: 24px; }
.sell-send__bar { height: 4px; overflow: hidden; border-radius: 4px; background: var(--surface-3); }
.sell-send__bar > span {
  display: block; height: 100%;
  background: var(--bronze-grad);
  transform: scaleX(var(--p, 0));
  transform-origin: left center;
  transition: transform 0.3s ease;
}
.sell-send__status { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; color: var(--text-dim); }

.sell-error {
  display: grid; gap: 8px;
  margin-top: 24px;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 107, 94, 0.4);
  background: rgba(255, 107, 94, 0.07);
}
.sell-error__title { font-weight: 600; color: #ffb0a8; }
.sell-error__text { font-size: 0.9375rem; color: var(--text-dim); }
.sell-error__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

.sell-handover {
  display: flex; gap: 12px; align-items: flex-start;
  margin-top: 22px;
  font-size: 0.9375rem;
  color: var(--text-dim);
}
.sell-handover svg { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--bronze-hi); }

/* ==========================================================================
   Navigation
   ========================================================================== */
.sell-nav { margin-top: clamp(30px, 4vw, 42px); padding-top: 22px; border-top: 1px solid var(--line); }
.sell-nav__msg {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 107, 94, 0.3);
  background: rgba(255, 107, 94, 0.08);
  color: #ffb0a8;
  font-size: 0.875rem;
}
.sell-nav__msg:empty { margin: 0; padding: 0; border: 0; }
.sell-nav__row { display: flex; align-items: center; gap: 12px; }
.sell-nav__req { margin-right: auto; font-size: 0.75rem; color: var(--text-dim); }
.sell-nav__req span { color: var(--bronze-hi); }
.sell-nav__back { flex: none; }
.sell-nav__back-icon { width: 18px; height: 18px; flex: none; }
.sell-nav__next { min-width: 210px; margin-left: auto; }
.sell-nav__next.is-busy { pointer-events: none; }
.sell-nav__next.is-busy .btn__icon { display: none; }
.sell-nav__next.is-busy::after {
  content: '';
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: sell-spin 0.7s linear infinite;
}
.sell-nav__back:not([hidden]) + .sell-nav__req { margin-left: 8px; }
@container sellform (max-width: 519.98px) {
  .sell-nav__row { flex-wrap: wrap; }
  .sell-nav__req { order: 3; width: 100%; margin: 6px 0 0 !important; text-align: center; }
  .sell-nav__back { width: 56px; padding: 0; }
  .sell-nav__back-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .sell-nav__next { flex: 1; min-width: 0; gap: 8px; padding-inline: 12px; letter-spacing: 0.06em; }
  .sell-nav__next.is-long .btn__icon { display: none; }
}

.sell-direct { margin-top: 20px; text-align: center; font-size: 0.9375rem; color: var(--text-dim); }
.sell-direct a { color: var(--text); }

/* ==========================================================================
   Success
   ========================================================================== */
.sell-done {
  container: selldone / inline-size;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  gap: 18px;
  padding: clamp(6px, 1.5vw, 16px) 0 4px;
}
.sell-done > * { max-width: 100%; }
.sell-done__mark { width: 88px; height: 88px; overflow: visible; }
.sell-done__ring { fill: none; stroke: rgba(170, 142, 107, 0.22); stroke-width: 1.5; }
.sell-done__circle {
  fill: none;
  stroke: var(--bronze);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: sell-draw 1.1s var(--ease-out) 0.2s forwards;
}
.sell-done__tick {
  fill: none;
  stroke: var(--bronze-hi);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: sell-draw 0.7s var(--ease-out) 0.85s forwards;
}
.sell-done__title { font-size: clamp(2.2rem, 1.5rem + 3.6vw, 3.8rem); overflow-wrap: anywhere; }
.sell-done__title:focus { outline: none; }
.sell-done__line {
  display: block;
  width: min(360px, 100%);
  height: 2px;
  border-radius: 2px;
  background: var(--bronze-grad);
  transform: scaleX(0);
  transform-origin: left center;
  animation: sell-line 1.4s var(--ease-out) 0.5s forwards;
}
.sell-done__text { max-width: 54ch; font-size: var(--fs-lg); line-height: 1.55; color: var(--text-dim); }
.sell-done__text strong { color: var(--text); font-weight: 600; }
.sell-done__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.sell-done__actions .btn svg { width: 1.25em; height: 1.25em; }
.sell-done__note {
  display: flex; gap: 12px; align-items: flex-start;
  max-width: 56ch;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.9375rem;
  color: var(--text-dim);
}
.sell-done__note svg { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--bronze-hi); }
.sell-done__copy[data-copied] { color: var(--ok); }
.sell-done__restart { margin-top: 6px; }
.sell-done__actions { width: 100%; }
.sell-done__actions .btn { min-width: 0; max-width: 100%; }
@container selldone (max-width: 519.98px) {
  .sell-done__actions .btn { flex: 1 1 100%; padding-inline: 18px; letter-spacing: 0.08em; }
}

/* ==========================================================================
   Keyframes
   ========================================================================== */
@keyframes sell-draw { to { stroke-dashoffset: 0; } }
@keyframes sell-line { to { transform: scaleX(1); } }
@keyframes sell-spin { to { transform: rotate(360deg); } }
@keyframes sell-fade { from { opacity: 0; } }
@keyframes sell-fade-up { from { opacity: 0; transform: translateY(8px); } }
@keyframes sell-photo-in { from { opacity: 0; transform: scale(0.92); } }
@keyframes sell-shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes sell-pop { 0% { transform: scale(0.94); } 60% { transform: scale(1.025); } 100% { transform: scale(1); } }
@keyframes sell-blink { 0%, 100% { opacity: 1; } 40% { opacity: 0.25; } }
@keyframes sell-pulse { 0% { opacity: 0.9; transform: scale(1); } 100% { opacity: 0; transform: scale(2.4); } }

@media (prefers-reduced-motion: reduce) {
  .sell-odo__strip { transition: none; }
  .sell-photo.is-processing::before { animation: none; }
}
