/* Grill Kawaaii Foods theme. Mobile first. No inline styles anywhere (strict CSP).
   The colours are sampled from the stall poster: navy, red, yellow and white. Every text/background pair
   below is checked by test/contrast.test.ts (WCAG AA: 4.5:1 for body text, 3:1 for large text and UI parts).
   Colour is never the only carrier of meaning: statuses and errors always carry words. */
:root {
  --navy: #01204f;      /* poster navy (header, footer, hero) */
  --red: #e10d24;       /* poster red (buttons, prices, links) */
  --yellow: #feed01;    /* poster yellow (highlights on navy) */
  --white: #ffffff;
  --paper: #fcfbf9;     /* poster white (page background) */
  --overlay: #0b0f1a;   /* lightbox backdrop */
  --ink: #0b1633;       /* body text */
  --muted: #3f4863;     /* secondary text */
  --border: #6b7385;    /* form and card outlines (UI parts, 3:1) */
  --row: #eef1f7;       /* zebra rows, quiet panels */
  --ok: #0b6b2f;
  --warn: #7a4a00;
  --bad: #b00b1f;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); font: 1rem/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
/* One shared container: the header content, the page and the footer content all use it, so their left edges line up.
   The navy header and footer bands stay full width; only their content is held to the container. */
.container { width: 100%; max-width: 70rem; margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 48rem) { .container { padding-inline: 1.5rem; } }
.prose { max-width: 46rem; }
a { color: var(--red); text-underline-offset: .15em; }
a:hover { color: var(--navy); }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.2; color: var(--navy); }
h1 { font-size: 1.8rem; margin: 0 0 .5rem; }
h2 { font-size: 1.35rem; margin: 1.5rem 0 .5rem; }
h3 { font-size: 1.1rem; margin: 0 0 .25rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--yellow); color: var(--navy); padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 0; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.site-header :focus-visible, .site-footer :focus-visible, .hero :focus-visible { outline-color: var(--yellow); }
.action-bar :focus-visible { outline-color: var(--white); }

/* header, nav, footer */
.site-header { background: var(--navy); color: var(--white); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1rem; padding-block: .5rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--white); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.brand img { border-radius: 50%; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .1rem .25rem; }
.site-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .35rem .75rem; color: var(--white); text-decoration: none; border-radius: .4rem; }
.site-nav a:hover { background: rgba(255, 255, 255, .15); color: var(--white); }
.site-nav a[aria-current="page"] { background: var(--yellow); color: var(--navy); font-weight: 700; }
/* The hamburger: hidden unless JavaScript is running AND the screen is a phone, so without JS the nav is a plain visible list. */
button.menu-button { display: none; align-items: center; gap: .6rem; min-width: 2.75rem; min-height: 2.75rem; padding: .35rem .9rem; font: inherit; font-weight: 700; color: var(--white); background: transparent; border: 2px solid var(--white); border-radius: .5rem; cursor: pointer; }
button.menu-button:hover { background: rgba(255, 255, 255, .15); color: var(--white); border-color: var(--white); }
.menu-button .menu-icon { flex: 0 0 auto; }
@media (max-width: 47.99rem) {
  .js button.menu-button { display: inline-flex; }
  .js .site-nav { display: none; flex: 0 0 100%; }
  .js .site-header[data-nav-open] .site-nav { display: block; }
  .site-nav ul { flex-direction: column; gap: .15rem; padding-bottom: .5rem; }
  .site-nav a { width: 100%; font-size: 1.1rem; }
  .brand span { max-width: 13rem; }
}
.banner { background: var(--yellow); color: var(--navy); padding: .6rem 1rem; text-align: center; font-weight: 700; }
.banner p { margin: 0; }
.site-footer { background: var(--navy); color: var(--white); padding-block: 1.5rem 2rem; margin-top: 2.5rem; }
.site-footer a { color: var(--yellow); }
.site-footer a:hover { color: var(--white); }
.footer-grid { display: grid; gap: 1.25rem; }
@media (min-width: 40rem) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 64rem) { .footer-grid { grid-template-columns: 1.2fr 1.2fr 1fr; } }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .35rem .75rem; color: var(--white); text-decoration: none; border-radius: .4rem; }
.footer-links a:hover { background: rgba(255, 255, 255, .15); color: var(--white); }
.footer-name { font-weight: 700; font-size: 1.1rem; margin: 0; }
.site-footer p { margin: .25rem 0; }
.copy { margin: 1.25rem 0 0; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, .25); color: var(--white); }

main { flex: 1 0 auto; }
.section { padding-block: 1rem; }
.band { background: var(--row); border-radius: .75rem; padding: 1.25rem 1.25rem; margin-block: 1rem; }
.facts { list-style: none; padding: 0; margin: 0 0 1rem; }
.facts li { margin: .25rem 0; }

/* hero */
.hero { background: var(--navy); color: var(--white); text-align: center; border-radius: .75rem; margin-block: 1rem; padding: 2rem 1rem 2.25rem; }
.hero h1 { color: var(--white); font-size: 2rem; margin: .75rem 0 .25rem; }
.hero .tagline { color: var(--yellow); font-weight: 700; font-size: 1.2rem; margin: 0; }
.hero-hours { display: inline-block; margin: .75rem 0 0; padding: .3rem .9rem; background: var(--yellow); color: var(--navy); font-weight: 700; border-radius: .4rem; }
.hero-logo { border-radius: 50%; border: 3px solid var(--white); }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 1.25rem; }

/* buttons and forms */
button, .button {
  display: inline-block; min-height: 2.75rem; padding: .6rem 1.2rem; font: inherit; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer;
  color: var(--white); background: var(--red); border: 2px solid var(--red); border-radius: .5rem;
}
button:hover, .button:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }
button.secondary, .button.secondary { color: var(--navy); background: transparent; border-color: var(--navy); }
button.secondary:hover, .button.secondary:hover { background: var(--navy); color: var(--white); }
.button.light { color: var(--navy); background: var(--white); border-color: var(--white); }
.button.light:hover { background: var(--yellow); border-color: var(--yellow); color: var(--navy); }
button.danger { color: var(--bad); background: transparent; border-color: var(--bad); }
button:disabled { opacity: .6; cursor: not-allowed; }
.field { margin: 0 0 1rem; }
.grid2 { display: grid; grid-template-columns: 1fr; gap: .75rem; }          /* phone: one column */
@media (min-width: 30rem) { .grid2 { grid-template-columns: 1fr 1fr; } }
label { display: block; font-weight: 700; margin-bottom: .25rem; }
input, textarea, select {
  width: 100%; min-height: 3rem; padding: .6rem .75rem; font: inherit; font-size: 1rem; /* 16px: no zoom on iOS */
  color: var(--ink); background: var(--white); border: 2px solid var(--border); border-radius: .5rem;
}
textarea { resize: vertical; }
input[type="checkbox"] { width: 1.5rem; height: 1.5rem; min-height: 0; flex: 0 0 auto; }
.checkline { display: flex; align-items: center; gap: .6rem; min-height: 2.75rem; }
fieldset { border: 2px solid var(--border); border-radius: .5rem; padding: .75rem; margin: 0 0 1rem; }
legend { font-weight: 700; padding: 0 .4rem; }
.hint { color: var(--muted); font-size: 1rem; margin: .2rem 0 0; } /* body text is never below 16px */
.field-error { color: var(--bad); font-weight: 700; margin: .25rem 0 0; }
.field-error:empty { display: none; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--bad); border-width: 3px; }
.error { color: var(--bad); min-height: 1.5rem; font-weight: 700; }
.order-no strong { font-size: 1.5rem; letter-spacing: .03em; }
.qr-wrap { max-width: 16rem; margin: .5rem 0; }
.qr { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: .5rem; }


/* cards, gallery, faq */
.cards { display: grid; gap: 1rem; grid-template-columns: 1fr; }           /* phone: one column */
@media (min-width: 40rem) { .cards { grid-template-columns: repeat(2, 1fr); } } /* tablet: two */
@media (min-width: 64rem) { .cards { grid-template-columns: repeat(3, 1fr); } } /* desktop: three */
.card { background: var(--white); border: 1px solid var(--border); border-radius: .6rem; overflow: hidden; overflow-wrap: anywhere; }
.card-img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--row); }
.card-body { padding: .8rem; }
.card-body p { margin: .25rem 0; }
.price { color: var(--red); font-weight: 700; font-size: 1.1rem; }
.gallery { display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); } /* phone: two columns */
@media (min-width: 48rem) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 64rem) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery figure { margin: 0; }
.gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: .5rem; background: var(--row); }
.gallery figcaption { color: var(--muted); margin-top: .25rem; }
.faq { background: var(--white); border: 1px solid var(--border); border-radius: .5rem; padding: .25rem .9rem; margin: 0 0 .6rem; }
.faq summary { cursor: pointer; font-weight: 700; padding: .6rem 0; color: var(--navy); }

/* admin */
.topbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; align-items: baseline; }
nav.tabs { display: flex; gap: .25rem; overflow-x: auto; margin: .5rem 0 1rem; border-bottom: 2px solid var(--border); }
nav.tabs button { flex: 0 0 auto; min-height: 3rem; font-weight: 400; color: var(--navy); background: transparent; border: 0; border-bottom: 4px solid transparent; border-radius: 0; }
nav.tabs button[aria-selected="true"] { font-weight: 700; border-bottom-color: var(--red); color: var(--red); }
/* Receipt picker: both inputs are full-size targets and the preview stays small */
.receipt-picker input[type="file"], .receipt-picker button { min-height: 3rem; }
.receipt-preview { display: block; width: 6rem; height: 6rem; object-fit: cover; border-radius: .5rem; border: 1px solid var(--border); margin-block: .5rem; }
/* Admin sections on a phone: one button that shows the current section; the list opens as full-width rows. */
button.admin-menu { display: none; align-items: center; gap: .6rem; width: 100%; min-width: 2.75rem; min-height: 2.75rem; margin: .5rem 0; padding: .35rem .9rem; font: inherit; font-weight: 700; color: var(--navy); background: var(--white); border: 2px solid var(--navy); border-radius: .5rem; cursor: pointer; }
button.admin-menu:hover { background: var(--navy); color: var(--white); }
@media (max-width: 47.99rem) {
  .js button.admin-menu { display: flex; }
  .js nav.tabs { display: none; }
  .js .admin-nav[data-nav-open] nav.tabs { display: flex; flex-direction: column; overflow-x: visible; gap: 0; margin-top: 0; }
  nav.tabs button { width: 100%; text-align: left; border-bottom: 1px solid var(--border); }
  nav.tabs button[aria-selected="true"] { border-left: 6px solid var(--red); }
}
nav.tabs button:hover { background: var(--row); color: var(--navy); }
main > .card, #panel .card { margin: 0 0 .75rem; padding: .8rem; background: var(--white); border: 1px solid var(--border); border-radius: .6rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.badge { display: inline-block; padding: .1rem .55rem; border-radius: 1rem; border: 2px solid currentColor; font-size: .85rem; font-weight: 700; }
.badge.new { color: var(--warn); } .badge.confirmed { color: var(--navy); } .badge.paid { color: var(--ok); } .badge.done { color: var(--muted); }
.badge.off { color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; margin-bottom: 1rem; }
.toolbar > div { flex: 1 1 10rem; }
.table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; } /* wide tables scroll inside their own box, never the page */
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { padding: .45rem .6rem; text-align: left; border-bottom: 1px solid var(--border); }
td.num, th.num { text-align: right; }
tbody tr:nth-child(even) { background: var(--row); }
.totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .6rem; margin: 0 0 1rem; }
.total { background: var(--white); border: 1px solid var(--border); border-radius: .6rem; padding: .6rem .8rem; }
.total .v { font-size: 1.3rem; font-weight: 700; }
.chart { width: 100%; height: auto; }
.chart .bar { fill: var(--red); }
.chart .axis { fill: var(--muted); font-size: 12px; }
.status { min-height: 1.5rem; color: var(--muted); }
.thumb { width: 5rem; height: 3.75rem; object-fit: cover; border-radius: .4rem; background: var(--row); }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }

/* Order form: the total and the submit button stay in reach at the bottom of the screen while the form scrolls. */
.order-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
  margin: 1rem 0 0; padding: .75rem calc(.75rem) calc(.75rem + env(safe-area-inset-bottom)); background: var(--white); border: 2px solid var(--navy); border-radius: .75rem; }
.order-total { margin: 0; font-weight: 700; color: var(--navy); }
.order-bar button { flex: 1 1 10rem; }
/* On the Catering page the order bar stacks just above the quick-action bar (phones only); it drops to the bottom while the keyboard is up. */
@media (max-width: 47.99rem) {
  .has-action-bar .order-bar { bottom: calc(4.25rem + env(safe-area-inset-bottom)); }
  .typing .has-action-bar .order-bar { bottom: 0; }
}
@media (min-width: 48rem) { .order-bar { position: static; padding: .75rem; } .order-bar button { flex: 0 0 auto; } }

/* Phone quick actions: call, WhatsApp, order. Fixed to the bottom, clear of the notch and home bar. Phones only. */
.action-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; gap: .5rem; background: var(--navy); border-top: 2px solid var(--yellow);
  padding: .5rem .75rem calc(.5rem + env(safe-area-inset-bottom)); }
.action-bar a { flex: 1 1 0; display: flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: .35rem .5rem; font-weight: 700; text-align: center; text-decoration: none; color: var(--white); background: transparent; border: 2px solid var(--white); border-radius: .5rem; }
.action-bar a.wa { color: var(--navy); background: var(--yellow); border-color: var(--yellow); }
.action-bar a.primary { color: var(--white); background: var(--red); border-color: var(--red); flex: 1.4 1 0; }
.has-action-bar { padding-bottom: calc(4.25rem + env(safe-area-inset-bottom)); } /* room so the bar never covers the last line of the page */
@media (min-width: 48rem) { .action-bar { display: none; } .has-action-bar { padding-bottom: 0; } }
.typing .action-bar { display: none; } /* the on-screen keyboard would cover it */

/* Catering page: banner, offer cards, step cards, item rows with photo and +/- steppers */
.cat-hero { display: grid; gap: 1rem; background: var(--navy); color: var(--white); border-radius: .75rem; margin-block: 1rem; overflow: hidden; }
.cat-hero-text { padding: 1.5rem 1.25rem 0; }
.cat-hero h1 { color: var(--white); margin: 0 0 .5rem; }
.cat-hero p { margin: 0 0 1rem; }
.cat-hero-media img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.hero-placeholder { display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--row); }
.hero-placeholder img { width: 7.5rem; height: 7.5rem; border-radius: 50%; opacity: .6; }
@media (min-width: 48rem) {
  .cat-hero { grid-template-columns: 1.1fr 1fr; align-items: stretch; }
  .cat-hero-text { padding: 2rem 1.5rem; align-self: center; }
  .cat-hero-media img, .hero-placeholder { height: 100%; aspect-ratio: auto; min-height: 16rem; }
}
.icon { display: inline-grid; place-items: center; width: 3rem; height: 3rem; flex: 0 0 auto; border-radius: 50%; background: var(--navy); color: var(--yellow); }
.icon-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .icon-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .icon-cards { grid-template-columns: repeat(4, 1fr); } }
.icon-card, .step-card { background: var(--white); border: 1px solid var(--border); border-radius: .6rem; padding: 1rem; }
.icon-card h3 { margin: .6rem 0 .25rem; }
.icon-card p, .step-card p { margin: 0; }
.step-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: 1fr; counter-reset: none; }
@media (min-width: 48rem) { .step-cards { grid-template-columns: repeat(3, 1fr); } }
.step-card { display: flex; flex-direction: column; gap: .6rem; position: relative; }
.step-no { position: absolute; top: .75rem; right: .9rem; font-size: 1.5rem; font-weight: 700; color: var(--navy); }

.pick { display: grid; grid-template-columns: 4.5rem 1fr; gap: .5rem .75rem; align-items: center; padding: .75rem 0; border-top: 1px solid var(--border); }
.pick:first-of-type { border-top: 0; }
.pick-info { min-width: 0; }
.pick-info label { margin: 0; }
.stepper { grid-column: 1 / -1; justify-self: end; display: inline-flex; align-items: center; gap: .35rem; }
.stepper input { width: 4.5rem; text-align: center; padding-inline: .25rem; }
.stepper .step { min-width: 2.75rem; padding: .35rem .5rem; font-size: 1.4rem; line-height: 1; }
@media (min-width: 48rem) { .pick { grid-template-columns: 4.5rem 1fr auto; } .stepper { grid-column: auto; } }
.thumb-img { display: block; width: 4.5rem; height: 4.5rem; aspect-ratio: 1; object-fit: cover; border-radius: .5rem; background: var(--row); }
.placeholder { display: grid; place-items: center; background: var(--row); }
.placeholder img { width: 4.5rem; height: 4.5rem; border-radius: 50%; opacity: .55; object-fit: cover; }
.thumb-img.placeholder img { width: 3rem; height: 3rem; }

/* Admin: visibility checkboxes, each a 44px tap target */
.checks { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: .5rem 0; }
.check { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; cursor: pointer; }

/* Lightbox: photo thumbnails (links without script, buttons with it) and the one dialog that shows them large */
.zoom, .zoom-thumb { display: block; width: 100%; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: zoom-in; }
.zoom-thumb:focus-visible, .zoom:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.lb-open { overflow: hidden; }
dialog.lightbox { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: .5rem; border: 0; color: var(--white); }
dialog.lightbox[open] { display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.lightbox .lb-figure { flex: 1 1 auto; min-height: 0; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; max-width: 100%; }
.lightbox .lb-image { display: block; max-width: 100%; max-height: calc(100dvh - 11rem); width: auto; height: auto; object-fit: contain; }
.lightbox .lb-caption { color: var(--white); text-align: center; overflow-wrap: anywhere; }
.lightbox .lb-bar { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.lightbox .lb-count { margin: 0; color: var(--white); }
.lightbox .lb-btn { min-width: 44px; min-height: 44px; padding: 0; border: 1px solid var(--white); border-radius: 50%; background: transparent; color: var(--white); font-size: 1.75rem; line-height: 1; cursor: pointer; }
.lightbox .lb-close { align-self: flex-end; }
.lightbox .lb-btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
dialog.lightbox::backdrop { background-color: var(--overlay); }
dialog.lightbox { background-color: var(--overlay); }

/* Home: hero photo, trust strip; Catering: WhatsApp quote box */
.hero-photo { display: block; width: 100%; max-width: 32rem; height: auto; aspect-ratio: 4 / 3; object-fit: cover; margin: 0 auto; border-radius: .75rem; border: 3px solid var(--white); }
.trust { list-style: none; display: grid; gap: .5rem; grid-template-columns: 1fr; margin: 0 0 1rem; padding: 0; }
.trust li { padding: .6rem .9rem; background: var(--row); color: var(--ink); border-radius: .5rem; font-weight: 700; }
@media (min-width: 40rem) { .trust { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .trust { grid-template-columns: repeat(4, 1fr); } }
.quote-box { background: var(--row); border-radius: .6rem; padding: .75rem 1rem; margin-block: 1rem; }
.quote-box p { margin: .25rem 0; }
.chips ul { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: .25rem 0 1rem; padding: 0; }
button.chip { min-height: 2.75rem; padding: .35rem 1rem; color: var(--navy); background: var(--white); border: 2px solid var(--navy); border-radius: 2rem; font-weight: 700; }
button.chip:hover { background: var(--navy); color: var(--white); }
