@charset "UTF-8";

:root {
  color-scheme: light;
  --paper: #fffdf5;
  --ink: #20211e;
  --muted: #63645c;
  --rule: #c9c7bb;
  --page: 1120px;
  --entry-columns: minmax(0, 1fr) 44px 68px;
  --entry-gap: 12px;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-variant-numeric: tabular-nums;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: 16px; line-height: 1.6; }
h1, h2, p, dl, dd, ul { margin: 0; }
h1, h2, p, dd, .member-name { word-break: keep-all; overflow-wrap: anywhere; }
button, input, select { font: inherit; color: inherit; border-radius: 0; }
button, a, input, select { touch-action: manipulation; }
button, select { cursor: pointer; }
button { min-width: 44px; min-height: 44px; border: 1px solid var(--ink); padding: 9px 13px; background: transparent; }
button:disabled { cursor: default; color: var(--muted); }
a { color: inherit; text-underline-offset: .2em; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.masthead, .receipt, footer { width: calc(100% - 36px); max-width: var(--page); margin-inline: auto; }
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
  padding: 16px 0 12px;
  border-bottom: 1px solid var(--ink);
}
.brand { display: inline-flex; align-items: center; min-height: 44px; font-size: 27px; font-weight: 800; line-height: 1; letter-spacing: -.06em; text-decoration: none; }
.edition-label { font-size: 12px; line-height: 1.5; color: var(--muted); }
.receipt { padding: 26px 0 36px; }
.receipt > *, .controls > *, .search-controls > *, .bill-sheet > * { min-width: 0; }
.page-heading { margin-bottom: 23px; }
.eyebrow { font-size: 11px; font-weight: 700; line-height: 1.6; letter-spacing: .07em; margin-bottom: 8px; }
.page-heading h1 { font-size: 30px; line-height: 1.25; letter-spacing: -.05em; font-weight: 800; }
.intro { max-width: 60ch; margin-top: 12px; color: var(--muted); font-size: 15px; line-height: 1.7; }

.controls { padding-bottom: 24px; }
.controls label, .search-controls label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 700; line-height: 1.6; }
select {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 10px 32px 10px 11px;
  border: 1px solid var(--ink);
  background-color: var(--paper);
  font-size: 16px;
  line-height: 1.5;
}

.bill-sheet { margin-top: 24px; border-top: 2px solid var(--ink); padding-top: 21px; }
#bill-title { font-size: 28px; line-height: 1.35; font-weight: 800; letter-spacing: -.045em; }
.bill-meta { margin-top: 17px; }
.bill-meta dl, dl.bill-meta { display: grid; gap: 9px 24px; }
.bill-meta dl > div, dl.bill-meta > div { display: grid; grid-template-columns: 4.7em minmax(0, 1fr); gap: 9px; align-items: baseline; min-width: 0; }
.bill-meta dt { color: var(--muted); font-size: 12px; line-height: 1.65; }
.bill-meta dd { font-size: 14px; line-height: 1.65; }
.tally-strip { margin-top: 20px; padding: 12px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.tally-strip dl, dl.tally-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tally-strip dt { color: var(--muted); font-size: 12px; line-height: 1.6; }
.tally-strip dd { font-size: 20px; line-height: 1.5; font-weight: 700; }
.participation-note { margin-top: 14px; max-width: 70ch; font-size: 14px; line-height: 1.7; }
.source-actions { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 10px; }
.source-actions a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; max-width: 100%; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }

.search-controls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--ink); }
.input-line { display: grid; grid-template-columns: minmax(0, 1fr) 72px; align-items: stretch; border: 1px solid var(--ink); }
#name-query { width: 100%; max-width: 100%; min-width: 0; min-height: 48px; padding: 10px 11px; border: 0; background: transparent; font-size: 16px; line-height: 1.5; }
#name-query::placeholder { color: var(--muted); opacity: 1; }
#clear-query { min-width: 0; min-height: 48px; border: 0; border-left: 1px solid var(--rule); padding: 8px 6px; font-size: 14px; line-height: 1.5; }

.directory { margin-top: 22px; }
#result-count { margin-bottom: 13px; font-size: 14px; font-weight: 700; line-height: 1.7; }
.list-legend { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 9px 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); }
.legend-row, .member-row { display: grid; grid-template-columns: var(--entry-columns); column-gap: var(--entry-gap); align-items: center; min-width: 0; }
.legend-row { color: var(--muted); font-size: 11px; line-height: 1.6; }
.legend-row:nth-child(n+2) { display: none; }
.legend-row > span:nth-child(2), .legend-row > span:nth-child(3) { text-align: center; }
.member-list { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 24px; padding: 0; list-style: none; border-bottom: 1px solid var(--ink); }
.member-row { min-height: 52px; padding: 3px 0; border-bottom: 1px solid var(--rule); }
.member-name { min-width: 0; font-size: 16px; line-height: 1.5; font-weight: 600; }
.member-name mark { background: transparent; color: inherit; font-weight: inherit; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .2em; }
.vote { min-width: 0; font-size: 13px; line-height: 1.5; font-weight: 600; text-align: center; }
.member-link { display: flex; align-items: center; justify-content: center; justify-self: stretch; min-width: 0; min-height: 44px; padding: 6px 2px; font-size: 12px; line-height: 1.5; text-align: center; overflow-wrap: anywhere; }
.empty-state { padding: 28px 0; border-bottom: 1px solid var(--ink); }
.empty-state p { max-width: 52ch; font-size: 15px; line-height: 1.7; }
.empty-state button { margin-top: 13px; }
.reading-note { margin-top: 26px; padding-top: 8px; border-top: 1px solid var(--rule); font-size: 14px; line-height: 1.75; }
.reading-note summary { min-height: 44px; padding: 9px 0; cursor: pointer; font-weight: 700; }
.reading-note p, .reading-note ul { margin: 10px 0; }
.reading-note ul { padding-left: 19px; }
.reading-note a { display: inline-block; min-height: 44px; padding-block: 9px; overflow-wrap: anywhere; }
footer { padding: 17px 0 24px; border-top: 1px solid var(--ink); font-size: 12px; line-height: 1.75; color: var(--muted); overflow-wrap: anywhere; }
footer a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; }

@media (min-width: 600px) {
  .masthead, .receipt, footer { width: calc(100% - 56px); }
  .receipt { padding-top: 32px; }
  .page-heading h1 { font-size: 34px; }
  .intro { font-size: 16px; }
  .bill-meta dl, dl.bill-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-controls { grid-template-columns: minmax(0, 1fr) 160px; gap: 24px; align-items: end; }
}

@media (min-width: 900px) {
  .list-legend, .member-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .legend-row:nth-child(n+2) { display: grid; }
}

@media print {
  .controls, .search-controls { display: none; }
  .masthead, .receipt, footer { width: 100%; }
  .member-row { break-inside: avoid; }
}

.skip-link { position: absolute; top: 8px; left: 18px; z-index: 30; background: var(--ink); color: var(--paper); padding: 10px 14px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.site-nav { display: flex; flex-wrap: wrap; gap: 2px 18px; min-width: 0; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; line-height: 1.5; text-decoration: none; }
.site-nav a[aria-current="page"] { font-weight: 800; text-decoration: underline; text-decoration-thickness: 2px; }
.route-note, .load-state { font-size: 14px; line-height: 1.75; overflow-wrap: anywhere; }
.route-note { padding: 10px 0; border-block: 1px solid var(--rule); margin-bottom: 14px; }
.load-state:not(:empty) { margin-block: 10px 16px; }
#retry-load { margin-bottom: 20px; }
noscript p { margin-top: 24px; }
@media (max-width: 420px) { .masthead { gap: 0 12px; } .site-nav { gap: 2px 14px; } .page-heading { margin-bottom: 18px; } .controls { padding-bottom: 10px; } .search-controls { margin-top: 12px; padding-top: 16px; } }
@media print { .site-nav, .skip-link, #retry-load { display: none; } }
