/* SPARE — paper cream + pitch green + ink black */
:root {
  --cream: #f4efe4;
  --cream-deep: #ebe4d4;
  --paper: #faf6ee;
  --ink: #1a1a18;
  --ink-soft: #3d3d38;
  --ink-mute: #6b6b63;
  --pitch: #1f7a3f;
  --pitch-deep: #165c2f;
  --pitch-light: #e8f5ec;
  --have: #1f7a3f;
  --have-bg: #d4edda;
  --need: #c0392b;
  --need-bg: #f8d7da;
  --line: #d4cdb8;
  --shadow: 0 12px 40px rgba(26, 26, 24, 0.18);
  --radius: 14px;
  --phone-w: 390px;
  --phone-h: 844px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #2a2a28;
  color: var(--ink);
  min-height: 100vh;
  padding: 32px 24px 48px;
}

.page-label {
  text-align: center;
  color: #a8a89e;
  font-size: 13px;
  letter-spacing: 0.04em;
  margin-bottom: 28px;
  font-weight: 500;
}

.page-label strong { color: #e8e4d8; font-weight: 600; }

.frames {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: center;
  align-items: flex-start;
}

.frame-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.frame-caption {
  font-size: 12px;
  color: #9a9688;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

/* Phone chrome */
.phone {
  width: var(--phone-w);
  height: var(--phone-h);
  background: var(--cream);
  border-radius: 36px;
  box-shadow: var(--shadow), inset 0 0 0 2px #1a1a18;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 118px;
  height: 28px;
  background: #1a1a18;
  border-radius: 20px;
  z-index: 20;
}

.status-bar {
  height: 54px;
  padding: 18px 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  flex-shrink: 0;
}

.status-bar .time { padding-left: 4px; }
.status-icons { display: flex; gap: 6px; align-items: center; opacity: 0.85; }
.status-icons span { font-size: 11px; }

.app {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Shared header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 20px 12px;
  flex-shrink: 0;
}

.logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.logo span { color: var(--pitch); }

.chip-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--cream-deep);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
}

.chip-add {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px dashed var(--ink-mute);
  background: transparent;
  color: var(--ink-mute);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.wedge-whisper {
  padding: 0 20px 10px;
  font-size: 11px;
  color: var(--ink-mute);
  line-height: 1.35;
  font-style: italic;
}

/* ===== SCREEN 01: CAPTURE ===== */
.capture-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 16px 16px;
  gap: 12px;
}

.camera-stage {
  flex: 1;
  background: #1e1e1c;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.camera-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.45) 100%);
  pointer-events: none;
  z-index: 3;
}

.viewfinder {
  position: absolute;
  inset: 28px 24px;
  border: 1.5px solid rgba(244, 239, 228, 0.55);
  border-radius: 8px;
  z-index: 4;
  pointer-events: none;
}

.viewfinder::before,
.viewfinder::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--pitch);
  border-style: solid;
}
.viewfinder::before { top: -2px; left: -2px; border-width: 3px 0 0 3px; border-radius: 4px 0 0 0; }
.viewfinder::after { bottom: -2px; right: -2px; border-width: 0 3px 3px 0; border-radius: 0 0 4px 0; }

.corner-tr, .corner-bl {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--pitch);
  border-style: solid;
  z-index: 5;
}
.corner-tr { top: 26px; right: 22px; border-width: 3px 3px 0 0; border-radius: 0 4px 0 0; }
.corner-bl { bottom: 26px; left: 22px; border-width: 0 0 3px 3px; border-radius: 0 0 0 4px; }

/* Fake paper list */
.paper-list {
  width: 78%;
  background: var(--paper);
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35), 0 0 0 1px #cfc8b4;
  padding: 14px 12px 12px;
  transform: rotate(-1.5deg);
  position: relative;
  z-index: 2;
}

.paper-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 2px;
}

.paper-sub {
  font-size: 8px;
  color: var(--ink-mute);
  margin-bottom: 10px;
}

.paper-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.cell {
  aspect-ratio: 1;
  border-radius: 3px;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 7px;
  font-weight: 700;
  line-height: 1.15;
  background: #fff;
  color: var(--ink-soft);
}

.cell.have {
  background: var(--have-bg);
  border-color: #a8d5b5;
  color: var(--have);
}

.cell.need {
  background: var(--need-bg);
  border-color: #e8a0a0;
  color: var(--need);
}

.cell .num { font-size: 8px; }
.cell .tag { font-size: 6px; font-weight: 600; opacity: 0.85; margin-top: 1px; }

.paper-legend {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  font-size: 7px;
  font-weight: 600;
  color: var(--ink-mute);
}
.paper-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 3px;
  vertical-align: -1px;
}
.paper-legend .lg-have { background: var(--have-bg); border: 1px solid #a8d5b5; }
.paper-legend .lg-need { background: var(--need-bg); border: 1px solid #e8a0a0; }

.scan-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  background: rgba(26,26,24,0.72);
  color: var(--cream);
  font-size: 11px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.cta-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}

.btn-primary {
  background: var(--pitch);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(31, 122, 63, 0.35);
}

.btn-primary .icon { font-size: 18px; }

.btn-ghost {
  background: transparent;
  border: none;
  color: var(--ink-mute);
  font-size: 13px;
  font-weight: 500;
  padding: 6px;
  text-align: center;
}

/* ===== SCREEN 02: NEARBY ===== */
.nearby-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.map-area {
  height: 210px;
  background: #243028;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
}

.map-roads {
  position: absolute;
  inset: 0;
}
.map-roads .rd {
  position: absolute;
  background: rgba(180, 190, 170, 0.18);
}
.map-roads .rd1 { top: 40%; left: 0; right: 0; height: 10px; }
.map-roads .rd2 { left: 55%; top: 0; bottom: 0; width: 8px; }
.map-roads .rd3 { top: 68%; left: 10%; width: 50%; height: 6px; transform: rotate(-8deg); }
.map-roads .plaza {
  position: absolute;
  top: 28%;
  left: 32%;
  width: 90px;
  height: 70px;
  background: rgba(244, 239, 228, 0.12);
  border-radius: 8px;
  border: 1px dashed rgba(244, 239, 228, 0.25);
}

.map-label {
  position: absolute;
  top: 12px;
  left: 14px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(244,239,228,0.7);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pin {
  position: absolute;
  top: 38%;
  left: 48%;
  transform: translate(-50%, -100%);
  z-index: 2;
}

.pin-dot {
  width: 18px;
  height: 18px;
  background: var(--pitch);
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.pin-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  margin: -10px 0 0 -24px;
  border-radius: 50%;
  background: rgba(31, 122, 63, 0.25);
  border: 1px solid rgba(31, 122, 63, 0.4);
}

.pin-caption {
  position: absolute;
  top: calc(38% + 8px);
  left: 48%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--cream);
  font-size: 10px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 3;
}

.unofficial-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(26,26,24,0.85);
  color: #e8dcc0;
  font-size: 9px;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid rgba(232,220,192,0.25);
  z-index: 4;
  letter-spacing: 0.02em;
}

.sheet {
  flex: 1;
  background: var(--cream);
  border-radius: 20px 20px 0 0;
  margin-top: -18px;
  position: relative;
  z-index: 5;
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  margin: 0 auto 4px;
}

.sheet-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.sheet-title .meta {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-mute);
}

.trader-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trader-card.featured {
  border-color: var(--pitch);
  box-shadow: 0 0 0 1px rgba(31,122,63,0.15);
}

.trader-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--pitch-light);
  color: var(--pitch-deep);
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trader-info { flex: 1; min-width: 0; }
.trader-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.trader-dist {
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 1px;
}

.overlap {
  font-size: 11px;
  color: var(--ink-soft);
  line-height: 1.4;
  padding: 6px 8px;
  background: var(--pitch-light);
  border-radius: 8px;
  font-weight: 500;
}

.overlap strong { color: var(--pitch-deep); font-weight: 700; }

.meetup-pin {
  font-size: 11px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 5px;
}

.meetup-pin .dot {
  width: 6px;
  height: 6px;
  background: var(--pitch);
  border-radius: 50%;
  flex-shrink: 0;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.btn-sm {
  flex: 1;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  border: none;
  text-align: center;
}

.btn-sm.primary { background: var(--pitch); color: #fff; }
.btn-sm.outline {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.qr-icon {
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  position: relative;
  display: inline-block;
}
.qr-icon::before {
  content: "";
  position: absolute;
  inset: 2px;
  border: 1.5px solid currentColor;
  border-right: none;
  border-bottom: none;
}

/* ===== SCREEN 03: CONFIRM ===== */
.confirm-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 16px 16px;
  gap: 12px;
  overflow: hidden;
}

.confirm-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  padding: 0 4px;
}

.confirm-sub {
  font-size: 12px;
  color: var(--ink-mute);
  padding: 0 4px;
  margin-top: -6px;
}

.swap-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.swap-cols {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: start;
}

.swap-col-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 8px;
}

.swap-col.you .swap-col-label { color: var(--pitch-deep); }
.swap-col.them .swap-col-label { color: #8b4513; }

.sticker-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 8px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--ink);
}

.sticker-pill .slot { color: var(--ink-mute); font-weight: 500; font-size: 10px; }

.swap-arrow {
  align-self: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--cream-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: 22px;
}

.meetup-box {
  background: var(--cream-deep);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meetup-box .row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.meetup-box .row .ico {
  width: 20px;
  text-align: center;
  font-size: 14px;
}

.meetup-box .hint {
  font-size: 11px;
  color: var(--ink-mute);
  padding-left: 28px;
}

.cash-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.cash-toggle .label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.cash-toggle .sub {
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 2px;
  font-weight: 400;
}

.toggle {
  width: 44px;
  height: 26px;
  background: #c8c2b0;
  border-radius: 999px;
  position: relative;
  flex-shrink: 0;
}
.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.confirm-cta {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.success-whisper {
  text-align: center;
  font-size: 11px;
  color: var(--pitch);
  font-weight: 500;
  opacity: 0.85;
  min-height: 16px;
}

.home-indicator {
  height: 28px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
  flex-shrink: 0;
}
.home-indicator span {
  width: 120px;
  height: 4px;
  background: var(--ink);
  border-radius: 2px;
  opacity: 0.25;
}

@media (max-width: 900px) {
  .frames { flex-direction: column; align-items: center; }
  body { padding: 20px 12px 40px; }
}

/* ===== SCREEN 04: OCR REVIEW ===== */
.ocr-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 16px 12px;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}

.ocr-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 2px;
}

.ocr-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
}

.ocr-counts {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.ocr-counts .have-c { color: var(--pitch-deep); }
.ocr-counts .need-c { color: var(--need); }

.ocr-hint {
  font-size: 11px;
  color: var(--ink-mute);
  padding: 0 2px;
  margin-top: -4px;
}

.ocr-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  flex: 1;
  align-content: start;
  min-height: 0;
  overflow: hidden;
}

.ocr-cell {
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  position: relative;
  font-weight: 700;
}

.ocr-cell .num { font-size: 13px; color: var(--ink); }
.ocr-cell .tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.ocr-cell.have {
  background: var(--have-bg);
  border-color: #a8d5b5;
}
.ocr-cell.have .num, .ocr-cell.have .tag { color: var(--have); }

.ocr-cell.need {
  background: var(--need-bg);
  border-color: #e8a0a0;
}
.ocr-cell.need .num, .ocr-cell.need .tag { color: var(--need); }

.ocr-cell.clear .tag { opacity: 0.45; }

.ocr-cell.uncertain {
  border-color: #d4a017;
  box-shadow: 0 0 0 2px rgba(212, 160, 23, 0.28);
  background: #fff8e6;
}
.ocr-cell.uncertain .num { color: #8a6a00; }
.ocr-cell.uncertain .warn {
  position: absolute;
  top: 4px;
  right: 5px;
  font-size: 9px;
  color: #b8860b;
  font-weight: 800;
}

.ocr-legend {
  display: flex;
  gap: 12px;
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-mute);
  padding: 0 2px;
  flex-wrap: wrap;
}
.ocr-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ocr-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}
.ocr-legend .lg-have { background: var(--have-bg); border: 1px solid #a8d5b5; }
.ocr-legend .lg-need { background: var(--need-bg); border: 1px solid #e8a0a0; }
.ocr-legend .lg-unc {
  background: #fff8e6;
  border: 1.5px solid #d4a017;
}

.ocr-cta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 2px;
}

.btn-row {
  display: flex;
  gap: 8px;
}
.btn-row .btn-primary { flex: 1.2; padding: 14px 12px; font-size: 14px; }
.btn-row .btn-secondary {
  flex: 1;
  padding: 14px 12px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 14px;
  background: var(--cream-deep);
  border: 1.5px solid var(--line);
  color: var(--ink-soft);
}

/* ===== SCREEN 05: HUDDLE QR ===== */
.huddle-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 20px 12px;
  gap: 12px;
  text-align: center;
}

.huddle-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pitch);
}

.huddle-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}

.huddle-sub {
  font-size: 13px;
  color: var(--ink-mute);
  margin-top: -4px;
}

.qr-stage {
  width: 220px;
  height: 220px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 8px 24px rgba(26,26,24,0.12);
  margin: 6px 0;
}

.qr-svg {
  width: 100%;
  height: 100%;
  display: block;
  shape-rendering: crispedges;
}

.qr-fake {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  grid-template-rows: repeat(11, 1fr);
  gap: 2px;
}

.qr-fake .b {
  background: var(--ink);
  border-radius: 1px;
}
.qr-fake .w { background: transparent; }

.qr-finder {
  background: var(--ink);
  border-radius: 3px;
  position: relative;
}
.qr-finder::after {
  content: "";
  position: absolute;
  inset: 22%;
  background: #fff;
  border-radius: 2px;
}
.qr-finder::before {
  content: "";
  position: absolute;
  inset: 36%;
  background: var(--ink);
  border-radius: 1px;
  z-index: 1;
}

.huddle-code {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--ink);
  background: var(--cream-deep);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 10px 16px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.huddle-pin {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  width: 100%;
  justify-content: center;
}
.huddle-pin .dot {
  width: 8px;
  height: 8px;
  background: var(--pitch);
  border-radius: 50%;
}

.huddle-cta {
  margin-top: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.huddle-show {
  font-size: 14px;
  font-weight: 700;
  color: var(--pitch-deep);
}

.huddle-unoff {
  font-size: 11px;
  color: var(--ink-mute);
  font-weight: 500;
}

/* ===== SCREEN 06: EMPTY / WEAK ===== */
.state-toggle {
  display: flex;
  gap: 4px;
  background: var(--cream-deep);
  border-radius: 999px;
  padding: 3px;
  margin: 0 16px 8px;
  flex-shrink: 0;
}
.state-toggle button {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--ink-mute);
  cursor: pointer;
}
.state-toggle button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.state-panel { display: none; flex: 1; flex-direction: column; min-height: 0; }
.state-panel.active { display: flex; }

.empty-sheet {
  flex: 1;
  background: var(--cream);
  border-radius: 20px 20px 0 0;
  margin-top: -18px;
  position: relative;
  z-index: 5;
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
  text-align: center;
}

.empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--cream-deep);
  border: 1.5px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--ink-mute);
  margin-top: 8px;
}

.empty-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
  max-width: 260px;
}

.empty-sub {
  font-size: 12px;
  color: var(--ink-mute);
  line-height: 1.4;
  max-width: 260px;
}

.empty-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: auto;
  padding-bottom: 8px;
}

.weak-badge {
  display: inline-flex;
  align-self: flex-start;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8a6a00;
  background: #fff8e6;
  border: 1px solid #e6c35c;
  border-radius: 999px;
  padding: 4px 8px;
}

.overlap.thin {
  background: #fff8e6;
  color: var(--ink-soft);
}
.overlap.thin strong { color: #8a6a00; }

.trader-card.weak {
  border-color: #e6c35c;
  box-shadow: none;
}

/* ===== SCREEN 07: AFTER SWAP ===== */
.after-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 16px 12px;
  gap: 12px;
  min-height: 0;
}

.after-banner {
  background: var(--pitch-light);
  border: 1px solid #a8d5b5;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.after-banner .ok {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pitch);
}

.after-banner .msg {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
}

.after-banner .stats {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 500;
  margin-top: 2px;
}

.after-section {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding: 0 2px;
}

.after-list {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.after-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid transparent;
}

.after-row .slot-num {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  width: 42px;
}

.after-row .slot-meta {
  flex: 1;
  font-size: 11px;
  color: var(--ink-mute);
  font-weight: 500;
}

.after-row.traded {
  opacity: 0.72;
}
.after-row.traded .slot-num {
  text-decoration: line-through;
  color: var(--ink-mute);
}

.badge-traded {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pitch-deep);
  background: var(--pitch-light);
  border: 1px solid #a8d5b5;
  border-radius: 999px;
  padding: 3px 7px;
}

.after-cta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.btn-outline-block {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--ink-soft);
  text-align: center;
}

/* ===== SCREEN 08: ONBOARDING ===== */
.onboard-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 20px 12px;
  gap: 18px;
}

.onboard-hero {
  text-align: center;
  padding: 12px 8px 4px;
}

.onboard-hero .logo-lg {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--ink);
  margin-bottom: 8px;
}
.onboard-hero .logo-lg span { color: var(--pitch); }

.onboard-hero .tagline {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.4;
  font-weight: 500;
}

.beats {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.beat {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 14px;
}

.beat-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--pitch);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.beat-text .t {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}
.beat-text .d {
  font-size: 12px;
  color: var(--ink-mute);
  line-height: 1.35;
}

.onboard-album {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.onboard-cta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.onboard-skip {
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-mute);
  padding: 6px;
  background: none;
  border: none;
}
