:root {
  color-scheme: light;
  --ink: #153a31;
  --muted: #60736b;
  --green: #77a916;
  --green-dark: #4d7410;
  --orange: #e98216;
  --paper: #fbfcf8;
  --line: #dce5dc;
  --danger: #972b2b;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", sans-serif; }
button, input, textarea { font: inherit; }
.brandbar { min-height: 92px; padding: 18px max(20px, env(safe-area-inset-right)) 16px max(20px, env(safe-area-inset-left)); background: #fff; border-bottom: 3px solid var(--orange); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brandbar h1, .brandbar p { margin: 0; }
.brandbar h1 { font-size: 1.55rem; letter-spacing: 0; }
.brandbar .eyebrow { color: var(--green-dark); font-size: .86rem; font-weight: 800; }
.brandbar > span { flex: 0 0 auto; color: #fff; background: var(--green-dark); padding: 7px 10px; border-radius: 6px; font-weight: 800; font-size: .88rem; }
.shell { width: min(760px, 100%); margin: 0 auto; padding: 20px 14px calc(32px + env(safe-area-inset-bottom)); }
.shell.compact { padding-top: 48px; }
.section-block, .notice { background: #fff; border: 1px solid var(--line); padding: 18px; margin-bottom: 14px; border-radius: 8px; }
.section-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 15px; }
.section-heading > span { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; color: #fff; background: var(--green-dark); font-weight: 900; }
.section-heading h2, .section-heading p { margin: 0; }
.section-heading h2 { font-size: 1.12rem; }
.section-heading p { color: var(--muted); margin-top: 3px; line-height: 1.45; font-size: .92rem; }
.product-list { display: grid; gap: 10px; }
.product { display: grid; grid-template-columns: minmax(0, 1fr) 116px; gap: 12px; align-items: center; border-top: 1px solid var(--line); padding-top: 12px; min-height: 96px; }
.product:first-child { border-top: 0; padding-top: 0; }
.product-main { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: start; min-width: 0; }
.product-info { min-width: 0; }
.product-thumbnail { width: 72px; height: 72px; margin: 0; border: 1px solid #cbd9c8; border-radius: 10px; overflow: hidden; background: #f3f7ef; }
.product-thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; }
.product-thumbnail.is-placeholder { display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 7px 5px 5px; background: linear-gradient(145deg, #f7faf3, #e9f1e2); color: var(--green-dark); }
.product-thumbnail-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 1px solid #d4e1cf; font-size: 1.08rem; font-weight: 900; }
.product-thumbnail figcaption { color: var(--muted); font-size: .66rem; font-weight: 800; line-height: 1.1; white-space: nowrap; }
.product h3, .product p { margin: 0; }
.product h3 { font-size: 1rem; line-height: 1.35; }
.product .price { color: var(--orange); font-weight: 900; margin-top: 3px; }
.product .description { color: var(--muted); font-size: .88rem; line-height: 1.45; margin-top: 5px; }
.product .storage, .product .food-safety { color: var(--muted); font-size: .82rem; line-height: 1.45; margin-top: 4px; }
.product .food-safety { color: #7b4312; }
.quantity { display: grid; grid-template-columns: 36px 40px 36px; align-items: center; justify-content: end; width: 112px; }
.quantity button { width: 36px; height: 36px; border: 1px solid var(--line); background: #f6f9f4; color: var(--ink); font-weight: 900; font-size: 1.2rem; cursor: pointer; }
.quantity input { width: 40px; height: 36px; border: 1px solid var(--line); border-left: 0; border-right: 0; text-align: center; appearance: textfield; }
.quantity input::-webkit-inner-spin-button { appearance: none; }
.totals > div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; }
.totals .grand { padding-top: 12px; margin-top: 6px; border-top: 1px solid var(--line); font-size: 1.08rem; }
.totals p { color: #8a4d12; background: #fff7eb; border: 1px solid #f0d5b6; padding: 10px; line-height: 1.5; margin: 10px 0 0; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-grid label { display: grid; gap: 6px; font-weight: 800; font-size: .92rem; }
.field-grid .wide { grid-column: 1 / -1; }
input, textarea { width: 100%; border: 1px solid #bfcbbf; border-radius: 6px; padding: 11px 12px; color: var(--ink); background: #fff; min-width: 0; }
textarea { resize: vertical; }
input:focus, textarea:focus { outline: 3px solid rgba(119, 169, 22, .18); border-color: var(--green-dark); }
.boundary { color: var(--muted); line-height: 1.55; }
.selected-summary { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--line); background: #f7faf5; color: var(--muted); line-height: 1.5; }
.privacy-notice { margin: 14px 0; padding: 14px; border: 1px solid #c8d8c7; border-radius: 6px; background: #f7faf5; }
.privacy-notice h3 { margin: 0 0 10px; font-size: 1rem; }
.privacy-notice dl { display: grid; gap: 8px; margin: 0; }
.privacy-notice dl > div { display: grid; grid-template-columns: 7em minmax(0, 1fr); gap: 8px; line-height: 1.5; }
.privacy-notice dt { font-weight: 900; }
.privacy-notice dd { margin: 0; color: var(--muted); }
.privacy-notice > p { margin: 12px 0; color: #7b4312; line-height: 1.55; font-weight: 700; }
.privacy-ack { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: start; color: var(--ink); line-height: 1.5; font-weight: 800; }
.privacy-ack input { width: 20px; height: 20px; margin: 2px 0 0; padding: 0; accent-color: var(--green-dark); }
.submit, .primary-link { display: block; width: 100%; border: 0; border-radius: 6px; min-height: 50px; padding: 14px 18px; background: var(--green-dark); color: #fff; text-align: center; text-decoration: none; font-weight: 900; cursor: pointer; }
.submit:disabled { cursor: wait; opacity: .65; }
.error { margin: 12px 0; padding: 11px 12px; color: var(--danger); background: #fff4f4; border: 1px solid #e2b8b8; border-radius: 6px; line-height: 1.5; }
.notice h1, .notice h2 { margin-top: 0; font-size: 1.3rem; }
.notice p { line-height: 1.6; }
.success { border-top: 5px solid var(--green-dark); }
[hidden] { display: none !important; }
@media (max-width: 520px) {
  .brandbar { min-height: 82px; }
  .shell { padding-left: 10px; padding-right: 10px; }
  .section-block, .notice { padding: 15px 13px; }
  .product { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .product-main { grid-template-columns: 64px minmax(0, 1fr); gap: 10px; }
  .product-thumbnail { width: 64px; height: 64px; }
  .quantity { justify-self: end; }
  .field-grid { grid-template-columns: 1fr; }
  .field-grid .wide { grid-column: auto; }
  .privacy-notice dl > div { grid-template-columns: 1fr; gap: 2px; }
}
