/* LumenSea - global design system (light theme) */
:root {
  --bg: #f5f8f5;
  --surface: #ffffff;
  --ink: #071b2b;
  --muted: #586f73;
  --line: #dce8e4;
  --accent: #0d8078;
  --accent-2: #075a66;
  --sea: #21c7b7;
  --coral: #e35e4c;
  --gold: #b56a18;
  --danger: #b91c1c;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(7, 27, 43, 0.05), 0 12px 32px rgba(7, 27, 43, 0.09);
  --shadow-sm: 0 1px 2px rgba(7, 27, 43, 0.07);
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif;
}
* { box-sizing: border-box; }
/* 전역 smooth를 쓰지 않는다. 페이지 이동 시 화면이 통째로 굴러 올라가 보이기 때문.
   목차 클릭처럼 의도한 문서 내 이동에만 scrollIntoView({behavior:'smooth'})를 명시적으로 쓴다. */
html { scroll-behavior: auto; }
/* sticky 헤더(66px) 아래로 앵커가 숨지 않게 한다. */
[id] { scroll-margin-top: 84px; }
body {
  margin: 0;
  transition: background 240ms ease;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.access-gated { overflow: hidden; }
img { display: block; }
a { color: var(--accent-2); text-decoration: none; cursor: pointer; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 8px; letter-spacing: -0.015em; }
h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.container { max-width: 1440px; margin: 0 auto; padding: 0 22px; }

/* top navigation */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topnav-inner { display: flex; align-items: center; gap: 20px; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 39px; height: 39px; flex: none; object-fit: contain; }
.brand-copy { display: flex; flex-direction: column; line-height: 1; gap: 4px; }
.brand-copy strong { font-family: Avenir Next, Avenir, var(--font); font-size: 18px; font-weight: 750; letter-spacing: -.025em; }
.brand-copy small { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .13em; }
.topnav-links { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.topnav-links::-webkit-scrollbar { display: none; }
.navlink {
  padding: 7px 12px; border-radius: 999px; color: var(--muted); font-weight: 600; white-space: nowrap; font-size: 14px;
  transition: background 160ms ease, color 160ms ease;
}
.navlink:hover { background: #edf6f2; color: var(--ink); text-decoration: none; }
.navlink-active { background: #dcf2eb; color: var(--accent); }
.mode-pill {
  font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap;
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; background: var(--surface);
}
.mode-pill b { color: var(--accent); }

/* primitives */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.btn {
  white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 10px; padding: 8px 14px; font-size: 14px; font-weight: 650; font-family: var(--font);
  cursor: pointer; transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, border-color 140ms ease;
}
.btn:hover { border-color: #bfd7d0; box-shadow: var(--shadow-sm); background: #fbfdfc; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; box-shadow: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #096f68; border-color: #096f68; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: #edf6f2; color: var(--ink); border-color: transparent; box-shadow: none; }
.input, .select, textarea.input {
  font-family: var(--font); font-size: 14px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px;
  outline: none; transition: border-color 140ms ease, box-shadow 140ms ease; width: 100%;
}
.input:focus, .select:focus, textarea.input:focus { border-color: var(--sea); box-shadow: 0 0 0 3px rgba(33, 199, 183, 0.17); }
.btn:focus-visible, .chip:focus-visible, .navlink:focus-visible, .pcard-imgwrap:focus-visible, .star:focus-visible, .favbtn:focus-visible, a:focus-visible {
  outline: 3px solid rgba(33, 199, 183, 0.72); outline-offset: 2px;
}
.select { width: auto; cursor: pointer; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 999px; padding: 4px 11px; font-size: 12.5px; font-weight: 600; font-family: var(--font);
  cursor: pointer; transition: all 140ms ease; line-height: 1.4;
}
.chip:hover { border-color: var(--sea); color: var(--accent); }
.chip-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip-active:hover { color: #fff; }
.chip-count { font-size: 10.5px; font-weight: 700; opacity: 0.65; }
.badge {
  display: inline-flex; align-items: center; border-radius: 7px; padding: 2px 8px;
  font-size: 11.5px; font-weight: 750; background: #eef4f8; color: var(--muted); white-space: nowrap;
}
.badge-first { background: #dcf2eb; color: var(--accent); }
.badge-gold { background: #fdf1e3; color: var(--gold); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 34px 0 14px; flex-wrap: wrap; }
.section-title { font-size: 19px; font-weight: 750; margin: 0; }
.section-desc { color: var(--muted); font-size: 13.5px; margin: 3px 0 0; }

/* photo grid (masonry via columns) */
.grid-photos { columns: 4 300px; column-gap: 14px; }
.gp-item { break-inside: avoid; margin: 0 0 14px; }

/* photo card */
.pcard { position: relative; margin: 0; }
.pcard-imgwrap {
  position: relative; display: block; overflow: hidden; border-radius: var(--radius);
  background: #e9f1f6; border: 1px solid var(--line);
  transition: transform 170ms ease, box-shadow 170ms ease;
}
.pcard-imgwrap:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pcard-imgwrap img { width: 100%; height: 100%; object-fit: cover; }
.pcard-badge {
  position: absolute; top: 8px; left: 8px; background: rgba(10, 30, 48, 0.72); color: #fff;
  font-size: 11px; font-weight: 750; border-radius: 7px; padding: 2px 7px; backdrop-filter: blur(4px);
}
.pcard-hoveract { position: absolute; top: 6px; right: 6px; opacity: 0; transition: opacity 150ms ease; }
.pcard:hover .pcard-hoveract, .pcard-hoveract:focus-within { opacity: 1; }
.pcard-hoveract .favbtn-on { opacity: 1; }
.pcard-imgwrap .favbtn-on { opacity: 1 !important; }
.pcard-favdot { position: absolute; top: 8px; right: 10px; color: #ff5d73; font-size: 15px; text-shadow: 0 1px 3px rgba(0,0,0,.35); }
.pcard-meta { padding: 8px 4px 2px; }
.pcard-line1 { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.pcard-title { font-weight: 700; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard-line2 { display: flex; align-items: baseline; gap: 8px; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: 1px; }
.pcard-ph { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pcard-year { flex: none; max-width: 62%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard-line3 { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.pcard-notedot { font-size: 11px; color: var(--accent); font-weight: 700; background: #e3f1f5; border-radius: 6px; padding: 1px 6px; }

/* stars */
.stars { display: inline-flex; gap: 1px; }
.star {
  border: none; background: none; padding: 0 1px; cursor: pointer; color: #cfdde7; font-size: 17px; line-height: 1;
  transition: color 120ms ease, transform 120ms ease; font-family: var(--font);
}
.star:hover { transform: scale(1.15); }
.star-on { color: #f5a623; }
.star:disabled { cursor: default; transform: none; }
.stars-sm .star { font-size: 14px; }
.stars-lg .star { font-size: 26px; padding: 0 2px; }

/* fav */
.favbtn {
  display: inline-flex; align-items: center; justify-content: center;
  border: none; background: rgba(255, 255, 255, 0.92); border-radius: 999px; cursor: pointer;
  width: 30px; height: 30px; box-shadow: var(--shadow-sm); transition: transform 130ms ease, background 130ms ease;
  padding: 0;
}
.favbtn svg { width: 16px; height: 16px; fill: none; stroke: #7d93a6; stroke-width: 2; transition: all 130ms ease; }
.favbtn:hover { transform: scale(1.08); }
.favbtn-on svg { fill: #ff5d73; stroke: #ff5d73; }
.favbtn-lg { width: 38px; height: 38px; background: #f2f7fa; box-shadow: none; border: 1px solid var(--line); }
.favbtn-lg svg { width: 19px; height: 19px; }

.access-gate {
  min-height: 100dvh; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
  background: radial-gradient(circle at 50% 5%, #d7f1ea 0, var(--bg) 46%);
}
.access-card { width: min(100%, 420px); padding: 34px; background: rgba(255, 255, 255, .94); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.access-logo { width: 58px; height: 58px; object-fit: contain; margin-bottom: 18px; }
.access-card h1 { font-family: Avenir Next, Avenir, var(--font); font-size: 30px; letter-spacing: -.035em; }
.access-lead { color: var(--muted); margin-bottom: 24px; }
.access-form { display: grid; gap: 9px; }
.access-form label { font-size: 13px; font-weight: 750; }
.access-form .input, .access-form .btn { min-height: 48px; font-size: 16px; }
.access-error { min-height: 24px; margin: 7px 0 0; color: var(--danger); font-size: 13px; font-weight: 650; }
.access-note { margin: 2px 0 0; color: var(--muted); font-size: 12px; }

/* empty & spinner */
.empty { text-align: center; padding: 60px 20px; color: var(--ink); }
.empty-wave { color: var(--sea); font-weight: 700; letter-spacing: 4px; margin-bottom: 10px; }
.empty h3 { font-size: 17px; }
.spinner { display: flex; align-items: center; gap: 9px; color: var(--muted); padding: 26px 4px; font-weight: 600; }
.spinner-dot {
  width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid #cfe3ec; border-top-color: var(--accent);
  animation: uwspin 0.8s linear infinite;
}
@keyframes uwspin { to { transform: rotate(360deg); } }

/* page transition */
.page { animation: pagein 220ms ease; padding-bottom: 70px; }
@keyframes pagein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.site-footer { border-top: 1px solid var(--line); padding: 22px 0 34px; margin-top: 30px; color: var(--muted); font-size: 12.5px; }
@media (max-width: 700px) {
  .container { padding: 0 14px; }
  [id] { scroll-margin-top: 108px; }
  .topnav-inner { height: auto; min-height: 92px; gap: 0 10px; flex-wrap: wrap; padding-top: env(safe-area-inset-top); }
  .brand { height: 49px; }
  .brand { gap: 7px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-copy small { display: none; }
  .brand-copy strong { font-size: 16px; }
  .topnav-links { order: 3; flex: none; width: 100%; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; border-top: 1px solid var(--line); }
  .navlink { min-width: 0; min-height: 44px; display: grid; place-items: center; padding: 6px 2px; border-radius: 0; font-size: 12px; letter-spacing: -.03em; }
  .navlink-active { box-shadow: inset 0 -3px var(--accent); background: transparent; }
  .mode-pill { display: none; }
  .grid-photos { columns: 2 160px; column-gap: 10px; }
  .gp-item { margin-bottom: 10px; }
  .pcard-hoveract { top: 3px; right: 3px; opacity: 1; }
  .pcard-hoveract .favbtn { width: 44px; height: 44px; }
  .favbtn-lg { min-width: 44px; height: 44px; }
  .stars-lg .star { min-width: 44px; min-height: 44px; }
  .btn, .select { min-height: 44px; }
  .access-card { padding: 26px 22px; border-radius: 16px; }
}

/* ============================================================
   사진 상세 전용 다크 모드 (body.dark-detail)
   사진이 돋보이도록 토큰을 어둡게 오버라이드한다.
   ============================================================ */
body.dark-detail {
  --bg: #06151f;
  --surface: #0b2028;
  --ink: #effbf8;
  --muted: #92aaa8;
  --line: #173840;
  --accent: #42d6c4;
  --accent-2: #7bdccf;
  --sea: #42d6c4;
  --coral: #ff735e;
  --gold: #e7ad56;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 30px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45);
}
body.dark-detail .topnav { background: rgba(6, 21, 31, 0.88); border-bottom-color: var(--line); }
body.dark-detail .navlink:hover { background: #16283c; color: var(--ink); }
body.dark-detail .navlink-active { background: #123043; color: var(--accent); }
body.dark-detail .mode-pill { background: var(--surface); border-color: var(--line); }
body.dark-detail .btn { background: #142638; border-color: #27405a; color: var(--ink); }
body.dark-detail .btn:hover { background: #1a3049; border-color: #345173; }
body.dark-detail .btn-primary { background: var(--accent); border-color: var(--accent); color: #03222b; }
body.dark-detail .btn-primary:hover { background: #58cbdf; border-color: #58cbdf; }
body.dark-detail .btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
body.dark-detail .btn-ghost:hover { background: #16283c; color: var(--ink); }
body.dark-detail .input, body.dark-detail .select, body.dark-detail textarea.input { background: #0c1826; border-color: #27405a; color: var(--ink); }
body.dark-detail .input:focus, body.dark-detail textarea.input:focus { border-color: var(--sea); box-shadow: 0 0 0 3px rgba(63, 189, 212, 0.18); }
body.dark-detail .input::placeholder, body.dark-detail textarea.input::placeholder { color: #5d768c; }
body.dark-detail .chip { background: #142638; border-color: #27405a; color: #d6e5f0; }
body.dark-detail .chip:hover { border-color: var(--sea); color: var(--accent); }
body.dark-detail .chip-active { background: var(--accent); border-color: var(--accent); color: #03222b; }
body.dark-detail .badge { background: #16283c; color: #a3b9cb; }
body.dark-detail .badge-first { background: #113347; color: #58cbdf; }
body.dark-detail .badge-gold { background: #322309; color: var(--gold); }
body.dark-detail .star { color: #2d4258; }
body.dark-detail .star-on { color: #f5b942; }
body.dark-detail .favbtn { background: rgba(20, 38, 56, 0.92); }
body.dark-detail .favbtn svg { stroke: #9db4c6; }
body.dark-detail .favbtn-on svg { fill: #ff5d73; stroke: #ff5d73; }
body.dark-detail .favbtn-lg { background: #142638; border-color: #27405a; }
body.dark-detail .pcard-imgwrap { background: #0c1826; border-color: #1c3044; }
body.dark-detail .pcard-badge { background: rgba(2, 8, 14, 0.78); }
body.dark-detail .site-footer { border-top-color: var(--line); }
body.dark-detail ::selection { background: rgba(66, 214, 196, 0.35); }
