/* 乡赛汇平台增强 UI — 圆角、主题色、留白 */
.platform-section {
  width: min(960px, 94vw);
  margin: 0 auto 2rem;
  padding: 1.25rem 1.35rem 1.5rem;
  background: linear-gradient(165deg, rgba(255, 253, 247, 0.95) 0%, rgba(253, 233, 234, 0.45) 100%);
  border-radius: 20px;
  border: 1px solid rgba(164, 22, 35, 0.08);
  box-shadow: 0 4px 24px rgba(164, 22, 35, 0.06);
}
.platform-section--below-tabs {
  margin-top: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.15rem 1.1rem;
}

.study-dash-head {
  width: min(1200px, 92vw);
  margin: 0.75rem auto 0;
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  border: 1px solid rgba(164, 22, 35, 0.08);
  box-shadow: 0 2px 12px rgba(164, 22, 35, 0.05);
}
.study-dash-head .study-overview-grid {
  margin: 0 0 0.85rem;
}
.study-dash-head .platform-insight {
  margin-top: 0;
  margin-bottom: 0.75rem;
}
.study-dash-head .study-toc {
  margin: 0;
  position: static;
  background: transparent;
  padding: 0;
}
.study-figure-full--lead {
  margin-top: 0;
}
/* 研学配图：与岚皋同结构，限制展示高度避免糊图被放大 */
.study-figure-medium {
  margin: 1rem 0 1.15rem;
}
.study-figure-medium img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.events-live-note {
  margin: -0.35rem 0 1rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.84rem;
  line-height: 1.55;
  color: #666;
  background: rgba(253, 233, 234, 0.45);
  border-radius: 12px;
  border-left: 3px solid var(--primary);
  width: min(960px, 94vw);
  margin-left: auto;
  margin-right: auto;
}

.events-live-section {
  background: linear-gradient(180deg, rgba(255, 253, 247, 0.4) 0%, transparent 100%);
  padding-top: 0.5rem;
  padding-bottom: 2rem;
}

.platform-section .platform-stats {
  gap: 0.75rem;
}
.platform-section .platform-stat-card {
  padding: 0.85rem 1rem;
}
.platform-section .platform-filter-bar {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.9);
}
.platform-section .platform-insight {
  margin-top: 0.5rem;
}

body[data-page="homestays"] .platform-section,
body[data-page="events"] .platform-section {
  background: linear-gradient(165deg, #fffdf8 0%, #fde9ea 35%, #fff9f5 100%);
}

@media (max-width: 720px) {
  .platform-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .study-figure-medium img {
    max-height: 200px;
  }
}
.study-program-intro {
  width: min(1200px, 92vw);
  margin-left: auto;
  margin-right: auto;
}

.platform-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.platform-stat-card {
  background: rgba(255, 255, 255, 0.88);
  border-radius: 16px;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(164, 22, 35, 0.07);
  box-shadow: 0 2px 10px rgba(164, 22, 35, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.platform-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(164, 22, 35, 0.1);
}
.platform-stat-label { margin: 0; font-size: 0.82rem; color: #777; }
.platform-stat-value {
  margin: 0.35rem 0 0;
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.platform-stat-sub { margin: 0.3rem 0 0; font-size: 0.76rem; color: #aaa; }

.platform-insight {
  padding: 1rem 1.2rem;
  margin-top: 0.25rem;
  margin-bottom: 0;
  border-radius: 16px;
  border: 1px solid rgba(164, 22, 35, 0.1);
  background: linear-gradient(135deg, rgba(255, 249, 249, 0.98) 0%, rgba(255, 253, 247, 0.98) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.platform-insight-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
  flex-wrap: wrap;
}
.platform-insight-badge {
  font-size: 0.72rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(164, 22, 35, 0.1);
  color: var(--primary);
  font-weight: 600;
}
.platform-insight-body { margin: 0; font-size: 0.9rem; line-height: 1.65; color: #444; }
.platform-insight-disclaimer { margin: 0.55rem 0 0; font-size: 0.74rem; color: #aaa; }

.platform-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  align-items: center;
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 14px;
  border: 1px solid rgba(164, 22, 35, 0.08);
}
.platform-filter-bar label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.86rem;
  color: #666;
}
.platform-filter-bar select {
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(164, 22, 35, 0.15);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.86rem;
  background: #fff;
  color: #333;
  min-width: 6.5rem;
}
.platform-filter-bar select:focus {
  outline: none;
  border-color: rgba(164, 22, 35, 0.45);
  box-shadow: 0 0 0 3px rgba(164, 22, 35, 0.1);
}

.platform-badge, .platform-tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  margin-right: 0.35rem;
  margin-bottom: 0.25rem;
}
.platform-tag { background: rgba(164, 22, 35, 0.06); color: #666; border: 1px solid rgba(164, 22, 35, 0.1); }
.badge-live { background: #fff1f0; color: #cf1322; border: 1px solid #ffccc7; }
.badge-soon { background: #fff7e6; color: #d46b08; border: 1px solid #ffe7ba; }
.badge-end { background: #f5f5f5; color: #666; border: 1px solid #e8e8e8; }
.badge-pending { background: #fff7e6; color: #d46b08; }
.badge-pass { background: #f6ffed; color: #389e0d; }
.badge-reject { background: #fff1f0; color: #cf1322; }
.badge-default { background: #fafafa; color: #666; }

.event-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  margin: 0.45rem 0;
  font-size: 0.82rem;
  color: #777;
}
.event-enroll { font-size: 0.86rem; color: var(--primary); font-weight: 600; margin: 0.35rem 0; }
.past-stats { font-size: 0.84rem; color: #888; margin: 0.35rem 0; }

.event-media-placeholder {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(253, 233, 234, 0.6) 0%, rgba(255, 245, 240, 0.9) 100%);
  color: var(--primary);
  font-size: 0.86rem;
  opacity: 0.85;
  border-radius: 18px 18px 0 0;
}
.media-empty-hint {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.85rem;
  background: rgba(253, 233, 234, 0.5);
  border-radius: 10px;
  font-size: 0.86rem;
  color: #888;
}

.spot-card-meta, .home-card-meta { font-size: 0.84rem; color: #666; margin: 0.3rem 0; line-height: 1.5; }
.spot-card-meta strong, .home-card-meta strong { color: var(--primary); font-weight: 600; }

.route-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 1.25rem 0;
  align-items: start;
}
.route-detail-grid > .card {
  align-self: start;
}
.route-timeline-panel {
  padding: 1rem 1.15rem;
  align-self: start;
}
.route-timeline-panel h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  color: var(--primary);
}
.route-detail-col {
  min-width: 0;
}
.route-meta-card {
  padding: 1rem 1.15rem;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 16px;
  border: 1px solid rgba(164, 22, 35, 0.08);
  box-shadow: 0 2px 12px rgba(164, 22, 35, 0.05);
}
.route-meta-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 0.85rem; font-size: 0.88rem; }
.route-meta-card dt { color: #888; }
.route-meta-card dd { margin: 0; font-weight: 600; }

.route-timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid rgba(164, 22, 35, 0.2); margin-left: 0.5rem; }
.route-timeline li {
  position: relative;
  padding: 0 0 1.1rem 1.15rem;
  font-size: 0.9rem;
}
.route-timeline li::before {
  content: "";
  position: absolute;
  left: -0.45rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(253, 233, 234, 0.9);
}
.route-timeline time { display: block; font-size: 0.78rem; color: var(--primary); font-weight: 600; margin-bottom: 0.2rem; }

/* 乡赛智助手 */
.xsh-ai-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 50%;
  border: none;
  background: linear-gradient(145deg, #c42e3a, #a41623);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(164, 22, 35, 0.45);
  z-index: 500;
}
.xsh-ai-panel {
  position: fixed;
  right: 1.25rem;
  bottom: 4.75rem;
  width: min(360px, calc(100vw - 2rem));
  max-height: min(420px, 70vh);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
  z-index: 501;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(164, 22, 35, 0.1);
}
.xsh-ai-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0.95rem;
  background: linear-gradient(90deg, #a41623, #c42e3a);
  color: #fff;
}
.xsh-ai-close { background: rgba(255,255,255,0.2); border: none; color: #fff; width: 1.75rem; height: 1.75rem; border-radius: 8px; cursor: pointer; font-size: 1.1rem; }
.xsh-ai-messages { flex: 1; overflow-y: auto; padding: 0.85rem; font-size: 0.88rem; }
.xsh-ai-hint { color: #999; margin: 0; }
.xsh-ai-msg { margin-bottom: 0.65rem; padding: 0.6rem 0.75rem; border-radius: 12px; line-height: 1.5; }
.xsh-ai-msg--user { background: #fde9ea; color: #333; margin-left: 1.5rem; }
.xsh-ai-msg--bot { background: #faf8f6; border: 1px solid rgba(164, 22, 35, 0.08); margin-right: 0.5rem; }
.xsh-ai-msg--bot small { display: block; margin-top: 0.35rem; color: #999; font-size: 0.72rem; }
.xsh-ai-quick { display: flex; flex-wrap: wrap; gap: 0.45rem; padding: 0.75rem; border-top: 1px solid rgba(164, 22, 35, 0.08); background: #faf8f6; }
.xsh-ai-qbtn {
  padding: 0.38rem 0.65rem;
  border: 1px solid rgba(164, 22, 35, 0.15);
  background: #fff;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--primary);
  cursor: pointer;
  font-family: inherit;
}
.xsh-ai-qbtn:hover { background: #fff6f6; }

/* 入口页增强 */
.landing-tagline { font-size: 1rem; opacity: 0.92; max-width: 36rem; margin: 0.5rem auto 0; line-height: 1.55; }
.role-card-tag {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.25);
  margin-bottom: 0.35rem;
}
.landing-page .role-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  padding: 1.5rem 1.35rem 1.4rem;
  background: rgba(255, 255, 255, 0.16);
  min-height: 220px;
}
.landing-page .role-card:hover {
  background: rgba(255, 255, 255, 0.24);
}
.landing-page .role-card .icon {
  margin: 0.15rem 0 0.25rem;
}
.landing-page .role-card h3 {
  margin: 0.25rem 0 0;
  width: 100%;
}
.landing-page .role-card ul {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  width: 100%;
  max-width: 11rem;
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.95;
  line-height: 1.6;
}
.landing-page .role-card ul li {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.landing-page .role-card ul li:last-child {
  border-bottom: none;
}
.landing-page .role-grid {
  align-items: stretch;
}
.landing-content > p:not(.landing-tagline) {
  font-size: 1.08rem;
  letter-spacing: 0.02em;
}
.login-demo-hint { font-size: 0.82rem; color: #888; margin: 0 0 0.75rem; line-height: 1.45; }

/* 体旅线路：长图放入可滚动区域，避免撑出整页空白 */
.route-page-body {
  display: grid;
  gap: 1.25rem;
  margin: 1rem 0 1.5rem;
}
.route-detail-grid--top {
  grid-template-columns: 1fr 1.2fr;
  gap: 1.15rem;
  align-items: start;
}
.route-map-panel {
  padding: 1rem 1.15rem 1.15rem;
  background: linear-gradient(180deg, #fffdf8 0%, #fde9ea 100%);
  border: 1px solid rgba(164, 22, 35, 0.1);
}
.route-map-panel-title {
  margin: 0 0 0.35rem;
  color: var(--primary);
  font-size: 1.05rem;
}
.route-map-panel-hint {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  color: #888;
  line-height: 1.5;
}
.route-map-scroll {
  max-height: none;
  overflow: visible;
  border-radius: 12px;
  border: 1px solid rgba(164, 22, 35, 0.12);
  background: #fff;
}
.route-map-full {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(164, 22, 35, 0.1);
  box-shadow: 0 4px 20px rgba(30, 20, 20, 0.06);
}
.route-map-panel--hero {
  padding: 1.15rem 1.25rem 1.25rem;
  margin-bottom: 1.25rem;
  background: linear-gradient(180deg, #fffdf8 0%, #fff 100%);
}
.route-line-map-img--full {
  width: 100%;
  height: auto;
  display: block;
  max-height: none !important;
}
.route-map-scroll .route-line-map-img {
  width: 100%;
  height: auto;
  max-height: none;
  display: block;
  border-radius: 0;
  box-shadow: none;
}
body[data-page="routes"] #route-content .route-line-intro {
  margin-bottom: 0.5rem;
}
body[data-page="routes"] #route-content h3 {
  margin-top: 1.25rem;
  color: var(--primary);
  padding-left: 0.55rem;
  border-left: 4px solid var(--accent);
}

.platform-notice-bar {
  /* 样式已迁移至 platform-v2.css，此处保留类名避免旧缓存页面失效 */
  display: flex;
  align-items: center;
}

/* 研学概览 */
.study-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin: 1rem 0;
}
.study-overview-item {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(164, 22, 35, 0.08);
  box-shadow: 0 2px 10px rgba(164, 22, 35, 0.05);
  font-size: 0.88rem;
}
.study-overview-item strong { display: block; color: var(--primary); font-size: 0.78rem; margin-bottom: 0.25rem; }
.study-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.85rem 0 1.35rem;
  position: sticky;
  top: 52px;
  z-index: 10;
  background: rgba(255,253,247,0.96);
  padding: 0.55rem 0;
  backdrop-filter: blur(6px);
}
.study-toc a {
  font-size: 0.84rem;
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(164,22,35,0.25);
  color: var(--primary);
  text-decoration: none;
  background: #fff;
}
.study-timeline { border-left: 2px solid rgba(164, 22, 35, 0.2); margin-left: 0.35rem; padding-left: 0; }
.study-timeline-item { padding: 0 0 1rem 1rem; position: relative; }
.study-timeline-item::before {
  content: "";
  position: absolute;
  left: -0.42rem;
  top: 0.4rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.platform-chart { width: 100%; height: 120px; }
.platform-chart--bar { display: flex; align-items: flex-end; gap: 0.5rem; padding-top: 0.5rem; }
.platform-chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.25rem; font-size: 0.72rem; color: #888; }
.platform-chart-bar { width: 100%; max-width: 2rem; background: linear-gradient(180deg, #e85d6a, #a41623); border-radius: 6px 6px 0 0; min-height: 4px; }
.platform-chart--line { background: rgba(253, 233, 234, 0.35); border-radius: 12px; }

.gov-dash-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
  margin-top: 1.15rem;
}
.gov-chart-panel {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 16px;
  padding: 1.1rem;
  border: 1px solid rgba(164, 22, 35, 0.08);
  box-shadow: 0 2px 12px rgba(164, 22, 35, 0.05);
}
.gov-chart-panel h3 { margin: 0 0 0.75rem; font-size: 0.95rem; }

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: #999;
  background: rgba(253, 233, 234, 0.25);
  border-radius: 16px;
  border: 1px dashed rgba(164, 22, 35, 0.15);
}

.gov-stat-grid--dash { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.gov-actions-cell { white-space: nowrap; }
.gov-actions-cell .gov-btn-ghost { margin-right: 0.25rem; }
.gov-btn-pass { color: #389e0d !important; }
.gov-btn-reject { color: #cf1322 !important; }
.gov-risk-list li { border-bottom: none; }
.gov-audience-select { width: 100%; margin-top: 0.35rem; font-family: inherit; }

@media (max-width: 900px) {
  .platform-stats { grid-template-columns: repeat(2, 1fr); }
  .route-detail-grid, .gov-dash-charts, .study-overview-grid { grid-template-columns: 1fr; }
  .route-detail-grid--top { grid-template-columns: 1fr; }
  .platform-section { padding: 1rem; border-radius: 16px; }
}
@media (max-width: 1100px) {
  .gov-stat-grid--dash { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .platform-stats { grid-template-columns: 1fr; }
  .role-grid { grid-template-columns: 1fr !important; }
  .gov-stat-grid--dash { grid-template-columns: 1fr; }
  .platform-filter-bar { flex-direction: column; align-items: stretch; }
  .platform-filter-bar label { justify-content: space-between; }
}
