:root {
  --red: #e54d42;
  --red-dark: #c0362c;
  --orange: #ff8a3d;
  --bg: #f5f5f5;
  --card: #fff;
  --text: #222;
  --muted: #888;
  --line: #eee;
  --price: #e54d42;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tab-h: calc(52px + var(--safe-bottom));
  --radius: 12px;
  --shadow: 0 4px 16px rgba(0, 0, 0, .06);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; height: 100svh; overflow: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: #f5f5f5;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
.page-root {
  width: 100%;
  max-width: 540px;
  height: 100%;
  height: 100svh;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.main-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.app-toast {
  position: fixed;
  left: 50%;
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(12px);
  background: rgba(0,0,0,.78);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
  max-width: 80%;
  text-align: center;
}
.app-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0;
}
.sheet {
  width: 100%;
  max-width: 540px;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 0;
  max-height: min(92vh, 100%);
  max-height: 92dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.sheet h3 { margin: 0; font-size: 16px; text-align: center; padding: 14px 16px 8px; flex: 0 0 auto; }
.sheet-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0 16px 8px;
}
.sheet-actions {
  flex: 0 0 auto;
  padding: 10px 16px calc(16px + var(--safe-bottom));
  background: #fff;
  border-top: 1px solid #f0f0f0;
  box-shadow: 0 -4px 12px rgba(0,0,0,.04);
}
.addr-wrap, .where, .o-addr, .addr-card .who {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 22px;
  padding: 0 16px;
  height: 40px;
  cursor: pointer;
  background: #f3f3f3;
  color: #333;
}
.btn-primary {
  background: linear-gradient(90deg, #ff7a45, #e54d42);
  color: #fff;
}
.btn-ghost { background: #fff; border: 1px solid #ddd; }
.btn-block { width: 100%; height: 44px; font-size: 15px; font-weight: 600; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.price { color: var(--price); font-weight: 700; font-family: Arial, sans-serif; }
.price small { font-size: .7em; font-weight: 600; }
.origin { color: #bbb; text-decoration: line-through; font-size: 12px; margin-left: 6px; }
.tag-demo {
  display: inline-block;
  font-size: 10px;
  color: #c0362c;
  background: #ffe8e6;
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 4px;
  vertical-align: middle;
  font-weight: 500;
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 56px 24px;
  font-size: 13px;
}
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid #e6e6e6;
  background: #fafafa;
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  appearance: none;
  font-size: 16px;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: #f3b4af;
  background: #fff;
}
.field textarea { min-height: 88px; resize: vertical; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.stepper button {
  width: 28px;
  height: 28px;
  border: 0;
  background: #f7f7f7;
  cursor: pointer;
  font-size: 16px;
  color: #333;
}
.stepper span { min-width: 32px; text-align: center; font-size: 13px; }
