:root {
  --ink: #16130f;
  --ink-soft: #3c342c;
  --muted: #8a7d70;
  --paper: #f3efe7;
  --cream: #fbf8f3;
  --card: #fffcf8;
  --line: rgba(22, 19, 15, 0.1);
  --gold: #a68448;
  --gold-soft: #e7d7b8;
  --cinnabar: #8d3030;
  --pine: #1c3b32;
  --shadow: 0 24px 50px rgba(22, 19, 15, 0.08);
  --serif: "Palatino Linotype", "Iowan Old Style", "Songti SC", "Noto Serif SC", serif;
  --sans: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 10% -10%, rgba(166, 132, 72, 0.16), transparent 60%),
    var(--paper);
  font-family: var(--sans);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: rgba(166, 132, 72, 0.28); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: 0.02em; }

.top {
  position: sticky; top: 0; z-index: 8;
  background: rgba(18, 16, 13, 0.94);
  color: #f6f1e8;
  border-bottom: 1px solid rgba(166, 132, 72, 0.45);
  backdrop-filter: blur(16px);
  transition: background 0.35s ease, box-shadow 0.35s ease;
}
.top.compact { box-shadow: 0 16px 40px rgba(12, 9, 6, 0.28); }
.top-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 72px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
}
.brand { display: flex; align-items: center; gap: 12px; }
.seal {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid var(--gold);
  color: var(--gold-soft);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.12em;
}
.brand-name { display: grid; line-height: 1.05; font-family: var(--serif); font-size: 22px; }
.brand-name small { font-family: var(--sans); font-size: 10px; letter-spacing: 0.28em; color: var(--gold); }
.top-nav { display: flex; gap: 22px; justify-content: center; }
.top-nav a {
  position: relative;
  color: rgba(246, 241, 232, 0.72);
  font-size: 14px;
  letter-spacing: 0.08em;
  padding: 8px 0;
  transition: color 0.25s ease;
}
.top-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}
.top-nav a:hover, .top-nav a.active { color: white; }
.top-nav a.active::after, .top-nav a:hover::after { transform: scaleX(1); }
.search input {
  width: 240px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(246, 241, 232, 0.28);
  border-radius: 0;
  color: white;
  padding: 8px 0;
  outline: none;
  transition: width 0.35s ease, border-color 0.35s ease;
}
.search input:focus { width: 300px; border-bottom-color: var(--gold); }
.search input::placeholder { color: rgba(246, 241, 232, 0.4); }

#app {
  width: min(1180px, calc(100% - 40px));
  margin: 28px auto 72px;
  transition: opacity 0.28s ease, transform 0.28s ease;
}
#app.leaving { opacity: 0; transform: translateY(10px); }
#app.enter { animation: rise 0.55s ease; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.foot {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between;
  color: var(--muted); font-size: 12px; letter-spacing: 0.14em;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  min-height: 560px;
  background: var(--ink);
  color: #f7f2ea;
  overflow: hidden;
  margin-bottom: 28px;
}
.hero-copy { padding: 52px 44px 40px; display: flex; flex-direction: column; }
.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.28em;
}
.hero h1 { margin: 0; font-size: 52px; line-height: 1.18; font-weight: 500; }
.hero-copy p { max-width: 420px; color: rgba(247, 242, 234, 0.72); line-height: 1.8; }
.hero-actions { margin-top: auto; display: flex; gap: 18px; align-items: center; }
.hero .solid { background: #f6f1e8; color: var(--ink); }
.hero-photo { position: relative; display: block; min-height: 560px; }
.hero-photo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform: scale(1.06);
  transition: transform 1.1s ease;
}
.hero-photo:hover img { transform: scale(1); }
.hero-photo span {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 48px 22px 18px;
  color: #f7f2ea;
  background: linear-gradient(transparent, rgba(16, 12, 8, 0.72));
}
.hero-photo em { font-style: normal; font-family: var(--serif); font-size: 22px; }

.cats { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 6px; }
.cats a, .ghost, .solid, .choice button, .stepper button {
  border: 1px solid var(--line);
  background: transparent;
  padding: 9px 16px;
  letter-spacing: 0.06em;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.cats a:hover, .ghost:hover, .choice button:hover { border-color: var(--ink); transform: translateY(-1px); }
.cats a.active { background: var(--ink); color: #f7f2ea; border-color: var(--ink); }
.solid, .choice button[aria-pressed="true"] {
  background: var(--ink);
  color: #f7f2ea;
  border-color: var(--ink);
}
.solid:hover { background: #2a241d; }
.solid:active, .ghost:active, .choice button:active { transform: translateY(1px) scale(0.985); }
.ghost.danger { color: var(--cinnabar); border-color: rgba(141, 48, 48, 0.35); }
.section-title { display: flex; justify-content: space-between; align-items: end; margin: 42px 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.section-title h2 { margin: 0; font-size: 30px; }
.section-title span { color: var(--gold); font-size: 12px; letter-spacing: 0.22em; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 28px; }
.product {
  background: transparent;
  overflow: hidden;
  animation: rise 0.7s ease both;
}
.product:nth-child(2) { animation-delay: 0.08s; }
.product:nth-child(3) { animation-delay: 0.16s; }
.product:nth-child(4) { animation-delay: 0.24s; }
.product .shot { transition: transform 0.8s ease; }
.product:hover .shot { transform: scale(1.045); }
.product h3 { transition: color 0.25s ease; }
.product:hover h3 { color: #6d5420; }
.product .price-row { position: relative; }
.product .price-row::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 36px; height: 1px;
  background: var(--gold);
  transition: width 0.35s ease;
}
.product:hover .price-row::after { width: 100%; }
.shot { display: block; width: 100%; height: 460px; object-fit: cover; background: #e7dfd2; }
.product .shot { height: 420px; }
.gallery { overflow: hidden; }
.gallery .shot { height: 640px; }
.receipt .shot { height: 220px; }
.product .pad, .card .pad, .family .pad { padding: 16px 18px 18px; }
.product .pad { padding: 16px 2px 0; }
.product h3 { margin: 6px 0 4px; font-size: 22px; }
.price { font-family: var(--serif); font-size: 22px; }
.price-row { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; }
.muted, .tiny { color: var(--muted); }
.tiny { font-size: 13px; line-height: 1.7; }

.detail { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 28px; align-items: start; }
.gallery { background: #e7dfd2; overflow: hidden; }
.buy-panel { position: sticky; top: 96px; padding: 8px 8px 0 18px; }
.buy-panel h1 { font-size: 46px; margin: 8px 0; }
.choice { display: flex; gap: 8px; margin: 8px 0 18px; }
.field { display: grid; gap: 8px; margin: 14px 0; }
.field input, .field select, .field textarea, .stepper input {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  border-radius: 0;
  padding: 10px 0;
  outline: none;
  transition: border-color 0.25s ease;
}
.field input:focus, .field select:focus, .field textarea:focus, .stepper input:focus { border-bottom-color: var(--gold); }
.stepper { display: grid; grid-template-columns: 44px 1fr 44px; align-items: end; gap: 8px; max-width: 220px; }
.stepper button { padding: 8px 0; font-size: 18px; line-height: 1; }
.stepper input { text-align: center; }
.field textarea { border: 1px solid var(--line); padding: 10px; min-height: 80px; }
.buy-panel .solid { width: 100%; padding: 16px; letter-spacing: 0.2em; }

.page-kicker { margin-bottom: 18px; }
.page-kicker h1 { margin: 0; font-size: 42px; }
.pay-layout { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 22px; }
.card { background: var(--card); border: 1px solid var(--line); }
.receipt .amount-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px dashed rgba(22, 19, 15, 0.14);
}
.receipt .amount-row b { font-family: var(--serif); font-size: 28px; font-weight: 500; }
.qr-frame {
  margin: 22px auto 8px;
  width: min(100%, 320px);
  padding: 18px;
  border: 1px solid var(--ink);
  outline: 1px solid rgba(166, 132, 72, 0.7);
  outline-offset: 6px;
  text-align: center;
  background: white;
}
.qr-frame img { width: 220px; height: 220px; }
.qr-frame strong { display: block; margin-top: 8px; font-family: var(--serif); font-size: 32px; }
.slips { display: grid; gap: 8px; margin-top: 18px; }
.slip {
  text-align: left;
  background: var(--cream);
  border-left: 3px solid transparent;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}
.slip:hover { transform: translateX(3px); }
.slip[aria-pressed="true"] { background: var(--ink); color: #f7f2ea; border-left-color: var(--gold); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.warn {
  margin-top: 16px;
  padding: 12px 14px;
  background: #f8f1e4;
  color: #6d542c;
  font-size: 13px;
  line-height: 1.7;
}
.charity-panel {
  background: var(--pine);
  color: #f6f1e7;
  padding: 28px;
}
.charity-panel .statement { font-family: var(--serif); font-size: 30px; line-height: 1.45; margin: 8px 0 12px; }
.charity-panel .tiny, .charity-panel .muted { color: rgba(246, 241, 231, 0.72); }
.charity-panel .amount-row { border-bottom-color: rgba(246, 241, 231, 0.16); }
.families { display: grid; gap: 12px; margin-top: 16px; }
.family {
  display: grid;
  grid-template-columns: 54px 1fr;
  background: rgba(255, 252, 248, 0.06);
  border: 1px solid rgba(231, 215, 184, 0.25);
}
.family .mark {
  display: grid; place-items: center;
  font-family: var(--serif);
  color: var(--gold-soft);
  border-right: 1px solid rgba(231, 215, 184, 0.25);
}
.family p { margin: 6px 0; }
.progress { height: 2px; background: rgba(255,255,255,0.15); margin-top: 8px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--gold); width: 0; transition: width 0.7s ease; }
.charity-page .family { background: var(--card); color: var(--ink); border-color: var(--line); }
.charity-page .family .mark { color: var(--gold); border-right-color: var(--line); }
.charity-page .progress { background: #efe6da; }

.login-wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; min-height: 640px; background: var(--card); border: 1px solid var(--line); }
.login-aside { background: var(--ink); color: #f7f2ea; padding: 48px; display: flex; flex-direction: column; }
.login-aside h1 { font-size: 48px; margin-top: auto; }
.login-form { padding: 48px; }
.mode { display: flex; gap: 0; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.mode button { border: none; background: transparent; padding: 10px 18px 12px 0; letter-spacing: 0.14em; color: var(--muted); }
.mode button[aria-pressed="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--gold); }
.demo-logins { display: grid; gap: 8px; }
.demo-logins button { text-align: left; }
.profile {
  display: flex; justify-content: space-between; gap: 24px; align-items: end;
  padding-bottom: 22px; border-bottom: 1px solid var(--line); margin-bottom: 8px;
}
.profile h1 { margin: 0; font-size: 48px; }
.invite-qr { width: 180px; height: 180px; background: #fff; }
.stack { display: grid; gap: 10px; }
.stack .card { display: block; }
.table { width: 100%; border-collapse: collapse; background: var(--card); }
.table th, .table td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: top; }
.table th { font-weight: 500; letter-spacing: 0.08em; color: var(--muted); }
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow: auto; }
.tabs a { padding: 12px 16px; color: var(--muted); }
.tabs a.solid { background: transparent; color: var(--ink); border: none; border-bottom: 2px solid var(--gold); }
.error { color: var(--cinnabar); min-height: 1.2em; }
.sheet {
  position: fixed; inset: 0; z-index: 20;
  display: grid; place-items: end center;
  padding: 24px;
  background: rgba(16, 13, 10, 0.46);
  backdrop-filter: blur(8px);
}
.sheet[hidden] { display: none; }
.sheet-card {
  width: min(520px, 100%);
  background: var(--card);
  padding: 28px 28px 22px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: rise 0.35s ease;
}
.sheet-card h2 { margin: 0 0 12px; font-size: 32px; }
.sheet-card textarea { width: 100%; border: 1px solid var(--line); padding: 12px; min-height: 110px; background: transparent; }
.upload {
  display: grid; gap: 10px; justify-items: center;
  margin: 14px 0; padding: 18px;
  border: 1px dashed rgba(166, 132, 72, 0.7);
  cursor: pointer;
  letter-spacing: 0.08em;
}
.upload input { display: none; }
.upload img, .proof-shot img { width: 100%; max-height: 320px; object-fit: contain; background: #f6f1e8; }
.proof-shot { margin: 16px 0 0; }
.proof-shot figcaption { margin-top: 8px; }
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 21;
  transform: translateX(-50%);
  background: var(--ink); color: #f7f2ea;
  padding: 12px 18px;
  letter-spacing: 0.06em;
  box-shadow: var(--shadow);
}
.toast[hidden] { display: none; }
.stat { padding: 22px; }
.stat strong { display: block; margin-top: 8px; font-family: var(--serif); font-size: 28px; font-weight: 500; }

@media (max-width: 900px) {
  .brand { grid-column: 1; grid-row: 1; }
  .search { grid-column: 2; grid-row: 1; }
  .top-inner { grid-template-columns: 1fr auto; gap: 12px 16px; }
  .top-nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; gap: 18px; padding-bottom: 10px; }
  .hero, .detail, .pay-layout, .login-wrap, .grid { grid-template-columns: 1fr; }
  .search input, .search input:focus { width: 120px; }
  .hero { min-height: 0; }
  .hero-copy { padding: 28px 22px 20px; }
  .hero-actions { flex-direction: column; align-items: flex-start; gap: 10px; }
  .hero .solid { white-space: nowrap; }
  .hero h1, .buy-panel h1, .profile h1 { font-size: 32px; }
  .hero-photo, .hero-photo img { min-height: 280px; height: 320px; }
  .shot, .product .shot, .gallery .shot { height: 280px; }
  .receipt .shot { height: 180px; }
  .buy-panel { position: static; padding: 8px 0 0; }
  .sheet { place-items: end stretch; padding: 0; }
  .sheet-card { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
