/* Cleared — conversational agent app · B&W VC tone */
:root {
  --bg: #0B0D10;
  --bg-elev: #12151A;
  --bg-panel: #161A20;
  --line: rgba(244, 241, 234, 0.12);
  --line-strong: rgba(244, 241, 234, 0.22);
  --ink: #F4F1EA;
  --ink-dim: rgba(244, 241, 234, 0.58);
  --ink-mute: rgba(244, 241, 234, 0.38);
  --wav: #008250;
  --wav-dim: rgba(0, 130, 80, 0.22);
  --user-bubble: #1E242C;
  --agent-bubble: #14181E;
  --radius: 14px;
  --font: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01" on, "cv11" on;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
img { display: block; max-width: 100%; }

.app {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  max-width: 1280px;
  margin: 0 auto;
}

/* —— Topbar —— */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 13, 16, 0.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand-lockup { height: 28px; width: auto; }
.nav {
  display: flex;
  gap: 4px;
  margin-left: 8px;
  flex-wrap: wrap;
}
.nav button {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--ink-dim);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background .2s, color .2s;
}
.nav button:hover { color: var(--ink); background: rgba(244,241,234,0.06); }
.nav button.active {
  color: var(--bg);
  background: var(--ink);
}
.top-meta {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.top-actions { display: flex; gap: 8px; align-items: center; }
.btn-reset {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink-dim);
  transition: border-color .2s, color .2s;
}
.btn-reset:hover { border-color: var(--line-strong); color: var(--ink); }

/* —— Layout —— */
.shell {
  display: grid;
  grid-template-columns: 1fr 300px;
  min-height: 0;
  height: 100%;
}
@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .chat {
    min-height: 0;
    /* Keep composer reachable above the stacked rail */
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .rail {
    border-left: none;
    border-top: 1px solid var(--line);
    max-height: 26vh;
    padding: 10px 12px 12px;
    gap: 10px;
    order: 2;
  }
  .composer {
    padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .step { padding: 0 0 10px 24px; font-size: 12px; }
  .step .sub { font-size: 10px; }
  .photo-card { width: 140px; }
  .photo-card .viz { height: 100px; }
  .photo-card .meta .t,
  .photo-card .meta .s {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }
  .rail-head { gap: 8px; }
  .rail-marks img, .rail-marks svg { width: 22px; height: 22px; }
  .status-pill { font-size: 10px; padding: 4px 8px; }
}
@media (max-width: 600px) {
  .rail { max-height: 22vh; }
  .messages { padding: 16px 12px 8px; }
  .fake-input { font-size: 12px; padding: 10px 12px; }
}

/* —— Chat —— */
.chat {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(0,130,80,0.07), transparent 55%),
    var(--bg);
}
.messages {
  overflow-y: auto;
  padding: 24px 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}
.msg {
  display: flex;
  gap: 10px;
  max-width: min(640px, 92%);
  animation: msgIn .38s cubic-bezier(.22,1,.36,1) both;
}
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg.system { align-self: center; max-width: 100%; }
.avatar {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  margin-top: 2px;
  background: var(--bg-elev);
}
.avatar svg { width: 16px; height: 16px; }
.avatar.user-av {
  background: var(--ink);
  border-color: transparent;
  color: var(--bg);
  font-size: 11px;
  font-weight: 600;
}
.bubble-wrap { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bubble {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--agent-bubble);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
}
.msg.user .bubble {
  background: var(--user-bubble);
  border-color: var(--line-strong);
  border-bottom-right-radius: 4px;
}
.msg.agent .bubble { border-bottom-left-radius: 4px; }
.bubble p { margin: 0 0 8px; }
.bubble p:last-child { margin-bottom: 0; }
.bubble strong { font-weight: 600; }
.bubble .muted { color: var(--ink-dim); font-size: 13px; }
.who {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding: 0 4px;
}
.msg.user .who { text-align: right; }

.sys-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(244,241,234,0.03);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  animation: msgIn .35s ease both;
}

/* —— Typing —— */
.typing {
  display: inline-flex;
  gap: 5px;
  padding: 14px 16px;
  align-items: center;
}
.typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-mute);
  animation: bounce 1.2s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .35; }
  40% { transform: translateY(-4px); opacity: 1; }
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* —— Photo / offer cards —— */
.card-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.photo-card {
  width: 168px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0E1115;
  animation: cardPop .45s cubic-bezier(.22,1,.36,1) both;
}
.photo-card .viz {
  height: 120px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(160deg, #1a1e25 0%, #0c0e12 100%);
  position: relative;
}
.photo-card .viz svg { width: 88px; height: 88px; }
.photo-card .meta {
  padding: 8px 10px 10px;
  border-top: 1px solid var(--line);
}
.photo-card .meta .t {
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0.02em;
}
.photo-card .meta .s {
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 2px;
}
.photo-card.upload-mock::after {
  content: "Mock upload";
  position: absolute;
  top: 8px; left: 8px;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(11,13,16,0.7);
}
.photo-card .viz { position: relative; }
.photo-card .viz-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-card.upload-real::after {
  content: "Your photo";
  position: absolute;
  top: 8px; left: 8px;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(11,13,16,0.7);
}

@keyframes cardPop {
  from { opacity: 0; transform: scale(.92) translateY(8px); }
  to { opacity: 1; transform: none; }
}

.offer-card {
  min-width: 150px;
  flex: 1;
  max-width: 200px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  animation: dealerIn .5s cubic-bezier(.22,1,.36,1) both;
}
.offer-card.best {
  border-color: rgba(0,130,80,0.55);
  box-shadow: 0 0 0 1px rgba(0,130,80,0.15), 0 8px 24px rgba(0,0,0,0.25);
}
.offer-card .dealer-tag {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 6px;
}
.offer-card .price {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.offer-card .sub {
  font-size: 11px;
  color: var(--ink-dim);
  margin-top: 4px;
}
.offer-card .chip {
  display: inline-block;
  margin-top: 8px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--wav-dim);
  color: #7dceb0;
}
@keyframes dealerIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: none; }
}
.offer-card:nth-child(2) { animation-delay: .12s; }
.offer-card:nth-child(3) { animation-delay: .24s; }

.econ {
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0,130,80,0.06);
  font-size: 13px;
}
.econ dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  margin: 0;
}
.econ dt { color: var(--ink-dim); }
.econ dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.econ .total { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; font-weight: 600; }
.econ .fee { color: #7dceb0; }

/* —— Composer —— */
.composer {
  border-top: 1px solid var(--line);
  padding: 12px 16px 16px;
  background: rgba(11,13,16,0.95);
}
.quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  min-height: 0;
}
.quick:empty { display: none; margin: 0; }
.qr {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  font-size: 13px;
  color: var(--ink);
  transition: background .2s, border-color .2s, transform .15s;
  animation: msgIn .3s ease both;
}
.qr:hover {
  background: rgba(244,241,234,0.08);
  border-color: var(--ink-dim);
}
.qr:active { transform: scale(.97); }
.qr:disabled { opacity: .4; pointer-events: none; }
.input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.fake-input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  color: var(--ink-mute);
  font-size: 13px;
}
.hint {
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 8px;
  letter-spacing: 0.04em;
}

/* —— Progress rail —— */
.rail {
  border-left: 1px solid var(--line);
  background: var(--bg-elev);
  padding: 20px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.rail-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rail-marks {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rail-marks img, .rail-marks svg { width: 28px; height: 28px; }
.rail-title {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.rail-mode {
  font-size: 14px;
  font-weight: 550;
  margin-top: 2px;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--line);
}
.step {
  position: relative;
  padding: 0 0 16px 28px;
  font-size: 13px;
  color: var(--ink-mute);
  transition: color .35s;
}
.step:last-child { padding-bottom: 0; }
.step .dot {
  position: absolute;
  left: 0;
  top: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: var(--bg-elev);
  transition: background .35s, border-color .35s, box-shadow .35s, transform .35s;
}
.step.done { color: var(--ink-dim); }
.step.done .dot {
  background: var(--ink-dim);
  border-color: var(--ink-dim);
}
.step.active {
  color: var(--ink);
  font-weight: 550;
}
.step.active .dot {
  border-color: var(--wav);
  background: var(--wav);
  box-shadow: 0 0 0 4px var(--wav-dim);
  transform: scale(1.08);
  animation: pulseDot 1.6s ease infinite;
}
.step.cleared-step.active .dot,
.step.cleared-step.done .dot {
  background: var(--wav);
  border-color: var(--wav);
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 4px var(--wav-dim); }
  50% { box-shadow: 0 0 0 7px rgba(0,130,80,0.12); }
}
.step .sub {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-mute);
  margin-top: 2px;
}

.rail-card {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-panel);
}
.rail-card .label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 8px;
}
.rail-watch {
  display: flex;
  gap: 10px;
  align-items: center;
}
.rail-watch .thumb {
  width: 52px; height: 52px;
  border-radius: 8px;
  background: #0c0e12;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.rail-watch .thumb svg { width: 40px; height: 40px; }
.rail-watch .info .name { font-size: 13px; font-weight: 550; }
.rail-watch .info .ref { font-size: 11px; color: var(--ink-mute); margin-top: 2px; font-family: var(--mono); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  color: var(--ink-dim);
  transition: all .4s;
}
.status-pill.open {
  border-color: rgba(244,241,234,0.35);
  color: var(--ink);
}
.status-pill.cleared {
  border-color: rgba(0,130,80,0.55);
  background: var(--wav-dim);
  color: #9fd9c0;
}
.status-pill.progress {
  border-color: rgba(244,241,234,0.28);
  color: var(--ink);
}
.status-pill.failed {
  border-color: rgba(224,112,112,0.55);
  background: rgba(224,112,112,0.12);
  color: #e09090;
}
.status-pill .ring {
  width: 14px; height: 14px;
}
.privacy-note {
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink-mute);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed var(--line);
}
.privacy-note strong { color: var(--ink-dim); font-weight: 550; }

/* —— Welcome gate —— */
.welcome {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 28px 8px 8px;
  max-width: 520px;
  animation: msgIn .45s ease both;
}
.welcome h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.welcome p {
  margin: 0;
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1.55;
}
.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.btn-primary {
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  font-weight: 550;
  letter-spacing: 0.02em;
  transition: transform .15s, opacity .2s;
}
.btn-primary:hover { opacity: .92; }
.btn-ghost {
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 13px;
  font-weight: 550;
  color: var(--ink);
  transition: background .2s;
}
.btn-ghost:hover { background: rgba(244,241,234,0.06); }

.login-mock {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  max-width: 280px;
  animation: cardPop .4s ease both;
}
.login-mock .row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-dim);
}
.login-mock .ok { color: #7dceb0; }


/* —— Sell camera capture + mock identify —— */
.capture-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 420px;
  animation: msgIn .3s ease both;
}
.capture-purpose {
  margin: 0;
  font-size: 13px;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
}
.capture-cta {
  width: 100%;
  justify-content: center;
  text-align: center;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
}
.capture-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.capture-sample {
  opacity: 0.85;
  font-size: 12px;
  padding: 8px 12px;
}
.capture-preview-img {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0E1115;
}
.capture-preview-viz {
  width: 100%;
  max-width: 220px;
  height: 160px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, #1a1e25 0%, #0c0e12 100%);
}
.capture-preview-viz svg { width: 110px; height: 110px; }
.capture-preview-viz.sample::after {
  content: "Sample";
  position: absolute;
  /* badge via parent */
}
.capture-preview-panel .capture-preview-viz { position: relative; }

.identify-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  animation: msgIn .3s ease both;
}
.identify-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.identify-card {
  width: 150px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0E1115;
  display: flex;
  flex-direction: column;
  animation: cardPop .4s cubic-bezier(.22,1,.36,1) both;
}
.identify-card .viz {
  height: 100px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #1a1e25 0%, #0c0e12 100%);
}
.identify-card .viz svg { width: 72px; height: 72px; }
.identify-card .meta {
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  flex: 1;
}
.identify-card .meta .t {
  font-size: 12px;
  font-weight: 550;
}
.identify-card .meta .ref {
  font-size: 11px;
  color: var(--ink);
  margin-top: 2px;
}
.identify-card .meta .s {
  font-size: 10px;
  color: var(--ink-mute);
  margin-top: 2px;
}
.identify-card .identify-yes {
  margin: 0 8px 10px;
  padding: 8px 10px;
  font-size: 12px;
  width: auto;
}
.identify-no {
  align-self: flex-start;
  font-size: 12px;
  padding: 10px 14px;
}

@media (max-width: 600px) {
  .capture-cta { padding: 18px 20px; font-size: 16px; }
  .identify-card { width: calc(50% - 6px); min-width: 140px; flex: 1; }
}


/* —— Buy photo-first: PhotoRail · OfferCard · Lightbox · price track —— */
.photo-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 8px;
  max-width: 100%;
}
.photo-rail-tile {
  flex: 0 0 auto;
  width: 148px;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #242A33;
  background: #12151A;
  position: relative;
  scroll-snap-align: start;
  padding: 0;
}
.photo-rail-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-rail-tile .tile-label {
  position: absolute;
  left: 8px; bottom: 8px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #F4F1EA;
  background: rgba(11,13,16,0.72);
  border: 1px solid rgba(244,241,234,0.18);
  border-radius: 4px;
  padding: 3px 6px;
}
.photo-rail-caption {
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 2px;
  letter-spacing: 0.04em;
}
.photo-rail-skel {
  flex: 0 0 148px;
  height: 200px;
  border-radius: 12px;
  background: linear-gradient(90deg, #12151A 0%, #1a1f28 50%, #12151A 100%);
  background-size: 200% 100%;
  animation: skelShimmer 1.2s ease infinite;
  border: 1px solid #242A33;
}
@keyframes skelShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.offer-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 420px;
}
.offer-card-pf {
  background: #12151A;
  border: 1px solid #242A33;
  border-radius: 14px;
  overflow: hidden;
  animation: cardPop .45s cubic-bezier(.22,1,.36,1) both;
}
.offer-card-pf.best {
  border-color: rgba(0,130,80,0.55);
  box-shadow: 0 0 0 1px rgba(0,130,80,0.12);
}
.oc-hero {
  position: relative;
  aspect-ratio: 16 / 10;
  min-height: 160px;
  background: #0E1115;
}
.oc-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}
.oc-hero-skel {
  width: 100%;
  height: 100%;
  min-height: 160px;
  background: linear-gradient(90deg, #12151A, #1a1f28, #12151A);
  background-size: 200% 100%;
  animation: skelShimmer 1.2s ease infinite;
}
.oc-best {
  position: absolute;
  top: 10px; left: 10px;
  z-index: 2;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  padding: 4px 8px;
  border-radius: 999px;
  background: #008250;
  color: #F4F1EA;
}
.oc-thumbs {
  display: flex;
  gap: 6px;
  padding: 8px 12px 0;
}
.oc-thumb {
  width: 52px;
  height: 40px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #242A33;
  padding: 0;
  background: #0E1115;
}
.oc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.oc-body { padding: 12px 14px 14px; }
.oc-price {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.oc-cond {
  font-size: 12px;
  color: var(--ink-dim);
  margin-top: 2px;
}
.price-track {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  align-items: center;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-dim);
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}
.price-track.limited {
  cursor: default;
  color: var(--ink-mute);
}
.price-track .down { color: #7dceb0; }
.price-track .up { color: #e0b35a; }
.price-track .sep { color: var(--ink-mute); }
.oc-fee {
  margin-top: 8px;
  font-size: 12px;
  color: #7dceb0;
}
.oc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.oc-btn {
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid #242A33;
  background: var(--bg-elev);
  color: var(--ink);
  font-size: 12px;
  font-weight: 550;
}
.oc-btn.primary {
  background: #008250;
  border-color: #008250;
  color: #F4F1EA;
}
.oc-btn.ghost {
  background: transparent;
  color: var(--ink-dim);
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.92);
}
.photo-lightbox .lb-backdrop { position: absolute; inset: 0; }
.photo-lightbox .lb-img {
  position: relative;
  z-index: 1;
  max-width: min(92vw, 560px);
  max-height: 72vh;
  object-fit: contain;
  border-radius: 8px;
}
.photo-lightbox .lb-close {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 2;
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(244,241,234,0.25);
  background: rgba(11,13,16,0.6);
  color: #F4F1EA;
  font-size: 22px;
  line-height: 1;
}
.photo-lightbox .lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(244,241,234,0.2);
  background: rgba(11,13,16,0.55);
  color: #F4F1EA;
  font-size: 28px;
  line-height: 1;
}
.photo-lightbox .lb-nav.prev { left: 12px; }
.photo-lightbox .lb-nav.next { right: 12px; }
.photo-lightbox .lb-meta {
  position: absolute;
  bottom: 48px;
  left: 0; right: 0;
  text-align: center;
  z-index: 2;
  font-size: 12px;
  color: rgba(244,241,234,0.75);
}
.photo-lightbox .lb-ask {
  position: absolute;
  bottom: 20px;
  left: 0; right: 0;
  text-align: center;
  z-index: 2;
  font-size: 11px;
  color: rgba(244,241,234,0.4);
}

.spark-sheet {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.spark-sheet .spark-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.55);
}
.spark-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  background: #12151A;
  border: 1px solid #242A33;
  border-radius: 16px 16px 0 0;
  padding: 18px 16px 20px;
}
.spark-head {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 12px;
}
.spark-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--ink-dim);
}
.spark-note {
  font-size: 11px;
  color: var(--ink-mute);
  margin: 8px 0 12px;
}
.spark-svg { display: block; max-width: 100%; height: auto; }

@media (max-width: 600px) {
  .photo-rail-tile { width: 136px; height: 186px; }
  .offer-stack { max-width: 100%; }
}

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


/* —— Admin login gate —— */
.login-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}
.login-gate[hidden],
#appShell[hidden] { display: none !important; }
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px 28px 24px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.45);
}
.login-brand { margin-bottom: 20px; }
.login-brand .brand-lockup { height: 28px; width: auto; }
.login-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.login-sub {
  margin: 0 0 22px;
  font-size: 13px;
  color: var(--ink-dim);
  line-height: 1.45;
}
.login-form { display: flex; flex-direction: column; gap: 8px; }
.login-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 6px;
}
.login-form input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--bg-panel);
  outline: none;
}
.login-form input:focus {
  border-color: rgba(244,241,234,0.45);
}
.login-error {
  margin: 4px 0 0;
  font-size: 13px;
  color: #e07070;
}
.login-submit {
  margin-top: 14px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.login-fine {
  margin: 18px 0 0;
  text-align: center;
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
}

.guided-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wav, #008250);
  margin: 0 0 8px;
}
.login-fine a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* —— Simulate… nested menu (auth-fail demo reset) —— */
.qr-menu {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  animation: msgIn .3s ease both;
}
.qr-menu-toggle {
  opacity: 0.72;
  border-style: dashed;
}
.qr-menu-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  min-width: 180px;
}
.qr-menu-panel[hidden] { display: none !important; }
.qr-menu-item {
  width: 100%;
  text-align: left;
  font-size: 12px;
  opacity: 0.9;
  border-color: var(--line);
}
.qr-menu.open .qr-menu-toggle {
  opacity: 1;
  border-style: solid;
}

