:root {
  --bg: #fffaf7;
  --card: rgba(255, 255, 255, 0.88);
  --primary: #f58cad;
  --primary-deep: #e96694;
  --accent: #ffd166;
  --mint: #b8f2e6;
  --text: #503047;
  --subtle: #8e6d82;
  --border: rgba(255, 122, 168, 0.18);
  --shadow: 0 10px 28px rgba(177, 102, 130, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Nunito", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 209, 102, 0.35), transparent 30%),
    radial-gradient(circle at top right, rgba(184, 242, 230, 0.45), transparent 32%),
    linear-gradient(180deg, #fff7f1 0%, #fffdf8 100%);
}

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

.page-shell,
.admin-shell {
  width: min(980px, calc(100% - 28px));
  margin: 0 auto;
  padding: 16px 0 92px;
}

.hero-card,
.order-card,
.panel,
.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero-card {
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -40px -40px auto;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(255, 122, 168, 0.2), transparent 70%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 122, 168, 0.12);
  color: var(--primary-deep);
  font-size: 12px;
  font-weight: 800;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "ZCOOL XiaoWei", serif;
}

.hero-card h1 {
  margin-top: 10px;
  font-size: 28px;
}

.hero-card p {
  margin: 8px 0 0;
  line-height: 1.55;
  color: var(--subtle);
}

.hero-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.hero-meta span,
.dish-badge,
.empty-tip {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.18);
}

.mobile-layout {
  display: grid;
  grid-template-columns: 102px 1fr;
  gap: 12px;
  margin-top: 14px;
}

.category-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-pill {
  border: 0;
  border-radius: 14px;
  padding: 11px 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--subtle);
  box-shadow: 0 5px 14px rgba(177, 102, 130, 0.08);
}

.category-pill.active {
  background: linear-gradient(135deg, var(--primary), #ff9bc0);
  color: #fff;
}

.menu-panel {
  display: grid;
  gap: 10px;
}

.dish-card,
.admin-item {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 12px;
  padding: 11px;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 17px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 7px 20px rgba(177, 102, 130, 0.08);
}

.dish-image,
.admin-item img {
  width: 100%;
  height: 118px;
  object-fit: cover;
  border-radius: 13px;
}

.dish-body p,
.admin-item-body span {
  margin: 6px 0 0;
  color: var(--subtle);
  line-height: 1.6;
}

.dish-topline,
.dish-footer,
.section-title,
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dish-footer {
  margin-top: 10px;
  justify-content: flex-end;
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff3f8;
  border-radius: 999px;
  padding: 4px;
}

.qty-btn,
.submit-btn,
#checkout-btn,
.ghost-btn,
.danger-btn {
  border: 0;
  cursor: pointer;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  color: var(--primary-deep);
  font-size: 18px;
  line-height: 1;
}

.order-card,
.panel {
  padding: 16px;
  margin-top: 14px;
}

.section-title span,
.order-meta,
.admin-item-body small,
#cart-count,
.login-card small {
  color: var(--subtle);
}

.stack-form,
.login-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(255, 122, 168, 0.18);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 12px;
  padding: 11px 13px;
  color: var(--text);
  outline: none;
}

textarea {
  min-height: 94px;
  resize: vertical;
}

.submit-btn,
#checkout-btn,
.ghost-btn,
.danger-btn {
  border-radius: 12px;
  padding: 11px 15px;
  font-weight: 800;
}

.submit-btn,
#checkout-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff;
}

.ghost-btn {
  background: rgba(255, 122, 168, 0.12);
  color: var(--primary-deep);
}

.danger-btn {
  background: rgba(255, 96, 96, 0.14);
  color: #d14545;
}

.cart-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(80, 48, 71, 0.92);
  color: #fff;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 26px rgba(80, 48, 71, 0.18);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(80, 48, 71, 0.9);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s ease;
}

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

.admin-body {
  min-height: 100vh;
}

.login-card {
  width: min(460px, calc(100% - 24px));
  margin: 60px auto;
  padding: 28px;
}

.error-tip {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(255, 96, 96, 0.12);
  color: #d14545;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.product-admin-list {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.admin-item {
  align-items: center;
}

.admin-item-body {
  display: grid;
  gap: 6px;
}

@media (max-width: 768px) {
  .mobile-layout,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .category-panel {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .page-shell,
  .admin-shell {
    width: min(100% - 20px, 560px);
    padding-top: 10px;
    padding-bottom: 78px;
  }

  .hero-card {
    padding: 15px 16px;
    border-radius: 17px;
  }

  .hero-card h1 {
    margin-top: 7px;
    font-size: 23px;
  }

  .hero-card p {
    margin-top: 5px;
    font-size: 13px;
  }

  .hero-meta {
    margin-top: 9px;
    gap: 6px;
  }

  .hero-meta span {
    padding: 4px 8px;
    font-size: 12px;
  }

  .mobile-layout {
    margin-top: 10px;
  }

  .category-panel {
    gap: 6px;
    scrollbar-width: none;
  }

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

  .category-pill {
    flex: 0 0 auto;
    padding: 8px 11px;
    border-radius: 12px;
    font-size: 13px;
    white-space: nowrap;
  }

  .dish-card,
  .admin-item {
    grid-template-columns: 88px 1fr;
    gap: 10px;
    padding: 9px;
  }

  .dish-image,
  .admin-item img {
    height: 88px;
    border-radius: 12px;
  }

  .dish-topline {
    align-items: flex-start;
    gap: 6px;
  }

  .dish-topline h3 {
    font-size: 16px;
    line-height: 1.3;
  }

  .dish-badge {
    flex: 0 0 auto;
    padding: 3px 7px;
    font-size: 11px;
  }

  .dish-body p {
    display: -webkit-box;
    margin-top: 4px;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .dish-footer {
    margin-top: 5px;
  }

  .qty-stepper {
    gap: 6px;
    padding: 3px;
    font-size: 13px;
  }

  .qty-btn {
    width: 24px;
    height: 24px;
    font-size: 16px;
  }

  .cart-bar {
    left: 10px;
    right: 10px;
    bottom: 8px;
    gap: 8px;
    padding: 8px 9px 8px 13px;
    border-radius: 15px;
  }

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

  #cart-count {
    display: block;
    margin-top: 2px;
    font-size: 11px;
  }

  #checkout-btn {
    padding: 9px 14px;
    border-radius: 11px;
    font-size: 13px;
  }
}

/* Couple menu: warm paper, coral ink, and compact bento cards. */
.menu-body {
  --primary: #ef7165;
  --primary-deep: #d9574e;
  --text: #312a27;
  --subtle: #83746e;
  --border: #eadfd4;
  min-height: 100vh;
  font-family: "Noto Sans SC", sans-serif;
  background-color: #f7f1e8;
  background-image: radial-gradient(rgba(98, 72, 59, 0.08) 0.8px, transparent 0.8px);
  background-size: 15px 15px;
}

.menu-body .page-shell {
  width: min(520px, calc(100% - 24px));
  padding: 14px 0 86px;
}

.menu-body .hero-card {
  min-height: 172px;
  padding: 20px 76px 18px 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px 24px 24px 8px;
  background: #fffdf9;
  box-shadow: 5px 6px 0 rgba(111, 80, 64, 0.08);
  backdrop-filter: none;
}

.menu-body .hero-card::after {
  inset: auto -34px -52px auto;
  width: 140px;
  height: 140px;
  border: 22px solid rgba(239, 182, 75, 0.12);
  border-radius: 50%;
  background: none;
}

.menu-body .hero-badge {
  gap: 6px;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--primary-deep);
  font-family: "Nunito", sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.35px;
}

.menu-body .hero-badge span {
  font-size: 12px;
}

.menu-body .hero-card h1 {
  margin-top: 7px;
  color: var(--text);
  font-family: "Ma Shan Zheng", cursive;
  font-size: 34px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 2px;
}

.menu-body .hero-card p {
  margin-top: 7px;
  color: var(--subtle);
  font-size: 12px;
  line-height: 1.6;
}

.hero-stamp {
  position: absolute;
  top: 18px;
  right: 19px;
  z-index: 1;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--primary);
  border-radius: 50%;
  color: var(--primary-deep);
  font-family: "Ma Shan Zheng", cursive;
  font-size: 13px;
  line-height: 1.12;
  text-align: center;
  transform: rotate(8deg);
}

.menu-body .hero-meta {
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.menu-body .hero-meta span {
  padding: 5px 9px;
  border-radius: 6px;
  background: var(--text);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
}

.menu-body .hero-meta strong {
  color: var(--subtle);
  font-size: 11px;
  font-weight: 500;
}

.menu-body .mobile-layout {
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}

.menu-body .category-panel {
  flex-direction: row;
  gap: 6px;
  overflow-x: auto;
  padding: 1px 0 4px;
  scrollbar-width: none;
}

.menu-body .category-panel::-webkit-scrollbar {
  display: none;
}

.menu-body .category-pill {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fffaf3;
  box-shadow: none;
  color: var(--subtle);
  font-size: 12px;
  white-space: nowrap;
}

.menu-body .category-pill.active {
  border-color: var(--text);
  background: var(--text);
  color: #fff;
}

.menu-body .dish-card {
  grid-template-columns: 92px 1fr;
  gap: 11px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 16px 16px 16px 5px;
  background: #fffdf9;
  box-shadow: 3px 4px 0 rgba(111, 80, 64, 0.06);
}

.menu-body .dish-image {
  height: 92px;
  border-radius: 11px 11px 11px 3px;
}

.menu-body .dish-topline {
  align-items: flex-start;
  gap: 6px;
}

.menu-body .dish-topline h3 {
  color: var(--text);
  font-family: "Noto Sans SC", sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.menu-body .dish-badge {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px dashed rgba(217, 87, 78, 0.45);
  border-radius: 5px;
  background: #fff5f1;
  color: var(--primary-deep);
  font-size: 10px;
}

.menu-body .dish-body p {
  display: -webkit-box;
  margin-top: 4px;
  overflow: hidden;
  color: var(--subtle);
  font-size: 11px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.menu-body .dish-footer {
  margin-top: 4px;
}

.menu-body .qty-stepper {
  gap: 6px;
  padding: 3px;
  background: #f7eddd;
  font-size: 12px;
}

.menu-body .qty-btn {
  width: 24px;
  height: 24px;
  background: #fffaf3;
  color: var(--primary-deep);
  font-size: 16px;
}

.menu-body .cart-bar {
  left: 12px;
  right: 12px;
  bottom: 10px;
  width: auto;
  max-width: 496px;
  margin: 0 auto;
  padding: 8px 9px 8px 13px;
  border: 1px solid var(--border);
  border-radius: 15px 15px 15px 5px;
  background: #fffdf9;
  box-shadow: 4px 5px 0 rgba(49, 42, 39, 0.12);
  color: var(--text);
}

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

.menu-body #cart-count {
  display: block;
  margin-top: 2px;
  color: var(--subtle);
  font-size: 10px;
}

.menu-body #checkout-btn {
  padding: 9px 14px;
  border-radius: 10px 10px 10px 3px;
  background: var(--primary);
  font-size: 12px;
  box-shadow: 2px 2px 0 var(--primary-deep);
}

.modal-open {
  overflow: hidden;
}

.passcode-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(49, 42, 39, 0.42);
  backdrop-filter: blur(4px);
}

.passcode-modal[hidden] {
  display: none;
}

.passcode-card {
  width: min(100%, 320px);
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 22px 22px 22px 7px;
  background: #fffdf9;
  box-shadow: 6px 7px 0 rgba(49, 42, 39, 0.16);
}

.passcode-kicker {
  color: var(--primary-deep);
  font-family: "Nunito", sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.passcode-card h2 {
  margin-top: 7px;
  color: var(--text);
  font-family: "Ma Shan Zheng", cursive;
  font-size: 27px;
  font-weight: 400;
}

.passcode-card p {
  margin: 5px 0 16px;
  color: var(--subtle);
  font-size: 12px;
}

.passcode-card input {
  border-color: var(--border);
  border-radius: 11px;
  background: #f7f1e8;
}

.passcode-card input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(239, 113, 101, 0.12);
}

.passcode-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 8px;
  margin-top: 12px;
}

.passcode-actions button {
  border: 0;
  border-radius: 10px 10px 10px 3px;
  padding: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.passcode-actions button:first-child {
  background: #f1e8dd;
  color: var(--subtle);
}

.passcode-actions button:last-child {
  background: var(--primary);
  color: #fff;
  box-shadow: 2px 2px 0 var(--primary-deep);
}

.passcode-actions button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.menu-body .toast {
  z-index: 50;
}
