/* 오늘나들이 디자인 시스템 */
:root{
  --brand:#f2542d;--brand-strong:#d9431f;--brand-soft:#fff1ec;--brand-ink:#fff;
  --bg:#fff;--surface:#f6f7f9;--surface-2:#eef0f3;--line:#e8eaee;--line-strong:#d6d9df;
  --text:#16181d;--text-2:#4e5562;--text-3:#8a909b;
  --live:#e5345b;--live-soft:#ffecf0;--soon:#f08c00;--soon-soft:#fff4e0;--later:#1c7ed6;--later-soft:#e8f3ff;--ok:#0e9f6e;--ok-soft:#e6f7f0;
  --gov:#1864ab;--gov-soft:#e7f1fb;
  --radius:14px;--radius-sm:10px;
  --shadow-1:0 1px 2px rgba(16,24,40,.05),0 1px 3px rgba(16,24,40,.06);
  --shadow-2:0 8px 24px rgba(16,24,40,.08),0 2px 6px rgba(16,24,40,.05);
  --header-h:58px;--tab-h:62px;--maxw:1080px;
  --font:"Pretendard Variable",Pretendard,-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Noto Sans KR",sans-serif;
}
@media (prefers-color-scheme:dark){:root{
  --brand:#ff6a45;--brand-strong:#ff8566;--brand-soft:#3a1d14;
  --bg:#0f1115;--surface:#181b21;--surface-2:#20242b;--line:#262a32;--line-strong:#333844;
  --text:#eef0f3;--text-2:#b4bac5;--text-3:#7f8693;
  --live-soft:#3d1520;--soon-soft:#3a2a0d;--later-soft:#12263d;--ok-soft:#0f2e24;--gov:#74c0fc;--gov-soft:#14283b;
  --shadow-1:none;--shadow-2:0 8px 24px rgba(0,0,0,.4);
}}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-padding-top:calc(var(--header-h) + 52px)}
body{margin:0;background:var(--bg);color:var(--text);font:16px/1.6 var(--font);letter-spacing:-.01em;word-break:keep-all;overflow-wrap:anywhere;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
button{font:inherit;color:inherit}
:focus-visible{outline:2px solid var(--brand);outline-offset:2px;border-radius:6px}
.wrap{max-width:var(--maxw);margin:0 auto;padding:0 20px}
.muted{color:var(--text-3)}.small{font-size:13px}

/* 헤더 */
.hd{position:sticky;top:0;z-index:30;height:var(--header-h);background:color-mix(in srgb,var(--bg) 88%,transparent);backdrop-filter:saturate(1.6) blur(14px);-webkit-backdrop-filter:saturate(1.6) blur(14px);border-bottom:1px solid var(--line)}
.hd .wrap{display:flex;align-items:center;height:100%;gap:20px}
.logo{display:flex;align-items:center;gap:8px;font-weight:800;font-size:18px;letter-spacing:-.03em}
.logo svg{width:28px;height:28px}
.gnb{display:flex;gap:4px;margin-left:8px}
.gnb a{padding:8px 12px;border-radius:999px;font-size:15px;font-weight:600;color:var(--text-2)}
.gnb a:hover{background:var(--surface)}.gnb a[aria-current]{color:var(--text);background:var(--surface)}
.hd-search{margin-left:auto;display:flex;align-items:center;gap:8px;height:40px;padding:0 14px;border-radius:999px;background:var(--surface);border:1px solid var(--line);color:var(--text-3);font-size:14px;cursor:pointer;min-width:220px}
.hd-search svg{width:18px;height:18px}
@media (max-width:760px){.gnb{display:none}.hd-search{min-width:0;width:40px;padding:0;justify-content:center;background:transparent;border:0;color:var(--text)}.hd-search span{display:none}.hd-search svg{width:22px;height:22px}.hd .wrap{gap:8px}}

/* 하단 탭바 (모바일) */
.tabbar{display:none}
@media (max-width:760px){
  .tabbar{display:grid;grid-template-columns:repeat(4,1fr);position:fixed;left:0;right:0;bottom:0;z-index:30;height:calc(var(--tab-h) + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:color-mix(in srgb,var(--bg) 92%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-top:1px solid var(--line)}
  .tabbar a,.tabbar button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:11px;font-weight:600;color:var(--text-3);background:none;border:0;cursor:pointer}
  .tabbar svg{width:22px;height:22px}
  .tabbar [aria-current]{color:var(--text)}
  body{padding-bottom:calc(var(--tab-h) + env(safe-area-inset-bottom))}
  body.has-actions .tabbar{display:none}
}

/* 공통 타이포·섹션 */
main{min-height:60vh}
.page-head{padding:28px 0 8px}
.page-head h1{font-size:28px;line-height:1.3;letter-spacing:-.035em;margin:6px 0 8px;font-weight:800}
.page-head p{margin:0;color:var(--text-2)}
.crumb{font-size:13px;color:var(--text-3);display:flex;gap:6px;flex-wrap:wrap}
.crumb a:hover{color:var(--text)}
.sec{padding:28px 0 4px}
.sec-h{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:0 0 14px}
.sec-h h2{font-size:21px;letter-spacing:-.03em;margin:0;font-weight:800}
.sec-h a{font-size:14px;color:var(--text-3);font-weight:600;white-space:nowrap}
.sec-h a:hover{color:var(--text)}
h3{font-size:15px;font-weight:700;margin:18px 0 8px;color:var(--text-2)}

/* 배지·태그 */
.badge{display:inline-flex;align-items:center;gap:5px;height:24px;padding:0 9px;border-radius:999px;font-size:12px;font-weight:700;background:var(--surface-2);color:var(--text-2);white-space:nowrap}
.badge.live{background:var(--live-soft);color:var(--live)}
.badge.live::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;animation:pulse 1.6s infinite}
.badge.soon{background:var(--soon-soft);color:var(--soon)}
.badge.later{background:var(--later-soft);color:var(--later)}
.thumb .badge{background:var(--bg)}
.thumb .badge.live{background:var(--live);color:#fff}.thumb .badge.soon{background:var(--soon);color:#fff}
@keyframes pulse{50%{opacity:.35}}
.tagbs{display:flex;flex-wrap:wrap;gap:5px}
.tagb{display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:6px;font-size:12px;font-weight:600;background:var(--surface);color:var(--text-2)}
.tagb.hot{background:var(--brand-soft);color:var(--brand-strong)}
.tagb.gov{background:var(--gov-soft);color:var(--gov)}

/* 버튼·칩 */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:46px;padding:0 18px;border-radius:12px;font-size:15px;font-weight:700;background:var(--surface);border:1px solid var(--line);cursor:pointer;white-space:nowrap}
.btn:hover{background:var(--surface-2)}
.btn svg{width:18px;height:18px}
.btn.primary{background:var(--brand);border-color:var(--brand);color:var(--brand-ink)}
.btn.primary:hover{background:var(--brand-strong)}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{display:inline-flex;align-items:center;height:38px;padding:0 15px;border-radius:999px;background:var(--surface);border:1px solid var(--line);font-size:14px;font-weight:600;color:var(--text-2);cursor:pointer;white-space:nowrap}
.chip:hover{border-color:var(--line-strong);color:var(--text)}
.chip.on{background:var(--text);border-color:var(--text);color:var(--bg)}
.chip .n{color:var(--text-3);font-weight:500;margin-left:5px}
.chip.on .n{color:inherit;opacity:.7}
.scroll-x{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;margin:0 -20px;padding:0 20px 2px}
.scroll-x::-webkit-scrollbar{display:none}

/* 이미지 카드 */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:22px 18px}
.rail{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(220px,250px);gap:14px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding:0 20px;scrollbar-width:none;margin:0 -20px;padding:0 20px 4px}
.rail::-webkit-scrollbar{display:none}
.rail>*{scroll-snap-align:start}
.icard{display:block}
.icard:hover .thumb img{transform:scale(1.02)}
.icard:hover .t{color:var(--brand-strong)}
.thumb{position:relative;aspect-ratio:4/3;border-radius:var(--radius);overflow:hidden;background:var(--surface-2)}
.thumb img{width:100%;height:100%;object-fit:contain;transition:transform .25s}
.thumb .badge{position:absolute;left:10px;top:10px;box-shadow:var(--shadow-1)}
.thumb.empty{display:grid;place-items:center;color:var(--text-3)}
.thumb.empty svg{width:40px;height:40px;opacity:.45}
.icard .t{margin:10px 2px 2px;font-size:16px;font-weight:700;line-height:1.4;letter-spacing:-.02em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;transition:color .15s}
.icard .m{margin:0 2px;font-size:13px;color:var(--text-3)}
.icard .tagbs{margin:6px 2px 0}

/* 날짜 칸 목록 */
.rows{list-style:none;margin:0;padding:0;border-top:1px solid var(--line)}
.row{display:flex;align-items:center;gap:14px;padding:14px 2px;border-bottom:1px solid var(--line)}
.row:hover .rt{color:var(--brand-strong)}
.dtile{flex:none;width:58px;height:56px;white-space:nowrap;border-radius:12px;background:var(--surface);display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.15}
.dtile b{font-size:20px;font-weight:800;letter-spacing:-.03em}
.dtile span{font-size:11px;color:var(--text-3);font-weight:600;letter-spacing:-.04em}
.dtile.live{background:var(--live-soft);color:var(--live)}.dtile.live span{color:var(--live)}
.dtile.muted{opacity:.6}
.rbody{flex:1;min-width:0}
.rt{font-size:16px;font-weight:700;letter-spacing:-.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .15s}
.rm{font-size:13px;color:var(--text-3);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rbody .tagbs{margin-top:6px}
.rthumb{flex:none;width:76px;height:57px;border-radius:10px;overflow:hidden;background:var(--surface-2)}
.rthumb img{width:100%;height:100%;object-fit:contain}

/* 홈 */
.hero{padding:40px 0 8px}
.hero h1{font-size:36px;line-height:1.22;letter-spacing:-.045em;margin:0 0 10px;font-weight:800}
.hero h1 em{font-style:normal;color:var(--brand)}
.hero p{color:var(--text-2);margin:0 0 22px;font-size:17px}
.searchbox{display:flex;align-items:center;gap:10px;height:56px;padding:0 18px;border-radius:16px;background:var(--surface);border:1px solid var(--line);color:var(--text-3);font-size:16px;width:100%;max-width:560px;cursor:text;text-align:left}
.searchbox:hover{border-color:var(--line-strong)}
.searchbox svg{width:22px;height:22px;flex:none}
.hero .scroll-x{margin-top:14px}
@media (max-width:760px){.hero{padding:24px 0 4px}.hero h1{font-size:28px}.hero p{font-size:15px;margin-bottom:16px}}
.promo{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:22px 24px;border-radius:var(--radius);background:linear-gradient(120deg,var(--brand-soft),var(--surface));border:1px solid var(--line)}
.promo b{display:block;font-size:18px;letter-spacing:-.03em}
.promo span{color:var(--text-2);font-size:14px}
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:10px}
.tile{display:flex;flex-direction:column;gap:2px;padding:14px;border-radius:var(--radius-sm);background:var(--surface);border:1px solid transparent}
.tile:hover{border-color:var(--line-strong)}
.tile b{font-size:16px}.tile span{font-size:12px;color:var(--text-3)}
.tile.now{background:var(--text);color:var(--bg)}.tile.now span{color:inherit;opacity:.7}

/* 축제 상세 */
.fx-head{padding:20px 0 0}
.fx-head .tagbs{margin:12px 0 0}
.fx-head h1{font-size:32px;line-height:1.25;letter-spacing:-.04em;margin:8px 0 10px;font-weight:800}
.lead{font-size:17px;color:var(--text-2);margin:0;line-height:1.65;max-width:720px}
.fx-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:40px;align-items:start;padding-top:22px}
.fx-aside{position:sticky;top:calc(var(--header-h) + 16px)}
@media (max-width:900px){.fx-layout{grid-template-columns:minmax(0,1fr);gap:0}.fx-aside{position:static;order:-1}}
.photo{margin:0}
.photo .ph{border-radius:var(--radius);overflow:hidden;background:var(--surface-2)}
.photo img{width:100%;max-height:520px;object-fit:contain}
.photo figcaption{font-size:12px;color:var(--text-3);padding:6px 2px 0}
.card{border:1px solid var(--line);border-radius:var(--radius);padding:20px;background:var(--bg);box-shadow:var(--shadow-1)}
.facts{margin:0;display:grid;gap:14px}
.facts>div{display:grid;grid-template-columns:22px 1fr;gap:10px;align-items:start}
.facts svg{width:20px;height:20px;color:var(--text-3);margin-top:1px}
.facts dt{font-size:12px;color:var(--text-3);font-weight:600}
.facts dd{margin:1px 0 0;font-weight:700;font-size:15px;line-height:1.5}
.facts dd small{display:block;font-weight:400;font-size:13px;color:var(--text-2)}
.facts dd .badge{margin-right:6px;vertical-align:1px}
.card .actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:18px}
.card .actions .primary{grid-column:1/-1}
@media (max-width:900px){.fx-aside .card{margin:0 0 20px}}
@media (max-width:760px){.card .actions{display:none}}
.subnav{position:sticky;top:var(--header-h);z-index:20;background:var(--bg);border-bottom:1px solid var(--line);margin-top:26px}
.subnav .scroll-x{margin:0;padding:0;gap:0}
.subnav a{padding:14px 14px 12px;font-size:15px;font-weight:700;color:var(--text-3);border-bottom:2px solid transparent;white-space:nowrap}
.subnav a:first-child{padding-left:2px}
.subnav a.on{color:var(--text);border-color:var(--text)}
.fx-sec{padding:30px 0 6px}
.fx-sec>h2{font-size:21px;letter-spacing:-.03em;margin:0 0 14px;font-weight:800}
.prose p{margin:0 0 12px;color:var(--text-2);line-height:1.85}
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:0 0 4px}
.stats div{background:var(--surface);border-radius:var(--radius-sm);padding:12px 8px;text-align:center}
.stats b{display:block;font-size:20px;letter-spacing:-.03em}
.stats span{font-size:12px;color:var(--text-3)}
.parks{list-style:none;margin:0;padding:0}
.pk{display:flex;gap:12px;align-items:flex-start;padding:14px 0;border-bottom:1px solid var(--line)}
.pk:last-child{border-bottom:0}
.pk .pb{flex:1;min-width:0}
.pname{font-weight:700;font-size:15px}
.pname:hover{color:var(--brand-strong)}
.pk .meta{font-size:13px;color:var(--text-3);margin-top:4px}
.ptags{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px;align-items:center}
.tag{display:inline-flex;align-items:center;height:22px;padding:0 7px;border-radius:6px;font-size:12px;font-weight:600;background:var(--surface);color:var(--text-2)}
.tag.free{background:var(--ok-soft);color:var(--ok)}
.pdist{flex:none;font-size:13px;font-weight:700;color:var(--text-2);background:var(--surface);border-radius:999px;padding:3px 10px}
.live{display:inline-flex;align-items:center;gap:4px;height:22px;padding:0 8px;border-radius:6px;font-size:12px;font-weight:700;background:var(--ok-soft);color:var(--ok)}
.live::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.live.full{background:var(--live-soft);color:var(--live)}
.live.none{background:var(--surface);color:var(--text-3)}
.band{font-size:13px;font-weight:700;color:var(--text-3);margin:20px 0 0}
.program{display:grid;gap:10px}
.pg{background:var(--surface);border-radius:var(--radius-sm);padding:14px 16px}
.pg h3{margin:0 0 6px;color:var(--text);font-size:15px}
.pg ul{margin:0;padding-left:18px;color:var(--text-2)}.pg li{margin:3px 0}
.note{font-size:14px;background:var(--soon-soft);color:var(--text);padding:12px 14px;border-radius:var(--radius-sm);margin:12px 0 0}
.cols{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
@media (max-width:760px){.cols{grid-template-columns:1fr;gap:0}}
.plain{list-style:none;margin:0;padding:0}
.plain li{display:flex;justify-content:space-between;gap:10px;padding:11px 0;border-bottom:1px solid var(--line);font-size:15px}
.plain .d{color:var(--text-3);font-size:13px;white-space:nowrap}
.plain a:hover{color:var(--brand-strong)}
table.weather{width:100%;border-collapse:collapse;font-size:15px}
.weather th{font-size:12px;color:var(--text-3);font-weight:600;text-align:left;padding:0 6px 8px}
.weather td{padding:10px 6px;border-top:1px solid var(--line)}
#weather h2{font-size:21px;letter-spacing:-.03em;margin:30px 0 14px;font-weight:800}
.meta-foot{font-size:13px;color:var(--text-3);padding:28px 0 8px;border-top:1px solid var(--line);margin-top:30px}
.actionbar{display:none}
@media (max-width:760px){
  .actionbar{display:grid;grid-template-columns:48px 48px 1fr;gap:8px;position:fixed;left:0;right:0;bottom:0;z-index:30;padding:10px 16px calc(10px + env(safe-area-inset-bottom));background:color-mix(in srgb,var(--bg) 94%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-top:1px solid var(--line)}
  .actionbar .btn{height:48px;padding:0}
  body.has-actions{padding-bottom:calc(70px + env(safe-area-inset-bottom))}
  .fx-head h1{font-size:26px}.lead{font-size:16px}
  .stats b{font-size:17px}
}

/* 달력 */
.gantt{border:1px solid var(--line);border-radius:var(--radius);padding:14px 14px 10px}
.ghead{display:flex;font-size:11px;color:var(--text-3);border-bottom:1px solid var(--line);padding-bottom:6px}
.ghead span{flex:1;text-align:center;min-width:0}.ghead .sat{color:var(--later)}.ghead .sun{color:var(--live)}.ghead .today{font-weight:800;color:var(--text)}
.gbody{position:relative;padding:6px 0}
.gbody>i{position:absolute;top:0;bottom:0;background:var(--surface);z-index:0}
.gbody>.now{position:absolute;top:0;bottom:0;width:2px;background:var(--live);opacity:.4;z-index:0}
.gbar{display:block;position:relative;z-index:1;padding:4px 0}
.gname{display:block;font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gname small{color:var(--text-3);font-weight:500}
.gbar:hover .gname{color:var(--brand-strong)}
.gtrack{display:block;position:relative;height:8px;margin-top:2px}
.gfill{position:absolute;top:0;height:8px;border-radius:4px;background:var(--later)}
.gfill.live{background:var(--live)}.gfill.soon{background:var(--soon)}.gfill.muted{background:var(--line-strong)}
.gantt .muted{margin:8px 0 0}

/* 지도 */
.fmap{height:min(64vh,620px);min-height:380px;border-radius:var(--radius);border:1px solid var(--line);z-index:0}
.legend{display:flex;gap:14px;font-size:13px;color:var(--text-3);margin:10px 0 0}
.dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:4px;vertical-align:-1px}
.dot.live{background:var(--live)}.dot.soon{background:var(--soon)}.dot.later{background:var(--later)}
.leaflet-popup-content{font:14px/1.5 var(--font)}
.leaflet-popup-content a{color:var(--brand-strong);font-weight:700}

/* 검색 */
.sheet{position:fixed;inset:0;z-index:50;display:none;background:rgba(10,12,16,.45)}
.sheet.open{display:block}
.sheet-panel{max-width:640px;margin:8vh auto 0;background:var(--bg);border-radius:18px;box-shadow:var(--shadow-2);overflow:hidden;display:flex;flex-direction:column;max-height:80vh}
.sheet-in{display:flex;align-items:center;gap:10px;padding:0 16px;height:60px;border-bottom:1px solid var(--line);flex:none}
.sheet-in svg{width:22px;height:22px;color:var(--text-3);flex:none}
.sheet-in input{flex:1;min-width:0;border:0;outline:0;background:none;font:inherit;font-size:17px;color:var(--text)}
.sheet-in button{border:0;background:var(--surface);border-radius:8px;padding:6px 10px;font-size:13px;cursor:pointer;color:var(--text-2)}
.sheet-res{overflow:auto;padding:4px 8px 10px}
.sheet-res .row{border:0;border-radius:10px;padding:10px}
.sheet-res .row.sel,.sheet-res .row:hover{background:var(--surface)}
.sheet-empty{padding:28px 16px;text-align:center;color:var(--text-3);font-size:14px}
.sheet-hint{padding:12px 12px 4px;font-size:12px;font-weight:700;color:var(--text-3)}
@media (max-width:760px){.sheet-panel{margin:0;border-radius:0;max-height:100%;height:100%}}

/* 푸터 */
.ft{margin-top:56px;border-top:1px solid var(--line);background:var(--surface);padding:32px 0 40px;font-size:13px;color:var(--text-3)}
.ft .wrap{display:grid;gap:14px}
.ft .logo{color:var(--text);font-size:16px}
.ft nav{display:flex;flex-wrap:wrap;gap:6px 18px}
.ft nav a{color:var(--text-2);font-weight:600}
.ft p{margin:0;line-height:1.7}

/* 문서 페이지 */
.doc{max-width:720px;padding-bottom:20px}
.doc h2{font-size:19px;margin:28px 0 8px}
.doc p,.doc li{color:var(--text-2);line-height:1.8}
.empty-state{padding:56px 0;text-align:center}
.empty-state h1{font-size:24px;margin:0 0 8px}
.empty-state .chips{justify-content:center;margin-top:20px}
