:root {
  --bg: #f4f8fa;
  --card: #fff;
  --ink: #12303b;
  --sub: #5b7480;
  --line: #d9e5ea;
  --brand: #0b4f6c;
  --brand-ink: #fff;
  --lv1: #c0392b;
  --lv2: #e67e22;
  --lv3: #d4a017;
  --lv4: #2e9c6a;
  --lv5: #0b7fb5;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { font-size: 17px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  line-height: 1.55;
}
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.top { background: var(--brand); color: var(--brand-ink); }
.bar { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; color: inherit; text-decoration: none; }
.tag { font-size: .8rem; opacity: .8; }

.hero { padding: 28px 0 12px; }
.hero h1 { margin: 0 0 4px; font-size: 1.8rem; }
.hero p { margin: 0; color: var(--sub); }

.controls { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0 12px; }
.seg { display: inline-flex; background: #e3edf1; border-radius: 12px; padding: 4px; }
.seg button {
  border: 0; background: none; font: inherit; font-weight: 700; color: var(--sub);
  padding: 10px 22px; border-radius: 9px; cursor: pointer; min-height: 44px;
}
.seg button.on { background: var(--brand); color: #fff; }
.search { flex: 1 1 220px; }
.search input {
  width: 100%; min-height: 52px; padding: 0 16px; font: inherit;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
}
:focus-visible { outline: 3px solid #4aa8d8; outline-offset: 2px; }

.days { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; }
.days button {
  flex: 0 0 auto; min-width: 64px; min-height: 56px; padding: 6px 12px; font: inherit;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; color: var(--ink);
}
.days button small { display: block; color: var(--sub); font-size: .75rem; }
.days button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.days button.on small { color: #cfe6f0; }

.status { min-height: 1.5em; color: var(--sub); font-size: .9rem; margin: 4px 0 8px; }
.status .badge { background: #fff3cd; color: #7a5b00; padding: 2px 8px; border-radius: 6px; font-weight: 700; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card h2 { margin: 0; font-size: 1.15rem; }
.card .region { color: var(--sub); font-size: .85rem; }
.card .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.score {
  flex: 0 0 auto; text-align: center; min-width: 64px; padding: 6px 10px; border-radius: 12px;
  color: #fff; font-weight: 800; line-height: 1.15;
}
.score b { display: block; font-size: 1.5rem; }
.score span { font-size: .72rem; font-weight: 700; }
.lv1 { background: var(--lv1); } .lv2 { background: var(--lv2); } .lv3 { background: var(--lv3); }
.lv4 { background: var(--lv4); } .lv5 { background: var(--lv5); }
.nolv { background: #8a9ba3; }

.half { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.half-head { display: flex; align-items: center; gap: 8px; }
.half-head .tide { margin-left: auto; color: var(--sub); font-size: .85rem; }
.pill { color: #fff; font-size: .8rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.sp span { display: inline-flex; align-items: center; gap: 5px; }
.sp i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0; text-align: center; }
.meta div { background: #f1f6f8; border-radius: 10px; padding: 6px 2px; }
.meta small { display: block; color: var(--sub); font-size: .72rem; }
.meta strong { font-size: .8rem; white-space: nowrap; }
.sp { display: flex; flex-wrap: wrap; gap: 6px; }
.sp span { background: #e8f3f8; color: var(--brand); font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }

.empty { grid-column: 1 / -1; text-align: center; color: var(--sub); padding: 40px 0; }

.legend { margin: 28px 0; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.legend ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.legend li { display: flex; align-items: center; gap: 6px; font-size: .9rem; }
.legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }

.foot { border-top: 1px solid var(--line); padding: 20px 0 36px; color: var(--sub); font-size: .82rem; }
.foot p { margin: 4px 0; }

.menu { background: #fff; border-bottom: 1px solid var(--line); }
.menu .wrap { display: flex; gap: 4px; overflow-x: auto; }
.menu a {
  flex: 0 0 auto; padding: 14px 14px; color: var(--sub); text-decoration: none; font-weight: 700;
  border-bottom: 3px solid transparent; white-space: nowrap;
}
.menu a.on { color: var(--brand); border-bottom-color: var(--brand); }
.menu a:hover { color: var(--brand); }

.sub { font-size: 1.15rem; margin: 26px 0 10px; }
h3.sub { font-size: 1rem; margin: 20px 0 8px; }
.note { color: var(--sub); font-size: .85rem; margin: 10px 0 20px; }
.note a, .hero a, table.fc a { color: var(--brand); }
.others h2 small, table.fc th small { color: var(--sub); font-weight: 400; font-size: .8rem; }
table.fc td small { color: var(--sub); }
table.fc td.tl { text-align: left; }
.tt { display: inline-block; margin-right: 12px; font-weight: 700; }
.tt small { font-weight: 400; }
table.sea th { text-align: left; }
.chart { margin: 0 0 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart text { font-size: 11px; fill: var(--sub); }
.chart .g { stroke: var(--line); stroke-width: 1; }
.chart .ln { fill: none; stroke: var(--lv5); stroke-width: 2.5; }
.chart .hi { fill: var(--lv5); }
.chart .lo { fill: #fff; stroke: var(--lv5); stroke-width: 2; }
.chart figcaption { color: var(--sub); font-size: .8rem; text-align: center; margin-top: 4px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.stats div { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stats small { display: block; color: var(--sub); font-size: .8rem; }
.stats strong { font-size: 1.25rem; }
.warn { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 18px 4px; }
.warn h3 { font-size: .95rem; margin: 14px 0 4px; }
.warn ul { margin: 0; padding-left: 20px; }

.foot-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; }
.foot-nav a, .crumb a { color: var(--brand); }
.card h2 a { color: inherit; text-decoration: none; }
.card h2 a:hover { text-decoration: underline; }

.crumb { padding-top: 18px; color: var(--sub); font-size: .88rem; }
.tablewrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table.fc { border-collapse: collapse; width: 100%; font-size: .9rem; white-space: nowrap; }
table.fc th, table.fc td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: center; }
table.fc thead th { background: #eef4f7; color: var(--sub); font-size: .8rem; }
table.fc tbody th { text-align: left; }
table.fc td.fish { text-align: left; white-space: normal; min-width: 260px; color: var(--sub); font-size: .85rem; }
table.fc tbody tr:last-child th, table.fc tbody tr:last-child td { border-bottom: 0; }
.others h2 { font-size: 1.1rem; margin: 0 0 10px; }
.others .links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.others .links a {
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px;
  color: var(--brand); text-decoration: none; font-size: .9rem;
}
.doc { max-width: 760px; padding: 28px 0 36px; }
.doc h1 { font-size: 1.7rem; margin: 0 0 12px; }
.doc h2 { font-size: 1.15rem; margin: 28px 0 8px; }
.doc a { color: var(--brand); }
.doc li { margin: 4px 0; }

@media (max-width: 520px) {
  html { font-size: 16px; }
  .hero h1 { font-size: 1.5rem; }
  .tag { display: none; }
}
