/* 챗베이비 — 임신 40주를 지하철 노선으로 그린 디자인.
 * 글꼴: 제목은 간판 글씨 같은 도현체, 본문은 IBM Plex Sans KR (index.html 에서 Google Fonts 로 불러온다).
 * 구간(section)마다 노선 색(--line)이 있고, 굵은 선·역 표지판·객차 모양을 쓴다. */

:root {
  --bg: #f6f4ef;
  --paper: #ffffff;
  --ink: #14171a;
  --sub: #555c63;
  --faint: #596068;
  --hair: rgba(20, 23, 26, .12);
  --track: #e4e0d6;
  --l1: #0b57d0;
  --l2: #c93b1b;
  --l3: #007a55;
  --on: #ffffff;
  --line: var(--l1);
  --danger: #d32f1e;
  --danger-bg: #fdecea;
  --display: "Do Hyeon", "Apple SD Gothic Neo", sans-serif;
  --body: "IBM Plex Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--body);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: break-word;
}
a { color: var(--line); text-decoration: none; }
a:hover { text-decoration: underline; }
b { font-weight: 700; }
.inner { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* 노선 번호 동그라미 */
.roundel {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 1.5em; height: 1.5em; border-radius: 50%;
  background: var(--line); color: var(--on); font-family: var(--display); font-weight: 400; font-size: .72em; line-height: 1; padding-top: .12em;
}

/* ===== 첫 화면: 승강장 ===== */
.hero { position: relative; background: var(--ink); color: #f6f4ef; padding: 0 0 56px; overflow: hidden; }
.scene { position: relative; height: 118px; margin: 0 -20px; }
.track { position: absolute; left: 0; right: 0; bottom: 14px; height: 6px; background: #3a3f45; }
.track::after {
  content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 8px;
  background: repeating-linear-gradient(90deg, #3a3f45 0 10px, transparent 10px 34px);
}
.hero-train { position: absolute; bottom: 16px; left: 0; width: 330px; height: 70px; animation: arrive 1.4s cubic-bezier(.2, .8, .2, 1) both; }
.t-body { fill: #f6f4ef; }
.t-stripe { fill: var(--l1); }
.t-win { fill: #1f2a44; }
.t-door { fill: none; stroke: #14171a; stroke-width: 2; }
.t-wheel { fill: #3a3f45; stroke: #f6f4ef; stroke-width: 2; }
.t-light { fill: #ffd84d; }
@keyframes arrive { from { transform: translateX(-120%); } to { transform: translateX(max(4vw, calc(50vw - 165px))); } }
@keyframes idle { 0%, 100% { transform: translateX(max(4vw, calc(50vw - 165px))) translateY(0); } 50% { transform: translateX(max(4vw, calc(50vw - 165px))) translateY(-1.5px); } }
@keyframes sleepers { to { background-position: -34px 0; } }
@keyframes blink { 50% { opacity: .35; } }

.plate { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 26px; font-family: var(--display); font-weight: 400; font-size: 15px; color: #c9cdd2; }
.plate .roundel { font-size: 15px; width: 2.1em; height: 2.1em; }
.hero h1 { margin: 10px 0 0; text-align: center; font-family: var(--display); font-weight: 400; font-size: 44px; line-height: 1.15; letter-spacing: -0.03em; }
.hero .inner > p { margin: 12px auto 0; max-width: 460px; text-align: center; color: #b9bec4; font-size: 17px; line-height: 1.5; }

/* 승차권 발매기 */
.form { position: relative; max-width: 540px; margin: 34px auto 0; background: var(--paper); color: var(--ink); border-radius: 22px; padding: 26px 22px 20px; border: 3px solid var(--ink); box-shadow: 0 0 0 3px #f6f4ef, 8px 10px 0 3px var(--l1); }
.field { margin-bottom: 22px; }
.label { display: block; font-family: var(--display); font-weight: 400; font-size: 15px; margin-bottom: 8px; }
.label em { font-family: var(--body); font-style: normal; font-weight: 400; color: var(--faint); font-size: 13px; margin-left: 6px; }
.help { margin: 8px 0 0; font-size: 13px; color: var(--faint); }
.input {
  display: block; width: 100%; height: 56px; padding: 0 16px; font: inherit; font-size: 17px; font-weight: 600; color: var(--ink);
  background: var(--bg); border: 2px solid var(--ink); border-radius: 12px; -webkit-appearance: none; appearance: none;
}
select.input {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2314171a' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
.input:focus { outline: none; border-color: var(--l1); box-shadow: 0 0 0 4px rgba(0, 82, 255, .2); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.segment { display: grid; grid-template-columns: repeat(3, 1fr); border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; }
.segment input, .chip input, .check input { position: absolute; opacity: 0; pointer-events: none; }
.segment span { display: flex; align-items: center; justify-content: center; height: 48px; font-weight: 600; cursor: pointer; border-left: 2px solid var(--ink); }
.segment label:first-child span { border-left: 0; }
.segment input:checked + span { background: var(--ink); color: var(--paper); }
.segment input:focus-visible + span, .chip input:focus-visible + span, .check input:focus-visible + .box { outline: 3px solid var(--l1); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip span { display: inline-flex; align-items: center; height: 44px; padding: 0 16px; border: 2px solid var(--ink); border-radius: 980px; font-size: 15px; font-weight: 600; cursor: pointer; transition: transform .15s, background .15s; }
.chip span:active { transform: scale(.96); }
.chip input:checked + span { background: var(--l1); border-color: var(--l1); color: var(--on); }
.privacy { margin: 0; font-size: 13px; color: var(--faint); text-align: center; }
.empty { text-align: center; color: #b9bec4; margin: 28px 0 0; }

/* ===== 상단 노선 바 ===== */
.tabs { position: sticky; top: 0; z-index: 5; background: var(--paper); border-bottom: 3px solid var(--ink); }
.tabs .inner { position: relative; display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; padding-top: 0; padding-bottom: 20px; }
.tabs .inner::-webkit-scrollbar, .cal-dots::-webkit-scrollbar, .cal-track::-webkit-scrollbar { display: none; }
.tabs .inner::before { content: ""; position: absolute; left: 20px; bottom: 11px; height: 4px; width: max(calc(100% - 40px), 520px); background: var(--ink); border-radius: 2px; }
.tabs a { position: relative; flex: 1 0 auto; min-width: 76px; padding: 12px 8px 12px; text-align: center; font-family: var(--display); font-weight: 400; font-size: 13px; color: var(--sub); }
.tabs a::after { content: ""; position: absolute; left: 50%; bottom: -16px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink); transition: transform .25s, background .25s; }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a.on { color: var(--ink); font-weight: 700; }
.tabs a.on::after { background: var(--l1); transform: scale(1.35); }
.nav-train { position: absolute; left: 0; bottom: 20px; width: 26px; height: 12px; border-radius: 4px 6px 2px 2px; background: var(--l1); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25); transition: transform .5s cubic-bezier(.3, .8, .3, 1); pointer-events: none; }

/* ===== 구간 ===== */
.section { padding: 64px 0; scroll-margin-top: 80px; border-top: 3px solid var(--ink); }
.section:first-of-type { border-top: 0; }
/* 주노선(파랑) + 돈·주의(주황) + 지역·몸(초록) 세 가지만 쓴다 */
#sec-todo, #sec-cards, #sec-gear { --line: var(--l1); } #sec-national, #sec-insurance { --line: var(--l2); } #sec-local, #sec-supp { --line: var(--l3); }
.section h2 { display: flex; align-items: center; gap: 14px; margin: 0; font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1.2; letter-spacing: -0.03em; }
.section h2 .roundel { font-size: 20px; width: 1.9em; height: 1.9em; box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--line); margin-left: 6px; }
.lead { margin: 16px 0 28px; max-width: 600px; font-size: 17px; line-height: 1.5; color: var(--sub); }
.group-title { display: flex; align-items: center; gap: 10px; margin: 34px 0 14px; font-family: var(--display); font-weight: 400; font-size: 18px; }
.group-title::before { content: ""; width: 22px; height: 6px; border-radius: 3px; background: var(--line); }
.group-title:first-child { margin-top: 0; }

/* ===== 이번 역 표지판 ===== */
.week { margin: 26px 0 36px; }
.sign { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; background: var(--paper); border: 3px solid var(--ink); border-radius: 16px; overflow: hidden; }
.sign-side { padding: 0 14px; font-family: var(--display); font-weight: 400; font-size: 14px; color: var(--faint); }
.sign-side::before { content: "‹ "; }
.sign-side.next { text-align: right; color: var(--ink); font-weight: 700; }
.sign-side.next::before { content: none; }
.sign-side.next::after { content: " ▶"; font-size: .8em; }
.sign-now { display: flex; flex-direction: column; align-items: center; padding: 16px 22px 14px; background: var(--line); color: var(--on); }
.sign-cap { font-family: var(--display); font-weight: 400; font-size: 13px; opacity: .85; }
.sign-now strong { font-family: var(--display); font-weight: 400; font-size: 38px; line-height: 1.15; letter-spacing: -0.03em; white-space: nowrap; }
.flapline { margin-top: 18px; text-align: center; font-family: var(--display); font-weight: 400; font-size: 18px; }
.flapline small { display: block; margin-top: 6px; font-family: var(--body); font-size: 14px; color: var(--sub); font-weight: 400; }
.flaps { display: inline-flex; gap: 3px; vertical-align: -6px; margin: 0 4px; }
.flap { box-shadow: 0 0 0 1px rgba(255, 255, 255, .22); display: inline-block; min-width: 30px; padding: 6px 4px 3px; border-radius: 6px; background: #14171a; color: #ffd84d; font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1; text-align: center; transform-origin: 50% 0; animation: flip .5s cubic-bezier(.3, 1.4, .5, 1) both; background-image: linear-gradient(transparent 49%, rgba(255, 255, 255, .18) 49% 51%, transparent 51%); }
@keyframes flip { from { transform: perspective(200px) rotateX(-90deg); opacity: 0; } to { transform: none; opacity: 1; } }
.week .warn { max-width: 560px; margin: 20px auto 0; }

/* 노선도 */
.route { margin-top: 18px; }
.route svg { display: block; width: 100%; height: auto; overflow: visible; }
.rail { stroke: var(--track); stroke-width: 12; stroke-linecap: round; }
.rail-done { stroke: var(--line); stroke-width: 12; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p)); animation: draw 1.4s cubic-bezier(.3, .8, .3, 1) both; }
@keyframes draw { from { stroke-dashoffset: 1; } }
.stop { fill: var(--paper); stroke: var(--track); stroke-width: 6; }
.stop.passed { stroke: var(--line); }
.stop.terminal { stroke: var(--ink); stroke-width: 7; }
.tick { fill: var(--paper); opacity: .8; }
.stop-label { font-family: var(--display); font-weight: 400; font-size: 30px; fill: var(--sub); }
.route-train { transform: translateX(var(--x)); animation: ride 1.4s cubic-bezier(.3, .8, .3, 1) both; }
@keyframes ride { from { transform: translateX(0); } }
.route .t-body { fill: var(--ink); } .route .t-stripe { fill: #ffd84d; } .route .t-win { fill: var(--paper); } .route .t-wheel { fill: var(--ink); stroke: var(--bg); stroke-width: 2; }

/* ===== 객차 카드 ===== */
.cal-dots { position: relative; display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 16px; scrollbar-width: none; }
@media (min-width: 735px) { .cal-dots { justify-content: center; } }
.dot { flex: none; min-width: 44px; height: 44px; padding: 3px 12px 0; border: 3px solid var(--ink); border-radius: 22px; background: var(--paper); color: var(--ink); font-family: var(--display); font-weight: 400; font-size: 14px; cursor: pointer; transition: transform .2s, background .2s; }
.dot.now { box-shadow: 0 0 0 3px var(--c); }
.dot.on { background: var(--c); border-color: var(--c); color: var(--on); transform: translateY(-3px); }
.s1, .s2, .s3 { --c: var(--l1); } .s4 { --c: var(--l3); }

.cal-track { display: flex; align-items: flex-start; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px max(20px, calc(50% - 280px)) 30px; margin: 0 -20px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cal-track:focus-visible { outline: 3px solid var(--l1); outline-offset: 4px; border-radius: 24px; }
.cal-card { position: relative; flex: 0 0 min(88%, 560px); scroll-snap-align: center; background: var(--paper); border: 3px solid var(--ink); border-radius: 26px 26px 14px 14px; padding: 0 20px 22px; margin-bottom: 16px; }
.cal-card::before, .cal-card::after { content: ""; position: absolute; bottom: -19px; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); border: 6px solid var(--bg); box-shadow: inset 0 0 0 4px var(--faint); }
.cal-card::before { left: 34px; } .cal-card::after { right: 34px; }
.cal-card.is-past .car-roof { background: var(--faint); }
.car-roof { display: flex; align-items: center; gap: 10px; margin: 0 -20px; padding: 12px 16px; background: var(--c); border-radius: 22px 22px 0 0; border-bottom: 3px solid var(--ink); }
.car-no { font-family: var(--display); font-weight: 400; font-size: 14px; color: var(--on); padding-top: 2px; white-space: nowrap; }
.car-windows { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.car-windows i { height: 22px; border-radius: 6px; background: rgba(255, 255, 255, .28); border: 2px solid #14171a; }
/* 창문 불은 그 달에 끝낸 일만큼 켜진다 (app.js updateProgress) */
.car-windows i { transition: background .4s; }
.car-windows i.lit { background: #ffd84d; }
.cal-stage { display: inline-block; margin-top: 18px; font-family: var(--display); font-weight: 400; font-size: 13px; padding: 5px 10px 3px; border-radius: 6px; background: var(--bg); color: var(--c); border: 2px solid var(--c); }
.cal-card.is-now .cal-stage { background: var(--c); color: var(--on); }
.cal-card h3 { margin: 10px 0 0; font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.15; letter-spacing: -0.03em; }
.cal-sub { margin-top: 6px; color: var(--sub); font-size: 15px; }
.cal-progress { margin-top: 4px; font-size: 14px; color: var(--c); font-weight: 700; min-height: 20px; }
.cal-empty { color: var(--faint); margin: 22px 0 6px; }
.todos, .gear-list { list-style: none; margin: 14px 0 0; padding: 0; }
.todo, .gear { position: relative; display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--hair); }
.gear-list { margin: 0; } .gear:first-child { border-top: 0; padding-top: 0; } .gear:last-child { padding-bottom: 0; }

/* 완료 체크 = 개찰구 표시등 */
.check { flex: none; padding: 5px; margin: -5px; cursor: pointer; }
.check .box { position: relative; display: block; width: 34px; height: 34px; border-radius: 10px; border: 3px solid var(--ink); background: var(--paper); transition: background .2s, transform .2s; }
.check .box::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--track); transition: background .2s; }
.check input:checked + .box { background: #14171a; border-color: #14171a; }
.check input:checked + .box::after { background: #2be38f url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%2314171a' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; box-shadow: 0 0 10px #2be38f; }
.beep .box { animation: gate .5s cubic-bezier(.3, 1.6, .5, 1); }
.beep .todo-title { animation: pass .5s ease-out; }
@keyframes gate { 0% { transform: scale(.7) rotate(-10deg); } 60% { transform: scale(1.2) rotate(4deg); } 100% { transform: none; } }
@keyframes pass { 0% { transform: translateX(-10px); opacity: .4; } 100% { transform: none; opacity: 1; } }
.todo-body, .gear-body { flex: 1; min-width: 0; }
.todo-top, .gear-top { display: flex; align-items: center; gap: 10px; }
.todo-title { flex: 1; font-weight: 700; font-size: 16px; line-height: 1.35; }
.todo.done .todo-title, .gear.done .todo-title { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--faint); }
.todo.done .ico { filter: grayscale(1); opacity: .5; }
.ti-meta { font-size: 13px; color: var(--faint); margin-top: 4px; }
.todo .ti-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: 42px; }
.dday-chip { flex: none; font-size: 13px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--bg); color: var(--sub); border: 2px solid var(--hair); white-space: nowrap; }
.dday-chip.urgent { background: var(--danger); border-color: var(--danger); color: var(--on); }
.go { display: inline-flex; align-items: center; min-height: 44px; margin: 10px 0 0 42px; padding: 0 16px; border-radius: 10px; background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 700; transition: transform .15s; }
.go:hover { text-decoration: none; transform: translateX(3px); }
.todo-more { margin: 8px 0 0 42px; }
.todo-more summary { padding: 11px 0; }
.todo-more summary, .more summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--line); list-style: none; }
.todo-more summary::-webkit-details-marker, .more summary::-webkit-details-marker { display: none; }
.todo-more p { margin: 6px 0 0; font-size: 14px; color: var(--sub); }
.cal-bar { display: flex; justify-content: center; gap: 8px; margin-top: 6px; }
.cal-btn { height: 46px; padding: 2px 18px 0; border-radius: 12px; border: 3px solid var(--ink); background: var(--paper); color: var(--ink); font-family: var(--display); font-weight: 400; font-size: 14px; cursor: pointer; transition: transform .15s; }
.cal-btn:active { transform: translateY(2px); }
.cal-btn:nth-child(2) { background: var(--ink); color: var(--paper); }

/* 색 아이콘 */
.ico { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: transparent; color: var(--ink); border: 1.5px solid var(--hair); }
.ico svg { width: 19px; height: 19px; }

/* ===== 승차권 타일 ===== */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 36px; }
.tile { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 128px; padding: 16px 14px 14px 30px; background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 14px; transition: transform .2s; overflow: hidden; }
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 16px; background: var(--tc, var(--l2)); border-right: 3px dashed var(--paper); }
.tile:hover { text-decoration: none; transform: translateY(-2px); }
.tile { --tc: var(--ink); } .tile.t1 { --tc: var(--l2); }
.tile-k { font-family: var(--display); font-weight: 400; font-size: 13px; color: var(--sub); }
.tile-v { font-family: var(--body); font-weight: 800; font-size: clamp(18px, 5vw, 24px); line-height: 1.15; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

/* ===== 정보 카드 ===== */
.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); align-items: start; }
.card { position: relative; background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; padding: 24px 22px; box-shadow: 6px 6px 0 var(--line); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--line); }
.card .eyebrow { display: inline-block; font-family: var(--display); font-weight: 400; font-size: 13px; padding: 4px 9px 2px; border-radius: 6px; background: var(--line); color: var(--on); margin-bottom: 10px; }
.card .eyebrow.danger { background: var(--danger); }
.card h3 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.35; }
.amount { margin: 8px 0 0; font-family: var(--body); font-weight: 800; font-size: 26px; line-height: 1.2; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.amount-all { margin: 6px 0 0; font-size: 13px; color: var(--faint); }
.card p { margin: 12px 0 0; font-size: 15px; color: var(--sub); }
.warn { margin: 14px 0 0; padding: 12px 14px; border-radius: 0 10px 10px 0; background: var(--danger-bg); color: var(--danger); font-size: 15px; font-weight: 500; border-left: 6px solid var(--danger); }
.facts { display: grid; grid-template-columns: 48px 1fr; gap: 8px 12px; margin: 16px 0 0; font-size: 15px; }
.facts dt { color: var(--faint); font-weight: 600; }
.facts dd { margin: 0; }
.more { margin-top: 16px; border-top: 1px solid var(--hair); }
.more summary { padding: 14px 0 0; }
.more summary::after { content: " 보기 ›"; }
.more[open] summary::after { content: " 접기"; }
.steps { margin: 12px 0 0; padding-left: 22px; font-size: 15px; }
.steps li { margin: 6px 0; }
.src { margin: 16px 0 0 !important; font-size: 13px !important; color: var(--faint) !important; }
.src a { color: var(--faint); text-decoration: underline; text-underline-offset: 2px; }
.fallback ul { margin: 12px 0 0; padding: 0; list-style: none; }
.fallback li { padding: 12px 0; border-top: 1px solid var(--hair); font-size: 15px; font-weight: 600; }
.fallback li span { display: block; color: var(--faint); font-size: 13px; font-weight: 400; }

/* 신청 단계 = 네 정거장 */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; margin: 18px 0 6px; padding: 0; }
.flow li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.flow li + li::before { content: ""; position: absolute; right: 50%; left: -50%; top: 20px; height: 5px; background: var(--line); z-index: 0; }
.flow .ico { position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 50%; background: var(--paper); color: var(--ink); border: 4px solid var(--line); }
.flow .ico svg { width: 22px; height: 22px; }
.flow-n { display: none; }
.flow-label { font-size: 13px; line-height: 1.3; font-weight: 600; }

/* 카드사 비교 */
.card-co h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-family: var(--display); font-size: 22px; }
.card-co .kind { font-family: var(--body); font-size: 13px; font-weight: 400; color: var(--faint); }
.perk { margin: 16px 0 0; padding: 0; list-style: none; }
.perk li { padding: 10px 0; border-top: 1px solid var(--hair); font-size: 15px; display: grid; grid-template-columns: 76px 1fr; gap: 12px; }
.perk .k { color: var(--faint); font-weight: 600; }

/* 막대 = 선로 */
.bars { list-style: none; margin: 10px 0 0; padding: 0; }
.bars li { padding: 12px 0; border-top: 1px solid var(--hair); }
.bar-head { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; font-weight: 700; }
.bar-head a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.bar-val { font-family: var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar { position: relative; height: 10px; border-radius: 5px; background: var(--track); margin: 10px 8px 6px 0; }
.bar span { position: relative; display: block; height: 100%; border-radius: 5px; background: var(--line); transform-origin: 0 50%; transition: transform 1s cubic-bezier(.3, .8, .3, 1); }
.bar span::after { content: ""; position: absolute; right: -8px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: var(--paper); border: 4px solid var(--line); }
.bar span.kr { background: var(--l3); } .bar span.kr::after { border-color: var(--l3); }
.bar span.us { background: var(--l1); } .bar span.us::after { border-color: var(--l1); }
.reveal:not(.in) .bar span { transform: scaleX(0); }
.legend { display: flex; align-items: center; gap: 6px; margin: 0 0 16px; font-size: 14px; font-weight: 600; }
.key { width: 22px; height: 6px; border-radius: 3px; } .key.kr { background: var(--l3); } .key.us { background: var(--l1); margin-left: 12px; }
.legend-note { margin-left: auto; color: var(--faint); font-weight: 400; }
.supp h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.dose { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; font-size: 14px; margin-top: 8px; }
.dose .bar { margin: 0 8px 0 0; }
.dose-k { color: var(--faint); font-weight: 600; } .dose-v { font-family: var(--display); font-weight: 400; font-variant-numeric: tabular-nums; min-width: 96px; text-align: right; }
.phase { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 18px 0 8px; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; }
.phase span { text-align: center; font-size: 13px; font-weight: 600; padding: 6px 0 5px; color: var(--faint); border-left: 2px solid var(--ink); }
.phase span:first-child { border-left: 0; }
.phase span.on { background: var(--l3); color: var(--on); }
.phase span.cur { box-shadow: inset 0 -4px 0 #ffd84d; }
.caution { margin-top: 10px; font-size: 14px; color: var(--sub); }

/* 가입 가능 시기 막대 */
.gauge { margin: 18px 0 0; }
.gauge-bar { position: relative; display: flex; gap: 3px; height: 12px; }
.gauge-bar .seg { background: var(--track); border-radius: 6px; }
.gauge-bar .seg.ok { background: var(--l3); }
.gauge-dot { position: absolute; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: var(--paper); border: 5px solid var(--ink); }
.gauge-labels { display: flex; gap: 3px; margin-top: 8px; font-size: 13px; color: var(--faint); font-weight: 600; }
.gauge-labels span { text-align: center; }

/* 육아용품 */
.need { flex: none; font-size: 13px; font-weight: 700; padding: 3px 8px 2px; border-radius: 6px; border: 2px solid var(--ink); white-space: nowrap; }
.need.n1 { background: var(--ink); color: var(--paper); } .need.n3 { border-style: dashed; color: var(--faint); border-color: var(--faint); }
.gear-tip { margin: 6px 0 0 !important; font-size: 14px !important; }
.shops { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.shops a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 8px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font-size: 13px; font-weight: 700; transition: transform .15s, background .15s; }
.shops a:hover { text-decoration: none; background: var(--line); border-color: var(--line); color: var(--on); transform: translateY(-2px); }
.no-ali { font-size: 13px; color: var(--faint); }
#centers { scroll-margin-top: 80px; }

/* 본문은 숨기지 않는다. .reveal/.in 은 막대가 자라고 숫자가 올라가는 시점만 정한다. */

/* 바닥글 = 종착역 */
.foot { background: #14171a; color: #b9bec4; padding: 28px 0 40px; font-size: 13px; }
.foot p { margin: 6px 0; }

@media (min-width: 735px) {
  .hero h1 { font-size: 68px; }
  .hero .inner > p { font-size: 20px; }
  .scene { height: 140px; }
  .section { padding: 96px 0; }
  .section h2 { font-size: 40px; }
  .lead { font-size: 19px; }
  .sign-now strong { font-size: 60px; }
  .sign-now { padding: 22px 48px 18px; }
  .sign-side { font-size: 18px; padding: 0 28px; }
  .stop-label { font-size: 22px; }
  .flap { font-size: 34px; min-width: 40px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171a; --paper: #1f2328; --ink: #f1eee6; --sub: #b4bac1; --faint: #9aa1a8; --hair: rgba(255, 255, 255, .16); --track: #343a41;
    --l1: #7aa8ff; --l2: #ff8a66; --l3: #3ed6a0; --on: #0b0d0f;
    --danger: #ff7a66; --danger-bg: #3a1f1b;
  }
  .hero { background: #0b0d0f; }
  .foot { background: #0b0d0f; }
  .form { box-shadow: 0 0 0 3px #0b0d0f, 8px 10px 0 3px var(--l1); }
  select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23f1eee6' stroke-width='2'/%3E%3C/svg%3E"); }
  .check input:checked + .box { border-color: var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-train { transform: translateX(max(4vw, calc(50vw - 165px))); }
  html { scroll-behavior: auto; }
}

/* ===== 검수 반영: 구간마다 다른 밀도, 손맛 ===== */
/* 비교·기준표는 상자를 벗긴다 */
#sec-cards .card-co, #sec-supp .supp { border: 0; border-top: 4px solid var(--ink); border-radius: 0; box-shadow: none; background: transparent; padding: 18px 0 8px; }
#sec-cards .card-co:hover, #sec-supp .supp:hover { transform: none; box-shadow: none; }
#sec-cards .cards, #sec-supp .cards { gap: 6px 32px; }
.gear-card { box-shadow: none; }
#sec-supp, #sec-gear, #sec-insurance { padding: 48px 0; }
#sec-national, #sec-cards, #sec-supp { background: #efece4; }
.section h2 .roundel { box-shadow: none; outline: 3px solid var(--line); outline-offset: 3px; }

/* 신청 단계는 세로 정거장 */
.flow { grid-template-columns: 1fr; gap: 0; margin: 14px 0 6px; }
.flow li { flex-direction: row; gap: 12px; text-align: left; padding: 6px 0; }
.flow li + li::before { left: 20px; right: auto; top: -8px; width: 4px; height: 16px; }
.flow .ico { width: 40px; height: 40px; border: 3px solid var(--line); }
.flow-label { font-size: 15px; }

/* 전광판 도트 질감 */
.flap { background-image: radial-gradient(rgba(255, 216, 77, .16) 1px, transparent 1.2px); background-size: 4px 4px; }
.hero { background-image: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1.2px); background-size: 6px 6px; }


/* 객차 사이 연결 주름막 */
.car-roof { position: relative; }
.cal-card + .cal-card .car-roof::before { content: ""; position: absolute; left: -16px; top: 70px; width: 10px; height: 120px; background: repeating-linear-gradient(var(--ink) 0 3px, transparent 3px 8px); }

/* 데스크톱 첫 화면: 왼쪽 제목, 오른쪽 입력 */
@media (min-width: 880px) {
  .hero .inner { display: grid; grid-template-columns: 1fr 440px; gap: 0 48px; align-items: start; }
  .scene { grid-column: 1 / -1; }
  .plate { justify-content: flex-start; margin-top: 56px; }
  .hero h1, .hero .inner > p { text-align: left; margin-left: 0; }
  .hero h1 { font-size: 76px; }
  .form { grid-column: 2; grid-row: 2 / span 4; margin: 28px 0 0; box-shadow: 6px 6px 0 var(--l1); }
  .empty { text-align: left; }
  @keyframes arrive { from { transform: translateX(-120%); } to { transform: translateX(max(20px, calc(50vw - 480px))); } }
  .hero-train { transform: translateX(max(20px, calc(50vw - 480px))); }
}

@media (prefers-color-scheme: dark) {
  #sec-national, #sec-cards, #sec-supp { background: #191d21; }
  .hero h1, .hero .inner > p, .plate { color: #f6f4ef; }
}

/* 인쇄: 냉장고에 붙이는 체크리스트 */
@media print {
  .hero .scene, .form, .tabs, .cal-bar, .cal-dots, .shops, .route, .foot, .go { display: none !important; }
  body, .hero, .section { background: #fff !important; color: #000 !important; }
  .hero { padding: 0; } .hero h1 { color: #000; font-size: 24px; text-align: left; } .hero .inner > p, .plate { display: none; }
  .section { padding: 16px 0; border-top: 1px solid #000; }
  .cal-track { display: block; overflow: visible; margin: 0; padding: 0; columns: 2; }
  .cal-card { break-inside: avoid; border: 1px solid #000; border-radius: 0; margin-bottom: 10px; }
  .cal-card::before, .cal-card::after, .car-windows { display: none; }
  .car-roof { background: none !important; border: 0; padding: 6px 0 0; margin: 0; } .car-no { color: #000; }
  .card { box-shadow: none; border: 1px solid #000; break-inside: avoid; }
  details > * { display: block !important; }
}
.t-panto { fill: none; stroke: #8a9097; stroke-width: 2; }
.t-led { fill: #14171a; }
.t-led-text { font-family: var(--display); font-weight: 400; font-size: 8px; fill: #ffd84d; }

/* ===== 첫 화면: 찾기 ===== */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 물어보기 */
.ask { display: flex; gap: 8px; max-width: 540px; margin: 22px auto 0; }
.ask input { flex: 1; min-width: 0; height: 52px; padding: 0 16px; font: inherit; font-size: 16px; color: #14171a; background: #f6f4ef; border: 2px solid #f6f4ef; border-radius: 12px; -webkit-appearance: none; appearance: none; }
.ask input:focus { outline: none; border-color: #7aa8ff; box-shadow: 0 0 0 4px rgba(122, 168, 255, .3); }
.ask button { flex: none; height: 52px; padding: 2px 18px 0; border: 0; border-radius: 12px; background: var(--l1); color: #fff; font-family: var(--display); font-weight: 400; font-size: 15px; cursor: pointer; }
.ask-out { max-width: 540px; margin: 0 auto; min-height: 0; }
.ask-out p { margin: 10px 0 0; text-align: center; font-size: 14px; color: #b9bec4; }
.ask-hits { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.ask-hits button { min-height: 44px; padding: 0 16px; border-radius: 980px; border: 2px solid #f6f4ef; background: transparent; color: #f6f4ef; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.ask-hits button:first-child { background: #f6f4ef; color: #14171a; }
.ping { animation: ping 1.4s ease-out; }
@keyframes ping { 0% { outline: 0 solid var(--l2); outline-offset: 0; } 30% { outline: 5px solid var(--l2); outline-offset: 6px; } 100% { outline: 5px solid transparent; outline-offset: 14px; } }
@media (min-width: 880px) {
  .ask, .ask-out { grid-column: 1; margin-left: 0; }
  .ask-hits { justify-content: flex-start; } .ask-out p { text-align: left; }
  .form { grid-row: 2 / span 7; }
}

/* ===== 같은 칸 승차권 ===== */
#sec-talk { --line: var(--l1); }
.talk-form { box-shadow: none; display: grid; gap: 12px; }
.talk-form textarea.input { height: auto; padding: 14px 16px; line-height: 1.5; resize: none; font-weight: 500; }
.talk-gauge { position: relative; height: 6px; border-radius: 3px; background: var(--track); }
.talk-gauge i { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p, 0) * 100%); border-radius: 3px; background: var(--l1); transition: width .15s; }
.talk-gauge i::after { content: ""; position: absolute; right: -9px; top: -5px; width: 18px; height: 12px; border-radius: 4px 6px 2px 2px; background: var(--ink); }
.talk-gauge.near i { background: var(--l2); }
.talk-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.talk-row.end { grid-template-columns: 1fr auto; align-items: center; }
.cal-btn.issue { background: var(--l1); border-color: var(--l1); color: var(--on); min-width: 96px; }
.talk-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 14px; }
.talk-tabs { display: inline-flex; border: 3px solid var(--ink); border-radius: 12px; overflow: hidden; }
.talk-tabs button, .talk-scope button { min-height: 44px; padding: 2px 20px 0; border: 0; background: var(--paper); color: var(--ink); font-family: var(--display); font-weight: 400; font-size: 16px; cursor: pointer; }
.talk-tabs button + button { border-left: 3px solid var(--ink); }
.talk-tabs button.on { background: var(--ink); color: var(--paper); }
.talk-tabs button[data-tab=hot].on { background: var(--l2); color: var(--on); }
.talk-tabs button.bump { animation: bump .5s cubic-bezier(.3, 1.7, .5, 1); }
@keyframes bump { 40% { transform: scale(1.18); } }
.talk-scope { display: inline-flex; gap: 6px; }
.talk-scope button { font-family: inherit; font-size: 14px; font-weight: 600; padding: 0 12px; border-radius: 980px; background: transparent; color: var(--faint); }
.talk-scope button.on { background: var(--track); color: var(--ink); }
.talk-list { display: grid; gap: 12px; }

.ticket { --tl: var(--l1); position: relative; display: grid; grid-template-columns: 64px 1fr 64px; background: var(--paper); border: 3px solid var(--ink); border-radius: 14px; overflow: hidden; }
.ticket.staff { --tl: var(--ink); cursor: pointer; grid-template-columns: 64px 1fr; }
.ticket-stub { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 10px 4px; background: var(--tl); color: var(--on); border-right: 3px dashed var(--paper); font-size: 13px; text-align: center; }
.ticket.staff .ticket-stub { color: var(--paper); }
.ticket-stub b { font-family: var(--display); font-size: 14px; }
.ticket-main { position: relative; padding: 14px 14px 10px; min-width: 0; }
.ticket-text { margin: 0; font-size: 16px; line-height: 1.5; white-space: pre-wrap; }
.ticket-med { margin: 8px 0 0; font-size: 13px; color: var(--faint); border-left: 3px solid var(--l2); padding-left: 8px; }
.ticket-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 8px; font-size: 13px; color: var(--faint); }
.ticket-foot span { flex: 1; min-width: 140px; }
.mini { min-height: 36px; padding: 0 6px; border: 0; background: none; color: var(--faint); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.punch { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; border-left: 3px solid var(--ink); background: var(--paper); color: var(--ink); font-family: var(--display); font-weight: 400; font-size: 15px; cursor: pointer; }
.punch i { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--ink); background: radial-gradient(circle, var(--bg) 0 6px, var(--paper) 7px); transition: transform .12s; }
.punch:active i { transform: scale(.85); }
.punch.hit i { animation: punch .4s cubic-bezier(.3, 1.6, .5, 1); background: radial-gradient(circle, var(--bg) 0 6px, var(--tl) 7px); }
@keyframes punch { 0% { transform: scale(.7); } 60% { transform: scale(1.2); } }
.stamp { display: inline-block; margin: 0 0 8px; padding: 3px 8px 1px; border: 3px solid var(--l2); border-radius: 6px; color: var(--l2); font-family: var(--display); font-weight: 400; font-size: 13px; transform: rotate(-8deg); background: var(--paper); }
.ticket.promote { animation: shake .3s linear 2; }
.ticket.promote .stamp { animation: land .5s cubic-bezier(.2, 1.6, .4, 1) .3s both; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes land { from { transform: rotate(20deg) scale(2.4); opacity: 0; } to { transform: rotate(-8deg) scale(1); opacity: 1; } }
.ticket.printing { animation: print .6s cubic-bezier(.2, .8, .2, 1); }
@keyframes print { from { clip-path: inset(0 0 100% 0); transform: translateY(-16px); } to { clip-path: inset(0); transform: none; } }
.ticket.tear { animation: tear .5s ease-in forwards; }
@keyframes tear { to { clip-path: inset(0 100% 0 0); opacity: 0; transform: rotate(-3deg) translateX(-20px); } }

/* ===== 영상 ===== */
#sec-video { --line: var(--l2); }
.group-title .vid-more { margin-left: auto; font-family: var(--body); font-size: 13px; font-weight: 600; }
.vid-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; margin: 0 -20px; padding: 4px 20px 14px; scrollbar-width: none; }
.vid-row::-webkit-scrollbar { display: none; }
.vid { flex: 0 0 min(72%, 280px); scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; color: var(--ink); }
.vid:hover { text-decoration: none; }
.vid-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border: 3px solid var(--ink); border-radius: 14px; overflow: hidden; background: var(--track); transition: transform .2s; }
.vid:hover .vid-thumb { transform: translateY(-3px); }
.vid-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.vid-thumb i { position: absolute; left: 10px; bottom: 10px; width: 40px; height: 40px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink); }
.vid-thumb i::after { content: ""; position: absolute; left: 13px; top: 9px; border: 8px solid transparent; border-left: 13px solid var(--ink); border-right: 0; }
.vid-title { font-weight: 700; font-size: 15px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.insurers { list-style: none; margin: 8px 0 0; padding: 0; }
.insurers li { padding: 12px 0; border-top: 1px solid var(--hair); }
.insurers .bar-val { color: var(--line); text-decoration: none; }
.fetal { margin-top: 6px; font-size: 14px; border-left: 3px solid var(--l3); padding-left: 8px; }
.live-card { margin-bottom: 8px; box-shadow: 6px 6px 0 var(--l2); }
.comments { grid-column: 1 / -1; border-top: 3px solid var(--ink); padding: 12px 14px 14px; background: var(--bg); }
.clist { list-style: none; margin: 0; padding: 0; }
.clist li { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--hair); font-size: 15px; }
.clist li:first-child { border-top: 0; }
.clist b { font-size: 13px; } .clist time { font-size: 13px; color: var(--faint); white-space: nowrap; }
.clist li.printing { animation: print .4s ease-out; }
.cempty { margin: 0 0 8px; }
.cform { display: grid; grid-template-columns: 96px 1fr auto; gap: 8px; margin-top: 10px; }
.cform .input { height: 46px; font-size: 15px; font-weight: 500; padding: 0 12px; background: var(--paper); }
.cform .cmsg { grid-column: 1 / -1; margin: 0; color: var(--danger); }
.cbtn { font-weight: 700; color: var(--ink); }
@media (max-width: 420px) { .cform { grid-template-columns: 1fr auto; } .cform .cnick { grid-column: 1 / -1; } }
.banks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 20px; }
.banks li { display: flex; justify-content: space-between; gap: 8px; padding: 10px 0; border-top: 1px solid var(--hair); font-size: 15px; font-weight: 600; }
.banks a { font-weight: 400; color: var(--line); white-space: nowrap; }
.faq .more:first-child { margin-top: 0; border-top: 0; }
.faq .more summary { font-weight: 700; color: var(--ink); font-size: 16px; }
.faq .more summary::after { content: ""; } .faq .more[open] summary::after { content: ""; }
.faq .more p { margin: 8px 0 4px; }

/* ===== 화면 틀: 아래 탭 4개 + 탭 안 구간 칩 ===== */
[hidden] { display: none !important; }
body.entered { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--paper); border-top: 3px solid var(--ink); padding-bottom: env(safe-area-inset-bottom); }
.dock button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 64px; border: 0; background: none; color: var(--faint); font-family: var(--display); font-weight: 400; font-size: 13px; cursor: pointer; }
.dock svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dock button.on { color: var(--ink); font-weight: 700; }
.dock button.on svg { stroke: var(--l1); stroke-width: 2.6; }
.dock button.on::before { content: ""; position: absolute; top: -3px; width: 44px; height: 5px; border-radius: 0 0 4px 4px; background: var(--l1); }
.dock button { position: relative; }

/* 구간 칩 (탭 안에서 구간 바꾸기) */
.tabs { top: 0; }
.tabs .inner { padding: 10px 20px; gap: 8px; }
.tabs .inner::before, .nav-train { display: none; }
.tabs a { flex: none; min-width: 0; min-height: 44px; display: inline-flex; align-items: center; padding: 2px 16px 0; border: 3px solid var(--ink); border-radius: 980px; background: var(--paper); color: var(--ink); font-size: 14px; }
.tabs a::after { content: none; }
.tabs a.on { background: var(--ink); color: var(--paper); }
.section { border-top: 0; padding: 28px 0 40px; }
#sec-supp, #sec-gear, #sec-insurance { padding: 28px 0 40px; }
#sec-national, #sec-cards, #sec-supp { background: none; }
.section.arrive > .inner { animation: arrive-sec .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes arrive-sec { from { transform: translateX(14px); } }

/* 예정일을 받은 뒤: 첫 화면은 승차권 줄 + 아기 + 찾기만 */
.ticket-bar { display: flex; align-items: center; gap: 10px; width: 100%; margin: 14px 0 0; padding: 10px 14px; border: 2px solid #3a3f45; border-radius: 12px; background: #1f2328; color: #f6f4ef; font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.ticket-bar b { font-family: var(--display); font-size: 17px; padding-top: 2px; color: #ffd84d; }
.ticket-bar span { flex: 1; color: #c9cdd2; }
.ticket-bar i { font-style: normal; font-size: 13px; text-decoration: underline; color: #9aa1a8; }
body.entered .hero { padding-bottom: 22px; }
body.entered .scene, body.entered .plate, body.entered .hero h1, body.entered .hero .inner > p:not(.empty) { display: none; }
body.entered .form { display: none; }
body.entered:not([data-tab="home"]) .hero { padding-bottom: 14px; }
body.entered .ask { margin-top: 14px; }
.cal-btn.wide { width: 100%; margin-bottom: 12px; }

/* 고치기 시트 */
.sheet-back { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .55); }
body.entered.editing .form { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; max-width: 560px; max-height: 88vh; overflow-y: auto; margin: 0 auto; border-radius: 22px 22px 0 0; border-bottom: 0; box-shadow: none; animation: sheet .26s cubic-bezier(.2, .8, .2, 1); padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
@keyframes sheet { from { transform: translateY(100%); } }

/* 이번 역 바로가기 타일 */
.home-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.htile { --tc: var(--l1); display: flex; flex-direction: column; gap: 6px; padding: 14px; background: var(--paper); border: 3px solid var(--ink); border-left: 12px solid var(--tc); border-radius: 12px; color: var(--ink); }
.htile.c2 { --tc: var(--l2); } .htile.c3 { --tc: var(--l3); }
.htile:hover { text-decoration: none; }
.htile .tile-v { font-size: 20px; }

/* 접히는 카드 */
.card .more { margin-top: 14px; }
.card .more > summary { min-height: 44px; display: flex; align-items: center; padding: 6px 0 0; }
.card .more > summary::after { content: " ›"; margin-left: 4px; }
.card .more[open] > summary::after { content: " 접기"; font-weight: 400; color: var(--faint); }
.card h4.how { margin: 18px 0 0; font-size: 15px; }
.fold { padding: 0; box-shadow: none; margin-bottom: 12px; }
.fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 60px; padding: 0 20px; cursor: pointer; list-style: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold-title { font-family: var(--display); font-weight: 400; font-size: 18px; padding-top: 2px; }
.fold-title::before { content: "+ "; color: var(--line); } .fold[open] .fold-title::before { content: "− "; }
.fold > .gear-list { padding: 0 20px 20px; }
.faq .more > summary::after { content: ""; }

@media (min-width: 880px) {
  body.entered { padding-bottom: 0; padding-top: 68px; }
  .dock { top: 0; bottom: auto; border-top: 0; border-bottom: 3px solid var(--ink); grid-template-columns: repeat(4, 140px); justify-content: center; }
  .dock button { flex-direction: row; gap: 8px; font-size: 15px; }
  .dock button.on::before { top: auto; bottom: -3px; border-radius: 4px 4px 0 0; }
  .tabs { top: 67px; }
  body.entered .hero .inner { display: block; max-width: 960px; }
  body.entered .ask, body.entered .ask-out { margin-left: auto; margin-right: auto; }
  body.entered .ask-hits { justify-content: center; } body.entered .ask-out p { text-align: center; }
  .home-tiles { grid-template-columns: repeat(5, 1fr); }
}

html, body { overflow-x: clip; }

/* 도현체는 같은 크기에서 작아 보여서 제목류를 조금 키운다 */
.hero h1 { font-size: 52px; letter-spacing: -0.01em; }
.section h2 { font-size: 32px; letter-spacing: 0; }
.cal-card h3 { font-size: 34px; letter-spacing: 0; }
.sign-now strong { font-size: 44px; letter-spacing: 0; }
.group-title, .fold-title { font-size: 20px; }
.dot, .cal-btn, .tabs a, .dock button, .car-no, .label { font-size: 15px; }
.card-co h3 { font-size: 24px; }
.amount, .tile-v { font-weight: 700; }
@media (min-width: 735px) { .hero h1 { font-size: 84px; } .section h2 { font-size: 46px; } .sign-now strong { font-size: 68px; } }

/* AI에게 확인할 질문 복사 */
.ask-ai { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 12px; padding: 0 14px; border: 2px dashed var(--ink); border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.ask-ai:hover { border-style: solid; }
.ask-ai.done { border-style: solid; border-color: var(--l3); color: var(--l3); }
.toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 40; transform: translateX(-50%); max-width: 86vw; padding: 12px 16px; border-radius: 12px; background: #14171a; color: #f6f4ef; font-size: 14px; box-shadow: 0 0 0 2px #f6f4ef; animation: toast .25s ease-out; }
@keyframes toast { from { transform: translate(-50%, 12px); opacity: .4; } }
.foot .ask-ai { border-color: #9aa1a8; color: #f6f4ef; margin: 4px 0 10px; }

/* 댓글 아래 관련 준비물 */
.related { margin-top: 14px; padding-top: 12px; border-top: 2px dashed var(--hair); }
.related h4 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--faint); }
.related ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.related li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 15px; font-weight: 600; }
.related li > span { flex: 1; min-width: 110px; }
.related .shops { margin: 0; }
.related .disc { margin: 8px 0 0; font-size: 12px; color: var(--faint); }

/* 설명 한 줄을 지운 구간도 제목 아래 숨 쉴 자리를 둔다 */
.section h2 + #videos, .section h2 + #gear, .section h2 + .live-card { margin-top: 24px; }
.related .disc { margin: 0 0 8px; }
.comments .related { margin-top: 22px; }

/* 댓글 좋아요 */
.clist li { grid-template-columns: auto 1fr auto auto; }
.clike { display: inline-flex; align-items: center; gap: 4px; min-width: 44px; min-height: 36px; padding: 0 6px; border: 0; border-radius: 8px; background: none; color: var(--faint); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.clike svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.clike.on { color: var(--l2); }
.clike.on svg { fill: currentColor; }
.clike.pop svg { animation: punch .4s cubic-bezier(.3, 1.6, .5, 1); }

/* ===== 데스크톱(1024px 이상): 넓은 화면을 2~3단으로 쓴다 =====
 * Gemini 검토안(docs/research/baby-page-desktop-review.md)을 바탕으로 했다. */
@media (min-width: 1024px) {
  .inner { max-width: 1360px; padding: 0 32px; }
  .section, #centers { scroll-margin-top: 152px; }
  .section, #sec-supp, #sec-gear, #sec-insurance { padding: 44px 0 76px; }
  .lead { max-width: 720px; font-size: 18px; }

  /* 상단 고정 독 + 구간 칩 */
  .dock { grid-template-columns: repeat(4, 160px); }
  .tabs .inner { padding: 10px 32px; flex-wrap: wrap; overflow: visible; }

  /* 진입 전 첫 화면: 전폭 선로 + 좌우 여백 확장 */
  .hero .inner { grid-template-columns: 1fr 480px; gap: 0 56px; }
  .scene { width: 100vw; margin: 0 0 0 calc(50% - 50vw); height: 150px; }
  @keyframes arrive {
    from { transform: translateX(-120%); }
    to { transform: translateX(max(32px, calc(50vw - 648px))); }
  }
  .hero-train { transform: translateX(max(32px, calc(50vw - 648px))); }

  /* 진입 후 상단 바: 좌 승차권 요약 + 우 검색 */
  body.entered .hero { padding-bottom: 18px; }
  body.entered:not([data-tab="home"]) .hero { padding-bottom: 16px; }
  body.entered .hero .inner {
    max-width: 1360px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
    gap: 10px 24px;
    align-items: center;
  }
  body.entered .ticket-bar { margin: 0; }
  body.entered .ask { grid-column: 2; max-width: none; width: 100%; margin: 0; }
  body.entered .ask-out { grid-column: 1 / -1; max-width: none; margin: 0; }
  body.entered .ask-hits { justify-content: flex-start; }
  body.entered .ask-out p, body.entered .empty { text-align: left; }
  body.entered .empty { grid-column: 1 / -1; margin: 4px 0 0; }

  /* 이번 역: 좌 고정 레일(#weekStatus) + 중 세로 노선(.cal-dots) + 우 객차 1장(.cal-track) */
  #sec-todo > .inner {
    display: grid;
    grid-template-columns: clamp(310px, 28vw, 380px) minmax(0, 1fr);
    gap: 24px clamp(24px, 3vw, 44px);
    align-items: start;
  }
  #sec-todo > .inner > h2 { grid-column: 1 / -1; }
  #weekStatus { grid-column: 1; grid-row: 2; position: sticky; top: 152px; margin: 0; }
  #weekStatus .sign-now { padding: 14px 18px; }
  #weekStatus .sign-now strong { font-size: 38px; }
  #weekStatus .sign-side { padding: 0 10px; font-size: 13px; }
  #weekStatus .flap { font-size: 26px; min-width: 30px; }
  #weekStatus .stop-label { font-size: 32px; }
  #weekStatus .warn { margin-top: 14px; }

  #timeline {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    display: grid;
    grid-template-columns: 124px minmax(0, 1fr);
    gap: 16px 24px;
    align-items: start;
  }
  #timeline .cal-dots {
    grid-column: 1;
    grid-row: 1 / span 2;
    position: relative;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 7px;
    overflow: visible;
    padding: 6px 12px 6px 22px;
  }
  #timeline .cal-dots::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 18px;
    bottom: 18px;
    width: 4px;
    border-radius: 2px;
    background: var(--track);
  }
  #timeline .dot {
    position: relative;
    width: 100%;
    min-width: 0;
    height: 36px;
    padding: 2px 12px 0;
    text-align: left;
    border-width: 3px;
    border-radius: 10px;
    font-size: 14px;
  }
  #timeline .dot::before {
    content: "";
    position: absolute;
    left: -22px;
    top: 50%;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    border-radius: 50%;
    background: var(--paper);
    border: 3px solid var(--ink);
    transition: transform .2s, background .2s, border-color .2s;
  }
  #timeline .dot.now::before { border-color: var(--c); }
  #timeline .dot.on { transform: none; box-shadow: 4px 4px 0 var(--ink); }
  #timeline .dot.on::before { background: var(--c); transform: scale(1.2); }
  #timeline .dot.on::after {
    content: "";
    position: absolute;
    right: -18px;
    top: 50%;
    width: 14px;
    height: 3px;
    margin-top: -1.5px;
    background: var(--c);
  }
  #timeline .cal-track {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    padding: 4px 0 30px;
    gap: 32px;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
  }
  #timeline .cal-card {
    flex: 0 0 100%;
    scroll-snap-align: start;
    padding: 0 28px 24px;
    margin-bottom: 0;
  }
  #timeline .cal-card + .cal-card .car-roof::before { display: none; }
  #timeline .car-roof { margin: 0 -28px; padding: 12px 24px; }
  #timeline .todos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0 28px;
    align-items: start;
  }
  #timeline .cal-bar { grid-column: 2; grid-row: 2; margin-top: 0; }
  #homeTiles {
    grid-column: 1 / -1;
    grid-row: 3;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-top: 8px;
  }

  /* 혜택 탭: 나라·동네·카드사·보험 */
  #sec-national .tiles { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 40px; }
  #sec-national .cards { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 22px; }

  #sec-local > .inner {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr);
    gap: 24px 36px;
    align-items: start;
  }
  #sec-local > .inner:has(#centers:empty) { grid-template-columns: 1fr; }
  #sec-local > .inner > h2 { grid-column: 1 / -1; margin: 0; }
  #sec-local > .inner > .lead { grid-column: 1 / -1; margin: -8px 0 4px; }
  #sec-local #local { grid-column: 1; }
  #sec-local #local .cards { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
  #sec-local #centers {
    grid-column: 2;
    position: sticky;
    top: 152px;
    max-height: calc(100dvh - 176px);
    overflow-y: auto;
    scrollbar-width: thin;
  }

  #sec-cards .cards { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 24px 36px; }
  #sec-cards .banks { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 28px; }
  #sec-insurance .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }

  /* 준비 탭: 육아용품 2×2 + 영양제 2~3열 */
  #sec-gear #gear { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
  #sec-gear .fold { margin-bottom: 0; }
  #sec-supp .cards { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 28px 36px; }

  /* 라운지 탭: 승차권 2단(좌 고정 폼 + 우 목록) + 영상 4열 그리드 */
  #sec-talk > .inner {
    display: grid;
    grid-template-columns: minmax(340px, 400px) minmax(0, 1fr);
    gap: 0 40px;
    align-items: start;
  }
  #sec-talk > .inner > h2,
  #sec-talk > .inner > .lead,
  #sec-talk > .inner > #talkMode { grid-column: 1 / -1; }
  #sec-talk > .inner > .lead { margin-bottom: 24px; }
  #sec-talk > .inner > #talkMode { margin: 0 0 20px; }
  #sec-talk #talkForm { grid-column: 1; grid-row: 4 / span 2; position: sticky; top: 152px; }
  #sec-talk .talk-bar { grid-column: 2; grid-row: 4; margin: 0 0 16px; }
  #sec-talk #talkList { grid-column: 2; grid-row: 5; gap: 14px; }

  #sec-video .vid-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 0;
    padding: 4px 0 18px;
    overflow: visible;
  }
  #sec-video .vid { flex: initial; min-width: 0; }

  /* 바닥글 */
  .foot .inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 28px; }
  .foot .ask-ai { margin: 0; }
}

/* ===== 실서비스 분석 반영 =====
 * 근거: docs/research/baby-page-redesign-from-live-services.md
 * 원칙: 굵은 테두리와 색 그림자는 "이번 역" 화면의 역 표지판·객차에만 남기고,
 * 정보를 읽는 카드(혜택·준비·라운지)는 얇은 선과 왼쪽 노선 띠로 가볍게 한다. */
:root { --edge: #d9d4c8; --chip: #ebe7dd; }
@media (prefers-color-scheme: dark) { :root { --edge: #3a4047; --chip: #2a2f35; } }

/* 도현체는 큰 제목과 숫자에만. 버튼·탭·라벨은 본문 글꼴 */
.label, .tabs a, .dock button, .tile-k, .card .eyebrow, .cal-btn, .talk-tabs button, .ask button, .car-no, .cal-stage,
.sign-cap, .sign-side, .punch, .stamp, .dose-v, .bar-val, .ticket-stub b { font-family: var(--body); font-weight: 700; }
.cal-btn { padding: 0 18px; border-width: 2px; }
.talk-tabs button { padding: 0 20px; font-size: 15px; }
.ask button { padding: 0 18px; }
.label { font-size: 14px; }

/* 구간 제목: 탭으로 나뉜 뒤로는 번호가 뜻이 없다 */
.section h2 .roundel { display: none; }
.section h2 { font-size: 26px; }
.section { padding-top: 22px; }
.lead { margin: 8px 0 20px; font-size: 15px; }
@media (min-width: 735px) { .section h2 { font-size: 34px; } .lead { font-size: 17px; } }

/* 구간 칩 */
.tabs { background: var(--bg); border-bottom: 1px solid var(--edge); }
.tabs a { min-height: 40px; padding: 0 16px; border: 0; background: var(--chip); font-size: 14px; font-weight: 600; }
.tabs a.on { background: var(--ink); color: var(--paper); font-weight: 700; }

/* 아래 탭 */
@media (max-width: 879px) {
  body.entered { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .dock { border-top: 1px solid var(--edge); }
  .dock button { height: 58px; font-size: 12px; font-weight: 600; }
  .dock button.on { font-weight: 700; color: var(--l1); }
  .dock button.on::before { top: -1px; height: 3px; width: 36px; }
}
@media (min-width: 880px) {
  .dock { border-bottom: 1px solid var(--edge); }
  .dock button.on::before { bottom: -1px; height: 3px; }
  .dock button.on { color: var(--l1); }
}

/* 들어온 뒤 머리 부분: 밝고 얇게. 찾기는 이번 역 탭에만 */
body.entered .hero { background: var(--bg); background-image: none; color: var(--ink); padding-bottom: 4px; }
body.entered:not([data-tab="home"]) .hero { padding-bottom: 10px; }
body.entered:not([data-tab="home"]) .ask, body.entered:not([data-tab="home"]) .ask-out { display: none; }
.ticket-bar { min-height: 44px; padding: 8px 14px; border: 1px solid var(--edge); background: var(--paper); color: var(--ink); }
.ticket-bar b { color: var(--l1); }
.ticket-bar span { color: var(--sub); }
.ticket-bar i { color: var(--faint); }
body.entered .ask { margin-top: 10px; }
body.entered .ask input { height: 46px; background: var(--paper); border: 1px solid var(--edge); color: var(--ink); }
body.entered .ask button { height: 46px; }
body.entered .ask-out p { color: var(--sub); }
body.entered .ask-hits button { border: 1px solid var(--edge); color: var(--ink); background: var(--paper); }
body.entered .ask-hits button:first-child { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* 첫 화면 */
.scene { height: 96px; }
.hero h1 { font-size: 44px; }
.form { border-width: 2px; border-radius: 18px; box-shadow: 6px 8px 0 var(--l1); margin-top: 26px; }
.input { height: 52px; }
.segment span { height: 46px; }
@media (min-width: 735px) { .scene { height: 130px; } .hero h1 { font-size: 72px; } }
@media (prefers-color-scheme: dark) { .form { box-shadow: 6px 8px 0 var(--l1); } }

/* 이번 역: 표지판과 객차는 남기되 바퀴·주름막·네온은 뺀다 */
.week { margin: 16px 0 24px; }
.sign { border-width: 2px; }
.dot { border-width: 2px; height: 40px; min-width: 40px; padding: 0 12px; }
.cal-card { border-width: 2px; border-radius: 18px 18px 14px 14px; margin-bottom: 0; }
.cal-card::before, .cal-card::after, .cal-card + .cal-card .car-roof::before { display: none; }
.car-roof { border-bottom-width: 2px; border-radius: 15px 15px 0 0; padding: 10px 16px; }
.car-windows i { height: 18px; border-width: 1.5px; }
.cal-card h3 { font-size: 30px; }
.cal-track { padding-bottom: 14px; }
.check .box { width: 26px; height: 26px; border: 2px solid var(--faint); border-radius: 8px; }
.check .box::after { inset: 0; border-radius: 6px; background: none; }
.check input:checked + .box { background: var(--l1); border-color: var(--l1); }
.check input:checked + .box::after {
  background: var(--on); box-shadow: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
}
@media (prefers-color-scheme: dark) { .check input:checked + .box { border-color: var(--l1); } }
.todo .ti-meta, .go, .todo-more { margin-left: 38px; }
.go { min-height: 40px; }

/* 이번 역에 끼워 넣은 라운지 미리보기 */
.home-talk { margin-top: 22px; }
.home-talk:empty { display: none; }
.peek-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.peek-head h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 20px; }
.peek-head a { font-size: 14px; font-weight: 600; }
.peek { display: grid; gap: 6px; padding: 14px 16px; margin-top: 8px; background: var(--paper); border: 1px solid var(--edge); border-left: 4px solid var(--l1); border-radius: 12px; color: var(--ink); }
.peek:hover { text-decoration: none; border-color: var(--l1); }
.peek-tag { justify-self: start; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--chip); color: var(--l1); }
.peek-text { font-size: 15px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.peek-meta { font-size: 13px; color: var(--faint); }

/* 바로가기 타일 */
.home-tiles { margin-top: 18px; }
.htile { border: 1px solid var(--edge); border-left: 4px solid var(--tc); padding: 12px 14px; gap: 2px; }
.htile .tile-k { font-size: 13px; font-weight: 600; }
.htile .tile-v { font-size: 15px; } .htile .tile-v .num { font-size: 20px; }

/* 정보 카드: 얇은 선 + 왼쪽 노선 띠 */
.card { border: 1px solid var(--edge); border-radius: 14px; padding: 18px 16px; box-shadow: none; }
.card:hover { transform: none; box-shadow: none; }
.cards { gap: 12px; }
.cards > .card { border-left: 4px solid var(--line); }
.fold { padding: 0; }
.live-card { box-shadow: none; border-left: 4px solid var(--l2); }
#sec-cards .card-co, #sec-supp .supp { border-top: 2px solid var(--ink); }
.card .eyebrow { padding: 0; margin-bottom: 6px; background: none; color: var(--line); font-size: 13px; }
.card .eyebrow.danger { background: none; color: var(--danger); }
.card h3 { font-size: 17px; }
.amount { margin-top: 6px; font-size: 17px; font-weight: 700; }
.amount .num { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.warn { padding: 10px 12px; border-left-width: 3px; font-size: 14px; }
.group-title { margin: 28px 0 12px; }

/* 금액 타일 */
.tiles { gap: 10px; margin-bottom: 28px; }
.tile { min-height: 92px; padding: 14px 14px 12px 20px; border: 1px solid var(--edge); border-radius: 12px; }
.tile::before { width: 5px; border-right: 0; background: var(--l2); }
.tile-k { font-size: 13px; font-weight: 600; }
.tile-v { font-size: 16px; } .tile-v .num { font-size: 24px; font-weight: 800; }

/* 작은 버튼류 */
.shops a { min-height: 40px; border: 1px solid var(--edge); }
.need { border-width: 1px; }
.ask-ai { border-width: 1px; }

/* 라운지: 글 목록이 먼저, 글쓰기는 눌렀을 때 펼친다 */
.talk-form { padding: 14px; gap: 10px; }
.talk-form:not(:focus-within):not(.has-text) > :not(textarea):not(.sr) { display: none; }
.talk-form:not(:focus-within):not(.has-text) textarea.input { height: 48px; padding: 11px 14px; overflow: hidden; }
#talkMode { background: var(--chip); color: var(--sub); border-left-color: var(--faint); font-size: 13px; }
.talk-bar { margin: 18px 0 12px; }
.talk-tabs { border: 1px solid var(--edge); border-radius: 10px; }
.talk-tabs button + button { border-left: 1px solid var(--edge); }
.talk-tabs button { min-height: 40px; }

.ticket { grid-template-columns: 1fr auto; border: 1px solid var(--edge); border-left: 4px solid var(--tl); border-radius: 12px; }
.ticket.staff { grid-template-columns: 1fr; }
.ticket-stub { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; gap: 8px; padding: 12px 14px 0; background: none; color: var(--sub); border-right: 0; }
.ticket.staff .ticket-stub { color: var(--sub); }
.ticket-stub b { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--chip); color: var(--tl); }
.ticket-main { padding: 8px 14px 10px; }
.ticket-text { font-size: 15px; }
.punch { flex-direction: row; gap: 6px; align-self: end; min-height: 40px; margin: 0 12px 10px 0; padding: 0 12px; border: 1px solid var(--edge); border-radius: 980px; font-size: 14px; }
.punch i { width: 18px; height: 18px; border-width: 2px; background: none; }
.punch.hit i { background: var(--tl); }
.stamp { transform: none; padding: 2px 8px; border-width: 1px; font-size: 12px; }
.ticket.promote .stamp { animation: none; }
.comments { border-top: 1px solid var(--edge); }

/* 영상 */
.vid-thumb { border: 1px solid var(--edge); border-radius: 12px; }
.vid-thumb i { left: 50%; top: 50%; bottom: auto; width: 44px; height: 44px; margin: -22px 0 0 -22px; border: 0; background: rgba(20, 23, 26, .72); }
.vid-thumb i::after { left: 17px; top: 13px; border-width: 9px 0 9px 14px; border-left-color: #fff; }

@media (min-width: 1024px) {
  .section, #sec-supp, #sec-gear, #sec-insurance { padding-top: 32px; }
  #homeTalk { grid-column: 1 / -1; grid-row: 3; margin-top: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
  #homeTalk .peek-head { grid-column: 1 / -1; }
  #homeTiles { grid-row: 4; }
  #timeline .dot { border-width: 2px; }
  #timeline .dot.on { box-shadow: none; }
}

/* 남은 시간이 1초씩 줄어드는 줄 */
.live-left { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); }

/* ===== 노선도 열차가 계속 달리는 움직임 (Gemini 디자인) =====
 * 열차 위치는 실제 주수에 고정하고, 지나온 선로의 침목이 뒤로 흐르고 차체가 이음매 박자로 흔들린다. */
.rail-flow { stroke: var(--paper); stroke-width: 10; stroke-linecap: butt; stroke-dasharray: 6 18; opacity: .22; animation: rail-reveal .5s .9s ease both, rail-flow 1.4s linear infinite; }
@keyframes rail-reveal { from { opacity: 0; } }
@keyframes rail-flow { from { stroke-dashoffset: 0; } to { stroke-dashoffset: 24; } }
.t-rig { transform-box: fill-box; transform-origin: 50% 100%; animation: train-bob 2.2s ease-in-out infinite; }
@keyframes train-bob {
  0%, 42%, 100% { transform: translateY(0) rotate(0deg); }
  10% { transform: translateY(-2px) rotate(-.8deg); }
  20% { transform: translateY(.4px) rotate(.4deg); }
  29% { transform: translateY(-1.4px) rotate(-.5deg); }
  38% { transform: translateY(0) rotate(0deg); }
}
.route .t-win { animation: win-pass 2.8s ease-in-out var(--d, 0s) infinite; }
@keyframes win-pass { 0%, 24%, 100% { opacity: 1; } 10% { opacity: .35; } }
.stop-pulse { fill: none; stroke: var(--line); stroke-width: 3.5; opacity: 0; animation: stop-pulse 2.4s ease-out 1.1s infinite; }
@keyframes stop-pulse { 0% { transform: scale(1); opacity: 0; } 15% { opacity: .75; } 75%, 100% { transform: scale(1.85); opacity: 0; } }

/* ===== 카드 사용액 계산기 ===== */
.calc { margin-top: 12px; border-left: 4px solid var(--l1); }
.calc-in { display: grid; gap: 8px; margin-top: 14px; }
.calc-row { display: grid; grid-template-columns: 1fr 96px auto; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; }
.calc-row .input { height: 44px; padding: 0 12px; text-align: right; font-size: 16px; border-width: 1px; border-color: var(--edge); background: var(--paper); font-variant-numeric: tabular-nums; }
.calc-row i { font-style: normal; font-size: 14px; color: var(--faint); }
.calc-sum { margin: 12px 0 0 !important; text-align: right; font-size: 14px !important; }
.calc-sum b { font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; }
.calc-out { list-style: none; margin: 14px 0 12px; padding: 0; }
.calc-out li { padding: 12px 0; border-top: 1px solid var(--hair); }
.calc-out .bar { margin: 8px 0 6px; height: 8px; }
.calc-out .bar span { transition: transform .35s cubic-bezier(.3, .8, .3, 1); }
.calc-out .bar span::after { content: none; }
.calc-v { font-size: 14px; font-weight: 700; white-space: nowrap; }
.calc-v .num { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
@media (min-width: 1024px) { .calc-in { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 28px; } }

/* ===== 기차 창밖 별빛 · 자라는 나무 (Gemini 디자인: docs/research/baby-fx-starlight-tree.md) ===== */
/* ===== A. 기차 창밖 별빛 창문 ===== */
.sky-win {
  position: relative;
  display: inline-flex;
  flex: none;
  overflow: hidden;
  border: 2px solid var(--ink);
  background: #14171a;
}
.sky-win svg { display: block; width: 100%; height: 100%; }

/* 모바일: 승차권 줄(button.ticket-bar) 오른쪽, 폭 52px */
.sky-dock { display: none; }
.sky-ticket { width: 52px; height: 22px; border-radius: 7px; }
.ticket-bar span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-bar i { flex: none; }

/* 데스크탑: 상단 고정 메뉴(#dock) 오른쪽 끝 */
@media (min-width: 880px) {
  .sky-ticket { display: none; }
  .sky-dock {
    display: inline-flex;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 132px;
    height: 36px;
    border-width: 2.5px;
    border-radius: 10px;
  }
}
@media (min-width: 1024px) {
  .sky-dock { right: 20px; width: 148px; }
}

/* 밤/낮 색 & 레이어 */
.sky-bg { fill: #14171a; }
.sky-day { display: none; }
.sky-win[data-sky="day"] .sky-night { display: none; }
.sky-win[data-sky="day"] .sky-day { display: inline; }
.sky-win[data-sky="day"] .sky-bg { fill: var(--l1); }

.sky-night .sky-far { fill: #f1eee6; opacity: .38; }
.sky-night .sky-mid { fill: #f1eee6; opacity: .76; }
.sky-night .sky-cross { fill: none; stroke: #ffd84d; stroke-width: 1.6; stroke-linecap: round; }
.sky-night .sky-near { fill: #ffd84d; }
.sky-night .sky-pulse { fill: #ffd84d; }
.sky-shoot { stroke: #ffd84d; stroke-width: 2; stroke-linecap: round; }

.sky-day .sky-layer path { fill: var(--paper); stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; }
.sky-day .sky-mid path { opacity: .95; }
.sky-day .sky-far path { opacity: .82; }
.sky-day .sky-pulse { fill: #ffd84d; stroke: var(--ink); stroke-width: 1.8; }
.sky-glint { fill: none; stroke: #ffffff; stroke-width: 2; stroke-linecap: round; opacity: .09; }

/* 모션: 뒤로 흐르는 별(3층), 1초 맥박, 12초 별똥별 */
.sky-far { animation: sky-drift 28s linear var(--sky-t, 0s) infinite; }
.sky-mid { animation: sky-drift 16s linear var(--sky-t, 0s) infinite; }
.sky-near { animation: sky-drift 9.5s linear var(--sky-t, 0s) infinite; }
.sky-pulse {
  transform-box: view-box;
  transform-origin: 72px 13px;
  animation: sky-tick 1s cubic-bezier(.2, .9, .3, 1) var(--sky-t, 0s) infinite;
}
.sky-day .sky-pulse { transform-origin: 72px 12px; }
.sky-shoot { animation: sky-shoot 12s ease-out var(--sky-t, 0s) infinite; }

@keyframes sky-drift {
  from { transform: translateX(0); }
  to { transform: translateX(-144px); }
}
@keyframes sky-tick {
  0%, 100% { opacity: .5; transform: scale(.86); }
  12% { opacity: 1; transform: scale(1.22); }
  55% { opacity: .55; transform: scale(.88); }
}
@keyframes sky-shoot {
  0% { opacity: 0; transform: translate(34px, -10px) scaleX(.5); }
  2% { opacity: 1; transform: translate(12px, -3px) scaleX(1); }
  8% { opacity: .85; transform: translate(-52px, 18px) scaleX(.85); }
  10%, 100% { opacity: 0; transform: translate(-64px, 22px) scaleX(.4); }
}

@media (prefers-reduced-motion: reduce) {
  .sky-far, .sky-mid, .sky-near, .sky-pulse, .sky-shoot { animation: none !important; }
  .sky-pulse { opacity: 1; transform: none; }
  .sky-shoot { opacity: 0; }
}

/* ===== B. 자라는 나무 ===== */
.tree-box { margin-top: 18px; }
.tree-svg { display: block; width: 100%; height: auto; overflow: visible; }

/* 단계별 표시 제어 */
.tree-svg [data-vis] { display: none; }
.tree-svg[data-stage="0"] .s0,
.tree-svg[data-stage="1"] .s1,
.tree-svg[data-stage="2"] .s2,
.tree-svg[data-stage="3"] .s34,
.tree-svg[data-stage="4"] .s34,
.tree-svg[data-stage="4"] .s4,
.tree-svg[data-stage="5"] .s56,
.tree-svg[data-stage="6"] .s56,
.tree-svg[data-stage="6"] .s6 { display: inline; }

/* 같은 단계 안 미세 성장(--grow: 0~1) */
.t-plant {
  transform-box: view-box;
  transform-origin: 160px 170px;
  transform: scale(calc(.88 + var(--grow, .5) * .14));
}

/* 바닥·씨앗 */
.t-hill { fill: var(--edge); }
.t-hill-line { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.t-pebble { fill: var(--ink); }
.t-pebble-line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; opacity: .45; }
.t-seed { transform-box: view-box; transform-origin: 160px 168px; }
.t-seed-body { fill: #ffd84d; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.t-seed-seam { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; }

/* 줄기·가지 (굵은 잉크 선 + 안쪽 나무색) */
.t-stem, .t-ink-s, .t-ink-m, .t-ink-l, .t-ink-b,
.t-wood-s, .t-wood-m, .t-wood-l, .t-wood-b {
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 102;
  stroke-dashoffset: 0;
}
.t-stem { stroke: var(--ink); stroke-width: 3; }
.t-ink-s { stroke: var(--ink); stroke-width: 8; }
.t-wood-s { stroke: var(--edge); stroke-width: 3; }
.t-ink-m { stroke: var(--ink); stroke-width: 13; }
.t-wood-m { stroke: var(--edge); stroke-width: 7; }
.t-ink-l { stroke: var(--ink); stroke-width: 18; }
.t-wood-l { stroke: var(--edge); stroke-width: 11.5; }
.t-ink-b { stroke: var(--ink); stroke-width: 9; }
.t-wood-b { stroke: var(--edge); stroke-width: 4; }
.t-bark { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; opacity: .55; }

/* 잎·수관·꽃·열매 */
.t-leaf, .t-puff { fill: var(--l3); stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.t-puff { stroke-width: 3; }
.t-vein, .t-arc { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.t-arc { opacity: .55; }
.t-petal { fill: var(--paper); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.t-pollen { fill: #ffd84d; stroke: var(--ink); stroke-width: 1.6; }
.t-fstem { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.t-fbody { fill: var(--l2); stroke: var(--ink); stroke-width: 2.3; stroke-linejoin: round; }
.t-fdot { fill: #ffd84d; }

/* 오프닝 성장 애니메이션 (1.5~2.3초) */
.tree-svg[data-stage="0"] .t-seed,
.tree-svg[data-stage="1"] .t-seed { animation: tree-pop .38s cubic-bezier(.34, 1.56, .64, 1) both; }
.tree-svg:not([data-stage="0"]):not([data-stage="1"]) .t-seed {
  opacity: 0;
  animation: tree-seed-pass .8s ease both;
}

.t-stem, .t-ink-s, .t-wood-s, .t-ink-m, .t-wood-m, .t-ink-l, .t-wood-l {
  animation: tree-draw .68s cubic-bezier(.25, .8, .3, 1) .2s both;
}
.t-ink-b, .t-wood-b { animation: tree-draw .44s cubic-bezier(.25, .8, .3, 1) var(--bd, .65s) both; }
.t-bark { animation: tree-fade .35s ease .85s both; }

.t-leaf, .t-puff {
  transform-box: view-box;
  transform-origin: var(--lo, 160px 120px);
  animation: tree-pop .48s cubic-bezier(.34, 1.45, .64, 1) var(--ld, .9s) both;
}
.t-arc { animation: tree-fade .35s ease var(--ld, 1.4s) both; }

.t-flower {
  transform-box: fill-box;
  transform-origin: center;
  animation: tree-bloom .45s cubic-bezier(.34, 1.56, .64, 1) var(--fd, 1.5s) both;
}
.t-fruit {
  transform-box: fill-box;
  transform-origin: 50% 20%;
  animation: tree-bloom .45s cubic-bezier(.34, 1.56, .64, 1) var(--fd, 1.65s) both;
}

/* 성장 완료 후 잔잔한 바람 흔들림 */
.t-sway {
  transform-box: view-box;
  transform-origin: var(--so, 160px 130px);
  animation: tree-sway 4.6s ease-in-out 2.35s infinite alternate;
}

@keyframes tree-draw {
  0% { stroke-dashoffset: 102; opacity: 0; }
  8% { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes tree-pop {
  0% { opacity: 0; transform: scale(0); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes tree-bloom {
  0% { opacity: 0; transform: scale(0) rotate(-18deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes tree-fade {
  0% { opacity: 0; }
  100% { opacity: .55; }
}
@keyframes tree-seed-pass {
  0% { opacity: 0; transform: scale(0); }
  30% { opacity: 1; transform: scale(1); }
  70% { opacity: 1; transform: scale(.95); }
  100% { opacity: 0; transform: scale(.4); }
}
@keyframes tree-sway {
  0% { transform: rotate(0deg); }
  50% { transform: rotate(1.3deg); }
  100% { transform: rotate(-1.1deg); }
}

@media (prefers-reduced-motion: reduce) {
  .tree-svg * { animation: none !important; }
  .t-sway { transform: none; }
}
.tree-box { max-width: 360px; margin-left: auto; margin-right: auto; text-align: center; }
.tree-cap { margin: 4px 0 0; font-family: var(--display); font-size: 20px; }
.tree-line { margin: 2px 0 0; font-size: 14px; color: var(--sub); }

/* ===== 맨 위 줄: 로고 + 내 상태 알약 + 기차 창문 (Gemini 대안 A: docs/research/baby-page-topbar.md) ===== */
:root { --bar-pill: rgba(11, 87, 208, .08); --bar-pill-edge: rgba(11, 87, 208, .24); }
@media (prefers-color-scheme: dark) { :root { --bar-pill: rgba(122, 168, 255, .14); --bar-pill-edge: rgba(122, 168, 255, .32); } }
body:not(.entered) .topbar { display: none; }
.topbar { display: flex; align-items: center; gap: 8px; height: 52px; margin: 0 -20px; padding: 0 16px; background: var(--paper); border-bottom: 1px solid var(--edge); }
.brand, .dock-brand { display: inline-flex; align-items: center; gap: 5px; flex: none; min-height: 44px; color: var(--ink); text-decoration: none; }
.brand:hover, .dock-brand:hover { text-decoration: none; }
.brand-mark { display: block; width: 20px; height: 20px; flex: none; fill: none; stroke: var(--l1); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.brand-name { font-family: var(--display); font-weight: 400; font-size: 18px; line-height: 1; padding-top: 2px; color: var(--ink); white-space: nowrap; }
.dock-brand { display: none; }

.ticket-bar { position: relative; display: inline-flex; align-items: center; gap: 6px; flex: 0 1 auto; min-width: 0; width: auto; min-height: 36px; height: 36px; margin: 0 0 0 auto; padding: 0 10px 0 4px; border: 1px solid var(--bar-pill-edge); border-radius: 999px; background: var(--bar-pill); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, transform .12s; }
.ticket-bar::after { content: ""; position: absolute; inset: -4px 0; }
.ticket-bar:hover { border-color: var(--l1); }
.ticket-bar:active { transform: scale(.98); }
.ticket-bar:focus-visible { outline: 2px solid var(--l1); outline-offset: 2px; }
.ticket-bar b { flex: none; display: inline-flex; align-items: center; height: 26px; padding: 2px 9px 0; border-radius: 999px; background: var(--l1); color: var(--on); font-family: var(--display); font-weight: 400; font-size: 14px; line-height: 1; white-space: nowrap; }
.ticket-bar span { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--ink); }
.ticket-bar i { flex: none; display: inline-flex; align-items: center; gap: 4px; padding-left: 7px; border-left: 1px solid var(--bar-pill-edge); font-style: normal; font-size: 12px; font-weight: 700; text-decoration: none; color: var(--l1); white-space: nowrap; }
.ticket-bar i::after { content: ""; width: 5px; height: 5px; margin-top: -2px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: rotate(45deg); }
.topbar .sky-ticket { width: 44px; height: 24px; }
@media (max-width: 359px) { .topbar { padding: 0 12px; gap: 6px; } .ticket-bar i { font-size: 0; gap: 0; padding-left: 6px; } .topbar .sky-ticket { display: none; } }
body.entered .hero { padding-top: 0; }
body.entered .ask { margin-top: 12px; }

@media (min-width: 880px) {
  .dock-brand { display: inline-flex; position: absolute; left: 20px; top: 50%; transform: translateY(-50%); }
  .dock-brand .brand-name { font-size: 20px; }
  body.entered .hero { padding-top: 14px; }
  .topbar { height: auto; margin: 0; padding: 0; background: transparent; border-bottom: 0; }
  .topbar .brand, .topbar .sky-ticket { display: none; }
  .ticket-bar { margin-left: 0; height: 40px; padding: 0 12px 0 5px; }
  .ticket-bar b { height: 28px; font-size: 15px; }
  .ticket-bar span { font-size: 14px; }
}
@media (min-width: 1024px) { .dock-brand { left: 32px; } body.entered .ticket-bar { margin: 0; } }
