/* ===== 机构库页 · 城市 / 工具栏 ===== */

.inst-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inst-page-title h1 {
  margin: 0;
  line-height: 1.2;
}

.inst-page-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}

.inst-city-bar {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  overflow-x: auto;
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
  -webkit-overflow-scrolling: touch;
}

.inst-city-bar::-webkit-scrollbar { display: none; }

.inst-city-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 13px;
  font-family: inherit;
  color: var(--text-secondary);
  cursor: pointer;
}

.inst-city-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.inst-city-chip.soon {
  opacity: 0.72;
}

.inst-city-chip em {
  font-style: normal;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.06);
}

.inst-city-chip.active em {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

.inst-city-chip.inst-city-more em {
  font-style: normal;
  font-size: 10px;
  margin-left: 2px;
}

.inst-city-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  font-size: 12px;
  color: var(--text-secondary);
  font-family: inherit;
  cursor: pointer;
}

.inst-city-switch-arrow {
  font-size: 10px;
  color: var(--text-muted);
}

.city-form-picker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
}

.city-form-picker-action {
  font-size: 13px;
  color: var(--primary);
}

.home-city-picker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
  padding: 4px 10px 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
}

.home-city-picker-arrow {
  font-size: 10px;
  opacity: 0.85;
}

.home-recommend-empty {
  min-width: 200px;
  padding: 20px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.home-recommend-empty .btn-text-link {
  margin-top: 8px;
  border: none;
  background: none;
  color: var(--primary);
  font-size: 13px;
  cursor: pointer;
}

.inst-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
}

.inst-list-summary {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.inst-list-summary strong {
  color: var(--primary-dark);
  font-weight: 700;
}

.inst-sort-select {
  flex-shrink: 0;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  font-size: 12px;
  font-family: inherit;
  color: var(--text-secondary);
}

.inst-v2-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.inst-v2-city,
.inst-v2-type {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.inst-v2-city {
  background: #eff6ff;
  color: #1d4ed8;
}

.inst-v2-type {
  background: var(--bg);
  color: var(--text-muted);
}

.inst-empty-state {
  padding: 48px 24px 64px;
  text-align: center;
}

.inst-empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.inst-empty-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.inst-empty-sub {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== 机构列表 · 卡片布局 ===== */

.inst-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 16px 16px;
}

.inst-card-v2 {
  display: flex;
  flex-direction: column;
  position: relative;
  margin-bottom: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.inst-card-v2.inst-card-top {
  border-color: #FFE4CC;
  box-shadow: 0 2px 10px rgba(232, 89, 12, 0.1);
}

.inst-v2-top-badge {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 4;
  background: var(--primary);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 0 0 8px 0;
}

.inst-v2-cover {
  position: relative;
  width: 100%;
  height: 168px;
  flex-shrink: 0;
  overflow: hidden;
  background: #F0EBE6;
  cursor: pointer;
}

.inst-v2-cover .cover-fallback,
.inst-v2-cover .cover-stack {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.inst-v2-cover .cover-stack img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inst-v2-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.22) 100%);
  pointer-events: none;
  z-index: 1;
}

.inst-v2-cover-badges {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 2;
}

.inst-v2-body {
  padding: 14px 14px 12px;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}

.inst-v2-body .inst-name {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.inst-v2-rating {
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.inst-v2-body .inst-policy-tags {
  margin-bottom: 10px;
}

.inst-v2-address {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.inst-v2-address svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--text-muted);
}

.inst-v2-address span {
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.inst-v2-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 8px;
}

.metric-cell {
  min-width: 0;
}

.metric-cell span {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.metric-cell strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  word-break: break-all;
}

.metric-cell strong.price-accent {
  font-size: 15px;
  color: var(--price);
}

.inst-v2-foot {
  display: flex;
  gap: 10px;
  padding: 0 14px 14px;
}

.inst-v2-foot .btn-compare,
.inst-v2-foot .btn-book {
  flex: 1;
  min-width: 0;
  padding: 10px 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  border: 1px solid var(--border);
  background: var(--white);
}

.inst-v2-foot .btn-compare.active {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
}

.inst-v2-foot .btn-book {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
