:root {
  --bg: #f7f4ef;
  --bg-2: #ffffff;
  --card: #ffffff;
  --text: #1f1f1f;
  --muted: #6f6a60;
  --gold: #d4af37;
  --orange: #e07a1f;
  --line: rgba(0, 0, 0, 0.08);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  --radius: 16px;
  --logo-w: 176px;
  --logo-h: 76px;
  --category-min-h: 120px;
  --card-pad: 14px;
  --cart-panel-h: 36vh;
  --qr-panel-h: 55vh;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --fab-bottom: calc(24px + var(--safe-bottom));
  --to-top-bottom: calc(92px + var(--safe-bottom));
  --expand-dur: 280ms;
  --expand-ease: cubic-bezier(0.22, 1, 0.36, 1);

}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  touch-action: pan-y;
  overflow-x: hidden;
  background: var(--bg);
  background-image:
    radial-gradient(1200px 700px at 10% -10%, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 60%),
    radial-gradient(900px 600px at 110% 0%, rgba(0, 0, 0, 0.025), rgba(0, 0, 0, 0) 55%),
    repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.008), rgba(0, 0, 0, 0.008) 1px, transparent 1px, transparent 9px);
  background-attachment: scroll;
}

body {
  margin: 0;
  font-family: "Montserrat", system-ui, -apple-system, sans-serif;
  color: var(--text);
  width: 100%;
}

/* Preloader */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: grid;
  place-items: center;
  z-index: 200;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.preloader.hide {
  opacity: 0;
  visibility: hidden;
}

.preloader-inner {
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.error-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: none;
  place-items: center;
  z-index: 80;
  padding: 24px;
  text-align: center;
}

.error-screen.show {
  display: grid;
}

.error-card {
  max-width: 520px;
  width: 100%;
  background: #ffffff;
  border-radius: 18px;
  padding: 28px 26px;
  box-shadow: var(--shadow);
}

.error-card h1 {
  margin: 0 0 10px;
  font-size: 22px;
}

.error-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.error-note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.error-link {
  color: var(--orange);
  text-decoration: none;
  font-weight: 600;
}

.error-link:hover {
  text-decoration: underline;
}

.preloader-logo {
  width: 56px;
  max-width: 40vw;
  height: 56px;
  border-radius: 16px;
  display: block;
  animation: adminPulse 1.6s ease-in-out infinite;
}

@keyframes adminPulse {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }

  50% {
    transform: scale(1.03);
    filter: brightness(1.08);
  }

  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

a {
  color: inherit;
}

.app {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px 0;
  height: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.35s ease;
  position: relative;
  z-index: 2;
}

body.is-ready .app {
  opacity: 1;

}

.header {
  position: relative;
  padding: calc(48px + var(--safe-top)) 16px 22px;
  margin: 0 -16px 8px;
  background: var(--orange);
  border-radius: 0;
  box-shadow: var(--shadow);
}

.header-strip {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  color: var(--orange);
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-align: center;
  padding: calc(6px + var(--safe-top)) 10px 6px;
  margin: 0;
  height: auto;
  min-height: calc(26px + var(--safe-top));
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-strip-text {
  transition: opacity 0.5s ease-in-out;
}

.header-strip-text.is-fading {
  opacity: 0;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}


.insta-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-right: 16px;
  width: 76px;
  text-align: center;
  align-self: center;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: -21px;
}

.logo-link {
  text-decoration: none;
}

.logo-link:hover,
.logo-link:active,
.logo-link:focus-visible {
  background: transparent;
  outline: none;
}

.logo-img {
  width: var(--logo-w);
  height: var(--logo-h);
  object-fit: contain;
  padding: 4px;
}

.logo-img.is-hidden {
  display: none;
}

.insta-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #e1306c;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  border: none;
  justify-content: center;
}

.insta-link:hover,
.insta-link:active,
.insta-link:focus-visible {
  background: #e1306c;
  outline: none;
}

.insta-link svg {
  width: 24px;
  height: 24px;
  display: block;
}

.insta-caption {
  font-size: 10px;
  color: #e1306c;
  letter-spacing: 0.04em;
  font-weight: 450;
  white-space: nowrap;
  text-align: center;
}

.view {
  display: block;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
  height: 0;
  overflow: hidden;
  will-change: opacity, transform;
}

.view-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  height: auto;
  overflow: visible;
  flex: 1 0 auto;
  padding-bottom: 0;
}

.view-title {
  margin: 12px 4px 14px;
  font-size: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0 -16px;
}

.category-card {
  background: linear-gradient(160deg, #ffffff 0%, #f3efe8 60%);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 10px 16px;
  min-height: var(--category-min-h);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background-position 0.6s ease, background-size 0.3s ease;
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
  background-origin: border-box;
  background-clip: border-box;
}

body[data-theme="rounded"] .category-grid {
  margin: 0;
}

body[data-theme="rounded"] .category-card {
  border-radius: var(--radius);
  padding: 10px 14px;
}

.category-card--no-image {
  background: linear-gradient(to right, var(--orange), color-mix(in srgb, var(--orange) 60%, #000));
  border: none;
  box-shadow: none;
}

.category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category-card:hover,
.category-card:active,
.category-card.is-active {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
  background-size: cover;
  background-position: right 40%;
}

.category-card .name {
  font-weight: 600;
  font-size: 16px;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.category-card .arrow {
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.category-card .arrow svg {
  width: 22px;
  height: 22px;
}

.category-card:hover .arrow,
.category-card:active .arrow,
.category-card.is-active .arrow {
  transform: translateX(4px);
}

.category-card .arrow {
  transition: transform 0.25s ease;
}

.category-card:hover .name,
.category-card:active .name,
.category-card.is-active .name {
  letter-spacing: 0.02em;
}

.category-card .name {
  transition: letter-spacing 0.25s ease;
}


.menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 4px 8px;
}

.menu-title {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 14px;
  color: var(--muted);
}

.btn-outline {
  border: 1px solid var(--gold);
  color: var(--gold);
  background: transparent;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-outline:hover,
.btn-outline:active {
  background: var(--gold);
  color: #1f1f1f;
}

.search-wrap {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: calc(10px + var(--safe-top)) 0 8px;
  background: linear-gradient(180deg, rgba(247, 244, 239, 0.98) 0%, rgba(247, 244, 239, 0.85) 70%, rgba(247, 244, 239, 0) 100%);
  backdrop-filter: blur(10px);
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}

.search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-weight: 200;
  font-size: 14px;
}

.category-bar {
  position: sticky;
  top: calc(64px + var(--safe-top));
  z-index: 15;
  padding-bottom: 8px;
  background: linear-gradient(180deg, rgba(247, 244, 239, 0.98) 0%, rgba(247, 244, 239, 0.85) 70%, rgba(247, 244, 239, 0) 100%);
  backdrop-filter: blur(8px);
}

.categories {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 4px 8px;
  scrollbar-width: none;
}

.categories::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.02);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s ease;
  text-decoration: none;
}

.chip:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.section {
  margin: 14px 0 10px;
}

.section > .card,
.section > .subcat-card,
.section > .menu-list-card,
.section > .option-table-card {
  margin-bottom: 0;
}

.section > * + * {
  margin-top: 14px;
}

#menuRoot {
  transition: opacity 0.25s ease, transform 0.25s ease;
  opacity: 1;
  transform: translateY(0);
}

#menuRoot.is-out {
  opacity: 0;
  transform: translateY(6px);
}

#menuRoot.is-in {
  opacity: 1;
  transform: translateY(0);
}

.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: calc(var(--card-pad) + 16px) var(--card-pad) var(--card-pad);
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  cursor: pointer;
  position: relative;
  transition: border-color var(--expand-dur) var(--expand-ease);
}

.card.is-animating {
  overflow: hidden;
  will-change: height;
}

.card.is-collapsing .expand-indicator,
.card.is-collapsing .card-details,
.card.is-collapsing .order-row {
  transition-duration: var(--expand-dur);
  transition-timing-function: var(--expand-ease);
}

.card.is-collapsing .title,
.card.is-collapsing .price,
.card.is-collapsing .thumb {
  transition: none !important;
}

.card.is-collapsing .card-details,
.card.is-collapsing .order-row {
  transform: none;
  transition-property: opacity;
}

.card-header {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
}

.card-main-left {
  flex: 1;
  min-width: 0;
}

.card .title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
}

.menu-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 20px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}

.menu-tag-icon {
  display: flex;
  align-items: center;
}

.menu-tag-icon svg {
  width: 12px;
  height: 12px;
  stroke: #fff;
  fill: none;
}

.card .subtitle {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.card-main-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.expand-indicator {
  position: absolute;
  top: 15px;
  left: 10px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.35);
  transition: transform var(--expand-dur) var(--expand-ease), color var(--expand-dur) var(--expand-ease);
}

.expand-indicator svg {
  width: 18px;
  height: 18px;
  display: block;
}

.card.expanded .expand-indicator {
  transform: rotate(90deg);
  color: var(--gold);
}

.price {
  color: var(--gold);
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
}

.thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f0ebe2, #ffffff);
  border: 1px solid var(--line);
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: none;
}

.zoom-icon {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #1f1f1f;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.zoom-icon svg {
  width: 12px;
  height: 12px;
  display: block;
}

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

.thumb.placeholder::after {
  content: "GÖRSEL";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  letter-spacing: 0.18em;
  font-size: 9px;
  background: linear-gradient(135deg, #f0ebe2, #ffffff);
}

.card-details {
  width: 100%;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(4px);
  transition: opacity var(--expand-dur) var(--expand-ease), transform var(--expand-dur) var(--expand-ease);
}

.card.expanded .card-details {
  max-height: 120px;
  opacity: 1;
  transform: translateY(0);
}

.card.expanded .subtitle {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}

.order-row {
  width: 100%;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(4px);
  transition: opacity var(--expand-dur) var(--expand-ease), transform var(--expand-dur) var(--expand-ease);
}

.card.expanded .order-row {
  max-height: 80px;
  opacity: 1;
  transform: translateY(0);
}

.card:not(.expanded) .item-note-popup {
  max-height: 0 !important;
  opacity: 0 !important;
  padding: 0 12px !important;
}

.qty-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 6px;
}

.qty-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #ffffff;
  color: #1f1f1f;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.qty-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.qty-input {
  width: 38px;
  border: none;
  outline: none;
  text-align: center;
  font-size: 13px;
  background: transparent;
}

.order-btn {
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #1f1f1f;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  transition: background 0.45s ease, color 0.45s ease, border-color 0.45s ease;
}

.order-btn.order-btn-added {
  background: #2fbf6f;
  border-color: #2fbf6f;
  color: #ffffff;
  transform: none;
  animation: none;
}

.order-btn.order-btn-added::before {
  content: "✓";
  font-weight: 700;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.order-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(0.3);
}

.empty {
  margin: 16px 0 6px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  display: none;
}

.footer {
  position: relative;
  width: auto;
  left: auto;
  right: auto;
  bottom: auto;
  margin: 14px -16px 0;
  padding: 14px 18px calc(14px + var(--safe-bottom));
  background: #f2eee6;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--line);
  z-index: 1;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.footer-text {
  font-size: 12px;
  letter-spacing: 0.04em;
  max-width: 980px;
  margin: 0 auto;
}

.footer-link {
  color: inherit;
  text-decoration: none;
}

.footer-link:hover,
.footer-link:focus-visible {
  text-decoration: underline;
}

.to-top {
  position: fixed;
  right: 16px;
  bottom: var(--to-top-bottom);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--orange);
  background: rgba(255, 255, 255, 0.95);
  color: var(--orange);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: 0.2s ease;
  z-index: 30;
}

.to-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  pointer-events: none;
  z-index: 60;
}

.lightbox.is-mounted {
  display: block;
}

.lightbox.show {
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.25s ease;
  will-change: opacity;
}

.lightbox.show .lightbox-backdrop {
  opacity: 1;
}

.lightbox-content {
  position: relative;
  width: min(520px, 92vw);
  margin: 6vh auto 0;
  background: #ffffff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  display: grid;
  gap: 12px;
  transform: translateY(8px) scale(0.98);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.lightbox.show .lightbox-content {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.lightbox-stage {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f3efe8;
  border-radius: 12px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.lightbox-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lightbox-image {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.lightbox-image.is-changing {
  opacity: 0;
  transform: scale(0.98);
}

.lightbox-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
}

.lightbox-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #ffffff;
  color: #1f1f1f;
  font-size: 20px;
  cursor: pointer;
}

.lightbox-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.lightbox-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #cfc9bd;
}

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

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #1f1f1f;
  background: #ffffff;
  color: #1f1f1f;
  cursor: pointer;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  z-index: 2;
}

/* Cart */
.cart-fab {
  position: fixed;
  right: 16px;
  bottom: var(--fab-bottom);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--gold);
  color: #1f1f1f;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
}

.cart-fab svg {
  width: 24px;
  height: 24px;
  display: block;
}

.cart-fab.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #1f1f1f;
  color: #ffffff;
  font-size: 11px;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.cart-sheet {
  display: none;
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 55;
}

.cart-sheet.is-mounted {
  display: block;
}

.cart-sheet.open {
  pointer-events: auto;
}

.cart-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.cart-sheet.open .cart-backdrop {
  opacity: 1;
}

.cart-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: calc(var(--cart-panel-h) + var(--safe-bottom));
  max-height: calc(100vh - var(--safe-top));
  max-height: calc(100dvh - var(--safe-top));
  background: #ffffff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.18);
  transform: translateY(100%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  gap: 10px;
}

.cart-sheet.open .cart-panel {
  transform: translateY(0);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-title {
  font-weight: 700;
  font-size: 14px;
}

.cart-table {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border: 1px dashed var(--line);
  border-radius: 12px;
}

.cart-table-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-table-label {
  font-size: 12px;
  color: var(--muted);
}

.cart-table-value {
  font-size: 12px;
  font-weight: 700;
  color: #1f1f1f;
}

.cart-table-btn {
  border: 1px solid var(--line);
  background: #ffffff;
  color: #1f1f1f;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}

/* QR */
.qr-sheet {
  display: none;
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 65;
}

.qr-sheet.is-mounted {
  display: block;
}

.qr-sheet.open {
  pointer-events: auto;
}

.qr-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.qr-sheet.open .qr-backdrop {
  opacity: 1;
}

.qr-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--qr-panel-h) + var(--safe-bottom));
  max-height: calc(100vh - var(--safe-top));
  max-height: calc(100dvh - var(--safe-top));
  background: #ffffff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.18);
  transform: translateY(100%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  gap: 10px;
}

.qr-sheet.open .qr-panel {
  transform: translateY(0);
}

.qr-sheet.manual-only .qr-panel {
  height: auto;
  min-height: 0;
  gap: 8px;
  padding-bottom: 10px;
}

.qr-sheet.manual-only .qr-reader {
  display: none;
}

.qr-sheet.manual-only .qr-status {
  display: none;
}

.qr-sheet.manual-only .qr-manual {
  margin-top: auto;
  margin-bottom: 8px;
}

.qr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qr-title {
  font-weight: 700;
  font-size: 14px;
}

.qr-reader {
  flex: 1 1 0;
  min-height: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  position: relative;
}

.qr-reader video {
  object-fit: cover !important;
  width: 100% !important;
  height: 100% !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
}

.qr-reader::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 65%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.35);
  border-radius: 4px;
  background:
    linear-gradient(#fff, #fff) 0 0 / 24px 3px no-repeat,
    linear-gradient(#fff, #fff) 0 0 / 3px 24px no-repeat,
    linear-gradient(#fff, #fff) 100% 0 / 24px 3px no-repeat,
    linear-gradient(#fff, #fff) 100% 0 / 3px 24px no-repeat,
    linear-gradient(#fff, #fff) 0 100% / 24px 3px no-repeat,
    linear-gradient(#fff, #fff) 0 100% / 3px 24px no-repeat,
    linear-gradient(#fff, #fff) 100% 100% / 24px 3px no-repeat,
    linear-gradient(#fff, #fff) 100% 100% / 3px 24px no-repeat;
}

.qr-status {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  transition: opacity 0.3s ease;
  opacity: 1;
}

.qr-status.fade {
  opacity: 0.2;
}

.qr-manual {
  display: none;
  gap: 8px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.qr-manual.show {
  display: grid;
  grid-template-columns: 1fr auto;
  opacity: 1;
  transform: translateY(0);
}

.qr-manual-input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
}

.qr-manual-btn {
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #1f1f1f;
  border-radius: 10px;
  padding: 10px 14px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.cart-close {
  border: 1px solid var(--line);
  background: #ffffff;
  color: #1f1f1f;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.cart-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-item-wrap {
  border-radius: 12px;
  background: transparent;
  width: 100%;
}

.cart-item-swipe {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.cart-item {
  display: grid;
  grid-template-columns: 40px 1fr 70px;
  gap: 8px;
  align-items: center;
  border-bottom: 1px dashed var(--line);
  padding: 8px 0;
  width: 100%;
  background: #ffffff;
  transition: transform 0.2s ease;
  position: relative;
  z-index: 1;
}

.cart-item-wrap.revealed .cart-item {
  transform: translateX(-72px);
}

.cart-item-wrap.revealed .cart-price {
  padding-right: 10px;
}

.cart-qty {
  font-weight: 700;
  font-size: 12px;
  color: #1f1f1f;
}

.cart-name {
  font-size: 12px;
  color: #1f1f1f;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.cart-name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-price {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  text-align: right;
}

.cart-item.swiping {
  transition: none;
}

.cart-delete {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 72px;
  background: #e74c3c;
  color: #ffffff;
  border: none;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  z-index: 0;
  display: none;
  border-radius: 0 10px 10px 0;
}

.cart-item-wrap.revealed .cart-delete {
  display: block;
}

.cart-item-note-toggle {
  background: none;
  border: none;
  color: #999;
  font-size: 10px;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
  text-decoration: underline;
  flex-shrink: 0;
}

.cart-item-note-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 12px;
  font-family: inherit;
  resize: none;
  color: #333;
  background: #fafafa;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.2s ease, padding 0.25s ease;
}

.cart-item-note-input.is-open {
  max-height: 80px;
  opacity: 1;
  padding: 6px 8px;
  margin-bottom: 4px;
}

.cart-item-note-input:focus {
  outline: none;
  border-color: #aaa;
}

/* Note button on item cards, lists, tables */
.item-note-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  padding: 6px 4px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
}

[data-tone="light"] .item-note-btn,
.card .item-note-btn {
  color: rgba(0, 0, 0, 0.4);
}

.item-note-popup {
  padding: 0 12px;
  position: relative;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.25s ease, opacity 0.2s ease, padding 0.25s ease;
}

.item-note-popup.is-open {
  max-height: 120px;
  opacity: 1;
  padding: 6px 12px 10px;
}

.item-note-popup-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  font-family: inherit;
  resize: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

[data-tone="light"] .item-note-popup-input,
.card .item-note-popup-input {
  border-color: rgba(0, 0, 0, 0.15);
  color: #333;
  background: rgba(0, 0, 0, 0.04);
}

.item-note-popup-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

[data-tone="light"] .item-note-popup-input::placeholder,
.card .item-note-popup-input::placeholder {
  color: rgba(0, 0, 0, 0.35);
}

.item-note-popup-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.4);
}

[data-tone="light"] .item-note-popup-input:focus,
.card .item-note-popup-input:focus {
  border-color: rgba(0, 0, 0, 0.3);
}

.cart-footer {
  display: grid;
  gap: 8px;
}

.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.cart-confirm {
  width: 100%;
}

.cart-confirm:disabled,
.cart-confirm.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(0.3);
}

/* Confirm */
.confirm-sheet {
  display: none;
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 70;
}

.confirm-sheet.is-mounted {
  display: block;
}

.confirm-sheet.open {
  pointer-events: auto;
}

.confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.confirm-sheet.open .confirm-backdrop {
  opacity: 1;
}

.confirm-panel {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(16px + var(--safe-bottom));
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  padding: 16px;
  display: grid;
  gap: 10px;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.confirm-sheet.open .confirm-panel {
  transform: translateY(0);
  opacity: 1;
}

.confirm-title {
  font-weight: 700;
  font-size: 14px;
}

.confirm-text {
  font-size: 12px;
  color: #1f1f1f;
}

.confirm-subtext {
  font-size: 12px;
  color: var(--muted);
  display: none;
}

.confirm-warning {
  font-size: 12px;
  color: #c0392b;
  background: #fdecea;
  border: 1px solid #f5c6cb;
  border-radius: 10px;
  padding: 8px 10px;
  display: none;
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.confirm-actions.single {
  grid-template-columns: 1fr;
}

@media (max-width: 360px) {
  :root {
    --logo-w: 160px;
    --logo-h: 70px;
    --category-min-h: 110px;
    --card-pad: 12px;
    --cart-panel-h: 40vh;
    --qr-panel-h: 60vh;
  }

  .price {
    font-size: 14px;
  }

  .cart-item {
    grid-template-columns: 32px 1fr 60px;
  }

  .qr-manual-input,
  .search input {
    font-size: 16px;
  }
}

@media (min-width: 430px) {
  :root {
    --logo-w: 188px;
    --logo-h: 82px;
    --category-min-h: 130px;
    --card-pad: 15px;
    --cart-panel-h: 34vh;
    --qr-panel-h: 50vh;
  }
}

@media (min-width: 768px) {
  .app {
    padding: 18px 22px 0;
  }

  :root {
    --logo-w: 190px;
    --logo-h: 82px;
    --card-pad: 16px;
    --category-min-h: 130px;
    --cart-panel-h: 34vh;
    --qr-panel-h: 50vh;
  }

  .thumb {
    width: 72px;
    height: 72px;
  }

  .card {
    padding: 16px;
  }

  .search input {
    font-size: 15px;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  :root {
    --qr-panel-h: 90vh;
    --cart-panel-h: 80vh;
  }

  .header {
    padding-top: calc(28px + var(--safe-top));
    padding-bottom: 12px;
  }

  .header-strip {
    min-height: calc(22px + var(--safe-top));
    font-size: 10px;
  }

  .lightbox-content {
    margin-top: 2vh;
  }

  .lightbox-stage {
    aspect-ratio: 4 / 3;
  }
}

@supports (-webkit-touch-callout: none) {
  html {
    background-attachment: scroll;
  }
}

/* ─── Demo theme switcher ─── */
.demo-theme-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--bg-2, #fff);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.demo-theme-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted, #888);
  white-space: nowrap;
  flex-shrink: 0;
}

.demo-theme-pills {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.demo-theme-pill {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text, #1f1f1f);
  background: var(--bg, #f7f4ef);
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.demo-theme-pill:hover {
  border-color: var(--orange, #EB776C);
  color: var(--orange, #EB776C);
}

.demo-theme-pill.is-active {
  background: var(--orange, #EB776C);
  color: #fff;
  border-color: var(--orange, #EB776C);
}

/* Push page content up so it's not hidden behind the bar */
body:has(.demo-theme-bar) {
  padding-bottom: 56px;
}

@media (prefers-reduced-motion: reduce) {

  .card,
  .expand-indicator,
  .thumb,
  .card-details,
  .order-row {
    transition-duration: 120ms !important;
    transition-timing-function: linear !important;
  }
}

/* Menu structure v2 */
.order-btn.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.qty-wrap.disabled {
  opacity: 0.55;
}

.subcat-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--card) 94%, #ffffff 6%);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  overflow: hidden;
}

.subcat-header {
  width: 100%;
  border: 0;
  background: transparent;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
}

.subcat-header.has-image {
  grid-template-columns: 52px 1fr auto;
}

.subcat-header.is-cover {
  grid-template-columns: 1fr auto;
  min-height: var(--category-min-h);
  align-items: center;
  border: none;
  border-radius: 12px;
  margin: -1px -1px 0 -1px;
  background-image:
    linear-gradient(180deg, rgba(7, 9, 12, 0.12) 0%, rgba(7, 9, 12, 0.66) 100%),
    var(--subcat-cover-image);
  background-size: cover;
  background-position: left center;
  padding: 10px 14px;
  transition: min-height 350ms cubic-bezier(0.25, 0.46, 0.45, 0.94), border-radius 350ms ease;
}

.subcat-card.expanded .subcat-header.is-cover {
  min-height: 72px;
  border-radius: 12px 12px 0 0;
}

.subcat-thumb {
  width: 52px;
  height: 40px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.subcat-title {
  text-align: left;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.subcat-header.is-cover .subcat-title,
.subcat-header.is-cover .subcat-chevron {
  color: #ffffff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.48);
}

.subcat-header.is-cover .subcat-title {
  font-size: 16px;
}

.subcat-chevron {
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  transition: transform 220ms ease;
}

.subcat-card.expanded .subcat-chevron {
  transform: rotate(90deg);
}

.subcat-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0 12px;
  transition: max-height 380ms cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 300ms ease, padding 380ms ease;
}

.subcat-card.expanded .subcat-body {
  opacity: 1;
  padding: 12px;
}

/* Staggered fade-in for child items */
.subcat-body > * {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 250ms ease, transform 250ms ease;
}

.subcat-card.expanded .subcat-body > * {
  opacity: 1;
  transform: translateY(0);
}

.subcat-card.expanded .subcat-body > *:nth-child(1) { transition-delay: 80ms; }
.subcat-card.expanded .subcat-body > *:nth-child(2) { transition-delay: 140ms; }
.subcat-card.expanded .subcat-body > *:nth-child(3) { transition-delay: 200ms; }
.subcat-card.expanded .subcat-body > *:nth-child(4) { transition-delay: 260ms; }
.subcat-card.expanded .subcat-body > *:nth-child(5) { transition-delay: 320ms; }
.subcat-card.expanded .subcat-body > *:nth-child(n+6) { transition-delay: 360ms; }

.subcat-body > .card,
.subcat-body > .menu-list-card,
.subcat-body > .option-table-card {
  margin-bottom: 0;
}

.subcat-body > * + * {
  margin-top: 12px;
}

.menu-list-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0f1218;
  color: #f7f8fb;
  --surface-text: #f7f8fb;
  --surface-muted: rgba(247, 248, 251, 0.72);
  --surface-line: rgba(255, 255, 255, 0.14);
  margin-bottom: 12px;
  padding: 12px;
  box-shadow: var(--shadow);
}

.menu-list-card[data-tone="light"] {
  --surface-text: #1f1f1f;
  --surface-muted: rgba(31, 31, 31, 0.62);
  --surface-line: rgba(0, 0, 0, 0.15);
  color: var(--surface-text);
}

.menu-list-card[data-tone="dark"] {
  --surface-text: #f7f8fb;
  --surface-muted: rgba(247, 248, 251, 0.72);
  --surface-line: rgba(255, 255, 255, 0.14);
  color: var(--surface-text);
}

.menu-list-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--surface-text);
}

.menu-list-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.menu-list-row-btn {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--surface-line);
  border-radius: 0;
  background: transparent;
  color: var(--surface-text);
  text-align: left;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  padding: 9px 0;
  cursor: pointer;
  transition: color 0.18s ease;
}

.menu-list-row-btn:last-child {
  border-bottom: 0;
}

.menu-list-name {
  color: var(--surface-text);
  transition: color 0.18s ease;
}

.menu-list-row-btn.is-selected {
  background: transparent;
}

.menu-list-row-btn.is-selected .menu-list-name,
.menu-list-row-btn.is-selected .menu-list-price {
  color: var(--gold);
  font-weight: 700;
}

.menu-list-row-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  color: var(--surface-muted);
}

.menu-list-row-btn:focus-visible {
  outline: none;
  color: var(--gold);
}

.menu-list-price {
  font-weight: 700;
  white-space: nowrap;
}

.menu-list-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.menu-list-selection-label {
  font-size: 12px;
  color: var(--surface-muted);
}

.menu-list-add-btn {
  min-width: 132px;
}

.option-table-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  --surface-text: var(--text);
  --surface-muted: var(--muted);
  --surface-line: var(--line);
  margin-bottom: 12px;
  padding: 12px;
  box-shadow: var(--shadow);
}

.option-table-card[data-tone="light"] {
  --surface-text: #1f1f1f;
  --surface-muted: rgba(31, 31, 31, 0.62);
  --surface-line: rgba(0, 0, 0, 0.14);
  color: var(--surface-text);
}

.option-table-card[data-tone="dark"] {
  --surface-text: #f7f8fb;
  --surface-muted: rgba(247, 248, 251, 0.72);
  --surface-line: rgba(255, 255, 255, 0.14);
  color: var(--surface-text);
}

.option-table-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--surface-text);
  margin-bottom: 10px;
}

.option-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 10px;
}

.option-table th,
.option-table td {
  border: 1px solid var(--surface-line);
  padding: 7px 6px;
  text-align: center;
  color: var(--surface-text);
}

.option-table th:first-child,
.option-row-label {
  text-align: left;
  min-width: 110px;
  font-weight: 600;
}

.option-cell-btn {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--surface-text);
  font: inherit;
  padding: 0;
  cursor: pointer;
}

.option-cell-btn:disabled {
  color: var(--surface-muted);
  cursor: not-allowed;
}

.option-table-card .order-btn {
  color: color-mix(in srgb, var(--surface-text) 92%, #111 8%);
}

.option-cell-btn.is-selected {
  color: var(--gold);
  font-weight: 700;
}

.option-table-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.option-selection-label {
  font-size: 12px;
  color: var(--surface-muted);
}

.option-add-btn {
  min-width: 132px;
}

@media (max-width: 680px) {
  .option-table-card {
    overflow-x: auto;
  }

  .option-table {
    min-width: 520px;
  }
}

/* Subcategory jump nav bar */
.subcat-bar {
  position: sticky;
  top: calc(64px + var(--safe-top) + 44px);
  z-index: 14;
  display: flex;
  gap: 8px;
  padding: 6px 16px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: linear-gradient(180deg, rgba(247,244,239,0.96) 0%, rgba(247,244,239,0.8) 80%, rgba(247,244,239,0) 100%);
}
.subcat-bar::-webkit-scrollbar { display: none; }

.subcat-chip {
  flex: 0 0 auto;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.02);
  font-size: 12px;
  font-family: inherit;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: .2s ease;
  white-space: nowrap;
}
.subcat-chip:hover { border-color: var(--gold); color: var(--gold); }
.subcat-chip.is-active {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}

.subcat-card { scroll-margin-top: calc(64px + var(--safe-top) + 44px + 44px); }

/* Language switcher */
.lang-switcher {
  position: relative;
  margin-top: 2px;
}
.lang-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(0,0,0,.04);
  font-size: 11px;
  font-family: inherit;
  font-weight: 600;
  font-style: normal;
  letter-spacing: 0;
  color: inherit;
  cursor: pointer;
  transition: background .2s;
}
.lang-trigger:hover { background: rgba(0,0,0,.08); }
.lang-globe { width: 13px; height: 13px; flex-shrink: 0; opacity: .6; }
.lang-current { white-space: nowrap; }
.lang-chevron {
  width: 11px; height: 11px; flex-shrink: 0; opacity: .45;
  transition: transform .2s;
}
.lang-switcher.is-open .lang-chevron { transform: rotate(180deg); }
.lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  min-width: 148px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 10px;
  padding: 4px;
  box-shadow: 0 6px 20px rgba(0,0,0,.15);
  flex-direction: column;
}
.lang-switcher.is-open .lang-menu { display: flex; }
.lang-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: none;
  border-radius: 7px;
  background: transparent;
  font-size: 13px;
  font-family: inherit;
  color: #333;
  cursor: pointer;
  transition: background .15s;
  text-align: left;
}
.lang-menu-item:hover { background: rgba(0,0,0,.05); }
.lang-menu-item.is-active { color: var(--orange, var(--gold)); font-weight: 600; }
.lang-menu-code {
  font-weight: 700;
  font-size: 10px;
  min-width: 22px;
  opacity: .5;
}
.lang-menu-item.is-active .lang-menu-code { opacity: 1; }
.lang-menu-name { font-weight: 500; }

/* ─── Layout Theme: grid ─── */
body[data-theme="grid"] .category-grid {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
}
body[data-theme="grid"] .category-card {
  min-height: 100px;
  border-radius: var(--radius);
  padding: 10px;
  text-align: center;
  justify-content: flex-end;
  background-position: center center;
}
body[data-theme="grid"] .category-row {
  justify-content: center;
}
body[data-theme="grid"] .category-card .arrow {
  display: none;
}
body[data-theme="grid"] .section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
body[data-theme="grid"] .section > * + * {
  margin-top: 0;
}
body[data-theme="grid"] .card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 6px;
  margin-bottom: 0;
  border-radius: 12px;
  overflow: hidden;
}
body[data-theme="grid"] .card-header {
  display: contents;
}
body[data-theme="grid"] .card-main-left {
  display: contents;
}
body[data-theme="grid"] .card-main-right {
  display: contents;
}
body[data-theme="grid"] .card .title {
  font-size: 12px;
  margin-bottom: 0;
  text-align: center;
  order: 1;
}
body[data-theme="grid"] .card .menu-tag {
  order: 2;
  margin-top: 2px;
  margin-bottom: 0;
}
body[data-theme="grid"] .thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  order: 3;
  margin-top: 4px;
}
body[data-theme="grid"] .card .subtitle {
  font-size: 10px;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  text-align: center;
  order: 4;
  margin-top: 3px;
}
body[data-theme="grid"] .price {
  font-size: 12px;
  order: 5;
  margin-top: 2px;
}
body[data-theme="grid"] .card-details {
  order: 6;
  text-align: center;
}
body[data-theme="grid"] .order-row {
  order: 7;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
body[data-theme="grid"] .item-note-popup {
  order: 8;
}
body[data-theme="grid"] .card.expanded .order-row {
  max-height: none;
}
body[data-theme="grid"] .expand-indicator {
  display: none;
}
body[data-theme="grid"] .section > .subcat-card,
body[data-theme="grid"] .section > .menu-list-card,
body[data-theme="grid"] .section > .option-table-card {
  grid-column: 1 / -1;
}

/* ─── Layout Theme: elegant ─── */
body[data-theme="elegant"] .category-grid {
  gap: 12px;
  margin: 0;
}
body[data-theme="elegant"] .category-card {
  min-height: 140px;
  border-radius: var(--radius);
  justify-content: flex-end;
  box-shadow: none;
  border: 1px solid var(--line);
  background-position: center center;
}
body[data-theme="elegant"] .category-card .name {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.06em;
}
body[data-theme="elegant"] .category-card .arrow {
  display: none;
}
body[data-theme="elegant"] .card {
  padding: 20px;
  box-shadow: none;
  border: 1px solid var(--line);
}
body[data-theme="elegant"] .card .title {
  font-size: 17px;
}
body[data-theme="elegant"] .expand-indicator {
  display: none;
}
body[data-theme="elegant"] .card .subtitle {
  -webkit-line-clamp: unset;
  line-clamp: unset;
}
body[data-theme="elegant"] .card-details {
  max-height: none;
  opacity: 1;
}

/* ─── Layout Theme: magazine ─── */
body[data-theme="magazine"] .category-grid {
  margin: 0;
}
body[data-theme="magazine"] .category-card {
  min-height: 180px;
  border-radius: var(--radius);
}
body[data-theme="magazine"] .thumb {
  width: 96px;
  height: 96px;
  border-radius: var(--radius);
}
body[data-theme="magazine"] .card {
  padding: 16px;
}

/* ─── Layout Theme: compact ─── */
body[data-theme="compact"] .category-grid {
  gap: 0;
  margin: 0;
}
body[data-theme="compact"] .category-card {
  min-height: 52px;
  border-radius: 0;
  background-image: none !important;
  background: var(--card);
  border-left: 3px solid var(--orange);
  box-shadow: none;
}
body[data-theme="compact"] .category-card .name {
  color: var(--text);
  text-shadow: none;
  font-size: 14px;
}
body[data-theme="compact"] .category-card .arrow {
  color: var(--muted);
}
body[data-theme="compact"] .card {
  padding: 8px 10px;
  border-radius: 8px;
  box-shadow: none;
}
body[data-theme="compact"] .card .title {
  font-size: 13px;
}
body[data-theme="compact"] .card .subtitle {
  font-size: 11px;
  -webkit-line-clamp: 1;
  line-clamp: 1;
}
body[data-theme="compact"] .thumb {
  display: none;
}
body[data-theme="compact"] .card-header {
  padding-top: 4px;
}
body[data-theme="compact"] .expand-indicator {
  display: none;
}

/* ─── Layout Theme: list ─── */
body[data-theme="list"] .category-grid {
  gap: 0;
  margin: 0;
}
body[data-theme="list"] .category-card {
  min-height: auto;
  padding: 12px 4px;
  border-radius: 0;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none;
  border: none;
  border-bottom: 1px solid var(--line);
}
body[data-theme="list"] .category-card .name {
  color: var(--text);
  text-shadow: none;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
body[data-theme="list"] .category-card .arrow {
  color: var(--muted);
}
body[data-theme="list"] .card {
  box-shadow: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--card);
}
body[data-theme="list"] .card .title,
body[data-theme="list"] .price {
  font-size: 14px;
}
body[data-theme="list"] .expand-indicator {
  display: none;
}
