:root {
  --paper: #f7efde;
  --paper-warm: #fff8eb;
  --paper-deep: #ead9b8;
  --folder: #d9bd78;
  --ink: #261b10;
  --ink-soft: #6c5d4b;
  --ink-faint: rgba(38, 27, 16, 0.58);
  --line: rgba(38, 27, 16, 0.18);
  --line-strong: rgba(38, 27, 16, 0.34);
  --green: #214f39;
  --green-deep: #163a2b;
  --green-soft: rgba(33, 79, 57, 0.11);
  --stamp: #b84b35;
  --stamp-deep: #8f3325;
  --stamp-soft: rgba(184, 75, 53, 0.12);
  --surface: rgba(255, 249, 236, 0.92);
  --surface-strong: rgba(255, 252, 245, 0.98);
  --shadow: 0 28px 90px rgba(66, 45, 19, 0.18);
  --shadow-soft: 0 14px 36px rgba(66, 45, 19, 0.1);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --font-display: "Songti SC", "STSong", "Noto Serif SC", "SimSun", serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-code: "Courier New", "Menlo", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  background: var(--paper);
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 12% 6%, rgba(184, 75, 53, 0.16), transparent 24rem),
    radial-gradient(circle at 88% 2%, rgba(33, 79, 57, 0.14), transparent 26rem),
    linear-gradient(180deg, #fff7e8 0%, var(--paper) 52%, var(--paper-deep) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(38, 27, 16, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 27, 16, 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.75) 54%, transparent 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    radial-gradient(circle, rgba(38, 27, 16, 0.12) 0 1px, transparent 1.2px);
  background-size: 18px 18px;
}

button,
input {
  font: inherit;
}

button {
  appearance: none;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 13px 21px;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    opacity 0.18s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-2px) rotate(-0.3deg);
}

button:focus-visible,
.option-card:focus-within {
  outline: 3px solid rgba(33, 79, 57, 0.32);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.primary {
  color: #fff9ec;
  background: linear-gradient(135deg, var(--green-deep), var(--green));
  box-shadow: 0 14px 28px rgba(22, 58, 43, 0.24);
}

.secondary {
  color: var(--green-deep);
  border: 1px solid rgba(33, 79, 57, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.96), rgba(244, 232, 207, 0.86));
  box-shadow: 0 10px 22px rgba(66, 45, 19, 0.08);
}

.ghost {
  color: var(--ink-soft);
  border: 1px dashed var(--line-strong);
  background: rgba(255, 249, 236, 0.58);
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(18px, 3vw, 34px) 0 56px;
}

.screen[hidden] {
  display: none;
}

.card {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(255, 253, 246, 0.96), rgba(249, 238, 213, 0.9)),
    var(--surface);
  box-shadow: var(--shadow);
}

.hero,
.quiz-shell,
.result-shell {
  padding: clamp(20px, 4vw, 44px);
}

.eyebrow,
.hero-kicker,
.card-kicker,
.poster-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0;
  border: 1px solid rgba(38, 27, 16, 0.16);
  border-radius: 999px;
  background: rgba(255, 249, 236, 0.86);
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.09em;
  line-height: 1;
  text-transform: uppercase;
}

.eyebrow,
.hero-kicker,
.card-kicker {
  padding: 8px 12px;
}

.poster-kicker {
  padding: 7px 10px;
  color: var(--stamp-deep);
  background: rgba(255, 241, 226, 0.82);
}

h1,
h2,
h3,
.progress-title,
.result-code {
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.04em;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
}

h1 {
  max-width: 980px;
  font-size: clamp(42px, 7vw, 92px);
  line-height: 0.96;
  text-wrap: balance;
}

h2 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
}

h3 {
  font-size: clamp(20px, 2.6vw, 30px);
  line-height: 1.22;
}

.intro,
.section-note,
.card-note,
.progress-meta,
.result-name,
.result-line,
.result-copy,
.share-preview,
.copy-item p,
.metric-chip span,
.result-poster-caption {
  color: var(--ink-soft);
}

.dossier-cover {
  display: grid;
  min-height: min(780px, calc(100dvh - 64px));
  gap: clamp(20px, 3vw, 34px);
  align-content: center;
  overflow: hidden;
}

.dossier-cover::before {
  content: "已归档";
  position: absolute;
  right: clamp(18px, 5vw, 70px);
  top: clamp(28px, 5vw, 70px);
  z-index: 0;
  width: clamp(120px, 18vw, 190px);
  height: clamp(120px, 18vw, 190px);
  display: grid;
  place-items: center;
  border: 5px double rgba(184, 75, 53, 0.34);
  border-radius: 50%;
  color: rgba(184, 75, 53, 0.25);
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 900;
  letter-spacing: 0.14em;
  transform: rotate(-12deg);
}

.dossier-cover > * {
  position: relative;
  z-index: 1;
}

.archive-tab {
  position: absolute;
  top: 0;
  left: clamp(22px, 4vw, 54px);
  z-index: 2;
  transform: translateY(-1px);
  padding: 10px 18px 12px;
  border-radius: 0 0 18px 18px;
  background: var(--folder);
  color: #4d3515;
  font-family: var(--font-code);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.1em;
  box-shadow: 0 12px 22px rgba(66, 45, 19, 0.12);
}

.hero-copy {
  display: grid;
  gap: 18px;
  max-width: 980px;
}

.hero-copy > div {
  display: grid;
  gap: 18px;
}

.intro {
  max-width: 760px;
  margin: 0;
  font-size: clamp(16px, 1.8vw, 18px);
  line-height: 1.9;
}

.hero-author {
  margin: -2px 0 0;
  color: var(--stamp-deep);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

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

.metric-chip {
  position: relative;
  min-width: 0;
  padding: 18px 18px 18px 20px;
  border: 1px solid rgba(38, 27, 16, 0.2);
  border-left: 7px solid var(--green);
  border-radius: var(--radius-md);
  background:
    linear-gradient(90deg, rgba(33, 79, 57, 0.08), transparent 34%),
    rgba(255, 252, 245, 0.88);
  box-shadow: var(--shadow-soft);
}

.metric-chip strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-family: var(--font-code);
  font-size: 24px;
  letter-spacing: -0.04em;
}

.metric-chip span {
  display: block;
  line-height: 1.68;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 360px);
  gap: 16px;
  align-items: stretch;
}

.info-card,
.share-shell,
.question-card,
.result-badge {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.98), rgba(250, 240, 218, 0.88));
  box-shadow: var(--shadow-soft);
}

.info-card,
.share-shell {
  padding: clamp(16px, 2.2vw, 22px);
}

.share-shell {
  display: grid;
  gap: 14px;
}

.feature-list {
  display: grid;
  gap: 11px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  position: relative;
  padding-left: 22px;
  line-height: 1.75;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 10px;
  height: 10px;
  border: 2px solid var(--stamp);
  border-radius: 50%;
  background: rgba(184, 75, 53, 0.12);
}

.card-note {
  margin: 16px 0 0;
  line-height: 1.85;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-actions {
  margin-top: 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head.compact {
  margin-bottom: 14px;
}

.section-note {
  margin: 0;
  line-height: 1.7;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.result-badge {
  min-height: 108px;
  display: grid;
  align-content: space-between;
  padding: 16px 14px;
}

.result-badge.is-hidden-badge {
  opacity: 0.72;
  background:
    linear-gradient(135deg, rgba(239, 227, 202, 0.7), rgba(255, 252, 247, 0.88));
}

.badge-code {
  margin: 0;
  font-family: var(--font-code);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.badge-name {
  margin: 6px 0 0;
  color: var(--ink-soft);
  line-height: 1.45;
}

.quiz-shell {
  display: grid;
  gap: 22px;
  background:
    linear-gradient(90deg, rgba(217, 189, 120, 0.18) 0 74px, transparent 74px),
    linear-gradient(180deg, rgba(255, 252, 245, 0.97), rgba(249, 238, 213, 0.92));
}

.quiz-topbar,
.progress-row,
.metric-head,
.result-badges {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.quiz-topbar {
  align-items: start;
}

.progress-title,
.result-code {
  font-size: clamp(34px, 5vw, 64px);
}

.progress-title {
  margin-top: 10px;
  font-family: var(--font-display);
}

.progress-meta,
.result-name {
  margin: 8px 0 0;
  font-size: 15px;
}

.progress-block {
  padding: 18px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 249, 236, 0.92), rgba(245, 230, 200, 0.68));
}

.progress-row {
  align-items: center;
  font-size: 14px;
  font-weight: 900;
}

.progress-track,
.metric-bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(38, 27, 16, 0.1);
}

.progress-track {
  margin-top: 16px;
}

.progress-track span,
.metric-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--stamp) 0%, var(--green) 62%, #6f8550 100%);
}

.question-page {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.question-card {
  display: grid;
  padding: clamp(17px, 2vw, 22px);
  gap: 14px;
}

.question-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(38, 27, 16, 0.12);
  border-radius: calc(var(--radius-lg) - 7px);
  pointer-events: none;
}

.question-tag {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--stamp-deep);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.question-title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.45;
}

.option-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.option-card {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(38, 27, 16, 0.15);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, 0.78);
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.option-card:hover {
  transform: translateY(-1px);
  border-color: rgba(33, 79, 57, 0.32);
}

.option-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.option-card.is-selected,
.option-card:has(input:checked) {
  border-color: rgba(33, 79, 57, 0.5);
  background:
    linear-gradient(135deg, rgba(33, 79, 57, 0.12), rgba(255, 253, 248, 0.94));
  box-shadow: 0 12px 24px rgba(33, 79, 57, 0.11);
}

.option-card.is-selected::after,
.option-card:has(input:checked)::after {
  content: "已录入";
  position: absolute;
  right: 12px;
  top: 8px;
  color: rgba(184, 75, 53, 0.66);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  transform: rotate(-8deg);
}

.option-meta {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: rgba(38, 27, 16, 0.08);
  color: var(--ink);
  font-family: var(--font-code);
  font-size: 13px;
  font-weight: 900;
}

.option-card.is-selected .option-meta,
.option-card:has(input:checked) .option-meta {
  background: var(--green);
  color: #fff9ec;
}

.option-copy {
  min-width: 0;
  color: var(--ink);
  line-height: 1.65;
}

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

.result-shell {
  display: grid;
  gap: clamp(18px, 2.8vw, 26px);
}

.result-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 350px);
  gap: clamp(18px, 4vw, 40px);
  align-items: center;
  min-width: 0;
  padding: clamp(24px, 4.2vw, 46px);
  overflow: hidden;
  border: 2px solid rgba(38, 27, 16, 0.28);
  border-radius: calc(var(--radius-xl) - 8px);
  background:
    linear-gradient(90deg, rgba(255, 249, 236, 0.98), rgba(255, 244, 222, 0.82)),
    radial-gradient(circle at 85% 20%, rgba(184, 75, 53, 0.16), transparent 24rem);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.52),
    0 18px 48px rgba(66, 45, 19, 0.12);
}

.result-hero::before {
  content: "NMTI";
  position: absolute;
  left: clamp(24px, 5vw, 64px);
  bottom: -0.18em;
  color: rgba(38, 27, 16, 0.045);
  font-family: var(--font-code);
  font-size: clamp(100px, 20vw, 230px);
  font-weight: 900;
  letter-spacing: -0.12em;
  pointer-events: none;
}

.result-identity-stamps {
  position: absolute;
  top: clamp(16px, 2.4vw, 26px);
  right: clamp(16px, 2.4vw, 28px);
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.result-identity-stamps span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 2px solid rgba(184, 75, 53, 0.72);
  border-radius: 999px;
  color: var(--stamp-deep);
  background: rgba(255, 246, 232, 0.82);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.result-identity-stamps span:first-child {
  transform: rotate(-3deg);
}

.result-identity-stamps span:last-child {
  transform: rotate(2deg);
}

.result-copy-wrap {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  max-width: 740px;
  gap: 18px;
  align-self: start;
  align-content: start;
  padding-top: 24px;
}

.result-heading {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.result-title-row {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px 16px;
  min-width: 0;
}

.result-code {
  max-width: 100%;
  font-family: var(--font-code);
  font-size: clamp(56px, 10vw, 126px);
  line-height: 0.84;
  letter-spacing: -0.1em;
  overflow-wrap: anywhere;
}

.result-name {
  margin: 0;
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  max-width: 100%;
  padding: 8px 18px 10px;
  border: 2px solid rgba(38, 27, 16, 0.22);
  border-radius: 999px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 251, 243, 0.98), rgba(248, 237, 218, 0.92));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.52),
    0 6px 16px rgba(66, 45, 19, 0.08);
  font-family: var(--font-display);
  font-size: clamp(22px, 3.2vw, 34px);
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.result-badges {
  flex-wrap: wrap;
  justify-content: start;
}

.match-badge,
.soft-badge,
.tag-chip,
.pair-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.match-badge {
  color: #fff9ec;
  background: var(--green);
}

.soft-badge {
  color: var(--stamp-deep);
  background: var(--stamp-soft);
}

.result-line {
  max-width: 680px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 800;
  line-height: 1.62;
  text-wrap: balance;
}

.result-visual {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  gap: 12px;
  align-content: start;
  padding: 16px;
  border: 1px solid rgba(38, 27, 16, 0.22);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(244, 230, 200, 0.9));
  box-shadow: 0 24px 54px rgba(66, 45, 19, 0.16);
  transform: rotate(1deg);
}

.result-visual::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(38, 27, 16, 0.2);
  border-radius: 22px;
  pointer-events: none;
}

.result-poster {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  border: 1px solid rgba(38, 27, 16, 0.18);
  border-radius: 22px;
  background: rgba(255, 252, 245, 0.9);
  object-fit: cover;
}

.result-poster-caption {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
}

.result-layout,
.result-grid {
  display: grid;
  gap: 18px;
}

.result-layout {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  align-items: start;
}

.result-main,
.result-side {
  display: grid;
  min-width: 0;
  gap: 18px;
}

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

.hero-grid > *,
.result-layout > *,
.result-grid > *,
.question-page > * {
  min-width: 0;
}

.tag-list,
.pair-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.tag-chip {
  color: var(--green-deep);
  background: var(--green-soft);
}

.pair-chip {
  color: var(--ink);
  background: rgba(217, 189, 120, 0.34);
}

.metric-list,
.copy-list {
  display: grid;
  gap: 14px;
}

.metric-row {
  display: grid;
  gap: 8px;
}

.metric-head {
  align-items: center;
}

.metric-label {
  font-weight: 900;
}

.metric-value {
  color: var(--green);
  font-family: var(--font-code);
  font-weight: 900;
}

.copy-item {
  padding: 14px 16px;
  border: 1px dashed rgba(38, 27, 16, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 249, 236, 0.78);
}

.copy-item p {
  margin: 0;
  line-height: 1.75;
}

.copy-label {
  margin-bottom: 6px !important;
  color: var(--ink) !important;
  font-weight: 900;
}

.share-preview {
  margin: 0;
  padding: 16px 18px;
  border: 1px dashed rgba(33, 79, 57, 0.34);
  border-radius: var(--radius-md);
  background: rgba(255, 252, 245, 0.86);
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.share-tone-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.share-tone {
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid rgba(38, 27, 16, 0.14);
  background: rgba(255, 250, 240, 0.8);
  color: var(--ink-soft);
  box-shadow: none;
}

.share-tone.is-active,
.share-tone[aria-pressed="true"] {
  color: var(--green-deep);
  border-color: rgba(33, 79, 57, 0.28);
  background: linear-gradient(135deg, rgba(33, 79, 57, 0.12), rgba(255, 250, 240, 0.96));
  box-shadow: 0 10px 18px rgba(33, 79, 57, 0.09);
}

.share-tone-hint {
  margin: 0;
  color: var(--ink-faint);
  font-size: 14px;
  line-height: 1.65;
}

.share-url-note {
  margin: -2px 0 0;
  color: var(--ink-faint);
  font-size: 13px;
  line-height: 1.5;
}

.share-primary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.share-primary-actions button {
  width: 100%;
}

.share-secondary-actions {
  margin-top: 0;
}

.result-actions {
  justify-content: flex-end;
  margin-top: 0;
}

@media (max-width: 1180px) {
  .result-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 980px) {
  .hero-grid,
  .result-grid,
  .badge-grid,
  .question-page {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .section-head,
  .quiz-topbar {
    flex-direction: column;
    align-items: start;
  }

  .result-hero {
    grid-template-columns: 1fr;
  }

  .result-copy-wrap {
    max-width: none;
  }

  .result-line {
    max-width: none;
  }

  .result-visual {
    width: min(100%, 420px);
    justify-self: center;
    transform: rotate(0deg);
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 24px, 1180px);
    padding: 14px 0 34px;
  }

  .hero,
  .quiz-shell,
  .result-shell {
    padding: 18px;
  }

  .dossier-cover {
    min-height: auto;
    padding-top: 54px;
  }

  .dossier-cover::before {
    right: -26px;
    top: 36px;
    opacity: 0.72;
  }

  h1 {
    font-size: clamp(34px, 11vw, 54px);
  }

  .archive-tab {
    left: 18px;
    font-size: 12px;
  }

  .question-card,
  .info-card,
  .share-shell {
    padding: 16px;
  }

  .share-tone-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .share-tone-row::-webkit-scrollbar {
    display: none;
  }

  .share-tone {
    flex: 0 0 auto;
    min-height: 40px;
    padding-inline: 12px;
    font-size: 14px;
  }

  .share-primary-actions {
    position: sticky;
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 3;
    padding: 10px;
    border: 1px solid rgba(38, 27, 16, 0.08);
    border-radius: 20px;
    background: rgba(255, 249, 236, 0.94);
    box-shadow: 0 14px 28px rgba(66, 45, 19, 0.1);
    backdrop-filter: blur(10px);
  }

  .question-title {
    font-size: 20px;
  }

  .actions,
  .quiz-actions,
  .result-actions {
    flex-direction: column;
  }

  .actions button,
  .quiz-actions button,
  .result-actions button {
    width: 100%;
  }

  .share-secondary-actions {
    padding-bottom: calc(env(safe-area-inset-bottom) + 6px);
  }

  .result-hero {
    padding: 70px 18px 20px;
    border-radius: 24px;
  }

  .result-identity-stamps {
    left: 16px;
    right: 16px;
    justify-content: flex-start;
  }

  .result-heading {
    gap: 8px;
  }

  .result-code {
    font-size: clamp(46px, 18vw, 84px);
    line-height: 0.9;
  }

  .result-title-row {
    align-items: center;
    gap: 8px 10px;
  }

  .result-name {
    min-height: 0;
    padding: 6px 14px 8px;
    font-size: clamp(18px, 5vw, 24px);
  }

  .result-side {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
