/* G3 出发页 — CLIENT_UI_DESIGN_SYSTEM_V1 最小统一（仅 Pretrip） */

:root {
  /* 品牌 */
  --gwm-brand: #A64D79;
  --gwm-brand-accent: #B14B72;
  --gwm-brand-highlight: #D86CA0;
  --gwm-brand-deep: #7F365F;
  --gwm-bg-dark: #1F2126;
  --gwm-text-title: #FFFFFF;
  --gwm-text-sub: #E6E7EA;
  --gwm-text-body: #D6D7DA;
  --gwm-text-muted: #AEB1B8;
  /* TOP100 强调（规范允许） */
  --gwm-top100-accent: #E87AAE;
  /* 毛玻璃 */
  --gwm-glass-dark-bg: rgba(31, 33, 38, 0.62);
  --gwm-glass-light-bg: rgba(255, 255, 255, 0.16);
  --gwm-glass-dark-input: rgba(31, 33, 38, 0.72);
  --gwm-glass-blur: 24px;
  /* 路线下拉菜单 — 深灰透色毛玻璃 */
  --pretrip-route-menu-bg: rgba(36, 38, 44, 0.48);
  --pretrip-route-menu-border: rgba(255, 255, 255, 0.10);
  /* Tinted Glass 选中态 */
  --gwm-active-gradient: linear-gradient(135deg, rgba(166, 77, 121, 0.88), rgba(216, 108, 160, 0.48));
  --gwm-active-glow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset, 0 8px 22px rgba(166, 77, 121, 0.28), 0 0 28px rgba(216, 108, 160, 0.20);
  --gwm-active-border: rgba(216, 108, 160, 0.75);
  --gwm-active-text: #FFFFFF;
  --gwm-transition-fast: 180ms ease-out;
  --gwm-transition-normal: 260ms ease-out;
  /* Pretrip 布局 */
  --pretrip-card-h: 83px;
  --pretrip-panel-bottom: calc(var(--gwm-tab-bar-h) + var(--pretrip-card-h) + 24px);
  --pretrip-canvas-bg-image: url("../images/pretrip-scene-default-v1.png");
  --pretrip-canvas-bg-position: center 38%;
}

html.pretrip-page {
  background-color: var(--gwm-bg-dark);
  background-image:
    linear-gradient(to bottom, var(--gwm-bg-dark) 0 var(--gwm-safe-top), transparent var(--gwm-safe-top)),
    var(--pretrip-canvas-bg-image);
  background-position: 0 0, var(--pretrip-canvas-bg-position);
  background-size: 100% 100%, cover;
  background-repeat: no-repeat;
}

body.pretrip-page {
  background: transparent;
}

body.pretrip-page .app-shell {
  max-width: 100%;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
}

.pretrip-home {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #fff;
}

.pretrip-home .pretrip-bg {
  position: absolute;
  top: env(safe-area-inset-top, 0px);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--gwm-bg-dark) url("../images/pretrip-scene-default-v1.png") center 38% / cover no-repeat;
  transition: opacity 0.18s ease;
}

.pretrip-home .pretrip-bg.is-switching {
  opacity: 0.72;
}

.pretrip-home .pretrip-bg.is-animated {
  animation: pretripSlowZoom 28s ease-in-out infinite;
  transform-origin: center 44%;
  will-change: transform;
}

.pretrip-home .pretrip-bg-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  opacity: 0;
  pointer-events: none;
  transition: opacity .55s ease;
}

.pretrip-home .pretrip-bg-video.is-active { opacity: 1; }
.pretrip-home .pretrip-bg.is-video-fallback { opacity: 0; }

.pretrip-home .pretrip-hiker-persona {
  position: absolute;
  z-index: 1;
  right: -10%;
  bottom: 0;
  width: 120%;
  height: 86%;
  object-fit: contain;
  object-position: center bottom;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 8px 12px rgba(5, 15, 25, .28));
  transition: opacity .28s ease;
}

@keyframes pretripSlowZoom {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.28); }
}

@media (prefers-reduced-motion: reduce) {
  .pretrip-home .pretrip-bg.is-animated { animation: none; }
  .pretrip-home .pretrip-bg-video { transition: none; }
}

.pretrip-home .pretrip-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
  pointer-events: none;
}

.pretrip-home .pretrip-content {
  --brand-cn-size: clamp(30px, 7.8vw, 37px);
  position: relative;
  z-index: 2;
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding:
    calc(env(safe-area-inset-top, 0px) + 18px)
    16px
    calc(var(--gwm-tab-bar-h) + 12px);
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

/* Brand Block — 左右组合 Logo，完整显示文案 */
.pretrip-brand {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-bottom: clamp(80px, 12vh, 120px);
  overflow: visible;
}

.pretrip-brand-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  column-gap: 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.pretrip-brand-cn {
  margin: 0;
  font-family: "STKaiti", "KaiTi", "LXGW WenKai", "Kaiti SC", "AR PL UKai CN", serif;
  font-size: var(--brand-cn-size);
  font-weight: 600;
  color: #FFFFFF;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  flex: 0 0 auto;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.22);
}

.pretrip-brand-side {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
  padding-top: 1px;
  overflow: visible;
}

.pretrip-brand-en {
  display: block;
  margin: 0;
  max-width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Segoe UI", sans-serif;
  font-size: clamp(11px, 2.86vw, 13px);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: rgba(255, 255, 255, 0.95);
  white-space: nowrap;
  text-align: left;
}

.pretrip-brand-tag {
  display: block;
  margin: 0;
  max-width: 100%;
  font-size: clamp(10px, 2.54vw, 12px);
  font-weight: 400;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
  text-align: left;
}

.pretrip-brand-tag .accent {
  color: var(--gwm-top100-accent);
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.20);
}

/* Route — ~30% 屏高，加大留白与行距 */
.pretrip-route {
  flex-shrink: 0;
  margin-top: 0;
  padding-bottom: 12px;
  position: relative;
}

.pretrip-route-line {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 24px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
  line-height: 1.3;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.pretrip-route-name {
  position: relative;
  margin-bottom: 24px;
}

.pretrip-route-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 0;
  height: auto;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  width: 100%;
  max-width: 100%;
  position: relative;
  z-index: 2;
  pointer-events: auto;
  box-sizing: border-box;
  box-shadow: none;
}

.pretrip-route-name h2 {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  font-size: clamp(27px, 7.6vw, 32px);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.96);
  line-height: 1.12;
  letter-spacing: 0;
  text-align: left;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.28);
}

.pretrip-route-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-top: 0.12em;
  padding: 10px;
  margin-right: -10px;
  border-radius: 0;
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  box-shadow: none;
  flex-shrink: 0;
  transition: transform 200ms ease, color 200ms ease;
  pointer-events: none;
}

.pretrip-route-chevron svg {
  width: 14px;
  height: 14px;
}

.pretrip-route-picker[aria-expanded="true"] .pretrip-route-chevron {
  transform: rotate(180deg);
  background: transparent;
}

.pretrip-route-menu {
  position: fixed;
  z-index: 2700;
  pointer-events: auto;
  min-width: min(280px, calc(100vw - 44px));
  border-radius: 12px;
  padding: 4px;
  background: var(--gwm-glass-dark-bg);
  -webkit-backdrop-filter: blur(var(--gwm-glass-blur)) saturate(1.35);
  backdrop-filter: blur(var(--gwm-glass-blur)) saturate(1.35);
  border: 1px solid var(--gwm-glass-border);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.32);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.pretrip-route-menu[hidden] {
  display: none !important;
}

.pretrip-route-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  max-height: 42px;
  padding: 4px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  overflow: hidden;
}

.pretrip-route-option-meta {
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.68);
  margin-top: 1px;
  line-height: 1.15;
}

.pretrip-route-option:hover {
  background: rgba(255, 255, 255, 0.10);
}

.pretrip-route-option.active {
  background: rgba(232, 122, 174, 0.22);
  color: #FFFFFF;
}

body.pretrip-page[data-route-theme="forest"] .pretrip-overlay {
  background: linear-gradient(180deg, rgba(8, 18, 12, 0.58) 0%, rgba(8, 18, 12, 0.20) 42%, rgba(8, 18, 12, 0.36) 70%, rgba(8, 18, 12, 0.74) 100%);
}

body.pretrip-page[data-route-theme="glacier"] .pretrip-overlay {
  background: linear-gradient(180deg, rgba(10, 16, 28, 0.58) 0%, rgba(10, 16, 28, 0.18) 42%, rgba(10, 16, 28, 0.34) 70%, rgba(10, 16, 28, 0.74) 100%);
}

.pretrip-route-meta {
  margin-top: 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
  line-height: 1.3;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.pretrip-offline-status {
  min-height: 13px;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 10px;
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
  pointer-events: none;
}

.pretrip-offline-status.is-ready {
  color: rgba(221, 255, 232, 0.78);
}

.pretrip-offline-status.is-incomplete {
  color: rgba(255, 220, 190, 0.86);
}

.pretrip-route-code {
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  opacity: 0.65;
  letter-spacing: 0.08em;
}

/* 三卡：由 content flex 自然推至底部安全间距。 */
.pretrip-actions-wrap {
  position: relative;
  width: 100%;
  margin-top: auto;
  margin-bottom: 0;
  padding: 0 6px;
}

.pretrip-actions {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 18px;
}

.pretrip-card {
  flex: 0 1 85px;
  max-width: 85px;
  min-height: var(--pretrip-card-h);
  border-radius: 22px;
  color: var(--gwm-text-title);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 7px 8px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  background: rgba(31, 33, 38, 0.40);
  -webkit-backdrop-filter: blur(24px) saturate(1.45);
  backdrop-filter: blur(24px) saturate(1.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  transition: background var(--gwm-transition-normal),
              border-color var(--gwm-transition-normal),
              box-shadow var(--gwm-transition-normal),
              transform var(--gwm-transition-fast);
}

.pretrip-card.is-active {
  background: linear-gradient(135deg, rgba(166, 77, 121, 0.55), rgba(216, 108, 160, 0.28)),
              rgba(31, 33, 38, 0.32);
  border-color: var(--gwm-active-border);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16) inset,
              0 0 18px rgba(216, 108, 160, 0.32),
              0 6px 20px rgba(166, 77, 121, 0.22);
  transform: translateY(-1px);
}

.pretrip-card:active {
  transform: scale(0.97);
}

.pretrip-card.is-active:active {
  transform: scale(0.97) translateY(-1px);
}

.gwm-active-glass {
  background: var(--gwm-active-gradient);
  border-color: var(--gwm-active-border);
  box-shadow: var(--gwm-active-glow);
  color: var(--gwm-active-text);
  transition: background var(--gwm-transition-normal),
              box-shadow var(--gwm-transition-normal),
              border-color var(--gwm-transition-normal),
              transform var(--gwm-transition-fast),
              opacity var(--gwm-transition-fast);
}

.gwm-active-glass:active {
  transform: scale(0.98);
}

/* 深色毛玻璃底座 */
.gwm-glass-dark {
  background: var(--gwm-glass-dark-bg);
  -webkit-backdrop-filter: blur(var(--gwm-glass-blur)) saturate(1.35);
  backdrop-filter: blur(var(--gwm-glass-blur)) saturate(1.35);
  border: 1px solid var(--gwm-glass-border);
}

/* 浅色毛玻璃弹窗 */
.gwm-glass-light {
  background: var(--gwm-glass-light-bg);
  -webkit-backdrop-filter: blur(var(--gwm-glass-blur)) saturate(1.25);
  backdrop-filter: blur(var(--gwm-glass-blur)) saturate(1.25);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.pretrip-route-menu.gwm-glass-light {
  background: var(--gwm-glass-dark-bg);
  -webkit-backdrop-filter: blur(var(--gwm-glass-blur)) saturate(1.35);
  backdrop-filter: blur(var(--gwm-glass-blur)) saturate(1.35);
  border: 1px solid var(--gwm-glass-border);
}

/* 深色输入框 */
.gwm-input.gwm-glass-dark,
.pretrip-glass-input.gwm-input {
  background: var(--gwm-glass-dark-input);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--gwm-text-title);
}

/* 三卡内容态 */
.pretrip-card:not(.has-value) .card-avatar,
.pretrip-card:not(.has-value) .card-group-icon,
.pretrip-card:not(.has-value) .card-weekday,
.pretrip-card:not(.has-value) .card-value,
.pretrip-card:not(.has-value) .card-value-sub {
  display: none;
}

.pretrip-card:not(.has-value) .card-icon-default {
  display: flex;
}

/* 已填写：结果内容，隐藏标签与线稿 */
.pretrip-card.has-value .card-title,
.pretrip-card.has-value .card-icon-default {
  display: none;
}

.pretrip-card.has-value .card-avatar,
.pretrip-card.has-value .card-group-icon,
.pretrip-card.has-value .card-weekday {
  display: flex;
}

.pretrip-card.has-value .card-value,
.pretrip-card.has-value .card-value-sub {
  display: block;
}

.pretrip-card .card-icon,
.pretrip-card .card-icon-default {
  width: 29px;
  height: 29px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pretrip-card .card-icon svg {
  width: 25px;
  height: 25px;
  stroke: rgba(255, 255, 255, 0.82);
  fill: none;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pretrip-card .card-avatar,
.pretrip-card .card-group-icon,
.pretrip-card .card-weekday {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(216, 108, 160, 0.35), rgba(166, 77, 121, 0.25));
  align-items: center;
  justify-content: center;
  font-size: 19px;
  line-height: 1;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset,
              0 3px 10px rgba(166, 77, 121, 0.28);
}

.pretrip-card .card-weekday {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--gwm-text-title);
}

.pretrip-card .card-text {
  text-align: center;
  line-height: 1.2;
  min-height: 14px;
}

.pretrip-card .card-title {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.02em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.pretrip-card .card-value {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.02em;
  max-width: 78px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.pretrip-card .card-value-sub {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  max-width: 78px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.pretrip-card.has-value .card-value {
  margin-top: 0;
}

.pretrip-chip,
.pretrip-avatar,
.pretrip-glass-confirm,
.pretrip-glass-close,
.pretrip-route-option {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* panel-rebuild2 — 三卡弹窗 + 全局兜底（bootstrap 误移 body 时仍可见） */
html[data-pretrip-build]::after {
  content: attr(data-pretrip-build);
  position: fixed;
  top: env(safe-area-inset-top, 0);
  right: 6px;
  z-index: 9999;
  font-size: 9px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.pretrip-modal-root {
  position: fixed;
  inset: 0;
  z-index: 2100;
  pointer-events: none;
}

.pretrip-modal-root.is-open {
  pointer-events: auto;
}

.pretrip-modal-backdrop,
#popover-backdrop.pretrip-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
  pointer-events: none;
}

.pretrip-modal-backdrop.show,
#popover-backdrop.show {
  display: block;
  pointer-events: none;
}

.pretrip-glass-panel {
  display: none;
  box-sizing: border-box;
  position: fixed;
  top: auto;
  bottom: var(--pretrip-panel-bottom);
  left: 50%;
  transform: translateX(-50%);
  width: min(90vw, 420px);
  max-height: min(58vh, calc(100dvh - var(--pretrip-panel-bottom) - env(safe-area-inset-top, 0px) - 16px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 10;
  flex-direction: column;
  border-radius: 24px;
  padding: 12px 14px 14px;
  color: var(--gwm-text-title);
  background: #2a2c31;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  pointer-events: none;
  isolation: isolate;
}

body.pretrip-page > .pretrip-glass-panel {
  z-index: 2110;
}

.pretrip-glass-panel.show {
  display: flex;
  pointer-events: auto;
}

.pretrip-modal-root .pretrip-glass-input,
.pretrip-modal-root .gwm-input,
.pretrip-glass-panel .pretrip-glass-input,
.pretrip-glass-panel .gwm-input {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: rgba(31, 33, 38, 0.85);
}

.pretrip-modal-root .pretrip-chip,
.pretrip-modal-root .pretrip-avatar,
.pretrip-modal-root .pretrip-glass-input,
.pretrip-modal-root .pretrip-glass-confirm,
.pretrip-modal-root .pretrip-glass-close,
.pretrip-modal-root .pretrip-cal-day,
.pretrip-modal-root .pretrip-cal-nav button,
.pretrip-glass-panel .pretrip-chip,
.pretrip-glass-panel .pretrip-avatar,
.pretrip-glass-panel .pretrip-glass-input,
.pretrip-glass-panel .pretrip-glass-confirm,
.pretrip-glass-panel .pretrip-glass-close,
.pretrip-glass-panel .pretrip-cal-day,
.pretrip-glass-panel .pretrip-cal-nav button {
  pointer-events: auto;
  touch-action: manipulation;
  cursor: pointer;
}

.pretrip-modal-root .pretrip-glass-input,
.pretrip-glass-panel .pretrip-glass-input {
  cursor: text;
}

.pretrip-chip,
.pretrip-avatar,
.pretrip-glass-input,
.pretrip-glass-confirm,
.pretrip-glass-close,
.pretrip-cal-day,
.pretrip-cal-nav button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.pretrip-glass-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.pretrip-glass-title {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pretrip-glass-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(31, 33, 38, 0.45);
  color: rgba(255, 255, 255, 0.78);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  margin: -10px -10px -10px 0;
  transition: opacity var(--gwm-transition-fast), background var(--gwm-transition-fast);
}

.pretrip-glass-close:active {
  opacity: 0.75;
  background: rgba(31, 33, 38, 0.62);
}

.pretrip-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.pretrip-chip-row--last {
  margin-bottom: 6px;
}

.pretrip-chip {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

.pretrip-chip.selected,
.gwm-chip.active {
  border-color: var(--gwm-active-border);
  background: rgba(166, 77, 121, 0.25);
  color: var(--gwm-text-title);
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.pretrip-field-label {
  font-size: 10px;
  opacity: 0.65;
  margin-bottom: 4px;
}

.pretrip-field-label--compact {
  margin-top: 6px;
}

.pretrip-glass-input {
  width: 100%;
  min-height: 38px;
  font-size: 15px;
  padding: 8px 10px;
  border-radius: 12px;
  outline: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  pointer-events: auto;
  -webkit-user-select: text;
  user-select: text;
}

.pretrip-glass-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.pretrip-avatar-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding-bottom: 2px;
}

.pretrip-avatar {
  flex-shrink: 0;
  scroll-snap-align: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.1);
  font-size: 20px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

.pretrip-avatar.selected {
  border-color: var(--gwm-brand-highlight);
  box-shadow: 0 0 0 2px rgba(166, 77, 121, 0.35);
}

.pretrip-glass-confirm {
  display: block;
  width: 100%;
  min-height: 42px;
  margin-top: 6px;
  border: 1px solid var(--gwm-active-border);
  border-radius: 14px;
  background: var(--gwm-active-gradient);
  box-shadow: 0 6px 18px rgba(166, 77, 121, 0.25);
  color: var(--gwm-text-title);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
  position: relative;
  z-index: 1;
  transition: transform var(--gwm-transition-fast), opacity var(--gwm-transition-fast);
}

.pretrip-glass-confirm:active {
  transform: scale(0.98);
}

.pretrip-glass-confirm.secondary {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.pretrip-glass-confirm.hidden {
  display: none;
}

/* Calendar */
.pretrip-cal {
  display: block;
  width: 100%;
  min-height: 260px;
  margin-bottom: 6px;
}

.pretrip-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.pretrip-cal-nav button {
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
}

.pretrip-cal-month {
  font-size: 15px;
  font-weight: 600;
}

.pretrip-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
  font-size: 13px;
}

.pretrip-cal-dow {
  opacity: 0.5;
  font-size: 11px;
  padding: 4px 0;
}

.pretrip-cal-day {
  min-height: 34px;
  border: none;
  background: transparent;
  color: #fff;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

.pretrip-cal-day.other {
  opacity: 0.25;
  pointer-events: none;
}

.pretrip-cal-day.selected {
  background: var(--gwm-active-gradient);
  border: 1px solid var(--gwm-active-border);
  font-weight: 700;
}

.pretrip-cal-day.today:not(.selected) {
  border: 1px solid rgba(255, 255, 255, 0.35);
}

/* Results bottom sheet — 深色毛玻璃 */
#report-backdrop {
  align-items: flex-end;
  padding: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 3000;
}

#report-backdrop .pretrip-report-modal {
  width: 100%;
  max-width: 480px;
  max-height: calc(100dvh - 16px);
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  border-radius: 24px 24px 0 0;
  background: rgba(31, 33, 38, 0.78);
  -webkit-backdrop-filter: blur(28px) saturate(1.35);
  backdrop-filter: blur(28px) saturate(1.35);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-bottom: none;
  overflow: hidden;
}

.pretrip-report-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 200px;
  padding: 32px 20px;
  color: var(--gwm-text-sub);
  font-size: 14px;
}

.pretrip-report-loading[hidden],
.pretrip-report-content[hidden] {
  display: none !important;
}

.pretrip-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--gwm-brand-highlight);
  border-radius: 50%;
  animation: pretrip-spin 0.85s linear infinite;
}

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

.pretrip-report-content {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.pretrip-report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pretrip-report-leader {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.pretrip-report-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: linear-gradient(135deg, rgba(216, 108, 160, 0.4), rgba(166, 77, 121, 0.3));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  flex-shrink: 0;
}

.pretrip-report-leader-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pretrip-report-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--gwm-text-title);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pretrip-report-role {
  font-size: 11px;
  color: var(--gwm-text-muted);
}

.pretrip-report-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.pretrip-report-icon-btn {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(216, 108, 160, 0.45);
  background: rgba(166, 77, 121, 0.22);
  color: var(--gwm-text-title);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.pretrip-report-close {
  margin: 0;
  width: 32px;
  height: 32px;
  font-size: 18px;
}

.pretrip-report-route {
  padding: 10px 14px 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--gwm-text-title);
  letter-spacing: 0.02em;
}

#report-backdrop .pretrip-report-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 14px 8px;
  color: var(--gwm-text-body);
}

.report-section {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.report-section:last-child {
  border-bottom: none;
}

.report-section h3 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gwm-text-title);
}

.report-section p,
.report-section li {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--gwm-text-sub);
}

.report-section ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

.pretrip-report-footer {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pretrip-report-footer .btn-action {
  flex: 1;
  min-width: calc(50% - 8px);
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: var(--gwm-text-title);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.share-menu {
  display: none;
  width: 100%;
  flex-wrap: wrap;
  gap: 6px;
}

.share-menu.show {
  display: flex;
}

.share-menu button {
  flex: 1;
  min-width: 30%;
  min-height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--gwm-text-sub);
  font-size: 11px;
  cursor: pointer;
}

.legacy-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#pretrip-origin-hint {
  display: none;
}

/* 后续预留：抽屉 / 宝典选中态（本轮不改页面，实现时叠加 .gwm-active-glass） */
.gwm-drawer-tab.active.gwm-active-glass,
.gwm-scene-chip.active.gwm-active-glass,
.gwm-chip.active.gwm-active-glass {
  /* 变量与 .gwm-active-glass 一致；带路/宝典页接入时启用 */
}

@media (hover: none) and (pointer: coarse) {
  .pretrip-card,
  .pretrip-route-picker,
  .pretrip-route-option,
  .pretrip-cal-day,
  .pretrip-cal-nav button {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }
}

/* Desktop admin preview: keep the consumer page in the same phone canvas as mobile. */
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  html.pretrip-page {
    min-height: 100%;
    background: #17191e;
  }

  body.pretrip-page {
    --pretrip-desktop-width: min(390px, calc(100vw - 32px), calc((100vh - 32px) * 9 / 16));
    --pretrip-desktop-height: calc(var(--pretrip-desktop-width) * 16 / 9);
    min-height: 100vh;
    height: 100vh;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #17191e;
  }

  body.pretrip-page .app-shell {
    flex: 0 0 auto;
    width: var(--pretrip-desktop-width);
    max-width: var(--pretrip-desktop-width);
    height: var(--pretrip-desktop-height);
    min-height: var(--pretrip-desktop-height);
    overflow: hidden;
    border-radius: 32px;
    background: var(--gwm-bg-dark);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 24px 70px rgba(0, 0, 0, .46);
  }

  body.pretrip-page .pretrip-home {
    min-height: 0;
    overflow: hidden;
  }

  body.pretrip-page .pretrip-content {
    min-height: 0;
  }

  body.pretrip-page .tab-bar {
    left: 50%;
    right: auto;
    bottom: calc((100vh - var(--pretrip-desktop-height)) / 2);
    width: var(--pretrip-desktop-width);
    max-width: var(--pretrip-desktop-width);
    transform: translateX(-50%);
    border-radius: 0 0 32px 32px;
    overflow: hidden;
  }

  body.pretrip-page .pretrip-modal-backdrop,
  body.pretrip-page > .modal-backdrop {
    top: calc((100vh - var(--pretrip-desktop-height)) / 2);
    right: auto;
    bottom: calc((100vh - var(--pretrip-desktop-height)) / 2);
    left: 50%;
    width: var(--pretrip-desktop-width);
    height: auto;
    transform: translateX(-50%);
    border-radius: 32px;
    overflow: hidden;
  }

  body.pretrip-page .pretrip-glass-panel {
    bottom: calc((100vh - var(--pretrip-desktop-height)) / 2 + var(--pretrip-panel-bottom));
    width: min(350px, calc(100vw - 72px));
    max-height: min(58vh, calc(var(--pretrip-desktop-height) - var(--pretrip-panel-bottom) - 32px));
  }

  #report-backdrop .pretrip-report-modal {
    max-height: calc(var(--pretrip-desktop-height) - 16px);
  }
}

@media (max-width: 360px) {
  .pretrip-brand-row {
    gap: 6px;
  }

  .pretrip-brand-en {
    font-size: 10px;
    letter-spacing: 0.03em;
  }

  .pretrip-brand-tag {
    font-size: 9px;
  }

  .pretrip-route-name h2 {
    font-size: clamp(40px, 11vw, 48px);
  }
  .pretrip-route-name h2 { font-size: 24px; }
  .pretrip-actions { gap: 14px; }
  .pretrip-card { max-width: 78px; }
  :root { --pretrip-card-h: 76px; }
}

@media print {
  body.pretrip-page > *:not(#report-backdrop) { display: none !important; }
  #report-backdrop { display: flex !important; position: static !important; background: #fff !important; }
  #report-backdrop .modal { max-height: none !important; border-radius: 0 !important; }
  .report-footer { display: none !important; }
}
