@font-face {
  font-family: 'Soul Display';
  src: url('assets/soul-display.woff') format('woff');
  font-weight: 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f5f1e7;
  --ink: #252820;
  --forest: #21271f;
  --soft: #4c4a3d;
  --line: #d2c9b7;
  --apricot: #f3bb8d;
  --clay: #8d4230;
  --serif: 'Songti SC', 'Noto Serif CJK SC', SimSun, Georgia, serif;
  --display: 'Soul Display', var(--serif);
  --sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Noto Sans CJK SC', 'Microsoft YaHei', sans-serif;
  --latin: Georgia, serif;
  --page: min(1320px, 100% - clamp(36px, 10vw, 150px));
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.65 var(--sans); }
body:has(dialog[open]) { overflow: hidden; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid #ad582f; outline-offset: 4px; }
h1, h2, p, figure { margin: 0; }
h1, h2 { font-family: var(--serif); line-height: 1.17; font-weight: 700; }
img { display: block; max-width: 100%; }
.frame { width: var(--page); margin-inline: auto; }
.masthead { background: var(--paper); }
.topbar { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand, .top-actions { display: flex; align-items: center; gap: clamp(12px, 2.3vw, 34px); }
.brand { font-weight: 700; gap: 10px; white-space: nowrap; }
.brand-mark { color: var(--clay); font-size: 1.6rem; line-height: 1; }
.brand-en { margin-inline-start: 5px; font: 700 .8rem/1 var(--latin); letter-spacing: .12em; color: var(--soft); }
.nav-cities, .header-start { font-size: .875rem; }
.nav-cities { text-underline-offset: 5px; }
.nav-cities:hover { text-decoration: underline; }
.header-start { background: transparent; border: 1px solid var(--line); border-radius: 100px; padding: 8px 17px; min-height: 42px; }
.header-start:hover { border-color: var(--ink); background: #e9e3d6; }

.cover {
  background: var(--forest); color: #fff8ec;
  background-image: radial-gradient(ellipse at 80% 45%, #343a2e, transparent 69%);
  overflow: hidden;
}
.cover-layout {
  min-height: min(700px, calc(100svh - 74px));
  display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  align-items: center; gap: clamp(28px, 4.6vw, 76px); padding-block: clamp(44px, 7vw, 94px);
}
.cover-copy { min-width: 0; }
.eyebrow { font-size: .875rem; line-height: 1.45; font-weight: 700; letter-spacing: .115em; }
.cover-copy .eyebrow { color: #ffe5ce; display: flex; align-items: center; gap: 12px; }
.cover-copy .eyebrow::before { content: ''; flex: 0 0 23px; height: 1px; background: currentColor; }
.cover h1 { margin-top: 21px; font: 700 clamp(3.4rem, 6.7vw, 7rem)/1.1 var(--display); letter-spacing: -.075em; }
.cover h1 em { color: var(--apricot); font-style: normal; }
.cover-intro { color: #fff6e7; margin-top: clamp(17px, 2vw, 25px); font-size: clamp(1rem, 1.35vw, 1.12rem); line-height: 1.72; }
.cover-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 17px; margin-top: 25px; }
.cover-actions > span { color: #faf1e3; font-size: .9375rem; }
.sample-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 5px; color: #fff0de; font-size: .9375rem; text-decoration: underline; text-underline-offset: 5px; }
.cover-figure { align-self: center; min-width: 0; }
.cover-photo { background: #383b30; border: 1px solid #fae8ce75; padding: 5px; overflow: hidden; }
.cover-photo img { width: 100%; height: auto; }
.cover-caption { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); text-align: center; margin-top: 11px; color: #fff0de; font-size: .875rem; letter-spacing: .06em; }
.cover-caption span + span { border-left: 1px solid #fae8ce68; }
.button {
  display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent;
  min-height: 49px; border-radius: 100px; font-size: .95rem; font-weight: 700; padding: 11px 23px;
  transition: background .25s, border-color .25s, color .25s;
}
.warm { background: var(--apricot); color: #322316; }
.warm:hover { background: #ffcf9f; }
.dark { background: var(--forest); color: #fff9ed; }
.dark:hover { background: #444d3c; }
.outline { border-color: #a59b86; color: var(--ink); background: none; }
.outline:hover { background: #ece3d3; }
.caption-en { font: .8125rem/1.5 var(--latin); letter-spacing: .15em; }
.sample { background: #ebe5d7; scroll-margin-top: 24px; padding-block: clamp(40px, 7vw, 88px); }
.sample-layout { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: center; gap: clamp(28px, 7vw, 110px); }
.sample-copy .eyebrow { color: var(--clay); }
.sample-copy h2 { margin-top: 10px; font: 700 clamp(2rem, 4vw, 4.3rem)/1.25 var(--display); letter-spacing: -.055em; }
.sample-copy > p:not(.eyebrow) { margin-block: 17px; color: var(--soft); }
.sample-card { --city-ink: #344a32; width: min(100%, 530px); justify-self: end; }
.sample-card .postcard-photo { aspect-ratio: 1.92; }
.sample-city { font: 700 clamp(1.6rem, 3vw, 2.65rem)/1.3 var(--serif); margin: 8px 0 2px; }
.sample-city span { margin-left: 6px; font: 650 clamp(.95rem, 1.85vw, 1.15rem)/1.3 var(--sans); }
.sample-traits { color: #fff6e6; font-size: .9375rem; }
.atlas { padding-block: clamp(58px, 8vw, 110px); scroll-margin-top: 32px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 10px 25px; margin-bottom: 29px; }
.section-heading .eyebrow { color: var(--clay); font-family: var(--latin); }
.section-heading h2 { margin-top: 6px; font-size: clamp(2.15rem, 4.25vw, 4.65rem); letter-spacing: -.057em; }
.section-heading > p { color: var(--soft); font-size: .95rem; padding-bottom: 3px; }
.city-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 3vw, 40px) clamp(12px, 2.1vw, 30px); }
.city-card { appearance: none; background: none; border: 0; padding: 0; text-align: left; min-width: 0; }
.city-image { display: block; aspect-ratio: 1.65; overflow: hidden; background: var(--city-ink); }
.city-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s cubic-bezier(.22,.61,.36,1); }
.city-card:hover .city-image img { transform: scale(1.055); }
.city-label { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 0 8px; padding: 12px 0 8px; border-bottom: 1px solid var(--line); }
.city-label strong { font: 700 clamp(1.12rem, 2vw, 1.6rem)/1.2 var(--serif); }
.city-label small { font: .75rem/1.5 var(--latin); letter-spacing: .1em; color: var(--soft); }
.no-script { padding-block: 24px; }
.footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 18px; color: var(--soft); font-size: .875rem; font-weight: 560; }

.journey, .result-view { min-height: calc(100svh - 145px); display: grid; align-content: center; padding-block: clamp(30px, 6vw, 78px); }
.journey-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(31px, 7vw, 110px); align-items: center; }
.journey-copy { min-width: 0; }
.journey-copy > .back { margin-bottom: 20px; }
.back, .text-button {
  background: none; border: 0; padding: 5px 0; min-height: 42px; text-align: left;
  color: var(--soft); text-decoration: underline; text-underline-offset: 5px; font-size: .9rem;
}
.back:hover, .text-button:hover { color: var(--clay); }
.progress-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: var(--clay); }
.progress-text { font: 1rem/1 var(--latin); white-space: nowrap; }
.progress-text b { font-size: 1.5rem; }
.progress-steps { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; margin-top: 10px; }
.progress-steps i { height: 3px; background: #d6ccba; }
.progress-steps i.active { background: var(--clay); }
.question-title { font-size: clamp(1.9rem, 4vw, 3.65rem); letter-spacing: -.036em; margin: 23px 0 22px; }
.question-options { display: grid; border-top: 1px solid var(--line); }
.opt {
  display: grid; grid-template-columns: 30px 1fr 15px; align-items: center; gap: 11px; min-height: 55px;
  border: 0; border-bottom: 1px solid var(--line); padding: 10px 10px 10px 5px; background: transparent;
  text-align: left; font-size: clamp(.97rem, 1.3vw, 1.06rem); transition: background .18s;
}
.opt-key { color: var(--clay); font: 700 .95rem/1 var(--latin); }
.opt-mark { width: 10px; height: 10px; border-radius: 50%; border: 1px solid #a49a87; justify-self: center; }
@media (hover: hover) { .opt:hover { background: #ece3d2; } }
.opt[aria-pressed="true"] { background: #eadeca; }
.opt[aria-pressed="true"] .opt-mark { border: 3px solid var(--clay); }
.journey-photo { overflow: hidden; aspect-ratio: .96; background: #31473b; }
.journey-photo img { width: 100%; height: 100%; object-fit: cover; }
.journey-figure figcaption { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--soft); text-align: right; font: italic .9rem/1.5 var(--latin); letter-spacing: .08em; }
.stage { animation: stage-in .48s cubic-bezier(.21,.65,.35,1) both; }
@keyframes stage-in { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }

.result-layout { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); gap: clamp(28px, 7vw, 95px); align-items: center; }
.result-copy .eyebrow { color: var(--clay); }
.result-copy h1 { font-size: clamp(4.4rem, 10vw, 9rem); letter-spacing: -.10em; margin: 7px 0 7px -.06em; }
.result-copy h2 { font-size: clamp(1.37rem, 3vw, 2.4rem); margin: 6px 0 16px; }
.result-description { max-width: 37em; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 19px 0 22px; padding: 0; list-style: none; }
.tags li { border: 1px solid var(--line); padding: 3px 11px; border-radius: 100px; font-size: .82rem; color: #554c3c; }
.result-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.other-actions { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.postcard { background: var(--city-ink); background: color-mix(in srgb, var(--city-ink) 70%, #182117); color: #fff6e6; box-shadow: 0 18px 42px #40382c28; border: 10px solid #fff9ed; }
.postcard-photo { aspect-ratio: 1.52; overflow: hidden; }
.postcard-photo img { width: 100%; height: 100%; object-fit: cover; }
.postcard-copy { padding: clamp(15px, 3vw, 31px); }
.postcard-meta { display: flex; justify-content: space-between; align-items: center; gap: 9px; color: #fff0d9; font: .875rem/1.4 var(--latin); letter-spacing: .11em; }
.postcard-copy blockquote { margin: 12px 0 0; border-top: 1px solid #fff7e973; padding-top: 12px; font-family: var(--serif); line-height: 1.6; }
.toast-note { min-height: 1.5em; margin-top: 4px; color: var(--clay); font-size: .875rem; }
dialog { width: min(100% - 30px, 575px); max-height: calc(100dvh - 30px); padding: 0; border: 1px solid var(--line); color: var(--ink); background: var(--paper); overscroll-behavior: contain; }
dialog::backdrop { background: #141811bd; }
.dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 18px; }
.dialog-header h2 { font-size: 1.5rem; }
.dialog-close { min-width: 43px; min-height: 43px; border: 1px solid var(--line); border-radius: 50%; background: transparent; font-size: 1.35rem; line-height: 1; }
.dialog-photo { aspect-ratio: 1.65; width: 100%; object-fit: cover; background: #484838; }
.dialog-body { padding: 16px 18px 21px; display: flex; align-items: center; justify-content: space-between; gap: 10px 18px; flex-wrap: wrap; }
.dialog-body p { color: var(--soft); }
.share-image { width: min(100%, 400px); margin: auto; }
.share-link-field { width: 100%; padding: 7px 9px; font: inherit; }

@media (max-width: 760px) {
  :root { --page: calc(100% - 36px); }
  .topbar { min-height: 61px; }
  .brand-en { display: none; }
  .cover-layout { grid-template-columns: 1fr; min-height: 0; gap: 26px; padding-block: 32px 27px; }
  .cover h1 { font-size: clamp(3rem, 11vw, 5.25rem); margin-top: 12px; }
  .cover-intro { margin-top: 12px; }
  .cover-actions { margin-top: 16px; }
  .cover-figure { grid-row: 1; }
  .cover-photo { padding: 3px; }
  .cover-caption { margin-top: 7px; letter-spacing: 0; }
  .sample-link { min-height: 40px; }
  .sample-layout { grid-template-columns: 1fr; gap: 25px; }
  .sample-card { justify-self: stretch; }
  .sample-break { display: none; }
  .city-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-heading { margin-bottom: 20px; }
  .city-label { padding-top: 8px; }
  .city-label small { padding-block: 2px; font-size: .68rem; letter-spacing: .07em; }
  .journey, .result-view { min-height: calc(100svh - 132px); }
  .journey-layout, .result-layout { grid-template-columns: 1fr; }
  .journey-layout { gap: 26px; }
  .journey-copy > .back { margin-bottom: 13px; }
  .journey-photo { aspect-ratio: 2.28; }
  .journey-figure figcaption { margin-top: 6px; font-size: .79rem; }
  .result-layout { gap: 24px; }
  .postcard { border-width: 7px; }
  .postcard-photo { aspect-ratio: 1.65; }
}
@media (max-width: 355px) {
  .top-actions { gap: 9px; }
  .header-start { padding-inline: 11px; }
  .cover h1 { font-size: 3rem; }
  .result-actions .button { padding-inline: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.top-actions[hidden] { display: none; }
.dialog-photo img { width: 100%; height: 100%; object-fit: cover; }

@media (prefers-reduced-motion: no-preference) {
  .cover-photo img { animation: cover-in 1.25s cubic-bezier(.21,.65,.35,1) both; }
  .cover-copy > * { animation: stage-in .68s cubic-bezier(.21,.65,.35,1) both; }
  .cover-copy h1 { animation-delay: .06s; }
  .cover-copy .cover-intro, .cover-copy .cover-actions { animation-delay: .12s; }
}
@keyframes cover-in { from { transform: scale(1.035); opacity: .8; } to { transform: none; opacity: 1; } }
