@font-face { font-family: "Paperlogy"; src: url("fonts/paperlogy-8.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Paperlogy"; src: url("fonts/paperlogy-6.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --bg: #f4f1ea;
  --paper: #fbf9f4;
  --card: #ffffff;
  --ink: #1b2622;
  --ink-2: #3c4842;
  --muted: #6f7a74;
  --line: #e4dfd3;
  --line-2: #d6cfbf;
  --brand: #1f5f4f;
  --brand-soft: #e4eee8;
  --accent: #c2652d;
  --life: #c2652d;
  --do: #2f6f9f;
  --mountain: #8a6440;
  --river: #2f6f9f;
  --coast: #18897f;
  --other: #8c5aa5;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(27, 38, 34, .05), 0 10px 30px -12px rgba(27, 38, 34, .22);
  --shadow-lg: 0 30px 80px -20px rgba(10, 20, 16, .55);
  --display: "Paperlogy", "Pretendard Variable", Pretendard, sans-serif;
  --text: "Pretendard Variable", Pretendard, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121614; --paper: #171c19; --card: #1d2320; --ink: #eef1ee; --ink-2: #cdd5d0; --muted: #98a39d;
    --line: #2b332f; --line-2: #39433e; --brand: #6fbfa5; --brand-soft: #1f2e28;
    --accent: #e39a66; --life: #e39a66; --do: #7ab4e4;
    --mountain: #c9a07a; --river: #7ab4e4; --coast: #5fcfc4; --other: #c49ad8;
    --shadow: none; --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .8);
  }
}
:root[data-theme="dark"] {
  --bg: #121614; --paper: #171c19; --card: #1d2320; --ink: #eef1ee; --ink-2: #cdd5d0; --muted: #98a39d;
  --line: #2b332f; --line-2: #39433e; --brand: #6fbfa5; --brand-soft: #1f2e28;
  --accent: #e39a66; --life: #e39a66; --do: #7ab4e4;
  --mountain: #c9a07a; --river: #7ab4e4; --coast: #5fcfc4; --other: #c49ad8;
  --shadow: none; --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .8);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--text); font-size: 17px; line-height: 1.6; word-break: keep-all;
  -webkit-font-smoothing: antialiased; letter-spacing: -0.01em;
}
svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }

/* 머리말 */
.hero {
  position: relative; overflow: hidden; color: #f5f2ea;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='260' viewBox='0 0 520 260'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.09' stroke-width='1.2'%3E%3Cpath d='M-20 200c60-40 110-30 160-60s90-90 170-80 120 60 230 30'/%3E%3Cpath d='M-20 222c70-36 120-24 170-52s95-82 168-72 128 58 222 34'/%3E%3Cpath d='M-20 244c80-30 130-18 180-44s100-74 166-64 136 56 214 38'/%3E%3Cpath d='M-20 178c50-44 100-36 150-68s85-98 172-88 112 62 238 26'/%3E%3Cpath d='M-20 156c40-48 90-42 140-76s80-106 174-96 104 64 246 22'/%3E%3Cpath d='M-20 134c30-52 80-48 130-84s75-114 176-104 96 66 254 18'/%3E%3Cpath d='M300 20c40 0 60 20 60 40s-30 30-60 30-50-14-50-34 20-36 50-36z'/%3E%3Cpath d='M300 36c26 0 40 12 40 24s-18 20-40 20-34-8-34-20 12-24 34-24z'/%3E%3C/g%3E%3C/svg%3E") repeat,
    radial-gradient(1200px 400px at 85% -10%, #2f7a66 0%, transparent 60%),
    linear-gradient(160deg, #1a4f42 0%, #1f5f4f 55%, #23695a 100%);
}
.hero-in { max-width: 1400px; margin: 0 auto; padding: 34px 32px 30px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 22px 32px; }
.kicker { margin: 0 0 6px; font-size: 15px; font-weight: 600; letter-spacing: .02em; color: rgba(245, 242, 234, .72); }
.hero h1 { font-family: var(--display); font-weight: 800; font-size: clamp(34px, 4.6vw, 52px); line-height: 1.12; margin: 0; letter-spacing: -0.02em; }
.br-m { display: none; }
.sub { margin: 10px 0 0; font-size: 17px; color: rgba(245, 242, 234, .82); }
.sub b { color: #fff; font-weight: 700; }
/* 거르기와 찾기 */
.toolbar { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.toolbar-in { max-width: 1400px; margin: 0 auto; padding: 14px 32px; display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: space-between; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); background: var(--card);
  border-radius: 999px; padding: 7px 16px 7px 13px; font-size: 16px; font-weight: 600; min-height: 42px; color: var(--ink-2);
  transition: border-color .15s, background .15s, color .15s;
}
.chip::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--brand)); }
.chip[data-t="산지"] { --c: var(--mountain); } .chip[data-t="하천"] { --c: var(--river); } .chip[data-t="해안"] { --c: var(--coast); } .chip[data-t="그 밖"] { --c: var(--other); }
.chip:hover { border-color: var(--c, var(--brand)); }
.chip[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip[aria-selected="true"]::before { background: var(--paper); }
.chip .n { font-size: 13px; font-weight: 700; opacity: .55; font-variant-numeric: tabular-nums; }
.search { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line-2); border-radius: 999px; padding: 0 18px; min-height: 46px; color: var(--muted); transition: border-color .15s, box-shadow .15s; }
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
.search input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; color: var(--ink); width: 300px; max-width: 56vw; padding: 9px 0; }

/* 카드 목록 */
.grid { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; padding: 26px 32px 40px; }
.tile {
  position: relative; display: block; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4 / 5; background: #2a2f2c; text-align: left; box-shadow: var(--shadow);
  transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s;
}
.tile .pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 38%, rgba(8, 14, 11, .2) 58%, rgba(8, 14, 11, .82) 100%); }
.tile:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(0, 0, 0, .06), 0 22px 40px -16px rgba(27, 38, 34, .45); }
.tile:hover .pic { transform: scale(1.05); }
.tile .tag { position: absolute; top: 14px; left: 14px; z-index: 1; }
.tile .body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 18px 18px 17px; color: #fff; }
.tile .nm { display: block; font-family: var(--display); font-weight: 800; font-size: 25px; line-height: 1.2; letter-spacing: -0.02em; text-shadow: 0 1px 12px rgba(0, 0, 0, .3); }
.tile .ct { display: flex; align-items: center; gap: 6px; margin-top: 5px; font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, .86); }
.tile .ct svg { width: 14px; height: 14px; }
.tag {
  display: inline-flex; align-items: center; font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: .02em;
  padding: 4px 10px 3px; border-radius: 8px; color: #fff; background: var(--other);
}
.tag.산지 { background: var(--mountain); } .tag.하천 { background: var(--river); } .tag.해안 { background: var(--coast); }
:root[data-theme="dark"] .tag { color: #10140f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag { color: #10140f; } }
.tile .tag { color: #fff !important; background: rgba(12, 18, 15, .45); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .28); }
.empty { grid-column: 1 / -1; color: var(--muted); padding: 60px 0; text-align: center; font-size: 18px; }

.foot { max-width: 1400px; margin: 0 auto; padding: 8px 32px 40px; color: var(--muted); font-size: 14px; }

/* 사례 사진 */
.examples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ex { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.ex-img { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--line); }
.ex-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ex-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(8, 14, 11, .78) 100%); }
.ex-img .lbl { position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: 1; color: #fff; font-weight: 700; font-size: 16px; line-height: 1.3; text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
.ex small { font-size: 11.5px; line-height: 1.35; color: var(--muted); padding: 0 2px; }
.ex small a { color: inherit; }

/* 자세히 */
.detail { position: fixed; inset: 0; z-index: 20; background: rgba(9, 14, 12, .62); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 22px; animation: fade .18s ease-out; }
.detail[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.sheet {
  background: var(--paper); width: min(1440px, 100%); height: min(900px, 100%); border-radius: 26px; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); box-shadow: var(--shadow-lg); animation: rise .24s cubic-bezier(.2, .7, .2, 1);
}
.photo { margin: 0; position: relative; background: #0e110f; min-height: 0; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo::after { content: ""; position: absolute; inset: auto 0 0 0; height: 30%; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .55)); }
.photo figcaption { position: absolute; left: 16px; right: 16px; bottom: 12px; z-index: 1; color: rgba(255, 255, 255, .82); font-size: 12px; line-height: 1.4; }
.photo figcaption a { color: inherit; }
.info { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding: 30px 36px 22px; gap: 16px; scrollbar-width: thin; }
.head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.where { margin: 0 0 6px; color: var(--muted); font-size: 16px; font-weight: 600; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.head h2 { font-family: var(--display); font-weight: 800; font-size: clamp(30px, 3.2vw, 42px); margin: 0; line-height: 1.12; letter-spacing: -0.025em; }
.aka { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.close { flex: none; border: 1px solid var(--line-2); background: var(--card); border-radius: 14px; width: 48px; height: 48px; display: grid; place-items: center; transition: background .15s; }
.close:hover { background: var(--line); }
.padlet { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.padlet .lbl { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.pad-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pad-box { display: inline-flex; align-items: center; gap: 9px; background: var(--paper); border: 1.5px solid var(--brand); border-radius: 999px; padding: 6px 16px 6px 12px; }
.pad-box svg { color: var(--brand); }
.pad-box b { font-size: 18px; color: var(--ink); }
.pad-arrow { color: var(--muted); }
.padlet .pick { font-size: 17px; font-weight: 800; color: var(--brand); }
.padlet .pnote { font-size: 14px; color: var(--muted); line-height: 1.5; }
.padlet .pnote:empty { display: none; }
.words { display: flex; gap: 8px; flex-wrap: wrap; }
.words span { background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 15px; padding: 4px 12px; border-radius: 999px; }
.sec-title { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 20px; margin: 8px 0 -4px; letter-spacing: -0.01em; }
.sec-head { margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.sec-head .sec-title { margin: 0; }
.sec-head .num { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 18px; color: #fff; background: var(--life); }
.sec-head.do .num { background: var(--do); }
.sec-head p { margin: 4px 0 0 40px; color: var(--muted); font-size: 15px; }
.tip { margin: 2px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); font-size: 15px; font-weight: 600; }
.facts { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr; gap: 8px; }
.facts li { padding: 12px 16px 12px 36px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); position: relative; font-size: 17px; line-height: 1.6; }
.facts li::before { content: ""; position: absolute; left: 16px; top: 23px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.nav { display: flex; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.nav button { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--card); border-radius: 12px; padding: 9px 16px; min-height: 46px; font-weight: 700; max-width: 48%; }
.nav button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.nav button:disabled { opacity: .35; cursor: default; }

@media (max-width: 860px) {
  body { font-size: 16px; }
  .hero-in { padding: 24px 16px 20px; }
  .br-m { display: inline; }
  .toolbar-in { padding: 12px 16px; }
  .search, .chips { width: 100%; }
  .search input { width: 100%; max-width: none; }
  .grid { padding: 16px 16px 28px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tile .nm { font-size: 19px; }
  .tile .body { padding: 12px; }
  .foot { padding: 8px 16px 32px; }
  .detail { padding: 0; }
  .sheet { grid-template-columns: 1fr; grid-template-rows: 34vh minmax(0, 1fr); height: 100%; border-radius: 0; }
  .info { padding: 18px 16px 16px; gap: 14px; }
  .examples { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
