/* 안녕놀이터 공통 스타일 (Tailwind CDN 보조)
   BI 디자인가이드북 전용색상: MAIN #FE5E1A(PANTONE 172 C) / SUB #FDC04A(136 C)
   POINT #6CC24A(360 C) #3685C2(279 C) #DA291C(485 C) / SUB POINT #009A44 #0032A0 / DARK #414042 */
:root {
  --brand: #FE5E1A;
  --brand-hover: #e04f12;
  --brand-soft: #fff1ea;
  --bi-yellow: #fdc04a;
  --bi-green: #6cc24a;
  --bi-blue: #3685c2;
  --bi-red: #da291c;
  --bi-dark: #414042;
  --filter-inactive-bg: #eeeeee;
  --filter-inactive-text: #777777;
}
html { scroll-behavior: smooth; }
body { word-break: keep-all; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }
details > summary::-webkit-details-marker { display: none; }

/* 폼 요소 */
.input, .select {
  width: 100%; border: 1px solid #e5e7eb; border-radius: 0.875rem; padding: 0.75rem 1rem;
  font-size: 0.9375rem; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(254, 94, 26, .12); }
.select { appearance: none; padding-right: 2.25rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%239ca3af'%3E%3Cpath d='M5.3 7.3a1 1 0 011.4 0L10 10.6l3.3-3.3a1 1 0 111.4 1.4l-4 4a1 1 0 01-1.4 0l-4-4a1 1 0 010-1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center; background-size: 1.1rem; }
.filter-select .select { padding-top: .65rem; padding-bottom: .65rem; font-size: .875rem; border-radius: .75rem; }

/* 버튼 */
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; background: var(--brand); color: #fff;
  font-weight: 700; border-radius: 9999px; padding: .65rem 1.25rem; transition: background .15s, opacity .15s; }
.btn-primary:hover { background: var(--brand-hover); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; }
.btn-outline { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1px solid #e5e7eb; background: #fff;
  color: #374151; font-weight: 600; border-radius: 9999px; padding: .6rem 1.1rem; font-size: .875rem; transition: all .15s; }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }

/* 필터 알약 버튼 — 선택: #FE5E1A / #FFF, 비선택: #EEEEEE / #777777 */
.pill { display: inline-flex; align-items: center; padding: .55rem 1.1rem; border-radius: 9999px; font-size: .875rem; font-weight: 600;
  background: var(--filter-inactive-bg); color: var(--filter-inactive-text); border: 1px solid var(--filter-inactive-bg); transition: all .15s; }
.pill:hover { color: #374151; }
.pill-active, .pill-active:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

.chip { display: inline-flex; align-items: center; padding: .45rem .9rem; border-radius: 9999px; font-size: .8125rem; cursor: pointer;
  background: #fff; color: #4b5563; border: 1px solid #e5e7eb; transition: all .15s; user-select: none; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.peer:checked + .chip, .chip-active { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; }

.tab-btn { flex-shrink: 0; padding: .6rem 1.25rem; border-radius: 9999px; font-size: .9375rem; font-weight: 600; color: #6b7280; background: #fff;
  border: 1px solid #e5e7eb; transition: all .15s; }
.tab-btn:hover { color: var(--bi-dark); }
.tab-active, .tab-active:hover { background: var(--bi-dark); color: #fff; border-color: var(--bi-dark); }

/* 페이지네이션 */
.page-btn { min-width: 2.25rem; height: 2.25rem; padding: 0 .5rem; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9999px; font-size: .875rem; color: #4b5563; transition: all .15s; }
a.page-btn:hover { background: #f3f4f6; }
.page-btn-active { background: var(--brand); color: #fff; font-weight: 700; }
.page-ellipsis { min-width: 1.5rem; text-align: center; color: #9ca3af; font-size: .875rem; }
.per-page select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7280' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .7rem center; }

/* 카드 / 저장 버튼 */
.card img { background: #f3f4f6; }
.bookmark-btn { width: 2.4rem; height: 2.4rem; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.92); color: #6b7280; box-shadow: 0 2px 8px rgba(0,0,0,.12); transition: transform .15s, color .15s; }
.bookmark-btn:hover { transform: scale(1.08); color: var(--brand); }
.bookmark-btn.is-saved { color: var(--brand); }
.bookmark-btn:disabled, .detail-save-btn:disabled { opacity: .6; cursor: wait; }
.detail-save-btn { display: inline-flex; align-items: center; gap: .45rem; padding: .65rem 1.2rem; border-radius: 9999px; font-weight: 700; font-size: .9rem;
  border: 2px solid var(--brand); color: var(--brand); background: #fff; transition: all .15s; }
.detail-save-btn:hover { background: var(--brand-soft); }
.detail-save-btn.is-saved { background: var(--brand); color: #fff; }

.like-btn { display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.6rem; border-radius: 9999px; border: 2px solid #fecaca; color: #ef4444; font-weight: 700; background: #fff; transition: all .15s; }
.like-btn:hover { background: #fef2f2; }
.like-btn.is-liked { background: #ef4444; border-color: #ef4444; color: #fff; }

.section-title { font-size: 1.375rem; font-weight: 800; color: var(--bi-dark); margin-bottom: 1rem; }
.prose-text p + p { margin-top: 1rem; }

/* 갤러리 */
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 2.6rem; height: 2.6rem; border-radius: 9999px; background: rgba(255,255,255,.85);
  color: var(--bi-dark); display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.gallery-nav:hover { background: #fff; }
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.lightbox img { max-width: 100%; max-height: 88vh; object-fit: contain; border-radius: .5rem; }

/* 아코디언 (300ms) */
.accordion-panel { overflow: hidden; transition: max-height .3s ease; }
.accordion-item.is-open .accordion-icon { background: var(--brand); border-color: var(--brand); color: #fff; }

/* 상단 메뉴(상시 펼침) — 좁은 화면 가로 스크롤 시 우측 페이드 힌트 */
@media (max-width: 1023px) {
  #gnb { position: relative; }
  #gnb::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 28px; pointer-events: none;
    background: linear-gradient(to right, rgba(255,255,255,0), #fff); }
}
.gnb-link[aria-current="page"] { background: var(--brand-soft); }

/* 모달 / 토스트 */
.modal.is-open { display: flex; }
body.overflow-lock { overflow: hidden; }
.toast { position: fixed; left: 50%; bottom: 2rem; transform: translate(-50%, 1rem); z-index: 90; background: var(--bi-dark); color: #fff; font-size: .9rem;
  padding: .8rem 1.3rem; border-radius: 9999px; box-shadow: 0 10px 30px rgba(0,0,0,.25); opacity: 0; pointer-events: none; transition: all .25s; max-width: calc(100vw - 2rem); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--bi-red); }

/* 지도 */
.naver-map.has-map .map-fallback { display: none; }

/* 관리자 테이블 */
.admin-table th { text-align: left; font-weight: 600; color: #6b7280; padding: .75rem 1rem; border-bottom: 1px solid #f3f4f6; background: #fafafa; white-space: nowrap; }
.admin-table td { padding: .7rem 1rem; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }

.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
.naver-map .nmap { position: absolute !important; inset: 0; width: 100%; height: 100% !important; }
