:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #17232d;
  --blue: #2558e8;
  --muted: #6f7780;
  --line: #e1e6ec;
  --selected: #eef3ff;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
input {
  font: inherit;
}
button,
summary {
  cursor: pointer;
}
button {
  transition:
    background 0.18s,
    transform 0.18s,
    border-color 0.18s;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 5px;
}
h1:focus {
  outline: none;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
img {
  display: block;
  max-width: 100%;
}
.masthead,
main,
footer {
  width: min(1440px, calc(100% - 112px));
  margin-inline: auto;
}
.masthead {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  font-size: 23px;
  font-weight: 720;
  letter-spacing: -0.8px;
  display: flex;
  align-items: baseline;
  gap: 18px;
}
.brand span {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
}
.edition {
  font-size: 14px;
  color: var(--muted);
}
.edition:hover,
.text-button:hover,
.text-link:hover {
  color: var(--blue);
}
.intro {
  display: grid;
  grid-template-columns: 44% 56%;
  min-height: min(680px, calc(100svh - 186px));
  align-items: center;
  padding-block: 12px 30px;
}
.intro-copy {
  padding-right: 28px;
}
.intro h1 {
  font-size: clamp(32px, 4vw, 64px);
  line-height: 1.3;
  font-weight: 760;
  letter-spacing: -0.045em;
}
.intro h1 span {
  color: var(--blue);
  white-space: nowrap;
}
.lead {
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 22px);
  line-height: 1.8;
  margin: 30px 0 36px;
}
.primary,
.secondary {
  min-height: 54px;
  padding: 15px 28px;
  border-radius: 10px;
  font-weight: 650;
  font-size: 16px;
  line-height: 1.4;
  border: 1px solid var(--blue);
}
.primary {
  background: var(--blue);
  color: #fff;
}
.primary:hover:not(:disabled) {
  background: #1746cb;
  border-color: #1746cb;
}
.secondary {
  background: #fff;
  color: var(--blue);
}
.secondary:hover:not(:disabled) {
  background: var(--selected);
}
#start {
  min-width: 208px;
  display: inline-flex;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  font-size: 19px;
}
.fine {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
}
.intro .fine {
  margin-top: 14px;
}
.hero-art {
  height: clamp(480px, calc(100svh - 220px), 670px);
  min-height: 480px;
  max-height: 670px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--selected);
}
.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% center;
}
footer {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px;
  padding: 25px 0 28px;
  font-size: 13px;
  color: var(--muted);
}
footer > span {
  white-space: nowrap;
}
details {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.85;
}
summary {
  list-style: none;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  color: var(--muted);
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  flex-shrink: 0;
}
details[open] > summary::after {
  content: "−";
}
details p {
  margin: 14px 0;
}
footer details {
  max-width: 850px;
  font-size: 13px;
  margin-top: -10px;
}
.quiz {
  max-width: 780px;
  margin: 28px auto 74px;
  min-height: calc(100svh - 310px);
}
.quiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.text-button {
  border: 0;
  background: none;
  color: var(--muted);
  min-height: 44px;
  padding: 8px 0;
  font-size: 14px;
}
#step {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
progress {
  width: 100%;
  height: 3px;
  border: 0;
  display: block;
  appearance: none;
  background: var(--line);
  margin-bottom: 38px;
}
progress::-webkit-progress-bar {
  background: var(--line);
  border-radius: 9px;
}
progress::-webkit-progress-value {
  background: var(--blue);
  border-radius: 9px;
}
progress::-moz-progress-bar {
  background: var(--blue);
}
#question-title {
  font-size: 32px;
  line-height: 1.5;
  letter-spacing: -0.035em;
  font-weight: 700;
  max-width: 740px;
  margin-bottom: 30px;
}
.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.option {
  text-align: left;
  display: flex;
  align-items: center;
  gap: 18px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px 20px;
  min-height: 100px;
}
.option:hover {
  border-color: #a8bced;
}
.option[aria-pressed="true"] {
  background: var(--selected);
  border-color: var(--blue);
}
.option-letter {
  border: 1px solid var(--line);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: var(--muted);
  flex-shrink: 0;
}
.option[aria-pressed="true"] .option-letter {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.option strong {
  font-size: 16px;
  font-weight: 550;
  line-height: 1.6;
}
.option small {
  display: none;
}
.result {
  max-width: 1100px;
  margin: 20px auto 40px;
}
.result-heading {
  margin-bottom: 26px;
}
.result-heading h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.4;
}
.result-layout {
  display: grid;
  grid-template-columns: minmax(0, 540px) minmax(0, 1fr);
  align-items: center;
  gap: 70px;
}
.result-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 45px #17232d09;
}
.result-art {
  aspect-ratio: 1.45;
  background: var(--selected);
  position: relative;
}
.result-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% center;
}
#art-unavailable {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 15px;
  padding: 20px;
  text-align: center;
}
.poster-body {
  padding: 25px 28px 20px;
}
.persona {
  color: var(--blue);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 650;
}
.city-name {
  font-size: 54px;
  letter-spacing: -0.045em;
  font-weight: 750;
  line-height: 1.25;
  margin: 5px 0 10px;
  overflow-wrap: anywhere;
}
.city-name.long-city {
  font-size: 34px;
}
.result-line {
  font-size: 20px;
  line-height: 1.7;
  color: var(--ink);
  font-weight: 550;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  margin-top: 17px;
}
.tags span + span::before {
  content: "·";
  margin-inline: 12px;
}
.card-foot {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  margin-top: 23px;
  gap: 12px;
}
.result-invitation h2 {
  font-size: 34px;
  line-height: 1.5;
  letter-spacing: -0.035em;
  font-weight: 650;
}
.result-invitation p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  margin: 18px 0 32px;
}
.share-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.share-actions button {
  width: 100%;
}
#restart {
  display: block;
  margin: 12px auto 0;
}
#share-fallback {
  margin-top: 20px;
}
#share-fallback label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
#share-url {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  background: #fff;
  color: var(--ink);
}
#image-fallback {
  margin-top: 20px;
}
#saved-image {
  width: 100%;
  border-radius: 10px;
  margin-top: 12px;
}
#card-status {
  font-size: 14px;
  line-height: 1.8;
  margin-top: 20px;
}
#retry {
  margin-top: 12px;
}
.result-details {
  margin-top: 30px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.result-details > summary {
  justify-content: flex-start;
  gap: 14px;
  font-size: 13px;
}
.reality {
  margin: 28px 0;
}
.reality h2 {
  font-size: 20px;
  color: var(--ink);
}
.text-link,
.source-note a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.fact-card {
  border: 1px solid var(--line);
  padding: 20px;
  border-radius: 10px;
}
.fact-card h3 {
  color: var(--ink);
  font-size: 18px;
}
.fact-card dt {
  font-size: 12px;
}
.fact-card dd {
  margin: 4px 0 14px;
  font-size: 22px;
  color: var(--ink);
}
.toast {
  position: fixed;
  bottom: max(26px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 14px;
  line-height: 1.7;
  width: max-content;
  max-width: calc(100% - 32px);
  z-index: 10;
  box-shadow: 0 8px 32px #17232d20;
}
@media (max-width: 1050px) {
  .masthead,
  main,
  footer {
    width: calc(100% - 64px);
  }
  .intro {
    grid-template-columns: 46% 54%;
  }
  .intro h1 {
    font-size: clamp(28px, 3.7vw, 40px);
  }
  .hero-art {
    min-height: 440px;
  }
  .result-layout {
    gap: 32px;
    grid-template-columns: 55% minmax(0, 1fr);
  }
  .result-invitation h2 {
    font-size: 27px;
  }
  .poster-body {
    padding: 22px;
  }
}
@media (max-width: 700px) {
  .masthead,
  main,
  footer {
    width: calc(100% - 40px);
  }
  .masthead {
    height: 76px;
    gap: 10px;
  }
  .brand {
    font-size: 20px;
    gap: 12px;
  }
  .brand span {
    font-size: 13px;
  }
  .edition {
    font-size: 12px;
  }
  .intro {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 30px;
    padding: 23px 0 28px;
    min-height: 0;
  }
  .intro-copy {
    padding: 0;
  }
  .intro h1 {
    font-size: clamp(29px, 8vw, 46px);
    line-height: 1.35;
  }
  .lead {
    font-size: 15px;
    line-height: 1.7;
    margin: 19px 0 23px;
  }
  #start {
    width: 100%;
    min-height: 56px;
    font-size: 17px;
    justify-content: center;
    gap: 20px;
  }
  .intro .fine {
    text-align: center;
    margin-top: 10px;
    font-size: 12px;
  }
  .hero-art {
    height: clamp(260px, 76vw, 400px);
    min-height: 0;
    border-radius: 12px;
  }
  .hero-art img {
    object-position: 60% 63%;
  }
  footer {
    padding-block: 20px 28px;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
  }
  footer details {
    margin-top: -10px;
    font-size: 12px;
  }
  footer details[open] {
    width: 100%;
    margin-top: 0;
  }
  .quiz {
    margin: 6px auto 36px;
    min-height: calc(100svh - 220px);
  }
  .quiz-top {
    margin-bottom: 10px;
  }
  progress {
    margin-bottom: 28px;
  }
  #question-title {
    font-size: 25px;
    margin-bottom: 25px;
  }
  .options {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .option {
    min-height: 76px;
    padding: 17px;
    gap: 16px;
  }
  .option strong {
    font-size: 15px;
  }
  .result {
    margin: 12px 0 20px;
  }
  .result-heading {
    margin-bottom: 20px;
  }
  .result-heading h1 {
    font-size: clamp(21px, 5.9vw, 28px);
    line-height: 1.5;
  }
  .result-layout {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
  }
  .result-art {
    aspect-ratio: 1.5;
  }
  .result-card {
    border-radius: 12px;
  }
  .poster-body {
    padding: 20px 20px 17px;
  }
  .city-name {
    font-size: 44px;
    margin: 4px 0 9px;
  }
  .city-name.long-city {
    font-size: clamp(26px, 7.2vw, 34px);
  }
  .persona {
    font-size: 14px;
  }
  .result-line {
    font-size: 18px;
  }
  .tags {
    font-size: 12px;
    margin-top: 15px;
  }
  .tags span + span::before {
    margin-inline: 9px;
  }
  .card-foot {
    font-size: 10px;
    margin-top: 20px;
  }
  .result-invitation {
    display: none;
  }
  .share-actions {
    gap: 10px;
  }
  .share-actions button {
    min-height: 50px;
    padding: 12px;
    font-size: 15px;
  }
  #restart {
    margin-top: 6px;
  }
  .result-details {
    margin-top: 18px;
  }
  .facts {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 2200px) {
  :root {
    font-size: 20px;
  }
  .masthead,
  main,
  footer {
    width: min(2200px, calc(100% - 160px));
  }
  .masthead {
    height: 150px;
  }
  .brand {
    font-size: 32px;
  }
  .brand span,
  .edition {
    font-size: 22px;
  }
  .intro {
    min-height: 880px;
  }
  .hero-art {
    max-height: none;
    min-height: 760px;
  }
  .intro h1 {
    font-size: 80px;
  }
  .lead {
    font-size: 30px;
  }
  .fine,
  footer,
  footer details,
  .result-details > summary,
  .card-foot {
    font-size: 18px;
  }
  .quiz {
    max-width: 1100px;
  }
  #question-title {
    font-size: 42px;
  }
  .option strong {
    font-size: 22px;
  }
  .option {
    min-height: 125px;
  }
  .text-button,
  #step,
  .primary,
  .secondary {
    font-size: 20px;
  }
  .result {
    max-width: 1600px;
  }
  .result-layout {
    grid-template-columns: minmax(0, 800px) minmax(0, 1fr);
  }
  .result-heading h1,
  .result-invitation h2 {
    font-size: 42px;
  }
  .result-line,
  .persona,
  .tags,
  .result-invitation p {
    font-size: 22px;
  }
}
@media (min-width: 3600px) {
  .masthead,
  main,
  footer {
    width: min(3000px, calc(100% - 240px));
  }
  .fine,
  footer,
  footer details,
  details,
  .result-details > summary,
  .card-foot,
  .text-button,
  #step {
    font-size: 24px;
  }
  .intro {
    min-height: 1250px;
  }
  .hero-art {
    min-height: 1100px;
  }
  .intro h1 {
    font-size: 100px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
