:root {
  color-scheme: dark;
  --bg: #0c0d12;
  --panel: #15161d;
  --panel-alt: #181a22;
  --ink: #f4f1ed;
  --muted: #b7b5c0;
  --subtle: #8c8c9a;
  --line: #ffffff1d;
  --accent: #ffac73;
  --brand: #ffa56b;
  --font: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --mono: "Cascadia Mono", Consolas, monospace;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 300px; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible + label, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 4px;
}
[hidden] { display: none !important; }
h1, h2, h3, p, figure { margin: 0; }
p { line-height: 1.8; }
svg { display: block; width: 20px; height: 20px; flex: none; }
.wrap, .header-inner { width: min(1180px, calc(100% - 96px)); margin-inline: auto; }
.skip-link { position: fixed; left: 12px; top: 8px; transform: translateY(-180%); z-index: 10; padding: 10px; background: var(--panel); }
.skip-link:focus { transform: none; }
.header { height: 74px; border-bottom: 1px solid var(--line); background: #0d0e14; position: relative; z-index: 1; }
.header-inner { height: 100%; display: grid; align-items: center; grid-template-columns: 1fr auto 1fr; gap: 28px; }
.brand { display: inline-flex; gap: 12px; align-items: center; width: max-content; text-decoration: none; font-weight: 750; font-size: 16px; letter-spacing: .04em; }
.brand-mark { width: 32px; height: 32px; border: 1px solid #ffad767d; border-radius: 9px; background: #ffa56b14; display: grid; place-items: center; flex: none; }
.brand-mark span { width: 19px; height: 19px; display: block; background: var(--brand); clip-path: polygon(46% 4%, 58% 4%, 96% 94%, 75% 94%, 65% 70%, 34% 70%, 24% 94%, 3% 94%, 23% 47%, 45% 47%, 42% 57%, 60% 57%, 50% 32%, 40% 32%); }
.header nav { display: flex; gap: 28px; }
.nav-link, .text-button { background: none; color: var(--muted); border: 0; padding: 8px 2px; font-size: .875rem; text-decoration: none; }
.nav-link:hover, .text-button:hover { color: var(--accent); }
.header-start { justify-self: end; }
.button {
  display: inline-flex; justify-content: center; align-items: center; gap: 9px;
  border: 1px solid transparent; border-radius: 8px; min-height: 46px; padding: 10px 19px;
  font-weight: 720; font-size: .9rem; line-height: 1.35; text-decoration: none; white-space: nowrap;
  color: #1a100b; background: var(--brand);
  transition: background-color .18s, border-color .18s, transform .18s, color .18s;
}
.button:hover { background: #ffbb8e; }
.button:active { transform: translateY(1px); }
.button:disabled { cursor: default; background: #ffffff0b; border-color: var(--line); color: var(--subtle); }
.button.alt { border-color: var(--line); background: #ffffff07; color: var(--ink); }
.button.alt:hover { border-color: #ffffff54; background: #ffffff13; }
.button.alt[aria-pressed="true"] { border-color: var(--brand); color: var(--brand); }
.button.large { min-height: 55px; padding-inline: 25px; font-size: 1rem; }
.button svg { width: 18px; height: 18px; }
.header .button { min-height: 38px; padding-inline: 16px; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--accent); font-weight: 720; letter-spacing: .13em; font-size: .875rem; }
.eyebrow::before { content: ""; width: 6px; height: 6px; background: currentColor; transform: rotate(45deg); display: inline-block; margin-right: 3px; }
.hero { position: relative; isolation: isolate; overflow: clip; border-bottom: 1px solid var(--line); }
.hero-backdrop { position: absolute; inset: 0; z-index: -3; background:
  radial-gradient(ellipse at 74% 52%, #524036 0%, #10121d 51%, #0b0c11 77%); }
.hero-art { position: absolute; inset: 0 0 0 36%; z-index: -2;
  background: url('/assets/hero.webp') 56% center / cover no-repeat;
  mask-image: linear-gradient(90deg, transparent, #000 31%);
}
.hero::after { position: absolute; content: ""; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, #0c0d12 4%, #0c0d12ef 25%, #0c0d1244 66%, transparent), linear-gradient(0deg, #0c0d12c9 0%, transparent 42%);
}
.hero-inner { display: flex; align-items: center; min-height: 565px; padding-block: 65px 80px; }
.hero-copy { position: relative; max-width: 580px; }
.hero h1 { font-size: clamp(3.25rem, 6.5vw, 6.5rem); line-height: 1.06; font-weight: 850; letter-spacing: -.07em; margin: 19px 0 24px; }
.hero h1 span { display: block; color: var(--brand); text-shadow: 0 0 42px #ff994527; }
.hero p { color: #d0ccd2; max-width: 360px; }
.hero-actions, .result-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; margin-top: 29px; }
.hero-meta { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 28px; color: var(--muted); font-size: .875rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta svg { color: var(--brand); width: 16px; height: 16px; }
.section { padding-block: 50px 62px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section h2, .section-heading { font-weight: 780; font-size: clamp(1.45rem, 3vw, 2.12rem); letter-spacing: -.035em; }
.section-head p { color: var(--muted); margin-top: 5px; font-size: .925rem; }
.gallery-filters { display: flex; gap: 9px; flex-wrap: wrap; padding-bottom: 21px; }
.gallery-filters .button { min-height: 36px; padding: 6px 12px; font-size: .875rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.card {
  position: relative; display: block; width: 100%; overflow: clip; padding: 0; text-align: start;
  border: 1px solid var(--line); border-radius: 11px; background: var(--panel); color: var(--ink);
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); }
.card-copy { padding: 12px 14px 14px; }
.card-copy strong { font-size: 1rem; }
.card-copy p { color: var(--muted); font-size: .875rem; margin-top: 3px; line-height: 1.5; }
.portrait { display: block; position: relative; overflow: hidden; isolation: isolate; max-width: 100%; aspect-ratio: 1; background: radial-gradient(ellipse at 50% 40%, color-mix(in srgb, var(--accent) 28%, #12131a), #101116 75%); }
.portrait img { display: block; height: 100%; width: 100%; object-fit: cover; }
.card .portrait { aspect-ratio: 1.62; border-bottom: 1px solid var(--line); }
.card .portrait img { object-position: center 45%; }
.portrait::after { content: ""; pointer-events: none; position: absolute; inset: 0; background: linear-gradient(0deg, #0c0d1241, transparent 34%); }
.footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--subtle); font-size: .875rem; }
.invited { position: relative; overflow: hidden; }
.result {
  --accent: var(--brand);
  padding-block: 32px 62px; position: relative; isolation: isolate;
}
.result::before { position: absolute; z-index: -1; content: ""; inset: 0 0 auto; height: 570px;
  background: radial-gradient(ellipse at 24% 30%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 65%);
  pointer-events: none;
}
.result-top { display: grid; grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr); gap: 54px; align-items: center; }
.result-poster { position: relative; border: 1px solid color-mix(in srgb, var(--accent) 39%, #1e1e27);
  border-radius: 12px; overflow: clip; background: #13141a; box-shadow: 0 24px 72px #0007;
}
.result-poster .portrait { height: auto; }
.poster-caption {
  position: absolute; inset: auto 0 0; z-index: 1; padding: 50px 20px 17px;
  background: linear-gradient(0deg, #08090ef0 0%, #08090ea0 48%, transparent);
  display: flex; align-items: end; justify-content: space-between; gap: 8px;
}
.poster-caption b { display: block; font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 850; line-height: 1; }
.poster-caption small { display: block; font: .72rem var(--mono); color: var(--accent); letter-spacing: .13em; padding-bottom: 8px; }
.poster-seal { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 50%;
  border: 1px solid var(--accent); color: var(--accent); background: #0f1017b0;
}
.result-copy h1 { font-size: clamp(2.75rem, 5.6vw, 5.75rem); font-weight: 850; letter-spacing: -.055em; line-height: 1.12; margin: 13px 0 4px; }
.result-copy .translation { font: .92rem var(--mono); letter-spacing: .15em; color: var(--accent); }
.result-copy .tagline { font-size: clamp(1.25rem, 2.5vw, 1.8rem); margin-top: 23px; }
.result-copy .result-summary { color: var(--muted); margin-top: 9px; max-width: 480px; }
.result-copy .text-button { display: block; margin-top: 10px; }
.report { padding-top: 43px; }
.report-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 17px; margin-top: 18px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 20px; }
.panel h3 { display: flex; align-items: center; gap: 9px; font-size: 1.08rem; }
.panel h3 svg { color: var(--accent); }
.panel p { color: var(--muted); font-size: .94rem; margin-top: 9px; }
.trait-list { display: grid; gap: 17px; margin: 19px 0 0; padding: 0; list-style: none; }
.trait-label { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; font-size: .875rem; }
.trait-label b { font-weight: 700; }
.trait-label span { color: var(--accent); text-align: end; }
.trait-bar { height: 6px; width: 100%; margin-top: 7px; border: 0; border-radius: 999px; accent-color: var(--accent); appearance: none; display: block; }
.trait-bar::-webkit-progress-bar { background: #282936; border-radius: 999px; }
.trait-bar::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
.trait-bar::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
.panel .trait-detail { color: var(--subtle); font-size: .875rem; margin-top: 7px; line-height: 1.55; }
.insights { display: grid; gap: 12px; }
.answers-used { display: grid; gap: 14px; margin: 12px 0 0; padding: 0; list-style: none; }
.answers-used li + li { padding-top: 12px; border-top: 1px solid var(--line); }
.answers-used b { font-size: .9rem; }
.answers-used p { margin-top: 2px; }
.runner-up { margin-top: 17px; display: grid; grid-template-columns: 88px 1fr; align-items: center; gap: 16px; }
.runner-up .portrait { border-radius: 8px; }
.result-cta { margin-top: 24px; padding: 23px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); display: flex; gap: 18px; justify-content: space-between; align-items: center; }
.result-cta p { color: var(--muted); margin-top: 3px; font-size: .93rem; }
.quiz { width: min(720px, calc(100% - 40px)); margin: 48px auto 66px; }
.quiz-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.quiz-steps { display: flex; flex: 1; gap: 7px; padding: 0; margin: 0; list-style: none; }
.quiz-steps li { min-width: 0; flex: 1; }
.quiz-steps span { display: block; min-height: 22px; font-size: .875rem; color: var(--muted); }
.quiz-steps [aria-current="step"] span { color: var(--brand); font-weight: 700; }
.quiz-count { font: .875rem var(--mono); font-variant-numeric: tabular-nums; color: var(--muted); }
.quiz-progress { margin: 0 0 23px; }
.quiz-panel { padding: clamp(18px, 4vw, 38px); }
.quiz-panel fieldset { margin: 0; padding: 0; min-inline-size: 0; border: 0; }
.quiz-panel legend { padding: 0; font-size: clamp(1.4rem, 4vw, 2.15rem); font-weight: 780; letter-spacing: -.035em; line-height: 1.45; }
.quiz-prompt { margin: 7px 0 18px; color: var(--muted); font-size: .94rem; }
.quiz-options { display: grid; gap: 9px; }
.option { position: relative; }
.option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.option label { padding: 11px 13px; display: flex; align-items: center; gap: 12px; min-height: 52px; border: 1px solid var(--line); border-radius: 8px; line-height: 1.5; cursor: pointer; background: #ffffff04; }
.option label:hover { border-color: #ffffff55; }
.option input:checked + label { border-color: var(--brand); background: #ffa56b15; }
.option-key { display: grid; place-items: center; flex: none; width: 27px; height: 27px; border-radius: 5px; background: #ffffff0c; color: var(--muted); font: .84rem var(--mono); }
.option input:checked + label .option-key { color: #201006; background: var(--brand); }
.quiz-actions { display: flex; justify-content: space-between; margin-top: 21px; gap: 10px; }
.method { max-width: 760px; }
.method .panel + .panel { margin-top: 13px; }
.method a { color: var(--accent); text-underline-offset: 3px; }
dialog { border: 1px solid #ffffff37; border-radius: 14px; padding: 0; color: var(--ink); background: var(--panel); width: min(440px, calc(100vw - 30px)); max-height: calc(100dvh - 30px); }
dialog::backdrop { background: #08090bcb; backdrop-filter: blur(4px); }
.share-dlg { padding: 17px; }
.share-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.icon-button { background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 7px; padding: 7px; }
.icon-button:hover { color: var(--ink); border-color: #ffffff54; }
.share-preview { display: flex; justify-content: center; }
.share-preview img { width: min(100%, 300px); max-height: 57dvh; object-fit: contain; display: block; border-radius: 6px; }
.share-controls { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.share-link { margin-top: 10px; color: var(--muted); word-break: break-all; font: .79rem var(--mono); }
.toast { z-index: 4; position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); padding: 10px 17px; border: 1px solid #ffffff2e; border-radius: 8px; color: var(--ink); background: #252631; max-width: calc(100% - 28px); text-align: center; }
.back-row { margin-bottom: 16px; }
.error-message { color: #ffb3a4; margin-bottom: 10px; font-size: .875rem; }
/* Motion Prompt #068 · MIT License (c) 2026 Shohei Ohtaki · https://showheyohtaki.github.io/motion-prompt/#068 */
.quiz-progress::-webkit-progress-value { transition: width .3s cubic-bezier(.65, 0, .35, 1); }
/* Motion Prompt #074 · MIT License (c) 2026 Shohei Ohtaki · https://showheyohtaki.github.io/motion-prompt/#074 */
.reveal { animation: report-in .7s cubic-bezier(.33, 1, .68, 1) both; }
@keyframes report-in { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
/* Motion Prompt #161 · MIT License (c) 2026 Shohei Ohtaki · https://showheyohtaki.github.io/motion-prompt/#161 */
::view-transition-group(character-portrait) { animation-duration: .6s; animation-timing-function: cubic-bezier(.65, 0, .35, 1); }
@media (max-width: 900px) {
  .wrap, .header-inner { width: calc(100% - 48px); }
  .hero-inner { min-height: 520px; }
  .hero-art { inset-inline-start: 26%; }
  .hero h1 { font-size: clamp(3.15rem, 8.1vw, 5.4rem); }
  .result-top { gap: 28px; }
  .result-actions .button { padding-inline: 12px; }
}
@media (max-width: 640px) {
  .header { height: 59px; }
  .wrap, .header-inner { width: calc(100% - 30px); }
  .header-inner { grid-template-columns: 1fr auto; gap: 8px; }
  .header nav { display: none; }
  .brand { font-size: .91rem; gap: 8px; }
  .brand-mark { width: 28px; height: 28px; }
  .hero-inner { padding-block: 244px 37px; min-height: 0; }
  .hero-art { inset: 0 0 auto; height: 330px; mask-image: linear-gradient(180deg, #000 59%, transparent 99%); background-position: center 36%; }
  .hero::after { background: linear-gradient(0deg, #0c0d12 0%, #0c0d12 36%, #0c0d1233 78%, transparent 100%); }
  .hero h1 { margin-block: 12px 16px; font-size: clamp(2.65rem, 10.8vw, 4.2rem); }
  .hero-meta { gap: 8px 16px; margin-top: 18px; }
  .hero-actions { margin-top: 20px; }
  .section { padding-block: 33px 42px; }
  .section-head { align-items: start; }
  .section-head .text-button { flex: none; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-copy { padding: 8px 10px 10px; }
  .card-copy p { font-size: .875rem; }
  .result { padding-block: 14px 36px; }
  .result-top, .report-grid { grid-template-columns: 1fr; gap: 15px; }
  .result-top .result-poster { width: 100%; }
  .result-top .portrait { aspect-ratio: 1.12; }
  .result-copy .tagline { margin-top: 14px; }
  .result-copy h1 { margin-top: 7px; }
  .result-actions { gap: 8px; margin-top: 14px; }
  .report { padding-top: 29px; }
  .result-cta { align-items: flex-start; flex-direction: column; }
  .runner-up { grid-template-columns: 68px 1fr; }
  .quiz { margin: 23px auto 45px; width: calc(100% - 30px); }
  .quiz-steps { gap: 4px; }
  .quiz-steps span { font-size: .785rem; }
  .quiz-count { font-size: .82rem; }
  .footer-inner { padding-block: 13px; min-height: 0; flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  ::view-transition-group(*) { animation-duration: .001ms !important; }
}
.hero-art { inset-inline-start: 30%; background-position: 64% center; }
.result-top { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: clamp(28px, 7vw, 104px); }
.result-poster .portrait { aspect-ratio: 2 / 3; }
.result-poster .portrait img { object-fit: contain; }
.result-poster .portrait::after { display: none; }
.poster-caption { position: static; align-items: center; padding: 10px 14px; min-height: 53px; border-top: 1px solid var(--line); background: #15161d; }
.poster-source { color: var(--muted); text-underline-offset: 3px; font-size: .875rem; }
.poster-source:hover { color: var(--accent); }
.poster-seal { width: 31px; height: 31px; }
.poster-seal svg { width: 16px; height: 16px; }
.card .portrait img { object-position: center 33%; }
.share-status { display: block; color: var(--accent); font-size: .875rem; padding-top: 6px; }
.share-status:empty { display: none; }
@media (max-width: 900px) {
  .result-top { grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr); gap: 26px; }
}
@media (max-width: 640px) {
  .hero-art { inset-inline-start: 0; background-position: 68% center; }
  .result-top { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .result-top .result-poster { max-width: 330px; margin-inline: auto; }
  .result-top .portrait { aspect-ratio: 3 / 4; }
}

#main:focus { outline: none; }
