* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #3d342c;
  background: #fff;
  -webkit-tap-highlight-color: transparent;
}

.top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #ffb27a, #ff8a5b);
  color: #fff;
}

.top h1 { margin: 0; font-size: 18px; letter-spacing: 1px; }
.paw { font-size: 20px; }

.main {
  flex: 1;
  display: flex;
  min-height: 0;
}

.slots {
  width: 92px;
  flex: 0 0 92px;
  overflow-y: auto;
  background: #f7f3ee;
}

.slot {
  display: block;
  width: 100%;
  padding: 16px 6px;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  color: #6b6259;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

.slot.active {
  background: #fff;
  border-left-color: #ff7a45;
  color: #e2551f;
  font-weight: 700;
}

.goods {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  background: #fff;
}

.empty { color: #a89e94; font-size: 13px; text-align: center; padding: 24px 8px; }

.card {
  position: relative;
  display: flex;
  gap: 10px;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 14px;
  background: #fffaf6;
  box-shadow: 0 1px 6px rgba(190, 150, 120, 0.18);
}

.thumb {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 12px;
  object-fit: cover;
  background: #f3e7dc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.info { flex: 1; min-width: 0; padding-right: 30px; }
.info h3 { margin: 2px 0 4px; font-size: 15px; }
.desc { margin: 0 0 6px; font-size: 12px; color: #8b8178; line-height: 1.4; }
.meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tag { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: #ffe6d8; color: #d0551f; }
.price { font-size: 12px; color: #b0714b; }

.add {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #ff7a45;
  color: #fff;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid #f0e9e2;
  background: #fff;
}

.bar-cart {
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: #6b6259;
  cursor: pointer;
}

.bar-cart b { color: #e2551f; font-size: 16px; }

.bar-submit {
  flex: 1;
  padding: 13px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffa06a, #ff7a45);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.bar-submit:disabled { opacity: 0.6; }

.panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  max-height: 72dvh;
  overflow-y: auto;
  padding: 14px 14px calc(84px + env(safe-area-inset-bottom));
  border-radius: 18px 18px 0 0;
  background: #fff;
  box-shadow: 0 -8px 24px rgba(120, 90, 70, 0.18);
}

.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }

.link { border: 0; background: transparent; color: #ff7a45; font-family: inherit; font-size: 13px; cursor: pointer; }

.line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #f6f0ea;
}

.line-name { flex: 1; font-size: 14px; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button {
  width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: #ffe6d8; color: #d0551f; font-size: 15px; line-height: 1; cursor: pointer;
}
.stepper b { min-width: 16px; text-align: center; font-size: 14px; }
.del { border: 0; background: transparent; color: #b3a89e; font-family: inherit; font-size: 12px; cursor: pointer; }

.note-label { display: block; margin: 14px 0 6px; font-size: 13px; color: #6b6259; }

textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #eee3d9;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  resize: none;
}

.done {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px;
  text-align: center;
  background: #fffaf6;
}

.done h2 { margin: 0; font-size: 22px; color: #e2551f; }
.done .done-list { font-size: 14px; color: #6b6259; line-height: 1.8; }
.done .link { font-size: 15px; }
/* hidden 属性必须真的隐藏：上面的 display:flex 会覆盖 UA 的 display:none */
.panel[hidden], .done[hidden] { display: none; }

.taboos {
  flex: 0 0 auto;
  padding: 8px 16px;
  background: #fff6ef;
  border-bottom: 1px solid #ffe2d0;
  font-size: 13px;
}

.taboos summary {
  cursor: pointer;
  color: #d0551f;
  font-weight: 700;
  list-style: none;
}

.taboos summary::-webkit-details-marker { display: none; }
.taboos summary::before { content: "▸ "; }
.taboos[open] summary::before { content: "▾ "; }
.taboos #taboosText { margin-top: 8px; color: #6b6259; line-height: 1.7; white-space: pre-wrap; }
