/* Shared by guest app and chef tablet. Mobile-first, no framework. */
:root {
  --bg: #fff8f3; --card: #fff; --ink: #2b1d16; --muted: #7d675b; --line: #f0e2d8;
  --red: #c8442a; --red-soft: #fde9e3; --green: #3f7d4e; --green-soft: #e5f2e8; --gold: #f2a91c;
  --r: 16px; --shadow: 0 1px 3px #2b1d1614, 0 4px 16px #2b1d160d;
  --red-fill: var(--red); --green-fill: var(--green);  /* button fills (white text, WCAG AA ≥ 4.5:1) */
  --top: #fff8f3ee; --empty-star: #dcd3cc; --toast: #2b1d16; --toast-ink: #fff; --toast-fix: #e8d9cf;
  color-scheme: light dark;
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--bg);
  -webkit-tap-highlight-color: transparent;
}
@media (prefers-color-scheme: dark) {  /* evening parties: follow the phone's dark mode */
  :root { --bg: #17110e; --card: #241b16; --ink: #f4e9e1; --muted: #a8948a; --line: #3a2d26;
    --red: #e0583b; --red-soft: #3f1e16; --green: #4f9a62; --green-soft: #1c3323; --top: #17110eee;
    --empty-star: #4a3c34; --toast: #f4e9e1; --toast-ink: #17110e; --toast-fix: #5c4a40;
    --red-fill: #c24a30; --green-fill: #3a7a4b;
    --shadow: 0 1px 3px #0006, 0 4px 16px #0004; }
}
* { box-sizing: border-box; }
body { margin: 0; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
[hidden] { display: none !important; }
h1 { font-size: 1.15rem; margin: 0; }
h2 { font-size: 1.05rem; margin: 1.6rem 0 .6rem; }
h3 { margin: 0 0 .2rem; font-size: 1.2rem; }
p { margin: .3rem 0; }
small, .muted { color: var(--muted); }
main { max-width: 640px; margin: 0 auto; padding: 0 14px; }
.top { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--top); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); }
#who { color: var(--muted); font-size: .9rem; }

button, .btn { font: inherit; border: 0; border-radius: 12px; padding: .7rem 1rem; cursor: pointer;
  background: var(--line); color: var(--ink); text-decoration: none; display: inline-flex; align-items: center;
  justify-content: center; gap: .4rem; min-height: 44px; }
button:active, .btn:active { transform: scale(.97); }
.primary { background: var(--red-fill); color: #fff; font-weight: 600; }
.good { background: var(--green-fill); color: #fff; font-weight: 600; }
.ghost { background: transparent; color: var(--red); padding: .4rem .6rem; min-height: 44px; }
.wide { width: 100%; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; }
input, textarea { font: inherit; width: 100%; padding: .65rem .8rem; border: 1px solid var(--line);
  border-radius: 12px; background: var(--card); color: var(--ink); }
textarea { min-height: 80px; resize: vertical; }

.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px; margin: 10px 0; }
.card.tap { cursor: pointer; }
.card.alert { background: var(--red-soft); }
.card.ok { background: var(--green-soft); }
.card.big { text-align: center; padding: 18px; }

.stars { font-size: 1.05rem; letter-spacing: 1px; white-space: nowrap;
  background: linear-gradient(90deg, var(--gold) var(--p), var(--empty-star) var(--p));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.rate-row { display: flex; gap: 2px; }
.rate-row button { background: none; font-size: 2rem; padding: 0 .15rem; min-height: 48px; color: var(--empty-star); }
.rate-row button.on { color: var(--gold); }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0; }
.chip { border-radius: 999px; padding: .45rem .85rem; min-height: 44px; background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.chip.on { background: var(--red-fill); border-color: var(--red-fill); color: #fff; }
.chip.busy { opacity: .5; }
.chip.me { background: var(--green-fill); border-color: var(--green-fill); color: #fff; }

.ring { --p: 1; width: 92px; height: 92px; border-radius: 50%; margin: 6px auto 10px; display: grid; place-items: center;
  background: conic-gradient(var(--red) calc(var(--p) * 360deg), var(--line) 0); }
.ring span { width: 76px; height: 76px; border-radius: 50%; background: var(--card); display: grid; place-items: center;
  font-size: 2rem; font-weight: 700; }

nav#tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 6; display: flex; background: var(--card);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
nav#tabs button { flex: 1; flex-direction: column; gap: 0; background: none; border-radius: 0; font-size: .75rem;
  color: var(--muted); min-height: 62px; }
nav#tabs button b { font-size: 1.4rem; }
nav#tabs button.on { color: var(--red); font-weight: 600; }

#sheet { position: fixed; inset: 0; z-index: 10; }
#sheet .backdrop { position: absolute; inset: 0; background: #2b1d1666; }
#sheet .panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88vh; overflow-y: auto; background: var(--bg);
  border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); max-width: 640px; margin: 0 auto;
  animation: up .18s ease-out; }
@keyframes up { from { transform: translateY(40%); opacity: .4; } }
#toast { position: fixed; z-index: 20; left: 12px; right: 12px; top: calc(12px + env(safe-area-inset-top)); max-width: 520px;
  margin: 0 auto; background: var(--toast); color: var(--toast-ink); padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow); }
#toast small { color: var(--toast-fix); display: block; }

.review img { width: 100%; max-height: 320px; object-fit: cover; border-radius: 12px; margin-top: .4rem; }
.feed-phrase { font-style: italic; color: var(--green); margin: .3rem 0 .6rem; }
ol.top3 { margin: .2rem 0; padding-left: 1.3rem; }
.qr svg { width: 100%; max-width: 260px; height: auto; display: block; margin: 8px auto; }
.copy { font-family: ui-monospace, Menlo, monospace; font-size: .9rem; word-break: break-all; }
