/* 华住盯价站 —— 共享样式（移动优先） */
:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1f2430;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #b5852f;
  --brand-dark: #8f6a24;
  --green: #1a9e54;
  --orange: #e07f13;
  --red: #d93a2b;
  --blue: #2563eb;
  --gray: #6b7280;
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  overflow-x: hidden;
}

a { color: var(--brand-dark); text-decoration: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
}
.topbar .title {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 6px;
}
.topbar nav { display: flex; gap: 8px; flex-wrap: wrap; }
.topbar nav a {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
}
.topbar nav a.active { background: var(--brand); color: #fff; }

.container { max-width: 960px; margin: 0 auto; padding: 14px; }
section { margin-bottom: 20px; }
h2.sec { font-size: 15px; margin: 0 0 10px; color: var(--text); }
.muted { color: var(--muted); font-size: 13px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
}

.grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .grid.cols3 { grid-template-columns: 1fr 1fr 1fr; }
}
.grid .card { margin-bottom: 0; }

.city-card .city-name { font-size: 17px; font-weight: 700; }
.city-card .big { font-size: 22px; font-weight: 700; color: var(--brand-dark); }

.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.7;
  background: var(--bg);
  color: var(--muted);
  white-space: nowrap;
}
.badge.pending { background: #eceef1; color: var(--gray); }
.badge.processing { background: #e3ecfd; color: var(--blue); }
.badge.done { background: #e2f5e9; color: var(--green); }
.badge.failed { background: #fde7e4; color: var(--red); }
.badge.type { background: #f3ead3; color: var(--brand-dark); }
.badge.dev { background: #fde7e4; color: var(--red); font-weight: 700; }

.price { font-size: 20px; font-weight: 700; }
.price .unit { font-size: 13px; font-weight: 400; color: var(--muted); }
.avg { color: var(--muted); font-size: 13px; }

.ratebar {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  margin: 6px 0 2px;
}
.ratebar > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--green);
}
.ratebar > i.mid { background: var(--orange); }
.ratebar > i.low { background: var(--red); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.filters select,
.filters input[type="search"] {
  flex: 1 1 140px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  font-size: 14px;
}

label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
input[type="date"] {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  font-size: 15px;
}

button.primary {
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
button.primary:disabled { opacity: 0.5; }
button.ghost {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  cursor: pointer;
  font-size: 13px;
}

.seg { display: flex; gap: 8px; margin-bottom: 12px; }
.seg label {
  flex: 1;
  text-align: center;
  padding: 9px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  cursor: pointer;
  font-size: 14px;
}
.seg input { display: none; }
.seg label.on { border-color: var(--brand); background: #faf3e0; font-weight: 600; }

.region { margin-bottom: 14px; }
.region > h3 { font-size: 14px; margin: 0 0 4px; color: var(--brand-dark); }
.province { margin: 8px 0 0; }
.province .pname { font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.selbar {
  position: sticky;
  bottom: 0;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: 10px 14px;
  font-size: 13px;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 34px 16px;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.empty .emoji { font-size: 30px; display: block; margin-bottom: 8px; }

.kv { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 2px 0; }
.kv b { font-weight: 600; text-align: right; word-break: break-all; }

pre.json {
  background: var(--bg);
  border-radius: 8px;
  padding: 8px;
  font-size: 12px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 6px 0 0;
}

.entry-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.entry-head .hotel { font-weight: 700; font-size: 15px; word-break: break-all; }
.entry-sub { color: var(--muted); font-size: 13px; margin-top: 2px; word-break: break-all; }
.note { margin-top: 6px; font-size: 13px; background: #fff8e6; border-radius: 8px; padding: 6px 8px; }
.err { color: var(--red); font-size: 14px; margin: 8px 0; }
.ok { color: var(--green); font-size: 14px; margin: 8px 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; }
