/* ===== 全国养老查询 · 小程序风格（首批上海） ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #E8590C;
  --primary-dark: #D9480F;
  --primary-light: #FFF4E6;
  --primary-pale: #FFF8F0;
  --accent: #F96205;
  --accent-light: #FFF4E6;
  --link: #576B95;
  --price: #F96205;
  --text: #333333;
  --text-secondary: #666666;
  --text-muted: #999999;
  --border: #E8E8E8;
  --border-light: #F0F0F0;
  --bg: #F7F5F2;
  --surface: #FFFFFF;
  --white: #FFFFFF;
  --danger: #E8590C;
  --success: #52C41A;
  --warning: #FAAD14;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(232, 89, 12, 0.12);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06);
  --tab-height: 50px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

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

#app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  padding-bottom: calc(var(--tab-height) + var(--safe-bottom));
  box-shadow: 0 0 0 1px rgba(28, 25, 23, 0.04);
}

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

.page { display: none; }
.page.active { display: block; }

/* ===== 首页 ===== */
.home-top {
  margin-bottom: 4px;
  overflow: hidden;
}

.home-hero {
  position: relative;
  padding: 0;
  background: linear-gradient(165deg, #FFF8F0 0%, #FFFCF8 52%, #FFFFFF 100%);
  border-radius: 0 0 24px 24px;
  overflow: hidden;
}

.home-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.home-hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
}

.home-hero-orb-1 {
  width: 180px;
  height: 180px;
  top: -40px;
  right: -30px;
  background: rgba(20, 184, 166, 0.28);
}

.home-hero-orb-2 {
  width: 120px;
  height: 120px;
  bottom: 20px;
  left: -20px;
  background: rgba(217, 119, 6, 0.14);
}

.home-hero-inner {
  position: relative;
  z-index: 1;
  padding: 16px 16px 20px;
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
}

.home-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.home-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.home-hero-orb { display: none; }

.home-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  background: linear-gradient(145deg, #F96205, #E8590C);
  box-shadow: 0 4px 12px rgba(232, 89, 12, 0.25);
  flex-shrink: 0;
}

.home-brand-kicker {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
  letter-spacing: 0.04em;
}

.home-app-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.home-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(232, 89, 12, 0.12);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
}

.home-hero-badge svg { flex-shrink: 0; }

.home-hero-title {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.hero-line {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.22;
  color: var(--text);
  letter-spacing: -0.04em;
}

.hero-accent {
  color: var(--primary);
}

.hero-desc {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 30em;
}

.home-search-bar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px 0 14px;
  height: 48px;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}

.home-search-bar:active {
  transform: scale(0.99);
  box-shadow: 0 2px 8px rgba(28, 25, 23, 0.06);
}

.home-search-icon {
  display: flex;
  align-items: center;
  color: var(--primary);
}

.home-search-placeholder {
  flex: 1;
  font-size: 14px;
  color: var(--text-muted);
}

.home-search-go {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--primary);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
}

.home-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
  width: 100%;
}

.home-stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  padding: 10px 8px;
  border-radius: 12px;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--border-light);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.home-stat-pill strong {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}

.home-stat-pill span {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
  white-space: nowrap;
}

.home-stat-pill-soft strong { color: var(--primary); }

.home-hero-meta { display: none; }

.home-body {
  padding: 14px 14px 8px;
}

.home-assess-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #F96205 0%, #E8590C 100%);
  border: none;
  border-radius: var(--radius-lg);
  color: var(--white);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  box-shadow: var(--shadow-md);
  transition: transform .15s ease;
}

.home-assess-card:active { transform: scale(0.985); }

.home-assess-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.16);
  flex-shrink: 0;
}

.home-assess-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.home-assess-copy strong {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.home-assess-copy span {
  font-size: 12px;
  opacity: 0.9;
  line-height: 1.5;
}

.home-assess-action {
  flex-shrink: 0;
  padding: 8px 14px;
  background: var(--white);
  color: var(--primary-dark);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.home-notice-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: #FFFAF0;
  border: 1px solid #FFE8C2;
  border-radius: 8px;
  overflow: hidden;
}

.notice-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warning);
  flex-shrink: 0;
}

.notice-marquee {
  font-size: 12px;
  color: #8C6D3A;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-sm);
}

.home-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
}

.home-panel-head h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.home-panel-head button {
  border: none;
  background: var(--primary-pale);
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  font-family: inherit;
  padding: 6px 10px;
  border-radius: 999px;
}

.home-panel-recommend {
  overflow: visible;
  padding-bottom: 4px;
}

.home-recommend-scroll {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 12px;
  padding: 0 12px 12px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.home-recommend-scroll::-webkit-scrollbar { display: none; }

.home-feature-card {
  flex: 0 0 280px;
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  color: inherit;
}

.home-feature-cover {
  position: relative;
  width: 100%;
  height: 136px;
  flex-shrink: 0;
  overflow: hidden;
  background: #F0EBE6;
}

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

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

.home-feature-cover-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
}

.bed-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.bed-pill::before,
.status-pill::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}

.bed-pill.green { background: #F6FFED; color: #389E0D; border: 1px solid #B7EB8F; }
.bed-pill.orange { background: #FFF7E6; color: #D46B08; border: 1px solid #FFD591; }
.bed-pill.gray { background: #FAFAFA; color: #999; border: 1px solid #E8E8E8; }

.cover-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(165deg, #F5F0EB 0%, #E8E2DC 100%) !important;
}

.cover-placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  text-align: center;
}

.cover-placeholder-icon {
  width: 44px;
  height: 44px;
  color: #C4B5A6;
  opacity: 0.85;
}

.cover-placeholder-text {
  font-size: 13px;
  color: #B8A99A;
  font-weight: 400;
}

.cover-placeholder-sub {
  font-size: 11px;
  color: #C4B5A6;
}

.home-feature-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  width: 100%;
}

.home-feature-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
}

.home-feature-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-feature-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--price);
  line-height: 1.3;
}

.home-feature-price em {
  font-size: 11px;
  font-style: normal;
  font-weight: 400;
  color: var(--text-muted);
}

.home-feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.home-feature-tags i {
  font-size: 10px;
  font-style: normal;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 500;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inst-v2-cover .cover-stack {
  position: relative;
  width: 100%;
  height: 100%;
}

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

.home-inst-card {
  flex: 0 0 268px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  padding: 0;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}

.home-inst-card:active {
  transform: translateY(1px);
}

.home-inst-photo {
  position: relative;
  height: 132px;
  background: linear-gradient(145deg, #E7E5E4, #F5F5F4);
}

.home-inst-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-inst-photo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: linear-gradient(145deg, rgba(0,0,0,0.05), rgba(0,0,0,0.15));
}

.home-inst-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 4px 8px;
  background: rgba(28, 25, 23, 0.72);
  color: var(--white);
  font-size: 10px;
  font-weight: 600;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.home-inst-body { padding: 14px; }

.home-inst-name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: -0.02em;
}

.home-inst-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.home-inst-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--price);
  letter-spacing: -0.03em;
}

.home-inst-price em {
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
  color: var(--text-muted);
}

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

.home-inst-tags span {
  font-size: 10px;
  padding: 4px 8px;
  background: var(--primary-pale);
  color: var(--primary-dark);
  border-radius: 999px;
  font-weight: 600;
}

.home-policy-list {
  padding: 0 8px 8px;
}

.home-policy-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
  border: none;
  background: none;
  border-top: 1px solid var(--border-light);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background .15s ease;
}

.home-policy-item:active { background: var(--primary-pale); }

.home-policy-item:first-child { border-top: none; }

.home-policy-tag {
  flex-shrink: 0;
  min-width: 48px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 999px;
}

.tag-blue { background: #E0F2FE; color: #0369A1; }
.tag-red { background: #FFEDD5; color: #C2410C; }
.tag-gray { background: #F5F5F4; color: var(--text-secondary); }

.home-policy-text {
  flex: 1;
  font-size: 14px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-policy-arrow {
  color: var(--text-muted);
  font-size: 18px;
}

/* 旧首页样式保留兼容 */
.mp-navbar {
  background: var(--white);
  padding: 12px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.mp-navbar-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.home-search-entry,
.home-notice,
.home-menu,
.home-stats,
.block-section,
.flow-row,
.policy-list-simple { display: none; }

/* ===== 旧 hero 占位（其他页可能引用 section） ===== */
.hero { display: none; }

/* ===== Section ===== */
.section { padding: 20px 16px; }
.section-tight { padding-top: 12px; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-title { font-size: 15px; font-weight: 600; }
.section-more { font-size: 13px; color: var(--text-muted); cursor: pointer; }

/* ===== Timeline（保留评估等页） ===== */
.process-timeline {
  background: var(--white);
  padding: 8px 16px;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  position: relative;
}

.timeline-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 10px;
  top: 36px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.timeline-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--border-light);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  z-index: 1;
}

.timeline-content { flex: 1; padding-top: 1px; }
.timeline-content strong { display: block; font-size: 14px; margin-bottom: 2px; font-weight: 500; }
.timeline-content span { font-size: 12px; color: var(--text-muted); }

.btn-assess-cta { display: none; }
.policy-quick { display: none; }

/* ===== Page Header ===== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 252, 248, 0.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border-light);
}

.page-header h1 { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }

.back-btn {
  background: var(--white);
  border: 1px solid var(--border);
  font-size: 18px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 12px;
  font-family: inherit;
  color: var(--text);
}

.header-spacer { width: 36px; }

.btn-compare-header {
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

/* ===== Assessment ===== */
.assess-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px 4px;
  background: var(--white);
}

.assess-progress-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.assess-progress-dot.active { background: var(--primary); color: var(--white); }
.assess-progress-dot.done { background: var(--success); color: var(--white); }

.assess-progress-line { width: 32px; height: 2px; background: var(--border); }

.assess-progress-labels {
  display: flex;
  justify-content: space-between;
  padding: 6px 16px 12px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  font-size: 10px;
  color: var(--text-muted);
}

.assess-form { padding: 16px; padding-bottom: 80px; }

.assess-step { display: none; }
.assess-step.active { display: block; }

.step-title { font-size: 16px; font-weight: 600; margin-bottom: 14px; }
.step-desc { font-size: 13px; color: var(--text-secondary); margin: -8px 0 14px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.required { color: var(--danger); }

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.12);
}

.option-cards { display: flex; flex-direction: column; gap: 8px; }

.option-card {
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.option-card input { display: none; }
.option-card:has(input:checked) { border-color: var(--primary); background: var(--primary-pale); }
.option-card span { font-size: 15px; font-weight: 600; }
.option-card em { font-size: 12px; color: var(--text-secondary); font-style: normal; margin-top: 2px; }

.toggle-group { display: flex; gap: 8px; }

.toggle-btn {
  flex: 1;
  padding: 10px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  background: var(--white);
}

.toggle-btn:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
}

.toggle-btn input { display: none; }

.form-tip {
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--primary-pale);
  padding: 12px;
  border-radius: var(--radius-sm);
  line-height: 1.6;
}

.assess-footer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  display: flex;
  gap: 10px;
  padding: 10px 16px calc(10px + var(--safe-bottom));
  background: var(--white);
  border-top: 1px solid var(--border);
  z-index: 20;
}

.assess-footer button { flex: 1; padding: 12px; }

#page-assessment.active { padding-bottom: 70px; }
#page-assessment.active ~ .tab-bar { display: none; }

/* ===== Match Results ===== */
.match-summary-wrap { padding: 16px 16px 0; }

.match-summary-card {
  display: block;
  background: var(--white);
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  border-left: none;
  box-shadow: none;
}

.match-icon { display: none; }

.match-summary-card h3 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.match-summary-card p { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

.match-tags span {
  background: var(--border-light);
  color: var(--text-secondary);
}

.match-actions-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
}

/* ===== Institution Cards ===== */
.inst-list { padding: 0 16px 16px; }

.inst-list-header {
  padding: 8px 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.inst-card {
  background: var(--surface);
  border-radius: var(--radius);
  margin-bottom: 12px;
  border: 1px solid var(--border-light);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.inst-card-top {
  border-left: 4px solid var(--primary);
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.06);
}

.inst-top-badge {
  position: absolute;
  top: 0; left: 0;
  background: var(--primary);
  color: var(--white);
  font-size: 10px;
  padding: 2px 8px;
  z-index: 1;
}

.inst-card-main {
  display: flex;
  gap: 12px;
  padding: 14px;
  cursor: pointer;
}

.inst-thumb {
  width: 64px; height: 64px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.inst-info { flex: 1; min-width: 0; }

.inst-name-row { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 4px; }
.inst-info h3 { font-size: 15px; font-weight: 600; line-height: 1.35; flex: 1; }

.verified-badge {
  font-size: 10px;
  padding: 3px 7px;
  background: var(--primary-pale);
  color: var(--primary);
  border-radius: 999px;
  flex-shrink: 0;
  font-weight: 700;
}

.inst-type { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }

.inst-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }

.inst-chip {
  font-size: 10px;
  padding: 2px 6px;
  background: var(--bg);
  color: var(--text-secondary);
  border-radius: 4px;
}

.inst-meta-row { display: flex; justify-content: space-between; align-items: center; }

.bed-status {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.bed-status.green { background: #ECFDF5; color: var(--success); }
.bed-status.orange { background: var(--accent-light); color: #B45309; }
.bed-status.gray { background: var(--bg); color: var(--text-muted); }

.inst-price { font-size: 13px; font-weight: 600; color: var(--primary-dark); }

.inst-card-actions {
  display: flex;
  gap: 8px;
  padding: 0 14px 14px;
}

.btn-compare, .btn-book {
  flex: 1;
  padding: 9px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  border: 1px solid var(--border);
  background: var(--white);
}

.btn-compare.active { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.btn-book { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* ===== Search & Tabs ===== */
.search-bar { padding: 12px 16px; background: var(--white); }

.search-bar input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 14px;
  background: var(--bg);
  font-family: inherit;
}

.district-tabs {
  display: flex;
  gap: 8px;
  padding: 4px 16px 12px;
  overflow-x: auto;
  background: var(--white);
  scrollbar-width: none;
}

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

.district-tab {
  flex-shrink: 0;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--white);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-secondary);
}

.district-tab.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  font-weight: 600;
}

/* Detail page styles → detail/detail.css */

/* ===== Compare ===== */
.compare-tip {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--primary-pale);
}

.compare-scroll { overflow-x: auto; padding: 0 16px 16px; -webkit-overflow-scrolling: touch; }

.compare-table-inner {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 12px;
  background: var(--white);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.compare-table-inner th,
.compare-table-inner td {
  padding: 10px 8px;
  border: 1px solid var(--border);
  text-align: center;
  vertical-align: middle;
}

.compare-table-inner th {
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
  font-size: 11px;
}

.compare-label-col {
  background: var(--bg) !important;
  color: var(--text-secondary) !important;
  text-align: left !important;
  font-weight: 500;
  min-width: 90px;
  position: sticky;
  left: 0;
  z-index: 1;
}

.compare-th-name { font-size: 11px; line-height: 1.3; }

.compare-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 16px;
}

/* ===== Visit Booking ===== */
.visit-inst-bar {
  background: var(--primary-light);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.visit-inst-bar strong { font-size: 15px; }
.visit-inst-bar span { font-size: 13px; color: var(--text-secondary); }

.advisor-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 8px;
  cursor: pointer;
}

.advisor-card.selected { border-color: var(--primary); background: var(--primary-pale); }

.advisor-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.advisor-info { flex: 1; }
.advisor-info strong { display: block; font-size: 15px; margin-bottom: 2px; }
.advisor-info span { font-size: 12px; color: var(--text-secondary); }
.advisor-info em { display: block; font-size: 11px; color: var(--primary); font-style: normal; margin-top: 4px; }

.advisor-check {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0;
}

.advisor-card.selected .advisor-check { opacity: 1; }

.date-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 12px;
  scrollbar-width: none;
}

.date-scroll::-webkit-scrollbar { display: none; }

.date-item {
  flex-shrink: 0;
  width: 56px;
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  background: var(--white);
  border: 1px solid var(--border);
  text-align: center;
  cursor: pointer;
}

.date-item.active { background: var(--primary); border-color: var(--primary); color: var(--white); }
.date-item .weekday { font-size: 11px; display: block; }
.date-item .day { font-size: 18px; font-weight: 600; display: block; }

.time-slots-title { font-size: 14px; font-weight: 500; margin-bottom: 10px; }

.time-slots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.time-slot {
  padding: 10px 4px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 13px;
  cursor: pointer;
}

.time-slot.active { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); font-weight: 600; }

.visit-booking-footer { padding: 16px; padding-bottom: calc(16px + var(--safe-bottom)); }

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

/* ===== Success ===== */
.success-page { padding: 40px 24px; text-align: center; }

.success-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--success);
  color: var(--white);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.empty-state { text-align: center; padding: 32px 20px; }
.empty-title { font-size: 14px; color: var(--text-secondary); margin-bottom: 6px; }
.empty-icon { display: none; }

.success-page h2 { font-size: 20px; margin-bottom: 8px; }
.success-page p { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.6; }

.visit-code-box {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 16px;
}

.visit-code { font-size: 22px; font-weight: 700; letter-spacing: 2px; color: var(--primary); margin-bottom: 4px; }
.visit-code-box p { font-size: 12px; color: var(--text-muted); }

.advisor-contact-card {
  background: var(--primary-pale);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: left;
}

.advisor-contact-card strong { display: block; margin-bottom: 4px; }
.advisor-contact-card span { font-size: 13px; color: var(--text-secondary); }

.success-page-actions {
  display: flex;
  gap: 10px;
  padding: 0 24px 24px;
}

.success-page-actions button { flex: 1; padding: 12px; }

/* ===== Policy ===== */
.policy-banner {
  background: var(--white);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text-muted);
}

.policy-list { padding: 0 16px 16px; }

.policy-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  cursor: pointer;
  border: 1px solid var(--border);
}

.policy-cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.policy-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; line-height: 1.4; }
.policy-card p { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.policy-link { font-size: 13px; color: var(--primary); font-weight: 500; }

.policy-detail-header {
  background: var(--white);
  color: var(--text);
  padding: 16px;
  border-bottom: 1px solid var(--border-light);
}

.policy-detail-header h2 { font-size: 17px; line-height: 1.4; margin-top: 8px; color: var(--text); }

.policy-detail-body { padding: 20px 16px; }
.policy-detail-body p { font-size: 14px; color: var(--text-secondary); line-height: 1.75; margin-bottom: 12px; }

.policy-cta { padding: 0 16px 24px; }
.policy-cta p { text-align: center; font-size: 14px; color: var(--text-secondary); margin-bottom: 12px; }
.policy-cta button { margin-bottom: 10px; }

/* ===== Profile ===== */
.profile-top {
  background: linear-gradient(180deg, #FFF8F0 0%, #FFFFFF 100%);
  padding: 28px 20px 20px;
  border-bottom: none;
}

.profile-user { display: flex; align-items: center; gap: 14px; }

.profile-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(145deg, #F96205, #E8590C);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(232, 89, 12, 0.2);
}

.profile-avatar svg { width: 26px; height: 26px; opacity: 0.95; }

.profile-info h2 { font-size: 17px; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.profile-info p { font-size: 13px; color: var(--text-muted); }

.profile-body { padding: 10px 12px 24px; margin-top: 0; }

.profile-card {
  background: var(--white);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}

.profile-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.profile-card-head button {
  border: none;
  background: none;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

.profile-card-body { padding: 0 16px 4px; }

.profile-card-body:empty { display: none; }

.profile-empty {
  padding: 16px 16px 20px;
  text-align: center;
}

.profile-empty p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.profile-empty .empty-sub {
  font-size: 12px;
  margin-top: 4px;
}

.profile-empty .btn-primary {
  margin-top: 12px;
  min-width: 120px;
}

.btn-text-link {
  display: inline-block;
  margin-top: 10px;
  border: none;
  background: none;
  font-size: 13px;
  color: var(--primary);
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

.profile-card-tabs .profile-tabs {
  border: none;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  border-radius: 0;
  margin: 0;
}

.profile-visit-list {
  border: none;
  border-radius: 0;
  margin-bottom: 0;
}

.profile-card-body:not(:empty) + .profile-empty { display: none; }

.profile-visit-list:not(:empty) + .profile-empty { display: none; }

.mini-inst-card {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
}

.mini-inst-card:last-child { border-bottom: none; }

.mini-inst-card strong { display: block; font-size: 14px; margin-bottom: 4px; color: var(--text); }
.mini-inst-card span { font-size: 12px; color: var(--text-muted); }

.match-plan-card {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.match-plan-card:last-child { border-bottom: none; }

.match-plan-head { font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.match-plan-item { font-size: 13px; color: var(--link); padding: 6px 0; cursor: pointer; }

.message-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.message-item:last-child { border-bottom: none; }

.message-item p { font-size: 13px; margin-bottom: 4px; color: var(--text); line-height: 1.5; }
.message-item span { font-size: 11px; color: var(--text-muted); }

.consult-card {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.consult-card:last-child { border-bottom: none; }

.consult-card strong { display: block; font-size: 14px; color: var(--text); margin-bottom: 4px; }
.consult-card span { font-size: 12px; color: var(--text-muted); }

.profile-stats {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.profile-stat {
  flex: 1;
  background: var(--white);
  border-radius: 12px;
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.profile-stat strong { display: block; font-size: 18px; color: var(--text); margin-bottom: 2px; }
.profile-stat span { font-size: 11px; color: var(--text-muted); }

.profile-menu-title { font-size: 13px; color: var(--text-muted); padding: 0 4px 8px; }

.tab-bar-inner {
  display: flex;
  background: var(--white);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
}

.inner-tab {
  flex: 1;
  padding: 10px 4px;
  border: none;
  background: none;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  position: relative;
}

.inner-tab.active { color: var(--primary); font-weight: 600; }

.inner-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 25%;
  width: 50%;
  height: 2px;
  background: var(--primary);
}

.visit-list { padding: 0; border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--radius-sm) var(--radius-sm); background: var(--white); margin-bottom: 16px; }

.visit-card { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.visit-card:last-child { border-bottom: none; }

.visit-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.visit-card-header h3 { font-size: 14px; font-weight: 600; flex: 1; padding-right: 8px; }

.status-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
  flex-shrink: 0;
}

.status-badge.pending { background: var(--primary-light); color: var(--primary); }
.status-badge.completed { background: #ECFDF5; color: var(--success); }
.status-badge.cancelled { background: #FEF2F2; color: var(--danger); }

.visit-detail { font-size: 13px; color: var(--text-secondary); line-height: 1.8; }

.visit-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.visit-card-actions button {
  flex: 1;
  padding: 7px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

.btn-cancel { background: var(--white); border: 1px solid var(--border); color: var(--text-secondary); }
.btn-reschedule { background: var(--primary-light); border: 1px solid var(--primary); color: var(--primary); }

.profile-menu-group { margin-bottom: 12px; }

.menu-list {
  background: var(--white);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 15px;
}

.menu-item:last-child { border-bottom: none; }

.menu-icon-wrap {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
}

.menu-icon-wrap svg { width: 18px; height: 18px; }
.menu-icon-teal { background: var(--primary-light); color: var(--primary); }
.menu-icon-gray { background: var(--bg); color: var(--text-secondary); }

.menu-label { flex: 1; }
.menu-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-right: 6px;
}
.menu-arrow { color: var(--text-muted); font-size: 18px; }

.profile-subpage {
  padding: 12px 16px 24px;
}

.profile-subpage-list:not(:empty) + .profile-empty {
  display: none;
}

.profile-visit-list:not(:empty) + .profile-empty {
  display: none;
}

.favorite-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  cursor: pointer;
}

.favorite-item__main {
  flex: 1;
  min-width: 0;
}

.favorite-item__main strong {
  display: block;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.4;
}

.favorite-item__main span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.favorite-item__remove {
  flex-shrink: 0;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}

.profile-subpage .profile-tabs {
  margin-bottom: 12px;
}

.profile-footer-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding: 16px 0;
  line-height: 1.6;
}

/* ===== Buttons ===== */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(232, 89, 12, 0.2);
}
.btn-secondary { background: var(--white); color: var(--text); border: 1px solid var(--border); padding: 10px 20px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px !important; font-size: 13px !important; }

.badge {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  background: var(--accent);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  border-radius: 9px;
  padding: 0 5px;
  margin-left: 4px;
}

/* ===== Tab Bar ===== */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: calc(var(--tab-height) + var(--safe-bottom));
  padding: 6px 8px calc(6px + var(--safe-bottom));
  background: rgba(255, 252, 248, 0.88);
  backdrop-filter: blur(16px);
  display: flex;
  gap: 4px;
  border-top: 1px solid rgba(231, 229, 228, 0.9);
  z-index: 100;
  box-shadow: 0 -8px 24px rgba(28, 25, 23, 0.06);
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: none;
  background: none;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  border-radius: 14px;
  transition: background .15s ease, color .15s ease;
}

.tab-item.active {
  color: var(--primary);
  background: transparent;
}

.tab-svg { width: 22px; height: 22px; }

.match-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0;
  padding: 10px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
}

.policy-card {
  border-radius: var(--radius-sm);
  box-shadow: none;
  border: none;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 0;
}

/* legacy override removed — see detail/detail.css */

.policy-detail-header {
  background: var(--white);
  color: var(--text);
  padding: 16px;
  border-bottom: 1px solid var(--border-light);
}

.policy-detail-header .policy-cat {
  background: var(--border-light);
  color: var(--text-secondary);
}

.policy-detail-header h2 { color: var(--text); margin-top: 8px; font-size: 17px; }

.visit-code { color: var(--primary); }

.menu-icon-teal { background: var(--primary-pale); color: var(--primary); }

.verified-badge {
  background: var(--primary-pale);
  color: var(--primary);
  font-weight: 700;
}

.btn-book { background: var(--primary); border-color: var(--primary); }

.rating-stars { color: var(--accent); }

.compare-table-inner th { background: #F7F7F7; color: var(--text); border-color: var(--border); }

.compare-tip {
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
}

/* ===== Empty & Toast ===== */
.empty-state { text-align: center; padding: 40px 20px; }
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { color: var(--text-secondary); margin-bottom: 16px; }
.empty-sub { font-size: 13px; color: var(--text-muted); margin-top: -8px; }
.empty-hint { text-align: center; color: var(--text-muted); padding: 40px; font-size: 14px; }

.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(0,0,0,0.75);
  color: var(--white);
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
}

.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* Hide tab bar on sub-pages */
#page-institution-detail.active ~ .tab-bar,
#page-compare.active ~ .tab-bar,
#page-visit-booking.active ~ .tab-bar,
#page-visit-success.active ~ .tab-bar,
#page-policy-detail.active ~ .tab-bar,
#page-match-results.active ~ .tab-bar { display: none; }

#page-compare.active,
#page-visit-booking.active,
#page-visit-success.active,
#page-policy-detail.active,
#page-match-results.active { padding-bottom: 0; }

/* ===== 参考截图 · 机构列表卡片 ===== */
.ref-card { border-radius: 12px; }

.inst-card-body {
  display: flex;
  gap: 12px;
  padding: 14px;
  cursor: pointer;
}

.inst-photo {
  width: 110px;
  height: 110px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.inst-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-badge {
  position: absolute;
  left: 0;
  bottom: 0;
  background: #E8913A;
  color: var(--white);
  font-size: 10px;
  padding: 3px 6px;
}

.inst-name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--text);
}

.inst-policy-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

.policy-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 500;
  white-space: nowrap;
}

.tag-red { background: #FEE2E2; color: #DC2626; border: 1px solid #FECACA; }
.tag-green { background: #ECFDF5; color: #059669; border: 1px solid #A7F3D0; }
.tag-blue { background: #EFF6FF; color: #2563EB; border: 1px solid #BFDBFE; }

.inst-rating { margin-bottom: 4px; }
.rating-empty { font-size: 12px; color: var(--text-muted); letter-spacing: 1px; }
.rating-stars { font-size: 12px; color: var(--accent); }

.inst-services {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.inst-services span { color: var(--border); margin: 0 2px; }

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

.link-map {
  background: none;
  border: none;
  color: var(--link);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  flex-shrink: 0;
}

.inst-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.price-label { font-size: 12px; color: var(--text-secondary); }

.price-range {
  font-size: 17px;
  font-weight: 600;
  color: var(--price);
}

.price-range em {
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  color: var(--text-secondary);
}

.inst-bed-row {
  display: flex;
  gap: 16px;
  align-items: center;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.bed-stat span {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.bed-stat strong { font-size: 14px; color: var(--text); }

/* Detail page styles → detail/detail.css */
