:root {
  --ink: #2d2823;
  --muted: #8d8176;
  --paper: #f7f0e6;
  --paper-deep: #ede1d2;
  --card: #fffaf3;
  --tomato: #e45f45;
  --tomato-dark: #b94835;
  --sage: #6f8c75;
  --line: rgba(45, 40, 35, 0.1);
  --shadow: 0 18px 45px rgba(91, 67, 45, 0.12);
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 4%, rgba(228, 95, 69, 0.12), transparent 24rem),
    linear-gradient(135deg, #fbf5ed 0%, var(--paper) 52%, #f2e7d8 100%);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  max-width: 680px;
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: 128px;
}

.hero {
  position: relative;
  aspect-ratio: auto;
  min-height: 420px;
  overflow: hidden;
  padding: 48px 25px 42px;
  border-radius: 0 0 36px 36px;
  color: #fff9f2;
  background:
    linear-gradient(130deg, rgba(45, 40, 35, 0.35), rgba(45, 40, 35, 0.6)),
    url("./images/hero.jpg") center 38% / cover no-repeat;
}

.hero::after {
  position: absolute;
  right: -50px;
  bottom: -115px;
  width: 290px;
  height: 290px;
  border: 1px solid rgba(255, 249, 242, 0.25);
  border-radius: 50%;
  content: "";
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 360px;
  margin-left: -16px;
}

.eyebrow,
.section-kicker {
  display: block;
  color: var(--tomato);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.hero .eyebrow {
  color: #f3b28e;
  font-size: 13px;
}

.hero h1 {
  margin: 18px 0 8px;
  font-family: "ZCOOL KuaiLe", "Ma Shan Zheng", "Liu Jian Mao Cao", cursive;
  font-size: clamp(36px, 10vw, 64px);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

.hero p {
  margin: 0;
  color: rgba(255, 249, 242, 0.72);
  font-size: 14px;
}

.hero-orb {
  position: absolute;
  top: auto;
  right: 30px;
  bottom: 30px;
  width: 118px;
  height: 118px;
  border: 1px solid rgba(255, 249, 242, 0.35);
  border-radius: 50%;
  background: rgba(255, 249, 242, 0.1);
  transform: rotate(9deg);
}

.hero-heart-svg {
  position: absolute;
  top: 50%;
  right: 50%;
  width: min(108px, 92%);
  height: auto;
  overflow: visible;
  transform: translate(50%, -50%);
  filter: drop-shadow(0 8px 10px rgba(77, 15, 35, 0.24));
}

.heart-bubble {
  transform-box: fill-box;
  transform-origin: center;
  animation: bubble-breathe 2.8s ease-out infinite;
}

.heart-bubble-one {
  animation-delay: 0s;
}

.heart-bubble-two {
  animation-delay: 0.75s;
}

.heart-bubble-three {
  animation-delay: 1.45s;
}

@keyframes bubble-breathe {
  0% {
    opacity: 0;
    transform: translate(0, 10px) scale(0.35);
  }
  18% {
    opacity: 1;
  }
  72% {
    opacity: 0.75;
  }
  100% {
    opacity: 0;
    transform: translate(-25px, -45px) scale(1.35);
  }
}

.content {
  padding: 30px 20px 0;
}

.section-heading,
.drawer-header,
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

h2 {
  margin: 8px 0 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.04em;
}

.text-button {
  padding: 8px 0;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
}

.text-button:hover {
  color: var(--tomato-dark);
}

.category-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin: 25px 0 20px;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tab {
  flex: 0 0 auto;
  padding: 10px 17px;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--muted);
  background: rgba(255, 250, 243, 0.45);
  font-size: 13px;
}

.category-tab.active {
  border-color: var(--ink);
  color: #fff9f2;
  background: var(--ink);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dish-card {
  display: flex;
  height: 100%;
  min-height: 335px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: 0 8px 25px rgba(91, 67, 45, 0.06);
  animation: rise-in 0.45s ease both;
}

.dish-visual {
  position: relative;
  display: grid;
  aspect-ratio: 4 / 3;
  min-height: 0;
  place-items: center;
  overflow: hidden;
}

.dish-visual--portrait {
  aspect-ratio: 3 / 4;
}

.dish-visual::before,
.dish-visual::after {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.dish-visual::before {
  width: 135px;
  height: 135px;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(25px, 28px);
}

.dish-visual::after {
  width: 88px;
  height: 88px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  transform: translate(-58px, -36px);
}

.dish-emoji {
  position: relative;
  z-index: 1;
  font-size: 62px;
  filter: drop-shadow(0 12px 7px rgba(65, 41, 27, 0.16));
}

.dish-photo {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  background: rgba(255, 250, 243, 0.3);
}

.dish-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 13px 14px 14px;
}

.dish-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.dish-name {
  font-size: 15px;
  font-weight: 700;
}

.dish-description {
  min-height: 36px;
  margin: 7px 0 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.dish-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.dish-tag {
  max-width: 75px;
  overflow: hidden;
  color: var(--sage);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.add-button,
.quantity-button {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 50%;
  color: #fff9f2;
  background: var(--tomato);
  font-size: 21px;
  line-height: 1;
}

.add-button:active,
.quantity-button:active,
.primary-button:active,
.cart-bar:active {
  transform: scale(0.97);
}

.cart-bar {
  position: fixed;
  z-index: 10;
  right: max(16px, calc((100vw - 640px) / 2));
  bottom: max(16px, env(safe-area-inset-bottom));
  left: auto;
  display: flex;
  width: min(285px, calc(100vw - 32px));
  min-height: 68px;
  align-items: center;
  gap: 11px;
  padding: 10px 16px;
  border-radius: 22px;
  color: var(--ink);
  background: rgba(255, 250, 243, 0.93);
  box-shadow: var(--shadow);
  backdrop-filter: blur(15px);
  text-align: left;
}

.cart-bar-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: #f3ded1;
  font-size: 21px;
}

.cart-bar-label {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}

.cart-bar-label strong {
  font-size: 13px;
}

.cart-bar-label small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arrow {
  color: var(--tomato);
  font-size: 21px;
}

.drawer-backdrop,
.modal-backdrop {
  position: fixed;
  z-index: 19;
  inset: 0;
  background: rgba(45, 40, 35, 0.38);
  backdrop-filter: blur(3px);
}

.cart-drawer,
.checkout-modal,
.orders-modal {
  position: fixed;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  max-width: 680px;
  margin: 0 auto;
  border-radius: 30px 30px 0 0;
  background: var(--card);
  box-shadow: 0 -20px 60px rgba(45, 40, 35, 0.18);
  transform: translateY(105%);
  transition: transform 0.28s ease;
}

.cart-drawer.open,
.checkout-modal.open,
.orders-modal.open {
  transform: translateY(0);
}

.cart-drawer {
  display: flex;
  max-height: min(680px, 88vh);
  flex-direction: column;
  padding: 14px 20px max(22px, env(safe-area-inset-bottom));
}

.drawer-handle {
  width: 42px;
  height: 4px;
  margin: 0 auto 23px;
  border-radius: 4px;
  background: var(--paper-deep);
}

.icon-button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--muted);
  background: var(--paper);
  font-size: 25px;
  line-height: 1;
}

.cart-items {
  overflow-y: auto;
  padding: 18px 0 12px;
}

.cart-empty,
.orders-empty {
  padding: 38px 12px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.cart-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line-visual {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 15px;
  font-size: 27px;
}

.cart-line-photo {
  width: 100%;
  height: 100%;
  border-radius: 15px;
  object-fit: cover;
}

.cart-line-info {
  min-width: 0;
  flex: 1;
}

.cart-line-info strong,
.cart-line-info small {
  display: block;
}

.cart-line-info strong {
  font-size: 14px;
}

.cart-line-info small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quantity-button {
  width: 25px;
  height: 25px;
  font-size: 17px;
}

.quantity {
  min-width: 15px;
  text-align: center;
  font-size: 13px;
}

.drawer-footer {
  padding-top: 13px;
}

.primary-button {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 16px;
  color: #fff9f2;
  background: var(--tomato);
  box-shadow: 0 10px 22px rgba(228, 95, 69, 0.22);
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.18s ease, background 0.18s ease;
}

.primary-button:hover {
  background: var(--tomato-dark);
}

.checkout-modal,
.orders-modal {
  padding: 23px 20px max(25px, env(safe-area-inset-bottom));
}

.checkout-modal {
  max-height: 92vh;
  overflow-y: auto;
}

.field-label {
  display: block;
  margin: 24px 0 8px;
  font-size: 13px;
  font-weight: 700;
}

.field-label span {
  margin-left: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  color: var(--ink);
  background: #fdf7ef;
  padding: 13px 14px;
  font-size: 14px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--tomato);
  box-shadow: 0 0 0 3px rgba(228, 95, 69, 0.12);
}

.checkout-summary {
  margin: 23px 0 18px;
  padding: 13px 14px;
  border-radius: 14px;
  color: var(--muted);
  background: var(--paper);
  font-size: 12px;
  line-height: 1.7;
}

.checkout-summary strong {
  color: var(--ink);
}

.form-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.success-modal {
  position: fixed;
  z-index: 30;
  top: 50%;
  right: 20px;
  left: 20px;
  max-width: 410px;
  margin: 0 auto;
  padding: 34px 24px 24px;
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: center;
  transform: translateY(-50%);
}

.success-mark {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  place-items: center;
  border-radius: 50%;
  color: #fff9f2;
  background: var(--sage);
  font-size: 31px;
}

.success-modal h2 {
  margin-top: 13px;
}

.success-modal p {
  margin: 12px 0 24px;
  color: var(--muted);
  font-size: 13px;
}

.orders-modal {
  max-height: 80vh;
  overflow-y: auto;
}

.orders-list {
  margin-top: 19px;
}

.order-card {
  margin-bottom: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fdf7ef;
}

.order-card-header,
.order-card-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.order-card-header strong {
  font-size: 13px;
}

.order-card-header span,
.order-card-items,
.order-card-note {
  color: var(--muted);
  font-size: 11px;
}

.order-card-items {
  margin: 10px 0 6px;
  line-height: 1.7;
}

.order-card-note {
  padding-top: 7px;
  border-top: 1px dashed var(--line);
}

.order-card-total {
  margin-top: 10px;
  color: var(--tomato-dark);
  font-size: 14px;
  font-weight: 800;
}

.toast {
  position: fixed;
  z-index: 40;
  bottom: 100px;
  left: 50%;
  padding: 10px 15px;
  border-radius: 100px;
  color: #fff9f2;
  background: var(--ink);
  box-shadow: var(--shadow);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.admin-shell {
  max-width: 680px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 42px 20px 48px;
}

.admin-header {
  padding: 32px 25px;
  border-radius: 28px;
  color: #fff9f2;
  background:
    linear-gradient(130deg, rgba(45, 40, 35, 0.92), rgba(45, 40, 35, 0.7)),
    radial-gradient(circle at 80% 20%, #e88966, #4c4a40 55%, #292722);
}

.admin-header .eyebrow {
  color: #f3b28e;
}

.admin-header h1 {
  margin: 20px 0 8px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 46px;
  font-weight: 400;
  letter-spacing: -0.07em;
}

.admin-header p {
  margin: 0;
  color: rgba(255, 249, 242, 0.7);
  font-size: 13px;
}

.admin-card {
  margin-top: 18px;
  padding: 24px 20px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 24px;
  background: rgba(255, 250, 243, 0.82);
  box-shadow: 0 8px 25px rgba(91, 67, 45, 0.06);
}

.admin-card h2 {
  margin-bottom: 14px;
}

.admin-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.toolbar-actions {
  display: flex;
  gap: 12px;
}

.admin-orders {
  margin-top: 20px;
}

.admin-order {
  position: relative;
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fdf7ef;
}

.admin-order-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-order-top strong {
  display: block;
  font-size: 14px;
}

.admin-order-top small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.admin-order-items {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.admin-note {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 11px;
}

.admin-status {
  display: inline-block;
  margin-top: 13px;
  padding: 5px 9px;
  border-radius: 100px;
  color: var(--sage);
  background: #e3eee1;
  font-size: 10px;
}

[hidden] {
  display: none !important;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 700px) {
  .hero {
    margin-top: 18px;
    border-radius: 36px;
  }

  .cart-bar {
    right: calc((100vw - 640px) / 2);
    width: 285px;
  }
}
