/* 업적 기록 사이트 공통 스타일 — 검은 바탕 + 붉은 용비늘 + 금색 포인트 */
:root {
  --bg: #0B0809;
  --panel: #141012;
  --field: #0F0C0D;
  --shot: #241C1E;
  --line: #4A3A22;
  --line-gold: #6B5428;
  --line-soft: #3A2E1E;
  --text: #F1E8DC;
  --text-2: #DED3C6;
  --sub: #B9AC9F;
  --muted: #6F655D;
  --gold: #D4AF5A;
  --gold-soft: #E3C27A;
  --gold-dim: #8C6E33;
  --on-gold: #140A06;
  --danger: #F08A8E;
  --scale: #9A1722;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Gowun Batang', serif;
  min-height: 100vh;
}
a { color: var(--gold-soft); }
a:hover { color: #F3DCA3; }
button, input, select, textarea { font: inherit; color: inherit; }

/* 배경: 용비늘 + 가운데 어둡게 */
.backdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.backdrop svg { width: 100%; height: 100%; display: block; }
.page { position: relative; z-index: 1; padding-bottom: 64px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* 머리말 */
.top { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end; justify-content: space-between; padding-top: 44px; padding-bottom: 28px; }
.brand { display: flex; flex-direction: column; gap: 6px; }
.eyebrow { font-family: 'Cinzel', serif; font-size: 13px; font-weight: 600; letter-spacing: 0.32em; color: var(--gold); }
.site-title { font-family: 'Song Myung', serif; font-size: 42px; line-height: 1.1; margin: 0; font-weight: 400; }
.site-sub { font-size: 14px; color: var(--sub); }
.stats { display: flex; flex-wrap: wrap; gap: 20px 28px; font-size: 13px; color: var(--sub); align-items: baseline; }
.stats b { font-family: 'Cinzel', serif; color: var(--gold); font-size: 22px; font-weight: 600; margin-left: 4px; }

.ornament { display: flex; align-items: center; gap: 0; margin-bottom: 36px; }
.ornament .flourish { flex: 0 0 auto; display: block; max-width: 60vw; height: auto; }
.foot-orn { margin-top: 64px; margin-bottom: 0; }
.ornament i { flex: 1; height: 1px; background: var(--line-gold); }
.ornament b { width: 9px; height: 9px; transform: rotate(45deg); border: 1px solid var(--gold); }
.ornament b.full { width: 11px; height: 11px; background: var(--gold); border: 0; }

main.wrap { display: flex; flex-direction: column; gap: 44px; }

/* 최근 기록 */
.featured { display: flex; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line-gold); border-radius: 6px; overflow: hidden; }
.featured .shot { flex: 999 1 560px; min-width: 0; aspect-ratio: 16 / 9; }
.featured { position: relative; }
.featured .body { flex: 1 1 320px; padding: 40px 36px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.corner { position: absolute; width: 48px; height: 48px; pointer-events: none; z-index: 2; }
.corner.tl { left: 6px; top: 6px; } .corner.tr { right: 6px; top: 6px; transform: scaleX(-1); }
.corner.bl { left: 6px; bottom: 6px; transform: scaleY(-1); } .corner.br { right: 6px; bottom: 6px; transform: scale(-1, -1); }
.featured h2 { margin: 0; font-family: 'Song Myung', serif; font-weight: 400; font-size: 32px; line-height: 1.3; }
.featured .content { font-size: 15px; }
.label { font-family: 'Cinzel', serif; font-size: 12px; font-weight: 700; letter-spacing: 0.24em; color: var(--gold); }

/* 상단 슬라이드 */
.slider { display: flex; flex-direction: column; gap: 14px; }
.slider .featured[hidden] { display: none; }
.slide-nav { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.slide-nav[hidden] { display: none; }
.nav-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 3px; border: 1px solid var(--line); background: var(--panel); color: var(--gold-soft); cursor: pointer; }
.nav-btn:focus-visible, .dot:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 2px; }
.dots { display: flex; gap: 4px; }
.dot { width: 28px; height: 44px; border: 0; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.dot::before { content: ''; width: 9px; height: 9px; transform: rotate(45deg); border: 1px solid var(--gold); }
.dot[aria-current="true"]::before { background: var(--gold); }

.more-wrap { display: flex; justify-content: center; }

/* 목록: 제목·이미지 누르면 상세 페이지로 */
.title-link { color: inherit; text-decoration: none; }
.title-link:hover { color: var(--gold-soft); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.title-link:focus-visible, .shot-link:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; }
.shot-link { display: block; color: inherit; text-decoration: none; }
.shot-link img { cursor: pointer; }
.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.read-more { font-size: 13px; color: var(--gold-soft); text-decoration: none; align-self: flex-start; }
.read-more:hover { text-decoration: underline; }

/* 상세 페이지 */
.post { display: flex; flex-direction: column; gap: 28px; max-width: 920px; margin: 0 auto; width: 100%; }
.back { align-self: flex-start; }
.gallery { position: relative; background: var(--panel); border: 1px solid var(--line-gold); border-radius: 6px; overflow: hidden; }
.track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.track::-webkit-scrollbar { display: none; }
.track figure { flex: 0 0 100%; margin: 0; scroll-snap-align: center; aspect-ratio: 16 / 9; background: #070506; display: flex; align-items: center; justify-content: center; }
.track img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; cursor: zoom-in; }
.g-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 3px; border: 1px solid var(--gold-dim); background: rgba(11, 8, 9, 0.8); color: var(--gold-soft); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.g-btn.prev { left: 12px; } .g-btn.next { right: 12px; }
.g-btn:disabled { opacity: 0.35; cursor: default; }
.g-btn:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 2px; }
.g-count { position: absolute; right: 12px; bottom: 12px; background: rgba(11, 8, 9, 0.85); border: 1px solid var(--gold-dim); color: var(--gold-soft); font-family: 'Cinzel', serif; font-size: 12px; letter-spacing: 0.08em; padding: 3px 10px; border-radius: 3px; }
.g-dots { display: flex; justify-content: center; gap: 4px; padding: 6px 0 2px; }
.post-head { display: flex; flex-direction: column; gap: 14px; padding-bottom: 20px; border-bottom: 1px solid var(--line-gold); }
.post-head h1 { margin: 0; font-family: 'Song Myung', serif; font-weight: 400; font-size: 36px; line-height: 1.3; }
.post-body { margin: 0; font-size: 16px; line-height: 1.9; color: var(--text-2); white-space: pre-line; }
.post-memo { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 6px; padding: 20px 24px; display: flex; flex-direction: column; gap: 10px; }
.post-memo p { margin: 0; font-size: 15px; line-height: 1.8; color: var(--text-2); white-space: pre-line; }
.post-nav { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.post-nav a { flex: 1 1 260px; display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); color: var(--text); text-decoration: none; min-width: 0; }
.post-nav a:hover { border-color: var(--gold-dim); }
.post-nav a.next { text-align: right; }
.post-nav small { font-size: 12px; color: var(--sub); }
.post-nav span { font-family: 'Song Myung', serif; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .post-head h1 { font-size: 28px; } .g-btn { width: 40px; height: 40px; } }

.shot { background: var(--shot); display: flex; align-items: center; justify-content: center; color: var(--sub); font-size: 13px; overflow: hidden; position: relative; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.shot .more { position: absolute; right: 10px; bottom: 10px; background: rgba(11, 8, 9, 0.85); border: 1px solid var(--gold-dim); color: var(--gold-soft); font-size: 12px; padding: 2px 8px; border-radius: 3px; }

.meta { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--sub); }
.meta .date { font-family: 'Cinzel', serif; letter-spacing: 0.06em; }
.tag { padding: 1px 9px; border-radius: 3px; border: 1px solid var(--gold-dim); color: var(--gold-soft); }
.content { margin: 0; font-size: 14px; line-height: 1.75; color: var(--text-2); white-space: pre-line; }
.memo { margin: 0; padding-top: 12px; border-top: 1px solid var(--line-soft); font-size: 13px; line-height: 1.6; color: var(--sub); white-space: pre-line; }

/* 검색·필터 */
.filters { display: flex; flex-direction: column; gap: 14px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.field { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; }
.field.search { flex: 1 1 300px; }
.field input, .field select { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; color: var(--text); }
.field select { color-scheme: dark; }
.field .cap { font-size: 13px; color: var(--sub); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 44px; padding: 0 18px; border-radius: 3px; border: 1px solid var(--line); background: var(--panel); color: var(--text-2); font-size: 14px; font-weight: 700; cursor: pointer; }
.chip.on { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.chip:focus-visible, .btn:focus-visible, .field:focus-within { outline: 2px solid var(--gold-soft); outline-offset: 2px; }

/* 월별 목록 */
.month { display: flex; flex-direction: column; gap: 18px; }
.month h3 { margin: 0; display: flex; align-items: center; gap: 14px; font-weight: 400; }
.month h3::before { content: ''; width: 26px; height: 18px; flex: 0 0 auto; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 18'%3E%3Cpath d='M13 2 L17 9 L13 16 L9 9 Z' fill='%23D4AF5A'/%3E%3Cpath d='M8 9 C5 9 3 6 5 4 C6.5 2.6 8.5 4 7.5 5.5 M18 9 C21 9 23 12 21 14 C19.5 15.4 17.5 14 18.5 12.5' fill='none' stroke='%23D4AF5A' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E"); }
.month h3 .name { font-family: 'Song Myung', serif; font-size: 22px; }
.month h3 .count { font-size: 13px; color: var(--sub); }
.month h3::after { content: ''; flex: 1; height: 1px; background: var(--line-gold); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; }
.card .shot { aspect-ratio: 16 / 9; }
.card .body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 9px; }
.card h4 { margin: 0; font-family: 'Song Myung', serif; font-weight: 400; font-size: 20px; line-height: 1.35; }
.card .memo { padding-top: 10px; }

.empty { text-align: center; color: var(--sub); padding: 64px 0; font-size: 15px; }

footer.wrap { margin-top: 16px; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--sub); }
footer .en { font-family: 'Cinzel', serif; letter-spacing: 0.2em; color: var(--gold); }

/* 크게 보기 */
.lightbox { position: fixed; inset: 0; background: rgba(5, 3, 4, 0.94); display: none; align-items: center; justify-content: center; z-index: 10; padding: 16px; cursor: zoom-out; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 4px; }

/* 버튼 */
.btn { height: 48px; padding: 0 24px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 3px; border: 1px solid var(--line); background: var(--panel); color: var(--text-2); font-size: 15px; text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--gold); border-color: var(--gold); color: var(--on-gold); font-weight: 700; }
.btn.primary:disabled { opacity: 0.6; cursor: wait; }
.btn.small { height: 40px; padding: 0 14px; font-size: 13px; }
.btn.danger { color: var(--danger); border-color: #5E2128; background: transparent; }

@media (max-width: 560px) {
  .site-title { font-size: 34px; }
  .featured .body { padding: 28px 28px 56px; }
  .featured h2 { font-size: 26px; }
}

/* 목록 카드 안 작은 사진 슬라이드 */
.shot.mini { display: block; }
.mini-track { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.mini-track::-webkit-scrollbar { display: none; }
.mini-track a { flex: 0 0 100%; height: 100%; scroll-snap-align: center; display: block; }
.mini-track img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.featured .shot.mini { aspect-ratio: 16 / 9; }
.mini-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 3px; border: 1px solid var(--gold-dim); background: rgba(11, 8, 9, 0.8); color: var(--gold-soft); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; z-index: 1; }
.mini-btn.prev { left: 8px; } .mini-btn.next { right: 8px; }
.mini-btn:disabled { opacity: 0; pointer-events: none; }
.mini-btn:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 2px; }
.mini-count { font-family: 'Cinzel', serif; letter-spacing: 0.06em; }
.write-btn { height: 44px; }

/* 게시글 보기 */
.post2 { max-width: 1000px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 20px; }
.crumb-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--sub); }
.crumb a { color: var(--sub); text-decoration: none; }
.crumb a:hover { color: var(--gold-soft); }
.crumb .here { color: var(--gold-soft); }
.stage-wrap { display: flex; flex-direction: column; gap: 10px; }
.stage { position: relative; height: clamp(220px, 46vh, 500px); background: #070506; border: 1px solid var(--line-gold); border-radius: 6px; overflow: hidden; }
.stage .track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.stage .track::-webkit-scrollbar { display: none; }
.stage figure { flex: 0 0 100%; height: 100%; margin: 0; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; aspect-ratio: auto; background: transparent; }
.stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; cursor: zoom-in; }
.thumbs-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.thumb-btn { flex: 0 0 auto; width: 80px; height: 45px; padding: 0; border-radius: 4px; border: 2px solid transparent; background: var(--shot); cursor: pointer; overflow: hidden; opacity: 0.55; }
.thumb-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-btn[aria-current="true"] { border-color: var(--gold); opacity: 1; }
.thumb-btn:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 2px; }
.board { position: relative; background: var(--panel); border: 1px solid var(--line-gold); border-radius: 6px; padding: 40px 44px 44px; display: flex; flex-direction: column; }
.board-head { display: flex; flex-direction: column; gap: 12px; padding-bottom: 18px; border-bottom: 2px solid var(--gold); }
.board-head .tag { align-self: flex-start; font-size: 13px; padding: 2px 10px; }
.board-head h1 { margin: 0; font-family: 'Song Myung', serif; font-weight: 400; font-size: 32px; line-height: 1.3; }
.board-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 0; padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.board-meta div { display: flex; gap: 8px; padding-right: 18px; margin-right: 18px; border-right: 1px solid var(--line-soft); }
.board-meta div:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.board-meta dt { color: var(--sub); }
.board-meta dd { margin: 0; color: var(--text); }
.board-meta .date { font-family: 'Cinzel', serif; letter-spacing: 0.06em; }
.board-body { padding: 28px 0 8px; font-size: 16px; line-height: 1.9; color: var(--text-2); white-space: pre-line; }
.board-memo { margin-top: 24px; padding: 18px 22px; background: var(--field); border: 1px solid var(--line-soft); border-radius: 4px; display: flex; flex-direction: column; gap: 8px; }
.board-memo .label { display: flex; align-items: center; gap: 8px; }
.board-memo p { margin: 0; font-size: 15px; line-height: 1.8; color: var(--text-2); white-space: pre-line; }
.board-nav { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; display: flex; flex-direction: column; }
.board-nav a, .board-nav .none { display: flex; align-items: center; gap: 16px; min-height: 56px; padding: 0 22px; color: var(--text); text-decoration: none; }
.board-nav > * + * { border-top: 1px solid var(--line-soft); }
.board-nav a:hover .t { color: var(--gold-soft); }
.board-nav .k { flex: 0 0 72px; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--sub); }
.board-nav .t { flex: 1; min-width: 0; font-family: 'Song Myung', serif; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-nav .none .t { color: var(--muted); font-family: inherit; font-size: 14px; }
.board-nav .d { flex: 0 0 auto; font-family: 'Cinzel', serif; font-size: 12px; letter-spacing: 0.06em; color: var(--sub); }
.center-row { display: flex; justify-content: center; }
@media (max-width: 560px) {
  .board { padding: 36px 22px 40px; }
  .board-head h1 { font-size: 26px; }
  .board-nav .d { display: none; }
  .stage { height: clamp(200px, 36vh, 340px); }
}
