/* 지역 테스트 (/where/ · /where/{id}/ · /where/types/). 머리·꼬리·글자·색·항로·엽서·밤 우편 블록은 landing.css 그대로 쓰고,
   여기엔 이 페이지들에만 있는 것만 둔다. 지역 색은 랜딩 카드의 네 가지 옅은 색(--morning·--noon·--blush·--dusk) 안에서 */
.where [hidden] { display: none !important; }
.where button:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; }
.t-morning { background: var(--morning); }
.t-noon { background: var(--noon); }
.t-blush { background: var(--blush); }
.t-dusk { background: var(--dusk); }
.where h1 { letter-spacing: -0.03em; }
.where h1 em { font-style: normal; color: var(--vermilion-text); }

/* 버튼: 랜딩의 '앱 받기' 알약을 크게. 보조는 '웹에서 바로 쓰기' 밑줄 링크 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 0 30px; border: 0; border-radius: 999px;
  background: var(--indigo); color: #fff; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
  transition: background-color 0.15s ease, transform 0.12s ease;
}
.btn:hover { background: #1b2848; }
.btn:active { transform: scale(0.98); }
.btn svg { width: 18px; height: 18px; }
.btn-link { position: relative; font-size: 15px; color: var(--sub); border-bottom: 1px solid var(--card-edge); padding-bottom: 2px; }
.btn-link::after { content: ""; position: absolute; inset: -12px 0; }
.btn-link:hover { color: var(--ink); border-color: var(--ink); }
.w-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 32px; }
.w-lead { margin-top: 20px; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.7; color: var(--sub); }

/* 테스트 첫 화면: 랜딩 히어로처럼 왼쪽 글, 오른쪽 지역 카드 묶음 */
.w-intro { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 32px; padding-block: 36px 96px; }
.w-intro h1 { font-size: clamp(36px, 5.4vw, 62px); line-height: 1.3; }
.w-collage { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: 100%; max-width: 460px; margin-inline: auto; padding-bottom: 40px; }
.w-collage li { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 24px; }
.w-collage li:nth-child(even) { transform: translateY(40px); }
.w-collage img { width: 88%; height: auto; }

/* 질문: 서울에서 일본까지 항로 위를 노리가 한 칸씩 달린다 */
/* 바닥글이 질문 바로 밑으로 올라오지 않게 한 화면을 채운다 */
.w-quiz { max-width: 1040px; min-height: calc(100svh - 77px); margin-inline: auto; padding-block: 16px 88px; }
.w-quiz .route { margin-top: 0; }
.w-quiz .route .runner { animation: none; left: calc(44px + var(--at, 0) * (100% - 172px)); transition: left 0.5s cubic-bezier(0.3, 0.7, 0.2, 1); }
.w-q { margin-top: 40px; }
.w-q.in { animation: rise 0.32s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
/* 질문이 한 줄이든 두 줄이든 보기 위치가 같게: 두 줄 높이를 잡고 아래에 붙인다 */
.w-qhead { font-size: clamp(26px, 7.2vw, 40px); min-height: calc(2.8em + 32px); display: flex; flex-direction: column; justify-content: flex-end; }
.w-count { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; color: var(--vermilion-text); font-variant-numeric: tabular-nums; }
#question { margin-top: 10px; font-size: 1em; line-height: 1.4; letter-spacing: -0.03em; }
#question:focus { outline: none; }
.w-choices { margin-top: 28px; display: grid; gap: 12px; }
.w-choice {
  display: flex; align-items: center; width: 100%; min-height: 64px; padding: 16px 22px; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  font: inherit; font-size: 16.5px; font-weight: 500; line-height: 1.5; color: var(--ink); cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
/* 터치 화면은 누른 뒤에도 :hover 가 남아 다음 질문의 같은 자리 보기가 골라진 것처럼 보인다 */
@media (hover: hover) { .w-choice:hover { border-color: var(--indigo); background: var(--card); } }
.w-choice.picked { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.w-back { display: block; margin-top: 20px; min-height: 44px; padding: 0 4px; background: none; border: 0; font: inherit; font-size: 14px; color: var(--faint); cursor: pointer; }
.w-back:hover { color: var(--ink); }

/* 지역 페이지: 히어로는 랜딩처럼 왼쪽 글, 오른쪽 그림 카드 */
.w-hero { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "head art" "body art"; column-gap: 64px; padding-block: 32px 80px; }
.w-head { grid-area: head; align-self: end; }
.w-art { grid-area: art; }
.w-body { grid-area: body; }
.w-hero h1 { font-size: clamp(40px, 5.6vw, 68px); line-height: 1.25; }
.w-tag { margin-top: 12px; font-size: clamp(18px, 1.8vw, 22px); font-weight: 500; line-height: 1.5; color: var(--ink); }
.w-art { position: relative; display: grid; place-items: center; aspect-ratio: 1; margin: 0; border-radius: 32px; }
.w-art img { width: 86%; height: auto; }
.w-ja { position: absolute; top: 24px; right: 22px; writing-mode: vertical-rl; font-family: 'Klee One', serif; font-weight: 600; font-size: 22px; letter-spacing: 0.12em; color: var(--indigo); opacity: 0.55; }
.w-traits { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.w-traits li { padding: 6px 14px; border: 1px solid var(--card-edge); border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--indigo); }
.w-desc { margin-top: 20px; max-width: 34em; font-size: 16.5px; line-height: 1.8; color: var(--sub); }

.w-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; padding-block: 72px; border-top: 1px solid var(--line); }
.w-sec { min-width: 0; }
.w-sec h2 { font-size: clamp(22px, 2.3vw, 28px); line-height: 1.4; }
.w-moments { margin-top: 20px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.w-moments li { display: flex; align-items: flex-start; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 16.5px; font-weight: 500; line-height: 1.55; }
.w-moments .n {
  flex: none; width: 28px; height: 28px; margin-top: -1px; border: 1.5px solid var(--vermilion); border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--vermilion-text); font-variant-numeric: tabular-nums;
}
.w-pair { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.w-mini { display: flex; flex-direction: column; padding: 12px 18px 20px; border-radius: 24px; }
.w-mini img { width: 84%; height: auto; margin-inline: auto; transition: transform 0.25s ease; }
.w-mini:hover img { transform: translateY(-4px); }
.w-mini span { margin-top: 4px; font-size: 17px; font-weight: 700; color: var(--ink); }
.w-mini small { display: block; font-size: 12.5px; font-weight: 600; color: var(--sub); }
.w-fact { margin-top: 16px; font-size: 16.5px; line-height: 1.8; color: var(--sub); }
/* 랜딩 히어로의 엽서를 제자리에 놓는다 */
.w-sec .pc { position: relative; left: auto; bottom: auto; width: auto; max-width: 460px; margin-top: 28px; font-size: 15px; transform: rotate(-1.2deg); animation: none; }

/* 공유 */
.w-share { padding-block: 72px; border-top: 1px solid var(--line); }
.w-share h2 { font-size: clamp(24px, 2.6vw, 32px); }
.w-share p { max-width: 32em; margin-top: 8px; font-size: 15.5px; color: var(--sub); }
.w-own { display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 48px; max-width: 860px; }
.w-card { width: 100%; height: auto; border-radius: 16px; box-shadow: 0 1px 0 var(--card-edge), 0 24px 40px -24px rgba(30, 36, 51, 0.45); }
.w-own .btn { margin-top: 24px; }
.w-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--indigo); cursor: pointer;
  transition: border-color 0.15s ease;
}
.chip:hover { border-color: var(--indigo); }
.chip svg { width: 18px; height: 18px; }
.w-status { min-height: 1.6em; margin-top: 10px; font-size: 14px; color: var(--sub); overflow-wrap: anywhere; }
.w-friend { text-align: center; }
.w-friend .btn { margin-top: 20px; min-width: 260px; }
.w-friend .w-row { justify-content: center; }
.w-offscreen { position: fixed; top: 0; left: -9999px; opacity: 0; }

.w-others { padding-block: 72px; border-top: 1px solid var(--line); }
.cta + .w-others { border-top: 0; padding-top: 8px; }
.w-others-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.w-others h2 { font-size: clamp(22px, 2.3vw, 28px); }
.w-others ul { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 28px; }
.w-others a { display: grid; justify-items: center; gap: 10px; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.w-others a > span { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 20px; }
.w-others img { width: 86%; height: auto; transition: transform 0.25s ease; }
.w-others a:hover img { transform: translateY(-3px); }

/* 목록 */
.w-list-head { max-width: 720px; padding-block: 36px 48px; }
.w-list-head h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.3; }
.w-types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding-bottom: 96px; }
.w-type { display: flex; flex-direction: column; height: 100%; padding: 16px 22px 24px; border-radius: 24px; }
.w-type img { width: 100%; height: auto; transition: transform 0.25s ease; }
.w-type:hover img { transform: translateY(-4px); }
.w-type { position: relative; }
.w-type-name { margin-top: 4px; }
.w-type-name b { font-family: var(--display); font-size: 22px; font-weight: 700; color: var(--indigo); }
/* 일본어 이름은 히어로처럼 오른쪽 위에 세로로 */
.w-type-name span { position: absolute; top: 18px; right: 16px; writing-mode: vertical-rl; font-family: 'Klee One', serif; font-weight: 600; font-size: 15px; letter-spacing: 0.1em; color: var(--indigo); opacity: 0.5; }
.w-type-tag { margin-top: 6px; font-size: 14.5px; line-height: 1.55; color: var(--sub); }

.cta .web-link { color: var(--night-text); border-color: rgba(239, 233, 221, 0.35); }
.cta .web-link:hover { color: #fff; border-color: #fff; }

@media (max-width: 900px) {
  .w-intro { grid-template-columns: 1fr; gap: 40px; padding-block: 20px 56px; }
  .w-collage { max-width: 320px; gap: 12px; }
  .w-collage li:nth-child(even) { transform: translateY(28px); }
  .w-q { margin-top: 24px; }
  .w-hero { grid-template-columns: 1fr; grid-template-areas: "head" "art" "body"; row-gap: 24px; padding-block: 16px 56px; }
  .w-art { border-radius: 28px; }
  .w-grid { grid-template-columns: 1fr; gap: 56px; padding-block: 56px; }
  .w-share, .w-others { padding-block: 56px; }
  .w-own { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .w-share p { margin-inline: auto; text-wrap: balance; }
  .w-hero .w-traits { margin-top: 4px; }
  .w-card { width: 200px; margin-inline: auto; }
  .w-own .w-row { justify-content: center; }
  .w-others ul { grid-template-columns: repeat(4, 1fr); gap: 16px 10px; }
  .w-types { grid-template-columns: repeat(2, 1fr); gap: 12px; padding-bottom: 64px; }
  .w-list-head { padding-block: 20px 32px; }
}
@media (min-width: 901px) {
  /* 넓은 화면의 질문: 왼쪽 질문, 오른쪽 보기 */
  .w-q { display: grid; grid-template-columns: 1fr 1.1fr; align-items: start; gap: 64px; margin-top: 56px; }
  .w-q { grid-template-areas: "head choices" "back choices"; grid-template-rows: auto 1fr; }
  .w-qhead { grid-area: head; min-height: 0; justify-content: flex-start; font-size: 44px; }
  .w-choices { grid-area: choices; margin-top: 0; }
  .w-back { grid-area: back; align-self: start; margin-top: 24px; justify-self: start; }
}
@media (max-width: 560px) {
  .w-type { padding: 12px 14px 18px; border-radius: 20px; }
  .w-type-name b { font-size: 18px; }
  .w-type-tag { font-size: 13.5px; }
  .w-sec .pc { font-size: 13.5px; }
  .w-type-name span { top: 12px; right: 10px; font-size: 13px; }
  .w-own .btn, .w-friend .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .w-quiz .route .runner, .btn, .w-choice, .w-mini img, .w-others img, .w-type img { transition: none; }
  .w-q.in { animation: none; }
}

/* 일본어판: 그림 옆 세로 이름이 한글이라 한글 서체로 */
:is(.w-ja, .w-type-name span):lang(ko) { font-family: 'Gowun Batang', serif; font-weight: 700; }
.w-nw { white-space: nowrap; }
/* 좁은 폭에서 일본어 머리글 버튼이 두 줄로 꺾이지 않게 */
.where .top :is(nav a, .dl) { white-space: nowrap; }
/* 머리글: 좁으면 간격을 줄이고, 더 좁으면 본문에도 있는 링크는 숨기고 언어 바꾸기만 남긴다 */
@media (max-width: 430px) { .where .top { gap: 12px; } .where .top nav { gap: 12px; } }
@media (max-width: 360px) { .where .top nav a:not([hreflang]) { display: none; } }
/* 일본어는 글자마다 꺾여 한 글자만 다음 줄로 떨어진다: 제목은 <wbr> 구절에서만, 짧은 글은 줄 길이를 고르게 */
:lang(ja) .where :is(h1, h2) { word-break: keep-all; overflow-wrap: anywhere; }
:lang(ja) .where :is(.w-choice, .w-moments li, .w-mini small, .w-type-tag, .web-link) { text-wrap: balance; }
.where .btn-link { white-space: nowrap; }

/* 접근성: 짙은 남색 안에서는 초점 테두리를 흰색으로, 옅은 글씨는 4.5:1 이상으로 */
.where .cta a:focus-visible { outline-color: #fff; }
.where :is(.w-ja, .w-type-name span) { opacity: 1; color: #5a6486; }
.where :is(.w-back, footer .share-note) { color: var(--sub); }
.w-more { display: inline-block; margin-top: 20px; }
