:root {
  color-scheme: light;
  --ink: #261d19;
  --muted: #766760;
  --accent: #a2223b;
  --line: #eee6e1;
  --paper: #fffdf9;
  --nav: 68px;
  font: 16px/1.45 "DM Sans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { max-width: 720px; min-height: 100dvh; margin: auto; background: var(--paper); color: var(--ink); }
html { background: #f4eeea; }
h1, h2, h3, p { margin: 0; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; border: 0; border-radius: 12px; background: var(--accent); color: white; padding: 10px 14px; }
button:disabled { opacity: .55; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.app-header { min-height: 72px; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--paper); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; background: var(--accent); color: #fff; font-weight: 800; }
h1 { font-size: 21px; letter-spacing: .04em; }
#account { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
#message { margin: 0; padding: 9px 20px; background: #faecee; color: #842238; font-size: 14px; }
nav { position: fixed; bottom: 0; z-index: 3; width: min(100%, 720px); min-height: calc(var(--nav) + env(safe-area-inset-bottom)); padding: 0 4px env(safe-area-inset-bottom); display: flex; background: var(--paper); border-top: 1px solid var(--line); }
nav button { flex: 1; display: grid; place-items: center; align-content: center; gap: 2px; padding: 6px 2px; background: transparent; color: var(--muted); font-size: 11px; }
nav button[aria-current="page"] { color: var(--accent); font-weight: 750; }
.nav-icon { width: 23px; height: 23px; }
main { padding: 12px 16px calc(var(--nav) + env(safe-area-inset-bottom) + 18px); }
main.menu { padding: 0; display: flex; flex-direction: column; min-height: 0; flex: 1; }
body:has(main.menu) { height: 100dvh; display: flex; flex-direction: column; padding-bottom: calc(var(--nav) + env(safe-area-inset-bottom)); }
.search { display: flex; align-items: center; gap: 8px; margin: 0 16px 12px; padding: 0 12px; border-radius: 24px; background: #f4efec; }
.search input { width: 100%; background: transparent; border: 0; padding: 10px 0; }
.menu-layout { display: grid; grid-template-columns: clamp(76px, 22vw, 136px) minmax(0,1fr); flex: 1; min-height: 0; border-top: 1px solid var(--line); }
.categories { background: #f5f0ed; overflow: auto; }
.categories button { display: block; width: 100%; min-height: 54px; border-radius: 0; background: transparent; color: var(--muted); padding: 10px 5px; font-size: 13px; border-left: 3px solid transparent; overflow-wrap: anywhere; }
.categories button[aria-pressed="true"] { border-color: var(--accent); background: #fff; color: var(--accent); font-weight: 750; }
.dish-list { overflow: auto; background: #fff; padding: 17px 13px; }
.dish-list h2 { font-size: 19px; margin-bottom: 5px; }
.dish { display: grid; grid-template-columns: clamp(62px, 21vw, 116px) minmax(0,1fr); align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid #f3eeea; }
.dish-photo { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.photo-placeholder { display: grid; place-items: center; background: #f9eeeb; color: #b26b68; }
.photo-placeholder .nav-icon { width: 30px; height: 30px; }
.dish h3 { font-size: 16px; overflow-wrap: anywhere; }
.dish-meta { display: flex; justify-content: space-between; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 10px; }
.price { color: var(--accent); font-weight: 800; }
.stepper { display: flex; align-items: center; gap: 5px; font-size: 13px; }
.stepper button { width: 30px; height: 30px; padding: 0; border-radius: 50%; font-size: 19px; }
.stepper button:first-child:not(:last-child) { background: #faeef0; color: var(--accent); }
.cart-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 16px; background: var(--paper); border-top: 1px solid var(--line); }
.cart-bar strong { margin-left: 8px; }
.cart-sheet { margin: 0; padding: 10px 16px; border-top: 1px solid var(--line); max-height: 36dvh; overflow: auto; }
.cart-sheet button { width: 100%; }
label:not(.search) { display: grid; gap: 5px; margin: 10px 0; }
input, textarea, select { min-width: 0; max-width: 100%; padding: 10px; border: 1px solid #ded3cd; border-radius: 10px; background: #fff; color: var(--ink); }
main:not(.menu) form, main:not(.menu) section, main:not(.menu) article { background: #fff; padding: 16px; margin: 10px 0; border: 1px solid var(--line); border-radius: 16px; }
main:not(.menu) article { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
main:not(.menu) article strong { flex: 1; }
.login { max-width: 380px; margin-inline: auto; }
.login button { width: 100%; margin-top: 8px; }
.empty { color: var(--muted); padding: 16px 0; font-size: 14px; }
@media (min-width: 600px) { .dish-list { padding: 20px 24px; } .dish { gap: 18px; } }

/* Shared spacing and component states for the mobile ordering screens. */
:root {
  --accent: #a51d3a;
  --paper: #fff;
  --line: #efe9e5;
  --muted: #756a64;
  --nav: 66px;
  --surface: #f9f6f3;
}
html { background: #f1ebe6; }
body { box-shadow: 0 0 64px #43271d12; }
.app-header { min-height: 72px; padding-inline: 18px; }
.brand-mark { border-radius: 12px; background: #a51d3a; box-shadow: 0 4px 10px #a51d3a30; }
#account { display: flex; align-items: center; gap: 8px; }
#account span { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#account button { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; background: var(--surface); color: #584a44; }
#account .nav-icon { width: 19px; height: 19px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.menu-tools { padding: 0 16px 14px; background: white; }
.search { margin: 0; gap: 9px; padding: 0 14px; background: #f5f2ef; border: 1px solid #f1ece8; }
.search .nav-icon { flex: none; width: 19px; height: 19px; color: #655852; }
.search input { font-size: 14px; min-height: 42px; }
.menu-layout { grid-template-columns: clamp(78px, 22vw, 124px) minmax(0, 1fr); }
.categories { background: #f6f2ef; }
.categories button { min-height: 60px; padding-inline: 6px; font-weight: 550; }
.categories button[aria-pressed="true"] { background: #fff; color: var(--accent); }
.dish-list { padding: 18px 13px 24px; }
.list-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.list-heading h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.list-heading span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.dish { grid-template-columns: clamp(78px, 24vw, 122px) minmax(0, 1fr); gap: 12px; padding: 15px 0; }
.dish-photo { display: block; border-radius: 13px; background: #f6efea; }
.dish-photo.photo-placeholder { display: grid; background: #f8f0ea; }
.dish h3 { font-size: clamp(15px, 4vw, 18px); line-height: 1.35; letter-spacing: -.02em; }
.dish-meta { margin-top: 14px; }
.price { font-size: 17px; font-variant-numeric: tabular-nums; }
.stepper button { width: 34px; height: 34px; font-size: 22px; line-height: 1; }
.stepper button:active { transform: scale(.93); }
nav { box-shadow: 0 -5px 22px #3c241109; }
nav button { gap: 4px; font-size: 12px; }
nav button[aria-current="page"] .nav-icon { filter: drop-shadow(0 2px 4px #a51d3a30); }
.cart-area { background: white; }
.cart-bar { margin: 8px 12px; padding: 7px 8px 7px 12px; border: 0; border-radius: 17px; background: #302521; color: white; }
.cart-total { display: flex; align-items: center; gap: 9px; }
.cart-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: #ffffff18; }
.cart-total strong { display: block; margin: 0; font-size: 17px; line-height: 1.2; }
.cart-total small { display: block; font-size: 11px; color: #eadad4; }
.cart-bar button { background: #a51d3a; font-weight: 700; }
.cart-sheet p { padding: 4px 0; }
.menu-empty { display: grid; justify-items: center; gap: 12px; padding: 34px 4px; text-align: center; color: var(--muted); font-size: 14px; }
.menu-empty .nav-icon { box-sizing: content-box; padding: 14px; border-radius: 17px; background: #faf0ed; color: var(--accent); }
.menu-empty button { font-size: 13px; }
body:not(:has(main.menu)) { background: var(--surface); }
main:not(.menu) section, main:not(.menu) form, main:not(.menu) article { box-shadow: 0 4px 18px #44291d06; }
main:not(.menu) h2 { font-size: 21px; margin-bottom: 12px; }
main:not(.menu) section > p { margin-block: 6px; }
main:not(.menu) section button + button { margin-left: 8px; }
.page-title { margin-top: 4px; }
.signed-out main { padding: 8px 16px 36px; }
.login-layout { max-width: 480px; margin: auto; overflow: hidden; border-radius: 24px; background: white; box-shadow: 0 14px 38px #5b332414; }
.login-cover { height: clamp(170px, 52vw, 255px); background: #712339 url("/family-table.jpg") center 52% / cover no-repeat; }
main:not(.menu) form.login { max-width: none; padding: 23px; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.login h2 { letter-spacing: .02em; }
.login label { color: #594a44; font-size: 14px; }
.login input { min-height: 44px; }
.login button { min-height: 46px; font-weight: 750; }
@media (max-width: 360px) {
  .dish-list { padding-inline: 9px; }
  .dish { gap: 8px; }
  .stepper button { width: 30px; height: 30px; }
}

/* Compact mobile layout */
:root { --nav: 52px; }
body { max-width: 520px; }
.app-header { min-height: 51px; padding: 8px 13px; }
.brand { gap: 8px; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; font-size: 14px; box-shadow: none; }
h1 { font-size: 16px; letter-spacing: 0; }
#account { font-size: 12px; }
#account button { width: 32px; height: 32px; border-radius: 9px; }
#account .nav-icon { width: 16px; height: 16px; }
.menu-tools { padding: 0 12px 8px; }
.search { padding-inline: 10px; }
.search .nav-icon { width: 15px; height: 15px; }
.search input { min-height: 32px; padding: 5px 0; font-size: 13px; }
.menu-layout { grid-template-columns: clamp(64px, 19vw, 90px) minmax(0, 1fr); }
.categories button { min-height: 42px; padding: 6px 4px; font-size: 12px; border-left-width: 2px; }
.dish-list { padding: 11px 12px 16px; }
.list-heading { margin-bottom: 2px; }
.list-heading h2 { font-size: 15px; }
.list-heading span { font-size: 10px; }
.dish { grid-template-columns: 60px minmax(0, 1fr); gap: 9px; padding: 8px 0; min-height: 77px; }
.dish-photo { border-radius: 8px; }
.photo-placeholder .nav-icon { width: 21px; height: 21px; }
.dish h3 { font-size: 14px; line-height: 1.25; }
.dish-meta { margin-top: 3px; }
.price { font-size: 14px; }
.stepper { gap: 0; }
.stepper button,
.stepper button:first-child:not(:last-child) {
  position: relative;
  isolation: isolate;
  width: 34px;
  height: 33px;
  font-size: 16px;
  background: transparent;
}
.stepper button::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 5px 6px;
  border-radius: 50%;
  background: var(--accent);
}
.stepper button:first-child:not(:last-child)::before { background: #faeef0; }
nav { width: min(100%, 520px); }
nav button { gap: 2px; font-size: 10px; }
nav .nav-icon { width: 19px; height: 19px; }
.cart-bar { margin: 5px 9px; padding: 4px 5px 4px 9px; border-radius: 11px; }
.cart-icon { width: 29px; height: 29px; border-radius: 8px; }
.cart-icon .nav-icon { width: 17px; height: 17px; }
.cart-total strong { font-size: 14px; }
.cart-total small { font-size: 10px; }
.cart-bar button { padding: 7px 10px; border-radius: 8px; font-size: 12px; }
main:not(.menu) { padding-inline: 12px; }
main:not(.menu) section, main:not(.menu) form, main:not(.menu) article { padding: 12px; margin-block: 7px; border-radius: 12px; }
main:not(.menu) h2 { font-size: 16px; margin-bottom: 7px; }
main:not(.menu) label { font-size: 13px; margin-block: 7px; }
main:not(.menu) button { font-size: 13px; }
.signed-out main { padding: 8px 14px 24px; }
.login-layout { max-width: 336px; border-radius: 15px; }
.login-cover { height: 112px; background-position: center 51%; }
main:not(.menu) form.login { padding: 15px; margin: 0; }
.login input { min-height: 36px; padding: 7px 9px; }
.login button { min-height: 37px; padding-block: 7px; }

/* Compact menu details */
.dish { grid-template-columns: clamp(58px, 17vw, 76px) minmax(0, 1fr); gap: 10px; min-height: 82px; }
.dish-copy { min-width: 0; }
.dish-tags { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.dish-tags span { border: 1px solid #ebcbd2; color: #95223e; background: #fff7f8; border-radius: 4px; padding: 0 4px; font-size: 10px; overflow-wrap: anywhere; }
.dish-description { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.price small { font-size: 10px; color: var(--muted); font-weight: 400; white-space: nowrap; }
.stepper button.add-dish { width: auto; height: 28px; border-radius: 14px; padding: 0 8px; background: var(--accent); font-size: 11px; font-weight: 650; white-space: nowrap; }
.stepper button.add-dish::before { content: none; }

:root {
  --accent: #a64148;
  --ink: #392922;
  --paper: #fffaf5;
  --surface: #f8efe6;
}
.categories { background: #f7eee6; }
.categories button[aria-pressed="true"], .dish-list { background: #fffdf9; }
.brand-mark { background: var(--accent); }
.dish-tags span { background: #fff1ec; color: #923d41; border-color: #eed5cd; }
.dish-meta { justify-content: flex-end; }
.stepper button.add-dish, .cart-bar button { background: var(--accent); }
.cart-bar { background: #f5e3da; color: var(--ink); }
.cart-icon { background: #fff7f1; color: var(--accent); }
.cart-total small { color: #75534a; }
.cart-sheet { background: #fffaf5; }
.meal-note { padding: 8px 10px; background: #fbefe7; border-radius: 8px; }

.record-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.record-status { border-radius: 12px; padding: 3px 8px; font-size: 12px; background: #f7eee6; color: #75534a; }
.record-status[data-state="accepted"], .record-status[data-state="done"] { background: #e8f0e7; color: #35543d; }
.record-status[data-state="cancelled"] { background: #f8e6e5; color: #923d41; }
