:root {
  --bg: #fbf7f0;
  --card: #ffffff;
  --ink: #1f2433;
  --muted: #6b6f7b;
  --line: #e9e2d6;
  --blue: #1f4fa3;
  --blue-dark: #173c7d;
  --blue-soft: #e8eefa;
  --gold: #c9962b;
  --gold-soft: #f6ead0;
  --cream: #fffaf1;
  --paper: #fffdf8;
  --navy: #14254a;
  --green: #2f7d4f;
  --green-soft: #e4f3ea;
  --amber-soft: #fbf0d9;
  --red: #b53b3b;
  --red-soft: #f8e6e6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(31, 36, 51, .05), 0 4px 16px rgba(31, 36, 51, .05);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
h1, h2, h3, h4 { font-family: Fraunces, Georgia, serif; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.35rem; }
a { color: var(--blue); }
code { background: var(--blue-soft); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.demo-banner { background: var(--amber-soft); color: #7a5a12; text-align: center; font-size: .875rem; padding: 6px 16px; }

/* header */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand img { display: block; height: 46px; width: auto; }
.brand { font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: 1.25rem; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.ribbon { width: 22px; height: 22px; border-radius: 50%; background: var(--blue); box-shadow: inset 0 0 0 4px var(--blue), inset 0 0 0 6px #fff, inset 0 0 0 11px var(--gold); position: relative; }
.ribbon::after { content: ""; position: absolute; left: 5px; top: 17px; border: 6px solid var(--blue); border-bottom-color: transparent; border-top-width: 9px; }
.admin-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.admin-nav a, .linklike { padding: 8px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; font: inherit; font-weight: 500; background: none; border: 0; cursor: pointer; }
.admin-nav a:hover, .linklike:hover { background: var(--bg); color: var(--ink); }
.admin-nav a.on { background: var(--blue-soft); color: var(--blue); }
.admin-nav form { margin: 0; }

.site-footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .875rem; padding: 40px 16px; }

/* basics */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 20px; }
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 20px; font-weight: 500; }
.flash-error { background: var(--red-soft); color: var(--red); }
.flash-success { background: var(--green-soft); color: var(--green); }
.flash-info { background: var(--blue-soft); color: var(--blue-dark); }

label { display: block; font-weight: 500; font-size: .9375rem; margin-bottom: 14px; }
input, textarea, select {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
  font: inherit; font-weight: 400;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.check-label { display: flex; align-items: center; gap: 10px; }
.check-label input { width: auto; margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; }
.delete-form { margin-top: 20px; text-align: right; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-primary:disabled { background: #a9b6cf; cursor: not-allowed; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-danger-ghost { background: none; color: var(--red); border-color: transparent; }
.btn-danger-ghost:hover { background: var(--red-soft); }
.btn-block { width: 100%; }
.btn-small { padding: 6px 10px; font-size: .8125rem; border-radius: 8px; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.badge-paid { background: var(--green-soft); color: var(--green); }
.badge-picked_up { background: #eceef2; color: var(--muted); }
.badge-pending { background: var(--amber-soft); color: #7a5a12; }
.badge-cancelled { background: var(--red-soft); color: var(--red); }

.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.big { font-size: 1.25rem; font-weight: 700; }
tr.inactive td { opacity: .55; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.clamp { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* storefront */
[hidden] { display: none !important; }
body.shop {
  background:
    radial-gradient(circle at 12% -10%, rgba(201, 150, 43, .10), transparent 40%),
    radial-gradient(circle at 100% 0%, rgba(31, 79, 163, .08), transparent 35%),
    var(--bg);
}
body.shop { min-height: 100vh; }
.shop main { padding-top: 28px; }
.shop .site-header { background: rgba(255, 253, 248, .85); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20; margin-bottom: 0; }

.hero { text-align: center; padding: 8px 0 40px; position: relative; }
.hero-logo { margin: 0 0 6px; line-height: 0; }
.hero-logo img { width: min(520px, 86vw); height: auto; }
.rosette { display: inline-block; margin-bottom: 6px; filter: drop-shadow(0 6px 10px rgba(20, 37, 74, .18)); animation: sway 6s ease-in-out infinite; transform-origin: 50% 0; }
@keyframes sway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@media (prefers-reduced-motion: reduce) { .rosette { animation: none; } }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .75rem; font-weight: 600; color: var(--gold); margin: 0 0 8px; }
.hero h1 { font-size: clamp(2.4rem, 7vw, 4rem); letter-spacing: -.02em; color: var(--navy); margin-bottom: 10px; }
.lede { font-size: 1.15rem; margin: 0 auto 6px; max-width: 34em; color: #3d4250; }
.hero-chips { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.chip { background: var(--paper); border: 1px solid var(--line); border-radius: 99px; padding: 7px 14px; font-size: .9rem; color: var(--muted); box-shadow: var(--shadow); }
.chip strong { color: var(--ink); font-weight: 600; }
.closed { max-width: 560px; margin: 0 auto 40px; padding: 40px 24px; }

.step { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; font: 600 .875rem Inter, sans-serif; margin-right: 10px; vertical-align: 4px; box-shadow: 0 0 0 4px var(--gold-soft); }

.order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
fieldset { border: 0; padding: 0; margin: 0 0 36px; min-width: 0; }
legend { font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: 1.45rem; margin-bottom: 16px; padding: 0; color: var(--navy); }

.day-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.day-option { margin: 0; cursor: pointer; }
.day-option input { position: absolute; opacity: 0; width: 1px; }
.day-card { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--paper); height: 100%; font-weight: 400; transition: border-color .15s, box-shadow .15s, transform .15s; }
.day-option:hover .day-card { transform: translateY(-1px); box-shadow: var(--shadow); }
.day-date { flex: none; width: 56px; text-align: center; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.day-num { display: block; font: 700 1.6rem/1.3 Fraunces, Georgia, serif; color: var(--navy); }
.day-mon { display: block; background: var(--navy); color: #fff; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; padding: 2px 0; }
.day-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.day-note { margin-top: 4px; font-size: .8rem; font-weight: 600; color: #7a5a12; background: var(--gold-soft); border-radius: 6px; padding: 2px 8px; align-self: flex-start; }
.day-option input:checked + .day-card { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 0 0 3px rgba(31, 79, 163, .12); }
.day-option input:checked + .day-card .day-mon { background: var(--blue); }
.day-option input:focus-visible + .day-card { outline: 2px solid var(--blue); outline-offset: 2px; }

.cat { display: flex; align-items: center; gap: 12px; margin: 26px 0 14px; font: 600 .78rem Inter, sans-serif; text-transform: uppercase; letter-spacing: .14em; color: var(--gold); }
.cat::after { content: ""; flex: 1; height: 1px; background: linear-gradient(to right, var(--line), transparent); }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.item { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, border-color .15s; }
.item:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(31, 36, 51, .10); }
.item.chosen { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue), 0 10px 28px rgba(31, 79, 163, .12); }
.item.soldout { opacity: .6; }
.item.soldout:hover { transform: none; }
.item-photo { position: relative; aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--gold-soft), #f3e3c3); overflow: hidden; }
.item-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.item:hover .item-photo img { transform: scale(1.04); }
.item-initial { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 700 4.5rem Fraunces, Georgia, serif; color: rgba(122, 90, 18, .35); }
.item-photo::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(122, 90, 18, .12) 1px, transparent 1px); background-size: 12px 12px; pointer-events: none; }
.item-photo:has(img)::after { display: none; }
.left-badge { position: absolute; top: 10px; left: 10px; z-index: 1; background: var(--navy); color: #fff; font-size: .75rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; }
.soldout .left-badge { background: var(--red); }
.item-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.item-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.item-top h4 { font-size: 1.15rem; margin: 0; color: var(--navy); }
.price { font-weight: 700; white-space: nowrap; color: var(--ink); }
.item-body p { margin: 6px 0 0; font-size: .9rem; line-height: 1.45; }
.item-foot { display: flex; justify-content: flex-end; align-items: center; margin-top: auto; padding-top: 14px; }
.btn-add { background: var(--navy); color: #fff; padding: 9px 22px; border-radius: 99px; }
.btn-add:hover:not(:disabled) { background: var(--blue); }
.btn-add:disabled { background: #d9d4ca; color: #8a8579; cursor: not-allowed; }
.item.chosen .btn-add { display: none; }
.item:not(.chosen) .stepper { display: none; }
.stepper { display: flex; align-items: center; border-radius: 99px; overflow: hidden; background: var(--blue-soft); }
.stepper button { width: 38px; height: 38px; border: 0; background: transparent; font-size: 1.25rem; cursor: pointer; color: var(--blue-dark); }
.stepper button:hover:not(:disabled) { background: rgba(31, 79, 163, .12); }
.stepper button:disabled { color: #a9b6cf; cursor: not-allowed; }
.stepper input { width: 40px; margin: 0; border: 0; border-radius: 0; text-align: center; padding: 8px 0; background: transparent; font-weight: 700; color: var(--blue-dark); -moz-appearance: textfield; appearance: textfield; }
.stepper input:focus { outline: none; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* order "ticket" */
.order-side { position: sticky; top: 84px; }
.ticket { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 24px 22px 20px; box-shadow: 0 12px 34px rgba(20, 37, 74, .10); }
.ticket::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; border-radius: 16px 16px 0 0; background: repeating-linear-gradient(90deg, var(--blue) 0 18px, var(--gold) 18px 24px); }
.ticket h2 { color: var(--navy); }
.summary { list-style: none; padding: 0; margin: 0 0 14px; }
.summary li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.summary li.empty { color: var(--muted); justify-content: center; border: 1px dashed var(--line); border-radius: 10px; padding: 16px; font-size: .9rem; }
.summary .q { display: inline-block; min-width: 26px; font-weight: 700; color: var(--blue); }
.discount { margin-bottom: 10px; }
.discount-row { display: flex; gap: 8px; }
.discount-row input { margin: 0; text-transform: uppercase; padding: 8px 12px; font-size: .9rem; }
.discount-row input::placeholder { text-transform: none; }
.discount-msg { margin: 6px 0 0; min-height: 0; }
.discount-msg:empty { display: none; }
.discount-msg.ok { color: var(--green); }
.discount-msg.warn { color: #7a5a12; }
.discount-msg.err { color: var(--red); }
.totals { border-top: 2px solid var(--ink); padding-top: 10px; margin-bottom: 18px; }
.total-line { display: flex; justify-content: space-between; font-size: .95rem; color: var(--muted); padding: 2px 0; }
.total-line.disc { color: var(--green); }
.total-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.15rem; margin-top: 4px; }
.total-row strong { font: 700 1.6rem Fraunces, Georgia, serif; color: var(--navy); }
.ticket-fields label { margin-bottom: 12px; }
.btn-lg { padding: 14px 18px; font-size: 1.05rem; border-radius: 12px; }
.btn-primary:not(:disabled) { box-shadow: 0 6px 16px rgba(31, 79, 163, .28); }
.secure { margin: 10px 0 0; }
.code-chip { display: inline-block; font: 600 .72rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; background: var(--green-soft); color: var(--green); border-radius: 6px; padding: 1px 6px; vertical-align: 1px; }

.mobile-bar { display: none; }

/* accounts */
.account-nav { display: flex; align-items: center; gap: 6px; }
.account-nav > a:not(.btn) { padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; }
.account-nav > a:not(.btn):hover { background: var(--bg); }
.account-link { display: inline-flex; align-items: center; gap: 8px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--blue-soft); color: var(--blue-dark); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.auth-card { max-width: 440px; margin: 20px auto 40px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 32px 28px; box-shadow: 0 12px 34px rgba(20, 37, 74, .10); position: relative; }
.auth-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; border-radius: 18px 18px 0 0; background: repeating-linear-gradient(90deg, var(--blue) 0 18px, var(--gold) 18px 24px); }
.auth-card h1 { color: var(--navy); font-size: 1.8rem; }
.auth-links { margin: 14px 0 0; text-align: center; font-size: .9rem; }
.auth-alt { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); text-align: center; font-size: .95rem; }
.signed-in { background: var(--blue-soft); border-radius: 10px; padding: 8px 12px; margin: 0 0 14px; color: var(--blue-dark); }
.signed-in .linklike { padding: 0; color: var(--blue); text-decoration: underline; font-size: inherit; }
.account-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.account-head h1 { color: var(--navy); margin-bottom: 2px; }
.account-head p { margin: 0; }
.account-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 20px; align-items: start; }
.signout { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.signout .linklike { padding: 0; color: var(--muted); }
.past-order { display: flex; justify-content: space-between; gap: 12px; padding: 14px 12px; margin: 0 -12px; border-radius: 10px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--line); }
.past-order:hover { background: var(--bg); }
.past-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

/* payment + confirmation */
.pay-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
#sumup-card { min-height: 280px; }
.confirm-head { text-align: center; margin-bottom: 20px; }
.check { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 2rem; display: flex; align-items: center; justify-content: center; }

/* receipt */
.r-logo { display: block; height: 52px; width: auto; }
.receipt header { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 12px; }
.r-brand { font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: 1.25rem; }
.r-number { font-weight: 700; font-size: 1.125rem; }
.r-meta { margin: 0 0 12px; }
.r-meta div { display: flex; gap: 12px; padding: 2px 0; }
.r-meta dt { width: 64px; flex: none; color: var(--muted); }
.r-meta dd { margin: 0; }
.r-items { width: 100%; border-collapse: collapse; margin: 12px 0; }
.r-items td { padding: 6px 4px; border-bottom: 1px dashed var(--line); }
.r-items .qty { width: 44px; white-space: nowrap; color: var(--muted); }
.r-items tfoot td { border: 0; border-top: 2px solid var(--ink); font-weight: 700; padding-top: 8px; font-size: 1.05rem; }
.r-items tfoot tr.sub td { border-top: 0; font-weight: 400; font-size: .95rem; padding-top: 4px; color: var(--muted); }
.r-items tfoot tr.sub:first-child td { border-top: 2px solid var(--ink); padding-top: 8px; }
.r-items tfoot tr.sub + tr:not(.sub) td { border-top: 1px dashed var(--line); }
.r-items tfoot tr.disc td { color: var(--green); }
.r-notes { background: var(--amber-soft); padding: 8px 10px; border-radius: 8px; }
.r-status { font-weight: 600; color: var(--green); margin: 8px 0; }
.r-loc, .r-foot { color: var(--muted); font-size: .875rem; margin: 4px 0; }

/* admin */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.toolbar h1 { margin: 0; }
.toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.day-picker select { margin: 0; min-width: 280px; font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat-label { display: block; color: var(--muted); font-size: .8125rem; font-weight: 500; }
.stat-value { display: block; font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: 1.75rem; font-variant-numeric: tabular-nums; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 20px; align-items: start; }
.order-row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 20px; }
.order-row:last-child { border-bottom: 0; }
.order-row.picked_up .order-who { opacity: .55; }
.order-row:target { background: var(--blue-soft); margin: 0 -12px; padding: 14px 12px; border-radius: 10px; }
.order-items { margin-top: 4px; }
.note { margin-top: 4px; color: #7a5a12; }
.order-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.other-orders { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.other-orders summary { cursor: pointer; font-weight: 600; color: var(--muted); }

/* print pages */
.print-page { background: #fff; }
.print-bar { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; }
.print-sheet { max-width: 720px; margin: 24px auto; padding: 0 16px; }
.receipt-sheet { max-width: 480px; border: 1px dashed var(--line); padding: 20px; border-radius: 8px; }
.print-table td, .print-table th { padding: 6px 8px; }
.tick { width: 30px; font-size: 1.2rem; }

@media print {
  @page { margin: 14mm; }
  body { background: #fff; font-size: 12pt; }
  .no-print, .print-bar, .site-header, .site-footer, .demo-banner, .flash { display: none !important; }
  .card { box-shadow: none; border: 0; padding: 0; }
  .print-sheet { margin: 0 auto; page-break-after: always; break-after: page; }
  .print-sheet:last-of-type { page-break-after: auto; break-after: auto; }
  .receipt-sheet { border: 0; padding: 0; }
  .r-notes { border: 1px solid #999; }
  .table th, .table td { border-color: #bbb; }
}

@media (max-width: 860px) {
  .order-layout, .pay-layout, .dash-grid, .account-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .sticky, .order-side { position: static; }
  .shop main { padding-bottom: 80px; }
  .mobile-bar {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30;
    background: var(--navy); color: #fff; text-decoration: none;
    padding: 14px 18px; border-radius: 14px; box-shadow: 0 10px 30px rgba(20, 37, 74, .35);
  }
  .day-picker select { min-width: 0; }
  .menu-table th:nth-child(2), .menu-table td:nth-child(2),
  .menu-table th:nth-child(4), .menu-table td:nth-child(4) { display: none; }
}
@media (max-width: 520px) {
  h1 { font-size: 1.6rem; }
  .account-nav .btn { display: none; }
  .brand img { height: 32px; }
  .items { grid-template-columns: 1fr 1fr; gap: 10px; }
  .item-body { padding: 10px 12px 12px; }
  .item-top { flex-direction: column; gap: 2px; }
  .item-top h4 { font-size: 1rem; }
  .item-body p { display: none; }
  .item-initial { font-size: 3rem; }
  .btn-add { padding: 8px 16px; width: 100%; }
  .item-foot { justify-content: stretch; }
  .item-foot .stepper { width: 100%; justify-content: space-between; }
  .day-options { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .grid2 { grid-template-columns: 1fr; }
  .order-row { flex-direction: column; }
  .order-right { align-items: flex-start; text-align: left; }
  .row-actions { justify-content: flex-start; }
  .clamp { max-width: 160px; }
}

/* per-pop-up stock limits */
.limits { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 6px; margin: 4px 0 16px; }
.limits legend { font: 600 .95rem Inter, sans-serif; color: var(--ink); padding: 0 6px; margin: 0; }
.limits > p { margin: 0 0 10px; }
.limit-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 8px; font-weight: 500; }
.limit-row input { width: 110px; margin: 0; text-align: right; }
.limit-row.inactive { opacity: .6; }
.stock-title { font-size: 1rem; margin: 20px 0 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.stock-row { margin-bottom: 10px; }
.stock-top { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; margin-bottom: 4px; }
.stock-top .sold-out { color: var(--red); }
.meter { height: 6px; border-radius: 99px; background: var(--bg); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--blue); border-radius: 99px; }
.day-option.full { cursor: not-allowed; }
.day-option.full .day-card { opacity: .6; background: var(--bg); }
.day-option.full:hover .day-card { transform: none; box-shadow: none; }
.day-full { margin-top: 4px; font-size: .8rem; font-weight: 600; color: var(--red); background: var(--red-soft); border-radius: 6px; padding: 2px 8px; align-self: flex-start; }
.day-left-note { margin: -6px 0 14px; display: inline-block; font-size: .9rem; font-weight: 600; color: #7a5a12; background: var(--gold-soft); border-radius: 8px; padding: 6px 12px; }

/* photo picker on the menu item form */
.photo-field { margin-bottom: 14px; }
.field-label { display: block; font-weight: 500; font-size: .9375rem; margin-bottom: 8px; }
.photo-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-bottom: 10px; }
.photo-pick { padding: 0; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; cursor: pointer; font: inherit; text-align: center; }
.photo-pick img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.photo-pick span { display: block; font-size: .75rem; padding: 4px 6px; color: var(--muted); }
.photo-pick.none { display: flex; align-items: center; justify-content: center; min-height: 80px; background: var(--bg); }
.photo-pick.on { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(31, 79, 163, .2); }
.photo-pick.on span { color: var(--blue); font-weight: 600; }
