/* ── 方案 B：状态机首页 ── */

.home-shell {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.home-greeting {
  flex: 1;
  min-width: 0;
}

.greeting-line {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.greeting-line .greeting-sub {
  font-size: 20px;
  font-weight: 400;
  color: var(--text-secondary);
}

.greeting-line .greeting-name {
  font-family: var(--font-family-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.home-shell .child-pills {
  margin-top: 4px;
}

.home-states {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.home-state {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.home-state[hidden] {
  display: none !important;
}

/* 方案 A 叙事卡 — 单层编辑式，整卡可点 */
.story-card {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 8px 0 0;
  padding: 28px 26px 26px;
  min-height: 200px;
  border-radius: calc(var(--radius-lg) + 4px);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  background: linear-gradient(168deg, #fffdfb 0%, #fff8f1 46%, #fffcf8 100%);
  border: 1px solid rgba(212, 165, 116, 0.17);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 1px 2px rgba(44, 54, 57, 0.03),
    0 10px 36px rgba(196, 112, 75, 0.07),
    0 28px 56px rgba(44, 54, 57, 0.04);
  transition:
    transform 0.34s var(--ease-soft),
    box-shadow 0.34s var(--ease-soft),
    border-color 0.34s var(--ease-soft);
  -webkit-tap-highlight-color: transparent;
}

.story-card-atmo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 100% -8%, rgba(232, 168, 124, 0.14), transparent 58%),
    radial-gradient(ellipse 55% 45% at -8% 108%, rgba(107, 144, 128, 0.07), transparent 52%);
}

.story-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image: radial-gradient(rgba(44, 54, 57, 0.045) 0.55px, transparent 0.55px);
  background-size: 5px 5px;
  mask-image: linear-gradient(175deg, rgba(0, 0, 0, 0.5) 0%, transparent 72%);
}

.story-card:active {
  transform: scale(0.989);
}

.story-card--insufficient {
  background: linear-gradient(168deg, #fffdfb 0%, #faf6f2 46%, #fffcf8 100%);
  border-color: rgba(180, 160, 140, 0.22);
}

.story-card--insufficient .story-quote-main {
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.story-card--insufficient .story-insight {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-tertiary);
}

@media (hover: hover) {
  .story-card:hover {
    transform: translateY(-3px);
    border-color: rgba(212, 165, 116, 0.26);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 1),
      0 2px 4px rgba(44, 54, 57, 0.04),
      0 14px 40px rgba(196, 112, 75, 0.1),
      0 32px 64px rgba(44, 54, 57, 0.06);
  }

  .story-card:hover .story-card-chevron {
    transform: translateX(2px);
    color: var(--brand);
    background: rgba(196, 112, 75, 0.07);
  }

  .story-card:hover .story-cta-hint {
    color: var(--brand);
  }
}

.story-card.anim-fade-up .story-card-head {
  animation: storyPartIn 0.62s var(--ease-soft) 0.05s both;
}

.story-card.anim-fade-up .story-body {
  animation: storyPartIn 0.62s var(--ease-soft) 0.12s both;
}

.story-card.anim-fade-up .story-insight {
  animation: storyPartIn 0.62s var(--ease-soft) 0.2s both;
}

.story-card.anim-fade-up .story-cta-hint {
  animation: storyPartIn 0.62s var(--ease-soft) 0.28s both;
}

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

@media (prefers-reduced-motion: reduce) {
  .story-card.anim-fade-up .story-card-head,
  .story-card.anim-fade-up .story-body,
  .story-card.anim-fade-up .story-insight,
  .story-card.anim-fade-up .story-cta-hint {
    animation: none;
  }
}

.story-card-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}

.story-when {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.story-date {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  line-height: 1.45;
  text-transform: none;
}

.story-relative {
  font-size: 11px;
  color: var(--text-tertiary);
  opacity: 0.78;
  letter-spacing: 0.03em;
}

.story-relative[hidden] {
  display: none;
}

.story-card-chevron {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 10px;
  color: var(--text-tertiary);
  transition:
    transform 0.32s var(--ease-soft),
    color 0.32s var(--ease-soft),
    background 0.32s var(--ease-soft);
}

.story-body {
  position: relative;
  z-index: 1;
  margin: 0 0 22px;
  padding: 0;
}

.story-quote-main {
  margin: 0 0 12px;
  font-family: var(--font-family-display);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.38;
  letter-spacing: 0.04em;
  color: var(--brand-dark);
  text-wrap: balance;
}

.story-impact {
  margin: 0;
  font-family: var(--font-family-display);
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  opacity: 0.94;
}

.story-insight {
  position: relative;
  z-index: 1;
  margin: 0 0 18px;
  padding-top: 18px;
  font-family: var(--font-family-display);
  font-size: 13px;
  line-height: 1.78;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  opacity: 0.92;
}

.story-insight::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 36px;
  height: 1px;
  background: linear-gradient(90deg, rgba(212, 165, 116, 0.5), transparent);
}

.story-insight-em {
  color: var(--brand-dark);
  font-weight: 600;
}

.story-cta-hint {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  transition: color 0.32s var(--ease-soft);
}

.story-cta-hint::after {
  content: "\203A";
  font-size: 14px;
  line-height: 1;
  opacity: 0.72;
  transition: transform 0.32s var(--ease-soft);
}

.story-card:hover .story-cta-hint::after {
  transform: translateX(2px);
}

.home-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
  flex-shrink: 0;
}

.home-cta i { font-size: 16px; }

.home-cta-secondary {
  display: block;
  text-align: center;
  margin-top: 20px;
}

/* 通用状态区 */
.state-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px 8px;
  min-height: 240px;
}

.state-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--spark-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--spark);
  margin-bottom: 20px;
  box-shadow: var(--shadow-glow);
}

.state-icon--glow {
  animation: breathe 3s ease-in-out infinite;
}

.state-hero--stale .state-icon {
  background: var(--worth-bg);
  color: var(--worth);
  box-shadow: none;
}

.state-hero--empty .state-icon {
  background: var(--grow-bg);
  color: var(--grow);
  box-shadow: none;
}

.state-title {
  font-family: var(--font-family-display);
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 10px;
  line-height: 1.4;
}

.state-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
  max-width: 280px;
}

.state-steps {
  width: 100%;
  max-width: 240px;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.state-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-tertiary);
}

.state-step.done { color: var(--grow); }
.state-step.active { color: var(--brand); font-weight: 500; }
.state-step i { width: 16px; text-align: center; }
