:root {
  --ink: #17211c;
  --muted: #69726d;
  --paper: #f6e4c9;
  --surface: #ffffff;
  --line: #dcded9;
  --green: #1f5a3d;
  --green-dark: #15452e;
  --gold: #d5a739;
  --red: #a43e35;
  --blue: #2c607a;
  --seasonal: #f5922c;
  --shadow: 0 18px 55px rgba(23, 33, 28, .14);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "DM Sans", sans-serif; font-size: 15px; letter-spacing: 0; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(44, 96, 122, .25); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header { height: 78px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding: 0 4vw; border-bottom: 1px solid rgba(23,33,28,.16); background: rgba(246,228,201,.96); position: sticky; top: 0; z-index: 20; }
.customer-header, .staff-header { grid-template-columns: 1fr auto; }
.confirmation-header { grid-template-columns: 1fr; }
.staff-label { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.brand { display: inline-flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; font-weight: 700; width: max-content; min-width: 0; }
.site-logo { display: block; width: 108px; height: 48px; flex: 0 0 auto; }
.brand-context { font-size: 18px; line-height: 1.15; white-space: nowrap; }
.view-switcher { display: flex; gap: 4px; padding: 4px; background: #ebece7; border-radius: 6px; }
.view-button { border: 0; background: transparent; color: var(--muted); padding: 7px 16px; border-radius: 4px; font-weight: 600; }
.view-button.is-active { background: white; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.cart-button { justify-self: end; border: 1px solid var(--ink); background: var(--ink); color: white; padding: 9px 13px; border-radius: 4px; font-weight: 600; }
.cart-button span { display: inline-grid; place-items: center; margin-left: 6px; min-width: 20px; height: 20px; border-radius: 50%; background: var(--gold); color: var(--ink); font-size: 12px; }

main { min-height: calc(100vh - 78px); }
.view { display: none; }
.view.is-active { display: block; }
#shopView { padding-bottom: 70px; }
.shop-intro { background: var(--ink); border-bottom: 7px solid var(--green); overflow: hidden; }
.shop-intro img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 3; object-fit: cover; }
.eyebrow { margin: 0 0 7px; text-transform: uppercase; font-size: 11px; font-weight: 700; letter-spacing: .12em; }
h1, h2 { font-family: "Newsreader", serif; font-weight: 600; letter-spacing: 0; margin: 0; }
h1 { font-size: clamp(42px, 6vw, 76px); line-height: .96; max-width: 760px; }
h2 { font-size: 30px; line-height: 1.05; }
.preorder-info { max-width: 1280px; margin: 0 auto; padding: 38px 4vw 34px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 6vw; border-bottom: 1px solid rgba(23,33,28,.16); }
.preorder-info h2 { font-size: 26px; }
.preorder-instructions ol { margin: 22px 0 0; padding-left: 22px; display: grid; gap: 10px; line-height: 1.5; }
.preorder-instructions li { padding-left: 5px; }
.preorder-instructions li::marker { color: var(--green); font-weight: 700; }
.preorder-contact { margin: 22px 0 0; line-height: 1.55; }
.preorder-contact a { color: var(--green); font-weight: 700; }
.preorder-guide { align-self: stretch; padding-left: 6vw; border-left: 1px solid rgba(23,33,28,.18); }
.guide-resource { padding: 18px 0; }
.guide-resource + .guide-resource { border-top: 1px solid rgba(23,33,28,.18); }
.guide-resource p { margin: 0 0 14px; color: var(--muted); line-height: 1.55; }

.catalog-tools, .staff-tools { max-width: 1280px; margin: 0 auto; display: flex; align-items: end; gap: 12px; padding: 28px 4vw 20px; }
.search-field { flex: 0 1 380px; }
.search-field.wide { flex: 1; }
.search-field input, .select-field select, .form-grid input, .form-grid select, .form-grid textarea { width: 100%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 4px; padding: 11px 12px; }
.select-field { min-width: 170px; }
.select-field > span, .form-grid label > span { display: block; margin: 0 0 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.result-count { margin: 0 0 11px auto; color: var(--muted); white-space: nowrap; }

.product-grid { max-width: 1280px; margin: 0 auto; padding: 0 4vw; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.product-type-divider { grid-column: 1 / -1; min-height: 42px; padding: 17px 4px 0; display: flex; align-items: end; background: var(--paper); color: var(--ink); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.product-type-divider:first-child { min-height: 32px; padding-top: 7px; }
.product-card { min-width: 0; min-height: 190px; background: var(--surface); padding: 24px; display: flex; flex-direction: column; }
.product-visual { min-height: 18px; display: flex; align-items: start; justify-content: flex-end; }
.availability { color: var(--green); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.availability.is-low, .availability.is-unavailable { color: var(--red); }
.product-card .brand-name { margin: 10px 0 4px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.product-card h3 { margin: 0; font-size: 19px; line-height: 1.25; }
.allergen-note { display: block; margin: 7px 0 0; color: var(--red) !important; font-size: 12px !important; font-weight: 700; }
.product-meta { margin-top: auto; padding-top: 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.size-price { display: flex; flex-direction: column; color: var(--muted); font-size: 12px; }
.size-price > span { color: var(--ink); font-size: 16px; font-weight: 600; line-height: 1.25; }
.size-price strong { color: var(--ink); font-size: 16px; }
.add-button, .primary-button, .secondary-button { border-radius: 4px; padding: 10px 14px; font-weight: 700; border: 1px solid transparent; }
.add-button, .primary-button { background: var(--green); color: white; }
.add-button:hover, .primary-button:hover { background: var(--green-dark); }
.add-button:disabled, .quantity-control button:disabled { cursor: not-allowed; opacity: .45; }
.secondary-button { background: white; color: var(--ink); border-color: var(--line); }
.button-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.full { width: 100%; }
.empty-catalog { grid-column: 1 / -1; padding: 70px 20px; text-align: center; color: var(--muted); background: white; }

.staff-heading { max-width: 1280px; margin: 0 auto; padding: 44px 4vw 24px; display: flex; justify-content: space-between; align-items: end; }
.staff-heading h1 { font-size: 48px; }
.staff-heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.summary-strip { max-width: 1280px; margin: 0 auto; padding: 0 4vw; display: grid; grid-template-columns: repeat(4, 1fr); }
.report-summary { grid-template-columns: repeat(3, 1fr); }
.summary-item { padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-right: 0; }
.summary-item:last-child { border-right: 1px solid var(--line); }
.summary-item span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.summary-item strong { display: block; margin-top: 5px; font-family: "Newsreader", serif; font-size: 30px; }
.order-table-wrap { max-width: 1280px; margin: 0 auto; padding: 0 4vw 60px; overflow-x: auto; }
.product-report-table table { min-width: 920px; }
.numeric-cell { text-align: right; font-variant-numeric: tabular-nums; }
.remaining-zero { color: var(--red); font-weight: 700; }
table { width: 100%; border-collapse: collapse; min-width: 970px; background: var(--surface); border: 1px solid var(--line); }
th { color: var(--muted); background: #f0f1ed; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; text-align: left; }
th, td { padding: 13px 15px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td { font-size: 13px; }
td strong, td span { display: block; }
td span { color: var(--muted); margin-top: 3px; }
.money { font-variant-numeric: tabular-nums; font-weight: 700; }
.status-pill { width: max-content; padding: 5px 8px; border-radius: 3px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; background: #e8ece9; color: var(--ink); }
.status-pill.placed { background: #e2edf1; color: var(--blue); }
.status-pill.picked-up { background: #e3eee6; color: var(--green); }
.status-pill.cancelled { background: #f3e5e3; color: var(--red); }
.row-action { border: 1px solid var(--line); background: white; border-radius: 4px; padding: 7px 10px; font-weight: 600; }
.empty-state { padding: 60px 20px; text-align: center; color: var(--muted); background: white; border: 1px solid var(--line); }
.staff-message { max-width: 1280px; margin: 0 auto 18px; padding: 13px 4vw; color: var(--muted); background: #f0f1ed; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.scrim { position: fixed; inset: 0; background: rgba(16,24,20,.5); z-index: 30; }
.cart-panel { position: fixed; top: 0; right: 0; width: min(480px, 100%); height: 100vh; background: var(--surface); z-index: 31; transform: translateX(105%); transition: transform .25s ease; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.cart-panel.is-open { transform: translateX(0); }
.panel-header, .modal-header { display: flex; justify-content: space-between; align-items: start; padding: 24px; border-bottom: 1px solid var(--line); }
.close-button { width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: white; font-size: 24px; line-height: 1; }
.cart-items { padding: 8px 24px; overflow-y: auto; flex: 1; }
.cart-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cart-item h3 { margin: 0 0 4px; font-size: 15px; }
.cart-item p { margin: 0; color: var(--muted); font-size: 12px; }
.quantity-control { display: flex; align-items: center; gap: 10px; }
.quantity-control button { width: 29px; height: 29px; border: 1px solid var(--line); background: white; border-radius: 3px; }
.remove-button { align-self: start; padding: 0; border: 0; background: none; color: var(--red); font-size: 11px; }
.cart-footer { padding: 20px 24px 24px; border-top: 1px solid var(--line); }
.total-row { display: flex; justify-content: space-between; font-size: 17px; }
.cart-footer p { margin: 5px 0 18px; color: var(--muted); font-size: 12px; }
.cart-empty { padding: 80px 10px; text-align: center; color: var(--muted); }

.modal { width: min(650px, calc(100% - 28px)); border: 0; padding: 0; background: white; color: var(--ink); box-shadow: var(--shadow); border-radius: 6px; }
.order-modal { width: min(780px, calc(100% - 28px)); max-height: calc(100vh - 28px); overflow-y: auto; }
.modal::backdrop { background: rgba(16,24,20,.55); }
.modal form { margin: 0; }
.form-grid { padding: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.full-field { grid-column: 1 / -1; }
.form-grid textarea { resize: vertical; }
.form-grid small { font-weight: 400; }
.modal-actions { padding: 18px 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.modal-actions p { color: var(--muted); margin: 0; font-size: 12px; }
.order-detail-body { padding: 24px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; padding-bottom: 22px; }
.detail-block span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; font-weight: 700; letter-spacing: .06em; }
.detail-block strong { display: block; margin-top: 4px; font-size: 14px; }
.detail-items { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -24px 20px; padding: 10px 24px; }
.detail-item { display: flex; justify-content: space-between; gap: 20px; padding: 8px 0; }
.detail-item p { margin: 0; }
.detail-item span { color: var(--muted); font-size: 12px; }
.staff-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.staff-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 20px 0 24px; border-top: 1px solid var(--line); }
.staff-edit-grid label > span, .staff-quantity > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.staff-edit-grid input, .staff-edit-grid select, .staff-edit-grid textarea, .staff-add-item select, .staff-quantity input { width: 100%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 4px; padding: 10px 11px; }
.staff-edit-grid textarea { resize: vertical; }
.staff-item-editor { margin: 0 -24px 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.staff-editor-heading { padding: 18px 24px 10px; }
.staff-editor-heading h3 { margin: 0; font-size: 15px; }
.staff-editor-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.staff-item-row { display: grid; grid-template-columns: minmax(0, 1fr) 72px auto; gap: 14px; align-items: center; padding: 13px 24px; border-top: 1px solid var(--line); }
.staff-item-name { min-width: 0; }
.staff-item-name strong, .staff-item-name span { display: block; }
.staff-item-name strong { font-size: 14px; }
.staff-item-name span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.staff-quantity input { padding: 8px; }
.staff-add-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 14px 24px; border-top: 1px solid var(--line); background: #f7f8f5; }
.staff-add-item label { min-width: 0; }
.order-edit-message { margin: 0 0 16px; padding: 10px 12px; background: #f3e5e3; color: var(--red); font-size: 13px; }
.read-only-pickup { padding-top: 4px; }
.staff-actions button:disabled { cursor: not-allowed; opacity: .5; }
.danger-button { border: 1px solid #e6c2be; color: var(--red); background: white; border-radius: 4px; padding: 9px 12px; font-weight: 700; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: white; padding: 11px 16px; border-radius: 4px; transition: .2s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.confirmation-page { background: var(--paper); }
.confirmation-main { min-height: calc(100vh - 78px); }
.confirmation-loading { padding: 80px 6vw; color: var(--muted); }
.confirmation-hero { padding: 64px max(6vw, calc((100vw - 1120px) / 2)); background: var(--seasonal); color: var(--ink); border-bottom: 7px solid var(--green); }
.confirmation-hero h1 { max-width: 900px; font-size: clamp(44px, 6vw, 72px); }
.confirmation-hero .confirmation-lead { max-width: 650px; margin: 20px 0 0; color: rgba(23,33,28,.82); font-size: 17px; line-height: 1.6; }
.confirmation-message { max-width: 820px; margin-top: 22px; color: rgba(23,33,28,.86); font-size: 16px; line-height: 1.6; }
.confirmation-message p { margin: 0 0 12px; }
.confirmation-message p:last-child { margin-bottom: 0; font-weight: 700; }
.confirmation-message a { color: var(--ink); font-weight: 700; }
.confirmation-email { max-width: 650px; margin: 18px 0 0; padding: 11px 13px; font-size: 13px; line-height: 1.5; }
.confirmation-email.is-success { background: rgba(255,255,255,.38); color: var(--ink); }
.confirmation-email.is-warning { background: #fff4d6; color: var(--ink); }
.confirmation-hero .primary-link { margin-top: 26px; background: white; color: var(--green); }
.confirmation-summary { max-width: 1120px; margin: 0 auto; padding: 46px 0 70px; }
.confirmation-section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.confirmation-number { font-family: "Newsreader", serif; font-size: 26px; }
.confirmation-details { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px 7vw; padding: 28px 0; border-bottom: 1px solid var(--line); }
.confirmation-items { padding: 28px 0; }
.confirmation-items h3 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.confirmation-item { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.confirmation-quantity { width: 30px; height: 30px; display: grid; place-items: center; background: #e6ece8; color: var(--green); font-weight: 700; }
.confirmation-item strong, .confirmation-item span { display: block; }
.confirmation-item div span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.confirmation-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 26px; }
.confirmation-footer p { margin: 0; color: var(--muted); }
.primary-link { display: inline-block; padding: 11px 15px; border-radius: 4px; background: var(--green); color: white; font-weight: 700; text-decoration: none; }
.primary-link:hover { background: var(--green-dark); }

.serving-guide-main { min-height: calc(100vh - 78px); padding-bottom: 70px; }
.serving-guide-banner { background: var(--seasonal); border-bottom: 7px solid var(--green); }
.serving-guide-banner img { display: block; width: 100%; height: auto; }
.serving-guide-content { max-width: 1120px; margin: 0 auto; padding: 46px 4vw 0; }
.serving-guide-content h1 { max-width: none; font-size: 56px; }
.serving-guide-lead { max-width: 720px; margin: 16px 0 30px; color: var(--muted); font-size: 17px; line-height: 1.6; }
.serving-amounts { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); }
.serving-amount { min-width: 0; padding: 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.serving-amount:nth-child(3n) { border-right: 0; }
.serving-amount:nth-last-child(-n+3) { border-bottom: 0; }
.serving-amount dt { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.serving-amount dd { margin: 7px 0 0; font-family: "Newsreader", serif; font-size: 28px; font-weight: 600; }
.serving-guide-actions { margin-top: 28px; }

@media (max-width: 820px) {
  .site-header { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 0 18px; }
  .brand { gap: 9px; }
  .site-logo { width: 90px; height: 40px; }
  .brand-context { font-size: 13px; }
  .cart-button { grid-column: 2; }
  .preorder-info { grid-template-columns: 1fr; gap: 30px; padding: 32px 18px; }
  .preorder-guide { padding: 28px 0 0; border-top: 1px solid rgba(23,33,28,.18); border-left: 0; }
  h1 { font-size: 48px; }
  .catalog-tools, .staff-tools { padding-left: 18px; padding-right: 18px; flex-wrap: wrap; align-items: stretch; }
  .search-field, .select-field { flex: 1 1 100%; }
  .result-count { margin: 0; }
  .product-grid { grid-template-columns: 1fr 1fr; padding: 0 18px; }
  .staff-heading { padding: 34px 18px 20px; }
  .summary-strip { padding: 0 18px; grid-template-columns: 1fr 1fr; }
  .report-summary { grid-template-columns: repeat(3, 1fr); }
  .summary-item:nth-child(2) { border-right: 1px solid var(--line); }
  .summary-item:nth-child(n+3) { border-top: 0; }
  .order-table-wrap { padding-left: 18px; padding-right: 18px; }
  .staff-page main { padding-bottom: 30px; }
  .confirmation-summary { padding: 34px 20px 50px; }
  .serving-guide-content { padding: 36px 20px 0; }
}

@media (max-width: 540px) {
  .site-logo { width: 82px; height: auto; }
  .brand-context { font-size: 12px; }
  .staff-label { display: none; }
  .product-grid { grid-template-columns: 1fr; }
  .staff-heading h1 { font-size: 40px; }
  .staff-heading { align-items: start; gap: 16px; }
  .staff-heading-actions { justify-content: flex-start; }
  .report-summary { grid-template-columns: 1fr; }
  .report-summary .summary-item { border-right: 1px solid var(--line); border-top: 0; }
  .report-summary .summary-item:first-child { border-top: 1px solid var(--line); }
  .form-grid { grid-template-columns: 1fr; }
  .full-field { grid-column: auto; }
  .modal-actions { align-items: stretch; flex-direction: column; }
  .modal-actions .primary-button { width: 100%; }
  .detail-grid { grid-template-columns: 1fr; }
  .staff-edit-grid { grid-template-columns: 1fr; }
  .staff-edit-grid .full-field { grid-column: auto; }
  .staff-item-row { grid-template-columns: minmax(0, 1fr) 64px; }
  .staff-item-row .staff-item-name { grid-column: 1 / -1; }
  .staff-item-row .remove-button { justify-self: end; }
  .staff-add-item { grid-template-columns: 1fr; }
  .confirmation-hero { padding: 44px 24px; }
  .confirmation-details { grid-template-columns: 1fr; }
  .confirmation-footer { align-items: stretch; flex-direction: column; }
  .confirmation-footer .primary-link { text-align: center; }
  .serving-guide-content h1 { max-width: 100%; font-size: 36px; line-height: 1.05; overflow-wrap: break-word; }
  .serving-amounts { grid-template-columns: 1fr; }
  .serving-amount, .serving-amount:nth-child(3n), .serving-amount:nth-last-child(-n+3) { border-right: 0; border-bottom: 1px solid var(--line); }
  .serving-amount:last-child { border-bottom: 0; }
}

@media (max-width: 360px) {
  .site-header { padding-left: 12px; padding-right: 12px; }
  .site-logo { width: 74px; }
  .brand-context { font-size: 11px; }
  .cart-button { padding: 8px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
