/* danang archive — yctour-app 토큰 (Noto Sans KR · ink/paper/sand) */
:root {
  --ink: #111111;
  --paper: #FFFFFF;
  --sand: #F5F5F5;
  --muted: #555555;
  --subtle: #777777;
  --border: #E5E5E5;
  --warn: #B45309;
  --warn-soft: #FEF3C7;
  --touch: 48px;
  --header-h: 56px;
  --tabs-h: 56px;
  --radius: 12px;
  --theme-primary: var(--ink);
  --theme-primary-soft: var(--sand);
  --theme-surface: var(--paper);
  --theme-surface-soft: var(--sand);
  --theme-background: var(--paper);
  --theme-text: var(--ink);
  --theme-text-muted: var(--muted);
  --theme-border: var(--border);
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
}
body {
  margin: 0;
  font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom, 0px));
}
img { max-width: 100%; display: block; }
a { color: inherit; }
input, button, select { font: inherit; min-height: var(--touch); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- header ---------- */
.dn-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: var(--header-h); padding: 0 16px;
  background: var(--paper); border-bottom: 1px solid var(--border);
}
.dn-header--float {
  position: fixed; left: 0; right: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.dn-header__brand { font-weight: 700; text-decoration: none; font-size: 15px; }
.dn-header__nav { display: flex; align-items: center; gap: 4px; }
.dn-header__nav a {
  display: inline-flex; align-items: center; min-height: var(--touch); padding: 0 12px;
  text-decoration: none; font-size: 14px; font-weight: 500; border-radius: 999px;
}
.dn-header__nav a:hover { background: var(--sand); }
.dn-header__lang { display: inline-flex; align-items: center; gap: 2px; margin-left: 4px; }
.dn-header__lang .is-active {
  min-height: 36px; display: inline-flex; align-items: center; padding: 0 10px;
  background: var(--ink); color: var(--paper); border-radius: 999px; font-size: 12px; font-weight: 700;
}
.dn-header__lang a { font-size: 12px; padding: 0 8px; min-height: 36px; }

/* ---------- bottom tabs ---------- */
.dn-bottom-tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; background: var(--paper);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.dn-bottom-tabs a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; min-height: var(--tabs-h); text-decoration: none;
  font-size: 11px; color: var(--muted);
}
.dn-bottom-tabs a.is-active { color: var(--ink); font-weight: 700; }
.dn-bottom-tabs svg { width: 22px; height: 22px; }

/* ---------- home: map + bottom sheet ---------- */
.dn-home { position: relative; min-height: calc(100vh - var(--header-h) - var(--tabs-h)); }
.dn-home__map {
  position: fixed; inset: var(--header-h) 0 var(--tabs-h) 0; z-index: 1;
  background: var(--sand);
}
.dn-home__map-note {
  position: fixed; top: calc(var(--header-h) + 12px); left: 50%; transform: translateX(-50%);
  z-index: 5; background: rgba(255, 255, 255, 0.92); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 14px; font-size: 12px; color: var(--muted);
  pointer-events: none; white-space: nowrap;
}
.dn-sheet {
  position: fixed; left: 0; right: 0; bottom: var(--tabs-h); z-index: 10;
  max-height: 46vh; display: flex; flex-direction: column;
  background: var(--paper); border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
  transition: max-height 0.25s ease;
}
.dn-sheet.is-collapsed { max-height: 64px; overflow: hidden; }
.dn-sheet__handle {
  border: 0; background: transparent; width: 100%; min-height: 28px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.dn-sheet__grip {
  width: 44px; height: 5px; border-radius: 999px; background: var(--border);
}
.dn-sheet__head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 4px 16px 8px;
}
.dn-sheet__head h1 { margin: 0; font-size: 16px; }
.dn-sheet__count { font-size: 12px; color: var(--muted); }
.dn-sheet__regions {
  display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 10px;
  scrollbar-width: none;
}
.dn-sheet__list {
  overflow-y: auto; padding: 0 12px 16px;
  -webkit-overflow-scrolling: touch;
}
.dn-chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--paper);
  font-size: 13px; white-space: nowrap; cursor: pointer;
}
.dn-chip em { font-style: normal; color: var(--subtle); font-size: 11px; }
.dn-chip.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.dn-chip.is-active em { color: rgba(255, 255, 255, 0.7); }

/* ---------- cards ---------- */
.dn-card {
  display: flex; gap: 12px; margin: 8px 0; padding: 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--paper); text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.dn-card:hover { transform: translateY(-2px); border-color: var(--ink); }
.dn-card__thumb {
  width: 88px; height: 88px; object-fit: cover; border-radius: 8px;
  background: var(--sand); flex-shrink: 0;
}
.dn-card__body { min-width: 0; flex: 1; }
.dn-card__title {
  margin: 0 0 4px; font-size: 15px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dn-card__chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.dn-card__summary {
  margin: 4px 0 0; font-size: 12.5px; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dn-card__date { margin: 4px 0 0; font-size: 11px; color: var(--subtle); }
.dn-tag {
  display: inline-flex; align-items: center; padding: 2px 10px;
  border-radius: 999px; background: var(--sand); font-size: 11.5px;
  color: var(--ink); text-decoration: none; border: 1px solid transparent;
}
.dn-tag--warn { background: var(--warn-soft); color: var(--warn); }

/* ---------- generic page blocks ---------- */
.dn-list, .dn-browse, .dn-item, .dn-taxonomy {
  max-width: 1080px; margin: 0 auto; padding: 24px 16px 48px;
}
.dn-list__head { margin-bottom: 20px; }
.dn-list__head h1 { margin: 6px 0 8px; font-size: 26px; letter-spacing: -0.02em; }
.dn-list__desc { margin: 0; color: var(--muted); font-size: 14px; }
.dn-list__count { margin: 8px 0 0; font-size: 12px; color: var(--subtle); }
.dn-eyebrow {
  margin: 0; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--subtle); font-weight: 700;
}
.dn-grid {
  display: grid; gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .dn-grid { grid-template-columns: repeat(2, 1fr); }
  .dn-sheet { max-width: 560px; left: auto; right: 16px; border-radius: 18px; bottom: calc(var(--tabs-h) + 16px); }
}
@media (min-width: 1024px) {
  .dn-grid { grid-template-columns: repeat(3, 1fr); }
}
.dn-block {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--paper); padding: 16px; margin: 16px 0;
}
.dn-block h2 { margin: 0 0 12px; font-size: 16px; }
.dn-block--warn { background: var(--warn-soft); border-color: #FDE68A; }
.dn-block--warn h2 { color: var(--warn); }
.dn-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--touch); padding: 0 20px; border-radius: 999px;
  background: var(--ink); color: var(--paper); text-decoration: none;
  font-size: 14px; font-weight: 600; border: 1px solid var(--ink);
}
.dn-btn--ghost { background: transparent; color: var(--ink); }
.dn-btn.is-active { background: var(--ink); color: var(--paper); }
.dn-note { color: var(--subtle); font-size: 12px; }
.dn-break { word-break: break-all; }

/* ---------- item detail ---------- */
.dn-item__wrap { max-width: 760px; margin: 0 auto; }
.dn-item__title { margin: 8px 0 12px; font-size: 28px; letter-spacing: -0.02em; line-height: 1.3; }
.dn-item__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.dn-item__summary { margin: 0; font-size: 15px; color: var(--ink); }
.dn-item__gmaps { margin: 12px 0 0; }
.dn-item__back { margin: 24px 0; }
.dn-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dn-table th, .dn-table td {
  text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top;
}
.dn-table th { width: 96px; color: var(--muted); font-weight: 500; }
.dn-minimap {
  width: 100%; height: 280px; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border); background: var(--sand);
}
.dn-check-note ul { margin: 0; padding-left: 18px; }
.dn-item__content summary {
  cursor: pointer; font-weight: 600; min-height: var(--touch);
  display: flex; align-items: center;
}
.dn-item__content > *:not(summary) { margin: 12px 0; }
.dn-item__content h2 { font-size: 15px; margin: 16px 0 8px; }
.dn-item__content table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dn-item__content th, .dn-item__content td {
  border: 1px solid var(--border); padding: 6px 8px; text-align: left;
}

/* ---------- browse ---------- */
.dn-browse__map {
  width: 100%; height: 380px; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border); background: var(--sand);
  margin-bottom: 16px;
}
.dn-region__head {
  display: flex; width: 100%; align-items: center; justify-content: space-between;
  border: 1px solid var(--border); background: var(--sand); cursor: pointer;
  padding: 12px 16px; border-radius: var(--radius); margin-bottom: 4px;
  min-height: var(--touch); text-align: left;
}
.dn-region__head:hover { border-color: var(--ink); }
.dn-region__name { display: block; font-size: 18px; font-weight: 700; }
.dn-region__count { display: block; font-size: 12px; color: var(--muted); }
.dn-region__items { margin-top: 8px; }
.dn-region-popup { min-width: 280px; max-width: 320px; }
.dn-region-popup__count { margin: 4px 0 8px; color: var(--muted); font-size: 12px; }
.dn-region-popup__list {
  margin: 0; padding-left: 18px; max-height: 240px; overflow-y: auto;
  font-size: 13px; line-height: 1.55;
}
.leaflet-popup-content { margin: 12px 14px; max-height: 320px; overflow-y: auto; }
.dn-timeline-nav {
  display: flex; align-items: center; gap: 8px; overflow-x: auto;
  padding: 8px 0 16px; scrollbar-width: thin;
}
.dn-timeline__label { margin: 24px 0 12px; font-size: 18px; }
.dn-timeline__label em { font-style: normal; font-size: 12px; color: var(--muted); margin-left: 8px; }
.dn-pagination { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.dn-pagination .dn-btn { min-width: var(--touch); padding: 0 12px; }

/* ---------- search ---------- */
.dn-search-hero {
  position: sticky; top: var(--header-h); z-index: 30;
  background: var(--paper); border-bottom: 1px solid var(--border);
}
.dn-search-sticky { max-width: 1080px; margin: 0 auto; padding: 12px 16px; }
.dn-search-form {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 999px; padding: 0 16px;
  background: var(--sand);
}
.dn-search-form__icon { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; }
.dn-search-form input {
  flex: 1; border: 0; background: transparent; outline: none;
  min-height: var(--touch); font-size: 16px; /* iOS zoom 방지: 16px 이상 */
}
.dn-search-clear {
  border: 0; background: transparent; cursor: pointer; width: var(--touch); height: var(--touch);
  display: inline-flex; align-items: center; justify-content: center;
}
.dn-search-clear svg { width: 18px; height: 18px; }
.dn-search-container {
  max-width: 1080px; margin: 0 auto; padding: 16px;
  display: grid; gap: 20px; grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .dn-search-container { grid-template-columns: 260px minmax(0, 1fr); }
}
.dn-search-filters { font-size: 13px; }
.dn-filter-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.dn-filter-head h1 { margin: 0; font-size: 20px; }
.dn-filter-head button {
  border: 1px solid var(--border); background: var(--paper); border-radius: 999px;
  padding: 0 14px; cursor: pointer; font-size: 12px;
}
.dn-filter-group { margin: 12px 0; }
.dn-filter-group h2 { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.dn-filter-note { color: var(--subtle); font-size: 12px; }
.dn-filter-divider {
  display: flex; align-items: center; gap: 8px; margin: 16px 0 8px;
  color: var(--subtle); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
}
.dn-filter-divider span { white-space: nowrap; }
.dn-check-row {
  display: flex; align-items: center; gap: 8px; min-height: 36px; cursor: pointer;
}
.dn-check-row input { min-height: 20px; width: 18px; height: 18px; }
.dn-check-row span { flex: 1; }
.dn-check-row em { font-style: normal; color: var(--subtle); font-size: 11px; }
.dn-results-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.dn-results-eyebrow { margin: 0 0 6px; font-size: 11px; letter-spacing: 0.18em; color: var(--subtle); }
.dn-chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.dn-filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); background: var(--sand); border-radius: 999px;
  padding: 4px 12px; font-size: 12px; cursor: pointer; min-height: 32px;
}
.dn-view-buttons { display: flex; gap: 6px; }
.dn-view-buttons button {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); background: var(--paper); border-radius: 999px;
  min-height: 40px; padding: 0 12px; font-size: 12px; cursor: pointer;
}
.dn-view-buttons button.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.dn-view-buttons svg { width: 16px; height: 16px; }
.dn-search-status { margin: 12px 0; color: var(--muted); font-size: 13px; }
.dn-result-card {
  display: flex; gap: 12px; align-items: flex-start;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; margin: 10px 0; background: var(--paper);
}
.dn-result-card__body { flex: 1; min-width: 0; text-decoration: none; }
.dn-result-card__body h2 { margin: 0 0 6px; font-size: 16px; }
.dn-result-card__body p { margin: 0; font-size: 13px; color: var(--muted); }
.dn-result-card__thumb img {
  width: 88px; height: 88px; object-fit: cover; border-radius: 8px; background: var(--sand);
}
.dn-result-card__thumb { flex-shrink: 0; }
.dn-result-card.has-no-image .dn-result-card__thumb { opacity: 0.35; }
.dn-result-card__meta {
  display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--subtle);
  min-width: 110px; text-align: right;
}
.dn-result-list.is-thumbnail-view {
  display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.dn-result-list.is-thumbnail-view .dn-result-card {
  flex-direction: column; align-items: stretch;
}
.dn-result-list.is-thumbnail-view .dn-result-card__thumb img {
  width: 100%; height: 140px;
}
.dn-result-list.is-thumbnail-view .dn-result-card__meta {
  flex-direction: row; justify-content: space-between; text-align: left;
}

/* ---------- taxonomy ---------- */
.dn-term-grid {
  display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.dn-term-card {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 16px;
  text-decoration: none; background: var(--paper);
}
.dn-term-card strong { display: block; font-size: 16px; margin-bottom: 6px; }
.dn-term-card em { font-style: normal; color: var(--muted); font-size: 12px; }

/* ---------- footer ---------- */
.dn-footer {
  background: var(--ink); color: var(--paper);
  padding: 28px 16px calc(var(--tabs-h) + 24px);
  margin-top: 32px;
}
.dn-footer__note { margin: 0 0 8px; font-size: 12.5px; color: rgba(246, 246, 246, 0.78); }
.dn-footer__meta { margin: 0; font-size: 12px; color: rgba(246, 246, 246, 0.6); }
.dn-footer a { color: var(--paper); }

/* ---------- collect cards (수집 카드) ---------- */
.dn-cards {
  max-width: 1080px; margin: 0 auto; padding: 24px 16px 48px;
}
.dn-cards__message {
  margin: 8px 0 12px; font-size: 16px; font-weight: 700;
  line-height: 1.5; letter-spacing: -0.01em; color: var(--ink);
}
.dn-cards__grid {
  display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 8px;
}
.dn-cards__carousel {
  display: flex; gap: 16px; margin-top: 8px; padding: 4px 2px 16px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.dn-cards__carousel > .dn-collect-card {
  flex: 0 0 auto; width: min(240px, 72vw); scroll-snap-align: start;
}
.dn-collect-card {
  border: 1px solid var(--border); border-radius: 16px; background: var(--paper);
  overflow: hidden; box-shadow: 0 6px 18px rgba(17, 17, 17, 0.08);
}
.dn-collect-card__media { display: block; }
.dn-collect-card__media img,
.dn-collect-card__img {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover;
}
.dn-collect-card__body { padding: 12px 14px 16px; }
.dn-collect-card__title { margin: 0 0 10px; font-size: 15px; line-height: 1.4; }
.dn-collect-card__desc { margin-top: 12px; font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.dn-collect-card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.dn-collect-card--single { max-width: 560px; margin: 0 auto; }
.dn-btn--primary { background: var(--ink); color: var(--paper); }
.dn-btn--sm { min-height: 44px; padding: 0 16px; font-size: 13px; }
.dn-link { display: inline-block; margin-top: 10px; font-size: 13px; color: var(--muted); text-decoration: underline; }
.dn-sheet__collect { margin: 12px 0 16px; padding: 12px 0 4px; border-top: 1px solid var(--border); }
.dn-collect-row { display: flex; gap: 12px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: thin; }
.dn-collect-card--mini { flex: 0 0 auto; width: min(210px, 62vw); }
.dn-collect-card--mini .dn-collect-card__body { padding: 10px; display: flex; justify-content: center; }
@media (min-width: 720px) {
  .dn-cards__grid { grid-template-columns: 1fr 1fr; }
  .dn-cards__message { font-size: 18px; }
  .dn-collect-card--mini { width: 220px; }
}
@media (min-width: 1100px) {
  /* 웹: 한 줄에 4개 노출 */
  .dn-cards__carousel { overflow-x: visible; }
  .dn-cards__carousel > .dn-collect-card {
    width: calc((100% - 48px) / 4);
  }
}
