@charset "utf-8";
/* EDMKOREA 클럽·페스티벌 지도 게시판
 * 색은 아래 변수로만 정해요. 사이트가 화이트 모드(html[data-theme="light"])면 밝은 색으로 바뀌어요.
 */

.cm-app,
.cm-view,
.cm-write {
  --cm-bg: #07070a;
  --cm-map-bg: #09090c;
  --cm-panel: #0c0c10;
  --cm-card: #121218;
  --cm-line: #1f1f28;
  --cm-text: #f4f4f7;
  --cm-muted: #9a9aa6;
  --cm-dim: #6c6c78;
  --cm-soft: #d6d6e0;
  --cm-hover: #16161d;
  --cm-btn: #1a1a22;
  --cm-btn-hover: #24242e;
  --cm-float: rgba(12, 12, 16, .92);
  --cm-float-line: #2a2a34;
  --cm-marker: rgba(16, 16, 22, .96);
  --cm-marker-text: #fff;
  --cm-shadow: rgba(0, 0, 0, .55);
  --cm-scroll: #2a2a33;
  --cm-link: #8fb0ff;
  --cm-icon-filter: invert(1) brightness(.85);
  --cm-brand: #ff2e63;
  --cm-grad: linear-gradient(135deg, #ff2e63, #8b5cff);
  --cm-club: #ff2e63;
  --cm-festival: #ffb020;
  --cm-party: #8b5cff;
  --cm-etc: #2ec4b6;
  color: var(--cm-text);
}

[data-theme="light"] .cm-app,
[data-theme="light"] .cm-view,
[data-theme="light"] .cm-write {
  --cm-bg: #f4f4f6;
  --cm-map-bg: #f4f4f6;
  --cm-panel: #ffffff;
  --cm-card: #f6f6f9;
  --cm-line: #e4e4ea;
  --cm-text: #16161c;
  --cm-muted: #5d5d69;
  --cm-dim: #8a8a96;
  --cm-soft: #2a2a33;
  --cm-hover: #f3f3f7;
  --cm-btn: #ececf2;
  --cm-btn-hover: #e2e2ea;
  --cm-float: rgba(255, 255, 255, .94);
  --cm-float-line: #dcdce4;
  --cm-marker: rgba(255, 255, 255, .97);
  --cm-marker-text: #16161c;
  --cm-shadow: rgba(20, 20, 40, .18);
  --cm-scroll: #c9c9d2;
  --cm-link: #3557d6;
  --cm-icon-filter: none;
  --cm-festival: #e09400;
}

.k-club { --k: var(--cm-club); }
.k-festival { --k: var(--cm-festival); }
.k-party { --k: var(--cm-party); }
.k-etc { --k: var(--cm-etc); }

/* ---------- 목록 화면: 패널 + 지도 ---------- */

.cm-app {
  position: relative;
  display: flex;
  height: 640px;
  min-height: 440px;
  background: var(--cm-bg);
  border: 1px solid var(--cm-line);
  border-radius: 14px;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.45;
}

.cm-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 360px;
  flex: 0 0 360px;
  min-height: 0;
  background: var(--cm-panel);
  border-right: 1px solid var(--cm-line);
  transition: margin-left .25s ease;
  z-index: 5;
}

.cm-app.is-folded .cm-panel { margin-left: -360px; }

@media (max-width: 1100px) and (min-width: 721px) {
  .cm-panel { width: 310px; flex-basis: 310px; }
  .cm-app.is-folded .cm-panel { margin-left: -310px; }
}

.cm-grip { display: none; }

.cm-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--cm-line);
}

.cm-count { margin: 0; flex: 1; font-size: 13px; color: var(--cm-muted); }
.cm-count b { color: var(--cm-text); font-size: 15px; font-weight: 800; }

.cm-stack-back,
.cm-back {
  appearance: none;
  border: 0;
  background: none;
  color: var(--cm-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 0;
  cursor: pointer;
}
.cm-stack-back:hover,
.cm-back:hover { color: var(--cm-text); }

.cm-add {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--cm-grad);
  color: #fff !important;
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: none;
}

.cm-list,
.cm-detail {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--cm-scroll) transparent;
}

.cm-panel.is-detail .cm-list { display: none; }

.cm-card {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--cm-line);
  color: inherit;
  text-decoration: none;
  transition: background .15s ease;
}
.cm-card:hover,
.cm-card.is-hl { background: var(--cm-hover); }
.cm-card:focus-visible { outline: 2px solid var(--cm-brand); outline-offset: -2px; }

.cm-thumb {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--cm-btn);
}

.cm-thumb-none {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: var(--k);
  background: color-mix(in srgb, var(--k) 14%, var(--cm-card));
}

.cm-card-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cm-card-name { font-size: 15px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-card-meta { font-size: 12.5px; color: var(--cm-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-card-when { font-size: 12.5px; color: var(--cm-text); }
.cm-card-when b,
.cm-d-when b {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--cm-brand);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.cm-card-tags { font-size: 12px; color: var(--cm-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cm-kind {
  display: inline-block;
  padding: 0 6px;
  border-radius: 5px;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  color: var(--k);
  background: color-mix(in srgb, var(--k) 16%, transparent);
}

.cm-empty { margin: 0; padding: 40px 20px; text-align: center; color: var(--cm-muted); }
.cm-more { height: 1px; }
.cm-credit { margin: 0; padding: 8px 16px; border-top: 1px solid var(--cm-line); color: var(--cm-dim); font-size: 11px; line-height: 1.5; }
.cm-credit[hidden] { display: none; }
.cm-admin { margin: 10px 0 0; text-align: right; font-size: 12px; }
.cm-admin a { color: var(--cm-dim); }

/* 고른 곳 자세히 */
.cm-detail { padding: 12px 16px 20px; }
.cm-d-top { display: flex; gap: 14px; margin: 10px 0 12px; }
.cm-d-img { width: 88px; height: 88px; flex: 0 0 88px; border-radius: 12px; object-fit: cover; }
.cm-d-name { margin: 6px 0 2px; font-size: 20px; font-weight: 800; line-height: 1.3; word-break: keep-all; }
.cm-d-place { margin: 0; color: var(--cm-muted); font-size: 13px; }
.cm-d-when { margin: 0 0 6px; font-size: 14px; font-weight: 700; }
.cm-d-addr { margin: 0 0 8px; color: var(--cm-muted); font-size: 13px; }
.cm-d-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.cm-d-tags span { padding: 3px 9px; border-radius: 999px; background: var(--cm-btn); color: var(--cm-soft); font-size: 12px; }
.cm-d-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.cm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 10px;
  background: var(--cm-btn);
  color: var(--cm-text) !important;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.cm-btn:hover { background: var(--cm-btn-hover); }
.cm-btn-main { background: var(--cm-grad); color: #fff !important; }
.cm-btn-main:hover { filter: brightness(1.1); background: var(--cm-grad); }

/* ---------- 지도 ---------- */

.cm-stage { position: relative; flex: 1; min-width: 0; }
.cm-map { position: absolute; inset: 0; background: var(--cm-map-bg); }

.cm-map-fail {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  text-align: center;
  color: var(--cm-muted);
}

.cm-top {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
}
.cm-top > * { pointer-events: auto; }

.cm-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(420px, 100%);
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--cm-float-line);
  border-radius: 12px;
  background: var(--cm-float);
  box-shadow: 0 6px 20px var(--cm-shadow);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.cm-search:focus-within { border-color: var(--cm-brand); }
.cm-search svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: var(--cm-muted); stroke-width: 2; stroke-linecap: round; }
.cm-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--cm-text);
  font: inherit;
  font-size: 15px;
}
.cm-search input::placeholder { color: var(--cm-dim); }

.cm-chips { display: flex; gap: 6px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.cm-chips::-webkit-scrollbar { display: none; }
.cm-chips[hidden] { display: none; }

.cm-chip {
  flex: 0 0 auto;
  appearance: none;
  border: 1px solid var(--cm-float-line);
  border-radius: 999px;
  padding: 7px 13px;
  background: var(--cm-float);
  color: var(--cm-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--cm-shadow);
}
.cm-chip small { margin-left: 2px; color: var(--cm-dim); font-size: 11.5px; font-weight: 700; }
.cm-chip:hover { border-color: var(--cm-muted); }
.cm-chip.is-on { border-color: transparent; background: var(--cm-grad); color: #fff; }
.cm-chip.is-on small { color: rgba(255, 255, 255, .8); }
.cm-chip[class*="k-"]:not(.is-on)::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--k);
  vertical-align: 1px;
}
.cm-chip-sm { padding: 5px 11px; font-size: 12px; }

.cm-jump {
  position: absolute;
  left: 12px;
  bottom: 16px;
  z-index: 4;
  display: flex;
  border: 1px solid var(--cm-float-line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--cm-float);
}
.cm-jump button {
  appearance: none;
  border: 0;
  padding: 8px 12px;
  background: none;
  color: var(--cm-soft);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.cm-jump button + button { border-left: 1px solid var(--cm-float-line); }
.cm-jump button:hover { background: var(--cm-btn); color: var(--cm-text); }

.cm-fold {
  position: absolute;
  top: 50%;
  left: 0;
  z-index: 4;
  width: 22px;
  height: 56px;
  margin-top: -28px;
  border: 1px solid var(--cm-float-line);
  border-left: 0;
  border-radius: 0 10px 10px 0;
  background: var(--cm-float);
  cursor: pointer;
}
.cm-fold span {
  display: block;
  width: 7px;
  height: 7px;
  margin: 0 auto;
  border-left: 2px solid var(--cm-muted);
  border-bottom: 2px solid var(--cm-muted);
  transform: translateX(2px) rotate(45deg);
}
.cm-app.is-folded .cm-fold span { transform: translateX(-2px) rotate(-135deg); }

/* 묶음 표시 (나라·도시·동네) */
.cm-bubble {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 6px 0 14px;
  border-radius: 999px;
  background: var(--cm-marker);
  border: 1.5px solid rgba(255, 46, 99, .75);
  box-shadow: 0 6px 18px var(--cm-shadow), 0 0 0 4px rgba(255, 46, 99, .12);
  color: var(--cm-marker-text);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .12s ease;
}
.cm-bubble b {
  min-width: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--cm-grad);
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 22px;
  text-align: center;
}
.cm-bubble:hover,
.cm-bubble.is-hl,
.cm-bubble.is-sel { transform: scale(1.08); border-color: var(--cm-brand); }

/* 이름표 (한 곳씩) */
.cm-pin {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 230px;
  height: 30px;
  margin-bottom: 8px;
  padding: 0 10px 0 9px;
  border-radius: 999px;
  background: var(--cm-marker);
  border: 1.5px solid color-mix(in srgb, var(--k) 70%, transparent);
  box-shadow: 0 4px 14px var(--cm-shadow);
  color: var(--cm-marker-text);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .12s ease;
}
.cm-pin::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  background: inherit;
  border-right: inherit;
  border-bottom: inherit;
  transform: rotate(45deg);
  border-radius: 0 0 3px 0;
}
.cm-pin i { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--k); }
.cm-pin span { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.cm-pin em {
  padding: 0 5px;
  border-radius: 5px;
  background: var(--k);
  color: #fff;
  font-style: normal;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 16px;
}
.cm-pin u { color: var(--cm-muted); text-decoration: none; font-size: 11.5px; }
.cm-pin:hover,
.cm-pin.is-hl { transform: translateY(-2px); border-color: var(--k); }
.cm-pin.is-sel { background: var(--k); border-color: #fff; color: #fff; transform: scale(1.08); }
.cm-pin.is-sel i { background: #fff; }
.cm-pin.is-sel u { color: rgba(255, 255, 255, .85); }
.cm-pin.is-live::before {
  content: "";
  position: absolute;
  inset: -1.5px;
  border-radius: inherit;
  box-shadow: 0 0 0 0 var(--k);
  animation: cm-live 1.8s ease-out infinite;
  pointer-events: none;
}
@keyframes cm-live {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--k) 60%, transparent); }
  100% { box-shadow: 0 0 0 12px transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .cm-pin.is-live::before { animation: none; }
}

.maplibregl-marker:focus-visible { outline: none; }
.maplibregl-marker:focus-visible > div { outline: 2px solid var(--cm-brand); outline-offset: 2px; }

/* MapLibre 기본 단추를 화면 색에 맞춰요 */
.cm-app .maplibregl-ctrl-group,
.cm-view .maplibregl-ctrl-group,
.cm-write .maplibregl-ctrl-group { background: var(--cm-float); border: 1px solid var(--cm-float-line); box-shadow: none; }
.cm-app .maplibregl-ctrl-group button + button,
.cm-view .maplibregl-ctrl-group button + button,
.cm-write .maplibregl-ctrl-group button + button { border-top-color: var(--cm-float-line); }
.cm-app .maplibregl-ctrl button .maplibregl-ctrl-icon,
.cm-view .maplibregl-ctrl button .maplibregl-ctrl-icon,
.cm-write .maplibregl-ctrl button .maplibregl-ctrl-icon { filter: var(--cm-icon-filter); }
.cm-app .maplibregl-ctrl-attrib,
.cm-view .maplibregl-ctrl-attrib,
.cm-write .maplibregl-ctrl-attrib { background: var(--cm-float); color: var(--cm-dim); }
.cm-app .maplibregl-ctrl-attrib a,
.cm-view .maplibregl-ctrl-attrib a,
.cm-write .maplibregl-ctrl-attrib a { color: var(--cm-muted); }
.cm-app .maplibregl-ctrl-attrib-button { filter: var(--cm-icon-filter); }
.cm-app .maplibregl-ctrl-bottom-right { bottom: 18px; }

/* ---------- 모바일: 지도 전체 + 아래에서 올라오는 목록 ---------- */

@media (max-width: 720px) {
  .cm-app {
    display: block;
    margin: 0 -10px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  .cm-stage { position: absolute; inset: 0; }
  .cm-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: 112px;
    border-right: 0;
    border-top: 1px solid var(--cm-float-line);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -10px 30px var(--cm-shadow);
    transition: height .25s ease;
  }
  .cm-panel.is-dragging { transition: none; }
  .cm-app.is-folded .cm-panel { margin-left: 0; }
  .cm-grip { display: block; padding: 8px 0 2px; touch-action: none; cursor: grab; }
  .cm-grip span { display: block; width: 40px; height: 4px; margin: 0 auto; border-radius: 2px; background: var(--cm-float-line); }
  .cm-head { padding: 6px 16px 10px; touch-action: none; }
  .cm-fold { display: none; }
  .cm-top { top: 10px; left: 10px; right: 10px; }
  .cm-search { width: 100%; }
  .cm-jump { left: 10px; bottom: 124px; }
  .cm-app .maplibregl-ctrl-bottom-right { bottom: 118px; }
  .cm-app .maplibregl-ctrl-bottom-left { bottom: 112px; }
}

/* ---------- 글 보기 ---------- */

.cm-view { max-width: 980px; margin: 0 auto; }
.cm-view-head { margin-bottom: 18px; }
.cm-view-title { margin: 8px 0 6px; font-size: 26px; font-weight: 800; line-height: 1.3; word-break: keep-all; }
.cm-view-sub { margin: 0; color: var(--cm-muted); font-size: 14px; }
.cm-view-sub b { color: var(--cm-text); }
.cm-view-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-bottom: 22px; }
.cm-view-poster img { display: block; width: 100%; max-height: 520px; object-fit: contain; border-radius: 14px; background: var(--cm-panel); }
.cm-view-info { margin: 0; padding: 16px 18px; border: 1px solid var(--cm-line); border-radius: 14px; background: var(--cm-panel); }
.cm-view-info div { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--cm-line); }
.cm-view-info div:last-child { border-bottom: 0; }
.cm-view-info dt { flex: 0 0 52px; color: var(--cm-dim); font-size: 13px; font-weight: 700; }
.cm-view-info dd { margin: 0; flex: 1; min-width: 0; font-size: 14px; word-break: break-all; }
.cm-view-info a { color: var(--cm-link); }
.cm-view-map { height: 260px; margin-top: 12px; border-radius: 14px; overflow: hidden; border: 1px solid var(--cm-line); }
.cm-view-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cm-view-content { margin: 0 0 24px; font-size: 15px; line-height: 1.75; word-break: break-word; }
.cm-view-content img { max-width: 100%; height: auto; }
.cm-view-files { margin: 0 0 18px; padding: 0; list-style: none; font-size: 13px; color: var(--cm-muted); }
.cm-view-files a { color: var(--cm-link); }
.cm-view-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-bottom: 24px; }
.cm-pin-marker {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cm-brand);
  border: 3px solid #fff;
  box-shadow: 0 0 0 6px rgba(255, 46, 99, .3);
}

@media (max-width: 720px) {
  .cm-view-grid { grid-template-columns: 1fr; }
  .cm-view-title { font-size: 22px; }
}

/* ---------- 글쓰기: 위치 정하기 ---------- */

.cm-write .cm-field { margin: 0 0 14px; }
.cm-write .cm-label { display: block; margin: 0 0 6px; color: var(--cm-soft); font-size: 13px; font-weight: 700; }
.cm-write .cm-hint { margin: 6px 0 0; color: var(--cm-dim); font-size: 12px; }
.cm-write .cm-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cm-write .cm-row > * { flex: 1 1 160px; min-width: 0; }
.cm-loc { padding: 16px; border: 1px solid var(--cm-line); border-radius: 14px; background: var(--cm-panel); }
.cm-loc-map { height: 320px; margin: 10px 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--cm-line); }
.cm-loc-msg { min-height: 18px; margin: 6px 0 0; font-size: 12.5px; color: var(--cm-muted); }
.cm-loc-msg.is-ok { color: #22c55e; }
.cm-loc-msg.is-err { color: #ff5c80; }
.cm-loc-results { margin: 6px 0 0; padding: 0; list-style: none; border-radius: 10px; overflow: hidden; }
.cm-loc-results li button {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--cm-line);
  background: var(--cm-card);
  color: var(--cm-text);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.cm-loc-results li button:hover { background: var(--cm-hover); }
.cm-loc-btn {
  flex: 0 0 auto !important;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--cm-btn-hover);
  color: var(--cm-text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.cm-loc-btn:hover { background: var(--cm-btn); }
.cm-event-only[hidden] { display: none; }
