:root {
  --paper: #f7efe2;
  --paper2: #fffaf2;
  --ink: #2b1712;
  --muted: #72584e;
  --wine: #681421;
  --green: #183829;
  --line: #e3cbb7;
  --gold: #c59a5b;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

body {
  background:
    radial-gradient(circle at top, rgba(255,255,255,.8), transparent 32%),
    linear-gradient(180deg, #fbf3e8 0%, #f7efe2 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .08;
  background-image:
    linear-gradient(rgba(104,20,33,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(104,20,33,.04) 1px, transparent 1px);
  background-size: 30px 30px;
}

.app-shell {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: 112px;
}

.hidden { display: none !important; }

.brand {
  text-align: center;
  padding: 18px 0;
}

.brand h1 {
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: normal;
  font-size: 40px;
  line-height: .95;
  color: var(--wine);
  margin: 0;
}

.brand span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 4px;
}

.brand.small { padding-top: 6px; }

.hero { padding-top: 12px; }

.fragment-card,
.panel {
  width: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,.74), rgba(255,250,242,.96));
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 30px 22px;
  box-shadow: 0 18px 42px rgba(70,24,14,.11);
  position: relative;
  overflow: hidden;
}

.fragment-card { text-align: center; }

.fragment-card::before,
.fragment-card::after {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  border: 1px solid rgba(197,154,91,.25);
  border-radius: 50%;
}

.fragment-card::before { top: -64px; left: -56px; }
.fragment-card::after { bottom: -70px; right: -60px; }

.ornament { color: var(--gold); font-size: 24px; margin-bottom: 12px; }

.label {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 10px;
  color: var(--muted);
}

.fragment-card h2,
.panel h2 {
  font-family: Georgia, serif;
  color: var(--green);
  font-weight: normal;
  line-height: 1;
  margin: 0;
}

.fragment-card h2 { font-size: 36px; }
.panel h2 { font-size: 27px; margin-bottom: 18px; color: var(--wine); }

.subtitle {
  color: var(--wine);
  font-size: 14px;
  margin: 10px 0 0;
  font-style: italic;
}

.rule {
  width: 58px;
  height: 1px;
  background: var(--gold);
  margin: 22px auto;
}

.intro {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  margin: 0 auto 22px;
  max-width: 340px;
}

.note {
  margin: 18px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.primary {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 15px;
  background: var(--wine);
  color: white;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(104,20,33,.22);
}

.ghost {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--wine);
  font-weight: 800;
  margin-top: 12px;
  padding: 12px;
}

.section-title {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 24px 0 14px;
  background: rgba(255,250,242,.74);
  border: 1px solid rgba(227,203,183,.8);
  border-radius: 22px;
  padding: 14px;
}

.section-title span { color: var(--gold); font-size: 23px; line-height: 1; }

.section-title h2 {
  margin: 0;
  color: var(--wine);
  font-family: Georgia, serif;
  font-weight: normal;
  font-size: 29px;
  line-height: 1;
}

.section-title p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.chapter {
  margin: 34px 0 14px;
  padding: 13px 16px;
  border-radius: 18px;
  color: white;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(70,24,14,.12);
}

.chapter.cookie { background: linear-gradient(135deg, #8a4a32, #6f321f); }
.chapter.brownie { background: linear-gradient(135deg, #321712, #1f0d09); }

.product {
  width: 100%;
  background: rgba(255,250,242,.96);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 15px;
  margin-bottom: 14px;
  box-shadow: 0 10px 24px rgba(70,24,14,.07);
  display: flex;
  gap: 14px;
  align-items: center;
}

.product.special {
  display: block;
  padding: 0;
  overflow: hidden;
  border-color: rgba(197,154,91,.78);
  box-shadow: 0 18px 42px rgba(70,24,14,.13);
  border-radius: 28px;
}

.product.special .product-body { padding: 18px; }

.photo {
  width: 88px;
  height: 88px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.20), transparent 28%),
    linear-gradient(135deg, #3a1a12, #c48d60);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.product.special .photo {
  width: 100%;
  height: 210px;
  border-radius: 0;
}

.badge {
  display: inline-block;
  background: rgba(197,154,91,.16);
  border: 1px solid rgba(197,154,91,.5);
  color: #805d2a;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.product h3 { margin: 0 0 6px; color: var(--green); font-size: 17px; }

.product.special h3 {
  font-family: Georgia, serif;
  font-size: 31px;
  font-weight: normal;
  line-height: 1;
}

.product p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.price { font-weight: 900; color: var(--wine); }

.qty {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.qty button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #f0dcd5;
  color: var(--wine);
  font-size: 22px;
  font-weight: 900;
}

.qty strong { min-width: 22px; text-align: center; font-size: 18px; }

.panel { margin-top: 12px; }

label {
  display: block;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 5px;
}

input, select, textarea {
  width: 100%;
  border: 1px solid #dec8b6;
  background: #fffaf3;
  border-radius: 15px;
  padding: 14px;
  margin-bottom: 12px;
  font-size: 16px;
  color: var(--ink);
}

textarea { min-height: 90px; }

.checkout-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(227,203,183,.65);
  font-size: 14px;
}

.checkout-total {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  color: var(--wine);
  font-size: 19px;
}

.cartbar {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(env(safe-area-inset-bottom) + 8px);
  z-index: 50;
  max-width: 460px;
  margin: 0 auto;
  padding: 12px 14px;
  border-radius: 22px;
  background: rgba(104,20,33,.98);
  color: white;
  box-shadow: 0 -10px 30px rgba(40,10,10,.20);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.cartbar span { display: block; font-size: 12px; opacity: .85; }
.cartbar strong { display: block; font-size: 19px; }

.cartbar button {
  border: 0;
  border-radius: 999px;
  background: white;
  color: var(--wine);
  padding: 12px 16px;
  font-weight: 900;
}

.success {
  text-align: center;
  min-height: 100vh;
  padding-top: 34px;
}

@media (min-width: 700px) {
  .app-shell {
    max-width: 540px;
    padding: 24px;
    padding-bottom: 130px;
  }

  .cartbar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 480px;
  }
}
