:root {
  --bg: #fbfbf8;
  --fg: #1d2327;
  --muted: #566069;
  --line: #cfd6dc;
  --panel: #ffffff;
  --accent: #1a5fb4;
  --notice-bg: #eef4fb;
  --warn-bg: #fff1cc;
  --warn-line: #8a5a00;
  --focus: #0b57d0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181c;
    --fg: #e8ecef;
    --muted: #a9b3bb;
    --line: #38424b;
    --panel: #1c2227;
    --accent: #8ab4f8;
    --notice-bg: #1b2733;
    --warn-bg: #4d3b0d;
    --warn-line: #ffd479;
    --focus: #8ab4f8;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans KR", "Malgun Gothic", sans-serif;
  line-height: 1.65;
}

/* 한글 낱말은 중간에서 줄을 바꾸지 않고(keep-all), 공백 없는 긴 토큰만 넘치기 전에 꺾는다. */
body, p, li, dt, dd, h1, h2, h3, legend, label, caption, button {
  word-break: keep-all;
  overflow-wrap: anywhere;
}
td, th {
  word-break: keep-all;
  overflow-wrap: break-word;
}

[hidden] { display: none !important; }

.site-head, main, .site-foot {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-head { padding-top: 1.25rem; }
.site-foot { padding-bottom: 2.5rem; color: var(--muted); font-size: 0.9rem; }

h1 { font-size: 1.5rem; line-height: 1.3; margin: 0 0 0.4rem; }
h2 { font-size: 1.2rem; margin: 0 0 0.6rem; }

p { margin: 0.5rem 0; }
.lead { color: var(--muted); margin-top: 0; }
.hint { color: var(--muted); font-size: 0.92rem; }
.sub { color: var(--muted); font-size: 0.85rem; }
.count { margin: 0.4rem 0; }

a { color: var(--accent); text-underline-offset: 0.15em; }
/* 문장 밖에 홀로 선 링크 — 폰에서 누르는 높이 44px 이상. */
.solo-link { margin: 0; }
.solo-link > a, .lead > a { display: inline-block; min-height: 44px; padding: 0.55rem 0; line-height: 1.5; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, .chip:focus-within, .table-wrap:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.notice, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  margin: 1rem 0;
}
.notice { background: var(--notice-bg); }
.notice h2 { font-size: 1.05rem; }

.parking {
  display: inline-block;
  margin: 0.3rem 0 0;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
}

.center-status { list-style: none; margin: 0; padding: 0; }
.center-status li { padding: 0.25rem 0; }
.stale {
  margin: 0.6rem 0 0;
  padding: 0.5rem 0.8rem;
  background: var(--warn-bg);
  border: 2px dashed var(--warn-line);
  border-radius: 6px;
  font-weight: 600;
}

.field { margin: 0.9rem 0; border: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { display: block; font-weight: 600; margin-bottom: 0.25rem; padding: 0; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0 1rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  cursor: pointer;
}
.chip:has(input:checked) { border: 2px solid var(--accent); font-weight: 700; }
input[type="checkbox"] { width: 1.4rem; height: 1.4rem; flex: none; margin: 0; }

select, input[type="number"] {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  padding: 0.5rem 0.7rem;
  font: inherit;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.9rem 0 0.4rem; }
button {
  min-height: 44px;
  min-width: 44px;
  padding: 0.5rem 1rem;
  font: inherit;
  font-weight: 600;
  color: var(--fg);
  background: var(--bg);
  border: 2px solid var(--accent);
  border-radius: 6px;
  cursor: pointer;
}

.badge { display: inline-block; font-size: 0.82rem; font-weight: 700; padding: 0 0.5rem; border: 1px dashed currentColor; border-radius: 999px; color: var(--warn-line); }

.table-wrap { max-width: 100%; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
caption { text-align: left; font-weight: 600; padding: 0.3rem 0; }
th, td { border: 1px solid var(--line); padding: 0.4rem 0.6rem; text-align: left; vertical-align: top; }
th { background: var(--notice-bg); white-space: nowrap; }
td a { display: inline-block; min-width: 44px; min-height: 44px; padding: 0.55rem 0; line-height: 1.5; white-space: nowrap; }
.source-links { margin: 0.2rem 0 0.6rem; padding-left: 1.2rem; }
.source-links a { display: inline-block; min-height: 44px; padding: 0.55rem 0; line-height: 1.5; }
.scroll-hint { display: none; margin: 0.2rem 0; font-size: 0.85rem; }
.table-wrap {
  background:
    linear-gradient(to right, var(--bg), var(--bg)) left / 1.5rem 100% no-repeat local,
    linear-gradient(to left, var(--bg), var(--bg)) right / 1.5rem 100% no-repeat local,
    linear-gradient(to right, rgba(0, 0, 0, 0.25), transparent) left / 0.8rem 100% no-repeat scroll,
    linear-gradient(to left, rgba(0, 0, 0, 0.25), transparent) right / 0.8rem 100% no-repeat scroll;
}

ol { padding-left: 1.4rem; }
ol li { margin: 0.4rem 0; }

@media (max-width: 30rem) {
  h1 { font-size: 1.3rem; }
  .scroll-hint { display: block; }
  .actions button { flex: 1 1 100%; }
}
