/* ===== 성우웰라이프 상조 · 장례는 이렇게 진행됩니다 (2줄 Z자 흐름) ===== */
  .sw-flow {
    --sw-bg: var(--sw-surface-cream);
    --sw-card: var(--sw-surface);
    --sw-navy: var(--sw-navy-900);
    --sw-indigo: var(--sw-navy-900);
    --sw-flow-text: var(--sw-text);
    --sw-muted: var(--sw-text-muted);
    --sw-flow-line: var(--sw-line);
    --sw-gold: var(--sw-gold-600);
    --sw-gold-soft: var(--sw-surface-sand);
    --sw-indigo-soft: var(--sw-text-on-dark);
    --sw-border: var(--sw-line);
    --sw-step: .3s;

    background: var(--sw-bg);
    padding: 96px 24px;
    font-family: var(--sw-font);
    color: var(--sw-flow-text);
  }
  .sw-flow * { box-sizing: border-box; }
  .sw-flow__inner { max-width: 1040px; margin: 0 auto; }

  .sw-flow__eyebrow { color: var(--sw-indigo); font-weight: 700; font-size: 16px; letter-spacing: -.02em; margin: 0 0 16px; }
  .sw-flow__title { font-family: var(--sw-font); color: var(--sw-navy); font-size: clamp(32px,4vw,48px); line-height: 1.2; margin: 0 0 16px; font-weight: 700; }
  .sw-flow__desc { font-size: 16px; line-height: 1.6; margin: 0 0 48px; }

  /* 한 줄(3단계) */
  .sw-row { position: relative; }
  .sw-row__days { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-bottom: 24px; }
  .sw-day { text-align: center; font-size: 14px; font-weight: 700; padding: 8px 8px; border-radius: var(--sw-radius-pill); background: var(--sw-indigo-soft); color: var(--sw-indigo); }
  .sw-day--all { grid-column: 1 / 4; }
  .sw-day--after { background: var(--sw-gold-soft); color: var(--sw-gold-600); }

  .sw-row__track { position: relative; }
  .sw-row__line { position: absolute; top: 23px; left: calc(100% / 6); right: calc(100% / 6); height: 2px; background: var(--sw-flow-line); transform-origin: left center; transform: scaleX(0); transition: transform .9s ease; transition-delay: calc(var(--i) * var(--sw-step)); }

  .sw-row__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; position: relative; }

  .sw-step { display: flex; flex-direction: column; align-items: center; opacity: 0; transform: translateX(-24px); transition: opacity .7s ease, transform .7s ease; transition-delay: calc(var(--i) * var(--sw-step)); }
  .sw-step__dot { width: 48px; height: 48px; border-radius: 50%; background: var(--sw-navy); color: var(--sw-text-on-dark); display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; box-shadow: 0 0 0 6px var(--sw-bg); }
  .sw-step__dot svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .sw-step--after .sw-step__dot { background: var(--sw-gold); }

  .sw-step__card { margin-top: 24px; width: 100%; flex: 1; background: var(--sw-card); border: 1px solid var(--sw-border); border-radius: var(--sw-radius-lg); padding: 24px 24px; text-align: center; }
  .sw-step__label { font-size: 14px; font-weight: 700; color: var(--sw-indigo); margin: 0 0 8px; }
  .sw-step--after .sw-step__label { color: var(--sw-gold-600); }
  .sw-step__name { font-family: var(--sw-font); color: var(--sw-navy); font-size: 20px; font-weight: 700; line-height: 1.2; margin: 0 0 8px; word-break: keep-all; }
  .sw-step__text { font-size: 16px; line-height: 1.6; margin: 0; word-break: keep-all; }

  /* 줄 바꿈 연결선 (03 → 04, Z자) */
  .sw-turn { position: relative; height: 56px; margin: 0 calc((100% - 48px) / 6); opacity: 0; transition: opacity .6s ease; transition-delay: calc(var(--i) * var(--sw-step)); }
  .sw-turn__top { position: absolute; top: 0; right: 0; left: 0; height: 50%; border-right: 2px dashed var(--sw-flow-line); border-bottom: 2px dashed var(--sw-flow-line); border-bottom-right-radius: 14px; }
  .sw-turn__bottom { position: absolute; bottom: 0; left: 0; width: 16px; height: 50%; border-left: 2px dashed var(--sw-flow-line); border-top: 2px dashed var(--sw-flow-line); border-top-left-radius: 14px; margin-top: -2px; }
  .sw-turn__arrow { position: absolute; bottom: -4px; left: -6px; width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 8px solid var(--sw-flow-line); }

  .sw-flow__note { margin: 48px 0 0; font-size: 14px; color: var(--sw-muted); text-align: center; }

  /* 나타나기 */
  .sw-flow.is-visible .sw-row__line { transform: scaleX(1); }
  .sw-flow.is-visible .sw-step,
  .sw-flow.is-visible .sw-turn { opacity: 1; transform: none; }

  /* 휴대폰: 세로 1열, 위에서 아래로 */
  @media (max-width:560px) {
    .sw-flow { padding: 64px 16px; }
    .sw-flow__desc { margin-bottom: 32px; }
    .sw-row__days, .sw-turn { display: none; }
    .sw-row + .sw-row { margin-top: 16px; }
    .sw-row__line { top: 24px; bottom: 24px; left: 23px; right: auto; width: 2px; height: auto; transform-origin: center top; transform: scaleY(0); }
    .sw-flow.is-visible .sw-row__line { transform: scaleY(1); }
    .sw-row__steps { grid-template-columns: 1fr; gap: 16px; }
    .sw-step { flex-direction: row; align-items: flex-start; gap: 16px; transform: translateY(16px); }
    .sw-step__dot { flex-shrink: 0; }
    .sw-step__card { margin-top: 0; text-align: left; padding: 16px; }
    .sw-step__name { font-size: 18px; margin-bottom: 8px; }
  }

  @media (prefers-reduced-motion: reduce) {
    .sw-row__line, .sw-step, .sw-turn { transition: none !important; }
  }

  /* 사이트 가독성 기준에 맞춰 글자 크기 상향 (PC) */
  @media (min-width:561px) {
    .sw-flow__eyebrow { font-size: 18px; }
    .sw-flow__desc { font-size: 18px; }
    .sw-day { font-size: 18px; }
    .sw-step__label { font-size: 16px; }
    .sw-step__name { font-size: 20px; }
    .sw-step__text { font-size: 18px; color: var(--sw-text); }
    .sw-flow__note { font-size: 16px; color: var(--sw-text); }
  }

/* 일차 표시 확대 */
@media (min-width:561px) {
  .sw-day { font-size: 20px; padding: 16px 8px; }
  .sw-step__label { font-size: 18px; }
}

/* 아이콘 확대 + 제목 서체를 사이트 기본 서체로 */
.sw-flow__title, .sw-step__name { font-family: var(--sw-font); letter-spacing: -.02em; }
.sw-flow__title { font-weight: 800; }
.sw-step__name { font-weight: 800; }
@media (min-width:561px) {
  .sw-step__label { font-size: 16px; }
  .sw-step__dot { width: 76px; height: 76px; box-shadow: 0 0 0 8px var(--sw-bg); }
  .sw-step__dot svg { width: 38px; height: 38px; stroke-width: 1.5; }
  .sw-row__line { top: 37px; }
  .sw-step__card { margin-top: 24px; }
}

/* 카드 안 라벨: 배경을 채운 알약 */
.sw-step__label { display: inline-block; background: var(--sw-indigo-soft); color: var(--sw-indigo); padding: 8px 16px; border-radius: var(--sw-radius-pill); margin: 0 0 16px; }
.sw-step--after .sw-step__label { background: var(--sw-gold-soft); color: var(--sw-gold-600); }
@media (min-width:561px) { .sw-step__label { font-size: 18px; font-weight: 800; } }

/* 위쪽 일차 알약: 글자 크기만큼만 감싸기 (가운데 정렬) */
@media (min-width:561px) {
  .sw-day { justify-self: center; width: fit-content; padding: 8px 32px; }
}

/* 진행 순서를 따라 흐르는 연결선 (반복): 1줄 → 꺾임선 → 2줄 → 다시 처음 */
@media (min-width:561px) {
  .sw-row__line::after,
  .sw-turn::after {
    content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%;
    background: var(--sw-indigo); box-shadow: 0 0 0 5px rgba(59,68,166,.18), 0 0 14px 4px rgba(59,68,166,.35);
    opacity: 0; pointer-events: none;
  }
  .sw-row__line::after { top: -7px; left: 0; margin-left: -8px; }
  .sw-turn::after { top: 0; left: 100%; margin: -8px 0 0 -8px; }

  .sw-flow.is-visible .sw-row__line::after { animation: swRun1 9s ease-in-out 1.6s infinite; }
  .sw-flow.is-visible .sw-turn + .sw-row .sw-row__line::after { animation: swRun2 9s ease-in-out 1.6s infinite; }
  .sw-flow.is-visible .sw-turn::after { animation: swTurn 9s linear 1.6s infinite; }

  /* 1줄: 0~38% 구간에서 왼쪽 → 오른쪽 */
  @keyframes swRun1 {
    0% { left: 0; opacity: 0; } 3% { opacity: 1; }
    35% { left: 100%; opacity: 1; } 38% { left: 100%; opacity: 0; }
    100% { left: 100%; opacity: 0; }
  }
  /* 꺾임선: 38~58% 구간에서 오른쪽 위 → 아래 → 왼쪽 → 아래 */
  @keyframes swTurn {
    0%, 37% { left: 100%; top: 0; opacity: 0; }
    39% { left: 100%; top: 0; opacity: 1; }
    45% { left: 100%; top: 50%; opacity: 1; }
    52% { left: 0; top: 50%; opacity: 1; }
    58% { left: 0; top: 100%; opacity: 1; }
    60%, 100% { left: 0; top: 100%; opacity: 0; }
  }
  /* 2줄: 58~95% 구간에서 왼쪽 → 오른쪽 */
  @keyframes swRun2 {
    0%, 58% { left: 0; opacity: 0; } 61% { left: 0; opacity: 1; }
    92% { left: 100%; opacity: 1; } 95%, 100% { left: 100%; opacity: 0; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .sw-row__line::after, .sw-turn::after { animation: none !important; display: none; }
}
.sw-flow{scroll-margin-top:90px}.sg{scroll-margin-top:90px}
