*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: #222;
  background: #141414;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font-family: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, p {
  margin: 0;
}

.phone {
  width: min(430px, 100%);
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  background: #fff;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 48px rgba(0, 0, 0, 0.35);
}

.top {
  flex-shrink: 0;
  background:
    radial-gradient(90% 80% at 0% 0%, rgba(196, 42, 52, 0.55), transparent 58%),
    linear-gradient(180deg, #5a1820 0%, #2c0c12 58%, #16080b 100%);
  color: #fff;
}

.shop {
  display: flex;
  gap: 10px;
  padding: 14px 12px 12px;
  align-items: flex-start;
}

.logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  flex-shrink: 0;
  background: radial-gradient(circle at 38% 32%, #ff4a3e, #e10600 46%, #b00000);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

.logo span {
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  margin-top: 2px;
}

.logo small {
  font-size: 8px;
  line-height: 1.2;
  margin-top: 1px;
  letter-spacing: 0.2px;
}

.meta {
  flex: 1;
  min-width: 0;
}

.name-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.name-line h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.lang {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 12px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  opacity: 0.95;
}

.slogan {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

.sub-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.hours {
  font-size: 12px;
  white-space: nowrap;
}

.pills {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.pill {
  border: 1px solid rgba(255, 255, 255, 0.82);
  background: transparent;
  color: #fff;
  border-radius: 14px;
  height: 26px;
  padding: 0 8px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.pill:active,
.lang:active {
  opacity: 0.7;
}

.tabs {
  display: flex;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}

.tabs button {
  flex: 1;
  height: 44px;
  border: 0;
  background: #fff;
  font-size: 15px;
  color: #888;
  position: relative;
}

.tabs button + button {
  box-shadow: inset 1px 0 0 #eee;
}

.tabs button.on {
  color: #ff2d2d;
  font-weight: 700;
}

.tabs button.on::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: #ff2d2d;
  transform: translateX(-50%);
}

.search-row {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #fff;
  border-bottom: 1px solid #f3f3f3;
}

.search-row input {
  flex: 1;
  height: 34px;
  border: 0;
  background: #f3f3f3;
  border-radius: 17px;
  padding: 0 14px;
  font-size: 16px;
  outline: none;
}

#cancelSearch {
  border: 0;
  background: transparent;
  color: #666;
  font-size: 14px;
  padding: 0 2px;
}

.menu-view {
  flex: 1;
  min-height: 0;
  display: flex;
}

.cats {
  width: 88px;
  flex-shrink: 0;
  overflow-y: auto;
  background: #f5f5f5;
  overscroll-behavior: contain;
}

.cats::-webkit-scrollbar,
.goods::-webkit-scrollbar,
.sheet-b::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.cat {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: #666;
  font-size: 13px;
  line-height: 1.35;
  padding: 16px 12px 12px 6px;
  text-align: center;
  position: relative;
}

.cat.on {
  background: #fff;
  color: #222;
  font-weight: 700;
}

.cbadge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 7px;
  background: #ff2d2d;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  line-height: 14px;
}

.goods {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  background: #fff;
  overscroll-behavior: contain;
}

.gtitle {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 12px;
  background: #fff;
  font-size: 15px;
  font-weight: 700;
}

.item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 10px 12px 12px;
  border-bottom: 1px solid #f3f3f3;
}

.item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 4px;
  background: #f3f3f3;
  flex-shrink: 0;
}

.info {
  flex: 1;
  min-width: 0;
}

.name {
  font-size: 14px;
  line-height: 1.35;
  font-weight: 500;
  word-break: break-word;
}

.desc,
.origin {
  margin-top: 2px;
  color: #999;
  font-size: 12px;
  line-height: 1.4;
}

.origin s {
  text-decoration: line-through;
}

.price {
  margin-top: 4px;
  color: #ff2d2d;
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ops {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  min-width: 28px;
}

.plus,
.minus {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

.plus {
  border: 0;
  background: #f5b400;
  color: #fff;
  font-weight: 700;
}

.plus:active {
  transform: scale(0.92);
}

.plus:disabled {
  opacity: 0.4;
}

.minus {
  border: 1px solid #f5b400;
  background: #fff;
  color: #f5b400;
}

.qty {
  min-width: 22px;
  text-align: center;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.spec {
  border: 0;
  background: #f5b400;
  color: #fff;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 8px;
}

.sold {
  color: #ff2d2d;
  border: 1px solid #ff2d2d;
  border-radius: 2px;
  font-size: 12px;
  line-height: 1.2;
  padding: 3px 6px;
}

mark {
  background: transparent;
  color: #ff2d2d;
  padding: 0;
}

.hint {
  padding: 56px 24px;
  text-align: center;
  color: #999;
  font-size: 14px;
  line-height: 1.7;
}

.order-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.empty-ico {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.empty-title {
  color: #333;
  font-size: 16px;
  font-weight: 600;
}

.empty-tip {
  color: #999;
  font-size: 13px;
  margin-top: 6px;
  padding: 0 36px;
  text-align: center;
}

.cartbar {
  position: relative;
  z-index: 22;
  cursor: pointer;
  flex-shrink: 0;
  height: calc(56px + env(safe-area-inset-bottom));
  padding: 0 14px env(safe-area-inset-bottom);
  background: #2b2b2b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
}

.cart-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-ico {
  position: relative;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #ff2d2d;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.badge.pop {
  animation: pop 0.28s ease;
}

@keyframes pop {
  0% { transform: scale(0.6); }
  60% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

#total {
  font-size: 18px;
  color: #c8c8c8;
  font-variant-numeric: tabular-nums;
}

#total.hot {
  color: #ffb300;
}

#cartRight {
  border: 0;
  font-family: inherit;
}

#cartRight:disabled {
  cursor: default;
}

.min {
  background: transparent;
  color: #8d8d8d;
  font-size: 14px;
  padding: 0;
}

.go {
  background: #f5b400;
  color: #fff;
  border-radius: 16px;
  padding: 7px 16px;
  font-size: 14px;
  font-weight: 700;
}

.mask {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: calc(56px + env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.45);
  z-index: 20;
}

.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(56px + env(safe-area-inset-bottom));
  z-index: 21;
  background: #fff;
  border-radius: 14px 14px 0 0;
  max-height: calc(100% - 56px - env(safe-area-inset-bottom) - 72px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.12);
}

.sheet-h {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid #f2f2f2;
}

.sheet-h h2 {
  flex: 1;
  font-size: 16px;
}

.text-btn {
  border: 0;
  background: transparent;
  color: #888;
  font-size: 13px;
  padding: 0;
}

.sheet-b {
  overflow: auto;
  flex: 1;
  min-height: 72px;
  overscroll-behavior: contain;
}

.sheet-f {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #f2f2f2;
  font-size: 14px;
}

.sheet-sum {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sheet-f b {
  color: #ff2d2d;
  font-size: 18px;
}

.order-btn {
  width: 100%;
  height: 40px;
  border: 0;
  border-radius: 20px;
  background: #f5b400;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.order-btn:disabled {
  opacity: 0.85;
}

.submitting {
  position: absolute;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.62);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.submitting p {
  margin: 0;
}

.spin {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.contact-line {
  padding: 32px 16px 40px;
  text-align: center;
  font-size: 16px;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: calc(68px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(6px);
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.lift,
.toast.lift.show {
  bottom: auto;
  top: 18%;
  transform: translateX(-50%);
}

.fly {
  position: fixed;
  z-index: 50;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f5b400;
  pointer-events: none;
  transition: transform 0.48s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.48s ease;
}

.hidden {
  display: none !important;
}

@media (max-width: 480px) {
  body {
    background: #fff;
  }

  .phone {
    box-shadow: none;
  }
}
