@import url("https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700&display=swap");

:root {
  /* Vietnam context: warm paper + bamboo green + vermilion accents */
  --guest-bg: #f8f6f2;
  --bg: var(--guest-bg);
  --surface: #ffffff;
  --surface-2: #fbfaf7;       /* subtle alt surface */
  --accent: #0e9f6e;          /* bamboo green */
  --accent-hover: #0b8a60;
  --accent-soft: rgba(14, 159, 110, 0.12);
  --danger: #e84c3d;          /* vermilion */
  --danger-soft: rgba(232, 76, 61, 0.12);
  --sale: #f59e0b;            /* saffron */
  --chip-bg: rgba(17, 24, 39, 0.06);
  --text: #111827;            /* ink */
  --text-muted: #6b7280;
  --border: rgba(17, 24, 39, 0.10);
  --shadow: 0 10px 24px rgba(17, 24, 39, 0.10);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Be Vietnam Pro", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--guest-bg, #f8f6f2);
  color: #1a1a1a;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

html {
  scrollbar-gutter: stable;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: 80px;
}

.header {
  background: #fff;
  padding: 1rem 1.125rem 0;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 0.5px solid #ebe9e4;
  transition: padding 0.25s ease;
}

.header-top {
  overflow: hidden;
  max-height: 120px;
  opacity: 1;
  transition: max-height 0.28s ease, opacity 0.22s ease;
}

.header-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.15rem;
}

.header-title-row h1 {
  flex: 1;
  min-width: 0;
}

.header-title-row .table-badge {
  margin-top: 0.2rem;
}

.header.is-compact {
  padding-top: 0.45rem;
}

.header.is-compact .header-top {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

.header.is-compact .lang-row {
  padding-top: 0.35rem;
  padding-bottom: 0.55rem;
}

.header.is-compact .table-badge {
  margin: 0;
}

.header h1 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #1a1a1a;
}

.table-badge {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  font-size: 0.7rem;
  color: #777;
  background: #f0ede8;
  white-space: nowrap;
  flex-shrink: 0;
}

.header-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

#guest-header:not(.header-shows-search) .header-toolbar {
  display: none;
}

#guest-header:not(.header-shows-search) .header-top {
  display: none;
}

.search-field {
  flex: 1;
  min-width: 0;
}

.search-field input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: #f0ede8;
  border: 1.5px solid transparent;
  border-radius: 12px;
  color: #1a1a1a;
  font-size: 0.9rem;
}

.search-field input:focus {
  outline: none;
  background: #fff;
  border-color: #1a1a1a;
}

.search-field input::placeholder {
  color: #aaa;
}

.lang-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0 0.75rem;
  border-bottom: 0.5px solid #ebe9e4;
  transition: padding 0.25s ease;
}

.lang-selector {
  position: relative;
  flex-shrink: 0;
}

.lang-selector-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 36px;
  padding: 0.22rem 0.55rem 0.22rem 0.4rem;
  border-radius: 18px;
  border: 0.5px solid #ccc;
  background: #fff;
  color: #1a1a1a;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  line-height: 1.2;
  touch-action: manipulation;
}

.lang-selector-btn:active {
  background: #f0ede8;
}

.lang-selector-flag {
  display: block;
  width: 18px;
  height: 13px;
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.12);
}

.lang-selector-caret {
  font-size: 0.62rem;
  color: #777;
  line-height: 1;
  margin-left: -0.05rem;
}

.lang-selector-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  z-index: 20;
  min-width: 11.5rem;
  max-width: min(16rem, calc(100vw - 2.25rem));
  padding: 0.45rem 0;
  border-radius: 12px;
  border: 0.5px solid #e3e0da;
  background: #fff;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.14);
}

.lang-selector-menu[hidden] {
  display: none !important;
}

.lang-selector-menu-title {
  margin: 0;
  padding: 0.2rem 0.85rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #999;
}

.lang-selector-options {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0 0.35rem;
}

.lang-selector-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.5rem 0.55rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #1a1a1a;
  font-size: 0.84rem;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.lang-selector-option:active,
.lang-selector-option.active {
  background: #f0ede8;
}

.lang-selector-option-flag {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.12);
}

.header-action-chips {
  flex-shrink: 0;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.restaurant-contacts {
  margin-top: 0.65rem;
}

.wifi-chip {
  flex-shrink: 0;
  min-height: 44px;
  min-width: 44px;
  height: auto;
  width: auto;
  padding: 0.2rem 0.55rem 0.2rem 0.35rem;
  border-radius: 20px;
  border: 0.5px solid #ccc;
  background: #fff;
  color: #444;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.wifi-chip-icon {
  display: block;
  width: 28px;
  height: auto;
  flex-shrink: 0;
  pointer-events: none;
}

.wifi-chip-label {
  font-size: 0.68rem;
  font-weight: 600;
  margin-left: 3px;
  line-height: 1.2;
  white-space: nowrap;
}

.wifi-chip:active {
  background: #f0ede8;
}

.waiter-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.28rem 0.65rem 0.28rem 0.32rem;
  border-radius: 20px;
  border: 0.5px solid #ccc;
  background: #fff;
  color: #444;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
  touch-action: manipulation;
}

.waiter-chip-avatar {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.waiter-chip-label {
  line-height: 1.2;
}

.waiter-chip:active {
  background: #f0ede8;
}

.waiter-chip:disabled {
  opacity: 0.85;
  cursor: default;
}

.restaurant-contacts[hidden] {
  display: none !important;
}

.contact-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

a.contact-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(14, 159, 110, 0.22);
}

a.contact-chip:active {
  opacity: 0.9;
}

.contact-wifi {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.55rem;
  border-radius: 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--chip-bg);
  border: 1px solid var(--border);
}

.main {
  padding: 0 1.125rem 1rem;
}

.loading, .error {
  text-align: center;
  padding: 2rem;
}

.loading-shell {
  padding: 1.25rem 0 2rem;
  text-align: left;
}

.loading-shell-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.loading-shell-bar {
  height: 0.72rem;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(17, 24, 39, 0.06) 0%,
    rgba(17, 24, 39, 0.12) 45%,
    rgba(17, 24, 39, 0.06) 90%
  );
  background-size: 200% 100%;
  animation: loading-shell-shimmer 1.2s ease-in-out infinite;
}

.loading-shell-bar--wide { width: 72%; }
.loading-shell-bar--medium { width: 48%; }
.loading-shell-bar:not(.loading-shell-bar--wide):not(.loading-shell-bar--medium) { width: 86%; }

.loading-shell-status {
  margin: 1rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

.loading-shell--error {
  text-align: center;
}

.loading-shell--error .loading-shell-body {
  display: none;
}

.header-booting .header-skel {
  display: inline-block;
  vertical-align: middle;
  min-height: 1.1rem;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    rgba(17, 24, 39, 0.06) 0%,
    rgba(17, 24, 39, 0.12) 45%,
    rgba(17, 24, 39, 0.06) 90%
  );
  background-size: 200% 100%;
  animation: loading-shell-shimmer 1.2s ease-in-out infinite;
}

.header-booting #restaurant-name .header-skel {
  width: min(12rem, 70vw);
  height: 1.35rem;
}

.header-booting #table-info .header-skel--short {
  width: 4.5rem;
  height: 1.1rem;
}

.header-booting #restaurant-name,
.header-booting #table-info {
  margin: 0;
  min-height: 1.35rem;
}

@keyframes loading-shell-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.loading-error-text {
  margin: 0 0 1rem;
  color: var(--text);
}

.loading-retry-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: 999px;
  background: #1a1a1a;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

.loading-retry-btn:active {
  opacity: 0.85;
}

.error {
  color: var(--danger);
}

.section {
  margin-bottom: 1.5rem;
}

.section h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--text-muted);
}

.popular-section {
  padding: 1rem 0 0.25rem;
  margin-bottom: 0.25rem;
}

.section-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #aaa;
  text-transform: uppercase;
  margin-bottom: 12px;
}

body.has-cart #app {
  padding-bottom: 96px;
}

body.has-active-order #app {
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}

body.has-active-order.has-cart #app {
  padding-bottom: calc(168px + env(safe-area-inset-bottom, 0px));
}

.active-order-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  z-index: 49;
  width: min(460px, calc(100% - 1.5rem));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}

body.has-cart .active-order-bar {
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

.active-order-bar-card {
  pointer-events: auto;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(27, 58, 44, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
  color: #1a1a1a;
  text-align: left;
  cursor: pointer;
}

.active-order-bar-card:active {
  transform: scale(0.99);
}

.active-order-bar-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2ecc71;
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.18);
}

.active-order-bar-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.active-order-bar-title {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
}

.active-order-bar-meta {
  font-size: 0.78rem;
  color: #5c6670;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.active-order-bar-action {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1b3a2c;
  white-space: nowrap;
}

#guest-header:has(#category-tabs-wrap:not([hidden])) .lang-row {
  border-bottom: none;
  padding-bottom: 0.45rem;
}

.cat-tabs-wrap {
  margin: 0;
  padding: 0;
  background: #fff;
  overflow: hidden;
}

.cat-tabs-wrap:not([hidden]) {
  position: relative;
  min-height: 2.85rem;
}

.cat-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0;
  padding: 0 0 0.55rem;
  border-bottom: 0.5px solid #ebe9e4;
  -webkit-overflow-scrolling: touch;
  scroll-padding-inline: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.cat-tabs-fade {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0.5rem;
  width: 2.25rem;
  pointer-events: none;
  background: linear-gradient(to right, rgba(255, 255, 255, 0), #fff 72%);
}

.drink-sub-tabs-wrap {
  margin: 0;
  padding: 0;
  background: #f8f7f4;
  position: relative;
  overflow: hidden;
}

.drink-sub-tabs-wrap:not([hidden]) {
  min-height: 2.35rem;
}

.drink-sub-tabs {
  gap: 0.45rem;
  padding: 0.3rem 0 0.45rem;
  border-bottom: 0.5px solid #ebe9e4;
  background: #f8f7f4;
}

.drink-sub-tabs-fade {
  background: linear-gradient(to right, rgba(248, 247, 244, 0), #f8f7f4 72%);
}

.drink-sub-tabs .chip {
  font-size: 0.75rem;
  padding: 0.42rem 0.5rem;
  color: #9ca3af;
}

.drink-sub-tabs .chip.active {
  color: #1b3a2c;
  font-weight: 700;
}

#guest-header:has(#drink-sub-tabs-wrap:not([hidden])) .cat-tabs {
  border-bottom: none;
  padding-bottom: 0.35rem;
}

.menu-feed-root {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.menu-feed-root.menu-feed--search {
  gap: 0.75rem;
}

.menu-cat-section {
  scroll-margin-top: var(--guest-sticky-nav-offset, calc(var(--guest-sticky-tabs-top, 56px) + 3.25rem));
}

.menu-cat-heading {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a8f98;
}

.menu-cat-heading--major {
  font-size: 0.78rem;
  color: #6b7280;
}

.menu-cat-heading--search {
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.95rem;
  color: var(--text);
}

.menu-cat-subheading {
  margin: 16px 0 6px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #999;
}

html[lang="zh"] .menu-cat-subheading,
html[lang="ko"] .menu-cat-subheading {
  text-transform: none;
  letter-spacing: 0.04em;
}

.menu-cat-subheading:first-of-type {
  margin-top: 0.15rem;
}

.cat-tabs::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: #aaa;
  border-radius: 0;
  padding: 0.65rem 0.5rem;
  font-size: 0.8125rem;
  white-space: nowrap;
  text-overflow: clip;
  overflow: visible;
  max-width: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -0.5px;
}

.chip.active {
  color: #1a1a1a;
  font-weight: 600;
  border-bottom-color: #1a1a1a;
}

.menu-feed {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pop-row {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
}

.pop-row::-webkit-scrollbar {
  display: none;
}

.mitem {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #fff;
  border-radius: 12px;
  border: 0.5px solid #ebe9e4;
  align-items: stretch;
  cursor: pointer;
}

.mitem:active {
  opacity: 0.92;
}

.mitem.pop-card {
  flex: 0 0 148px;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  border: 0.5px solid #ebe9e4;
  min-height: 220px;
}

.mitem.pop-card .mbody {
  padding: 0.5rem 0.65rem 0.65rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.mitem.pop-card .mfoot {
  margin-top: auto;
  padding-top: 0.35rem;
}
.mitem.pop-card .mimg {
  width: 100%;
  height: 90px;
  border-radius: 0;
}

.mitem.pop-card .mname {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
  word-break: normal;
  min-height: 0;
  font-size: 0.75rem;
  line-height: 1.3;
}

.mimg {
  width: 88px;
  height: 88px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: cover;
  background: linear-gradient(145deg, #e8e4de, #d4cfc6);
}

.mimg.no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
}

.mbody {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 88px;
}

.mname {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.mdesc {
  margin: 0.15rem 0 0;
  font-size: 0.6875rem;
  color: #aaa;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 0;
}

.mweight {
  margin: 0.15rem 0 0;
  font-size: 0.6875rem;
  color: #999;
  line-height: 1.3;
}

.mfoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.35rem;
  gap: 0.5rem;
}

.mprice {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent, #0e9f6e);
}

.m-actions {
  flex-shrink: 0;
}

.add-circle {
  position: relative;
  isolation: isolate;
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.add-circle::before {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1a1a1a;
  z-index: -1;
  pointer-events: none;
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.qbtn {
  position: relative;
  isolation: isolate;
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  touch-action: manipulation;
}

.qbtn::before {
  content: '';
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 0.5px solid #ddd;
  background: #fff;
  z-index: -1;
  pointer-events: none;
}

.qbtn.dark {
  color: #fff;
}

.qbtn.dark::before {
  background: #1a1a1a;
  border: none;
}

.qnum {
  font-size: 0.8125rem;
  font-weight: 600;
  min-width: 1rem;
  text-align: center;
}

.item-badge {
  font-size: 0.65rem;
  font-weight: 600;
  border-radius: 8px;
  padding: 0.15rem 0.4rem;
  background: #e8421a;
  color: #fff;
  display: inline-block;
  margin-bottom: 0.25rem;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(17, 24, 39, 0.45);
}

body.sheet-open {
  overflow: hidden;
}

.cart-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 480px;
  margin: 0 auto;
  max-height: 88vh;
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -12px 40px rgba(17, 24, 39, 0.18);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.28s ease;
}

.cart-sheet.open {
  transform: translateY(0);
}

.dish-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 480px;
  margin: 0 auto;
  max-height: 92vh;
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -12px 40px rgba(17, 24, 39, 0.18);
  z-index: 110;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.28s ease;
  overflow: hidden;
}

.dish-sheet.open {
  transform: translateY(0);
}

#dish-backdrop {
  z-index: 105;
}

.dish-sheet-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #1a1a1a;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.dish-sheet-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 42vh;
  background: linear-gradient(160deg, #e8e4de, #c4b8a8);
  flex-shrink: 0;
  overflow: hidden;
}

.dish-sheet-hero--compact {
  aspect-ratio: 1 / 1;
  max-height: 32vh;
}

.dish-sheet-hero--medium {
  aspect-ratio: 4 / 3;
  max-height: 42vh;
}

.dish-sheet-hero--large {
  aspect-ratio: 16 / 10;
  max-height: 50vh;
}

.dish-sheet-hero-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  opacity: 0.55;
}

.dish-sheet-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dish-sheet-body {
  padding: 1rem 1.25rem 0.5rem;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.dish-sheet-title {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  line-height: 1.25;
}

.dish-sheet-price {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #0e9f6e;
}

.dish-sheet-stats {
  margin: 0 0 0.65rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #b45309;
  font-weight: 500;
}

.dish-sheet-weight {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
}

.dish-sheet-desc {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #666;
  white-space: pre-wrap;
}

.dish-sheet-modifiers {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.75rem;
}

.modifier-group-title {
  margin: 0 0 0.45rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.modifier-required-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #b45309;
  background: #fef3c7;
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
}

.modifier-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.modifier-chip {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
  color: #333;
  cursor: pointer;
  line-height: 1.2;
}

.modifier-chip.selected {
  border-color: var(--primary, #1b3a2c);
  background: rgba(27, 58, 44, 0.08);
  color: var(--primary, #1b3a2c);
  font-weight: 600;
}

.modifier-chip .modifier-rec {
  opacity: 0.75;
  font-size: 0.75rem;
}

.cart-item-mods {
  margin-top: 0.2rem;
}

.cart-item-mod {
  font-size: 0.75rem;
  color: #666;
  line-height: 1.35;
}

.dish-sheet-foot {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.dish-sheet-qty {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.dish-sheet-add {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: #ddd;
  border-radius: 2px;
  margin: 10px auto 4px;
  flex-shrink: 0;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.cart-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.cart-header-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.cart-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  white-space: nowrap;
}

.cart-clear:active {
  color: #c0392b;
}

.cart-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 0.5rem;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  min-height: 0;
}

.cart-upsell {
  flex-shrink: 0;
  padding: 0 1rem 0.75rem;
  border-top: 1px solid var(--border);
}

.cart-upsell-title {
  margin: 0.75rem 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.cart-upsell-items {
  padding-bottom: 0.25rem;
}

.cart-upsell-items .mitem.pop-card {
  min-width: 9.5rem;
  max-width: 11rem;
}

.cart-upsell-items .mdesc,
.cart-upsell-items .mweight {
  display: none;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-line-body {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.3;
}

.cart-line-price {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.cart-item-qty button {
  position: relative;
  isolation: isolate;
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.cart-item-qty button::before {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  z-index: -1;
  pointer-events: none;
}

.cart-item-qty button:last-child {
  color: #fff;
}

.cart-item-qty button:last-child::before {
  background: #1a1a1a;
  border-color: #1a1a1a;
}

.cart-item-qty span {
  min-width: 1.25rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
}

.cart-empty {
  padding: 1.5rem 1.15rem;
  text-align: center;
  font-size: 0.9rem;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.15rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.cart-total-row strong {
  font-size: 1.15rem;
  font-weight: 700;
}

.pay-at-table-hint {
  margin: 0 1.15rem 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  align-self: stretch;
}

#notes {
  width: auto;
  align-self: stretch;
  margin: 0 1.15rem 0.65rem;
  padding: 0.75rem;
  background: rgba(17, 24, 39, 0.04);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  resize: none;
  box-sizing: border-box;
}

#notes::placeholder {
  color: var(--text-muted);
}

.cart-sheet .btn-kitchen {
  width: auto;
  align-self: stretch;
  margin: 0 1.15rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  background: #1a1a1a;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
}

.cart-sheet .btn-kitchen:hover {
  background: #333;
}

.btn-primary {
  width: 100%;
  padding: 1rem;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(14, 159, 110, 0.20);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(14, 159, 110, 0.10);
  border: 1px solid rgba(14, 159, 110, 0.30);
  border-radius: 8px;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.call-staff-main {
  margin-top: 0.75rem;
}

.order-confirmation-view {
  padding: 1.5rem 1.25rem 2rem;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.confirm-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.confirm-icon {
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.order-confirmation-view > h2 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
}

.confirm-sub {
  margin: 0 0 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.confirm-pay {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  color: #aaa;
  text-align: center;
}

.order-confirmation-view.tips-resume-mode #confirmation-subtitle {
  display: none;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #f0ede8;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e8421a;
  flex-shrink: 0;
}

.confirmation-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 0.85rem 1rem;
  text-align: left;
  margin-bottom: 1.25rem;
}

.tea-wisdom-block {
  margin: -0.25rem 0 1.25rem;
  padding: 0.85rem 1rem;
  text-align: left;
  background: rgba(255, 255, 255, 0.72);
  border: 0.5px solid #e8e0d4;
  border-radius: 12px;
}

.tea-wisdom-title {
  margin: 0 0 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.tea-wisdom-text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.confirmation-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--border);
}

.confirmation-row span {
  color: var(--text-muted);
}

.confirmation-row strong {
  text-align: right;
}

.confirmation-items-details {
  border-top: 1px solid var(--border);
  margin-top: 0.15rem;
}

.confirmation-items-toggle {
  cursor: pointer;
  list-style: none;
  padding: 0.65rem 0 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  user-select: none;
}

.confirmation-items-toggle::-webkit-details-marker {
  display: none;
}

.confirmation-items-details[open] .confirmation-items-toggle {
  padding-bottom: 0.15rem;
}

.confirmation-items {
  padding-top: 0.15rem;
  padding-bottom: 0.15rem;
}

.confirmation-prices-tax-note {
  margin: 0.1rem 0 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.confirmation-item-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem 0;
  font-size: 0.88rem;
}

.confirmation-item-name {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.confirmation-item-price {
  font-weight: 600;
  white-space: nowrap;
  color: var(--text);
  flex-shrink: 0;
}

.confirmation-item-row span:last-child {
  font-weight: 600;
  white-space: nowrap;
}

.confirmation-card > .confirmation-total-row {
  border-top: none;
  padding-top: 0;
}

.confirmation-total-row {
  border-top: 1px solid var(--border);
  margin-top: 0;
  padding-top: 0.65rem;
  padding-bottom: 0.15rem;
  font-weight: 600;
}

.confirmation-total-row strong {
  font-size: 1rem;
}

.order-confirmation-view .btn-primary {
  margin-bottom: 0.55rem;
  background: #1a1a1a;
}

.order-confirmation-view .btn-primary:hover {
  background: #333;
}

#confirmation-call-staff {
  margin-top: 0;
}

.staff-call-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.staff-call-modal:not([hidden]) {
  pointer-events: auto;
}

.staff-call-modal .sheet-backdrop {
  position: absolute;
  z-index: 0;
}

.staff-call-sheet {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 0 1rem 1rem;
  box-shadow: 0 -12px 40px rgba(17, 24, 39, 0.2);
}

.staff-call-sheet h2 {
  margin: 0 0 0.8rem;
  font-size: 1rem;
}

.staff-call-sheet button {
  display: block;
  width: 100%;
  padding: 0.9rem 1rem;
  margin-top: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}

.staff-call-sheet button.muted {
  color: var(--text-muted);
  background: transparent;
}

.staff-call-custom textarea {
  width: 100%;
  min-height: 5.5rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.45;
  resize: vertical;
  margin-top: 0.25rem;
}

.staff-call-custom textarea:focus {
  outline: none;
  border-color: #1a1a1a;
}

.staff-call-custom .btn-primary {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}

.demo-bill-block,
.demo-tips-block {
  margin: 1rem 0 0.75rem;
  padding: 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.review-assistant-block {
  position: relative;
  margin: 0.85rem 0 1rem;
  padding-top: 1.35rem;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}

.review-assistant-block.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.review-assistant-persona {
  position: absolute;
  top: 0;
  right: 0.65rem;
  z-index: 2;
  line-height: 1;
  transform: translateY(8px);
  opacity: 0;
  transition: opacity 0.35s ease 0.55s, transform 0.45s ease 0.55s;
}

.review-assistant-block.is-visible .review-assistant-persona {
  opacity: 1;
  transform: translateY(0);
}

.review-assistant-avatar {
  display: inline-block;
  font-size: 1.65rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
  animation: review-assistant-wave 1.1s ease-in-out 1.15s 2;
  transform-origin: 70% 90%;
}

.review-assistant-card {
  position: relative;
  padding: 0.85rem 0.95rem 0.8rem;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #e8e0d4;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(26, 26, 26, 0.06);
  text-align: left;
}

.review-assistant-text {
  margin: 0 0 0.75rem;
  padding-right: 1.5rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.review-assistant-actions {
  display: flex;
}

.review-assistant-btn {
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
}

@keyframes review-assistant-wave {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(14deg); }
  75% { transform: rotate(-8deg); }
}

@media (prefers-reduced-motion: reduce) {
  .review-assistant-block,
  .review-assistant-persona {
    transition: none;
  }

  .review-assistant-avatar {
    animation: none;
  }
}

.demo-block-heading {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.demo-bill-note {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
}

.demo-tips-presets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-top: 0.5rem;
}

.demo-tips-presets button,
.demo-tips-preset {
  width: 100%;
  padding: 0.75rem 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  touch-action: manipulation;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.demo-tips-preset.is-active {
  border-color: #2d8a4e;
  background: #e8f5ec;
  color: #1a5c32;
}

.demo-tips-zalo-btn {
  width: 100%;
  margin-top: 0.75rem;
}

.demo-tips-qr-focus {
  position: fixed;
  inset: 0;
  z-index: 130;
  background: linear-gradient(180deg, #faf6f0 0%, #ffffff 42%, #f0ebe3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.25rem 2rem;
  text-align: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
  overflow-y: auto;
}

.demo-tips-qr-focus.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.demo-tips-qr-focus-inner {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.demo-tips-qr-focus-emoji {
  margin: 0;
  font-size: 2rem;
  line-height: 1;
}

.demo-tips-qr-focus-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.demo-tips-qr-focus-amount-row {
  margin: 0.15rem 0 0.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.demo-tips-qr-focus-amount-label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.demo-tips-qr-focus-amount {
  font-size: 2.15rem;
  font-weight: 800;
  line-height: 1.1;
  color: #1a1a1a;
  letter-spacing: -0.02em;
}

.demo-tips-qr-focus-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin: 0.1rem 0 0.15rem;
}

.demo-tips-qr-focus-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.72rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e8e0d4;
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.demo-tips-qr-focus-chip strong {
  color: var(--text);
  font-weight: 700;
}

.demo-tips-qr-focus-note {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  max-width: 100%;
  word-break: break-word;
}

.demo-tips-qr-focus-note strong {
  color: var(--text);
  font-weight: 600;
}

.demo-tips-qr-focus-card {
  width: 100%;
  margin-top: 0.35rem;
  padding: 1rem 1rem 1.15rem;
  background: #fff;
  border: 1px solid #e8e0d4;
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(26, 26, 26, 0.08);
}

.demo-tips-qr-focus-hint {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
}

.demo-tips-qr-focus-loading {
  margin: 0.75rem 0;
  font-size: 0.9rem;
}

.demo-tips-qr-focus-card img {
  width: min(260px, 72vw);
  height: auto;
  margin: 0 auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.demo-tips-qr-focus-gallery-hint,
.demo-tips-qr-focus-manual {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  max-width: 34ch;
}

.demo-tips-qr-focus-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.35rem;
}

.demo-tips-qr-focus-save,
.demo-tips-qr-focus-done {
  width: 100%;
  min-height: 46px;
}

.demo-tips-qr-focus-back {
  position: absolute;
  top: 0.65rem;
  right: 0.85rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  z-index: 1;
}

body.tips-qr-focus-open {
  overflow: hidden;
}

.demo-tips-open-sheet {
  width: 100%;
  margin-top: 0.5rem;
  font-size: 0.88rem;
}

.demo-tips-experimental-wrap {
  margin-top: 0.75rem;
}

.demo-tips-experimental-summary {
  cursor: pointer;
  font-size: 0.82rem;
  list-style: none;
  user-select: none;
}

.demo-tips-experimental-summary::-webkit-details-marker {
  display: none;
}

.demo-tips-experimental-wrap[open] .demo-tips-open-sheet {
  margin-top: 0.5rem;
}

.order-confirmation-view.tips-resume-mode #confirmation-title {
  font-size: 1.35rem;
}

.demo-tips-hint {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
}

.demo-tips-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
}

.demo-tips-modal:not([hidden]) {
  pointer-events: auto;
}

.demo-tips-modal .sheet-backdrop {
  position: absolute;
  z-index: 0;
}

.demo-tips-sheet {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  max-height: min(92vh, 720px);
  overflow-y: auto;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 0 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 40px rgba(17, 24, 39, 0.2);
}

.demo-tips-sheet h2 {
  margin: 0 0 0.6rem;
  font-size: 1rem;
}

.demo-tips-sheet-amount {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
}

.demo-tips-details {
  margin: 0 0 0.65rem;
  padding: 0.65rem 0.75rem;
  background: var(--surface-2);
  border-radius: 10px;
  font-size: 0.88rem;
}

.demo-tips-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.demo-tips-detail-row:last-child {
  margin-bottom: 0;
}

.demo-tips-detail-row strong {
  text-align: right;
  word-break: break-word;
}

.demo-tips-fallback {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  line-height: 1.35;
}

.demo-tips-qr-wrap {
  text-align: center;
  margin: 0 0 0.65rem;
}

.demo-tips-qr-wrap img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.demo-tips-qr-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.demo-tips-qr-actions .btn-primary,
.demo-tips-qr-actions .btn-secondary {
  margin-top: 0;
}

.demo-tips-sheet .btn-primary,
.demo-tips-sheet .btn-secondary,
.demo-tips-sheet button.muted {
  display: block;
  width: 100%;
  padding: 0.85rem 1rem;
  margin-top: 0.45rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
}

.demo-tips-sheet .btn-primary {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}

.demo-tips-sheet .btn-secondary {
  background: var(--surface-2);
  color: var(--text);
}

.demo-tips-sheet button.muted {
  color: var(--text-muted);
  background: transparent;
  border-color: transparent;
}

.demo-tips-banks {
  margin-top: 0.5rem;
}

.demo-tips-bank-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.demo-tips-bank-grid .demo-tips-bank-btn {
  display: block;
  width: 100%;
  padding: 0.75rem 0.5rem;
  margin-top: 0;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid #1a1a1a;
  border-radius: 10px;
  background: #1a1a1a;
  color: #fff;
  touch-action: manipulation;
  cursor: pointer;
}

.demo-tips-vcb-btn {
  display: block;
  width: 100%;
  font-size: 0.9rem;
}

.demo-tips-vcb-btn small {
  font-weight: 400;
  font-size: 0.75rem;
  opacity: 0.7;
}

#demo-tips-copy-section {
  margin-top: 0.25rem;
}

.cart-fab {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  width: min(460px, calc(100% - 1.5rem));
}

.cart-fab button {
  width: 100%;
  padding: 0.85rem 1.1rem;
  background: #1a1a1a;
  border: none;
  border-radius: 14px;
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-fab button:active {
  transform: scale(0.99);
}

.cart-fab-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-fab .cart-badge {
  background: #e8421a;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
}

#cart-total {
  font-weight: 700;
  font-size: 0.95rem;
}

.toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 20px 44px rgba(17, 24, 39, 0.18);
  z-index: 200;
  max-width: 90%;
}

.toast.success {
  border-color: #2ecc71;
}

.toast.wifi-toast {
  text-align: center;
  padding: 1rem 1.35rem;
  border-radius: 14px;
  min-width: min(300px, calc(100vw - 2rem));
  line-height: 1.4;
}

.wifi-toast-line {
  margin: 0;
}

.wifi-toast-line + .wifi-toast-line {
  margin-top: 0.4rem;
}

.wifi-toast-label {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.wifi-toast-name {
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.wifi-toast-copied {
  font-weight: 600;
  font-size: 0.92rem;
  color: #0e9f6e;
}

.toast .small {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* --- Returning guest: welcome banner --- */
.returning-welcome {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.75rem 0 0.25rem;
  padding: 0.7rem 0.85rem;
  background: var(--accent-soft);
  border: 1px solid rgba(14, 159, 110, 0.22);
  border-radius: 14px;
  color: var(--text);
  font-size: 0.95rem;
}

.returning-welcome-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.returning-welcome-text {
  flex: 1;
  font-weight: 600;
}

.returning-welcome-close {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.3rem;
  line-height: 1;
  padding: 0 0.25rem;
  cursor: pointer;
}

/* --- Returning guest: survey modal --- */
.returning-survey-modal {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.returning-survey-modal:not([hidden]) {
  pointer-events: auto;
}

.returning-survey-modal .sheet-backdrop {
  position: absolute;
  z-index: 0;
}

.returning-survey-sheet {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 0 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 40px rgba(17, 24, 39, 0.2);
}

.returning-survey-sheet h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.returning-survey-sub {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
}

.returning-survey-items {
  margin-bottom: 0.75rem;
}

.survey-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

.survey-name {
  flex: 1;
  font-weight: 600;
  font-size: 0.95rem;
}

.survey-actions {
  display: flex;
  gap: 0.5rem;
}

.survey-face {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.1s ease, background 0.1s ease;
}

.survey-face.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: scale(1.06);
}

.returning-survey-sheet button.btn-primary {
  width: 100%;
  margin-top: 0.75rem;
}

.returning-survey-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.returning-survey-skip-link {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.85rem 1rem 0.35rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-family: inherit;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.returning-survey-sheet button.muted {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.7rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.95rem;
  cursor: pointer;
}

.bill-mode-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.bill-mode-modal:not([hidden]) {
  pointer-events: auto;
}

.bill-mode-modal .sheet-backdrop {
  position: absolute;
  z-index: 0;
}

.bill-mode-sheet {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 0 1rem 1rem;
  box-shadow: 0 -12px 40px rgba(17, 24, 39, 0.2);
}

.bill-mode-sheet h2 {
  margin: 0 0 0.8rem;
  font-size: 1rem;
}

.bill-mode-sheet button {
  display: block;
  width: 100%;
  padding: 0.9rem 1rem;
  margin-top: 0.5rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
}

.bill-mode-sheet button.muted {
  background: transparent;
  color: var(--text-muted);
  font-weight: 400;
}

.bill-mode-sub {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
}

/* ── AI chip (header button + suggestion chips) ── */
.ai-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 44px;
  padding: 0.28rem 0.65rem;
  border-radius: 20px;
  border: none;
  background: var(--color-primary, #2D9E75);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
  touch-action: manipulation;
}
.ai-chip:active { filter: brightness(0.9); }
.ai-chip-icon { font-size: 0.9rem; line-height: 1; }
.ai-chip-label { line-height: 1.2; }

/* suggestion chips inside chat — smaller, outlined */
.ai-chips .ai-chip {
  min-height: 34px;
  padding: 0.2rem 0.7rem;
  font-size: 0.78rem;
  background: transparent;
  color: var(--color-primary, #2D9E75);
  border: 1px solid var(--color-primary, #2D9E75);
}
.ai-chips .ai-chip:active { background: rgba(45,158,117,.1); }

/* ── AI chat overlay ── */
.ai-chat-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0,0,0,0.4);
}
.ai-chat-sheet {
  width: 100%;
  max-width: 480px;
  height: 96dvh;
  display: flex;
  flex-direction: column;
  background: #f4f3ef;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  box-shadow: 0 -4px 32px rgba(0,0,0,0.2);
}
.ai-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #ffffff;
  border-bottom: 0.5px solid #e5e7eb;
  flex-shrink: 0;
}
.ai-chat-header strong {
  display: block;
  font-size: 14px;
  color: #1a1a1a;
  font-weight: 600;
}
.ai-chat-header span {
  display: block;
  font-size: 11px;
  color: #aaa;
}
.ai-chat-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #666;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  margin-left: auto;
  touch-action: manipulation;
}
.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
}
.ai-chat-msg {
  max-width: 85%;
  padding: 0.55rem 0.85rem;
  border-radius: 16px;
  font-size: 0.92rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.ai-chat-msg--user {
  align-self: flex-end;
  background: #2D9E75;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ai-bubble--user {
  background: #2D9E75;
  color: #ffffff;
  border-radius: 16px 16px 3px 16px;
  max-width: 78%;
  padding: 9px 13px;
  font-size: 14px;
  line-height: 1.5;
  display: inline-block;
  align-self: flex-end;
}
.ai-chat-msg--assistant {
  align-self: flex-start;
  background: #f3eeff;
  color: #222;
  border-bottom-left-radius: 4px;
}
.ai-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #ffffff;
  border-top: 0.5px solid #e5e7eb;
  flex-shrink: 0;
}
.ai-input {
  flex: 1;
  resize: none;
  border-radius: 20px;
  border: 1px solid #e0e0e0;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: #f8f8f8;
  color: #1a1a1a;
  min-width: 0;
  line-height: 1.4;
  max-height: 120px;
  overflow-y: auto;
}
.ai-input::placeholder { color: #aaa; }
.ai-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ddd;
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: default;
  transition: background .15s;
}
.ai-send-btn--active {
  background: #2D9E75;
  cursor: pointer;
}

/* ── Bot message row (avatar + body) ── */
.ai-msg-row {
  display: flex;
  gap: 0.45rem;
  align-items: flex-end;
  max-width: 90%;
}
.ai-msg-row--bot { align-self: flex-start; }
.ai-avatar {
  flex-shrink: 0;
  width: 26px;
  text-align: center;
  font-size: 1rem;
  line-height: 1;
  padding-bottom: 2px;
}
.ai-msg-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-width: 100%;
}
.ai-bubble {
  padding: 0.55rem 0.85rem;
  border-radius: 16px;
  font-size: 0.92rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.ai-bubble--bot {
  background: #f0faf5;
  color: #1a2e26;
  border-bottom-left-radius: 4px;
}

/* ── Thinking animation ── */
@keyframes ai-dot {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.35; }
  40% { transform: translateY(-5px); opacity: 1; }
}
.ai-thinking {
  display: flex;
  align-items: center;
  min-height: 2rem;
}
.ai-thinking span {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #aaa;
  margin: 0 2px;
  animation: ai-dot 1.2s infinite ease-in-out;
}
.ai-thinking span:nth-child(2) { animation-delay: 0.2s; }
.ai-thinking span:nth-child(3) { animation-delay: 0.4s; }

/* ── Streaming cursor ── */
@keyframes ai-cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.ai-cursor {
  display: inline-block;
  margin-left: 1px;
  animation: ai-cursor-blink 0.7s step-start infinite;
  color: var(--color-primary, #2D9E75);
}

/* ── Dish recommendation card ── */
.ai-dish-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid #e0ece7;
  border-radius: 10px;
  padding: 0.4rem 0.5rem;
  max-width: 240px;
}
.ai-dish-img {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 6px;
  overflow: hidden;
  background: #f4f4f4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.ai-dish-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ai-dish-info { flex: 1; min-width: 0; }
.ai-dish-name { font-size: 0.82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-dish-price { font-size: 0.76rem; color: #666; }
.ai-dish-add {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: none;
  background: #1a1a1a;
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  touch-action: manipulation;
}
.ai-dish-add:active { opacity: 0.8; }

/* ── Suggestion chips container ── */
.ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem 0.2rem;
  flex-shrink: 0;
}

[hidden] {
  display: none !important;
}
