/*
Theme Name: 벌점과태료
Description: elvenland.com 전용 테마. 외부 JS·웹폰트 0(애드센스 제외). 색 토큰은 여기 한 곳에서만 정의한다(부록 D-3).
Version: 1.0.0
Author: 벌점과태료 편집팀
*/

/* ── 색 토큰 (정본. 다른 파일에서 hex 를 새로 만들지 않는다)
   경찰 연상 금지: 파랑·흰색·금색의 관용 조합, 적·청 경광등 표현, 방패·독수리·계급장 마크 없음.
   토큰명에 police·siren·gov 를 쓰지 않는다(G2 정적 검사 대상). */
:root {
	--c-bg:        #F7F5F2;
	--c-surface:   #FFFFFF;
	--c-ink:       #292724;
	--c-ink-2:     #625D57;
	--c-line:      #DDD7D0;
	--c-line-2:    #C6BEB4;
	--c-brand:     #76543E;   /* 주 행동·포커스 (차분한 갈색) */
	--c-brand-deep:#5A3F2D;
	--c-tint:      #F1EAE3;
	--c-warn:      #8A5A16;
	--c-err:       #A43B35;
	--c-ok:        #3F6B4A;

	--r:      10px;
	--r-sm:   6px;
	--sp:     8px;
	--maxw:   1120px;
	--prosew: 720px;
	--fs:     16px;
	--fs-sm:  14px;    /* 375px 실측(2026-09-11)에서 13.5px 는 보조 텍스트로도 작았다. 본문 계열 최저값. */
	--fs-xs:  13px;    /* 캡션·단위·각주 전용. 이보다 작은 값을 새로 만들지 않는다. */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--c-bg);
	color: var(--c-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", sans-serif;
	font-size: var(--fs);
	line-height: 1.75;
	word-break: keep-all;
	overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; }
a { color: var(--c-brand-deep); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--c-brand); }
:focus-visible { outline: 3px solid var(--c-brand); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ── 레이아웃 */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.prose { max-width: var(--prosew); }
main { padding-block: 24px 48px; }

/* ── 머리말 */
.site-head { background: var(--c-surface); border-bottom: 1px solid var(--c-line); }
.site-head .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; font-size: 19px; text-decoration: none; color: var(--c-ink); letter-spacing: -0.01em; }
.brand span { color: var(--c-brand); }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; font-size: var(--fs-sm); text-decoration: none; color: var(--c-ink-2); border-radius: var(--r-sm); }
.site-nav a:hover { background: var(--c-tint); color: var(--c-ink); }

/* ── 제목 */
h1 { font-size: 28px; line-height: 1.35; margin: 0 0 12px; letter-spacing: -0.02em; }
h2 { font-size: 21px; line-height: 1.4; margin: 36px 0 10px; letter-spacing: -0.01em; }
h3 { font-size: 17.5px; margin: 24px 0 8px; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 6px; }
@media (min-width: 768px) { h1 { font-size: 34px; } h2 { font-size: 23px; } }

/* ── 결론 박스 */
.concl { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r); padding: 16px; margin: 0 0 20px; }
.concl-h { font-size: 17px; margin: 0 0 12px; }
.concl-cond { font-size: var(--fs-sm); color: var(--c-ink-2); margin: 0 0 10px; }
.concl-src { font-size: var(--fs-xs); color: var(--c-ink-2); margin: 12px 0 0; }
.concl-cta { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 0; }
.na { color: var(--c-ink-2); font-size: var(--fs-sm); }
.t-note { display: block; font-size: var(--fs-xs); color: var(--c-ink-2); }

/* ── 표 */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
caption { text-align: left; font-size: var(--fs-sm); color: var(--c-ink-2); padding-bottom: 6px; }
th, td { padding: 10px 8px; text-align: left; border-bottom: 1px solid var(--c-line); vertical-align: top; }
thead th { background: var(--c-tint); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }
.th-sub { display: block; font-weight: 400; font-size: var(--fs-xs); color: var(--c-ink-2); }
tbody th { font-weight: 600; white-space: nowrap; }
.concl-t td { font-variant-numeric: tabular-nums; }

/* 표 칸 안의 링크는 행이 촘촘해 탭 영역이 17px 밖에 안 됐다(375px 실측 2026-09-11).
   글자 크기는 그대로 두고 위아래 여백으로만 44px 를 만든다 — 행 높이는 padding 상쇄로 유지한다. */
td a, tbody th a { display: inline-flex; align-items: center; min-height: 44px; margin-block: -11px; }

/* 375px: 표 → 카드 2열. 같은 데이터를 한 번만 렌더하므로 값이 어긋날 수 없다 */
@media (max-width: 560px) {
	.concl-t thead { display: none; }
	.concl-t, .concl-t tbody, .concl-t tr, .concl-t th, .concl-t td { display: block; width: 100%; }
	.concl-t tr { border: 1px solid var(--c-line); border-radius: var(--r-sm); padding: 10px; margin-bottom: 10px; }
	.concl-t th, .concl-t td { border: 0; padding: 3px 0; }
	.concl-t tbody th { font-size: 15.5px; margin-bottom: 4px; border-bottom: 1px solid var(--c-line); padding-bottom: 6px; }
	/* 라벨이 길면(예: '보호구역 구분 코드') min-width 만으로는 값과 붙는다
	   — '보호구역 구분 코드자료 없음' 으로 나왔다(2026-09-12 실측).
	   라벨과 값을 두 칸으로 갈라 붙지 않게 한다. */
	.concl-t td { display: flex; gap: 8px; align-items: baseline; }
	.concl-t td::before { content: attr(data-label); color: var(--c-ink-2); font-size: var(--fs-sm);
		flex: 0 0 auto; min-width: 62px; max-width: 45%; }
	.speed-t tbody th { background: var(--c-tint); border-radius: var(--r-sm); padding: 6px 8px; }
}

/* ── 알림 박스 */
.notice { border: 1px solid var(--c-line); border-left: 4px solid var(--c-line-2); background: var(--c-surface); border-radius: var(--r-sm); padding: 12px 14px; margin: 0 0 18px; font-size: var(--fs-sm); }
.notice p { margin: 0 0 6px; }
.notice p:last-child { margin: 0; }
.notice-legal { background: var(--c-tint); border-left-color: var(--c-ink-2); }
.notice-pending { border-left-color: var(--c-warn); }
.notice-pending strong { color: var(--c-warn); }
.notice-err { border-left-color: var(--c-err); }
.notice-links { font-size: var(--fs-xs); }

/* ── 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: var(--r-sm); background: var(--c-brand); color: #fff; text-decoration: none; font-size: 15px; font-weight: 600; border: 1px solid var(--c-brand); cursor: pointer; }
.btn:hover { background: var(--c-brand-deep); color: #fff; }
.btn-ghost { background: var(--c-surface); color: var(--c-brand-deep); border-color: var(--c-line-2); }
.btn-ghost:hover { background: var(--c-tint); color: var(--c-brand-deep); }
.btn-sm { min-height: 38px; font-size: var(--fs-sm); padding: 0 12px; }

/* ── 카드 격자 */
.grid { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 0 0 24px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.card { display: block; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r); padding: 14px; text-decoration: none; color: var(--c-ink); transition: border-color 160ms, transform 160ms; }
.card:hover { border-color: var(--c-line-2); transform: translateY(-2px); color: var(--c-ink); }
.card-t { font-weight: 600; font-size: 15.5px; margin: 0 0 4px; }
.card-d { font-size: var(--fs-sm); color: var(--c-ink-2); margin: 0; }
.card-n { font-size: var(--fs-xs); color: var(--c-brand-deep); margin: 6px 0 0; font-variant-numeric: tabular-nums; }

/* ── 도구 */
.tool { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r); padding: 16px; margin: 0 0 24px; }
.tool-noscript { font-size: var(--fs-sm); color: var(--c-ink-2); }
.f-row { margin: 0 0 14px; }
.f-row > label, .f-legend { display: block; font-size: var(--fs-sm); font-weight: 600; margin: 0 0 6px; }
fieldset { border: 0; padding: 0; margin: 0 0 14px; }
input[type="text"], input[type="number"], input[type="search"], select {
	width: 100%; min-height: 44px; padding: 8px 10px; font-size: 16px;
	border: 1px solid var(--c-line-2); border-radius: var(--r-sm); background: var(--c-surface); color: var(--c-ink);
}
/* 체크박스·라디오는 브라우저 기본이 13px 라 손가락으로 겨냥하기 작다(375px 실측 2026-09-11).
   감싼 label 이 이미 44px 라 누르는 데는 지장이 없지만, 글리프 자체도 키운다. */
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 0; flex: none; accent-color: var(--c-brand); }

.f-unit { display: flex; align-items: center; gap: 8px; }
.f-unit input { flex: 1; }
.f-unit .unit { font-size: var(--fs-sm); color: var(--c-ink-2); white-space: nowrap; }
.f-hint { font-size: var(--fs-xs); color: var(--c-ink-2); margin: 5px 0 0; }
.pick { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.pick label { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--c-line-2); border-radius: var(--r-sm); font-size: 14.5px; cursor: pointer; background: var(--c-surface); }
.pick label:hover { background: var(--c-tint); }
.pick input:checked + span { font-weight: 600; }
.pick label:has(input:checked) { border-color: var(--c-brand); background: var(--c-tint); }
.ac { position: relative; }
.ac-list { list-style: none; margin: 4px 0 0; padding: 0; border: 1px solid var(--c-line-2); border-radius: var(--r-sm); background: var(--c-surface); max-height: 260px; overflow-y: auto; }
.ac-list li { margin: 0; }
.ac-list button { display: block; width: 100%; text-align: left; min-height: 44px; padding: 8px 10px; border: 0; background: none; font-size: 15px; cursor: pointer; color: var(--c-ink); border-bottom: 1px solid var(--c-line); }
.ac-list button:hover { background: var(--c-tint); }
.ac-alias { display: block; font-size: var(--fs-xs); color: var(--c-ink-2); }
.res { min-height: 128px; border-top: 1px solid var(--c-line); margin-top: 16px; padding-top: 16px; }
.res-line { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--c-line); font-size: 15.5px; }
.res-line .k { color: var(--c-ink-2); font-size: var(--fs-sm); }
.res-line .v { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.res-sub { font-size: var(--fs-xs); color: var(--c-ink-2); margin: 8px 0 0; }
.res-empty { color: var(--c-ink-2); font-size: var(--fs-sm); }
.items { list-style: none; padding: 0; margin: 0 0 12px; }
.items li { border: 1px solid var(--c-line); border-radius: var(--r-sm); padding: 10px; margin-bottom: 8px; font-size: 14.5px; }
.items .it-h { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.items .it-c { font-size: var(--fs-xs); color: var(--c-ink-2); }
.tool-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.chk { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14.5px; }
.chk input { width: 20px; height: 20px; }

/* ── 지도·플레이어 façade */
.map-box { aspect-ratio: 16 / 9; max-width: 100%; background: var(--c-tint); border: 1px solid var(--c-line); border-radius: var(--r); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 14px; text-align: center; }
.map-alt { font-size: var(--fs-sm); color: var(--c-ink-2); margin: 0; }

/* 지도가 열린 뒤 — 타일 격자는 절대배치, 상자가 자르는 창이 된다.
   높이를 고정해 두어 타일이 들어와도 레이아웃이 밀리지 않는다(CLS 0). */
/* '지도 보기' 버튼 — 다른 버튼과 같은 44px 규격을 쓴다(.btn 을 따로 두지 않고
   여기서 맞춘다). 2026-09-12 실측에서 162x24 로 잡혔다. */
.map-open { display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
	padding: 0 16px; border-radius: var(--r-sm); background: var(--c-brand); color: #fff;
	border: 1px solid var(--c-brand); font-size: 15px; font-weight: 600; cursor: pointer; }
.map-open:hover { background: var(--c-brand-deep); }

.map-box.map-live { display: block; padding: 0; overflow: hidden; position: relative; cursor: grab; background: var(--c-tint); }
.map-box.map-grab { cursor: grabbing; }
.map-pane { position: absolute; inset: 0; }
.map-tile { position: absolute; width: 256px; height: 256px; user-select: none; -webkit-user-drag: none; }
.map-marks { position: absolute; inset: 0; pointer-events: none; }
.map-mark { position: absolute; width: 11px; height: 11px; margin: -6px 0 0 -6px; border-radius: 50%;
	background: var(--c-err); border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.map-ctl { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; gap: 4px; }
.map-zoom { width: 44px; height: 44px; font-size: 19px; line-height: 1; border: 1px solid var(--c-line-2);
	background: var(--c-surface); color: var(--c-ink); border-radius: var(--r-sm); cursor: pointer; }
.map-zoom:hover { background: var(--c-tint); }
.map-attr { position: absolute; bottom: 0; right: 0; font-size: var(--fs-xs); color: var(--c-ink-2);
	background: rgba(255,255,255,.85); padding: 2px 6px; border-top-left-radius: var(--r-sm); }
.map-links { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; font-size: var(--fs-sm); margin: 0; }
.player-box { aspect-ratio: 16 / 9; background: var(--c-tint); border: 1px solid var(--c-line); border-radius: var(--r); display: flex; align-items: center; justify-content: center; }

/* ── 광고 자리(예약 높이로 CLS 0) */
.ad-slot { margin: 24px 0; min-height: 100px; }
.ad-slot.ad-infeed { min-height: 120px; }

/* ── 목록 */
.list { list-style: none; padding: 0; margin: 0 0 24px; }
.list li { border-bottom: 1px solid var(--c-line); }
.list a { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; min-height: 48px; padding: 10px 0; text-decoration: none; color: var(--c-ink); }
.list a:hover { color: var(--c-brand-deep); }
.list .l-n { font-size: var(--fs-sm); color: var(--c-ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── 빵부스러기·메타 */
/* 현재 위치 — '홈' 한 글자가 13x14px 탭 타깃이었다(375px 실측 2026-09-11).
   글자는 작게 두되 링크마다 세로 44px 를 확보한다. 줄 높이는 음수 마진으로 되돌린다. */
.bc { font-size: var(--fs-sm); color: var(--c-ink-2); margin: 0 0 10px; line-height: 1.6; }
.bc a { color: var(--c-ink-2); display: inline-flex; align-items: center; min-height: 44px; padding-inline: 4px; margin-block: -12px; margin-inline: -4px; }
.meta { font-size: var(--fs-xs); color: var(--c-ink-2); margin: 0 0 18px; }

/* ── FAQ */
.faq { margin: 0 0 24px; }
.faq details { border: 1px solid var(--c-line); border-radius: var(--r-sm); background: var(--c-surface); margin-bottom: 8px; }
.faq summary { min-height: 48px; display: flex; align-items: center; padding: 10px 14px; font-weight: 600; font-size: 15px; cursor: pointer; }
.faq .faq-a { padding: 0 14px 12px; font-size: 14.5px; color: var(--c-ink); }

/* ── 꼬리말 */
.site-foot { background: var(--c-surface); border-top: 1px solid var(--c-line); margin-top: 48px; padding-block: 24px 32px; font-size: var(--fs-sm); color: var(--c-ink-2); }
/* 꼬리말 링크도 24px 였다(375px 실측 2026-09-11). 세로 44px 확보. */
.site-foot a { color: var(--c-ink-2); display: inline-flex; align-items: center; min-height: 44px; }
.foot-nav { display: flex; gap: 14px; flex-wrap: wrap; margin: 0 0 12px; align-items: center; }
.site-foot p a { margin-block: -12px; }

/* ── 모션 감소 */
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; animation: none !important; }
	.card:hover { transform: none; }
}
