:root {
  --teal-900: #043f39;
  --teal-800: #07564d;
  --teal-700: #0a6a5f;
  --teal-100: #e6f4ee;
  --orange: #ff6a1a;
  --orange-soft: #fff0e5;
  --green-soft: #eaf7dc;
  --cream: #fbf6ea;
  --paper: #fffdf8;
  --line: #e6e1d7;
  --text: #1f2d2a;
  --muted: #6f7b77;
  --shadow: 0 16px 40px rgba(12, 56, 49, 0.12);
  --radius: 8px;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--cream);
  color: var(--text);
}

body {
  margin: 0;
  min-width: 0;
  background: linear-gradient(180deg, #fffaf0 0, #fffdf8 260px, #f6f2e8 100%);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 253, 248, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar {
  width: min(1440px, calc(100% - 28px));
  margin: 0 auto;
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  color: var(--teal-900);
  font-size: 24px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-script {
  color: #c9361f;
  font-family: "STXingkai", "华文行楷", "KaiTi", "SimKai", "Microsoft YaHei", sans-serif;
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 2px 0 rgba(255, 236, 205, 0.9);
}

.brand-rest {
  margin-left: 6px;
  color: var(--teal-900);
  font-size: 24px;
  font-weight: 850;
}

.area-dot {
  color: var(--teal-700);
  font-weight: 600;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
}

.site-nav a {
  padding: 24px 13px 20px;
  border-bottom: 3px solid transparent;
  font-weight: 650;
  white-space: nowrap;
}

.site-nav a.active,
.site-nav a:hover {
  color: var(--teal-800);
  border-bottom-color: var(--teal-800);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: white;
  color: var(--teal-800);
  border-radius: var(--radius);
  min-height: 40px;
  padding: 0 12px;
  font-weight: 700;
}

.button,
button,
input,
select,
textarea {
  font: inherit;
}

.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
}

.button.small {
  min-height: 38px;
  padding: 0 12px;
  font-size: 14px;
}

.button.primary {
  background: var(--orange);
  color: white;
  box-shadow: 0 10px 22px rgba(255, 106, 26, 0.2);
}

.button.outline {
  color: var(--teal-800);
  border-color: var(--teal-700);
  background: #fffefa;
}

.button.ghost {
  color: var(--teal-900);
  border-color: #cbded7;
  background: white;
}

.button.light {
  color: var(--teal-800);
  background: var(--teal-100);
  border-color: #cfe8df;
}

.button.danger {
  color: white;
  background: #b42318;
  border-color: #b42318;
}

.inline-form {
  display: inline-flex;
  margin: 0;
}

.flash {
  margin: 18px auto 0;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: white;
  font-weight: 650;
  transition: opacity 140ms ease, transform 140ms ease;
}

.flash.success {
  border-color: #b6dfc3;
  background: #eef9ef;
  color: #136a38;
}

.flash.error {
  border-color: #ffd0c1;
  background: #fff0ea;
  color: #a83b12;
}

.flash.is-hiding { opacity: 0; }

.hero {
  position: relative;
  isolation: isolate;
  min-height: 340px;
  margin: 22px 0 0;
  display: grid;
  grid-template-columns: minmax(480px, 0.78fr) minmax(0, 1.22fr);
  overflow: hidden;
  border-radius: var(--radius);
  background: #fbf8ef;
  box-shadow: var(--shadow);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero::before {
  z-index: 0;
  background: url("/assets/images/fixone-parts-hero-composed.png") center center / cover no-repeat;
}

.hero::after {
  z-index: 1;
  background: transparent;
}

.hero-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
  padding: 48px 42px 42px;
}

.hero h1,
.page-hero h1 {
  margin: 0 0 12px;
  color: var(--teal-900);
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
}

.hero h1 span {
  display: block;
}

.hero p,
.page-hero p {
  margin: 0 0 24px;
  color: #35443f;
  font-size: 18px;
}

.hero-search,
.inline-search {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-search input,
.inline-search input,
.stack-form input,
.stack-form select,
.stack-form textarea,
.review-form input,
.status-row select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d7d2c8;
  border-radius: var(--radius);
  background: white;
  padding: 0 13px;
  color: var(--text);
}

.stack-form textarea {
  min-height: 96px;
  padding: 12px 13px;
  resize: vertical;
}

.hero-search input {
  flex: 1 1 260px;
  max-width: 460px;
  min-height: 56px;
  font-size: 17px;
}

.hero-image {
  min-height: 340px;
}

.category-strip {
  margin: -34px 0 10px;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0;
  padding: 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(214, 222, 214, 0.8);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.category-pill {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 10px 4px;
  color: #26322f;
}

.category-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
}

.category-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.88fr);
  gap: 22px;
  margin: 10px 0 28px;
}

.home-main,
.home-side {
  display: grid;
  align-content: start;
  gap: 18px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 8px;
}

.section-heading.tight {
  margin: 0 0 12px;
}

.section-heading h2,
.panel h2,
.account-panel h2,
.admin-section h2,
.dashboard-main h2 {
  margin: 0;
  color: var(--teal-900);
  font-size: 21px;
}

.section-heading a {
  color: var(--muted);
  font-weight: 700;
}

.product-grid,
.shop-grid,
.service-grid,
.wanted-board {
  display: grid;
  gap: 16px;
}

.product-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-grid.wide {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 18px 0 34px;
}

.shop-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.shop-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.item-card,
.shop-card,
.service-card,
.wanted-card,
.panel,
.auth-panel,
.form-shell,
.detail-card,
.report-box,
.dashboard-side,
.dashboard-main,
.account-panel,
.admin-section,
.shop-profile,
.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 26px rgba(22, 50, 45, 0.06);
}

.item-card,
.shop-card {
  overflow: hidden;
}

.media-link img,
.shop-media img {
  width: 100%;
  height: 154px;
  object-fit: cover;
  background: #f2eadb;
}

.item-body,
.shop-content {
  padding: 14px;
}

.item-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.item-title-row h1,
.item-title-row h3 {
  margin: 0;
  min-width: 0;
}

.item-title-row h3 {
  font-size: 18px;
  line-height: 1.25;
}

.muted {
  color: var(--muted);
}

.verify,
.soft-badge,
.wanted-row span,
.wanted-card span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.verify {
  color: #0b7a43;
  background: #e7f6ea;
}

.soft-badge,
.wanted-row span,
.wanted-card span {
  color: var(--teal-800);
  background: var(--teal-100);
}

.price {
  color: #f05b14;
  font-size: 20px;
  font-weight: 850;
}

.price.large {
  font-size: 34px;
  margin: 12px 0;
}

.price small {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.tags,
.shop-meta,
.detail-actions,
.check-row,
.status-row,
.table-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tags span {
  padding: 5px 8px;
  border-radius: 6px;
  background: #f7f0df;
  color: #69523a;
  font-size: 13px;
  font-weight: 700;
}

.shop-card {
  display: grid;
  grid-template-rows: auto 1fr;
}

.delivery-note {
  padding: 8px 10px;
  border-radius: 6px;
  background: #fbf1df;
  color: #66513b;
}

.panel {
  padding: 16px;
}

.wanted-list {
  display: grid;
  gap: 10px;
}

.wanted-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.wanted-row h3,
.wanted-row p {
  margin: 0;
}

.service-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.service-mini {
  display: grid;
  gap: 7px;
  padding: 12px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #eff8ef, #fff3e4);
}

.service-mini img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.service-mini span {
  color: var(--muted);
  font-size: 13px;
}

.bridge-card {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.bridge-card img {
  height: 118px;
  width: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.map-teaser {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #eaf7dc, #fff7e8);
}

.map-teaser h2,
.map-teaser p {
  margin: 0;
}

.map-teaser p {
  color: var(--muted);
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  margin: 18px 0 36px;
}

.map-shell,
.map-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 8px 26px rgba(22, 50, 45, 0.06);
}

.map-shell {
  overflow: hidden;
  min-height: 620px;
}

.map-canvas {
  width: 100%;
  height: 620px;
}

.map-panel {
  padding: 18px;
}

.map-panel h2 {
  margin: 0 0 10px;
  color: var(--teal-900);
  font-size: 20px;
}

.map-legend,
.map-marker-list {
  display: grid;
  gap: 10px;
}

.map-legend {
  margin: 16px 0 20px;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 750;
}

.legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-dot.town {
  background: var(--orange);
}

.legend-dot.shop {
  background: var(--teal-700);
}

.legend-dot.landmark {
  background: #176bd6;
}

.map-marker-list article {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf8;
}

.map-marker-list p {
  margin: 0;
  color: var(--muted);
}

.map-marker-list a {
  color: var(--teal-800);
  font-weight: 800;
}

.local-band,
.notice-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  padding: 20px;
  border-radius: var(--radius);
  background: linear-gradient(110deg, #eaf7dc, #fff3e2);
  border: 1px solid #e4dccd;
}

.local-band h2,
.local-band p {
  margin: 0;
}

.metric {
  display: grid;
  justify-items: center;
  min-width: 120px;
}

.metric strong {
  color: var(--teal-900);
  font-size: 34px;
}

.metric span {
  color: var(--muted);
  font-weight: 700;
}

.page-hero {
  margin: 24px 0 18px;
  padding: 28px;
  border-radius: var(--radius);
  background: linear-gradient(120deg, #fffdf8, #eaf7dc);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.small-hero h1 {
  font-size: clamp(28px, 4vw, 42px);
}

.small-hero p {
  margin-bottom: 0;
}

.publish-hero-copy {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
}

.publish-hero-copy h1,
.publish-hero-copy p {
  margin: 0;
}

.inline-search {
  min-width: min(420px, 100%);
}

.category-filter,
.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.category-filter a,
.admin-nav a {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  font-weight: 750;
}

.category-filter a.active,
.admin-nav a:hover {
  color: white;
  background: var(--teal-800);
  border-color: var(--teal-800);
}

.empty-state {
  margin: 28px 0;
  padding: 34px;
  display: grid;
  justify-items: start;
  gap: 14px;
}

.empty-state.tall {
  min-height: 360px;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
  margin: 24px 0;
}

.detail-media {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  overflow: hidden;
}

.detail-media img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.detail-card,
.report-box {
  padding: 22px;
}

.detail-card h1 {
  color: var(--teal-900);
  font-size: clamp(28px, 4vw, 44px);
}

.detail-list,
.service-meta {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.detail-list dt,
.service-meta dt {
  color: var(--muted);
  font-weight: 700;
}

.detail-list dd,
.service-meta dd {
  margin: 0;
}

.compact-list {
  grid-template-columns: 78px minmax(0, 1fr);
}

.report-box {
  margin: 0 0 34px;
}

.auth-layout,
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 22px;
  margin: 28px 0;
}

.auth-panel,
.form-shell,
.dashboard-side,
.dashboard-main,
.account-panel,
.admin-section {
  padding: 22px;
}

.stack-form {
  display: grid;
  gap: 14px;
}

.stack-form label,
.review-form label {
  display: grid;
  gap: 7px;
  color: #33433e;
  font-weight: 750;
}

.form-grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-block {
  display: grid;
  gap: 14px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.form-block legend {
  color: var(--teal-900);
  font-size: 18px;
  font-weight: 850;
}

.check-row label,
.check-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.form-error {
  padding: 10px 12px;
  border-radius: var(--radius);
  color: #a83b12;
  background: #fff0ea;
  border: 1px solid #ffd0c1;
}

.form-success {
  padding: 10px 12px;
  border-radius: var(--radius);
  color: #136a38;
  background: #eef9ef;
  border: 1px solid #b6dfc3;
}

.status-panel {
  margin-bottom: 18px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--teal-100);
  border: 1px solid #cfe7df;
}

.dashboard-block {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.dashboard-block h2 {
  margin: 0 0 14px;
}

.account-hero {
  background: linear-gradient(120deg, #fffdf8 0%, #e6f4ee 48%, #fff0e5 100%);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--teal-700);
  font-weight: 850;
}

.account-hero-actions,
.account-nav,
.account-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.account-hero-actions {
  justify-content: flex-end;
}

.account-stats {
  margin: 0 0 18px;
}

.account-stats article {
  min-width: 150px;
  flex: 1 1 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
}

.account-stats strong {
  display: block;
  color: var(--teal-900);
  font-size: 30px;
  line-height: 1;
}

.account-stats span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 750;
}

.account-nav {
  margin: 0 0 18px;
}

.account-nav a {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--teal-800);
  font-weight: 800;
}

.account-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 18px 0;
  align-items: start;
}

.account-wide {
  margin: 18px 0;
}

.danger-panel {
  border-color: #f2b8ae;
  background: #fff8f6;
}

.danger-panel h2 {
  color: #8d1d16;
}

.danger-copy {
  color: #8d1d16;
  font-weight: 750;
}

.delete-account-form {
  margin-top: 14px;
}

.account-empty {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: 14px 0 0;
}

.account-mini-list {
  display: grid;
  gap: 10px;
}

.account-mini-list a {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf8;
}

.account-mini-list span {
  color: var(--teal-900);
  font-weight: 800;
}

.account-mini-list small {
  color: var(--muted);
  white-space: nowrap;
}

.dashboard-grid {
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: start;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--teal-900);
  background: #f7f3e9;
}

.review-form {
  display: grid;
  gap: 8px;
  min-width: 220px;
}

.admin-section {
  margin: 18px 0;
}

.shop-profile {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  padding: 22px;
  margin: 24px 0;
}

.shop-profile img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  border-radius: var(--radius);
}

.service-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0 34px;
}

.service-card {
  padding: 16px;
}

.service-card img {
  width: 74px;
  height: 74px;
  object-fit: contain;
  margin-bottom: 12px;
}

.service-card h3 {
  margin: 0 0 8px;
  color: var(--teal-900);
}

.notice-band {
  display: block;
  margin: 0 0 18px;
  font-weight: 750;
}

.wanted-board {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0 34px;
}

.wanted-card {
  padding: 18px;
}

.wanted-card h3 {
  margin: 0;
  color: var(--teal-900);
}

.wanted-card p {
  margin: 10px 0;
}

.wanted-card-image {
  display: block;
  width: 100%;
  max-height: 180px;
  margin: 10px 0;
  border-radius: 8px;
  object-fit: cover;
}

.wanted-description {
  white-space: pre-wrap;
}

.site-footer {
  width: min(1280px, calc(100% - 32px));
  margin: 40px auto 0;
  padding: 26px 0 34px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #53625e;
  border-top: 1px solid var(--line);
}

.site-footer div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.footer-links a {
  color: var(--teal-800);
  font-weight: 700;
}

@media (max-width: 1380px) {
  .topbar {
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
  }

  .site-nav {
    order: 5;
    flex-basis: 100%;
    display: none;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 12px 8px 10px;
  }

  .header-actions {
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .home-grid,
  .detail-layout,
  .account-layout,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .product-grid.wide,
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .map-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  main,
  .site-footer,
  .topbar {
    width: min(calc(100% - 22px), 1280px);
  }

  .brand {
    font-size: 20px;
  }

  .brand-script {
    font-size: 30px;
  }

  .brand-rest {
    font-size: 20px;
  }

  .area-dot {
    display: none;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero::before {
    background: url("/assets/images/fixone-parts-old-street.jpg") center center / cover no-repeat;
  }

  .hero::after {
    background: linear-gradient(
      180deg,
      rgba(255, 253, 248, 0.94) 0%,
      rgba(255, 253, 248, 0.82) 34%,
      rgba(255, 253, 248, 0.42) 56%,
      rgba(255, 253, 248, 0.1) 74%,
      rgba(255, 253, 248, 0) 100%
    );
  }

  .hero-copy {
    padding: 34px 22px 24px;
  }

  .hero-image {
    min-height: 230px;
    background-position: center bottom;
  }

  .hero-search,
  .inline-search,
  .page-hero,
  .site-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-search input {
    flex: 0 0 auto;
    max-width: none;
  }

  .category-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: -38px;
  }

  .home-grid,
  .auth-layout,
  .shop-profile {
    grid-template-columns: 1fr;
  }

  .product-grid.wide,
  .product-grid,
  .shop-grid,
  .shop-grid.compact,
  .service-grid,
  .wanted-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .local-band {
    grid-template-columns: 1fr;
  }

  .map-teaser {
    grid-template-columns: 1fr;
  }

  .account-hero-actions,
  .account-nav {
    width: 100%;
  }

  .account-hero-actions .button,
  .account-nav a {
    flex: 1 1 auto;
  }

  .form-grid-two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  html,
  body {
    overflow-x: clip;
  }

  main,
  .site-footer,
  .topbar {
    width: calc(100% - 22px);
    max-width: none;
    min-width: 0;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .brand {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
  }

  .nav-toggle {
    justify-self: end;
  }

  .site-nav,
  .header-actions {
    grid-column: 1 / -1;
  }

  .brand-script {
    font-size: 28px;
  }

  .brand-rest {
    font-size: 18px;
  }

  .header-actions .button {
    width: 100%;
    min-width: 0;
  }

  .header-actions {
    margin-left: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    justify-content: stretch;
  }

  .header-actions .inline-form {
    width: 100%;
    min-width: 0;
  }

  .header-actions .button.primary {
    grid-column: 1 / -1;
  }

  .auth-layout,
  .auth-panel,
  .stack-form,
  .form-block,
  .wizard-panel,
  .merchant-entry-card {
    min-width: 0;
  }

  .auth-panel input,
  .auth-panel select,
  .auth-panel textarea,
  .stack-form input,
  .stack-form select,
  .stack-form textarea {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
  }

  .account-stats article {
    min-width: calc(50% - 5px);
  }

  .account-mini-list a {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 30px;
  }

  .category-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 10px 6px;
  }

  .category-pill {
    gap: 6px;
    padding: 8px 2px;
  }

  .category-icon {
    width: min(76px, calc((100vw - 66px) / 4));
    height: min(76px, calc((100vw - 66px) / 4));
  }

  .category-pill strong {
    font-size: 14px;
  }

  .product-grid.wide,
  .product-grid,
  .shop-grid,
  .shop-grid.compact,
  .service-grid,
  .wanted-board,
  .service-mini-grid {
    grid-template-columns: 1fr;
  }

  .bridge-card {
    grid-template-columns: 1fr;
  }

  .detail-media img {
    min-height: 260px;
  }

  .detail-list,
  .service-meta {
    grid-template-columns: 1fr;
  }

  .map-shell,
  .map-canvas {
    min-height: 430px;
    height: 430px;
  }
}

/* Mobile-first shop onboarding */
.merchant-entry-grid,
.merchant-progress-list,
.progress-board,
.admin-review-list {
  display: grid;
  gap: 14px;
  margin: 18px 0;
}

.merchant-entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.merchant-entry-card,
.merchant-entry-note,
.wizard-panel,
.progress-card,
.admin-review-card,
.shop-intro,
.legacy-entry {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.merchant-entry-card { padding: 22px; }
.merchant-entry-card h2, .merchant-entry-card p { margin: 0 0 10px; }
.entry-kicker, .preview-label { color: var(--teal-700); font-weight: 850; }
.primary-entry { border-color: #9bcbbf; background: linear-gradient(135deg, #f5fcf6 0%, #fffaf1 100%); }

.merchant-entry-note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 18px 0;
  padding: 14px 16px;
  color: var(--teal-900);
}
.merchant-entry-note span { color: var(--muted); }
.merchant-entry-note a { margin-left: auto; color: var(--teal-800); font-weight: 850; }

.merchant-progress-list article {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}
.merchant-progress-list img { width: 74px; height: 58px; border-radius: 6px; object-fit: cover; }
.merchant-progress-list p { margin: 4px 0 0; }
.legacy-entry { margin: 20px 0; padding: 16px; }
.legacy-entry summary, .legacy-auth summary { color: var(--teal-800); font-weight: 850; cursor: pointer; }

.wizard-header { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 20px 0 12px; }
.wizard-header h1, .wizard-header p { margin: 0 0 6px; }
.wizard-steps { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: thin; }
.wizard-steps a { display: grid; grid-template-columns: 28px max-content; align-items: center; gap: 6px; flex: 0 0 auto; min-height: 44px; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: white; color: var(--muted); font-size: 14px; }
.wizard-steps span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #edf0ed; font-weight: 850; }
.wizard-steps a.active { border-color: var(--teal-800); background: var(--teal-100); color: var(--teal-900); }
.wizard-steps a.active span, .wizard-steps a.done span { color: white; background: var(--teal-800); }
.wizard-panel { margin: 4px 0 28px; padding: 20px; }
.review-issues { margin: 0 0 14px; padding: 14px; border: 1px solid #ffd0a6; border-radius: var(--radius); background: #fff4e8; color: #8a3c08; }
.review-issues p { margin: 6px 0 0; }

.choice-grid, .tag-check-grid, .weekday-row, .quick-state-actions, .review-actions, .wizard-actions, .preview-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice-card { display: flex !important; align-items: flex-start; gap: 8px; min-height: 88px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.choice-card input, .tag-check-grid input, .weekday-row input, .check-row input { width: auto; min-height: auto; }
.choice-card span, .choice-card small { display: block; }
.choice-card small { margin-top: 5px; color: var(--muted); font-weight: 500; }
.tag-check-grid label, .weekday-row label { display: inline-flex !important; align-items: center; min-height: 40px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.wizard-actions { justify-content: space-between; margin-top: 20px; }
.wizard-actions form { margin: 0; }

.upload-zone { display: grid !important; place-items: center; min-height: 112px; border: 1px dashed #78aa9d; border-radius: var(--radius); background: #f5fbf8; color: var(--teal-800) !important; text-align: center; cursor: pointer; }
.upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-zone.is-compressing span::after { content: "，正在压缩…"; }
.cover-preview { margin-top: 12px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: #edf0ed; }
.cover-preview img, .preview-cover { width: 100%; height: 100%; object-fit: cover; }
.interior-preview, .media-sort-grid, .preview-media, .shop-interior-gallery, .review-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.interior-preview img, .media-sort-grid img, .preview-media img, .shop-interior-gallery img, .review-gallery img { width: 100%; aspect-ratio: 1; border-radius: 6px; object-fit: cover; }
.media-sort-grid article { position: relative; display: grid; gap: 5px; padding: 5px; border: 1px solid var(--line); border-radius: 6px; background: white; cursor: grab; }
.media-sort-grid article.is-dragging { opacity: 0.45; }
.media-sort-grid span { font-size: 12px; color: var(--muted); text-align: center; }
.icon-button { width: 100%; min-height: 32px; border: 0; border-radius: 5px; cursor: pointer; }
.danger-icon { color: #9b2016; background: #fff0ee; }
.media-order-form { margin-top: 10px; }

.listing-image-uploader { margin-top: 8px; }
.listing-image-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; color: var(--teal-900); }
.listing-image-toolbar span { color: var(--muted); font-size: 13px; }
.listing-image-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.listing-image-card, .listing-image-add { position: relative; aspect-ratio: 1; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #f7faf5; }
.listing-image-card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.listing-image-add { display: grid; place-items: center; align-content: center; gap: 3px; border: 1px dashed #7ca99d; color: var(--teal-800); cursor: pointer; }
.listing-image-add span { font-size: 34px; line-height: 1; font-weight: 350; }
.listing-image-add small { font-size: 12px; }
.listing-image-add input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.image-cover-label { position: absolute; left: 5px; bottom: 5px; padding: 2px 5px; border-radius: 4px; background: rgba(11, 91, 77, 0.9); color: white; font-size: 11px; line-height: 1.2; }
.image-remove-button { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: rgba(28, 31, 28, 0.72); color: white; font-size: 18px; line-height: 1; cursor: pointer; }
.listing-image-help, .listing-image-message { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.listing-image-message { min-height: 18px; color: #9a4d0a; }

.listing-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.listing-gallery img { display: block; width: 100%; aspect-ratio: 1; border-radius: 8px; object-fit: cover; background: #edf1ed; }
.listing-gallery .listing-gallery-cover { grid-column: span 2; grid-row: span 2; }

.map-search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
.map-search-row input { min-width: 0; }
.location-picker { height: 300px; margin-top: 10px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); }
.location-results { display: grid; gap: 6px; margin-top: 8px; }
.location-results button { padding: 9px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--teal-800); text-align: left; cursor: pointer; }
.credential-list { display: grid; gap: 7px; padding: 12px; border-radius: 6px; background: #f5f8f5; }
.credential-list a { color: var(--teal-800); font-size: 14px; overflow-wrap: anywhere; }

.customer-preview { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.customer-preview .preview-label, .customer-preview .preview-body { display: block; padding: 14px; }
.preview-cover { display: block; aspect-ratio: 16 / 9; }
.preview-body h2, .preview-body p { margin: 0 0 10px; }

.progress-card { display: grid; grid-template-columns: 180px minmax(0, 1fr) minmax(160px, auto); gap: 16px; align-items: start; padding: 14px; }
.progress-card > img { width: 100%; aspect-ratio: 16 / 10; border-radius: 6px; object-fit: cover; }
.progress-card h2, .progress-card p { margin: 6px 0; }
.progress-actions { display: grid; gap: 8px; }
.status-chip { display: inline-block; padding: 4px 8px; border-radius: 999px; background: #edf0ed; color: #46615a; font-size: 13px; font-weight: 850; }
.status-chip.pending { color: #975d00; background: #fff2c9; }
.status-chip.approved { color: #136a38; background: #eaf8ed; }
.status-chip.changes_requested { color: #a34a08; background: #fff0df; }
.status-chip.rejected, .status-chip.suspended { color: #991b1b; background: #feeceb; }

.admin-review-nav { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.admin-review-nav a { padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: white; color: var(--teal-800); font-weight: 800; }
.admin-review-card { display: grid; grid-template-columns: minmax(180px, 0.7fr) minmax(250px, 1fr) minmax(230px, 0.8fr); gap: 16px; padding: 16px; }
.review-media > img { width: 100%; aspect-ratio: 16 / 10; border-radius: 6px; object-fit: cover; }
.review-details h2, .review-details p { margin: 7px 0; }
.review-form textarea { width: 100%; min-height: 90px; padding: 10px 12px; border: 1px solid #d7d2c8; border-radius: var(--radius); resize: vertical; }
.review-form select[multiple] { min-height: 120px; }

.shop-intro { display: grid; gap: 16px; margin: 22px 0; padding: 18px; }
.shop-intro h2, .shop-intro p { margin: 0 0 8px; }
.legacy-auth { margin-top: 14px; }
.legacy-auth form { margin-top: 12px; }
.wechat-login-button { width: 100%; min-height: 54px; }
.dev-login-form { margin-top: 14px; }
.autosave-status { display: block; color: var(--muted); text-align: right; }
.shop-switcher { display: grid; gap: 7px; margin: 0 0 16px; color: var(--teal-800); font-weight: 800; }
.shop-switcher select { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); background: white; color: var(--text); }
.duplicate-shop-note { grid-column: 1 / -1; margin: 0; padding: 10px 12px; border: 1px solid #f1cf8a; border-radius: 6px; background: #fff8e8; }
.duplicate-shop-note p { margin: 6px 0; }

.login-prompt { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.login-prompt-backdrop { position: absolute; inset: 0; background: rgba(4, 63, 57, 0.42); backdrop-filter: blur(3px); }
.login-prompt-card { position: relative; z-index: 1; width: min(100%, 390px); padding: 28px 22px 22px; border: 1px solid #dfe7df; border-radius: 8px; background: #fffdf8; box-shadow: 0 24px 70px rgba(4, 63, 57, 0.28); }
.login-prompt-card h2 { margin: 4px 0 8px; color: var(--teal-900); font-size: 28px; }
.login-prompt-card .muted { margin: 0 0 20px; line-height: 1.6; }
.login-prompt-close { position: absolute; top: 10px; right: 10px; display: grid; width: 36px; height: 36px; place-items: center; border: 0; border-radius: 50%; background: #f1f3ee; color: var(--teal-800); font-size: 24px; line-height: 1; cursor: pointer; }
.login-prompt-dev-form { margin: 0; }
.login-prompt-account-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.login-prompt-account-actions .button { width: 100%; min-width: 0; padding: 0 8px; }

.simple-auth-shell { display: grid; min-height: calc(100vh - 170px); place-items: start center; padding: 54px 0; }
.auth-main { width: 100%; }
.auth-page .simple-auth-shell { min-height: 100vh; place-items: center; padding: 30px 0; }
.simple-auth-card { width: min(100%, 420px); padding: 30px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, 0.95); box-shadow: var(--shadow); }
.simple-auth-card h1 { margin: 5px 0 8px; color: var(--teal-900); font-size: 30px; }
.simple-auth-card > .muted { margin: 0 0 22px; line-height: 1.6; }
.wechat-unavailable { margin: 0 0 16px; padding: 12px; border: 1px solid #ffd0c1; border-radius: 6px; background: #fff5ef; color: #b64b16; }
.simple-auth-details { margin-top: 14px; border-top: 1px solid var(--line); }
.simple-auth-details summary { padding: 16px 0; color: var(--teal-800); font-weight: 800; cursor: pointer; }
.simple-auth-details form { padding-bottom: 4px; }
.auth-switch { margin: 22px 0 0; color: var(--muted); text-align: center; }
.auth-switch a { color: var(--teal-800); font-weight: 850; }

@media (max-width: 860px) {
  .merchant-entry-grid, .choice-grid, .progress-card, .admin-review-card { grid-template-columns: 1fr; }
  .wizard-header { align-items: stretch; flex-direction: column; }
  .wizard-header .button, .wizard-actions .button, .wizard-actions form, .wizard-actions form .button, .progress-actions .button { width: 100%; }
  .wizard-actions { display: grid; grid-template-columns: 1fr; }
  .merchant-entry-note a { margin-left: 0; }
  .progress-card > img { max-height: 220px; }
}

@media (max-width: 560px) {
  .login-prompt { align-items: end; padding: 12px; }
  .login-prompt-card { width: 100%; padding: 26px 18px 20px; }
  .simple-auth-shell { min-height: calc(100vh - 140px); padding: 26px 0; }
  .simple-auth-card { padding: 24px 18px; }
  .wizard-panel, .merchant-entry-card, .admin-review-card { padding: 14px; }
  .form-grid-two, .map-search-row { grid-template-columns: 1fr; }
  .map-search-row .button { width: 100%; }
  .interior-preview, .media-sort-grid, .preview-media, .shop-interior-gallery, .review-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .merchant-progress-list article { grid-template-columns: 62px minmax(0, 1fr); }
  .merchant-progress-list article .button { grid-column: 1 / -1; width: 100%; }
}

/* Keep content clear of the fixed four-item navigation. */
body { padding-bottom: 82px; }

.topbar {
  flex-wrap: nowrap;
  min-height: 64px;
  padding: 0;
  gap: 14px;
}

.brand { flex: 0 0 auto; }

.top-search {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
  overflow: hidden;
  border: 1px solid #d9ded9;
  border-radius: 8px;
  background: #f5f6f1;
}

.top-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 12px;
  color: var(--text);
  font: inherit;
}

.top-search button {
  flex: 0 0 auto;
  min-width: 54px;
  border: 0;
  background: var(--orange);
  color: white;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.home-categories {
  margin: 16px 0 8px;
  box-shadow: 0 8px 24px rgba(12, 56, 49, 0.08);
}

.home-grid { margin-top: 4px; }

.flash {
  position: fixed;
  z-index: 80;
  top: 76px;
  left: 50%;
  width: min(440px, calc(100% - 32px));
  transform: translateX(-50%);
  box-shadow: var(--shadow);
}

.bottom-nav {
  position: fixed;
  z-index: 60;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 70px;
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.98);
  box-shadow: 0 -8px 24px rgba(12, 56, 49, 0.08);
  backdrop-filter: blur(12px);
}

.bottom-nav a {
  display: grid;
  min-width: 0;
  align-content: center;
  justify-items: center;
  gap: 2px;
  padding: 7px 4px 6px;
  color: #70807a;
  font-size: 12px;
}

.bottom-nav span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: inherit;
  font-size: 22px;
  line-height: 1;
}

.bottom-nav strong { font-size: 12px; }
.bottom-nav a.active { color: var(--teal-800); }
.bottom-nav a.active span {
  border-radius: 999px;
  background: var(--teal-100);
  color: var(--teal-800);
  font-weight: 900;
}

.mobile-feed-page {
  margin: 12px 0 32px;
}

.feed-heading {
  margin: 12px 0 12px;
}

.feed-heading h1 {
  margin: 0;
  color: var(--teal-900);
  font-size: 25px;
  line-height: 1.15;
}

.compact-feed-search {
  display: flex;
  width: min(260px, 54vw);
  height: 38px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.compact-feed-search input {
  min-width: 0;
  flex: 1 1 auto;
  border: 0;
  padding: 0 10px;
  font: inherit;
  outline: 0;
}

.compact-feed-search button {
  flex: 0 0 auto;
  border: 0;
  padding: 0 12px;
  background: var(--orange);
  color: white;
  font-weight: 800;
}

.compact-filter {
  margin: 0 0 12px;
}

.messages-page {
  max-width: 760px;
  margin: 20px auto 32px;
}

.messages-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 8px 0 18px;
}

.messages-heading h1 {
  margin: 0;
  color: var(--teal-900);
  font-size: 28px;
}

.messages-heading span { color: var(--muted); font-size: 14px; }

.message-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.message-shortcuts a {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  text-align: center;
}

.message-icon,
.message-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: white;
  font-weight: 900;
}

.message-icon { width: 44px; height: 44px; font-size: 20px; }
.message-icon.coral { background: #e76a55; }
.message-icon.teal { background: var(--teal-700); }
.message-icon.amber { background: #d78a25; }

.message-feed { margin-top: 4px; }

.message-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 16px 2px;
  border-bottom: 1px solid var(--line);
}

.message-avatar { width: 42px; height: 42px; font-size: 15px; }
.message-avatar.platform { background: var(--teal-800); }
.message-avatar.review { background: #428a68; }
.message-avatar.wanted { background: var(--orange); }
.message-row h2 { margin: 1px 0 5px; color: var(--text); font-size: 16px; }
.message-row p { margin: 0; color: #5f6d68; font-size: 14px; line-height: 1.55; }
.message-row time { max-width: 82px; color: #98a29e; font-size: 12px; text-align: right; }

.message-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding: 14px 0;
  color: var(--muted);
}

.message-empty a { color: var(--teal-800); font-size: 14px; font-weight: 800; }

.chat-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf7;
}

.chat-shell.list-only {
  grid-template-columns: 1fr;
  min-height: 0;
}

.chat-list {
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: #fbf6ea;
}

.chat-shell.list-only .chat-list {
  border-right: 0;
}

.chat-thread {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid rgba(32, 70, 58, 0.1);
  color: var(--text);
}

.chat-thread.active { background: #edf7ef; }
.chat-section-title {
  margin: 10px 12px 6px;
  color: var(--teal-800);
  font-size: 13px;
  font-weight: 900;
}

.chat-back-line {
  display: inline-flex;
  margin: 10px 12px 4px;
  color: var(--teal-800);
  font-size: 13px;
  font-weight: 900;
}

.product-thread strong {
  font-size: 18px;
}

.customer-thread strong {
  font-size: 16px;
}

.chat-thread img,
.chat-target img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 6px;
  background: #efe7d7;
}

.chat-thread span,
.chat-target span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.chat-thread strong,
.chat-target strong {
  overflow: hidden;
  color: var(--teal-900);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-thread small,
.chat-target small {
  overflow: hidden;
  color: #60706b;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-thread em {
  overflow: hidden;
  color: #8a928e;
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-thread time {
  align-self: start;
  color: #9da6a1;
  font-size: 11px;
}

.chat-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  background: #fffaf0;
}

.chat-panel-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fffdf7;
}

.chat-target {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: var(--text);
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 14px;
}

.chat-time-separator {
  align-self: center;
  margin: 4px 0 2px;
  padding: 2px 8px;
  border-radius: 999px;
  color: #9aa39f;
  font-size: 12px;
  line-height: 1.6;
}

.chat-bubble-row {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  align-items: flex-end;
}

.chat-bubble-row.mine {
  justify-content: flex-end;
}

.chat-message-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--teal-700);
  color: white;
  font-size: 14px;
  font-weight: 900;
}

.chat-message-avatar.mine-avatar {
  background: var(--orange);
}

.chat-bubble {
  max-width: min(76%, 420px);
  padding: 9px 11px;
  border: 1px solid #e7dcc8;
  border-radius: 8px;
  background: white;
  color: var(--text);
}

.chat-bubble-row.mine .chat-bubble {
  border-color: #ffb184;
  background: #fff1e7;
}

.chat-bubble p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: #fffdf7;
}

.chat-compose textarea {
  min-height: 44px;
  max-height: 120px;
  resize: vertical;
}

.message-system-details {
  margin-top: 14px;
  padding: 0 2px;
}

.message-system-details summary {
  cursor: pointer;
  color: var(--teal-800);
  font-weight: 800;
}

.chat-empty-main {
  margin: auto;
  padding: 20px;
}

.chat-shell:has(.chat-empty-main) {
  grid-template-columns: 1fr;
}

.chat-shell:has(.chat-empty-main) .chat-list {
  border-right: 0;
}

.chat-shell:has(.chat-empty-main) .chat-panel {
  min-height: 120px;
}

@media (max-width: 860px) {
  .site-footer { display: none; }
}

@media (max-width: 560px) {
  body { padding-bottom: 78px; }

  .login-prompt-card {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
  }

  .login-prompt-account-actions { grid-template-columns: 1fr; }

  .topbar {
    display: flex;
    grid-template-columns: none;
    width: calc(100% - 20px);
    min-height: 58px;
    gap: 8px;
  }

  .brand-script { font-size: 23px; }
  .brand-rest { margin-left: 3px; font-size: 16px; }
  .top-search { height: 38px; }
  .top-search input { padding: 0 8px; font-size: 13px; }
  .top-search button { min-width: 46px; padding: 0 6px; font-size: 13px; }

  .home-categories {
    margin: 12px 0 6px;
    padding: 8px 4px;
    box-shadow: 0 6px 18px rgba(12, 56, 49, 0.06);
  }

  .category-pill { gap: 4px; padding: 7px 1px; }
  .category-icon {
    width: min(64px, calc((100vw - 56px) / 4));
    height: min(64px, calc((100vw - 56px) / 4));
  }
  .category-pill strong { font-size: 12px; }

  .messages-page { margin: 14px auto 22px; }
  .messages-heading { margin: 6px 0 16px; }
  .messages-heading h1 { font-size: 25px; }
  .chat-shell {
    grid-template-columns: 1fr;
    min-height: 0;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }
  .chat-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .chat-shell.list-only .chat-list {
    display: grid;
    gap: 0;
    overflow-x: visible;
    padding: 0;
  }
  .chat-thread {
    grid-template-columns: 40px minmax(118px, 1fr);
    flex: 0 0 190px;
    padding: 8px;
    border: 1px solid rgba(32, 70, 58, 0.1);
    border-radius: 8px;
    background: #fffdf7;
  }
  .chat-shell.list-only .chat-thread {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    flex: none;
    padding: 12px 10px;
    border: 0;
    border-bottom: 1px solid rgba(32, 70, 58, 0.1);
    border-radius: 0;
  }
  .chat-thread.active { background: #edf7ef; }
  .chat-thread img,
  .chat-target img { width: 40px; height: 40px; }
  .chat-thread time { display: none; }
  .chat-panel { min-height: calc(100vh - 172px); }
  .chat-panel-head { padding: 10px; }
  .chat-messages { padding: 12px 10px; }
  .chat-bubble { max-width: 84%; }
  .chat-compose {
    position: sticky;
    bottom: 61px;
    grid-template-columns: minmax(0, 1fr) 64px;
    padding: 8px;
  }
  .chat-compose .button { min-height: 44px; padding: 0 10px; }
  .message-row { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; padding: 15px 0; }
  .message-avatar { width: 40px; height: 40px; }
  .message-row h2 { font-size: 15px; }
  .message-row p { font-size: 13px; }
  .message-row time { max-width: 58px; font-size: 11px; }

  .bottom-nav {
    min-height: 60px;
  }

  .bottom-nav a {
    padding: 5px 4px 4px;
    font-size: 11px;
  }

  .bottom-nav span {
    width: 22px;
    height: 22px;
    font-size: 15px;
  }

  .bottom-nav strong {
    font-size: 11px;
  }

  .mobile-feed-page {
    margin: 8px 0 20px;
  }

  .feed-heading {
    gap: 10px;
    margin: 8px 0 10px;
  }

  .feed-heading h1 {
    font-size: 22px;
  }

  .compact-feed-search {
    width: min(230px, 58vw);
    height: 34px;
  }

  .compact-feed-search input {
    padding: 0 8px;
    font-size: 13px;
  }

  .compact-feed-search button {
    padding: 0 9px;
    font-size: 13px;
  }

  .compact-filter {
    gap: 6px;
    margin-bottom: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .feed-grid.product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 8px;
  }

  .feed-shop-grid.shop-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .feed-shop-grid .shop-card {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    min-height: 116px;
    border-radius: 7px;
  }

  .feed-shop-grid .shop-media {
    min-height: 116px;
    height: 100%;
  }

  .feed-shop-grid .shop-media img {
    height: 100%;
    min-height: 116px;
  }

  .feed-shop-grid .shop-content {
    min-width: 0;
    padding: 10px;
  }

  .feed-shop-grid .item-title-row {
    gap: 6px;
  }

  .feed-shop-grid .item-title-row h3 {
    font-size: 16px;
  }

  .feed-shop-grid .muted,
  .feed-shop-grid .shop-content p {
    margin: 5px 0;
    font-size: 12px;
    line-height: 1.4;
  }

  .feed-shop-grid .verify {
    min-height: 20px;
    padding: 0 6px;
    font-size: 11px;
  }

  .feed-shop-grid .delivery-note {
    margin-top: 6px;
    padding: 6px 8px;
    font-size: 12px;
  }

  .shopping-feed .feed-grid .item-card {
    display: block;
    min-width: 0;
    border-radius: 7px;
  }

  .shopping-feed .feed-grid .media-link {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f2eadb;
  }

  .shopping-feed .feed-grid .media-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .shopping-feed .feed-grid .item-body {
    min-width: 0;
    padding: 9px 9px 10px;
  }

  .shopping-feed .feed-grid .item-title-row {
    display: block;
  }

  .shopping-feed .feed-grid .item-title-row h3 {
    display: -webkit-box;
    min-height: 38px;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.28;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .shopping-feed .feed-grid .verify {
    min-height: 19px;
    margin-top: 6px;
    padding: 0 5px;
    font-size: 10px;
  }

  .shopping-feed .feed-grid .product-meta,
  .shopping-feed .feed-grid .tags {
    display: none;
  }

  .shopping-feed .feed-grid .price {
    margin-top: 7px;
    font-size: 18px;
    line-height: 1.1;
  }

  .shopping-feed .feed-grid .price small {
    font-size: 11px;
  }

  .shopping-feed .feed-grid .seller-meta {
    margin: 7px 0 0;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Account home: a compact mobile profile rather than a long management form. */
.account-home,
.account-subpage {
  width: min(100%, 760px);
  margin: 18px auto 34px;
}

.account-identity {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 40px;
  gap: 13px;
  align-items: center;
  padding: 8px 0 20px;
  border-bottom: 1px solid var(--line);
}

.account-avatar {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--teal-800);
  color: white;
  font-size: 27px;
  font-weight: 850;
}

.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-identity-copy { min-width: 0; }
.account-identity-copy h1 { margin: 0 0 6px; color: var(--teal-900); font-size: 25px; }
.account-identity-copy p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }

.account-settings-button,
.back-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: var(--teal-800);
  font-size: 21px;
  line-height: 1;
}

.merchant-entry-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0 6px;
  padding: 18px;
  border: 1px solid #cfe4dc;
  border-radius: var(--radius);
  background: #eff8f3;
}

.merchant-entry-band > div { min-width: 0; }
.merchant-entry-band h2 { margin: 2px 0 7px; color: var(--teal-900); font-size: 20px; }
.merchant-entry-band p:not(.eyebrow) { margin: 0; color: #557067; font-size: 14px; line-height: 1.55; }
.merchant-entry-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.merchant-entry-actions .button { min-width: 104px; }

.account-home-section { margin-top: 26px; }
.account-section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.account-section-title h2 { margin: 0; color: var(--teal-900); font-size: 18px; }

.account-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
}

.account-overview-grid a { display: grid; gap: 3px; padding: 17px 14px; }
.account-overview-grid a + a { border-left: 1px solid var(--line); }
.account-overview-grid strong { color: var(--teal-900); font-size: 26px; line-height: 1; }
.account-overview-grid span { color: var(--text); font-size: 15px; font-weight: 800; }
.account-overview-grid small { color: var(--muted); font-size: 12px; }

.account-menu-list { border-top: 1px solid var(--line); }
.account-menu-list > a {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

.account-menu-list > a > span:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.account-menu-list strong { color: var(--text); font-size: 15px; }
.account-menu-list small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-list b { color: #9aa6a1; font-size: 24px; font-weight: 400; }

.account-menu-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 850;
}

.account-menu-mark.orange { color: #aa4c10; background: #fff0e5; }
.account-menu-mark.green { color: #276e45; background: #eaf7dc; }
.account-menu-mark.teal { color: var(--teal-800); background: var(--teal-100); }
.account-menu-mark.amber { color: #955b00; background: #fff2cf; }
.account-menu-mark.stone { color: #58645f; background: #eff1ed; }

.account-local-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.account-local-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 8px 24px rgba(22, 50, 45, 0.05);
}

.account-local-card.runner {
  display: grid;
  gap: 6px;
  align-content: center;
  min-height: 112px;
  padding: 14px;
  background: linear-gradient(135deg, #fff7e9 0%, #eef8ef 100%);
}

.account-local-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--orange);
  color: white;
  font-weight: 900;
}

.account-local-card strong {
  color: var(--teal-900);
  font-size: 16px;
}

.account-local-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.account-local-card.scenic {
  display: grid;
  grid-template-rows: 72px auto;
}

.account-local-card.scenic img {
  width: 100%;
  height: 72px;
  object-fit: cover;
}

.account-local-card.scenic span {
  display: grid;
  gap: 3px;
  padding: 10px 12px 12px;
}

.account-logout-form { margin-top: 26px; }
.account-logout-form button {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: #7a3327;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.account-subpage-header {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 8px 0 22px;
}

.account-subpage-header h1 { margin: 0; color: var(--teal-900); font-size: 27px; }
.account-subpage-header .eyebrow { margin: 0 0 3px; }
.account-form-section { padding: 0 0 24px; margin: 0 0 24px; border-bottom: 1px solid var(--line); }
.account-form-section h2 { margin: 0 0 14px; color: var(--teal-900); font-size: 19px; }
.account-form-section .button { margin-top: 4px; }

.account-content-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.account-content-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 13px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.account-content-item > img,
.account-content-placeholder {
  width: 96px;
  height: 96px;
  border-radius: 7px;
  object-fit: cover;
}

.account-content-placeholder { display: grid; place-items: center; background: #eff1ed; color: var(--muted); font-size: 13px; }
.account-content-copy { display: grid; align-content: start; gap: 4px; min-width: 0; }
.account-content-copy h2,
.account-wanted-item h2 { overflow: hidden; margin: 0; color: var(--text); font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.account-content-copy p,
.account-wanted-item p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.account-content-copy > strong { color: var(--orange); font-size: 15px; }
.account-content-copy > small,
.account-wanted-item small { color: #98a29e; font-size: 12px; }
.account-content-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

.wanted-content-list { gap: 0; }
.account-wanted-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.account-wanted-item > div { display: grid; gap: 5px; min-width: 0; }
.account-wanted-actions { display: grid; justify-items: end; gap: 7px; }
.account-wanted-actions select { min-height: 34px; max-width: 110px; padding: 0 6px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--text); font: inherit; font-size: 12px; }

@media (max-width: 560px) {
  .account-home,
  .account-subpage { margin-top: 14px; }

  .account-identity { grid-template-columns: 60px minmax(0, 1fr) 36px; gap: 11px; padding-bottom: 17px; }
  .account-avatar { width: 60px; height: 60px; font-size: 24px; }
  .account-identity-copy h1 { font-size: 22px; }
  .account-settings-button,
  .back-icon { width: 36px; height: 36px; font-size: 19px; }

  .merchant-entry-band { display: grid; gap: 14px; padding: 16px; }
  .merchant-entry-band .button,
  .merchant-entry-actions { width: 100%; }
  .merchant-entry-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .merchant-entry-actions .button { min-width: 0; width: 100%; }

  .account-home-section { margin-top: 22px; }
  .account-menu-list > a { min-height: 64px; }
  .account-local-grid { gap: 8px; }
  .account-local-card.runner { min-height: 104px; padding: 12px; }
  .account-local-card.scenic { grid-template-rows: 64px auto; }
  .account-local-card.scenic img { height: 64px; }
  .account-local-card strong { font-size: 15px; }
  .account-local-card small { font-size: 11px; }
  .account-subpage-header { margin-bottom: 18px; }
  .account-subpage-header h1 { font-size: 24px; }
  .account-content-item { grid-template-columns: 82px minmax(0, 1fr); gap: 11px; }
  .account-content-item > img,
  .account-content-placeholder { width: 82px; height: 82px; }
  .account-wanted-item { grid-template-columns: 1fr; gap: 10px; }
  .account-wanted-actions { grid-template-columns: auto auto auto; justify-content: start; align-items: center; }
}

/* WeChat-style account details and explicit security subpages. */
.profile-data-sheet {
  margin: 0 0 26px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
}

.profile-avatar-row,
.profile-edit-row,
.profile-status-row {
  display: grid !important;
  grid-template-columns: minmax(96px, 0.7fr) minmax(0, 1.3fr);
  gap: 12px;
  align-items: center;
  min-height: 60px;
  margin: 0 !important;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 15px;
}

.profile-avatar-row { min-height: 84px; }
.profile-avatar-row > span:last-child,
.profile-status-row > span:last-child { justify-self: end; color: var(--muted); }
.profile-avatar-large {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--teal-800);
  color: white !important;
}

.profile-avatar-large img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-large b { font-size: 23px; }
.profile-edit-row input {
  width: 100%;
  min-height: 38px;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: right;
}

.profile-edit-row input::placeholder { color: #a0aaa5; }
.profile-status-row { border-bottom: 0; }
.profile-save-button { width: calc(100% - 24px); margin: 4px 12px 16px; }
.profile-wechat-section { margin-top: 0; }
.danger-mark { color: #9d3024; background: #fff0ee; }

.account-menu-list > form { margin: 0; border-bottom: 1px solid var(--line); }
.account-menu-button {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 68px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.account-menu-button > span:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.account-menu-button strong { color: var(--text); font-size: 15px; }
.account-menu-button small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-button b { color: #9aa6a1; font-size: 24px; font-weight: 400; }

@media (max-width: 560px) {
  .profile-avatar-row,
  .profile-edit-row,
  .profile-status-row { grid-template-columns: minmax(92px, 0.8fr) minmax(0, 1.2fr); }
  .account-menu-button { min-height: 64px; }
}

.merchant-start-page {
  width: min(100%, 620px);
  margin: 42px auto;
  padding: 6px 0 28px;
}

.merchant-start-page h1 { margin: 2px 0 10px; color: var(--teal-900); font-size: 32px; }
.merchant-start-page > p:not(.eyebrow) { max-width: 520px; margin: 0 0 22px; color: #5d6e67; line-height: 1.7; }

/* Store management keeps the same mobile page language as "我的". */
.merchant-dashboard-page {
  width: min(100%, 980px);
  margin: 18px auto 34px;
}

.merchant-dashboard-header {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 8px 0 18px;
}

.merchant-dashboard-header > div { min-width: 0; }
.merchant-dashboard-header .eyebrow { margin: 0 0 3px; }
.merchant-dashboard-header h1 {
  overflow: hidden;
  margin: 0;
  color: var(--teal-900);
  font-size: 27px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merchant-dashboard-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.merchant-dashboard-public-link {
  color: var(--teal-800);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.merchant-dashboard-grid { margin: 0; }
.merchant-dashboard-side > h2 { margin-top: 0; }
.merchant-dashboard-main > h2:first-child { margin-top: 0; }
.merchant-dashboard-main .product-form > .button.primary,
.merchant-dashboard-main > .dashboard-block .stack-form > .button.primary { width: 100%; }

.account-shop-list { display: grid; border-top: 1px solid var(--line); }
.account-shop-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.account-shop-item > img { width: 112px; height: 82px; border-radius: 7px; object-fit: cover; }
.account-shop-item > div { display: grid; align-content: start; gap: 5px; min-width: 0; }
.account-shop-item h2 { overflow: hidden; margin: 0; color: var(--teal-900); font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.account-shop-item p { margin: 0; color: var(--muted); font-size: 13px; }
.shop-delete-page .stack-form .button { width: 100%; }

.collaborator-invite-form,
.status-edit-form { display: flex; gap: 8px; align-items: center; }
.collaborator-invite-form input,
.status-edit-form input { min-width: 0; min-height: 38px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--text); font: inherit; }
.collaborator-invite-form input { flex: 1; }
.status-edit-form input { width: 110px; font-size: 13px; }
.collaborator-list { display: grid; gap: 0; margin-top: 12px; border-top: 1px solid var(--line); }
.collaborator-list > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; border-bottom: 1px solid var(--line); }
.collaborator-list span { display: grid; gap: 3px; min-width: 0; }
.collaborator-list small { color: var(--muted); font-size: 12px; }
.collaborator-list form { margin: 0; }

@media (max-width: 560px) {
  .merchant-start-page { margin: 26px auto; }
  .merchant-start-page h1 { font-size: 28px; }
  .merchant-dashboard-page { margin: 14px auto 24px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .merchant-dashboard-header { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; margin: 4px 0 14px; }
  .merchant-dashboard-header .back-icon { width: 36px; height: 36px; font-size: 19px; }
  .merchant-dashboard-header h1 { font-size: 23px; }
  .merchant-dashboard-subtitle { font-size: 12px; }
  .merchant-dashboard-public-link { font-size: 13px; }
  .merchant-dashboard-grid { gap: 12px; }
  .merchant-dashboard-side,
  .merchant-dashboard-main { padding: 16px; }
  .merchant-dashboard-side > h2,
  .merchant-dashboard-main h2 { font-size: 19px; }
  .merchant-dashboard-side > p { margin: 9px 0; line-height: 1.5; }
  .merchant-dashboard-side .dashboard-block { margin-top: 18px; padding-top: 16px; }
  .merchant-dashboard-side .dashboard-block h2 { margin-bottom: 10px; }
  .merchant-dashboard-side .quick-state-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .merchant-dashboard-side .quick-state-actions .button { width: 100%; min-width: 0; padding: 0 6px; }
  .merchant-dashboard-side #barcode { display: grid; gap: 8px; }
  .merchant-dashboard-side #barcode .button { width: 100%; }
  .merchant-dashboard-main .check-row { display: grid; gap: 10px; }
  .merchant-dashboard-main .table-wrap { max-width: 100%; }
  .merchant-dashboard-main table { min-width: 600px; }
  .account-shop-item { grid-template-columns: 92px minmax(0, 1fr); gap: 12px; }
  .account-shop-item > img { width: 92px; height: 72px; }
  .collaborator-invite-form { align-items: stretch; flex-direction: column; }
  .collaborator-invite-form .button { width: 100%; }
  .status-edit-form { flex-wrap: wrap; }
}

/* Phone portrait store management: controls and records are vertical cards, never desktop tables. */
.merchant-mobile-shortcuts { display: none; }

@media (max-width: 768px) {
  .merchant-dashboard-page {
    width: 100%;
    margin: 0 auto;
    padding: 14px 0 calc(22px + env(safe-area-inset-bottom));
  }

  .merchant-dashboard-header {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 10px;
    margin: 0 0 14px;
  }

  .merchant-dashboard-header .back-icon { width: 36px; height: 36px; font-size: 19px; }
  .merchant-dashboard-header h1 { font-size: 23px; }
  .merchant-dashboard-subtitle { font-size: 12px; }

  .merchant-mobile-shortcuts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 14px;
  }

  .merchant-mobile-shortcuts a {
    display: grid;
    min-height: 46px;
    place-items: center;
    border: 1px solid #cfe4dc;
    border-radius: 7px;
    background: #f1f8f3;
    color: var(--teal-800);
    font-size: 14px;
    font-weight: 800;
  }

  .merchant-dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .merchant-dashboard-side,
  .merchant-dashboard-main {
    width: 100%;
    padding: 16px;
  }

  .merchant-dashboard-side > h2,
  .merchant-dashboard-main h2 { font-size: 19px; }
  .merchant-dashboard-side > p { margin: 9px 0; line-height: 1.55; }
  .merchant-dashboard-side .dashboard-block { margin-top: 18px; padding-top: 16px; }
  .merchant-dashboard-side .quick-state-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .merchant-dashboard-side .quick-state-actions .button { width: 100%; min-width: 0; padding: 0 6px; }
  .merchant-dashboard-side #barcode { display: grid; gap: 8px; }
  .merchant-dashboard-side #barcode .button { width: 100%; }

  .merchant-dashboard-main {
    display: grid;
    gap: 16px;
  }

  .merchant-dashboard-main > h2,
  .merchant-dashboard-main > .form-error { margin: 0; }

  .merchant-dashboard-main .product-form,
  .merchant-dashboard-main > .dashboard-block,
  .merchant-dashboard-main .home-shop-dashboard {
    margin: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
  }

  .merchant-dashboard-main .form-grid-two,
  .merchant-dashboard-main .check-row { grid-template-columns: 1fr; }
  .merchant-dashboard-main .check-row { display: grid; gap: 10px; }
  .merchant-dashboard-main .button.primary { width: 100%; }

  .merchant-dashboard-main .table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .merchant-dashboard-main table,
  .merchant-dashboard-main table tbody {
    display: grid;
    min-width: 0;
    gap: 10px;
  }

  .merchant-dashboard-main table thead { display: none; }

  .merchant-dashboard-main table tr {
    display: grid;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fffefa;
  }

  .merchant-dashboard-main table td {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
    padding: 8px 0;
    border: 0;
    text-align: right;
  }

  .merchant-dashboard-main table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    text-align: left;
  }

  .merchant-dashboard-main table td > a,
  .merchant-dashboard-main table td > p { min-width: 0; }
  .merchant-dashboard-main table td > p { margin: 2px 0 0; }
  .merchant-dashboard-main table td .status-edit-form { justify-content: flex-end; }

  .merchant-dashboard-main table td.table-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
  }

  .merchant-dashboard-main table td.table-actions::before {
    flex: 1 0 100%;
    text-align: left;
  }
}

/* Business-space onboarding: large touch targets are intentionally mobile first. */
.business-mode-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.business-mode-card { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; min-height: 164px; padding: 18px; border: 1px solid #cddbd4; border-radius: 8px; background: #fffdf7; cursor: pointer; }
.business-mode-card input { position: absolute; opacity: 0; pointer-events: none; }
.business-mode-card:has(input:checked) { border: 2px solid var(--teal-700); background: #eff8f2; box-shadow: inset 0 0 0 2px #d8eee0; }
.business-mode-card .mode-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; background: #edf5eb; color: var(--teal-800); font-size: 25px; font-weight: 700; }
.business-mode-card strong, .business-mode-card small, .business-mode-card em { display: block; }
.business-mode-card strong { margin-bottom: 7px; color: var(--teal-900); font-size: 18px; }
.business-mode-card small { color: var(--text); line-height: 1.55; }
.business-mode-card em { margin-top: 8px; color: #a75b12; font-size: 12px; font-style: normal; line-height: 1.4; }
.wizard-step-count { margin: 5px 0 0; color: var(--muted); font-size: 13px; }

.category-choice-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.category-choice-grid label { display: grid; min-height: 92px; place-items: center; gap: 5px; padding: 9px 5px; border: 1px solid var(--line); border-radius: 7px; background: white; text-align: center; cursor: pointer; }
.category-choice-grid input { position: absolute; opacity: 0; pointer-events: none; }
.category-choice-grid label:has(input:checked) { border: 2px solid var(--teal-700); background: #eff8f2; color: var(--teal-900); }
.category-choice-grid img { width: 34px; height: 34px; object-fit: contain; }
.category-choice-grid span { font-size: 13px; line-height: 1.25; }

.shop-mode-filter, .publish-kind-tabs { display: flex; gap: 8px; margin: 0 auto 18px; overflow-x: auto; padding: 2px 0; }
.shop-mode-filter { width: min(1120px, calc(100% - 32px)); }
.shop-mode-filter a, .publish-kind-tabs a { flex: 0 0 auto; min-height: 38px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 20px; color: var(--teal-800); font-size: 14px; font-weight: 700; text-decoration: none; }
.shop-mode-filter a.active, .publish-kind-tabs a.active { border-color: var(--teal-700); background: var(--teal-800); color: white; }
.verify.neighbour, .shop-mode-label { color: #9a5b17; background: #fff0d8; }
.shop-mode-label { display: inline-block; margin: 0; padding: 4px 9px; border-radius: 4px; font-size: 13px; font-weight: 700; }

.home-shop-dashboard { margin-bottom: 18px; padding: 20px; border: 1px solid #c6dfd0; border-radius: 8px; background: #f2f8ee; }
.home-shop-dashboard h2 { margin: 3px 0 8px; color: var(--teal-900); }
.home-shop-dashboard-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.publish-choice-page { width: min(100%, 680px); margin: 0 auto; padding: 14px 0 calc(88px + env(safe-area-inset-bottom)); }
.publish-kind-tabs { margin-bottom: 14px; }
.publish-intent-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.publish-intent-tabs a { min-height: 54px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; text-align: center; }
.publish-name-price { grid-template-columns: minmax(0, 1.35fr) minmax(112px, 0.65fr); }
.content-review-card .review-media > img { aspect-ratio: 1 / 1; }

@media (max-width: 560px) {
  .publish-hero { padding: 18px 14px; }
  .publish-hero-copy { flex-wrap: nowrap; gap: 8px; }
  .publish-hero-copy h1 { flex: 0 0 auto; font-size: 28px; }
  .publish-hero-copy p { min-width: 0; font-size: 14px; line-height: 1.45; }
  .business-mode-cards { grid-template-columns: 1fr; }
  .publish-intent-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .publish-name-price { grid-template-columns: minmax(0, 1.35fr) minmax(100px, 0.65fr); }
  .business-mode-card { min-height: 132px; padding: 16px; }
  .category-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-choice-grid label { min-height: 76px; grid-template-columns: 34px minmax(0, 1fr); text-align: left; }
  .category-choice-grid img { width: 30px; height: 30px; }
  .shop-mode-filter { width: calc(100% - 20px); margin-bottom: 12px; }
  .home-shop-dashboard { padding: 16px; }
  .home-shop-dashboard-actions { display: grid; grid-template-columns: 1fr; }
  .home-shop-dashboard-actions .button { width: 100%; }
}

/* Public product browsing is separate from account and merchant editing pages. */
.product-view-page {
  width: min(100%, 980px);
  margin: 18px auto 36px;
}

.product-view-back {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin-bottom: 12px;
  color: var(--teal-800);
  font-weight: 800;
}

.product-view-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.86fr);
  gap: 16px;
  align-items: start;
}

.product-gallery-panel,
.product-summary-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
}

.product-gallery-strip {
  display: flex;
  width: 100%;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.product-gallery-strip figure {
  position: relative;
  flex: 0 0 100%;
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  scroll-snap-align: start;
  background: #111512;
}

.product-gallery-open {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.product-gallery-strip .product-gallery-open img {
  position: absolute;
  inset: 2%;
  display: block;
  width: 96%;
  height: 96%;
  min-height: 0;
  max-width: 96%;
  max-height: 96%;
  object-fit: contain;
}

.product-gallery-strip figure > span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  min-width: 44px;
  padding: 4px 8px;
  border-radius: 14px;
  background: rgba(19, 35, 30, 0.68);
  color: white;
  font-size: 12px;
  text-align: center;
}

.gallery-hint {
  margin: 0;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.product-image-dialog {
  width: min(96vw, 920px);
  max-width: none;
  height: min(92vh, 920px);
  max-height: none;
  padding: 48px 12px 12px;
  border: 0;
  border-radius: 8px;
  background: rgba(15, 20, 18, 0.96);
  overflow: hidden;
}

.product-image-dialog::backdrop { background: rgba(8, 12, 10, 0.82); }
.product-image-dialog[open] { display: grid; place-items: center; }
.product-image-dialog img { display: block; max-width: 100%; max-height: calc(92vh - 60px); object-fit: contain; }
.product-image-dialog-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: white;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.product-summary-card { padding: 20px; }
.product-title-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.product-title-line h1 { min-width: 0; margin: 0; color: var(--teal-900); font-size: 28px; line-height: 1.25; overflow-wrap: anywhere; }
.product-title-line .price { flex: 0 0 auto; margin: 0; font-size: 24px; line-height: 1; white-space: nowrap; }
.product-title-line .price small { font-size: 12px; }

.product-intro-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 13px 0 9px;
}
.product-intro-line .verify,
.product-intro-line .soft-badge { margin: 0; white-space: nowrap; }
.product-intro-line p { margin: 0; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }

.product-quick-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.product-quick-tags span {
  padding: 4px 8px;
  border-radius: 5px;
  background: #eef7f0;
  color: var(--teal-800);
  font-size: 12px;
  font-weight: 750;
}

.product-facts {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 9px 12px;
  margin: 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.product-facts dt { color: var(--muted); }
.product-facts dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }

.seller-strip {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--text);
}
.seller-strip > span:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.seller-strip small { color: var(--muted); }
.seller-strip b { color: #9aa6a1; font-size: 24px; font-weight: 400; }
.seller-avatar,
.comment-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--teal-800);
  color: white;
  font-weight: 850;
}
.seller-avatar { width: 42px; height: 42px; }
.seller-strip-static { grid-template-columns: 42px minmax(0, 1fr); }

.product-contact-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.product-contact-actions .button { width: 100%; min-width: 0; }

.comment-section {
  margin-top: 20px;
  padding: 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.64);
}
.comment-heading h2 { margin: 0 0 14px; color: var(--teal-900); font-size: 21px; }
.comment-heading h2 span { color: var(--muted); font-size: 14px; font-weight: 600; }
.comment-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.comment-form textarea {
  width: 100%;
  min-height: 76px;
  padding: 10px 12px;
  border: 1px solid #d7d2c8;
  border-radius: 7px;
  background: white;
  color: var(--text);
  font: inherit;
  resize: vertical;
}
.comment-form .button { min-width: 104px; }
.comment-login { display: grid; min-height: 46px; place-items: center; margin-bottom: 14px; border: 1px solid #cfe4dc; border-radius: 7px; color: var(--teal-800); font-weight: 800; }
.comment-list { display: grid; }
.comment-item { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.comment-item:last-child { border-bottom: 0; }
.comment-avatar { width: 38px; height: 38px; font-size: 14px; }
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-author { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.comment-author strong { color: var(--teal-900); font-size: 14px; }
.comment-author time { color: #98a29e; font-size: 11px; }
.comment-author > span { display: inline-flex; align-items: center; gap: 8px; }
.comment-delete-form { display: inline-flex; margin: 0; }
.comment-delete-form button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #a63a2b;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.comment-item p { margin: 7px 0 0; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-empty { margin: 0; padding: 22px 0 8px; color: var(--muted); text-align: center; }

.compact-report { margin: 14px 0 0; padding: 12px 2px; color: var(--muted); }
.compact-report summary { cursor: pointer; font-size: 13px; }
.compact-report .stack-form { margin-top: 12px; }

@media (max-width: 720px) {
  .product-view-page { margin: 8px auto 24px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .product-view-back { margin-bottom: 7px; }
  .product-view-layout { grid-template-columns: 1fr; gap: 10px; }
  .product-gallery-panel,
  .product-summary-card { border-radius: 7px; }
  .product-gallery-strip figure { height: 266px; aspect-ratio: auto; }
  .product-image-dialog { width: 100vw; height: 100dvh; padding: 54px 10px 10px; border-radius: 0; }
  .product-image-dialog img { max-height: calc(100dvh - 66px); }
  .product-summary-card { padding: 16px; }
  .product-title-line { gap: 10px; }
  .product-title-line h1 { font-size: 24px; }
  .product-title-line .price { font-size: 21px; }
  .product-title-line .price small { font-size: 11px; }
  .product-intro-line { gap: 8px; padding-top: 11px; }
  .product-intro-line p { font-size: 14px; }
  .comment-section { margin-top: 14px; padding: 16px 4px; }
  .comment-form { grid-template-columns: 1fr; }
  .comment-form .button { width: 100%; }
}
.brand-logo { width: 32px; height: 32px; border-radius: 6px; vertical-align: middle; margin-right: 8px; object-fit: cover; }

/* 卡片hover动效 */
.item-card, .shop-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.item-card:hover, .shop-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(10, 106, 95, 0.15);
}
.item-card:hover .item-title-row h3 a, .shop-card:hover .item-title-row h3 a {
  color: #0a6a5f;
}

/* 图片懒加载骨架屏 */
.media-link img, .shop-media img, .product-gallery-strip img {
  background: linear-gradient(90deg, #f0ebe0 25%, #f7f3ea 50%, #f0ebe0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}
.media-link img[src], .shop-media img[src], .product-gallery-strip img[src] {
  animation: none;
  background: #f2eadb;
}
@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== 暗色模式 ===== */
@media (prefers-color-scheme: dark) {
  body:not([data-theme]):not([data-theme="light"]) {
  :root {
    --teal-900: #e6f4ee;
    --teal-800: #b8dfd4;
    --teal-700: #8fc9b8;
    --teal-100: #1a3a35;
    --line: #2a3a37;
  }
  body {
    background: linear-gradient(180deg, #0d1f1c 0, #112a26 260px, #0a1a18 100%);
    color: #e0e8e5;
  }
  .item-card, .shop-card, .product-summary-card, .product-gallery-panel, .empty-state, .error-card, .shop-profile {
    background: rgba(20, 40, 37, 0.92) !important;
    border-color: #2a3a37 !important;
  }
  .muted, .product-facts dt, .seller-strip small { color: #8a9a96 !important; }
  .site-header { background: rgba(13, 31, 28, 0.95) !important; }
  .bottom-nav { background: #0d1f1c !important; border-color: #2a3a37 !important; }
  .button.outline { border-color: #3a5a55 !important; color: #b8dfd4 !important; }
  .button.light { background: #1a3a35 !important; color: #b8dfd4 !important; }
  input, textarea, select { background: #112a26 !important; border-color: #2a3a37 !important; color: #e0e8e5 !important; }
  .price { color: #f5c842 !important; }
  .verify { background: #1a3a35 !important; color: #8fc9b8 !important; }
  .verify.neighbour { background: #3a2a1a !important; color: #f5c842 !important; }
  .site-footer { color: #6a7a77 !important; }
  img { filter: brightness(0.92); }
}

/* 手动深色模式 */
html[data-theme="dark"] {
  --teal-900: #e6f4ee;
  --teal-800: #b8dfd4;
  --teal-700: #8fc9b8;
  --teal-100: #1a3a35;
  --line: #2a3a37;
  background: linear-gradient(180deg, #0d1f1c 0, #112a26 260px, #0a1a18 100%) !important;
  color: #e0e8e5;
}
html[data-theme="dark"] .item-card,
html[data-theme="dark"] .shop-card,
html[data-theme="dark"] .product-summary-card,
html[data-theme="dark"] .product-gallery-panel,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .error-card,
html[data-theme="dark"] .shop-profile {
  background: rgba(20, 40, 37, 0.92) !important;
  border-color: #2a3a37 !important;
}
html[data-theme="dark"] .muted,
html[data-theme="dark"] .product-facts dt,
html[data-theme="dark"] .seller-strip small { color: #8a9a96 !important; }
html[data-theme="dark"] .site-header { background: rgba(13, 31, 28, 0.95) !important; }
html[data-theme="dark"] .bottom-nav { background: #0d1f1c !important; border-color: #2a3a37 !important; }
html[data-theme="dark"] .button.outline { border-color: #3a5a55 !important; color: #b8dfd4 !important; }
html[data-theme="dark"] .button.light { background: #1a3a35 !important; color: #b8dfd4 !important; }
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select { background: #112a26 !important; border-color: #2a3a37 !important; color: #e0e8e5 !important; }
html[data-theme="dark"] .price { color: #f5c842 !important; }
html[data-theme="dark"] .verify { background: #1a3a35 !important; color: #8fc9b8 !important; }
html[data-theme="dark"] .verify.neighbour { background: #3a2a1a !important; color: #f5c842 !important; }
html[data-theme="dark"] .site-footer { color: #6a7a77 !important; }
html[data-theme="dark"] img { filter: brightness(0.92); }

/* 手动浅色模式（覆盖系统深色） */
html[data-theme="light"] {
  --teal-900: #043f39;
  --teal-800: #07564d;
  --teal-700: #0a6a5f;
  --teal-100: #e6f4ee;
  --line: #e6e1d7;
  background: linear-gradient(180deg, #fffaf0 0, #fffdf8 260px, #f6f2e8 100%) !important;
  color: inherit;
}
html[data-theme="light"] img { filter: none; }

/* 主题切换器 */
.theme-switcher {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 16px 16px;
}
.theme-option {
  cursor: pointer;
}
.theme-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.theme-option-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  transition: all 0.2s ease;
}
.theme-option input:checked + .theme-option-inner {
  border-color: var(--teal-700);
  background: var(--teal-100);
}
.theme-option:hover .theme-option-inner {
  border-color: var(--teal-700);
}
.theme-icon { font-size: 24px; }
.theme-label { font-size: 13px; font-weight: 600; color: var(--teal-900); }
html[data-theme="dark"] .theme-option-inner { background: #1a3a35; border-color: #2a3a37; }
html[data-theme="dark"] .theme-option input:checked + .theme-option-inner { background: #0d8a78; border-color: #8fc9b8; }
