/* 고향쉼터 야생화 갤러리 — 반응형 (2026-11-26) */
:root {
  --bg: #f7f5ef; --surface: #ffffff; --ink: #24302a; --muted: #66736b; --line: #e2ddd0;
  --green: #2f4a3a; --green-2: #3f6b50; --leaf: #7fa36b; --petal: #c8577a; --sun: #e2b547;
  --radius: 14px; --shadow: 0 1px 2px rgba(36,48,42,.06), 0 6px 20px rgba(36,48,42,.07);
  --serif: "Noto Serif KR", "Nanum Myeongjo", "AppleMyungjo", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Segoe UI", Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--sans); word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--green-2); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.3; color: var(--green); }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); margin: .3em 0 .4em; }
h2 { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.5rem); margin: 1.6em 0 .7em; }
img { max-width: 100%; height: auto; }
.wrap { width: min(1200px, 100%); margin: 0 auto; padding: 0 16px; }
.sr, .skip:not(:focus) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 100; top: 8px; left: 8px; background: #fff; padding: 8px 12px; border-radius: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--green-2); }
.btn-primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-2); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

/* 머리 */
.site-head { position: sticky; top: 0; z-index: 30; background: rgba(247,245,239,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 2px;   /* 마크 그림 오른쪽 자체 여백(약 7px)이 있어 2px 이면 붙어 보임, 11-26 사용자 「글자와 마크 붙여줘」 */ text-decoration: none; color: var(--green); min-width: 0; }
.brand img { flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; line-height: 1.2; }
.brand-sub { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav ul a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 600; white-space: nowrap; }
.site-nav ul a:hover, .site-nav ul a[aria-current] { background: #e9efe6; color: var(--green); }
.nav-search { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: #fff; padding-left: 12px; }
.nav-search input { border: 0; background: transparent; font: inherit; width: 150px; min-height: 38px; outline: none; }
.nav-search button { border: 0; background: none; color: var(--muted); min-width: 40px; min-height: 38px; cursor: pointer; }
.lang-switch { font-weight: 700; text-decoration: none; padding: 6px 12px; border: 1px solid var(--green-2); border-radius: 999px; white-space: nowrap; }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: none; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: var(--green); margin: 5px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }
@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px 16px 18px; flex-direction: column; align-items: stretch; box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; }
  .site-nav ul a { padding: 12px; }
  .nav-search input { width: 100%; }
  .lang-switch { text-align: center; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* 첫 화면 */
.hero { background: linear-gradient(160deg, #e7eee0 0%, #f7f5ef 60%); border-bottom: 1px solid var(--line); padding: clamp(28px, 6vw, 64px) 0; text-align: center; }
.hero-lead { font-family: var(--serif); font-size: clamp(1.05rem, 1rem + .4vw, 1.3rem); margin: .2em 0; color: var(--green-2); }
.hero-lead2 { color: var(--muted); margin: .4em 0 0; }
.block { padding-bottom: 8px; }
.cat-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 180px), 1fr)); gap: 14px; }
.cat-card { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); height: 100%; }
.cat-img { aspect-ratio: 4 / 3; background: #eef1e8; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cat-img .ph, .cat-img .ph-img { width: 100%; height: 100%; object-fit: cover; }
.cat-ph { opacity: .55; }
.cat-name { font-weight: 700; padding: 10px 12px 0; }
.cat-count { color: var(--muted); font-size: .85rem; padding: 0 12px 12px; }
.sec-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.sec-list a { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); min-height: 72px; }
.sec-list span { color: var(--muted); font-size: .9rem; }

/* 목록 */
.crumbs { font-size: .88rem; color: var(--muted); padding-top: 18px; }
.crumbs a { color: var(--muted); }
.list-head { margin-bottom: 8px; }
.list-count { color: var(--muted); margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.chips a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--ink); font-size: .92rem; min-height: 36px; display: inline-flex; align-items: center; }
.chips a[aria-current] { background: var(--green); color: #fff; border-color: var(--green); }
.list-tools { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: .9rem; margin: 8px 0 16px; }
.list-tools a { color: var(--muted); text-decoration: none; }
.list-tools a[aria-current] { color: var(--green); font-weight: 700; text-decoration: underline; }
.note { color: var(--muted); font-size: .85rem; }
.card-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 220px), 1fr)); gap: 16px; }
.card a { display: flex; flex-direction: column; height: 100%; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: transform .15s; }
.card a:hover { transform: translateY(-2px); }
.card-img { aspect-ratio: 1 / 1; background: #eef1e8; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.card-img .ph, .card-img .ph-img { width: 100%; height: 100%; object-fit: cover; }
.card-noimg { opacity: .5; }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.card-title { font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { color: var(--muted); font-size: .82rem; }
.empty { padding: 48px 0; text-align: center; color: var(--muted); }
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 28px 0; }
.pager a, .pager strong, .pager span { min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; border-radius: 10px; text-decoration: none; }
.pager a { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.pager strong { background: var(--green); color: #fff; }

/* 글 보기 */
.post-head h1 { margin-bottom: .2em; }
.post-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: .9rem; margin: 0 0 18px; }
.photo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.photo-grid.one { grid-template-columns: minmax(0, 860px); justify-content: center; }
.photo-open { display: block; width: 100%; padding: 0; border: 0; background: #eef1e8; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; }
.photo-open .ph-img { width: 100%; height: auto; display: block; }
.photo-grid:not(.one) .photo-open { aspect-ratio: 4 / 3; }
.photo-grid:not(.one) .photo-open .ph, .photo-grid:not(.one) .photo-open .ph-img { width: 100%; height: 100%; object-fit: cover; }
.photo-cap { margin: 6px 4px 0; font-size: .9rem; color: var(--muted); }
.protect-note { font-size: .8rem; color: var(--muted); text-align: right; margin: 8px 0 0; }
.post-body { background: var(--surface); border-radius: var(--radius); padding: clamp(16px, 3vw, 28px); margin: 20px 0; box-shadow: var(--shadow); line-height: 1.85; }
.post-body img { border-radius: 8px; }
.comments ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.comments li { background: var(--surface); border-radius: 12px; padding: 12px 14px; }
.comments h2 span { color: var(--muted); font-size: .9em; }
.c-meta { margin: 0 0 4px; font-size: .88rem; color: var(--muted); }
.c-meta strong { color: var(--ink); }
.post-nav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin: 28px 0 40px; }
.pn { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--surface); padding: 10px 14px; border-radius: 12px; min-width: 0; }
.pn span { font-size: .8rem; color: var(--muted); }
.pn strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn.next { text-align: right; }
@media (max-width: 600px) {
  .post-nav { grid-template-columns: 1fr 1fr; }
  .post-nav .btn { grid-column: 1 / -1; order: 3; }
}

/* 글 페이지 */
.prose { max-width: 760px; padding-bottom: 40px; }
.prose .lead { font-size: 1.1rem; color: var(--green-2); }
.about-old { background: var(--surface); padding: 16px 18px; border-radius: var(--radius); margin-top: 24px; }
.search-big { display: flex; gap: 8px; margin: 8px 0 16px; }
.search-big input { flex: 1; min-width: 0; min-height: 46px; border: 1px solid var(--line); border-radius: 999px; padding: 0 16px; font: inherit; background: #fff; }

/* 꼬리 */
.site-foot { margin-top: 48px; background: var(--green); color: #e8efe6; }
.foot-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; padding-top: 26px; padding-bottom: 26px; }
.foot-brand { display: flex; gap: 6px; align-items: flex-start; }
.foot-brand img { flex: none; }
.foot-brand p { margin: 0; }
.foot-since { font-weight: 700; letter-spacing: .01em; }
.foot-copy { font-size: .85rem; opacity: .85; }
.foot-actions { display: flex; gap: 16px; align-items: center; }
.foot-actions a { color: #e8efe6; font-size: .9rem; }
.site-foot .btn-primary { background: #fff; color: var(--green); border-color: #fff; }

/* 사진 보호: 진짜 그림은 누를 수 없고, 위에 투명 덮개 */
.ph { position: relative; display: block; line-height: 0; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
/* 화면에만 겹치는 워터마크(사진 파일에는 없음, 2026-11-26 사용자 결정) — 덮개(.ph-shield)보다 아래 */
.ph::after { content: "© 이초 · minpark.co.kr"; position: absolute; right: .7em; bottom: .55em; z-index: 1; line-height: 1.2; font-size: 12px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; color: rgba(255,255,255,.88); text-shadow: 0 0 2px rgba(0,0,0,.75), 0 1px 3px rgba(0,0,0,.6); pointer-events: none; }
html[lang="en"] .ph::after { content: "© Icho · minpark.co.kr"; }
.cat-img .ph::after, .card-img .ph::after { font-size: 10px; right: .6em; bottom: .45em; }
.viewer-ph::after { font-size: clamp(12px, 1.5vw, 17px); right: 1em; bottom: .8em; }
@media print { .ph::after { display: none; } }
.ph-img { pointer-events: none; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; }
.ph-shield { position: absolute; inset: 0; z-index: 2; width: 100% !important; height: 100% !important; opacity: 0; -webkit-user-drag: none; -webkit-touch-callout: none; user-select: none; }
.protect-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; background: rgba(36,48,42,.92); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: .9rem; max-width: calc(100% - 32px); text-align: center; }

/* 모달 공통 */
.modal { position: fixed; inset: 0; z-index: 70; background: rgba(20,28,24,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal[hidden], .viewer[hidden] { display: none; }
.modal-box { position: relative; width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow: auto; background: var(--surface); border-radius: 18px; padding: 22px 22px 18px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-x { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--muted); }
.inq-modal h2 { margin: 0 0 2px; }
.inq-lead { margin: 0 0 12px; color: var(--muted); font-size: .9rem; }
#inq-form label { display: block; margin-bottom: 10px; }
#inq-form label > span { display: block; font-size: .85rem; font-weight: 700; margin-bottom: 3px; }
#inq-form input[type=text], #inq-form input[type=email], #inq-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font: inherit; background: #fbfaf6; }
#inq-form textarea { min-height: 120px; resize: vertical; }
.inq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.inq-agree { display: flex !important; gap: 8px; align-items: flex-start; font-size: .82rem; color: var(--muted); }
.inq-agree input { margin-top: 4px; flex: none; }
.inq-status { min-height: 1.4em; margin: 4px 0 8px; font-size: .9rem; }
.inq-status.err { color: #b3261e; }
.inq-status.ok { color: var(--green-2); font-weight: 700; }
.inq-send { width: 100%; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 600px) {
  /* 모바일: 한 화면에 다 들어오게 */
  .modal { padding: 0; align-items: stretch; }
  .modal-box { width: 100%; max-height: none; height: 100dvh; border-radius: 0; padding: 14px 16px 12px; display: flex; flex-direction: column; }
  #inq-form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
  .inq-grid { grid-template-columns: 1fr; }
  #inq-form label { margin-bottom: 7px; }
  #inq-form .inq-msg { flex: 1; display: flex; flex-direction: column; min-height: 90px; }
  #inq-form .inq-msg textarea { flex: 1; min-height: 70px; }
  .inq-lead { margin-bottom: 8px; }
}

/* 사진 크게 보기 */
.viewer { position: fixed; inset: 0; z-index: 80; background: #0d110f; color: #fff; display: flex; flex-direction: column; }
.viewer-bar { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 8px 10px; }
.viewer-count { margin-right: auto; padding-left: 8px; font-size: .9rem; opacity: .8; }
.viewer-btn { width: 46px; height: 46px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.viewer-btn:hover { background: rgba(255,255,255,.24); }
.viewer-stage { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; padding: 0 56px; }
.viewer-ph { max-width: 100%; max-height: 100%; display: flex; }
.viewer-ph .ph-img { max-width: 100%; max-height: calc(100dvh - 120px); width: auto; height: auto; object-fit: contain; }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 72px; border: 0; background: rgba(255,255,255,.1); color: #fff; font-size: 40px; cursor: pointer; border-radius: 10px; }
.viewer-nav.prev { left: 6px; } .viewer-nav.next { right: 6px; }
.viewer-nav[hidden] { display: none; }
.viewer-cap { text-align: center; margin: 6px 16px 14px; min-height: 1.4em; opacity: .85; font-size: .92rem; }
@media (max-width: 600px) {
  .viewer-stage { padding: 0; }
  .viewer-nav { width: 40px; height: 60px; background: rgba(0,0,0,.35); }
}
body.no-scroll { overflow: hidden; }
@media print { body { display: none !important; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* 관리자에게만 보이는 비공개 글(11-26) */
.card-private { outline: 2px dashed #b45309; outline-offset: -2px; }
.card-private .card-img { opacity: .55; }
.card-lock { display: inline-block; font-size: .75em; font-weight: 700; color: #fff; background: #b45309; border-radius: 4px; padding: 0 .35em; margin-right: .2em; vertical-align: .1em; }

/* 관리자 로그인 때만 나오는 카드 공개/비공개 버튼·알림(11-26) */
.card { position: relative; }
.card-adm { position: absolute; top: 6px; right: 6px; margin: 0; z-index: 3; }
.card-adm-btn { font: inherit; font-size: 12px; font-weight: 700; line-height: 1; padding: 6px 9px; border-radius: 999px; border: 1px solid #b7d3ad; background: rgba(236,245,232,.95); color: #2f5a1e; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.card-adm-btn:hover { background: #fff; }
.card-adm-btn.is-off { background: #b45309; color: #fff; border-color: #b45309; }
.card-adm-btn:disabled { opacity: .5; cursor: progress; }
.card-private .card-img { opacity: .4; filter: grayscale(.4); }
.adm-toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: #1f2a24; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 200; transition: opacity .2s, transform .2s; box-shadow: 0 6px 20px rgba(0,0,0,.25); max-width: 92vw; }
.adm-toast.show { opacity: 1; transform: translate(-50%, 0); }
.adm-toast.bad { background: #b3261e; }
/* 관리자에게만 보이는 비공개 분류(11-26) */
.cat-card.cat-private { outline: 2px dashed #b45309; outline-offset: -2px; }
.cat-card.cat-private .cat-img { opacity: .45; filter: grayscale(.4); }
.chips a.cat-private { border-style: dashed; color: #8a4b0b; }

/* 사진 신고(여름 등 숨김 분류, 11-26) — 아주 작게 */
.ph-report { display: block; margin: 2px 4px 0 auto; padding: 2px 4px; border: 0; background: none; font: inherit; font-size: .68rem; line-height: 1.2; color: var(--muted); opacity: .7; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; min-height: 24px; }
.ph-report:hover, .ph-report:focus-visible { opacity: 1; color: #b3261e; }
.ph-hidden { display: block; aspect-ratio: 4 / 3; background: #eef0ea; }
.rep-modal h2 { margin: 0 0 2px; }
.rep-which { font-weight: 700; color: var(--text, inherit); }
#rep-form label { display: block; margin-bottom: 10px; }
#rep-form label > span { display: block; font-size: .85rem; font-weight: 700; margin-bottom: 3px; }
#rep-form input[type=email], #rep-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font: inherit; background: #fbfaf6; }
#rep-form textarea { min-height: 90px; resize: vertical; }
.rep-reasons { border: 0; padding: 0; margin: 0 0 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.rep-reasons legend { font-size: .85rem; font-weight: 700; margin-bottom: 4px; padding: 0; }
#rep-form .rep-reasons label { display: flex; gap: 6px; align-items: center; margin: 0; min-height: 32px; font-size: .92rem; }
#rep-form .rep-reasons label > span { display: inline; font-weight: 400; margin: 0; font-size: .92rem; }
#rep-form .rep-agree { display: flex !important; }
#rep-form .rep-agree > span { display: inline; font-weight: 400; font-size: .82rem; }
@media (max-width: 600px) {
  #rep-form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
  #rep-form .rep-msg { flex: 1; display: flex; flex-direction: column; min-height: 80px; }
  #rep-form .rep-msg textarea { flex: 1; min-height: 60px; }
}
