:root {
  --c1: #1a9850; --c2: #91cf60; --c3: #e8d27a; --c4: #fc8d59; --c5: #d73027;
  --ink: #1d2433; --sub: #5b6475; --line: #e4e7ee; --bg: #f7f8fb; --acc: #2457d6;
  --panel: 380px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif; color: var(--ink); background: var(--bg); }

.top { display: flex; align-items: center; gap: 20px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); height: 56px; }
.brand b { font-size: 20px; letter-spacing: -0.5px; }
.brand span { margin-left: 10px; font-size: 13px; color: var(--sub); }
.tabs { display: flex; gap: 4px; margin-left: auto; }
.tabs button { border: 0; background: none; padding: 8px 12px; border-radius: 8px; font: inherit; font-size: 14px; color: var(--sub); cursor: pointer; }
.tabs button.on { background: var(--ink); color: #fff; }
.tabs button.soon { opacity: .6; }
.tabs small { display: block; font-size: 10px; }

.layout { display: flex; height: calc(100% - 56px); }
#map { flex: 1; }
.panel { width: var(--panel); background: #fff; border-left: 1px solid var(--line); overflow-y: auto; padding: 14px 16px 24px; }
.panel section { display: none; }
.panel section.on { display: block; }
.panel h2 { font-size: 15px; margin: 18px 0 8px; }

/* 달력 */
.cal { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px 10px; }
.calhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; font-size: 14px; }
.calhead .nav { border: 0; background: none; font-size: 20px; line-height: 1; padding: 2px 10px; cursor: pointer; color: var(--ink); border-radius: 6px; }
.calhead .nav:hover:not(:disabled) { background: var(--bg); }
.calhead .nav:disabled { color: var(--line); cursor: default; }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.grid em { font-style: normal; font-size: 11px; color: var(--sub); padding: 2px 0; }
.grid button, .grid span { font: inherit; font-size: 13px; height: 30px; border: 0; border-radius: 8px; background: none; padding: 0; }
.grid button { cursor: pointer; font-weight: 600; }
.grid button:hover { background: var(--bg); }
.grid span.off { color: #c9cdd6; line-height: 30px; }
.grid .out { opacity: .55; }
.grid .sun { color: #d0453a; }
.grid .sat { color: #2f64d8; }
.grid .today { box-shadow: inset 0 0 0 1px var(--sub); }
.grid button.on { background: var(--ink); color: #fff; opacity: 1; }
.picked { margin-top: 6px; font-size: 13px; font-weight: 700; text-align: center; }

/* 필터 칩 · 유종 버튼 */
.filt { margin-top: 12px; }
.flabel { font-size: 12px; font-weight: 700; color: var(--sub); margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chips button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 10px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--ink); }
.chips button i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: 0; }
.chips button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.note .gray { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #6c7a96; margin-right: 5px; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 14px; }
.seg button { flex: 1; border: 0; background: #fff; padding: 10px 0; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--sub); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--ink); color: #fff; }
.oil .sel { background: #fff4b8; border-radius: 4px; padding: 0 4px; }
.list .val small.none { color: #b5bac4; font-weight: 400; }

.note { font-size: 12px; color: var(--sub); line-height: 1.5; margin: 6px 0 10px; }

input[type=search], select { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px; }
.qres { position: relative; }
.qres ul { position: absolute; z-index: 1000; left: 0; right: 0; margin: 2px 0 0; padding: 4px 0; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.08); max-height: 260px; overflow-y: auto; }
.qres li { padding: 7px 11px; font-size: 14px; cursor: pointer; }
.qres li:hover { background: var(--bg); }
.qres li small { color: var(--sub); margin-left: 6px; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.list li:hover { background: var(--bg); }
.list .dot { flex: none; width: 12px; height: 12px; border-radius: 50%; }
.list .nm { flex: 1; min-width: 0; }
.list .nm b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .nm small { color: var(--sub); font-size: 12px; }
.list .val { font-size: 13px; font-weight: 600; white-space: nowrap; }

.sel { display: block; font-size: 13px; color: var(--sub); }
.sel select { margin-top: 4px; }
.cheap { margin-top: 12px; font-size: 13px; line-height: 1.6; background: var(--bg); border-radius: 8px; padding: 10px 12px; }
.cheap:empty { display: none; }

.src { margin-top: 28px; font-size: 11px; color: var(--sub); line-height: 1.6; border-top: 1px solid var(--line); padding-top: 12px; }

/* 팝업 */
.leaflet-popup-content { margin: 12px 14px; font-family: inherit; min-width: 240px; }
.pop h3 { margin: 0 0 2px; font-size: 16px; }
.pop .area { color: var(--sub); font-size: 12px; }
.pop .big { margin: 10px 0 6px; font-size: 15px; font-weight: 700; }
.pop .tip { font-size: 12px; color: var(--sub); margin: 6px 0 0; line-height: 1.5; }
.pop svg { display: block; margin-top: 6px; }
.pop .img { width: 100%; height: 110px; object-fit: cover; border-radius: 6px; margin-bottom: 8px; }
.menu { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
.menu td { padding: 4px 0; border-bottom: 1px solid var(--line); }
.menu td:last-child { text-align: right; white-space: nowrap; }
.badge { display: inline-block; font-size: 10px; padding: 1px 5px; border-radius: 4px; margin-left: 4px; background: #fff1d6; color: #9a5b00; vertical-align: 1px; }
.badge.rec { background: #e3edff; color: var(--acc); }
.oil { display: flex; gap: 12px; font-size: 13px; margin: 6px 0; }
.oil b { font-size: 14px; }
.more { font-size: 12px; color: var(--acc); cursor: pointer; margin-top: 6px; display: inline-block; }

@media (max-width: 760px) {
  .brand span { display: none; }
  .top { gap: 8px; padding: 8px 10px; }
  .tabs button { padding: 6px 8px; font-size: 13px; }
  .layout { flex-direction: column; }
  #map { flex: none; height: 55%; }
  .panel { width: auto; flex: 1; border-left: 0; border-top: 1px solid var(--line); }
}


/* 지도 배경: 지형색을 빼서 깔끔하게 */
.base { filter: saturate(.25) brightness(1.06) contrast(.92); }

/* 내 위치 버튼 · 정렬 버튼 */
.zoombar .locbtn { background: #fff; color: #5b6475; display: flex; align-items: center; justify-content: center; }
.zoombar .locbtn.on { color: #2f7cf6; }
.zb-sep { width: 1px; height: 20px; background: var(--line); }
.locbtn.busy svg { animation: locspin 1s linear infinite; }
@keyframes locspin { to { transform: rotate(360deg); } }
.sortseg { margin: 16px 0 0; }
.sortseg button { padding: 8px 0; font-size: 13px; }

/* 배율 막대(왼쪽 아래) */
.zoombar { display: flex; align-items: center; gap: 6px; background: #fff; border-radius: 10px; padding: 5px 10px 5px 6px; box-shadow: 0 1px 5px rgba(0,0,0,.25); }
.zoombar button { width: 28px; height: 28px; border: 0; border-radius: 6px; background: var(--bg); font-size: 18px; line-height: 1; cursor: pointer; color: var(--ink); padding: 0; }
.zoombar button:hover { background: var(--line); }
.zoombar input[type=range] { -webkit-appearance: none; appearance: none; width: 180px; height: 6px; border-radius: 3px; cursor: pointer; margin: 0;
  background: linear-gradient(to right, var(--ink) var(--p, 0%), var(--line) var(--p, 0%)); }
.zoombar input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.zoombar input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); }
.zoombar .zb-lab { min-width: 34px; font-size: 12px; font-weight: 700; color: var(--sub); }
@media (max-width: 760px) { .zoombar input[type=range] { width: 120px; } }

/* 예상 인원 */
.pop .ppl { font-size: 13px; margin: -2px 0 6px; }
.pop .ppl b { font-size: 15px; }
.pop .ppl small { display: block; color: var(--sub); font-size: 11px; }
.list .val small { display: block; font-size: 11px; font-weight: 400; color: var(--sub); text-align: right; }

/* 서울 실시간 */
.pop .live { background: #f3f7ff; border-radius: 8px; padding: 8px 10px; margin: 4px 0 8px; }
.pop .live.stale { background: var(--bg); }
.pop .lhead { font-size: 13px; }
.pop .lhead b { font-size: 14px; }
.pop .lhead small { display: block; color: var(--sub); font-size: 11px; margin-top: 1px; }
.pop .ldot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 3px; animation: lpulse 1.6s ease-in-out infinite; }
.pop .live.stale .ldot { animation: none; }
@keyframes lpulse { 50% { opacity: .35; } }
.pop .src2 { font-size: 10px; color: var(--sub); margin: 4px 0 0; }
.pop .tip.region small { display: block; font-size: 10px; }
.cheap small.at { color: var(--sub); font-size: 11px; }
.toidx { font-size: 13px; margin: 20px 0 0; }

/* 이 장소 더 알아보기(크게) · 바깥 링크(맨 아래, 작게) */
.pop .more-page { display: block; margin: 8px 0 10px; padding: 11px 12px; border-radius: 10px; background: var(--acc); color: #fff !important; text-decoration: none; font-size: 15px; font-weight: 700; text-align: center; }
.pop .more-page::after { content: " →"; }
.pop .more-page small { display: block; font-size: 11px; font-weight: 400; opacity: .85; margin-top: 2px; }
.pop .more-page small::after { content: none; }
.out { margin-top: 12px; padding-top: 8px; border-top: 1px dashed var(--line); }
.orow { display: flex; align-items: center; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.orow span { font-size: 11px; color: var(--sub); width: 52px; flex: none; }
.orow a { font-size: 11px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink) !important; text-decoration: none; background: #fff; }
.orow a:hover { background: var(--bg); }
