/* 둘러보기 허브 /explore — 홈(home-v2.css)과 같은 세계: 배경 위 콘텐츠, 면은 탭 타깃(검색·칩·행)에만, 줄 사이 선 없음.
   묶음 머리(.hm-sh · .hm-more)와 포스터 카드 줄(.hm-nows · .hm-nc)은 home-v2.css 를 그대로 쓴다. */
.xp { max-width: 1040px; margin: 0 auto; padding: 48px 48px 48px; display: grid; gap: 44px; box-sizing: border-box; min-width: 0; }
.xp #secs { display: grid; gap: 44px; min-width: 0; }
.xp #secs[hidden], .xp-res[hidden] { display: none; }

.xp-top { display: grid; gap: 14px; min-width: 0; }
.xp-top h1 { margin: 0; font-size: clamp(28px, 3.4vw, 36px); line-height: 1.15; font-weight: 800; letter-spacing: -.035em; }
.xp-find { position: relative; display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 8px 0 18px; border-radius: 18px;
  background: var(--surface); box-shadow: var(--shadow); max-width: 640px; transition: box-shadow var(--t-move) var(--ease); }
.xp-find:focus-within { box-shadow: var(--shadow), 0 0 0 2px color-mix(in srgb, #F12E82 45%, transparent); }
.xp-find > .v2-ic { width: 20px; height: 20px; color: var(--muted); flex: none; }
.xp-find input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; font-weight: 500; caret-color: #F12E82; }
.xp-find input::placeholder { color: var(--ink-2); opacity: .8; }   /* --muted 은 다크에서 4.0:1 — 검색 칸 안내는 한 단계 진하게 */
.xp-find input::-webkit-search-cancel-button { display: none; }
.xp-x { width: 38px; height: 38px; border: 0; border-radius: 999px; background: var(--sunken); color: var(--ink-2); display: grid; place-items: center; cursor: pointer; flex: none; }
.xp-x[hidden] { display: none; }
.xp-x .v2-ic { width: 16px; height: 16px; }

.xp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
/* 칩·관심사 줄은 모듈이 그린다 — 그 전부터 자리를 잡아 둬야 아래 묶음(#secs)이 밀리지 않는다 (11/20 성능 점검: CLS 0.07~0.26). 넓은 화면은 칩이 두 줄 */
.xp-chips:empty { min-height: 36px; }
@media (min-width: 900px) { .xp-chips:empty { min-height: 80px; } }
.xp-chip { height: 36px; padding: 0 15px; border: 0; border-radius: 999px; background: var(--sunken); color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: background var(--t-press) var(--ease), color var(--t-press) var(--ease); }
.xp-chip:hover { color: var(--ink); }
.xp-chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); font-weight: 700; }

/* 내 근처 — 왼쪽 작은 지도 · 오른쪽 가까운 순 */
.xp-near-b { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.xp-mini { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 22px; overflow: hidden; text-decoration: none; color: var(--ink);
  background: var(--sunken); box-shadow: var(--shadow);
  background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 12%, transparent) 1px, transparent 0); background-size: 22px 22px; }
.xp-mini img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.xp-mini.img .xp-mini-d { display: none; }
.xp-mini-d { position: absolute; inset: 0; }
.xp-mini-d i { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #F12E82; border: 2px solid var(--surface); box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.xp-mini-d i.me { background: #3A7BFF; width: 14px; height: 14px; margin: -7px 0 0 -7px; box-shadow: 0 0 0 8px rgba(58,123,255,.18); }
.xp-mini-go { position: absolute; left: 12px; bottom: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px 0 12px;
  border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 700; box-shadow: 0 2px 6px rgba(20,20,30,.12), 0 10px 24px -10px rgba(20,20,30,.35); }
.xp-mini-go .v2-ic { width: 18px; height: 18px; }
.xp-mini:hover .xp-mini-go { background: var(--ink); color: var(--bg); }

.xp-list { display: grid; gap: 4px; align-content: start; min-width: 0; }
.xp-list.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
.xp-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: center; padding: 8px; margin: 0 -8px; border-radius: 16px;
  color: inherit; text-decoration: none; transition: background var(--t-press) var(--ease); min-width: 0; }
.xp-row:hover { background: var(--sunken); }
.xp-th { width: 64px; aspect-ratio: 1; border-radius: 12px; background: var(--sunken) center / cover no-repeat; }
.xp-tx { display: grid; gap: 3px; min-width: 0; }
.xp-tx b { font-size: 15.5px; line-height: 1.3; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.xp-tx small { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xp-ask { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-radius: 16px; background: var(--sunken); margin-bottom: 6px; }
.xp-ask span { flex: 1; min-width: 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.45; }
.xp-ask-b { flex: none; height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--ink); color: var(--bg); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.xp-ask-b:disabled { opacity: .55; }
a.xp-ask-b { display: inline-flex; align-items: center; text-decoration: none; }
.xp-ask-b.sub { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
/* 공개 Channel 이 없을 때 — 설명 + 만들기 · 전체 보기 */
.xp-chs[hidden] { display: none !important; }
.xp-chz { display: grid; gap: 6px; padding: 16px 18px; border-radius: 16px; background: var(--sunken); }
.xp-chz b { font-size: 15.5px; font-weight: 700; }
.xp-chz span { font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.xp-chz p { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.xp-none { margin: 0; padding: 16px 18px; border-radius: 16px; background: var(--sunken); color: var(--ink-2); font-size: 15px; }
.xp-sk { display: block; height: 72px; border-radius: 16px; background: var(--sunken); }
.xp-res { display: grid; gap: 12px; }
.xp-res-n { margin: 0; font-size: 14px; font-weight: 600; color: var(--muted); }

/* 추천 Channel — 카드(누르면 Channel 페이지) + 팔로우(진한 단색: 그라디언트는 탭 바 [+] 한 곳) */
.xp-chs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.xp-ch { display: grid; gap: 10px; align-content: start; min-width: 0; }
.xp-ch-a { display: grid; gap: 4px; align-content: start; color: inherit; text-decoration: none; min-width: 0; }
.xp-ch-cv { display: grid; place-items: center; aspect-ratio: 16 / 10; border-radius: 18px; background: var(--sunken) center / cover no-repeat; margin-bottom: 8px;
  color: var(--muted); font-size: 28px; font-weight: 800; box-shadow: var(--shadow); transition: transform var(--t-move) var(--ease); }
.xp-ch-a:hover .xp-ch-cv { transform: translateY(-2px); }
.xp-ch b { font-size: 15.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xp-ch small { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xp-fol { justify-self: start; height: 34px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--ink); color: var(--bg); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.xp-fol[aria-pressed="true"] { background: var(--sunken); color: var(--ink-2); }
.xp-fol:disabled { opacity: .6; }

/* 나라별로 보기 — 국기 + 나라 이름 + 행사 수. 윈도 데스크톱은 국기 이모지가 없어 국기 글자 범위만 Twemoji 국기 글꼴로(78KB, 쓰는 화면에서만 받는다).
   그것도 못 받으면 두 글자 코드 동그라미(pick-mix.js flagsReady 가 캔버스로 판정) */
@font-face { font-family: "Twemoji Country Flags"; font-display: swap; unicode-range: U+1F1E6-1F1FF;
  src: url("https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1.8/dist/TwemojiCountryFlags.woff2") format("woff2"); }
.xp-ccs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.xp-cc { display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 12px;
  border-radius: 18px; background: var(--sunken); color: inherit; text-decoration: none; transition: background var(--t-press) var(--ease), transform var(--t-move) var(--ease); min-width: 0; }
.xp-cc:hover { background: color-mix(in srgb, var(--ink) 8%, var(--sunken)); transform: translateY(-1px); }
.xp-cc-fl { grid-row: span 2; width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; background: var(--surface);
  font-size: 26px; line-height: 1; font-family: "Twemoji Country Flags", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; box-shadow: 0 1px 2px rgba(20,20,30,.08); }
.xp-cc-fl.code { font-family: inherit; font-size: 14px; font-weight: 800; letter-spacing: .04em; color: var(--ink-2); }
.xp-cc b { align-self: end; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xp-cc small { align-self: start; font-size: 13px; color: var(--muted); }

/* 맞춤 안내 한 줄 · 「지금 많이 보는 행사」 머리 · 나라 목록 화면 */
.xp-fit { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 14px; color: var(--muted); }
.xp-fit:empty { min-height: 30px; }   /* 허브는 paintChips 가 늘 채운다 — 비어 있는 동안 자리만 */
.xp-fit a { color: var(--ink); font-weight: 700; text-decoration: none; padding: 4px 10px; border-radius: 999px; background: var(--sunken); }
.xp-fit a:hover { background: var(--accent-wash); }
.xp-cap { margin: 4px 0 2px; font-size: 13px; font-weight: 700; color: var(--muted); }
:root.embed .xp-back { display: none; }   /* 앱은 상단바 「뒤로」가 있다 */

/* 나라 화면 /explore?country=XX (explore-country.js) — 루마 /seoul/map: 데스크톱 왼쪽 날짜순 목록 + 오른쪽 붙은 지도, 모바일 위 작은 지도 + 목록.
   .xp-back(돌아가기)은 shell-v2.css — 지도·피드·Channel 과 같은 모양. 첫 칠에서 허브 뼈대를 숨긴다(xc-boot, explore.html) */
:root.xc-boot .xp:not(.xc-page) > * { visibility: hidden; }
.xp.xc-page { max-width: 1320px; gap: 22px; }
.xc-top { gap: 10px; }
.xc-h { display: flex; align-items: center; gap: 14px; min-width: 0; }
.xc-h h1 { min-width: 0; text-wrap: balance; }
.xc-fl { flex: none; }
.xc-when { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.xc-when em { font-style: normal; font-weight: 600; opacity: .6; font-variant-numeric: tabular-nums; margin-left: 2px; }
.xc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 32px; align-items: start; }
.xc-list { order: 1; display: grid; gap: 26px; min-width: 0; }
.xc-mapw { order: 2; position: sticky; top: calc(var(--nav-h, 0px) + var(--sh-g, 0px) + 20px); height: calc(100vh - var(--nav-h, 0px) - var(--sh-g, 0px) * 2 - 40px); min-height: 420px;
  border-radius: 22px; overflow: hidden; background: var(--sunken); box-shadow: var(--shadow); }
.xc.nomap { grid-template-columns: minmax(0, 720px); }
.xc.nomap .xc-mapw { display: none; }
.xc-map { position: absolute; inset: 0; }
.xc-msg { position: absolute; inset: auto 16px 16px; margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--surface); color: var(--ink-2); font-size: 14px; box-shadow: var(--shadow); }
.xc-sec { display: grid; gap: 2px; }
.xc-day { position: sticky; top: calc(var(--nav-h, 0px) + var(--sh-g, 0px)); z-index: 2; display: flex; align-items: baseline; gap: 8px; margin: 0 0 6px; padding: 6px 0;
  background: var(--bg); font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.xc-day span { font-size: 13px; font-weight: 600; color: var(--muted); }
.xc-row { grid-template-columns: 64px minmax(0, 1fr) auto; }
.xc-row.on { background: var(--sunken); }
.xc-row.on .xp-tx b { color: var(--ink); }
.xc-rec { position: static; align-self: start; margin-top: 4px; }
.xc-big, .xc-x { display: none; }
.xc-card { display: none; }
@media (max-width: 899px) {
  .xp.xc-page { gap: 16px; }
  .xc { grid-template-columns: 1fr; gap: 20px; }
  .xc-mapw { order: 0; position: relative; top: auto; height: auto; min-height: 0; aspect-ratio: 16 / 9; border-radius: 20px; }
  .xc-day { top: var(--nav-h, 0px); }
  :root.embed .xc-day { top: var(--app-top, 52px); }
  .xc-big { display: inline-flex; position: absolute; left: 12px; bottom: 12px; z-index: 3; align-items: center; gap: 6px; height: 38px; padding: 0 14px 0 12px; border: 0;
    border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
    box-shadow: 0 2px 6px rgba(20,20,30,.12), 0 10px 24px -10px rgba(20,20,30,.35); }
  .xc-big .v2-ic { width: 18px; height: 18px; }
  /* 큰 지도 — 화면을 덮는다(셸 탭 바·상단바 위). 핀을 누르면 아래 카드 */
  :root.xc-full { overflow: hidden; }
  :root.xc-full .xc-mapw { position: fixed; inset: 0; z-index: 80; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
  :root.embed.xc-full .xc-mapw { top: var(--app-top, 52px); }
  :root.xc-full .xc-big { display: none; }
  :root.xc-full .xc-x { display: grid; place-items: center; position: absolute; left: 14px; top: calc(14px + var(--safe-top, 0px)); z-index: 3; width: 44px; height: 44px; border: 0;
    border-radius: 999px; background: var(--surface); color: var(--ink); cursor: pointer; box-shadow: var(--shadow); }
  :root.embed.xc-full .xc-x { top: 14px; }
  .xc-x .v2-ic { width: 20px; height: 20px; }
  :root.xc-full .xc-card.on { display: block; position: absolute; left: 12px; right: 12px; bottom: calc(14px + var(--safe-bottom, 0px)); z-index: 3;
    padding: 6px; border-radius: 20px; background: var(--surface); box-shadow: 0 4px 12px rgba(20,20,30,.12), 0 18px 40px -16px rgba(20,20,30,.45); }
  .xc-card .xc-row { margin: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  :root.xc-full .xc-card.on { animation: xc-up .22s cubic-bezier(.2,.8,.2,1); }
  @keyframes xc-up { from { transform: translateY(14px); opacity: 0; } }
}

/* 메타버스 룸 */
.xp-mvs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (min-width: 900px) { .xp-mvs .xp-mv:nth-child(n+4) { display: none; } }   /* 데스크톱은 한 줄(미리보기) — 나머지는 「더보기」 */
.xp-mv { display: grid; gap: 3px; align-content: start; color: inherit; text-decoration: none; min-width: 0; }
.xp-mv-ph { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; background: var(--sunken); margin-bottom: 8px; box-shadow: var(--shadow); }
.xp-mv-ph img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease); }
.xp-mv:hover .xp-mv-ph img { transform: scale(1.03); }
.xp-live { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px;
  background: rgba(16,16,22,.62); color: #fff; font-size: 12px; font-weight: 800; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.xp-live i { width: 7px; height: 7px; border-radius: 50%; background: #FF5364; box-shadow: 0 0 0 3px rgba(255,83,100,.3); }
.xp-mv b { font-size: 15.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xp-mv small { font-size: 13px; color: var(--muted); }

/* 행사하기 좋은 공간 — 카드(.vn-card.mini)는 공간 화면과 같은 모양(venues.css, 보일 때 싣는다). 데스크톱은 한 줄 미리보기, 좁은 화면은 옆으로 넘긴다 */
.xp-vns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.xp-vns > :nth-child(n+5) { display: none; }
.xp-vns > .hm-sk { aspect-ratio: 4 / 3; border-radius: 14px; }

.xp :focus-visible { outline: 2px solid #F12E82; outline-offset: 2px; }
.xp-find input:focus-visible { outline: 0; }
.xp ::selection { background: color-mix(in srgb, #F12E82 22%, transparent); }

@media (max-width: 899px) {
  .xp { padding: 18px 16px 32px; gap: 30px; }
  .xp #secs { gap: 32px; }
  .xp-top h1 { font-size: 26px; }
  .xp-find { height: 50px; border-radius: 16px; }
  /* 칩은 한 줄로 넘긴다 — 화면 끝까지 */
  .xp-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .xp-chips::-webkit-scrollbar { display: none; }
  .xp-near-b { grid-template-columns: 1fr; gap: 12px; }
  .xp-mini { aspect-ratio: 16 / 9; border-radius: 20px; }
  .xp-list.wide { grid-template-columns: 1fr; }
  .xp-chs, .xp-mvs { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 4px 16px 16px; scroll-padding-inline: 16px; gap: 12px; }
  .xp-chs::-webkit-scrollbar, .xp-mvs::-webkit-scrollbar { display: none; }
  .xp-ch { flex: 0 0 200px; scroll-snap-align: start; }
  .xp-ccs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .xp-cc { padding: 10px; column-gap: 10px; }
  .xp-mv { flex: 0 0 min(260px, 72%); scroll-snap-align: start; }
  .xp-vns { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 4px 16px 16px; scroll-padding-inline: 16px; gap: 12px; }
  .xp-vns::-webkit-scrollbar { display: none; }
  .xp-vns > * { flex: 0 0 150px; scroll-snap-align: start; }
  .xp-vns > :nth-child(n+5) { display: block; }
}
/* 앱 탭(?embed=1&tab=1) — 상단바 없음, 아래는 탭바만큼 */
:root.embed.tabview .xp { padding-top: 14px; padding-bottom: var(--tab-clear, 96px); }
/* 앱 호스트 프레임(나라 목록·관심사에서 연 화면) — 셸 유리 상단바 아래부터 */
:root.embed:not(.tabview) .xp { padding-top: calc(var(--app-top, 52px) + 12px); }
@media (prefers-reduced-motion: reduce) { .xp-mv-ph img, .xp-ch-cv, .xp-cc { transition: none; } }
