/* 시안(mockup/babbang-시안.html)에서 가져온 A안 스타일 */
:root {
  --ground: #FFFFFF;
  --ink: #101412;
  --sub: #55605A;
  --muted: #6B766F;
  --dash: #7F8A84;
  --hair: #C9D0CC;
  --fill: #EEF2EF;
  --line2: #00A84D;
  --line2-text: #007A38;
  --stamp: #D92B1E;
  --water: #D2DCE1;
  --sans: 'IBM Plex Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --mono: 'IBM Plex Mono', 'IBM Plex Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', monospace;
  --pad: 20px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  word-break: keep-all;
  font-variant-numeric: tabular-nums;
}
h1, h2, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--ink); }
a:hover { color: var(--line2-text); }
button { font-family: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--line2); outline-offset: 2px; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); }
.nb { white-space: nowrap; }

.page { max-width: 560px; margin: 0 auto; }

/* 머리 */
.top { border-bottom: 2px solid var(--ink); }
.top-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "brand who" "nav nav";
  align-items: center;
}
.brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  height: 52px;
  padding-left: var(--pad);
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--ink);
}
.who { grid-area: who; display: flex; gap: 4px; padding-right: var(--pad); font-size: 14px; color: var(--sub); }
.who strong { font-weight: 700; color: var(--ink); }
.who-long { display: none; }
.nav { grid-area: nav; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  color: var(--sub);
}
.nav a[aria-current="page"] { font-weight: 700; color: var(--ink); box-shadow: inset 0 -5px 0 var(--line2); }

/* 공통 */
main { padding: 22px var(--pad) 24px; display: flex; flex-direction: column; gap: 18px; }
.head { display: flex; flex-direction: column; gap: 4px; }
.head-title { display: flex; flex-direction: column; gap: 4px; }
.date { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--sub); }
h1 { font-size: 28px; line-height: 1.25; font-weight: 700; letter-spacing: -0.02em; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 2px;
  background: var(--ink);
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 700;
}
.btn-primary:hover { background: #2B322E; }
.btn-line {
  height: 46px;
  padding: 0 8px;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  background: var(--ground);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}
.btn-line:hover { background: var(--fill); }

.tag-new {
  padding: 0 6px;
  border: 1.5px solid var(--line2-text);
  color: var(--line2-text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 38px;
  height: 22px;
  border: 2.5px solid var(--line2);
  border-radius: 11px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.stamp {
  flex: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 2px dashed var(--dash);
  border-radius: 50%;
  background: var(--ground);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
}
.stamp:hover { border-color: var(--ink); color: var(--ink); }
.stamp[aria-pressed="true"] {
  border: 3px solid var(--stamp);
  box-shadow: inset 0 0 0 2px var(--ground), inset 0 0 0 3.5px var(--stamp);
  color: var(--stamp);
  font-weight: 700;
  transform: rotate(var(--tilt, 0deg));
}
.pass {
  flex: none;
  width: 58px;
  height: 44px;
  margin-left: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--sub);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pass:hover { color: var(--ink); }
.pass[aria-pressed="true"] { background: var(--ink); color: #FFFFFF; font-weight: 700; text-decoration: none; }

/* 오늘: 제목 줄 */
.head-side { margin-top: 2px; }
.head-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; font-size: 14px; }
.head-meta b { font-family: var(--mono); font-size: 16px; font-weight: 700; }
.confirm-top { display: none; }

/* 오늘: 투표 현황 */
.voters { padding: 10px 14px; background: var(--fill); display: flex; flex-direction: column; gap: 6px; }
.voters-count { display: flex; align-items: baseline; gap: 8px; }
.voters-count span { font-size: 13px; font-weight: 600; color: var(--sub); }
.voters-count b { font-family: var(--mono); font-size: 15px; font-weight: 700; }
.voters ul { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; }
.voters li { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.voters li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }
.voters li.wait { color: var(--sub); font-weight: 400; }
.voters li.wait::before { background: none; border: 2px solid var(--muted); }

/* 오늘: 후보 */
.cands { margin: 0 calc(-1 * var(--pad)); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.cands-head { display: none; }
.row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  grid-template-areas: "rank place sum" "rank zone zone" "rank stamps stamps" "rank others others";
  border-top: 1px solid var(--hair);
}
.row:first-of-type { border-top: 0; }
.rank {
  grid-area: rank;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14px;
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.5;
}
.row.is-first .rank { background: var(--ink); color: #FFFFFF; }
.place { grid-area: place; min-width: 0; padding: 14px 0 0 14px; display: flex; flex-direction: column; gap: 4px; }
.nameline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.name { font-size: 19px; line-height: 1.35; font-weight: 700; }
.kind { font-size: 14px; }
.note { display: none; font-size: 14px; color: var(--sub); }
.zone { grid-area: zone; padding: 4px 16px 0 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; font-size: 14px; }
.st { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; }
.travel b { font-weight: 400; }
.price { display: none; }
.stamps { grid-area: stamps; padding: 12px 16px 0 14px; display: flex; align-items: center; gap: 8px; }
.total { display: contents; }
.sum { grid-area: sum; padding: 14px 16px 0 10px; font-family: var(--mono); font-size: 26px; font-weight: 700; line-height: 1.15; white-space: nowrap; }
.unit { margin-left: 2px; font-family: var(--sans); font-size: 13px; font-weight: 600; }
.others { grid-area: others; padding: 4px 16px 14px 14px; font-size: 12.5px; color: var(--sub); }
.me-part { display: none; }

/* 오늘: 아래 버튼 */
.actions { display: flex; flex-direction: column; gap: 10px; }
.actions-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.check { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--line2); }
.hint { font-size: 13px; color: var(--sub); }

/* 확정 */
main[data-screen="result"] { gap: 20px; }
.result-meta { margin-top: 2px; font-size: 14px; }
.result-meta b { font-family: var(--mono); font-size: 16px; font-weight: 700; }
.hero {
  margin: 0 calc(-1 * var(--pad));
  padding: 20px var(--pad) 22px;
  background: var(--ink);
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hero-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hero-rank { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--hair); }
.hero-rank .tag-new { border-color: #FFFFFF; color: #FFFFFF; }
.hero-name { font-size: 34px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
.hero-total { flex: none; font-family: var(--mono); font-size: 40px; font-weight: 700; line-height: 1.1; white-space: nowrap; }
.hero-total .unit { font-size: 15px; }
.hero-kind { font-size: 15px; }
.hero-bottom { display: flex; flex-direction: column; }
.hero-zone { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; font-size: 15px; }
.hero-zone .pill { width: 40px; height: 24px; border-radius: 12px; font-size: 12.5px; }
.hero-actions { display: flex; gap: 10px; margin-top: 12px; }
.btn-inv { flex: 1 1 0; height: 50px; padding: 0 8px; border: 0; border-radius: 2px; background: #FFFFFF; color: var(--ink); font-size: 16px; font-weight: 700; }
.btn-inv:hover { background: var(--fill); }
.btn-inv-line { flex: none; height: 50px; padding: 0 16px; border: 1.5px solid #FFFFFF; border-radius: 2px; background: transparent; color: #FFFFFF; font-size: 15px; font-weight: 600; }
.btn-inv-line:hover { background: #2B322E; }

.cols { display: grid; gap: 20px; }
.block { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.block h2 { font-size: 13px; font-weight: 600; color: var(--sub); }
.list { border-top: 1px solid var(--ink); }
.list li { display: grid; align-items: center; border-bottom: 1px solid var(--hair); }
.list li:last-child { border-bottom-color: var(--ink); }
.who-list li { grid-template-columns: 76px minmax(0, 1fr) 28px; min-height: 32px; }
.who-name { font-weight: 600; }
.who-list b { font-family: var(--mono); font-weight: 700; text-align: right; }
.who-note { font-size: 14px; color: var(--sub); }
.who-list li.off { color: var(--sub); }
.who-list li.off .who-name { font-weight: 400; }
.rings { display: flex; gap: 5px; }
.rings i { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid var(--stamp); }
.rest-list li { grid-template-columns: 28px minmax(0, 1fr) auto; min-height: 36px; }
.rest-list .rk { font-family: var(--mono); font-weight: 700; }
.rest-list .nm { font-weight: 600; }
.rest-list .pt { font-family: var(--mono); font-weight: 600; }

.saved { padding: 14px 16px 16px; background: var(--fill); display: flex; flex-direction: column; gap: 10px; }
.saved p { font-size: 14px; }
.again { display: flex; align-items: center; gap: 8px; }
.again-q { margin-right: 4px; font-size: 15px; font-weight: 700; }
.undo {
  align-self: flex-start;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--sub);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.undo:hover { color: var(--ink); }

/* 지도·기록 */
.map-sum { margin-top: 2px; font-size: 15px; }
.map-sum b { font-family: var(--mono); font-weight: 700; }
.zones { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 28px; }
.zone-all { flex: none; padding: 0 16px; }
.line-strip { position: relative; flex: 999 1 420px; min-width: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.line-strip::before { content: ""; position: absolute; left: 10%; right: 10%; top: 14px; height: 6px; background: var(--line2); }
.stop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0 2px 4px;
  border: 0;
  background: none;
  color: var(--ink);
}
.stop i { width: 22px; height: 22px; margin: 6px 0 8px; border-radius: 50%; border: 5px solid var(--line2); background: var(--ground); }
.stop-code { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--sub); }
.stop-name { font-size: 14px; font-weight: 600; }
.stop-n { font-size: 13px; color: var(--sub); }
.stop[aria-pressed="true"] i { width: 34px; height: 34px; margin: 0 0 2px; background: var(--ink); box-shadow: inset 0 0 0 4px var(--ground); }
.stop[aria-pressed="true"] .stop-code { font-weight: 700; color: var(--ink); }
.stop[aria-pressed="true"] .stop-name { font-size: 16px; font-weight: 700; }
.stop[aria-pressed="true"] .stop-n { font-weight: 600; color: var(--ink); }

.mapwrap { display: grid; gap: 24px; align-items: start; }
.map { position: relative; min-width: 0; aspect-ratio: 1 / 1; overflow: hidden; background: var(--fill); border: 1px solid var(--hair); }
.map svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.map .water { fill: var(--water); }
.map .stream { fill: none; stroke: var(--water); stroke-width: 12px; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.map .rail { fill: none; stroke: var(--line2); stroke-width: 6px; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.map-cap { position: absolute; left: 12px; top: 12px; padding: 3px 9px; background: var(--ground); border: 1px solid var(--ink); font-size: 12px; font-weight: 600; }
.map-legend { position: absolute; left: 12px; bottom: 12px; padding: 3px 9px; background: var(--ground); font-size: 12px; color: var(--sub); }
.stn { position: absolute; width: 0; height: 0; font-size: 12px; font-weight: 700; line-height: 16px; white-space: nowrap; pointer-events: none; }
.stn i { position: absolute; left: -8px; top: -8px; width: 16px; height: 16px; border-radius: 50%; border: 4px solid var(--line2); background: var(--ground); }
/* 역 이름은 노선에 겹치지 않는 쪽에 둔다: 기본은 아래 가운데, sw는 아래 왼쪽, up은 위 */
.stn span { position: absolute; left: 0; top: 11px; transform: translateX(-50%); }
.stn.sw span { left: auto; right: -5px; transform: none; }
.stn.up span { top: auto; bottom: 11px; }
.base {
  position: absolute;
  transform: translate(-6px, -50%);
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
}
.base i { width: 12px; height: 12px; background: var(--ink); transform: rotate(45deg); }
.base span { padding: 0 5px; background: var(--ground); }
.pin {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
.pin.far { border: 2px solid var(--dash); background: var(--ground); color: var(--sub); }
.pin.near { border: 0; background: var(--ink); color: #FFFFFF; }
.pin.near[aria-pressed="true"] { z-index: 2; width: 32px; height: 32px; border: 3px solid var(--ink); background: var(--line2); color: var(--ink); font-size: 13px; }
.tip {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, calc(-100% - 22px));
  padding: 3px 9px;
  background: var(--ground);
  border: 1.5px solid var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
}
.tip.edge-l { transform: translate(-20px, calc(-100% - 22px)); }

.record { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.rec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.rec-head h2 { font-size: 18px; font-weight: 700; }
.rec-head span { font-size: 13.5px; color: var(--sub); }
.cats { display: flex; flex-wrap: wrap; gap: 0 4px; margin: 0 -8px; }
.cats button { min-height: 44px; padding: 0 8px; border: 0; background: none; color: var(--sub); font-size: 15px; font-weight: 500; }
.cats button:hover { color: var(--ink); }
.cats button[aria-pressed="true"] {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
  text-decoration-color: var(--line2);
}
.recs { border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.recs-head, .rec { display: grid; grid-template-columns: minmax(0, 1fr) 52px 60px 64px; gap: 0 10px; align-items: center; }
.recs-head { padding: 8px 10px; background: var(--fill); font-size: 13px; font-weight: 600; color: var(--sub); }
.recs-head span + span { text-align: right; }
.rec { width: 100%; padding: 9px 10px; border: 0; border-top: 1px solid var(--hair); background: none; text-align: left; font-size: 15px; }
.rec:first-of-type { border-top-color: var(--ink); }
.rec:hover { background: var(--fill); }
.rec-name { display: block; font-size: 16px; font-weight: 700; }
.rec-kind { display: block; font-size: 13.5px; color: var(--sub); }
.rec .num { font-family: var(--mono); text-align: right; }
.rec .num.n { font-weight: 600; }
.rec .num.d { font-size: 14px; }
.rec .num.a { font-weight: 700; }
.rec[aria-pressed="true"] { background: var(--ink); color: #FFFFFF; }
.rec[aria-pressed="true"] .rec-kind { color: var(--hair); }
.rec-empty { padding: 16px 10px; border-top: 1px solid var(--ink); font-size: 14px; color: var(--sub); }
.rec-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; }
.rec-foot .btn-line { height: 44px; padding: 0 16px; }
.rec-foot span { font-size: 13.5px; color: var(--sub); }

/* 넓은 화면 */
@media (min-width: 1040px) {
  :root { --pad: 32px; }
  body { font-size: 16px; }
  .page { max-width: none; }

  .top-in { max-width: 1200px; margin: 0 auto; padding: 0 var(--pad); display: flex; align-items: stretch; gap: 0 36px; }
  .brand { height: auto; min-height: 64px; padding: 0; font-size: 18px; }
  .nav { display: flex; gap: 4px; }
  .nav a { height: auto; min-height: 64px; padding: 0 16px; }
  .who { margin-left: auto; align-items: center; gap: 10px; padding: 0; font-size: 15px; }
  .who-long { display: inline; }
  body[data-view="map"] .who-long { display: none; }

  main { max-width: 1200px; margin: 0 auto; padding: 40px var(--pad) 72px; gap: 28px; }
  .head { flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 40px; }
  .head-title { gap: 6px; }
  .date { font-size: 14px; }
  h1 { font-size: 40px; line-height: 1.2; }
  .btn-line { height: 44px; padding: 0 16px; }

  .head-side { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
  .deadline { display: flex; align-items: baseline; gap: 8px; }
  .deadline .lbl, .deadline .left { font-size: 14px; color: var(--sub); }
  .deadline b { font-size: 22px; }
  .deadline .sep, .mycount { display: none; }
  .confirm-top { display: inline-flex; height: 48px; }

  .voters { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding: 12px 16px; }
  .voters-count span { font-size: 14px; }
  .voters-count b { font-size: 16px; }
  .voters ul { gap: 6px 20px; font-size: 15px; }
  .voters li { gap: 7px; }
  .voters li::before { width: 10px; height: 10px; }

  .cands { margin: 0; }
  .cands-head, .row { display: grid; grid-template-columns: 60px minmax(190px, 1fr) 160px 150px 236px 150px; grid-template-areas: none; }
  .cands-head { background: var(--fill); font-size: 13px; font-weight: 600; color: var(--sub); }
  .cands-head > div { padding: 10px 14px; }
  .cands-head > .c { text-align: center; }
  .cands-head > .r { text-align: right; }
  .row:first-of-type { border-top: 1px solid var(--ink); }
  .row > * { grid-area: auto; }
  .rank { align-items: center; padding: 0; font-size: 34px; line-height: 1; }
  .place { padding: 20px 14px; }
  .nameline { gap: 6px 10px; }
  .name { font-size: 22px; line-height: 1.3; }
  .row .tag-new { padding: 1px 7px; font-size: 12.5px; }
  .kind { font-size: 15px; }
  .price-inline { display: none; }
  .note { display: block; }
  .zone { padding: 20px 14px; flex-direction: column; flex-wrap: nowrap; align-items: flex-start; gap: 6px; font-size: 15px; }
  .zone .pill { width: 40px; height: 24px; border-radius: 12px; font-size: 12.5px; }
  .zone .dot { display: none; }
  .travel b { font-weight: 700; }
  .price { display: block; padding: 20px 6px 20px 14px; font-size: 14px; font-weight: 500; white-space: nowrap; }
  .stamps { padding: 20px 10px; align-items: flex-start; }
  .row .stamp { width: 44px; height: 44px; font-size: 16px; }
  .row .stamp[aria-pressed="true"] { font-size: 18px; }
  .pass { width: 56px; margin-left: 2px; }
  .total { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; padding: 20px 14px; }
  .sum { padding: 0; font-size: 34px; line-height: 1; }
  .sum .unit { margin-left: 3px; font-size: 15px; }
  .others { padding: 0; font-size: 13.5px; text-align: right; }
  .me-part { display: inline; }

  .actions { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; }
  .confirm-bottom { display: none; }
  .actions-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
  .check { margin-left: 8px; }
  .hint { font-size: 14px; }

  main[data-screen="result"] { gap: 28px; }
  .result-meta { margin: 0 0 6px; font-size: 16px; }
  .result-meta b { font-size: 20px; }
  .hero { margin: 0; padding: 32px 36px 34px; gap: 10px; }
  .hero-rank { font-size: 15px; }
  .hero-name { font-size: 52px; }
  .hero-total { font-size: 72px; line-height: 1; }
  .hero-total .unit { margin-left: 4px; font-size: 20px; }
  .hero-kind { font-size: 17px; }
  .hero-bottom { flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; }
  .hero-zone { font-size: 17px; }
  .hero-actions { margin-top: 0; }
  .btn-inv { flex: none; height: 52px; padding: 0 28px; }
  .btn-inv-line { height: 52px; padding: 0 20px; }
  .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
  .block h2 { font-size: 14px; }
  .who-list li { grid-template-columns: 96px minmax(0, 1fr) 28px; min-height: 40px; }
  .rest-list li { min-height: 40px; }
  .saved { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding: 16px 20px; }
  .saved p { font-size: 15px; }

  .map-sum { margin: 0 0 6px; font-size: 16px; }
  .zone-all { height: 46px; }
  .stop-code { font-size: 12.5px; }
  .stop-name { font-size: 15px; }
  .stop-n { font-size: 13.5px; }
  .stop[aria-pressed="true"] .stop-name { font-size: 17px; }
  .mapwrap { grid-template-columns: minmax(0, 1.6fr) minmax(400px, 1fr); gap: 32px; }
  .map { aspect-ratio: 4 / 3; }
  .map .stream { stroke-width: 20px; }
  .map .rail { stroke-width: 7px; }
  .map-cap, .map-legend { font-size: 12.5px; }
  .stn, .base { font-size: 13px; }
  .pin { width: 32px; height: 32px; font-size: 13px; }
  .pin.near[aria-pressed="true"] { width: 38px; height: 38px; font-size: 15px; }
  .tip { font-size: 13.5px; transform: translate(-50%, calc(-100% - 26px)); }
  .tip.edge-l { transform: translate(-24px, calc(-100% - 26px)); }
  .rec-head h2 { font-size: 20px; }
  .rec-head span { font-size: 14px; }
}

@media (min-width: 1200px) {
  :root { --pad: 40px; }
  .cands-head, .row { grid-template-columns: 72px minmax(240px, 1fr) 180px 160px 240px 176px; }
  .price { font-size: 15px; }
  .stamps { padding: 20px 12px; }
}

/* ===== 시안에 없던 화면: 이름 고르기, 판 열기, 식당 추가 ===== */
.lead { max-width: 60ch; font-size: 15px; color: var(--sub); }
.alert { padding: 10px 14px; border: 1.5px solid var(--stamp); color: var(--stamp); font-size: 14px; font-weight: 600; }
.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--sub);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link:hover { color: var(--ink); }
.opt { font-weight: 400; color: var(--muted); }

.who { align-items: baseline; }
.who .link { margin-left: 6px; }

.btn-primary:disabled { background: var(--hair); color: var(--sub); cursor: not-allowed; }
.btn-line[aria-pressed="true"] { background: var(--ink); color: #FFFFFF; }
a.btn-inv { display: flex; align-items: center; justify-content: center; text-decoration: none; }
a.btn-inv:hover { color: var(--ink); }

input:not([type="checkbox"]), select {
  height: 46px;
  padding: 0 12px;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  background: var(--ground);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
}
input::placeholder { color: var(--muted); }

.notice { padding: 16px; background: var(--fill); display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.notice p { font-size: 15px; }

.name-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.name-btn { height: 56px; font-size: 17px; font-weight: 700; }
.inline-form { display: flex; flex-direction: column; gap: 6px; max-width: 420px; }
.inline-form label { font-size: 13px; font-weight: 600; color: var(--sub); }
.inline-row { display: flex; gap: 10px; }
.inline-row input { flex: 1 1 0; min-width: 0; }
.inline-row .btn-primary { height: 46px; }

.again .link { margin-left: 8px; min-height: 44px; }

.pick-side { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 8px; }
.pick-count b { font-family: var(--mono); font-size: 16px; font-weight: 700; }
.deadline-field { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.deadline-field input { width: 140px; font-family: var(--mono); font-weight: 600; }
.picks { margin: 0 calc(-1 * var(--pad)); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.pick-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-areas: "box main" "box zone" "box hist";
  row-gap: 3px;
  padding: 12px var(--pad) 12px 0;
  border-top: 1px solid var(--hair);
  cursor: pointer;
}
.pick-row:first-child { border-top: 0; }
.pick-row.on { background: var(--fill); }
.pick-row input { grid-area: box; justify-self: center; width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--ink); }
.pick-main { grid-area: main; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pick-name { font-size: 17px; line-height: 1.35; font-weight: 700; }
.pick-sub { font-size: 14px; }
.pick-zone { grid-area: zone; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; font-size: 14px; }
.pick-zone strong { font-weight: 700; }
.pick-hist { grid-area: hist; font-size: 13px; color: var(--sub); }
.picks-empty { padding: 20px var(--pad); font-size: 15px; color: var(--sub); }

.dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--ground);
  color: var(--ink);
}
.dialog::backdrop { background: rgba(16, 20, 18, 0.5); }
.form { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.form h2 { font-size: 20px; font-weight: 700; }
.form label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.form .cap { font-size: 13px; font-weight: 600; color: var(--sub); }
.form input, .form select { width: 100%; }
.form-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.form-actions .btn-line, .form-actions .btn-primary { height: 46px; padding: 0 20px; }

.map.map-empty { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; padding: 20px; text-align: center; }
.map-empty p { font-size: 14px; color: var(--sub); }
.map-empty strong { color: var(--ink); }
div.rec:hover { background: none; }

@media (min-width: 1040px) {
  .lead { font-size: 16px; }
  .notice { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 20px; }
  .notice p { font-size: 16px; }
  .notice .btn-primary { height: 48px; }
  .name-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); max-width: 760px; }
  .pick-side { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin: 0; }
  .picks { margin: 0; }
  .pick-row { grid-template-columns: 60px minmax(0, 1fr) 260px 220px; grid-template-areas: none; align-items: center; padding: 14px 14px 14px 0; }
  .pick-row > *, .pick-row input { grid-area: auto; }
  .pick-row input { margin: 0; }
  .pick-name { font-size: 19px; }
  .pick-sub, .pick-zone { font-size: 15px; }
  .pick-hist { font-size: 14px; text-align: right; }
  .who { align-self: center; }
  .map-empty p { font-size: 15px; }
}
