/* 相遇 hub / 时光机 / 他的空间·收藏册 —— 手账体系 */

/* ===== 相遇 hub ===== */
.encounter-scroll {
  padding: 16px 14px calc(20px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.encounter-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--surface-card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-paper);
  text-align: left;
  cursor: pointer;
}

.encounter-card.is-soon {
  opacity: 0.6;
  cursor: default;
}

.encounter-card-icon {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
}

.encounter-card-icon svg { width: 100%; height: 100%; display: block; }

.encounter-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.encounter-card-body strong {
  font-size: var(--font-lg);
  color: var(--text);
}

.encounter-card-body small {
  font-size: var(--font-sm);
  color: var(--text-secondary);
}

.encounter-card-meta {
  flex: 0 0 auto;
  font-size: var(--font-xs);
  color: var(--text-hint);
  white-space: nowrap;
}

/* ===== 约线下 ===== */
.offline-date-page {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.od-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px 88px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.od-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.od-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--bg-card);
  border: 1px solid var(--surface-card-border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-paper);
}

.od-search-icon {
  width: 16px;
  height: 16px;
  color: var(--text-hint);
}

.od-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: var(--font-sm);
}

.od-char-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 0 4px;
  -webkit-overflow-scrolling: touch;
}

.od-char {
  flex: 0 0 142px;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 8px;
  background: var(--bg-card);
  border: 1px solid var(--surface-card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-paper);
  text-align: left;
  cursor: pointer;
}

.od-char.is-active {
  border-color: rgba(241, 185, 143, 0.72);
  background: rgba(241, 185, 143, 0.12);
}

.od-char-avatar,
.od-char-avatar-img,
.od-char-avatar .is-fallback {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  object-fit: cover;
  background: var(--icon-cream);
}

.od-char-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.od-char-check {
  flex: 0 0 auto;
  width: 18px;
  text-align: center;
  color: var(--accent, #e2895f);
  font-size: var(--font-sm);
  font-weight: 700;
}

.od-char-body strong,
.od-char-body small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.od-char-body strong {
  font-size: var(--font-sm);
  color: var(--text);
}

.od-char-body small {
  font-size: var(--font-xs);
  color: var(--text-secondary);
}

.od-empty {
  width: 100%;
  padding: 20px 12px;
  text-align: center;
  color: var(--text-hint);
  font-size: var(--font-sm);
}

.od-empty svg {
  width: 78px;
  height: 78px;
  margin: 0 auto 8px;
}

.od-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.od-footer {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px calc(10px + var(--safe-bottom));
  background: var(--bg-sheet);
  border-top: 1px solid var(--border);
}

.od-footer .od-start,
.od-footer .od-start-direct {
  width: 100%;
}

/* ===== 初遇 ===== */
.encounter-first-page .ef-draft-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px 12px;
}

.encounter-first-page .od-footer .ef-start {
  width: 100%;
}

.od-place-lookup {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px dashed var(--surface-card-border);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, 0.55);
}

.od-place-lookup .od-query-place {
  align-self: flex-start;
}

.od-place-candidates {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.od-place-candidate {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--border-soft, #ece0d6);
  border-radius: var(--radius-md, 12px);
  background: var(--surface, #fdf8f4);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.od-place-candidate strong {
  font-size: var(--font-sm);
}

.od-place-candidate small {
  font-size: var(--font-xs);
  color: var(--text-secondary);
}

.od-place-material {
  font-size: var(--font-xs);
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre-wrap;
  padding: 8px 10px;
  border-radius: var(--radius-md, 12px);
  background: rgba(241, 185, 143, 0.1);
}

/* ===== 一起旅行独立设置页（复用约线下的 od-* 基础结构）
   ins 白卡化改版（Phase E2）：脱离奶油手账底色，主色调保留青绿
   （沿用旧版就有的"一起旅行=青绿，旅行char=赭石"这套区分），
   通过覆盖 od-* 消费的同名变量，级联掉绝大多数规则；
   严格圈在 .together-trip-page 作用域内，不影响"约线下"本身。 ===== */
.together-trip-page {
  --bg: #f6f5f3;
  --bg-card: #ffffff;
  --bg-card-solid: #ffffff;
  --bg-sheet: #ffffff;
  --surface: #ffffff;
  --surface-card: #ffffff;
  --surface-card-border: rgba(15, 16, 18, 0.08);
  --border: rgba(15, 16, 18, 0.1);
  --border-soft: rgba(15, 16, 18, 0.08);
  --grid-line: rgba(15, 16, 18, 0.06);

  --text: #17181b;
  --ink-brown: #17181b;
  --text-secondary: #6c6e74;
  --text-hint: rgba(21, 22, 26, 0.44);
  --text-accent: #3f6b60;
  --accent: #3f6b60;
  --accent-orange: #3f6b60;
  --accent-orange-ink: #ffffff;
  --accent-pink: #3f6b60;
  --accent-pink-ink: #3f6b60;
  --icon-cream: #eef0ee;

  --shadow-paper: 0 1px 2px rgba(15, 16, 18, 0.04), 0 8px 20px rgba(15, 16, 18, 0.05);

  background: var(--bg);
}

.together-trip-page .navbar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(15, 16, 18, 0.08);
}

.together-trip-page .navbar-title {
  color: var(--text);
}

.together-trip-page .navbar-btn {
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-sticker, 0 1px 2px rgba(15, 16, 18, 0.05));
}

.together-trip-page .od-char.is-active {
  border-color: rgba(63, 107, 96, 0.55);
  background: rgba(63, 107, 96, 0.1);
}

.together-trip-page .od-char-check {
  color: #3f6b60;
}

.together-trip-page .od-place-lookup .tt-query-place {
  align-self: flex-start;
}

.together-trip-page .od-place-lookup {
  background: #fafaf9;
}

.together-trip-page .od-place-material {
  background: rgba(63, 107, 96, 0.08);
}

.together-trip-page .form-input:focus {
  border-color: rgba(63, 107, 96, 0.6);
  box-shadow: 0 0 0 3px rgba(63, 107, 96, 0.12);
}

.together-trip-page .chat-details-section-title {
  color: var(--text);
}

.together-trip-page .od-footer .od-start {
  background: #17181b;
  border-color: transparent;
  color: #fff;
}

/* ===== 时光机 ===== */
.tm-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px calc(20px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tm-setup {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tm-no-char {
  font-size: var(--font-sm);
  color: var(--text-hint);
  padding: 6px 0;
}

.tm-chooser {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.tm-char {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 60px;
  background: none;
  border: none;
  cursor: pointer;
}

.tm-char-avatar,
.tm-char .is-fallback {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid transparent;
  background: var(--icon-cream);
}

.tm-char.is-active .tm-char-avatar,
.tm-char.is-active .is-fallback {
  border-color: var(--tape-orange);
}

.tm-char-name {
  font-size: var(--font-xs);
  color: var(--text-secondary);
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tm-segmented {
  display: flex;
  gap: 0;
  background: var(--bg-paper-deep);
  border-radius: var(--radius-full);
  padding: 3px;
}

.tm-seg {
  flex: 1;
  padding: 8px 0;
  border: none;
  background: transparent;
  border-radius: var(--radius-full);
  font-size: var(--font-sm);
  color: var(--text-secondary);
  cursor: pointer;
}

.tm-seg.is-active {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: var(--shadow-paper);
}

.tm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tm-chip {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--surface-card-border);
  background: var(--btn-outline-bg);
  font-size: var(--font-sm);
  color: var(--text-secondary);
  cursor: pointer;
}

.tm-chip.is-active {
  background: rgba(241, 185, 143, 0.2);
  border-color: var(--tape-orange);
  color: var(--text-accent);
}

.tm-generate-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.tm-generate {
  flex: 1 1 auto;
  min-width: 0;
}

.tm-auto-image {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--surface-card-border);
  border-radius: var(--radius-full);
  background: rgba(255, 253, 248, 0.74);
  color: var(--text-secondary);
  font-size: var(--font-xs);
  white-space: nowrap;
}

.tm-auto-image input {
  width: 16px;
  height: 16px;
  accent-color: var(--tape-orange);
}

.tm-result {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tm-result-empty {
  text-align: center;
  padding: 28px 12px;
  font-size: var(--font-sm);
  color: var(--text-hint);
}

/* 拍立得 / 时光胶囊卡 */
.tm-polaroid {
  background: #fffdf8;
  border: 1px solid var(--surface-card-border);
  border-radius: var(--radius-md);
  padding: 10px 10px 14px;
  box-shadow: var(--shadow-float);
}

.tm-polaroid.is-streaming {
  border-color: rgba(241, 185, 143, 0.46);
}

.tm-polaroid-photo {
  position: relative;
  height: 150px;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(135deg, var(--icon-blue-light), var(--icon-peach));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

.tm-polaroid-icon-hint {
  font-size: var(--font-sm);
  color: rgba(92, 123, 143, 0.7);
  background: rgba(255, 255, 255, 0.7);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.tm-polaroid-caption {
  padding: 12px 6px 2px;
}

.tm-polaroid-title {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--text);
}

.tm-polaroid-meta {
  font-size: var(--font-xs);
  color: var(--text-hint);
  margin-top: 2px;
}

.tm-polaroid-body {
  margin-top: 10px;
}

.tm-polaroid-body.is-pending p:last-child::after,
.tm-polaroid.is-streaming .tm-polaroid-body p:last-child::after {
  content: '';
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  margin-left: 0.25em;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.42;
  vertical-align: baseline;
  animation: tm-stream-pulse 1s ease-in-out infinite;
}

@keyframes tm-stream-pulse {
  0%, 100% { transform: translateY(0); opacity: 0.28; }
  50% { transform: translateY(-2px); opacity: 0.72; }
}

.tm-polaroid-body p {
  margin: 0 0 10px;
  font-size: var(--font-md);
  line-height: 1.8;
  color: var(--text);
}

.tm-polaroid-body p:last-child { margin-bottom: 0; }

.tm-result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tm-result-actions .btn {
  flex: 1 1 calc(50% - 8px);
}

/* ===== 他的空间 · 收藏册 ===== */
.his-space-page {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.his-space-page .space-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.space-scroll {
  padding: 14px 14px calc(20px + var(--safe-bottom));
}

.space-section {
  width: 100%;
  min-width: 0;
}

.space-section-head {
  position: relative;
  margin-bottom: 14px;
}

.space-section-tape {
  position: absolute;
  top: -4px;
  left: 8px;
  width: 52px;
  height: 14px;
  border-radius: 2px;
  background: rgba(241, 185, 143, 0.42);
  transform: rotate(-3deg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset;
}

.space-section-title {
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--text);
  padding-left: 2px;
}

.space-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.space-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: 8px 8px 10px;
  background: #fffdf8;
  border: 1px solid var(--surface-card-border);
  border-radius: 16px;
  box-shadow: var(--shadow-paper);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s ease;
}

.space-card:active {
  transform: scale(0.98);
}

.space-card-photo {
  position: relative;
  height: 108px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.55), transparent 42%),
    linear-gradient(135deg, var(--icon-blue-light), var(--icon-peach));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.space-card-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.space-card-hint {
  position: relative;
  z-index: 1;
  max-width: calc(100% - 20px);
  padding: 0 8px;
  font-size: 11px;
  line-height: 1.35;
  color: rgba(92, 123, 143, 0.82);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.space-card-own {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  font-size: 10px;
  color: var(--text-accent);
  background: rgba(255, 255, 255, 0.88);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  box-shadow: 0 1px 4px rgba(90, 70, 55, 0.08);
}

.space-card-title {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text);
  padding: 0 2px;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.space-card-sub {
  font-size: var(--font-xs);
  color: var(--text-hint);
  padding: 0 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.space-empty {
  text-align: center;
  padding: 36px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.space-empty-art svg { width: 72px; height: 72px; }

.space-empty-text {
  font-size: var(--font-sm);
  color: var(--text-hint);
}

.space-detail-body .space-detail-meta {
  font-size: var(--font-xs);
  color: var(--text-hint);
  margin-bottom: 10px;
}

.space-detail-image {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-card-border);
  margin-bottom: 12px;
}

.space-detail-body p {
  margin: 0 0 10px;
  font-size: var(--font-md);
  line-height: 1.8;
  color: var(--text);
}

/* ===== 番外剧场 ===== */
.au-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 14px calc(20px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.au-new {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.au-isolate-note {
  margin: 0;
  font-size: var(--font-xs);
  color: var(--text-hint);
  line-height: 1.6;
}

.au-list-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.au-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.au-list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.au-list-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.au-list-body strong {
  font-size: var(--font-md);
  color: var(--text);
}

.au-list-body small {
  font-size: var(--font-xs);
  color: var(--text-hint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.au-row-del {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: var(--surface-2, #f1e7df);
  color: var(--text-hint);
  cursor: pointer;
  font-size: 13px;
}

/* 沉浸态 */
.au-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
}

.au-banner-name {
  font-size: var(--font-md);
  font-weight: 600;
  color: var(--text);
}

.au-banner-tag {
  font-size: var(--font-xs);
  color: var(--text-hint);
}

.au-share-btn {
  width: auto;
  padding: 0 10px;
  font-size: var(--font-sm);
  color: var(--accent, #f1b98f);
}

/* ===== 相遇过场动画小窗 ===== */
.cutscene-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(60, 48, 40, 0.26);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.26s ease;
}

.cutscene-overlay.is-in { opacity: 1; }
.cutscene-overlay.is-out { opacity: 0; }

.cutscene-window {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 28px;
  background: var(--surface, #fdf8f4);
  border: 1px solid var(--border-soft, #ece0d6);
  border-radius: var(--radius-lg, 18px);
  box-shadow: 0 16px 42px rgba(90, 70, 55, 0.22);
  transform: translateY(8px) scale(0.96);
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.25);
}

.cutscene-overlay.is-in .cutscene-window { transform: translateY(0) scale(1); }

.cutscene-art { width: 138px; height: 104px; }

.cutscene-label {
  margin: 0;
  font-size: var(--font-sm);
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

.cs-candy-gem,
.cs-flap-t,
.cs-flap-b,
.cs-flap-l,
.cs-flap-r,
.cs-node-b,
.cs-pulse,
.cs-sparkle path {
  transform-box: fill-box;
}

/* 拆糖纸 */
.cs-candy-gem { transform-origin: center; animation: csGemReveal 3.5s ease-in-out infinite; }
.cs-gem-center { animation: csGemGlow 3.5s ease-in-out infinite; }
.cs-gem-shine { animation: csGemShine 3.5s ease-in-out infinite; }

.cs-flap-t { transform-origin: center top; animation: csUnfoldT 3.5s ease-in-out infinite; }
.cs-flap-b { transform-origin: center bottom; animation: csUnfoldB 3.5s ease-in-out infinite; }
.cs-flap-l { transform-origin: left center; animation: csUnfoldL 3.5s ease-in-out infinite; }
.cs-flap-r { transform-origin: right center; animation: csUnfoldR 3.5s ease-in-out infinite; }

.cs-sparkle path { transform-origin: center; opacity: 0; animation: csSparkle 3.5s ease-in-out infinite; }
.cs-sparkle path:nth-child(2) { animation-delay: 0.4s; }
.cs-sparkle path:nth-child(3) { animation-delay: 0.8s; }

@keyframes csUnfoldT {
  0%, 15% { transform: scaleY(1); }
  40%, 70% { transform: scaleY(-1); }
  90%, 100% { transform: scaleY(1); }
}
@keyframes csUnfoldB {
  0%, 15% { transform: scaleY(1); }
  40%, 70% { transform: scaleY(-1); }
  90%, 100% { transform: scaleY(1); }
}
@keyframes csUnfoldL {
  0%, 15% { transform: scaleX(1); }
  40%, 70% { transform: scaleX(-1); }
  90%, 100% { transform: scaleX(1); }
}
@keyframes csUnfoldR {
  0%, 15% { transform: scaleX(1); }
  40%, 70% { transform: scaleX(-1); }
  90%, 100% { transform: scaleX(1); }
}
@keyframes csGemReveal {
  0%, 15% { opacity: 0; transform: scale(0.8) translateY(4px); }
  40%, 70% { opacity: 1; transform: scale(1) translateY(0); }
  90%, 100% { opacity: 0; transform: scale(0.8) translateY(4px); }
}
@keyframes csGemGlow {
  0%, 40% { fill: #fdf8f4; }
  55% { fill: #ffffff; filter: drop-shadow(0 0 8px rgba(255,255,255,0.8)); }
  70%, 100% { fill: #fdf8f4; }
}
@keyframes csGemShine {
  0%, 40% { opacity: 0; }
  55% { opacity: 1; }
  70%, 100% { opacity: 0; }
}
@keyframes csSparkle {
  0%, 40% { opacity: 0; transform: scale(0.5) rotate(0deg); }
  50%, 60% { opacity: 1; transform: scale(1.1) rotate(45deg); }
  70%, 100% { opacity: 0; transform: scale(0.5) rotate(90deg); }
}

/* 连线 */
.cs-line {
  stroke: #b6cde0;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
  animation: csDraw 1.6s ease-in-out infinite;
}
.cs-node { fill: #fff; stroke: #f1b98f; stroke-width: 3; }
.cs-node-b { animation: csNodePop 1.6s ease-in-out infinite; }
.cs-pulse { fill: #f1b98f; animation: csPulse 1.6s ease-in-out infinite; }

@keyframes csDraw {
  0% { stroke-dashoffset: 80; }
  55%, 100% { stroke-dashoffset: 0; }
}
@keyframes csNodePop {
  0%, 50% { transform: scale(0.55); opacity: 0.4; }
  72%, 100% { transform: scale(1); opacity: 1; }
}
@keyframes csPulse {
  0% { transform: translateX(0); opacity: 0; }
  22% { opacity: 1; }
  80% { transform: translateX(76px); opacity: 1; }
  100% { transform: translateX(76px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cs-candy-gem, .cs-gem-center, .cs-gem-shine, .cs-flap-t, .cs-flap-b, .cs-flap-l, .cs-flap-r, .cs-sparkle path,
  .cs-line, .cs-node-b, .cs-pulse { animation: none; }
}

.encounter-sub-link {
  margin-top: 4px;
  padding: 10px;
  border: 1px dashed var(--border-soft, #ece0d6);
  border-radius: var(--radius-md, 12px);
  background: transparent;
  color: var(--text-secondary, #8c7362);
  font-size: var(--font-xs);
  cursor: pointer;
  text-align: center;
}

/* ===== 显示正则组 ===== */
.rxg-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 14px 14px calc(20px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rxg-note {
  margin: 0;
  font-size: var(--font-xs);
  color: var(--text-hint);
  line-height: 1.6;
}

.rxg-import {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rxg-import-text {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: var(--font-xs);
  resize: vertical;
}

.rxg-import-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.rxg-import-actions .rxg-import-name { flex: 1; min-width: 0; }
.rxg-import-actions .rxg-do-import { flex: 0 0 auto; white-space: nowrap; }

.rxg-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rxg-empty {
  text-align: center;
  padding: 32px 12px;
  font-size: var(--font-sm);
  color: var(--text-hint);
}

.rxg-group { padding: 12px 14px; }
.rxg-group.is-off { opacity: 0.55; }

.rxg-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.rxg-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}

.rxg-switch strong {
  font-size: var(--font-md);
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rxg-group-count {
  flex: 0 0 auto;
  font-size: var(--font-xs);
  color: var(--text-hint);
}

.rxg-del {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: var(--surface-2, #f1e7df);
  color: var(--text-hint);
  cursor: pointer;
  font-size: 12px;
}

.rxg-rules {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rxg-rule {
  border: 1px solid var(--border-soft, #ece0d6);
  border-radius: var(--radius-md, 12px);
  padding: 10px 12px;
  background: var(--surface, #fdf8f4);
}

.rxg-rule.is-off { opacity: 0.5; }

.rxg-rule-head .rxg-switch strong { font-size: var(--font-sm); }

.rxg-rule-body {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0;
  flex-wrap: wrap;
}

.rxg-find, .rxg-replace {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: var(--font-xs);
  background: rgba(140, 115, 98, 0.08);
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--text-secondary);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rxg-arrow { color: var(--text-hint); font-size: var(--font-xs); }

.rxg-targets {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.rxg-targets-label {
  font-size: var(--font-xs);
  color: var(--text-hint);
  margin-right: 2px;
}

.rxg-chip {
  padding: 4px 9px;
  border: 1px solid var(--border-soft, #ece0d6);
  border-radius: 999px;
  background: var(--surface, #fdf8f4);
  color: var(--text-secondary);
  font-size: var(--font-xs);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.rxg-chip.is-active {
  background: rgba(241, 185, 143, 0.18);
  border-color: rgba(241, 185, 143, 0.5);
  color: var(--text-accent, #c98a5c);
  font-weight: 600;
}

.rxg-import-hint {
  margin: 0;
  font-size: var(--font-xs);
  color: var(--text-hint);
  line-height: 1.5;
}

.rxg-import-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.rxg-import-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
}

.rxg-import-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-md, 12px);
  background: var(--surface, #fdf8f4);
  border: 1px solid var(--border-soft, #ece0d6);
  font-size: var(--font-sm);
}

.rxg-import-preview {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rxg-icon-btn {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(241, 185, 143, 0.18);
  color: var(--text-accent, #c98a5c);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rxg-rule {
  cursor: pointer;
}

.rxg-rule:focus-visible {
  outline: 2px solid rgba(241, 185, 143, 0.55);
  outline-offset: 2px;
}

.rxg-rule-meta {
  font-size: var(--font-xs);
  color: var(--text-hint);
  margin-bottom: 6px;
}

.rxg-rule-tag {
  font-size: var(--font-xs);
  color: var(--text-hint);
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(140, 115, 98, 0.08);
}

.rxg-empty-inline {
  font-size: var(--font-xs);
  color: var(--text-hint);
  padding: 8px 2px;
}

/* ===== 编辑正则 ===== */
.rxg-edit-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 14px 14px calc(20px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rxg-field-card {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rxg-field-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.rxg-field-label {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text);
}

.rxg-field-sub {
  font-size: var(--font-xs);
  color: var(--text-hint);
}

.rxg-req {
  color: #d9534f;
  margin-left: 2px;
}

.rxg-code-area {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: var(--font-xs);
  resize: vertical;
  min-height: 72px;
}

.rxg-code-meta {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-xs);
  color: var(--text-hint);
}

.rxg-picker-card {
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.rxg-picker-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px;
  border: none;
  border-bottom: 1px solid var(--border-soft, #ece0d6);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.rxg-picker-row:last-child {
  border-bottom: none;
}

.rxg-picker-label {
  flex: 0 0 auto;
  font-size: var(--font-sm);
  color: var(--text);
}

.rxg-picker-value {
  flex: 1;
  text-align: right;
  font-size: var(--font-sm);
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rxg-picker-chevron {
  flex: 0 0 auto;
  color: var(--text-hint);
  font-size: 18px;
  line-height: 1;
}

.rxg-depth-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rxg-depth-input {
  flex: 1;
  text-align: center;
}

.rxg-depth-sep {
  color: var(--text-hint);
}

.rxg-field-hint {
  margin: 0;
  font-size: var(--font-xs);
  color: var(--text-hint);
  line-height: 1.5;
}

.rxg-delete-rule {
  width: 100%;
  margin-top: 4px;
}

.option-picker-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 50vh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.option-picker-item {
  flex-shrink: 0;
  touch-action: pan-y;
}

.option-picker-item.is-selected {
  border-color: rgba(241, 185, 143, 0.55);
  background: rgba(241, 185, 143, 0.12);
}

.option-picker-foot {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
  justify-content: flex-end;
}

/* ===== 原文档案 ===== */
.narch-page {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.narch-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px calc(20px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.narch-hint {
  margin: 0;
  font-size: var(--font-xs);
  color: var(--text-hint);
  line-height: 1.6;
}

.narch-empty {
  text-align: center;
  padding: 40px 16px;
  font-size: var(--font-sm);
  color: var(--text-hint);
}

.narch-clear {
  font-size: var(--font-xs);
  color: var(--text-secondary);
  width: auto;
  padding: 0 6px;
}

.narch-entry {
  position: relative;
  padding: 16px 16px 14px;
}

.narch-entry-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.narch-kind {
  flex: 0 0 auto;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: var(--font-xs);
  color: #fff;
  background: linear-gradient(135deg, #f1b98f, #e2895f);
}

.narch-kind--time_machine { background: linear-gradient(135deg, #b6cde0, #7ea7c4); }
.narch-kind--au { background: linear-gradient(135deg, #c9b6e0, #9b7ec4); }
.narch-kind--storycard { background: linear-gradient(135deg, #f5d0d8, #e89aab); }

.narch-entry-title {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  font-size: var(--font-sm);
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.narch-del {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: var(--text-hint);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 4px;
}

.narch-entry-sub {
  margin-top: 4px;
  font-size: var(--font-xs);
  color: var(--text-secondary);
}

.narch-entry-meta {
  margin-top: 2px;
  font-size: var(--font-xs);
  color: var(--text-hint);
}

/* 折叠卡片：默认只显示标题/设定/人物，点击展开 */
.narch-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.narch-card-titles {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.narch-card-titles .narch-entry-title {
  flex: none;
}

.narch-card-titles .narch-entry-sub {
  margin-top: 0;
}

.narch-card-meta {
  font-size: var(--font-xs);
  color: var(--text-hint);
}

.narch-card-caret {
  flex: 0 0 auto;
  font-size: var(--font-xs);
  color: var(--text-hint);
}

.narch-entry-body[hidden] {
  display: none;
}

.narch-entry-image {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-card-border);
  margin-top: 10px;
}

.narch-entry-body {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border, #ece0d6);
}

.narch-entry-body p {
  margin: 0 0 10px;
  font-size: var(--font-sm);
  line-height: 1.8;
  color: var(--text);
  text-indent: 2em;
}

.narch-entry-body p:last-child {
  margin-bottom: 0;
}

/* ===== 旅行char ===== */
.travel-char-page,
.travel-event-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: var(--bg-page, #fbf6f0);
}

.travel-char-page .navbar,
.travel-event-page .navbar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(15, 16, 18, 0.08);
  -webkit-backdrop-filter: blur(14px) saturate(112%);
  backdrop-filter: blur(14px) saturate(112%);
}

.travel-char-page .navbar-title,
.travel-event-page .navbar-title {
  color: var(--text);
}

.travel-char-page .navbar-btn,
.travel-event-page .navbar-btn {
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-sticker);
}

.travel-event-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 14px 92px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.travel-loader-map span,
.travel-fake-map span {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--tape-orange);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(15, 16, 18, 0.14);
}

.travel-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.travel-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.travel-section-title {
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--text);
}

.travel-sync-note {
  font-size: var(--font-xs);
  color: var(--text-accent);
}

.travel-char-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.travel-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--bg-card);
  border: 1px solid var(--surface-card-border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-paper);
}

.travel-search-icon {
  width: 16px;
  height: 16px;
  color: var(--text-hint);
}

.travel-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: var(--font-sm);
}

.travel-char-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.travel-companion-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.travel-char-pick {
  flex: 0 0 150px;
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid var(--surface-card-border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: var(--shadow-paper);
  text-align: left;
  cursor: pointer;
}

.travel-char-pick.is-active {
  border-color: rgba(168, 85, 42, 0.72);
  background: rgba(168, 85, 42, 0.13);
}

.travel-char-list .travel-char-pick {
  flex: 0 0 auto;
  width: 100%;
}

.travel-char-pick.is-primary {
  border-color: var(--tape-orange);
}

.travel-char-avatar,
.travel-char-pick .is-fallback,
.travel-event-avatar-img,
.travel-event-avatar .is-fallback {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  object-fit: cover;
  background: var(--icon-cream);
}

.travel-char-pick span:not(.is-fallback) {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.travel-char-pick b {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-accent);
  font-size: 10px;
}

.travel-char-pick strong,
.travel-char-pick small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.travel-char-pick strong {
  font-size: var(--font-sm);
  color: var(--text);
}

.travel-char-pick small {
  font-size: var(--font-xs);
  color: var(--text-secondary);
}

.travel-companion {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 128px;
  padding: 6px 10px 6px 6px;
  border: 1px solid var(--surface-card-border);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  box-shadow: var(--shadow-paper);
  color: var(--text-secondary);
  font-size: var(--font-xs);
  cursor: pointer;
}

.travel-companion.is-active {
  border-color: var(--tape-orange);
  background: rgba(168, 85, 42, 0.16);
  color: var(--text-accent);
}

.travel-companion-avatar,
.travel-companion .is-fallback {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  object-fit: cover;
  background: var(--icon-cream);
}

.travel-companion span:not(.is-fallback) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.travel-theme-group-label {
  font-size: var(--font-xs);
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 6px;
}

.travel-theme-group-label:first-child {
  margin-top: 0;
}

.travel-theme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 4px;
}

.travel-theme-more-toggle {
  align-self: center;
  margin-top: 4px;
  padding: 6px 14px;
  border: 1px dashed var(--surface-card-border);
  border-radius: var(--radius-pill, 999px);
  background: transparent;
  font-size: var(--font-xs);
  color: var(--text-accent);
  cursor: pointer;
}

.travel-theme {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 62px;
  padding: 12px;
  border: 1px solid var(--surface-card-border);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-paper);
  text-align: left;
  cursor: pointer;
}

.travel-theme.is-active {
  border-color: var(--tape-orange);
  background: rgba(168, 85, 42, 0.14);
}

.travel-theme strong {
  font-size: var(--font-sm);
  color: var(--text);
}

.travel-theme small {
  font-size: var(--font-xs);
  color: var(--text-secondary);
}

.travel-options {
  padding: 12px;
  border: 1px dashed var(--surface-card-border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.62);
}

.travel-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 30px;
  font-size: var(--font-sm);
  color: var(--text);
}

.travel-toggle.is-disabled,
.travel-style-field.is-disabled {
  opacity: 0.55;
}

.travel-toggle input {
  width: 16px;
  height: 16px;
  accent-color: #a8552a;
}

.travel-offline-guide-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  margin-bottom: 4px;
  border: 1px solid var(--surface-card-border);
  border-radius: var(--radius-md);
  background: rgba(168, 85, 42, 0.1);
  color: var(--text);
  font-size: var(--font-sm);
  text-align: left;
  cursor: pointer;
}

.travel-offline-guide-cta {
  color: #a8552a;
  font-weight: 600;
  white-space: nowrap;
}

.travel-style-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  font-size: var(--font-sm);
  color: var(--text);
}

.travel-style-field select {
  flex: 0 0 142px;
  min-width: 0;
  border: 1px solid var(--surface-card-border);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  padding: 6px 10px;
  color: var(--text);
  font-size: var(--font-sm);
}

.travel-trip-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.travel-trip-row {
  width: 100%;
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.travel-trip-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--surface-card-border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: var(--shadow-paper);
  text-align: left;
  cursor: pointer;
}

.travel-trip-row-main:focus-visible {
  outline: 2px solid var(--tape-orange);
  outline-offset: 2px;
}

.travel-trip-more {
  flex: 0 0 auto;
  width: 40px;
  border: 1px solid var(--surface-card-border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-hint);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.travel-trip-more svg {
  width: 18px;
  height: 18px;
}

.travel-trip-more:hover {
  color: var(--text);
  border-color: rgba(168, 85, 42, 0.6);
}

.travel-trip-more:focus-visible {
  outline: 2px solid var(--tape-orange);
  outline-offset: 2px;
}

.travel-notice-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(168, 85, 42, 0.5);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-paper);
  text-align: left;
  cursor: pointer;
}

.travel-notice-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #b3453a;
  box-shadow: 0 0 0 4px rgba(231, 120, 120, 0.12);
}

/* 本页视觉签名：护照邮戳徽标，替代原来的手账贴纸标签 */
.travel-trip-stamp {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  padding: 3px;
  border-radius: 50%;
  border: 1.5px dashed rgba(168, 85, 42, 0.55);
  background: rgba(168, 85, 42, 0.06);
  color: var(--text-accent);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  transform: rotate(-8deg);
}

.travel-trip-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.travel-trip-body strong,
.travel-trip-body small,
.travel-trip-body em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.travel-trip-body strong {
  font-size: var(--font-sm);
  color: var(--text);
  font-style: normal;
}

.travel-trip-body small {
  font-size: var(--font-xs);
  color: var(--text-secondary);
}

.travel-trip-body em {
  font-size: var(--font-xs);
  color: var(--text-hint);
  font-style: normal;
}

.travel-trip-arrow {
  flex: 0 0 auto;
  color: var(--text-hint);
}

.travel-empty,
.travel-event-empty {
  padding: 26px 12px;
  text-align: center;
  color: var(--text-hint);
  font-size: var(--font-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.travel-footer {
  flex: 0 0 auto;
  padding: 10px 14px calc(10px + var(--safe-bottom));
  background: var(--bg-sheet);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.travel-footer .btn {
  width: 100%;
}

.travel-checkpoint-interaction {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.travel-interaction-prompt {
  margin: 0;
  font-size: var(--font-sm);
  color: var(--text-hint);
}

.travel-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.travel-choice-btn {
  border: 1px solid var(--surface-card-border);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: var(--font-sm);
  font-weight: 600;
  border-radius: var(--radius-full);
  padding: 8px 14px;
  cursor: pointer;
}

.travel-choice-btn:hover {
  border-color: rgba(168, 85, 42, 0.72);
}

.travel-choice-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.travel-ask-user-btn,
.travel-photo-btn {
  align-self: flex-start;
  width: auto;
}

.travel-interaction-done {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-sm);
  color: var(--text-hint);
}

.travel-interaction-done svg {
  width: 16px;
  height: 16px;
}

.travel-event-dialog {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.travel-event-avatar {
  flex: 0 0 auto;
  width: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.travel-bubbles {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.travel-bubble {
  display: block;
  width: fit-content;
  max-width: min(78vw, 520px);
  padding: 13px 16px;
  border-radius: 22px;
  font-size: var(--font-sm);
  line-height: 1.75;
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 16, 18, 0.12);
  box-shadow: 0 8px 18px rgba(113, 94, 78, 0.08);
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
}

button.travel-bubble {
  cursor: pointer;
  font: inherit;
}

.travel-bubble.is-editable:active {
  transform: translateY(1px);
}

.travel-bubble.is-user {
  align-self: flex-end;
  background: rgba(15, 16, 18, 0.06);
  border-color: rgba(15, 16, 18, 0.14);
}

.travel-bubble.is-char {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.92);
}

.travel-bubble.is-companion {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(15, 16, 18, 0.05);
}

.travel-bubble.is-companion strong {
  font-size: var(--font-xs);
  color: var(--text-accent);
}

.travel-bubble.is-thinking {
  display: inline-flex;
  width: auto;
  gap: 4px;
}

.travel-activity-chat {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 4px 0 2px;
}

.travel-activity-chat .travel-bubble {
  font-size: 12px;
  line-height: 1.68;
}

.travel-chat-row {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  min-width: 0;
}

.travel-chat-row.is-user {
  align-items: flex-end;
  padding-left: 18%;
}

.travel-chat-row.is-char {
  align-items: flex-start;
  padding-right: 14%;
}

.travel-chat-meta {
  max-width: 100%;
  padding: 0 8px;
  color: var(--text-hint);
  font-size: var(--font-xs);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.travel-progress-card {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--surface-card-border);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 250, 249, 0.9));
  box-shadow: var(--shadow-paper);
}

.travel-return-modal {
  overflow: hidden;
}

.travel-return-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.travel-return-modal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px;
  border: 1px solid rgba(15, 16, 18, 0.12);
  border-radius: var(--radius-md);
  background:
    linear-gradient(90deg, rgba(168, 85, 42, 0.14) 0 1px, transparent 1px) 0 0 / 18px 18px,
    #ffffff;
  box-shadow: var(--shadow-paper);
}

.travel-return-modal-card .travel-trip-stamp {
  align-self: flex-start;
}

.travel-return-modal-card img,
.travel-return-modal-card .travel-fake-map {
  width: 100%;
  min-height: 150px;
  border-radius: var(--radius-md);
  object-fit: cover;
}

.travel-return-modal-card strong {
  color: var(--text);
  font-size: var(--font-md);
}

.travel-return-modal-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--font-sm);
  line-height: 1.65;
}

.travel-return-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (max-width: 420px) {
  .travel-bubble {
    max-width: min(82vw, 100%);
    padding: 12px 15px;
  }

  .travel-chat-row.is-user {
    padding-left: 12%;
  }

  .travel-chat-row.is-char {
    padding-right: 8%;
  }
}

.travel-progress-card.is-locked {
  opacity: 0.68;
}

.travel-progress-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.travel-progress-head > span {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: rgba(168, 85, 42, 0.22);
  color: var(--text-accent);
}

.travel-progress-head div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.travel-progress-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: var(--font-sm);
}

.travel-progress-head small {
  color: var(--text-hint);
  font-size: var(--font-xs);
}

.travel-progress-card p {
  margin: 0;
  color: var(--text);
  font-size: var(--font-sm);
  line-height: 1.7;
}

.travel-progress-photo {
  overflow: hidden;
  border: 1px solid var(--surface-card-border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.5);
}

.travel-progress-photo img,
.travel-progress-photo .travel-fake-map {
  display: block;
  width: 100%;
  min-height: 118px;
  max-height: 170px;
  object-fit: cover;
  border: none;
  border-radius: 0;
}

.travel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-hint);
  animation: travel-dot 1.1s ease-in-out infinite;
}

.travel-dot:nth-child(2) { animation-delay: 0.12s; }
.travel-dot:nth-child(3) { animation-delay: 0.24s; }

@keyframes travel-dot {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
  40% { transform: translateY(-3px); opacity: 1; }
}

.travel-event-loader,
.travel-event-board,
.travel-return-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--surface-card-border);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-paper);
}

.travel-loader-map,
.travel-fake-map {
  position: relative;
  min-height: 116px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(15, 16, 18, 0.07) 1px, transparent 1px),
    linear-gradient(0deg, rgba(15, 16, 18, 0.06) 1px, transparent 1px),
    #f4f3f1;
  background-size: 28px 28px, 28px 28px, auto;
}

.travel-loader-map span:nth-child(1),
.travel-fake-map span:nth-child(1) { left: 18%; top: 30%; }
.travel-loader-map span:nth-child(2),
.travel-fake-map span:nth-child(2) { left: 48%; top: 54%; background: #5b6b78; }
.travel-loader-map span:nth-child(3),
.travel-fake-map span:nth-child(3) { right: 18%; top: 24%; background: #b3453a; }

.travel-event-loader strong {
  font-size: var(--font-sm);
  color: var(--text);
}

.travel-event-title {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.travel-event-title strong {
  font-size: var(--font-lg);
  color: var(--text);
}

.travel-event-title small {
  font-size: var(--font-xs);
  color: var(--text-secondary);
}

.travel-countdown {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: rgba(15, 16, 18, 0.05);
}

.travel-countdown span {
  font-size: var(--font-xs);
  color: var(--text-secondary);
}

.travel-countdown strong {
  font-size: var(--font-md);
  color: var(--text-accent);
}

/* 出发仪式感小卡：Phase E1 会重做整页视觉，这里先给一个不突兀的极简样式，让数据先有地方露出来。 */
.travel-departure-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.55);
  border: 1px dashed var(--surface-card-border);
}

.travel-departure-card img,
.travel-departure-card-avatar,
.travel-departure-card .is-fallback {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex: 0 0 auto;
}

.travel-departure-card-mark {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-accent);
  opacity: 0.7;
}

.travel-departure-card em {
  font-style: normal;
  font-size: var(--font-xs);
  color: var(--text-secondary);
}

.travel-event-stops {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.travel-event-stops span {
  flex: 0 0 auto;
  max-width: 160px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--surface-card-border);
  font-size: var(--font-xs);
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.travel-event-stops b {
  flex: 0 0 auto;
  color: var(--text-accent);
}

.travel-map-img {
  width: 100%;
  min-height: 120px;
  max-height: 180px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-card-border);
}

.travel-stage-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.travel-stage {
  display: flex;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--surface-card-border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: var(--shadow-paper);
}

.travel-stage.is-locked {
  opacity: 0.66;
}

.travel-stage-pin {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: rgba(168, 85, 42, 0.22);
  color: var(--text-accent);
}

.travel-stage-body {
  flex: 1;
  min-width: 0;
}

.travel-stage-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.travel-stage-head strong {
  min-width: 0;
  font-size: var(--font-sm);
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.travel-stage-head small {
  flex: 0 0 auto;
  font-size: var(--font-xs);
  color: var(--text-hint);
}

.travel-stage p {
  margin: 8px 0 0;
  font-size: var(--font-sm);
  line-height: 1.7;
  color: var(--text);
}

.travel-stage .travel-locked-text {
  color: var(--text-hint);
}

.travel-stage-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.travel-stage-tags span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  background: rgba(15, 16, 18, 0.05);
  color: var(--text-secondary);
  font-size: var(--font-xs);
}

.travel-stage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.travel-stage-actions button {
  border: 1px solid var(--surface-card-border);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text-secondary);
  font-size: var(--font-xs);
  padding: 5px 9px;
  cursor: pointer;
}

.travel-stage-interactions {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 10px;
}

.travel-stage-interactions span {
  padding: 7px 9px;
  border-radius: var(--radius-md);
  background: rgba(168, 85, 42, 0.13);
  color: var(--text-secondary);
  font-size: var(--font-xs);
  line-height: 1.5;
}

.travel-return-card strong {
  font-size: var(--font-md);
  color: var(--text);
}

.travel-return-card p {
  margin: 0;
  font-size: var(--font-sm);
  line-height: 1.7;
  color: var(--text-secondary);
}

.travel-postcard {
  position: relative;
}

.travel-postcard-front,
.travel-postcard-back {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.travel-postcard.is-front .travel-postcard-back,
.travel-postcard.is-back .travel-postcard-front {
  display: none;
}

.travel-postcard-front img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-card-border);
}

.travel-postcard-back small {
  font-size: var(--font-xs);
  color: var(--text-hint);
  line-height: 1.6;
}

.travel-postcard-flip {
  align-self: flex-end;
  border: 1px solid var(--surface-card-border);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  color: var(--text-accent);
  font-size: var(--font-xs);
  padding: 6px 10px;
  cursor: pointer;
}

.travel-postcard-tools {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px dashed var(--surface-card-border);
}

.travel-postcard-style-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: var(--font-xs);
  color: var(--text-secondary);
}

.travel-postcard-style-field select {
  flex: 1;
  max-width: 58%;
  border: 1px solid var(--surface-card-border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text);
  font-size: var(--font-xs);
  padding: 6px 8px;
}

.travel-postcard-tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.travel-postcard-tools-hint {
  display: block;
  font-size: var(--font-xs);
  color: var(--text-hint);
  line-height: 1.5;
}

.travel-return-modal-actions .travel-postcard-tools-hint {
  width: 100%;
  text-align: center;
}

@media (max-width: 360px) {
  .travel-theme-grid {
    grid-template-columns: 1fr;
  }

  .travel-trip-stamp {
    width: 40px;
    height: 40px;
    font-size: 8px;
  }
}

/* ============================================================
   旅行char hub / 事件页 · ins 白卡化改版（Phase E1）
   整页脱离奶油手账底色与胶带强调色：白卡 + 墨色文字 + 单一赭石点缀。
   本页独有的视觉签名不是拍立得（这个太"手账"），而是"护照邮戳"——
   .travel-trip-stamp 改成圆形虚线戳章，呼应旅行主题但保持墨色克制。
   通过覆盖下面这套变量，级联掉本节内绝大多数引用同名变量的规则；
   少数写了硬编码色值（胶带橙 rgba/渐变）的规则在各自选择器上单独改写。
   严格圈在 .travel-char-page / .travel-event-page 作用域内，
   不影响其余仍用奶油手账体系的页面。
   ============================================================ */
.travel-char-page,
.travel-event-page {
  --bg-page: #f6f5f3;
  --bg: #f6f5f3;
  --bg-card: #ffffff;
  --bg-card-solid: #ffffff;
  --bg-sheet: #ffffff;
  --bg-input: #ffffff;
  --surface-card: #ffffff;
  --surface-card-border: rgba(15, 16, 18, 0.08);
  --border: rgba(15, 16, 18, 0.1);
  --grid-line: rgba(15, 16, 18, 0.06);

  --text: #17181b;
  --ink-brown: #17181b;
  --text-secondary: #6c6e74;
  --text-hint: rgba(21, 22, 26, 0.44);
  --text-accent: #a8552a;
  --accent-orange: #17181b;
  --accent-orange-ink: #ffffff;
  --accent-pink: #17181b;
  --accent-pink-ink: #17181b;
  --tape-orange: #a8552a;
  --icon-cream: #eef0ee;

  --btn-primary-bg: #17181b;
  --btn-primary-border: #17181b;
  --btn-outline-bg: #ffffff;
  --btn-outline-border: rgba(15, 16, 18, 0.16);
  --btn-soft-bg: #f2f1ef;
  --btn-soft-border: rgba(15, 16, 18, 0.08);

  --shadow-paper: 0 1px 2px rgba(15, 16, 18, 0.04), 0 8px 20px rgba(15, 16, 18, 0.05);
  --shadow-sticker: 0 1px 2px rgba(15, 16, 18, 0.05);
  --shadow-float: 0 18px 40px rgba(15, 16, 18, 0.16);

  --radius-md: 14px;
  --radius-lg: 20px;

  --polaroid-paper: #ffffff;
  --polaroid-ink: #55575d;
  --polaroid-shadow: rgba(15, 16, 18, 0.16);

  background: var(--bg-page);
}

.travel-navbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.travel-polaroid {
  display: flex;
  flex-direction: column;
  padding: 8px 8px 0;
  background: var(--polaroid-paper);
  border-radius: 4px;
  box-shadow: 0 8px 18px var(--polaroid-shadow), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.travel-polaroid-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 2px;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 50% 28%, transparent 55%, rgba(15, 16, 18, 0.06) 100%),
    #eeedeb;
}

.travel-polaroid-photo img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.travel-polaroid-caption {
  padding: 8px 4px 10px;
  font-family: var(--font-family-base);
  font-size: var(--font-xs);
  color: var(--polaroid-ink);
  text-align: center;
  line-height: 1.3;
  min-height: 1.3em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- hub 首页：展示台（大幅胶片自动播放）+ 底部 dock --- */
.travel-showcase-main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 20px calc(18px + var(--safe-bottom));
}

.travel-showcase {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.travel-showcase-progress {
  display: flex;
  gap: 4px;
  padding: 0 2px;
}

.travel-showcase-seg {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  border: none;
  padding: 0;
  background: rgba(15, 16, 18, 0.12);
  cursor: pointer;
}

.travel-showcase-seg.is-active,
.travel-showcase-seg.is-done {
  background: var(--tape-orange);
}

.travel-showcase-seg.is-active {
  opacity: 1;
}

.travel-showcase-seg.is-done {
  opacity: 0.55;
}

.travel-showcase-seg:focus-visible {
  outline: 2px solid var(--tape-orange);
  outline-offset: 2px;
}

.travel-showcase-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 10px 10px 0;
  border: none;
  background: var(--polaroid-paper);
  border-radius: var(--radius-lg);
  box-shadow: 0 14px 32px var(--polaroid-shadow), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
  cursor: pointer;
  touch-action: pan-y;
}

.travel-showcase-frame:focus-visible {
  outline: 2px solid var(--tape-orange);
  outline-offset: 3px;
}

.travel-showcase-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 50% 28%, transparent 55%, rgba(15, 16, 18, 0.06) 100%),
    #eeedeb;
}

.travel-showcase-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  .travel-showcase-photo img {
    animation: travel-showcase-fade-in 0.5s ease;
  }
}

@keyframes travel-showcase-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.travel-showcase-photo.is-empty {
  aspect-ratio: 4 / 5;
}

.travel-showcase-caption {
  padding: 10px 6px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}

.travel-showcase-caption strong {
  font-family: var(--font-family-base);
  font-size: var(--font-md);
  color: var(--polaroid-ink);
}

.travel-showcase-caption small {
  font-size: var(--font-xs);
  color: var(--text-hint);
}

.travel-showcase-frame.is-empty {
  cursor: pointer;
}

.travel-showcase-expand {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.82);
  color: var(--polaroid-ink);
  box-shadow: var(--shadow-paper);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.travel-showcase-expand svg {
  width: 16px;
  height: 16px;
}

.travel-showcase-expand:focus-visible {
  outline: 2px solid var(--tape-orange);
  outline-offset: 2px;
}

.travel-dock {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
  padding: 10px 14px calc(10px + var(--safe-bottom));
  background: var(--bg-sheet);
  border-top: 1px solid var(--border);
}

.travel-dock-btn {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: var(--font-xs);
  cursor: pointer;
}

.travel-dock-btn svg {
  width: 18px;
  height: 18px;
}

.travel-dock-btn--primary {
  flex: 1.4;
  background: var(--tape-orange);
  border-color: var(--tape-orange);
  color: #fff;
  font-weight: 600;
}

.travel-dock-btn:focus-visible {
  outline: 2px solid var(--tape-orange);
  outline-offset: 2px;
}

.travel-dock-dot {
  position: absolute;
  top: 6px;
  right: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tape-orange);
}

/* --- hub 首页：主题 / 角色 / 选项收纳进的创建旅行浮层，与旅行记录浮层共用 --- */
.travel-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  flex-direction: column;
  background: var(--bg-page, #fbf6f0);
}

@media (prefers-reduced-motion: no-preference) {
  .travel-sheet-overlay.is-entering {
    animation: travel-sheet-slide-up 0.22s ease;
  }
}

@keyframes travel-sheet-slide-up {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.travel-sheet-head {
  flex: 0 0 auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(14px + var(--safe-top)) 48px 12px;
  border-bottom: 1px solid var(--border);
}

.travel-sheet-head h2 {
  font-size: var(--font-md);
  font-weight: 700;
  color: var(--text);
}

.travel-sheet-close {
  position: absolute;
  right: 12px;
  top: calc(10px + var(--safe-top));
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-card);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.travel-sheet-close svg {
  width: 16px;
  height: 16px;
}

.travel-sheet-close:focus-visible {
  outline: 2px solid var(--tape-orange);
  outline-offset: 2px;
}

.travel-sheet-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 14px calc(20px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.travel-sheet-footer {
  flex: 0 0 auto;
  padding: 10px 14px calc(10px + var(--safe-bottom));
  background: var(--bg-sheet);
  border-top: 1px solid var(--border);
}

.travel-sheet-footer .btn {
  width: 100%;
}

/* --- 旅行一览行的拍立得小缩略图 --- */
.travel-trip-thumb {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid var(--polaroid-paper);
  box-shadow: 0 3px 8px var(--polaroid-shadow);
  transform: rotate(-3deg);
}

.travel-trip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- 事件页：回忆胶卷缩略条 --- */
.travel-reel-strip-preview {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}

.travel-reel-thumb-btn {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid var(--polaroid-paper);
  box-shadow: 0 3px 8px var(--polaroid-shadow);
  padding: 0;
  cursor: pointer;
  background: none;
}

.travel-reel-thumb-btn:nth-child(odd) { transform: rotate(-2deg); }
.travel-reel-thumb-btn:nth-child(even) { transform: rotate(2deg); }

.travel-reel-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- 归来明信片：真正的拍立得正反面 --- */
.travel-postcard-front {
  position: relative;
  gap: 0;
}

.travel-postcard-front .travel-trip-stamp {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
}

.travel-postcard-front img {
  max-height: none;
  border: none;
}

.travel-postcard-front .travel-polaroid-photo img {
  cursor: pointer;
}

/* --- 全屏胶卷查看器：转入深色相册语境，只在这个 overlay 内生效。
   这个 overlay 挂在 document.body 下（不在 .travel-char-page 内），
   所以它的深色 token 定在 :root，不依赖页面作用域也能生效。 --- */
:root {
  --reel-bg: #121214;
  --reel-ink: #f5f5f4;
  --reel-ink-dim: rgba(245, 245, 244, 0.6);
}

.travel-reel-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  flex-direction: column;
  background: var(--reel-bg);
  color: var(--reel-ink);
}

.travel-reel-backdrop {
  position: absolute;
  inset: 0;
}

.travel-reel-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(14px + var(--safe-top, 0px)) 48px 10px;
  flex: 0 0 auto;
}

.travel-reel-count {
  font-size: var(--font-sm);
  color: var(--reel-ink-dim);
  letter-spacing: 0.02em;
}

.travel-reel-close {
  position: absolute;
  right: 10px;
  top: calc(8px + var(--safe-top, 0px));
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--reel-ink);
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.travel-reel-save {
  position: absolute;
  right: 52px;
  top: calc(8px + var(--safe-top, 0px));
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--reel-ink);
  font-size: var(--font-xs);
  line-height: 1;
  cursor: pointer;
}

.travel-reel-save:disabled {
  opacity: 0.6;
}

.travel-reel-close:focus-visible,
.travel-reel-save:focus-visible,
.travel-reel-nav:focus-visible,
.travel-reel-thumb:focus-visible {
  outline: 2px solid var(--tape-orange);
  outline-offset: 2px;
}

.travel-reel-stage {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 0;
  padding: 0 4px;
}

.travel-reel-frame {
  margin: 0;
  max-width: min(86vw, 420px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.travel-reel-img {
  display: block;
  max-width: 100%;
  max-height: 56vh;
  border-radius: 18px;
  object-fit: contain;
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.5);
  background: #000;
}

.travel-reel-caption {
  font-family: var(--font-family-base);
  font-size: var(--font-sm);
  color: var(--reel-ink);
  text-align: center;
}

.travel-reel-broken {
  padding: 40px 20px;
  font-size: var(--font-sm);
  color: var(--reel-ink-dim);
  text-align: center;
}

.travel-reel-nav {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--reel-ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.travel-reel-strip {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 10px calc(14px + var(--safe-right, 0px)) calc(16px + var(--safe-bottom, 0px)) calc(14px + var(--safe-left, 0px));
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.travel-reel-thumb {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.14);
  opacity: 0.55;
  padding: 0;
  cursor: pointer;
  background: none;
}

.travel-reel-thumb.is-active {
  opacity: 1;
  border-color: var(--tape-orange);
}

.travel-reel-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  .travel-reel-overlay {
    animation: travel-reel-fade 0.18s ease;
  }
}

@keyframes travel-reel-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 360px) {
  .travel-showcase {
    max-width: 100%;
  }

  .travel-reel-frame {
    max-width: 92vw;
  }
}
