:root {
  --bg: #ffffff;
  --text: #232322;
  --muted: #6b6866;
  --line: #efe9e5;
  --accent: #ff5943;
  --accent-2: #ff9875;
  --link: #d4381f;
  --soft: #fff4ef;
  --cream: #fff8f3;
  --brand-gradient: linear-gradient(135deg, var(--accent), var(--accent-2));
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151312;
    --text: #f4f1ef;
    --muted: #a8a29e;
    --line: #2c2724;
    --accent: #ff6a52;
    --accent-2: #ff9e80;
    --link: #ff8a72;
    --soft: #251a16;
    --cream: #1b1614;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  line-height: 1.7;
  word-break: keep-all;
}

main { max-width: 760px; margin: 0 auto; padding: 40px 16px 80px; }

header.site { max-width: 760px; margin: 0 auto; padding: 20px 16px 0; display: flex; align-items: center; gap: 20px; }

/* 로고의 O는 앱 워드마크처럼 코랄 원으로 그린다 (글자는 스크린 리더용으로 남김) */
.brand { color: var(--text); font-weight: 800; font-size: 1.15rem; letter-spacing: 0.02em; text-decoration: none; }
.brand span {
  display: inline-block;
  width: 0.74em;
  height: 0.74em;
  margin: 0 0.04em;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: transparent;
  overflow: hidden;
  vertical-align: -0.04em;
}

h1 { font-size: 1.75rem; line-height: 1.35; margin: 0 0 8px; }
h2 { font-size: 1.15rem; margin: 40px 0 8px; padding-top: 16px; border-top: 1px solid var(--line); }
h3 { font-size: 1rem; margin: 24px 0 4px; }
p, li { font-size: 0.97rem; }
.meta { color: var(--muted); font-size: 0.9rem; margin: 0 0 24px; }
a { color: var(--link); }

.note { background: var(--soft); border-radius: 12px; padding: 14px 16px; margin: 16px 0; }

.table-wrap { overflow-x: auto; margin: 12px 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: var(--soft); white-space: nowrap; }

.cards { display: grid; gap: 12px; margin: 24px 0; }
.card { display: block; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; color: var(--text); text-decoration: none; }
.card strong { display: block; margin-bottom: 2px; }
.card span { color: var(--muted); font-size: 0.9rem; }

/* 가이드 문서 */
.breadcrumb { margin: 0 0 12px; color: var(--muted); font-size: 0.85rem; }
.breadcrumb a { color: var(--muted); }
.answer { margin: 20px 0; padding: 16px 18px; border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; background: var(--soft); }
.answer p { margin: 0; }
.answer p + p { margin-top: 8px; }
.steps { padding-left: 1.3em; }
.steps li { margin-bottom: 8px; }
.guide-cta { margin: 40px 0 0; padding: 20px; border-radius: 16px; background: var(--brand-gradient); color: #fff; }
.guide-cta p { margin: 0; }
.guide-cta a { color: #fff; font-weight: 700; }
.sources li { font-size: 0.88rem; word-break: break-all; }

details { border-bottom: 1px solid var(--line); padding: 12px 0; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 8px 0 0; }

footer { max-width: 760px; margin: 0 auto; padding: 24px 16px 40px; color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--line); }
footer a { color: var(--muted); margin-right: 12px; }

/* 공항 배치도 뷰어 (guide/map-viewer.js) */
.map-link { white-space: nowrap; font-weight: 600; }
.map-viewer {
  width: min(1200px, calc(100vw - 16px));
  height: min(860px, calc(100dvh - 16px));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}
.map-viewer[open] { display: flex; flex-direction: column; }
.map-viewer::backdrop { background: rgb(0 0 0 / 0.6); }
.map-viewer-head { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--line); }
.map-viewer-head p { margin: 0; font-weight: 700; }
.map-close { margin-left: auto; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--soft); color: var(--text); font-size: 1rem; cursor: pointer; }
.map-stage { position: relative; flex: 1; overflow: hidden; background: #f3f1ef; cursor: grab; touch-action: none; outline: none; }
.map-stage.is-dragging { cursor: grabbing; }
.map-stage:focus-visible { box-shadow: inset 0 0 0 3px var(--accent); }
.map-stage img { position: absolute; top: 0; left: 0; max-width: none; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; }
.map-status { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 16px; color: #6b6866; text-align: center; }
.map-status[hidden] { display: none; }
.map-viewer-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 14px; border-top: 1px solid var(--line); }
.map-controls { display: flex; gap: 6px; }
.map-controls button { min-width: 40px; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer; }
.map-credit { margin: 0; color: var(--muted); font-size: 0.8rem; }

/* 일본어 페이지 글꼴, 언어 전환 링크 */
html[lang="ja"] body { font-family: "Pretendard JP Variable", "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Apple SD Gothic Neo", "Noto Sans JP", sans-serif; word-break: normal; line-break: strict; }
header.site .lang-switch { margin-left: auto; color: var(--muted); font-size: 0.88rem; font-weight: 600; text-decoration: none; }
header.site .lang-switch:hover { color: var(--text); }
header.site .lang-switch + .btn-small { margin-left: 0; }
@media (min-width: 760px) {
  header.site nav + .lang-switch { margin-left: 0; }
}
