:root {
  --gold: #FFD23C;
  --pink: #FF6987;
  --bg: #eef0f4;
  --white: #ffffff;
  --dark: #1a2236;
  --text: #2d3748;
  --muted: #8896aa;
  --border: #dde2ea;
  --panel: #f4f6f9;
}

/* ── Card header ── */
/* ── Card header (세이지 그린 파스텔) ── */
.dgw-card-head {
  flex-shrink: 0;
  background: var(--dg-primary-gradient);
  border-radius: 14px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  border-bottom: none;
}

.dgw-head-icon {
  width: 48px; height: 48px;
  background: rgba(45,74,30,.10);
  border: none;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0; color: #2d4a1e;
}

.dgw-head-eyebrow {
  font-size: 10px; font-weight: 700;
  color: rgba(45,74,30,.5);
  letter-spacing: 1.6px; text-transform: uppercase;
}

.dgw-head-title {
  font-size: 20px; font-weight: 800; color: #2d4a1e;
  letter-spacing: -0.3px; line-height: 1.15;
  font-family: 'Noto Serif KR', serif;
}

.dgw-head-desc {
  font-size: 12px; color: rgba(45,74,30,.5); margin-top: 2px;
}

.dgw-head-pills {
  margin-left: auto;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dgw-pill {
  padding: 5px 14px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
  display: inline-flex; align-items: center; gap: 5px;
}
.dgw-pill-pink {
  background: #FF6987;
  border: none;
  color: #fff;
}
.dgw-pill-gold {
  background: #e6a817;
  border: none;
  color: #fff;
}
.dgw-pill-dot {
  width: 6px; height: 6px; border-radius: 50%;
}
.dgw-pill-pink .dgw-pill-dot { background: #fff; }
.dgw-pill-gold .dgw-pill-dot { background: #fff; }

/* ── Main body ── */
.dgw-card-body {
  flex: 1; display: flex; gap: 12px; overflow: hidden;
  align-items: flex-start;
}

/* ── LEFT map ── */
.dgw-map-col {
  flex: 0 0 auto; position: relative; overflow: hidden;
  align-self: flex-start;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
}
/* 기본 (PC) */
.dgw-map-img {
  display: block;
  height: auto;        /* 100% → auto 로 변경 */
  width: 100%;
  max-width: 100%;
}

/* Number spots */
.dgw-spot {
  position: absolute; transform: translate(-50%,-50%);
  cursor: pointer; z-index: 10;
}
.dgw-spot-ring {
  width: 44px; height: 44px;
  background: rgba(255,105,135,0.18);
  border: 2px solid rgba(255,105,135,0.52);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all .22s; animation: pulse 3.2s ease-in-out infinite;
}
.dgw-spot:hover .dgw-spot-ring {
  background: rgba(255,105,135,0.55);
  border-color: #FF6987;
  transform: scale(1.22); animation: none;
}
.dgw-spot-num {
  width: 22px; height: 22px; background: #FF6987;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,105,135,0.45); }
  50%      { box-shadow: 0 0 0 8px rgba(255,105,135,0); }
}

/* Utility badge */
.dgw-util {
  position: absolute; transform: translate(-50%,-50%);
  cursor: pointer; z-index: 11;
}
.dgw-util-badge {
  width: 26px; height: 26px; background: #FFD23C;
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: transform .18s;
}
.dgw-util:hover .dgw-util-badge { transform: scale(1.28); }
.dgw-util-badge i { font-size: 13px; color: #1a1a1a; }

/* Tooltip */
.dgw-tip {
  position: absolute; bottom: calc(100% + 7px); left: 50%;
  transform: translateX(-50%);
  background: rgba(26,34,54,0.95);
  border: 1px solid rgba(255,105,135,0.4);
  color: #fff; padding: 4px 10px; border-radius: 7px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .15s;
  z-index: 60;
}
.dgw-tip::after {
  content: ''; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: rgba(255,105,135,0.4);
}
.dgw-spot:hover .dgw-tip,
.dgw-util:hover .dgw-tip { opacity: 1; }

/* ── RIGHT sidebar ── */
.dgw-sidebar {
  width: 299px; flex-shrink: 0;
  display: flex; flex-direction: column;
  gap: 10px; overflow: hidden;
  align-self: stretch;
}

/* Section card */
.dgw-sec-card {
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  display: flex; flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
}
.dgw-sec-card.dgw-tour   { flex: 1; min-height: 0; }
.dgw-sec-card.dgw-amenity { flex-shrink: 0; }

.dgw-sec-head {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px 10px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.dgw-sec-bar {
  width: 3px; height: 15px; border-radius: 2px; flex-shrink: 0;
}
.dgw-sec-bar.dgw-pink { background: #FF6987; }
.dgw-sec-bar.dgw-gold { background: #FFD23C; }
.dgw-sec-title {
  font-size: 12px; font-weight: 700;
  color: var(--text); letter-spacing: .2px;
}
.dgw-sec-badge {
  margin-left: auto;
  font-size: 9px; font-weight: 700;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 8px; border-radius: 10px;
}

/* Tour list */
.dgw-tour-scroll {
  flex: 1; overflow-y: auto; padding: 7px 8px;
}
.dgw-tour-scroll::-webkit-scrollbar { width: 3px; }
.dgw-tour-scroll::-webkit-scrollbar-track { background: transparent; }
.dgw-tour-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.dgw-tour-item {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px; border-radius: 8px;
  cursor: pointer; transition: background .15s;
}
.dgw-tour-item:hover  { background: rgba(255,105,135,0.07); }
.dgw-tour-item.dgw-active { background: rgba(255,105,135,0.10); }

.dgw-t-num {
  width: 20px; height: 20px; background: #FF6987;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: #ffffff; flex-shrink: 0;
}
.dgw-t-name {
  font-size: 11.5px; color: var(--text); font-weight: 500; line-height: 1.3;
}
.dgw-t-arrow {
  margin-left: auto; color: var(--muted); font-size: 13px;
  opacity: 0; transition: opacity .15s;
}
.dgw-tour-item:hover .dgw-t-arrow { opacity: 1; }

/* Amenity */
.dgw-amenity-body { padding: 8px 10px; }
.dgw-amenity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.dgw-amenity-grid .dgw-a-item,
.dgw-a-item {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 9px;
  transition: background .15s, border-color .15s;
  cursor: pointer;
}
.dgw-amenity-grid .dgw-a-item:hover,
.dgw-a-item:hover {
  background: rgba(255,210,60,0.08);
  border-color: rgba(255,210,60,0.4);
}
.dgw-amenity-grid .dgw-a-item.dgw-active,
.dgw-a-item.dgw-active {
  background: rgba(255,210,60,0.18);
  border-color: rgba(255,210,60,0.7);
}
.dgw-amenity-grid .dgw-a-icon,
.dgw-a-icon {
  width: 26px; height: 26px; background: #FFD23C;
  border-radius: 5px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dgw-amenity-grid .dgw-a-icon i,
.dgw-a-icon i { font-size: 13px; color: #1a1a1a; }
.dgw-amenity-grid .dgw-a-name,
.dgw-a-name { font-size: 10.5px; color: var(--text); font-weight: 500; line-height: 1.25; }

/* CMS 부모 컨테이너 대상 */
@media (max-width: 900px) {
  .dgw-map-col * {
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* ════════════════════════════
   반응형 — 태블릿/모바일 공통
════════════════════════════ */
@media (max-width: 900px) {

  /* 전체 가로 넘침 원천 차단 */
  html, body {
    overflow-x: hidden !important;
  }

  /* dgw 전체 요소 box-sizing 통일 */
  .dgw-card-head,
  .dgw-card-body,
  .dgw-map-col,
  .dgw-sidebar,
  .dgw-sec-card,
  .dgw-sec-head,
  .dgw-sec-badge,
  .dgw-tour-scroll,
  .dgw-tour-item,
  .dgw-t-name,
  .dgw-amenity-body,
  .dgw-amenity-grid,
  .dgw-a-item,
  .dgw-a-name {
    box-sizing: border-box !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  /* 헤더 */
  .dgw-card-head {
    width: 100% !important;
    padding: 10px 14px;
    gap: 10px;
    overflow: hidden;
  }
  .dgw-head-pills { display: none; }
  .dgw-head-desc  { display: none; }
  .dgw-head-title { font-size: 16px; }
  .dgw-head-icon  { width: 38px; height: 38px; font-size: 20px; flex-shrink: 0; }

  /* 바디 — 세로 배치 */
  .dgw-card-body {
    width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
    overflow: hidden !important;
    gap: 10px;
  }

  /* 지도 영역 — 내부만 가로 스크롤 */
  .dgw-map-col {
    position: relative !important;
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 420px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
  }

  .dgw-map-img {
    width: auto !important;
    height: 420px !important;
    min-width: 900px !important;
    max-width: none !important;
    display: block !important;
  }

  /* 사이드바 */
  .dgw-sidebar {
    width: 100% !important;
    flex-direction: column !important;
    overflow: hidden !important;
    gap: 8px;
  }

  /* 섹션 카드 */
  .dgw-sec-card {
    width: 100% !important;
    overflow: hidden !important;
    border-radius: 10px;
  }
  .dgw-sec-card.dgw-tour {
    flex: 0 0 auto !important;
    max-height: 280px;
  }
  .dgw-sec-card.dgw-amenity {
    flex-shrink: 0;
  }

  /* 관람순서 */
  .dgw-tour-scroll {
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  .dgw-tour-item {
    overflow: hidden !important;
  }
  .dgw-t-name {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  /* 편의시설 — 2열 고정 */
  .dgw-amenity-body {
    padding: 8px !important;
    overflow: hidden !important;
  }
  .dgw-amenity-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 5px !important;
    width: 100% !important;
  }
  .dgw-a-item {
    overflow: hidden !important;
    padding: 6px 8px !important;
  }
  .dgw-a-name {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 10px !important;
  }

  /* 툴팁 */
  .dgw-tip {
    white-space: nowrap !important;
    width: max-content !important;
    max-width: none !important;
    z-index: 9999 !important;
    font-size: 11px;
    padding: 4px 10px;
  }

}

/* ════════════════════════════
   반응형 — 모바일 (≤ 480px)
════════════════════════════ */
@media (max-width: 480px) {

  .dgw-card-head  { padding: 10px 14px; gap: 10px; }
  .dgw-head-icon  { width: 38px; height: 38px; font-size: 20px; }
  .dgw-head-title { font-size: 15px; }

  .dgw-amenity-grid { grid-template-columns: 1fr; }

  .dgw-spot-ring  { width: 30px; height: 30px; }
  .dgw-spot-num   { width: 17px; height: 17px; font-size: 8px; }
  .dgw-util-badge { width: 20px; height: 20px; }
  .dgw-util-badge i { font-size: 10px; }
  .dgw-tip        { font-size: 10px; padding: 3px 8px; }

}