/* ==========================================================================
   안채 홈페이지 스타일
   --------------------------------------------------------------------------
   1. 기본값 (색상 변수, 글꼴, 링크)
   2. 헤더 (사진 슬라이드, 언어 선택)
   3. 상단 바 (메뉴 + 언어 선택)
   4. 본문 공통 (제목, 버튼, 목록)
   5. 홈
   6. 사진 (갤러리)
   7. 주변 (장소 목록)
   8. 규칙
   9. 비품
   10. 예약
   11. 후기 (AI 요약 + 후기 목록)
   12. 푸터
   ========================================================================== */


/* 1. 기본값 ================================================================ */

:root {
    --text:       #222;
    --muted:      #737373;
    --line:       #d9d9d9;
    --bg-soft:    #f6f6f6;
    --accent:     #000;
    --baby:       #c2185b;   /* 비품 페이지 유아용품(*) 강조색 */
    --page-width: 960px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
    margin: 0;
    font-family: Verdana, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    color: var(--text);
    line-height: 1.6;
    word-break: keep-all;       /* 한글 단어 중간에서 줄바꿈 안 되게 */
    overflow-wrap: break-word;
}

img { vertical-align: middle; max-width: 100%; }

a { color: inherit; text-decoration: none; }
a:hover { font-weight: bold; }
a:active { color: green; }

.material-symbols-outlined {
    font-size: 1.15em;
    vertical-align: -0.2em;
}


/* 2. 헤더 ================================================================== */

/* 메뉴 탭 줄이 사진 아래쪽에 겹쳐 올라감 → 탭 사이·옆으로 사진이 보임 (흰 바탕 안 보이게)
 *   --tab-h  탭 하나 높이 (위 10px + 글줄 + 아래 여백, 아래 3-1 과 맞춤)
 *   --tab-up 메뉴 줄이 사진 위로 올라가는 만큼 = 위 여백 6px + 탭 높이 (좁은 화면은 언어 선택 줄 44px 더) */
:root { --tab-h: 46px; --tab-up: calc(6px + var(--tab-h)); }
@media (max-width: 600px) { :root { --tab-h: 43px; } }

.site-header {
    position: relative;
    background: #000;
}

.slide { display: none; position: relative; }
.slide.is-active {
    display: block;
    animation: fade 1.5s;
}
.slide img {
    display: block;
    width: 100%;
    max-height: 70vh;           /* 큰 모니터에서 사진이 화면을 다 덮지 않게 */
    min-height: calc(250px + var(--tab-up));   /* 사진이 가로로 길어서, 좁은 화면에선 메뉴 탭이 덮는 만큼 높여야 제목이 안 잘림 (양옆을 조금 잘라냄) */
    object-fit: cover;
}

.slide-count {
    position: absolute;
    top: 0;
    left: 0;
    padding: 8px 12px;
    color: #f2f2f2;
    font-size: 12px;
    text-shadow: 0 0 2px #000, 0 0 4px rgba(0, 0, 0, 0.6);   /* 흰 사진에서도 보이게 */
}

/* 사진 위 제목 '제주 안채' */
.hero-title {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 0 16px calc(clamp(28px, 7vh, 72px) + var(--tab-up));   /* 아래쪽은 메뉴 탭이 덮으니 그만큼 더 띄움 */
    text-align: center;
    color: #fff;
    /* 아래쪽을 살짝 어둡게 해서 어떤 사진이든 글씨가 잘 보이게 */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.15) 45%, rgba(0, 0, 0, 0) 70%);
    pointer-events: none;       /* 사진 넘기기 버튼 클릭 방해 안 하게 */

    /* 글자 테두리 대신 은은한 그림자 → 밝은 사진/어두운 사진 어디서든 보이면서 요즘 느낌 (2026-11 서체 교체) */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 2px 12px rgba(0, 0, 0, 0.45);
}
.hero-title h1 {                /* 제목·부제: 프리텐다드 (layout_start.php 에서 불러옴) */
    position: relative;
    margin: 0;
    font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    font-size: clamp(38px, 7.5vw, 84px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.02em;
    padding-left: 0.02em;       /* 자간 때문에 오른쪽으로 쏠리는 것 보정 */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 3px 18px rgba(0, 0, 0, 0.45);
}
.hero-title h1::after {         /* 제목 아래 구분선: 제목 글자 길이와 똑같이 */
    content: "";
    position: absolute;
    left: 0.02em;               /* 자간 보정 여백만큼 안쪽에서 시작 */
    right: 0.02em;
    bottom: -0.15em;
    height: 1px;
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.35);   /* 흰 사진에서도 살짝 보이게 */
}
.hero-eyebrow {
    margin: 0 0 10px;
    font-size: clamp(11px, 1.3vw, 14px);
    letter-spacing: 0.4em;
    padding-left: 0.4em;
    opacity: 0.9;
}
.hero-sub {
    margin: 1.4em 0 0;
    font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    font-size: clamp(14px, 1.8vw, 20px);
    font-weight: 300;
    letter-spacing: 0.15em;
    padding-left: 0.15em;
    opacity: 0.95;
}
@media (max-width: 600px) {
    .slide img { min-height: calc(270px + var(--tab-up)); }   /* 폰: 사진이 너무 납작하지 않게 조금 더 높게 */
}

.slide-btn {
    position: absolute;
    top: 50%;
    margin-top: -22px;
    padding: 16px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.6s ease;
    text-shadow: 0 0 2px #000, 0 0 6px rgba(0, 0, 0, 0.6);   /* 흰 사진에서도 보이게 */
}
.slide-prev { left: 0;  border-radius: 0 3px 3px 0; }
.slide-next { right: 0; border-radius: 3px 0 0 3px; }
.slide-btn:hover { background-color: rgba(0, 0, 0, 0.8); }

@keyframes fade {
    from { opacity: 0.4; }
    to   { opacity: 1; }
}

/* 3. 상단 바 (메뉴 + 언어 선택) ============================================ */

.site-bar {
    position: sticky;           /* 스크롤해도 화면 위에 붙어 있음 */
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: calc(-1 * var(--tab-up));   /* 사진 아래쪽에 겹쳐 올림 → 탭 사이·옆으로 사진이 보임 */
    /* 위쪽 여백: 탭의 둥근 모서리가 보이도록
       양옆: 넓은 화면에선 본문(.page, 가운데 960px + 안쪽 16px)이 시작하는 줄에 첫 탭을 맞춤 */
    padding: 6px max(16px, calc((100% - var(--page-width)) / 2 + 16px)) 0;
    /* 바 자체는 투명: 탭마다 검은 탭 모양이라 어디까지가 버튼인지 보임
       스크롤해서 화면 위에 붙으면(.is-stuck, common.js) 아래 글자가 비치지 않게 본문과 같은 흰색 */
    background: transparent;
}
.site-bar.is-stuck { background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }
/* 맨 위에 붙어 떠 있을 때: 탭 아래쪽도 둥글게 → 버튼처럼
 *   탭 아래 여백을 줄인 만큼 바 아래에 여백을 줘서 바 높이는 그대로 (높이가 바뀌면 본문이 들썩임) */
.site-bar.is-stuck { padding-top: 5px; padding-bottom: 5px; }                        /* 5 + 9 + 24 + 9 + 5 = 52 (원래 6 + 46) */
.site-bar.is-stuck .site-nav a { padding-top: 9px; padding-bottom: 9px; border-radius: 10px; }   /* 글자가 탭 세로 가운데 */
.site-bar.is-stuck .site-nav a.is-active { box-shadow: inset 0 0 0 1px #ccc; }   /* 흰 바 위 흰 탭: 테두리를 한 바퀴 */

/* 3-1. 메뉴 */
.site-nav {
    flex: 1 1 auto;
    min-width: 0;
    align-self: flex-end;
    display: flex;
    gap: 4px;                   /* 탭 사이 틈: 탭 하나하나가 따로 보이게 */
    overflow-x: auto;           /* 화면이 아주 좁으면 옆으로 밀어서 보기 */
}
.site-nav a {
    flex: 0 0 auto;
    padding: 10px 18px 12px;
    border-radius: 10px 10px 0 0;   /* 윗부분만 둥글게 (탭 모양) */
    background: #000;           /* 안 고른 탭: 검은 탭 */
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.3), inset 1px 0 rgba(255, 255, 255, 0.2), inset -1px 0 rgba(255, 255, 255, 0.2);   /* 어두운 사진 위에서도 탭 모양이 보이게 옅은 테두리 */
    color: #fff;
    font-size: 16px;
    line-height: 24px;          /* 탭 높이 = 10 + 24 + 12 = 46px (--tab-h) */
    font-weight: 600;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}
.site-nav a:hover {
    background: #3a3a3a;
    font-weight: 600;
}
.site-nav a.is-active {
    background: #fff;           /* 아래 흰 본문과 이어져서 탭처럼 보임 */
    box-shadow: inset 0 1px #ddd, inset 1px 0 #ddd, inset -1px 0 #ddd;   /* 흰 바 위에서도 탭 모양이 보이게 옅은 테두리 (아래쪽은 본문과 이어짐) */
    color: #000;
    font-weight: bold;
}

/* 관리자 화면일 때 메뉴 끝의 'admin' 탭: 글자가 무지개색으로 흘러감 */
.rainbow-text {
    background: linear-gradient(90deg, #ff3b30, #ff9500, #ffcc00, #34c759, #00c7be, #007aff, #af52de, #ff2d55, #ff3b30);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: rainbow-flow 3s linear infinite;
}
@keyframes rainbow-flow {
    from { background-position: 0% 50%; }
    to   { background-position: 200% 50%; }
}
@media (prefers-reduced-motion: reduce) {   /* 움직임 줄이기 설정이면 멈춘 무지개 */
    .rainbow-text { animation: none; }
}

/* 3-1-1. 관리자 로그아웃 (이 PC에서 로그인했을 때만, 메뉴 줄 오른쪽 끝) */
.site-admin {
    flex: none;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 6px auto;
}
.site-admin form { margin: 0; }
.site-admin a,
.site-admin button {
    padding: 4px 12px;
    border: 1px solid #ccc;     /* 메뉴 줄이 흰색이라 테두리로 구분 */
    border-radius: 999px;
    background: #fff;           /* 흰 바탕 + 검은 글자 (언어 선택과 같은 느낌) */
    color: #000;
    font: inherit;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
}
.site-admin a:hover,
.site-admin button:hover { background: #e8e8e8; border-color: #e8e8e8; font-weight: normal; }
.site-admin-icon { display: none; }
@media (max-width: 600px) {     /* 폰 폭: 메뉴 자리 확보, 로그아웃은 🚪 아이콘만 */
    .site-admin { gap: 2px; margin-left: 2px; }
    .site-admin a, .site-admin button { padding: 3px 6px; }
    .site-admin-text { display: none; }
    .site-admin-icon { display: inline; }
}

/* 3-2. 언어 선택: 둥근 알약 모양, 선택된 쪽은 검은 글씨 + 굵게 + 두꺼운 검은 테두리
 *  화면 오른쪽 위에 떠 있다가, 스크롤해서 메뉴 줄이 올라오면 메뉴 줄에 밀려서 같이 위로 사라짐
 *  (밀어 올리는 건 common.js 가 transform 으로, JS 가 없으면 그냥 계속 떠 있음) */
.lang-switch {
    position: fixed;
    top: 9px;
    right: 12px;
    z-index: 11;                /* 메뉴 줄보다 위 */
    display: flex;
    padding: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    background: #fff;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1;
}
.lang-switch a,
.lang-switch span {
    padding: 5px 12px;
    border: 3px solid transparent;  /* 선택 안 된 쪽도 같은 두께 테두리(투명) → 바꿔도 크기 안 흔들림 */
    border-radius: 999px;
    color: #555;
    transition: background-color 0.2s ease;
}
.lang-switch .is-active {
    border-color: #000;
    color: #000;
    font-weight: bold;
}
.lang-switch a:hover {
    background: rgba(0, 0, 0, 0.08);
    font-weight: normal;
}

/* 좁은 화면(태블릿/폰): 메뉴 줄 양옆 여백을 줄임 */
@media (max-width: 819px) {
    .site-bar { padding: 6px 4px 0; }
    .lang-switch { top: 5px; right: 8px; }
}
/* 폰: 메뉴 7개를 화면 폭에 맞게 */
@media (max-width: 600px) {
    .site-nav { gap: 2px; }
    .site-nav a {
        flex: 1 1 auto;         /* 메뉴 7개를 화면 폭에 맞게 나눠 가짐 */
        padding: 10px 2px 11px;
        border-radius: 8px 8px 0 0;
        font-size: 14px;
        line-height: 22px;      /* 탭 높이 = 10 + 22 + 11 = 43px (--tab-h) */
        text-align: center;
    }
    .site-bar.is-stuck { padding-top: 4px; }                                          /* 4 + 9 + 22 + 9 + 5 = 49 (원래 6 + 43) */
    .site-bar.is-stuck .site-nav a { padding-top: 9px; padding-bottom: 9px; border-radius: 8px; }
}
@media (max-width: 350px) {
    .site-nav a { font-size: 13px; }   /* 아주 작은 폰(아이폰 SE 1세대 등) */
}


/* 4. 본문 공통 ============================================================= */

.page {
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 16px 16px 48px;
}

.page h2 { margin: 24px 0 16px; }
.page h3 { margin: 32px 0 10px; }

/* ---------------------------------------------------------------------------
 * 공통 카드 디자인 (홈, 사진, 주변, 규칙, 예약, 후기에서 같이 사용)
 *   .group-title   회색 묶음 제목 + 오른쪽 가는 선 (+ 더보기 링크)
 *   .jump-index    바로가기 꼬리표 (폰에서도 여러 줄로 다 보이기)
 *   .card          흰 카드 (둥근 모서리 + 옅은 그림자)
 *   .card-head     카드 제목 줄 (.card-icon 동그라미 아이콘)
 *   .card-grid     카드 바둑판 (폭에 맞춰 자동으로 2~3칸)
 *   .card-columns  카드 2단 (위→아래로 채움, 높이 다른 카드용)
 * ------------------------------------------------------------------------- */

.group-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 36px 0 14px;
    color: var(--muted);
}
.group-title h3 {
    margin: 0;
    font-size: 15px;
    letter-spacing: 0.05em;
    color: inherit;
}
.group-title::after {           /* 제목 오른쪽 가는 선 */
    content: "";
    order: 1;
    flex: 1;
    height: 1px;
    background: var(--line);
}
.group-title .more-link { order: 2; }
.group-title a:hover { color: #000; font-weight: normal; }
.more-link { color: var(--muted); font-size: 14px; white-space: nowrap; }

.jump-target { scroll-margin-top: 70px; }   /* 바로가기로 이동했을 때 위 메뉴에 가려지지 않게 */

.jump-index {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 8px;
}
.jump-index a {
    padding: 5px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-size: 14px;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}
.jump-index a:hover { border-color: #000; background: var(--bg-soft); font-weight: normal; }

.card {
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    scroll-margin-top: 80px;
}
.card:target { border-color: #000; }   /* 바로가기로 온 카드 강조 */
/* 누르는 기능이 없는 글 상자: 모서리 각지게 (둥근 건 누르는 버튼만)
 *   이용안내·비품의 상자, 후기 페이지의 '이용후기' 묶음과 후기 하나하나 */
.card.is-square, .review-panel.is-square { border-radius: 0; }
/* 예약 페이지 각진 카드 안의 누르지 않는 상자들도 각지게: 달의 색 띠 머리, 캘린더 점검 줄, 마감임박 띠,
   초록 예약 요약 창, 호스트 문의의 답장·조회 안내 (버튼·입력칸·날짜 칸·접힌 단계 '고치기'는 그대로 둥글게) */
.is-square .bookcal-head, .is-square .bookcal-check, .is-square .bookcal-lastmin,
.is-square .bookreq-sum, .is-square .direct-book-terms { border-radius: 0; }

.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.card-head h3,
.card-head h4 { margin: 0; font-size: 17px; }

.card-icon {                    /* 동그라미 이모지 아이콘 */
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-soft);
    font-size: 19px;
}
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.card-columns { columns: 2; column-gap: 16px; }
.card-columns.is-single { columns: 1; }     /* 카드가 하나뿐이면 한 단으로 넓게 */
.card-columns > .card { break-inside: avoid; margin: 0 0 16px; }

@media (max-width: 767px) {
    .card { padding: 16px; scroll-margin-top: 110px; }
    .jump-target { scroll-margin-top: 100px; }
    .card-columns { columns: 1; }
    .card-grid { gap: 12px; }
    .jump-index { gap: 6px; }   /* 폰: 밀지 않고 여러 줄로 다 보이기 */
    .jump-index a { font-size: 13px; padding: 4px 10px; white-space: nowrap; }
}

/* 버튼 (전화걸기, 복사 등) */
.btn {
    display: inline-block;
    padding: 0 10px;
    border: 2px solid #000;
    background: #fff;
    color: #777;
    font: inherit;
    font-size: 15px;
    line-height: 24px;
    cursor: pointer;
    transition: box-shadow 0.3s ease;
    white-space: nowrap;
}
.btn:hover {
    font-weight: normal;
    box-shadow:
        -7px -7px 20px 0 #fff9,
        -4px -4px 5px 0 #fff9,
        7px 7px 20px 0 #0002,
        4px 4px 5px 0 #0001;
}
.btn:active { transform: translateY(-2px); }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }

/* 홈페이지 버튼 공통: 남동(오른쪽 아래 45°)으로만 그림자 — 퍼짐을 줄여서(-1px) 위·왼쪽엔 안 생김
   (헤더 사진 위 화살표·메뉴·언어 선택은 제외) */
.btn, .book-btn, .fold-btn, .blog-review-btn,
.jump-index a, .local-tabs a,
.bookcal-btn, .bookcal-refresh, .bookcal-unit,
.place-toggle button, a.place-review, .site-admin button {
    box-shadow: 3px 3px 3px -1px rgba(0, 0, 0, 0.28);
}
.bookcal-btn:disabled, .bookcal-refresh:disabled { box-shadow: none; }

/* 점 없는 목록 */
.plain-list { margin: 0; padding: 0; list-style: none; }

/* 항목명 : 값 */
.kv {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 2px 12px;
    margin: 0;
}
.kv dd { margin: 0; }

/* 검색창 (후기·비품): 줄 오른쪽 끝에 붙는 둥근 입력칸, 폰에서는 한 줄 통째로
 *   검색 중 안 맞는 건 .is-filtered-out 으로 숨기고, 찾은 글자는 <mark> 형광펜 (js/common.js AnchaeSearch)
 *   .search-slot = 원래 자리. 스크롤해서 지나가면 검색창만 메뉴 바로 아래에 떠서 따라옴 (.is-floating) */
.search-slot { flex: none; width: 290px; margin-left: auto; }
.search-box {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    padding: 0 12px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 999px;
    color: #888;
    transition: border-color 0.2s ease;
}
.search-box:focus-within { border-color: #000; color: #000; }
.search-box.is-floating {       /* 위치(top/left/width)는 common.js 가 원래 자리에 맞춰 넣음 */
    position: fixed;
    z-index: 9;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
.search-box input {
    flex: 1;
    min-width: 0;
    padding: 6px 0;
    border: 0;
    outline: none;
    background: none;
    font: inherit;
    font-size: 14px;
}
@media (pointer: coarse) {      /* 폰·태블릿: 16px보다 작으면 아이폰이 누를 때 화면을 확대함 */
    .search-box input { padding: 5px 0; font-size: 16px; }
}
/* 지우기(×): 브라우저 기본 × 대신 직접 붙인 버튼 (js/common.js) — 폰에서도 똑같이 보이게 */
.search-box input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search-clear {
    display: grid;
    place-items: center;
    flex: none;
    width: 26px;
    height: 26px;
    margin-right: -6px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #e8e8e8;
    color: #555;
    cursor: pointer;
}
.search-clear[hidden] { display: none; }
.search-clear .material-symbols-outlined { font-size: 18px; }
.search-clear:hover, .search-clear:active { background: #d6d6d6; color: #000; }
.search-status { margin: 0 0 14px; color: #666; font-size: 14px; }
.js .is-filtered-out { display: none !important; }
mark { padding: 0 1px; background: #ffe066; border-radius: 3px; color: inherit; }

@media (max-width: 600px) {
    :has(> .search-slot) { flex-wrap: wrap; }
    .search-slot { width: 100%; }
}

/* 숙소 특징 (가족형, 독채민박 …): 바로가기 버튼과 헷갈리지 않게 테두리 없이 ✓ 글자로만 */
.tags { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 16px; padding: 0; list-style: none; }
.tags li {
    color: #444;
    font-size: 14px;
    white-space: nowrap;
}
.tags li::before {
    content: "✓";
    margin-right: 4px;
    color: #2e7d32;
    font-weight: bold;
}


/* 5. 홈 ==================================================================== */

.intro {                        /* 인사말: 헤더 제목과 같은 명조 글꼴, 가운데 정렬 */
    margin: 28px 0 8px;
    padding: 28px 20px;
    background: var(--bg-soft);
    border-color: transparent;
    box-shadow: none;
    text-align: center;
    font-family: "Hahmlet", "Nanum Myeongjo", serif;
    font-size: 17px;
    line-height: 1.9;
}
@media (max-width: 600px) {
    .intro { font-size: 15px; padding: 20px 14px; }
    .intro br { display: none; }    /* 폰에서는 줄바꿈 없이 자연스럽게 */
}


/* 6. 사진 (갤러리) ========================================================= */

.gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
}
.gallery img {
    display: block;
    width: 100%;
    height: auto;               /* img 의 width/height 값(들썩임 방지용)보다 4:3 칸이 우선 */
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
}
.gallery a:hover img { opacity: 0.85; }
.card > .gallery { margin: 0; }
.gallery-card { padding: 10px; }

@media (max-width: 700px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 500px) { .gallery { grid-template-columns: repeat(3, 1fr); } }

/* 사진 페이지: 메이슨리 (photos.php + js/photos.js)
 *   JS 가 없으면 3칸 바둑판(4:3 로 잘라서), JS 가 있으면 .is-masonry → 사진 원래 비율 그대로 벽돌 쌓기
 *   벽돌 쌓기 원리: 2px 짜리 줄을 깔고, 사진마다 높이만큼 줄을 차지(grid-row-end: span N, JS 가 계산)
 *   → 순서는 왼쪽→오른쪽(줄 단위) 그대로라 외부·거실·주방… 순서가 안 섞임 */
/* 공간 버튼(전체·외부·거실…): 스크롤해도 메뉴 줄 바로 아래에 붙어서 따라옴
 *   top = 메뉴 줄 높이 (--tab-up: 위 여백 6px + 탭 높이), 붙으면 아래 그림자 (.is-stuck, js/photos.js)
 *   폰: 줄바꿈 대신 한 줄로 옆으로 밀어서 보기 (붙어 있을 때 사진을 덜 가리게) */
.local-tabs.photo-filter {     /* .local-tabs(아래쪽에 정의)의 여백보다 우선 */
    position: sticky;
    top: var(--tab-up);
    z-index: 8;                 /* 메뉴 줄(10) 아래, 사진 위 */
    margin: 0 -16px 14px;       /* 본문 양옆 여백까지 흰 바탕을 넓혀서 사진이 옆으로 비치지 않게 */
    padding: 8px 16px;
    background: #fff;
    transition: box-shadow 0.2s;
}
.photo-filter.is-stuck { box-shadow: 0 6px 10px -6px rgba(0, 0, 0, 0.18); }
/* '전체' 왼쪽에 크게(공간 버튼 줄 수만큼 높이) + 공간 버튼들은 오른쪽 남은 폭 안에서 줄바꿈
 *   화면 밖으로 나가거나 옆으로 밀 일 없이 늘 화면 안 (좁으면 줄이 하나 더 생김) */
.local-tabs.photo-filter { flex-wrap: nowrap; align-items: stretch; gap: 8px; }
.photo-filter .photo-filter-all {
    flex: none;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-width: 72px;
    padding: 4px 14px;
    border-radius: 14px;
    font-size: 17px; font-weight: bold;
}
.photo-filter .photo-filter-all span { font-size: 12px; font-weight: normal; }
.photo-filter-rooms {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    gap: 6px;
}
/* 세트 버튼 (photos.json 의 set 이 같은 묶음, 예: 욕실 | 화장실): 딱 붙여서 한 덩어리, 맨 왼쪽·맨 오른쪽만 둥글게 */
.chip-set { display: inline-flex; flex: none; }
.photo-filter .chip-set a, .admin-tabs .chip-set a { border-radius: 0; margin: 0; }
.photo-filter .chip-set a:first-child, .admin-tabs .chip-set a:first-child { border-radius: 999px 0 0 999px; }
.photo-filter .chip-set a:last-child, .admin-tabs .chip-set a:last-child  { border-radius: 0 999px 999px 0; }
.photo-filter .chip-set a + a, .admin-tabs .chip-set a + a { margin-left: -1px; }   /* 가운데 테두리 한 줄로 */
.photo-filter .chip-set a:hover, .photo-filter .chip-set a.is-active,
.admin-tabs .chip-set a:hover, .admin-tabs .chip-set a.is-active { position: relative; z-index: 1; }   /* 진한 테두리가 옆 버튼에 안 가리게 */
/* 관리자 운영비 묶음: 폰에서는 한 줄 안에 들어가게 작게 */
@media (max-width: 480px) {
    .admin-tabs .chip-set { max-width: 100%; }
    .admin-tabs .chip-set a { flex: 0 1 auto; min-width: 0; padding-left: 7px; padding-right: 7px; font-size: 12.5px; letter-spacing: -0.3px; white-space: nowrap; }
}
/* 세트에서 누른 것 말고 같이 보이는 공간: 연한 회색 (누른 것은 까맣게 = 주인공) */
.photo-filter .chip-set a.is-set { background: #e9e9e9; border-color: #bbb; color: #333; }
/* 세트에서 누른 공간 사진: 진한 테두리 + 꼬리표를 흰 바탕 굵은 글씨로 (나머지 공간 사진은 그대로) */
.masonry-item.is-main { box-shadow: 0 0 0 3px #000; }
.masonry-item.is-main .masonry-tag { background: #fff; color: #000; font-weight: bold; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); }
@media (max-width: 600px) {   /* 폰: 버튼을 조금 작게 → 줄 수를 줄여서 붙어 있을 때 사진을 덜 가리게 */
    .local-tabs.photo-filter { gap: 6px; padding-top: 6px; padding-bottom: 6px; }
    .photo-filter-rooms { gap: 4px; }
    .photo-filter .photo-filter-rooms a { padding: 3px 9px; font-size: 13px; }   /* .local-tabs a(뒤쪽 정의)보다 우선 */
    .photo-filter .photo-filter-all { min-width: 58px; padding: 4px 10px; font-size: 15px; }
}
@media (max-width: 360px) {   /* 아주 작은 폰: 한 줄에 더 들어가게 */
    .photo-filter .photo-filter-rooms a { padding: 2px 7px; font-size: 12px; }
    .photo-filter .photo-filter-rooms a span { font-size: 11px; }
    .photo-filter .photo-filter-all { min-width: 50px; padding: 4px 8px; font-size: 14px; }
}
.masonry {
    --masonry-gap: 8px;
    --base-cols: 3;             /* 기본 칸 수 (폰 2) */
    display: grid;
    /* --cols: 한 공간만 볼 때 사진이 1~2장이면 칸 수를 그만큼으로 줄이고 가운데로 (js/photos.js) */
    grid-template-columns: repeat(var(--cols, var(--base-cols)), minmax(0, 1fr));
    max-width: var(--masonry-max, none);
    margin: 0 auto;
    gap: var(--masonry-gap);
}
.masonry.is-masonry { grid-auto-rows: 2px; row-gap: 0; }   /* 줄 사이 간격은 사진 아래 여백으로 (JS 가 높이에 더해서 계산) */
.masonry-item {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--bg-soft);
    scroll-margin-top: 80px;
}
.masonry.is-masonry .masonry-item { margin-bottom: var(--masonry-gap); }
.masonry-item img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;        /* JS 없을 때: 바둑판 */
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.2s;
}
.masonry.is-masonry .masonry-item img { aspect-ratio: auto; }   /* 원래 비율 (img 의 width/height) */
.masonry-item:hover img { transform: scale(1.03); }
.masonry-item.is-hidden { display: none; }
/* 어느 공간 사진인지: 왼쪽 아래 작은 꼬리표 */
.masonry-tag {
    position: absolute;
    left: 8px;
    bottom: 8px;
    padding: 2px 8px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 12px;
    line-height: 18px;
    pointer-events: none;
}
.masonry.is-filtered .masonry-tag { display: none; }   /* 한 공간만 볼 땐 꼬리표가 다 같으니 숨김 */
.masonry-link { display: block; }

/* 좋아요 버튼 (inc/likes.php like_button, js/common.js) — 사진 ♥ / 후기 👍 */
.like-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px;
    border: 1px solid #ddd; border-radius: 999px;
    background: #fff; color: #555;
    font: inherit; font-size: 13px; line-height: 18px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}
.like-btn:hover { border-color: #999; color: #000; }
.like-btn:active { transform: scale(0.94); }
.like-btn .like-icon { flex: none; }
.like-btn svg.like-icon { fill: none; stroke: currentColor; stroke-width: 2; }
/* 인기(10개 이상): 내가 안 눌렀어도 하트 안을 연분홍으로 → 많이 받은 사진이 눈에 띄게 */
.like-btn.is-heart.is-popular:not(.is-on) svg.like-icon { fill: #f8bfd0; stroke: #e0245e; }
.like-btn.is-heart.is-popular:not(.is-on) .like-count { color: #c2185b; font-weight: bold; }
.like-btn.is-heart.is-on { color: #e0245e; border-color: #f3b6c8; }
.like-btn.is-heart.is-on svg.like-icon { fill: #e0245e; stroke: #e0245e; }
.like-btn.is-thumb.is-on { color: #1b5e20; border-color: #a5d6a7; background: #e8f5e9; font-weight: bold; }
.like-btn.is-pop .like-icon { animation: like-pop 0.35s ease-out; }
@keyframes like-pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .like-btn.is-pop .like-icon { animation: none; } }
.like-count:empty { display: none; }   /* 0 이면 숫자 안 보임 */
/* 사진 칸 오른쪽 위 ♥ */
.masonry-item .like-btn {
    position: absolute; top: 6px; right: 6px;
    padding: 3px 8px;
    border: 0;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    color: #333;
}
.masonry-item .like-btn.is-on { color: #e0245e; }
@media (max-width: 600px) { .masonry-item .like-btn { top: 4px; right: 4px; padding: 2px 6px; font-size: 12px; } }
@media (max-width: 600px) {
    .masonry { --masonry-gap: 4px; --base-cols: 2; }
    .masonry-tag { left: 4px; bottom: 4px; padding: 1px 6px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .masonry-item img { transition: none; } .masonry-item:hover img { transform: none; } }

/* 사진 크게 보기 창 (photos.php <dialog class="lightbox">, js/photos.js)
 *   화면 전체 검은 바탕 / 위: 공간 이름·n/전체 + × / 가운데: 큰 사진 + 좌우 ◀ ▶ / 아래: 작은 사진 줄 */
html.is-lightbox-open { overflow: hidden; }   /* 열려 있는 동안 뒤 페이지 스크롤 막기 */
.lightbox {
    /* --lb-chrome: 큰 사진 말고 나머지가 차지하는 높이 (위 줄 + ♥ + 작은 사진 줄 + 아래 여백) → 큰 사진 최대 높이 계산용 */
    --lb-bottom: max(56px, calc(env(safe-area-inset-bottom) + 40px));   /* 아래 여백: 작은 사진 줄을 바닥에서 넉넉히 띄움 */
    --lb-chrome: calc(208px + var(--lb-bottom));
    width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh;
    margin: 0; padding: 0 0 var(--lb-bottom); border: 0;
    background: #0b0b0b;        /* 뒤 페이지 글자가 비치지 않게 꽉 채움 */
    color: #fff;
}
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }   /* 위 / 큰 사진 + ♥ / 작은 사진 줄 */
/* 큰 사진과 ♥ 를 한 덩어리로 가운데 (♥ 는 사진 바로 아래) */
.lightbox-figure { position: relative; display: flex; flex-direction: column; align-items: center; margin: 0; max-width: 100%; }
.lightbox-actions { display: flex; justify-content: center; padding: 12px 0 0; }
/* 사진을 누르면 가운데에 큰 ♥ 가 톡 떴다 사라짐 */
.lightbox-burst {
    position: absolute; left: 50%; top: calc(50% - 26px);
    width: 96px; height: 96px; margin: -48px 0 0 -48px;
    opacity: 0; pointer-events: none;
}
.lightbox-burst svg { width: 100%; height: 100%; fill: #ff6b93; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.4)); }
.lightbox-burst.is-on { animation: lightbox-burst 0.7s ease-out; }
/* 취소: 빈 하트(테두리만)가 작아지며 사라짐 */
.lightbox-burst.is-off svg { fill: none; stroke: #fff; stroke-width: 1.5; }
.lightbox-burst.is-off { animation: lightbox-unburst 0.6s ease-out; }
@keyframes lightbox-unburst {
    0%   { opacity: 0; transform: scale(1.1); }
    25%  { opacity: 0.9; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.5); }
}
@keyframes lightbox-burst {
    0%   { opacity: 0; transform: scale(0.4); }
    25%  { opacity: 0.95; transform: scale(1.1); }
    60%  { opacity: 0.95; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.15); }
}
@media (prefers-reduced-motion: reduce) { .lightbox-burst.is-on, .lightbox-burst.is-off { animation-duration: 0.01s; } }
.lightbox::backdrop { background: rgba(0, 0, 0, 0.6); }
.lightbox-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 6px 18px; }
.lightbox-caption { margin-right: auto; font-size: 14px; color: #ddd; }
.lightbox .like-btn { border-color: rgba(255, 255, 255, 0.3); background: transparent; color: #fff; padding: 7px 18px; font-size: 15px; }
.lightbox .like-btn svg.like-icon { width: 20px; height: 20px; }
.lightbox .like-btn:hover { border-color: #fff; }
.lightbox .like-btn.is-on { color: #ff6b93; border-color: #ff6b93; }
.lightbox .like-btn.is-on svg.like-icon { fill: #ff6b93; stroke: #ff6b93; }
.lightbox button { border: 0; background: none; color: #fff; font: inherit; cursor: pointer; }
.lightbox-close { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; }
.lightbox-close:hover { background: rgba(255, 255, 255, 0.12); }
.lightbox-close .material-symbols-outlined { font-size: 28px; }
.lightbox-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 64px; }
.lightbox-img {
    display: block;
    max-width: 100%;
    max-height: calc(100dvh - var(--lb-chrome));   /* 화면 높이에서 위 줄·♥·작은 사진 줄 자리를 뺀 만큼 */
    width: auto; height: auto;  /* 사진 비율 그대로 */
    cursor: pointer;            /* 가운데 60% 두 번 누르면 ♥, 양쪽 20% 는 넘기기 (js/photos.js) */
    touch-action: manipulation; /* 폰에서 두 번 누를 때 화면이 확대되지 않게 */
    user-select: none; -webkit-user-drag: none;
}
.lightbox-img[data-zone="prev"] { cursor: w-resize; }
.lightbox-img[data-zone="next"] { cursor: e-resize; }
.lightbox-img:not(.is-loaded) { filter: blur(2px); }   /* 큰 사진 불러오는 동안 (작은 사진을 늘린 것) */
.lightbox-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 2;                 /* 큰 사진(뒤에 오는 figure)에 가려지지 않게 — 폰에서 ◀ 가 사진 밑에 깔렸었음 */
    width: 48px; height: 48px; display: grid; place-items: center;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.14) !important;
}
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.28) !important; }
.lightbox-nav:active { transform: translateY(-50%) scale(0.92); }
/* 넘길 때마다 그쪽 버튼이 눌린 것처럼 (사진 양쪽 누르기·키보드·밀기도, js/photos.js step) */
.lightbox-nav.is-pressed { animation: lightbox-nav-press 0.28s ease-out; }
@keyframes lightbox-nav-press {
    0%   { transform: translateY(-50%) scale(1); }
    35%  { transform: translateY(-50%) scale(0.86); background: rgba(255, 255, 255, 0.45); }
    100% { transform: translateY(-50%) scale(1); }
}
.lightbox-nav.is-prev { left: 10px; }
.lightbox-nav.is-next { right: 10px; }
.lightbox-nav .material-symbols-outlined { font-size: 34px; }
.lightbox.is-single .lightbox-nav, .lightbox.is-single .lightbox-strip { display: none; }
/* 아래 작은 사진 줄: 옆으로 밀어서 보기, 지금 사진은 밝게 + 흰 테두리 */
.lightbox-strip {
    display: flex; gap: 6px;
    padding: 10px 50%;          /* 양 끝 사진도 가운데까지 올 수 있게 */
    overflow-x: auto;
    scrollbar-width: none;
}
.lightbox-strip::-webkit-scrollbar { display: none; }
.lightbox-strip button { flex: none; padding: 0; opacity: 0.45; outline: 2px solid transparent; outline-offset: 1px; transition: opacity 0.2s; }
.lightbox-strip button:hover { opacity: 0.8; }
.lightbox-strip button.is-active { opacity: 1; outline-color: #fff; }
.lightbox-strip img { display: block; width: 64px; height: 48px; object-fit: cover; }
/* 공간 이름표: 그 공간 첫 사진 왼쪽 ('거실', '주방' …) */
.lightbox-strip-label {
    flex: none; align-self: center;
    margin: 0 2px 0 10px; padding: 0 2px;
    color: #bbb; font-size: 12px; white-space: nowrap;
    writing-mode: horizontal-tb;
}
.lightbox-strip-label:first-child { margin-left: 0; }
@media (max-width: 600px) {
    .lightbox { --lb-bottom: max(64px, calc(env(safe-area-inset-bottom) + 44px)); --lb-chrome: calc(192px + var(--lb-bottom)); }
    .lightbox-stage { padding: 0; }
    .lightbox-nav { width: 40px; height: 40px; background: rgba(0, 0, 0, 0.35) !important; }
    .lightbox-nav.is-prev { left: 6px; }
    .lightbox-nav.is-next { right: 6px; }
    .lightbox-strip img { width: 52px; height: 40px; }
    .lightbox-strip-label { font-size: 11px; margin-left: 8px; }
}


/* 7. 주변 (장소 목록) ====================================================== */

.place-card { display: flex; flex-direction: column; gap: 4px; }

.place-name { font-size: 16px; font-weight: bold; line-height: 1.45; }
a.place-name { display: inline-flex; align-items: flex-start; gap: 4px; }
a.place-name:hover { text-decoration: underline; text-underline-offset: 3px; }

.place-addr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 14px; }
.place-addr .btn { font-size: 12px; line-height: 20px; border-width: 1px; border-radius: 999px; padding: 0 10px; color: #000; }
.place-name-ko { margin-top: -4px; color: #666; font-size: 13px; }   /* 영어 화면에서 이름 아래 한글 이름 */

/* 주변 페이지: 로컬 전용 관리자 버튼 */

/* 주변 페이지: 묶음 접기 (제목 줄 = 접기 버튼, 가는 선 오른쪽 끝에 접기/펼치기) */
.local-fold > summary.group-title .fold-btn { order: 2; margin-left: 0; }
.local-fold:not([open]) > summary.group-title { margin-bottom: 0; }
.local-count { color: #aaa; font-size: 12px; letter-spacing: 0; }

/* 주변 페이지: 제목 + 검색창, 분류 탭, 한 줄 목록 (누르면 펼쳐짐) */
.local-head { display: flex; align-items: center; gap: 12px; margin: 24px 0 12px; }
.page .local-head h2 { margin: 0; }

.local-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.local-tabs a {
    padding: 4px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-size: 14px;
    white-space: nowrap;
}
.local-tabs a span { color: var(--muted); font-size: 12px; }
.local-tabs a:hover { border-color: #000; font-weight: normal; }
.local-tabs a.is-active { background: #000; border-color: #000; color: #fff; font-weight: bold; }
.local-tabs a.is-active span { color: #ccc; }

/* 정렬: 거리순 · 가나다순 — 누르는 버튼인 걸 알게 작은 테두리 버튼 (위 분류 탭의 까만 알약과 헷갈리지 않게 흰 바탕)
 *   고른 쪽만 진한 테두리 + 화살표(↑ 바른 순 / ↓ 역순, js/local.js), 누르면 살짝 눌림 */
.local-sort { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 13px; }   /* 왼쪽 정렬 */
.local-sort[hidden] { display: none; }
.local-sort button {
    padding: 3px 10px;
    border: 1px solid #d6d6d6;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
    color: var(--muted);
    font: inherit;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, transform 0.08s;
}
.local-sort button:hover { border-color: #888; color: #000; }
.local-sort button:active { transform: translateY(1px) scale(0.96); box-shadow: none; }
.local-sort button.is-active { border-color: #000; color: #000; font-weight: bold; }
/* 고른 버튼 뒤 ↑↓: 지금 방향만 진하게, 반대쪽은 연하게 (js/local.js) */
.sort-arrows { display: inline-flex; gap: 1px; margin-left: 4px; vertical-align: -1px; }
.sort-arrows svg { display: block; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linejoin: miter; stroke-linecap: butt; }   /* 끝이 뾰족하게 */
.sort-arrows .is-dim { color: #c4c4c4; }
.sort-arrows .is-dim svg { stroke-width: 1.6; }   /* 진한 쪽 > 연한 쪽 */

.place-rows { background: #fff; border: 1px solid #e3e3e3; border-radius: 14px; }
.place-row + .place-row { border-top: 1px solid #eee; }
/* 목록 맨 아래 접힌 '더보기' 묶음 (시장/마트: 제주도에 있는 모든 5일장) */
.place-more { margin-top: 10px; }
.place-more > summary {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 14px; border: 1px dashed #ccc; border-radius: 14px;
    background: #fff; color: #333; font-size: 14px; cursor: pointer; list-style: none;
}
.place-more > summary::-webkit-details-marker { display: none; }
.place-more > summary:hover { border-color: #000; }
.place-more > summary .material-symbols-outlined { font-size: 20px; transition: transform 0.2s; }
.place-more[open] > summary { margin-bottom: 10px; }
.place-more[open] > summary .material-symbols-outlined { transform: rotate(180deg); }
.place-row > summary {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 10px 14px;
}
.place-row > summary:hover .place-row-name { text-decoration: underline; text-underline-offset: 3px; }
.place-row-name { flex: none; max-width: 45%; font-weight: bold; }
.place-row-name small { margin-left: 4px; color: #888; font-size: 12px; font-weight: normal; }
.place-row-desc { flex: 1; min-width: 0; overflow: hidden; color: var(--muted); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.place-row-dist { flex: none; color: #444; font-size: 13px; white-space: nowrap; }
.place-row-chev { flex: none; align-self: center; margin-left: auto; color: #aaa; transition: transform 0.2s ease; }
.place-row[open] .place-row-chev { transform: rotate(180deg); }
.place-row[open] .place-row-desc { visibility: hidden; }   /* 펼치면 아래에 전체 설명이 나오니 줄의 짧은 설명은 숨김 */
@media (max-width: 600px) { .place-row[open] .place-row-desc { display: none; } }
.place-row[open] > summary { background: var(--bg-soft); }
.place-row:first-child > summary { border-radius: 14px 14px 0 0; }
.place-row-body { display: flex; flex-direction: column; gap: 6px; padding: 4px 14px 14px; background: var(--bg-soft); }
.place-row:last-child .place-row-body { border-radius: 0 0 14px 14px; }

@media (max-width: 600px) {
    .local-tabs a { padding: 4px 10px; font-size: 13px; }   /* 폰: 밀지 않고 여러 줄로 다 보이기 */
    .place-row > summary { flex-wrap: wrap; gap: 0 8px; padding: 10px 12px; }
    .place-row-name { max-width: calc(100% - 32px); }
    .place-row-desc { order: 3; flex-basis: 100%; }      /* 폰: 설명은 이름 아래 한 줄 */
    .place-row-dist { order: 2; }
    .place-row-chev { order: 1; }
    .place-row-body { padding: 4px 12px 12px; }
}
.place-desc { color: var(--muted); font-size: 14px; }
.place-tel { color: #222; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }   /* 누르면 전화 걸림 */
.place-tel:hover { font-weight: normal; }
.place-distance { color: #444; font-size: 13px; }    /* 🚶 도보 8분 · 🚗 차로 2분 · 0.6km */
.place-reviews { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.place-review {                 /* 후기 보기 작은 알약 버튼 */
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #333;
    font-size: 12px;
}
.place-review:hover { border-color: #000; font-weight: normal; }
.place-link { margin-top: 4px; font-size: 14px; font-weight: bold; }
.place-link:hover { text-decoration: underline; }


/* 8. 규칙 ================================================================== */

.rule-list { margin: 0; padding-left: 1.3em; }
.rule-list li { margin: 4px 0; }

.card .rule-list li { margin: 6px 0; }


/* 9. 비품 ================================================================== */

/* 공간(침실, 거실 …)마다 카드 하나, 안에서 세부공간 → [분류 | 비품들] */
.items-head { display: flex; align-items: center; gap: 12px; margin: 24px 0 16px; }   /* 제목 + 오른쪽 검색창 */
.page .items-head h2 { margin: 0; }
.items-note { margin: 4px 0 16px; font-size: 14px; color: var(--muted); }

.items-card { margin-bottom: 16px; }
.items-card > .card-head { margin-bottom: 4px; }

.items-space { padding: 14px 0 4px; }
.items-space + .items-space { border-top: 1px dashed var(--line); }
.items-space-name { margin: 0 0 8px; font-size: 15px; }

.items-groups {
    display: grid;
    grid-template-columns: 7em minmax(0, 1fr);
    gap: 6px 16px;
    margin: 0;
}
.items-groups dt { color: var(--muted); font-size: 14px; padding-top: 1px; }
.items-groups dd { margin: 0; }

.baby { color: var(--baby); }
/* 유아용품 앞 분홍 점 (예전 * 대신, items.php baby_dot) */
.baby-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin: 0 4px 0 1px;
    border-radius: 50%;
    background: var(--baby);
    vertical-align: 0.15em;
}
.item-logo { margin: 0 3px 0 1px; vertical-align: -4px; }   /* 넷플릭스 등 서비스 로고 */

@media (max-width: 600px) {
    .items-groups { grid-template-columns: 1fr; gap: 0; }
    .items-groups dt { margin-top: 8px; font-size: 13px; }
}


/* 10. 예약 ================================================================= */

/* 카드 묶음: 넓은 화면 2칸, 폰 1칸 */
.book-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 16px 0;
}
/* 홈 '오시는 길': 주소 + 안내 + 날씨 나쁜 날 길 안내 (※ 한 줄, 살짝 작게) */
.directions-card { margin: 16px 0; }
.directions-card .place-addr { margin: 0 0 8px; }
.directions-note { margin: 10px 0 0; color: var(--muted); font-size: 14px; }

/* 예약 신청 (inc/booking_request.php, 달력 카드 안 / 날짜 누르기·계산·문자는 js/booking.js)
   달력 바로 아래: 날짜 단계 → 초록 창 + [계속하기] → 인원 → 요청 사항 → 결제 방법 → 성함·보내기 */
.bookreq { display: grid; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed #ddd; }
.bookreq-sum {   /* 날짜를 다 고르면 나오는 두 줄: 날짜·n박 / 금액 (3단계 바로 위) */
    display: grid; gap: 2px;
    padding: 10px 14px; border-radius: 10px;
    background: #e8f5e9; color: #333; font-size: 15px;
}
.bookreq-sum[hidden] { display: none; }
/* 날짜 다음 단계부터(.is-wizard) 이 초록 창은 메뉴 바로 아래에 붙어서 따라옴 (--sum-top: js/booking.js — 메뉴 밑, 폰 자판이 올라오면 보이는 화면 맨 위) */
.bookreq-sum { transition: box-shadow 0.2s; }
.bookreq.is-wizard .bookreq-sum { position: sticky; top: var(--sum-top, 8px); z-index: 4; }
.bookreq.is-wizard.is-typing .bookreq-sum { position: relative; top: 0; box-shadow: none; }   /* 글 쓰는 동안(폰 자판)은 안 붙음 — 입력칸을 덮지 않게 */
.bookreq-sum.is-stuck { box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18); }
/* 초록 창 아래쪽: 예약자·결제·요청 한눈에 (얇은 선 아래 작은 글씨) */
.bookreq-sum-details { display: grid; gap: 1px; margin-top: 4px; padding-top: 5px; border-top: 1px solid rgba(46, 125, 50, 0.2); font-size: 12px; line-height: 1.45; color: #333; }
.bookreq-sum-row { display: flex; gap: 8px; }
.bookreq-sum-row em { flex: none; width: 3.2em; color: #2e7d32; font-style: normal; font-weight: bold; }
.bookreq-sum-line { line-height: 1.5; }   /* 날짜 · n박 · 인원 — 폰에서 길면 다음 줄로 */
.bookreq-total { font-size: 20px; line-height: 1.3; }
.bookreq-sum-note { color: #555; font-size: 12px; }   /* 페이팔: 수수료 포함 안내 */
.bookreq-flash { color: #c62828; }
@media (max-width: 400px) { .bookreq-sum { font-size: 14px; } }
/* 인원: 이름 (나이)  [− n +] — 넓은 화면 두 줄씩 */
.bookreq-guests { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
@media (max-width: 600px) { .bookreq-guests { grid-template-columns: 1fr; } }
.bookreq-guest { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
.bookreq-guest small { color: var(--muted); font-size: 12px; }
.bookreq-stepper { display: inline-flex; align-items: center; gap: 8px; }
.bookreq-stepper button {
    width: 30px; height: 30px;
    border: 1px solid #ccc; border-radius: 50%;
    background: #fff; color: #222;
    font-size: 18px; line-height: 1; cursor: pointer;
    box-shadow: 3px 3px 3px -1px rgba(0, 0, 0, 0.28);
}
.bookreq-stepper button:hover:not([aria-disabled="true"]) { border-color: #000; }
.bookreq-stepper button[aria-disabled="true"] { opacity: 0.3; cursor: default; box-shadow: none; }
/* 흔들어 알려주기: 못 누르는 [−][+] → '기본 2인 · 최대 5인', 빠진 칸 → 그 칸 (잠깐 빨갛다가 원래 색으로) */
.bookreq-field .is-shake { animation: bookreq-shake 0.45s; }
/* [신청 내용 복사] 뒤 뜨는 창: 복사한 내용 + [계속 보기] [닫기], 4초 뒤 천천히 사라짐 */
.bookreq-toast {
    position: fixed; z-index: 100; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: min(360px, calc(100vw - 32px));
    display: grid; gap: 8px;
    padding: 16px 18px; border-radius: 14px;
    background: #fff; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    animation: bookreq-toast-in 0.25s ease-out;
    transition: background-color 0.3s, box-shadow 0.3s;   /* [계속 보기]로 되돌릴 땐 빠르게 */
}
.bookreq-toast > * { transition: opacity 0.3s; }
/* 흐려질 때: 창 바탕·내용은 4초, [계속 보기]만 3.5초 동안 진하게 있다가 2초에 걸쳐 (마지막까지 누를 수 있게) */
.bookreq-toast.is-out { background-color: rgba(255, 255, 255, 0); box-shadow: 0 8px 30px rgba(0, 0, 0, 0); transition: background-color 4s ease-in, box-shadow 4s ease-in; }
.bookreq-toast.is-out > *, .bookreq-toast.is-out .bookreq-toast-btns button:last-child { opacity: 0; transition: opacity 4s ease-in; }
.bookreq-toast.is-out .bookreq-toast-btns { opacity: 1; }
.bookreq-toast.is-out .bookreq-toast-btns button:first-child { opacity: 0; transition: opacity 2s ease-in 3.5s; }
.bookreq-toast-btns button { transition: opacity 0.3s; }
.bookreq-toast strong { font-size: 15px; }
.bookreq-toast pre { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--bg-soft); color: #333; font: inherit; font-size: 13px; line-height: 1.6; white-space: pre-wrap; word-break: keep-all; }
.bookreq-toast-btns { display: flex; justify-content: flex-end; gap: 8px; }
.bookreq-toast-btns button {
    padding: 4px 16px; border: 1px solid #ccc; border-radius: 999px;
    background: #fff; color: #000; font: inherit; font-size: 13px; cursor: pointer;
    box-shadow: 3px 3px 3px -1px rgba(0, 0, 0, 0.28);
}
.bookreq-toast-btns button:hover { border-color: #000; }
.bookreq-toast-btns button:last-child { background: #000; border-color: #000; color: #fff; }   /* [닫기] */
@keyframes bookreq-toast-in { from { opacity: 0; transform: translate(-50%, -45%); } }
/* 요청 사항: 침구 고르기 + 준비물 [− n +] + 그 밖에 요청 */
.bookreq-setup { display: grid; gap: 8px; color: #555; font-size: 13px; }
/* 이름 | 고르는 것: 이름 칸 너비 = 제일 긴 이름, 고르는 것은 그 옆에 왼쪽 정렬 → [− 4 +] 개 (4~6개) */
.bookreq-setup-grid { display: grid; grid-template-columns: max-content 1fr; align-items: center; gap: 8px 16px; color: #222; font-size: 14px; }
.bookreq-setup-grid > span:nth-child(odd) { white-space: nowrap; }   /* 이름은 안 끊기게 (고르는 쪽이 줄바꿈) */
.bookreq-setup-ctl { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bookreq-radios { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; }
@media (max-width: 420px) {   /* 폰: '[− 4 +] 개 (4~6개)'가 한 줄에 들어가게 조금 작게 */
    .bookreq-setup-grid { gap: 8px 10px; font-size: 13px; }
    .bookreq-setup-grid .bookreq-stepper { gap: 6px; }
    .bookreq-setup-grid .bookreq-stepper button { width: 26px; height: 26px; font-size: 16px; }
}
.bookreq-setup small[data-setup-tip] { color: var(--muted); font-size: 12px; }
.bookreq-setup small.is-shake { display: inline-block; animation: bookreq-shake 0.45s, bookreq-red 1.6s; }
.bookreq-note .is-shake { display: inline-block; animation: bookreq-shake 0.45s, bookreq-red 1.6s; }   /* PC에서 [문자로 신청 보내기] → PC 안내 글 */
.bookreq-field input, .bookreq-field textarea { transition: border-color 0.6s; }
.bookreq-field ::placeholder { transition: color 0.6s; }
.bookreq-field .is-error { border-color: #000; }   /* 빠진 칸: 잠깐 진한 검정 테두리 (js 가 1.2초 뒤 뺌 → 서서히 원래 색) */
.bookreq-field .has-msg::placeholder { color: #000; }   /* 칸 안 안내 글('예약자 성함을 적어주세요.')은 쓰기 시작할 때까지 검정 */
@keyframes bookreq-shake {
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}
@keyframes bookreq-red {
    0%, 55% { color: #c62828; font-weight: bold; }
}
.bookreq-stepper output { min-width: 1.4em; text-align: center; font-weight: bold; font-size: 16px; }
/* 이름 칸 + 결제 옵션 체크 (사업자번호·분할 금액 칸은 체크했을 때만) */
.bookreq-field { display: grid; gap: 4px; color: #555; font-size: 13px; }
.bookreq-field input, .bookreq-field textarea {
    width: 100%; box-sizing: border-box; padding: 8px 10px;
    border: 1px solid #ccc; border-radius: 8px; background: #fff; color: #222;
    font: inherit; font-size: 15px; resize: vertical;
}
.bookreq-field input:focus, .bookreq-field textarea:focus { outline: none; border-color: #000; }
@media (pointer: coarse) { .bookreq-field input, .bookreq-field textarea { font-size: 16px; } }   /* 폰에서 눌렀을 때 확대 안 되게 */
.bookreq-sub { display: grid; gap: 8px; }
.bookreq-options { display: grid; gap: 8px; }
.bookreq-check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.bookreq-check input { width: 18px; height: 18px; accent-color: #000; }
.bookreq-sub { margin-left: 26px; }
.bookreq-sub[hidden] { display: none; }
.bookreq-price { display: grid; gap: 2px; color: #555; font-size: 13px; }
.bookreq-price:empty { display: none; }
.bookreq-price div { display: flex; justify-content: space-between; gap: 12px; }
.bookreq-price .is-discount, .bookreq-price .is-lastmin, .bookreq-sum-note.is-discount { color: #d32f2f; font-weight: bold; }   /* 할인 줄 (연박·마감임박): 빨갛게 눈에 띄게 */
.bookreq-price small { display: block; font-size: 11px; font-weight: normal; }   /* 할인 조건: 이름 아래 작게 */
.bookreq-price b { white-space: nowrap; }
.bookreq-error { margin: 0; color: #c62828; font-size: 13px; }
/* 달력 칸: 고른 입실·퇴실 (테두리 + 아래 작은 글자), 사이 날짜는 연하게 */
.bookcal-month td[data-date] { position: relative; cursor: pointer; }
.bookcal-month td.is-pick-in, .bookcal-month td.is-pick-out { box-shadow: inset 0 0 0 2px #222; }
.bookcal-month td.is-pick-range { background: #c8e6c9 !important; }
/* 입실만 고른 상태: 퇴실할 수 있는 마감일은 가로줄 없이 초록 테두리로 '여기서 퇴실 가능', 그 뒤 날짜는 흐리게 */
.bookcal-month td.is-closed.is-can-out, .bookcal-month td.is-unpriced.is-can-out { background: #fff; color: #1b5e20; font-weight: bold; box-shadow: inset 0 0 0 2px #81c784; }
.bookcal-month td.is-can-out::after { display: none; }
.bookcal-month td.is-cant-out { opacity: 0.35; }
.bookcal-tag {
    position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%);
    padding: 0 5px; border-radius: 6px;
    background: #222; color: #fff;
    font-size: 10px; font-style: normal; line-height: 14px; white-space: nowrap; z-index: 1;
}
.bookreq-error:empty { display: none; }
.bookreq-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.bookreq-actions .btn { padding: 4px 16px; border-radius: 999px; color: #000; text-decoration: none; }
.bookreq-send { background: #000 !important; color: #fff !important; }
.bookreq-actions .btn[aria-disabled="true"] { opacity: 0.35; box-shadow: none; cursor: default; }   /* 성함을 쓰기 전 */
.bookreq-note { margin: 0; color: var(--muted); font-size: 12px; }

/* 예약 신청 단계 (1 날짜 · 2 인원 · 3 요청 사항 · 4 결제 방법 · 5 성함·보내기) — [계속하기]로 한 단계씩
   지금 단계(.is-open)만 펼침, 지난 단계는 제목 한 줄(번호 ✓ · 고른 내용 · 고치기), 누르면 다시 펼침 */
.bookreq-step { display: grid; gap: 10px; }
.bookreq-step[hidden] { display: none; }   /* 아직 안 간 단계 */
.bookreq-step-head {
    display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; width: 100%;
    padding: 0; border: 0; background: none; color: #222; font: inherit; font-size: 15px; text-align: left; cursor: default;
}
.bookreq-step-sum { color: #555; font-size: 13px; }
.bookreq-step-edit { display: none; margin-left: auto; color: var(--muted); font-size: 12px; text-decoration: underline; }
.bookreq-step.is-folded .bookreq-step-head { padding: 8px 10px; border-radius: 10px; background: var(--bg-soft); cursor: pointer; }
.bookreq-step.is-folded .bookreq-step-edit { display: inline; }
.bookreq-step-body { display: grid; gap: 12px; }
.bookreq-step:not(.is-open) .bookreq-step-body { display: none; }
.bookreq-step.is-done > .bookreq-step-head > .step-num { background: #2e7d32; font-size: 0; }
.bookreq-step.is-done > .bookreq-step-head > .step-num::after { content: '✓'; font-size: 14px; }
.bookreq-next { display: flex; justify-content: flex-end; }
.bookreq-continue { padding: 8px 22px; border-radius: 999px; background: #000 !important; color: #fff !important; font-size: 15px; }
/* 날짜 다음 단계부터: 달력·색 안내·마감임박 띠는 접음 (1번 줄 '고치기'로 다시 펼침) */
.bookcal-card.is-cal-hidden .bookcal, .bookcal-card.is-cal-hidden .bookcal-legend, .bookcal-card.is-cal-hidden .bookcal-lastmin { display: none; }
.bookreq-guest-info { margin: 0; color: var(--muted); font-size: 12px; }
.bookreq-guest-info.is-shake { animation: bookreq-shake 0.45s, bookreq-red 1.6s; }
.bookreq-step-body small[data-stage-tip] { color: var(--muted); font-size: 12px; }
/* 날짜 단계 알림 글(1박만 가능 · 마감 등): 나타날 때 통통 튀기 */
.bookreq-step-body small[data-stage-tip].is-bounce { display: inline-block; animation: bookreq-bounce 0.7s cubic-bezier(0.3, 0.7, 0.4, 1); }
@keyframes bookreq-bounce {
    0%   { transform: translateY(0) scale(1); }
    18%  { transform: translateY(-7px) scale(1.06); }   /* 톡 */
    36%  { transform: translateY(0) scale(0.98); }
    54%  { transform: translateY(-3px) scale(1.02); }   /* 통 */
    72%  { transform: translateY(0); }
    86%  { transform: translateY(-1px); }
    100% { transform: translateY(0); }
}
.step-num {                     /* 검은 번호 동그라미 */
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    transition: background 0.25s;
}
.is-done > .step-num { background: #2e7d32; font-size: 0; }
.is-done > .step-num::after { content: '✓'; font-size: 14px; }

/* 예약 현황 달력 (inc/booking_calendar.php, 넘기기는 js/booking.js) — 넓은 화면 두 달, 폰 한 달 */
.bookcal-card { margin: 16px 0; }
.bookcal { position: relative; }
.bookcal-btn {   /* ❮ 이전 · 다음 ❯ (달력 위 버튼 줄 양끝) */
    width: 32px; height: 32px;
    border: 1px solid #ccc; border-radius: 50%;
    background: #fff; color: #333;
    font-size: 14px; cursor: pointer; pointer-events: auto;
}
.bookcal-btn:hover:not(:disabled) { border-color: #000; }
.bookcal-btn:disabled { opacity: 0.3; cursor: default; }
/* JS 없을 때: 달을 격자로 쭉 (장식용 앞뒤 달은 숨김) */
.bookcal-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px 32px; }
.bookcal-month.is-ghost { display: none; }
/* JS 있을 때: 달을 가로 띠로 이어 붙이고 옆으로 부드럽게 밀기, 양옆에 앞뒤 달이 살짝 보임
   (--bookcal-w 달 너비, --bookcal-gap 달 사이, --bookcal-peek 양옆 보이는 폭 — js/booking.js 가 정함) */
.bookcal.is-paged .bookcal-viewport {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0.45) 0, #000 var(--bookcal-peek, 40px), #000 calc(100% - var(--bookcal-peek, 40px)), rgba(0,0,0,0.45) 100%);
    mask-image: linear-gradient(to right, rgba(0,0,0,0.45) 0, #000 var(--bookcal-peek, 40px), #000 calc(100% - var(--bookcal-peek, 40px)), rgba(0,0,0,0.45) 100%);
}
.bookcal.is-paged .bookcal-months {
    display: flex;
    align-items: flex-start;
    gap: var(--bookcal-gap, 24px);
    transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.bookcal.is-paged.no-anim .bookcal-months,
.bookcal.is-paged.no-anim .bookcal-month * { transition: none !important; }   /* 처음 그릴 때·창 크기 바뀔 때는 움직임 없이 */
@media (prefers-reduced-motion: reduce) { .bookcal.is-paged .bookcal-months { transition: none; } }
.bookcal.is-paged .bookcal-month { flex: 0 0 var(--bookcal-w, 300px); }
.bookcal.is-paged .bookcal-month.is-ghost { display: block; }
.bookcal.is-paged .bookcal-month h4, .bookcal.is-paged .bookcal-temp, .bookcal.is-paged .bookcal-month th, .bookcal.is-paged .bookcal-month td span { transition: opacity 0.35s; }
.bookcal.is-paged .bookcal-head { transition: opacity 0.35s; }
.bookcal.is-paged .bookcal-month.is-out .bookcal-head,
.bookcal.is-paged .bookcal-month.is-out th,
.bookcal.is-paged .bookcal-month.is-out td span { opacity: 0; }   /* 양옆에 걸친 달: 색 칸만 */
.bookcal.is-paged .bookcal-month.is-out td.is-closed::after { opacity: 0; }
.bookcal-month.is-ghost h4 { color: #c8c8c8; }
.bookcal-month td.is-ghost { background: #f0f0f0; }
.bookcal-month td.is-ghost.is-sat { background: #e1f2fd; }
.bookcal-month td.is-ghost.is-sun { background: #fde7ef; }
/* 달 이름·기온 뒤 계절 띠: 은은한 색 + 양 끝에 계절 그림 (봄 🌸 · 여름 🌊 · 가을 🍁 · 겨울 ❄️) */
.bookcal-head { position: relative; margin: 0 0 8px; padding: 6px 8px 4px; border-radius: 12px; overflow: hidden; }
.bookcal-head h4 { padding: 0 60px; }   /* 그림은 달 이름 줄 양옆에만 (기온 줄은 폭을 다 씀) */
.bookcal-head::after { position: absolute; top: 6px; font-size: 18px; line-height: 24px; opacity: 0.55; }   /* 오른쪽: 계절 이모지 (왼쪽은 한라산) */
/* 계절별 한라산 (꼭대기는 백록담처럼 살짝 파임): 봄 연두+벚꽃 / 여름 진초록+해+구름 / 가을 꼭대기만 주황(아래는 초록, 제주 가을)+은행잎 / 겨울 눈 모자+눈사람 — 아래는 바다 */
.bookcal-halla {   /* 하얀 둥근 네모 위에 섬(한라산+바다), 산은 검정 테두리 — 배경 띠 위에서도 또렷하게 */
    position: absolute; left: 8px; top: 4px; width: 40px; height: 31px;
    padding: 3px 4px;
    box-sizing: border-box;
    border-radius: 8px;
    background: #fff no-repeat center / contain;
    background-origin: content-box;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.12);
}
.is-spring .bookcal-halla { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 23'%3E%3Cg transform='translate(1.6 -1.9) scale(.9 1.1)'%3E%3Cpath d='M0 19C7 17.5 10 12.5 12.5 9.2L14.2 8.4L16 9.2L17.8 8.4L19.5 9.2C22 12.5 25 17.5 32 19z' stroke='%23222' stroke-width='.9' stroke-linejoin='round' fill='%2381c784'/%3E%3Ccircle cx='7' cy='17' r='1.4' fill='%23f48fb1'/%3E%3Ccircle cx='11' cy='15' r='1.1' fill='%23f8bbd0'/%3E%3Ccircle cx='16' cy='17.5' r='1.2' fill='%23f48fb1'/%3E%3Ccircle cx='21.5' cy='15.5' r='1.1' fill='%23f8bbd0'/%3E%3Ccircle cx='26' cy='17.5' r='1.3' fill='%23f48fb1'/%3E%3C/g%3E%3Cpath d='M0 19.3H32V23H0z' fill='%2364b5f6'/%3E%3C/svg%3E"); }
.is-summer .bookcal-halla { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 23'%3E%3Cg transform='translate(1.6 -1.9) scale(.9 1.1)'%3E%3Cpath d='M0 19C7 17.5 10 12.5 12.5 9.2L14.2 8.4L16 9.2L17.8 8.4L19.5 9.2C22 12.5 25 17.5 32 19z' stroke='%23222' stroke-width='.9' stroke-linejoin='round' fill='%23388e3c'/%3E%3Cpath d='M9 19c2.5-2 4.5-5 5.5-8.5L16 19z' fill='%2366bb6a' opacity='.6'/%3E%3Cg transform='translate(.5 .9)' stroke='%23222' stroke-width='.35' stroke-linecap='round'%3E%3Cpath d='M5.5 1.2v1M5.5 7.8v1M1.7 5h1M8.3 5h1M2.8 2.3l.7.7M7.5 7l.7.7M2.8 7.7l.7-.7M7.5 3l.7-.7' stroke='%23f9a825' stroke-width='.6'/%3E%3Ccircle cx='5.5' cy='5' r='2.1' fill='%23fdd835'/%3E%3C/g%3E%3Cg fill='%23fff' stroke='%23a0a0a0' stroke-width='.5'%3E%3Cellipse cx='25' cy='6' rx='4.2' ry='1.7'/%3E%3Cellipse cx='23' cy='5.1' rx='2.2' ry='1.4'/%3E%3C/g%3E%3Cellipse cx='25' cy='6' rx='4' ry='1.5' fill='%23fff'/%3E%3C/g%3E%3Cpath d='M0 19.3H32V23H0z' fill='%2329b6f6'/%3E%3C/svg%3E"); }
.is-autumn .bookcal-halla { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 23'%3E%3Cg transform='translate(1.6 -1.9) scale(.9 1.1)'%3E%3Cdefs%3E%3ClinearGradient id='a' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='.1' stop-color='%23e67e22'/%3E%3Cstop offset='.5' stop-color='%23c9a43c'/%3E%3Cstop offset='.95' stop-color='%235f9e57'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0 19C7 17.5 10 12.5 12.5 9.2L14.2 8.4L16 9.2L17.8 8.4L19.5 9.2C22 12.5 25 17.5 32 19z' stroke='%23222' stroke-width='.9' stroke-linejoin='round' fill='url(%23a)'/%3E%3C/g%3E%3Cg transform='translate(22 13.2) scale(2)'%3E%3Cpath d='M0 1V2.8' stroke='%23222' stroke-width='.35' stroke-linecap='round'/%3E%3Cpath d='M0 1.1L-2.3-1.1C-1.9-2.3-.9-2.6-.15-2.3L0-1.5 .15-2.3C.9-2.6 1.9-2.3 2.3-1.1z' fill='%23fdd835' stroke='%23222' stroke-width='.3' stroke-linejoin='round'/%3E%3C/g%3E%3Cpath d='M0 19.3H32V23H0z' fill='%2329b6f6'/%3E%3C/svg%3E"); }
.is-winter .bookcal-halla { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 23'%3E%3Cg transform='translate(1.6 -1.9) scale(.9 1.1)'%3E%3Cpath d='M0 19C7 17.5 10 12.5 12.5 9.2L14.2 8.4L16 9.2L17.8 8.4L19.5 9.2C22 12.5 25 17.5 32 19z' stroke='%23222' stroke-width='.9' stroke-linejoin='round' fill='%237f9cc0'/%3E%3Cpath d='M10.6 11.6C11.4 10.7 12 9.9 12.5 9.2L14.2 8.4L16 9.2L17.8 8.4L19.5 9.2C20 9.9 20.6 10.7 21.4 11.6c-1 .4-1.8-.4-2.7.1s-1.6-.5-2.7 0-1.6-.5-2.7 0-1.7.3-2.7-.1z' fill='%23fff'/%3E%3C/g%3E%3Cg transform='translate(22 13.6) scale(1.6) translate(-21.5 -15)'%3E%3Cg stroke='%23222' stroke-width='.35'%3E%3Ccircle cx='21.5' cy='16.4' r='1.9' fill='%23fff'/%3E%3Ccircle cx='21.5' cy='13.6' r='1.3' fill='%23fff'/%3E%3C/g%3E%3Cpath d='M20.3 14.8h2.4' stroke='%23e53935' stroke-width='.6' stroke-linecap='round'/%3E%3Ccircle cx='21.05' cy='13.4' r='.22' fill='%23222'/%3E%3Ccircle cx='21.95' cy='13.4' r='.22' fill='%23222'/%3E%3C/g%3E%3Cpath d='M0 19.3H32V23H0z' fill='%2329b6f6'/%3E%3C/svg%3E"); }
.bookcal-head::after { right: 8px; }
.bookcal-head.is-spring { background: linear-gradient(135deg, #fdeef3, #eef8e8); }
.bookcal-head.is-spring::after { content: "🌸"; }
.bookcal-head.is-summer { background: linear-gradient(135deg, #fff2a8, #ffd0a8); }   /* 여름: 쨍한 햇볕 노랑 → 뜨거운 주황 (가을의 연한 살구색보다 진하게) */
.bookcal-head.is-summer::after { content: "🍉"; }
.bookcal-head.is-autumn { background: linear-gradient(135deg, #fff1e0, #fbe9df); }
.bookcal-head.is-autumn::after { content: "🍁"; }
.bookcal-head.is-winter { background: linear-gradient(135deg, #eef3fb, #f6f8fc); }
.bookcal-head.is-winter::after { content: "❄️"; }
.bookcal-month h4 { margin: 0 0 2px; text-align: center; font-size: 16px; }
.bookcal-mnum { margin: 0 2px; font-size: 24px; line-height: 1; vertical-align: baseline; }   /* 영어 달 이름의 가운데 숫자: 2026 [11] November — 세 글자 바닥선을 맞춤 */
/* 달 이름 아래 1년·2년 전 기온: 두 칸 나란히, 칸마다 평균 + 그 아래 최저·최고 (없어도 높이 유지) */
.bookcal-temp { display: flex; justify-content: center; gap: 4px 10px; flex-wrap: wrap; min-height: 2.9em; margin: 0; color: #666; font-size: 12px; line-height: 1.45; }
.bookcal-temp-col { text-align: center; }
.bookcal-temp-col small { display: block; color: var(--muted); font-size: 11px; }
/* 기온 색: 평균은 가장 더운 4달 빨강 / 가운데 진회색 / 가장 추운 4달 파랑, 최저·최고는 23℃ 이상 빨강 / 10℃ 이하 파랑 (inc/booking_calendar.php) */
.bookcal-temp .t-mid { color: #444; }
.bookcal-temp .t-hot { color: #e53935; }
.bookcal-temp .t-cold { color: #1565c0; }
.bookcal-temp-col small b { font-weight: 600; }
/* ℃ ↔ ℉ 바꿔도 칸 폭이 그대로 (화씨 숫자가 더 넓어서 버튼이 다음 줄로 밀리던 것 방지): 숫자 칸을 화씨 폭으로 고정 */
.bookcal-temp b[data-c] { display: inline-block; min-width: 3.6em; font-variant-numeric: tabular-nums; text-align: left; }
.bookcal-temp-col small b[data-c] { min-width: 3.4em; }
/* 범위 앞 숫자(단위 없음): '~' 에 바짝 붙게 오른쪽 정렬, 폭은 숫자만큼 → 12.6~14.1℃ */
.bookcal-temp b[data-nounit] { min-width: 2.2em; text-align: right; }
.bookcal-temp-col small b[data-nounit] { min-width: 2.1em; }
.bookcal-month table { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.bookcal-month th { padding: 2px 0; color: var(--muted); font-size: 12px; font-weight: normal; }
.bookcal-month th.is-sun { color: #c62828; }
.bookcal-month th.is-sat { color: #1565c0; }
.bookcal-month td { height: 34px; border-radius: 8px; text-align: center; font-size: 14px; }
.bookcal-month td.is-open { background: #e8f5e9; color: #1b5e20; font-weight: bold; }
.bookcal-month td.is-open.is-sat { background: #e1f2fd; color: #1565c0; }   /* 토: 하늘색 */
.bookcal-month td.is-open.is-sun { background: #fde7ef; color: #c62828; }   /* 일: 분홍 */
.bookcal-month td.is-closed { position: relative; background: #f0f0f0; color: #b5b5b5; }
/* 오늘: 고를 수는 없지만 주황 테두리 + 큰 숫자 + 칸 안 아래쪽에 '오늘' 글자만 (입실·퇴실 꼬리표와 헷갈리지 않게 바탕 없이) */
.bookcal-month td.is-today { background: #fff; color: #e65100; font-weight: bold; line-height: 1; box-shadow: inset 0 0 0 2px #ff9800; }
.bookcal-month td.is-today span { display: block; font-size: 18px; }
.bookcal-today-tag { display: block; margin-top: 1px; color: #ff9800; font-size: 10px; font-style: normal; font-weight: bold; white-space: nowrap; }
.bookcal.is-paged .bookcal-month.is-out .bookcal-today-tag { opacity: 0; }
/* [오늘] 누르면: 오늘 숫자가 톡 커지며 통통 튀고, 살짝 흔들린 뒤 원래대로
   (다른 달에서 누르면 달이 넘어오는 0.3초만 기다림 — js 가 --pulse-delay 를 정함) */
.bookcal-month td.is-today.is-pulse span { animation: bookcal-today-pop 0.9s cubic-bezier(0.3, 0.7, 0.4, 1) var(--pulse-delay, 0s); }
.bookcal-month td.is-today.is-pulse { animation: bookcal-today-glow 0.9s ease-out var(--pulse-delay, 0s); }
@keyframes bookcal-today-pop {
    0%   { transform: scale(1); }
    15%  { transform: scale(1.7) translateY(-5px); }           /* 톡 */
    30%  { transform: scale(1.45) translateY(1px); }            /* 통 */
    42%  { transform: scale(1.6) translateY(-3px) rotate(-8deg); }
    54%  { transform: scale(1.5) translateY(0) rotate(8deg); }  /* 통 + 살짝 흔들 */
    66%  { transform: scale(1.55) translateY(-1px) rotate(-4deg); }
    80%  { transform: scale(1.2) rotate(0); }
    100% { transform: scale(1); }
}
@keyframes bookcal-today-glow {
    10%, 70% { background: #fff3e0; box-shadow: inset 0 0 0 3px #ff9800, 0 0 0 4px rgba(255, 152, 0, 0.25); }
}
/* 달력 버튼들 눌림 효과: 누르는 동안 그림자 방향(오른쪽 아래)으로 살짝 들어감 */
.bookcal-btn, .bookcal-refresh, .bookcal-unit { transition: transform 0.08s, box-shadow 0.08s; }
.bookcal-btn:active:not(:disabled), .bookcal-refresh:active:not(:disabled), .bookcal-unit:active { transform: translate(2px, 2px) scale(0.96); box-shadow: none; }
.bookcal-month td.is-closed::after {   /* 마감 가로줄: 글자 취소선보다 두껍고 길게 */
    content: "";
    position: absolute;
    left: 18%;
    right: 18%;
    top: 50%;
    height: 3px;
    margin-top: -1px;
    border-radius: 2px;
    background: #b5b5b5;
}
/* 할인 이벤트 밤: 칸 아래쪽 주황 줄 + 숫자 아래 작은 '−20%' (inc/booking_calendar.php) */
.bookcal-month td.is-event { line-height: 1; box-shadow: inset 0 -3px 0 #ff7043; }
.bookcal-month td.is-event span { display: block; }
.bookcal-event-tag { display: block; margin-top: 2px; color: #e64a19; font-size: 9px; font-style: normal; font-weight: bold; letter-spacing: -0.3px; white-space: nowrap; }
.bookcal-month td.is-event.is-pick-in, .bookcal-month td.is-event.is-pick-out { box-shadow: inset 0 0 0 2px #222, inset 0 -3px 0 #ff7043; }
.bookcal-key.is-event { margin-left: 10px; background: #fff; box-shadow: inset 0 -3px 0 #ff7043; border: 1px solid #ddd; }
@media (max-width: 600px) { .bookcal-event-tag { font-size: 9px; margin-top: 1px; } }
.bookcal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 12px 0 0; color: #555; font-size: 13px; }
.bookcal-key { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; }
.bookcal-key.is-closed { margin-left: 10px; }
.bookcal-key.is-open { background: #e8f5e9; border: 1px solid #a5d6a7; }
.bookcal-key.is-sat { background: #e1f2fd; border: 1px solid #90caf9; margin-left: -4px; }
.bookcal-key.is-sun { background: #fde7ef; border: 1px solid #f48fb1; margin-left: -4px; }
.bookcal-key.is-closed { background: #f0f0f0; border: 1px solid #ddd; }
/* 요금 책정 중 (요금표에 아직 없는 달): 바탕 없이 흐린 숫자만, 눌러도 반응 없음 (그 달 첫날 퇴실만 됨 → 그땐 초록 테두리) */
/* 1년 뒤 날짜·맨 뒤 장식용 달도 같은 모양: 아주 옅은 바탕(토·일은 옅은 하늘·분홍) + 흐린 숫자 */
.bookcal-month td.is-unpriced, .bookcal-month td.is-ghost { background: #f7f7f7; color: #c8c8c8; cursor: default; }
.bookcal-month td.is-unpriced.is-sat, .bookcal-month td.is-ghost.is-sat { background: #eef7fd; }
.bookcal-month td.is-unpriced.is-sun, .bookcal-month td.is-ghost.is-sun { background: #fdf2f6; }
.bookcal-note { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.bookcal-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 10px; }   /* 달력 위 (이름은 예전 자리 그대로) */
.bookcal-body { position: relative; }   /* ❮ ❯ 화살표 기준 */
.bookcal-updated { color: var(--muted); font-size: 12px; }
/* 기온 오른쪽 단위 버튼 [C F]: 지금 단위가 크고 진하게, 다른 쪽은 작고 흐리게 */
.bookcal-unit {
    align-self: center;
    display: inline-flex; align-items: baseline; gap: 3px;
    padding: 2px 9px;
    border: 1px solid #ccc; border-radius: 999px;
    background: #fff; color: #aaa;
    font: inherit; font-size: 11px; line-height: 1.3;
    cursor: pointer;
}
.bookcal-unit:hover { border-color: #000; }
.bookcal-unit .is-on { order: -1; color: #222; font-size: 15px; font-weight: bold; }   /* 지금 단위가 왼쪽 */   /* [⇤ 이번 달] [↻ 새로 고침] 읽은 시각 — 왼쪽부터 */
.bookcal-refresh { padding: 4px 14px; border: 1px solid #ccc; border-radius: 999px; background: #fff; color: #333; font: inherit; font-size: 13px; cursor: pointer; }
.bookcal-refresh:hover:not(:disabled) { border-color: #000; }
.bookcal-refresh:disabled { color: #999; cursor: default; }
/* 달력 위 버튼 줄 (inc/booking_calendar.php) — 넓은 화면: [이번 달] [새로 고침] 읽은 시각 / 폰: [❮] [이번 달] [새로 고침·읽은 시각] [℃·℉] [❯] */
.bookcal-refresh-wrap { display: inline-flex; align-items: center; gap: 8px; }
.bookcal-bar-btn, .bookcal-bar-unit { display: none; }   /* JS 로 넘기기가 켜졌을 때만 */
@media (min-width: 700px) {
    /* 넓은 화면: [❮ 이전] ……[오늘] [새로 고침] 읽은 시각…… [다음 ❯] — 양끝 버튼은 왼쪽·오른쪽 달 가장자리에 맞춤 (js 의 peek 56px) */
    .bookcal-foot { justify-content: center; }
    .bookcal.is-paged .bookcal-foot { padding: 0 56px; }
    .bookcal.is-paged .bookcal-bar-btn {
        display: inline-flex; align-items: center; gap: 4px;
        width: auto; height: auto; padding: 4px 14px; border-radius: 999px;
        font-size: 13px;
    }
    .bookcal.is-paged .bookcal-bar-btn[data-bookcal-prev] { margin-right: auto; }
    .bookcal.is-paged .bookcal-bar-btn[data-bookcal-next] { margin-left: auto; }
    .bookcal-legend { margin-left: 56px; }   /* 색 안내: 왼쪽 달과 줄 맞춤 */
}
@media (max-width: 699px) {   /* js/booking.js 의 넓은 화면 기준(700px)과 같게 */
    .bookcal.is-paged .bookcal-foot { flex-wrap: nowrap; justify-content: space-between; gap: 4px; }
    .bookcal.is-paged .bookcal-bar-btn {   /* 큰 정사각형 ❮ ❯ — 누르기 쉽게 */
        display: block; flex: none;
        width: 42px; height: 42px; border-radius: 12px;
        font-size: 17px;
    }
    .bookcal.is-paged .bookcal-bar-unit { display: inline-flex; flex: none; padding: 2px 7px; }
    .bookcal.is-paged .bookcal-month-unit { display: none; }   /* 달마다 ℃·℉ 는 버튼 줄로 옮겨서 숨김 */
    .bookcal-bar-label { display: none; }   /* 폰: 화살표만 */
    /* [이번 달] [새로 고침] [℃·℉] 세 버튼은 같은 줄 높이에 — 읽은 시각은 새로 고침 버튼 바로 아래에 따로 띄움 (버튼 줄 높이에 영향 없게) */
    .bookcal-refresh-wrap { position: relative; }
    .bookcal-foot .bookcal-updated { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 3px; line-height: 1.2; }
    .bookcal-foot .bookcal-refresh { padding: 4px 8px; font-size: 12px; white-space: nowrap; }
    .bookcal-foot .bookcal-updated { font-size: 11px; white-space: nowrap; }
    /* 달력: 카드 안쪽 여백까지 써서 폰 화면 좌우에 거의 꽉 차게, 칸도 조금 크게 */
    .bookcal.is-paged .bookcal-body { margin: 0 -12px; }
    .bookcal-month table { border-spacing: 2px; }
    .bookcal-month td { height: 40px; font-size: 15px; }
}
@media (max-width: 370px) {   /* 작은 폰(360px 등): 버튼 줄이 넘치지 않게 조금 더 작게 */
    .bookcal.is-paged .bookcal-bar-btn { width: 38px; height: 38px; }
    .bookcal-foot .bookcal-refresh { padding: 4px 6px; font-size: 11px; }
}
/* 마감임박 띠 (달력 위): 할인되는 날(내일)이 비면 '11/5(목) 숙박 20% 할인' */
.bookcal-lastmin {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px;
    margin: 0 0 12px; padding: 10px 14px; border-radius: 12px;
    background: linear-gradient(135deg, #fff3e0, #ffe0d6); color: #5d3a1a; font-size: 14px;
}
.bookcal-lastmin b { color: #d84315; }
.bookcal-lastmin small { color: #8d6e63; font-size: 12px; }
.bookcal-check { margin: 0 0 12px; padding: 8px 12px; border-radius: 8px; background: #e8f5e9; color: #1b5e20; font-size: 13px; }
.bookcal-check.is-warn { background: #fff8e1; color: #8a6d00; }
.bookcal-check ul { margin: 4px 0 0; padding-left: 18px; }

.book-card { display: flex; flex-direction: column; gap: 14px; }   /* 모양은 공통 .card */
.book-card .card-head { margin-bottom: 0; }
.book-card.is-wide { grid-column: 1 / -1; }
.book-note { margin: -6px 0 0; color: var(--muted); font-size: 13px; text-align: center; }   /* 예약 버튼 아래 한 줄 안내 (결제 수단 등) */

/* 큰 예약 버튼 (네이버, 에어비앤비, 페이팔) */
.book-btn {
    margin-top: auto;           /* 카드 높이가 달라도 버튼은 아래쪽에 맞춰짐 */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    border: 2px solid #000;
    border-radius: 999px;
    font-weight: bold;
    transition: background-color 0.2s ease, color 0.2s ease;
}
button.book-btn { width: 100%; background: #fff; color: #000; font: inherit; font-weight: bold; cursor: pointer; }
.book-btn:hover { background: #000; color: #fff; }
.book-btn:active { color: #fff; }

/* 직접 예약: 넓은 화면에선 [안내문 | 전화번호+버튼] 두 칸 */
.direct-book {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px 32px;
}
.direct-book-text { margin: 0; color: #444; }
.direct-book-text a { color: #000; font-weight: bold; text-decoration: underline; text-underline-offset: 3px; }   /* 예약 현황 달력 링크 */
/* 결제 안내: 항목 이름 | 내용 (줄 맞춤) */
.direct-book-terms {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 6px 14px;
    margin: 14px 0 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--bg-soft);
    font-size: 14px;
}
.direct-book-terms dt { font-weight: bold; color: #222; }
.direct-book-terms dd { margin: 0; color: #444; }
@media (max-width: 480px) {   /* 폰: 항목 이름 아래에 내용 */
    .direct-book-terms { grid-template-columns: 1fr; gap: 0; }
    .direct-book-terms dd { margin-bottom: 8px; }
    .direct-book-terms dd:last-child { margin-bottom: 0; }
}
.book-card .card-head small { margin-left: 4px; color: var(--muted); font-size: 13px; font-weight: normal; }
@media (max-width: 600px) {
    .book-card .card-head small { display: block; margin: 2px 0 0; }   /* 폰: 제목 아래 한 줄로 (옆에 붙이면 잘리거나 '분'만 떨어짐) */
    .br-pc { display: none; }                                           /* 문장 중간 줄바꿈은 넓은 화면에서만 */
}
.direct-book-contact { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }

.phone-big {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 0.02em;
}
.phone-big .material-symbols-outlined { font-size: 24px; }

.book-card .btn { border-radius: 999px; padding: 3px 16px; color: #000; }

@media (max-width: 640px) {
    .book-grid { grid-template-columns: 1fr; gap: 12px; }
    .direct-book { grid-template-columns: 1fr; }
}


/* 11. 후기 ================================================================= */

/* 11-1. 후기 묶음 상자 (AI 요약 / 블로그 후기 / 이용후기 공통)
 *   회색 바탕 큰 상자 + 제목 줄(아이콘, 제목, 개수, 접기 버튼) + 구분선
 *   안의 카드는 테두리·그림자 없이 흰 바탕만 (상자 바탕과 색 차이로 구분) */
.review-panel {
    margin: 20px 0;
    padding: 18px 22px;
    background: #f6f6f6;
    border: 1px solid #d0d0d0;
    border-radius: 16px;
    color: #333;
}
.review-panel-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid #e3e3e3;
}
details.review-panel:not([open]) > .review-panel-head { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }
.review-panel-icon {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
}
span.review-panel-icon {        /* 이모지 아이콘: 흰 네모 타일 */
    display: grid;
    place-items: center;
    background: #fff;
    border: 1px solid #e3e3e3;
    font-size: 21px;
}
.page .review-panel-title {     /* .page h2 여백을 덮어써야 아이콘과 세로 정렬됨 */
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.4;
    color: #222;
}
.review-panel-count {           /* 제목 옆 개수 동그라미 */
    display: inline-block;
    min-width: 1.6em;
    padding: 0 6px;
    border-radius: 999px;
    background: #888;
    color: #fff;
    font-size: 12px;
    line-height: 1.6em;
    text-align: center;
    vertical-align: middle;
}
.blog-reviews .review-panel-count { background: #03c75a; }   /* 네이버 블로그 색 */
.review-panel-lead { margin: -4px 0 14px; color: #666; font-size: 14px; }
.review-panel .card { border: 0; box-shadow: none; }

/* AI 요약 본문 */
.ai-summary-body p {
    margin: 0 0 10px;
    font-size: 0.97rem;
    line-height: 1.7;
}
.ai-summary-body p:last-child { margin-bottom: 0; }
.ai-summary-note {
    padding: 10px 14px;
    background: #f0f0f0;
    border-radius: 10px;
}

@media (max-width: 480px) {
    .review-panel { padding: 14px 12px; border-radius: 14px; }
    .review-panel-icon { width: 36px; height: 36px; border-radius: 9px; }
    .page .review-panel-title { font-size: 1rem; }
    .review-panel .card { padding: 14px; }
    .ai-summary-body p { font-size: 0.93rem; }
}

/* 11-0. 접기/펼치기 (<details> + <summary> 안의 .fold-btn) */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.fold-btn {
    display: inline-flex;
    align-items: center;
    flex: none;
    gap: 2px;
    margin-left: auto;          /* 줄 오른쪽 끝으로 */
    padding: 2px 6px 2px 12px;
    border: 1px solid #ccc;
    border-radius: 999px;
    background: #fff;
    color: #555;
    font-size: 13px;
    font-weight: normal;
    transition: border-color 0.2s ease;
}
summary:hover .fold-btn { border-color: #000; color: #000; }
.fold-btn .material-symbols-outlined { transition: transform 0.2s ease; }
details:not([open]) > summary .fold-btn .material-symbols-outlined { transform: rotate(180deg); }
details[open] > summary .fold-when-closed,
details:not([open]) > summary .fold-when-open { display: none; }

/* 11-2-1. 인스타 후기: 인스타 공식 퍼가기 카드 (폭 326~540px 이 인스타 기준), 넓은 화면은 나란히, 폰은 1칸 */
.insta-review-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(326px, 1fr));
    gap: 14px;
    margin: 0; padding: 0; list-style: none;
}
.insta-review { display: flex; justify-content: center; }
.insta-embed { position: relative; width: 100%; max-width: 540px; }
/* 올린 날짜: 인스타 카드(iframe) 안 아이디 바로 아래 줄에 흰 바탕으로 덮어 씀 — 카드가 다 그려진 뒤에만 */
.insta-review-date {
    position: absolute; z-index: 1; top: 29px; left: 48px;
    padding: 0 6px 0 0; background: #fff;
    color: #737373; font-size: 12px; line-height: 16px; white-space: nowrap;
    pointer-events: none;
}
.insta-embed:not(.is-loaded) .insta-review-date { display: none; }   /* 게시물이 다 뜬 뒤에만 (js/reviews.js) */
.insta-review .instagram-media { width: 100%; max-width: 540px !important; min-width: 0 !important; margin: 0 !important; }
.insta-review blockquote.instagram-media { padding: 16px; border: 1px solid #e3e3e3; border-radius: 12px; background: #fff; }   /* 불러오기 전·못 불러올 때 링크 상자 */
.insta-fallback { display: inline-flex; align-items: center; gap: 8px; color: #222; font-size: 14px; text-decoration: none; }
.insta-fallback img { border-radius: 50%; }   /* 프로필 사진 (img/review/insta/) */
@media (max-width: 400px) { .insta-review-list { grid-template-columns: 1fr; } }

/* 11-2. 블로그 후기: 정성 들인 글이라 위에 따로, 2칸 바둑판 (폰은 1칸) */
.blog-review-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.blog-review {                  /* 모양은 공통 .card */
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.blog-review-title {
    font-size: 16px;
    font-weight: bold;
    line-height: 1.45;
    color: #111;
}
.blog-review-title:hover { text-decoration: underline; }
.blog-review-excerpt {          /* 미리보기는 3줄까지만 */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    margin: 0;
    color: #555;
    font-size: 14px;
    line-height: 1.65;
}
.blog-review-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;           /* 카드 높이가 달라도 아랫줄은 바닥에 맞춤 */
    padding-top: 10px;
    border-top: 1px solid #eee;
}
.blog-review-foot > img {
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}
.blog-review-author { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.blog-review-name { font-size: 13px; font-weight: bold; }
.blog-review-date { font-size: 11px; color: gray; }
.blog-review-chevron { display: none; }   /* 폰 목록형에서만 보임 */
.blog-review-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    border-radius: 999px;
    padding: 2px 12px;
    color: #000;
    font-size: 13px;
}

@media (max-width: 700px) {
    /* 폰: 목록형 — 흰 상자 하나에 한 줄씩, 미리보기·버튼 없이 줄 전체를 누르면 블로그로
     *   [사진] 제목 제목 제목…   >
     *   [사진] 이름 · 날짜       >        */
    .blog-review-list {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0 12px;
        background: #fff;
        border-radius: 12px;
    }
    .review-panel .blog-review {
        position: relative;
        display: grid;
        grid-template-columns: 36px minmax(0, 1fr) auto;
        grid-template-areas:
            "photo title  chev"
            "photo author chev";
        gap: 1px 10px;
        align-items: center;
        padding: 10px 0;
        background: none;
        border-radius: 0;
        border-bottom: 1px solid #eee;
    }
    .review-panel .blog-review:last-child { border-bottom: 0; }
    .blog-review-foot { display: contents; }   /* 아랫줄 묶음을 풀어서 칸에 하나씩 배치 */
    .blog-review-foot > img { grid-area: photo; width: 36px; height: 36px; }
    .blog-review-title {        /* 제목은 한 줄만, 넘치면 … */
        grid-area: title;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 14px;
        line-height: 1.4;
    }
    .blog-review-title::after { content: ""; position: absolute; inset: 0; }   /* 줄 전체를 링크로 */
    .blog-review-title:hover { text-decoration: none; }
    .blog-review-author     { grid-area: author; flex-direction: row; align-items: baseline; gap: 6px; }
    .blog-review-name       { min-width: 0; font-size: 12px; font-weight: normal; color: #666; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .blog-review-date       { flex: none; white-space: nowrap; }
    .blog-review-chevron    { display: block; grid-area: chev; color: #aaa; font-size: 20px; }
    .blog-review-excerpt,
    .blog-review-btn        { display: none; }
}

/* 11-3. 후기 목록: 카드 한 줄씩 (후기 길이가 제각각이라 2칸은 빈 공간이 많이 생김) */
.review-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.review {                       /* 모양은 공통 .card */
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr);
    grid-template-areas:
        "photo name"
        "photo meta"
        "body  body"
        "foot  foot";
    align-content: start;
}
.review-foot { grid-area: foot; margin-top: 10px; }   /* 👍 도움이 됐어요 (inc/likes.php) */
.js .review.is-hidden { display: none; }    /* 스크롤하면 10개씩 더 보여줌 */

/* 이용후기 검색 중: 숨겨둔(아직 안 불러온) 후기도 맞으면 보여줌 (안 맞는 건 공통 .is-filtered-out 로 숨김) */
.js .review-list.is-searching .review.is-hidden { display: grid; }
.review-panel .search-status { margin-top: -4px; }

.review-photo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.review-photo { grid-area: photo; }
.review-name  { grid-area: name; font-weight: bold; }
.review-meta  { grid-area: meta; color: gray; font-size: 11px; }
.review-body  { grid-area: body; margin-top: 10px; font-size: 15px; }

.review-meta a { color: gray; }
.review-meta a img { filter: brightness(80%); opacity: 0.6; }
.review-meta a:hover img { filter: none; opacity: 1; }

@media (max-width: 700px) {
    .review-list { gap: 12px; }
}


/* 관리자 (/admin): 로그인 + 장소 목록·추가·수정 */
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page .admin-head h2, .page .admin-head h3 { margin: 24px 0 12px; }
.admin .btn { border-radius: 999px; padding: 2px 16px; color: #000; }
.admin-count { color: var(--muted); font-size: 14px; font-weight: normal; }
.admin-flash { margin: 0 0 16px; padding: 10px 14px; border-radius: 10px; background: #e8f5e9; color: #1b5e20; font-size: 14px; }
.admin-flash.is-error { background: #fdecea; color: #b71c1c; }
ul.admin-flash { padding-left: 32px; }
.admin-help { color: var(--muted); font-size: 13px; }
.admin-help code, .admin-flash code { padding: 0 4px; background: var(--bg-soft); border-radius: 4px; }

.admin-login { display: grid; gap: 10px; max-width: 320px; }
/* 보일러 기름: 날짜 · 금액 · 리터 한 줄 (좁으면 줄바꿈) */
.admin-oil-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; }
.admin-oil-form label { flex: 1 1 150px; font-size: 14px; }
.admin-oil-form label small { color: var(--muted); }
.admin-oil-form .btn { flex: 0 0 auto; }

/* 💬 후기 탭: 위 새 후기 넣기(접기) + 아래 목록(한 줄씩, 누르면 고치기) */
.admin-review-new { margin-bottom: 16px; }
.admin-review-new > summary { cursor: pointer; list-style: none; }
.admin-review-new > summary::-webkit-details-marker { display: none; }
.admin-review-new > summary h3 { display: inline; margin: 0; }
.admin-review-new > summary h3::after { content: ' ▾'; color: var(--muted); font-size: 14px; }
.admin-review-new[open] > summary h3::after { content: ' ▴'; }
.admin-review-new form { margin-top: 12px; }
.admin-review-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; margin-bottom: 10px; }
.admin-review-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: bold; }
.admin-review-grid label small { font-weight: normal; color: var(--muted); }
.admin-review-grid .is-wide { grid-column: 1 / -1; }
.admin-review-grid input, .admin-review-grid select, .admin-review-grid textarea { width: 100%; box-sizing: border-box; padding: 7px 9px; border: 1px solid #ccc; font: inherit; font-weight: normal; }
.admin-review-grid textarea { resize: vertical; line-height: 1.5; }
.admin-review-grid label input, .admin-review-grid label select, .admin-review-grid label textarea { font-weight: 400; }   /* 칸 제목(굵게)과 구분 */
.admin-review-list { margin: 0; padding: 0; list-style: none; }
.admin-review-list > li { border-top: 1px solid #eee; }
.admin-review-list summary { display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; list-style: none; }
.admin-review-list summary::-webkit-details-marker { display: none; }
.admin-review-list summary:hover { background: var(--bg-soft); }
.admin-review-list summary img { flex: none; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #eee; }
.admin-review-who { flex: none; width: 130px; display: flex; flex-direction: column; line-height: 1.3; }
.admin-review-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-review-who small { color: var(--muted); font-size: 12px; }
.admin-review-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #444; font-size: 14px; }
.admin-review-list details[open] > summary { background: var(--bg-soft); }
.admin-review-edit { padding: 12px 0 4px; }
.admin-review-buttons { display: flex; gap: 10px; align-items: center; }
@media (max-width: 640px) {
    .admin-review-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-review-who { width: 96px; }
    /* 폰: 글은 사진·이름 아래 줄에 두 줄까지 */
    .admin-review-list summary { flex-wrap: wrap; }
    .admin-review-text { flex-basis: 100%; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 13px; }
}
/* 💰 운영비 탭: 1년 표 (폰은 옆으로 밀어서) */
.admin-table-scroll { overflow-x: auto; }
.admin-cost-table { min-width: 640px; }
.admin-cost-table td, .admin-cost-table th { white-space: nowrap; }
.admin-cost-table tr.is-future td { color: var(--muted); }
.admin-cost-table .is-none { color: #ccc; }
.admin-cost-table tfoot th { border-top: 2px solid #000; }
.admin-pay-day { display: block; color: var(--muted); font-size: 11px; }
.admin-cost-item { margin: 0 0 10px; }
.admin-cost-item.is-new { padding-top: 10px; border-top: 1px dashed #ddd; }
.admin-cost-item input[type=month] { width: 100%; margin-top: 4px; padding: 6px 8px; border: 1px solid #ccc; font: inherit; }
.admin-cost-del { padding: 5px 12px; border: 1px solid #e0a0a0; border-radius: 999px; background: #fff; color: #c62828; font: inherit; font-size: 13px; cursor: pointer; }
/* 🖼️ 사진 탭: 묶음마다 [제목 + 올리기] / 사진 칸들 (아래 ◀ ▶ ✕) */
.admin-photos { scroll-margin-top: 80px; }
.admin-photos-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.admin-photos-head h3 { margin: 0; }
.admin-photos-head h3 small { margin-left: 4px; color: var(--muted); font-size: 13px; font-weight: normal; }
.photo-upload { display: flex; align-items: center; gap: 10px; margin: 0; }
.photo-upload-btn { cursor: pointer; }
.photo-upload-status { color: var(--muted); font-size: 13px; }
/* 사진 칸: 작게 여러 장 (PC 한 칸 약 90px, 폰 4칸) — 크게 보려면 눌러서 크게 보기 창 */
.admin-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; margin-top: 12px; }
.admin-photo-grid.is-slides { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.admin-photo-grid figure { margin: 0; }
.admin-photo-grid img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--bg-soft); }
.admin-photo-grid.is-slides img { aspect-ratio: 4 / 1; }
/* 사진 위에 겹친 버튼: 가운데(사진 자체) = 크게 보기, ◀ ▶ 높이 가운데 좌우 = 순서, ✕ 오른쪽 위 = 지우기 (슬라이드)
 *   폴더 사진은 접힘/펼침에 따라 ◀ ▶ 또는 ✕ 만 (아래 .admin-folder) */
.admin-photo-grid figure { position: relative; }
.admin-photo-grid figcaption { position: static; margin: 0; }
.admin-photo-grid .ph-act { position: absolute; z-index: 1; }
.admin-photo-grid .ph-act form { margin: 0; }
.admin-photo-grid .ph-act.is-del  { top: 3px; right: 3px; }
.admin-photo-grid .ph-act.is-prev,
.admin-photo-grid .ph-act.is-next { top: 50%; transform: translateY(-50%); }   /* 사진 높이 가운데 좌우 */
.admin-photo-grid .ph-act.is-prev { left: 3px; }
.admin-photo-grid .ph-act.is-next { right: 3px; }
/* 폴더 접힘(평소): ◀ ▶ 만 / 펼침: ✕ 만 — 사진 오른쪽 절반 전체가 지우기 버튼, 왼쪽 절반은 그대로 크게 보기 */
.admin-folder:not(.is-editing) .admin-photo-grid .ph-act.is-del { display: none; }
.admin-folder.is-editing .admin-photo-grid .ph-act.is-prev,
.admin-folder.is-editing .admin-photo-grid .ph-act.is-next,
.admin-folder.is-editing .admin-folder-order { display: none; }   /* 펼침 = 지우기 모드: 이동 버튼(사진 ◀▶·폴더 위로/아래로)은 숨김 */
.admin-folder.is-editing .admin-photo-grid .ph-act.is-del { top: 0; right: 0; bottom: 0; width: 50%; }
.admin-folder.is-editing .admin-photo-grid .ph-act.is-del form { height: 100%; }
.admin-folder.is-editing .admin-photo-grid .ph-act.is-del button {
    width: 100%; height: 100%;
    border-radius: 0; box-shadow: none;
    background: rgba(0, 0, 0, 0.35); color: #fff;
    font-size: 18px; font-weight: bold;
}
.admin-folder.is-editing .admin-photo-grid .ph-act.is-del button:hover { background: rgba(198, 40, 40, 0.75); }
.admin-folder.is-editing .admin-photo-grid figure::after {   /* 왼쪽 절반 = 크게 보기 표시 (누르는 건 아래 사진 링크) */
    content: "🔍"; position: absolute; left: 25%; top: 50%; transform: translate(-50%, -50%);
    font-size: 14px; pointer-events: none; text-shadow: 0 0 3px #fff;
}
.admin-photo-grid .ph-act button {
    display: grid; place-items: center;
    width: 24px; height: 24px; padding: 0;
    border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, 0.9); color: #222;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    font: inherit; font-size: 11px; line-height: 1; cursor: pointer;
}
.admin-photo-grid .ph-act button:hover { background: #000; color: #fff; }
.admin-photo-grid .ph-act.is-del button { background: rgba(0, 0, 0, 0.6); color: #fff; }
.admin-photo-grid .ph-act.is-del button:hover { background: #c62828; }
.admin-photo-grid.is-slides .ph-act button { width: 30px; height: 30px; font-size: 13px; }
.admin-photo-group-edit { margin-top: 12px; font-size: 14px; }
.admin-photo-group-edit summary, .admin-photo-group-new summary { color: var(--muted); cursor: pointer; }
.admin-photo-group-edit[open] summary, .admin-photo-group-new[open] summary { margin-bottom: 10px; }
.admin-photo-group-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.admin-photo-group-tools form { margin: 0; }
.admin-photo-group-tools button { padding: 3px 12px; border: 1px solid #ccc; border-radius: 999px; background: #fff; font: inherit; font-size: 13px; cursor: pointer; }
/* 폴더마다 위쪽: [▲ ▼] 📁 이름 n장 (세트) ……… [＋ 사진 올리기]
 *               [한국어][영어][세트][저장]                 [폴더 삭제] */
/* 사진 폴더 상자: 테두리 없이 연한 회색 바탕 */
.admin-photo-tab .admin-folder { border: 0; box-shadow: none; background: #f1f1f1; margin: 0 0 12px; }   /* 폴더끼리 흰 틈으로 구분 */
.admin-photo-tab .admin-folder.is-set { border: 0; }   /* 세트는 제목 옆 '세트 …' 표시로만 */
/* 세트로 붙은 폴더끼리는 틈 없이 한 덩어리로, 사이엔 얇은 선만 */
.admin-photo-tab .admin-folder.is-set-joined-next { margin-bottom: 0; }
.admin-photo-tab .admin-folder.is-set-joined-prev { border-top: 1px solid #d6d6d6; }
/* 펼친 폴더: 진한 테두리 (안쪽 선이라 크기가 안 바뀌어서 들썩이지 않음) + 테두리도 부드럽게 */
.admin-photo-tab .admin-folder { transition: box-shadow 0.2s ease; }
.admin-photo-tab .admin-folder.is-editing { box-shadow: inset 0 0 0 2px #000; }
.admin-photo-tab .admin-folder.is-closing { box-shadow: none; }
/* 오른쪽 위: [▲ 위로] [▼ 아래로] [＋ 사진 올리기] */
.admin-folder-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 10px; }
.admin-folder-order { display: flex; flex-direction: column; align-items: center; gap: 4px; }   /* 위로 위·아래로 아래 (상하 배치) */
.admin-order-note { color: var(--muted); font-size: 11px; white-space: nowrap; }   /* 세트 폴더: '세트 안에서만' */
.admin-folder-order.is-in-set button { border-style: dashed; }
.admin-folder-order form { margin: 0; }
.admin-folder-order button {
    width: 76px; height: 28px; padding: 0 10px;
    border: 2px solid #000; border-radius: 999px;
    background: #fff; color: #000; font: inherit; font-size: 13px; font-weight: bold; white-space: nowrap; cursor: pointer;
}
.admin-folder-order button:hover { background: #000; color: #fff; }
.admin-folder-order button:active { transform: scale(0.95); }
/* 폴더 위로/아래로: 새로고침 없이 자리만 바꾸며 미끄러짐 (js/admin.js) — 브라우저가 스크롤을 따라 옮기지 않게 */
.admin-photo-tab { overflow-anchor: none; }
.admin-set-tag { margin-left: 6px; padding: 0 8px; border-radius: 999px; background: #000; color: #fff; font-size: 11px; font-style: normal; font-weight: normal; vertical-align: 2px; }
/* 폴더 이름(제목)을 눌러야 이름·세트·폴더 삭제 칸이 보임 (js/admin.js .is-editing) */
.admin-folder-name { cursor: pointer; user-select: none; }
.admin-folder-name:hover .admin-folder-toggle, .admin-photos.is-editing .admin-folder-toggle { border-color: #000; color: #000; }
.admin-folder-toggle {
    display: inline-block; margin-left: 8px; padding: 1px 9px;
    border: 1px solid #ccc; border-radius: 999px;
    color: #555; font-size: 12px; font-weight: normal; vertical-align: 2px; white-space: nowrap;
}
.admin-photos.is-editing .admin-folder-toggle { background: #000; color: #fff; }
.admin-photos:not(.is-editing) .admin-folder-edit { display: none; }
/* 상단 슬라이드: 접혀 있으면 제목 줄만 (설명·사진·올리기 버튼 숨김) */
.admin-slides:not(.is-editing) > :not(.admin-photos-head),
.admin-slides:not(.is-editing) .photo-upload,
.admin-slides.is-closing > :not(.admin-photos-head),
.admin-slides.is-closing .photo-upload { display: none; }
.admin-slides.is-editing > :not(.admin-photos-head) { animation: folder-open 0.22s ease-out; transform-origin: top; }
/* 접혀 있을 땐 간단히: 영어 이름·세트 표시·사진 올리기는 펼쳤을 때만 (📁 이름 · n장 · ▾ 펼치기 · 위로/아래로만) */
.admin-folder:not(.is-editing) .admin-folder-name small,
.admin-folder:not(.is-editing) .admin-set-tag,
.admin-folder:not(.is-editing) .admin-folder-tools .photo-upload { display: none; }
.admin-folder.is-closing .admin-folder-name small,
.admin-folder.is-closing .admin-set-tag,
.admin-folder.is-closing .admin-folder-tools .photo-upload { display: none; }   /* 접히는 순간부터 숨김 */
.admin-folder.is-editing .admin-folder-name small,
.admin-folder.is-editing .admin-set-tag,
.admin-folder.is-editing .admin-folder-tools .photo-upload { animation: ph-act-in 0.2s ease-out; }
/* 펼치기/접기 효과: 입력칸은 위에서 살짝 내려오며 나타나고, 접을 땐 반대로 / 사진 위 버튼은 부드럽게 바뀜 */
.admin-folder.is-editing .admin-folder-edit { animation: folder-open 0.22s ease-out; transform-origin: top; }
.admin-folder.is-closing .admin-folder-edit { animation: folder-close 0.2s ease-in forwards; }
@keyframes folder-open  { from { opacity: 0; transform: translateY(-6px) scaleY(0.92); } to { opacity: 1; transform: none; } }
@keyframes folder-close { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-6px) scaleY(0.92); } }
.admin-folder .admin-photo-grid .ph-act { animation: ph-act-in 0.2s ease-out; }
@keyframes ph-act-in { from { opacity: 0; } to { opacity: 1; } }
.admin-folder-toggle { transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
@media (prefers-reduced-motion: reduce) {
    .admin-folder.is-editing .admin-folder-edit, .admin-folder.is-closing .admin-folder-edit, .admin-folder .admin-photo-grid .ph-act { animation: none; }
}
.admin-folder-edit { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; margin-top: 10px; padding: 10px 0; border-top: 1px dashed #e3e3e3; border-bottom: 1px dashed #e3e3e3; }
.admin-folder-edit > form { margin: 0; }
.admin-folder-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 8px; flex: 1 1 420px; }
.admin-folder-form label { display: grid; gap: 2px; flex: 1 1 120px; color: var(--muted); font-size: 12px; }
.admin-folder-form label:nth-of-type(3) { flex: 0 1 90px; }   /* 세트 칸은 짧게 */
.admin .admin-folder-form input[type=text] { width: 100%; margin: 0; padding: 5px 8px; }
.admin-folder-form .btn { flex: none; }
/* 폴더 삭제: 글자로 분명하게, 빨간 테두리 */
.admin-folder-edit button[title="폴더 삭제"] {
    padding: 5px 14px;
    border: 1px solid #e0a0a0; border-radius: 999px;
    background: #fff; color: #c62828;
    font: inherit; font-size: 13px; cursor: pointer;
}
.admin-folder-edit button[title="폴더 삭제"]:hover { background: #fdecea; border-color: #c62828; }
@media (max-width: 600px) {   /* 폰: 위로·아래로·올리기 한 줄 꽉, 사진은 4칸, 이름 두 칸 한 줄 */
    .admin-folder-tools { width: 100%; justify-content: stretch; }
    .admin-folder-order { flex: 0 0 auto; }
    .admin-folder-order button { width: 84px; height: 34px; padding: 0 6px; }
    .admin-folder-tools .photo-upload { flex: 1.3 1 0; }
    .admin-folder-tools .photo-upload-btn { width: 100%; text-align: center; }
    .admin-folder .admin-photo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
    .admin-photo-tab .admin-folder { padding: 14px 12px; }
    .admin-folder-form label { flex: 1 1 40%; }
    .admin-folder-form label:nth-of-type(3) { flex: 1 1 40%; }
    .admin .admin-folder-form input[type=text] { padding: 7px 8px; }
    .admin-folder-edit button[title="폴더 삭제"] { padding: 7px 16px; }
}
/* 사진 탭: 누르는 버튼 말고는 모서리 각지게 (상자·입력칸·세트 표시·크게 보기 창) */
.admin-photo-tab .card,
.admin .admin-photo-tab input[type=text],
.admin-photo-tab .admin-set-tag,
.admin-photo-tab .admin-photo-view { border-radius: 0; }
/* 사진 탭 바로가기 (폰에서 올릴 폴더로 바로) */
.admin-photo-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.admin-photo-jump a { padding: 4px 11px; border: 1px solid #ccc; border-radius: 999px; background: #fff; font-size: 13px; }
.admin-photo-jump a:hover { border-color: #000; font-weight: normal; }
.admin-photos { scroll-margin-top: 70px; }
.admin-folder-new { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.admin .admin-folder-new input[type=text] { flex: 1 1 140px; width: auto; margin: 0; padding: 5px 8px; }
#ph-folders { scroll-margin-top: 80px; }
/* 관리자 사진 크게 보기 (js/admin.js) */
.admin-photo-view { width: min(1100px, 94vw); max-width: 94vw; height: 90vh; max-height: 90vh; padding: 0; border: 0; background: #111; color: #fff; }
.admin-photo-view[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }   /* 위 / 큰 사진 / 작은 사진 줄 */
.admin-photo-view-strip { display: flex; justify-content: safe center; gap: 6px; padding: 8px 12px 14px; overflow-x: auto; }
.admin-photo-view .admin-photo-view-strip button { flex: none; padding: 0; border-radius: 0; background: none; opacity: 0.5; outline: 2px solid transparent; outline-offset: 1px; }
.admin-photo-view .admin-photo-view-strip button:hover { opacity: 0.85; background: none; }
.admin-photo-view .admin-photo-view-strip button.is-active { opacity: 1; outline-color: #fff; }
.admin-photo-view-strip img { display: block; width: 72px; height: 54px; object-fit: cover; }
.admin-photo-view.is-single .admin-photo-view-strip { display: none; }
@media (max-width: 600px) {   /* 폰: 화면 거의 꽉, ◀ ▶ 는 사진 위에 겹쳐서 사진을 크게 (좌우로 밀어도 넘어감, js/admin.js) */
    .admin-photo-view { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; }
    .admin-photo-view-stage { position: relative; padding: 0 0 8px; }
    .admin-photo-view-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; background: rgba(0, 0, 0, 0.45) !important; }
    .admin-photo-view-nav[data-step="-1"] { left: 6px; }
    .admin-photo-view-nav[data-step="1"] { right: 6px; }
    .admin-photo-view-strip img { width: 60px; height: 45px; }
}
.admin-photo-view::backdrop { background: rgba(0, 0, 0, 0.7); }
.admin-photo-view-top { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 8px 16px; font-size: 14px; }
.admin-photo-view button { border: 0; background: rgba(255, 255, 255, 0.14); color: #fff; font: inherit; cursor: pointer; }
.admin-photo-view button:hover { background: rgba(255, 255, 255, 0.28); }
.admin-photo-view-top button { width: 36px; height: 36px; border-radius: 50%; }
.admin-photo-view-stage { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 0; padding: 0 10px 12px; }
.admin-photo-view-stage img { min-width: 0; max-width: 100%; max-height: 100%; object-fit: contain; }
.admin-photo-view-nav { flex: none; width: 40px; height: 40px; border-radius: 50%; }
.admin-photo-view.is-single .admin-photo-view-nav { visibility: hidden; }
.admin-photo-grid a[data-photo-view] { display: block; cursor: zoom-in; }
.admin-photo-ftp ul { margin: 4px 0 12px; padding-left: 20px; font-size: 13px; }
.admin-photo-ftp p { margin: 8px 0 0; }
.admin input[type=date], .admin input[type=text], .admin input[type=password], .admin select, .admin textarea {
    width: 100%;
    margin-top: 4px;
    padding: 7px 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
    background: #fff;
}
.admin textarea { resize: vertical; }
.admin label { display: block; color: #555; font-size: 13px; }

.admin-place-form { display: grid; gap: 14px; }
.admin-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.admin-row label { flex: 1 1 120px; }
.admin-row .admin-check { flex: 2 1 220px; display: flex; align-items: center; gap: 6px; padding-bottom: 8px; color: #333; font-size: 14px; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.admin-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-actions { display: flex; align-items: center; gap: 16px; }
/* 장소 추가·수정 창: 목록 위에 뜨고 뒤는 어둡게 */
.place-dialog {
    width: min(760px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    padding: 0;
    border: 0;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.place-dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
.place-dialog .admin-place-form { padding: 18px 22px 0; }
.place-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page .place-dialog-head h3 { margin: 0; font-size: 18px; }
.place-dialog-x {
    flex: none;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: var(--bg-soft);
    color: #333;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.place-dialog-x:hover { background: #e3e3e3; }
.place-dialog-foot {                /* 아래 버튼 줄: 창을 내려도 항상 보이게 */
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin: 0 -22px;
    padding: 12px 22px;
    background: #fff;
    border-top: 1px solid #eee;
}
.place-dialog-foot .btn { font-size: 14px; padding: 4px 18px; }
.place-dialog-foot .btn.is-primary { background: #000; color: #fff; }
.place-dialog-delete { margin-right: auto; border-color: #b71c1c !important; color: #b71c1c !important; }
.place-dialog-delete[hidden] { display: none; }   /* 새 장소일 땐 삭제 버튼 없음 (.btn 의 display 가 hidden 을 덮지 않게) */

.admin-changes { margin: 12px 0; padding: 12px 16px; background: #fffbea; border-color: #f1e3a6; }
.admin-changes summary { font-weight: bold; }
.admin-changes summary .admin-help { font-weight: normal; }
.admin-changes ul { margin: 8px 0 0; padding-left: 20px; font-size: 13px; }

/* 관리자 탭 (장소 관리 / 방문자) + 방문자 표 */
.admin-tabs { margin: 0 0 16px; }
.admin-visits { overflow-x: auto; }
.admin-visits h3 { margin: 0 0 12px; }
.admin-geo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 8px; }   /* 국가별 | 지역별 */
@media (max-width: 767px) { .admin-geo { grid-template-columns: 1fr; } }
.admin-visits table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-visits th, .admin-visits td { padding: 6px 8px; border-bottom: 1px solid #eee; text-align: left; white-space: nowrap; }
.admin-visits th { color: var(--muted); font-size: 13px; font-weight: normal; }
.admin-visits td small { color: var(--muted); }
.admin-visits-bar-col { width: 40%; }
.admin-visits-bar { display: block; height: 8px; border-radius: 4px; background: #333; min-width: 2px; }
.admin-changes li span { color: #666; word-break: break-all; }
.admin-group h4 { margin: 20px 0 6px; }

/* 전기요금 탭: 문자 붙여 넣기 + 요약 카드 3개 + 달별 표 */
.admin-power-form { display: grid; gap: 10px; }
/* 문자 붙여 넣기 접는 상자: 평소 제목 한 줄만 */
.admin-bill-fold { margin-bottom: 16px; }
.admin-bill-fold > summary { display: flex; align-items: center; gap: 8px; font-weight: bold; cursor: pointer; }
.admin-bill-fold > summary .admin-help { font-weight: normal; }
.admin-bill-fold[open] > summary { margin-bottom: 10px; }
.admin-bill-fold[open] > summary .admin-help { display: none; }
.admin-power-form textarea { font-size: 14px; }
@media (pointer: coarse) { .admin-power-form textarea { font-size: 16px; } }   /* 폰에서 눌렀을 때 확대 안 되게 */
.admin-power-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (max-width: 600px) { .admin-power-summary { grid-template-columns: 1fr; } }
.admin-power-summary .card { display: grid; gap: 2px; margin: 0; }
.admin-power-summary small, .admin-power-summary span { color: var(--muted); font-size: 13px; }
.admin-power-summary strong { font-size: 22px; }
.admin-power-summary .is-up, .admin-visits .is-up { color: #c62828; }
.admin-power-summary .is-down, .admin-visits .is-down { color: #2e7d32; }
.admin-power-tools { display: flex; align-items: center; gap: 8px; }
.admin-power-tools a { font-size: 13px; text-decoration: underline; }
.admin-power-tools form { margin: 0; }
.admin-power-tools button { padding: 0 6px; border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; }
.admin-power-tools button:hover { color: #c62828; }
.admin-visits tr.is-history td { color: var(--muted); }
.admin-visits tr.is-selected td { background: #fffbea; }
.admin-visits tr.is-sum td { font-weight: bold; }
.admin-power-detail h4 { margin: 4px 0 6px; }
.power-dialog .admin-power-detail { padding: 18px 22px 20px; }   /* 한 달 상세 창 */
.power-dialog .place-dialog-head { margin-bottom: 12px; }
.admin-visits tr.is-tax td { border-top: 2px solid #ddd; }
/* 누진 단계 배지: 1단계 초록 / 2단계 주황 / 3단계 빨강 */
.power-tier { display: inline-block; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: bold; line-height: 18px; vertical-align: 1px; white-space: nowrap; }
.power-tier.is-t1 { background: #e8f5e9; color: #2e7d32; }
.power-tier.is-t2 { background: #fff3e0; color: #e65100; }
.power-tier.is-t3 { background: #fdecea; color: #c62828; }
.admin-power-detail h4 .power-tier { margin-left: 4px; }
.admin-power-detail .power-tier-table { margin-bottom: 4px; }
.admin-visits .power-tier-table td:not(:first-child) { text-align: right; }
.admin-visits tr.is-empty td { color: #bbb; }
/* 관리자 폼 처리 중 (js/common.js 6): 버튼 앞에 도는 표시 */
.btn.is-busy { opacity: 0.75; cursor: progress; }
.btn.is-busy::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 6px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: -1px;
    animation: busy-spin 0.8s linear infinite;
}
@keyframes busy-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.is-busy::before { animation-duration: 2.4s; } }

/* 문자 저장 결과 확인창 */
.power-result { width: min(420px, calc(100vw - 32px)); }
.power-result h3 { margin: 0 0 14px; font-size: 18px; }
.power-result-list { margin: 0 0 12px; padding: 0; list-style: none; }
.power-result-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid #eee; font-size: 16px; }
.power-result-list li:first-child { border-top: 0; }
.power-result-list li span:last-child { margin-left: auto; font-weight: bold; }
.power-result .admin-flash { margin: 0 0 10px; }
.power-result-foot { display: flex; justify-content: flex-end; margin-top: 8px; }
.power-result-foot .btn { padding: 6px 28px; background: #000; color: #fff; font-size: 15px; }
.power-dialog .admin-power-detail td:first-child { white-space: normal; }   /* 폰에서 숫자 칸이 잘리지 않게 이름 칸이 줄바꿈 */
.power-dialog .admin-power-detail td:last-child { text-align: right; }
@media (max-width: 600px) {
    .power-dialog .admin-power-detail { padding: 14px; }
    .power-dialog .admin-power-detail td small { display: block; }
}
.admin-power-gen { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 16px; }
.admin-power-gen label { flex: 1 1 240px; }
.admin-power-refresh { margin: 8px 0 0; }

/* 보류(숨기기) 토글: 관리자 목록 + 주변 페이지(로컬 관리자) */
.place-toggle { flex: none; margin: 0; }
.place-toggle button {
    padding: 1px 10px;
    border: 1px solid #ccc;
    border-radius: 999px;
    background: #fff;
    color: #555;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}
.place-toggle button:hover { border-color: #000; color: #000; }
.place-toggle button.is-hidden { background: #333; border-color: #333; color: #fff; }
.place-row-body .place-toggle { align-self: flex-start; }
.is-hidden-place > a strong, .is-hidden-place .place-row-name { opacity: 0.55; }
.place-hold { padding: 0 6px; border-radius: 999px; background: #333; color: #fff; font-size: 11px; font-style: normal; font-weight: normal; vertical-align: 1px; }
.admin-list { margin: 0; padding: 0; list-style: none; background: #fff; border: 1px solid #e3e3e3; border-radius: 12px; }
.admin-list li { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-top: 1px solid #eee; }
.admin-list li:first-child { border-top: 0; }
.admin-list a { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: baseline; }
.admin-list a span { max-width: 100%; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }   /* max-width: 폰(세로 배치)에서 긴 설명이 화면 밖으로 안 나가게 */
.admin-list a:hover strong { text-decoration: underline; }
.admin-tag { flex: none; padding: 0 8px; border-radius: 999px; background: var(--bg-soft); color: #555; font-size: 12px; font-style: normal; }
.admin-tag.is-warn { background: #fff3cd; color: #8a6d00; }
.admin-tag.is-hold { background: #333; color: #fff; }

@media (max-width: 600px) {
    .place-dialog .admin-place-form { padding: 14px 14px 0; }
    .place-dialog-foot { margin: 0 -14px; padding: 10px 14px; }
    .admin-grid, .admin-grid-3 { grid-template-columns: 1fr; }
    .admin-list a { flex-direction: column; gap: 0; }
}

/* 404: 가운데 정렬 카드 (index.php 맨 위) */
.not-found { margin: 32px 0; padding: 40px 20px; text-align: center; }
.not-found-code { margin: 0; color: #ccc; font-size: 64px; font-weight: bold; line-height: 1; letter-spacing: 0.05em; }
.page .not-found h2 { margin: 12px 0 8px; }
.not-found p { color: #555; }
.not-found .btn { margin-top: 8px; border-radius: 999px; padding: 3px 18px; color: #000; }


/* 12. 푸터 ================================================================= */

.site-footer {
    margin-top: 24px;
    padding: 28px 16px 120px;
    border-top: 1px solid var(--line);
    font-size: 14px;
}

/* 사업자 정보: 콜론 없이 [회색 작은 항목명 | 내용] 두 칸, 항목명은 오른쪽 정렬로 가운데 선에 맞춤 */
.footer-info {
    display: grid;
    grid-template-columns: max-content max-content;
    justify-content: center;
    align-items: baseline;
    gap: 6px 20px;
    margin: 0;
}
.footer-info dt { color: var(--muted); font-size: 13px; text-align: right; }
.footer-info dd { margin: 0; color: #333; }

.copyright { margin: 28px 0 0; color: var(--muted); font-size: 13px; text-align: center; }