:root {
  --brown: #5f3b2c;
  --brown-2: #8a5c43;
  --caramel: #bd7a4e;
  --cream: #fff9f0;
  --paper: #ffffff;
  --line: #eadbc9;
  --text: #3d302b;
  --muted: #7f7068;
  --success: #2f7d55;
  --danger: #b84d45;
  --shadow: 0 12px 30px rgba(88, 55, 37, .10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at 10% 0%, #fff4dd 0, transparent 25%), linear-gradient(180deg, #fffaf3 0%, #f7efe5 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}
button, input, select, textarea { font: inherit; }
button { touch-action: manipulation; }
.wrap { max-width: 760px; margin: 0 auto; padding-bottom: 124px; }
.hero {
  min-height: 300px;
  padding: 34px 22px;
  color: white;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(180deg, rgba(55,31,20,.05), rgba(55,31,20,.82)), url('../assets/hero.png') center / cover no-repeat;
  border-radius: 0 0 30px 30px;
  box-shadow: var(--shadow);
}
.hero h1 { margin: 0; font-size: 31px; letter-spacing: .06em; text-shadow: 0 2px 10px rgba(0,0,0,.25); }
.hero p { margin: 9px 0 0; color: #ffeadc; line-height: 1.6; text-shadow: 0 2px 8px rgba(0,0,0,.25); }
.badge { display: inline-flex; padding: 6px 11px; border-radius: 999px; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.3); font-size: 13px; margin-bottom: 12px; }
main { padding: 20px 16px; }
.section { background: rgba(255,255,255,.94); border: 1px solid rgba(226,207,188,.85); border-radius: 22px; padding: 18px; margin-bottom: 15px; box-shadow: 0 8px 25px rgba(88,55,37,.06); }
.section h2 { margin: 0 0 14px; font-size: 20px; }
.sub { color: var(--muted); font-size: 14px; line-height: 1.65; }
.status-banner { border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; background: #fff0e7; border: 1px solid #e5bda8; color: #7d4935; line-height: 1.55; }
.status-banner.ok { background: #eef8f2; border-color: #b8ddc6; color: #286844; }
.promo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 13px 0 4px; }
.promo > div { border-radius: 16px; padding: 13px; background: #fff4e8; border: 1px dashed #ddb68e; text-align: center; }
.promo strong { display: block; color: var(--brown); font-size: 20px; }
.products { display: grid; gap: 12px; }
.product { display: grid; grid-template-columns: 94px 1fr auto; gap: 13px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.product-img { width: 94px; height: 94px; object-fit: cover; border-radius: 15px; background: linear-gradient(135deg, #ead4bb, #a86d48); }
.product-name { font-weight: 800; font-size: 17px; }
.product-spec { color: var(--muted); font-size: 13px; margin-top: 5px; }
.stock { color: #9a6d50; font-size: 12px; margin-top: 7px; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button { width: 36px; height: 36px; border: 0; border-radius: 11px; color: white; background: var(--brown-2); cursor: pointer; }
.qty button:disabled { opacity: .35; cursor: not-allowed; }
.qty span { width: 28px; text-align: center; font-weight: 800; }
.field { margin-bottom: 13px; }
label.field-label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 7px; }
input, textarea, select { width: 100%; border: 1px solid #ddcbbc; border-radius: 13px; padding: 13px 14px; background: #fffdfa; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--caramel); box-shadow: 0 0 0 3px rgba(189,122,78,.12); }
textarea { min-height: 88px; resize: vertical; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { display: block; border: 1px solid var(--line); border-radius: 15px; padding: 13px; cursor: pointer; background: #fff; }
.choice input { width: auto; margin-right: 7px; }
.choice.active { border-color: var(--caramel); background: #fff5ea; }
.hidden { display: none !important; }
.bank { background: #f8f2ea; border-radius: 15px; padding: 13px; line-height: 1.8; font-size: 14px; margin-top: 11px; word-break: break-word; }
.summary-row { display: flex; justify-content: space-between; gap: 20px; padding: 5px 0; }
.summary-row.total { font-size: 22px; font-weight: 900; color: var(--brown); padding-top: 12px; border-top: 1px solid var(--line); margin-top: 8px; }
.sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(255,255,255,.94); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 12px 15px max(12px, env(safe-area-inset-bottom)); }
.sticky-inner { max-width: 760px; margin: 0 auto; display: grid; grid-template-columns: 1fr 160px; gap: 12px; align-items: center; }
.sticky-price small { display: block; color: var(--muted); }
.sticky-price strong { font-size: 23px; color: var(--brown); }
.submit { border: 0; border-radius: 15px; padding: 15px; color: white; background: linear-gradient(135deg, #b56f46, #704432); font-weight: 900; cursor: pointer; box-shadow: 0 8px 18px rgba(112,68,50,.25); }
.submit:disabled { opacity: .55; cursor: not-allowed; }
.notice { font-size: 13px; color: var(--muted); line-height: 1.6; margin-top: 10px; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); width: min(90%, 520px); background: #3f302a; color: white; padding: 13px 16px; border-radius: 13px; z-index: 60; box-shadow: var(--shadow); }
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(48,32,24,.58); padding: 18px; }
.modal-card { width: min(100%, 520px); max-height: 90vh; overflow: auto; background: white; border-radius: 24px; padding: 24px; text-align: center; }
.check { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: #e1f3e8; color: var(--success); display: grid; place-items: center; font-size: 34px; font-weight: 900; }
.order-no { background: #fff4e9; border-radius: 13px; padding: 12px; font-weight: 900; margin: 14px 0; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 17px; }
.secondary { border: 1px solid var(--line); background: white; color: var(--brown); border-radius: 13px; padding: 12px; font-weight: 800; cursor: pointer; }
.footer-note { text-align: center; padding: 0 20px 22px; color: var(--muted); font-size: 12px; }
@media (max-width: 520px) {
  .hero { min-height: 260px; }
  .product { grid-template-columns: 78px 1fr; }
  .product-img { width: 78px; height: 78px; }
  .qty { grid-column: 2; justify-content: flex-end; }
  .choice-grid { grid-template-columns: 1fr; }
  .sticky-inner { grid-template-columns: 1fr 132px; }
}

.turnstile-wrap { display: flex; justify-content: center; min-height: 70px; align-items: center; overflow: hidden; }
