:root {
  color-scheme: light;
  --ice: #eaf3ff;
  --paper: #f8fbff;
  --navy: #173a5c;
  --navy-dark: #0b2744;
  --blue: #527da8;
  --blue-dark: #315d88;
  --muted: #566f87;
  --line: rgb(74 108 143 / .22);
  --glass: rgb(255 255 255 / .54);
  --body: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --title: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; background: var(--ice); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  color: var(--navy-dark);
  background: transparent;
  font: 1rem/1.7 var(--body);
  isolation: isolate;
}
body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  background: linear-gradient(rgb(239 247 255 / .2), rgb(228 240 253 / .38)), url("assets/ice-paper.webp") center / cover;
  pointer-events: none;
}
body:has(dialog[open]) { overflow: hidden; }
html.modal-open, body.modal-open { overflow: hidden; }
body.dialog-fallback-open::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgb(21 46 70 / .55);
}
body.dialog-fallback-open dialog[open] {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: block;
  margin: auto;
}
[hidden] { display: none !important; }
main, .footer { position: relative; }
img, canvas { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { font: inherit; color: inherit; appearance: none; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #3b78ae;
  outline-offset: 4px;
}
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { overflow-wrap: anywhere; }
h1:focus, h2:focus { outline: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.eyebrow { color: var(--navy); font-size: .875rem; font-weight: 600; letter-spacing: .15em; }
.display-title { color: var(--navy-dark); font: 700 clamp(1.75rem, 4vw, 2.35rem)/1.3 var(--title); letter-spacing: .02em; }

.button {
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  padding: 11px 22px;
  font-weight: 600;
  font-size: .9375rem;
  line-height: 1.4;
  text-align: center;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.primary {
  color: #f8fcff;
  background: linear-gradient(135deg, #527fa9 0%, #244e78 54%, #153a61 100%);
  border-color: rgb(255 255 255 / .38);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .25), 0 10px 25px rgb(37 74 111 / .18);
}
.outline { color: var(--navy); border-color: rgb(56 94 133 / .38); background: rgb(255 255 255 / .25); }
.quiet { color: var(--navy); min-height: 44px; padding-inline: 13px; }
.button[disabled] { cursor: default; opacity: .4; background: transparent; box-shadow: none; }
@media (hover: hover) {
  .primary:hover { box-shadow: inset 0 1px 0 rgb(255 255 255 / .3), 0 13px 28px rgb(37 74 111 / .26); transform: translateY(-1px); }
  .outline:hover, .quiet:hover { background: rgb(255 255 255 / .48); }
}

/* 封面 */
.home-screen {
  min-height: calc(100vh - 60px);
  min-height: calc(100svh - 60px);
  display: grid;
  place-items: center;
  padding: max(25px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}
.hero { width: min(100%, 570px); display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-brand { color: var(--navy); font: 600 clamp(1.05rem, 4vw, 1.3rem)/1.4 var(--title); letter-spacing: .2em; }
.hero-book { width: min(108%, 650px); margin: clamp(12px, 3vh, 28px) -4% clamp(2px, 1vh, 10px); filter: drop-shadow(0 24px 23px rgb(58 89 121 / .13)); }
.hero-book img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: contain; }
.hero-copy { width: 100%; display: flex; flex-direction: column; align-items: center; }
.hero h1 { color: var(--navy-dark); font: 700 clamp(2.55rem, 8vw, 4rem)/1.3 var(--title); letter-spacing: .015em; text-shadow: 0 1px 0 rgb(255 255 255 / .45); }
.hero-meta { display: flex; align-items: center; justify-content: center; gap: 13px; margin: 18px 0 25px; color: #3f5e7c; font-size: .95rem; letter-spacing: .06em; }
.hero-meta span { width: 24px; height: 1px; background: rgb(53 89 123 / .35); }
.hero-button { width: min(100%, 390px); min-height: 58px; font: 600 1.18rem/1.4 var(--title); letter-spacing: .12em; }

/* 答题 */
.quiz-shell { width: min(calc(100% - 38px), 700px); min-height: calc(100vh - 60px); min-height: calc(100svh - 60px); margin-inline: auto; padding: max(25px, env(safe-area-inset-top)) env(safe-area-inset-right) 45px env(safe-area-inset-left); }
.quiz-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand-mini { min-height: 44px; display: inline-flex; align-items: center; color: var(--navy); font: 600 1rem/1.4 var(--title); letter-spacing: .09em; }
.quiz-counter { flex: none; color: var(--navy); font-size: .875rem; font-variant-numeric: tabular-nums; }
.quiz-header > .eyebrow { display: block; margin: 20px 0 9px; font-size: .78rem; color: var(--muted); }
.progress-track { height: 5px; border-radius: 99px; background: rgb(255 255 255 / .58); box-shadow: inset 0 1px 3px rgb(49 87 125 / .1); overflow: hidden; }
.progress-track div { height: 100%; width: var(--progress, 0%); border-radius: inherit; background: linear-gradient(90deg, #75a7d2, #386b9b); transition: width .25s ease; }
.question-card { padding-top: clamp(29px, 6vh, 52px); }
.question-card h1 { color: var(--navy-dark); font: 700 clamp(1.7rem, 5.8vw, 2.35rem)/1.48 var(--title); letter-spacing: .015em; }
.question-hint { margin-top: 12px; color: var(--muted); font-size: .8125rem; line-height: 1.65; }
.question-options { display: grid; gap: 13px; margin-top: 28px; }
.answer {
  width: 100%;
  min-height: 60px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 14px 17px;
  border: 1px solid rgb(255 255 255 / .82);
  border-radius: 13px;
  background: rgb(255 255 255 / .47);
  box-shadow: 0 5px 18px rgb(57 91 124 / .055), inset 0 0 0 1px rgb(95 132 167 / .08);
  text-align: left;
  line-height: 1.55;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.answer-letter {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgb(64 103 141 / .34);
  border-radius: 9px;
  background: rgb(255 255 255 / .62);
  color: var(--navy);
  font: 700 .95rem/1 Georgia, "Times New Roman", serif;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.answer-text { min-width: 0; overflow-wrap: anywhere; }
.answer[aria-pressed="true"] { background: rgb(200 224 247 / .82); border-color: rgb(79 126 172 / .55); box-shadow: 0 7px 20px rgb(57 91 124 / .11); }
.answer[aria-pressed="true"] .answer-letter { background: #3f6f9d; border-color: #3f6f9d; color: #f6fbff; }
@media (hover: hover) { .answer:hover { background: rgb(255 255 255 / .7); border-color: rgb(100 143 183 / .55); transform: translateY(-1px); } }
.quiz-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 19px; }

/* 拆信过场 */
.reveal-shell { min-height: calc(100vh - 60px); min-height: calc(100svh - 60px); display: grid; place-items: center; padding: max(30px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(30px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); text-align: center; overflow: hidden; }
.reveal-inner { width: min(100%, 490px); }
.reveal-inner > .eyebrow { margin-bottom: 8px; }
.reveal-inner h1 { color: var(--navy-dark); font: 700 clamp(1.85rem, 6vw, 2.6rem)/1.35 var(--title); letter-spacing: .06em; }
.envelope-stage { position: relative; width: min(100%, 450px); aspect-ratio: 1; margin: 15px auto 0; filter: drop-shadow(0 24px 20px rgb(53 79 106 / .12)); }
.envelope-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.envelope-back { z-index: 1; opacity: 0; transform: translateY(9px) scale(.985); transition: opacity 1s ease, transform 1.1s ease; }
.envelope-front { z-index: 3; opacity: 0; transform: translateY(9px) scale(.985); transition: opacity 1s ease, transform 1.1s ease; }
.envelope-sealed { z-index: 4; opacity: 1; transition: opacity .9s ease, transform 1s ease; }
/* The result card rises out of the envelope, between the back wall and the front pocket. */
.envelope-card {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 24%;
  width: 40%;
  aspect-ratio: 2 / 3;
  opacity: 0;
  transform: translate(-50%, 66%) scale(.9);
  transform-origin: 50% 100%;
  filter: drop-shadow(0 12px 18px rgb(38 54 74 / .3));
  transition: opacity .5s ease, transform 1.5s cubic-bezier(.22, .78, .26, 1);
}
.envelope-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.is-opening .envelope-sealed { opacity: 0; transform: translateY(8px) scale(.99); }
.is-opening .envelope-back, .is-opening .envelope-front { opacity: 1; transform: translateY(0) scale(1); }
.is-letter .envelope-card { opacity: 1; transform: translate(-50%, -34%) scale(1); }
.reveal-status { min-height: 1.7em; margin-top: -8px; color: var(--muted); font: 400 .95rem/1.7 var(--title); letter-spacing: .1em; }

/* 结果首屏 */
.result-screen { padding: max(20px, env(safe-area-inset-top)) env(safe-area-inset-right) 44px env(safe-area-inset-left); }
.result-shell { width: min(calc(100% - 34px), 920px); margin-inline: auto; }
.result-cover {
  max-width: 650px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  text-align: left;
}
.result-visual, .result-overview { min-width: 0; }
.flow-card { position: relative; width: 160px; max-width: 100%; aspect-ratio: 2 / 3; margin: 0 auto; }
.flow-card > img, .flow-card > canvas, .flow-card .card-static-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.flow-card > canvas { z-index: 2; }
.card-static-fallback { width: 100%; height: 100%; object-fit: contain; }
.card-hint { margin-top: 5px; color: var(--muted); font: 400 .72rem/1.5 var(--title); letter-spacing: .02em; text-align: center; }
.result-overview > .eyebrow { font-size: .76rem; }
.result-name { margin-top: 5px; color: var(--navy-dark); font: 700 clamp(2rem, 8vw, 2.75rem)/1.18 var(--title); letter-spacing: .03em; }
.result-slogan { margin-top: 7px; color: var(--navy); font-size: .875rem; line-height: 1.55; }
.result-score { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.result-score strong { color: var(--navy-dark); font: 400 clamp(2.65rem, 12vw, 3.65rem)/1 Georgia, serif; font-variant-numeric: lining-nums; letter-spacing: -.055em; }
.result-score span { color: var(--navy); font: 600 .82rem/1.4 var(--title); letter-spacing: .04em; }

.result-summary {
  margin-top: 16px;
  padding: 15px 16px;
  border: 1px solid rgb(255 255 255 / .68);
  border-radius: 18px;
  background: rgb(249 252 255 / .62);
  box-shadow: 0 10px 28px rgb(48 83 116 / .06), inset 0 0 0 1px rgb(81 117 151 / .06);
}
.summary-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.summary-heading h2 { color: var(--navy-dark); font: 700 1.12rem/1.4 var(--title); letter-spacing: .04em; }
.summary-more { flex: none; min-height: 44px; padding: 7px 9px; color: var(--blue-dark); font-size: .78rem; }
.summary-more::after { content: " ↓"; }
.summary-intro { color: #405b73; font-size: .875rem; line-height: 1.68; }
.summary-traits { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.summary-trait { display: flex; align-items: flex-start; gap: 8px; color: var(--navy-dark); font-size: .84rem; line-height: 1.58; }
.summary-trait .trait-number { padding-top: 1px; }
.summary-matches { display: grid; gap: 4px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); }
.match-line { color: #4a647b; font-size: .8rem; line-height: 1.55; }

.result-side { margin: 12px 0 18px; }
.result-secondary { display: grid; grid-template-columns: 1fr 1fr; border-block: 1px solid var(--line); }
.secondary-type {
  min-width: 0;
  min-height: 60px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-content: center;
  gap: 0 8px;
  padding: 8px 9px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.secondary-type + .secondary-type { border-left: 1px solid var(--line); }
.secondary-label { color: var(--muted); font-size: .76rem; }
.secondary-type strong { color: var(--navy-dark); font: 700 1.08rem/1.35 var(--title); }
.secondary-score { grid-column: 1 / -1; color: var(--muted); font-size: .72rem; font-variant-numeric: tabular-nums; }
@media (hover: hover) { .secondary-type:hover { background: rgb(255 255 255 / .32); } }
.save-result { width: 100%; min-height: 48px; margin-top: 12px; font: 600 1rem/1.4 var(--title); letter-spacing: .08em; }

/* 结果内容 */
.result-block {
  padding: clamp(20px, 4vw, 33px);
  border: 1px solid rgb(255 255 255 / .65);
  border-radius: 20px;
  background: rgb(249 252 255 / .58);
  box-shadow: 0 12px 35px rgb(48 83 116 / .07), inset 0 0 0 1px rgb(81 117 151 / .07);
}
.result-block + .result-block { margin-top: 18px; }
.result-block h2 { margin-bottom: 10px; }
.result-intro { color: var(--muted); font-size: .95rem; }
#main-reading { scroll-margin-top: 16px; }
.traits-entry { grid-column: 1 / -1; }
.traits-list { list-style: none; padding: 0; margin: 13px 0 0; display: grid; gap: 9px; }
.trait-item { display: flex; gap: 10px; padding: 14px; border: 1px solid rgb(255 255 255 / .45); border-radius: 11px; background: rgb(229 240 252 / .52); color: var(--navy-dark); font-size: .875rem; line-height: 1.65; }
.trait-number { flex: none; color: var(--blue-dark); font: 400 .8rem/1.9 Georgia, serif; }
.dimension-list { display: grid; margin-top: 17px; }
.dimension-row { min-width: 0; display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding-block: 15px; border-top: 1px solid var(--line); }
.dimension-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 9px; }
.dimension-name { color: var(--navy-dark); font: 700 1.12rem/1.4 var(--title); }
.top-dimension .dimension-name { color: #2d648f; }
.dimension-note { color: var(--muted); font-size: .75rem; }
.dimension-value { color: var(--muted); font: 400 1.3rem/1 Georgia, serif; font-variant-numeric: tabular-nums; }
.top-dimension .dimension-value { color: #2d648f; font-weight: 700; }
.dimension-meter { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: rgb(255 255 255 / .6); overflow: hidden; }
.dimension-fill { display: block; height: 100%; border-radius: inherit; background: var(--dimension-color); opacity: .55; }
.top-dimension .dimension-fill { opacity: .9; }
.dimension-parts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.dimension-chip { color: var(--muted); font-size: .75rem; }
.dimension-chip + .dimension-chip::before { content: "·"; margin-right: 6px; }
.coordinate-block .charts { margin-top: 22px; }
.charts { display: grid; gap: 30px; align-items: start; }
.chart { min-width: 0; }
.chart h3 { color: var(--navy); font-size: .95rem; font-weight: 600; }
.chart .radar { width: min(100%, 480px); height: auto; margin-inline: auto; }
.bars { margin-top: 20px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; }
.bar { min-width: 0; text-align: center; font-size: .75rem; display: grid; justify-items: center; gap: 6px; font-variant-numeric: tabular-nums; grid-template-rows: 17px 105px 65px; }
.bar .bar-number { color: var(--muted); }
.bar .bar-name { color: var(--muted); writing-mode: vertical-rl; letter-spacing: .06em; white-space: nowrap; }
.bar.main-bar .bar-name, .bar.main-bar .bar-number { color: var(--navy-dark); font-weight: 700; }
.bar-track { width: 8px; height: 100%; background: rgb(255 255 255 / .63); display: flex; flex-direction: column; justify-content: flex-end; border-radius: 99px; overflow: hidden; }
.bar-fill { width: 100%; height: var(--score); background: var(--color); opacity: .65; }
.main-bar .bar-fill { opacity: 1; }
.chart-note { color: var(--muted); font-size: .8rem; line-height: 1.65; margin-top: 13px; }
.reading-grid { margin-top: 20px; display: grid; gap: 9px; }
.reading-entry { min-width: 0; padding: 17px 14px; border-top: 1px solid var(--line); }
.reading-entry h3 { color: var(--navy); font-size: 1rem; margin-bottom: 7px; }
.reading-entry p, .reading-entry li { color: #455f77; font-size: .92rem; overflow-wrap: anywhere; }
.reading-entry.emphasis { border-color: transparent; border-radius: 12px; background: rgb(213 231 248 / .58); }
.levels { padding-inline-start: 1.25rem; margin-block: 8px 0; }
.levels .active-level { color: #285f8e; font-weight: 600; }
.result-end { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 25px; }

/* 弹窗与页脚 */
.footer { width: min(calc(100% - 36px), 920px); min-height: 60px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 3px 20px; padding: 12px env(safe-area-inset-right) max(12px, env(safe-area-inset-bottom)) env(safe-area-inset-left); color: var(--muted); font-size: .75rem; }
body[data-view="home"] .footer, body[data-view="reveal"] .footer { justify-content: center; }
body[data-view="home"] .footer span:first-child, body[data-view="reveal"] .footer span:first-child { display: none; }
dialog:not([open]) { display: none; }
dialog {
  width: min(600px, calc(100% - 28px));
  max-height: 90vh;
  max-height: min(90vh, 90dvh);
  padding: 0;
  border: 1px solid rgb(255 255 255 / .8);
  border-radius: 20px;
  background: #f2f8ff;
  color: var(--navy-dark);
  box-shadow: 0 25px 80px rgb(15 42 68 / .24);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
dialog::backdrop { background: rgb(21 46 70 / .55); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.modal-inner { padding: 18px max(19px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(19px, env(safe-area-inset-left)); }
.modal-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 13px; }
.modal-top h2 { color: var(--navy-dark); font: 700 1.7rem/1.3 var(--title); }
.modal-close { min-height: 44px; }
.modal-type-image { width: min(100%, 230px); height: auto; aspect-ratio: 2 / 3; object-fit: contain; margin-inline: auto; }
.modal-slogan { margin-block: 13px 5px; color: var(--navy); font-size: 1.08rem; font-weight: 600; text-align: center; }
.modal-description { color: var(--muted); overflow-wrap: anywhere; }
.modal-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 17px; }
dialog .reading-grid { grid-template-columns: 1fr; }
dialog .reading-entry { padding-inline: 5px; }
dialog .traits-list { grid-template-columns: 1fr; }
.share-preview { width: min(100%, 360px); height: auto; margin-inline: auto; border-radius: 12px; box-shadow: 0 8px 25px rgb(40 70 100 / .12); }
.noscript { width: min(calc(100% - 36px), 600px); margin: 40px auto; padding: 18px; background: var(--paper); border-radius: 12px; }

@media (min-width: 700px) {
  .home-screen { padding-block: 32px; }
  .hero-book { margin-top: 10px; }
  .quiz-shell { padding-top: 35px; }
  .question-options { gap: 15px; }
  .answer { padding: 16px 20px; }
  .result-shell { width: min(calc(100% - 64px), 920px); }
  .result-cover { grid-template-columns: 220px minmax(0, 1fr); gap: 28px; }
  .flow-card { width: 220px; }
  .result-name { font-size: 3.1rem; }
  .result-slogan { font-size: 1rem; }
  .result-summary { padding: 20px 22px; }
  .summary-traits { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .summary-matches { grid-template-columns: 1fr 1fr; gap: 16px; }
  .result-side { width: min(100%, 650px); margin-inline: auto; margin-block: 14px 20px; }
  .traits-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dimension-list { grid-template-columns: 1fr 1fr; gap: 0 28px; }
  .charts { grid-template-columns: 1fr 1fr; gap: 25px; }
  .reading-grid { grid-template-columns: 1fr 1fr; gap: 10px 16px; }
  .result-block { border-radius: 24px; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
}

@media (max-width: 380px) {
  .home-screen { padding-inline: 17px; }
  .hero h1 { font-size: 2.35rem; }
  .hero-book { margin-top: 8px; }
  .hero-meta { margin-block: 13px 20px; }
  .quiz-shell { width: calc(100% - 30px); }
  .answer { padding-inline: 13px; gap: 10px; }
  .result-shell { width: calc(100% - 28px); }
  .result-cover { grid-template-columns: 144px minmax(0, 1fr); gap: 12px; }
  .flow-card { width: 144px; }
  .result-name { font-size: 1.9rem; }
  .result-slogan { font-size: .8rem; }
  .result-score strong { font-size: 2.55rem; }
  .result-score span { font-size: .76rem; }
  .card-hint { font-size: .68rem; }
  .result-summary { padding: 13px 14px; }
  .secondary-type { padding-inline: 6px; gap: 0 6px; }
  .result-block { padding-inline: 15px; }
}

@media (max-width: 699px) and (max-height: 720px) {
  .result-cover { grid-template-columns: 128px minmax(0, 1fr); gap: 12px; }
  .flow-card { width: 128px; }
  .result-name { font-size: 1.75rem; }
  .result-slogan { font-size: .78rem; }
  .result-score { margin-top: 8px; }
  .result-score strong { font-size: 2.35rem; }
  .result-summary { margin-top: 12px; padding: 11px 12px; }
  .summary-intro { font-size: .84rem; line-height: 1.55; }
  .summary-traits { margin-top: 8px; gap: 4px; }
  .summary-trait { font-size: .8rem; line-height: 1.45; }
  .summary-matches { margin-top: 8px; padding-top: 7px; gap: 3px; }
  .match-line { font-size: .76rem; line-height: 1.45; }
  .secondary-type { min-height: 56px; }
}

@supports not (aspect-ratio: 1 / 1) {
  .flow-card { height: 240px; }
  .flow-card > .quiz-card { height: 100%; }
  .envelope-stage { height: min(calc(100vw - 40px), 450px); }
  .envelope-card { height: 60%; }
  @media (max-width: 380px) {
    .flow-card { height: 216px; }
  }
  @media (max-width: 699px) and (max-height: 720px) {
    .flow-card { height: 192px; }
  }
  @media (min-width: 700px) {
    .flow-card { height: 330px; }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .is-letter .envelope-card { transform: translate(-50%, -30%) scale(1); }
}
