/* ==== 仅 buddymatch 页面生效的样式（bm- 前缀） ==== */
:root{
  --bm-bg:#EAF3FB; --bm-panel:#FFF; --bm-border:#CFD9E3;
  --bm-primary:#FF7A00; --bm-primary-2:#FF8C1A; --bm-text:#0F172A; --bm-sub:#64748B;
}

.bm-btn{ background:var(--bm-primary); color:#fff; border:none; border-radius:14px; padding:8px 16px; font-weight:700; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:6px; }
.bm-btn:hover{ background:var(--bm-primary-2); }
.bm-btn-orange{ background:var(--bm-primary); }
.bm-btn-outline{ background:#fff; color:#333; border:1px solid #E2E8F0; }
.bm-trip-list{display:flex;flex-direction:column;gap:16px}
.bm-trip-card{border:1px solid #dbe5f3;border-radius:14px;padding:14px;background:#f8fbff;display:flex;flex-direction:column;gap:12px;position:relative}
.bm-trip-head{display:flex;align-items:center;justify-content:space-between}
.bm-trip-title{font-weight:800;color:#1d3a58;font-size:15px}
.bm-trip-remove{background:none;border:none;color:#ef4444;font-weight:700;cursor:pointer;padding:4px 6px;border-radius:8px}
.bm-trip-remove:hover{background:rgba(239,68,68,.12)}
.bm-trip-add{margin-top:12px;width:100%;justify-content:center}

/* 页面主体 */
body{ background: var(--bm-bg); }
.bm-page{ max-width:1100px; margin:24px auto; padding:0 16px; }
.bm-card{
  background:#fff; border:1px solid var(--bm-border); border-radius:14px;
  padding:20px; box-shadow:0 2px 8px rgba(17,24,39,.06);
}
.bm-title{ font-size:22px; font-weight:800; color:var(--bm-text); margin:4px 4px 16px; }

.bm-grid{ display:grid; grid-template-columns:1fr; gap:14px; }
.bm-full{ grid-column:1 / -1; }

.bm-field{ display:flex; flex-direction:column; gap:6px; }
.bm-label{ font-size:14px; font-weight:700; color:var(--bm-text); }
.bm-label .bm-help{font-size:12px;font-weight:400;color:var(--bm-sub);margin-left:8px;}
.bm-req{ color:#EF4444; margin-left:4px; }

.bm-input{
  width:100%; box-sizing:border-box; padding:12px 14px;
  border:1.5px solid #A8BFD4; border-radius:10px; background:#FBFDFF;
  font-size:16px; color:var(--bm-text);
}
.bm-input::placeholder{ color:#94A3B8; }
.bm-input:focus{
  outline:none; border-color:#6EA8D7; box-shadow:0 0 0 3px rgba(59,130,246,.18);
}
textarea.bm-input{ min-height:110px; resize:vertical; }

.bm-help{ font-size:12px; color:var(--bm-sub); margin:2px 4px 0; }
.bm-check{ display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:4px; }
.bm-check input[disabled]{ cursor:not-allowed; opacity:.6; }
.bm-check label{ flex:1 1 auto; font-size:13px; color:#475569; }
.bm-rules-btn{ font-size:13px; padding:8px 12px; border-radius:10px; }

.bm-actions{ display:flex; gap:12px; margin-top:8px; }

/* 城市标签 + 自定义联想（与 buddymatch.js 匹配） */
.bm-chips{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:6px; }
.bm-chips .chip{ display:inline-flex; align-items:center; gap:6px; padding:6px 10px;
       background:#EEF6FF; border:1px solid #B6D4FE; border-radius:999px; font-size:13px; color:var(--bm-text); }
.bm-chips .rm{ cursor:pointer; font-weight:700; }
.bm-chips .rm:hover{ color:#EF4444; }

.bm-purpose-grid{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.bm-purpose-chip{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 12px;
  border:1.6px solid #d8e3f2;
  border-radius:999px;
  background:#f8fbff;
  font-size:14px;
  font-weight:600;
  color:#334155;
  cursor:pointer;
  transition:.2s;
}
.bm-purpose-chip span{font-size:16px;}
.bm-purpose-chip.active{
  border-color:#ff9b4a;
  background:#fff3e6;
  color:#b45309;
  box-shadow:0 2px 8px rgba(255,155,74,.25);
}
.bm-purpose-chip.disabled{
  opacity:.45;
  cursor:not-allowed;
}

.suggest-box{
  display:none; position:relative; z-index:20; margin-top:6px;
  background:#fff; border:1px solid var(--bm-border); border-radius:10px; max-height:220px; overflow:auto;
  box-shadow:0 6px 18px rgba(0,0,0,.08);
}
.suggest-item{ padding:8px 12px; cursor:pointer; }
.suggest-item:hover{ background:#F3F7FF; }

/* 页脚自然跟随 */
.bm-footer{
  margin:24px auto 0; padding:12px 16px; text-align:center; color:#64748B;
  border-top:1px solid #E5EDF6; max-width:1100px;
}

.rules-modal{ position:fixed; inset:0; display:none; z-index:1200; }
.rules-modal.active{ display:flex; }
.rules-overlay{
  position:absolute; inset:0; background:rgba(15,23,42,.45); backdrop-filter:blur(2px);
}
.rules-dialog{
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  width:min(720px, 90vw); max-height:80vh;
  background:#fff; border-radius:18px; box-shadow:0 24px 60px rgba(15,23,42,.22);
  display:flex; flex-direction:column;
}
.rules-header{
  padding:20px 24px; border-bottom:1px solid #E2E8F0; display:flex; justify-content:space-between; align-items:center;
}
.rules-header h2{ margin:0; font-size:20px; color:#0f172a; }
.rules-close{
  border:none; background:transparent; font-size:28px; line-height:1; cursor:pointer; color:#94a3b8;
}
.rules-close:hover{ color:#1f2937; }
.rules-body{
  padding:18px 24px; overflow:auto; font-size:14px; line-height:1.6; color:#334155;
}
.rules-body h3{ margin:18px 0 8px; font-size:16px; color:#1f2937; }
.rules-body h4{ margin:12px 0 6px; font-size:14px; color:#2563eb; }
.rules-body p{ margin:0 0 10px; }
.rules-contact{
  margin:12px 0 6px;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
  gap:14px;
}
.rules-contact-item{
  border:1px solid #e2e8f0;
  border-radius:14px;
  padding:12px;
  background:#f8fafc;
  text-align:center;
}
.rules-contact-item h4{
  margin:0 0 8px;
  color:#0f172a;
  font-size:14px;
}
.rules-qr{
  width:160px;
  height:160px;
  object-fit:contain;
  border-radius:12px;
  background:#fff;
  border:1px solid #e5e7eb;
}
.rules-contact-tip{
  margin:8px 0 0;
  font-size:12px;
  color:#64748b;
}
.rules-footer{
  padding:18px 24px; border-top:1px solid #E2E8F0; display:flex; justify-content:flex-end; gap:12px;
}
