@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;900&family=Space+Grotesk:wght@400;500;700&display=swap");

:root {
  --bg: #f6efe3;
  --surface: rgba(255, 248, 237, 0.76);
  --surface-strong: rgba(255, 248, 237, 0.92);
  --ink: #1f1b18;
  --ink-soft: rgba(31, 27, 24, 0.72);
  --line: rgba(31, 27, 24, 0.1);
  --accent: #ee6c4d;
  --accent-deep: #cf4f2f;
  --accent-soft: rgba(238, 108, 77, 0.14);
  --accent-alt: #2a9d8f;
  --gold: #f4a261;
  --shadow: 0 24px 80px rgba(89, 57, 16, 0.12);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --touch-target: 48px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(244, 162, 97, 0.2), transparent 28%),
    radial-gradient(circle at bottom right, rgba(42, 157, 143, 0.18), transparent 24%),
    linear-gradient(180deg, #fdf8ef 0%, #f6efe3 100%);
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(31, 27, 24, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 27, 24, 0.02) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, black 48%, transparent 90%);
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(36px);
  opacity: 0.6;
  pointer-events: none;
}

.ambient-a {
  width: 24rem;
  height: 24rem;
  top: -6rem;
  right: -4rem;
  background: rgba(238, 108, 77, 0.18);
}

.ambient-b {
  width: 28rem;
  height: 28rem;
  bottom: -8rem;
  left: -6rem;
  background: rgba(42, 157, 143, 0.16);
}

.page-shell {
  width: 100%;
  padding: 0;
  position: relative;
  z-index: 1;
}

.hidden {
  display: none !important;
}

.view {
  animation: fade-up 0.45s ease;
}

.landing-view,
.quiz-view,
.result-view {
  position: relative;
}

.quiz-view,
.result-view {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding-top: 28px;
}

.panel {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
  padding: 28px;
}

.eyebrow,
.panel-kicker,
.code-label,
.question-index,
.result-lead {
  margin: 0;
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.hero-description,
.microcopy,
.landing-cta-copy,
.manifesto-item p,
.rules-copy p,
.rules-list li,
.sidebar-tip p,
.question-hint,
.result-description,
.result-note,
.secondary-hint,
.dimension-explanation,
.match-meta,
.signature-text {
  color: var(--ink-soft);
  line-height: 1.75;
}

.hero-actions,
.result-actions,
.question-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

button {
  border: 0;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    opacity 0.18s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  transform: none;
  opacity: 0.42;
}

.primary-button,
.ghost-button,
.text-button {
  min-height: var(--touch-target);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.92rem 1.3rem;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff8f2;
  box-shadow: 0 18px 28px rgba(238, 108, 77, 0.28);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid var(--line);
  color: var(--ink);
}

.text-button {
  padding-inline: 0;
  background: transparent;
  color: var(--ink-soft);
}

.danger-button {
  color: #a23a24;
}

.landing-view {
  min-height: 100svh;
}

.poster-hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 24px 24px 12px;
  position: relative;
}

.poster-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(239, 121, 85, 0.18), transparent 32%),
    radial-gradient(circle at 82% 18%, rgba(244, 162, 97, 0.16), transparent 24%),
    radial-gradient(circle at bottom right, rgba(38, 128, 119, 0.14), transparent 28%),
    linear-gradient(180deg, #fffaf2 0%, #f9f1e4 42%, #f3eadf 100%);
  z-index: -2;
}

.poster-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(31, 27, 24, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 27, 24, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.68;
  mask-image: radial-gradient(circle at center, black 44%, transparent 90%);
  z-index: -1;
}

.poster-hero-inner {
  width: min(1280px, calc(100vw - 48px));
  margin: 0 auto;
}

.poster-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding-bottom: 14px;
}

.poster-brand {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.poster-brand p,
.poster-status {
  margin: 0;
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(31, 27, 24, 0.56);
}

.poster-brand span {
  color: rgba(31, 27, 24, 0.86);
  font-size: 0.92rem;
}

.poster-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.8fr);
  grid-template-areas:
    "headline stage"
    "copy stage";
  gap: clamp(20px, 3vw, 42px);
  align-items: center;
  min-height: calc(100svh - 104px);
}

.poster-headline {
  grid-area: headline;
}

.poster-headline h1 {
  margin: 12px 0 0;
  max-width: none;
  color: #1f1b18;
  font-size: clamp(3rem, 7vw, 6.2rem);
  line-height: 1.04;
  letter-spacing: -0.08em;
  white-space: nowrap;
}

.poster-copy {
  grid-area: copy;
  padding: clamp(8px, 2vw, 20px) 0;
}

.poster-copy .eyebrow,
.poster-copy .microcopy {
  color: rgba(31, 27, 24, 0.64);
}

.hero-description {
  max-width: 34rem;
  margin: 0 0 22px;
  color: rgba(31, 27, 24, 0.74);
  font-size: 1.04rem;
}

.poster-copy .ghost-button {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(31, 27, 24, 0.1);
  color: var(--ink);
  box-shadow: 0 12px 24px rgba(89, 57, 16, 0.08);
}

.microcopy {
  margin: 14px 0 0;
  max-width: 42rem;
  font-size: 0.84rem;
}

.poster-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
  max-width: 34rem;
}

.poster-facts p {
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(31, 27, 24, 0.12);
  color: rgba(31, 27, 24, 0.84);
  font-size: 0.86rem;
  line-height: 1.45;
}

.poster-facts span {
  display: block;
  margin-bottom: 7px;
  color: rgba(31, 27, 24, 0.46);
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.poster-stage {
  grid-area: stage;
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.carousel-shell {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1773 / 2364;
  border-radius: 34px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow:
    0 24px 60px rgba(89, 57, 16, 0.12),
    0 8px 24px rgba(255, 255, 255, 0.42);
}

.carousel-slides,
.carousel-slide,
.carousel-slide img {
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transform: scale(1.06);
  transition:
    opacity 0.7s ease,
    transform 1.1s ease;
}

.carousel-slide.active {
  opacity: 1;
  transform: scale(1);
}

.carousel-slide img {
  display: block;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.98) contrast(1.02);
}

.carousel-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(16, 15, 18, 0.08) 42%, rgba(12, 11, 14, 0.72) 100%),
    linear-gradient(90deg, rgba(12, 11, 14, 0.18) 0%, rgba(12, 11, 14, 0.02) 46%, rgba(12, 11, 14, 0.26) 100%);
}

.carousel-meta,
.carousel-controls {
  position: absolute;
  z-index: 1;
}

.carousel-meta {
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 8px;
  color: #fff7ef;
}

.carousel-counter {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  font-size: 0.84rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 242, 234, 0.72);
}

.carousel-counter-divider {
  opacity: 0.44;
}

.carousel-label {
  display: grid;
  gap: 4px;
}

.carousel-code {
  margin: 0;
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 242, 234, 0.72);
}

.carousel-cn {
  margin: 0;
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.carousel-controls {
  top: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
}

.carousel-button {
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 248, 241, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.68);
  color: #221c18;
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  font-size: 1.28rem;
  font-weight: 500;
  line-height: 1;
  box-shadow: 0 12px 24px rgba(18, 14, 12, 0.12);
}

.landing-section {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  display: grid;
  gap: 24px;
  padding-top: 42px;
}

.landing-section-head {
  max-width: 42rem;
}

.landing-section-head h2,
.panel-title-row h2,
.panel-title-row h3 {
  margin: 10px 0 0;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.manifesto-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.manifesto-item {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.manifesto-item span,
.sidebar-stat strong,
.match-code,
.dimension-name,
.dimension-score,
.question-pill {
  font-weight: 700;
}

.manifesto-item span {
  display: block;
  margin-bottom: 12px;
  color: var(--accent-deep);
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  letter-spacing: 0.14em;
}

.manifesto-item h3 {
  margin: 0 0 8px;
  font-size: 1.24rem;
}

.manifesto-item p,
.question-meta,
.question-actions,
.result-title-row,
.result-copy p,
.sidebar-stat,
.progress-block,
.result-code-block p,
.dimension-group h4 {
  margin: 0;
}

.rules-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.rules-copy p {
  margin: 0;
  font-size: 1rem;
}

.rules-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.rules-list li {
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
}

.landing-stats-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.landing-stats-band p {
  margin: 0;
  color: var(--ink-soft);
}

.landing-stats-band strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  font-size: 1.18rem;
  letter-spacing: -0.03em;
}

.landing-cta {
  padding-bottom: 8px;
}

.landing-cta-copy {
  max-width: 42rem;
  margin: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.topbar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.topbar-brand p {
  margin: 0;
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.topbar-brand span {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.quiz-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.5fr);
  gap: 20px;
}

.mobile-progress {
  display: none;
}

.mobile-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.mobile-progress-text {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 800;
}

.mobile-progress-meta {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  white-space: nowrap;
}

.mobile-progress-divider {
  opacity: 0.42;
}

.mobile-progress-track {
  margin-top: 10px;
}

.quiz-sidebar {
  display: grid;
  align-content: start;
  gap: 18px;
}

.progress-text {
  font-size: 1.3rem;
  font-weight: 800;
}

.progress-track {
  margin-top: 12px;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(31, 27, 24, 0.08);
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: width 0.24s ease;
}

.sidebar-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.sidebar-tip {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.5);
  border: 1px dashed rgba(31, 27, 24, 0.14);
}

.question-card {
  padding: 34px;
  scroll-margin-top: 14px;
}

.question-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.question-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(31, 27, 24, 0.06);
}

.question-text {
  margin: 18px 0 24px;
  font-size: clamp(1.75rem, 4vw, 2.7rem);
  line-height: 1.22;
  letter-spacing: -0.04em;
}

.option-list {
  display: grid;
  gap: 12px;
}

.option-button {
  width: 100%;
  text-align: left;
  min-height: 76px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(31, 27, 24, 0.08);
  background: rgba(255, 255, 255, 0.56);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.option-button:hover,
.option-button:focus-visible {
  border-color: rgba(238, 108, 77, 0.52);
  box-shadow: 0 14px 24px rgba(238, 108, 77, 0.12);
  outline: none;
}

.option-button.active {
  background: linear-gradient(135deg, rgba(238, 108, 77, 0.16), rgba(244, 162, 97, 0.12));
  border-color: rgba(238, 108, 77, 0.46);
}

.option-index {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(31, 27, 24, 0.06);
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  font-weight: 700;
  flex-shrink: 0;
}

.option-copy {
  flex: 1;
  line-height: 1.65;
}

.question-hint {
  margin: 18px 0 20px;
}

.question-actions {
  justify-content: space-between;
}

.question-actions > button {
  min-width: 140px;
}

.question-actions .primary-button {
  box-shadow: 0 14px 22px rgba(238, 108, 77, 0.2);
}

.question-actions .ghost-button {
  background: rgba(255, 255, 255, 0.72);
}

.result-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.95fr);
  gap: 22px;
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.result-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.24), transparent 32%),
    linear-gradient(135deg, var(--accent-soft), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.result-copy,
.result-code-block {
  position: relative;
  z-index: 1;
}

.result-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
}

.result-title-row h2 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(31, 27, 24, 0.08);
  font-weight: 700;
}

.result-intro {
  margin: 16px 0 10px;
  font-size: 1.14rem;
  font-weight: 700;
}

.result-description,
.result-note {
  margin-top: 10px;
}

.secondary-hint {
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.52);
  border: 1px dashed rgba(31, 27, 24, 0.12);
}

.result-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.result-metric {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(31, 27, 24, 0.08);
  min-width: 0;
}

.result-metric-label {
  display: block;
  margin-bottom: 6px;
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.result-metric-value {
  display: block;
  font-size: 0.95rem;
  line-height: 1.4;
  word-break: break-word;
}

.result-actions {
  margin-top: 22px;
}

.result-code-block {
  padding: 0;
  border-radius: calc(var(--radius-xl) - 8px);
  background: rgba(31, 27, 24, 0.86);
  color: #fff8f0;
  position: relative;
  min-height: 100%;
  overflow: hidden;
}

.result-code-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(244, 162, 97, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.result-avatar-shell {
  position: relative;
  display: flex;
  justify-content: stretch;
  align-items: stretch;
  min-height: 100%;
  padding: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, rgba(17, 15, 14, 0.18), rgba(17, 15, 14, 0.72));
}

.portrait-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 18px 36px rgba(12, 12, 10, 0.22);
}

.portrait-card-large {
  width: 100%;
  min-height: 100%;
  aspect-ratio: 1773 / 2364;
  border-radius: inherit;
}

.portrait-card-compact {
  width: 96px;
  aspect-ratio: 1773 / 2364;
  border-radius: 18px;
}

.portrait-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.portrait-card-large .portrait-image {
  object-fit: cover;
}

.avatar-card {
  position: relative;
  display: grid;
  place-items: center;
  padding: 12px;
  overflow: hidden;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(31, 27, 24, 0.28));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 18px 36px rgba(12, 12, 10, 0.22);
}

.avatar-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 12px 12px;
  opacity: 0.42;
  pointer-events: none;
}

.avatar-card-large {
  width: min(100%, 220px);
  aspect-ratio: 1;
}

.avatar-card-compact {
  width: 88px;
  aspect-ratio: 1;
  padding: 8px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(252, 246, 236, 0.74));
  border: 1px solid rgba(31, 27, 24, 0.08);
  box-shadow: 0 12px 24px rgba(89, 57, 16, 0.12);
}

.avatar-card-compact::before {
  background-image:
    linear-gradient(rgba(31, 27, 24, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 27, 24, 0.06) 1px, transparent 1px);
  opacity: 0.3;
}

.avatar-image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.result-code-meta {
  display: none;
}

.result-code-block strong {
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  display: block;
  margin-top: 4px;
  font-size: clamp(3rem, 8vw, 5.6rem);
  line-height: 0.88;
  letter-spacing: -0.08em;
}

.signature-text {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 248, 240, 0.08);
  border: 1px solid rgba(255, 248, 240, 0.08);
  color: rgba(255, 248, 240, 0.72);
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  word-break: break-word;
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.92fr) minmax(0, 1.3fr);
  gap: 20px;
  margin-top: 20px;
}

.top-matches {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.match-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 250, 244, 0.58));
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.match-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, rgba(238, 108, 77, 0.68), rgba(244, 162, 97, 0.42));
}

.match-card:first-child {
  background:
    linear-gradient(180deg, rgba(255, 246, 241, 0.94), rgba(255, 250, 244, 0.7)),
    linear-gradient(135deg, rgba(238, 108, 77, 0.1), transparent);
  border-color: rgba(238, 108, 77, 0.18);
}

.match-body {
  min-width: 0;
}

.match-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 8px;
}

.match-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: rgba(238, 108, 77, 0.12);
  color: var(--accent-deep);
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.match-code {
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  font-size: 1.12rem;
  display: block;
}

.match-score {
  color: var(--accent-deep);
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  font-size: 1.18rem;
}

.match-trace {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.55;
}

.match-meta {
  margin: 0;
  font-size: 0.94rem;
}

.dimension-groups {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.dimension-group h4 {
  font-size: 1.12rem;
}

.dimension-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.dimension-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid var(--line);
}

.dimension-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dimension-score {
  padding: 6px 10px;
  border-radius: 999px;
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  font-size: 0.84rem;
}

.level-L {
  background: rgba(69, 123, 157, 0.14);
  color: #2a5671;
}

.level-M {
  background: rgba(244, 162, 97, 0.18);
  color: #99530f;
}

.level-H {
  background: rgba(42, 157, 143, 0.18);
  color: #186c62;
}

.dimension-explanation {
  margin: 10px 0 0;
  font-size: 0.94rem;
}

.share-poster-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.share-poster-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 14, 12, 0.58);
  backdrop-filter: blur(10px);
}

.share-poster-panel {
  position: relative;
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100svh - 24px);
  margin: 12px auto;
  padding: 18px;
  overflow: auto;
  border-radius: 28px;
  background: rgba(255, 248, 237, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.52);
  box-shadow: 0 30px 80px rgba(12, 10, 8, 0.28);
}

.share-poster-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.share-poster-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.share-poster-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(31, 27, 24, 0.08);
  box-shadow: 0 10px 24px rgba(18, 14, 12, 0.06);
}

.share-poster-theme-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  background: transparent;
  color: rgba(34, 28, 24, 0.72);
  border: 1px solid transparent;
  box-shadow: none;
}

.share-poster-theme-button:hover,
.share-poster-theme-button:focus-visible {
  background: rgba(255, 255, 255, 0.7);
  color: #221c18;
  outline: none;
}

.share-poster-theme-button.active {
  background: #fffdf8;
  color: #221c18;
  border-color: rgba(31, 27, 24, 0.12);
  box-shadow: 0 10px 20px rgba(18, 14, 12, 0.08);
}

.share-poster-theme-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.share-poster-theme-button span {
  font-size: 0.9rem;
  font-weight: 700;
}

.share-poster-close {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(31, 27, 24, 0.1);
  color: #221c18;
  box-shadow: 0 10px 24px rgba(18, 14, 12, 0.08);
}

.share-poster-close:hover,
.share-poster-close:focus-visible {
  background: #fffdf8;
  border-color: rgba(31, 27, 24, 0.18);
  box-shadow: 0 14px 28px rgba(18, 14, 12, 0.12);
  outline: none;
}

.share-poster-close > span:first-child {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(31, 27, 24, 0.08);
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  font-size: 1rem;
  line-height: 1;
}

.share-poster-close > span:last-child {
  font-size: 0.92rem;
  font-weight: 700;
}

.share-poster-hint {
  margin: 14px 0 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.share-poster-preview {
  margin-top: 16px;
  border-radius: 24px;
  overflow: hidden;
  background: #18161b;
}

.share-poster-image {
  display: block;
  width: 100%;
  height: auto;
}

.share-poster-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.share-poster-actions > button {
  flex: 1;
}

.noscript-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #1f1b18;
  color: #fff8f0;
  z-index: 50;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .poster-layout,
  .quiz-layout,
  .result-hero,
  .result-grid,
  .rules-layout {
    grid-template-columns: 1fr;
  }

  .manifesto-grid,
  .landing-stats-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dimension-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .poster-layout {
    min-height: calc(100svh - 96px);
    gap: 22px;
  }
}

@media (max-width: 720px) {
  body::before {
    background-size: 28px 28px;
  }

  .ambient {
    opacity: 0.48;
    filter: blur(42px);
  }

  .page-shell {
    padding: 0;
  }

  .quiz-view,
  .result-view,
  .landing-section {
    width: min(100vw - 20px, 100%);
  }

  .poster-hero {
    padding: 10px 10px 8px;
    height: 100svh;
    min-height: 100svh;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    background:
      radial-gradient(circle at top left, rgba(244, 162, 97, 0.14), transparent 34%),
      radial-gradient(circle at bottom right, rgba(42, 157, 143, 0.1), transparent 30%),
      linear-gradient(180deg, rgba(255, 250, 242, 0.92), rgba(243, 234, 223, 0.94));
  }

  .poster-hero-inner {
    width: min(100vw - 20px, 100%);
    display: flex;
    flex-direction: column;
    height: calc(100svh - 18px);
    min-height: 0;
    --mobile-hero-gap: clamp(6px, 1.4svh, 12px);
    --mobile-headline-gap: clamp(0px, 0.12svh, 2px);
    --mobile-stage-gap: clamp(32px, 6.8svh, 56px);
  }

  .poster-header {
    justify-content: center;
    align-items: center;
    gap: 0;
    padding-bottom: var(--mobile-hero-gap);
    flex: 0 0 auto;
  }

  .poster-brand {
    align-items: center;
  }

  .poster-layout {
    min-height: 0;
    height: 100%;
    gap: 0;
    flex: 1;
    display: grid;
    grid-template-areas:
      "headline"
      "stage"
      "copy";
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr) auto;
    align-items: stretch;
  }

  .poster-headline {
    order: 1;
    align-self: center;
    width: 100%;
    text-align: center;
    padding-bottom: var(--mobile-headline-gap);
  }

  .poster-headline h1 {
    margin: 0;
    font-size: clamp(2.1rem, 10.4vw, 3rem);
    line-height: 0.92;
    letter-spacing: -0.08em;
    white-space: nowrap;
    color: #1f1b18;
  }

  .poster-stage {
    order: 2;
    justify-content: center;
    align-items: flex-end;
    min-height: 0;
    padding-block: 0 var(--mobile-stage-gap);
    overflow: hidden;
  }

  .poster-copy {
    order: 3;
    display: grid;
    align-content: start;
    gap: clamp(6px, 1.3svh, 10px);
    padding: 0 2px 2px;
  }

  .poster-copy .eyebrow,
  .poster-status,
  .microcopy {
    display: none;
  }

  .hero-actions,
  .result-actions {
    flex-direction: row;
  }

  .hero-actions > button,
  .result-actions > button,
  .question-actions > button {
    width: 100%;
  }

  .poster-facts,
  .manifesto-grid,
  .landing-stats-band,
  .dimension-grid {
    grid-template-columns: 1fr;
  }

  .poster-facts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: 0;
    max-width: none;
  }

  .poster-facts p {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(31, 27, 24, 0.12);
    font-size: 0.78rem;
    line-height: 1.2;
    color: rgba(31, 27, 24, 0.82);
    white-space: normal;
  }

  .poster-facts span {
    display: inline;
    margin-bottom: 0;
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    color: rgba(31, 27, 24, 0.46);
  }

  .carousel-shell,
  .panel,
  .question-card,
  .result-hero {
    padding: 20px;
    border-radius: 24px;
  }

  .carousel-shell {
    width: auto;
    height: min(100%, 56svh);
    max-width: 100%;
    max-height: 100%;
    padding: 0;
    margin: 0 auto;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.86);
    box-shadow:
      0 20px 48px rgba(89, 57, 16, 0.12),
      0 8px 20px rgba(255, 255, 255, 0.38);
  }

  .carousel-controls {
    top: 12px;
    right: 12px;
    gap: 6px;
  }

  .carousel-button {
    min-width: 32px;
    min-height: 32px;
    font-size: 0.92rem;
    background: rgba(255, 251, 245, 0.82);
    border-color: rgba(255, 255, 255, 0.8);
    color: #221c18;
  }

  .carousel-meta {
    left: 12px;
    right: 12px;
    bottom: 12px;
    gap: 5px;
  }

  .carousel-cn {
    font-size: clamp(1.3rem, 6.6vw, 1.72rem);
  }

  .carousel-counter,
  .carousel-code {
    font-size: 0.68rem;
  }

  .hero-actions {
    gap: 10px;
  }

  .hero-actions > button {
    flex: 1 1 0;
    min-height: 48px;
  }

  .landing-section {
    gap: 18px;
    padding-top: 30px;
  }

  .landing-section-head h2,
  .panel-title-row h2,
  .panel-title-row h3 {
    font-size: 1.5rem;
  }

  .topbar {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: stretch;
    margin-bottom: 8px;
  }

  .quiz-view .topbar-brand {
    display: none;
  }

  .topbar > .text-button {
    flex: 1;
    min-height: 40px;
    justify-content: center;
    padding-inline: 10px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: 0.9rem;
  }

  .mobile-progress {
    display: block;
    margin-bottom: 8px;
    padding: 8px 4px 0;
  }

  .quiz-layout {
    gap: 8px;
  }

  .quiz-sidebar {
    display: none;
  }

  .question-card {
    padding: 16px 14px 14px;
  }

  .question-text {
    margin: 12px 0 14px;
    font-size: clamp(1.35rem, 7vw, 1.85rem);
    line-height: 1.28;
  }

  .result-title-row h2 {
    font-size: clamp(2rem, 12vw, 2.8rem);
  }

  .question-meta,
  .match-header,
  .dimension-topline {
    flex-direction: column;
    align-items: flex-start;
  }

  .question-pill {
    padding: 7px 10px;
    font-size: 0.82rem;
  }

  .option-list {
    gap: 8px;
  }

  .option-button {
    min-height: 62px;
    padding: 13px 12px;
    gap: 10px;
    align-items: flex-start;
  }

  .option-index {
    width: 32px;
    height: 32px;
    font-size: 0.86rem;
  }

  .option-copy {
    font-size: 0.94rem;
    line-height: 1.5;
  }

  .question-hint {
    margin: 12px 0 12px;
    font-size: 0.86rem;
  }

  .question-actions {
    margin-top: 2px;
    gap: 8px;
  }

  .question-actions > button {
    flex: 1;
    min-width: 0;
    min-height: 42px;
    padding-inline: 10px;
    font-size: 0.92rem;
  }

  .result-badge {
    width: 100%;
    justify-content: center;
  }

  .result-metrics {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .result-code-block {
    padding: 0;
  }

  .portrait-card-large {
    width: 100%;
  }

  .result-code-meta {
    display: none;
  }

  .match-card {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .portrait-card-compact,
  .avatar-card-compact {
    width: 72px;
  }

  .match-score {
    font-size: 0.96rem;
  }

  .dimension-card {
    padding: 14px;
  }

  .share-poster-panel {
    width: min(100vw - 16px, 100%);
    max-height: calc(100svh - 16px);
    margin: 8px auto;
    padding: 14px;
    border-radius: 22px;
  }

  .share-poster-head {
    align-items: center;
  }

  .share-poster-tools {
    min-width: 0;
    flex: 1;
  }

  .share-poster-theme-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .share-poster-theme-button {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    padding-inline: 10px;
  }

  .share-poster-theme-button span {
    font-size: 0.84rem;
  }

  .share-poster-actions {
    flex-direction: column;
  }
}

@media (max-width: 720px) and (max-height: 820px) {
  .poster-hero-inner {
    --mobile-hero-gap: clamp(4px, 1svh, 9px);
    --mobile-headline-gap: 0px;
    --mobile-stage-gap: clamp(24px, 5.2svh, 40px);
  }

  .poster-hero {
    padding: 8px 10px 6px;
  }

  .poster-header {
    padding-bottom: var(--mobile-hero-gap);
  }

  .poster-brand p {
    font-size: 0.72rem;
    letter-spacing: 0.24em;
  }

  .poster-headline h1 {
    font-size: clamp(1.95rem, 9.8vw, 2.8rem);
  }

  .poster-copy {
    gap: 6px;
    padding-bottom: 1px;
  }

  .poster-facts {
    gap: 5px;
  }

  .poster-facts p {
    font-size: 0.74rem;
    padding-top: 5px;
  }

  .carousel-shell {
    width: auto;
    height: min(100%, 52svh);
    max-width: 100%;
    max-height: 100%;
    border-radius: 24px;
  }

  .carousel-cn {
    font-size: clamp(1.18rem, 6vw, 1.56rem);
  }

  .hero-actions > button {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .view,
  .carousel-slide,
  button {
    animation: none !important;
    transition: none !important;
  }
}
