:root {
  --ink: #172823;
  --muted: #6c7c76;
  --subtle: #9ba7a2;
  --paper: #ffffff;
  --canvas: #f4f6f2;
  --line: #dde4df;
  --soft: #e8f1ed;
  --brand: #176b5b;
  --brand-dark: #0e5145;
  --brand-pale: #dcece6;
  --coral: #e96447;
  --coral-pale: #fae7e1;
  --amber: #c68a2b;
  --amber-pale: #fbf0da;
  --blue: #427a8e;
  --shadow: 0 12px 30px rgba(23, 40, 35, 0.08);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: var(--ink);
  background: #e9eeeb;
}

* {
  box-sizing: border-box;
}

html {
  background: #e9eeeb;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(23, 107, 91, 0.035) 1px, transparent 1px) 0 0 / 64px 64px,
    #e9eeeb;
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  font: inherit;
  letter-spacing: 0;
}

button {
  color: inherit;
}

button,
[role="button"] {
  touch-action: manipulation;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

img {
  display: block;
  max-width: 100%;
}

.app-shell {
  position: relative;
  width: min(100%, 500px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--canvas);
  box-shadow: 0 0 40px rgba(23, 40, 35, 0.12);
}

.page {
  min-height: 100vh;
  padding-bottom: calc(78px + var(--safe-bottom));
}

.page.subpage {
  padding-bottom: calc(82px + var(--safe-bottom));
}

.page.no-bottom {
  padding-bottom: 24px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(221, 228, 223, 0.85);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
}

.topbar.brand-bar {
  min-height: 72px;
  border: 0;
}

.brand-lockup {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: var(--brand);
  box-shadow: 0 6px 16px rgba(23, 107, 91, 0.24);
}

.brand-name {
  margin: 0;
  font-size: 21px;
  line-height: 1.15;
  font-weight: 800;
}

.brand-tagline {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.topbar-title {
  min-width: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 750;
  text-align: center;
}

.topbar-title.left {
  text-align: left;
}

.topbar-spacer {
  width: 38px;
  flex: 0 0 38px;
}

.top-actions {
  display: flex;
  margin-left: auto;
  align-items: center;
  gap: 6px;
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.icon-button:hover,
.icon-button:active {
  background: var(--soft);
}

.icon-button.light {
  color: white;
  background: rgba(255, 255, 255, 0.16);
}

.icon-button svg,
.nav-icon svg,
.feature-icon svg,
.metric-icon svg,
.button svg,
.small-icon svg,
.avatar svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
}

.section {
  padding: 16px;
}

.section + .section {
  padding-top: 0;
}

.section-head {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title {
  margin: 0;
  font-size: 17px;
  font-weight: 750;
}

.section-kicker {
  color: var(--coral);
  font-size: 12px;
  font-weight: 700;
}

.section-action {
  border: 0;
  padding: 4px 0;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  cursor: pointer;
}

.search-band {
  padding: 0 16px 14px;
  background: var(--paper);
}

.search-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
}

.location-button {
  display: flex;
  height: 42px;
  width: 108px;
  max-width: 108px;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  border: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

.location-button span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-box {
  display: flex;
  height: 44px;
  min-width: 0;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 6px 0 12px;
  color: var(--muted);
  background: #f8faf8;
}

.search-box button,
.search-box input {
  border: 0;
  background: transparent;
}

.search-box .search-open {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  padding: 0;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.search-open span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-box .search-submit {
  height: 32px;
  flex: 0 0 auto;
  min-width: 52px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  color: white;
  background: var(--brand);
  font-size: 13px;
  font-weight: 700;
}

.tab-strip {
  position: relative;
  display: flex;
  min-height: 46px;
  align-items: stretch;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  padding: 0 12px;
  background: var(--paper);
  scrollbar-width: none;
}

.tab-strip::-webkit-scrollbar {
  display: none;
}

.tab-button {
  position: relative;
  min-width: max-content;
  flex: 1 0 auto;
  border: 0;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.tab-button.active {
  color: var(--brand);
}

.tab-button.active::after {
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--brand);
  content: "";
}

.opportunity-band {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  margin: 14px 16px 0;
  border-radius: 8px;
  padding: 18px;
  color: white;
  background: #173e37;
}

.opportunity-band::after {
  position: absolute;
  right: -28px;
  bottom: -56px;
  width: 170px;
  height: 170px;
  border: 34px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  content: "";
}

.opportunity-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #cce7dd;
  font-size: 12px;
  font-weight: 650;
}

.opportunity-band h2 {
  max-width: 270px;
  margin: 10px 0 6px;
  font-size: 23px;
  line-height: 1.25;
}

.opportunity-band p {
  max-width: 275px;
  margin: 0;
  color: #d9e9e3;
  font-size: 13px;
  line-height: 1.6;
}

.opportunity-stat {
  position: absolute;
  right: 18px;
  bottom: 16px;
  z-index: 1;
  text-align: right;
}

.opportunity-stat strong {
  display: block;
  font-size: 22px;
}

.opportunity-stat span {
  color: #cce7dd;
  font-size: 11px;
}

.member-ticker {
  display: grid;
  grid-template-columns: auto 1fr auto;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  margin: 12px 16px 0;
  border: 1px solid #eadaba;
  border-radius: 8px;
  padding: 7px 10px;
  color: #745720;
  background: var(--amber-pale);
  font-size: 12px;
}

.member-ticker strong {
  color: var(--amber);
  white-space: nowrap;
}

.member-ticker span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.product-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 5px 14px rgba(23, 40, 35, 0.04);
  cursor: pointer;
}

.product-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #dce2de;
}

.product-body {
  padding: 10px;
}

.product-name {
  display: -webkit-box;
  min-height: 39px;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-tags {
  display: flex;
  height: 23px;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  overflow: hidden;
}

.tag {
  display: inline-flex;
  height: 22px;
  max-width: 100%;
  align-items: center;
  border-radius: 4px;
  padding: 0 6px;
  color: var(--brand);
  background: var(--brand-pale);
  font-size: 10px;
  white-space: nowrap;
}

.tag.coral {
  color: #b8442b;
  background: var(--coral-pale);
}

.tag.amber {
  color: #865c15;
  background: var(--amber-pale);
}

.product-meta {
  display: flex;
  min-height: 30px;
  align-items: end;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.price {
  color: var(--coral);
  font-size: 18px;
  font-weight: 800;
}

.price small {
  font-size: 11px;
  font-weight: 650;
}

.place {
  overflow: hidden;
  color: var(--subtle);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-stack {
  display: grid;
  gap: 10px;
}

.company-row,
.message-row,
.contact-row {
  display: flex;
  min-height: 78px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--paper);
  cursor: pointer;
}

.company-row:active,
.message-row:active,
.contact-row:active,
.product-card:active {
  transform: translateY(1px);
}

.avatar {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: white;
  background: var(--brand);
  font-size: 15px;
  font-weight: 800;
}

.avatar.coral { background: var(--coral); }
.avatar.amber { background: var(--amber); }
.avatar.blue { background: var(--blue); }
.avatar.soft { color: var(--brand); background: var(--brand-pale); }

.list-copy {
  min-width: 0;
  flex: 1;
}

.list-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.list-title {
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-time {
  flex: 0 0 auto;
  color: var(--subtle);
  font-size: 10px;
}

.list-note {
  display: -webkit-box;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--coral);
}

.badge {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  padding: 0 7px;
  color: white;
  background: var(--coral);
  font-size: 11px;
  font-weight: 700;
}

.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px;
  background: var(--paper);
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar { display: none; }

.filter-chip {
  display: inline-flex;
  height: 34px;
  min-width: max-content;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 11px;
  color: var(--muted);
  background: var(--paper);
  font-size: 12px;
  cursor: pointer;
}

.filter-chip.active {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-pale);
}

.purchase-card {
  border-left: 3px solid var(--brand);
  border-radius: 0 8px 8px 0;
  padding: 14px;
  background: var(--paper);
  box-shadow: 0 4px 14px rgba(23, 40, 35, 0.04);
}

.purchase-top,
.purchase-bottom,
.company-meta,
.inline-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.purchase-company {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-title {
  margin: 12px 0 10px;
  font-size: 16px;
  font-weight: 750;
}

.purchase-data {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.purchase-data span {
  display: block;
  color: var(--subtle);
  font-size: 10px;
}

.purchase-data strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.waiting {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--amber);
  font-size: 11px;
}

.button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0 15px;
  color: white;
  background: var(--brand);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.button:active {
  transform: translateY(1px);
}

.button.secondary {
  border-color: var(--line);
  color: var(--ink);
  background: var(--paper);
}

.button.coral { background: var(--coral); }
.button.amber { color: #3d2b0c; background: #edb348; }
.button.ghost { border-color: var(--brand); color: var(--brand); background: transparent; }
.button.block { width: 100%; }
.button.small { min-height: 32px; padding: 0 12px; font-size: 12px; }

.connection-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px;
  background: #173e37;
}

.connection-action {
  min-height: 92px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 14px;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  text-align: left;
  cursor: pointer;
}

.connection-action svg {
  width: 22px;
  height: 22px;
  margin-bottom: 12px;
}

.connection-action strong { display: block; font-size: 17px; }
.connection-action span { display: block; margin-top: 4px; color: #cfe0da; font-size: 11px; }

.profile-hero {
  position: relative;
  overflow: hidden;
  padding: 18px 16px 16px;
  color: white;
  background: #173e37;
}

.profile-hero::after {
  position: absolute;
  right: -30px;
  top: -44px;
  width: 160px;
  height: 160px;
  border: 30px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  content: "";
}

.role-switch {
  display: grid;
  width: 192px;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin: 0 auto 18px;
  border-radius: 7px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.12);
}

.role-switch button {
  height: 34px;
  border: 0;
  border-radius: 5px;
  color: #cae0d8;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.role-switch button.active {
  color: var(--brand-dark);
  background: white;
}

.profile-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 13px;
}

.profile-main .avatar {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
  color: var(--brand-dark);
  background: #d6ebe3;
}

.profile-name { font-size: 18px; font-weight: 800; }
.profile-company { margin-top: 5px; color: #cfe0da; font-size: 12px; }
.profile-cert { margin-left: auto; color: #f5c46e; font-size: 11px; }

.asset-strip {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 14px;
}

.asset-item span { color: #cfe0da; font-size: 11px; }
.asset-item strong { display: block; margin-top: 3px; font-size: 17px; }

.metric-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 14px 8px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.metric {
  min-width: 0;
  text-align: center;
}

.metric strong { display: block; font-size: 17px; }
.metric span { display: block; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.member-panel {
  position: relative;
  overflow: hidden;
  margin: 14px 16px;
  border-radius: 8px;
  padding: 17px;
  color: #563b0b;
  background: #f5d99d;
}

.member-panel h3 { margin: 0 0 4px; font-size: 18px; }
.member-panel p { max-width: 270px; margin: 0; color: #75571f; font-size: 12px; line-height: 1.55; }
.member-panel .button { margin-top: 12px; }
.member-panel svg.decor { position: absolute; right: 17px; top: 20px; width: 52px; height: 52px; color: rgba(105, 71, 14, 0.28); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.feature-item {
  display: flex;
  min-width: 0;
  min-height: 82px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  border: 0;
  padding: 9px 4px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.feature-item span {
  width: 100%;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feature-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  color: var(--brand);
  background: var(--brand-pale);
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  display: grid;
  width: min(100%, 500px);
  min-height: calc(66px + var(--safe-bottom));
  grid-template-columns: repeat(5, 1fr);
  margin: auto;
  border-top: 1px solid var(--line);
  padding: 6px 6px var(--safe-bottom);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(18px);
}

.nav-button {
  display: flex;
  min-width: 0;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  border: 0;
  border-radius: 7px;
  padding: 3px;
  color: var(--subtle);
  background: transparent;
  font-size: 10px;
  cursor: pointer;
}

.nav-button.active {
  color: var(--brand);
  background: var(--brand-pale);
}

.nav-icon {
  display: grid;
  height: 24px;
  place-items: center;
}

.detail-hero {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #d8dfdb;
}

.detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-count {
  position: absolute;
  right: 14px;
  bottom: 14px;
  border-radius: 6px;
  padding: 5px 9px;
  color: white;
  background: rgba(23, 40, 35, 0.76);
  font-size: 11px;
}

.detail-summary {
  padding: 18px 16px;
  background: var(--paper);
}

.detail-summary h1 {
  margin: 0;
  font-size: 21px;
  line-height: 1.4;
}

.detail-price {
  margin-top: 12px;
  color: var(--coral);
  font-size: 25px;
  font-weight: 850;
}

.detail-price span { font-size: 12px; font-weight: 600; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.spec-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: var(--paper);
}

.spec-item {
  min-height: 60px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
}

.spec-item span { display: block; color: var(--subtle); font-size: 10px; }
.spec-item strong { display: block; margin-top: 5px; font-size: 13px; }

.supplier-band {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 8px solid var(--canvas);
  border-bottom: 8px solid var(--canvas);
  padding: 16px;
  background: var(--paper);
  cursor: pointer;
}

.supplier-band .list-copy { min-width: 0; }

.detail-copy {
  padding: 18px 16px 24px;
  background: var(--paper);
}

.detail-copy h2 { margin: 0 0 12px; font-size: 17px; }
.detail-copy p { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.75; }

.action-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  display: grid;
  width: min(100%, 500px);
  min-height: calc(70px + var(--safe-bottom));
  grid-template-columns: repeat(3, 58px) 1fr;
  gap: 6px;
  margin: auto;
  border-top: 1px solid var(--line);
  padding: 8px 10px calc(8px + var(--safe-bottom));
  background: var(--paper);
}

.action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 9px;
  cursor: pointer;
}

.action-icon.active { color: var(--coral); }

.action-primary {
  border: 0;
  border-radius: 7px;
  color: white;
  background: var(--brand);
  font-weight: 750;
  cursor: pointer;
}

.search-page {
  min-height: 100vh;
  background: var(--paper);
}

.search-page .search-box {
  flex: 1;
}

.search-page input {
  min-width: 0;
  flex: 1;
  outline: 0;
  color: var(--ink);
}

.search-page input::placeholder,
.field input::placeholder,
.field textarea::placeholder { color: #a7b0ac; }

.search-type-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  padding: 14px 16px;
}

.search-type {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: white;
  font-size: 12px;
}

.search-type.active { border-color: var(--brand); color: var(--brand); background: var(--brand-pale); }

.history-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.history-item {
  border: 0;
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--muted);
  background: var(--canvas);
  font-size: 12px;
}

.chat-page {
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 0;
  background: #eef1ee;
}

.chat-stream {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  padding: 18px 14px;
}

.chat-time { color: var(--subtle); font-size: 10px; text-align: center; }

.chat-bubble-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.chat-bubble-row.me { justify-content: flex-end; }
.chat-bubble-row .avatar { width: 34px; height: 34px; flex-basis: 34px; font-size: 11px; }

.chat-bubble {
  max-width: 72%;
  border-radius: 8px 8px 8px 2px;
  padding: 10px 12px;
  background: white;
  box-shadow: 0 3px 10px rgba(23, 40, 35, 0.05);
  font-size: 13px;
  line-height: 1.55;
}

.chat-bubble-row.me .chat-bubble {
  border-radius: 8px 8px 2px 8px;
  color: white;
  background: var(--brand);
}

.chat-composer {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 9px 10px calc(9px + var(--safe-bottom));
  background: white;
}

.chat-composer input {
  min-width: 0;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  outline: 0;
  background: #f7f8f6;
}

.publish-form {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.form-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--paper);
}

.form-block h3 { margin: 0 0 13px; font-size: 15px; }

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

.field:last-child { margin-bottom: 0; }
.field label { color: var(--muted); font-size: 11px; font-weight: 650; }

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px 12px;
  outline: 0;
  color: var(--ink);
  background: #f9faf8;
  font-size: 13px;
}

.field textarea { min-height: 96px; resize: vertical; }

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.upload-box {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  border: 1px dashed #aebbb5;
  border-radius: 7px;
  color: var(--muted);
  background: #f8faf8;
  font-size: 10px;
  text-align: center;
}

.upload-box svg { margin: 0 auto 5px; }

.form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 8px;
}

.empty-state {
  display: grid;
  min-height: 260px;
  place-items: center;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.empty-state svg { width: 44px; height: 44px; margin-bottom: 12px; color: #a8b5af; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 18px;
  background: rgba(12, 24, 20, 0.46);
}

.modal {
  width: min(100%, 468px);
  max-height: min(82vh, 680px);
  overflow-y: auto;
  border-radius: 8px;
  padding: 18px;
  background: var(--paper);
  box-shadow: var(--shadow);
  animation: rise 180ms ease-out;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-head h2 { margin: 0; font-size: 18px; }

.share-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.share-option {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #f9faf8;
  font-size: 11px;
}

.share-option svg { color: var(--brand); }

.modal-note {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  z-index: 150;
  display: flex;
  max-width: calc(100% - 40px);
  min-height: 42px;
  align-items: center;
  gap: 8px;
  border-radius: 7px;
  padding: 9px 13px;
  color: white;
  background: #20342e;
  box-shadow: var(--shadow);
  font-size: 12px;
  transform: translateX(-50%);
  animation: toast-in 180ms ease-out;
}

.demo-ribbon {
  position: fixed;
  right: max(8px, calc((100vw - 500px) / 2 + 8px));
  bottom: calc(76px + var(--safe-bottom));
  z-index: 42;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 6px;
  padding: 6px 8px;
  color: #72551e;
  background: #faedcf;
  box-shadow: 0 4px 12px rgba(23, 40, 35, 0.08);
  font-size: 9px;
  font-weight: 700;
}

.divider { height: 8px; background: var(--canvas); }
.muted { color: var(--muted); }
.coral-text { color: var(--coral); }
.brand-text { color: var(--brand); }
.nowrap { white-space: nowrap; }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (min-width: 700px) {
  body { padding: 24px 0; }
  .app-shell { min-height: calc(100vh - 48px); border-radius: 8px; overflow: hidden; }
  .page { min-height: calc(100vh - 48px); }
  .bottom-nav,
  .action-bar { bottom: 24px; }
  .chat-page { height: calc(100vh - 48px); }
}

@media (max-width: 360px) {
  .section { padding-right: 12px; padding-left: 12px; }
  .opportunity-band,
  .member-ticker,
  .member-panel { margin-right: 12px; margin-left: 12px; }
  .product-grid { gap: 8px; }
  .product-body { padding: 8px; }
  .feature-item span { font-size: 10px; }
  .profile-cert { display: none; }
  .location-button { width: 88px; max-width: 88px; }
  .search-box .search-submit { min-width: 48px; padding: 0 10px; }
  .opportunity-band p { max-width: 168px; }
}

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