/* 풀숲예보 — 들빛생태보건연구소 (가상). 들풀 종이 + 짙은 숲색, 등급은 색 + 모양 + 글자 */
:root {
  --paper: #F2F0E6; --card: #FBFAF4; --ink: #1B2A20; --ink2: #3B4A3F; --muted: #6A7365; --line: #DCD8C8; --line2: #E8E5D8;
  --moss: #2F4A36; --leaf: #5E7F4E; --up: #9E2328; --down: #3F6E57;
  --g1: #D5E4BF; --g2: #F0D159; --g3: #E0803A; --g4: #9E2328;
  --band: 34px; --tab: 64px;
  --num: 'Archivo Narrow', 'Noto Sans KR', sans-serif;
  --head: 'Hahmlet', 'Noto Serif KR', serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 'Noto Sans KR', system-ui, sans-serif; overflow-x: hidden; padding-bottom: calc(var(--tab) + env(safe-area-inset-bottom)); }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--head); font-weight: 700; letter-spacing: -.01em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.gl { flex: none; display: inline-block; vertical-align: -1px; }

.demo { height: var(--band); background: #111418; color: #C9CCD1; font-size: 13px; line-height: 18px; text-align: center; padding: 8px 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; z-index: 30; }
.demo a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.demo b { color: #FF5A36; font-family: Menlo, monospace; }

/* 머리 */
.top { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: rgba(242, 240, 230, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; min-width: 0; }
.logo svg { flex: none; }
.logo span { display: flex; flex-direction: column; line-height: 1.15; }
.logo b { font-family: var(--head); font-size: 18px; }
.logo small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.tabs-top { display: none; }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.base { display: flex; align-items: center; gap: 4px; }
.base span { display: none; font-size: 12px; color: var(--muted); }
select { appearance: none; -webkit-appearance: none; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%231B2A20' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 9px center / 10px; border: 1px solid var(--line); border-radius: 9px; padding: 7px 26px 7px 10px; font-size: 13px; font-weight: 500; max-width: 100%; }
#role { width: 96px; text-overflow: ellipsis; }
#base { width: 118px; }

/* 공지 */
#notice:empty { display: none; }
#notice { padding: 10px 16px 0; display: grid; gap: 6px; }
.notice { display: flex; align-items: flex-start; gap: 10px; padding: 10px 10px 10px 12px; border-radius: 12px; background: #E7EBDD; border: 1px solid #CBD3BC; font-size: 14px; }
.notice p { margin: 0; flex: 1; line-height: 1.45; }
.notice.lv-주의 { background: #FBF0C2; border-color: #E4CC6A; }
.notice.lv-긴급 { background: #F6DCD9; border-color: #D79A95; color: #4A1012; }
.nl { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: rgba(27, 42, 32, .08); margin-top: 1px; }
.notice .x { flex: none; border: 0; background: none; padding: 4px; cursor: pointer; color: var(--muted); border-radius: 6px; }

/* 쪽 */
main { outline: none; }
.pg { padding: 14px 16px 24px; max-width: 1360px; margin: 0 auto; }
.pg-h { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.pg-h h1 { font-size: 23px; }
.sub { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.card h3 { font-size: 16px; margin-bottom: 8px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.card h3 small { font-family: 'Noto Sans KR', sans-serif; font-weight: 400; font-size: 12px; color: var(--muted); }
.muted { color: var(--muted); font-size: 13px; margin: 8px 0 0; }

.meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); margin: 2px 0 12px; }
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.meta .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--leaf); box-shadow: 0 0 0 3px rgba(94, 127, 78, .2); }
.meta .miss { color: var(--ink2); }
.pastnote { flex-basis: 100%; background: #EFE7D0; color: #4D4123; padding: 6px 10px; border-radius: 8px; display: block !important; }
.pastnote a { font-weight: 700; }
.hsw { flex: none; }

/* 예측 주차 */
.seg { display: grid; grid-template-columns: repeat(4, 1fr); background: #E6E3D5; border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; border-radius: 9px; padding: 6px 2px; font-size: 13px; font-weight: 500; cursor: pointer; display: flex; flex-direction: column; align-items: center; line-height: 1.2; color: var(--ink2); }
.seg button small { font-family: var(--num); font-size: 12px; color: var(--muted); }
.seg button.on { background: var(--ink); color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.seg button.on small { color: #C8D4C0; }

/* 등급 표시 */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; padding: 2px 8px 2px 6px; border-radius: 7px; white-space: nowrap; line-height: 1.4; }
.badge b { font-weight: 700; }
.badge.sm { font-size: 12px; padding: 1px 6px 1px 5px; }
.badge.g1 { background: var(--g1); color: #22401C; }
.badge.g2 { background: var(--g2); color: #3A2F00; }
.badge.g3 { background: var(--g3); color: #2A1200; }
.badge.g4 { background: var(--g4); color: #fff; }
.badge.g0 { background: #E6E3D5; color: var(--muted); }
.dl { display: inline-flex; align-items: center; gap: 2px; font-family: var(--num); font-weight: 600; font-size: 14px; white-space: nowrap; }
.dl.up { color: var(--up); }
.dl.down { color: var(--down); }
.dl.flat { color: var(--muted); }
.dl.na { font-family: 'Noto Sans KR'; font-weight: 400; font-size: 12px; color: var(--muted); }

/* 지도 */
.map-grid { display: grid; gap: 12px; }
.mapcard { padding: 12px 10px 8px; }
.legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-bottom: 6px; }
.lg { display: flex; align-items: center; justify-content: center; gap: 4px; border: 1.5px solid transparent; border-radius: 9px; padding: 6px 2px; font-size: 13px; cursor: pointer; }
.lg span { font-family: var(--num); font-weight: 600; font-size: 14px; margin-left: 1px; }
.lg.g1 { background: var(--g1); color: #22401C; }
.lg.g2 { background: var(--g2); color: #3A2F00; }
.lg.g3 { background: var(--g3); color: #2A1200; }
.lg.g4 { background: var(--g4); color: #fff; }
.lg.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--ink); }
.mapbox { width: 100%; }
.hexmap { display: block; margin: 0 auto; overflow: visible; }
.tile { cursor: pointer; outline: none; transition: opacity .15s; }
.tile.dim { opacity: .22; }
.tile:hover polygon:first-child, .tile:focus-visible polygon:first-child { stroke: #111; stroke-width: 2.5; }
.tn { text-anchor: middle; font-weight: 700; letter-spacing: -.03em; }
.tv { text-anchor: middle; font-family: var(--num); font-weight: 600; }
.compass text, .mapnote { font-size: 10.5px; fill: var(--muted); }
.thnote { margin: 4px 4px 2px; font-size: 12px; color: var(--muted); font-family: var(--num); letter-spacing: .01em; }
.side { display: none; }

/* 높은 순 카드 넘기기 */
.swipe-h { display: flex; align-items: baseline; justify-content: space-between; margin: 18px 0 8px; }
.swipe-h h2 { font-size: 18px; }
.hint { font-size: 12px; color: var(--muted); }
.swipe { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 2px 16px 6px; scroll-padding: 0 16px; scrollbar-width: none; overscroll-behavior-x: contain; }
.swipe::-webkit-scrollbar { display: none; }
.rcard { scroll-snap-align: start; flex: 0 0 calc((100% - 20px) / 2.25); min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; text-decoration: none; display: grid; grid-template-columns: auto 1fr; gap: 3px 6px; align-items: center; position: relative; border-top: 5px solid var(--g1); }
.rcard.g2 { border-top-color: var(--g2); }
.rcard.g3 { border-top-color: var(--g3); }
.rcard.g4 { border-top-color: var(--g4); }
.rcard .rk { font-family: var(--num); font-size: 13px; color: var(--muted); }
.rcard .nm { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rcard .badge { grid-column: 1 / -1; justify-self: start; }
.rcard .big { grid-column: 1 / -1; font-family: var(--num); font-weight: 600; font-size: 34px; line-height: 1; display: flex; align-items: baseline; gap: 6px; }
.rcard .big em { font-family: 'Noto Sans KR'; font-style: normal; font-size: 11px; font-weight: 500; color: var(--ink2); background: #E6E3D5; padding: 1px 5px; border-radius: 5px; }
.rcard .row { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
.ci { font-family: var(--num); font-size: 13px; color: var(--muted); }
.rcard .spark { grid-column: 1 / -1; width: 100%; height: 26px; }
.dots { display: flex; justify-content: center; gap: 5px; margin-top: 6px; min-height: 6px; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: #CFCBBB; transition: width .2s; }
.dots i.on { width: 16px; background: var(--ink); }

/* 지역 머리 */
.rh { margin: 8px 0 12px; }
.rh-t { display: flex; align-items: center; gap: 10px; }
.rh-t h2 { font-size: 26px; }
.rh.compact .rh-t h2 { font-size: 21px; }
.rh-n { display: flex; align-items: flex-end; gap: 16px; margin-top: 6px; flex-wrap: wrap; }
.rh-n .big { font-family: var(--num); font-weight: 600; font-size: 56px; line-height: .95; padding-left: 10px; border-left: 6px solid var(--g1); }
.rh-n .big.g2 { border-color: var(--g2); }
.rh-n .big.g3 { border-color: var(--g3); }
.rh-n .big.g4 { border-color: var(--g4); }
.rh.compact .rh-n .big { font-size: 44px; }
.rh-d, .rh-ci { display: flex; flex-direction: column; gap: 1px; padding-bottom: 3px; }
.rh-d .dl { font-size: 18px; }
.rh-ci b { font-family: var(--num); font-weight: 600; font-size: 18px; }
.rh small { font-size: 11px; color: var(--muted); }
.warn { margin: 10px 0 0; font-size: 13px; color: var(--ink2); background: #ECE9DC; border-radius: 9px; padding: 7px 10px; display: flex; gap: 7px; align-items: center; }

/* 그래프 */
.chartwrap { position: relative; width: 100%; min-height: 40px; touch-action: pan-y; }
.chartwrap svg { display: block; overflow: visible; }
.chartwrap.aux { margin-top: 8px; }
.yl, .xl { font-family: var(--num); font-size: 11px; fill: var(--muted); }
.bl { font-size: 11px; fill: var(--ink2); font-weight: 500; }
.bt { font-size: 11px; fill: var(--ink); font-weight: 700; }
.ml { font-size: 10px; fill: var(--ink2); font-weight: 700; }
.tip { position: absolute; z-index: 5; pointer-events: none; background: var(--ink); color: #EDF1E6; font-size: 12px; line-height: 1.45; padding: 6px 9px; border-radius: 8px; white-space: nowrap; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.tip b { display: block; color: #fff; }
.legend-line { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--ink2); margin-top: 6px; }
.legend-line span { display: inline-flex; align-items: center; gap: 5px; }
.legend-line i { display: inline-block; width: 18px; height: 0; border-top: 2.4px solid var(--ink); }
.legend-line .k-fc { border-top-style: dashed; }
.legend-line .k-ci { height: 10px; border: 0; background: rgba(27, 42, 32, .16); border-radius: 2px; }
.legend-line .k-later { width: 10px; height: 10px; border: 2px solid var(--ink); border-radius: 50%; background: #fff; }
.more { display: inline-block; margin-top: 10px; font-weight: 700; font-size: 14px; text-decoration: none; border-bottom: 1.5px solid var(--ink); }

/* 지역 상세 */
.back { display: inline-flex; align-items: center; gap: 3px; text-decoration: none; font-size: 14px; color: var(--ink2); margin-bottom: 6px; }
.wk .wcard { scroll-snap-align: start; flex: 0 0 calc((100% - 20px) / 2.3); border: 1px solid var(--line); background: var(--card); border-radius: 14px; padding: 10px 12px; text-align: left; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; position: relative; overflow: hidden; }
.wcard::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--g1); }
.wcard.g2::before { background: var(--g2); }
.wcard.g3::before { background: var(--g3); }
.wcard.g4::before { background: var(--g4); }
.wcard.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.wcard .wl { font-weight: 700; font-size: 14px; display: flex; gap: 6px; align-items: baseline; }
.wcard .wl small { font-family: var(--num); font-weight: 500; color: var(--muted); }
.wcard .big { font-family: var(--num); font-size: 30px; font-weight: 600; line-height: 1; }
.wcard .lt { font-size: 12px; color: var(--ink2); }
.wcard .lt i { font-style: normal; font-weight: 700; }
.r-grid { display: grid; gap: 12px; margin-top: 12px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 0; }
.facts div { background: #F1EEE3; border-radius: 10px; padding: 8px 10px; }
.facts dt { font-size: 11px; color: var(--muted); }
.facts dd { margin: 0; font-family: var(--num); font-weight: 600; font-size: 18px; }
.near { margin-top: 12px; }
.near ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.near a { display: grid; grid-template-columns: 1fr auto 34px 52px; gap: 8px; align-items: center; padding: 8px 4px; text-decoration: none; border-bottom: 1px solid var(--line2); }
.near li:last-child a { border-bottom: 0; }
.near a > b { font-family: var(--num); font-size: 18px; text-align: right; }
.near .dl { justify-content: flex-end; }
.actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.model { font-size: 12px; color: var(--muted); margin: 12px 0 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1.5px solid var(--ink); background: var(--ink); color: #fff; border-radius: 10px; padding: 9px 16px; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.sm { padding: 4px 9px; font-size: 12px; border-width: 1px; border-radius: 7px; }
.btn.danger { color: var(--up); border-color: #D7A9A6; }

/* 순위 */
.tools { display: flex; gap: 8px; margin-bottom: 10px; }
.search { flex: 1; display: flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; color: var(--muted); }
.search input { border: 0; background: none; outline: none; padding: 9px 0; width: 100%; font-size: 15px; color: var(--ink); min-width: 0; }
.tools select { flex: none; padding-top: 9px; padding-bottom: 9px; font-size: 14px; }
.chips { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.chips button span { font-family: var(--num); font-weight: 600; color: var(--muted); }
.chips button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chips button.on span { color: #C8D4C0; }
.rank { padding: 4px 12px; }
.rrow { display: grid; grid-template-columns: 26px 1fr auto 44px; grid-template-areas: "rk nm gd v" "rk sp d ci"; gap: 2px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line2); text-decoration: none; }
.rrow:last-child { border-bottom: 0; }
.rrow.head { display: none; }
.rrow .rk { grid-area: rk; font-family: var(--num); font-size: 17px; font-weight: 600; color: var(--muted); text-align: center; }
.rrow .nm { grid-area: nm; font-weight: 700; display: flex; align-items: center; gap: 6px; min-width: 0; }
.rrow .nm em { font-style: normal; font-weight: 500; font-size: 11px; color: var(--ink2); background: #E6E3D5; border-radius: 5px; padding: 1px 5px 1px 3px; display: inline-flex; align-items: center; gap: 3px; }
.rrow .nm em .hsw { width: 10px; height: 10px; }
.rrow .gd { grid-area: gd; justify-self: end; }
.rrow .v { grid-area: v; font-family: var(--num); font-weight: 600; font-size: 24px; text-align: right; line-height: 1; }
.rrow .d { grid-area: d; justify-self: end; }
.rrow .ci { grid-area: ci; text-align: right; font-size: 12px; }
.rrow .sp { grid-area: sp; }
.rrow .sp .spark { width: 100%; max-width: 160px; }
.rrow .wx { display: none; }
.empty { text-align: center; padding: 30px 16px; }
.empty b { font-family: var(--head); font-size: 17px; }
.empty p { color: var(--muted); font-size: 14px; margin: 6px 0 14px; }

/* 비교 */
.pick { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.pick button { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 5px 11px; font-size: 13px; cursor: pointer; }
.pick button.on { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 700; }
.keys { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.keys span { display: inline-flex; align-items: center; gap: 6px; }
.ctable { margin-top: 12px; padding: 4px 0; overflow-x: auto; }
.ctable table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ctable th, .ctable td { padding: 8px 6px; text-align: right; border-bottom: 1px solid var(--line2); white-space: nowrap; }
.ctable thead th { font-weight: 500; color: var(--muted); font-size: 12px; vertical-align: bottom; }
.ctable thead th small { display: block; font-family: var(--num); }
.ctable tbody th { text-align: left; font-weight: 700; padding-left: 12px; }
.ctable tbody th svg { margin-right: 5px; vertical-align: 0; }
.ctable tbody th a { text-decoration: none; }
.ctable tr:last-child > * { border-bottom: 0; }
.ctable td b { font-family: var(--num); font-size: 16px; font-weight: 600; margin-left: 3px; }
.ctable td:last-child { padding-right: 12px; font-family: var(--num); font-size: 15px; }
.ctable td.g4 { color: var(--g4); }
.ctable td.g3 { color: #A9541A; }
.ctable td.g2 { color: #8A7300; }
.ctable td.g1 { color: #4E7240; }

/* 관리 */
.admin-grid { display: grid; gap: 12px; }
.lockcard { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: center; margin-bottom: 12px; }
.lockcard p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.lockcard .btn { grid-column: 1 / -1; }
.about { margin-top: 12px; }
.about ul { margin: 0 0 14px; padding-left: 18px; font-size: 14px; color: var(--ink2); display: grid; gap: 4px; }
.thbar { position: relative; margin: 4px 0 18px; }
.thbar svg { display: block; border-radius: 4px; }
.thlab { position: relative; height: 14px; font-size: 11px; color: var(--ink2); }
.thlab span { position: absolute; transform: translateX(-50%); top: -12px; white-space: nowrap; }
.thform { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.thform label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; padding: 8px; border-radius: 10px; }
.thform label > span { display: flex; align-items: center; gap: 4px; }
.thform label .gl { position: absolute; }
.thform label { position: relative; padding-left: 8px; }
.thform label .gl + span { padding-left: 16px; }
.thform label.g2 { background: #FBF0C2; color: #3A2F00; }
.thform label.g3 { background: #F7DCC6; color: #2A1200; }
.thform label.g4 { background: #EFD0CE; color: #5A0F12; }
.thform input { width: 100%; border: 1.5px solid rgba(0, 0, 0, .18); border-radius: 8px; padding: 6px 8px; font-family: var(--num); font-size: 20px; font-weight: 600; background: #fff; color: var(--ink); }
.thform input.bad { border-color: var(--up); box-shadow: 0 0 0 3px #F4D9D7; }
.err { grid-column: 1 / -1; color: var(--up); font-size: 13px; font-style: normal; margin: 0; min-height: 0; display: block; }
.err:empty { display: none; }
.preview { grid-column: 1 / -1; width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 4px; }
.preview th, .preview td { padding: 6px 4px; text-align: center; border-bottom: 1px solid var(--line2); }
.preview thead th { font-weight: 500; color: var(--muted); font-size: 12px; }
.preview thead th .gl { margin-right: 3px; }
.preview tbody th { text-align: left; font-weight: 500; color: var(--muted); }
.preview td { font-family: var(--num); font-size: 17px; font-weight: 600; }
.preview td i { font-style: normal; font-size: 12px; color: var(--up); margin-left: 3px; }
.preview tr.nx td { background: #F3F0E4; }
.row-btn { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.log { list-style: none; margin: 14px 0 0; padding: 10px 0 0; border-top: 1px dashed var(--line); font-family: var(--num); font-size: 14px; display: grid; gap: 4px; }
.log span { font-family: 'Noto Sans KR'; font-size: 12px; color: var(--muted); margin-right: 8px; }
.lvpick { display: flex; gap: 6px; margin-bottom: 10px; }
.lvpick label { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; border: 1.5px solid var(--line); border-radius: 9px; padding: 7px; font-size: 13px; font-weight: 700; cursor: pointer; }
.lvpick input { position: absolute; opacity: 0; pointer-events: none; }
.lvpick label:has(input:checked) { border-color: var(--ink); background: var(--ink); color: #fff; }
.lvpick label:has(input:focus-visible) { outline: 2px solid var(--leaf); outline-offset: 2px; }
.fld { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 500; margin-bottom: 8px; }
.fld > span { display: flex; justify-content: space-between; }
.fld i { font-style: normal; font-family: var(--num); color: var(--muted); }
.fld i.over { color: var(--up); font-weight: 700; }
.fld textarea, .fld input { border: 1.5px solid var(--line); border-radius: 9px; padding: 8px 10px; background: #fff; font-size: 15px; width: 100%; resize: vertical; }
.fld textarea:focus, .fld input:focus, .thform input:focus { outline: 2px solid var(--leaf); outline-offset: 1px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nlist { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.nlist li { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: start; padding: 10px; border-radius: 10px; background: #F3F0E5; font-size: 14px; }
.nlist li p { margin: 0; line-height: 1.4; }
.nlist li small { color: var(--muted); font-size: 12px; }
.nlist li.st-live small b { color: var(--down); }
.nlist li.st-end, .nlist li.st-off { opacity: .62; }
.nlist .nb { grid-column: 2; display: flex; gap: 6px; }
.nlist .empty { display: block; text-align: center; color: var(--muted); }
.nl.lv-주의 { background: #F6E59A; }
.nl.lv-긴급 { background: #E9B9B5; color: #4A1012; }

/* 아래 탭 (모바일) */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(251, 250, 244, .97); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); height: calc(var(--tab) + env(safe-area-inset-bottom)); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; font-size: 11px; color: #8A9083; font-weight: 500; }
.tabbar a.on { color: var(--ink); font-weight: 700; }
.tabbar a.on svg { background: #E2E8D6; border-radius: 10px; }
.tabbar svg { padding: 2px 10px; width: 44px; height: 28px; box-sizing: border-box; overflow: visible; }

.foot { padding: 4px 16px 20px; max-width: 1360px; margin: 0 auto; }
.foot p { margin: 0; font-size: 12px; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: calc(var(--tab) + 14px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 40; background: var(--ink); color: #fff; font-size: 14px; padding: 10px 16px; border-radius: 12px; transition: .2s; max-width: calc(100% - 32px); width: max-content; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--up); }

/* 데스크톱 */
@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .toast { bottom: 24px; }
  .top { padding: 10px 28px; gap: 28px; }
  .tabs-top { display: flex; gap: 2px; }
  .tabs-top a { text-decoration: none; padding: 7px 14px; border-radius: 9px; font-weight: 500; color: var(--ink2); display: inline-flex; align-items: center; gap: 5px; }
  .tabs-top a:hover { background: #E6E3D5; }
  .tabs-top a.on { background: var(--ink); color: #fff; }
  .lock { width: 8px; height: 9px; border: 1.5px solid currentColor; border-radius: 2px; position: relative; top: 1px; opacity: .6; }
  .base span { display: inline; }
  #role, #base { width: auto; }
  #notice { padding: 12px 28px 0; max-width: 1360px; margin: 0 auto; }
  .pg { padding: 18px 28px 24px; }
  .pg-h { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 24px; }
  .pg-h h1 { font-size: 27px; }
  .seg { width: 420px; flex: none; }
  .map-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; }
  .mapcard { padding: 14px 16px 10px; }
  .side { display: block; padding: 16px 18px; }
  .side .rh { margin-top: 0; }
  .swipe { margin: 0; padding: 2px 0 6px; }
  .rcard { flex-basis: calc((100% - 50px) / 6); }
  .swipe-h .hint { display: none; }
  .region-pg .rh-n .big { font-size: 64px; }
  .wk .wcard { flex: 1 1 0; }
  .wk { overflow: visible; }
  .region-pg .dots { display: none; }
  .r-grid { grid-template-columns: 1.4fr 1fr; }
  .near ul { grid-template-columns: repeat(3, 1fr); column-gap: 18px; }
  .near li:last-child a { border-bottom: 1px solid var(--line2); }
  .tools { max-width: 560px; }
  .chips { margin: 0 0 12px; padding: 0; }
  .rank { padding: 4px 18px; }
  .rrow { grid-template-columns: 50px 1.3fr 90px 70px 100px 90px 150px 1fr; grid-template-areas: none; gap: 12px; padding: 9px 0; }
  .rrow > span { grid-area: auto !important; }
  .rrow.head { display: grid; font-size: 12px; color: var(--muted); padding: 10px 0 8px; }
  .rrow.head span { text-align: left; }
  .rrow .gd { justify-self: start; }
  .rrow .d { justify-self: start; }
  .rrow .ci { text-align: left; font-size: 14px; }
  .rrow .wx { display: block; font-family: var(--num); color: var(--ink2); font-size: 14px; }
  .rrow:not(.head):hover { background: #F3F0E4; }
  .admin-grid { grid-template-columns: 1fr 1fr; align-items: start; }
  .lockcard { grid-template-columns: auto 1fr auto; max-width: 720px; }
  .lockcard .btn { grid-column: auto; }
  .about { max-width: 720px; }
  .admin-grid + .about { max-width: none; }
  .cmp-pg .pick { max-width: 1000px; }
  .foot { padding: 4px 28px 24px; }
}
@media (min-width: 1280px) {
  .map-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
}
.nmore { justify-self: start; border: 0; background: none; font-size: 12px; color: var(--ink2); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; padding: 0 2px; }
.region-pg .sub { margin-bottom: 4px; }
.fcard { margin-top: 4px; }
#role { width: 84px; }
#base { width: 112px; }
@media (min-width: 960px) {
  .notice { padding: 7px 10px 7px 12px; align-items: center; }
  .r-grid { grid-template-columns: 1.2fr 1fr; }
  .near ul { grid-template-columns: 1fr; }
  .near li:last-child a { border-bottom: 0; }
  .lock { opacity: .55; margin-left: 2px; }
}
.map-grid > .topcol { min-width: 0; }
@media (min-width: 960px) {
  .map-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 250px !important; }
  .topcol .swipe-h { margin: 0 0 8px; }
  .topcol .swipe { flex-direction: column; overflow-x: hidden; overflow-y: auto; max-height: 600px; gap: 6px; scroll-snap-type: none; padding-right: 4px; scrollbar-width: thin; }
  .topcol .rcard { flex: none; width: 100%; grid-template-columns: 22px 1fr auto; grid-template-areas: "rk nm big" "rk bd row"; border-top: 0; border-left: 5px solid var(--g1); padding: 7px 10px; gap: 2px 6px; }
  .topcol .rcard.g2 { border-left-color: var(--g2); }
  .topcol .rcard.g3 { border-left-color: var(--g3); }
  .topcol .rcard.g4 { border-left-color: var(--g4); }
  .topcol .rcard .rk { grid-area: rk; }
  .topcol .rcard .nm { grid-area: nm; font-size: 14px; }
  .topcol .rcard .badge { grid-area: bd; grid-column: auto; }
  .topcol .rcard .big { grid-area: big; grid-column: auto; font-size: 24px; justify-self: end; }
  .topcol .rcard .big em { display: none; }
  .topcol .rcard .row { grid-area: row; grid-column: auto; justify-content: flex-end; }
  .topcol .rcard .ci, .topcol .rcard .spark, .topcol .dots { display: none; }
}
.ctable thead th:first-child { text-align: left; padding-left: 12px; }
@media (min-width: 960px) {
  .rrow { grid-template-columns: 50px 220px 100px 64px 120px 110px 170px 1fr; }
  .ctable table { table-layout: fixed; }
  .ctable thead th:first-child { width: 22%; }
}
.acol { min-width: 0; }
.acol .about { max-width: none; }
