:root { color-scheme: light dark; --bg: #fafaf8; --fg: #242424; --muted: #595959; --line: #bdbdb6; --surface: #f0f0eb; --link: #313f50; --icon: #3a4a5e; }
* { box-sizing: border-box; }
html { font: 18px/1.75 system-ui, sans-serif; }
body { margin: 0; background: var(--bg); color: var(--fg); overflow-wrap: anywhere; }
header, main, footer { max-width: 64rem; margin: auto; padding: 1.2rem; }
header { border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: .7rem; }
header > a { font-weight: 750; text-decoration: none; }
nav { display: flex; gap: .4rem 1rem; flex-wrap: wrap; }
nav a { display: inline-flex; align-items: center; text-decoration: none; }
nav a:hover { text-decoration: underline; }
nav a, button, select { min-height: 44px; }
a { color: var(--link); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
h1 { font-size: 1.9rem; line-height: 1.4; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; margin: .3rem 0; }
button, input, select { font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: .3rem; padding: .5rem .8rem; }
button { cursor: pointer; }
button:hover { background: var(--surface); }
input, select, label { display: block; width: 100%; }
input, select { margin: .3rem 0 1rem; }
:focus-visible { outline: 3px solid var(--fg); outline-offset: 3px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -10000px; }
.skip:focus { position: static; display: block; padding: .8rem; }
.election { text-align: center; padding: .8rem; border-bottom: 2px solid var(--fg); background: var(--surface); }
.sample { text-align: center; padding: .9rem 1.2rem; background: var(--fg); color: var(--bg); font-weight: 700; }
.intro { font-size: 1.15rem; }
.collection-stats { padding: .8rem; background: var(--surface); border-radius: .5rem; }
.cards { display: grid; grid-template-columns: 1fr; gap: 1rem; padding: 0; list-style: none; }
.card { border: 1px solid var(--line); padding: 1.1rem; border-radius: .6rem; display: flex; align-items: center; gap: 1rem; }
.card p { margin: .4rem 0 0; }
.card h2 { margin: 0; }
.records { list-style: none; padding: 0; }
.records > li { border: 1px solid var(--line); border-radius: .6rem; padding: 1rem; margin-bottom: 1rem; background: var(--bg); }
.records time { display: block; font-size: .85rem; margin-bottom: .35rem; }
.records .src { display: block; width: fit-content; margin: .8rem 0 0 auto; }
.record-kind { font-weight: 650; }
.records .records { padding-left: 1rem; }
time, .empty { color: var(--muted); }
dt { font-weight: 650; }
dd { margin: 0 0 .6rem; }
.original, blockquote { white-space: pre-wrap; }
blockquote { margin: .7rem 0; border-left: 3px solid var(--line); padding-left: 1rem; }
.portrait { width: 96px; height: 120px; object-fit: cover; border-radius: .6rem; flex-shrink: 0; }
.portrait.small { width: 48px; height: 60px; }
.member-header { display: flex; flex-direction: column; gap: 1.2rem; align-items: flex-start; }
.member-info { min-width: 0; }
.member-info h1 { margin-top: 0; }
.member-info dl { margin-bottom: 0; }
.vote-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.vote-count { padding: .7rem .2rem; text-align: center; border: 1px solid var(--line); border-radius: .5rem; background: var(--surface); }
.vote-count span, .vote-count strong { display: block; }
.vote-count strong { font-size: clamp(.85rem, 4vw, 1.25rem); font-variant-numeric: tabular-nums; white-space: nowrap; overflow-wrap: normal; }
.vote-summary > p { color: var(--muted); font-size: .9rem; }
details { border: 1px solid var(--line); padding: .8rem; margin: 1rem 0; }
summary { cursor: pointer; }
[role="tablist"] { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 2rem; }
[role="tab"] { border-radius: .5rem; border: 2px solid var(--line); }
[role="tab"][aria-selected="true"] { border: 2px solid var(--fg); font-weight: 700; background: var(--surface); }
section { margin: 1.8rem 0; }
.pledge-facts { margin: .8rem 0; }
.pledge-facts h4 { margin: .8rem 0 .3rem; font-size: 1rem; }
.region-list { padding-left: 1.2rem; }
.social a { margin-right: .8rem; }
.feedback, footer { border-top: 1px solid var(--line); }
footer { margin-top: 2rem; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } dl { display: grid; grid-template-columns: 8rem 1fr; gap: .4rem 1rem; } .member-header { flex-direction: row; } }
@media (min-width: 900px) { header { flex-direction: row; align-items: center; justify-content: space-between; } }
@media (prefers-color-scheme: dark) { :root { --bg: #191b1c; --fg: #ededeb; --muted: #c0c0ba; --line: #676b6b; --surface: #292c2d; --link: #d0dbe4; --icon: #b7c8da; } }

/* ===== 지도 화면 ===== */
#map-app { margin-top: 0; }
.map-bar { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.map-bar p { margin: 0; font-weight: 700; }
.map-layout { display: flex; flex-direction: column; gap: 1rem; }
.map-box { width: 100%; display: flex; justify-content: center; }
/* 첫 화면 높이 안에 들어오도록 vh 기준 */
.map-box svg { width: 100%; height: auto; max-height: 44vh; display: block; }
.region { stroke: var(--bg); stroke-width: .6px; vector-effect: non-scaling-stroke; stroke-linejoin: round; cursor: pointer; transition: stroke-width .15s; }
.region:hover { stroke-width: 1.2px; }
.region[aria-current="true"] { stroke: var(--fg); stroke-width: 1.6px; }
.region.city-hit { stroke: var(--fg); stroke-width: 2px; }
.inset-frame { fill: none; stroke: var(--line); stroke-width: .8; pointer-events: none; }
.inset-label { fill: var(--muted); font-size: 9px; pointer-events: none; }
.legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: .8rem 0; font-size: .9rem; }
.legend-item { display: inline-flex; align-items: center; gap: .4rem; }
.legend-box { display: inline-block; width: 1rem; height: 1rem; border: 1px solid var(--line); border-radius: .2rem; }
#sound-toggle { width: auto; }

/* 인물 띠: 모바일에서는 아래에서 올라오는 시트 */
/* 처음에는 낮게(약 46vh) 떠서 지도가 대부분 보이게 하고, 손잡이를 눌러야 80vh 까지 펼쳐진다 */
.people { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; max-height: 46vh; overflow: auto; background: var(--bg); border-top: 2px solid var(--fg); transform: translateY(100%); visibility: hidden; transition: transform .25s, visibility 0s .25s; }
.people.open { transform: translateY(0); visibility: visible; transition: transform .25s, visibility 0s; }
.people.expanded { max-height: 80vh; }
.people-grip { position: sticky; top: 0; z-index: 1; display: block; width: 100%; min-height: 44px; margin: 0; padding: .5rem 0 .3rem; border: 0; border-radius: 0; background: var(--bg); cursor: pointer; touch-action: none; }
.people-grip-bar { display: block; width: 3rem; height: .3rem; margin: 0 auto; border-radius: .2rem; background: var(--line); }
/* 시트 안 '먼저 볼 것' 칩은 한 줄로 가로 넘김 (줄바꿈하면 카드가 시트 밖으로 밀린다) */
@media (max-width: 899px) {
  .people .chips { flex-wrap: nowrap; overflow-x: auto; padding: .2rem .9rem .5rem; }
  .people .chip { flex: 0 0 auto; }
  .people .chips-label { flex: 0 0 auto; width: auto; white-space: nowrap; }
}
.people .people-head { max-width: none; margin: 0; padding: .4rem 1rem; flex-direction: row; align-items: center; justify-content: space-between; }
.people-head h2 { margin: 0; font-size: 1.15rem; min-width: 0; flex: 1 1 auto; }
.people-head button { white-space: nowrap; flex: none; }
.people > p { margin: 0; padding: 0 1rem; }
/* scroll-padding 이 없으면 카드가 화면 왼쪽 끝에 붙어 멈춘다 */
.strip { display: flex; gap: .8rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 1rem; list-style: none; margin: 0; padding: .5rem 1rem 1rem; }
.strip.dragging { cursor: grabbing; user-select: none; }
.strip.gu-mode { flex-wrap: wrap; overflow-x: visible; scroll-snap-type: none; }
.gu-item { list-style: none; }
.gu-choice { min-height: 44px; padding: .4rem .9rem; }

/* 인물 카드: 모바일 폭의 약 88%, 옆 카드가 살짝 보인다 */
#people-strip .strip-card { display: block; flex: 0 0 auto; gap: 0; width: 88vw; max-width: 420px; min-width: 0; scroll-snap-align: start; padding: 0 0 .4rem; border-radius: .6rem; background: var(--surface); overflow: hidden; }
#people-strip .top-band { height: 14px; background: var(--line); }
.card-head { padding: .7rem .9rem 0; }
.card-name { font-size: 1.6rem; font-weight: 750; line-height: 1.3; margin: 0; }
.card-meta { font-size: .9rem; color: var(--muted); margin: .2rem 0 0; }
/* .card p 의 여백 규칙보다 앞서도록 .strip-card 를 붙인다 (안 붙이면 글자가 카드 왼쪽 끝에 붙는다) */
.strip-card .card-name { margin: 0; }
.strip-card .card-meta { margin: .2rem 0 0; }
.strip-card .card-summary { margin: .5rem .9rem 0; font-size: .95rem; }
.cells { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding: .7rem .9rem; }
.cells > * { min-width: 0; }
.cell-btn { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; width: 100%; min-height: 44px; text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: .5rem; padding: .5rem .6rem; line-height: 1.35; }
.cell-btn[aria-expanded="true"] { border: 2px solid var(--fg); background: var(--surface); }
.cell-icon { width: 24px; height: 24px; fill: none; stroke: var(--icon); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cell-label { font-size: .85rem; font-weight: 650; color: var(--muted); }
.cell-value { font-size: 1.35rem; font-weight: 750; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cell-value.long { font-size: 1.1rem; line-height: 1.6; word-break: keep-all; }
.cell-value.xlong { font-size: .95rem; line-height: 1.8; word-break: keep-all; }
.cell-state { font-size: .8rem; color: var(--muted); }
.cell-note { font-size: .8rem; color: var(--muted); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-panel { margin: 0 .9rem; padding: .6rem 0 .2rem; border-top: 1px solid var(--line); }
.panel-title { font-size: 1rem; margin: 0 0 .3rem; }
.cell-text { margin: 0 0 .4rem; font-size: .95rem; }
.pledge-area { margin: 0; }
.pledge-titles { display: flex; gap: .5rem; overflow-x: auto; list-style: none; margin: 0; padding: 0 0 .5rem; scroll-snap-type: x proximity; }
.pledge-titles li { flex: 0 0 auto; scroll-snap-align: start; }
.pledge-title { min-height: 44px; white-space: nowrap; }
.pledge-title[aria-pressed="true"] { border: 2px solid var(--fg); font-weight: 700; background: var(--surface); }
.pledge-body-area time { display: block; font-size: .85rem; font-variant-numeric: tabular-nums; }
.pledge-heading { margin: .5rem 0 .2rem; font-size: 1.05rem; }
.pledge-body-area blockquote { font-size: .95rem; }
.muted { color: var(--muted); }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .6rem; padding: .4rem .9rem 0; }
.card-btn { min-height: 44px; }
.full-link, .source-link { display: inline-flex; align-items: center; min-height: 44px; margin-right: 1rem; }
.strip-card .card-line { display: flex; flex-wrap: wrap; gap: .2rem .9rem; margin: .2rem .9rem 0; font-size: .85rem; color: var(--muted); }
.card-line a { color: var(--link); }
.strip-card .card-status { min-height: 1.4em; margin: 0 .9rem; font-size: .85rem; }
.strip-card .cell-text { margin: 0 0 .4rem; }
.pledge-body-area .gloss-wrap, .cell-text .gloss-wrap, .card-summary .gloss-wrap, blockquote .gloss-wrap { white-space: normal; }

/* 낱말 풀이: 밑줄 단추와 짧은 말풍선 */
.gloss-wrap { position: relative; display: inline; }
button.gloss { display: inline; min-height: 0; width: auto; margin: 0; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: .2em; }
button.gloss:hover { background: transparent; }
.gloss-tip { position: absolute; left: 0; top: 100%; z-index: 30; width: max-content; max-width: min(18rem, 80vw); margin-top: .3rem; padding: .4rem .6rem; background: var(--bg); color: var(--fg); border: 1px solid var(--fg); border-radius: .4rem; font-size: .9rem; line-height: 1.5; text-align: left; white-space: normal; }

/* 먼저 볼 것 칩 */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .3rem .9rem .6rem; }
.chips-label { width: 100%; font-size: .85rem; color: var(--muted); }
.chip { min-height: 44px; border-radius: 999px; padding: .3rem .9rem; font-size: .9rem; }
.chip[aria-pressed="true"] { border: 2px solid var(--fg); font-weight: 700; background: var(--surface); }

/* 묻는 창: 화면 아래에서 올라온다 */
.ask { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; max-height: 40vh; overflow: auto; background: var(--bg); border-top: 2px solid var(--fg); padding: 1rem 1rem 1.2rem; animation: ask-up .25s ease-out; }
.ask-title { margin: 0 0 .4rem; font-weight: 700; }
.ask .chips { padding: 0 0 .5rem; }
.ask-close { min-height: 44px; }
@keyframes ask-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

.reduce-motion .region, .reduce-motion .people, .reduce-motion .people.open { transition: none; }
.reduce-motion .ask { animation: none; }

/* 첫 화면: 소개 → 지역 찾기 → 지도. 좁은 화면 메뉴는 가로 스크롤 */
body[data-page="index"] header { padding: .5rem .9rem; gap: .4rem; }
body[data-page="index"] header nav { flex-wrap: nowrap; overflow-x: auto; gap: .2rem .8rem; font-size: .95rem; }
body[data-page="index"] header nav a { white-space: nowrap; }
body[data-page="index"] main { display: flex; flex-direction: column; }
body[data-page="index"] main > h1 { order: 0; font-size: 1.4rem; margin: .2rem 0 .5rem; }
body[data-page="index"] #map-app { order: 2; }
body[data-page="index"] .intro { order: 1; font-size: 1rem; margin: 0 0 .8rem; }
body[data-page="index"] .feedback { order: 3; }

@media (min-width: 900px) {
  /* PC: 왼쪽에 지도, 오른쪽에 지역 찾기·범례·인물. 지도 전체가 첫 화면에 들어오게 높이를 화면에 맞춘다 */
  #map-app { display: grid; grid-template-columns: minmax(0, 56%) minmax(0, 1fr); column-gap: 1.5rem; align-items: start; }
  .map-layout { display: contents; }
  #map-app { grid-template-rows: repeat(8, auto) 1fr; }
  #map-app > label, #map-app > input, #map-app > .map-bar, #map-app > #address-search, #map-app > #address-status, #map-app > #address-results, .map-side { grid-column: 2; min-width: 0; }
  /* 지도 높이는 마지막 1fr 줄이 받는다(오른쪽 칸 사이가 벌어지지 않게) */
  .map-box { grid-column: 1; grid-row: 1 / span 9; position: sticky; top: .5rem; }
  .map-box svg { max-height: calc(100vh - 13.5rem); min-height: 320px; }
  .people { position: static; flex: 1 1 40%; min-width: 0; max-height: none; overflow: visible; transform: none; visibility: visible; border-top: 0; border-left: 1px solid var(--line); transition: none; }
  #people-close { display: none; }
  .people-grip { display: none; }
  .people.expanded { max-height: none; }
  #people-strip .strip-card { width: 300px; max-width: 300px; }
  .ask { left: auto; right: 1rem; bottom: 1rem; width: 22rem; border: 1px solid var(--fg); border-radius: .6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .region, .people, .people.open { transition: none; }
  .ask { animation: none; }
}
footer a { display: inline-flex; align-items: center; min-height: 44px; }

/* ===== 지도 화면 다듬기: 중립 회색·흰 바탕, 정당색은 얇은 포인트만, 둥근 모서리, 그림자 최소 ===== */
:root { --soft: #f0f0ee; --soft-line: #e4e4e1; --radius: .9rem; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --soft: #242727; --soft-line: #3a3e3e; } }
:root[data-theme="dark"] { --soft: #242727; --soft-line: #3a3e3e; }
/* 포커스 사각형은 키보드로 움직일 때만 */
.region:focus { outline: none; }
.region:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
/* 칩·작은 버튼: 테두리 대신 부드러운 배경 */
.chip, .card-btn, .cell-btn, .gu-choice, .src-toggle { border: 0; background: var(--soft); border-radius: 999px; box-shadow: none; }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border: 0; }
.card-btn, .card-quiet { font-size: .9rem; }
.card-quiet { background: none; border: 0; padding: .4rem .2rem; min-height: 44px; color: var(--muted); text-decoration: underline; text-underline-offset: .2em; }
/* 인물 카드: 부드러운 둥근 카드 */
#people-strip .strip-card { border: 0; border-radius: var(--radius); background: var(--soft); box-shadow: none; }
#people-strip .top-band { height: 6px; }
.card-head { display: flex; align-items: center; gap: .7rem; padding: .9rem .9rem 0; }
.card-head .card-name, .card-head .card-meta { margin: 0; }
.card-photo { flex: 0 0 auto; width: 3.2rem; height: 3.2rem; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); color: var(--muted); display: grid; place-items: center; font-weight: 700; font-size: 1.3rem; overflow: hidden; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.card-facts { margin: .4rem .9rem 0; font-size: .92rem; }
.card-facts-line { margin: .2rem 0; }
.card-src-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 0 .6rem .4rem .9rem; }
.card-sources { margin: 0 .9rem .6rem; font-size: .85rem; color: var(--muted); }
.card-sources[hidden] { display: none; }
.src-line { margin: .3rem 0; }
.src-toggle { margin-left: auto; }
/* 카드 아래 동작 줄: 아이콘 버튼 줄로 늘릴 수 있게 가로 줄 */
.card-foot { display: flex; flex-wrap: wrap; gap: .4rem; padding: .3rem .9rem .5rem; }
/* 묻는 창 아이콘 버튼 */
.icon-btn { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--soft); display: inline-grid; place-items: center; color: var(--fg); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
/* 시트: 그림자 없이 위만 둥글게, 바탕 스크롤이 같이 움직이지 않게 */
.people { border-top: 0; border-radius: var(--radius) var(--radius) 0 0; overscroll-behavior: contain; box-shadow: none; }
.people .people-head { padding: .3rem 1rem .5rem; }
.people-head h2 { font-size: 1.05rem; font-weight: 700; }
body.sheet-lock { overflow: hidden; }
/* 모바일: 지도는 입력칸과 같은 폭으로 꽉 채운다 (세로가 길어져도 된다). 높이 상한은 두지 않는다 */
@media (max-width: 899px) {
  .map-box { padding: 0; }
  .map-box svg { width: 100%; max-height: none; height: auto; }
}
/* 처음 방문 묻는 창: 화면을 꽉 채우는 반투명 창, 2x2 타일 (뒤 지도가 흐리게 비친다) */
.ask { position: fixed; inset: 0; z-index: 40; left: 0; right: 0; bottom: 0; top: 0; width: auto; max-height: none; overflow: auto; border: 0; border-radius: 0; padding: 1.2rem 1rem 1.6rem; background: color-mix(in srgb, var(--bg) 78%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: none; display: flex; flex-direction: column; gap: 1rem; }
.ask-top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.ask-title { margin: 0; font-size: 1.3rem; font-weight: 800; }
.ask .ask-close { background: none; border: 0; min-height: 44px; color: var(--muted); text-decoration: underline; text-underline-offset: .2em; font-size: .95rem; }
.ask-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; flex: 1 1 auto; align-content: center; }
.ask-tile { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: .6rem; min-height: 9rem; padding: 1rem; border: 0; border-radius: var(--radius); background: var(--bg); color: var(--fg); box-shadow: 0 1px 0 var(--soft-line); text-align: left; }
.ask-tile:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.ask-tile .cell-icon { width: 2rem; height: 2rem; stroke: var(--fg); }
.ask-tile-label { font-size: 1.15rem; font-weight: 800; line-height: 1.25; }
/* 지역 이름: 흰(바탕색) 외곽선을 먼저 그려 색 위에서도 읽히게. 클릭은 지나간다 */
.map-label { fill: var(--fg); stroke: var(--bg); stroke-width: .22em; paint-order: stroke; stroke-linejoin: round; font-weight: 700; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
/* 첫 화면(모바일): 위쪽 제목·검색 영역을 줄여 지도가 더 위에 오게 */
@media (max-width: 899px) {
  body[data-page="index"] header { padding: .35rem .9rem; }
  body[data-page="index"] main > h1 { font-size: 1.15rem; margin: 0 0 .3rem; }
  body[data-page="index"] #map-app > label { font-size: .9rem; margin: 0; }
  body[data-page="index"] #map-app > input { margin-top: .25rem; padding: .45rem .6rem; }
  body[data-page="index"] #map-app > .map-bar { margin: .4rem 0 0; }
  body[data-page="index"] #map-app > label + input + .map-bar { margin-top: .3rem; }
}

/* ===== 전체 다듬기 (2026-11-21): 부드러운 바탕, 알약형 메뉴, 둥근 입력칸, 흰 카드와 옅은 그림자, 그림 체계 ===== */
:root { --card: #ffffff; --radius-lg: 1.1rem; --shadow-soft: 0 2px 12px rgba(30, 30, 30, .07); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --card: #262a2b; --shadow-soft: 0 2px 12px rgba(0, 0, 0, .35); } }
:root[data-theme="dark"] { --card: #262a2b; --shadow-soft: 0 2px 12px rgba(0, 0, 0, .35); }

/* 맨 위 견본 띠: 검정 띠 대신 연한 노랑 한 줄 */
.sample, .election { background: #fff3c4; color: #5b4a12; font-size: .85rem; font-weight: 500; text-align: center; padding: .45rem .9rem; border: 0; border-radius: 0; line-height: 1.5; }

/* 글꼴 위계: 제목은 굵고 크게, 본문은 회색 톤 */
h1 { font-size: 1.55rem; font-weight: 800; letter-spacing: -.01em; }
h2 { font-weight: 750; }
p.muted, .muted, .card-meta, .card-sources, .card-line { color: var(--muted); }

/* 메뉴: 알약형 칩 */
header nav a { display: inline-flex; align-items: center; min-height: 44px; padding: .3rem .85rem; border-radius: 999px; background: var(--soft); color: var(--fg); text-decoration: none; }
header nav a:hover { background: var(--soft-line); }

/* 입력칸: 둥글고 연한 회색 바탕 */
input, select { border: 0; background: var(--soft); border-radius: .8rem; padding: .7rem .9rem; }
input:focus, select:focus { outline: 2px solid var(--line); outline-offset: 1px; }
button { border-radius: .8rem; }

/* 카드: 흰 바탕, 아주 옅은 그림자 */
.card, #people-strip .strip-card { background: var(--card); border: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); }
#people-strip .strip-card { background: var(--card); }
.card-foot { gap: .45rem; }
.card-btn { background: var(--soft); border-radius: 999px; padding: .4rem .9rem; }

/* 칸 그림(칸 제목 옆) */
.cell-icon-color { width: 1.8rem; height: 1.8rem; stroke: none; fill: none; }
.cell-icon-color path, .cell-icon-color rect, .cell-icon-color circle { stroke-linejoin: round; }

/* 묻는 창 타일: 색 틴트 배경, 큰 그림(타일 폭의 약 40%) */
.ask-tile { background: var(--card); }
.ask-pledge { background: #fff6dc; }
.ask-career { background: #e5f7f3; }
.ask-party { background: #f0ecfc; }
.ask-disclosure { background: #e8f7ec; }
.ask-tile .cell-icon-color { width: 40%; max-width: 5.2rem; height: auto; min-width: 3rem; }
.ask-tile-label { font-size: 1.3rem; }
/* ===== 나란히 보기 ===== */
.compare-view { position: fixed; inset: 0; z-index: 45; background: var(--bg); overflow-y: auto; overscroll-behavior: contain; padding: 0 0 2rem; }
.compare-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .8rem 1rem; background: var(--bg); }
.compare-title { margin: 0; font-size: 1.15rem; font-weight: 800; }
.compare-body { padding: 0 1rem; max-width: 56rem; margin: 0 auto; }
.compare-body .muted { color: var(--muted); }
.cmp-pick { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .45rem; }
.cmp-pick-btn { width: 100%; text-align: left; min-height: 44px; border: 0; background: var(--soft); border-radius: .8rem; padding: .55rem .9rem; }
.compare-search { width: 100%; }
.cmp-names { position: sticky; top: 3.4rem; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding: .5rem 0; background: var(--bg); }
.cmp-name { margin: 0; padding: .45rem .6rem; border-radius: .7rem; background: var(--soft); font-weight: 750; font-size: .95rem; }
.cmp-row { margin: .5rem 0; border-radius: var(--radius-lg); background: var(--card); box-shadow: var(--shadow-soft); }
.cmp-row-title { cursor: pointer; padding: .8rem .9rem; font-weight: 750; font-size: .95rem; min-height: 44px; list-style: none; }
.cmp-row-title::-webkit-details-marker { display: none; }
.cmp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding: 0 .6rem .7rem; }
.cmp-col { min-width: 0; display: grid; gap: .5rem; align-content: start; }
.cmp-item { background: var(--soft); border-radius: .7rem; padding: .5rem .6rem; font-size: .88rem; }
.cmp-text { margin: 0; line-height: 1.5; overflow-wrap: anywhere; }
.cmp-empty { margin: 0; color: var(--muted); font-size: .88rem; padding: .4rem .2rem; }
.compare-foot { margin: 1.2rem 0 0; color: var(--muted); font-size: .9rem; text-align: center; }
@media (min-width: 900px) {
  .cmp-cols { gap: 1rem; padding: 0 1rem 1rem; }
  .cmp-item { font-size: .95rem; }
}
/* 칩 그림 */
.chip .cell-icon-color { width: 1.2rem; height: 1.2rem; margin-right: .3rem; vertical-align: -.25rem; }
/* ===== 폰 실기기 피드백 (2026-11-21 후속) ===== */
/* 이름은 중간에서 끊지 않는다 (줄바꿈 대신 글자 축소) */
.card-name, .strip-card .card-name { white-space: nowrap; word-break: keep-all; overflow: hidden; font-size: clamp(1.2rem, 6.2vw, 1.6rem); line-height: 1.3; }
/* 네 칸: 그림은 원 안에 맞춘다, 글자는 두 줄까지 */
.cell-btn { overflow: hidden; }
.cell-btn .cell-icon-color { width: 2.2rem; height: 2.2rem; display: block; margin: 0 0 .15rem; flex: 0 0 auto; }
.cell-value, .cell-note { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.cell-value { font-size: clamp(1.05rem, 4.8vw, 1.3rem); }
/* 의원의 대표·공동발의와 네 표결 기록을 생략 없이 읽을 수 있게 한다. */
.cell-btn[data-key="career"] .cell-value { display: block; -webkit-line-clamp: unset; overflow: visible; }
.cell-note { font-size: .78rem; }
/* 공약 줄: 가로로 넘기지 않고 두 줄까지 보인다 */
.pledge-titles { display: grid; grid-template-columns: 1fr; gap: .4rem; overflow: visible; scroll-snap-type: none; list-style: none; padding: 0; margin: 0; }
.pledge-titles li { width: 100%; min-width: 0; flex: none; }
.pledge-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; text-align: left; width: 100%; font-size: .9rem; line-height: 1.5; max-height: 3em; min-height: 44px; padding-block: 0; border-width: 0; }
.pledge-title[aria-pressed="true"] { border-width: 0; box-shadow: inset 0 0 0 2px var(--fg); }
/* 시트: 위 경계가 보이게, 손잡이는 작게 */
.people { border-top: 1px solid var(--soft-line); box-shadow: 0 -8px 20px rgba(30, 30, 30, .08); transition: transform .25s, visibility 0s .25s, max-height .24s ease-out; }
.people.open { transition: transform .25s, visibility 0s, max-height .24s ease-out; }
.people.dragging { transition: none; }
.people-grip { height: 44px; min-height: 44px; padding: .3rem 0 .15rem; }
.people-grip-bar { width: 2.2rem; height: .25rem; }
/* 두 번째 사람 고르기 목록 */
.cmp-group-title { margin: 1rem 0 .3rem; font-size: .85rem; color: var(--muted); font-weight: 650; }
.cmp-person { display: grid; grid-template-columns: 2.2rem 1fr; gap: .15rem .7rem; align-items: center; width: 100%; min-height: 56px; padding: .5rem .8rem; border: 0; border-radius: .9rem; background: var(--card); box-shadow: var(--shadow-soft); text-align: left; }
.cmp-initial { grid-row: 1 / span 2; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--soft); border: 2px solid var(--line); font-weight: 700; color: var(--muted); }
.cmp-name-line { font-weight: 700; font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .4rem; font-size: .78rem; color: var(--muted); }
.cmp-party { display: inline-flex; align-items: center; gap: .3rem; padding: .08rem .5rem; border-radius: 999px; background: var(--soft); color: var(--fg); }
.cmp-dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--line); display: inline-block; }
/* 이름이 잘리지 않게: 이름은 제 폭을 지키고, 직위·지역 글은 남는 폭에서 줄바꿈 */
.card-head { align-items: center; }
.card-head .card-name { flex: 0 0 auto; max-width: 62%; }
.card-head .card-meta { flex: 1 1 0; min-width: 0; font-size: .82rem; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
/* 네 칸은 둥근 사각 카드 (알약형 아님) */
.cell-btn { border-radius: .9rem; }
/* ===== 나란히 화면 개선: 분야 행은 연한 바탕, 이름 띠는 정당색 얇은 밑줄(평가 아님), 칸마다 공약 건수 ===== */
.cmp-names .cmp-name { border-bottom: 3px solid var(--line); }
.cmp-row { background: var(--soft); border: 0; box-shadow: none; border-radius: var(--radius-lg); }
.cmp-row-title { display: grid; grid-template-columns: 1fr 1fr; gap: .15rem .5rem; align-items: baseline; }
.cmp-row-name { grid-column: 1 / -1; font-weight: 750; font-size: .95rem; }
.cmp-count { font-size: .76rem; color: var(--muted); font-weight: 500; }
.cmp-cols { background: transparent; }
.cmp-item { background: var(--card); }
.btn-icon { width: 1.05rem; height: 1.05rem; vertical-align: -.2rem; margin-right: .3rem; }

/* 메뉴 칩 아이콘 */
nav .nav-ic { width: 1.05em; height: 1.05em; margin-right: .3em; vertical-align: -.18em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
nav a { display: inline-flex; align-items: center; }

/* 첫 화면 메뉴 줄: 가로 스크롤이므로 오른쪽 끝을 옅게 지워 '더 있음'을 보여 준다 (좁은 화면만) */
@media (max-width: 899px) {
  header nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, black calc(100% - 2.2rem), transparent); mask-image: linear-gradient(to right, black calc(100% - 2.2rem), transparent); padding-right: 1.6rem; }
  header nav a { white-space: nowrap; }
}

/* 공유 시트 · 홈 화면 추가 단추 (app.js) */
.share-sheet { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); display: flex; align-items: flex-end; justify-content: center; z-index: 60; }
.share-sheet[hidden] { display: none; }
.share-box { background: var(--surface, #f0f0eb); color: inherit; width: 100%; max-width: 520px; border-radius: 1rem 1rem 0 0; padding: 1rem 1rem 1.2rem; box-shadow: 0 -6px 24px rgba(0, 0, 0, .2); }
.share-title { font-weight: 700; margin: 0 0 .6rem; }
.share-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.share-channel { min-height: 48px; border: 1px solid var(--line, #bdbdb6); border-radius: .75rem; background: var(--bg, #fafaf8); color: inherit; font: inherit; padding: .4rem; cursor: pointer; }
.share-channel { display: flex; align-items: center; gap: .55rem; text-align: left; padding: .4rem .7rem; }
.share-ic { flex: none; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.share-ic svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.share-kakao .share-ic svg { stroke: #3a2c00; }
.share-channel:disabled .share-label { font-size: .82rem; white-space: nowrap; }
.share-channel:disabled { opacity: .5; cursor: default; }
.share-note { font-size: .85rem; color: var(--muted, #595959); margin: .6rem 0 0; }
.share-status { min-height: 1.4em; margin: .4rem 0; font-size: .9rem; }
.share-close { min-height: 44px; width: 100%; border: 1px solid var(--line, #bdbdb6); border-radius: .75rem; background: transparent; color: inherit; font: inherit; }
.install-chip { min-height: 44px; border: 0; background: transparent; color: var(--link, #313f50); font: inherit; font-size: .85rem; text-decoration: underline; padding: .2rem .4rem; white-space: nowrap; }
.install-chip[hidden], .install-hint[hidden] { display: none; }
.install-hint { font-size: .85rem; color: var(--muted, #595959); margin: .2rem 0 0; }
/* 주소 검색: 작은 화면에서도 입력과 결과를 한 줄씩 읽는다. */
.address-line{display:flex;gap:.5rem;flex-wrap:wrap}.address-line input{flex:1;min-width:12rem}#address-search{margin-top:1rem}#address-results{padding:0;list-style:none;max-height:20rem;overflow:auto}#address-results li{padding:.6rem 0;border-bottom:1px solid #aaa5}.address-choice{display:block;text-align:left;width:100%}#address-results .src{display:block;text-align:right;font-size:.75rem}
.report-button{margin:.3rem;font-size:.75rem}#correction-dialog{max-width:32rem;width:calc(100% - 2rem);max-height:85vh;overflow:auto;border:1px solid #888;border-radius:.6rem;background:Canvas;color:CanvasText}#correction-dialog::backdrop{background:rgba(0,0,0,.5)}#correction-dialog label{display:block;margin:.8rem 0}#correction-dialog input,#correction-dialog textarea{display:block;box-sizing:border-box;width:100%;font:inherit}#correction-dialog textarea{min-height:7rem}.report-note{font-size:.75rem;line-height:1.5}

/* 사이트 이름이 두 줄로 꺾이지 않게 */
header > a { white-space: nowrap; flex: none; }

/* 동작 링크는 손가락으로 누를 수 있는 높이를 확보한다. */
.records a, .region-list a, a.src, .card-sources a, .card-line a {
  display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; padding-block: .25rem;
}
@media (min-width: 900px) {
  body[data-page="index"] header { flex-wrap: wrap; }
  body[data-page="index"] header nav { flex-wrap: wrap; overflow-x: visible; min-width: 0; }
  .share-sheet { align-items: center; padding: 1.5rem; }
  .share-box { max-width: 420px; border-radius: 1rem; max-height: calc(100vh - 3rem); overflow-y: auto; }
  .share-sms { display: none; }
}
/* 가로 메뉴 밖에서 작은 화면에서도 찾을 수 있다. */
.install-chip { align-self: flex-start; flex: none; }
@media (max-width: 899px) {
  .people .people-head { position: sticky; top: 44px; z-index: 2; background: var(--bg); }
  .people-grip { z-index: 3; }
  .people.collapsed { max-height: none; overflow: hidden; }
  .people.collapsed > :not(.people-grip):not(.people-head) { display: none; }
  .people.collapsed #people-close, .people.collapsed #people-share { display: none; }
}
/* 양식 본문만 스크롤하고 보내기/닫기는 항상 아래에 남긴다. */
#correction-dialog { padding: 0; overflow: hidden; }
#correction-dialog form { display: flex; flex-direction: column; max-height: 85vh; }
.report-content { min-height: 0; overflow-y: auto; padding: 1rem; }
.report-actions { flex: none; display: flex; gap: .5rem; padding: .75rem 1rem; border-top: 1px solid var(--line); background: Canvas; }
.report-actions button { flex: 1; }

/* 직위별 세로 목록: 모바일 한 열, PC 두 열. */
#people-strip.strip { display: block; overflow-x: visible; scroll-snap-type: none; }
#people-strip .office-group { list-style: none; min-width: 0; margin: 0 0 1rem; }
.office-title { font-size: 1.3rem; margin: .7rem 0; }
.office-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; grid-template-columns: minmax(0,1fr); }
#people-strip .strip-card { width: 100%; max-width: none; scroll-snap-align: none; }
#people-strip .card-office { font-size: 1.15rem; font-weight: 750; line-height: 1.5; margin: 0 0 .4rem; }
.office-details { margin: .5rem 0; padding: .6rem; }
.office-details > summary { min-height: 44px; font-weight: 700; }
.region-search-choices { min-width: 0; }
.search-choice { margin: .4rem 0; }
.search-choice .src { display: inline-flex; align-items: center; min-height: 44px; }
body[data-page="member"] [role="tablist"] { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: .4rem 0; }
body[data-page="member"] [role="tabpanel"] { scroll-margin-top: 8rem; }
@media (min-width: 900px) {
  #map-app > .region-search-choices { grid-column: 2; }
  .office-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #map-app { grid-template-columns: minmax(0,42%) minmax(0,1fr); }
}
.office-subtitle { grid-column: 1 / -1; list-style: none; }
.office-subtitle h4 { margin: .5rem 0; font-size: 1.1rem; }
/* 직위는 카드 첫 줄 전체 폭, 사진·이름·정당은 그 아래에 둔다. */
#people-strip .card-head { display: grid; grid-template-columns: 3.2rem minmax(0,1fr); align-items: start; gap: .2rem .7rem; }
#people-strip .card-office { grid-column: 1 / -1; grid-row: 1; }
#people-strip .card-photo { grid-column: 1; grid-row: 2 / span 2; }
#people-strip .card-name { grid-column: 2; grid-row: 2; max-width: none; }
#people-strip .card-meta { grid-column: 2; grid-row: 3; }
