/* ===== Claymorphism 스타일 (은은한 버전) ===== */
html { -webkit-text-size-adjust: 100%; }
body {
  padding-bottom: env(safe-area-inset-bottom);
  background: #eef4f3;
  min-height: 100vh;
}

/* 배경 */
.clay-bg-ocean {
  background: linear-gradient(155deg, #2dd4bf 0%, #14b8a6 50%, #0d9488 100%);
}
.clay-bg-soft { background: #eef4f3; }

/* 히어로 — 둥근 하단, 절제된 그림자 */
.clay-hero {
  background: linear-gradient(155deg, #2dd4bf 0%, #14b8a6 55%, #0d9488 100%);
  border-radius: 0 0 32px 32px;
  box-shadow: 0 10px 24px -14px rgba(13, 148, 136, .35);
  position: relative;
  overflow: hidden;
}
.clay-hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 22% 28%, rgba(255,255,255,.12) 1.4px, transparent 1.5px);
  background-size: 28px 28px;
  pointer-events: none;
}
.clay-hero-badge {
  background: rgba(255,255,255,.16);
  border-radius: 18px;
  box-shadow: inset 1px 1px 3px rgba(255,255,255,.18);
}

/* 기본 카드 — 부드럽고 옅은 그림자 */
.clay-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 6px 16px -8px rgba(15, 80, 75, .14), 0 1px 2px rgba(15, 80, 75, .04);
}
.clay-card-light {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 12px 28px -12px rgba(15, 80, 75, .22), 0 2px 4px rgba(15, 80, 75, .05);
}

/* 로고 뱃지 */
.clay-logo {
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  background: #e8faf7;
  border-radius: 20px;
  box-shadow: inset 2px 2px 5px rgba(255,255,255,.7), 0 4px 10px -4px rgba(13,148,136,.25);
}

/* 입력 */
.clay-input {
  width: 100%;
  border: 1px solid #e2eceb;
  background: #f6faf9;
  border-radius: 14px;
  padding: 12px 15px;
  color: #334155;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.clay-input:focus {
  border-color: #5eead4;
  box-shadow: 0 0 0 3px rgba(45,212,191,.18);
}

/* 버튼 */
.clay-btn-primary {
  background: linear-gradient(150deg, #2dd4bf, #0d9488);
  color: #fff;
  font-weight: 600;
  border-radius: 14px;
  padding: 12px 18px;
  box-shadow: 0 4px 12px -4px rgba(13,148,136,.4);
  transition: transform .12s, box-shadow .2s, filter .15s;
}
.clay-btn-primary:hover { filter: brightness(1.04); }
.clay-btn-primary:active { transform: translateY(1px); box-shadow: 0 2px 6px -3px rgba(13,148,136,.4); }

.clay-btn-ghost {
  background: #eef2f1;
  color: #475569;
  font-weight: 600;
  border-radius: 14px;
  padding: 12px 18px;
  transition: background .15s, transform .12s;
}
.clay-btn-ghost:hover { background: #e6ecea; }
.clay-btn-ghost:active { transform: translateY(1px); }

.clay-icon-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  color: #64748b;
  background: #eef2f1;
  border-radius: 11px;
  transition: background .15s;
}
.clay-icon-btn:hover { background: #e2e8e7; }

/* 칩(아이콘 배지) */
.clay-chip {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff;
  border-radius: 11px;
  box-shadow: 0 3px 8px -4px rgba(15,80,75,.18);
}

/* 토글 */
.clay-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  border-radius: 12px;
  font-weight: 600;
  color: #64748b;
  background: #eef2f1;
  transition: all .15s;
}
.clay-toggle.is-on {
  color: #fff;
  background: linear-gradient(150deg, #2dd4bf, #0d9488);
  box-shadow: 0 3px 10px -4px rgba(13,148,136,.4);
}

/* 하단 내비게이션 */
.clay-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -4px 16px -8px rgba(15,80,75,.18);
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 0 9px;
  color: #94a3b8;
  font-size: 11px; font-weight: 500;
  transition: color .15s;
}
.nav-btn svg { width: 22px; height: 22px; }
.nav-btn.is-active { color: #0d9488; }

/* 갤러리 */
.gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 14px;
  background: #e2ece9;
  cursor: pointer;
  box-shadow: 0 3px 8px -5px rgba(15,80,75,.18);
}
.gallery-item img, .gallery-item video { width: 100%; height: 100%; object-fit: cover; }
.gallery-item .play-badge {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); pointer-events: none;
}
.gallery-item .play-badge svg { width: 30px; height: 30px; }
.gallery-item .geo-badge {
  position: absolute; top: 6px; right: 6px;
  background: rgba(13,148,136,.92); color: #fff; border-radius: 999px;
  width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
}
.gallery-item .geo-badge svg { width: 13px; height: 13px; }
.del-btn {
  position: absolute; bottom: 6px; right: 6px;
  background: rgba(0,0,0,.5); color: #fff; border-radius: 999px;
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
}
.del-btn svg { width: 14px; height: 14px; }

/* 항목 액션 */
.item-action {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9px; color: #94a3b8;
  background: #f1f5f4;
  transition: background .15s, color .15s;
}
.item-action:hover { background: #e6ecea; color: #475569; }
.item-action svg { width: 16px; height: 16px; }

/* 작성자 태그 */
.author-tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: #0d9488;
  background: #d3f8f2;
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}

/* 편의시설 카드 */
.facility-card { transition: transform .12s; }
.facility-card:active { transform: scale(0.98); }
.facility-card img { transition: transform .25s; }
.facility-card:hover img { transform: scale(1.05); }
.facility-link {
  position: absolute; top: 6px; right: 6px;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.85); color: #0d9488;
  border-radius: 999px;
}

/* MapLibre 팝업 / 컨테이너 */
.maplibregl-popup-content { border-radius: 12px; padding: 8px; }
.maplibregl-popup-content img { border-radius: 8px; display: block; }
#hotel-map, #gallery-map { border-radius: 20px; overflow: hidden; }
#hotel-map .maplibregl-canvas, #gallery-map .maplibregl-canvas { border-radius: 20px; }

/* 갤러리 정렬/필터 컨트롤 */
.clay-sort-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 13px; font-weight: 600;
  color: #475569;
  background: #fff;
  box-shadow: 0 3px 8px -5px rgba(15,80,75,.18);
  transition: background .15s;
}
.clay-sort-btn:hover { background: #f1f5f4; }
.clay-sort-btn svg { color: #0d9488; }
.clay-day-filter {
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px; font-weight: 600;
  color: #475569;
  background: #fff;
  border: none;
  outline: none;
  box-shadow: 0 3px 8px -5px rgba(15,80,75,.18);
}

/* 일정·알림 본문 내 링크 / 첨부 이미지 */
.rich-link { color: #0d9488; font-weight: 600; text-decoration: underline; word-break: break-all; }
.attach-img {
  margin-top: 10px;
  border-radius: 14px;
  max-height: 280px;
  width: 100%;
  object-fit: cover;
  cursor: pointer;
  box-shadow: 0 3px 8px -5px rgba(15,80,75,.2);
}
.itin-attach {
  margin-top: 8px;
  border-radius: 12px;
  max-height: 160px;
  cursor: pointer;
  box-shadow: 0 3px 8px -5px rgba(15,80,75,.2);
}
/* 모달 첨부 미리보기 */
#item-image-preview img, #notice-image-preview img {
  border-radius: 12px;
  max-height: 140px;
  width: auto;
}
.img-preview-wrap { position: relative; display: inline-block; }
.img-preview-remove {
  position: absolute; top: -8px; right: -8px;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  background: #ef4444; color: #fff; border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.img-preview-remove svg { width: 13px; height: 13px; }

/* 갤러리 아이템 작성자 태그 */
.gallery-item .owner-tag {
  position: absolute; left: 6px; bottom: 6px;
  background: rgba(0,0,0,.55); color: #fff;
  font-size: 10px; font-weight: 600;
  border-radius: 999px; padding: 2px 7px;
  pointer-events: none; max-width: calc(100% - 12px);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 라이트박스 네비게이션 / 캡션 */
.lightbox-close {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  color: #fff; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.12); border-radius: 999px;
  transition: background .15s;
}
.lightbox-close:hover { background: rgba(255,255,255,.22); }
.lightbox-download {
  position: absolute; top: 16px; left: 16px; z-index: 10;
  color: #fff; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.12); border-radius: 999px;
  transition: background .15s;
}
.lightbox-download:hover { background: rgba(255,255,255,.22); }
.lightbox-download.is-busy { opacity: .5; pointer-events: none; }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
  color: #fff; width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.12); border-radius: 999px;
  transition: background .15s;
}
.lightbox-nav:hover { background: rgba(255,255,255,.22); }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
.lightbox-nav.hidden { display: none; }
.lightbox-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 16px 20px calc(20px + env(safe-area-inset-bottom));
  text-align: center; color: #fff; font-size: 13px;
  background: linear-gradient(to top, rgba(0,0,0,.55), transparent);
  pointer-events: none;
}
.lightbox-caption .who { font-weight: 700; }
.lightbox-caption .when { opacity: .8; margin-left: 8px; }
.lightbox-caption .size { opacity: .8; margin-left: 8px; }
@media (max-width: 640px) {
  .lightbox-nav { width: 40px; height: 40px; background: rgba(255,255,255,.1); }
}

/* ===== 사진 선택(다중 다운로드) 모드 ===== */
.gallery-item .select-check {
  position: absolute; top: 6px; left: 6px;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.85); color: transparent;
  border: 2px solid #fff; border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.gallery-item .select-check svg { width: 14px; height: 14px; }
.gallery-item.is-selected .select-check {
  background: #0d9488; color: #fff; border-color: #0d9488;
}
.gallery-item.is-selected { outline: 3px solid #0d9488; outline-offset: -3px; }
/* 선택 모드일 땐 작성자/위치/삭제 배지 숨김 */
.gallery.select-mode .owner-tag,
.gallery.select-mode .del-btn,
.gallery.select-mode .geo-badge { display: none; }

/* 하단 선택 액션바 */
.selection-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: flex; align-items: center; gap: 12px;
  max-width: 42rem; margin: 0 auto;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(10px);
  box-shadow: 0 -4px 16px -8px rgba(15,80,75,.25);
  border-radius: 18px 18px 0 0;
}
.selection-count { font-weight: 700; color: #0f766e; font-size: 14px; }
.selection-count.is-limit { color: #ef4444; }
.selection-bar-btn-ghost {
  color: #64748b; font-weight: 600; font-size: 14px;
  padding: 8px 4px;
}
.selection-bar-btn-primary {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(150deg, #2dd4bf, #0d9488);
  color: #fff; font-weight: 700; font-size: 14px;
  padding: 10px 18px; border-radius: 14px;
  box-shadow: 0 4px 12px -4px rgba(13,148,136,.4);
}
.selection-bar-btn-primary:disabled { opacity: .45; box-shadow: none; }

/* 갤러리 날짜 헤더 — 스크롤 시 상단에 붙는(sticky) 날짜 구분선 */
.gallery-day-header {
  grid-column: 1 / -1;
  position: sticky;
  top: 8px;
  z-index: 30;
  justify-self: start;
  margin: 6px 0 2px;
  padding: 5px 14px;
  font-size: 13px; font-weight: 700;
  color: #fff;
  background: rgba(15,80,75,.92);
  border-radius: 999px;
  box-shadow: 0 4px 12px -5px rgba(0,0,0,.3);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* 날씨 카드 — 클릭 가능 표시 */
#weather-card { transition: transform .12s; }
#weather-card:active { transform: scale(0.99); }
#weather-card a { color: inherit; text-decoration: none; }
