/* Guest ordering app. Mobile first; reads like the printed menu. */

[data-brand="cafe"] { --accent: var(--gold); }
[data-brand="meat"] { --accent: var(--ember); }
[data-brand="sip"]  { --accent: var(--parrot); }

/* ---------- welcome ---------- */
.welcome { position: relative; min-height: 100dvh; display: grid; align-items: end; overflow: hidden; }
.welcome-photo {
  position: absolute; left: 0; right: 0; top: 0; height: min(64vh, 560px);
  background:
    linear-gradient(180deg, rgba(26, 26, 26, 0.05) 20%, rgba(26, 26, 26, 0.8) 85%),
    url("/web/assets/hero.jpg") 50% 35% / cover no-repeat;
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
          mask-image: linear-gradient(#000 55%, transparent);
}
.welcome-awning { position: absolute; top: 0; left: 0; right: 0; --h: 30px; --w: 26px; --drop: 13px; z-index: 1; }
@media (prefers-reduced-motion: no-preference) {
  .welcome-awning { transform-origin: top; animation: unfurl 0.7s var(--ease) 0.1s both; }
}
@keyframes unfurl { from { transform: scaleY(0); } }
.welcome-inner {
  position: relative; width: 100%; max-width: 440px; margin: 0 auto;
  padding: 7rem 1.5rem calc(2rem + env(safe-area-inset-bottom)); text-align: center;
}
.welcome-logo { margin: 0 auto 1.25rem; border-radius: 50%; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55); }
.welcome h1 { font-size: var(--t-3xl); }
.welcome-sub { color: var(--muted); margin: 0.6rem 0 2rem; text-wrap: balance; }
.welcome-form { display: grid; gap: 1.5rem; text-align: left; }
.table-input {
  height: 92px; text-align: center; font-family: var(--serif); font-size: 3.5rem; font-weight: 600;
  border-radius: var(--radius); background: rgba(35, 31, 29, 0.85); border: 1px solid var(--line);
  width: 100%; letter-spacing: 0.04em;
}
.table-input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25); }
.hint { font-size: var(--t-sm); color: var(--muted); }
.form-error { font-size: var(--t-sm); color: var(--danger); font-weight: 500; }
.segmented { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.segmented legend { margin-bottom: 0.5rem; padding: 0; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented span {
  display: grid; place-items: center; min-height: 52px; border-radius: var(--radius);
  border: 1px solid var(--line); background: rgba(35, 31, 29, 0.85); font-weight: 500;
}
.segmented input:checked + span { border-color: var(--gold); background: rgba(212, 175, 55, 0.16); }
.segmented input:focus-visible + span { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.welcome-foot { margin-top: 2rem; font-size: var(--t-xs); color: var(--muted); line-height: 1.7; }

/* ---------- app header ---------- */
.app-awning { --h: 14px; --w: 18px; --drop: 9px; }
.top { position: sticky; top: 0; z-index: 10; background: rgba(26, 26, 26, 0.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 0.75rem; max-width: 760px; margin: 0 auto; padding: 0.6rem 1.25rem 0.25rem; }
.top-row img { border-radius: 50%; }
.top-name { flex: 1; font-family: var(--serif); font-size: var(--t-lg); font-weight: 600; }
.table-chip {
  display: grid; justify-items: end; gap: 0; min-height: 44px; padding: 0.25rem 0.9rem;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface); line-height: 1.25;
}
.table-chip strong { font-family: var(--serif); font-size: var(--t-lg); }
.chip-type { font-size: var(--t-xs); color: var(--muted); }

.section-nav { max-width: 760px; margin: 0 auto; }
.tabs { display: flex; gap: 0.25rem; overflow-x: auto; padding: 0.4rem 1rem 0.6rem; scrollbar-width: none; scroll-snap-type: x proximity; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; min-height: 40px; padding: 0 0.95rem; border-radius: 999px; border: 0; background: transparent;
  color: var(--muted); font-size: var(--t-sm); font-weight: 500; white-space: nowrap; scroll-snap-align: start;
}
.tab[aria-current="true"] { background: var(--surface-2); color: var(--ivory); box-shadow: inset 0 -2px 0 var(--accent, var(--gold)); }

/* ---------- menu ---------- */
.menu { max-width: 760px; margin: 0 auto; padding: 1rem 1.25rem 9rem; }
.menu-note { font-size: var(--t-sm); color: var(--muted); }
.m-section { padding-top: 2.75rem; scroll-margin-top: 112px; }
.section-awning { --h: 8px; --w: 14px; --drop: 7px; margin-bottom: 1.1rem; border-radius: 3px 3px 0 0; }
.m-section h2 { font-size: var(--t-3xl); }
.kitchen { margin-top: 0.3rem; font-size: var(--t-sm); color: var(--accent); font-weight: 500; }
.m-group h3 { font-size: var(--t-xl); font-style: italic; font-weight: 500; color: var(--accent); margin: 1.75rem 0 0.25rem; }
.dishes { list-style: none; margin: 0; padding: 0; }
.dish {
  width: 100%; display: grid; gap: 0.2rem; padding: 0.95rem 0; min-height: 56px;
  background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; border-radius: 0;
}
.dish:hover .dish-name { color: var(--accent); }
.dish-line { display: flex; align-items: baseline; gap: 0.5rem; }
.dish-name { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; line-height: 1.2; transition: color 0.15s; }
.leader { flex: 1; min-width: 1.25rem; border-bottom: 2px dotted rgba(243, 234, 216, 0.24); transform: translateY(-5px); }
.dish-price { font-weight: 500; color: var(--accent); white-space: nowrap; }
.dish-price small { color: var(--muted); font-weight: 400; font-size: var(--t-xs); margin-right: 0.25rem; }
.dish-desc { font-size: var(--t-sm); color: var(--muted); max-width: 60ch; }
.dish-meta { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.15rem; }
.in-cart { font-size: var(--t-xs); font-weight: 600; color: #231a05; background: var(--gold); border-radius: 999px; padding: 0.1rem 0.6rem; }
.soldout { font-size: var(--t-xs); font-weight: 600; color: var(--danger); }
.dish[aria-disabled="true"] { cursor: not-allowed; }
.dish[aria-disabled="true"] .dish-name, .dish[aria-disabled="true"] .dish-price { opacity: 0.4; }

/* ---------- bottom dock ---------- */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: rgba(22, 20, 19, 0.95); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  padding: 0.6rem 0.75rem calc(0.6rem + env(safe-area-inset-bottom));
}
.dock-inner { max-width: 760px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr 1fr 1.45fr; gap: 0.4rem; }
.dock-btn {
  position: relative; min-height: 58px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem;
  font-size: var(--t-xs); font-weight: 500;
}
.dock-btn .icon { width: 22px; height: 22px; }
.dock-btn > span { white-space: nowrap; letter-spacing: -0.01em; }
.dock-badge { position: absolute; top: 8px; right: calc(50% - 22px); width: 10px; height: 10px; border-radius: 50%; background: var(--parrot); box-shadow: 0 0 0 3px var(--surface); }
.dock-btn.cart { padding: 0 0.5rem; }
.cart-left { display: inline-flex; align-items: center; gap: 0.35rem; }
#cart-total { font-size: var(--t-xs); font-weight: 600; }
@media (min-width: 560px) {
  .dock-btn.cart { flex-direction: row; justify-content: space-between; padding: 0 1rem; font-size: var(--t-sm); }
  #cart-total { font-size: var(--t-sm); }
}
.star-outline { fill: none; }
.dock-btn.cart.has-items { background: var(--gold); border-color: var(--gold); color: #231a05; font-weight: 600; }

/* ---------- sheets: dish ---------- */
.sheet-form { display: contents; }
.dish-sheet-desc { color: var(--muted); margin-bottom: 0.5rem; }
.opt-group { border: 0; padding: 0; margin: 1.4rem 0 0; }
.opt-group legend { padding: 0; margin-bottom: 0.6rem; font-weight: 600; font-size: var(--t-md); display: flex; gap: 0.5rem; align-items: baseline; }
.opt-group legend small { font-weight: 400; color: var(--muted); font-size: var(--t-xs); }
.note-field { margin-top: 1.4rem; }

/* "Goes well with": other dishes with their own quantity */
.sugg-list { list-style: none; margin: 0; padding: 0; display: grid; }
.sugg { display: flex; align-items: center; gap: 0.75rem; padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.sugg:last-child { border-bottom: 0; }
.sugg-name { flex: 1; }
.sugg-name small { color: var(--muted); }
.sugg-price { color: var(--muted); font-size: var(--t-sm); }
.sugg.picked .sugg-name { color: var(--gold); font-weight: 500; }
.sugg.picked .stepper { border-color: var(--gold); }
.sugg.out .sugg-name { color: var(--muted); text-decoration: line-through; }
.stepper button:disabled { opacity: 0.35; cursor: not-allowed; }

/* feedback */
.fb-form { display: grid; gap: 1.25rem; text-align: left; }
.stars-field { border: 0; padding: 0; margin: 0; }
.stars-field legend { padding: 0; margin-bottom: 0.5rem; }
.stars { display: flex; gap: 0.35rem; }
.star { position: relative; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; cursor: pointer; color: var(--muted); }
.star input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.star .icon { width: 36px; height: 36px; fill: transparent; transition: fill 0.15s, color 0.15s, transform 0.15s; }
.star.on { color: var(--gold); }
.star.on .icon { fill: var(--gold); }
.star:has(input:checked) .icon { transform: scale(1.08); }
.star:has(input:focus-visible) { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.rating-word { font-size: var(--t-sm); color: var(--muted); margin-top: 0.35rem; min-height: 1.4em; }
.closed-feedback { width: 100%; margin-top: 0.5rem; }
.fb-form .foot-actions { grid-template-columns: 1fr 1.7fr; }
.fb-form .btn { white-space: nowrap; }
.item-foot { display: flex; gap: 0.75rem; align-items: center; }
.add-btn { flex: 1; justify-content: space-between; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; }
.stepper button { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 999px; }
.stepper output { min-width: 2ch; text-align: center; font-weight: 600; }
.stepper.small button { width: 36px; height: 36px; }

/* ---------- sheets: cart ---------- */
.cline { display: grid; grid-template-columns: 1fr auto; gap: 0.35rem 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.cline-name { font-family: var(--serif); font-size: var(--t-lg); font-weight: 600; }
.cline-mods { font-size: var(--t-sm); color: var(--muted); grid-column: 1; }
.cline-price { text-align: right; font-weight: 500; }
.cline-controls { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
.cline.unavailable .cline-name { text-decoration: line-through; opacity: 0.6; }
.link-btn { background: none; border: 0; color: var(--muted); text-decoration: underline; min-height: 44px; padding: 0 0.25rem; font-size: var(--t-sm); }
.total-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.9rem; }
.total-row span:first-child { color: var(--muted); }
.total-row strong { font-family: var(--serif); font-size: var(--t-2xl); }
.empty { text-align: center; color: var(--muted); padding: 2.5rem 1rem; }
.empty strong { display: block; color: var(--ivory); font-family: var(--serif); font-size: var(--t-xl); margin-bottom: 0.4rem; }

/* ---------- sheets: my table ---------- */
.table-meta { color: var(--muted); font-size: var(--t-sm); margin-top: -0.25rem; }
.round { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.round-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.round-head h3 { font-size: var(--t-xl); }
.round-time { font-size: var(--t-xs); color: var(--muted); }
.steps { list-style: none; padding: 0; margin: 0.8rem 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.35rem; }
.steps li { font-size: var(--t-xs); color: var(--muted); display: grid; gap: 0.35rem; }
.steps li::before { content: ""; height: 4px; border-radius: 2px; background: var(--line); }
.steps li.done::before { background: var(--gold); }
.steps li.now { color: var(--ivory); font-weight: 600; }
.steps li.now::before { background: var(--parrot); }
.round-lines { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.35rem; font-size: var(--t-sm); }
.round-lines li { display: flex; justify-content: space-between; gap: 1rem; }
.round-lines small { display: block; color: var(--muted); }
.cancelled-note { color: var(--danger); font-size: var(--t-sm); }
.foot-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }

/* ---------- sheets: service ---------- */
.service-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.service-btn {
  min-height: 92px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2);
  display: grid; place-items: center; align-content: center; gap: 0.4rem; font-weight: 500;
}
.service-btn .icon { width: 28px; height: 28px; color: var(--gold); }
.service-btn.sent { border-color: var(--parrot); }
.service-btn small { color: var(--parrot); font-size: var(--t-xs); font-weight: 500; }
.service-section { margin-top: 1.6rem; }
.service-section h3 { font-size: var(--t-xl); margin-bottom: 0.6rem; }
.msg-row { display: grid; gap: 0.6rem; }
.voice-btn {
  width: 100%; min-height: 64px; border-radius: var(--radius); border: 1px dashed rgba(243, 234, 216, 0.3);
  background: transparent; display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  font-weight: 500; touch-action: none; user-select: none; -webkit-user-select: none;
}
.voice-btn.rec { border-style: solid; border-color: var(--danger); color: var(--danger); background: rgba(255, 123, 107, 0.08); }
.req-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.req-list li { display: flex; justify-content: space-between; gap: 1rem; font-size: var(--t-sm); padding: 0.6rem 0.8rem; border-radius: var(--radius-sm); background: var(--surface-2); }
.req-state { color: var(--muted); }
.req-state.coming { color: var(--parrot); font-weight: 600; }

/* ---------- closed ---------- */
.closed { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; }
.closed-inner { display: grid; justify-items: center; align-content: center; gap: 1rem; text-align: center; padding: 2rem; max-width: 420px; margin: 0 auto; }
.closed-inner img { border-radius: 50%; }
.closed h1 { font-size: var(--t-3xl); }
.closed p { color: var(--muted); }
