/* ===== 基础 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #fff9f2;
  --card: #ffffff;
  --text: #2c2418;
  --text-muted: #8a7f70;
  --line: #f0e4d4;
  --brand: #e8663d;
  --brand-soft: #fdeee6;
  --amber: #f4a93c;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(120, 80, 40, 0.07);

  /* 空状态插画配色 */
  --empty-bowl: #f7e3cc;
  --empty-bowl-rim: #f0d3b3;
  --empty-steam: #e8cdae;
  --empty-shadow: rgba(200, 165, 130, 0.18);

  /* 品类配色（默认，会被各品类覆盖） */
  --cat-bg: #eef3ff;
  --cat-fg: #4a6ee0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== A1 沉浸式顶部 Hero（重设计） ===== */
.hero {
  position: relative;
  background:
    radial-gradient(120% 90% at 12% -10%, #ffc66b 0%, rgba(255, 198, 107, 0) 55%),
    linear-gradient(155deg, #f38b3c 0%, #e9663f 52%, #d94f3d 100%);
  padding: 34px 16px 0;
  /* 不用 overflow:hidden，否则会裁掉探出的搜索框 */
}

/* 装饰层：细腻的弧线与光晕，取代原先的大色块 */
.hero-deco {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 22px;
  overflow: hidden;
  pointer-events: none;
}

/* 右上角同心弧 —— 营造"碗/盘"的意象 */
.hero-deco::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -70px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 26px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 26px rgba(255, 255, 255, 0.06);
}

/* 左下角柔和光晕 */
.hero-deco::after {
  content: "";
  position: absolute;
  bottom: -140px;
  left: -100px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 68%);
}

/* 细碎星点，增加呼吸感 */
.blob {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
}

.blob-1 { width: 5px; height: 5px; top: 62px; left: 16%; }
.blob-2 { width: 3px; height: 3px; top: 128px; left: 8%; background: rgba(255,255,255,0.34); }
.blob-3 { width: 4px; height: 4px; top: 46px; right: 14%; background: rgba(255,255,255,0.42); }

.hero-inner {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}

.hero header {
  padding: 0 0 22px;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 11.5px;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.hero-eyebrow::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffe9b8;
}

.hero h1 {
  font-size: 31px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 1.5px;
  line-height: 1.25;
  text-shadow: 0 2px 14px rgba(140, 50, 20, 0.25);
}

.hero h1 .dot { color: #ffe0a3; }

.hero-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 8px;
  letter-spacing: 0.3px;
}

/* Hero 内的搜索框：白色胶囊，带柔和投影 */
.hero .search-box {
  position: relative;
  margin: 0 0 -25px;
  padding-bottom: 0;
}

.hero .search-box input {
  width: 100%;
  padding: 16px 18px 16px 46px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  background: #fff;
  font-size: 15px;
  color: var(--text);
  outline: none;
  box-shadow:
    0 8px 24px rgba(150, 65, 25, 0.16),
    0 2px 6px rgba(150, 65, 25, 0.08);
  transition: box-shadow 0.2s;
}

.hero .search-box input:focus {
  box-shadow:
    0 10px 28px rgba(150, 65, 25, 0.2),
    0 0 0 3px rgba(255, 255, 255, 0.55);
}

.hero .search-box input::placeholder { color: #b3a99c; }

.hero .search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #b0b0b0;
  opacity: 1;
  pointer-events: none;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  /* 搜索框已不探出头部，这里只需正常区块间距 */
  padding: 16px 16px 60px;
}

/* ===== 区域 Tab（单选，药丸式，与卡片区分） ===== */
.area-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 16px;
  scrollbar-width: none;
}

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

.area-tab {
  flex-shrink: 0;
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s;
}

.area-tab:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.area-tab.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 3px 10px rgba(232, 102, 61, 0.28);
}

/* ===== 筛选栏（可折叠，弱化处理，不抢视觉） ===== */
.filter-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 14px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.filter-panel.open {
  border-color: #ecd9c4;
}

.filter-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 15px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  font-family: inherit;
  cursor: pointer;
}

.filter-toggle:hover { color: var(--text); }

.ft-left { display: inline-flex; align-items: center; gap: 7px; }
.ft-icon { color: var(--brand); opacity: 0.7; font-size: 12px; }

.ft-badge {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

.ft-arrow { color: var(--text-muted); font-size: 13px; transition: transform 0.2s; }

/* 折叠动画：靠 max-height 展开 */
.filter-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease, padding 0.28s ease;
  padding: 0 16px;
}

.filter-panel.open .filter-body {
  max-height: 640px;
  padding: 0 16px 14px;
}

.filter-group { margin-bottom: 14px; }

.filter-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.chip {
  padding: 7px 15px;
  border-radius: 20px;
  background: #fffdfa;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s;
  user-select: none;
}

.chip:hover { border-color: var(--amber); color: var(--text); }

.chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 500;
}

.chip.area.active {
  background: #2f9660;
  border-color: #2f9660;
}

.chip-hint {
  font-size: 12.5px;
  color: #c0b5a6;
}

.add-chip {
  flex-shrink: 0;
  margin-top: 8px;
  padding: 6px 14px;
  border: 1px dashed var(--brand);
  border-radius: 18px;
  background: #fff;
  color: var(--brand);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.add-chip:hover { background: var(--brand-soft); }

.filter-foot {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

/* ===== 工具栏（数量 + 排序） ===== */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 10px;
}

.count {
  font-size: 12.5px;
  color: var(--text-muted);
}

.count strong {
  color: var(--brand);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.sort-select {
  padding: 6px 28px 6px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
  font-size: 12.5px;
  color: var(--text-muted);
  font-family: inherit;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23b9ada0' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color 0.18s, color 0.18s;
}

.sort-select:hover,
.sort-select:focus { border-color: var(--brand); color: var(--text); }

/* ===== 操作按钮组（抽签 + 加摊） ===== */
.actions {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.actions .lucky { flex: 1; margin-bottom: 0; }

.submit-btn {
  flex-shrink: 0;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.16s;
  white-space: nowrap;
}

.submit-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}

/* ===== 抽签按钮（页面主行动点） ===== */
.lucky {
  position: relative;
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #f7a83e 0%, #e8663d 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.4px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(232, 102, 61, 0.32);
  transition: transform 0.16s, box-shadow 0.16s;
  font-family: inherit;
}

/* 顶部高光，增加立体感 */
.lucky::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 52%);
  pointer-events: none;
}

.lucky:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(232, 102, 61, 0.32);
}

.lucky:active { transform: translateY(0); }

/* ===== 摊位卡片 ===== */
.list { display: flex; flex-direction: column; gap: 11px; }

.card {
  display: flex;
  align-items: stretch;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  cursor: pointer;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-2px);
  border-color: #ecd9c4;
  box-shadow: 0 8px 22px rgba(120, 80, 40, 0.13);
}

/* 左侧缩略图区 */
.card-thumb {
  flex-shrink: 0;
  width: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(120, 80, 40, 0.08);
}

.card-body {
  flex: 1;
  min-width: 0;
  padding: 14px 16px 15px;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.card-name {
  font-size: 17px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
}

.del-btn {
  flex-shrink: 0;
  padding: 4px 11px;
  border: 1px solid #f0d5d5;
  border-radius: 8px;
  background: #fff;
  color: #d64545;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.del-btn:hover { background: #fdf2f2; }

.card-meta {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.card-meta span { display: inline-flex; align-items: center; gap: 4px; }

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--cat-bg);
  color: var(--cat-fg);
  font-weight: 500;
}

/* 品类标签的配色由 JS 内联注入（B2 品类配色） */
.tag.cat { background: var(--cat-bg); color: var(--cat-fg); }
.tag.qr-tag { background: #e6f6f0; color: #17916a; }

/* ===== 点单二维码：表单区 ===== */

/* 拖拽区：虚线框，拖入时高亮 */
.qr-dropzone {
  margin-bottom: 10px;
  padding: 18px 14px;
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  background: #fdfaf6;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s;
  -webkit-tap-highlight-color: transparent;
}

.qr-dropzone:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.qr-dropzone.dragover {
  border-color: var(--brand);
  border-style: solid;
  background: var(--brand-soft);
  transform: scale(1.01);
}

.qr-dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;   /* 让点击/拖拽事件都落在 zone 本身，避免子元素干扰 */
}

.qr-dropzone-icon {
  font-size: 22px;
  line-height: 1.2;
}

.qr-dropzone-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.qr-dropzone-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

.qr-pick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

/* 手动输入链接行：复用 .add-tag-row 的 flex 布局 */
#qrManualRow {
  flex-wrap: wrap;
  margin-top: 2px;
  margin-bottom: 4px;
}

#qrManualInput {
  min-width: 0;
  font-size: 13px;
}

.qr-preview {
  margin-top: 10px;
  padding: 14px;
  background: #fdfaf6;
  border: 1px dashed var(--line);
  border-radius: 12px;
  text-align: center;
}

.qr-canvas-wrap {
  display: inline-block;
  padding: 8px;
  background: #fff;
  border-radius: 10px;
  line-height: 0;
}

/* 注意：不要用 CSS 强制 canvas/img 的 display。
   qrcodejs 内部会在 canvas 与 img 之间做异步切换（canvas→dataURL→img），
   CSS 若强行指定会与它的切换逻辑冲突，导致画布被隐藏后无法恢复。
   这里只锁定尺寸与去边距，显隐交给 qrcodejs 自己决定。 */
.qr-canvas-wrap img,
.qr-canvas-wrap canvas {
  width: 160px;
  height: 160px;
  max-width: none;      /* 防止被其他规则压到 100% */
  flex-shrink: 0;
  vertical-align: top;
}

.qr-text {
  margin-top: 9px;
  font-size: 11.5px;
  color: var(--text-muted);
  word-break: break-all;
  line-height: 1.5;
  max-height: 40px;
  overflow: hidden;
}

/* 微信小程序码：直接展示原图（圆形码） */
.qr-minicode-wrap img {
  width: 160px;
  height: 160px;
  max-width: none;
  object-fit: contain;
  display: block;
}

.qr-minicode-note {
  margin-top: 8px;
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: #e6f6f0;
  color: #17916a;
  font-size: 11.5px;
  font-weight: 500;
}

.qr-status { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.qr-status.error { color: #d64545; }
.qr-status.ok { color: #2f9660; }
.qr-status.warn { color: #b8791a; }
.qr-status.dup { color: #d64545; font-weight: 600; }

/* ===== 重复摊位提示条（出现在二维码预览下方） ===== */
.qr-dup {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  text-align: left;
  border: 1px solid transparent;
}

.qr-dup.qr {
  background: #fdf0f0;
  border-color: #f3cfcf;
}

.qr-dup.name {
  background: #fdf8ec;
  border-color: #f0e0bc;
}

.qr-dup-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
}

.qr-dup.qr .qr-dup-title { color: #c0392b; }
.qr-dup.name .qr-dup-title { color: #a8761a; }

.qr-dup-msg {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text);
  word-break: break-word;
}

.qr-dup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

/* ===== 点单二维码：详情弹窗 ===== */
.qr-block {
  margin-top: 16px;
  padding: 18px 14px 14px;
  background: #fdfaf6;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-align: center;
}

/* 详情弹窗里的小程序码放大一些，方便直接扫 */
.qr-block .qr-minicode-wrap img {
  width: 200px;
  height: 200px;
}

.qr-block-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 12px;
}

.qr-block .qr-canvas-wrap img,
.qr-block .qr-canvas-wrap canvas {
  width: 200px;
  height: 200px;
  max-width: none;
}

.qr-tip { font-size: 12px; color: var(--text-muted); margin-top: 10px; }

/* ===== 提交表单 ===== */
.form-hint {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: -6px 0 16px;
}

.form { display: flex; flex-direction: column; gap: 13px; }

.field { display: flex; flex-direction: column; gap: 6px; flex: 1; }

.field .label {
  font-size: 12.5px;
  color: #6b6154;
  font-weight: 500;
}

.field .label i { color: var(--brand); font-style: normal; }

.field input,
.field select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdfa;
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.field input:focus,
.field select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.field input::placeholder { color: #bcb0a2; }

.form-msg { font-size: 13px; min-height: 18px; text-align: center; }
.form-msg.error { color: #d64545; }
.form-msg.ok { color: #2f9660; }

/* ===== 品类标签式多选 ===== */
.cat-picker { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 2px; }

.cat-option {
  display: inline-flex;
  align-items: center;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fffdfa;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  transition: all 0.16s;
}

.cat-option:hover { border-color: var(--amber); color: var(--text); }

.cat-option.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 500;
}

/* 「+ 添加标签」按钮 */
.cat-option.add-tag {
  border-style: dashed;
  color: var(--brand);
  border-color: var(--brand);
  background: #fff;
}

.cat-option.add-tag:hover { background: var(--brand-soft); }

/* 自定义标签输入行 */
.add-tag-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.add-tag-row input {
  flex: 1;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdfa;
  font-size: 13.5px;
  color: var(--text);
  font-family: inherit;
  outline: none;
}

.add-tag-row input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.mini-btn {
  padding: 9px 16px;
  border: none;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.mini-btn:hover { opacity: 0.9; }

.mini-btn.ghost {
  background: #fff;
  color: var(--text-muted);
  border: 1px solid var(--line);
}

.mini-btn.danger { background: #d64545; }
.mini-btn.danger:disabled { opacity: 0.6; cursor: not-allowed; }

/* ===== 删除确认弹窗 ===== */
.confirm-box {
  background: #fdf8f2;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  margin-bottom: 12px;
}

.confirm-name { font-size: 17px; font-weight: 600; }
.confirm-sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

.confirm-warn {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 18px;
}

.confirm-warn.error { color: #d64545; }

.confirm-actions { display: flex; gap: 10px; }

.confirm-actions .mini-btn {
  flex: 1;
  padding: 12px;
  font-size: 14px;
}

.submit-primary {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--amber), var(--brand));
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(232, 102, 61, 0.25);
  transition: transform 0.15s, opacity 0.15s;
}

.submit-primary:hover:not(:disabled) { transform: translateY(-1px); }
.submit-primary:disabled { opacity: 0.6; cursor: not-allowed; }

/* ===== 抽签结果 ===== */
.lucky-result { text-align: center; padding: 14px 0 6px; }
.lucky-name { font-size: 26px; font-weight: 600; margin-bottom: 6px; }
.lucky-loc { color: var(--text-muted); font-size: 13px; }

/* ===== 空状态（C1） ===== */
.empty {
  text-align: center;
  padding: 44px 20px 50px;
  color: var(--text-muted);
  font-size: 14px;
}

.empty-art { margin-bottom: 14px; line-height: 0; }

.empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.empty-hint {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 260px;
  margin: 0 auto 18px;
}

.empty-actions { display: flex; justify-content: center; gap: 10px; }

/* ===== 底部 ===== */
footer {
  text-align: center;
  font-size: 12px;
  color: #c0b5a6;
  margin-top: 34px;
}

/* ===== 弹窗 ===== */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(44, 36, 24, 0.45);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  padding: 0;
}

.modal-mask.show { display: flex; }

.modal {
  background: var(--card);
  width: 100%;
  max-width: 720px;
  border-radius: 20px 20px 0 0;
  padding: 24px 20px 30px;
  animation: slideUp 0.25s ease;
  max-height: 82vh;
  overflow-y: auto;
}

@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal .close {
  font-size: 24px;
  color: #c0b5a6;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

.modal .row {
  display: flex;
  font-size: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.modal .row .k {
  width: 76px;
  color: var(--text-muted);
  flex-shrink: 0;
  font-size: 13px;
}

.modal .row .v { flex: 1; color: var(--text); }

.modal .again {
  width: 100%;
  margin-top: 0;
  padding: 13px;
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  background: #fff;
  color: var(--brand);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

/* ===== 抽签结果：前往 + 换一个 ===== */
.lucky-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

/* 「前往」是主动作，实心；「换一个」是次要动作，描边 */
.lucky-go {
  flex: 1.6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 11px 14px;
  border: none;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: transform .15s, box-shadow .15s;
}

.lucky-go:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(232, 102, 61, .28);
}

.lucky-go:active { transform: translateY(0); }

.lucky-go-main {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

.lucky-go-sub {
  font-size: 11.5px;
  opacity: .88;
  line-height: 1.2;
}

/* 换一个在同一行里，跟「前往」并排 */
.lucky-actions .again {
  flex: 1;
  margin-top: 0;
}

@media (max-width: 480px) {
  .actions { flex-direction: column; }
}

/* ===== D1 移动端底部固定操作栏 ===== */
.mobile-bar {
  display: none;               /* 桌面端隐藏 */
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 252, 247, 0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}

.mb-lucky {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--amber), var(--brand));
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(232, 102, 61, 0.25);
}

.mb-submit {
  flex-shrink: 0;
  padding: 14px 16px;
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  background: #fff;
  color: var(--brand);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}

@media (max-width: 640px) {
  /* 移动端：显示底部栏，隐藏内联按钮组，页面底部留白避让 */
  .mobile-bar { display: flex; }
  .wrap .actions { display: none; }
  /* 底部留白避让固定栏；顶部只需正常间距（搜索框已不探出） */
  .wrap { padding: 10px 16px 96px; }
  footer { margin-bottom: 8px; }

  /* Hero 内间距收窄 */
  .hero { padding: 22px 16px 4px; }
  .hero h1 { font-size: 25px; }
  .card-thumb { width: 66px; }
  .thumb-icon { font-size: 30px; }
}

@media (min-width: 641px) {
  .mobile-bar { display: none; }
}

/* 弹窗打开时隐藏底部栏，避免遮挡与误触 */
body.modal-open .mobile-bar { display: none; }

@media (min-width: 640px) {
  .modal-mask { align-items: center; }
  .modal { border-radius: 20px; }
}


/* ================================================================
   WeChat Mini Program 风格改造
   ----------------------------------------------------------------
   设计语言差异（这是本次改造的核心）：
     旧：暖米色底 + 描边卡片 + 橙色渐变 Hero（偏"小红书美食"风）
     新：灰白底 + 无边框纯白卡片 + 克制的绿色主色（微信小程序风）

   小程序视觉的几条铁律：
     1. 页面底色是浅灰（#f7f7f7 一档），卡片是纯白，靠底色差分层，
        而**不是**靠描边 —— 描边会让界面显得"重"和"旧"。
     2. 阴影极淡（4%~6% 透明度），几乎看不见，只用来做微妙的浮起感。
     3. 圆角大（12-16px），但不用药丸形。
     4. 主色只用在"行动点"上（按钮、选中态），其余一律灰阶。
     5. 字号层次靠"字重 + 颜色深浅"拉开，不靠字号忽大忽小。
     6. 分隔线用 1px 极浅灰，或干脆用留白代替。
   ================================================================ */

:root {
  /* ---- 覆盖配色 ---- */
  --bg: #f5f6f7;              /* 小程序标志性的浅灰底 */
  --card: #ffffff;
  --text: #1a1a1a;            /* 比原来更黑更锐利 */
  --text-muted: #8a8a8a;      /* 中性灰，去掉暖调 */
  --line: #ececec;            /* 极浅分隔线 */
  --brand: #07c160;           /* 微信绿 —— 只用在行动点 */
  --brand-soft: #e8f8ef;      /* 绿色浅底 */
  --amber: #ffb020;           /* 保留暖色做点缀（品类/抽签） */
  --radius: 14px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-lift: 0 4px 16px rgba(0, 0, 0, 0.08);

  /* 空状态延续灰阶 */
  --empty-bowl: #ececec;
  --empty-bowl-rim: #e0e0e0;
  --empty-steam: #d8d8d8;
  --empty-shadow: rgba(0, 0, 0, 0.05);

  --cat-bg: #f2f3f5;
  --cat-fg: #5a5a5a;
}

body {
  background: var(--bg);
  color: var(--text);
}

/* ---------- Hero：从"橙色渐变海报"改为"微信式绿色头部" ---------- */
/* Hero 改为「淡绿渐变 → 白」的浅色头部。
   真·微信小程序不会用一大块饱和色当头部 —— 大面积高饱和会显得廉价、
   像电商促销页。小程序的做法是：头部极浅（甚至纯白），
   饱和色只留在按钮、角标这些「行动点」上。 */
.hero {
  background: linear-gradient(180deg, #e9f9f0 0%, #f5f6f7 100%);
  padding: 26px 16px 4px;
}

/* 去掉原来的同心弧与光晕装饰 —— 小程序不用这类花哨装饰 */
.hero-deco::before,
.hero-deco::after { display: none; }

.hero-inner { position: relative; z-index: 1; }

/* 眉标：淡绿底 + 绿字，小而克制 */
.hero-eyebrow {
  background: rgba(7, 193, 96, 0.12);
  color: #0a9d52;
  border: none;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* 去掉小圆点，改为纯文字，更克制 */
.hero-eyebrow::before { display: none; }

.hero h1 {
  color: #1a1a1a;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.hero h1 .dot { display: none; }

.hero-sub {
  color: #8a8a8a;
  font-weight: 400;
}

/* ---------- 搜索框 ----------
   关键：**留在头部内部**，用普通外边距，不探出、不裁切。
   旧版用「探出头部 + 圆角衔接」是橙色海报时代的设计，
   在手机上会显得搜索框被屏幕边缘切掉，很别扭。 */
.hero .search-box {
  position: relative;
  margin: 0;               /* 彻底取消探出，回归正常文档流 */
  padding-bottom: 0;
}

.hero .search-box input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border: none;
  border-radius: 10px;
  background: #fff;
  font-size: 15px;
  color: var(--text);
  outline: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.18s, background 0.18s;
}

/* 聚焦时才浮起一点，绿色描边也只在这一刻出现 */
.hero .search-box input:focus {
  background: #fff;
  box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.35), 0 2px 8px rgba(0, 0, 0, 0.06);
}

.hero .search-box input::placeholder { color: #b0b0b0; }
.hero .search-icon { color: #b0b0b0; }
.hero .search-icon svg { width: 16px; height: 16px; }

/* ---------- 主体容器 ----------
   搜索框不再探出，所以这里只需要正常的区块间距。 */
.wrap {
  background: transparent;
  border-radius: 0;
  margin-top: 0;
  padding-top: 12px;
}

/* ---------- 区域 Tab：小程序式"药丸选中" ---------- */
/* 横向滚动时右侧多留一点余量，让被截断的下一个 Tab 露出「提示可滑」的一角，
   而不是卡在半个字上；scroll-padding 让吸附时不会贴边。 */
.area-tabs {
  gap: 8px;
  padding-right: 8px;
  scroll-padding-left: 16px;
  scroll-padding-right: 16px;
  -webkit-overflow-scrolling: touch;
}

.tab,
.area-tab {
  background: #fff;
  border: none;
  color: #5a5a5a;
  font-weight: 400;
  box-shadow: none;
  flex-shrink: 0;              /* 保证不被压缩，横向滚动才顺 */
  white-space: nowrap;
  scroll-snap-align: start;
  border-radius: 8px;
  padding: 7px 15px;
  transition: background 0.15s, color 0.15s;
}

.area-tab:hover { background: #f0f0f0; color: var(--text); }

.area-tab.active {
  background: var(--brand);
  color: #fff;
  font-weight: 500;
  box-shadow: none;
}

/* ---------- 筛选面板：白卡 + 无边框 ---------- */
.filter-panel {
  background: #fff;
  border: none;
  box-shadow: var(--shadow-card);
  border-radius: 12px;
  overflow: hidden;
}

.filter-toggle {
  color: #5a5a5a;
  font-weight: 400;
}

.filter-toggle:hover { background: #fafafa; color: var(--text); }

.ft-icon { color: #b0b0b0; }
.ft-arrow { color: #b0b0b0; }

/* 筛选里的 chip：小程序风格是浅灰底、选中变绿 */
.chip {
  background: #f2f3f5;
  border: none;
  color: #5a5a5a;
  border-radius: 6px;
  font-weight: 400;
  padding: 6px 13px;
}

.chip:hover { background: #e8e9eb; color: var(--text); }

.chip.active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 500;
}

.chip.area.active {
  background: var(--brand-soft);
  color: var(--brand);
}

.add-chip {
  background: transparent;
  border: 1px dashed #d8d8d8;
  color: #9a9a9a;
  font-weight: 400;
}

.add-chip:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- 工具栏 ---------- */
.count { color: var(--text-muted); font-weight: 400; }
.count strong { color: var(--text); font-weight: 600; }

.sort-select {
  background: #fff;
  border: none;
  color: #5a5a5a;
  border-radius: 8px;
  box-shadow: var(--shadow-card);
}

.sort-select:hover,
.sort-select:focus { border: none; color: var(--text); }

/* ---------- 抽签按钮：小程序式大圆角实心绿 ---------- */
.lucky {
  background: var(--brand);
  border: none;
  color: #fff;
  font-weight: 500;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(7, 193, 96, 0.22);
}

.lucky::after { display: none; }

.lucky:hover {
  background: #06ad56;
  box-shadow: 0 4px 14px rgba(7, 193, 96, 0.28);
  transform: translateY(-1px);
}

/* 次要按钮：白底 + 浅灰字，小程序里"次要"就是弱化到几乎隐形 */
.submit-btn {
  background: #fff;
  border: none;
  color: #5a5a5a;
  font-weight: 400;
  border-radius: 10px;
  box-shadow: var(--shadow-card);
}

.submit-btn:hover {
  background: #fafafa;
  color: var(--text);
  border: none;
}

/* ---------- 摊位卡片：本次改造的重点 ---------- */
.list { gap: 8px; }   /* 小程序卡片间距普遍偏小 */

.card {
  background: #fff;
  border: none;                       /* 关键：去掉描边 */
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  transition: background 0.15s;
}

.card:hover {
  transform: none;                    /* 小程序不用位移悬浮 */
  background: #fafafa;
  border: none;
  box-shadow: var(--shadow-card);
}

/* 缩略图：小程序里是圆角方形小图，不是圆形大图标 */
.card-thumb { width: 68px; }

.thumb-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;                /* 圆角方形，替代圆形 */
  font-size: 23px;
  background: #f7f7f7;
  box-shadow: none;
}

.card-body { padding: 13px 14px 14px; }

.card-name {
  font-size: 16px;
  font-weight: 500;                   /* 小程序标题很少用 600 */
  color: var(--text);
  letter-spacing: 0;
}

.card-meta {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 5px;
}

/* 删除按钮：平时几乎隐形，hover 才显形（小程序常见做法） */
.del-btn {
  background: transparent;
  border: none;
  color: #b0b0b0;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 400;
  transition: background 0.15s, color 0.15s;
}

.del-btn:hover {
  background: #fdeeee;
  color: #e34d4d;
  border: none;
}

/* 标签：小程序一律浅灰底 + 灰字，靠尺寸区分层次 */
.tag {
  background: #f2f3f5;
  color: #5a5a5a;
  border-radius: 4px;
  font-size: 11px;
  padding: 3px 8px;
  font-weight: 400;
}

.tag.cat { background: #f2f3f5; color: #5a5a5a; }

.tag.qr-tag {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 500;
}

/* ---------- 底部栏：小程序式"白底 + 极细顶边" ---------- */
.mobile-bar {
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -1px 6px rgba(0, 0, 0, 0.03);
}

.mb-lucky {
  background: var(--brand);
  border: none;
  color: #fff;
  font-weight: 500;
  border-radius: 8px;
}

.mb-submit {
  background: #fff;
  border: 1px solid #e0e0e0;
  color: #5a5a5a;
  font-weight: 400;
  border-radius: 8px;
}

/* ---------- 弹窗：小程序式底部抽屉圆角 ---------- */
.modal {
  border-radius: 16px 16px 0 0;
  border: none;
  box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.12);
}

.modal h2 {
  font-weight: 500;
  color: var(--text);
}

.modal .close { color: #c0c0c0; }
.modal .close:hover { color: var(--text); }

.modal .row {
  border-bottom: 1px solid var(--line);
}

.modal .row .k { color: var(--text-muted); }

/* 弹窗里的主按钮统一成绿色 */
.modal .submit-primary,
.submit-primary {
  background: var(--brand);
  border: none;
  color: #fff;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(7, 193, 96, 0.2);
}

.modal .submit-primary:hover,
.submit-primary:hover { background: #06ad56; }

.mini-btn {
  background: var(--brand);
  border: none;
  color: #fff;
  font-weight: 500;
}

.mini-btn:hover { background: #06ad56; }

.mini-btn.ghost {
  background: #f2f3f5;
  border: none;              /* 覆盖原文件的 1px 描边 */
  color: #5a5a5a;
  font-weight: 400;
}

.mini-btn.ghost:hover {
  background: #e8e9eb;
  border: none;
  color: var(--text);
}

.mini-btn.danger {
  background: #e34d4d;
  color: #fff;
}

.mini-btn.danger:hover { background: #d13c3c; }

/* 抽签结果的主按钮 */
.lucky-go {
  background: var(--brand);
  box-shadow: 0 2px 8px rgba(7, 193, 96, 0.2);
}

.lucky-go:hover {
  background: #06ad56;
  box-shadow: 0 4px 14px rgba(7, 193, 96, 0.28);
}

/* 「换一个」改为浅灰次要按钮，与主按钮形成明确的层级差 */
.modal .again {
  background: #f2f3f5;
  border: none;
  color: #5a5a5a;
  font-weight: 400;
}

.modal .again:hover { background: #e8e9eb; color: var(--text); }

/* ---------- 输入框：小程序里是浅灰填充、无边框 ---------- */
.form input[type="text"],
.form input:not([type]),
.form select,
.add-tag-row input,
.ask-input {
  background: #f7f7f7;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
}

.form input:focus,
.form select:focus,
.add-tag-row input:focus,
.ask-input:focus {
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

/* 类别选择项：小程序式浅灰块 */
.cat-option {
  background: #f2f3f5;
  border: none;
  color: #5a5a5a;
  border-radius: 6px;
  font-weight: 400;
}

.cat-option.on {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 500;
}

.cat-option.add-tag {
  background: transparent;
  border: 1px dashed #d8d8d8;
  color: #9a9a9a;
}

.cat-option.add-tag:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand);
}

/* 二维码拖拽区 */
.qr-dropzone {
  background: #fafafa;
  border: 1.5px dashed #dcdcdc;
  border-radius: 10px;
}

.qr-dropzone:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
}

.qr-dropzone.dragover {
  background: var(--brand-soft);
  border-color: var(--brand);
}

.qr-dropzone-icon { filter: grayscale(0); }

/* 二维码预览块 */
.qr-preview,
.qr-block {
  background: #fafafa;
  border: 1px solid var(--line);
}

.qr-minicode-note {
  background: var(--brand-soft);
  color: var(--brand);
}

/* 状态文案沿用中性灰 */
.qr-status { color: var(--text-muted); }
.qr-status.ok { color: var(--brand); }

/* 页脚 */
footer {
  color: #b0b0b0;
  border-top: 1px solid var(--line);
}

/* 空状态 */
.empty-title { color: var(--text); font-weight: 500; }
.empty-hint { color: var(--text-muted); }

/* 表单内文字 */
.form-hint { color: var(--text-muted); }
.form .label { color: var(--text); }
.form .label i { color: #e34d4d; font-style: normal; }

/* 滚动条：小程序很细很淡 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.12); border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }

/* 桌面端弹窗维持居中圆角 */
@media (min-width: 640px) {
  .modal { border-radius: 16px; }
}

/* ================================================================
   补充覆盖：原文件里还有几处暖色调/描边残留，
   它们的选择器与上面不同名（.field / .blob / .qr-dup / .confirm-box 等），
   必须单独补，否则会露出旧配色。
   ================================================================ */

/* ---------- Hero 里的白色小光点：小程序不用 ---------- */
.blob { display: none; }

/* ---------- 表单输入：真正的选择器是 .field input / .field select ---------- */
.field .label {
  font-size: 13px;
  color: var(--text);
  font-weight: 400;
}

.field .label i { color: #e34d4d; }

.field input,
.field select {
  background: #f7f7f7;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
}

.field input:focus,
.field select:focus {
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.field input::placeholder { color: #b0b0b0; }

/* ---------- 表单提示文案 ---------- */
.form-msg.ok { color: var(--brand); }

/* ---------- 品类选择器容器 ---------- */
.cat-picker { gap: 7px; }

/* ---------- 查重提示条：小程序式"浅底无重描边" ---------- */
.qr-dup { border: none; }

.qr-dup.qr { background: #fdeeee; }
.qr-dup.name { background: #fff8e8; }

.qr-dup-title { font-weight: 500; }
.qr-dup.qr .qr-dup-title { color: #d64545; }
.qr-dup.name .qr-dup-title { color: #b8860b; }

.qr-dup-msg { color: var(--text); }

/* ---------- 删除确认弹窗：白卡替代暖米卡 ---------- */
.confirm-box {
  background: #f7f7f7;
  border: none;
  border-radius: 12px;
}

.confirm-name { font-weight: 500; }
.confirm-sub { color: var(--text-muted); }
.confirm-warn { color: var(--text-muted); }
.confirm-warn.error { color: #d64545; }

/* ---------- 二维码预览块：浅灰底替代暖米底 ---------- */
.qr-block {
  background: #fafafa;
  border: 1px solid var(--line);
}

.qr-block-title { color: var(--brand); font-weight: 500; }
.qr-tip { color: var(--text-muted); }

/* ---------- 提交主按钮：去掉橙→绿渐变，改纯绿 ---------- */
.submit-primary {
  background: var(--brand);
  border-radius: 10px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(7, 193, 96, 0.22);
}

.submit-primary:hover:not(:disabled) {
  background: #06ad56;
  box-shadow: 0 4px 14px rgba(7, 193, 96, 0.28);
}
