:root {
  --ink: #17231c;
  --muted: #68756d;
  --line: #dfe7df;
  --paper: #fbfdf8;
  --soft: #eef6ed;
  --green: #1f6b43;
  --green-2: #2e7d50;
  --gold: #b78b25;
  --red: #b94b43;
  --white: #ffffff;
  --shadow: 0 20px 60px rgba(23, 35, 28, 0.12);
  --radius: 8px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

body.modal-open { overflow: hidden; }

body[data-page="ai-assistant"] {
  height: 100dvh;
  overflow: hidden;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }

#siteHeader {
  display: block;
  min-height: 80px;
}

#siteFooter {
  display: block;
  min-height: 96px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  min-height: 72px;
  padding: 12px clamp(20px, 4vw, 64px);
  background: rgba(251, 253, 248, 0.94);
  border-bottom: 1px solid rgba(31, 107, 67, 0.12);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #fff;
  background: var(--green);
  border-radius: 50%;
  font-weight: 800;
}

.brand-copy strong { display: block; font-size: 18px; line-height: 1.1; }
.brand-copy small { color: var(--muted); font-size: 12px; }

.nav-links {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 3vw, 34px);
  color: #415047;
  font-size: 15px;
}

.nav-links a.active,
.nav-links a:hover { color: var(--green); }

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.icon-action,
.member-entry,
.text-action,
.primary-action,
.ghost-action,
.danger-action {
  border-radius: 999px;
  border: 1px solid transparent;
  min-height: 42px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.primary-action {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.primary-action:hover { background: #185735; }

.ghost-action,
.text-action,
.icon-action,
.member-entry {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

.danger-action {
  color: var(--red);
  background: #fff;
  border-color: rgba(185, 75, 67, 0.28);
}

.icon-action #cartCount {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--green);
  border-radius: 999px;
  font-size: 12px;
}

.primary-action:active,
.ghost-action:active,
.text-action:active,
.danger-action:active { transform: translateY(1px); }

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  display: grid;
  align-items: end;
  padding: clamp(96px, 12vw, 150px) clamp(22px, 6vw, 84px);
  color: #fff;
}

.hero-media,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media { object-fit: cover; }

.hero-shade {
  background:
    linear-gradient(90deg, rgba(15, 38, 24, 0.82), rgba(15, 38, 24, 0.5) 44%, rgba(15, 38, 24, 0.12)),
    linear-gradient(0deg, rgba(15, 38, 24, 0.42), transparent 54%);
}

.hero-copy {
  position: relative;
  max-width: min(760px, 100%);
  min-width: 0;
}

.overline,
.section-title span,
.page-hero span,
.about-lead span {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin: 16px 0 18px;
  font-size: clamp(48px, 8vw, 94px);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero p {
  max-width: 680px;
  margin: 0;
  font-size: 19px;
  color: rgba(255, 255, 255, 0.86);
  overflow-wrap: anywhere;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.mall-hero {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: clamp(24px, 6vw, 80px);
  align-items: end;
}

.hero-search {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px;
  width: min(640px, 100%);
  margin-top: 26px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  min-width: 0;
}

.hero-search input {
  min-height: 44px;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.hero-search input:focus { box-shadow: none; }

.hero-shop-card {
  position: relative;
  z-index: 1;
  align-self: end;
  padding: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: var(--radius);
  max-width: 100%;
  min-width: 0;
}

.hero-shop-card > span {
  color: var(--green);
  font-weight: 800;
}

.hero-featured-link {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.hero-featured-link img {
  width: 100%;
  aspect-ratio: 1.08;
  object-fit: cover;
  background: var(--soft);
  border-radius: var(--radius);
}

.hero-featured-link strong { font-size: 18px; line-height: 1.35; }
.hero-featured-link span { color: var(--green); font-size: 24px; font-weight: 900; }

.band,
.page-shell {
  width: calc(100% - 40px);
  max-width: 1180px;
  margin: 0 auto;
}

.band { padding: 72px 0; }

.page-shell { padding: 38px 0 84px; }

.section-title {
  max-width: 680px;
  margin-bottom: 28px;
}

.section-title.with-action {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  max-width: none;
}

.section-title h2,
.page-hero h1,
.about-lead h1 {
  margin: 8px 0 0;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.14;
}

.text-link {
  color: var(--green);
  font-weight: 700;
}

.promise-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.promise-grid article,
.article-card,
.product-card,
.panel,
.order-card,
.address-card,
.about-cards article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(23, 35, 28, 0.06);
}

.promise-grid article {
  padding: 24px;
}

.promise-grid strong { color: var(--green); font-size: 22px; }
.promise-grid p { color: var(--muted); margin: 10px 0 0; }

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

.category-chip-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.category-chip {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.category-chip img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  background: var(--soft);
  border-radius: var(--radius);
}

.category-chip strong { display: block; }
.category-chip small { color: var(--muted); }

.shelf {
  padding: 42px 0;
  border-top: 1px solid var(--line);
}

.shelf:first-child { padding-top: 0; border-top: 0; }

.service-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.service-band article {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.service-band span { color: var(--gold); font-weight: 800; }
.service-band strong { display: block; margin-top: 8px; font-size: 21px; line-height: 1.3; }
.service-band p { margin: 10px 0 0; color: var(--muted); }

.product-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.product-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--soft);
}

.product-card .body {
  padding: 16px;
  display: grid;
  gap: 10px;
  grid-template-rows: auto auto auto auto auto;
}

.product-card h3 {
  min-height: 48px;
  margin: 0;
  font-size: 17px;
  line-height: 1.4;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  color: var(--green);
  background: var(--soft);
  border: 1px solid rgba(31, 107, 67, 0.18);
  border-radius: 999px;
  font-size: 12px;
}

.tag.red { color: var(--red); background: #fff1ef; border-color: rgba(185, 75, 67, 0.2); }
.tag.gold { color: #765713; background: #fff7df; border-color: rgba(183, 139, 37, 0.28); }

.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

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

.market-price {
  color: #9ba59e;
  text-decoration: line-through;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: auto;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.article-grid.wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.article-card {
  padding: 22px;
}

.article-card h3 { margin: 10px 0; font-size: 22px; }
.article-card p { margin: 0; color: var(--muted); }

.policy-page {
  display: grid;
  gap: 20px;
}

.policy-head,
.policy-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.policy-head {
  padding: clamp(28px, 5vw, 52px);
  background:
    linear-gradient(120deg, rgba(247, 251, 244, 0.98), rgba(235, 246, 238, 0.9)),
    url("/api/files/assets/hero-qiai.png");
  background-size: cover;
}

.policy-head span {
  display: inline-flex;
  padding: 6px 12px;
  color: var(--green);
  background: rgba(31, 107, 67, 0.08);
  border: 1px solid rgba(31, 107, 67, 0.18);
  border-radius: 999px;
  font-weight: 800;
}

.policy-head h1 {
  margin: 18px 0 10px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
}

.policy-head p {
  margin: 0;
  color: var(--muted);
}

.policy-card {
  max-width: 980px;
  padding: clamp(24px, 4vw, 44px);
}

.policy-card h2 {
  margin: 28px 0 10px;
  font-size: 22px;
}

.policy-card p {
  margin: 0 0 14px;
  color: #53665c;
  line-height: 1.9;
}

.company-strip {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  padding: 42px;
  margin-bottom: 60px;
  background: #10261a;
  color: #fff;
  border-radius: var(--radius);
}

.company-strip p { color: rgba(255, 255, 255, 0.76); }
.company-strip dl { display: grid; gap: 12px; margin: 0; }
.company-strip dt { color: var(--gold); font-weight: 700; }
.company-strip dd { margin: 4px 0 0; color: rgba(255, 255, 255, 0.84); }

.page-hero {
  min-height: 260px;
  display: grid;
  align-content: end;
  padding: 42px;
  margin-bottom: 28px;
  color: #fff;
  background:
    linear-gradient(110deg, rgba(17, 56, 34, 0.96), rgba(31, 107, 67, 0.84)),
    url("/api/files/assets/hero-qiai.png");
  background-size: cover;
  border-radius: var(--radius);
}

.page-hero.compact { min-height: 210px; }
.page-hero p {
  max-width: 700px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.8);
  overflow-wrap: anywhere;
}

.member-shell {
  width: calc(100% - 48px);
  max-width: 1280px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin: 0 auto;
  padding: 34px 0 88px;
}

.member-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.member-sidebar-head {
  padding: 12px 12px 14px;
  background: #f4faf5;
  border: 1px solid #dce9df;
  border-radius: var(--radius);
}

.member-sidebar-head span,
.member-page-head span,
.member-card-head span {
  display: block;
  color: var(--green);
  font-weight: 800;
}

.member-sidebar-head strong {
  display: block;
  margin-top: 2px;
  font-size: 20px;
}

.member-nav {
  display: grid;
  gap: 8px;
}

.member-nav a,
.member-nav button {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 12px;
  text-align: left;
  color: #31463a;
  background: #fff;
  border: 1px solid transparent;
  border-radius: var(--radius);
}

.member-nav a:hover,
.member-nav button:hover {
  background: #f7fbf7;
  border-color: #dfe9e1;
}

.member-nav a.active {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.member-nav span {
  font-weight: 900;
}

.member-nav small {
  color: var(--muted);
}

.member-nav a.active small {
  color: rgba(255, 255, 255, 0.76);
}

.member-nav-logout {
  cursor: pointer;
}

.member-nav-logout span {
  color: #9f3d35;
}

.member-nav-logout:hover {
  background: #fff7f6;
  border-color: rgba(185, 75, 67, 0.22);
}

.member-main,
.member-content-stack {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.member-page-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 24px;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.97), rgba(240, 248, 241, 0.94)),
    url("/api/files/assets/hero-qiai.png");
  background-position: right center;
  background-size: cover;
  border: 1px solid #d8e7dc;
  border-radius: var(--radius);
}

.member-page-head h1 {
  margin: 4px 0 0;
  font-size: 34px;
  line-height: 1.18;
}

.member-page-head p {
  max-width: 62ch;
  margin: 8px 0 0;
  color: #53665c;
}

.member-page-head aside {
  max-width: 320px;
  display: grid;
  gap: 6px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid #dce9df;
  border-radius: var(--radius);
}

.member-page-head aside strong {
  color: var(--green);
}

.member-page-head aside span {
  color: #5f7066;
  font-weight: 500;
}

.member-card {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.member-card-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid #edf2ee;
}

.member-card-head h2 {
  margin: 2px 0 0;
  font-size: 24px;
}

.member-card-head p {
  max-width: 42ch;
  margin: 0;
  color: var(--muted);
}

.member-summary-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.member-profile-card,
.member-stat-card,
.member-action-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.member-profile-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 18px;
}

.member-profile-card img,
.profile-preview img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  background: var(--soft);
  border-radius: 50%;
}

.member-profile-card span,
.member-stat-card span,
.member-action-card span {
  color: var(--muted);
  font-weight: 700;
}

.member-profile-card strong {
  display: block;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
}

.member-profile-card small,
.member-stat-card small,
.member-action-card small {
  color: var(--muted);
}

.member-stat-card {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 112px;
  padding: 18px;
}

.member-stat-card strong {
  color: var(--green);
  font-size: 24px;
  line-height: 1.15;
}

.member-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.member-action-card {
  min-height: 148px;
  display: grid;
  align-content: space-between;
  gap: 14px;
  padding: 18px;
}

.member-action-button {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.member-action-button.danger span {
  color: #9f3d35;
}

.member-action-button.danger:hover {
  border-color: rgba(185, 75, 67, 0.28);
  background: #fffafa;
}

.member-action-card span {
  color: var(--green);
  font-size: 18px;
  font-weight: 900;
}

.member-action-card strong {
  color: var(--ink);
  line-height: 1.42;
}

.member-action-card:hover {
  border-color: rgba(31, 107, 67, 0.38);
  background: #fbfdfb;
}

.profile-editor {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.profile-preview {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 18px;
  background: #f7fbf7;
  border: 1px solid #dfe9e1;
  border-radius: var(--radius);
  text-align: center;
}

.profile-preview strong {
  font-size: 18px;
}

.profile-preview span {
  color: var(--green);
  font-weight: 800;
}

.member-form {
  display: grid;
  gap: 16px;
}

.member-form > .span-2 {
  display: grid;
}

.member-address-list {
  gap: 12px;
}

.member-address-list .address-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  background: #fbfdfb;
  border-color: #dfe9e1;
}

.member-address-list .address-card.active {
  background: #f5fbf6;
  border-color: rgba(31, 107, 67, 0.38);
  box-shadow: none;
}

.member-address-list .address-card p {
  margin: 0;
  color: #506158;
}

.member-address-list .detail-actions {
  margin-top: 4px;
}

.member-card > .address-editor-form:not(.panel) {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.shop-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 22px;
}

.filter-panel,
.shop-main,
.account-panel,
.orders-page,
.cart-page,
.checkout-page,
.detail-page {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.shop-main {
  min-width: 0;
}

.filter-panel {
  align-self: start;
  position: sticky;
  top: 92px;
}

.filter-panel h2 { margin: 0 0 16px; }

.category-list {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.category-list button {
  min-height: 42px;
  padding: 0 12px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.category-list button.active {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.shop-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px;
  gap: 12px;
  margin-bottom: 18px;
}

.inline-code-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.inline-code-field .ghost-action {
  min-height: 42px;
}

.field,
.form-grid label,
form label {
  display: grid;
  gap: 6px;
  color: #435046;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  min-height: auto;
  padding: 0;
  accent-color: var(--green);
}

input::placeholder,
textarea::placeholder {
  color: #7a867e;
  font-weight: 500;
  opacity: 1;
}

textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(31, 107, 67, 0.12); }

.detail-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
}

.detail-main-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--soft);
  border-radius: var(--radius);
}

.detail-info h1 { margin: 0 0 10px; font-size: clamp(28px, 4vw, 46px); }
.detail-info .subtitle { color: var(--muted); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.detail-images { display: grid; gap: 12px; margin-top: 28px; }
.detail-images img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }

.detail-rich {
  margin-top: 24px;
  line-height: 1.8;
}

.detail-rich h2,
.detail-rich h3 {
  margin: 0 0 12px;
}

.detail-rich p {
  margin: 0 0 12px;
  color: #405047;
}

.detail-rich img {
  width: 100%;
  height: auto;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.product-attrs {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
}

.product-attrs div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.product-attrs dt { color: var(--muted); }
.product-attrs dd { margin: 0; }

.detail-usage {
  margin-top: 24px;
}

.detail-usage p {
  margin: 8px 0;
  color: var(--muted);
}

.cart-lines,
.order-list,
.address-list {
  display: grid;
  gap: 14px;
}

.cart-line {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.cart-line img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--soft);
}

.quantity {
  display: inline-grid;
  grid-template-columns: 36px 42px 36px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.quantity button {
  height: 34px;
  border: 0;
  background: transparent;
}

.quantity span { text-align: center; font-weight: 800; }

.summary-box {
  display: grid;
  gap: 10px;
  padding: 18px;
  margin-top: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.summary-row.total {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--green);
  font-size: 24px;
  font-weight: 800;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
}

.panel {
  padding: 18px;
}

.panel h2 { margin: 0 0 14px; }

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

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

.security-form {
  display: grid;
  align-content: start;
  gap: 12px;
}

.security-form h3 {
  margin: 0;
  font-size: 18px;
}

.security-form p {
  max-width: 48ch;
  margin: 0 0 4px;
  color: var(--muted);
}

.address-editor-form {
  display: grid;
  gap: 18px;
}

.address-editor-form:not(.panel) {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.address-form-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.address-form-head h2 {
  margin: 0;
}

.address-form-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.address-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.address-form-grid label {
  color: #3d4c43;
  font-size: 15px;
}

.address-form-grid .span-3 {
  grid-column: 1 / -1;
}

.address-form-grid input {
  min-height: 48px;
  font-weight: 600;
}

.switch-line {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.switch-line input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.switch-indicator {
  position: relative;
  width: 44px;
  height: 24px;
  background: #cbd8cf;
  border-radius: 999px;
  transition: background 0.18s ease;
}

.switch-line:hover {
  border-color: rgba(30, 120, 72, 0.36);
  background: #f3f8f3;
}

.switch-line input:focus-visible + .switch-indicator {
  outline: 3px solid rgba(30, 120, 72, 0.18);
  outline-offset: 3px;
}

.switch-indicator::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(23, 35, 28, 0.22);
  transition: transform 0.18s ease;
}

.switch-line input:checked + .switch-indicator {
  background: var(--green);
}

.switch-line input:checked + .switch-indicator::after {
  transform: translateX(20px);
}

.switch-line strong {
  display: block;
  line-height: 1.3;
}

.switch-line small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-weight: 400;
}

.address-form-actions {
  padding-top: 2px;
}

.address-card,
.order-card {
  padding: 16px;
}

.address-card.active {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 107, 67, 0.1);
}

.account-overview {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.account-overview article {
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.account-overview span { color: var(--muted); }
.account-overview strong { color: var(--green); font-size: 22px; }

.profile-card {
  grid-template-columns: 72px 1fr;
  align-items: center;
  align-content: center;
}

.profile-card img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 50%;
  background: var(--soft);
}

.profile-card strong { color: var(--ink); }

.account-menu-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.account-menu-card {
  display: grid;
  min-height: 132px;
  align-content: space-between;
  gap: 12px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.account-menu-card:hover {
  border-color: rgba(31, 107, 67, 0.38);
  box-shadow: 0 8px 28px rgba(23, 35, 28, 0.08);
}

.account-menu-card span {
  color: var(--green);
  font-weight: 800;
}

.account-menu-card strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
}

.panel-head,
.address-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-head { margin-bottom: 14px; }
.panel-head h2 { margin: 0; }
.panel-head span { color: var(--muted); }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.order-head,
.order-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.order-items {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.order-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 14px 0;
}

.order-steps span {
  min-height: 30px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--soft);
  border-radius: 999px;
  font-size: 12px;
}

.order-steps span.done {
  color: #fff;
  background: var(--green);
}

.order-item {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 10px;
  align-items: center;
  color: var(--muted);
}

.order-item img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--soft);
}

.order-item small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.order-detail-modal {
  display: grid;
  gap: 16px;
}

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

.detail-kv div,
.simple-stack article {
  padding: 12px;
  background: var(--soft);
  border-radius: var(--radius);
}

.detail-kv span,
.simple-stack span,
.simple-stack small {
  display: block;
  color: var(--muted);
}

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

.order-card {
  padding: 0;
  overflow: hidden;
  background: #fff;
  border-color: #dce8de;
  box-shadow: none;
}

.order-card .order-head {
  padding: 18px 20px 14px;
  border-bottom: 1px solid #edf2ee;
}

.order-id {
  display: grid;
  gap: 2px;
}

.order-id span {
  color: var(--muted);
  font-size: 13px;
}

.order-id strong {
  font-size: 18px;
  letter-spacing: 0.01em;
}

.order-status {
  min-height: 30px;
  padding: 4px 12px;
  font-weight: 800;
}

.order-status.warning {
  color: #765713;
  background: #fff7df;
  border-color: rgba(183, 139, 37, 0.28);
}

.order-status.processing {
  color: #1e6b8c;
  background: #eef8fb;
  border-color: rgba(30, 107, 140, 0.2);
}

.order-status.success {
  color: var(--green);
  background: #eef7f0;
  border-color: rgba(31, 107, 67, 0.18);
}

.order-status.refund {
  color: #7c4a22;
  background: #fff4e8;
  border-color: rgba(124, 74, 34, 0.2);
}

.order-status.muted {
  color: #607067;
  background: #f1f4f1;
  border-color: #dfe6df;
}

.order-card .order-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--step-count, 4), minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 16px 24px 14px;
  background: #fbfdf8;
  border-bottom: 1px solid #edf2ee;
}

.order-card .order-steps::before {
  content: "";
  position: absolute;
  left: 42px;
  right: 42px;
  top: 25px;
  height: 1px;
  background: #dfe9e1;
}

.order-card .order-steps span {
  position: relative;
  z-index: 1;
  min-height: 0;
  display: grid;
  justify-items: center;
  gap: 7px;
  color: var(--muted);
  background: transparent;
  border-radius: 0;
  font-size: 12px;
}

.order-card .order-steps i {
  width: 10px;
  height: 10px;
  display: block;
  background: #fff;
  border: 2px solid #cfded2;
  border-radius: 50%;
}

.order-card .order-steps b {
  font-weight: 700;
}

.order-card .order-steps span.done {
  color: var(--green);
  background: transparent;
}

.order-card .order-steps span.done i {
  background: var(--green);
  border-color: var(--green);
}

.order-card .order-steps span.active b {
  color: var(--ink);
  font-weight: 900;
}

.order-card .order-items {
  gap: 0;
  margin: 0;
  padding: 8px 20px;
}

.order-card .order-item {
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #edf2ee;
}

.order-card .order-item:first-child {
  border-top: 0;
}

.order-card .order-item span {
  color: #405149;
  font-weight: 700;
  min-width: 0;
}

.order-card .order-item small {
  display: inline;
  margin-left: 6px;
}

.order-card .order-item strong {
  color: #35463e;
  white-space: nowrap;
}

.order-card .order-foot {
  padding: 12px 20px;
  color: var(--muted);
  background: #fbfdf8;
  border-top: 1px solid #edf2ee;
}

.order-card .order-foot strong {
  color: var(--ink);
  font-size: 18px;
}

.order-actions {
  justify-content: flex-end;
  padding: 14px 20px 18px;
  margin-top: 0;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tabs a,
.tabs button {
  min-height: 38px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.tabs .active {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.orders-page {
  display: grid;
  gap: 16px;
  padding: 0;
  background: transparent;
  border: 0;
}

.order-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.order-tabs a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px 0 16px;
  color: #32443a;
  background: #fbfdf8;
  border: 1px solid #dfe9e1;
  border-radius: 999px;
  font-weight: 800;
}

.order-tabs a:hover {
  border-color: rgba(31, 107, 67, 0.36);
}

.order-tabs a.active {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.order-tabs strong {
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  padding: 0 7px;
  color: var(--green);
  background: #eaf4ed;
  border-radius: 999px;
  font-size: 13px;
}

.order-tabs a.active strong {
  color: var(--green);
  background: #fff;
}

.about-page {
  display: grid;
  gap: 34px;
}

.about-lead {
  max-width: 900px;
}

.about-lead p {
  color: var(--muted);
  font-size: 18px;
}

.about-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.about-cards article {
  padding: 20px;
}

.about-cards span { color: var(--gold); font-weight: 700; }
.about-cards strong { display: block; margin-top: 8px; }

.about-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: start;
}

.about-menu {
  position: sticky;
  top: 108px;
  display: grid;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.about-menu strong {
  color: var(--ink);
  font-size: 18px;
}

.about-menu nav {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.about-menu a {
  display: block;
  padding: 9px 10px;
  color: #53665c;
  border-radius: var(--radius);
  font-weight: 700;
}

.about-menu a:hover,
.about-menu a:focus-visible,
.about-menu a.active {
  color: var(--green);
  background: #eef7ef;
  outline: none;
}

.about-content {
  display: grid;
  gap: 22px;
  min-width: 0;
  max-width: 100%;
}

.about-hero,
.about-section {
  min-width: 0;
  max-width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.about-hero {
  padding: clamp(22px, 3.2vw, 34px);
  background:
    radial-gradient(circle at 94% 10%, rgba(183, 139, 37, 0.13), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #f0f7ef 100%);
}

.about-hero span,
.section-kicker {
  color: var(--gold);
  font-weight: 800;
}

.about-hero h1,
.about-hero h2 {
  max-width: 760px;
  margin: 8px 0 14px;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.28;
  letter-spacing: 0;
  text-wrap: balance;
}

.about-hero p {
  max-width: 760px;
  margin: 0;
  color: #415047;
  font-size: 16px;
}

.about-section {
  scroll-margin-top: 110px;
  padding: clamp(22px, 3.2vw, 34px);
}

.section-kicker {
  margin-bottom: 8px;
}

.about-section h2 {
  margin: 0 0 14px;
  font-size: clamp(21px, 1.8vw, 26px);
  line-height: 1.3;
  text-wrap: balance;
}

.about-section h3 {
  margin: 20px 0 8px;
  color: #25352b;
  font-size: 18px;
  line-height: 1.35;
}

.about-section p {
  max-width: 78ch;
  margin: 0 0 14px;
  color: #4b5d53;
  font-size: 16px;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.about-section p:last-child {
  margin-bottom: 0;
}

.about-brand-vision p {
  max-width: 48ch;
  color: var(--green);
  font-size: clamp(17px, 1.6vw, 20px);
  font-weight: 800;
  line-height: 1.5;
}

.culture-section p:first-of-type {
  color: #32443a;
  font-size: 16px;
}

.about-statement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0 16px;
}

.about-statement-grid article,
.about-values article,
.team-list section {
  padding: 18px;
  background: #f8fbf7;
  border: 1px solid #dce9df;
  border-radius: var(--radius);
}

.about-statement-grid span {
  color: var(--gold);
  font-weight: 800;
}

.about-statement-grid strong {
  display: block;
  margin-top: 8px;
  color: var(--green);
  font-size: 20px;
  line-height: 1.42;
}

.about-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.about-values:empty {
  display: none;
}

.about-values strong {
  display: block;
  color: var(--green);
  font-size: 19px;
}

.about-values p {
  margin-top: 8px;
  font-size: 15px;
}

.team-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.team-list.expanded {
  gap: 16px;
}

.team-list h3 {
  margin-top: 0;
}

.team-list p {
  margin-bottom: 0;
}

.team-list.expanded p + p {
  margin-top: 12px;
}

.legal-section h3 {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e5eee7;
}

.section-note {
  color: var(--green) !important;
  font-weight: 800;
}

.contact-section dl {
  display: grid;
  gap: 0;
  margin: 18px 0 0;
  border: 1px solid #dce9df;
  border-radius: var(--radius);
  overflow: hidden;
}

.contact-section dl div {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 18px;
  padding: 14px 16px;
  background: #fff;
  border-top: 1px solid #dce9df;
}

.contact-section dl div:first-child {
  border-top: 0;
}

.contact-section dt {
  color: var(--green);
  font-weight: 800;
}

.contact-section dd {
  margin: 0;
  color: #4b5d53;
}

.contact-section a {
  color: var(--green);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-section a.brand-contact-link {
  color: #53665c;
  text-decoration: none;
}

.contact-section a.brand-contact-link:hover {
  color: var(--green);
  text-decoration: underline;
}

.contact-wechat-card {
  width: min(188px, 100%);
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px;
  background: #f8fbf7;
  border: 1px solid #dce9df;
  border-radius: 12px;
}

.contact-wechat-card img {
  width: 160px;
  max-width: 100%;
  height: auto;
  display: block;
  background: #fff;
  border-radius: 8px;
}

.contact-wechat-card figcaption {
  color: #53665c;
  font-size: 13px;
  font-weight: 700;
}

.empty-state {
  padding: 34px;
  color: var(--muted);
  text-align: center;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.empty-state.compact {
  padding: 18px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(12, 24, 17, 0.52);
}

.modal.open { display: flex; }

.modal-dialog {
  width: min(520px, 100%);
  max-height: calc(100dvh - 44px);
  overflow: auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.modal-dialog.wide { width: min(820px, 100%); }

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.modal-body { padding: 20px; }

.auth-panel {
  display: grid;
  gap: 18px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  background: #f4faf5;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.auth-tabs button {
  min-height: 38px;
  color: #435046;
  background: transparent;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  font-weight: 800;
}

.auth-tabs button.active {
  color: #fff;
  background: var(--green);
}

.auth-form {
  display: none;
  gap: 14px;
}

.auth-form.active {
  display: grid;
}

.agreement-line {
  grid-template-columns: auto 1fr;
  align-items: flex-start;
  gap: 10px;
  color: #53665c;
  line-height: 1.65;
}

.agreement-line input {
  margin-top: 6px;
}

.agreement-line a {
  color: var(--green);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.modal-close { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: #fff; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 80;
  transform: translateX(-50%) translateY(30px);
  opacity: 0;
  min-width: 220px;
  max-width: min(560px, calc(100% - 40px));
  padding: 13px 18px;
  color: #fff;
  background: rgba(23, 35, 28, 0.94);
  border-radius: 999px;
  text-align: center;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.pay-box {
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
}

.qr-image {
  width: 240px;
  height: 240px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.pay-box textarea { font-size: 12px; }

.ai-page-shell {
  width: calc(100% - 48px);
  max-width: 1280px;
  height: var(--ai-page-shell-height, calc(100dvh - 88px));
  min-height: min(560px, var(--ai-page-shell-height, calc(100dvh - 88px)));
  margin: 0 auto;
  padding: 8px 0;
  box-sizing: border-box;
}

.ai-page-shell > #aiAssistantPage {
  height: 100%;
  min-height: 0;
}

.ai-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 48px rgba(16, 33, 25, 0.08);
}

.ai-sidebar {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  overflow: hidden;
  background: #f5faf5;
  border-right: 1px solid var(--line);
}

.ai-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ai-sidebar-head > span {
  color: var(--green);
  font-weight: 900;
}

.ai-sidebar-head .primary-action {
  min-height: 36px;
  padding: 0 14px;
}

.ai-new-button,
.ai-send-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.94);
  background: #3f815a;
  box-shadow: none;
}

.ai-new-button span,
.ai-send-button span {
  color: inherit;
  font-weight: 800;
}

.ai-button-icon {
  width: 16px;
  height: 16px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ai-thread-list {
  height: 100%;
  min-height: 0;
  max-height: 100%;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.ai-thread {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  background: #fff;
  border: 1px solid #dfe9e1;
  border-radius: var(--radius);
}

.ai-thread.active {
  border-color: rgba(31, 117, 73, 0.46);
  box-shadow: 0 0 0 3px rgba(31, 117, 73, 0.08);
}

.ai-thread.editing {
  grid-template-columns: 1fr;
}

.ai-thread-main {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 0;
  text-align: left;
  background: transparent;
  border: 0;
}

.ai-thread-main strong,
.ai-thread-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-thread-main strong {
  color: #17231c;
  font-size: 14px;
}

.ai-thread-main span {
  color: var(--muted);
  font-size: 12px;
}

.ai-thread-actions {
  display: flex;
  gap: 4px;
}

.ai-thread-actions button {
  width: 28px;
  height: 28px;
  padding: 0;
  color: #53665c;
  background: #f7fbf7;
  border: 1px solid #dfe9e1;
  border-radius: 50%;
  font-size: 12px;
}

.ai-rename-form {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.ai-rename-input {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  color: #24362b;
  background: #fff;
  border: 1px solid rgba(31, 117, 73, 0.32);
  border-radius: var(--radius);
  outline: none;
}

.ai-rename-input:focus {
  border-color: rgba(31, 117, 73, 0.7);
  box-shadow: 0 0 0 3px rgba(31, 117, 73, 0.1);
}

.ai-rename-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.ai-rename-actions button {
  min-width: 48px;
  height: 28px;
  padding: 0 10px;
  color: #567064;
  background: #f7fbf7;
  border: 1px solid #dfe9e1;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.ai-rename-actions .ai-rename-save {
  color: #fff;
  background: #3f815a;
  border-color: #3f815a;
}

.ai-chat-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: #fbfdf8;
}

.ai-risk-bar {
  padding: 10px 18px;
  color: #765713;
  background: #fff7df;
  border-bottom: 1px solid rgba(183, 138, 32, 0.22);
  font-size: 13px;
}

.ai-chat-head {
  padding: 12px 18px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.ai-chat-head span {
  color: #7a8a80;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
}

.ai-chat-head h1 {
  max-width: 60ch;
  margin: 2px 0 0;
  overflow: hidden;
  color: #40584a;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-messages {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  overflow-y: scroll;
  padding: 18px 22px;
  scrollbar-gutter: stable;
  scrollbar-color: rgba(47, 111, 72, 0.35) transparent;
  scrollbar-width: thin;
}

.ai-messages::-webkit-scrollbar,
.ai-thread-list::-webkit-scrollbar {
  width: 8px;
}

.ai-messages::-webkit-scrollbar-thumb,
.ai-thread-list::-webkit-scrollbar-thumb {
  background: rgba(47, 111, 72, 0.24);
  border-radius: 999px;
}

.ai-message {
  display: grid;
  grid-template-columns: 34px minmax(0, 680px);
  gap: 10px;
  align-items: start;
}

.ai-message.user {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: flex-start;
}

.ai-message.user .ai-avatar {
  flex: 0 0 34px;
  order: 2;
  color: #eef8f1;
  background: #547761;
}

.ai-message.user .ai-bubble {
  flex: 0 1 auto;
  max-width: 680px;
  order: 1;
  color: #173d2a;
  background: #eef8f1;
  border-color: #c9dfcf;
}

.ai-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #b98a20;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 900;
}

.ai-avatar-robot svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ai-bubble {
  min-width: 0;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #dfe9e1;
  border-radius: var(--radius);
}

.ai-message-name {
  margin-bottom: 5px;
  color: inherit;
  font-size: 12px;
  font-weight: 900;
  opacity: 0.82;
}

.ai-message-content {
  display: grid;
  gap: 8px;
  color: inherit;
  line-height: 1.66;
  overflow-wrap: anywhere;
}

.ai-message-content :where(p, ul, ol, blockquote, pre, h2, h3, h4) {
  margin: 0;
}

.ai-message-content :where(h2, h3, h4) {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.45;
  font-weight: 900;
}

.ai-message-content ul,
.ai-message-content ol {
  display: grid;
  gap: 4px;
  padding-left: 1.3em;
}

.ai-message-content blockquote {
  padding: 8px 12px;
  color: #335344;
  background: #f3f8f2;
  border: 1px solid #dceadd;
  border-radius: 8px;
}

.ai-message-content code {
  padding: 1px 5px;
  color: #224633;
  background: #eef5ef;
  border-radius: 5px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.ai-message-content pre {
  overflow: auto;
  padding: 10px 12px;
  color: #183526;
  background: #f5f8f5;
  border: 1px solid #dfe9e1;
  border-radius: 8px;
}

.ai-message-content pre code {
  padding: 0;
  background: transparent;
}

.ai-message-content a {
  color: var(--green);
  font-weight: 800;
}

.ai-message-content.collapsed {
  max-height: 15.5em;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent);
  mask-image: linear-gradient(180deg, #000 72%, transparent);
}

.ai-collapse-toggle {
  width: fit-content;
  margin-top: 8px;
  padding: 5px 10px;
  color: #4a7359;
  background: #f1f7f2;
  border: 1px solid #dceadd;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.ai-message.user .ai-message-content :where(h2, h3, h4),
.ai-message.user .ai-message-content a {
  color: #173d2a;
}

.ai-message.user .ai-message-content blockquote,
.ai-message.user .ai-message-content code,
.ai-message.user .ai-message-content pre {
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(47, 111, 72, 0.18);
}

.ai-bubble time {
  display: block;
  margin-top: 6px;
  color: inherit;
  font-size: 12px;
  opacity: 0.62;
}

.ai-attachment-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.ai-attachment-grid img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  background: var(--soft);
  border-radius: var(--radius);
}

.ai-composer {
  display: grid;
  gap: 8px;
  padding: 12px 18px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.ai-upload-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 8px 10px;
  color: #6c7d72;
  background: #f8fbf7;
  border: 1px dashed #d8e6dc;
  border-radius: 8px;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.ai-upload-zone span {
  font-size: 13px;
}

.ai-upload-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 5px 10px;
  color: #65806c;
  background: rgba(47, 111, 72, 0.025);
  border: 1px solid #e1ebe3;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  overflow: hidden;
}

.ai-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.ai-upload-trigger .ai-button-icon,
.ai-upload-trigger span {
  pointer-events: none;
}

.ai-upload-trigger:hover,
.ai-upload-trigger:focus-visible,
.ai-composer.dragging {
  color: var(--green);
  background: #eef8f1;
  border-color: rgba(47, 111, 72, 0.42);
}

.ai-composer textarea {
  min-height: 66px;
  max-height: 140px;
}

.ai-composer-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

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

.ai-send-button {
  min-height: 38px;
  padding-inline: 18px;
}

.ai-attachment-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-attachment-preview span {
  position: relative;
  width: 70px;
  height: 70px;
}

.ai-attachment-preview img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.ai-attachment-preview button {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 24px;
  height: 24px;
  padding: 0;
  color: #fff;
  background: var(--red);
  border: 0;
  border-radius: 50%;
}

.ai-empty-state,
.ai-empty-mini {
  padding: 26px;
  color: var(--muted);
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.ai-empty-state strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

.ai-empty-state p {
  margin: 8px auto 0;
  max-width: 560px;
}

.ai-empty-mini {
  padding: 16px;
  font-size: 13px;
}

.ai-agreement-panel {
  max-width: 840px;
  display: grid;
  gap: 18px;
  margin: 40px auto;
  padding: clamp(26px, 5vw, 44px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 48px rgba(16, 33, 25, 0.08);
}

.ai-agreement-panel > span {
  color: var(--green);
  font-weight: 900;
}

.ai-agreement-panel h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.12;
}

.ai-agreement-panel p,
.ai-agreement-panel li {
  color: var(--muted);
}

.ai-agreement-panel ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.ai-agreement-check {
  padding: 14px;
  background: #fff7df;
  border: 1px solid rgba(183, 138, 32, 0.22);
  border-radius: var(--radius);
}

.site-footer {
  padding: 24px 0 26px;
  color: #5f7468;
  font-size: 13px;
  line-height: 1.68;
  background:
    linear-gradient(180deg, rgba(251, 253, 248, 0.98), rgba(238, 247, 239, 0.98));
  border-top: 1px solid #dce9df;
}

.site-footer-inner {
  width: calc(100% - 88px);
  max-width: 1920px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(320px, 1fr) minmax(170px, 0.65fr) minmax(360px, 1.15fr);
  align-items: start;
  gap: clamp(28px, 3vw, 56px);
}

.site-footer strong {
  display: block;
  color: #173f2b;
  font-size: 14px;
  line-height: 1.35;
}

.footer-brand strong,
.footer-social strong {
  color: #173f2b;
}

.site-footer p {
  margin: 10px 0 0;
  color: #5f7468;
}

.footer-links,
.footer-meta {
  display: grid;
  gap: 8px;
}

.footer-quick-links {
  gap: 14px;
}

.footer-quick-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: #5f7468;
  font-size: 13px;
  font-weight: 800;
}

.footer-link-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: #6fa184;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-social {
  display: grid;
  gap: 12px;
}

.footer-social strong {
  color: #173f2b;
}

.social-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.social-link {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  color: #7ca98e;
  background: transparent;
  border: 0;
  border-radius: 6px;
  position: relative;
}

.social-qr {
  position: absolute;
  left: var(--social-qr-left, 50%);
  bottom: calc(100% + 10px);
  transform: translateX(var(--social-qr-shift, -50%));
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  z-index: 20;
  width: 184px;
  padding: 10px;
  color: #5f7468;
  background: #fff;
  border: 1px solid #dce9df;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(16, 33, 25, 0.14);
  font-size: 12px;
  text-align: center;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.social-qr::after {
  content: "";
  position: absolute;
  left: var(--social-qr-arrow-left, 50%);
  top: 100%;
  width: 10px;
  height: 10px;
  background: #fff;
  border-right: 1px solid #dce9df;
  border-bottom: 1px solid #dce9df;
  transform: translate(-50%, -5px) rotate(45deg);
}

.social-qr img {
  width: 164px;
  height: 198px;
  display: block;
  object-fit: contain;
  background: #f7fbf8;
  border-radius: 8px;
}

.social-qr span {
  display: block;
  margin-top: 6px;
}

.social-link:hover {
  color: var(--green);
  background: transparent;
}

.social-link:focus-visible {
  outline: 2px solid rgba(31, 107, 67, 0.28);
  outline-offset: 4px;
}

.social-link:hover .social-qr,
.social-link:focus-visible .social-qr {
  opacity: 1;
  transform: translateX(var(--social-qr-shift, -50%)) translateY(-2px);
}

.social-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  line-height: 1;
  position: relative;
}

.social-icon svg {
  width: 24px;
  height: 24px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-icon circle {
  fill: currentColor;
  stroke: none;
}

.social-icon img {
  width: 34px;
  height: 34px;
  display: block;
  object-fit: contain;
  filter: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.social-icon-mono,
.social-icon-color {
  position: absolute;
  inset: 0;
}

.social-icon-mono {
  opacity: 1;
}

.social-icon-color {
  opacity: 0;
  transform: scale(0.94);
}

.social-link:hover .social-icon-mono,
.social-link:focus-visible .social-icon-mono {
  opacity: 0;
  transform: scale(0.96);
}

.social-link:hover .social-icon-color,
.social-link:focus-visible .social-icon-color {
  opacity: 1;
  transform: scale(1);
}

.footer-links a:hover,
.footer-meta a:hover { color: #173f2b; }

.footer-meta {
  justify-items: end;
  line-height: 1.85;
  text-align: right;
}

.footer-meta span,
.footer-meta a,
.footer-links a { color: #5f7468; }

.footer-links a:hover {
  color: #173f2b;
  font-weight: 800;
}

.footer-site-link {
  display: inline;
}

.footer-meta .footer-icp {
  margin-top: 0;
  color: #7f9187;
  font-size: 13px;
  font-weight: 400;
}

.footer-meta .footer-icp:hover {
  color: #5f7468;
  font-weight: 400;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }
  .nav-links { justify-content: flex-start; overflow-x: auto; }
  .header-actions { justify-content: flex-end; }
  .mall-hero { grid-template-columns: 1fr; }
  .hero-shop-card { max-width: 420px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-chip-grid,
  .service-band,
  .account-overview,
  .account-menu-grid,
  .security-form-grid,
  .detail-kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-layout,
  .checkout-grid,
  .detail-grid,
  .company-strip { grid-template-columns: 1fr; }
  .filter-panel { position: static; }
  .promise-grid,
  .article-grid,
  .article-grid.wide,
  .about-cards { grid-template-columns: 1fr; }
  .site-footer-inner { grid-template-columns: 1fr; }
  .footer-meta { justify-items: start; text-align: left; }
}

@media (max-width: 640px) {
  .site-header {
    padding: 12px 16px;
  }
  .brand {
    min-width: 0;
  }
  .nav-links {
    width: 100%;
    gap: 18px;
    padding-bottom: 2px;
  }
  .header-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }
  .header-actions .text-action,
  .header-actions .icon-action {
    width: 100%;
    min-width: 0;
    padding: 0 12px;
  }
  .band,
  .page-shell { width: calc(100% - 24px); }
  .page-hero {
    padding: 32px;
  }
  .page-hero h1 {
    font-size: 38px;
    line-height: 1.16;
  }
  .hero { min-height: 560px; padding: 88px 20px 46px; }
  .hero-search,
  .category-chip-grid,
  .service-band,
  .account-overview,
  .account-menu-grid,
  .security-form-grid,
  .address-form-grid,
  .detail-kv { grid-template-columns: 1fr; }
  .address-form-grid .span-3 { grid-column: auto; }
  .switch-line { width: 100%; }
  .hero-search { border-radius: var(--radius); }
  .hero-search .primary-action { width: 100%; }
  .hero h1 { font-size: 44px; }
  .section-title.with-action,
  .order-head,
  .order-foot { flex-direction: column; align-items: flex-start; }
  .product-grid { grid-template-columns: 1fr; }
  .shop-toolbar,
  .inline-code-field,
  .form-grid,
  .cart-line { grid-template-columns: 1fr; }
}

/* Storefront redesign */
:root {
  --ink: #102119;
  --muted: #5f7067;
  --line: #d8e6db;
  --paper: #f7faf6;
  --soft: #eef7ef;
  --green: #123d2a;
  --green-2: #1f5a3e;
  --gold: #a06a2b;
  --radius: 8px;
  --shadow: 0 14px 36px rgba(16, 33, 25, 0.1);
}

body {
  background:
    linear-gradient(180deg, #f9fcf8 0, #f3f8f2 520px, #f7faf6 100%);
}

.site-header {
  min-height: 84px;
  padding: 14px max(28px, calc((100% - 1280px) / 2));
  background:
    radial-gradient(circle at 11% 0, rgba(31, 117, 73, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 253, 249, 0.94));
  border-bottom: 1px solid rgba(31, 117, 73, 0.16);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9), 0 12px 28px rgba(25, 61, 40, 0.04);
}

.brand {
  justify-self: start;
  gap: 13px;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  padding: 4px 12px 4px 4px;
  border-radius: 16px;
  transition: background 0.18s ease, transform 0.18s ease;
}

.brand:hover {
  background: rgba(31, 117, 73, 0.055);
  transform: translateY(-1px);
}

.brand-mark {
  position: relative;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  overflow: hidden;
  color: transparent;
  background: url("../../assets/xiaocao-logo-ai-huawen-lishu.svg") center / contain no-repeat;
  border: 0;
  border-radius: 0;
  font-size: 0;
  line-height: 1;
  letter-spacing: 0;
  text-indent: -999px;
  box-shadow: none;
}

.brand-copy {
  transform: translateY(3px);
}

.brand-copy strong {
  color: #11291d;
  font-size: 23px;
  line-height: 1.04;
  letter-spacing: 0;
  font-weight: 900;
  white-space: nowrap;
  text-wrap: nowrap;
}

.brand-copy small {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.01em;
}

.brand-domain,
.brand-email {
  white-space: nowrap;
}

.brand-contact-link {
  color: #53665c;
  text-decoration: none;
  text-underline-offset: 4px;
}

.brand-contact-link:hover {
  color: var(--green);
  text-decoration: underline;
}

.brand-domain .domain-protocol,
.brand-email .email-local {
  color: #6b7b72;
  font-weight: 600;
}

.brand-domain .domain-xiaocao,
.brand-email .domain-xiaocao {
  color: #1f7549;
  font-weight: 800;
}

.brand-domain .domain-health,
.brand-email .domain-health {
  color: #8a6417;
  font-weight: 800;
}

.brand-domain .domain-suffix,
.brand-email .domain-suffix {
  color: #62766a;
  font-weight: 700;
}

.nav-links {
  gap: 8px;
}

.nav-links a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border-radius: 999px;
}

.nav-links a.active {
  color: var(--green);
  background: rgba(31, 117, 73, 0.1);
  font-weight: 800;
}

.nav-links a:hover {
  color: var(--green);
  background: rgba(31, 117, 73, 0.06);
}

.member-entry {
  font-weight: 800;
}

.header-actions .member-entry {
  color: var(--green);
}

.header-actions .member-entry.active {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.cart-entry.active {
  color: var(--green);
  background: rgba(31, 117, 73, 0.08);
  border-color: rgba(31, 117, 73, 0.22);
}

.cart-action-label {
  line-height: 1;
}

.nav-cart-icon,
.nav-user-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.text-action,
.icon-action,
.ghost-action,
.member-entry {
  background: #fff;
  border-color: #d6e2d9;
}

.primary-action {
  background: var(--green);
  border-color: var(--green);
  font-weight: 800;
}

.primary-action:hover {
  background: #155e38;
}

.storefront-shell {
  width: calc(100% - 48px);
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 0 88px;
}

.store-command {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  gap: 22px;
  align-items: stretch;
  padding: 22px;
  margin-bottom: 22px;
  color: var(--ink);
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.96), rgba(241, 248, 242, 0.94)),
    url("/api/files/assets/hero-qiai.png");
  background-position: right center;
  background-size: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.store-command-copy {
  display: grid;
  align-content: center;
  gap: 12px;
  min-width: 0;
}

.store-command h1 {
  margin: 0;
  font-size: 38px;
  line-height: 1.14;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.store-command p {
  max-width: 58ch;
  margin: 0;
  color: #53665c;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.store-command-panel {
  display: flex;
  align-items: center;
  align-self: center;
  min-width: 0;
}

.hero-search-panel {
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 10px 8px 14px;
  color: #2d4536;
  background: #fff;
  border: 1px solid #b9d5c3;
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(31, 107, 67, 0.06);
  font-weight: 800;
}

.hero-search-panel span {
  padding: 0 2px;
  color: var(--green);
  white-space: nowrap;
}

.hero-search-panel input {
  min-width: 0;
  min-height: 44px;
  padding: 0 16px;
  color: var(--ink);
  border: 1px solid #d8e6db;
  background: #f5faf6;
  border-radius: 999px;
  box-shadow: none;
}

.hero-search-panel input::placeholder {
  color: #69786e;
}

.hero-search-panel input:focus {
  border-color: var(--green);
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(31, 107, 67, 0.12);
}

.store-trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.store-trust-strip span {
  padding: 7px 10px;
  color: var(--green);
  background: #eff7f0;
  border: 1px solid rgba(31, 117, 73, 0.16);
  border-radius: 999px;
  font-weight: 800;
}

.shop-layout {
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.filter-panel,
.shop-main {
  background: #fff;
  border-color: var(--line);
  box-shadow: none;
}

.filter-panel {
  padding: 18px;
  top: 96px;
}

.filter-head {
  margin-bottom: 14px;
}

.filter-head span,
.shop-result-meta span {
  color: var(--muted);
  font-size: 13px;
}

.filter-head h2 {
  margin: 2px 0 0;
}

.category-list button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 12px;
  font-weight: 800;
}

.category-list button small {
  min-width: 28px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  background: var(--soft);
  border-radius: 999px;
}

.category-list button.active small {
  color: var(--green);
  background: #fff;
}

.member-field {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.shop-main {
  padding: 24px;
  min-height: 760px;
}

.shop-main > .shop-toolbar {
  grid-template-columns: minmax(0, 1fr) 186px;
  align-items: center;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.shop-result-meta {
  display: grid;
  gap: 2px;
}

.shop-result-meta strong {
  font-size: 22px;
  line-height: 1.2;
}

.product-grid {
  grid-template-columns: repeat(auto-fill, minmax(218px, 1fr));
  gap: 18px;
}

.category-skeleton,
.product-skeleton {
  position: relative;
  overflow: hidden;
  background: #f3f8f3;
}

.category-skeleton::after,
.product-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.68), transparent);
  transform: translateX(-100%);
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.category-skeleton {
  display: block;
  height: 46px;
  margin-bottom: 10px;
  border-radius: var(--radius);
  border: 1px solid #e3ece4;
}

.product-skeleton {
  min-height: 364px;
  padding: 12px;
  border: 1px solid #e3ece4;
  border-radius: var(--radius);
}

.product-skeleton span,
.product-skeleton i,
.product-skeleton b {
  display: block;
  border-radius: 999px;
  background: #e6f0e7;
}

.product-skeleton span {
  height: 190px;
  border-radius: var(--radius);
}

.product-skeleton i {
  height: 16px;
  margin-top: 14px;
}

.product-skeleton i:nth-of-type(2) {
  width: 72%;
}

.product-skeleton b {
  width: 42%;
  height: 30px;
  margin-top: 22px;
}

@keyframes skeleton-shimmer {
  to {
    transform: translateX(100%);
  }
}

.product-card {
  overflow: hidden;
  border-color: #dce8de;
  box-shadow: none;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.product-card:hover {
  border-color: rgba(31, 117, 73, 0.42);
  transform: translateY(-2px);
}

.product-media {
  display: block;
  padding: 10px 10px 0;
}

.product-card .product-media img {
  aspect-ratio: 1;
  border-radius: var(--radius);
  border: 1px solid #edf2ed;
}

.product-card .body {
  gap: 9px;
  padding: 14px 16px 16px;
  grid-template-rows: auto auto auto auto auto auto;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

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

.product-card h3 {
  min-height: 50px;
  font-size: 16px;
  line-height: 1.45;
}

.product-card p {
  min-height: 40px;
  color: #65756c;
}

.price-row {
  align-items: end;
  min-height: 36px;
}

.price {
  color: var(--green);
  font-size: 28px;
  line-height: 1;
}

.card-actions {
  grid-template-columns: minmax(0, 1fr) minmax(84px, auto);
}

.card-actions .primary-action,
.card-actions .ghost-action {
  min-height: 40px;
  padding: 0 14px;
}

.empty-state {
  grid-column: 1 / -1;
}

.product-shell {
  max-width: 1180px;
}

.detail-page {
  padding: 0;
  background: transparent;
  border: 0;
}

.product-detail-shell {
  display: grid;
  gap: 22px;
}

.detail-hero-card,
.detail-section {
  min-width: 0;
  max-width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.detail-hero-card {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.08fr);
  gap: 30px;
  align-items: stretch;
  padding: 22px;
}

.detail-gallery {
  display: grid;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}

.detail-main-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--soft);
  border: 1px solid #edf2ed;
  border-radius: var(--radius);
}

.detail-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.detail-thumbs img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.detail-info {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
  padding: 8px 6px;
}

.detail-info h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.22;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.detail-info .subtitle {
  max-width: 62ch;
  margin: 0;
  color: var(--muted);
}

.detail-price-line {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  padding: 16px;
  background: var(--soft);
  border: 1px solid rgba(31, 117, 73, 0.14);
  border-radius: var(--radius);
}

.detail-price-line > span:last-child {
  color: var(--muted);
}

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

.detail-service-list span {
  padding: 6px 10px;
  color: var(--green);
  background: #f3f9f4;
  border: 1px solid rgba(31, 117, 73, 0.16);
  border-radius: 999px;
  font-weight: 800;
}

.detail-promotion-list {
  display: grid;
  gap: 8px;
}

.detail-promotion-list span {
  padding: 10px 12px;
  color: #7a5519;
  background: #fff9e9;
  border: 1px solid #ead8aa;
  border-radius: var(--radius);
  font-weight: 800;
}

.detail-tabs {
  position: sticky;
  top: 76px;
  z-index: 8;
  display: flex;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  min-width: 0;
  max-width: 100%;
}

.detail-tabs a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
}

.detail-tabs a:hover {
  color: var(--green);
  border-color: rgba(31, 117, 73, 0.38);
  background: var(--soft);
}

.detail-section {
  padding: 24px;
  scroll-margin-top: 104px;
}

.detail-section h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.detail-section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.detail-section-head h2 {
  margin-bottom: 4px;
}

.detail-section-head p,
.detail-section-head span {
  margin: 0;
  color: var(--muted);
}

.detail-rich {
  margin-top: 0;
}

.detail-rich img {
  max-width: 100%;
}

.detail-images {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.product-attrs {
  gap: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.product-attrs div {
  grid-template-columns: 140px 1fr;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.product-attrs div:first-child {
  border-top: 0;
}

.product-attrs dt {
  color: var(--muted);
}

.product-attrs dd {
  overflow-wrap: anywhere;
}

.detail-comments {
  display: grid;
  gap: 14px;
}

.detail-comment-list {
  display: grid;
  gap: 12px;
}

.detail-comment-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: #fbfdfb;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.comment-head {
  display: flex;
  gap: 10px;
  align-items: center;
}

.comment-head img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  background: var(--soft);
  border-radius: 50%;
}

.comment-head strong,
.comment-head span {
  display: block;
}

.comment-head span,
.detail-comment-card p {
  color: var(--muted);
}

.detail-comment-card p {
  margin: 0;
}

.comment-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.comment-images img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.seller-reply {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.referral-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.7fr) auto;
  gap: 12px;
  align-items: center;
}

.referral-summary div {
  min-width: 0;
  padding: 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.referral-summary span,
.referral-summary strong {
  display: block;
}

.referral-summary span {
  color: var(--muted);
  font-size: 13px;
}

.referral-summary strong {
  margin-top: 5px;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }

  .nav-links {
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
  }

  .header-actions {
    display: flex;
    justify-content: flex-end;
    width: auto;
  }

  .header-actions .text-action,
  .header-actions .icon-action,
  .header-actions .member-entry {
    min-width: 0;
    padding: 0 12px;
  }

  .storefront-shell {
    width: calc(100% - 32px);
    padding-top: 22px;
  }

  .store-command {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .member-shell {
    grid-template-columns: 1fr;
    width: calc(100% - 32px);
    padding-top: 22px;
  }

  .member-sidebar {
    position: static;
  }

  .member-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .member-summary-grid,
  .member-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-editor {
    grid-template-columns: 1fr;
  }

  .store-command h1 {
    max-width: none;
    font-size: 34px;
  }

  .store-command p {
    max-width: 100%;
  }

  .shop-layout {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: static;
  }

  .category-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-hero-card {
    grid-template-columns: 1fr;
  }

  .detail-tabs {
    top: 0;
    overflow-x: auto;
  }

  .about-shell {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .about-menu {
    position: sticky;
    top: 84px;
    z-index: 9;
    padding: 12px;
  }

  .about-menu nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .about-menu a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .about-statement-grid,
  .about-values {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 640px) {
  #siteHeader {
    min-height: 70px;
  }

  #siteFooter {
    min-height: 260px;
  }

  .site-header {
    padding: 12px 16px;
    overflow: hidden;
  }

  .site-header > *,
  .nav-links,
  .header-actions,
  .store-command,
  .store-command-copy,
  .store-command-panel,
  .hero-search-panel {
    min-width: 0;
    max-width: 100%;
  }

  .nav-links {
    -webkit-overflow-scrolling: touch;
  }

  .header-actions .text-action,
  .header-actions .icon-action,
  .header-actions .member-entry {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .storefront-shell {
    width: calc(100% - 24px);
  }

  .member-shell {
    width: calc(100% - 24px);
  }

  .member-sidebar {
    padding: 12px;
  }

  .member-nav {
    grid-template-columns: 1fr 1fr;
  }

  .member-nav a,
  .member-nav button {
    padding: 10px;
  }

  .member-nav small {
    display: none;
  }

  .member-page-head,
  .member-card {
    padding: 16px;
  }

  .member-page-head {
    flex-direction: column;
    align-items: stretch;
  }

  .member-page-head h1 {
    font-size: 28px;
  }

  .member-summary-grid,
  .member-action-grid {
    grid-template-columns: 1fr;
  }
  .referral-summary {
    grid-template-columns: 1fr;
  }

  .member-card-head {
    flex-direction: column;
  }

  .member-profile-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .member-profile-card img,
  .profile-preview img {
    width: 64px;
    height: 64px;
  }

  .store-command {
    padding: 16px;
    gap: 14px;
  }

  .store-command h1 {
    font-size: 28px;
  }

  .store-command p {
    font-size: 15px;
    word-break: break-word;
  }

  .hero-search-panel,
  .shop-main > .shop-toolbar {
    grid-template-columns: 1fr;
  }

  .category-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-search-panel {
    width: 100%;
    border-radius: var(--radius);
  }

  .shop-main {
    padding: 16px;
  }

  .order-tabs {
    gap: 8px;
    padding: 10px;
  }

  .order-tabs a {
    flex: 1 1 calc(50% - 8px);
    justify-content: space-between;
    min-width: 0;
  }

  .order-card .order-head,
  .order-card .order-foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .order-card .order-steps {
    padding-inline: 12px;
    overflow-x: auto;
  }

  .order-card .order-steps::before {
    left: 26px;
    right: 26px;
  }

  .order-card .order-steps span {
    min-width: 76px;
  }

  .order-card .order-item {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .order-card .order-item strong {
    grid-column: 2;
    justify-self: start;
  }

  .order-actions {
    justify-content: stretch;
  }

  .order-actions button {
    flex: 1 1 auto;
  }

  .card-actions {
    grid-template-columns: 1fr;
  }

  .detail-info h1 {
    font-size: 26px;
  }

  .detail-hero-card,
  .detail-section {
    padding: 16px;
  }

  .detail-tabs {
    margin-inline: -2px;
  }

  .detail-tabs a {
    white-space: nowrap;
  }

  .detail-section-head {
    flex-direction: column;
  }

  .product-attrs div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .about-shell {
    width: calc(100% - 24px);
    padding-top: 18px;
  }

  .about-menu {
    top: 76px;
  }

  .about-menu strong {
    display: none;
  }

  .about-menu a {
    padding: 8px 9px;
    font-size: 15px;
  }

  .about-hero,
  .about-section {
    padding: 20px;
  }

  .about-hero h1,
  .about-hero h2 {
    font-size: 24px;
  }

  .about-hero p,
  .culture-section p:first-of-type {
    font-size: 16px;
  }

  .about-section h2 {
    font-size: 21px;
  }

  .about-section h3 {
    font-size: 18px;
  }

  .contact-section dl div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .ai-page-shell {
    width: calc(100% - 24px);
    height: calc(100dvh - 84px);
    min-height: 0;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .ai-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
  }

  .ai-sidebar {
    grid-template-rows: auto minmax(0, 1fr);
    max-height: 220px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .ai-chat-panel {
    min-height: 0;
  }

  .ai-messages {
    padding: 14px;
  }

  .ai-message,
  .ai-message.user {
    grid-template-columns: 30px minmax(0, 1fr);
    justify-content: stretch;
    gap: 8px;
  }

  .ai-message.user {
    justify-content: flex-end;
  }

  .ai-message.user .ai-bubble {
    max-width: calc(100% - 38px);
  }

  .ai-message.user .ai-avatar {
    flex-basis: 30px;
  }

  .ai-avatar {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .ai-composer-actions {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  .ai-upload-trigger {
    width: 100%;
  }

  .ai-send-button {
    width: 100%;
  }

  .ai-composer-hint {
    grid-column: 1 / -1;
    order: 3;
    white-space: normal;
  }

  .ai-agreement-panel {
    margin: 18px auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 520px) {
  .brand {
    gap: 10px;
    padding-right: 4px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 20px;
  }

  .brand-copy {
    transform: translateY(1px);
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .brand-copy small {
    display: none;
  }

  .header-actions {
    gap: 6px;
  }

  .header-actions .icon-action,
  .header-actions .member-entry {
    width: auto;
    min-height: 38px;
    padding: 0 10px;
  }

  .site-footer-inner {
    width: calc(100% - 24px);
  }
}

@media (max-width: 420px) {
  .cart-action-label {
    display: none;
  }
}
