/* ------------------------------------------------------------
   chiango · 서브 페이지 공통 (내비 활성, 페이지 헤더, 폼, 문서, 카드 리스트)
   ------------------------------------------------------------ */

/* ---------- 내비 활성 표시 ---------- */
body[data-page="destinations"] .nav-links a[data-nav="destinations"],
body[data-page="destination"] .nav-links a[data-nav="destinations"],
body[data-page="community"] .nav-links a[data-nav="community"],
body[data-page="styles"] .nav-links a[data-nav="styles"],
body[data-page="magazine"] .nav-links a[data-nav="magazine"] { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }

/* ---------- 페이지 헤더 ---------- */
.page-head { padding-top: clamp(28px, 4vw, 56px); padding-bottom: clamp(24px, 3vw, 40px); display: grid; gap: 14px; }
.page-head .lead { max-width: 40em; }
.page-head .meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.page-hero { position: relative; min-height: clamp(320px, 42vw, 520px); display: grid; align-items: end; isolation: isolate; color: #f1f0eb; overflow: hidden; border-radius: 0 0 28px 28px; }
.page-hero img.bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(10, 12, 14, 0.82) 0%, rgba(10, 12, 14, 0.3) 55%, rgba(10, 12, 14, 0.05) 100%); }
.page-hero .inner { padding-block: clamp(28px, 4vw, 48px); display: grid; gap: 12px; }
.page-hero .h-display { color: #fff; font-size: clamp(2rem, 4.2vw, 3.4rem); }
.page-hero .lead { color: rgba(241, 240, 235, 0.86); }
.page-hero .crumb { display: flex; gap: 8px; font-size: 0.85rem; color: rgba(241, 240, 235, 0.75); }
.page-hero .crumb a:hover { color: #fff; }

/* ---------- 폼 프리미티브 ---------- */
.field { display: grid; gap: 6px; }
.field label { font-size: 0.86rem; font-weight: 640; color: var(--ink); }
.field .help { font-size: 0.8rem; color: var(--muted); }
.field .err { font-size: 0.8rem; color: var(--accent); min-height: 1.2em; }
.input, .select, .textarea {
  width: 100%; height: 50px; padding: 0 16px; border-radius: var(--radius-input); border: 1.5px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font-size: 0.98rem; transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.textarea { height: auto; min-height: 132px; padding: 14px 16px; resize: vertical; line-height: 1.6; }
.select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer; }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.field.invalid .input, .field.invalid .textarea { border-color: var(--accent); }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 76px; }
.pw-wrap .pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); height: 34px; padding-inline: 10px; border-radius: var(--radius-pill); font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.pw-wrap .pw-toggle:hover { color: var(--ink); background: var(--surface-2); }
.check { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-size: 0.9rem; color: var(--ink-2); cursor: pointer; line-height: 1.5; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.check a { text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }
.form-grid { display: grid; gap: 18px; }
.form-grid .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-msg { font-size: 0.88rem; color: var(--accent); min-height: 1.3em; }

/* ---------- 인증 (가입·로그인) ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); min-height: calc(100dvh - var(--nav-h)); }
.auth-visual { position: relative; overflow: hidden; isolation: isolate; display: grid; align-content: end; padding: clamp(28px, 4vw, 56px); color: #f1f0eb; }
.auth-visual img.bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.auth-visual::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(10, 12, 14, 0.85) 0%, rgba(10, 12, 14, 0.2) 55%, rgba(10, 12, 14, 0.1) 100%); }
.auth-visual blockquote { margin: 0; display: grid; gap: 14px; max-width: 30em; }
.auth-visual blockquote p { font-size: clamp(1.25rem, 1.9vw, 1.7rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.35; word-break: keep-all; color: #fff; }
.auth-visual blockquote footer { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: rgba(241, 240, 235, 0.8); }
.auth-panel { display: grid; align-content: center; padding: clamp(32px, 5vw, 72px) clamp(20px, 5vw, 80px); }
.auth-card { width: min(100%, 440px); margin-inline: auto; display: grid; gap: 22px; }
.auth-card h1 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); font-weight: 780; letter-spacing: -0.03em; line-height: 1.15; }
.auth-card .sub { color: var(--ink-2); word-break: keep-all; }
.social { display: grid; gap: 10px; }
.btn-kakao { background: #fee500; color: #191919; }
.btn-kakao:hover { background: #f7dd00; }
.btn-google { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line-strong); }
.btn-google:hover { border-color: var(--ink); }
.social .btn { width: 100%; height: 52px; font-size: 0.98rem; }
.social .btn .ico { width: 20px; height: 20px; }
.or { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; font-size: 0.82rem; color: var(--muted); }
.or::before, .or::after { content: ""; height: 1px; background: var(--line); }
.auth-card .btn-primary { width: 100%; height: 52px; }
.auth-foot { text-align: center; font-size: 0.92rem; color: var(--muted); }
.auth-foot a { color: var(--ink); font-weight: 640; text-decoration: underline; text-underline-offset: 3px; }
.auth-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 0.88rem; }
.auth-row a { color: var(--muted); }
.auth-row a:hover { color: var(--ink); }

/* ---------- 탭 패널 공통 ---------- */
[data-panel] { display: none; }
[data-panel].on { display: block; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-block: 10px 24px; }
.filters .select { width: auto; height: 42px; min-width: 150px; }
.filters .spacer { flex: 1; }

/* ---------- 커뮤니티 ---------- */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(24px, 3vw, 40px); align-items: start; }
.side { position: sticky; top: calc(var(--nav-h) + 24px); display: grid; gap: 16px; }
.side .panel { padding: 20px; }
.side .panel h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 10px; }
.side .panel p { font-size: 0.9rem; color: var(--ink-2); word-break: keep-all; }
.side .btn { width: 100%; }
.tagcloud { display: flex; flex-wrap: wrap; gap: 6px; }
.rules { display: grid; gap: 8px; font-size: 0.88rem; color: var(--ink-2); }
.rules li { display: flex; gap: 8px; }
.rules li::before { content: counter(rule); counter-increment: rule; font-family: var(--font-display); font-weight: 700; color: var(--accent); }
.rules { counter-reset: rule; }
.feed { display: grid; gap: 12px; }
.post-card { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); transition: border-color var(--dur-fast), transform var(--dur) var(--ease-out), box-shadow var(--dur); }
.post-card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.post-card .body { display: grid; gap: 6px; min-width: 0; }
.post-card .title { font-weight: 680; font-size: 1.05rem; letter-spacing: -0.02em; line-height: 1.35; word-break: keep-all; }
.post-card .excerpt { color: var(--ink-2); font-size: 0.93rem; line-height: 1.6; word-break: keep-all; }
.post-card .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 0.83rem; color: var(--muted); }
.post-card .foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; flex-wrap: wrap; }
.post-card .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.post-card .tags .chip { height: 24px; padding-inline: 9px; font-size: 0.74rem; }
.post-card .state { font-size: 0.82rem; font-weight: 640; color: var(--accent); }
.post-card .state.closed { color: var(--muted); }
.post-card .answer { border-left: 2px solid var(--accent); padding-left: 12px; font-size: 0.9rem; color: var(--ink-2); word-break: keep-all; }
.post-card .answer b { color: var(--ink); }
.meetup-card { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); }
.moments-simple { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.moments-simple .moment .frame { aspect-ratio: 1; }

/* ---------- 여행 스타일 ---------- */
.style-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.style-card { position: relative; display: grid; grid-template-columns: 200px 1fr; gap: 22px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); transition: transform var(--dur) var(--ease-out), box-shadow var(--dur), border-color var(--dur-fast); }
.style-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); border-color: var(--line-strong); }
.style-card .frame { aspect-ratio: 4 / 5; border-radius: 14px; }
.style-card .frame img { transition: transform 0.9s var(--ease-out); }
.style-card:hover .frame img { transform: scale(1.04); }
.style-card .body { display: grid; align-content: center; gap: 10px; }
.style-card h3 { font-size: 1.5rem; font-weight: 760; letter-spacing: -0.03em; }
.style-card p { color: var(--ink-2); font-size: 0.95rem; word-break: keep-all; }
.style-card .where { display: flex; flex-wrap: wrap; gap: 6px; }
.style-card .link-arrow { justify-self: start; margin-top: 4px; }

/* ---------- 매거진 ---------- */
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 32px) clamp(14px, 1.8vw, 24px); }
.article { display: grid; gap: 12px; }
.article .frame { aspect-ratio: 3 / 2; }
.article .frame img { transition: transform 0.9s var(--ease-out); }
.article:hover .frame img { transform: scale(1.035); }
.article .cat { font-size: 0.8rem; font-weight: 640; color: var(--accent); }
.article h3 { font-size: 1.12rem; font-weight: 680; letter-spacing: -0.02em; line-height: 1.35; word-break: keep-all; }
.article:hover h3 { color: var(--accent); }
.article p { font-size: 0.92rem; color: var(--ink-2); word-break: keep-all; line-height: 1.6; }
.article .small { color: var(--muted); }
.article.hide { display: none; }

/* ---------- 여행지 ---------- */
.dest-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2vw, 26px) clamp(14px, 1.6vw, 22px); }
.dest-card { display: grid; gap: 12px; }
.dest-card.hide { display: none; }
.dest-card .frame { aspect-ratio: 4 / 5; }
.dest-card .frame img { transition: transform 0.9s var(--ease-out); }
.dest-card:hover .frame img { transform: scale(1.05); }
.dest-card .name { display: flex; justify-content: space-between; align-items: baseline; font-weight: 740; font-size: 1.15rem; letter-spacing: -0.025em; }
.dest-card .name span { font-size: 0.8rem; font-weight: 500; color: var(--muted); }
.dest-card .facts { display: grid; gap: 4px; font-size: 0.84rem; color: var(--ink-2); }
.dest-card .facts div { display: flex; justify-content: space-between; gap: 8px; }
.dest-card .facts dt { color: var(--muted); }
.dest-card .facts dd { margin: 0; font-weight: 600; }
.fact-strip { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); overflow: hidden; }
.fact-strip > div { padding: 18px 20px; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.fact-strip > div:first-child { border-left: 0; }
.fact-strip .k { font-size: 0.78rem; color: var(--muted); }
.fact-strip .v { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; }
.fact-strip .v small { font-weight: 500; color: var(--muted); font-size: 0.8rem; margin-left: 4px; }
.months { display: flex; gap: 4px; }
.months span { flex: 1; height: 8px; border-radius: 4px; background: var(--bg-2); }
.months span.hi { background: var(--accent); }
.months-label { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--muted); margin-top: 4px; }

/* ---------- 문서형 페이지 (약관·규정·소개) ---------- */
.doc-page { padding-bottom: var(--section-gap); }
.doc { max-width: 820px; }
.doc-head { padding-top: clamp(32px, 4vw, 56px); padding-bottom: clamp(20px, 3vw, 36px); border-bottom: 1px solid var(--line); margin-bottom: clamp(24px, 3vw, 40px); display: grid; gap: 12px; }
.doc-head .small { color: var(--muted); }
.doc h2 { font-size: 1.25rem; font-weight: 740; letter-spacing: -0.025em; margin-top: clamp(28px, 3vw, 40px); margin-bottom: 10px; }
.doc h2:first-of-type { margin-top: 0; }
.doc p, .doc li { color: var(--ink-2); word-break: keep-all; }
.doc p { margin-bottom: 12px; }
.doc ol, .doc ul { padding-left: 20px; margin-bottom: 12px; display: grid; gap: 6px; }
.doc ol { list-style: decimal; }
.doc ul { list-style: disc; }
.doc .note { background: var(--accent-soft); color: var(--ink); border-radius: 14px; padding: 14px 16px; font-size: 0.9rem; display: flex; gap: 10px; align-items: start; }
.doc .note .ico { color: var(--accent); flex: none; margin-top: 2px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-weight: 700; background: var(--surface-2); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table td code { font-family: var(--font-display); font-size: 0.82rem; }
.table .num { font-variant-numeric: tabular-nums; }

/* ---------- 아코디언 (FAQ·채용) ---------- */
.acc { border-top: 1px solid var(--line); }
.acc details { border-bottom: 1px solid var(--line); }
.acc summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 18px 4px; font-weight: 640; font-size: 1.02rem; letter-spacing: -0.015em; word-break: keep-all; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary .ico { width: 20px; height: 20px; color: var(--muted); transition: transform var(--dur) var(--ease-out); }
.acc details[open] summary .ico { transform: rotate(45deg); color: var(--accent); }
.acc .acc-body { padding: 0 4px 20px; color: var(--ink-2); word-break: keep-all; display: grid; gap: 10px; }
.acc .acc-body .meta { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- 회사 소개 ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 22px); }
.pillar { padding: clamp(22px, 2.6vw, 32px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); display: grid; gap: 10px; align-content: start; }
.pillar .ico { width: 30px; height: 30px; color: var(--accent); stroke-width: 1.5; }
.pillar h3 { font-size: 1.15rem; font-weight: 720; letter-spacing: -0.02em; }
.pillar p { color: var(--ink-2); font-size: 0.94rem; word-break: keep-all; }
.info-list { display: grid; grid-template-columns: 160px 1fr; gap: 10px 20px; font-size: 0.95rem; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; color: var(--ink); font-weight: 560; word-break: keep-all; }
.story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.story .frame { aspect-ratio: 4 / 3; }
.story .copy { display: grid; gap: 14px; }
.story .copy p { color: var(--ink-2); word-break: keep-all; }

/* ---------- 공지 ---------- */
.notice-list { border-top: 1px solid var(--line); }
.notice-list a { display: grid; grid-template-columns: 84px 1fr auto; gap: 16px; align-items: center; padding: 16px 4px; border-bottom: 1px solid var(--line); transition: background var(--dur-fast); }
.notice-list a:hover { background: var(--surface); }
.notice-list .cat { font-size: 0.78rem; font-weight: 700; color: var(--accent); }
.notice-list .cat.plain { color: var(--muted); }
.notice-list .t { font-weight: 620; word-break: keep-all; }
.notice-list .d { font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.notice-detail { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: clamp(22px, 3vw, 36px); display: grid; gap: 14px; margin-bottom: clamp(28px, 3vw, 44px); }
.notice-detail h2 { font-size: 1.3rem; font-weight: 740; letter-spacing: -0.025em; margin: 0; }
.notice-detail .small { color: var(--muted); }
.notice-detail p { color: var(--ink-2); word-break: keep-all; }

/* ---------- 채용 ---------- */
.jobs { display: grid; gap: 12px; }
.job { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); }
.job h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.job .meta { display: flex; flex-wrap: wrap; gap: 6px; }
.job.closed { opacity: 0.6; }

/* ---------- 파트너 ---------- */
.split-form { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.split-form .panel { padding: clamp(22px, 3vw, 34px); }
.benefits { display: grid; gap: 14px; }
.benefits li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.benefits .ico { color: var(--accent); margin-top: 3px; }
.benefits b { display: block; font-weight: 700; margin-bottom: 2px; }
.benefits span { color: var(--ink-2); font-size: 0.94rem; word-break: keep-all; }

/* ---------- 예약 확인 ---------- */
.narrow { max-width: 560px; margin-inline: auto; }
.narrow .panel { padding: clamp(24px, 3vw, 36px); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .dest-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fact-strip { grid-template-columns: repeat(3, 1fr); }
  .fact-strip > div:nth-child(4) { border-left: 0; }
  .fact-strip > div:nth-child(n + 4) { border-top: 1px solid var(--line); }
}
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; min-height: 0; }
  .auth-visual { min-height: 240px; padding: 24px; }
  .auth-visual blockquote p { font-size: 1.15rem; }
  .two-col { grid-template-columns: 1fr; }
  .side { position: static; }
  .style-grid { grid-template-columns: 1fr; }
  .style-card { grid-template-columns: 140px 1fr; }
  .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .moments-simple { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pillars { grid-template-columns: 1fr; }
  .story { grid-template-columns: 1fr; }
  .split-form { grid-template-columns: 1fr; }
  .page-hero { border-radius: 0 0 20px 20px; }
}
@media (max-width: 600px) {
  .form-grid .two { grid-template-columns: 1fr; }
  .style-card { grid-template-columns: 1fr; }
  .style-card .frame { aspect-ratio: 16 / 10; }
  .article-grid { grid-template-columns: 1fr; }
  .moments-simple { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact-strip { grid-template-columns: 1fr 1fr; }
  .fact-strip > div { border-left: 0; }
  .fact-strip > div:nth-child(even) { border-left: 1px solid var(--line); }
  .fact-strip > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .info-list { grid-template-columns: 1fr; gap: 2px 0; }
  .info-list dd { margin-bottom: 10px; }
  .notice-list a { grid-template-columns: 1fr auto; }
  .notice-list .cat { grid-column: 1 / -1; }
  .job { grid-template-columns: 1fr; }
  .meetup-card { grid-template-columns: auto 1fr; }
  .meetup-card .btn { grid-column: 2; justify-self: start; }
  .post-card { grid-template-columns: 1fr; }
  .post-card .avatar { display: none; }
}

/* ---------- 필터 항목 공통 전환 ---------- */
[data-item] { transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
[data-item].hide { display: none; }
[data-item].enter { opacity: 0; transform: translateY(12px); }
[data-empty] { display: none; padding: 48px 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius-card); }
[data-empty].show { display: block; }
