:root {
  --bg: #f6f0e4;
  --paper: #fffaf2;
  --paper-2: #f1e4cd;
  --ink: #17241e;
  --muted: #697266;
  --soft: #8c806b;
  --line: #dccaa5;
  --green: #1f5d43;
  --deep: #0c2b20;
  --gold: #bd8d3d;
  --gold-2: #efd49b;
  --red: #80392d;
  --mist: #e8f0e6;
  --radius: 8px;
  --shadow: 0 14px 36px rgba(22, 34, 28, .12);
  color: var(--ink);
  font-family: "Microsoft YaHei UI", "PingFang SC", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: #102c22; }
body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, #102c22 0, #213f32 250px, #d9c9ac 640px, #efe4d1 100%),
    url("../images/tea-paper-bg.png") center top / 860px auto repeat;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
main { padding-bottom: 116px; }

.phone {
  position: relative;
  width: min(430px, 100%);
  min-height: 100svh;
  margin: 0 auto;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,250,242,.08), rgba(246,240,228,.78) 450px, rgba(246,240,228,.98)),
    url("../images/tea-paper-bg.png") center top / 820px auto repeat;
  box-shadow: 0 30px 90px rgba(0,0,0,.26);
}

.phone::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(239,212,155,.14), transparent),
    radial-gradient(circle at 92% 420px, rgba(31,93,67,.12), transparent 210px);
  mask-image: linear-gradient(180deg, transparent 0, #000 110px, #000 78%, transparent 100%);
}

.top, main, .bottom, .toast { position: relative; z-index: 1; }

.top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 56px;
  padding: 8px 14px;
  color: #fff6df;
  background: rgba(11, 43, 32, .88);
  border-bottom: 1px solid rgba(239,212,155,.22);
  box-shadow: 0 10px 24px rgba(0,0,0,.14);
  backdrop-filter: blur(16px);
}

.seller { display: flex; align-items: center; min-width: 0; gap: 9px; }
.seller-logo {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(239,212,155,.7);
  border-radius: 50%;
  color: #f8dfa5;
  background: rgba(255,255,255,.08);
  font-family: "STSong", "SimSun", serif;
  font-size: 18px;
  font-weight: 700;
}
.seller-name {
  min-width: 0;
  overflow: hidden;
  font-family: "STSong", "SimSun", "Microsoft YaHei UI", serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.seller-name span {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: rgba(255,248,230,.66);
  font-family: "Microsoft YaHei UI", "PingFang SC", Arial, sans-serif;
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
}
.top-btn {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(239,212,155,.36);
  border-radius: var(--radius);
  color: #ffe2a4;
  background: rgba(255,255,255,.08);
  font-size: 12px;
  font-weight: 800;
}

.hero {
  position: relative;
  min-height: auto;
  padding: 16px 14px 14px;
  color: #fff8e8;
  background:
    linear-gradient(180deg, rgba(10,38,29,.76), rgba(10,38,29,.96)),
    url("../images/tea-paper-bg.png") center top / 820px auto;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-image) center bottom / cover;
  opacity: .28;
  filter: saturate(.95);
}

.hero::after {
  content: "简境茶庭";
  position: absolute;
  right: 16px;
  top: 116px;
  color: rgba(255,238,196,.2);
  font-family: "STSong", "SimSun", serif;
  font-size: 18px;
  writing-mode: vertical-rl;
  letter-spacing: 4px;
}

.pill, .hero h1, .hero p, .hero-actions, .quick-grid { position: relative; z-index: 1; }

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(239,212,155,.42);
  border-radius: var(--radius);
  color: #ffe2a4;
  background: rgba(255,255,255,.08);
  font-size: 12px;
  font-weight: 800;
}

.hero h1 {
  max-width: 8em;
  margin: 58px 0 9px;
  color: #fffaf0;
  font-family: "STSong", "SimSun", "Microsoft YaHei UI", serif;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.06;
  text-shadow: 0 14px 32px rgba(0,0,0,.28);
}
.hero h1::before {
  content: "";
  display: block;
  width: 42px;
  height: 2px;
  margin-bottom: 10px;
  background: linear-gradient(90deg, var(--gold-2), transparent);
}
.hero h1 span {
  display: block;
  max-width: 18em;
  margin-top: 8px;
  color: #efd49b;
  font-family: "Microsoft YaHei UI", "PingFang SC", Arial, sans-serif;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}

.hero p {
  max-width: 318px;
  margin: 0;
  color: rgba(255,248,230,.78);
  font-size: 13px;
  line-height: 1.68;
}

.hero-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 14px;
}
.hero-actions a, .hero-actions button {
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 900;
}
.hero-actions a {
  color: #14251d;
  background: linear-gradient(135deg, #ffe8af, #bd8d3d);
  box-shadow: 0 12px 26px rgba(0,0,0,.2);
}
.hero-actions button {
  border: 1px solid rgba(255,232,174,.34);
  color: #fff8e8;
  background: rgba(255,255,255,.08);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid rgba(239,212,155,.2);
  border-radius: var(--radius);
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
}
.quick-item {
  min-height: 58px;
  padding: 8px 7px;
  border-right: 1px solid rgba(239,212,155,.16);
  color: rgba(255,248,230,.7);
  font-size: 11px;
  line-height: 1.35;
}
.quick-item:last-child { border-right: 0; }
.quick-item strong {
  display: block;
  margin-bottom: 4px;
  color: #ffe2a4;
  font-size: 15px;
  font-weight: 900;
}

.notice {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin: 12px 14px 0;
  padding: 12px 13px 12px 15px;
  border: 1px solid rgba(189,141,61,.36);
  border-radius: var(--radius);
  color: #5d523f;
  background:
    linear-gradient(135deg, rgba(255,250,242,.98), rgba(241,228,205,.96)),
    url("../images/tea-paper-bg.png") center / 820px auto;
  box-shadow: var(--shadow);
  font-size: 12px;
  line-height: 1.58;
}
.notice::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  bottom: 11px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold), var(--green));
}
.notice strong { color: var(--red); white-space: nowrap; }

.section {
  position: relative;
  z-index: 1;
  padding: 24px 14px 0;
}

#goods {
  scroll-margin-top: 112px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.section-title h2 {
  margin: 0;
  color: #162a21;
  font-family: "STSong", "SimSun", "Microsoft YaHei UI", serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}
.section-title h2::after {
  content: "";
  display: block;
  width: 46px;
  height: 2px;
  margin-top: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), rgba(31,93,67,.32), transparent);
}
.section-title span {
  flex: 0 0 auto;
  max-width: 48%;
  overflow: hidden;
  padding: 5px 8px;
  border: 1px solid rgba(189,141,61,.2);
  border-radius: var(--radius);
  color: #7b705f;
  background: rgba(255,250,242,.62);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recommend-scroll {
  display: flex;
  gap: 12px;
  margin: 0 -14px;
  padding: 0 14px 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-padding-left: 14px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.recommend-scroll::-webkit-scrollbar { display: none; }
.recommend-scroll.dragging { cursor: grabbing; scroll-snap-type: none; }
.recommend {
  flex: 0 0 86%;
  overflow: hidden;
  border: 1px solid rgba(189,141,61,.36);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255,250,242,.98), rgba(241,228,205,.96)),
    url("../images/tea-paper-bg.png") center / 820px auto;
  box-shadow: var(--shadow);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.recommend-pic {
  position: relative;
  height: 198px;
  overflow: hidden;
  background: #ddd1b8;
}
.recommend-pic::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 36%, rgba(10,38,29,.72));
}
.recommend-no {
  position: absolute;
  right: 12px;
  top: 10px;
  z-index: 1;
  color: rgba(255,237,192,.84);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 700;
}
.recommend-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 1;
  max-width: calc(100% - 24px);
  overflow: hidden;
  padding: 6px 9px;
  border: 1px solid rgba(255,232,174,.28);
  border-radius: 6px;
  color: #ffe2a4;
  background: rgba(10,38,29,.86);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recommend-body { padding: 14px; }
.recommend h3 {
  margin: 0 0 6px;
  color: #162a21;
  font-family: "STSong", "SimSun", "Microsoft YaHei UI", serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.28;
}
.recommend p {
  margin: 0 0 12px;
  color: #646c62;
  font-size: 13px;
  line-height: 1.68;
}
.recommend-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(189,141,61,.22);
}
.recommend-foot strong { color: var(--red); font-size: 17px; }
.recommend-foot button, .add, .main-btn, .bottom button {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #236b50, #0d3024);
  box-shadow: 0 8px 18px rgba(10,48,36,.18);
  font-weight: 900;
}
.recommend-foot button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: var(--radius);
  font-size: 12px;
}
.recommend-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding-top: 2px;
}
.recommend-dot {
  width: 18px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(189,141,61,.28);
  transition: width .18s ease, background .18s ease;
}
.recommend-dot.active { width: 30px; background: var(--green); }

.tabs {
  position: sticky;
  top: 56px;
  z-index: 18;
  display: flex;
  gap: 8px;
  margin: 0 -14px 12px;
  padding: 9px 14px 10px;
  overflow-x: auto;
  border-top: 1px solid rgba(255,255,255,.38);
  border-bottom: 1px solid rgba(189,141,61,.18);
  background:
    linear-gradient(180deg, rgba(251,246,235,.96), rgba(240,230,210,.92)),
    url("../images/tea-paper-bg.png") center / 820px auto;
  backdrop-filter: blur(14px);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(189,141,61,.26);
  border-radius: var(--radius);
  color: #2b4438;
  background: rgba(255,250,242,.78);
  font-size: 13px;
  font-weight: 800;
}
.tab.active {
  border-color: var(--green);
  color: #fff;
  background: linear-gradient(135deg, #1f654b, #0d3024);
}

.cargo-list {
  display: grid;
  gap: 14px;
  padding-bottom: 4px;
}
.cargo {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 11px;
  min-height: 150px;
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(189,141,61,.34);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255,250,242,.98), rgba(241,228,205,.94)),
    url("../images/tea-paper-bg.png") center / 820px auto;
  box-shadow: 0 12px 30px rgba(22,34,28,.1);
}
.cargo-pic {
  position: relative;
  min-height: 130px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #ddd1b8;
}
.cargo-pic span {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  max-width: calc(100% - 16px);
  overflow: hidden;
  padding: 4px 7px;
  border-radius: 6px;
  color: #ffe2a4;
  background: rgba(10,38,29,.84);
  font-size: 10px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cargo-pic::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 -46px 48px rgba(10,38,29,.22);
  pointer-events: none;
}
.cargo-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.cargo h3 {
  margin: 1px 0 6px;
  color: #162a21;
  font-family: "STSong", "SimSun", "Microsoft YaHei UI", serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.28;
}
.cargo-desc {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 7px;
  color: #636b61;
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.cargo-spec {
  display: grid;
  gap: 5px;
  margin-bottom: 7px;
}
.cargo-spec span {
  overflow: hidden;
  padding: 5px 7px;
  border: 1px solid rgba(189,141,61,.18);
  border-radius: 6px;
  color: #3d4e44;
  background: rgba(255,250,242,.68);
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cargo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 7px;
}
.cargo-tags span {
  padding: 3px 6px;
  border-radius: 6px;
  color: #20533f;
  background: rgba(232,240,230,.82);
  font-size: 10px;
  font-weight: 800;
}
.cargo-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(189,141,61,.2);
}
.price {
  min-width: 0;
  color: var(--red);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.1;
}
.price small { color: #847763; font-size: 10px; }
.add {
  flex: 0 0 auto;
  min-width: 72px;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: var(--radius);
  font-size: 12px;
}
.add.added { background: linear-gradient(135deg, #80392d, #431b16); }

.rules { display: grid; gap: 10px; }
.rule {
  padding: 13px;
  border: 1px solid rgba(189,141,61,.3);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255,250,242,.96), rgba(237,244,235,.9)),
    url("../images/tea-paper-bg.png") center / 820px auto;
  box-shadow: 0 10px 26px rgba(31,42,36,.08);
}
.rule b { display: block; margin-bottom: 5px; color: #173a2c; font-size: 15px; }
.rule p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.62; }

.quote {
  position: relative;
  z-index: 1;
  margin: 18px 14px 0;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(189,141,61,.36);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255,250,242,.98), rgba(235,243,232,.94)),
    url("../images/tea-paper-bg.png") center / 820px auto;
  box-shadow: var(--shadow);
}
.quote::before {
  content: "TEA ORDER";
  position: absolute;
  right: 14px;
  top: 12px;
  color: rgba(31,93,67,.07);
  font-size: 24px;
  font-weight: 900;
}
.quote h2 {
  position: relative;
  margin: 0 0 5px;
  color: #162a21;
  font-family: "STSong", "SimSun", "Microsoft YaHei UI", serif;
  font-size: 23px;
  font-weight: 700;
}
.quote > p {
  position: relative;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.selected {
  min-height: 58px;
  margin-bottom: 11px;
  padding: 10px;
  border: 1px solid rgba(189,141,61,.2);
  border-radius: var(--radius);
  background: rgba(255,250,242,.66);
}
.selected-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.selected-list li {
  padding: 5px 8px;
  border-radius: 6px;
  color: #164332;
  background: rgba(232,240,230,.78);
  font-size: 12px;
  font-weight: 800;
}
.empty { margin: 7px 0 0; color: #8c826f; font-size: 12px; }
.form { display: grid; gap: 9px; }
.field input, .field textarea {
  width: 100%;
  border: 1px solid rgba(189,141,61,.24);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255,250,242,.82);
  outline: none;
}
.field input { min-height: 42px; padding: 0 11px; }
.field textarea { min-height: 84px; padding: 10px 11px; resize: vertical; }
.field input:focus, .field textarea:focus {
  border-color: rgba(31,93,67,.55);
  box-shadow: 0 0 0 3px rgba(31,93,67,.1);
}
.quote-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.main-btn, .sub-btn {
  min-height: 44px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 900;
}
.sub-btn {
  border: 1px solid rgba(31,93,67,.28);
  color: #174532;
  background: rgba(255,250,242,.78);
}
.summary {
  display: none;
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--radius);
  color: #fff3d5;
  background: rgba(10,38,29,.92);
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
}
.summary.show { display: block; }

.bottom {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  width: min(430px, 100%);
  margin: 0 auto;
  padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(189,141,61,.22);
  background:
    linear-gradient(180deg, rgba(255,250,242,.82), rgba(255,250,242,.98)),
    url("../images/tea-paper-bg.png") center / 820px auto;
  box-shadow: 0 -14px 32px rgba(23,35,30,.13);
  backdrop-filter: blur(16px);
}
.bottom-inner { display: grid; grid-template-columns: .9fr 1.1fr; gap: 8px; }
.bottom a, .bottom button {
  display: grid;
  place-items: center;
  min-height: 48px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 900;
}
.bottom a {
  border: 1px solid rgba(31,93,67,.4);
  color: #174532;
  background: rgba(255,250,242,.86);
}

.toast {
  position: fixed;
  right: 12px;
  bottom: 82px;
  left: 12px;
  z-index: 40;
  display: none;
  width: min(406px, calc(100% - 24px));
  margin: 0 auto;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: #fff;
  background: rgba(10,38,29,.94);
  box-shadow: 0 16px 36px rgba(0,0,0,.2);
  font-size: 13px;
  line-height: 1.5;
}
.toast.show { display: block; }

@media (max-width: 370px) {
  .hero h1 { margin-top: 46px; font-size: 34px; }
  .hero-actions { grid-template-columns: 1fr; }
  .quick-item strong { font-size: 14px; }
  .recommend { flex-basis: 88%; }
  .recommend-pic { height: 184px; }
  .cargo { grid-template-columns: 100px minmax(0, 1fr); gap: 9px; padding: 9px; }
  .cargo-pic { min-height: 124px; }
  .cargo h3 { font-size: 16px; }
  .price { font-size: 15px; }
  .bottom a, .bottom button { font-size: 13px; }
}
