/* 파발 — 노선도 간판.
   짙은 바다 위 두께 있는 미색 판, 법랑 역 간판, 눌리는 키캡. 토큰 값은 전부 앱에서 옮겼다(사이트만의 색 없음):
   색·크기 = 앱 lib/core/design/app_theme.dart(Palette 5~46행, Sizes 64~118행),
   노선 7칸 = lib/core/design/line_style.dart 31~44행, 바다 무늬·간판·키캡 = lib/core/design/sign_widgets.dart.
   근거·대비 계산 = 이 폴더 CLAUDE.md '디자인 근거'. */
@font-face {
  font-family: "Black Han Sans";
  src: url("./fonts/BlackHanSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans KR";
  src: url("./fonts/IBMPlexSansKR-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans KR";
  src: url("./fonts/IBMPlexSansKR-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  /* 바다 */
  --sea: #24466b;          /* Palette.sea — 화면 바탕 */
  --sea-wave: #2c5580;     /* Palette.seaWave — 물결 무늬 */
  --sea-deep: #16304d;     /* Palette.seaDeep — 알약 */
  --sea-shadow: #10233a;   /* Palette.seaShadow — 판 그림자·간판 두께 */
  /* 판 */
  --land: #ede3ce;         /* Palette.land — 판 윗면·간판 글자·키캡 면 */
  --land-side: #b9a67f;    /* Palette.landSide — 판 옆면(두께) */
  --border: #bdae8d;       /* Palette.border — 도 경계 점선 */
  --paper: #f6efdf;        /* Palette.paper — 문서(약관·방침) 바탕 */
  /* 먹·글자 */
  --ink: #1e2230;          /* Palette.ink */
  --ink-muted: #5a5446;    /* Palette.inkMuted — 미색 위 5.9:1 */
  --white: #ffffff;
  /* 강조 */
  --vermilion: #d2553a;    /* Palette.vermilion — 과밀·파발 */
  --danger: #b0402b;       /* Palette.danger — 미색 위 주홍 글자(4.56:1) */
  --jade: #3e8e5e;         /* Palette.jade */
  --amber: #e0a43a;        /* Palette.amber — 선택·주 버튼 */
  --amber-light: #f3c56a;  /* Palette.amberLight — 바다 위 강조 글자(6.0:1) */
  --amber-edge: #9c6b12;   /* Palette.amberEdge — 호박 키캡 두께 */
  --key-edge: #9c8b6e;     /* Palette.keyEdge — 미색 키캡 두께 */
  --slot-text: #b8c8da;    /* Palette.slotText — 바다 위 보조 글자(5.7:1) */
  /* 노선 7칸 (line_style.dart) */
  --l1: #d2553a;
  --l2: #3e8e5e;
  --l3: #e0a43a;
  --l4: #2f86a6;
  --l5: #7b5ea7;
  --l6: #1e2230;
  --l7: #a0527a;
  /* 크기 (Sizes) */
  --radius: 12px;          /* Sizes.radius */
  --sign-radius: 8px;      /* Sizes.signRadius */
  --sign-depth: 4px;       /* Sizes.signDepth */
  --key-depth: 4px;        /* Sizes.keyDepth — 누르면 1 */
  --font-display: "Black Han Sans", "IBM Plex Sans KR", sans-serif;
  --font-body: "IBM Plex Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  /* 바다 물결 — SeaPainter 22×14 칸, seaWave 75%, 1.3 */
  --waves: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='14'%3E%3Cpath d='M1 9Q6 4 11 9T21 9' fill='none' stroke='%232c5580' stroke-opacity='.75' stroke-width='1.3' stroke-linecap='round'/%3E%3C/svg%3E");
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--sea);
}

body {
  margin: 0;
  background: var(--waves) repeat, var(--sea);
  color: var(--land);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-text-size-adjust: 100%;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--amber-light);
  outline-offset: 3px;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

.wrap {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
}

/* ── 법랑 역 간판(SignPlate): 먹 판 + 안쪽 미색 테 1.5 + 아래 두께 4 ── */
.sign {
  display: inline-block;
  background: var(--ink);
  color: var(--land);
  border-radius: var(--sign-radius);
  box-shadow:
    inset 0 0 0 2px var(--ink),
    inset 0 0 0 3.5px var(--land),
    0 var(--sign-depth) 0 var(--sea-shadow);
  padding: 10px 18px 9px;
}

/* ── 판(BoardPainter): 미색 윗면 + 먹 테 + 옆면 두께 5 + 그림자(2,9) ── */
.plate {
  background: var(--land);
  color: var(--ink);
  border: 1.6px solid var(--ink);
  border-radius: var(--radius);
  box-shadow:
    0 5px 0 var(--land-side),
    0 6.6px 0 var(--ink),
    2px 11px 0 var(--sea-shadow);
  padding: 22px;
}

.plate a {
  color: var(--sea);
  text-decoration-color: var(--vermilion);
  text-decoration-thickness: 2px;
}

/* ── 키캡(Keycap): 면 + 먹 테 1.5 + 두께 4, 누르면 1 로 즉시 내려앉음(애니메이션 없음) ── */
.key {
  display: inline-block;
  background: var(--land);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: var(--sign-radius);
  box-shadow:
    0 var(--key-depth) 0 var(--key-edge),
    0 var(--key-depth) 0 1.5px var(--ink);
  margin-bottom: var(--key-depth);
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.2;
  text-decoration: none;
  padding: 12px 20px 11px;
  cursor: pointer;
}

a.key:active,
button.key:active {
  transform: translateY(3px);
  box-shadow:
    0 1px 0 var(--key-edge),
    0 1px 0 1.5px var(--ink);
}

.key-amber {
  background: var(--amber);
  box-shadow:
    0 var(--key-depth) 0 var(--amber-edge),
    0 var(--key-depth) 0 1.5px var(--ink);
}

a.key-amber:active,
button.key-amber:active {
  box-shadow:
    0 1px 0 var(--amber-edge),
    0 1px 0 1.5px var(--ink);
}

/* ── 알약(SignPill): 짙은 바다 둥근 띠 ── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 26px;
  background: var(--sea-deep);
  color: var(--land);
  border-radius: 13px;
  padding: 3px 12px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  flex: none;
}

/* ── 헤더: 간판 + 노선 내비(역 점 ●─●, 지금 페이지 = 환승역 알약) ── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
  flex-wrap: wrap;
  padding: 18px 0 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px 7px 8px;
  text-decoration: none;
  flex: none;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: block;
}

.brand b {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0.06em;
}

.route-nav {
  flex: 1 1 360px;
  max-width: 470px;
}

.route-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.route-nav li {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}

/* 노선 구간: 미색 테 + 1번 노선(주홍 실선). 첫 역 왼쪽·끝 역 오른쪽은 비운다. */
.route-nav li::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  height: 10px;
  background: var(--l1);
  border-block: 2.25px solid var(--land);
}

.route-nav li:first-child::before {
  left: 50%;
}

.route-nav li:last-child::before {
  right: 50%;
}

.route-nav a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding-bottom: 4px;
  color: var(--land);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

/* 역: 흰 원 + 먹 테 2.6 (stationRadius 9.5) */
.route-nav a::before {
  content: "";
  width: 19px;
  height: 19px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--white);
  border: 2.6px solid var(--ink);
  box-sizing: border-box;
}

.route-nav a:hover {
  color: var(--amber-light);
}

/* 지금 페이지 = 도성 환승역처럼 가로 알약(capitalPill 34×20) */
.route-nav a[aria-current="page"] {
  color: var(--amber-light);
}

.route-nav a[aria-current="page"]::before {
  width: 34px;
  height: 20px;
  margin-top: 3px;
  border-radius: 10px;
  border-width: 2.8px;
}

.breadcrumb {
  font-size: 13px;
  line-height: 1.5;
}

.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 6px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--slot-text);
}

.breadcrumb li + li::before {
  content: "›";
  margin-right: 6px;
}

/* ── 섹션 구분: 노선 띠와 역 점(●──●──●) ── */
.route-rule {
  position: relative;
  height: 20px;
  margin: 8px 0;
}

.route-rule::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 9px;
  right: 9px;
  height: 10px;
  border-block: 2.25px solid var(--land);
  background: var(--line, var(--l1));
  background-clip: padding-box;
}

main > .route-rule:first-child {
  margin-top: 18px;
}

.route-rule i {
  position: absolute;
  top: 0.5px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--white);
  border: 2.6px solid var(--ink);
}

.route-rule i:nth-child(1) { left: 0; }
.route-rule i:nth-child(2) { left: calc(50% - 9.5px); }
.route-rule i:nth-child(3) { right: 0; }

/* 노선 무늬(색만으로 구분하지 않는다 — line_style.dart). 빈칸은 미색 테가 비친다. */
.l1 { --line: var(--l1); }
.l2 { --line: repeating-linear-gradient(90deg, var(--l2) 0 14px, var(--land) 14px 21px); }
.l3 { --line: radial-gradient(circle at 4px 50%, var(--l3) 3.4px, var(--land) 3.9px) 0 0 / 10.6px 100% repeat-x; }
.l4 { --line: repeating-linear-gradient(90deg, var(--l4) 0 14px, var(--land) 14px 19px, var(--l4) 19px 22px, var(--land) 22px 27px); }
.l5 { --line: linear-gradient(var(--l5) 0 32%, var(--land) 32% 68%, var(--l5) 68%); }

/* ── 섹션 머리: 노선 번호 원 + 역 이름 간판 ── */
section {
  padding: 36px 0;
}

.station-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
}

.station-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(22px, 3.4vw, 28px);
  line-height: 1.2;
}

/* 노선 번호 원(drawLineBadge): 노선 색 + 먹 테 + 흰색·먹 중 대비 큰 글자. 24px = 큰 글자(3:1) 기준 */
.line-badge {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2.2px solid var(--ink);
  background: var(--l1);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
  box-shadow: 0 3px 0 var(--sea-shadow);
}

.line-badge.b2 { background: var(--l2); }
.line-badge.b3 { background: var(--l3); color: var(--ink); }
.line-badge.b4 { background: var(--l4); }
.line-badge.b5 { background: var(--l5); }

.section-lead {
  max-width: 640px;
  margin: -8px 0 22px;
  color: var(--land);
}

/* ── 히어로 ── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 36px;
  padding: 36px 0 28px;
}

.title-sign {
  border-radius: 12px;
  padding: 16px 26px 16px;
  text-align: center;
  margin-bottom: 26px;
}

.glyph-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 4px;
}

.glyph-row svg {
  width: 26px;
  height: 26px;
  display: block;
}

.title-sign h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(56px, 9vw, 76px);
  line-height: 1.05;
  letter-spacing: 0.06em;
}

.title-sign p {
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--land);
  letter-spacing: 0.08em;
}

.hero .tagline {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.2vw, 28px);
  line-height: 1.35;
  margin: 0 0 12px;
}

.hero .tagline em {
  font-style: normal;
  color: var(--amber-light);
}

.hero .lead {
  max-width: 540px;
  margin: 0 0 20px;
}

.hero .pill {
  margin-bottom: 22px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 14px;
}

.board {
  justify-self: center;
  width: min(330px, 100%);
  margin: 0;
}

.board svg {
  display: block;
  width: 100%;
  height: auto;
}

.board figcaption {
  margin-top: 8px;
  text-align: center;
  font-size: 13px;
  color: var(--slot-text);
}

/* ── 한 판의 흐름: 판 위 세로 노선과 역 ── */
.run-route {
  list-style: none;
  margin: 0;
  padding: 26px 22px 22px;
}

.run-route li {
  position: relative;
  padding: 0 0 22px 46px;
}

.run-route li:last-child {
  padding-bottom: 0;
}

/* 세로 구간: 미색 테 + 주홍 실선 */
.run-route li::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 12px;
  bottom: -12px;
  width: 10px;
  background: var(--l1);
  border-inline: 2.25px solid var(--land);
}

.run-route li:last-child::before {
  display: none;
}

/* 역 */
.run-route li::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--white);
  border: 2.6px solid var(--ink);
  box-sizing: border-box;
}

/* 마지막 역 = 한양 환승역 알약 */
.run-route li:last-child::after {
  left: -1px;
  width: 30px;
  height: 20px;
  border-radius: 10px;
  border-width: 2.8px;
}

.run-route h3 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.3;
}

.run-route p {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

.run-route .note {
  color: var(--ink-muted);
  font-size: 14px;
  margin-top: 4px;
}

/* ── 역 종류와 화물 ── */
.kinds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px 16px;
}

.kind {
  padding: 18px;
}

.kind svg {
  display: block;
  width: 44px;
  height: 44px;
  margin-bottom: 10px;
}

.kind h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.3;
}

.kind h3 small {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-muted);
  margin-left: 6px;
}

.kind p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink);
}

/* ── 하루 정산 카드: 키캡 ── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cards li {
  cursor: default;
  font-family: var(--font-body);
  padding: 14px 16px 13px;
}

.cards b {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.3;
}

.cards span {
  display: block;
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.4;
  margin-top: 2px;
}

.cards .max {
  margin-top: 0;
  font-size: 13px;
}

.cards .lock {
  display: inline-block;
  font-style: normal;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--land);
  background: var(--sea-deep);
  border-radius: 11px;
  padding: 1px 10px;
}

/* ── 모드와 명성 ── */
.modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.mode h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 21px;
  line-height: 1.3;
}

.mode p {
  margin: 0;
  font-size: 15px;
}

.fame {
  margin-top: 26px;
}

.fame h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
}

.fame ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fame .pill b {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--amber-light);
  font-size: 15px;
}

/* ── 시작하기 전에 ── */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.fact {
  padding: 18px 20px;
}

.fact strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.3;
  margin-bottom: 4px;
}

.fact span {
  font-size: 15px;
}

/* ── 지원 ── */
.page-head {
  padding: 28px 0 8px;
}

.page-head h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 5vw, 40px);
  line-height: 1.15;
}

.page-head p {
  margin: 18px 0 0;
  max-width: 640px;
}

.faq-list {
  display: grid;
  gap: 14px;
}

.faq-list details {
  padding: 0;
  box-shadow:
    0 4px 0 var(--land-side),
    0 5.6px 0 var(--ink);
  border-radius: 10px;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  padding: 14px 18px;
  list-style-position: inside;
}

.faq-list p {
  margin: 0;
  padding: 0 18px 16px;
  font-size: 15px;
}

.form-plate {
  max-width: 640px;
}

.form-note {
  margin: 0 0 18px;
  font-size: 15px;
}

.support-form {
  display: grid;
  gap: 16px;
}

.support-form label {
  display: grid;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
}

.support-form select,
.support-form input,
.support-form textarea {
  background: var(--white);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  width: 100%;
}

.support-form textarea::placeholder,
.support-form input::placeholder {
  color: var(--ink-muted);
}

.support-form button {
  justify-self: start;
}

.support-form button:disabled {
  opacity: 0.5;
  cursor: default;
}

#form-status {
  margin: 0;
  min-height: 1.3em;
  font-size: 15px;
  font-weight: 700;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}

.contact a {
  font-family: var(--font-display);
  font-size: clamp(18px, 4vw, 22px);
  letter-spacing: 0.02em;
  word-break: break-all;
}

/* ── 방침·약관: 읽는 문서라 종이색 판(앱 PolicyDocScreen 과 같다) ── */
.policy {
  max-width: 860px;
  background: var(--paper);
  padding: 26px clamp(18px, 4vw, 40px) 30px;
  margin-bottom: 20px;
}

.policy h1 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 4.4vw, 36px);
  line-height: 1.2;
  color: var(--ink);
}

.policy .meta-date {
  display: inline-block;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--land);
  background: var(--sea-deep);
  border-radius: 13px;
  padding: 2px 12px;
}

.policy h2 {
  margin: 30px 0 10px;
  font-size: clamp(18px, 2.6vw, 21px);
  line-height: 1.35;
  color: var(--ink);
  padding-bottom: 6px;
  border-bottom: 2px dashed var(--border);
}

.policy p,
.policy li {
  font-size: 15.5px;
  color: var(--ink);
}

.policy ol,
.policy ul {
  padding-left: 1.4em;
}

.policy li + li {
  margin-top: 6px;
}

.policy li > ul {
  margin: 6px 0 0;
}

.policy .addendum {
  margin-top: 30px;
}

/* ── 푸터 ── */
footer {
  margin-top: 28px;
  padding: 26px 0 44px;
  text-align: center;
  font-size: 14px;
  color: var(--land);
}

footer p {
  margin: 6px 0;
}

footer a {
  color: var(--land);
}

footer .privacy-link {
  font-weight: 700;
  color: var(--amber-light);
}

footer .soon {
  color: var(--slot-text);
}

@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 22px;
  }
  .board {
    width: min(260px, 76%);
  }
}

@media (max-width: 560px) {
  .site-header {
    padding-top: 14px;
  }
  .route-nav {
    flex-basis: 100%;
    max-width: none;
  }
  .route-nav a {
    font-size: 13px;
  }
  .plate {
    padding: 18px 16px;
  }
  .run-route {
    padding: 22px 16px 18px;
  }
  .title-sign {
    display: block;
  }
  .kind {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 4px 14px;
    align-items: start;
  }
  .kind svg {
    grid-row: span 2;
    margin: 0;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
