@font-face {
  font-family: "Yuchi Wujin Labuleng";
  src: url("assets/fonts/yuchi-wujin-labuleng.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0F00-0FFF;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --cream: #f3e8d4;
  --cream-dark: #e8dcc8;
  --blue-dark: #0c3d5c;
  --blue-bar: #134a6e;
  --brown-nav: #1a0f0a;
  --green-nav: #5cb85c;
  --red-label: #c41e3a;
  --blue-label: #1a5f8a;
  --font-script: "Pacifico", "Ma Shan Zheng", cursive;
  --font-serif: "Noto Serif SC", "Songti SC", serif;
  --font-tibetan: "Yuchi Wujin Labuleng", sans-serif;
  --tibetan-size-sm: 0.95rem;
  --tibetan-size-md: 1.2rem;
  --tibetan-size-lg: 1.35rem;
  --radius-card: 22px;
  --radius-pill: 999px;
  --app-max: 420px;
  --nav-height: 72px;
  --hero-height: 33.33dvh;
  --menu-olive: #8a7428;
  --menu-black: #000000;
  --menu-gold: #ffd700;
  --menu-price-red: #ff1a1a;
  --menu-add-orange: #ff8c00;
}

html {
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-serif);
  background: #2a2018;
  color: #1a120c;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
}

.app {
  width: 100%;
  max-width: var(--app-max);
  min-height: 100dvh;
  background: var(--cream);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.35);
}

/* Views */
.view {
  display: none;
  flex-direction: column;
  min-height: calc(100dvh - var(--nav-height));
  padding-bottom: 0.5rem;
}

.view--active {
  display: flex;
}

.view--full.view--active {
  min-height: calc(100dvh - var(--nav-height));
}

.app.is-category-page {
  background: #000;
}

.app.is-category-page .view--active#view-category {
  height: calc(100dvh - var(--nav-height));
  min-height: calc(100dvh - var(--nav-height));
  max-height: calc(100dvh - var(--nav-height));
  overflow: hidden;
  background: #000;
}

.app.is-category-page .bottom-nav {
  display: flex;
  background: var(--blue-dark);
  border-radius: 22px 22px 0 0;
  padding-top: 10px;
}

.app.is-category-page .bottom-nav__item {
  color: #d8ecff;
}

.app.is-category-page .bottom-nav__label {
  font-family: var(--font-tibetan);
  font-size: 0.58rem;
  letter-spacing: 0.02em;
}

/* Hero — one-third screen height with crossfade + Ken Burns */
.hero {
  flex-shrink: 0;
}

.hero__carousel {
  position: relative;
  height: var(--hero-height);
  min-height: 220px;
  overflow: hidden;
}

.hero__slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.9s;
  z-index: 0;
}

.hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.hero__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(12, 30, 45, 0.05) 0%,
    rgba(12, 30, 45, 0.35) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.hero__slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1);
  will-change: transform;
}

.hero__slide.is-active .hero__slide-bg {
  animation: heroKenBurns 7s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

@keyframes heroKenBurns {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.14);
  }
}

.hero__bar {
  position: absolute;
  left: 0;
  right: 38%;
  bottom: 0;
  height: 48px;
  background: var(--blue-bar);
  border-radius: 0 20px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px 0 14px;
  z-index: 4;
  animation: heroBarIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.hero__bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.table-badge {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin: 0;
  padding: 0;
  background: transparent;
  color: var(--blue-dark);
  border-radius: 0;
  font-size: 0.88rem;
  box-shadow: none;
}

.table-badge__cn {
  font-family: var(--font-serif);
  font-weight: 600;
}

.table-badge__tb {
  font-family: "Yuchi Wujin Labuleng", sans-serif;
  font-size: 0.95rem;
  opacity: 1;
}

.hero__datetime {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: rgba(255, 255, 255, 0.95);
  text-align: right;
  line-height: 1.2;
  margin-left: auto;
  flex-shrink: 1;
  min-width: 0;
  padding-left: 6px;
}

.hero__datetime-date {
  display: block;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0.9;
  white-space: nowrap;
}

.hero__datetime-time {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

@keyframes heroBarIn {
  from {
    opacity: 0;
    transform: translateX(-16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero__wheel {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  animation: heroWheelSpin 18s linear infinite;
}

@keyframes heroWheelSpin {
  to {
    transform: rotate(360deg);
  }
}

.hero__wheel svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 6px rgba(212, 160, 23, 0.45));
}

.hero__dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.hero__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 0;
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    background 0.35s ease;
}

.hero__dot.is-active {
  width: 26px;
  background: #fff;
}

.hero__menu-label {
  position: absolute;
  right: 0;
  bottom: 0;
  background: var(--cream);
  padding: 14px 22px 12px 26px;
  border-radius: 20px 0 0 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  line-height: 1;
  animation: heroMenuIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
  box-shadow: -4px -4px 20px rgba(26, 18, 12, 0.08);
}

.hero__menu-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

#table-badge-anchor {
  margin-top: 4px;
}

@keyframes heroMenuIn {
  from {
    opacity: 0;
    transform: translate(12px, 12px);
  }
  to {
    opacity: 1;
    transform: translate(0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__slide,
  .hero__slide-bg,
  .hero__bar,
  .hero__menu-label,
  .hero__wheel {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  .hero__dot {
    transition: none;
  }
}

.hero__menu-cn {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
}

.hero__menu-en {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* Home main */
.home-main {
  flex: 1;
  padding: 16px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Category cards */
.category-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Row 1: categories 1–2 (half width each). Row 2: 3–5 in one line */
.category-cards--five {
  grid-template-columns: repeat(6, 1fr);
}

.category-cards--five .category-card:nth-child(1) {
  grid-column: 1 / 4;
}

.category-cards--five .category-card:nth-child(2) {
  grid-column: 4 / 7;
}

.category-cards--five .category-card:nth-child(3) {
  grid-column: 1 / 3;
}

.category-cards--five .category-card:nth-child(4) {
  grid-column: 3 / 5;
}

.category-cards--five .category-card:nth-child(5) {
  grid-column: 5 / 7;
}

.category-cards--five .category-card:nth-child(n + 3) .category-card__art {
  height: 100px;
}

.category-cards--five .category-card:nth-child(n + 3) .label-tibetan {
  font-size: var(--tibetan-size-sm);
}

.category-cards--five .category-card:nth-child(n + 3) .label-cn {
  font-size: 0.85rem;
}

.category-cards--five .category-card:nth-child(n + 3) .category-card__label {
  padding: 8px 4px 10px;
}

.category-card {
  position: relative;
  border: none;
  background: var(--cream-dark);
  border-radius: var(--radius-card);
  padding: 0;
  cursor: pointer;
  text-align: center;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease;
}

.category-card:active {
  transform: scale(0.97);
}

.category-card--tap {
  transform: scale(0.92);
  box-shadow: 0 0 0 3px var(--blue-dark), 0 12px 28px rgba(12, 61, 92, 0.22);
}

.category-card--tap .category-card__img {
  animation: categoryIconPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.category-card--tap .label-cn {
  animation: categoryLabelPulse 0.45s ease;
}

@keyframes categoryIconPop {
  0% {
    transform: scale(1) translateY(0);
  }
  35% {
    transform: scale(1.1) translateY(-4px);
  }
  70% {
    transform: scale(0.98) translateY(0);
  }
  100% {
    transform: scale(1) translateY(0);
  }
}

@keyframes categoryLabelPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}

.category-card__ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(12, 61, 92, 0.28);
  transform: scale(0);
  pointer-events: none;
  z-index: 2;
  animation: categoryRipple 0.55s ease-out forwards;
}

@keyframes categoryRipple {
  to {
    transform: scale(3.5);
    opacity: 0;
  }
}

.category-card__art {
  height: 130px;
  margin: 8px 8px 0;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff8ee 0%, #e6d5bc 100%);
  position: relative;
  overflow: hidden;
}

.category-card__art--image {
  background: linear-gradient(180deg, #fff8ee 0%, #e6d5bc 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.category-card__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  display: block;
  transform-origin: center bottom;
}

/* Tibetan couple illustration (CSS art) — fallback if no icon image */
.category-card__art--tibetan::before,
.category-card__art--tibetan::after {
  content: "";
  position: absolute;
  bottom: 28px;
  width: 36px;
  height: 52px;
  border-radius: 18px 18px 8px 8px;
  background: #5c3d2e;
}

.category-card__art--tibetan::before {
  left: 28%;
  background: linear-gradient(180deg, #8b4513 0%, #5c3d2e 40%, #c41e3a 40%, #8b0000 100%);
}

.category-card__art--tibetan::after {
  right: 28%;
  background: linear-gradient(180deg, #d4a574 0%, #8b6914 35%, #2e5c8a 35%, #1a3d5c 100%);
}

.category-card__art--tibetan {
  background-image:
    radial-gradient(ellipse 40px 12px at 50% 78%, #c9a66b 0%, transparent 70%),
    linear-gradient(180deg, #fff8ee 0%, #e6d5bc 100%);
}

/* Chinese diner illustration */
.category-card__art--chinese::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 24px;
  width: 44px;
  height: 58px;
  border-radius: 22px 22px 10px 10px;
  background: linear-gradient(180deg, #f5c6a0 0%, #e8a87c 25%, #c41e3a 25%, #8b0000 70%, #2e5c8a 70%);
}

.category-card__art--chinese::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 8px;
  width: 56px;
  height: 20px;
  border-radius: 8px;
  background: #d4a574;
  box-shadow: 0 -8px 0 0 #8b6914;
}

/* Specialty dishes */
.category-card__art--specialty::before {
  content: "★";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -55%);
  font-size: 2.5rem;
  color: #d4a017;
  text-shadow: 0 2px 8px rgba(196, 92, 38, 0.4);
}

.category-card__art--specialty::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  width: 70px;
  height: 24px;
  border-radius: 12px;
  background: linear-gradient(90deg, #c41e3a, #d4a017, #1a5f8a);
}

/* Tea */
.category-card__art--tea::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  width: 50px;
  height: 40px;
  border-radius: 4px 4px 12px 12px;
  background: #8b6914;
  border: 3px solid #c9a66b;
}

.category-card__art--tea::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 28px;
  transform: translateX(-50%);
  width: 8px;
  height: 28px;
  border-radius: 4px;
  background: #5c3d2e;
  box-shadow: 12px 4px 0 #5c3d2e, -12px 4px 0 #5c3d2e;
}

/* Fast food */
.category-card__art--fastfood::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  width: 52px;
  height: 32px;
  border-radius: 8px;
  background: #f5c542;
  box-shadow: 0 -14px 0 -2px #c45c26;
}

.category-card__art--fastfood::after {
  content: "";
  position: absolute;
  right: 28%;
  bottom: 38px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #c41e3a;
}

.category-card__label {
  padding: 10px 6px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.label-tibetan,
.menu-detail-item__tibetan {
  font-family: "Yuchi Wujin Labuleng", sans-serif;
  font-size: var(--tibetan-size-md);
  color: var(--blue-label);
  font-weight: normal;
  line-height: 1.35;
}

.label-cn {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--red-label);
  font-weight: 600;
}

/* Featured dishes */
.featured__scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

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

.dish-card {
  flex: 0 0 108px;
  scroll-snap-align: start;
  border: none;
  background: var(--cream-dark);
  border-radius: 18px;
  padding: 8px 8px 10px;
  cursor: pointer;
  text-align: center;
  transition: transform 0.15s;
}

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

.dish-card.is-selected {
  box-shadow: 0 0 0 2px var(--blue-dark);
}

.dish-card__bowl {
  width: 88px;
  height: 88px;
  margin: 0 auto;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff9f0 0%, #e8dcc8 100%);
  position: relative;
  overflow: hidden;
}

.dish-card__bowl::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  width: 64px;
  height: 36px;
  border-radius: 0 0 32px 32px;
  background: linear-gradient(180deg, #8b4513 0%, #5c3d2e 100%);
  border: 3px solid #c9a66b;
  border-top: none;
}

.dish-card__bowl::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 22px;
  transform: translateX(-50%);
  width: 52px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(ellipse, #c45c26 0%, #8b4513 60%, #4a7c3f 100%);
}

.dish-card__label {
  margin-top: 8px;
  font-size: 0.65rem;
  line-height: 1.3;
}

.dish-card__label .label-tibetan {
  display: block;
  font-size: var(--tibetan-size-sm);
}

.dish-card__label .label-cn {
  display: block;
  font-size: 0.75rem;
}

/* Bottom row — wide Tashi bar + compact takeaway card */
.action-row {
  margin-top: auto;
  padding-top: 8px;
}

.action-row--duo {
  --action-bar-height: 52px;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: flex-start;
}

.action-row__tashi {
  flex: 1;
  min-width: 0;
  max-width: calc(100% - 128px);
}

.btn-pill--bar {
  width: 100%;
  height: var(--action-bar-height);
  font-size: clamp(0.95rem, 4.2vw, 1.15rem);
  padding: 0 22px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-pill--bar-names {
  font-family: inherit;
  white-space: normal;
  padding: 5px 12px;
  line-height: 1.15;
}

.btn-pill__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.btn-pill--bar-names .label-tibetan {
  font-family: "Yuchi Wujin Labuleng", sans-serif;
  font-size: clamp(0.62rem, 2.8vw, 0.78rem);
  color: #fff;
  font-weight: normal;
  line-height: 1.15;
}

.btn-pill--bar-names .label-cn {
  font-family: var(--font-serif);
  font-size: clamp(0.68rem, 3vw, 0.82rem);
  color: #fff;
  font-weight: 600;
  line-height: 1.1;
}

.modal__title-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.modal__title-stack .label-tibetan {
  font-family: "Yuchi Wujin Labuleng", sans-serif;
  font-size: 1.2rem;
  color: var(--blue-label);
  font-weight: normal;
}

.modal__title-stack .label-cn {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--red-label);
}

.takeaway-card--compact {
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
  width: 120px;
  height: var(--action-bar-height);
  border: none;
  background: linear-gradient(145deg, #fffaf3 0%, #efe3cf 48%, #e5d6bc 100%);
  border-radius: 18px;
  padding: 5px 10px 5px 5px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease;
  box-shadow:
    0 4px 16px rgba(12, 61, 92, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 0 0 1px rgba(12, 61, 92, 0.08);
}

.takeaway-card--compact::after {
  content: "";
  position: absolute;
  right: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 4px 0 0 4px;
  background: linear-gradient(180deg, var(--red-label) 0%, #e85d04 100%);
  opacity: 0.85;
}

.takeaway-card__shine {
  position: absolute;
  top: 0;
  left: 8px;
  right: 8px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.95),
    transparent
  );
  pointer-events: none;
  z-index: 1;
}

.takeaway-card--compact:active {
  transform: scale(0.97);
}

.takeaway-card--compact.category-card--tap {
  transform: scale(0.92);
  box-shadow:
    0 0 0 2px var(--blue-dark),
    0 8px 22px rgba(12, 61, 92, 0.22);
}

.takeaway-card--compact.category-card--tap .takeaway-card__icon {
  animation: categoryIconPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.takeaway-card__icon-wrap {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f5ebe0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 2px 8px rgba(26, 18, 12, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.takeaway-card__icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  transform-origin: center bottom;
}

.takeaway-card__text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  line-height: 1.2;
  min-width: 0;
  padding-right: 4px;
}

.takeaway-card__text .label-tibetan {
  font-size: 0.8rem;
  font-weight: normal;
  letter-spacing: 0.02em;
  line-height: 1.25;
}

.takeaway-card__text .label-cn {
  font-size: 0.82rem;
  font-weight: 700;
  margin-top: 1px;
}

.btn-pill {
  font-family: var(--font-script);
  font-size: 1.05rem;
  color: #fff;
  background: var(--blue-dark);
  border: none;
  border-radius: var(--radius-pill);
  padding: 14px 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s, transform 0.15s;
}

.btn-pill:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.btn-pill--full {
  width: 100%;
  margin-top: 16px;
}

/* Category page enter / exit */
#view-category.view--enter {
  animation: categoryPageIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

#view-category.view--exit {
  animation: categoryPageOut 0.32s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes categoryPageIn {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes categoryPageOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(24px);
  }
}

#view-category.view--enter .category-header {
  animation: categoryHeaderIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

@keyframes categoryHeaderIn {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.menu-detail-item--animate {
  animation: menuItemIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--item-index, 0) * 0.07s);
}

@keyframes menuItemIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .category-card--tap .category-card__img,
  .category-card--tap .label-cn,
  .category-card__ripple,
  #view-category.view--enter,
  #view-category.view--exit,
  #view-category.view--enter .category-header,
  .menu-detail-item--animate {
    animation: none !important;
  }

  .category-card--tap {
    transform: scale(0.97);
  }
}

/* Category menu page — dark detail design */
.category-header {
  background: var(--menu-olive);
  color: #fff;
  padding: 10px 12px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  border-radius: 0 0 18px 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.category-header__back {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.category-header__back svg {
  width: 36px;
  height: 36px;
}

.category-header__titles {
  flex: 1;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  padding-right: 44px;
  flex-wrap: wrap;
}

.category-header__tibetan {
  font-family: "Yuchi Wujin Labuleng", sans-serif;
  font-size: 1.25rem;
  color: #fff;
  line-height: 1.15;
  font-weight: normal;
}

.category-header__cn {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: #fff;
  font-weight: 600;
}

.category-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
  background: var(--menu-black);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  scroll-behavior: smooth;
}

.menu-detail-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
}

.menu-detail-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 24px;
  min-height: 116px;
  background: var(--menu-black);
  border-bottom: 1px solid #2e2e2e;
  position: relative;
  flex-shrink: 0;
}

.menu-detail-item--reverse {
  flex-direction: row-reverse;
}

.menu-detail-item__photo {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: #1a1a1a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.menu-detail-item:not(.menu-detail-item--reverse) .menu-detail-item__photo {
  margin-left: 12px;
}

.menu-detail-item--reverse .menu-detail-item__photo {
  margin-right: 12px;
}

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

.menu-detail-item__info {
  flex: 1;
  min-width: 0;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  position: relative;
  padding-bottom: 30px;
}

.menu-detail-item:not(.menu-detail-item--reverse) .menu-detail-item__info {
  padding-left: 8px;
  padding-right: 14px;
}

.menu-detail-item--reverse .menu-detail-item__info {
  padding-right: 8px;
  padding-left: 14px;
}

.menu-detail-item__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
  text-align: left;
  padding-top: 0;
}

.menu-detail-item--reverse .menu-detail-item__text {
  align-items: flex-end;
  text-align: right;
}

.menu-detail-item__tibetan {
  font-family: "Yuchi Wujin Labuleng", sans-serif;
  font-size: 0.92rem;
  color: #fff;
  line-height: 1.2;
  font-weight: normal;
  margin: 0 0 7px;
}

.menu-detail-item__cn {
  font-family: var(--font-serif);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--menu-gold);
  line-height: 1.15;
  margin: 0;
}

.menu-detail-item__desc {
  font-family: var(--font-serif);
  font-size: 0.72rem;
  font-weight: 400;
  color: #9e9e9e;
  line-height: 1.35;
  margin: 2px 0 0;
  max-width: 190px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.menu-detail-item--reverse .menu-detail-item__desc {
  text-align: right;
}

.menu-detail-item__price {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--menu-price-red);
  line-height: 1.1;
  margin: 4px 0 0;
}

.menu-detail-item__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  position: absolute;
  bottom: 0;
  right: 0;
}

.menu-detail-item--reverse .menu-detail-item__actions {
  right: auto;
  left: 0;
}

.menu-detail-item__qty {
  min-width: 1rem;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.menu-detail-item__qty[hidden],
.menu-detail-item__remove[hidden] {
  display: none;
}

.menu-detail-item__add,
.menu-detail-item__remove {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.menu-detail-item__add {
  background: var(--menu-add-orange);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 140, 0, 0.45);
  padding-bottom: 1px;
}

.menu-detail-item__remove {
  background: #2a2a2a;
  color: var(--menu-add-orange);
  border: 1.5px solid var(--menu-add-orange);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  font-size: 1.15rem;
  padding-bottom: 1px;
}

.menu-detail-item__add:active,
.menu-detail-item__remove:active {
  transform: scale(0.92);
}

.menu-detail-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #888;
  font-size: 0.95rem;
}

/* Sub views */
.sub-header {
  background: var(--blue-bar);
  color: #fff;
  padding: 20px 18px;
  text-align: center;
}

.sub-header h1 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  letter-spacing: 0.15em;
}

.sub-header__sub {
  font-size: 0.85rem;
  opacity: 0.85;
  margin-top: 4px;
}

.sub-header--stacked .sub-header__tibetan {
  font-family: "Yuchi Wujin Labuleng", sans-serif;
  font-size: 1.35rem;
  line-height: 1.25;
  font-weight: normal;
  margin-bottom: 4px;
}

.sub-header--stacked .sub-header__cn {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin: 0;
}

.order-main,
.me-main {
  flex: 1;
  padding: 18px 14px;
}

.order-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.order-item__labels {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.order-item__tibetan {
  font-family: "Yuchi Wujin Labuleng", sans-serif;
  font-size: 0.95rem;
  line-height: 1.25;
  color: var(--blue-label);
  font-weight: normal;
  margin: 0;
}

.order-item__cn {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-weight: 600;
  color: #1a120c;
  line-height: 1.2;
  margin: 0;
}

.order-item__price {
  font-weight: 600;
  color: var(--red-label);
}

.order-item__remove {
  border: none;
  background: transparent;
  color: var(--red-label);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
}

.order-empty {
  text-align: center;
  color: #6b5d4d;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.order-empty__tibetan {
  font-family: "Yuchi Wujin Labuleng", sans-serif;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--blue-label);
}

.order-empty__cn {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  color: #6b5d4d;
}

.order-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding: 14px 16px;
  background: var(--cream-dark);
  border-radius: 14px;
  font-size: 1.1rem;
}

.order-total__labels {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.order-total__tibetan {
  font-family: "Yuchi Wujin Labuleng", sans-serif;
  font-size: 1rem;
  line-height: 1.2;
  color: var(--blue-label);
}

.order-total__cn {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a120c;
}

.order-total strong {
  color: var(--red-label);
  font-size: 1.25rem;
}

.me-card {
  background: var(--cream-dark);
  border-radius: var(--radius-card);
  padding: 18px 16px;
}

.me-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 1.25rem;
}

.me-card--hero {
  background: linear-gradient(145deg, #f7eddc 0%, #e9dbc2 100%);
  border: 1px solid rgba(12, 61, 92, 0.1);
}

#view-me .sub-header--stacked .sub-header__tibetan {
  line-height: 1.75;
}

.me-hero__tb {
  font-family: "Yuchi Wujin Labuleng", sans-serif;
  color: var(--blue-label);
  font-size: 0.9rem;
  line-height: 2;
  margin: 0 0 6px;
}

.me-hero__cn {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--blue-dark);
  margin: 0;
}

.me-card--info {
  display: grid;
  gap: 8px;
}

.me-info-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(12, 61, 92, 0.18);
}

.me-info-row:last-child {
  border-bottom: none;
}

.me-info-row__label {
  font-family:
    "Noto Sans Tibetan",
    "Kailasa",
    "Microsoft Himalaya",
    "Jomolhari",
    var(--font-serif);
  font-weight: 600;
  color: var(--blue-label);
  font-size: 0.94rem;
}

.me-info-row__value {
  font-family:
    "Noto Sans Tibetan",
    "Kailasa",
    "Microsoft Himalaya",
    "Jomolhari",
    var(--font-serif);
  color: #4a3f32;
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.45;
  word-break: break-word;
}

.me-footer {
  margin-top: 4px;
  padding: 10px 4px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.me-footer__line {
  font-family: var(--font-serif);
  font-size: 0.72rem;
  color: #7a6d5d;
  text-decoration: none;
  line-height: 1.4;
}

.me-footer__line--police {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.88rem;
}

.me-footer__credit {
  font-family: "Yuchi Wujin Labuleng", sans-serif;
  font-size: 0.78rem;
  line-height: 1.85;
  color: #7a6d5d;
  margin: 4px 0 0;
  padding: 0 8px;
}

.me-footer__logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.me-footer__line:hover {
  color: var(--blue-label);
}

/* Modal */
.modal {
  border: none;
  border-radius: 20px;
  padding: 0;
  max-width: calc(var(--app-max) - 32px);
  width: calc(100% - 32px);
  background: var(--cream);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.modal__content {
  padding: 24px 20px 20px;
}

.modal__content--info h2 {
  font-family: var(--font-script);
  color: var(--blue-dark);
  margin-bottom: 12px;
}

.modal__content--info p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #4a3f32;
}

.modal__dish-name {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.modal__dish-desc {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  color: #6b5d4d;
  margin-bottom: 12px;
  line-height: 1.5;
}

.modal__dish-price {
  font-size: 1.2rem;
  color: var(--red-label);
  font-weight: 600;
  margin-bottom: 14px;
}

.modal__add {
  width: 100%;
}

.modal__close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: none;
  background: transparent;
  font-size: 1.75rem;
  line-height: 1;
  color: #6b5d4d;
  cursor: pointer;
}

/* Bottom nav */
.bottom-nav {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--blue-dark);
  border-radius: 14px 14px 0 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 0 12px;
  z-index: 100;
}

.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: #d8ecff;
  cursor: pointer;
  font-family: system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  opacity: 0.65;
  transition: opacity 0.15s;
}

.bottom-nav__item.is-active {
  opacity: 1;
  color: #ffffff;
}

.bottom-nav__icon {
  width: 26px;
  height: 26px;
}

@media (min-width: 421px) {
  body {
    padding: 12px 0;
  }

  .app {
    min-height: calc(100dvh - 24px);
    border-radius: 24px;
    overflow: hidden;
  }
}
