:root {
  --ink: #15201c;
  --muted: #66736f;
  --line: #d9e3df;
  --paper: #fbfdfb;
  --soft: #eef6f1;
  --green: #1f7a56;
  --teal: #0d6f7b;
  --gold: #d7982b;
  --red: #b64035;
  --shadow: 0 16px 40px rgba(26, 50, 43, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  line-height: 1.55;
}
button, input, textarea, select {
  font: inherit;
}
button {
  border: 0;
  border-radius: 6px;
  padding: 10px 14px;
  color: white;
  background: var(--green);
  cursor: pointer;
}
button:hover { filter: brightness(.96); }
button.secondary, .topbar nav button, .footer button, .platform-back button {
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
}
button.danger { background: var(--red); }
button:disabled {
  cursor: not-allowed;
  background: #b9c4c0;
}
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
}
label { display: grid; gap: 6px; color: var(--muted); font-size: 14px; }
pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #f5f7f5;
  padding: 12px;
  border-radius: 6px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 24px;
  background: rgba(251, 253, 251, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.brand {
  color: var(--green);
  background: transparent;
  font-size: 22px;
  font-weight: 800;
  padding: 6px 0;
}
.topbar nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.topbar nav button.active {
  color: white;
  background: var(--teal);
}
.bottom-nav {
  display: none;
}

.home-topbar {
  position: sticky;
  top: 0;
  z-index: 28;
  display: grid;
  grid-template-columns: minmax(230px, 310px) minmax(260px, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 12px max(22px, calc((100% - 1320px) / 2));
  background: rgba(255, 255, 255, .78);
  border-bottom: 1px solid rgba(255, 255, 255, .68);
  box-shadow: 0 14px 38px rgba(21, 50, 45, .1);
  backdrop-filter: blur(18px);
}
.home-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  min-width: 0;
  padding: 0;
  color: var(--green);
  background: transparent;
}
.home-logo-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: white;
  background:
    radial-gradient(circle at 50% 20%, rgba(255,255,255,.5), transparent 28%),
    linear-gradient(145deg, #237a54, #0d6f7b);
  font-weight: 800;
  box-shadow: inset 0 -8px 16px rgba(0, 0, 0, .12);
}
.home-brand b,
.home-brand small {
  display: block;
  text-align: left;
}
.home-brand b {
  color: var(--green);
  font-size: 23px;
  line-height: 1.1;
}
.home-brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.home-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  align-items: center;
  max-width: 620px;
  justify-self: center;
  width: 100%;
  padding: 4px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(217, 227, 223, .78);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 10px 28px rgba(29, 55, 49, .06);
}
.home-search input {
  height: 38px;
  border: 0;
  background: transparent;
  padding-left: 18px;
}
.home-search button {
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0d6f7b, #1f7a56);
}
.home-nav {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}
.home-nav button {
  color: var(--ink);
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(217, 227, 223, .78);
  box-shadow: 0 8px 22px rgba(29, 55, 49, .05);
}
.home-nav button.active {
  color: white;
  background: var(--green);
}
.home-page {
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 42%, rgba(13, 111, 123, .12), transparent 28%),
    radial-gradient(circle at 88% 70%, rgba(215, 152, 43, .12), transparent 30%),
    linear-gradient(180deg, #f6fbfb 0, #fbfdfb 42%, #edf8f7 100%);
}
.home-hero {
  position: relative;
  min-height: max(640px, calc(100svh - 73px));
  display: grid;
  align-items: center;
  padding: 112px 24px 150px;
  color: white;
  background-image:
    linear-gradient(180deg, rgba(5, 19, 25, .5), rgba(5, 19, 25, .22) 38%, rgba(5, 19, 25, .72)),
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, .18), transparent 24%),
    linear-gradient(90deg, rgba(5, 19, 25, .64), rgba(5, 19, 25, .08), rgba(5, 19, 25, .5)),
    url("/images/guyuhu-bg.jpg"),
    linear-gradient(135deg, #0b3c49, #4b8d78 55%, #d7b46a);
  background-size: cover;
  background-position: center;
}
.home-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 180px;
  background: linear-gradient(180deg, transparent, rgba(246, 251, 251, .98));
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
  margin: 0 auto;
  text-align: center;
}
.hero-kicker {
  display: inline-flex;
  margin: 0 0 18px;
  padding: 8px 14px;
  color: rgba(255,255,255,.88);
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  backdrop-filter: blur(12px);
}
.eyebrow {
  margin: 0 0 10px;
  color: #dfeee8;
  font-weight: 700;
}
h1, h2, h3, p { margin-top: 0; }
.home-hero h1 {
  margin-bottom: 18px;
  font-size: 92px;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 16px 40px rgba(0, 0, 0, .42);
}
.subtitle {
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: 10px;
  font-size: 30px;
  letter-spacing: 0;
  text-shadow: 0 8px 24px rgba(0, 0, 0, .28);
}
.hero-desc {
  max-width: 760px;
  margin: 0 auto;
  color: rgba(255,255,255,.92);
  font-size: 18px;
  text-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}
.contact {
  display: inline-block;
  padding: 8px 12px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 6px;
  font-weight: 700;
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 32px;
}
.home-hero .hero-actions button,
.hero-call {
  min-height: 52px;
  min-width: 198px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  box-shadow: 0 18px 40px rgba(7, 24, 29, .26);
}
.home-hero .hero-actions button {
  background: linear-gradient(135deg, #2d965f, #0d6f7b);
}
.home-hero .hero-actions button.secondary,
.hero-call {
  color: var(--ink);
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(255, 255, 255, .72);
}
.hero-stats {
  width: min(520px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 34px auto 0;
  padding: 12px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  box-shadow: 0 16px 50px rgba(0,0,0,.12);
  backdrop-filter: blur(14px);
}
.hero-stats span {
  display: grid;
  gap: 2px;
  padding: 8px;
}
.hero-stats b {
  font-size: 28px;
  line-height: 1;
}
.hero-stats small {
  color: rgba(255,255,255,.82);
}
.home-quick {
  width: min(1180px, calc(100% - 32px));
  margin: -84px auto 36px;
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
.home-quick button {
  min-width: 0;
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 152px;
  padding: 20px 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, .76);
  border: 1px solid rgba(255, 255, 255, .88);
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(23, 64, 56, .12);
  text-align: center;
  backdrop-filter: blur(16px);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.home-quick button:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 28px 62px rgba(23, 64, 56, .18);
}
.home-quick span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: var(--green);
  font-size: 22px;
  font-weight: 800;
}
.home-quick button:nth-child(2) span { background: #346fd1; }
.home-quick button:nth-child(3) span { background: #d16f36; }
.home-quick button:nth-child(4) span { background: #8c55b4; }
.home-quick button:nth-child(5) span { background: var(--gold); }
.home-quick b {
  font-size: 18px;
  line-height: 1.2;
  white-space: nowrap;
}
.home-quick small {
  color: var(--muted);
  font-size: 13px;
}
.home-story {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 18px;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 28px;
  align-items: end;
  padding: 38px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.88);
  border-radius: 8px;
  box-shadow: 0 20px 55px rgba(23, 64, 56, .1);
  backdrop-filter: blur(14px);
}
.home-story span,
.portal-title span {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}
.home-story h2 {
  margin: 0;
  max-width: 760px;
  font-size: 34px;
  line-height: 1.22;
}
.home-story p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}
.home-section {
  padding-top: 46px;
}
.standalone {
  min-height: 62vh;
}
.section.soft {
  width: 100%;
  padding-inline: max(16px, calc((100% - 1180px) / 2));
  background: var(--soft);
}
.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.section-title h1, .section-title h2 { margin: 0; }
.section-title span { color: var(--muted); }
.portal-title {
  align-items: center;
}
.portal-title h2 {
  font-size: 34px;
}
.portal-title > button {
  color: var(--green);
  background: rgba(255,255,255,.76);
  border: 1px solid rgba(217, 227, 223, .88);
}
.portal-title > small {
  color: var(--muted);
}

.home-search-results {
  padding-top: 24px;
}
.home-search-group {
  margin-top: 18px;
}
.home-search-group > h3 {
  margin: 0 0 12px;
  font-size: 18px;
}
.home-search-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.home-search-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(217, 227, 223, .88);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(31, 78, 67, .08);
}
.home-search-card span {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}
.home-search-card h3 {
  margin: 0;
  font-size: 20px;
}
.home-search-card p,
.home-search-card small {
  margin: 0;
  color: var(--muted);
}
.home-search-card button {
  justify-self: start;
  margin-top: 4px;
}

.store-grid {
  column-count: 3;
  column-gap: 22px;
}
.store-card {
  display: inline-block;
  width: 100%;
  break-inside: avoid;
  margin: 0 0 22px;
  overflow: hidden;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(255,255,255,.94);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(31, 78, 67, .12);
  backdrop-filter: blur(12px);
  transition: transform .18s ease, box-shadow .18s ease;
}
.store-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 58px rgba(31, 78, 67, .16);
}
.store-photo {
  min-height: 190px;
  display: flex;
  align-items: start;
  justify-content: end;
  padding: 12px;
  background-image:
    linear-gradient(135deg, rgba(36,79,84,.72), rgba(108,159,131,.5) 62%, rgba(224,178,85,.42)),
    linear-gradient(135deg, #244f54, #6c9f83 62%, #e0b255);
  background-size: cover;
  background-position: center;
}
.store-photo span, .tags b, .basic-card span, .sold {
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
  color: white;
  background: var(--gold);
}
.store-body { padding: 18px; }
.store-body h3 {
  margin-bottom: 8px;
  font-size: 21px;
}
.store-body > p:not(.meta) {
  min-height: 48px;
  margin-bottom: 10px;
  color: var(--muted);
}
.store-body button {
  min-width: 112px;
  margin-top: 8px;
  background: linear-gradient(135deg, #1f7a56, #0d6f7b);
}
.tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.tags span, .chips span {
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--teal);
  background: #e4f2ef;
  font-size: 12px;
}
.meta { color: var(--muted); margin-bottom: 6px; }
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 16px;
}

.basic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.basic-card {
  padding: 16px;
  background: rgba(255,255,255,.78);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.basic-card h3 { margin: 10px 0 8px; font-size: 19px; }
.basic-card p { color: var(--muted); font-size: 14px; }
.basic-card button { padding: 8px 10px; color: var(--green); background: white; border: 1px solid var(--line); }
.locked-basic {
  box-shadow: var(--shadow);
}

.list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.info-card {
  padding: 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.post-image {
  height: 128px;
  min-height: 128px;
  margin: -4px -4px 12px;
  overflow: hidden;
  border-radius: 6px;
  background-color: #edf4ef;
  background-size: cover;
  background-position: center;
}
.post-image img,
.item-img img,
.gallery-img img,
.item-detail-image img,
.thumb-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.info-card span { color: var(--green); font-weight: 700; }
.info-card p { color: var(--muted); margin-bottom: 7px; }

.shop-hero {
  min-height: 430px;
  display: grid;
  align-items: end;
  padding: 56px max(24px, calc((100% - 1180px) / 2));
  color: white;
  background-image: linear-gradient(90deg, rgba(8,28,36,.75), rgba(8,28,36,.15)), linear-gradient(135deg, #173e46, #55906e, #cf9b3c);
  background-size: cover;
  background-position: center;
}
.shop-hero h1 { font-size: clamp(36px, 7vw, 72px); line-height: 1.05; }
.shop-hero p { max-width: 760px; font-size: 18px; }
.shop-hero-copy {
  display: grid;
  gap: 14px;
  max-width: 780px;
}
.shop-intro-card {
  width: min(1180px, calc(100% - 32px));
  display: grid;
  gap: 14px;
  margin: 16px auto 0;
  padding: 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.shop-summary {
  margin: 0;
  font-weight: 700;
}
.shop-info-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 860px;
  margin: 0;
}
.shop-info-list div {
  padding: 10px 12px;
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.shop-info-list dt {
  color: var(--muted);
  font-size: 12px;
}
.shop-info-list dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-weight: 800;
}
.shop-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.shop-hero-actions button {
  min-width: 132px;
  min-height: 44px;
  font-weight: 800;
}
.shop-navigation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.shop-navigation-actions button,
.shop-navigation-actions .button-link {
  min-width: 132px;
  min-height: 44px;
  font-weight: 800;
}
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  color: white;
  text-decoration: none;
  background: var(--green);
  border: 0;
  border-radius: 6px;
  box-shadow: var(--shadow);
}
.button-link.secondary {
  color: var(--green);
  background: #eef7f1;
  border: 1px solid #cfe2d9;
  box-shadow: none;
}
.shop-empty-state {
  padding: 18px;
  background: white;
  border: 1px dashed #9ab1aa;
  border-radius: 8px;
}
.shop-empty-state h2 {
  margin: 0 0 8px;
  font-size: 22px;
}
.shop-empty-state p {
  margin: 0 0 14px;
  color: var(--muted);
}
.shop-order-section {
  padding-top: 0;
}
.shop-order-section .order-box {
  position: static;
  max-width: 720px;
}
.notice, .hint {
  width: min(1180px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 12px 14px;
  color: #705118;
  background: #fff7df;
  border: 1px solid #ecd694;
  border-radius: 8px;
}
.hint { width: auto; margin: 10px 0; }
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: start;
}
.item-list, .admin-items, .order-list {
  display: grid;
  gap: 12px;
}
.shop-category-bar {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.shop-category-bar button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 8px 13px;
  color: var(--green);
  background: #f7faf8;
  border: 1px solid #cfe2d9;
  border-radius: 999px;
  white-space: nowrap;
}
.shop-category-bar button.active {
  color: white;
  background: var(--green);
  border-color: var(--green);
}
.shop-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.item-img {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 6px;
  background-image: linear-gradient(135deg, #edf4ef, #c9ded4);
  background-size: cover;
  background-position: center;
}
.item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.item-head h3 { margin-bottom: 4px; }
.deal-type-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0 0 8px;
  padding: 4px 9px;
  color: var(--green);
  background: #eef8f2;
  border: 1px solid #cfe2d9;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.sold { background: #7d8583; }
.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.stepper button {
  width: 34px;
  height: 34px;
  padding: 0;
}
.shop-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.shop-item-actions button {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 14px;
}
.buy-intent-primary {
  background: var(--green);
}
.buy-intent-secondary {
  color: var(--green);
  background: #f2f8f5;
  border: 1px solid #cfe2d9;
}
.soldout-action {
  color: #6b7471;
  background: #eef1f0;
  border: 1px solid var(--line);
}
.buy-intent-panel {
  display: grid;
  gap: 6px;
  padding: 14px;
  background: #f2f8f5;
  border: 1px solid #cfe2d9;
  border-radius: 8px;
}
.buy-intent-panel span {
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}
.buy-intent-panel b {
  font-size: 18px;
}
.buy-intent-panel p {
  margin: 0;
  color: var(--muted);
}
.item-detail-drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: end center;
}
.item-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 30, 26, .42);
}
.item-detail-panel {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 24px));
  max-height: min(86vh, 760px);
  overflow: auto;
  margin: 0 auto 18px;
  padding: 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 72px rgba(31, 78, 67, .22);
}
.item-detail-close {
  float: right;
  color: var(--green);
  background: #f2f8f5;
  border: 1px solid #cfe2d9;
}
.item-detail-image {
  height: 220px;
  min-height: 220px;
  margin-bottom: 14px;
  overflow: hidden;
  border-radius: 8px;
  background-image: linear-gradient(135deg, #edf4ef, #c9ded4);
  background-size: cover;
  background-position: center;
}
.item-detail-panel h2 {
  margin: 8px 0;
  font-size: 28px;
}
.item-detail-panel > strong {
  display: block;
  margin-bottom: 10px;
  color: var(--green);
  font-size: 22px;
}
.item-detail-fields {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}
.item-detail-fields div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px;
  padding: 10px;
  background: #f8faf8;
  border-radius: 8px;
}
.item-detail-fields dt {
  color: var(--muted);
}
.item-detail-fields dd {
  margin: 0;
}
.item-detail-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.72), white 38%);
}
.contact-merchant-drawer {
  position: fixed;
  inset: 0;
  z-index: 62;
  display: grid;
  place-items: center;
  padding: 18px;
}
.contact-merchant-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 30, 26, .42);
}
.contact-merchant-panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: 18px;
  text-align: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 72px rgba(31, 78, 67, .22);
}
.contact-merchant-close {
  float: right;
  color: var(--green);
  background: #f2f8f5;
  border: 1px solid #cfe2d9;
}
.contact-merchant-panel h2,
.contact-merchant-panel h3 {
  margin-bottom: 10px;
}
.contact-merchant-qr {
  display: grid;
  place-items: center;
  margin: 12px 0;
}
.contact-merchant-tip,
.contact-merchant-phone {
  margin: 8px 0;
  color: var(--muted);
}
.contact-merchant-call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 10px;
  padding: 10px 16px;
  color: white;
  background: var(--green);
  border-radius: 8px;
  font-weight: 800;
}
.navigation-drawer {
  position: fixed;
  inset: 0;
  z-index: 64;
  display: grid;
  place-items: end center;
  padding: 18px;
}
.navigation-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 30, 26, .42);
}
.navigation-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  width: min(430px, 100%);
  padding: 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 72px rgba(31, 78, 67, .22);
}
.navigation-close {
  justify-self: end;
  color: var(--green);
  background: #f2f8f5;
  border: 1px solid #cfe2d9;
}
.navigation-panel h2,
.navigation-panel h3,
.navigation-panel p {
  margin: 0;
}
.navigation-panel p {
  color: var(--muted);
  line-height: 1.6;
}
.order-box, .panel, .side-panel {
  padding: 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.order-box {
  position: sticky;
  top: 78px;
}
.cart-lines p, .total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.total {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 18px;
}
form {
  display: grid;
  gap: 12px;
}
.qr-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.media-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.media-gallery article {
  padding: 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.gallery-img {
  overflow: hidden;
  min-height: 220px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border-radius: 6px;
  background-color: #edf4ef;
  background-size: cover;
  background-position: center;
}
.gallery-img.placeholder {
  border: 1px dashed #9ab1aa;
}
.qr-row article {
  padding: 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.qr-img {
  width: 180px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}
.qr-placeholder {
  width: 180px;
  height: 180px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  border: 1px dashed #9ab1aa;
  border-radius: 6px;
  background:
    repeating-linear-gradient(45deg, #fff, #fff 8px, #edf5f0 8px, #edf5f0 16px);
}
.qr-placeholder span { display: block; color: var(--ink); font-weight: 800; }
.qr-placeholder small { display: block; }
.payment-guide {
  margin: 16px 0;
  padding: 16px;
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.payment-guide h2 {
  margin-bottom: 8px;
}
.payment-fund-note,
.payment-tip,
.payment-warning {
  margin: 8px 0;
  color: var(--muted);
}
.payment-steps {
  margin: 12px 0;
  padding: 12px;
  background: #f6faf7;
  border: 1px solid #d9e8df;
  border-radius: 8px;
}
.payment-steps ol {
  margin: 8px 0 0 20px;
  padding: 0;
}
.payment-qr-card {
  display: grid;
  place-items: center;
  margin: 14px 0;
}
.payment-warning {
  font-weight: 700;
  color: var(--ink);
}
.payment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.payment-help-button {
  color: var(--green);
  background: #f7fbf8;
  border: 1px solid var(--line);
}
.payment-empty {
  margin: 12px 0;
  padding: 12px;
  color: var(--muted);
  background: #f8fbf9;
  border: 1px dashed #9ab1aa;
  border-radius: 8px;
}
.payment-qr-drawer,
.payment-confirm-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
}
.payment-qr-backdrop,
.payment-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 30, 26, .48);
}
.payment-qr-panel,
.payment-confirm-panel {
  position: relative;
  z-index: 1;
  width: min(520px, 94vw);
  max-height: 92vh;
  overflow: auto;
  padding: 18px;
  text-align: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 72px rgba(31, 78, 67, .22);
}
.payment-qr-panel {
  width: min(680px, 94vw);
}
.payment-drawer-close {
  float: right;
  color: var(--green);
  background: #f2f8f5;
  border: 1px solid #cfe2d9;
}
.payment-qr-large {
  width: min(420px, 90vw);
  max-width: 100%;
  max-height: 68vh;
  display: block;
  object-fit: contain;
  margin: 14px auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.payment-confirm-copy {
  display: block;
  margin: 12px 0;
  text-align: left;
}
.payment-confirm-copy textarea {
  width: 100%;
  margin-top: 6px;
  resize: vertical;
}
.payment-contact-block {
  display: grid;
  place-items: center;
  margin-top: 14px;
}
.platform-back {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 42px;
  padding: 16px;
  background: #f4f8f6;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.platform-back p { font-weight: 700; }

.narrow {
  width: min(760px, calc(100% - 32px));
  margin: 36px auto;
}
.success h1 { color: var(--green); }
.summary {
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.summary-list {
  display: grid;
  gap: 8px;
  margin: 0;
}
.summary-list div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px;
}
.summary-list dt {
  color: var(--muted);
}
.summary-list dd {
  margin: 0;
  font-weight: 700;
}
.purchase-summary {
  padding: 12px;
  background: #f8faf8;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.purchase-summary div:first-child dd,
.purchase-summary div:nth-child(2) dd {
  color: var(--green);
}
.admin-layout {
  width: min(1280px, calc(100% - 32px));
  margin: 24px auto 48px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.side-panel {
  position: sticky;
  top: 78px;
  display: grid;
  gap: 8px;
}
.side-panel button {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink);
  background: #f8faf8;
  border: 1px solid var(--line);
  text-align: left;
}
.side-panel button.active,
.merchant-button-grid button.active {
  color: white;
  background: var(--green);
}
.side-panel small { color: var(--green); }
.side-panel button.active small,
.merchant-button-grid button.active small { color: rgba(255,255,255,.86); }
.wide { grid-column: 1 / -1; }
.merchant-button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}
.merchant-button-grid button {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink);
  background: #f8faf8;
  border: 1px solid var(--line);
  text-align: left;
}
.merchant-button-grid small {
  color: var(--green);
}
.merchant-admin-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 24px auto 64px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.merchant-admin-content {
  min-width: 0;
  display: grid;
  gap: 18px;
}
.merchant-admin-section[hidden] {
  display: none;
}
.merchant-admin-sidebar {
  position: sticky;
  top: 78px;
  display: grid;
  gap: 8px;
  padding: 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.merchant-admin-sidebar button,
.merchant-admin-bottom-nav button,
.merchant-quick-grid button {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink);
  background: #f8faf8;
  border: 1px solid var(--line);
  text-align: left;
}
.merchant-admin-sidebar button.active,
.merchant-admin-bottom-nav button.active,
.merchant-quick-grid button.active {
  color: white;
  background: var(--green);
}
.merchant-admin-sidebar small,
.merchant-admin-bottom-nav small {
  color: var(--green);
}
.merchant-admin-sidebar button.active small,
.merchant-admin-bottom-nav button.active small {
  color: rgba(255,255,255,.86);
}
.merchant-admin-bottom-nav {
  display: none;
}
.merchant-overview-panel {
  display: grid;
  gap: 18px;
}
.merchant-overview-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.merchant-overview-stats article {
  padding: 14px;
  background: #f8faf8;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.merchant-overview-stats b {
  display: block;
  color: var(--green);
  font-size: 28px;
  line-height: 1;
}
.merchant-overview-stats span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}
.merchant-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: start;
}
.merchant-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.merchant-overview-actions {
  margin-top: 12px;
}
.merchant-overview-qr {
  padding: 14px;
  background: #f8faf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
}
.merchant-overview-qr .qr-img {
  max-width: 180px;
  width: 100%;
}
.success-box {
  padding: 18px;
  background: #f1f8f4;
  border: 1px solid #b9d9c8;
  border-radius: 8px;
}
.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
}
.upload-panel {
  display: grid;
  gap: 12px;
}
.thumb-preview {
  overflow: hidden;
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background-size: cover;
  background-position: center;
}
.empty-thumb {
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #f4f8f6;
  border-style: dashed;
}
.inline-form {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  margin-bottom: 14px;
}
.category-manager {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px;
  background: #f8fbf9;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.category-add-form {
  margin-bottom: 0;
}
.category-list {
  display: grid;
  gap: 8px;
}
.category-row form {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto auto auto auto auto;
  gap: 8px;
  align-items: center;
  margin: 0;
}
.category-row span {
  color: var(--muted);
  white-space: nowrap;
}
.file-inline {
  min-width: 160px;
}
.admin-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}
.admin-item form {
  grid-template-columns: 88px 1.1fr .5fr 1.2fr .7fr auto;
  align-items: end;
}
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.account-panel .hint {
  width: auto;
  margin: 12px 0 0;
}
.account-grid {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.account-grid p {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.account-grid b { color: var(--muted); }
.account-grid span { word-break: break-all; }
.order-list article {
  padding: 12px;
  background: #f8faf8;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.content-list {
  display: grid;
  gap: 12px;
}
.content-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  background: #f8faf8;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.content-card .post-image {
  height: 110px;
  min-height: 110px;
  margin: 0;
}
.content-card span {
  color: var(--green);
  font-weight: 700;
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.filter-row button {
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
}
.order-list span { display: block; color: var(--muted); font-size: 13px; }
.check {
  display: flex;
  align-items: center;
  gap: 8px;
}
.check input { width: auto; }
.navigation-admin-fields {
  display: grid;
  gap: 10px;
  margin: 4px 0;
  padding: 12px;
  background: #f8faf8;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.navigation-admin-fields legend {
  padding: 0 6px;
  color: var(--green);
  font-weight: 800;
}
.navigation-status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.empty {
  padding: 22px;
  color: var(--muted);
  background: #f5f8f6;
  border: 1px dashed var(--line);
  border-radius: 8px;
}
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 26px 16px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: white;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 30;
  transform: translateX(-50%);
  padding: 10px 14px;
  color: white;
  background: rgba(21, 32, 28, .92);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

@media (max-width: 900px) {
  .home-topbar {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-inline: 16px;
  }
  .home-brand,
  .home-search,
  .home-nav {
    justify-self: stretch;
  }
  .home-nav {
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 2px;
  }
  .home-hero {
    min-height: 590px;
    padding-top: 92px;
  }
  .home-hero h1 { font-size: 62px; }
  .store-grid { column-count: 2; }
  .home-quick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-story {
    grid-template-columns: 1fr;
    padding: 28px;
  }
  .home-story h2,
  .portal-title h2 {
    font-size: 28px;
  }
  .topbar { align-items: flex-start; flex-direction: column; }
  .topbar nav { justify-content: flex-start; }
  .two-col, .admin-layout, .editor-grid, .merchant-admin-shell { grid-template-columns: 1fr; }
  .content-card { grid-template-columns: 1fr; }
  .order-box, .side-panel { position: static; }
  .merchant-admin-sidebar {
    position: static;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .merchant-admin-sidebar button {
    display: grid;
    justify-items: center;
    text-align: center;
  }
  .merchant-overview-grid {
    grid-template-columns: 1fr;
  }
  .merchant-overview-stats,
  .merchant-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .inline-form, .admin-item form, .category-row form { grid-template-columns: 1fr; }
  .account-grid p { grid-template-columns: 1fr; }
  .section-title { display: block; }
}

@media (max-width: 560px) {
  body { padding-bottom: 76px; }
  .topbar {
    position: static;
    padding: 12px 16px;
  }
  .topbar nav {
    display: none;
  }
  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    background: rgba(251, 253, 251, .96);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgba(26, 50, 43, .12);
    backdrop-filter: blur(10px);
  }
  .bottom-nav button {
    min-height: 44px;
    padding: 7px 4px;
    color: var(--ink);
    background: white;
    border: 1px solid var(--line);
    font-size: 13px;
  }
  .bottom-nav button.active {
    color: white;
    background: var(--green);
  }
  .merchant-admin-shell {
    width: calc(100% - 20px);
    margin: 12px auto 100px;
    padding-bottom: 12px;
  }
  .merchant-admin-sidebar {
    display: none;
  }
  .merchant-admin-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 25;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: rgba(251, 253, 251, .97);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgba(26, 50, 43, .12);
    backdrop-filter: blur(10px);
  }
  .merchant-admin-bottom-nav button {
    min-height: 48px;
    padding: 6px 3px;
    display: grid;
    justify-items: center;
    align-content: center;
    font-size: 13px;
    text-align: center;
  }
  .merchant-admin-bottom-nav small {
    display: none;
  }
  .merchant-overview-stats,
  .merchant-overview-grid,
  .merchant-quick-grid {
    grid-template-columns: 1fr;
  }
  .home-topbar {
    position: static;
    gap: 12px;
  }
  .home-brand small {
    white-space: normal;
  }
  .home-search {
    grid-template-columns: minmax(0, 1fr) 70px;
  }
  .home-search-grid {
    grid-template-columns: 1fr;
  }
  .home-nav {
    display: none;
  }
  .home-hero {
    min-height: 500px;
    padding: 58px 18px 88px;
  }
  .hero-kicker {
    font-size: 11px;
    padding: 7px 10px;
  }
  .home-hero h1 { font-size: 46px; }
  .subtitle { font-size: 20px; }
  .hero-desc { font-size: 15px; }
  .hero-actions { display: grid; }
  .shop-hero {
    min-height: 460px;
    padding: 42px 18px;
  }
  .shop-hero h1 {
    font-size: 42px;
  }
  .shop-hero p {
    font-size: 16px;
  }
  .shop-info-list {
    grid-template-columns: 1fr;
  }
  .shop-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .shop-navigation-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .shop-navigation-actions .button-link {
    width: 100%;
  }
  .hero-stats {
    grid-template-columns: 1fr;
    gap: 4px;
    margin-top: 22px;
  }
  .hero-stats span {
    grid-template-columns: auto 1fr;
    align-items: baseline;
    justify-content: center;
  }
  .home-quick {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: -42px;
  }
  .home-quick button {
    grid-template-columns: 52px minmax(0, 1fr);
    grid-template-rows: auto auto;
    place-items: center start;
    min-height: 92px;
    text-align: left;
  }
  .home-quick span {
    grid-row: 1 / 3;
  }
  .home-story {
    padding: 22px;
  }
  .store-grid { column-count: 1; }
  .store-photo { min-height: 176px; }
  .shop-item { grid-template-columns: 86px minmax(0, 1fr); }
  .shop-item-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .shop-item-actions button {
    width: 100%;
  }
  .item-detail-drawer {
    place-items: end stretch;
  }
  .item-detail-panel {
    width: 100%;
    max-height: 88vh;
    margin: 0;
    padding: 16px 14px calc(18px + env(safe-area-inset-bottom));
    border-radius: 8px 8px 0 0;
  }
  .item-detail-image {
    height: 180px;
    min-height: 180px;
  }
  .item-detail-fields div {
    grid-template-columns: 1fr;
  }
  .item-detail-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .item-detail-actions button {
    width: 100%;
  }
  .topbar nav button { padding: 8px 10px; }
  .footer { padding-bottom: 90px; }
}
