/**
 * Plan My China Trip 着陆页样式
 *
 * 设计：
 *   - Hero 区域使用长城背景图
 *   - 6 步全部默认展开（无折叠 / 无进度条 / 无面包屑）
 *   - 视觉重心放在第一屏的 H1 + 副标题 + 第一步表单
 *
 * 配色沿用全站 brand token（--brand-red 等），不另起炉灶。
 */

/* ============================================
   页面级背景
   ============================================ */
.page-plan-trip {
  position: relative;
  background-color: #fafaf6;
}

.page-plan-trip::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: #fafaf6;
}

/* ============================================
   Hero 页头（现在在 plan-page 容器内）
   ============================================ */
.plan-hero {
  display: none;
}

.plan-hero-bg {
  display: none;
}

/* 页头在容器内 */
/* 页面主内容贴紧导航 */
.page-plan-trip .main-content {
  padding-top: 0;
}

.plan-page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: clamp(36px, 5vw, 60px) 0 clamp(20px, 3vw, 32px);
  position: relative;
  z-index: 1;
}

.plan-page-header-text h1 {
  margin: 0;
  font-family: var(--font-heading, Georgia, serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--color-primary-dark, #0d3a46);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.plan-page-header .plan-hero-desc {
  margin: 10px 0 0;
  color: var(--color-text, #2c3e50);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 480px;
}

.plan-page-header .plan-hero-lead {
  margin: 0;
  color: var(--color-primary-dark, #0d3a46);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: right;
  max-width: 280px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  white-space: normal;
  margin-right: 40px;
}

.plan-page-header .plan-hero-lead svg {
  flex-shrink: 0;
  margin-top: 2px;
}

@media (max-width: 720px) {
  .plan-page-header {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .plan-page-header .plan-hero-lead {
    text-align: left;
  }
}

/* 长城背景：作为 plan-page 容器的右上角装饰 */
.plan-page {
  position: relative;
  overflow: hidden;
}

.plan-page::before {
  content: "";
  position: absolute;
  top: 0;
  right: var(--space-lg, 1.5rem);
  width: 480px;
  height: 520px;
  background: url("/assets/images/greatwall-hero.webp") right center / cover no-repeat;
  opacity: 0.7;
  mask-image: radial-gradient(ellipse at 60% 40%, rgba(0,0,0,0.9) 10%, rgba(0,0,0,0.4) 45%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 40%, rgba(0,0,0,0.9) 10%, rgba(0,0,0,0.4) 45%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

@media (max-width: 720px) {
  .plan-page::before {
    width: 250px;
    height: 300px;
    top: -80px;
    right: -20px;
    opacity: 0.4;
  }
}

.plan-hero-text h1 {
  margin: 0;
  font-family: var(--font-heading, Georgia, serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--color-primary-dark, #0d3a46);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.plan-hero-desc {
  margin: 10px 0 0;
  color: var(--color-text, #2c3e50);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 480px;
}

.plan-eyebrow {
  margin: 0 0 8px;
  color: var(--brand-red, #EF3B3A);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.plan-hero-lead {
  margin: 0;
  color: var(--color-text-light, #63747a);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: right;
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 720px) {
  .plan-hero-lead {
    text-align: left;
  }
}

/* 保留旧类名兼容（以防模板还引用） */
.plan-topbar { display: none; }

/* ============================================
   表单容器
   ============================================ */
.plan-page {
  max-width: 1240px;
  padding-top: var(--space-lg, 20px);
  padding-bottom: var(--space-2xl, 48px);
}

.plan-form {
  position: relative;
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

/* ============================================
   Step 块（全部默认打开，无 accordion 折叠）
   ============================================ */
   ============================================ */
.plan-step {
  background: #fff;
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.08));
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(9, 43, 53, 0.04);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.plan-step.is-open {
  box-shadow: 0 14px 36px rgba(9, 43, 53, 0.08);
  border-color: rgba(239, 59, 58, 0.20);
}

/* head：标题块（普通展示，不可折叠） */
.plan-step-head {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: clamp(16px, 2.4vw, 24px);
  padding-bottom: clamp(8px, 1.4vw, 14px);
}

/* 步骤头部右侧图片（如 Who's coming along 的旅行者照片） */
.plan-step-hero-img {
  width: 160px;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
}

/* Who's coming along 步骤 — 原图作为整个 section 背景，按宽度等比缩放 */
.plan-step--has-bg {
  position: relative;
  background: url("/assets/images/travelbuddy-banner.webp") top center / cover no-repeat;
  background-color: #fff;
}

.plan-step--has-bg .plan-step-head {
  grid-template-columns: 48px 1fr;
}

.plan-step--has-bg .plan-step-head::after {
  display: none;
}

@media (max-width: 720px) {
  .plan-step-head {
    grid-template-columns: 48px 1fr;
  }
  .plan-step-hero-img {
    display: none;
  }
}

.plan-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--brand-red-soft, rgba(239, 59, 58, 0.10));
  color: var(--brand-red, #EF3B3A);
  font-weight: 900;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.plan-step-headline {
  min-width: 0;
}

.plan-step-headline h2 {
  margin: 0 0 4px;
  font-family: var(--font-heading, Georgia, serif);
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  font-weight: 700;
  color: var(--color-primary-dark, #0d3a46);
  line-height: 1.25;
}

.plan-step-headline p {
  margin: 0;
  color: var(--color-text-light, #63747a);
  font-size: 0.88rem;
  line-height: 1.55;
}

/* body 容器：直接展示 */
.plan-step-body {
  padding: 0 clamp(16px, 2.4vw, 24px) clamp(20px, 3vw, 28px);
}

/* ============================================
   通用字段
   ============================================ */
.plan-field {
  display: block;
  width: 100%;
}

.plan-label,
.plan-label-inline {
  display: block;
  margin-bottom: 8px;
  color: var(--color-text, #2c3e50);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.plan-label-inline {
  margin-top: 22px;
}

.plan-label .required {
  color: var(--brand-red, #EF3B3A);
}

.plan-form input[type="text"],
.plan-form input[type="email"],
.plan-form input[type="tel"],
.plan-form input[type="number"],
.plan-form select,
.plan-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border, #e0e6ed);
  border-radius: 10px;
  background: #fff;
  color: var(--color-text, #2c3e50);
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.4;
  transition: border-color 0.15s, box-shadow 0.15s;
}

/* 日期输入框日历图标 */
#plan-date-start {
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2363747a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='18' rx='2'/><line x1='16' y1='2' x2='16' y2='6'/><line x1='8' y1='2' x2='8' y2='6'/><line x1='3' y1='10' x2='21' y2='10'/></svg>") no-repeat right 12px center;
  padding-right: 38px;
  cursor: pointer;
}

.plan-form input:focus,
.plan-form select:focus,
.plan-form textarea:focus {
  outline: none;
  border-color: var(--brand-red, #EF3B3A);
  box-shadow: 0 0 0 3px var(--brand-red-soft, rgba(239, 59, 58, 0.15));
}

.plan-form textarea {
  resize: vertical;
  min-height: 90px;
}

.plan-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 14px;
}

.plan-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Who's coming along 步骤内的输入框缩短，不遮挡右侧人物 */
.plan-step--has-bg .plan-grid-3 {
  max-width: 65%;
}

@media (max-width: 640px) {
  .plan-grid-2,
  .plan-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Step 1 · Where（Tab 切换：Map / List）
   ============================================ */
.plan-where-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--color-border, rgba(0, 0, 0, 0.08));
  padding-bottom: 8px;
  flex-wrap: wrap;
}

.plan-where-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
  border: 0;
  border-radius: 8px 8px 0 0;
  color: var(--color-text-light, #63747a);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  transition: color 0.15s, background 0.15s;
}

.plan-where-tab svg {
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.plan-where-tab:hover {
  color: var(--color-text, #2c3e50);
  background: rgba(0, 0, 0, 0.03);
}

.plan-where-tab:hover svg {
  opacity: 1;
}

.plan-where-tab:focus-visible {
  outline: 2px solid var(--brand-red, #EF3B3A);
  outline-offset: 2px;
}

.plan-where-tab.is-active {
  color: var(--brand-red-hover, #DC2F2F);
}

.plan-where-tab.is-active svg {
  opacity: 1;
  color: var(--brand-red, #EF3B3A);
}

.plan-where-tab.is-active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -9px;
  height: 2px;
  background: var(--brand-red, #EF3B3A);
  border-radius: 2px;
}

.plan-where-summary {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--color-text-light, #63747a);
  font-weight: 600;
}

.plan-where-summary:empty {
  display: none;
}

.plan-where-view {
  position: relative;
}

/* ----- 抽象高铁网络图 + 已选面板 ----- */

.plan-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
  gap: 18px;
  align-items: stretch;
}

@media (max-width: 820px) {
  .plan-map-layout {
    grid-template-columns: 1fr;
  }
}

.plan-rail-map {
  position: relative;
  padding: 6px 10px;
  background:
    radial-gradient(circle at 50% 40%, rgba(239, 59, 58, 0.04), transparent 60%),
    var(--color-bg-warm, #f7f4ee);
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.08));
  border-radius: 14px;
  user-select: none;
  margin: 0;
}

.plan-rail-map svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 82 / 71;
}

/* 已选城市面板 */
.plan-selected-panel {
  display: flex;
  flex-direction: column;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.08));
  border-radius: 14px;
}

.plan-selected-empty {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-align: left;
}

.plan-selected-empty-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.plan-selected-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 0;
  border-radius: 10px;
  background: var(--brand-red-soft, rgba(239, 59, 58, 0.10));
  color: var(--brand-red, #EF3B3A);
  flex-shrink: 0;
}

.plan-selected-empty h4 {
  margin: 0;
  font-family: var(--font-heading, Georgia, serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-primary-dark, #0d3a46);
}

.plan-selected-empty > p {
  margin: 0 0 14px;
  color: var(--color-text-light, #63747a);
  font-size: 0.86rem;
  line-height: 1.55;
}

.plan-selected-tips {
  list-style: none;
  margin: 0;
  padding: 12px 0 0;
  border-top: 1px dashed var(--color-border, rgba(0, 0, 0, 0.08));
  display: grid;
  gap: 6px;
}

.plan-selected-tips li {
  position: relative;
  padding-left: 16px;
  color: var(--color-text-light, #63747a);
  font-size: 0.82rem;
  line-height: 1.5;
}

.plan-selected-tips li::before {
  content: "·";
  position: absolute;
  left: 4px;
  top: -3px;
  color: var(--brand-red, #EF3B3A);
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
}

/* 填充态 */
.plan-selected-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border, rgba(0, 0, 0, 0.08));
}

.plan-selected-count {
  font-family: var(--font-heading, Georgia, serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--brand-red, #EF3B3A);
  line-height: 1;
}

.plan-selected-label {
  color: var(--color-text-light, #63747a);
  font-size: 0.86rem;
  font-weight: 600;
}

.plan-selected-clear {
  margin-left: auto;
  padding: 4px 8px;
  background: transparent;
  border: 0;
  color: var(--color-text-light, #63747a);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.plan-selected-clear:hover {
  color: var(--brand-red, #EF3B3A);
  background: rgba(239, 59, 58, 0.06);
}

.plan-selected-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.plan-selected-list li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px 6px 12px;
  background: var(--brand-red-soft, rgba(239, 59, 58, 0.10));
  border: 1px solid rgba(239, 59, 58, 0.25);
  border-radius: 999px;
  color: var(--brand-red-hover, #DC2F2F);
  font-size: 0.84rem;
  font-weight: 700;
}

.plan-selected-list button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--brand-red, #EF3B3A);
  cursor: pointer;
  transition: background 0.15s;
}

.plan-selected-list button:hover {
  background: rgba(239, 59, 58, 0.18);
}

.plan-selected-list button:focus-visible {
  outline: 2px solid var(--brand-red, #EF3B3A);
  outline-offset: 1px;
}

.rail-link {
  stroke: rgba(9, 43, 53, 0.18);
  stroke-width: 0.25;
  stroke-dasharray: 0.5 0.5;
  fill: none;
  transition: stroke 0.2s, stroke-width 0.2s, stroke-dasharray 0.2s;
}

.rail-link.is-active {
  stroke: var(--brand-red, #EF3B3A);
  stroke-width: 0.13;
  stroke-dasharray: none;
}

.rail-city {
  cursor: pointer;
  outline: none;
}

.rail-city-halo {
  fill: rgba(239, 59, 58, 0.18);
  opacity: 0;
  transition: opacity 0.2s, r 0.2s;
}

.rail-city-dot {
  fill: #fff;
  stroke: var(--brand-red, #EF3B3A);
  stroke-width: 0.3;
  transition: fill 0.15s, stroke-width 0.15s, r 0.15s;
}

.rail-city-label {
  fill: var(--color-text, #2c3e50);
  font-weight: 600;
  pointer-events: auto;
  user-select: none;
  cursor: pointer;
  font-family: -apple-system, "Segoe UI", system-ui, sans-serif;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 0.3;
  stroke-linejoin: round;
  transition: fill 0.15s, font-weight 0.15s;
}

/* 城市代表景点图标：outline 线条画风（stroke 而非 fill） */
.rail-city-icon {
  fill: none;
  stroke: rgba(9, 43, 53, 0.32);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  transition: stroke 0.18s, opacity 0.18s;
  vector-effect: non-scaling-stroke;
}

/* 选中状态：图标变品牌红（同步 city is-selected） */
.rail-city-icon.is-selected {
  stroke: var(--brand-red, #EF3B3A);
}

.rail-city:hover .rail-city-halo,
.rail-city:focus-visible .rail-city-halo {
  opacity: 1;
}

.rail-city:hover .rail-city-dot,
.rail-city:focus-visible .rail-city-dot {
  fill: var(--brand-red, #EF3B3A);
}

.rail-city:hover .rail-city-label,
.rail-city:focus-visible .rail-city-label {
  fill: var(--brand-red-hover, #DC2F2F);
  font-weight: 700;
}

.rail-city.is-selected .rail-city-dot {
  fill: var(--brand-red, #EF3B3A);
  stroke: #fff;
  stroke-width: 0.3;
  r: 1.0;
}

.rail-city.is-selected .rail-city-halo {
  opacity: 1;
  fill: rgba(239, 59, 58, 0.22);
}

.rail-city.is-selected .rail-city-label {
  fill: var(--brand-red-hover, #DC2F2F);
  font-weight: 700;
}

.plan-rail-map-hint {
  margin: 6px 0 4px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--color-text-light, #63747a);
  opacity: 0.85;
}

/* ----- 城市 chip 列表 ----- */
.plan-city-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  max-height: none;
  overflow: visible;
  padding: 0;
}

.plan-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--color-border, #e0e6ed);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.plan-chip:hover {
  border-color: rgba(239, 59, 58, 0.4);
  background: rgba(239, 59, 58, 0.03);
}

.plan-chip input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--brand-red, #EF3B3A);
  cursor: pointer;
}

.plan-chip-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.plan-chip-title {
  color: var(--color-text, #2c3e50);
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.3;
}

.plan-chip-tag {
  color: var(--color-text-light, #63747a);
  font-size: 0.78rem;
  line-height: 1.4;
}

.plan-chip.is-selected {
  border-color: var(--brand-red, #EF3B3A);
  background: var(--brand-red-soft, rgba(239, 59, 58, 0.08));
}

.plan-chip.is-selected .plan-chip-title {
  color: var(--brand-red-hover, #DC2F2F);
}

.plan-field-other {
  margin-top: 18px;
}

/* ============================================
   Step 2 · Date radios
   ============================================ */
.plan-radio-stack {
  display: grid;
  gap: 10px;
}

/* 横向 3 列变体（用于 When 三档） */
.plan-radio-stack--row {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 720px) {
  .plan-radio-stack--row {
    grid-template-columns: 1fr;
  }
}

.plan-radio,
.plan-pill {
  position: relative;
  cursor: pointer;
}

.plan-radio input,
.plan-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.plan-radio-body {
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 2px;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid var(--color-border, #e0e6ed);
  border-radius: 10px;
  background: #fff;
  height: 100%;
  transition: border-color 0.15s, background 0.15s;
}

/* 图标占两行 */
.plan-radio-body .plan-radio-icon {
  grid-row: 1 / -1;
  align-self: center;
}

/* 标题和描述在右列纵向排列 */
.plan-radio-body .plan-radio-title {
  grid-column: 2;
}

.plan-radio-body .plan-radio-tag {
  grid-column: 2;
}

.plan-radio:hover .plan-radio-body {
  border-color: rgba(239, 59, 58, 0.35);
}

.plan-radio input:checked + .plan-radio-body {
  border-color: var(--brand-red, #EF3B3A);
  background: var(--brand-red-soft, rgba(239, 59, 58, 0.08));
}

.plan-radio-title {
  display: block;
  color: var(--color-text, #2c3e50);
  font-weight: 700;
}

/* Radio 图标 */
.plan-radio-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-red-soft, rgba(239, 59, 58, 0.08));
  color: var(--brand-red, #EF3B3A);
  border-radius: 10px;
  flex-shrink: 0;
}
  font-weight: 700;
  font-size: 0.95rem;
}

.plan-radio-tag {
  display: block;
  margin-top: 2px;
  color: var(--color-text-light, #63747a);
  font-size: 0.82rem;
}

.plan-radio input:checked + .plan-radio-body .plan-radio-title {
  color: var(--brand-red-hover, #DC2F2F);
}

.plan-date-panel {
  margin-top: 16px;
}

/* ============================================
   Step 3 · Traveler types pills
   ============================================ */
.plan-traveler-types {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.plan-pill span {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid var(--color-border, #e0e6ed);
  border-radius: 8px;
  background: #fff;
  color: var(--color-text, #2c3e50);
  font-size: 0.9rem;
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.plan-pill:hover span {
  border-color: rgba(239, 59, 58, 0.4);
}

.plan-pill input:checked + span {
  border-color: var(--brand-red, #EF3B3A);
  background: var(--brand-red, #EF3B3A);
  color: #fff;
}

/* ============================================
   Step 4 · Hotel cards
   ============================================ */
.plan-hotel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 900px) {
  .plan-hotel-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .plan-hotel-grid {
    grid-template-columns: 1fr;
  }
}

.plan-hotel-card {
  position: relative;
  cursor: pointer;
}

.plan-hotel-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.plan-hotel-body {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--color-border, #e0e6ed);
  border-radius: 12px;
  background: #fff;
  height: 100%;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.plan-hotel-card:hover .plan-hotel-body {
  border-color: rgba(239, 59, 58, 0.35);
  transform: translateY(-1px);
}

.plan-hotel-card input:checked + .plan-hotel-body {
  border-color: var(--brand-red, #EF3B3A);
  background: var(--brand-red-soft, rgba(239, 59, 58, 0.08));
  box-shadow: 0 0 0 3px var(--brand-red-soft, rgba(239, 59, 58, 0.12));
}

.plan-hotel-title {
  font-weight: 800;
  color: var(--color-text, #2c3e50);
  font-size: 0.98rem;
}

.plan-hotel-price {
  color: var(--brand-red-hover, #DC2F2F);
  font-size: 0.84rem;
  font-weight: 700;
}

.plan-hotel-desc {
  margin-top: 2px;
  color: var(--color-text-light, #63747a);
  font-size: 0.83rem;
  line-height: 1.45;
}

/* ============================================
   Step 5 · Tags grid
   ============================================ */
.plan-tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.plan-tag-grid--small {
  gap: 6px;
}

.plan-tag {
  position: relative;
  cursor: pointer;
}

.plan-tag input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.plan-tag span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--color-border, #e0e6ed);
  border-radius: 8px;
  background: #fff;
  color: var(--color-text, #2c3e50);
  font-size: 0.88rem;
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.plan-tag:hover span {
  border-color: rgba(239, 59, 58, 0.4);
}

.plan-tag input:checked + span {
  border-color: var(--brand-red, #EF3B3A);
  background: var(--brand-red, #EF3B3A);
  color: #fff;
}

.plan-tag--soft input:checked + span,
.plan-tag--messaging input:checked + span {
  background: var(--brand-red-soft, rgba(239, 59, 58, 0.10));
  color: var(--brand-red-hover, #DC2F2F);
  border-color: var(--brand-red, #EF3B3A);
}

.plan-occasion {
  margin-top: 4px;
}

/* ============================================
   反垃圾 honeypot（视觉隐藏）
   ============================================ */
.plan-hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* ============================================
   Phone 复合字段：图标 + 国家+区号 select + 号码 input
   ============================================ */
.plan-phone-field {
  margin-bottom: 14px;
}

/* "Also reachable on:" 紧贴 phone 下方，作为附属 */
.plan-phone-also {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 8px;
}

.plan-phone-also-label {
  color: var(--color-text-light, #63747a);
  font-size: 0.82rem;
  font-weight: 600;
}

.plan-phone-also .plan-tag span {
  padding: 5px 12px;
  font-size: 0.82rem;
}

.plan-phone-wrap {
  display: grid;
  grid-template-columns: 44px minmax(0, 1.05fr) minmax(0, 1.6fr);
  align-items: stretch;
  border: 1px solid var(--color-border, #e0e6ed);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.plan-phone-wrap:focus-within {
  border-color: var(--brand-red, #EF3B3A);
  box-shadow: 0 0 0 3px var(--brand-red-soft, rgba(239, 59, 58, 0.15));
}

.plan-phone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 59, 58, 0.06);
  color: var(--brand-red, #EF3B3A);
  border-right: 1px solid var(--color-border, #e0e6ed);
}

/* select / input 共享：清掉边框（合体框） + 透明背景 */
.plan-phone-wrap select,
.plan-phone-wrap input[type="tel"] {
  padding: 12px 14px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font: inherit;
  color: var(--color-text, #2c3e50);
  min-width: 0;
}

.plan-phone-wrap select {
  border-right: 1px solid var(--color-border, #e0e6ed) !important;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2363747a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 12px 12px !important;
  padding-right: 30px;
  cursor: pointer;
  font-size: 0.95rem;
}

.plan-phone-wrap select:focus,
.plan-phone-wrap input[type="tel"]:focus {
  outline: none;
  background: transparent !important;
}

@media (max-width: 540px) {
  .plan-phone-wrap {
    grid-template-columns: 44px minmax(0, 1fr);
    grid-auto-rows: minmax(0, auto);
  }
  .plan-phone-wrap input[type="tel"] {
    grid-column: 1 / -1;
    border-top: 1px solid var(--color-border, #e0e6ed) !important;
  }
}


/* ============================================
   提交按钮
   ============================================ */
.plan-submit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.08));
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(9, 43, 53, 0.06);
}

@media (max-width: 640px) {
  .plan-submit-row {
    grid-template-columns: 1fr;
  }
}

.plan-submit-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  color: var(--color-text-light, #63747a);
  font-size: 0.86rem;
  line-height: 1.55;
}

.plan-submit-note svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--brand-red, #EF3B3A);
}

.plan-submit-note a {
  color: var(--brand-red, #EF3B3A);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.plan-submit-note a:hover {
  color: var(--brand-red-hover, #DC2F2F);
}

.plan-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 28px;
  background: linear-gradient(135deg, var(--brand-red, #EF3B3A), var(--brand-red-hover, #DC2F2F));
  color: #fff;
  border: 0;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 14px 32px var(--brand-red-shadow, rgba(239, 59, 58, 0.32));
  transition: transform 0.12s, box-shadow 0.15s;
}

.plan-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px var(--brand-red-shadow, rgba(239, 59, 58, 0.4));
}

.plan-submit:focus-visible {
  outline: 3px solid rgba(239, 59, 58, 0.36);
  outline-offset: 3px;
}

.plan-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.plan-submit .arrow {
  font-size: 1.2rem;
  line-height: 1;
}

/* ============================================
   提交时蒙版
   ============================================ */
.plan-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 14px;
  z-index: 5;
  font-weight: 600;
  color: var(--color-text, #2c3e50);
}

.plan-overlay[hidden] {
  display: none;
}

.plan-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(239, 59, 58, 0.2);
  border-top-color: var(--brand-red, #EF3B3A);
  border-radius: 50%;
  animation: plan-spin 0.7s linear infinite;
}

@keyframes plan-spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   提交结果
   ============================================ */
.plan-success {
  padding: clamp(36px, 6vw, 56px);
  background: #fff;
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.08));
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 14px 36px rgba(9, 43, 53, 0.08);
}

.plan-success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  background: var(--brand-red-soft, rgba(239, 59, 58, 0.10));
  color: var(--brand-red, #EF3B3A);
  border-radius: 50%;
}

.plan-success h2 {
  margin: 0 0 12px;
  font-family: var(--font-heading, Georgia, serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--color-primary-dark, #0d3a46);
}

.plan-success p {
  margin: 0 0 12px;
  color: var(--color-text, #2c3e50);
  line-height: 1.7;
}

.plan-success-meta {
  margin-top: 22px;
  color: var(--color-text-light, #63747a);
  font-size: 0.95rem;
}

.plan-success-meta a {
  color: var(--brand-red, #EF3B3A);
  font-weight: 700;
}

.plan-result-error {
  margin-top: 14px;
  padding: 12px 16px;
  background: rgba(239, 59, 58, 0.08);
  border-left: 3px solid var(--brand-red, #EF3B3A);
  color: var(--brand-red-hover, #DC2F2F);
  font-size: 0.92rem;
  border-radius: 4px;
}

/* ============================================
   Trust Strip（替代 How it works）
   ============================================ */
.plan-trust-strip {
  margin-top: 48px;
  padding: clamp(24px, 3vw, 36px);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 14px;
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.06));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.plan-trust-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.plan-trust-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-red-soft, rgba(239, 59, 58, 0.10));
  color: var(--brand-red, #EF3B3A);
  border-radius: 50%;
  flex-shrink: 0;
}

.plan-trust-item strong {
  display: block;
  font-size: 0.95rem;
  color: var(--color-primary-dark, #0d3a46);
  margin-bottom: 2px;
}

.plan-trust-item p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--color-text-light, #63747a);
  line-height: 1.4;
}

@media (max-width: 800px) {
  .plan-trust-strip {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* 隐藏旧的 howto（保留 CSS 以防残留 HTML） */
.plan-howto { display: none; }

/* ============================================
   FAQ
   ============================================ */
.plan-faq {
  margin-top: 48px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.plan-faq h2 {
  margin: 0 0 8px;
  text-align: center;
  font-family: var(--font-heading, Georgia, serif);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  color: var(--color-primary-dark, #0d3a46);
}

/* 标题下方装饰图标 */
.plan-faq-icon-deco {
  display: block;
  text-align: center;
  margin-bottom: 24px;
  color: var(--brand-red, #EF3B3A);
}

/* 旧版 FAQ item（保留兼容） */
.plan-faq-item {
  padding: 18px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.plan-faq-item:last-child {
  border-bottom: 0;
}

.plan-faq-item h3 {
  margin: 0 0 8px;
  color: var(--color-primary-dark, #0d3a46);
  font-family: var(--font-heading, Georgia, serif);
  font-size: 1.1rem;
}

.plan-faq-item p {
  margin: 0;
  color: var(--color-text, #2c3e50);
  line-height: 1.7;
}

/* 新版 FAQ 卡片 */
.plan-faq-card {
  background: #fff;
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.08));
  border-radius: 10px;
  margin-bottom: 10px;
  transition: border-color 0.2s;
}

.plan-faq-card[open] {
  border-color: rgba(239, 59, 58, 0.2);
}

.plan-faq-card summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.plan-faq-card summary::-webkit-details-marker {
  display: none;
}

.plan-faq-card summary::marker {
  display: none;
  content: "";
}

.plan-faq-q-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-red-soft, rgba(239, 59, 58, 0.08));
  color: var(--brand-red, #EF3B3A);
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.plan-faq-q-text {
  flex: 1;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-primary-dark, #0d3a46);
}

.plan-faq-chevron {
  flex-shrink: 0;
  color: var(--brand-red, #EF3B3A);
  transition: transform 0.2s;
}

.plan-faq-card[open] .plan-faq-chevron {
  transform: rotate(180deg);
}

.plan-faq-card p {
  margin: 0;
  padding: 0 20px 16px 66px;
  color: var(--color-text, #2c3e50);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ============================================
   隐藏全局 footer 的中段三栏导航（减少转化漏斗的出口干扰）
   保留：trust bar（信任卖点）+ 版权
   隐藏：Popular Routes / Travel Guide / Help 三栏内链
   ============================================ */
.page-plan-trip .footer-grid,
.page-plan-trip .footer-bottom-divider {
  display: none;
}

/* ============================================
   Reduced motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .plan-form *,
  .plan-form *::before,
  .plan-form *::after {
    transition: none !important;
    animation: none !important;
  }
  .plan-spinner {
    animation: none !important;
    border-top-color: var(--brand-red, #EF3B3A);
  }
}


/* --- 输入框内左侧图标 --- */
.plan-input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.plan-input-icon-wrap .plan-input-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-light, #5d6d7e);
  pointer-events: none;
  flex-shrink: 0;
}

.plan-form .plan-input-icon-wrap input[type="text"],
.plan-form .plan-input-icon-wrap input[type="email"] {
  padding-left: 2.4rem;
  width: 100%;
}


/* ============================================
   手机端贴边优化（≤ 640px）
   ============================================ */
@media (max-width: 640px) {
  /* 页面容器贴边 */
  .page-plan-trip .container {
    padding-left: 8px;
    padding-right: 8px;
  }

  .plan-page {
    padding-top: var(--space-sm, 8px);
    padding-bottom: var(--space-lg, 24px);
  }

  /* step 卡片贴边：去圆角、去左右边框 */
  .plan-step {
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin-left: -8px;
    margin-right: -8px;
  }

  /* step 内部 padding 收紧 */
  .plan-step-head {
    padding: 12px 12px 8px;
    gap: 10px;
  }

  .plan-step-body {
    padding: 0 12px 16px;
  }

  /* 地图容器全宽、加大 */
  .plan-rail-map {
    margin-left: -12px;
    margin-right: -12px;
    padding: 6px 4px;
    min-height: 320px;
    border: none;
    border-radius: 0;
  }

  /* 地图文字手机端加大 */
  .plan-rail-map .rail-city-label {
    font-size: 2.2px;
  }

  /* 已选面板：图标和标题同行 */
  .plan-selected-empty {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
  }

  /* 隐藏 tab 旁的 "3 selected" 计数（避免抖动） */
  .plan-where-summary {
    display: none;
  }

  /* 已选面板：选中城市后隐藏提示文字，只保留标签 */
  .plan-selected-empty {
    display: none;
  }

  /* 已选面板贴边、去边框 */
  .plan-selected-panel {
    border: none;
    border-radius: 0;
    padding: 12px 0;
  }

  /* 城市标签缩小 */
  .plan-selected-list {
    gap: 6px;
  }

  .plan-selected-list li {
    font-size: 0.78rem;
    padding: 4px 8px 4px 10px;
  }

  /* 步骤间距收紧 */
  .plan-form {
    gap: 12px;
  }

  /* header 区域收紧 */
  .plan-page-header {
    padding: 24px 4px 12px;
  }
}


/* Occasion 标签内 SVG 图标对齐 */
.plan-occasion .plan-tag span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.plan-occasion .plan-tag span svg {
  flex-shrink: 0;
}


/* Traveler type pill 内 SVG 图标对齐 */
.plan-traveler-types .plan-pill span {
  gap: 6px;
}

.plan-traveler-types .plan-pill span svg {
  flex-shrink: 0;
}
