/* ===================================================
   history-flow.css
   "구속사 완성선" — 1강(출발역)에서 7강(종착역)까지 편도 노선 컨셉
   (사이트 공통 style.css의 디자인 토큰을 그대로 사용합니다.
    자체 :root 변수를 선언하지 않아 전역 스타일과 충돌하지 않습니다.)
=================================================== */

.gs-flow{
  --gs-speed:.35s ease;

  /* 사이트에 없던 디자인 토큰을 여기서 직접 정의 (다른 곳엔 영향 없음) */
  --sky-deep:#1E1B4B;
  --sky-mid:#4F46E5;
  --dawn-ember:#DB2777;
  --dawn-gold:#FDE68A;
  --white:#ffffff;
  --paper:#ffffff;
  --paper-alt:#F9FAFB;
  --line:#E5E7EB;
  --ink:#111827;
  --ink-soft:#6B7280;
  --radius:16px;

  /* 사이트 공통 section보다 넓게 (노선도가 넓게 펼쳐지도록) */
  max-width:1080px;
  border-top:1px solid #F3F4F6;
}

/* 섹션 상단 타이틀 영역 (다른 사이트 클래스와 안 겹치게 .gs-flow 안에서만 적용) */
.gs-flow .section-head{
  margin-bottom:32px;
}

.gs-flow .eyebrow-dark{
  display:inline-block;
  font-size:12px;
  font-weight:700;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--dawn-ember);
  margin-bottom:10px;
}

.gs-flow .section-head h2{
  font-size:26px;
  font-weight:800;
  color:var(--ink);
  margin-bottom:8px;
}

.gs-flow .section-head p{
  font-size:15px;
  color:var(--ink-soft);
  line-height:1.6;
}

/* ----------------------- */
/* 노선 배지 (노선 이름표) */

.gs-line-badge{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
  max-width:1080px;
  margin:0 auto 8px;
  padding:10px 20px;
  border-radius:999px;
  background:var(--sky-deep);
  color:var(--white);
  width:fit-content;
}

.gs-line-dot{
  font-size:16px;
  line-height:1;
}

.gs-line-name{
  font-family:'Noto Serif KR', serif;
  font-weight:700;
  font-size:15.5px;
  letter-spacing:.02em;
}

.gs-line-sub{
  font-family:'IBM Plex Mono',monospace;
  font-size:11.5px;
  color:var(--dawn-gold);
  border-left:1px solid rgba(255,255,255,0.3);
  padding-left:10px;
}

/* ----------------------- */

.gs-subway{
  width:100%;
  max-width:1080px;
  margin:auto;
  position:relative;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  padding:64px 30px 40px;
}

/* 레일 트랙 (선로 질감) */
.gs-track{
  position:absolute;
  left:70px;
  right:70px;
  top:88px;
  height:8px;
  background:
    repeating-linear-gradient(
      90deg,
      var(--white) 0px, var(--white) 3px,
      transparent 3px, transparent 14px
    ),
    var(--line);
  border-radius:20px;
  box-shadow:inset 0 1px 2px rgba(15,26,61,0.15);
}

/* 진행선 (지나온 구간) */
.gs-progress{
  width:0;
  height:100%;
  background:linear-gradient(90deg, var(--sky-deep), var(--dawn-ember));
  border-radius:20px;
  transition:width .6s cubic-bezier(.4,0,.2,1);
  position:relative;
}

/* 기차 아이콘: 선택된 역 위치로 이동 */
.gs-train{
  position:absolute;
  top:50%;
  left:0;
  font-size:22px;
  transform:translate(-50%,-50%);
  transition:left .6s cubic-bezier(.4,0,.2,1);
  filter:drop-shadow(0 3px 6px rgba(15,26,61,0.3));
  z-index:6;
}

/* ----------------------- */

.gs-station{
  position:relative;
  width:120px;
  text-align:center;
  cursor:pointer;
  z-index:5;
  transition:transform var(--gs-speed);
}

.gs-station:hover{
  transform:translateY(-6px);
}

.gs-station .circle{
  width:56px;
  height:56px;
  margin:auto;
  border-radius:50%;
  background:var(--white);
  border:3px solid var(--sky-deep);
  display:flex;
  justify-content:center;
  align-items:center;
  font-family:'IBM Plex Mono',monospace;
  font-size:18.4px;
  font-weight:700;
  color:var(--sky-deep);
  transition:.3s;
}

.gs-station span{
  display:block;
  margin-top:14px;
  font-size:14.9px;
  color:var(--sky-deep);
  font-weight:600;
}

.gs-station:hover .circle{
  background:var(--dawn-ember);
  border-color:var(--dawn-ember);
  color:var(--white);
  transform:scale(1.1);
}

.gs-station.active .circle{
  background:var(--dawn-ember);
  border-color:var(--dawn-ember);
  color:var(--white);
  transform:scale(1.12);
  box-shadow:0 0 0 6px rgba(225,122,77,0.18), 0 12px 28px rgba(225,122,77,0.35);
}

/* 종착역(1강/7강) 강조: 더 큰 원 + 이중 테두리 */
.gs-station.terminus .circle{
  width:64px;
  height:64px;
  font-size:20px;
  border-width:4px;
  box-shadow:0 0 0 3px var(--paper), 0 0 0 5px var(--sky-deep);
}
.gs-station.terminus.active .circle{
  box-shadow:0 0 0 3px var(--paper), 0 0 0 5px var(--dawn-ember), 0 12px 28px rgba(225,122,77,0.35);
}

.gs-stop-tag{
  display:block;
  margin-top:4px;
  font-family:'IBM Plex Mono',monospace;
  font-style:normal;
  font-size:10.5px;
  color:var(--dawn-ember);
  font-weight:700;
  letter-spacing:.03em;
}

.gs-hint{
  text-align:center;
  margin:4px 0 0;
  font-size:13px;
  color:var(--ink-soft);
}

/* ----------------------- */
/* 항상 보이는 전체 흐름 요약 박스 */

.gs-summary-box{
  max-width:900px;
  margin:36px auto 0;
  background:var(--paper-alt);
  border-radius:var(--radius);
  padding:26px 30px;
  border-left:4px solid var(--dawn-ember);
}

.gs-summary-chain{
  font-family:'IBM Plex Mono',monospace;
  font-size:13.5px;
  font-weight:600;
  color:var(--sky-deep);
  letter-spacing:.01em;
  line-height:1.8;
}

.gs-summary-text{
  margin-top:14px;
  color:var(--ink-soft);
  line-height:1.85;
  font-size:15px;
}

/* ----------------------- */
/* 역 호버/탭 시 나타나는 상세 툴팁 */

.gs-tooltip{
  position:fixed;
  background:var(--white);
  padding:22px 24px;
  border-radius:16px;
  box-shadow:0 20px 45px rgba(15,26,61,0.18);
  pointer-events:none;
  opacity:0;
  transform:translateY(4px);
  transition:opacity .18s ease, transform .18s ease;
  width:min(360px, 86vw);
  color:var(--ink);
  z-index:9999;
}

.gs-tooltip.show{
  opacity:1;
  transform:translateY(0);
}

.gs-tooltip .gs-number{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:28px;
  padding:0 14px;
  border-radius:30px;
  background:var(--dawn-ember);
  color:var(--white);
  font-family:'IBM Plex Mono',monospace;
  font-size:12px;
  font-weight:700;
}

.gs-tooltip .gs-title{
  margin-top:12px;
  font-family:'Noto Serif KR', serif;
  color:var(--sky-deep);
  font-size:18.5px;
  font-weight:700;
  line-height:1.4;
}

.gs-tooltip .gs-meta{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:12px;
}

.gs-tooltip .gs-chip{
  background:var(--paper-alt);
  color:var(--sky-mid);
  border-radius:50px;
  padding:6px 13px;
  font-size:12.5px;
  font-weight:600;
}

.gs-tooltip .gs-desc{
  margin-top:14px;
  color:var(--ink-soft);
  line-height:1.75;
  font-size:14px;
}

/* ----------------------- */
/* 태블릿: 가로 스크롤 노선도 유지 (761px ~ 1024px) */
@media (min-width:761px) and (max-width:1024px){
  .gs-subway{
    overflow-x:auto;
    justify-content:flex-start;
    gap:36px;
    padding-bottom:24px;
  }
  .gs-track{
    width:1020px;
    right:auto;
  }
  .gs-station{
    flex:0 0 110px;
  }
}

/* ----------------------- */
/* 모바일: 세로 리스트로 전환 (사이트 공통 브레이크포인트 760px) */
@media (max-width:760px){
  .gs-line-badge{
    margin-bottom:20px;
  }
  .gs-subway{
    display:block;
    padding:8px 0 4px;
  }
  .gs-track,
  .gs-progress,
  .gs-train{
    display:none;
  }
  .gs-station{
    width:100%;
    display:flex;
    align-items:center;
    margin-bottom:22px;
    text-align:left;
  }
  .gs-station:hover{
    transform:none;
  }
  .gs-station .circle,
  .gs-station.terminus .circle{
    margin:0;
    flex-shrink:0;
  }
  .gs-station span{
    margin:0 0 0 16px;
  }
  .gs-stop-tag{
    margin:0 0 0 16px;
    display:inline;
  }
  .gs-summary-box{
    padding:20px 20px;
  }
  .gs-summary-chain{
    font-size:12px;
  }
  .gs-tooltip .gs-title{
    font-size:16.5px;
  }
  .gs-tooltip .gs-desc{
    font-size:13.5px;
  }
}
