/* ═══════════════════════════════════════════
   🌌 星系地图样式 (plaza-galaxy.css)
   星球/星系方案 — 老陈选定方案 C
   集成 Pixar 3D 风格行星图片 + 星系背景
   ═══════════════════════════════════════════ */

/* ===========================================
   星系容器
   =========================================== */
.galaxy-map {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(251,191,36,0.03) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 50%, rgba(139,92,246,0.02) 0%, transparent 70%),
    url('/games/images/galaxy_bg.png') center / cover,
    #0a0a1a;
  border-radius: 24px;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* 星空背景装饰（叠加在 galaxy_bg 之上的星星粒子） */
.galaxy-map::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 30% 60%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 50% 10%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 70% 30%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 85% 70%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 15% 80%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 60% 85%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 40% 40%, rgba(255,255,255,0.2), transparent),
    radial-gradient(1px 1px at 90% 15%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 25% 45%, rgba(255,255,255,0.3), transparent);
  pointer-events: none;
  z-index: 0;
}

/* ===========================================
   恒星 — 启程广场（中央，使用 Pixar 3D 图片）
   =========================================== */
.galaxy-star {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: default;
  pointer-events: none;
}

.galaxy-star-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(251,191,36,0.25);
  box-shadow:
    0 0 20px rgba(251,191,36,0.15),
    0 0 40px rgba(251,191,36,0.08),
    inset 0 0 20px rgba(251,191,36,0.05);
  animation: starPulse 3s ease-in-out infinite;
  position: relative;
  /* background-image 通过内联 style 设置 */
}

/* 恒星光晕 */
.galaxy-star-circle::before {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(251,191,36,0.08), transparent 70%);
  animation: starGlow 3s ease-in-out infinite;
}

.galaxy-star-label {
  font-size: 11px;
  color: rgba(251,191,36,0.6);
  margin-top: 6px;
  font-weight: 600;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(251,191,36,0.2);
}

@keyframes starPulse {
  0%, 100% {
    box-shadow:
      0 0 20px rgba(251,191,36,0.15),
      0 0 40px rgba(251,191,36,0.08),
      inset 0 0 20px rgba(251,191,36,0.05);
    transform: scale(1);
  }
  50% {
    box-shadow:
      0 0 30px rgba(251,191,36,0.25),
      0 0 60px rgba(251,191,36,0.12),
      inset 0 0 30px rgba(251,191,36,0.08);
    transform: scale(1.04);
  }
}

@keyframes starGlow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* ===========================================
   行星节点
   =========================================== */
.galaxy-planet {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  animation: planetEntrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.galaxy-planet:hover .planet-circle {
  transform: scale(1.15);
}

.galaxy-planet:active .planet-circle {
  transform: scale(0.95);
}

/* 行星圆形图标 — 使用 background-image 显示 Pixar 3D 图片 */
.planet-circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255,255,255,0.15);
  /* background 通过内联 style 设置 background-image */
  background-color: rgba(15,23,42,0.85);
  background-size: cover;
  background-position: center;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  position: relative;
  overflow: hidden;
}

/* 行星状态徽章 🔒/⭐ — 绝对定位在右上角 */
.planet-state-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: 14px;
  z-index: 3;
  pointer-events: none;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

/* 锁定状态：显示 🔒 徽章 */
.galaxy-planet.state-locked .planet-state-badge::after {
  content: '🔒';
}

/* 已完成状态：显示 ⭐ 徽章 */
.galaxy-planet.state-completed .planet-state-badge::after {
  content: '⭐';
}

/* 行星名称标签 */
.planet-label {
  font-size: 11px;
  font-weight: 600;
  margin-top: 5px;
  padding: 2px 10px;
  border-radius: 8px;
  background: rgba(15,23,42,0.75);
  backdrop-filter: blur(4px);
  white-space: nowrap;
  color: rgba(255,255,255,0.85);
  transition: all 0.3s;
  pointer-events: none;
}

/* ===========================================
   行星主题色（辉光边框 + 标签背景色）
   =========================================== */
.planet-theme-warm-orange .planet-circle {
  border-color: rgba(251,146,60,0.4);
}
.planet-theme-warm-orange .planet-label {
  background: rgba(251,146,60,0.12);
  color: #fb923c;
}

.planet-theme-cool-blue .planet-circle {
  border-color: rgba(96,165,250,0.4);
}
.planet-theme-cool-blue .planet-label {
  background: rgba(96,165,250,0.12);
  color: #60a5fa;
}

.planet-theme-emerald-green .planet-circle {
  border-color: rgba(52,211,153,0.4);
}
.planet-theme-emerald-green .planet-label {
  background: rgba(52,211,153,0.12);
  color: #34d399;
}

.planet-theme-purple .planet-circle {
  border-color: rgba(167,139,250,0.4);
}
.planet-theme-purple .planet-label {
  background: rgba(167,139,250,0.12);
  color: #a78bfa;
}

.planet-theme-gold .planet-circle {
  border-color: rgba(251,191,36,0.4);
}
.planet-theme-gold .planet-label {
  background: rgba(251,191,36,0.12);
  color: #fbbf24;
}

/* ===========================================
   行星状态：锁定
   =========================================== */
.galaxy-planet.state-locked {
  cursor: not-allowed;
}

.galaxy-planet.state-locked .planet-circle {
  filter: grayscale(100%) brightness(0.4);
  border-color: rgba(148,163,184,0.2);
}

.galaxy-planet.state-locked .planet-label {
  opacity: 0.5;
  background: rgba(148,163,184,0.08);
  color: rgba(148,163,184,0.5);
}

/* ===========================================
   行星状态：活跃
   =========================================== */
.galaxy-planet.state-active .planet-circle {
  animation: planetActiveGlow 2s ease-in-out infinite;
}

@keyframes planetActiveGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(251,191,36,0.1); }
  50% { box-shadow: 0 0 24px rgba(251,191,36,0.25); }
}

/* ===========================================
   行星状态：已完成
   =========================================== */
.galaxy-planet.state-completed .planet-circle {
  border-color: rgba(251,191,36,0.6);
  box-shadow: 0 0 20px rgba(251,191,36,0.2), inset 0 0 12px rgba(251,191,36,0.05);
}

/* ===========================================
   SVG 轨道层
   =========================================== */
.galaxy-orbit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.galaxy-orbit .orbit-path {
  fill: none;
  stroke: rgba(255,255,255,0.06);
  stroke-width: 1;
  stroke-dasharray: 4 6;
  opacity: 0;
  animation: orbitDraw 1s ease-out forwards;
}

.galaxy-orbit .orbit-path:nth-child(1) { animation-delay: 0.6s; }
.galaxy-orbit .orbit-path:nth-child(2) { animation-delay: 0.72s; }
.galaxy-orbit .orbit-path:nth-child(3) { animation-delay: 0.84s; }
.galaxy-orbit .orbit-path:nth-child(4) { animation-delay: 0.96s; }
.galaxy-orbit .orbit-path:nth-child(5) { animation-delay: 1.08s; }

@keyframes orbitDraw {
  0% {
    opacity: 0;
    stroke-dashoffset: 200;
  }
  100% {
    opacity: 0.5;
    stroke-dashoffset: 0;
  }
}

/* 轨道光晕装饰点 */
.orbit-glow {
  fill: rgba(251,191,36,0.08);
  animation: orbitGlowPulse 3s ease-in-out infinite;
}

@keyframes orbitGlowPulse {
  0%, 100% { opacity: 0.2; r: 2; }
  50% { opacity: 0.6; r: 4; }
}

/* ===========================================
   入场动画 — 行星依次浮现
   =========================================== */
@keyframes planetEntrance {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3) rotate(-30deg);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
}

.galaxy-planet:nth-child(4) { animation-delay: 0.3s; }
.galaxy-planet:nth-child(5) { animation-delay: 0.42s; }
.galaxy-planet:nth-child(6) { animation-delay: 0.54s; }
.galaxy-planet:nth-child(7) { animation-delay: 0.66s; }
.galaxy-planet:nth-child(8) { animation-delay: 0.78s; }

/* ===========================================
   小行星带装饰点（使用 Pixar 3D 图标图片）
   =========================================== */
.galaxy-asteroid-belt {
  position: absolute;
  inset: 2%;
  z-index: 2;
  pointer-events: none;
}

.galaxy-asteroid {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.3;
  animation: asteroidTwinkle 2s ease-in-out infinite;
  /* background-image 通过内联 style 设置 */
  background-size: cover;
  background-position: center;
}

@keyframes asteroidTwinkle {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

/* ===========================================
   年龄推荐高亮光环
   =========================================== */
.galaxy-planet.age-recommended .planet-circle {
  box-shadow: 0 0 18px rgba(251,191,36,0.15);
  border-color: rgba(251,191,36,0.5);
}

.galaxy-planet.age-recommended .planet-label::after {
  content: ' ✨';
  font-size: 10px;
}

/* ===========================================
   年龄不适宜提示
   =========================================== */
.galaxy-planet.age-hidden {
  opacity: 0.3;
  pointer-events: none;
}

.galaxy-planet.age-hidden .planet-label::after {
  content: ' · N+岁';
  font-size: 8px;
  color: rgba(148,163,184,0.4);
}

/* ===========================================
   城镇详情卡片 (模态浮层)
   =========================================== */
.town-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: overlayFadeIn 0.25s ease;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.town-detail-card {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(148,163,184,0.2);
  border-radius: 20px;
  max-width: 380px;
  width: 100%;
  padding: 28px 24px;
  position: relative;
  animation: cardSlideUp 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

@keyframes cardSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.town-detail-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 20px;
  color: #64748b;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  padding: 4px;
  transition: color 0.2s;
}

.town-detail-close:hover {
  color: #f8fafc;
}

.town-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.town-detail-icon {
  font-size: 40px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.town-detail-name {
  font-size: 20px;
  font-weight: 800;
  color: #f8fafc;
}

.town-detail-status-tag {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 10px;
  display: inline-block;
  margin-top: 2px;
}

.town-detail-status-tag.status-active {
  background: rgba(52,211,153,0.12);
  color: #4ade80;
}

.town-detail-status-tag.status-completed {
  background: rgba(251,191,36,0.12);
  color: #fbbf24;
}

/* 进度条 */
.town-detail-progress {
  margin-bottom: 16px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 4px;
}

.progress-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  transition: width 0.6s ease;
}

/* 星数区 */
.town-detail-stars {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 14px;
  color: #94a3b8;
}

.town-detail-stars .stars-value {
  font-size: 18px;
  letter-spacing: 2px;
}

/* 能力提升 */
.town-detail-ability {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
}

.ability-title {
  font-size: 12px;
  font-weight: 600;
  color: #fbbf24;
  margin-bottom: 8px;
}

.ability-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.ability-item {
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ability-item .ability-value {
  color: #4ade80;
  font-weight: 600;
}

/* NPC 对话区（详情卡片内） */
.town-detail-npc {
  background: rgba(251,191,36,0.03);
  border: 1px solid rgba(251,191,36,0.08);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
}

.npc-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

/* NPC 头像圆形（详情卡片内，使用 NPC 图片） */
.npc-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  border: 1px solid rgba(251,191,36,0.15);
  background-size: cover;
  background-position: center;
}

.npc-name {
  font-size: 12px;
  font-weight: 600;
  color: #fbbf24;
}

.npc-role {
  font-size: 10px;
  color: #64748b;
  margin-left: 4px;
}

.npc-message {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  line-height: 1.5;
  padding-left: 34px;
  font-style: italic;
}

/* CTA 按钮 */
.town-detail-cta {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
  background: linear-gradient(135deg, #8B5CF6, #7C3AED);
  color: #fff;
  box-shadow: 0 4px 20px rgba(139,92,246,0.25);
  font-family: inherit;
}

.town-detail-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(139,92,246,0.35);
}

.town-detail-cta:active {
  transform: scale(0.97);
}

/* ===========================================
   NPC 对话气泡（地图下方，使用 NPC 头像图片）
   =========================================== */
.npc-bubble-container {
  margin: 12px auto 16px;
  max-width: 480px;
  padding: 0 4px;
}

.npc-bubble {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(30,41,59,0.7);
  border: 1px solid rgba(251,191,36,0.1);
  border-radius: 16px;
  padding: 14px 16px;
  backdrop-filter: blur(8px);
  animation: bubbleIn 0.4s ease-out;
  min-height: 60px;
}

@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* NPC 头像（气泡内，48×48 圆形，使用 NPC 图片） */
.npc-bubble-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(251,191,36,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  box-shadow: 0 0 8px rgba(251,191,36,0.1);
}

.npc-bubble-content {
  flex: 1;
  min-width: 0;
}

.npc-bubble-name {
  font-size: 12px;
  font-weight: 600;
  color: #fbbf24;
  margin-bottom: 2px;
}

.npc-bubble-role {
  font-size: 10px;
  color: #64748b;
  margin-left: 4px;
  font-weight: normal;
}

.npc-bubble-text {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  line-height: 1.5;
}

/* ===========================================
   卡片列表折叠
   =========================================== */
.story-list-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
}

.story-list-toggle:hover {
  background: rgba(255,255,255,0.06);
  color: #f8fafc;
}

.story-list-toggle:active {
  transform: scale(0.98);
}

.story-collapsible {
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
  max-height: 0;
  opacity: 0;
}

.story-collapsible.expanded {
  max-height: 2000px;
  opacity: 1;
}

/* ===========================================
   分享按钮
   =========================================== */
.share-code-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #fbbf24;
  background: rgba(251,191,36,0.08);
  border: 1px solid rgba(251,191,36,0.15);
  border-radius: 20px;
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
  white-space: nowrap;
}

.share-code-btn:hover {
  background: rgba(251,191,36,0.15);
  transform: translateY(-1px);
}

.share-code-btn:active {
  transform: scale(0.95);
}

/* 分享浮层 */
.share-modal-box {
  text-align: center;
  padding: 10px 0;
}

.share-code-display {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 4px;
  color: #fbbf24;
  background: rgba(251,191,36,0.06);
  border: 1px solid rgba(251,191,36,0.15);
  border-radius: 14px;
  padding: 16px;
  margin: 16px 0;
  font-family: "Courier New", monospace;
}

.share-copy-btn {
  padding: 10px 32px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  background: linear-gradient(135deg, #8B5CF6, #7C3AED);
  color: #fff;
  font-family: inherit;
}

.share-copy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(139,92,246,0.3);
}

.share-copy-btn:active {
  transform: scale(0.97);
}

.share-copy-btn.copied {
  background: linear-gradient(135deg, #4ade80, #22c55e);
}

/* ===========================================
   年龄过滤器条
   =========================================== */
.age-filter-bar {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 4px 0;
  margin-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.age-filter-bar::-webkit-scrollbar {
  display: none;
}

.age-filter-btn {
  flex-shrink: 0;
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.25s;
  font-family: inherit;
  white-space: nowrap;
}

.age-filter-btn:hover {
  border-color: rgba(139,92,246,0.2);
  background: rgba(139,92,246,0.06);
  color: rgba(255,255,255,0.7);
}

.age-filter-btn.active {
  border-color: rgba(139,92,246,0.3);
  background: rgba(139,92,246,0.1);
  color: #a78bfa;
}

/* ===========================================
   Shake 动画（锁定行星点击）
   =========================================== */
@keyframes planetShake {
  0%, 100% { transform: translate(-50%, -50%) translateX(0); }
  20% { transform: translate(-50%, -50%) translateX(-6px); }
  40% { transform: translate(-50%, -50%) translateX(6px); }
  60% { transform: translate(-50%, -50%) translateX(-4px); }
  80% { transform: translate(-50%, -50%) translateX(4px); }
}

.galaxy-planet.shake {
  animation: planetShake 0.4s ease-in-out !important;
}

/* ===========================================
   Toast 消息
   =========================================== */
.galaxy-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  background: rgba(30,41,59,0.95);
  border: 1px solid rgba(148,163,184,0.15);
  border-radius: 12px;
  padding: 10px 20px;
  font-size: 13px;
  color: #f8fafc;
  max-width: 320px;
  text-align: center;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.2s forwards;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; }
  to { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* ===========================================
   FinPortrait 容器
   =========================================== */
.finportrait-container {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.finportrait-container canvas,
.finportrait-container svg {
  border-radius: 50%;
  background: rgba(15,23,42,0.6);
  border: 1px solid rgba(251,191,36,0.1);
}

/* ===========================================
   响应式
   =========================================== */

/* 默认（移动端 ≤480px） */
.galaxy-map { max-width: 100%; }
.planet-circle { width: 48px; height: 48px; }
.galaxy-star-circle { width: 58px; height: 58px; }
.planet-label { font-size: 10px; }
.town-detail-card { margin: 0 8px; }

/* 平板 ≥768px */
@media (min-width: 768px) {
  .galaxy-map { max-width: 520px; }
  .planet-circle { width: 64px; height: 64px; }
  .galaxy-star-circle { width: 72px; height: 72px; }
  .planet-label { font-size: 11px; }
  .town-detail-card { max-width: 420px; }
}

/* 桌面 ≥1024px */
@media (min-width: 1024px) {
  .galaxy-map { max-width: 480px; }
  .planet-circle { width: 72px; height: 72px; }
  .galaxy-star-circle { width: 82px; height: 82px; }
  .planet-label { font-size: 12px; }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .galaxy-star-circle,
  .galaxy-planet.state-active .planet-circle {
    animation: none !important;
  }
  .galaxy-planet {
    animation: none !important;
    opacity: 1 !important;
  }
  .galaxy-orbit .orbit-path {
    animation: none !important;
    opacity: 0.3 !important;
  }
  .town-detail-card {
    animation: none !important;
  }
}
