/* 180 Deer Run design kit (brand/brand.json, brand/contrast.md).
   Two moods that follow the badge: html.day (front porch) and html.night (evening), set by app.js. */
@font-face { font-family: Fraunces; src: url(/fonts/fraunces-latin.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Inter; src: url(/fonts/inter-latin.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root, html.day {
  --bg: #F3EDE2; --card: #FBF7F0; --line: #E4DACB; --soft: #EFE5D5;
  --ink: #1D1712; --muted: #6B5F55; --brand: #7A3B26; --brand-ink: #FBF7F0;
  --pri: #14213D; --pri-ink: #FBF7F0; --acc: #E0B84C; --acc-ink: #14213D;
  --ok: #2F6B3A; --ok-soft: #E3EEDF; --warn-soft: #F7EBC9; --warn-line: #E0B84C; --danger: #A11D2B;
  --shadow: 0 1px 2px rgba(29,23,18,.06), 0 4px 14px rgba(29,23,18,.06);
  --display: Fraunces, Georgia, "Times New Roman", serif;
  --body: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --r-lg: 16px; --r-md: 12px; --r-pill: 999px;
  color-scheme: light;
}
html.night {
  --bg: #0F1830; --card: #18243F; --line: #2A3A60; --soft: #1F2D4D;
  --ink: #F3EDE2; --muted: #B8B0A3; --brand: #E0B84C; --brand-ink: #14213D;
  --pri: #E0B84C; --pri-ink: #14213D; --acc: #E0B84C; --acc-ink: #14213D;
  --ok: #8CC6A3; --ok-soft: #1D3A33; --warn-soft: #2E2A1E; --warn-line: #8A6D1E; --danger: #F08A8A;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.25);
  color-scheme: dark;
}
html { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; padding-bottom: 120px; }
main { max-width: 560px; margin: 0 auto; padding: 16px 16px 0; }
h1 { font: 650 24px/1.12 var(--display); letter-spacing: -.01em; margin: 0; }
h2 { font: 650 19px/1.2 var(--display); color: var(--brand); margin: 22px 0 8px; }
h3 { font-size: 15.5px; font-weight: 650; margin: 0; }
.muted { color: var(--muted); font-size: 13px; }
.center { text-align: center; }
.i { width: 1.15em; height: 1.15em; vertical-align: -.2em; flex: none; }
.eyebrow { font: 650 11px var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--brand); }

/* buttons */
button { font: 600 14px var(--body); cursor: pointer; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--card);
  color: var(--ink); padding: 8px 14px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
button.solid, button.dark { background: var(--pri); border-color: var(--pri); color: var(--pri-ink); }
button.brand { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
button.small { padding: 4px 11px; min-height: 34px; font-size: 13px; border-radius: var(--r-pill); }
button.on { background: var(--soft); border-color: var(--brand); color: var(--brand); }
button.ghost { border-color: transparent; background: none; color: var(--muted); padding: 4px 6px; min-height: 32px; }
button:disabled { opacity: .45; cursor: default; }
button.link { border: 0; background: none; padding: 0; min-height: 0; text-decoration: underline; color: var(--muted); font-weight: 500; }
button:focus-visible, [role=button]:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--acc); outline-offset: 2px; }

/* header */
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.brand .sub { color: var(--muted); font-size: 13px; }
.badge { width: 56px; height: 56px; flex: none; }
.me { border: 0; background: none; padding: 0; min-height: 0; border-radius: 50%; }

/* segmented tabs */
.tabs { display: flex; gap: 2px; margin: 4px 0 14px; background: var(--soft); border-radius: var(--r-md); padding: 3px;
  position: sticky; top: 8px; z-index: 5; overflow-x: auto; box-shadow: 0 0 0 6px var(--bg); }
.tabs button { flex: 1; border: 0; background: none; color: var(--muted); border-radius: 9px; min-height: 36px; white-space: nowrap; }
.tabs button.active { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.14); }
.tabs.inline { position: static; box-shadow: none; max-width: 320px; }

/* cards and lists */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; margin: 0 0 10px; box-shadow: var(--shadow); }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.price { white-space: nowrap; font: 650 15.5px var(--display); color: var(--brand); font-variant-numeric: lining-nums tabular-nums; }
.who { font-size: 12.5px; color: var(--muted); margin-top: 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.who.ok { color: var(--ok); font-weight: 600; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--soft); border-radius: var(--r-pill); padding: 1px 9px 1px 2px; font-size: 12px; color: var(--ink); font-weight: 600; }
.chip.plain { padding: 1px 9px; }
.chip.me { box-shadow: inset 0 0 0 1.5px var(--brand); }
.note { font-size: 13px; color: var(--muted); font-style: italic; margin-top: 3px; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; align-items: center; }
.tag { font-size: 10.5px; font-weight: 700; border-radius: 6px; padding: 1px 6px; margin-left: 6px; vertical-align: 2px; letter-spacing: .02em; }
.tag.spicy { background: #F6D9C8; color: #8A3410; }
.tag.gf { background: var(--ok-soft); color: var(--ok); }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--r-pill); }
.qty button { border: 0; background: none; min-height: 30px; padding: 2px 9px; border-radius: var(--r-pill); }
.qty b { min-width: 18px; text-align: center; }
.av { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #FBF7F0; font-weight: 700; flex: none;
  width: 22px; height: 22px; font-size: 11px; position: relative; background: var(--c); }
/* headshots: the person's colour shows as a ring around the photo */
.av img, .avatar img { position: absolute; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); border-radius: 50%; object-fit: cover; }
.av.lg img { inset: 2.5px; width: calc(100% - 5px); height: calc(100% - 5px); }
.av.lg { width: 34px; height: 34px; font-size: 14px; }
.avs { display: inline-flex; } .avs .av { margin-left: -6px; box-shadow: 0 0 0 2px var(--card); } .avs .av:first-child { margin-left: 0; }

/* sign in */
.welcome { text-align: center; padding-top: 6px; }
.welcome .hero-badge { width: 140px; height: 140px; display: block; margin: 0 auto 8px; }
.welcome h1 { font-size: 34px; margin: 4px 0 6px; }
.welcome .sub { color: var(--muted); }
.ask { font: 650 18px var(--display); margin: 22px 0 10px; }
.people { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 6px; margin: 0 0 16px; }
.person { border: 0; background: none; color: var(--muted); padding: 4px; display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 0; font-size: 13px; }
.avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font: 650 24px var(--display); color: #FBF7F0; transition: transform .12s;
  position: relative; background: var(--c); }
.avatar img { inset: 3.5px; width: calc(100% - 7px); height: calc(100% - 7px); box-shadow: 0 0 0 2px var(--bg); }
.person:hover .avatar { transform: translateY(-2px); }
.person.picked { color: var(--ink); }
.person.picked .avatar { box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--acc); }
#login label { font-weight: 650; display: block; }
#login button.solid { width: 100%; min-height: 46px; font-size: 15px; }

input[type=email], input[type=search], textarea, select { font: 16px var(--body); color: var(--ink); width: 100%; padding: 11px 12px;
  border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--bg); }
select { width: auto; }
textarea { min-height: 76px; }
.search { position: relative; margin-bottom: 10px; }
.search .i { position: absolute; left: 12px; top: 13px; color: var(--muted); }
.search input { padding-left: 38px; background: var(--card); }

/* menu */
.sections { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 6px; padding-bottom: 4px; scrollbar-width: none; }
.sections button { border-radius: var(--r-pill); min-height: 32px; padding: 4px 12px; font-size: 12.5px; white-space: nowrap; color: var(--muted); }
.section-head { font: 650 18px var(--display); color: var(--brand); margin: 18px 0 8px; scroll-margin-top: 70px; }
.dish { display: flex; gap: 12px; align-items: stretch; }
.dish-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.thumb { width: 92px; height: 92px; object-fit: cover; border-radius: var(--r-md); flex: none; background: var(--soft); }
.desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dish-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 6px; gap: 8px; }
.dish-foot .price { white-space: normal; font-size: 14.5px; }
.add-pill { display: inline-flex; align-items: center; gap: 4px; background: var(--pri); color: var(--pri-ink); border-radius: var(--r-pill); padding: 5px 12px; font-size: 13px; font-weight: 650; flex: none; }
.menu .card[data-act="add"] { cursor: pointer; transition: box-shadow .15s, border-color .15s, transform .15s; }
.menu .card[data-act="add"]:hover { border-color: var(--brand); transform: translateY(-1px); }
.mini { width: 48px; height: 48px; object-fit: cover; border-radius: 10px; flex: none; }

/* bottom bar (phone) */
.bar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--line);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); z-index: 10; box-shadow: 0 -4px 16px rgba(0,0,0,.06); }
.bar .inner { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bar button { min-height: 48px; font-size: 15px; border-radius: 14px; }
.bar .hint { grid-column: 1 / -1; text-align: center; font-size: 12px; color: var(--muted); }
.cnt { background: var(--acc); color: var(--acc-ink); border-radius: var(--r-pill); font-size: 12px; padding: 1px 7px; font-weight: 700; }

/* receipt */
.receipt { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 2px 14px 12px; box-shadow: var(--shadow); }
.cart-row { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.cart-body { flex: 1; min-width: 0; }
.size { font: 600 11px var(--body); background: var(--soft); padding: 1px 7px; border-radius: var(--r-pill); color: var(--muted); vertical-align: 2px; margin-left: 4px; }
.leader { display: flex; align-items: baseline; gap: 6px; margin-top: 10px; font-weight: 650; }
.leader .dots { flex: 1; border-bottom: 2px dotted var(--line); transform: translateY(-4px); }
.leader .v { font: 650 16px var(--display); font-variant-numeric: lining-nums tabular-nums; }
.leader.sub { color: var(--muted); font-weight: 500; margin-top: 6px; }
.donebar { display: flex; align-items: center; gap: 10px; margin: 14px 2px 4px; color: var(--muted); font-size: 13px; }
button.wide { width: 100%; min-height: 48px; font-size: 15px; margin-top: 10px; border-radius: 14px; }
.side { display: none; }
.empty { text-align: center; padding: 18px 10px; }
.empty img { width: 84px; height: 84px; opacity: .9; }
.empty b { display: block; font: 650 17px var(--display); margin: 6px 0 2px; }

/* tables (preview, call sheet) */
table.t { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.t td { padding: 7px 0; vertical-align: top; border-bottom: 1px solid var(--line); }
table.t td.r { text-align: right; white-space: nowrap; padding-left: 10px; font-variant-numeric: lining-nums tabular-nums; }
table.t tr.sum td { border-bottom: 0; padding-top: 6px; color: var(--muted); }
table.t tr.total td { font: 650 16px var(--display); border-top: 2px solid var(--ink); border-bottom: 0; padding-top: 8px; }
.banner { display: flex; gap: 8px; align-items: center; background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: var(--r-md); padding: 10px 12px; margin: 10px 0; font-size: 14px; }
.banner.ok { background: var(--ok-soft); border-color: var(--ok); }
.av.out, .avatar.out { filter: grayscale(1); opacity: .45; }
.person:has(.avatar.out) { color: var(--muted); opacity: .8; }
.rsvp { margin-top: 18px; text-align: center; }
.rsvp-who { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 16px; font: 600 20px/1.25 var(--display); }
.rsvp .wide + .wide { margin-top: 10px; }
.out-list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; }
.out-list > span:not(:first-child) { display: inline-flex; align-items: center; gap: 6px; border: 1px dashed var(--line); border-radius: var(--r-pill); padding: 3px 10px 3px 4px; }
.done-list { display: flex; flex-wrap: wrap; gap: 6px; }
.done-list span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 3px 10px 3px 4px; }
.st { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.st.done { background: var(--ok); } .st.picking { background: var(--acc); } .st.not { background: var(--line); }
.callsheet td { font-size: 19px; }
.callsheet .note { font-size: 16px; }

/* dialogs */
dialog { border: 0; border-radius: 20px; padding: 0; width: min(520px, 94vw); box-shadow: 0 16px 50px rgba(0,0,0,.35); background: var(--card); color: var(--ink); }
dialog::backdrop { background: rgba(15,24,48,.45); }
dialog form { padding: 18px; display: grid; gap: 12px; }
dialog h3 { font: 650 21px var(--display); }
dialog label { font-weight: 600; font-size: 14px; display: grid; gap: 6px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts label { display: block; border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 9px 13px; cursor: pointer; font-weight: 600; }
.opts input { margin-right: 6px; accent-color: var(--brand); }
.opts label:has(input:checked) { border-color: var(--brand); background: var(--soft); }
.hero { width: calc(100% + 36px); margin: -18px -18px 0; height: 210px; object-fit: cover; border-radius: 20px 20px 0 0; }

#toast { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 9px 16px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 20; max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; }

/* desktop */
@media (min-width: 900px) {
  body { padding-bottom: 40px; }
  main { max-width: 1180px; padding: 28px 28px 0; }
  .bar, .cart-tab { display: none !important; }
  .layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 28px; align-items: start; }
  .side { display: block; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
  .side .receipt { box-shadow: var(--shadow); }
  h1 { font-size: 30px; }
  .badge { width: 80px; height: 80px; }
  .tabs { max-width: 420px; }
  .content { min-width: 0; }
  .menu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
  .menu-grid .section-head { grid-column: 1 / -1; }
  .search { max-width: 420px; }
  .people { grid-template-columns: repeat(6, 1fr); }
  .welcome-wrap { max-width: 560px; margin: 0 auto; }
  #toast { bottom: 32px; }
}

@media print {
  html, html.night { --bg: #fff; --card: #fff; --ink: #000; --muted: #444; --line: #ccc; --brand: #7A3B26; }
  body { padding: 0; }
  .tabs, .bar, .no-print, .side { display: none !important; }
  .layout { display: block; }
  .card, .receipt { box-shadow: none; }
}
.rsvp-who .av { width: 84px; height: 84px; font-size: 30px; }
.rsvp-who .av img { inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); }

/* who's signed in: name, attendance, sign out (2026-11-02) */
.mebar { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 8px 8px 8px 10px; margin: 12px 0; }
.mebar .who { display: flex; align-items: center; justify-content: flex-start; gap: 12px; background: none; border: 0; padding: 0; text-align: left; flex: 1; min-width: 0; min-height: 0; color: var(--ink); box-shadow: none; }
.mebar .who b { display: block; font: 650 18px/1.15 var(--display); }
.mebar .who small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.mebar .av { width: 46px; height: 46px; font-size: 18px; }
.mebar .av img { inset: 2.5px; width: calc(100% - 5px); height: calc(100% - 5px); }
.mebar .signout { flex: none; display: inline-flex; align-items: center; gap: 6px; }

/* main page tabs: three separate buttons with icon + label, the current page filled (2026-11-02) */
.tabs.main-tabs { background: var(--bg); padding: 0; gap: 8px; border-radius: 0; }
.main-tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px;
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: 14px; font: 650 13.5px var(--body); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.main-tabs button .i { width: 21px; height: 21px; }
.main-tabs button:hover { border-color: var(--pri); }
.main-tabs button.active { background: var(--pri); border-color: var(--pri); color: var(--pri-ink); box-shadow: 0 2px 6px rgba(0,0,0,.18); }
