/* Karmin's Kitchen — palette and type lifted from the flyers */
:root {
  --cream: #FBEFD9;
  --cream-deep: #F3DDB6;
  --paper: #FFF8EC;
  --orange: #E4581F;
  --orange-deep: #B93F0E;
  --ink: #1B1512;
  --ink-soft: #4A3A2E;
  --wheat: #C98B3E;
  --white: #FFFFFF;
  --ok: #2E7D4F;
  --warn: #B93F0E;
  --font-head: "Oswald", "Arial Narrow", sans-serif;
  --font-script: "Caveat", "Segoe Script", cursive;
  --font-body: "Nunito", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.55;
  background-image: radial-gradient(circle at 0 0, rgba(201,139,62,.18), transparent 40%),
                    radial-gradient(circle at 100% 100%, rgba(201,139,62,.18), transparent 40%);
  background-attachment: fixed;
}
a { color: var(--orange-deep); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .02em; line-height: 1.05; margin: 0 0 .4em; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 600; }
.script { font-family: var(--font-script); text-transform: none; letter-spacing: 0; font-weight: 700; color: var(--ink); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- header / footer ---------- */
.site-header { background: var(--ink); color: var(--cream); }
.site-header-inner { max-width: 1180px; margin: 0 auto; padding: .9rem clamp(1rem, 4vw, 3rem); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-block; line-height: 0; }
.brand img { height: 64px; width: auto; }
.site-nav { display: flex; gap: 1.3rem; align-items: center; font-family: var(--font-head); text-transform: uppercase; font-size: .95rem; letter-spacing: .06em; }
.site-nav a { color: var(--cream); text-decoration: none; padding: .25rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--orange); }
.cart-link { background: var(--orange); color: #fff !important; padding: .45rem 1rem !important; border-radius: 999px; border-bottom: 0 !important; }
.cart-badge { background: var(--ink); color: var(--cream); border-radius: 999px; padding: 0 .5rem; margin-left: .2rem; font-size: .85rem; }
.menu-toggle { display: none; }
.site-main { padding: 1.2rem clamp(1rem, 4vw, 3rem) 3rem; max-width: 1180px; margin: 0 auto; }
.disclaimer { font-size: .85rem; color: var(--ink-soft); max-width: 60ch; margin: 2rem 0 0; margin-left: auto; margin-right: auto; text-align: center;}
.kitchen-notice { font-size: .85rem; color: var(--ink-soft); background: var(--cream); border-left: 3px solid var(--orange); padding: .6rem .9rem; border-radius: 0 8px 8px 0; margin: .8rem 0; }
.kitchen-notice-box { max-width: 42rem; margin: 0 auto 1.8rem; padding: 1.1rem 1.4rem; border: 2px solid var(--ink); border-radius: 16px; background: var(--paper); text-align: center; }
.kitchen-notice-box .script { font-size: 1.5rem; margin: 0 0 .2rem; }
.kitchen-notice-box p:last-child { margin: 0; font-size: .95rem; color: var(--ink-soft); }
.site-footer { text-align: center; padding: 2.5rem 1rem 3rem; color: var(--ink-soft); border-top: 2px solid var(--cream-deep); }
.footer-script { font-family: var(--font-script); font-size: 1.9rem; color: var(--ink); margin: 0 0 .3rem; }
.footer-small { font-size: .85rem; }
.flash { max-width: 1180px; margin: .5rem auto; padding: .8rem 1.2rem; border-radius: 10px; font-weight: 600; }
.flash-success { background: #DDEFE3; color: #1E5A38; }
.flash-error { background: #F9D9CC; color: var(--orange-deep); }
.flash-info { background: var(--cream-deep); color: var(--ink-soft); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: center; padding: 1.5rem 0 2.5rem; }
.hero-script { font-family: var(--font-script); font-size: 4.2rem; margin: 0 0 calc(.2rem + 5px); line-height: 1.05; white-space: nowrap; }
.hero-solo { grid-template-columns: 1fr; }
.hero p { max-width: 34rem; color: var(--ink-soft); }
.hero-img { border-radius: 24px; overflow: hidden; box-shadow: 0 20px 40px -24px rgba(27,21,18,.55); aspect-ratio: 4/3; background: var(--cream-deep); }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
.heart { color: var(--orange); }

/* ---------- weekly counters ---------- */
.counters { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin: 0 0 2.5rem; }
.counter { background: var(--ink); color: var(--cream); border-radius: 14px; padding: 1rem 1.2rem; display: grid; grid-template-columns: auto 1fr; gap: .2rem 1rem; align-items: center; }
.counter-num { font-family: var(--font-head); font-size: 3rem; line-height: 1; color: var(--orange); grid-row: span 2; }
.counter-num.full { color: #9A8F86; }
.counter-name { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .05em; font-size: 1rem; }
.counter-sub { font-size: .85rem; color: #D9C9B3; }
.counter-bar { grid-column: 1 / -1; height: 6px; background: #3A2F28; border-radius: 3px; overflow: hidden; margin-top: .4rem; }
.counter-bar span { display: block; height: 100%; background: var(--orange); }
.counter-week { grid-column: 1 / -1; font-size: .78rem; color: #B9A88F; }

/* ---------- menu ---------- */
.menu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 1.5rem; margin-bottom: 3rem; }   /* min() lets cards shrink below 340px on narrow phones instead of overflowing */
.product { background: var(--paper); border: 2px solid var(--ink); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.product-img { aspect-ratio: 16/9; background: var(--cream-deep); overflow: hidden; }
.product-img { position: relative; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-img.slideshow img { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; }
.product-img.slideshow img.is-active { opacity: 1; }
.gallery-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.gallery-item { background: #fff; border: 1px solid #E4DACB; border-radius: 10px; overflow: hidden; }
.gallery-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.gallery-actions { display: flex; gap: .4rem; justify-content: space-between; align-items: center; padding: .4rem .5rem; font-size: .85rem; }
.gallery-upload { max-width: 520px; }
.product-body { padding: 1.2rem 1.4rem 1.4rem; display: flex; flex-direction: column; gap: .8rem; flex: 1; }
.product-body h2 { margin: 0; color: var(--orange-deep); }
.product-tag { color: var(--ink-soft); margin: 0; }
.product-desc { margin: 0; font-size: .95rem; color: var(--ink-soft); }
.opt-group-name { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .06em; color: var(--orange); font-size: .95rem; margin: .6rem 0 .2rem; }
.opt { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: center; padding: .5rem 0; border-bottom: 1px dotted rgba(27,21,18,.35); }
.opt:last-child { border-bottom: 0; }
.opt input[type=radio] { width: 20px; height: 20px; accent-color: var(--orange); margin: 0; }
.opt-name { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .04em; font-size: 1.05rem; }
.opt-desc { display: block; font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-size: .85rem; color: var(--orange-deep); }
.opt-price { font-family: var(--font-head); background: var(--orange); color: #fff; padding: .15rem .6rem; border-radius: 6px; font-size: 1.1rem; }
.opt-thumb { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--cream-deep); }
.add-row { display: flex; gap: .8rem; align-items: center; margin-top: auto; padding-top: .8rem; flex-wrap: wrap; }
.qty { display: inline-flex; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; }
.qty button { background: none; border: 0; width: 38px; font-size: 1.3rem; cursor: pointer; color: var(--ink); }
.qty input { width: 44px; border: 0; text-align: center; font: 700 1rem var(--font-body); background: transparent; }
.btn { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .06em; font-size: 1.05rem; border: 2px solid var(--ink); background: var(--ink); color: var(--cream); padding: .6rem 1.4rem; border-radius: 999px; cursor: pointer; text-decoration: none; display: inline-block; transition: background .15s, color .15s; }
.btn:hover { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn-orange { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn-orange:hover { background: var(--orange-deep); border-color: var(--orange-deep); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--cream); }
.btn-sm { font-size: .9rem; padding: .35rem .9rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
[aria-busy="true"] { opacity: .6; cursor: progress; }
.sold-out { background: var(--cream-deep); color: var(--orange-deep); padding: .6rem .9rem; border-radius: 10px; font-size: .9rem; font-weight: 600; }

.pantry { margin-bottom: 2.5rem; }
.accordion { border: 2px solid var(--orange); border-radius: 18px; background: var(--paper); min-width: 0; max-width: 100%; overflow: hidden; }
.accordion-head { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .8rem; padding: 1rem 1.4rem; user-select: none; }
.accordion-head::-webkit-details-marker { display: none; }
.accordion-head h2 { margin: 0; flex: 1; }
.accordion-count { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .05em; font-size: .85rem; background: var(--orange); color: #fff; padding: .15rem .6rem; border-radius: 999px; }
.chevron { width: 14px; height: 14px; border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: rotate(45deg); transition: transform .2s ease; margin: 0 .3rem 6px 0; }
.accordion[open] .chevron { transform: rotate(-135deg); margin: 6px .3rem 0 0; }
.accordion-head:hover .chevron { border-color: var(--orange); }
.accordion-body { padding: 0 1.4rem 1.4rem; min-width: 0; }
.accordion .pantry-intro { margin: 0 0 1rem; }
.accordion .menu-grid { margin-bottom: 0; }
.pantry-intro { color: var(--ink-soft); margin: -.4rem 0 1rem; }
.pantry .product { border-color: var(--orange); }
.pantry .product-body h2 { color: var(--ink); }
.stock-left { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .05em; font-size: .8rem; background: var(--cream-deep); color: var(--ink-soft); padding: .1rem .5rem; border-radius: 6px; margin-left: .4rem; }
.stock-low { background: var(--orange); color: #fff; }
.opt-ins { margin: .4rem 0 1rem; }
.progress-fill { display: block; height: 100%; background: var(--orange); }
/* ---------- pickup schedule block ---------- */
.pickup { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 3rem; align-items: start; }
.pickup-title { position: relative; display: inline-block; padding: .4rem 1.2rem; background: var(--ink); color: #fff; border-radius: 6px; transform: rotate(-1.5deg); }
.pickup-title .script { color: var(--orange); font-size: 1.6em; display: block; line-height: .9; }
.sched { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .4rem; }
.sched li { display: flex; justify-content: space-between; background: var(--ink); color: var(--cream); padding: .55rem 1rem; border-radius: 8px; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .05em; }
.sched li.closed span:last-child { color: var(--orange); }
.note-box { background: var(--paper); border: 2px dashed var(--orange); border-radius: 14px; padding: 1.2rem 1.4rem; }
.note-box .script { font-size: 1.4rem; color: var(--orange-deep); }

/* ---------- cart / forms / account ---------- */
.page { max-width: 760px; margin: 0 auto; }
.page-wide { max-width: 1000px; margin: 0 auto; }
.card { background: var(--paper); border: 2px solid var(--ink); border-radius: 18px; padding: 1.6rem; }
.card + .card { margin-top: 1.2rem; }
.card + .no-top-margin { margin-top: 0 !important; }
table.lines { width: 100%; border-collapse: collapse; }
table.lines th { text-align: left; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; font-size: .9rem; padding: .5rem .4rem; border-bottom: 2px solid var(--ink); }
table.lines td { padding: .7rem .4rem; border-bottom: 1px dotted rgba(27,21,18,.35); vertical-align: middle; }
table.lines .num { text-align: right; white-space: nowrap; }
.total-row td { font-family: var(--font-head); font-size: 1.3rem; border-bottom: 0; }
.qty-input { width: 64px; padding: .3rem; border: 2px solid var(--ink); border-radius: 8px; font: inherit; }
.field { display: grid; gap: .3rem; margin-bottom: 1rem; align-content: start; }   /* never stretch a field's rows to fill a taller neighbour */
.field > input, .field > select, .field > textarea { align-self: start; }
.field-row { align-items: start; }
.field label { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .05em; font-size: .9rem; }
.field input, .field select, .field textarea { font: inherit; padding: .6rem .8rem; border: 2px solid var(--ink); border-radius: 10px; background: #fff; width: 100%; }
.field small { color: var(--ink-soft); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.code-input { font-size: 2rem !important; letter-spacing: .5em; text-align: center; font-family: var(--font-head) !important; }
.checkout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 1.5rem; align-items: start; }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 1.2rem; align-items: stretch; }
.account-grid .card { margin-top: 0; }
.checkout > .card > h3 > p { font-family: var(--font-body); font-size: 17px; line-height: 1.55; }
.summary { position: sticky; top: 1rem; }
.status { display: inline-block; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .05em; font-size: .85rem; padding: .15rem .6rem; border-radius: 6px; background: var(--cream-deep); }
.status-confirmed { background: #DDEFE3; color: #1E5A38; }
.status-ready { background: var(--orange); color: #fff; }
.status-picked_up { background: var(--ink); color: var(--cream); }
.status-cancelled { background: #EFE3E3; color: #8B2C2C; text-decoration: line-through; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--ink-soft); }
.muted { color: var(--ink-soft); }
.inline-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }

/* ---------- calendar ---------- */
.cal { border: 2px solid var(--ink); border-radius: 14px; background: #fff; padding: .8rem; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.cal-head strong { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .06em; font-size: 1.1rem; }
.cal-head button { background: none; border: 2px solid var(--ink); border-radius: 50%; width: 34px; height: 34px; cursor: pointer; font-size: 1.1rem; }
.cal { min-width: 0; max-width: 100%; box-sizing: border-box; width: 100%; }
.cal-grid { width: 100%; }
.cal-grid > * { min-width: 0; max-width: 100%; box-sizing: border-box; }
#pickup-calendar { max-width: 100%; min-width: 0; }
.cal-day { height: 56px; }   /* explicit height: iOS Safari mis-sizes aspect-ratio on buttons inside a grid */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { text-align: center; font-family: var(--font-head); text-transform: uppercase; font-size: .75rem; letter-spacing: .05em; color: var(--ink-soft); padding-bottom: .2rem; }
.cal-day { min-width: 0; width: 100%; padding: 0; margin: 0; appearance: none; -webkit-appearance: none; border: 0; border-radius: 10px; background: var(--cream); font: 700 .95rem var(--font-body); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: var(--ink); overflow: hidden; }
.cal-day:hover:not(:disabled) { outline: 2px solid var(--orange); }
.cal-day:disabled { background: transparent; color: #B8AA98; cursor: not-allowed; text-decoration: line-through; }
.cal-day.full { background: #F3E4E0; color: #8B2C2C; text-decoration: none; }
.cal-day.full small, .cal-day.soon small { font-size: .55rem; text-transform: uppercase; letter-spacing: .05em; }
.cal-day.soon { background: #EFE6DA; color: #8A7A66; text-decoration: none; }
.cal-day.selected { background: var(--orange); color: #fff; }
.cal-day.empty { visibility: hidden; }
.cal-legend { display: flex; gap: 1rem; margin-top: .6rem; font-size: .8rem; color: var(--ink-soft); flex-wrap: wrap; }
.cal-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: .3rem; }
.week-remaining { margin-top: .8rem; margin-bottom: .8rem; padding: .7rem .9rem; background: var(--cream); border-radius: 10px; font-size: .9rem; }


/* ---------- utility classes (replace inline styles blocked by the CSP) ---------- */
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.margin-top-15 { margin-top: 1.5rem; }
.margin-top-12 { margin-top: 1.2rem; }
.margin-top-08 { margin-top: .8rem; }
.margin-y-1 { margin: 1rem 0; }
.text-small { font-size: .9rem; }
.text-smaller { font-size: .85rem; }
.script-big { font-size: 2.2rem; }
.card-narrow { max-width: 520px; }
.h2-small { font-size: 1.4rem; }
.inline-actions.center { justify-content: center; }
.w-60 { width: 60px !important; } .w-80 { width: 80px !important; } .w-100 { width: 100px !important; } .w-120 { width: 120px !important; } .w-160 { width: 160px !important; } .w-220 { width: 220px !important; }
/* ---------- admin ---------- */
.admin-body { background: #F6F2EA; background-image: none; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; }
.table-wrap table.admin { min-width: 640px; margin-top: 20px; }
.admin-shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.admin-side { background: var(--ink); color: var(--cream); padding: 1.2rem 1rem; display: flex; flex-direction: column; gap: 1.5rem; position: sticky; top: 0; height: 100vh; }
.admin-side .brand { padding: 4px 0; }
.admin-side .brand img { height: 68px; }
.admin-side nav { display: grid; gap: .2rem; }
.admin-side nav a { color: var(--cream); text-decoration: none; padding: .55rem .8rem; border-radius: 8px; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .05em; font-size: .95rem; }
.admin-side nav a.on, .admin-side nav a:hover { background: var(--orange); color: #fff; }
.admin-side-foot { margin-top: auto; font-size: .85rem; display: grid; gap: .3rem; color: #C9B9A3; }
.admin-side-foot a { color: var(--cream); }
.admin-side-foot a.on { color: var(--orange); }
.admin-main { padding: 1.5rem clamp(1rem, 3vw, 2.5rem); max-width: 1200px; }
.admin-main h1 { font-size: 2rem; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat { background: #fff; border-radius: 14px; padding: 1rem 1.2rem; border: 1px solid #E4DACB; }
.stat b { display: block; font-family: var(--font-head); font-size: 2.2rem; line-height: 1; color: var(--orange-deep); }
.stat span { font-size: .85rem; color: var(--ink-soft); }
table.admin { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid #E4DACB; font-size: .95rem; }
table.admin th { text-align: left; background: var(--cream-deep); padding: .6rem .8rem; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; font-size: .85rem; }
table.admin td { padding: .6rem .8rem; border-top: 1px solid #F0E8DA; vertical-align: middle; }
table.admin tr.inactive td { opacity: .5; }
.thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; border: 1px solid #E4DACB; }
.hero-thumb { width: 240px; height: 180px; margin-bottom: .8rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1.2rem; align-items: start; }
.form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .field { grid-template-rows: auto auto 1fr; }
.field small { line-height: 1.35; }
.field textarea { resize: vertical; min-height: 4.2rem; }
.admin-main .card h3 { margin-bottom: .6rem; }
.inline-form { display: contents; }
.inline-form input[type=text], .inline-form input[type=number] { font: inherit; padding: .4rem .5rem; border: 1px solid #C9BBA7; border-radius: 6px; width: 100%; }
.danger { color: #8B2C2C; }
.order-new-product { margin: 1rem 0 .2rem; font-size: 1.1rem; }
.order-new-opt { grid-template-columns: 70px 1fr auto; }
.order-new-opt .qty-input { width: 64px; }
.rbadge { display: inline-block; font-family: var(--font-head); font-size: .75rem; letter-spacing: .05em; padding: .1rem .45rem; border-radius: 6px; background: var(--cream-deep); color: #9A8F86; margin-right: .25rem; white-space: nowrap; }
.rbadge-sent { background: #DDEFE3; color: #1E5A38; }
.danger-zone { margin-top: 1.5rem; border-color: #8B2C2C; }
.danger-zone h3 { color: #8B2C2C; }
.check-label { display: flex; gap: .5rem; align-items: center; font-family: var(--font-body) !important; text-transform: none !important; letter-spacing: 0 !important; margin-bottom: .6rem; }
.check-label input { width: 20px; height: 20px; margin: 0; accent-color: var(--orange); }
.inline-form-block { display: inline-block; margin-left: .8rem; }
.text-field.is-edited { border-left: 3px solid var(--orange); padding-left: .8rem; }
.edited-badge { font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-size: .75rem; background: var(--orange); color: #fff; border-radius: 999px; padding: 0 .5rem; margin-left: .4rem; }
code { background: var(--cream-deep); padding: 0 .3rem; border-radius: 4px; font-size: .9em; }
.view-tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: .8rem; }
.view-tabs a { text-decoration: none; color: var(--ink); font-family: var(--font-head); text-transform: uppercase; letter-spacing: .05em; padding: .45rem .9rem; border-radius: 999px; border: 2px solid var(--ink); }
.view-tabs a.on { background: var(--ink); color: var(--cream); }
.view-tabs .count { font-family: var(--font-body); font-size: .8rem; opacity: .75; margin-left: .2rem; }
.filters { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.filters select, .filters input { font: inherit; padding: .4rem .6rem; border: 2px solid var(--ink); border-radius: 8px; }
.day-row { display: grid; grid-template-columns: 130px 80px 1fr 1fr; gap: .8rem; align-items: center; padding: .5rem 0; border-bottom: 1px dotted #C9BBA7; }
.day-row input[type=time] { font: inherit; padding: .4rem; border: 1px solid #C9BBA7; border-radius: 6px; }
.chips { display: flex; gap: .5rem; flex-wrap: wrap; }
.chip { background: var(--cream-deep); border-radius: 999px; padding: .2rem .7rem; font-size: .9rem; display: inline-flex; gap: .5rem; align-items: center; }
.chip form { display: inline; }
.chip button { background: none; border: 0; color: var(--orange-deep); cursor: pointer; font-weight: 700; }

/* ---------- auth pages ---------- */
.auth { max-width: 460px; margin: 2rem auto; }
.auth .card { padding: 2rem; }
.auth h1 { font-size: 2.2rem; }
.auth p.alt { text-align: center; margin-top: 1rem; }

/* ---------- margin styles ---------- */
.margin-top-1 { margin-top: 1rem; }
.margin-top-2 { margin-top: 2rem; }
.margin-top-3 { margin-top: 3rem; }
.margin-top-4 { margin-top: 4rem; }
.margin-top-5 { margin-top: 5rem; }
.margin-bottom-1 { margin-bottom: 1rem; }
.margin-bottom-2 { margin-bottom: 2rem; }
.margin-bottom-3 { margin-bottom: 3rem; }
.margin-bottom-4 { margin-bottom: 4rem; }
.margin-bottom-5 { margin-bottom: 5rem; }
.no-top-margin { margin-top: 0 !important; }
.no-bottom-margin { margin-bottom: 0 !important; }

/* ---------- Script Title Styles ---------- */
.script-title1 { font-size: 3.0rem; margin: 0 0 1rem; }

@media (max-width: 820px) {
  .hero, .pickup, .checkout, .account-grid { grid-template-columns: 1fr; }
  .hero-script { font-size: 1.9rem; text-align: center; white-space: normal; }   /* matches the footer tagline on phones */

  /* checkout calendar on phones */
  .checkout, .checkout > .card { min-width: 0; }
  .checkout > .card { overflow: hidden; }
  .cal { padding: .5rem; }
  .cal-grid { gap: 3px; }
  .cal-day { height: 44px; font-size: .85rem; border-radius: 7px; }
  .cal-day.full small, .cal-day.soon small { font-size: .5rem; }
  .cal-head strong { font-size: .95rem; }
  .cal-legend { gap: .6rem; font-size: .72rem; }

  /* cart: each line becomes a card so nothing spills outside the container */
  .card { padding: 1.1rem; }
  .cal { padding: .5rem; }
  .cal-grid { gap: 3px; }
  .cal-day { font-size: .85rem; border-radius: 8px; }
  .cal-legend { gap: .6rem; font-size: .72rem; }
  .cart-lines thead { display: none; }
  .cart-lines, .cart-lines tbody, .cart-lines tr { display: block; width: 100%; }
  .cart-lines tr { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem .8rem; padding: .8rem 0; border-bottom: 1px dotted rgba(27,21,18,.35); }
  .cart-lines td { display: block; padding: 0; border: 0; text-align: left; }
  .cart-lines td.cart-item { grid-column: 1 / -1; }
  .cart-lines td[data-label]::before { content: attr(data-label); display: block; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .05em; font-size: .7rem; color: var(--ink-soft); }
  .cart-lines td.cart-each { display: none; }
  .cart-lines td.cart-total { text-align: right; font-weight: 700; }
  .cart-lines td.cart-remove { grid-column: 1 / -1; }
  .cart-lines td.cart-remove .btn { width: 100%; text-align: center; }
  .cart-lines .qty-input { width: 100%; min-height: 44px; font-size: 16px; }
  .cart-lines tr.total-row { grid-template-columns: 1fr auto; border-bottom: 0; }
  .cart-lines tr.total-row td { font-size: 1.15rem; }
  .cart-lines tr.total-row td.cart-item { grid-column: auto; }
  .cart-lines tr.total-row td.cart-remove { display: none; }
  .site-header-inner { flex-wrap: wrap; padding-top: .7rem; padding-bottom: .7rem; }
  .brand img { height: 56px; }
  .site-header .site-nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: .2rem; margin-top: .6rem; padding-top: .6rem; border-top: 1px solid #3A2F28; }
  .site-header.open .site-nav { display: flex; }
  .site-header .site-nav a { padding: .75rem .4rem; font-size: 1.05rem; border-bottom: 0; }
  .site-header .cart-link { text-align: center; margin-top: .3rem; }
  .field-row { grid-template-columns: 1fr; }
  .accordion-head { padding: .8rem 1rem; }
  .accordion-body { padding: 0 .8rem 1rem; }
  .summary { position: static; }

  /* admin: sticky top bar; Menu button opens the full nav */
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: sticky; top: 0; z-index: 20; height: auto; padding: .6rem .9rem; gap: 0; box-shadow: 0 4px 14px rgba(27,21,18,.25); }
  .admin-side .brand img { height: 54px; }
  .admin-side-top { display: flex; align-items: center; justify-content: space-between; }
  .menu-toggle { display: inline-flex; align-items: center; gap: .5rem; background: none; border: 2px solid var(--cream); color: var(--cream); border-radius: 8px; padding: .4rem .8rem; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .06em; font-size: .95rem; cursor: pointer; min-height: 40px; }
  .menu-bars { width: 18px; height: 2px; background: currentColor; position: relative; display: inline-block; }
  .menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; }
  .menu-bars::before { top: -6px; } .menu-bars::after { top: 6px; }
  .admin-side nav, .admin-side-foot { display: none; }
  .admin-side.open nav { display: grid; gap: .2rem; margin-top: .8rem; }
  .admin-side.open nav a { padding: .75rem .9rem; font-size: 1.05rem; }
  .admin-side.open .admin-side-foot { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; margin: .8rem 0 .2rem; padding-top: .8rem; border-top: 1px solid #3A2F28; }
  .admin-main { padding: 1rem .9rem 2.5rem; }
  .admin-main h1 { font-size: 1.6rem; }
  .page-head { margin-bottom: .8rem; }
  .stats { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .stat { padding: .8rem .9rem; }
  .stat b { font-size: 1.7rem; }
  .card { padding: 1.1rem; border-radius: 14px; }
  .day-row { grid-template-columns: 1fr 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; }
  .filters input[type=search] { grid-column: 1 / -1; }
  .field input, .field select, .field textarea, .filters select, .filters input, .day-row input[type=time] { min-height: 44px; font-size: 16px; } /* 16px stops iOS zooming on focus */
  .btn { min-height: 44px; }
  .btn-sm { min-height: 40px; }
  .inline-actions { gap: .5rem; }

  /* admin tables become a stack of cards: one card per row, label + value per cell */
  .table-wrap { overflow: visible; border-radius: 0; }
  .table-wrap table.admin { min-width: 0; }
  table.admin, table.admin tbody, table.admin tr, table.admin td { display: block; width: 100%; }
  table.admin { background: none; border: 0; }
  table.admin tr:has(th) { display: none; }
  table.admin tr { background: #fff; border: 1px solid #E4DACB; border-radius: 12px; padding: .5rem 1rem .9rem; margin-bottom: .7rem; }
  table.admin tr.inactive { opacity: .6; }
  table.admin tr.inactive td { opacity: 1; }
  table.admin td { display: block; position: relative; padding: .5rem 0 .5rem 8.3rem; border: 0; border-bottom: 1px dotted #E4DACB; min-height: 2.4rem; }
  table.admin td[data-label]::before { content: attr(data-label); position: absolute; left: 0; top: .6rem; width: 7.5rem; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .05em; font-size: .75rem; color: var(--ink-soft); }
  table.admin td.no-label { padding-left: 0; }
  table.admin td:last-child { border-bottom: 0; }
  table.admin td:empty, table.admin td.hide-mobile { display: none; }
  table.admin td.cell-title { font-size: 1.1rem; padding-top: .6rem; }
  table.admin td.cell-thumb img { width: 100%; max-width: 160px; height: 100px; }
  table.admin td.inline-actions { display: flex; flex-wrap: wrap; gap: .5rem; padding-top: .8rem; }
  table.admin td.inline-actions .btn { flex: 1 1 auto; text-align: center; }
  table.admin td input[type=text], table.admin td input[type=number], table.admin td input[type=file], table.admin td .w-60, table.admin td .w-80, table.admin td .w-100, table.admin td .w-120, table.admin td .w-160, table.admin td .w-220 { width: 100% !important; min-height: 42px; font-size: 16px; padding: .4rem .6rem; }
  table.admin td input[type=checkbox] { width: 22px; height: 22px; }
}
@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  table.admin td { padding-left: 6.8rem; }
  table.admin td[data-label]::before { width: 6rem; }
  .day-row { grid-template-columns: 1fr; gap: .4rem; padding: .8rem 0; }
  .filters { grid-template-columns: 1fr; }
}