:root {
  --bg: #f6f3ee;
  --bg-accent: radial-gradient(circle at top left, rgba(190, 148, 112, 0.2), transparent 32%), radial-gradient(circle at top right, rgba(15, 118, 110, 0.14), transparent 28%), linear-gradient(180deg, #fcfaf7 0%, #f6f3ee 52%, #efe9e2 100%);
  --card: rgba(255, 255, 255, 0.92);
  --card-strong: #ffffff;
  --line: #e6ddd3;
  --line-strong: #d6c5b4;
  --text: #1f2937;
  --muted: #6b7280;
  --heading: #111827;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-soft: rgba(15, 118, 110, 0.12);
  --secondary: #8b5e3c;
  --secondary-soft: rgba(139, 94, 60, 0.1);
  --danger: #b91c1c;
  --danger-soft: #fef2f2;
  --warning: #92400e;
  --warning-soft: #fff7ed;
  --success: #166534;
  --success-soft: #f0fdf4;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.06);
  --radius: 22px;
  --radius-sm: 14px;
  --radius-xs: 10px;
}

body.dark-theme {
  --bg: #0b1220;
  --bg-accent: radial-gradient(circle at top left, rgba(59, 130, 246, 0.16), transparent 25%), radial-gradient(circle at top right, rgba(20, 184, 166, 0.16), transparent 28%), linear-gradient(180deg, #0f172a 0%, #101826 55%, #111827 100%);
  --card: rgba(17, 24, 39, 0.92);
  --card-strong: #111827;
  --line: #2b374a;
  --line-strong: #3f4f68;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --heading: #f8fafc;
  --primary-soft: rgba(45, 212, 191, 0.14);
  --secondary-soft: rgba(244, 114, 182, 0.12);
  --danger-soft: rgba(127, 29, 29, 0.35);
  --warning-soft: rgba(120, 53, 15, 0.35);
  --success-soft: rgba(20, 83, 45, 0.35);
  --shadow: 0 16px 40px rgba(2, 6, 23, 0.42);
  --shadow-soft: 0 10px 24px rgba(2, 6, 23, 0.36);
}

* { box-sizing: border-box; }

/* Chrome mobile: remove tap highlight and 300ms delay everywhere */
*, *::before, *::after {
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-x pan-y;
}

button, a, [role="button"], select, label {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

html {
  scroll-behavior: smooth;
  /* Prevent Chrome Android pull-to-refresh on the whole page */
  overscroll-behavior-y: none;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg-accent);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* Chrome Android: allow body scroll normally unless modal is open */
  overscroll-behavior-y: none;
}

/* Lock body scroll when a modal is open (set via JS) */
body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}

h1, h2, h3, h4 {
  color: var(--heading);
  letter-spacing: -0.02em;
}

p {
  margin-top: 0;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}

button, input, select, textarea {
  font: inherit;
}

button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  border-radius: var(--radius-xs);
  padding: 11px 16px;
  font-weight: 600;
  transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset;
}

button:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

button.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-color: transparent;
}

button.primary:hover {
  background: linear-gradient(135deg, #11998e, var(--primary-dark));
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
  box-shadow: none;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: #98a2b3;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: none;
  border-color: rgba(15, 118, 110, 0.55);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(214, 197, 180, 0.7);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar h1 {
  margin: 0;
  font-size: 21px;
}

.topbar p {
  margin: 2px 0 0;
  font-size: 13px;
}

.top-links,
.top-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.top-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  color: var(--heading);
  font-weight: 600;
}

.text-nav {
  gap: 16px;
}

.text-nav a {
  min-height: auto;
  padding: 4px 2px;
  border: 0;
  background: transparent;
  border-radius: 0;
  color: var(--heading);
  font-weight: 600;
  letter-spacing: 0.01em;
  position: relative;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.text-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
  border-radius: 999px;
}

.text-nav a:hover::after,
.text-nav a:focus-visible::after {
  transform: scaleX(1);
}

.profile-trigger,
.login-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 14px;
}

.login-trigger {
  min-width: 96px;
}

.login-trigger.verified {
  color: var(--success);
  background: var(--success-soft);
  border-color: #86efac;
}

.profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  color: var(--heading);
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar.large {
  width: 56px;
  height: 56px;
  font-size: 20px;
}

.connection-banner {
  margin: 0 auto;
  max-width: 1240px;
  padding: 12px 24px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-soft);
}

.connection-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.connection-chip,
.connection-btn {
  min-height: 34px;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
}

.connection-chip {
  background: rgba(255, 255, 255, 0.92);
}

.connection-online {
  color: var(--success);
  background: var(--success-soft);
  border-color: #bbf7d0;
}

.connection-offline,
.connection-api-down {
  color: var(--warning);
  background: #fffbeb;
  border-color: #fde68a;
}

.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.8fr);
  gap: 28px;
  padding: 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -60px -60px auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.15), transparent 68%);
  pointer-events: none;
}

.hero h2 {
  margin: 10px 0 12px;
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1.08;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.table-box,
.cart,
.search-wrap,
.profile-panel,
.request-row,
.order-card,
.menu-card,
.cart-row {
  background: var(--card-strong);
}

.table-box {
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.table-box label,
.form-grid label,
.profile-form label,
.auth-form-grid label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  color: var(--heading);
}

.info-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 22px;
  margin-bottom: 24px;
}

.actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.actions-row > button,
.actions-row > a {
  min-height: 44px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(320px, 1fr);
  gap: 24px;
}

.search-wrap {
  padding: 18px;
  margin-bottom: 18px;
}

.tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.order-filters {
  margin: 8px 0 14px;
}

.tab {
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.92);
}

.tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-color: transparent;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.menu-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.menu-card-media {
  margin: -18px -18px 14px;
  border-radius: 18px 18px 14px 14px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #f8fafc, #ebe3d9);
  position: relative;
}

.menu-card-image,
.menu-admin-thumb,
.menu-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.food-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.menu-card-media .food-label {
  position: absolute;
  top: 10px;
  right: 10px;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.22);
}

.item-order-count {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.22);
  white-space: nowrap;
}

.food-label.veg {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.food-label.nonveg {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.menu-card h4 {
  margin: 0 0 10px;
  font-size: 18px;
}

.menu-card .price {
  font-weight: 800;
  font-size: 17px;
  margin: 14px 0;
  color: var(--heading);
}

.menu-card .tag {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--secondary-soft);
  color: var(--secondary);
  font-weight: 700;
  margin-bottom: 10px;
}

.menu-admin-media {
  margin: 12px 0;
}

.menu-admin-thumb {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  background: #f8fafc;
}

.admin-image-preview {
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.7);
}

.menu-preview-image {
  max-height: 220px;
}

.cart {
  padding: 22px;
  height: fit-content;
  position: sticky;
  top: 104px;
  border-radius: 22px;
  border: 1px solid var(--line);
}

.cart h3 {
  margin: 0 0 16px;
}

.cart-items {
  min-height: 160px;
}

.cart-row,
.request-row,
.order-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-soft);
}

.line-item {
  border: 1px solid rgba(214, 197, 180, 0.6);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: rgba(250, 250, 250, 0.72);
}

.cart-line-top,
.section-head,
.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.section-head {
  margin-bottom: 12px;
}

.section-head h2,
.section-head h3 {
  margin: 0;
}

.qty-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.qty-wrap button {
  min-width: 42px;
  min-height: 42px;
  padding: 6px 12px;
}

.bill-summary {
  border-top: 1px dashed var(--line-strong);
  margin-top: 16px;
  padding-top: 16px;
}

.bill-summary > div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.bill-summary .grand {
  font-size: 20px;
  color: var(--heading);
}

.full {
  width: 100%;
  margin-top: 10px;
}

.auth-status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
}

.auth-status.verified {
  color: var(--success);
  background: var(--success-soft);
  border-color: #86efac;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.section-card {
  padding: 22px;
}

.section-spacing {
  margin-top: 20px;
}

.muted { color: var(--muted); }
.small { font-size: 12px; }
.hidden { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.status.received { background: #dbeafe; color: #1d4ed8; }
.status.accepted { background: #e0f2fe; color: #0369a1; }
.status.preparing { background: #fef3c7; color: var(--warning); }
.status.served, .status.completed { background: #dcfce7; color: var(--success); }
.status.paid { background: #dcfce7; color: var(--success); }
.status.unpaid { background: #fee2e2; color: var(--danger); }
.status.pending { background: #f3f4f6; color: #374151; }
.status.cancelled { background: #fee2e2; color: var(--danger); }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: grid;
  place-items: center;
  padding: 20px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-card {
  width: min(760px, 100%);
  max-height: 84vh;
  overflow: auto;
  padding: 24px;
  border-radius: 24px;
}

.cart-quick-modal {
  z-index: 40;
}

/* Floating cart bar — mobile only */
.floating-cart-bar {
  display: none;
}

/* Hide desktop cart panel on mobile — targeted by ID for maximum specificity */
@media (max-width: 900px) {
  #cartPanel {
    display: none !important;
  }

  .desktop-only {
    display: none !important;
  }

  /* Make layout a plain block on mobile so the hidden cart leaves no gap */
  .layout {
    display: block !important;
  }

  .floating-cart-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    bottom: calc(16px + env(safe-area-inset-bottom));
    left: 16px;
    right: 16px;
    z-index: 30;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border-radius: 18px;
    padding: 14px 18px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.28);
    cursor: pointer;
    gap: 12px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    border: none;
    text-align: left;
  }

  .floating-cart-bar:active {
    transform: scale(0.97);
  }

  .floating-cart-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 15px;
  }

  .floating-cart-icon {
    font-size: 20px;
    line-height: 1;
  }

  .floating-cart-count {
    font-size: 14px;
    font-weight: 700;
    opacity: 0.95;
  }

  .floating-cart-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
  }

  .floating-cart-right strong {
    font-size: 16px;
    color: #fff;
  }

  .floating-cart-cta {
    font-size: 12px;
    opacity: 0.85;
    font-weight: 600;
  }

  /* Give page enough bottom padding so content isn't behind the bar */
  .page {
    padding-bottom: calc(90px + env(safe-area-inset-bottom)) !important;
  }
}

.cart-quick-card {
  width: min(980px, 100%);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-add-blink {
  margin: 0;
  font-weight: 800;
  color: var(--success);
  background: var(--success-soft);
  border: 1px solid #86efac;
  border-radius: 12px;
  padding: 8px 10px;
}

.cart-add-blink.blink {
  animation: cart-blink 0.3s ease 6 alternate;
}

@keyframes cart-blink {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0.3; transform: scale(1.01); }
}

.cart-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-height: 0;
}

.cart-quick-pane {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: var(--card-strong);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.cart-quick-pane h4 {
  margin: 0 0 10px;
}

.cart-quick-scroll {
  overflow-y: auto;
  max-height: min(44vh, 380px);
  padding-right: 4px;
}

.auth-modal-card {
  width: min(500px, 100%);
}

.error-text {
  color: var(--danger);
  margin: 0;
  font-weight: 600;
}

.detail-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.detail-list .muted {
  display: block;
}

.note {
  background: var(--warning-soft);
  border-left: 4px solid #f59e0b;
  padding: 12px 14px;
  margin-top: 12px;
  border-radius: 10px;
}

.profile-drawer {
  position: fixed;
  inset: 0;
  z-index: 30;
}

.profile-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.profile-panel {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: min(430px, 100%);
  border-radius: 0;
  padding: 20px;
  overflow: auto;
  border-left: 1px solid var(--line);
}

.profile-head {
  align-items: flex-start;
  margin-bottom: 16px;
}

.profile-identity {
  display: flex;
  gap: 14px;
  align-items: center;
}

.profile-identity h3 {
  margin: 0 0 4px;
}

.setting-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
  font-weight: 500 !important;
}

.setting-row input {
  width: auto;
}

@media (max-width: 900px) {
  body {
    line-height: 1.5;
  }

  .layout,
  .grid-two,
  .hero,
  .info-strip,
  .topbar,
  .top-right {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .layout {
    gap: 16px;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 24;
    padding: 13px 12px;
    gap: 10px;
  }

  .topbar h1 {
    font-size: 18px;
  }

  .topbar p {
    margin-top: 1px;
    font-size: 12px;
  }

  .page {
    padding: 16px 14px calc(28px + env(safe-area-inset-bottom));
  }

  .hero,
  .info-strip,
  .table-box,
  .search-wrap,
  .cart,
  .modal-card,
  .section-card {
    padding: 18px;
  }

  .hero {
    gap: 18px;
  }

  .table-box {
    min-width: 100%;
  }

  .search-wrap {
    margin-bottom: 14px;
  }

  .menu-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
  }

  .menu-card {
    border-radius: 16px;
  }

  .section-head,
  .cart-line-top,
  .modal-head,
  .info-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .actions-row {
    width: 100%;
  }

  .actions-row > button,
  .actions-row > a {
    flex: 1 1 170px;
  }

  .top-links a,
  .profile-trigger,
  .login-trigger {
    width: 100%;
    justify-content: center;
  }

  .text-nav {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 12px;
  }

  .text-nav a {
    width: auto;
    min-height: 34px;
    padding: 6px 4px;
  }

  button,
  input,
  select,
  textarea {
    min-height: 46px;
  }

  .connection-banner {
    padding: 12px 16px;
    align-items: flex-start;
    flex-direction: column;
    border-radius: 0;
  }

  .connection-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .modal {
    padding: 10px;
  }

  .modal-card {
    max-height: 90vh;
  }

  .cart-quick-card {
    max-height: 92vh;
  }

  .cart-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cart-quick-scroll {
    max-height: min(48vh, 420px);
  }

  .profile-panel {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .menu-card {
    padding: 14px;
  }

  .menu-card-media {
    margin: -14px -14px 10px;
    aspect-ratio: 1 / 1;
  }

  .menu-card h4 {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .menu-card .price {
    margin: 10px 0;
    font-size: 16px;
  }

  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .top-links {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .text-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 14px;
  }

  .top-links a {
    min-height: 44px;
    padding: 10px 12px;
  }

  .top-right {
    gap: 10px;
  }

  .modal {
    padding: 0;
  }

  .modal-card {
    max-height: 100vh;
    border-radius: 0;
  }

  .cart-quick-card {
    padding: 16px;
  }

  .cart-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .cart-quick-pane {
    padding: 10px;
  }

  .cart-quick-pane h4 {
    font-size: 14px;
  }
}

@media (max-width: 380px) {
  .menu-grid {
    grid-template-columns: 1fr;
  }

  .menu-card {
    padding: 16px;
  }

  .menu-card-media {
    margin: -16px -16px 12px;
    aspect-ratio: 16 / 10;
  }
}
