/* 한레인(swim) — docs/mockup/*.html 머리 CSS 를 옮겨 왔다(목업 주석이 정본이었고, 이제 이 파일이 정본).
   대비는 WCAG 2.x 상대휘도로 계산한 값이다.
   라이트                         다크
   ink  #0E2A3B / ground 13.75   ink  #E3EDF1 / ground 15.14
   ink        / surface 14.86   ink        / surface 13.54
   dim  #46606F / ground  6.14   dim  #9AB2BE / ground  8.14
   lane #155A82 / ground  6.90   lane #7FC4EA / ground  9.42  (링크·주 버튼)
   흰 글자 / lane 버튼    7.46   ground 글자 / lane 버튼 9.42
   open #23877A / ground  4.03   open #4CBFA9 / ground  8.01  (막대 = 그래픽, 3:1 기준)
   warn #8A5300 / ground  5.86   warn #F0B451 / ground  9.74
   danger #B3261E / ground 6.05  danger #FF8A80 / ground 7.89 (위험·오류 전용)
   ink / open-tint #DDF0EC 12.56 ink / open-tint #163A36 10.43
   shut #C9D8DE / ground 1.35 — 장식 트랙. '닫힘'은 막대가 아니라 글자로도 적으므로 대비 기준 대상 아님.
   ⚠️ .lane__state--open 글자는 open 색(4.03:1)을 쓰지 않는다 — 본문 글자 기준 4.5:1 에 못 미친다.
      굵은 14px 글자라 ink 로 쓰고 앞에 open 색 점(그래픽)을 붙였다. */
:root {
  --ground: #F2F7F8; --surface: #FFFFFF; --ink: #0E2A3B; --dim: #46606F;
  --line: #C3D4DB; --lane: #155A82; --on-lane: #FFFFFF;
  --open: #23877A; --open-tint: #DDF0EC; --shut: #C9D8DE;
  --warn: #8A5300; --danger: #B3261E;
  --radius: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0B1820; --surface: #12232D; --ink: #E3EDF1; --dim: #9AB2BE;
    --line: #24404F; --lane: #7FC4EA; --on-lane: #0B1820;
    --open: #4CBFA9; --open-tint: #163A36; --shut: #2A4452;
    --warn: #F0B451; --danger: #FF8A80;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #0B1820; --surface: #12232D; --ink: #E3EDF1; --dim: #9AB2BE;
  --line: #24404F; --lane: #7FC4EA; --on-lane: #0B1820;
  --open: #4CBFA9; --open-tint: #163A36; --shut: #2A4452;
  --warn: #F0B451; --danger: #FF8A80;
  color-scheme: dark;
}
/* famousbros 공용 부품(fb.css) 값 — 기존 토큰을 가리킨다(G:\workspace\DESIGN.md '토큰'). 다크·data-theme 은 가리키는 토큰이 바뀌어 따라간다.
   실측(2026-10-16, WCAG 2.x): 라이트 ink 14.9 · muted(--dim) 6.6 (surface #fff) / ground 위 dim 6.1 · lane #155A82 위 흰 글자 7.5
                              다크   ink 13.5 · dim 7.3 (surface #12232D) / ground 위 dim 8.1 · lane #7FC4EA 위 #0B1820 9.4 */
:root {
  --fb-bg: var(--ground);
  --fb-surface: var(--surface);
  --fb-ink: var(--ink);
  --fb-muted: var(--dim);
  --fb-line: var(--line);
  --fb-accent: var(--lane);
  --fb-on-accent: var(--on-lane);
  --fb-display: inherit;   /* 웹폰트 없음 */
  --fb-max: 960px;         /* .wrap 과 같은 폭 */
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }   /* 떠 있는 내비가 앵커 목적지를 덮지 않게 */
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
  word-break: keep-all; overflow-wrap: anywhere;
}
img, svg { max-width: 100%; }
a { color: var(--lane); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--lane); outline-offset: 2px; }
.num, time, td { font-variant-numeric: tabular-nums; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 20; background: var(--surface); padding: 12px 16px; }

/* 머리 — 왼쪽 위 로고 = 홈. 내비 5칸(PageTests 가 고정). 틀은 fb.css 의 .fb-nav(떠 있는 유리 막대) */
.logo { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink);
  font-weight: 800; font-size: 18px; letter-spacing: -0.02em; text-decoration: none; }
.logo svg { width: 28px; height: 28px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  color: var(--ink); text-decoration: none; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.nav a:hover { text-decoration: underline; }
/* 현재 위치는 강조색이 아니라 굵기 + 먹색 테두리 알약 — 강조색은 화면의 주 버튼 하나에 남긴다(DESIGN.md 예외) */
.nav a[aria-current="page"] { font-weight: 700; box-shadow: inset 0 0 0 2px var(--ink); }

/* 배우기 2차 띠 — 줄바꿈(가로 스크롤 없음). 칸 44px */
.band { border-bottom: 1px solid var(--line); background: var(--surface); }
.band ul { list-style: none; margin: 0 auto; padding: 0 12px; display: flex; flex-wrap: wrap; max-width: 960px; }
.band a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; color: var(--ink); text-decoration: none; font-size: 15px; }
.band a:hover { text-decoration: underline; }
.band a[aria-current="page"] { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; }

/* main 은 .wrap 과 같이 쓰므로 위아래만 따로 준다(.wrap 의 padding 단축 속성이 이기지 않게) */
main.wrap { padding-top: 32px; padding-bottom: 64px; }
h1 { font-size: 28px; line-height: 1.25; letter-spacing: -0.03em; margin: 0 0 8px; }
h2 { font-size: 20px; line-height: 1.3; letter-spacing: -0.02em; margin: 44px 0 8px; }
h3 { font-size: 16px; margin: 24px 0 4px; }
p { margin: 0 0 12px; }
.lede { color: var(--dim); margin: 0 0 20px; }
.meta { color: var(--dim); font-size: 14px; }
.block + .block { margin-top: 44px; }
.crumb a { display: inline-flex; align-items: center; min-height: 44px; }

/* 버튼 — 강조색(주 버튼)은 한 화면에 하나 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px; font: inherit; font-weight: 700;   /* fb-btn 과 같은 알약 */
  text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.btn--primary { background: var(--lane); color: var(--on-lane); }
.btn--ghost { background: transparent; color: var(--lane); border-color: var(--line); }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ★ 이 사이트의 기억할 한 가지: 레인 시간표.
   수영장 하나 = 레인 하나. 가로가 06~22시, 칠한 칸이 자유수영, 세로 선이 지금.
   줄은 '누르러 온 줄'이라 이름 앵커를 ::after 로 겹쳐 펼친다(UIUX Fitts). */
.lanes { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.lane { position: relative; display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 4px 16px; align-items: center; padding: 12px 0; min-height: 64px; border-bottom: 1px solid var(--line); }
.lane[hidden] { display: none; }
.lane__name { font-weight: 700; color: var(--ink); text-decoration: none; }
.lane__name::after { content: ""; position: absolute; inset: 0; }
.lane:hover .lane__name { text-decoration: underline; color: var(--lane); }
.lane__sub { display: block; color: var(--dim); font-size: 14px; }
.lane__state { font-size: 14px; font-weight: 700; color: var(--ink); }
.lane__state--open::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--open); margin-right: 4px; vertical-align: 1px; }
.lane__state--shut { color: var(--dim); font-weight: 400; }
.tag { font-size: 12px; color: var(--warn); border: 1px solid var(--warn); border-radius: 4px; padding: 0 4px; margin-left: 4px; white-space: nowrap; }
.track { position: relative; height: 20px; background: var(--shut); border-radius: 10px;
  /* 레인 바닥의 T자 표시를 시간 눈금으로: 3시간마다 가는 선 */
  background-image: repeating-linear-gradient(90deg, transparent 0 calc(18.75% - 1px), var(--ground) calc(18.75% - 1px) 18.75%); }
.track i { position: absolute; top: 0; bottom: 0; background: var(--open); border-radius: 10px; }
.track .now { position: absolute; top: -6px; bottom: -6px; width: 2px; background: var(--ink); }
.axis { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 16px;
  font-size: 12px; color: var(--dim); padding: 4px 0 0; }
.axis--solo { grid-template-columns: minmax(0, 1fr); }
.axis span { position: relative; height: 16px; }
.axis em { position: absolute; transform: translateX(-50%); font-style: normal; }
.axis em:first-child { transform: none; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; color: var(--dim); margin-top: 12px; }
.legend b { display: inline-block; width: 24px; height: 10px; border-radius: 5px; background: var(--open); margin-right: 6px; vertical-align: middle; }
.legend b.s { background: var(--shut); }
.more-rows { margin-top: 12px; }
.more-rows a, .facts a { display: inline-flex; align-items: center; min-height: 44px; }

/* 지금 기준 줄 */
.where { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 16px; }
.where strong { font-size: 14px; }

/* 목록 줄(배우기·바다·가까운 곳) — 줄 전체 링크 */
.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.list li { position: relative; border-bottom: 1px solid var(--line); }
.list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center;
  min-height: 56px; padding: 12px 0; color: var(--ink); text-decoration: none; }
.list a:hover b { text-decoration: underline; color: var(--lane); }
.list small { display: block; color: var(--dim); font-size: 14px; }
.list .tail { color: var(--dim); font-size: 14px; text-align: right; }
.list .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; min-height: 56px; padding: 12px 0; }

/* 안내 상자 — 실패·철 지남은 성공 문구에 섞지 않는다 */
.note { border-left: 4px solid var(--line); background: var(--surface); padding: 12px 16px; border-radius: 0 var(--radius) var(--radius) 0; }
.note p:last-child { margin-bottom: 0; }
.note--warn { border-left-color: var(--warn); }
.note--warn strong { color: var(--warn); }
.note--danger { border-left-color: var(--danger); }
.note--danger strong { color: var(--danger); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }

/* 상세: 큰 숫자는 하나 — 수영장은 '지금/다음 자유수영', 해수욕장은 '해수욕 지수' */
.hero-next { margin: 16px 0 8px; }
.hero-next .label { color: var(--dim); font-size: 14px; font-weight: 400; letter-spacing: 0; margin: 0; }
.hero-next .big { font-size: 40px; line-height: 1.1; font-weight: 800; letter-spacing: -0.03em; margin: 4px 0; }
.hero-next .why { margin: 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 8px 24px; margin: 16px 0 0; padding: 0; }
.facts div { border-top: 1px solid var(--line); padding-top: 8px; }
.facts dt { color: var(--dim); font-size: 14px; }
.facts dd { margin: 0; font-weight: 700; }

/* 표 — 행 높이 44px 로 맞춘다(패딩 더 얹지 않음). 360px 에선 표만 가로 스크롤 예외 */
.tbl-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; height: 44px; padding: 0 12px; border-bottom: 1px solid var(--line); }
th { color: var(--dim); font-weight: 400; font-size: 14px; white-space: nowrap; }
td.open { background: var(--open-tint); }
tr.today th, tr.today td { font-weight: 700; }

/* 출처 줄 — 모든 운영 정보는 확인일과 출처를 붙인다 */
.src { font-size: 14px; color: var(--dim); margin-top: 8px; }

/* 칩 필터 — 칸 1개(종류) + 토글 1개. URL 쿼리에 상태를 둔다 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.chips a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line);
  border-radius: 22px; color: var(--ink); text-decoration: none; background: var(--surface); }
.chips a[aria-current="true"], .chips a[aria-current="page"] { border-color: var(--ink); font-weight: 700; box-shadow: inset 0 0 0 1px var(--ink); }

/* 지도 */
.map { position: relative; height: 460px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; }
.leaflet-container { font: inherit; isolation: isolate; }   /* Leaflet 판(z 400~1000)을 지도 안에 가둔다 — 떠 있는 내비(z 50) 위로 올라오지 않게 */
.leaflet-popup-content a { display: inline-flex; align-items: center; min-height: 44px; }
.leaflet-bar a { width: 44px !important; height: 44px !important; line-height: 44px !important; }

/* 글(소개·방침·약관·배우기) */
.prose { max-width: 680px; }
.prose li { margin-bottom: 4px; }
.prose a { display: inline; }
.sources { font-size: 14px; color: var(--dim); padding-left: 20px; }
.sources li { margin-bottom: 8px; }
.sources a { display: inline-flex; align-items: center; min-height: 44px; }

/* 더보기 격자 */
.grid-more { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 8px; }
.grid-more a { display: flex; align-items: center; min-height: 56px; padding: 0 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; font-weight: 700; }
.grid-more a:hover { text-decoration: underline; }

/* 쿠팡 칸(스위치 COUPANG_ENABLED, 기본 끔) — 본문 사이 고정 칸, 플로팅 금지 */
.cpn { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-top: 44px; background: var(--surface); }
.cpn__h { font-weight: 700; margin: 0; }
.cpn__d { color: var(--dim); font-size: 13px; margin: 0 0 8px; }
.cpn__l { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cpn__i { display: flex; gap: 12px; align-items: center; }
.cpn__a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.cpn__n { margin: 0; color: var(--dim); font-size: 14px; }
.cpn__b { width: 100%; border: 0; }

/* 발 — 틀은 fb.css 의 .fb-foot. 소개·방침·약관은 여기에만 */

/* 모바일 하단 탭바 5칸 — 홈·지도·수영장·바다·더보기. 순수 링크, JS 없음 */
.tabbar { display: none; }
@media (max-width: 720px) {
  .nav { display: none; }
  h1 { font-size: 24px; }
  .hero-next .big { font-size: 34px; }
  .lane { grid-template-columns: minmax(0, 1fr); }
  .axis { grid-template-columns: minmax(0, 1fr); }
  .axis > :first-child { display: none; }
  .axis--solo > :first-child { display: block; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .map { height: 320px; }
  .btn--primary.wide-sm { width: 100%; }
  /* 탭바 생김새는 fb 탭바(바닥에서 띄운 유리 알약), 칸은 이 사이트 것(DESIGN.md 예외). z 1100 = Leaflet 단추(1000)보다 위 */
  body { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    padding: 4px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--fb-glass-line); z-index: 1100;
    box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 55%, transparent), var(--fb-shadow); }
  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .tabbar { background: var(--fb-glass); -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%); }
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 56px; border-radius: 999px; font-size: 12px; color: var(--dim); text-decoration: none; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { color: var(--ink); font-weight: 700; background: color-mix(in srgb, var(--ink) 9%, transparent); }   /* 먹색 옅은 면(비텍스트) — 글자는 ink 그대로 */
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
