.chat-body {
  --beer-gold: #eeb952;
  --beer-cream: #fff7e8;
  --beer-muted: #aa9a8d;
  --beer-surface: #211914;
  --beer-line: #6f512d;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  margin: 0;
  overflow: hidden;
  background: #0d0906;
  color: var(--beer-cream);
  font-family: "Manrope", system-ui, sans-serif;
}

.chat-topbar {
  position: relative;
  z-index: 8;
  display: grid;
  flex: none;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  min-height: 74px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 8px;
  background: #0d0906f2;
  backdrop-filter: blur(18px);
}

.chat-back {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #b8873e8c;
  border-radius: 50%;
  color: var(--beer-cream);
  font-size: 26px;
  text-decoration: none;
}

.chat-heading {
  min-width: 0;
  text-align: center;
}

.chat-heading .eyebrow {
  overflow: hidden;
  margin: 0;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .26em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.chat-heading h1 {
  margin: 4px 0 0;
  color: var(--beer-gold);
  font: 600 16px/1 "Cormorant Garamond", Georgia, serif;
}

.chat-table-badge {
  justify-self: end;
  padding: 7px 8px;
  border: 1px solid #b8873e66;
  border-radius: 999px;
  color: var(--beer-muted);
  font-size: 10px;
  font-weight: 700;
}

.chat-log {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px 0 calc(152px + env(safe-area-inset-bottom));
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.chat-log::-webkit-scrollbar,
.dish-carousel::-webkit-scrollbar {
  display: none;
}

.chat-row {
  display: flex;
  flex: none;
  flex-direction: column;
  width: 100%;
}

.chat-row.from-user {
  align-items: center;
  padding: 3px 24px 1px;
}

.chat-row.from-assistant {
  align-items: stretch;
}

.chat-bubble {
  white-space: pre-line;
}

.guest-request {
  display: grid;
  justify-items: center;
  gap: 5px;
  width: min(100%, 620px);
  text-align: center;
}

.guest-request-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #a98d68;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.guest-request-label .material-symbols-rounded {
  color: var(--beer-gold);
  font-size: 14px;
}

.guest-request-text {
  margin: 0;
  color: #d8c5a8;
  font: 600 clamp(17px, 4.6vw, 21px)/1.3 "Cormorant Garamond", Georgia, serif;
  letter-spacing: -.005em;
  text-wrap: balance;
}

.from-assistant .chat-bubble {
  color: var(--beer-cream);
}

.from-assistant .chat-bubble-text {
  max-width: 620px;
  margin: 4px auto 0;
  padding: 0 28px;
  color: var(--beer-cream);
  font: 600 clamp(26px, 7vw, 36px)/1.06 "Cormorant Garamond", Georgia, serif;
  letter-spacing: -.015em;
  text-align: center;
  text-wrap: balance;
}

.assistant-lead {
  display: grid;
  gap: 5px;
  max-width: 620px;
  margin: 2px auto 16px;
  padding: 0 24px;
  text-align: center;
}

.assistant-lead-title {
  margin: 0;
  color: #fff5e6;
  font: 600 clamp(22px, 6vw, 30px)/1.05 "Cormorant Garamond", Georgia, serif;
  text-wrap: balance;
}

.assistant-lead-subtitle {
  margin: 0;
  color: var(--beer-muted);
  font-size: 13px;
  line-height: 1.4;
}

.chat-bubble.typing {
  display: flex;
  align-self: center;
  align-items: center;
  gap: 5px;
  padding: 14px 16px;
}

.chat-bubble.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--beer-gold);
  animation: chat-typing 1.1s infinite ease-in-out;
}

.chat-bubble.typing span:nth-child(2) { animation-delay: .15s; }
.chat-bubble.typing span:nth-child(3) { animation-delay: .3s; }

@keyframes chat-typing {
  0%, 60%, 100% { opacity: .25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

.chat-bubble.error {
  color: #ffb5a9;
}

.dish-carousel-shell {
  --slide-width: min(calc(100vw - 72px), 620px);
  --carousel-gutter: max(36px, calc((100vw - var(--slide-width)) / 2));
  position: relative;
}

.dish-carousel {
  display: flex;
  gap: 14px;
  width: 100%;
  overflow-x: auto;
  padding: 0 var(--carousel-gutter);
  scroll-behavior: smooth;
  scroll-padding-inline: var(--carousel-gutter);
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
}

.dish-carousel:focus-visible {
  outline: none;
}

.dish-carousel:focus-visible .dish-slide.active {
  outline: 2px solid var(--beer-gold);
  outline-offset: -3px;
}

.dish-slide {
  position: relative;
  display: flex;
  flex: 0 0 var(--slide-width);
  flex-direction: column;
  height: min(67vh, 580px);
  min-height: 0;
  overflow: hidden;
  border: 1px solid #8d6234a8;
  border-radius: 22px;
  background: #17110d;
  opacity: .54;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  transform: scale(.985);
  transition: opacity .22s ease, transform .22s ease, border-color .22s ease;
}

.dish-carousel-shell.single .dish-slide {
  --slide-width: min(calc(100vw - 42px), 620px);
}

.dish-slide.active {
  border-color: #b9823fbd;
  opacity: 1;
  transform: scale(1);
}

.dish-slide-photo {
  position: relative;
  flex: 1 1 59%;
  min-height: 248px;
  overflow: hidden;
  background: #211914;
}

.dish-slide-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dish-slide.photo-missing {
  min-height: 350px;
}

.dish-slide.photo-missing .dish-slide-photo {
  display: none;
}

.dish-slide-info {
  display: grid;
  gap: 6px;
  padding: 16px 22px 4px;
}

.dish-card-name {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #fff8ea;
  font: 600 clamp(27px, 7.7vw, 43px)/.98 "Cormorant Garamond", Georgia, serif;
  letter-spacing: -.02em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.dish-card-short {
  display: -webkit-box;
  overflow: hidden;
  margin: 2px 0 0;
  color: #d0a45c;
  font-size: 13px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.dish-slide.description-expanded .dish-card-short {
  display: block;
  overflow: visible;
  -webkit-line-clamp: initial;
}

.dish-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 8px 22px 0;
  padding: 12px 0 6px;
  border-top: 1px solid #6f512d7d;
}

.dish-card-price {
  color: var(--beer-gold);
  font-size: clamp(18px, 5vw, 24px);
  font-weight: 700;
  white-space: nowrap;
}

.dish-card-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 126px;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: var(--beer-gold);
  color: #1a1109;
  padding: 0 22px;
  font: 700 15px/1 "Manrope", sans-serif;
}

.dish-card-add.pending {
  cursor: wait;
  opacity: .7;
}

.dish-card-add.added {
  background: #f8dfac;
}

.dish-card-add:active {
  transform: scale(.97);
}

.dish-card-more {
  align-self: flex-start;
  min-height: 44px;
  margin: 0 22px 8px;
  border: 0;
  background: transparent;
  color: var(--beer-muted);
  font-size: 13px;
  font-weight: 600;
}

.dish-card-more[aria-expanded="true"] {
  color: var(--beer-gold);
}

.carousel-meta {
  display: grid;
  place-items: center;
  gap: 6px;
  margin: 13px 0 0;
  color: var(--beer-muted);
  font-size: 12px;
  font-weight: 600;
}

.carousel-dots {
  display: flex;
  gap: 8px;
}

.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5c4c3f;
}

.carousel-dot.active {
  background: var(--beer-gold);
}

.assistant-answer-detail {
  max-width: 620px;
  margin: 14px auto 2px;
  padding: 0 24px;
  color: var(--beer-muted);
  font-size: 13px;
  line-height: 1.55;
}

.assistant-answer-detail summary {
  min-height: 44px;
  color: #cdbda9;
  cursor: pointer;
  font-weight: 650;
  line-height: 44px;
  text-align: center;
}

.assistant-answer-detail p {
  margin: 4px 0 0;
  text-align: center;
  white-space: pre-line;
}

.chat-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
}

.chat-chip {
  min-height: 44px;
  border: 1px solid #80603e8c;
  border-radius: 999px;
  background: #1a130f;
  color: #dbc9b2;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
}

.chat-control-dock {
  position: fixed;
  z-index: 24;
  right: max(0px, calc((100vw - 760px) / 2));
  bottom: 0;
  left: max(0px, calc((100vw - 760px) / 2));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: calc(90px + env(safe-area-inset-bottom));
  padding: 10px 18px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid #4f3b2b;
  border-radius: 28px 28px 0 0;
  background: #1b1612f7;
  box-shadow: 0 -16px 44px #0008;
  backdrop-filter: blur(20px);
}

.chat-cart-bar {
  min-width: 0;
}

.chat-cart-button,
.keyboard-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  background: #28211b;
  color: #d7c2a8;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 650;
}

.chat-cart-button .material-symbols-rounded,
.keyboard-button {
  color: var(--beer-gold);
  font-size: 23px;
}

.chat-cart-button:disabled {
  cursor: default;
  opacity: .72;
}

.chat-cart-button.order-bump {
  animation: cart-bounce .58s cubic-bezier(.22, .84, .36, 1);
}

.mic-control {
  display: grid;
  place-items: center;
}

.mic-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 2px solid #f9d58e;
  border-radius: 50%;
  background: var(--beer-gold);
  color: #17100a;
  box-shadow: 0 0 0 8px #2a2119, 0 10px 28px #0009;
  transition: transform .18s, background-color .18s, box-shadow .18s;
  touch-action: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.mic-button[hidden] {
  display: none;
}

.mic-icon {
  font-size: 32px;
}

.mic-button.recording {
  background: #ffd88a;
  box-shadow: 0 0 0 10px #eeb9522e, 0 12px 30px #000a;
  transform: scale(1.08);
  animation: mic-pulse 1.3s infinite;
}

.mic-button.processing {
  background: #b48745;
}

.voice-bars {
  display: none;
  align-items: center;
  gap: 3px;
  height: 24px;
}

.mic-button.recording .mic-icon {
  display: none;
}

.mic-button.recording .voice-bars {
  display: flex;
}

.voice-bars i {
  width: 3px;
  height: 8px;
  border-radius: 999px;
  background: #17100a;
  animation: voice-bar .72s infinite ease-in-out alternate;
}

.voice-bars i:nth-child(2) { animation-delay: .12s; }
.voice-bars i:nth-child(3) { animation-delay: .24s; }
.voice-bars i:nth-child(4) { animation-delay: .36s; }

.mic-hint {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.keyboard-button {
  justify-self: end;
  width: 58px;
  padding: 0;
}

.voice-status {
  position: fixed;
  z-index: 26;
  bottom: calc(102px + env(safe-area-inset-bottom));
  left: 50%;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: min(84vw, 360px);
  padding: 10px 13px;
  border: 1px solid #80603e9c;
  border-radius: 16px;
  background: #1d1712f5;
  box-shadow: 0 12px 32px #0008;
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}

.voice-status[hidden] {
  display: none;
}

.voice-status-dot {
  flex: none;
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--beer-gold);
  animation: voice-dot-pulse 1.15s infinite;
}

.voice-status-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.voice-status-copy strong {
  color: #fff2db;
  font-size: 13px;
}

.voice-status-copy small {
  overflow: hidden;
  color: var(--beer-muted);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-input-dock {
  position: fixed;
  z-index: 30;
  right: max(14px, calc((100vw - 732px) / 2));
  bottom: calc(100px + env(safe-area-inset-bottom));
  left: max(14px, calc((100vw - 732px) / 2));
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid #80603e9c;
  border-radius: 17px;
  background: #1d1712f5;
  box-shadow: 0 14px 40px #0009;
  backdrop-filter: blur(18px);
}

.chat-input-dock[hidden] {
  display: none;
}

.chat-input {
  flex: 1;
  min-width: 0;
  height: 42px;
  border: 1px solid #80603e75;
  border-radius: 12px;
  background: #2b211a;
  padding: 0 13px;
  color: #fff3df;
  font-size: 15px;
}

.chat-input:focus {
  outline: 2px solid var(--beer-gold);
}

.chat-send {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--beer-gold);
  color: #261408;
  font-size: 18px;
}

.keyboard-button:focus-visible,
.mic-button:focus-visible,
.chat-back:focus-visible,
.dish-card-add:focus-visible,
.dish-card-more:focus-visible,
.chat-cart-button:focus-visible {
  outline: 2px solid #ffd06e;
  outline-offset: 3px;
}

@keyframes mic-pulse {
  50% { box-shadow: 0 0 0 16px #eeb95216, 0 12px 30px #000a; }
}

@keyframes voice-dot-pulse {
  50% { opacity: .45; }
}

@keyframes voice-bar {
  from { height: 7px; }
  to { height: 23px; }
}

@keyframes cart-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  28% { transform: translateY(-7px) scale(1.035); }
  52% { transform: translateY(2px) scale(.992); }
  72% { transform: translateY(-3px) scale(1.012); }
}

@media (min-width: 720px) {
  .chat-log { padding-top: 22px; }
  .dish-carousel-shell {
    --slide-width: min(64vw, 620px);
    --carousel-gutter: max(40px, calc((100vw - var(--slide-width)) / 2));
  }
  .dish-carousel { gap: 16px; }
}

@media (max-height: 720px) {
  .dish-slide { min-height: 430px; }
  .dish-slide-photo { min-height: 220px; }
  .assistant-lead { margin-bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .chat-log,
  .dish-carousel { scroll-behavior: auto; }
  .mic-button,
  .chat-cart-button,
  .voice-status-dot,
  .voice-bars i,
  .chat-bubble.typing span { animation: none !important; transition: none !important; }
}

.order-dialog .order-body,
.final-dialog .final-body {
  padding: 18px 18px 22px;
}

.order-items {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.order-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2);
}

.order-item-name {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-item-qty {
  flex: none;
  color: var(--muted);
  font-size: 12.5px;
}

.order-item-price {
  flex: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 720;
}

.order-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 16px;
}

.order-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.secondary-button {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  padding: 15px;
  font-weight: 800;
}

.order-actions .primary-button {
  flex: 1;
  margin-top: 0;
}

.final-order-text {
  margin: 14px 0;
  padding: 14px;
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--ink);
  font: 13.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
}

.final-hint {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
}
