:root {
  --bg: #fff8ef;
  --paper: #fffdf8;
  --ink: #33251f;
  --muted: #7d6a5f;
  --brand: #b75c45;
  --brand-dark: #793927;
  --cream: #f8e6c9;
  --line: rgba(121, 57, 39, 0.16);
  --shadow: 0 18px 50px rgba(80, 45, 31, 0.12);
  --radius: 24px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Songti SC", "Noto Serif SC", "STSong", Georgia, serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 213, 188, .75), transparent 34%),
    radial-gradient(circle at 85% 18%, rgba(255, 239, 191, .72), transparent 28%),
    linear-gradient(180deg, #fffaf2 0%, var(--bg) 58%, #fff3e2 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(121, 57, 39, .08) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 75%);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  background: rgba(255, 248, 239, .82);
  border-bottom: 1px solid var(--line);
}

.nav {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  line-height: 1.05;
}

.logo img {
  width: 118px;
  height: auto;
  border-radius: 10px;
  mix-blend-mode: multiply;
}

.logo small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
}

.nav-links {
  display: flex;
  gap: 10px;
  align-items: center;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
}

.nav-links a, .pill-link {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .62);
  border: 1px solid var(--line);
}

.hero {
  padding: 48px 0 26px;
}

.hero-card {
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  gap: 24px;
  align-items: center;
  padding: 34px;
  border-radius: 34px;
  background: rgba(255, 253, 248, .86);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, .8);
  overflow: hidden;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #ffe1d2;
  color: var(--brand-dark);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  font-weight: 700;
}

h1, h2, h3 { margin: 0; line-height: 1.12; }
h1 { font-size: clamp(38px, 8vw, 78px); letter-spacing: -.05em; }
h2 { font-size: clamp(26px, 5vw, 42px); letter-spacing: -.035em; }
h3 { font-size: 20px; }

.lead {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
}

.hero-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 700;
}

.btn.primary {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

.hero-note {
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(145deg, #ffe5d6, #fff7dc);
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  position: relative;
  overflow: hidden;
}

.hero-note::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  right: -50px;
  top: -60px;
  background: rgba(183, 92, 69, .18);
}

.hero-note strong { font-size: 30px; line-height: 1.2; position: relative; }
.hero-note p { color: var(--muted); line-height: 1.7; position: relative; }

.section { padding: 28px 0; }
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
}
.section-title p { margin: 8px 0 0; color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.category-card, .cake-card, .info-card {
  background: rgba(255, 253, 248, .84);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(80, 45, 31, .08);
}

.category-card {
  padding: 22px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.category-card:hover, .cake-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.category-card p { color: var(--muted); line-height: 1.7; margin-bottom: 0; }

.cake-card { overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.cake-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--cream); }
.cake-body { padding: 16px; }
.cake-meta { margin-top: 10px; display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-family: "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 14px; }
.price { color: var(--brand-dark); font-weight: 800; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tag { font-size: 12px; padding: 5px 8px; border-radius: 999px; background: #fff0e8; color: var(--brand-dark); font-family: "PingFang SC", "Microsoft YaHei", sans-serif; }

.filters { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 18px; }
.filter { white-space: nowrap; cursor: pointer; background: #fffdf8; }
.filter.active { background: var(--brand-dark); color: white; }

.detail-layout { display: grid; grid-template-columns: .95fr 1.05fr; gap: 24px; align-items: start; }
.detail-image { border-radius: 32px; overflow: hidden; box-shadow: var(--shadow); background: var(--paper); }
.detail-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.detail-panel { padding: 26px; }
.detail-panel h1 { font-size: clamp(34px, 6vw, 58px); }
.detail-list { margin-top: 20px; display: grid; gap: 12px; }
.row { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px dashed var(--line); font-family: "PingFang SC", "Microsoft YaHei", sans-serif; }
.row span:first-child { color: var(--muted); }
.notice { margin-top: 18px; padding: 16px; border-radius: 18px; background: #fff1dc; color: var(--brand-dark); line-height: 1.7; }

.empty { padding: 30px; text-align: center; color: var(--muted); }
.footer { padding: 42px 0 50px; color: var(--muted); font-family: "PingFang SC", "Microsoft YaHei", sans-serif; }
.footer-card { padding: 20px; border-top: 1px solid var(--line); }

@media (max-width: 820px) {
  .nav { height: auto; padding: 13px 0; align-items: flex-start; }
  .nav-links { gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
  .nav-links a { padding: 7px 10px; font-size: 13px; }
  .hero { padding-top: 26px; }
  .hero-card, .detail-layout { grid-template-columns: 1fr; padding: 22px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .lead { font-size: 16px; }
}

@media (max-width: 560px) {
  .container { width: min(100% - 24px, 1080px); }
  .grid { grid-template-columns: 1fr; }
  .hero-card { border-radius: 26px; }
  .hero-note { min-height: 210px; }
  .section-title { align-items: flex-start; flex-direction: column; }
  .cake-body { padding: 14px; }
}

@media (max-width: 560px) {
  .logo img { width: 96px; }
  .logo small { font-size: 11px; }
}

.qr-hero {
  width: 148px;
  height: 148px;
  object-fit: contain;
  margin-top: 10px;
  padding: 8px;
  border-radius: 18px;
  background: white;
  box-shadow: 0 10px 26px rgba(80, 45, 31, .1);
  position: relative;
}

.qr-card img {
  width: min(220px, 70vw);
  height: auto;
  margin: 18px auto 0;
  padding: 12px;
  border-radius: 22px;
  background: white;
  box-shadow: 0 10px 26px rgba(80, 45, 31, .1);
}

.text-logo span {
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: #2f261f;
}

.size-guide-card {
  grid-column: 1 / -1;
}

.size-guide-card img {
  width: 100%;
  margin-top: 18px;
  border-radius: 24px;
  box-shadow: 0 10px 26px rgba(80, 45, 31, .08);
  background: #fff8ef;
}

.hero-card {
  grid-template-columns: minmax(0, 1fr) minmax(360px, .78fr);
}

.hero h1 {
  max-width: 8.5em;
  font-size: clamp(42px, 5.4vw, 88px);
  line-height: 1.05;
  text-wrap: balance;
}

@media (min-width: 821px) {
  .hero-card { padding: 42px; }
}

@media (max-width: 820px) {
  .hero h1 { font-size: clamp(40px, 12vw, 64px); max-width: 7em; }
}

/* Homepage hero refinement: stack earlier for phones, tablets, and narrow previews. */
.hero h1 {
  max-width: 9.5em;
  font-size: clamp(38px, 4.7vw, 72px);
  line-height: 1.08;
}

.hero-card {
  grid-template-columns: minmax(0, 1fr) minmax(320px, .72fr);
  gap: 34px;
}

@media (max-width: 1120px) {
  .hero-card {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: 8em;
    font-size: clamp(38px, 8vw, 68px);
  }

  .hero-note {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .hero-card {
    padding: 20px;
  }

  .hero h1 {
    max-width: 7em;
    font-size: clamp(34px, 12vw, 52px);
  }

  .eyebrow {
    font-size: 12px;
    padding: 7px 10px;
  }

  .hero-actions .btn {
    flex: 1 1 140px;
  }
}

/* Crisp, native HTML size guide. Text stays sharp on mobile. */
.size-guide-card .lead {
  margin-top: 10px;
}

.size-guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.size-card {
  min-width: 0;
  padding: 18px 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 253, 248, .82);
  text-align: center;
}

.size-title {
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.04em;
  color: var(--brand-dark);
}

.size-pound {
  margin-top: 8px;
  color: var(--muted);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  font-weight: 700;
}

.cake-cut {
  --slice: 72deg;
  --size: 112px;
  width: var(--size);
  height: var(--size);
  margin: 18px auto 14px;
  border-radius: 50%;
  border: 4px solid #a5503b;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .96) 0 4px, transparent 5px),
    repeating-conic-gradient(from -90deg, rgba(165, 80, 59, .68) 0 1.8deg, transparent 1.8deg var(--slice)),
    #ffe7c7;
  box-shadow: inset 0 0 0 999px rgba(255, 231, 199, .34);
}

.cake-cut::after {
  content: "";
  display: block;
  width: 46%;
  height: 10%;
  margin: 42% auto 0;
  border-radius: 999px;
  background: rgba(255, 247, 236, .88);
}

.cake-cut-4 { --size: 82px; --slice: 120deg; }
.cake-cut-6 { --size: 106px; --slice: 72deg; }
.cake-cut-8 { --size: 130px; --slice: 36deg; }
.cake-cut-10 { --size: 154px; --slice: 24deg; }

.cut-text {
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 18px;
  font-weight: 800;
}

.people-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 36px;
  margin-top: 12px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 800;
}

@media (max-width: 900px) {
  .size-guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .size-guide-grid {
    grid-template-columns: 1fr;
  }

  .size-card {
    display: grid;
    grid-template-columns: 92px 1fr;
    grid-template-areas:
      "cake title"
      "cake pound"
      "cake cut"
      "cake people";
    column-gap: 16px;
    align-items: center;
    text-align: left;
    padding: 16px;
  }

  .size-title { grid-area: title; font-size: 34px; }
  .size-pound { grid-area: pound; margin-top: 4px; }
  .cake-cut { grid-area: cake; margin: 0 auto; }
  .cake-cut-4 { --size: 70px; }
  .cake-cut-6 { --size: 82px; }
  .cake-cut-8 { --size: 92px; }
  .cake-cut-10 { --size: 102px; }
  .cut-text { grid-area: cut; font-size: 16px; margin-top: 4px; }
  .people-pill { grid-area: people; width: fit-content; margin-top: 8px; min-height: 32px; }
}

/* Softer size guide: no slice-count messaging, just size and suggested people. */
.cake-cut {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .95) 0 4px, transparent 5px),
    radial-gradient(circle at 34% 32%, #d94b46 0 8px, transparent 9px),
    radial-gradient(circle at 66% 34%, #d94b46 0 8px, transparent 9px),
    radial-gradient(circle at 50% 64%, #d94b46 0 8px, transparent 9px),
    #ffe7c7;
}

.cut-text {
  display: none;
}

.people-pill {
  min-width: 132px;
}

@media (max-width: 520px) {
  .size-card {
    grid-template-areas:
      "cake title"
      "cake pound"
      "cake people";
  }
}

.detail-image.image-open {
  width: 100%;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: inherit;
  position: relative;
}

.detail-image.image-open span {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(48, 36, 29, .72);
  color: white;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  backdrop-filter: blur(10px);
}

.image-sheet {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
}

.image-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(35, 25, 20, .58);
  backdrop-filter: blur(8px);
}

.image-sheet-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: min(92vh, 860px);
  overflow: auto;
  padding: 16px;
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(35, 25, 20, .32);
}

.image-sheet-panel img {
  width: 100%;
  border-radius: 20px;
  background: #fff2e7;
}

.image-sheet-panel h3 {
  margin-top: 14px;
}

.image-sheet-panel p {
  color: var(--muted);
  line-height: 1.7;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.image-sheet-close {
  position: absolute;
  right: 24px;
  top: 24px;
  z-index: 1;
  min-height: 34px;
  padding: 0 12px;
  background: rgba(255, 255, 255, .9);
}

.no-scroll {
  overflow: hidden;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 120;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(48, 36, 29, .88);
  color: white;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  transition: opacity .18s ease, transform .18s ease;
}

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