/* ZipNyt Preview — mobile-first web mock (not the App Store app) */

:root {
  --forest: #1B3C2A;
  --forest-muted: #2D5A40;
  --birch: #F5F0E6;
  --birch-card: #FFFcf7;
  --copper: #F27A30;
  --ink-soft: #3D4A42;
  --line: #E0D8CC;
  --danger: #B33A3A;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tab-h: 56px;
  --banner-h: 28px;
  --radius-card: 16px;
  --radius-btn: 14px;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #d8d0c4;
  font-family: var(--font-body);
  color: var(--forest);
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

body {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100dvh;
  padding: 0;
}

.phone-shell {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  background: var(--birch);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(27, 60, 42, 0.08);
}

@media (min-width: 480px) {
  body { padding: 16px 0; align-items: center; background: #c9bfb0; }
  .phone-shell {
    min-height: min(844px, calc(100dvh - 32px));
    height: min(844px, calc(100dvh - 32px));
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(27, 60, 42, 0.25);
  }
}

/* Preview banner */
.preview-banner {
  flex: 0 0 auto;
  height: var(--banner-h);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--forest);
  padding-top: var(--safe-top);
  height: calc(var(--banner-h) + var(--safe-top));
}

/* Screens */
.screen {
  flex: 1 1 auto;
  display: none;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  position: relative;
  padding-bottom: 0;
}
.screen.is-active { display: flex; }
.screen[hidden] { display: none !important; }

/* Top bar */
.top-bar {
  flex: 0 0 auto;
  padding: 10px 16px 8px;
  background: var(--birch);
  border-bottom: 1px solid transparent;
}
.top-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
}
.zip-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--forest-muted);
}
.zip-chip .pin { font-size: 12px; }
.icon-btn {
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--forest);
  padding: 4px 8px;
  cursor: pointer;
}

/* Filters */
.filters {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 8px 16px 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--birch-card);
  color: var(--forest);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chip.is-active {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--birch);
}

/* Feed */
.feed {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px 88px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--birch-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
  transition: transform 0.12s, box-shadow 0.12s;
}
.card:active { transform: scale(0.985); }
.card-photo-wrap {
  position: relative;
  width: 100%;
  height: 148px;
  background: #d4cbb8;
  overflow: hidden;
  flex-shrink: 0;
}
.card-photo {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  display: block;
}
.card-photo-badges {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: calc(100% - 20px);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35));
}
.card-photo-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(transparent, rgba(27, 60, 42, 0.45));
  pointer-events: none;
}
.card-thumb {
  display: none;
}
.card-body {
  flex: 1;
  min-width: 0;
  padding: 12px 14px 14px;
}
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.event-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--forest);
  color: #fff;
  text-transform: capitalize;
}
.event-pill.concert {
  background: #fde8d8;
  color: var(--copper);
}
.event-pill.meetup {
  background: #e0ebe4;
  color: var(--forest-muted);
}
.local-shop {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--copper);
  color: #fff;
}
.card-title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--forest);
}
.card-when, .card-where {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.35;
}
.card-where { margin-top: 2px; }

.empty-feed {
  text-align: center;
  padding: 48px 24px;
  color: var(--ink-soft);
  font-size: 15px;
}

/* Detail */
.detail-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--birch);
}
.back-btn {
  border: none;
  background: transparent;
  font-size: 22px;
  color: var(--forest);
  padding: 6px 10px;
  cursor: pointer;
}
.detail-title-bar {
  flex: 1;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}
.detail-spacer { width: 40px; }
.detail-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 16px 24px;
}
.detail-hero {
  width: 100%;
  height: 140px;
  border-radius: var(--radius-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
}
.detail-hero.yard-sale { background: linear-gradient(145deg, #e8f0e4, #c5d8bc); }
.detail-hero.concert { background: linear-gradient(145deg, #f5e0d0, #e8b896); }
.detail-hero.art { background: linear-gradient(145deg, #e8e4f0, #c8c0d8); }
.detail-hero.meetup { background: linear-gradient(145deg, #e0ebe8, #b8d4cc); }

.detail-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.detail-h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.2;
}
.detail-line {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--ink-soft);
}
.detail-body-text {
  margin: 14px 0;
  font-size: 16px;
  line-height: 1.45;
  color: var(--forest);
}
.detail-actions {
  display: flex;
  gap: 10px;
  margin: 16px 0 20px;
}
.btn-primary, .btn-outline, .btn-copper {
  flex: 1;
  border-radius: var(--radius-btn);
  font-size: 15px;
  font-weight: 700;
  padding: 13px 12px;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.btn-primary {
  background: var(--forest);
  color: var(--birch);
}
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--forest);
  color: var(--forest);
}
.btn-copper {
  background: var(--copper);
  color: #fff;
  width: 100%;
  margin-top: 8px;
}

.comments {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.comments h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
}
.comment {
  background: var(--birch-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.comment-author {
  font-size: 12px;
  font-weight: 700;
  color: var(--forest-muted);
  margin-bottom: 2px;
}
.comment-text { font-size: 14px; margin: 0; color: var(--forest); }
.comments-placeholder {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 8px;
}

/* Stub screens */
.stub-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 28px;
}
.stub-icon { font-size: 40px; margin-bottom: 8px; }
.stub-panel h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 26px;
}
.stub-panel p {
  margin: 0 0 16px;
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.4;
  max-width: 280px;
}
.stub-panel .btn-primary { width: 100%; max-width: 260px; flex: none; }
.profile-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  width: 100%;
  max-width: 280px;
  text-align: left;
}
.profile-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  font-weight: 600;
}
.muted { color: var(--ink-soft) !important; }
.caption {
  font-size: 12px;
  color: var(--ink-soft);
  margin: 10px 0 0;
  line-height: 1.35;
}

/* Tab bar — sticky footer; matched icons; primary center Z+ */
.tab-bar {
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: calc(var(--tab-h) + 14px + var(--safe-bottom));
  padding: 6px 6px calc(6px + var(--safe-bottom));
  display: flex;
  align-items: flex-end;
  gap: 2px;
  background: linear-gradient(180deg, #fffdf8 0%, var(--birch-card, #fffcf7) 100%);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(27, 60, 42, 0.1);
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  border: none;
  background: transparent;
  color: #5a6b60;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.01em;
  cursor: pointer;
  font-family: inherit;
  padding: 0 2px 2px;
  min-width: 0;
  -webkit-tap-highlight-color: transparent;
}
.tab-well {
  width: 44px;
  height: 32px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(27, 60, 42, 0.06);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.tab-svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tab-label { line-height: 1; }
.tab.is-active {
  color: var(--forest, #1B3C2A);
}
.tab.is-active .tab-well {
  background: var(--forest, #1B3C2A);
  color: #f5f0e6;
  transform: translateY(-5px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 8px 16px rgba(27, 60, 42, 0.28),
    0 2px 0 rgba(27, 60, 42, 0.35);
  border-radius: 12px;
}
.tab.is-active .tab-svg {
  stroke: #f5f0e6;
}
.tab:not(.tab-center):not(.is-active) .tab-well {
  background: rgba(27, 60, 42, 0.07);
  color: #5a6b60;
}

/* Center action — floating CIRCLE above bar; 2 tabs left, 2 right */
.tab.tab-center {
  flex: 1.15;
  position: relative;
  justify-content: flex-end;
  padding-bottom: 0;
  color: var(--forest, #1B3C2A);
  z-index: 2;
}
.tab-center-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--forest, #1B3C2A);
  margin-top: 2px;
}
.tab-center-mark {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 999px; /* circle */
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--birch-card, #fffcf7);
  border: 3px solid var(--forest, #1B3C2A);
  transform: translateY(-22px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55) inset,
    0 14px 24px rgba(27, 60, 42, 0.32),
    0 4px 0 rgba(27, 60, 42, 0.28);
  transform: translateY(-22px); /* floats above tab bar */
}
.tab-center-mark img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
  border-radius: 0;
  filter: none;
}
.tab-z-plus {
  position: absolute;
  right: -4px;
  top: -4px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--copper, #F27A30);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(242, 122, 48, 0.5);
  border: 2px solid #fffdf8;
}
.tab.tab-center:focus-visible .tab-center-mark,
.tab.tab-center:active .tab-center-mark {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 6px 14px rgba(27, 60, 42, 0.4),
    0 2px 0 rgba(27, 60, 42, 0.35);
  transform: translateY(-13px);
}

/* ===== Detail photo hero ===== */
.detail-hero--photo {
  height: auto;
  padding: 0;
  overflow: hidden;
  background: #d4cbb8;
  display: block;
}
.detail-hero-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.photo-credit {
  margin: 0;
  padding: 6px 10px 8px;
  font-size: 11px;
  color: var(--ink-soft);
}
.detail-blurb {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--forest);
  font-weight: 600;
}

/* ===== Shared screen chrome ===== */
.screen-header {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 16px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--birch);
}
.wordmark-sm {
  height: 28px;
  width: auto;
}
.screen-h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--forest);
}
.screen-scroll {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px 88px;
  min-height: 0;
}
.screen-footnote {
  margin: 16px 0 8px;
  text-align: center;
}
.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--forest-muted);
  margin: 8px 0 10px;
}

/* Gate empty states */
.gate-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  min-height: 60%;
}
.gate-empty-icon { font-size: 40px; margin-bottom: 8px; }
.gate-empty h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 22px;
}
.gate-empty p {
  margin: 0 0 18px;
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.4;
  max-width: 280px;
}
.gate-empty .btn-copper { max-width: 260px; }

/* ===== Inbox ===== */
.thread-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--birch-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.thread-list li + li { border-top: 1px solid var(--line); }
.thread-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 14px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.thread-row:active { background: rgba(27, 60, 42, 0.05); }
.thread-avatar {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--forest);
  color: var(--birch);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}
.thread-main { flex: 1; min-width: 0; }
.thread-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}
.thread-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--forest);
}
.thread-time {
  font-size: 12px;
  color: var(--ink-soft);
  flex-shrink: 0;
}
.thread-preview {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Thread bubbles */
.thread-body { padding-bottom: 32px; }
.bubbles {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.35;
}
.bubble-them {
  align-self: flex-start;
  background: var(--birch-card);
  border: 1px solid var(--line);
  color: var(--forest);
  border-bottom-left-radius: 4px;
}
.bubble-me {
  align-self: flex-end;
  background: var(--forest);
  color: var(--birch);
  border-bottom-right-radius: 4px;
}
.thread-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.btn-sm {
  flex: 0 0 auto;
  padding: 8px 14px;
  font-size: 13px;
}

/* ===== Tickets ===== */
.ticket-card {
  background: var(--birch-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 16px;
  margin-bottom: 14px;
}
.ticket-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.25;
}
.ticket-when, .ticket-where {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.35;
}
.ticket-where { margin-bottom: 14px; }
.qr-placeholder {
  width: 160px;
  height: 160px;
  margin: 0 auto 12px;
  background: #fff;
  border: 2px solid var(--forest);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
}
.qr-inner {
  width: 100px;
  height: 100px;
  background:
    linear-gradient(90deg, var(--forest) 25%, transparent 25%) 0 0 / 20px 20px,
    linear-gradient(var(--forest) 25%, transparent 25%) 0 0 / 20px 20px,
    #fff;
  opacity: 0.85;
  border-radius: 4px;
}
.qr-code {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--forest-muted);
  padding: 0 6px;
  text-align: center;
  word-break: break-all;
}
.ticket-cta {
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--copper);
  margin: 0;
}

/* Seller scan stub */
.scan-stub {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 24px;
}
.scan-frame {
  width: min(280px, 100%);
  aspect-ratio: 1;
  background: #1a1a1a;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: inset 0 0 0 2px rgba(242, 122, 48, 0.5);
}
.scan-hole {
  width: 70%;
  height: 70%;
  border: 2px dashed rgba(245, 240, 230, 0.55);
  border-radius: 8px;
}
.scan-copy {
  max-width: 300px;
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.4;
}

/* ===== Profile ===== */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0 18px;
}
.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: var(--forest);
  color: var(--birch);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  flex-shrink: 0;
}
.profile-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--forest);
}
.profile-zip {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 2px 0 6px;
}
.status-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.status-badge.is-plus {
  background: var(--copper);
  color: #fff;
}
.status-badge.is-free {
  background: rgba(27, 60, 42, 0.1);
  color: var(--forest-muted);
}

.settings-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  background: var(--birch-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.settings-list li + li { border-top: 1px solid var(--line); }

.row-link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 14px 14px;
  border: none;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--forest);
  cursor: pointer;
}
.row-link:active { background: rgba(27, 60, 42, 0.05); }
.row-link.row-danger { color: var(--danger); }
.row-meta {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--copper);
}
.row-chevron {
  margin-left: auto;
  color: var(--ink-soft);
  font-size: 18px;
  font-weight: 400;
}
.row-meta + .row-chevron { margin-left: 6px; }

.preview-toggle-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--birch-card);
  border: 1px dashed var(--copper);
  border-radius: var(--radius-card);
}
.preview-toggle-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  color: var(--ink-soft);
}
.preview-toggle-copy strong {
  font-size: 14px;
  color: var(--forest);
}

/* Toggle switch */
.switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
  cursor: pointer;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.switch-ui {
  position: absolute;
  inset: 0;
  background: #c8bfb0;
  border-radius: 999px;
  transition: background 0.15s;
}
.switch-ui::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 999px;
  transition: transform 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.switch input:checked + .switch-ui { background: var(--copper); }
.switch input:checked + .switch-ui::after { transform: translateX(20px); }

/* ===== Compose ===== */
.compose-form {
  padding-bottom: 40px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.field-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--forest);
}
.field-sub {
  font-weight: 500;
  color: var(--ink-soft);
  font-size: 12px;
}
.req {
  font-style: normal;
  font-weight: 600;
  color: var(--copper);
  font-size: 12px;
}
.field-hint {
  margin: 0;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.35;
}
.field input[type="text"],
.field input[type="number"],
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--birch-card);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--forest);
  outline: none;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--copper);
  box-shadow: 0 0 0 2px rgba(242, 122, 48, 0.2);
}
.field textarea { resize: vertical; min-height: 64px; }

.cover-picker {
  width: 100%;
  min-height: 120px;
  border: 2px dashed var(--line);
  border-radius: var(--radius-card);
  background: #ebe4d6;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font: inherit;
  color: var(--forest-muted);
}
.cover-picker.has-cover {
  border-style: solid;
  border-color: var(--forest);
  background: #e0ebe4;
  color: var(--forest);
  font-weight: 700;
}
.cover-placeholder { font-size: 14px; text-align: center; line-height: 1.35; }

.type-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.type-chip { font-size: 12px; padding: 7px 12px; }

.seg {
  display: flex;
  background: rgba(27, 60, 42, 0.08);
  border-radius: 12px;
  padding: 3px;
  gap: 3px;
}
.seg-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--forest-muted);
  cursor: pointer;
}
.seg-btn.is-active {
  background: var(--birch-card);
  color: var(--forest);
  box-shadow: 0 1px 3px rgba(27, 60, 42, 0.12);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--forest);
  padding: 6px 0;
  cursor: pointer;
}
.check-row input { width: 18px; height: 18px; accent-color: var(--forest); }
.check-row-strong { font-weight: 700; }

.ticket-fields {
  margin-top: 8px;
  padding: 12px;
  background: rgba(27, 60, 42, 0.04);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.field-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
}
.field-inline input {
  width: 120px;
  border: 1px solid var(--line);
  background: var(--birch-card);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 15px;
}

/* ===== Modal / paywall ===== */
.modal {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal[hidden] { display: none !important; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(27, 60, 42, 0.45);
}
.modal-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: 92%;
  overflow-y: auto;
  background: var(--birch);
  border-radius: 20px 20px 0 0;
  padding: 20px 20px calc(24px + var(--safe-bottom));
  box-shadow: 0 -8px 32px rgba(27, 60, 42, 0.2);
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 4px 8px;
}
.gate-icon {
  display: block;
  height: 40px;
  width: auto;
  margin: 4px auto 10px;
}
.modal-sheet h2 {
  margin: 0 0 6px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 26px;
}
.gate-badge {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--copper);
  margin: 0 0 10px;
}
.gate-copy {
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.4;
  margin: 0 0 12px;
}
.gate-features {
  margin: 0 0 14px;
  padding: 0 0 0 20px;
  font-size: 14px;
  color: var(--forest);
  line-height: 1.55;
}
.plan {
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  background: var(--birch-card);
  color: var(--forest);
}
.plan.is-selected,
.plan-year.is-selected {
  border-color: var(--forest);
  box-shadow: 0 0 0 1px var(--forest);
}

/* ===== Desktop / Chromebook (≥900px) — first-class web app ===== */
.side-nav {
  display: none;
}
.app-main {
  display: contents; /* phone: children behave as before inside phone-shell */
}

@media (min-width: 900px) {
  body {
    padding: 0;
    align-items: stretch;
    background: #cfc6b6;
  }

  .phone-shell {
    max-width: none;
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
  }

  .preview-banner {
    flex: 0 0 100%;
    width: 100%;
    order: 0;
  }

  .side-nav {
    display: flex;
    flex-direction: column;
    order: 1;
    width: 220px;
    flex: 0 0 220px;
    background: var(--birch-card);
    border-right: 1px solid var(--line);
    padding: 20px 14px;
    gap: 8px;
    height: calc(100dvh - var(--banner-h) - var(--safe-top));
    max-height: calc(100dvh - var(--banner-h) - var(--safe-top));
    overflow-y: auto;
  }

  .side-nav-brand {
    padding: 0 8px 16px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 8px;
  }
  .side-nav-brand .wordmark {
    height: 40px;
  }
  .side-nav-zip {
    margin: 8px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--forest-muted);
  }

  .side-nav-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
  }

  .side-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: none;
    background: transparent;
    color: var(--ink-soft);
    font: inherit;
    font-size: 15px;
    font-weight: 650;
    padding: 11px 12px;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
  }
  .side-nav-item:hover {
    background: rgba(27, 60, 42, 0.06);
    color: var(--forest);
  }
  .side-nav-item.is-active {
    background: var(--forest);
    color: var(--birch);
  }
  .side-nav-icon {
    width: 22px;
    text-align: center;
    font-size: 16px;
  }

  /* Z-only circle in side nav — mirrors floating center control */
  .side-nav-compose {
    margin: 10px 0;
    flex-direction: column;
    gap: 6px;
    padding: 14px 12px;
    border: 1.5px solid var(--line);
    background: var(--birch);
  }
  .side-nav-compose.is-active {
    background: var(--birch);
    color: var(--forest);
    border-color: var(--forest);
  }
  .side-nav-z {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    border: 3px solid var(--forest);
    background: var(--birch-card);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(27, 60, 42, 0.22);
  }
  .side-nav-z img {
    width: 28px;
    height: 28px;
    object-fit: contain;
  }
  .side-nav-compose span:last-child {
    font-size: 12px;
    font-weight: 700;
    color: var(--forest);
  }

  .side-nav-caption {
    margin: 12px 8px 0;
    font-size: 11px;
    color: var(--ink-soft);
    line-height: 1.35;
  }

  .app-main {
    display: flex;
    flex-direction: column;
    order: 2;
    flex: 1 1 auto;
    min-width: 0;
    height: calc(100dvh - var(--banner-h) - var(--safe-top));
    max-height: calc(100dvh - var(--banner-h) - var(--safe-top));
    position: relative;
    overflow: hidden;
    background: var(--birch);
  }

  .app-main .screen {
    flex: 1 1 auto;
    min-height: 0;
  }

  /* Hide mobile bottom tab bar on desktop */
  .tab-bar {
    display: none !important;
  }

  /* Wider feed / content */
  .feed {
    padding: 8px 28px 40px;
    max-width: 920px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-content: start;
  }
  .feed .empty-feed {
    grid-column: 1 / -1;
  }
  .card-photo-wrap {
    height: 168px;
  }

  .screen-home .top-bar,
  .screen-home .filters {
    max-width: 920px;
    width: 100%;
    margin: 0 auto;
    padding-left: 28px;
    padding-right: 28px;
  }

  .screen-scroll,
  .detail-body {
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    padding-left: 28px;
    padding-right: 28px;
  }

  .compose-form {
    max-width: 640px;
  }

  /* Nested screens still fill app-main */
  .screen-detail .detail-header,
  .screen-compose .detail-header,
  .screen-thread .detail-header,
  .screen-seller-scan .detail-header,
  .screen-header {
    max-width: 920px;
    width: 100%;
    margin: 0 auto;
    padding-left: 28px;
    padding-right: 28px;
  }

  /* Paywall as centered dialog on desktop */
  .modal {
    align-items: center;
  }
  .modal-sheet {
    max-width: 420px;
    border-radius: 20px;
    margin: 24px;
    padding: 24px 24px 28px;
  }

  /* Ticket QR a bit larger on desktop */
  .qr-placeholder {
    width: 180px;
    height: 180px;
  }

  /* Onboarding full-bleed over desktop chrome */
  .onboarding {
    position: fixed;
  }
  .onboarding-sheet {
    max-width: 440px;
    margin: 40px auto;
    background: var(--birch);
    border-radius: 20px;
    box-shadow: 0 18px 50px rgba(27, 60, 42, 0.25);
    padding: 32px 28px 36px;
    max-height: calc(100dvh - 80px);
  }
  body.is-onboarding .side-nav { visibility: hidden; }

  .screen-seller-scan.is-kiosk .scan-frame {
    max-width: 720px;
  }
}

@media (min-width: 1200px) {
  .side-nav {
    width: 240px;
    flex-basis: 240px;
  }
  .feed {
    max-width: 1040px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* ===== Spam & scam protection (demo stub) ===== */
.spam-lead {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
}
.spam-always-on {
  background: var(--birch-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 14px;
  margin-bottom: 14px;
}
.spam-always-on strong {
  display: block;
  color: var(--forest);
  font-size: 14px;
  margin-bottom: 8px;
}
.spam-always-on ul {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-soft);
}
.spam-always-on li + li { margin-top: 6px; }
.spam-toggle { margin-bottom: 10px; }
.spam-toggle.is-gated {
  opacity: 0.72;
  border-style: solid;
  border-color: var(--line);
}
