/*
 * chukje.manuz.com — 지역 축제. 컨셉: 축제 포스터·달력.
 * 크림색 종이 바탕 + 먹색 굵은 테두리와 어긋난 그림자(인쇄 포스터), 토마토·노랑·청록 원색 블록,
 * 제목·큰 숫자는 Black Han Sans(포스터 글씨), 본문은 Pretendard. 목록 카드 왼쪽은 달력 날짜 칸.
 * 다크모드 없음(사이트마다 다른 인상을 위해 밝은 종이 하나로). 모바일 우선: 390px, 터치 44px, 가로 넘침 0.
 */
:root {
  --paper: #fff7e8; --card: #fffdf8; --ink: #1c1633; --ink-2: #4a4363; --muted: #7a7290;
  --tomato: #f0532b; --tomato-d: #c63a16; --sun: #ffc83d; --sun-soft: #fff0bf; --teal: #13a39b; --teal-soft: #d6f2ef;
  --berry: #d93a6c; --sky: #3b6fe0;
  --line: #1c1633; --hair: #e7dcc6;
  --shadow: 4px 4px 0 var(--ink); --shadow-s: 3px 3px 0 var(--ink);
  --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --display: "Black Han Sans", "Pretendard", "Apple SD Gothic Neo", sans-serif;
  --wrap: 980px; --r: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font-family: var(--font); font-size: 16px; line-height: 1.65; color: var(--ink); background: var(--paper); word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
main a { color: var(--tomato-d); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: 16px; }
.skip { position: absolute; left: -9999px; top: 10px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; font-weight: 700; }
.skip:focus { left: 10px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.small { font-size: .875rem; color: var(--ink-2); }
h2 { font-family: var(--display); font-weight: 400; font-size: 1.45rem; line-height: 1.3; margin: 40px 0 12px; letter-spacing: -.01em; }
h2 .small { font-family: var(--font); font-weight: 700; }
section > p { margin: 8px 0; }

/* 머리: 토마토색 띠 + 원색 줄무늬(포스터 띠지) */
.mast { background: var(--tomato); color: #fff; position: sticky; top: 0; z-index: 20; border-bottom: 3px solid var(--ink); }
.mast::after { content: ""; display: block; height: 8px; background: repeating-linear-gradient(90deg, var(--sun) 0 28px, var(--teal) 28px 56px, var(--berry) 56px 84px, var(--sky) 84px 112px); border-top: 3px solid var(--ink); }
.mast-in { display: flex; align-items: center; gap: 12px; min-height: 58px; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; flex: none; text-decoration: none; min-height: 44px; }
.wm-icon { width: 30px; height: 30px; }
.wm-icon rect { fill: var(--ink); }
.wm-text { font-family: var(--display); font-size: 1.35rem; letter-spacing: .01em; }
.nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px; font-size: .92rem; font-weight: 700; color: #fff; text-decoration: none; }
.nav a:hover { background: rgba(0, 0, 0, .14); }
.nav a[aria-current="page"] { background: var(--sun); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
@media (max-width: 640px) {
  .mast-in { flex-wrap: wrap; padding-top: 6px; gap: 0; }
  .nav { margin-inline: -16px; padding: 0 12px 6px; width: calc(100% + 32px); }
}
.main { flex: 1; padding-block: 18px 48px; }

/* 소개: 포스터 제목 */
.hero { padding: 6px 0 16px; }
.eyebrow { display: inline-block; margin: 0 0 10px; padding: 3px 10px; font-size: .82rem; font-weight: 800; color: var(--ink); background: var(--sun); border: 2px solid var(--ink); border-radius: 4px; transform: rotate(-1.5deg); }
.h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 4vw + 1rem, 3.1rem); line-height: 1.12; letter-spacing: -.01em; }
.lead { margin: 12px 0 0; color: var(--ink-2); max-width: 680px; }
.asof { margin: 8px 0 0; font-size: .82rem; color: var(--muted); }
.past-note { margin: 12px 0 0; padding: 10px 12px; border: 2px dashed var(--ink-2); border-radius: var(--r); background: var(--card); color: var(--ink-2); font-size: .92rem; }

/* 검색 */
.search { display: flex; gap: 8px; margin: 6px 0 22px; max-width: 600px; }
.search input { flex: 1; min-width: 0; height: 52px; padding: 0 14px; font: inherit; font-size: 1.05rem; color: var(--ink); background: var(--card); border: 2px solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow-s); }
.search input:focus { outline: none; border-color: var(--sky); }
.search button, .btn { flex: none; display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 20px; font: inherit; font-weight: 800; color: var(--ink); background: var(--sun); border: 2px solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow-s); cursor: pointer; text-decoration: none; }
.btn { min-height: 46px; background: var(--card); color: var(--ink) !important; }
.search button:active, .btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

/* 핵심 숫자: 원색 포스터 블록 */
.kpis { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 12px; margin: 6px 0 10px; }
.kpi { display: block; background: var(--card); border: 2px solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px; color: var(--ink); text-decoration: none; }
.kpi:nth-child(2) { background: var(--teal-soft); }
.kpi:nth-child(3) { background: var(--sun-soft); }
.kpi.main { background: var(--tomato); color: #fff; }
a.kpi:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.kpi p { margin: 0; }
.k-lbl { font-size: .85rem; font-weight: 800; }
.k-sub { font-weight: 500; opacity: .85; }
.k-val { font-family: var(--display); font-weight: 400; font-size: 2.2rem; line-height: 1.15; margin: 6px 0 4px !important; letter-spacing: -.01em; }
.k-val.sm { font-size: 1.6rem; }
.kpi.main .k-val { font-size: 2.8rem; }
.k-foot { font-size: .85rem; opacity: .9; }
@media (max-width: 720px) { .kpis { grid-template-columns: 1fr 1fr; } .kpi.main { grid-column: 1 / -1; } }

/* 해설: 노란 메모지 */
.notes { background: var(--sun-soft); border: 2px solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow); padding: 6px 18px 4px; margin-top: 26px; }
.notes h2 { margin: 12px 0 2px; font-size: 1.15rem; }
.notes p { margin: 8px 0 12px; }

/* 행사 목록: 달력 날짜 칸 + 카드 */
.flist { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 12px; }
.fi { display: grid; grid-template-columns: 62px 1fr auto; gap: 2px 12px; background: var(--card); border: 2px solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow-s); padding: 12px 14px 12px 12px; }
.fi-date { grid-row: 1 / span 4; align-self: start; display: grid; text-align: center; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; background: #fff; line-height: 1.1; }
.fd-m { background: var(--tomato); color: #fff; font-size: .72rem; font-weight: 800; padding: 3px 0; border-bottom: 2px solid var(--ink); }
.fd-d { font-family: var(--display); font-size: 1.6rem; padding: 4px 0 0; }
.fd-w { font-size: .72rem; font-weight: 700; color: var(--ink-2); padding: 0 0 4px; }
.st-on .fd-m { background: var(--teal); }
.st-past .fd-m { background: var(--muted); }
.st-past { box-shadow: none; border-style: dashed; }
.fi-t { grid-column: 2; font-weight: 800; font-size: 1.02rem; line-height: 1.4; text-decoration: none; color: var(--ink) !important; align-self: center; }
.fi-t:hover { text-decoration: underline; }
.fi-b { grid-column: 3; grid-row: 1; align-self: start; font-size: .75rem; font-weight: 800; white-space: nowrap; padding: 2px 8px; border: 2px solid var(--ink); border-radius: 999px; background: var(--sun); }
.st-on .fi-b { background: var(--teal); color: #fff; }
.st-past .fi-b { background: transparent; color: var(--muted); border-color: var(--muted); font-weight: 600; }
.fi-m, .fi-tags, .fi-camp { grid-column: 2 / -1; margin: 0; font-size: .86rem; color: var(--ink-2); }
.fi-m b { color: var(--tomato-d); }
.fi-tags { margin-top: 4px; }
.tag { display: inline-block; font-size: .74rem; padding: 1px 8px; margin: 0 4px 2px 0; border-radius: 999px; border: 1.5px solid var(--ink-2); color: var(--ink-2); font-weight: 700; }
.tag.free { background: var(--teal); border-color: var(--teal); color: #fff; }
.fi-camp { margin-top: 6px; padding-top: 6px; border-top: 1.5px dashed var(--hair); }
@media (max-width: 420px) {
  .fi { grid-template-columns: 54px 1fr; }
  .fi-b { grid-column: 2; grid-row: auto; justify-self: start; margin-top: 4px; }
  .fd-d { font-size: 1.4rem; }
}

/* 월 달력: 날짜 머리 */
.day-h { display: flex; align-items: baseline; gap: 8px; margin: 32px 0 6px; font-size: 1.25rem; padding-bottom: 6px; border-bottom: 3px solid var(--ink); }
.pager { display: flex; justify-content: space-between; gap: 12px; margin: 6px 0 10px; }
.pager a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); font-weight: 800; text-decoration: none; color: var(--ink); }

/* 막대 */
.bars { list-style: none; margin: 0; padding: 14px; display: grid; gap: 6px; background: var(--card); border: 2px solid var(--ink); border-radius: var(--r); }
.bars li { display: grid; grid-template-columns: 7.2rem 1fr 3.4rem; gap: 10px; align-items: center; font-size: .88rem; min-height: 32px; }
.b-lbl a { font-weight: 700; }
.b-bar { height: 16px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 3px; overflow: hidden; }
.b-bar span { display: block; height: 100%; background: var(--sun); }
.bars li.mark .b-bar span { background: var(--tomato); }
.bars li.mark .b-lbl, .bars li.mark .b-val { font-weight: 800; }
.b-val { text-align: right; font-weight: 700; }

/* 사진: 원본 비율 그대로(3유형 변경금지) */
.photo { margin: 18px 0; background: #fff; border: 2px solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.photo img { display: block; width: 100%; height: auto; max-height: 460px; object-fit: contain; aspect-ratio: 3 / 2; background: #fff; }
.photo figcaption { padding: 6px 12px; border-top: 2px solid var(--ink); background: var(--card); }
.prose { background: var(--card); border: 2px solid var(--ink); border-radius: var(--r); padding: 14px 16px; }

/* 표 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 2px solid var(--ink); border-radius: var(--r); background: var(--card); margin: 10px 0; }
.tbl { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tbl th, .tbl td { padding: 11px 12px; border-bottom: 1.5px solid var(--hair); text-align: left; vertical-align: top; }
.tbl thead th { font-size: .8rem; font-weight: 800; background: var(--ink); color: #fff; white-space: nowrap; }
.tbl tbody th { font-weight: 700; }
.tbl tbody tr:last-child > * { border-bottom: 0; }
.tbl .r { text-align: right; white-space: nowrap; }
.tbl.info tbody th { width: 6.5em; white-space: nowrap; background: var(--sun-soft); border-right: 1.5px solid var(--hair); }
.tbl tbody th[scope="row"] { min-width: 6em; }

/* 칩·탭 */
.chips, .tabs { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a, .chips span, .tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); font-size: .9rem; font-weight: 700; text-decoration: none; color: var(--ink) !important; }
.chips a:hover, .tabs a:hover { background: var(--sun); }
.links { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 4px; }
.links li { min-height: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; }
.toc { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 6px 0 10px; }
.toc a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; font-weight: 700; }
#data ul, #limits ul, #calc ol { padding-left: 1.2em; }
#data li, #limits li, #calc li { margin: 6px 0; }
.months summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 800; color: var(--tomato-d); }

/* 공용 조각(pub-*) */
.crumbs ol { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: .82rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 4px; }
.crumbs a { color: var(--ink-2); }
.ad { min-height: 280px; margin: 30px 0; padding: 8px 0; border-top: 2px dashed var(--hair); border-bottom: 2px dashed var(--hair); }
.faq { margin-top: 10px; }
.faq details { background: var(--card); border: 2px solid var(--ink); border-radius: var(--r); margin: 8px 0; padding: 0 14px; }
.faq summary { cursor: pointer; min-height: 48px; padding: 10px 0; font-weight: 800; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--sun); border: 2px solid var(--ink); font-weight: 800; }
.faq details[open] summary::after { content: "−"; }
.faq-a { padding: 0 0 14px; color: var(--ink-2); }
.src-block { margin-top: 40px; padding-top: 10px; border-top: 3px solid var(--ink); }
.src-block h2 { font-size: 1.1rem; margin-top: 12px; }
.src { padding-left: 1.2em; font-size: .9rem; }
.src li { min-height: 32px; }
.changelog { padding-left: 1.2em; font-size: .9rem; }
.changelog time { font-variant-numeric: tabular-nums; color: var(--muted); margin-right: 6px; }

/* 꼬리: 먹색 바탕 */
.foot { background: var(--ink); color: #d9d4ea; padding: 28px 0 36px; font-size: .84rem; border-top: 3px solid var(--ink); }
.foot::before { content: ""; display: block; height: 8px; margin-top: -28px; margin-bottom: 24px; background: repeating-linear-gradient(90deg, var(--sun) 0 28px, var(--teal) 28px 56px, var(--berry) 56px 84px, var(--sky) 84px 112px); }
.foot a { color: #fff; }
.foot-brand { margin: 0 0 8px; font-family: var(--display); font-size: 1.2rem; color: #fff; }
.foot-note { margin: 6px 0; max-width: 720px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 4px; margin: 12px 0 8px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; }
.foot-copy { margin: 0; }
/* 시도 칩 한 줄: 모바일에서 세로로 쌓이지 않게 상자 안에서만 가로로 민다(페이지 가로 넘침 아님) */
.chips.row, .tabs.row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding: 2px 16px 6px; }
.chips.row::-webkit-scrollbar, .tabs.row::-webkit-scrollbar { display: none; }
.chips.row li, .tabs.row li { flex: none; }
