/* 공용 모듈 모양 — 트리피·KKOOK (2026-10-20 관제 #404·#406·#407). 색은 각 앱의 변수(--card/--surface · --text · --text2/--muted · --line · --primary/--accent)를 쓰고 없으면 기본값.
   한 파일로 두는 이유: KKOOK 웹의 CSP(style-src 'self')가 인라인 <style> 을 막아서 — 앱은 <link rel="stylesheet" href="shared/common.css"> 한 줄.
   ① 단계형 마법사 .stp-* (stepper.js) ② 나라→도시→공항 고르기 .ap-* (airport_picker.js) ③ 환영 사진 .wel (ads.js) ④ 버전 줄·사진 출처 */
:root { --cm-card: var(--card, var(--surface, #fff)); --cm-text: var(--text, #191f28); --cm-muted: var(--text2, var(--muted, #6b7684)); --cm-line: var(--line, rgba(0, 0, 0, .09));
  --cm-primary: var(--primary, var(--accent, #3182f6)); --cm-on-primary: var(--on-accent, #fff); --cm-tile: var(--tile, var(--soft, rgba(127, 127, 127, .1))); --cm-weak: var(--red-weak, var(--soft2, rgba(127, 127, 127, .14)));
  --cm-tap: var(--tap, 48px); --cm-r: 16px; }

/* ---------- ① 단계형 마법사 ---------- */
.stp { display: flex; flex-direction: column; min-height: 100%; color: var(--cm-text); }
.stp-top { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.stp-back { display: inline-flex; align-items: center; gap: 2px; margin-left: -8px; padding: 6px 10px 6px 4px; border: 0; border-radius: 12px; background: transparent; color: var(--cm-text); font: inherit; font-size: 1rem; font-weight: 600; cursor: pointer; min-height: var(--cm-tap); }
.stp-back:active { background: var(--cm-tile); }
.stp-count { font-size: .9333rem; font-weight: 700; color: var(--cm-muted); font-variant-numeric: tabular-nums; }
.stp-bar { height: 3px; margin: 2px 0 10px; border-radius: 2px; background: var(--cm-tile); overflow: hidden; }
.stp-bar i { display: block; height: 100%; width: 0; background: var(--cm-primary); transition: width .25s; }
.stp-dots { display: flex; gap: 6px; margin: 0 0 16px; flex-wrap: wrap; }
.stp-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--cm-line); }
.stp-dots i.done { background: var(--cm-primary); opacity: .45; }
.stp-dots i.now { width: 18px; border-radius: 3px; background: var(--cm-primary); }
.stp-body { flex: 1 1 auto; min-height: 0; }
.stp-anim { animation: stp-in .22s ease both; }
@keyframes stp-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.stp-cheer { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; margin: 0 0 12px; padding: 8px 12px; border-radius: 16px; background: var(--cm-weak); color: var(--cm-text); font-size: .9333rem; font-weight: 700; }
.stp-q { margin: 0; font-size: 1.5rem; line-height: 1.35; font-weight: 800; letter-spacing: -.02em; word-break: keep-all; overflow-wrap: anywhere; }
.stp-q .ui-ico, .stp-q img { width: 30px; height: 30px; vertical-align: -6px; margin-right: 6px; }
.stp-sub { margin: 6px 0 0; color: var(--cm-muted); font-size: 1rem; line-height: 1.5; word-break: keep-all; }
.stp-box { margin-top: 16px; }
.stp-err { margin: 12px 0 0; color: #d6323f; font-size: 1rem; font-weight: 600; }
.stp-err:empty { display: none; }
/* 「다음」 줄 — 선택지 바로 아래(짧으면) · 넘치면 칸 안에서 아래에 붙어 늘 보임(sticky) · fixedFooter 면 화면 아래 고정(문서 스크롤 화면) */
.stp-foot { position: sticky; bottom: 0; z-index: 2; margin: 16px -4px 0; padding: 10px 4px calc(10px + var(--sab, 0px)); background: var(--cm-card); box-shadow: 0 -1px 0 var(--cm-line); }
.stp-fixed .stp-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0; padding: 12px var(--gutter, 20px) calc(12px + var(--sab, 0px)); }
.stp-in { display: flex; gap: 10px; max-width: 600px; margin: 0 auto; }
.stp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: max(56px, 3.5rem); padding: 0 18px; border: 0; border-radius: 14px; font: inherit; font-size: 1.0667rem; font-weight: 700; cursor: pointer; }
.stp-next { flex: 1; background: var(--cm-primary); color: var(--cm-on-primary); }
.stp-next:active { filter: brightness(.94); }
.stp-skip { flex: 0 0 38%; background: var(--cm-tile); color: var(--cm-text); }
.stp-shake { animation: stp-shake .3s ease; }
@keyframes stp-shake { 0%, 100% { transform: none; } 30% { transform: translateX(-5px); } 60% { transform: translateX(5px); } }
/* 선택지(단일·여러 개) — 큰 칸 · 고른 칸은 주 색 테두리 */
.stp-choices { display: grid; gap: 10px; }
.stp-choice { display: flex; align-items: center; gap: 12px; width: 100%; min-height: max(64px, 4rem); padding: 12px 16px; border: 1.5px solid var(--cm-line); border-radius: var(--cm-r); background: var(--cm-card); color: var(--cm-text); font: inherit; font-size: 1.0667rem; font-weight: 600; text-align: left; cursor: pointer; }
.stp-choice:active { background: var(--cm-tile); }
.stp-choice.on { border-color: var(--cm-primary); background: var(--cm-weak); box-shadow: inset 0 0 0 1px var(--cm-primary); }
.stp-choice .stp-ic { flex: none; width: 36px; height: 36px; display: grid; place-items: center; font-size: 24px; }
.stp-choice .stp-ic img { width: 32px; height: 32px; }
.stp-choice .stp-ct { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.stp-choice small { font-size: .9333rem; font-weight: 500; color: var(--cm-muted); }
.stp-choice .stp-ord { flex: none; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; background: var(--cm-primary); color: var(--cm-on-primary); font-size: .8667rem; font-weight: 800; display: grid; place-items: center; }
.stp-choice .stp-ord:empty { display: none; }
.stp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.stp-chip { display: inline-flex; align-items: center; gap: 6px; min-height: var(--cm-tap); padding: 8px 14px; border: 1.5px solid var(--cm-line); border-radius: 999px; background: var(--cm-card); color: var(--cm-text); font: inherit; font-size: 1rem; font-weight: 600; cursor: pointer; }
.stp-chip.on { border-color: var(--cm-primary); background: var(--cm-weak); }
.stp-chip img { width: 22px; height: 22px; }
.stp-field { display: block; width: 100%; min-height: max(60px, 3.75rem); padding: 10px 16px; border: 1.5px solid var(--cm-line); border-radius: var(--cm-r); background: var(--cm-card); color: var(--cm-text); font: inherit; font-size: 1.0667rem; text-align: left; cursor: pointer; }
.stp-field.set { border-color: var(--cm-primary); background: var(--cm-weak); }
.stp-field b { display: block; font-weight: 700; }
.stp-field small { display: block; color: var(--cm-muted); font-size: .9333rem; margin-top: 2px; overflow-wrap: anywhere; }
.stp-field .stp-ph { color: var(--cm-muted); }
.stp-input { display: block; width: 100%; min-height: max(56px, 3.5rem); padding: 10px 16px; border: 1.5px solid var(--cm-line); border-radius: var(--cm-r); background: var(--cm-card); color: var(--cm-text); font: inherit; font-size: 1.0667rem; }
.stp-input:focus { outline: none; border-color: var(--cm-primary); }
.stp-hint { margin: 10px 0 0; color: var(--cm-muted); font-size: .9333rem; line-height: 1.5; }
.stp-ok { margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--cm-weak); color: var(--cm-text); font-size: 1rem; font-weight: 700; overflow-wrap: anywhere; }
.stp-ok:empty { display: none; }
.stp-later { display: inline-flex; align-items: center; min-height: var(--cm-tap); margin-top: 8px; padding: 0 6px; border: 0; background: transparent; color: var(--cm-muted); font: inherit; font-size: .9333rem; font-weight: 600; text-decoration: underline; cursor: pointer; }
/* 요약 화면 — 줄을 누르면 그 단계로 */
.stp-sum { display: grid; gap: 8px; }
.stp-row { display: grid; grid-template-columns: minmax(4.5rem, auto) 1fr auto; align-items: center; gap: 10px; width: 100%; min-height: max(60px, 3.75rem); padding: 10px 14px; border: 1.5px solid var(--cm-line); border-radius: var(--cm-r); background: var(--cm-card); color: var(--cm-text); font: inherit; text-align: left; cursor: pointer; }
.stp-row:active { background: var(--cm-tile); }
.stp-row .stp-k { font-size: .9333rem; font-weight: 700; color: var(--cm-muted); }
.stp-row .stp-v { min-width: 0; font-size: 1.0667rem; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.stp-row.empty .stp-v { color: var(--cm-muted); font-weight: 500; }
.stp-row .stp-edit { flex: none; padding: 6px 10px; border-radius: 999px; background: var(--cm-tile); color: var(--cm-text); font-size: .8667rem; font-weight: 700; }

/* ---------- ② 나라 → 도시 → 공항 고르기(시트) ---------- */
.ap-ov { position: fixed; inset: 0; z-index: 85; display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .16s; }
.ap-ov.in { opacity: 1; } .ap-ov.out { opacity: 0; }
.ap-bg { position: absolute; inset: 0; background: rgba(20, 24, 31, .55); }
.ap-sheet { position: relative; width: min(100%, 560px); max-height: min(88vh, 88dvh); display: flex; flex-direction: column; gap: 10px; padding: 10px 16px calc(14px + var(--sab, 0px)); border-radius: 22px 22px 0 0; background: var(--cm-card); color: var(--cm-text); box-shadow: 0 -12px 40px rgba(0, 0, 0, .25); transform: translateY(14px); transition: transform .18s; }
.ap-ov.in .ap-sheet { transform: none; }
.ap-head { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.ap-head .ap-title { flex: 1; min-width: 0; font-size: 1.1333rem; font-weight: 800; overflow-wrap: anywhere; }
.ap-x, .ap-back { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--cm-tile); color: var(--cm-text); cursor: pointer; }
.ap-back[hidden] { display: none; }
.ap-search input { width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--cm-line); border-radius: 14px; background: var(--cm-card); color: var(--cm-text); font: inherit; font-size: 1rem; }
.ap-search input:focus { outline: none; border-color: var(--cm-primary); }
.ap-list { overflow-y: auto; display: grid; gap: 6px; align-content: start; min-height: 140px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.ap-sec { margin: 8px 2px 0; font-size: .8667rem; font-weight: 700; color: var(--cm-muted); }
.ap-empty { margin: 0; padding: 16px 4px; color: var(--cm-muted); font-size: 1rem; }
.ap-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: max(56px, 3.5rem); padding: 8px 12px; border: 1.5px solid transparent; border-radius: 14px; background: var(--cm-tile); color: var(--cm-text); font: inherit; text-align: left; cursor: pointer; }
.ap-row:active { filter: brightness(.96); }
.ap-row.on { border-color: var(--cm-primary); background: var(--cm-weak); }
.ap-flag { flex: none; min-width: 32px; text-align: center; font-size: 26px; line-height: 1; }
.ap-flag img { width: 32px; height: 24px; border-radius: 4px; vertical-align: middle; }
.ap-flag.ap-city { font-size: 22px; }
.ap-main { flex: 1; min-width: 0; }
.ap-main b { display: block; font-size: 1.0667rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.ap-main small { display: block; margin-top: 2px; color: var(--cm-muted); font-size: .8667rem; line-height: 1.35; overflow-wrap: anywhere; }
.ap-chev { flex: none; color: var(--cm-muted); font-size: 22px; }
.ap-code { flex: none; min-width: 50px; padding: 5px 7px; border-radius: 8px; background: var(--cm-primary); color: var(--cm-on-primary); font-size: .8667rem; font-weight: 800; letter-spacing: .5px; text-align: center; }
.ap-tag { flex: none; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--cm-primary); color: var(--cm-primary); font-size: .7333rem; font-weight: 700; }
/* 공항 칸(만들기·첫 입장) */
.ap-field { display: grid; gap: 4px; min-width: 0; }
.ap-field > .f { font-size: .8667rem; color: var(--cm-muted); }
.ap-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 8px 12px; border: 1.5px solid var(--cm-line); border-radius: 14px; background: var(--cm-card); color: var(--cm-text); font: inherit; text-align: left; cursor: pointer; }
.ap-btn.set { border-color: var(--cm-primary); background: var(--cm-weak); }
.ap-btn .ap-main b, .ap-btn .ap-main small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-btn .ap-ph { flex: 1; color: var(--cm-muted); }
.ap-field .chosen { font-size: .8667rem; color: var(--cm-muted); }
.ap-field .chosen:empty { display: none; }
.ap-field .chosen.warn { color: #d97706; }

/* ---------- ③ 환영 사진(시험 APK) ---------- */
.wel { position: fixed; inset: 0; z-index: 2147482000; background: #0b0d12; color: #fff; overflow: hidden; cursor: pointer; animation: wel-in .25s ease both; }
.wel.out { animation: wel-out .3s ease both; }
.wel-s { position: absolute; inset: 0; opacity: 0; transition: opacity .45s ease; }
.wel-s.on { opacity: 1; }
.wel-bg { position: absolute; inset: -48px; background-size: cover; background-position: center; filter: blur(26px) brightness(.5); transform: scale(1.08); }
.wel-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.wel-s.on .wel-img { animation: wel-zoom 1.6s ease-out both; }
.wel-txt { position: absolute; left: 0; right: 0; bottom: 0; padding: 120px 24px calc(28px + var(--sab, 0px)); background: linear-gradient(to top, rgba(0, 0, 0, .86) 0%, rgba(0, 0, 0, .62) 55%, rgba(0, 0, 0, 0) 100%); text-align: left; }
.wel-mark { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 20px; font-weight: 800; }
.wel-mark img { display: block; }
.wel-t { margin: 0; font-size: 26px; line-height: 1.3; font-weight: 800; letter-spacing: -.02em; word-break: keep-all; text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
.wel-sub { margin: 6px 0 0; font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .88); word-break: keep-all; }
.wel-go { display: block; width: 100%; height: 52px; margin-top: 20px; border: 0; border-radius: 14px; background: var(--cm-primary); color: var(--cm-on-primary); font: inherit; font-size: 17px; font-weight: 800; cursor: pointer; }
.wel-bar { display: block; height: 3px; margin-top: 14px; border-radius: 3px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.wel-bar b { display: block; width: 100%; height: 100%; background: #fff; transform-origin: left center; animation: wel-bar 3s linear both; }
.wel-cr { display: block; margin-top: 10px; font-size: 11px; line-height: 1.4; color: rgba(255, 255, 255, .7); }
@keyframes wel-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes wel-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes wel-zoom { from { transform: scale(1.06); } to { transform: none; } }
@keyframes wel-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.wel.still .wel-img, .wel.still .wel-bar b { animation: none !important; }

/* ---------- ④ 버전 줄 · 환영 사진 출처 ---------- */
.wel-credits { font-size: .8667rem; color: var(--cm-muted); }
.wel-credits summary { cursor: pointer; font-weight: 700; color: var(--cm-text); padding: 4px 0; }
.wel-credits dl { margin: 6px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; }
.wel-credits dt { color: var(--cm-muted); }
.wel-credits dd { margin: 0; }
.wel-credits a { color: var(--cm-primary); }

/* ---------- ⑤ 설정 줄(더보기·「나」 공용 꼴 · 관제 #409) — 한 줄 56 · 왼쪽 이름 · 오른쪽 조절(세그먼트/스위치). 앱 CSS(KKOOK app.css)가 같은 이름으로 덮어 쓸 수 있다 ---------- */
.set-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; padding: 6px 16px; color: var(--cm-text); font-size: 1rem; line-height: 1.35; font-weight: 600; }
.set-line + .set-line, .set-line + .set-more, .set-more + .set-line { box-shadow: inset 0 1px 0 var(--cm-line); }
.set-line > span { flex: 0 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; }
.set-line > span small { display: block; font-size: .8667rem; font-weight: 500; color: var(--cm-muted); }
.set-line .seg { flex: 1 1 auto; max-width: 62%; }
.seg { display: flex; padding: 3px; border-radius: 14px; background: var(--cm-tile); }
.seg button { flex: 1; min-width: 0; min-height: 38px; padding: 0 4px; border: 0; border-radius: 10px; background: transparent; color: var(--cm-muted); font: inherit; font-size: .9333rem; line-height: 1.2; font-weight: 700; cursor: pointer; white-space: normal; overflow-wrap: anywhere; }
.seg button.is-on { background: var(--cm-card); color: var(--cm-text); box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.sw { position: relative; flex: none; width: 56px; height: 34px; border: 0; border-radius: 999px; background: var(--cm-line); cursor: pointer; transition: background .15s; }
.sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s; }
.sw[aria-checked="true"] { background: var(--cm-primary); }
.sw[aria-checked="true"]::after { transform: translateX(22px); }
.sw[disabled] { opacity: .45; }
.set-more { padding: 0 16px 10px; }
.set-more summary { display: flex; align-items: center; min-height: 40px; color: var(--cm-muted); font-size: .9333rem; font-weight: 600; cursor: pointer; list-style: none; }
.set-more summary::-webkit-details-marker { display: none; }
.set-more summary::before { content: "▸"; margin-right: 6px; font-size: .8em; }
.set-more[open] summary::before { content: "▾"; }

/* 🤝 제휴 대체 배너(2026-11-09 KKOOK 관제 #532 · shared/ads.js fallback) — 애드몹 배너 자리(탭 바 위 50px)에 제휴 상품 한 줄 + 공정위 표시(small) · z 30 = KKOOK .ad-slot(광고 바탕 칸 z 29) 위 · 시트·덮는 판(z 50+) 아래(덮는 판이 열리면 ads.js 가 visibility 로 숨김) */
.ad-fb { position: fixed; left: 0; right: 0; z-index: 30; height: 50px; box-sizing: border-box; display: flex; align-items: center; gap: 10px; padding: 0 12px; background: var(--card, #fff); border-top: 1px solid var(--grey200, #e5e8eb); color: var(--text, #191f28); text-decoration: none; font-size: 13px; }
.ad-fb[hidden] { display: none; }
.ad-fb-logo { flex: 0 0 auto; max-width: 84px; font-weight: 800; font-size: 13px; letter-spacing: -.01em; color: var(--primary, #3182f6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-fb-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.ad-fb-t b { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-fb-t small { font-size: 10px; color: var(--grey600, #6b7684); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-fb-go { flex: 0 0 auto; background: var(--primary, #3182f6); color: #fff; border-radius: 8px; padding: 7px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
