:root {
  color-scheme: light;
  --bg: #fffdf7;
  --surface: #ffffff;
  --ink: #151515;
  --muted: #5d5b56;
  --line: #151515;
  --blue: #2456ff;
  --blue-deep: #173dcc;
  --red: #ff5b74;
  --lime: #e4f541;
  --paper: #fffdf7;
  --hard-shadow: var(--red);
  --sans: "BIZ UDPGothic", "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  --display: "Arial Black", "BIZ UDPGothic", "Yu Gothic UI", "Hiragino Kaku Gothic ProN", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 180ms ease, color 180ms ease;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 4px solid var(--lime);
  outline-offset: 4px;
}

.site-header {
  width: min(1180px, calc(100% - 48px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand__seal {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 2px solid var(--line);
  background: var(--red);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--lime);
  font-family: var(--display);
  font-size: 21px;
  font-weight: 900;
  line-height: 1;
  transform: rotate(-2deg);
}

.brand strong {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.header-count {
  background: var(--lime);
  color: #151515;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 900;
}

.app-shell {
  width: min(1180px, calc(100% - 48px));
  min-height: calc(100dvh - 144px);
  margin: 0 auto;
}

.screen {
  width: 100%;
  animation: screen-in 320ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.screen[hidden] {
  display: none;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.intro-screen {
  min-height: calc(100dvh - 144px);
  display: flex;
  align-items: center;
  padding: 52px 0 64px;
}

.intro-copy {
  width: 100%;
  max-width: 1120px;
}

.intro-copy h1,
.result-details > h1,
.tally-card h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: -0.075em;
}

.intro-copy h1 {
  font-size: clamp(56px, 7.8vw, 112px);
  line-height: 1.04;
}

.intro-copy h1 em {
  display: inline-block;
  margin-top: 0.12em;
  padding: 0.01em 0.1em 0.08em;
  background: var(--lime);
  color: var(--ink);
  box-shadow: 0.09em 0.09em 0 var(--red);
  font-style: normal;
  line-height: 1;
  transform: rotate(-0.5deg);
  white-space: nowrap;
}

.intro-lead {
  max-width: 32em;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 700;
}

.intro-actions {
  width: min(100%, 420px);
  margin-top: 36px;
  display: grid;
  gap: 20px;
}

.name-field {
  display: grid;
  gap: 7px;
}

.name-field > label {
  font-size: 13px;
  font-weight: 900;
}

.name-field__control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  border: 2px solid var(--line);
  background: var(--surface);
  box-shadow: 5px 5px 0 var(--red);
}

.name-field__control input {
  min-width: 0;
  height: 56px;
  border: 0;
  padding: 0 16px;
  background: transparent;
  color: var(--ink);
  font: 900 17px/1 var(--sans);
}

.name-field__control input::placeholder {
  color: #858079;
  font-weight: 700;
}

.name-field__control input:focus-visible {
  position: relative;
  z-index: 1;
  outline-color: var(--blue);
  outline-offset: -4px;
}

.name-field__control > span {
  display: grid;
  min-width: 58px;
  place-items: center;
  border-left: 2px solid var(--line);
  background: var(--lime);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.name-field > p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

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

.primary-button,
.secondary-button {
  min-height: 58px;
  border-radius: 0;
  cursor: pointer;
  font-weight: 900;
  transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease, color 150ms ease;
}

.primary-button {
  min-width: 226px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 2px solid var(--line);
  padding: 14px 18px 14px 20px;
  background: var(--blue);
  color: #fff9ef;
  box-shadow: 6px 6px 0 var(--hard-shadow);
}

.primary-button:hover {
  background: var(--blue-deep);
  box-shadow: 3px 3px 0 var(--hard-shadow);
  transform: translate(3px, 3px);
}

.primary-button:active,
.secondary-button:active {
  transform: translate(5px, 5px);
  box-shadow: 1px 1px 0 var(--hard-shadow);
}

.button-arrow {
  font-size: 23px;
  font-weight: 900;
}

.quiz-screen {
  min-height: calc(100dvh - 144px);
  padding: clamp(32px, 5vh, 58px) 0 56px;
}

.quiz-wrap {
  width: min(100%, 760px);
  margin: 0 auto;
}

.quiz-topline {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}

.text-button {
  width: fit-content;
  border: 0;
  padding: 5px 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.text-button:hover {
  color: var(--blue);
}

.question-counter {
  margin: 0;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.question-counter span {
  color: var(--blue);
}

.question-counter strong {
  font-size: 20px;
}

.question-counter i {
  margin-inline: 6px;
  font-style: normal;
}

.progress-track {
  display: grid;
  grid-template-columns: repeat(var(--question-count, 20), 1fr);
  gap: 4px;
  margin-top: 14px;
}

.progress-segment {
  height: 8px;
  border: 1px solid var(--line);
  background: transparent;
  transition: background-color 150ms ease, transform 150ms ease;
}

.progress-segment.is-complete {
  background: var(--blue);
}

.progress-segment.is-current {
  background: var(--red);
  transform: scaleY(1.45);
}

.question-copy {
  min-height: 184px;
  padding-top: clamp(38px, 6vh, 66px);
}

.question-category {
  display: inline-block;
  margin: 0 0 12px;
  padding: 3px 8px;
  background: var(--lime);
  color: #151515;
  font-size: 12px;
  font-weight: 900;
}

.question-copy h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: -0.055em;
  white-space: pre-line;
}

.question-copy h2:focus {
  outline: none;
}

.question-note {
  min-height: 24px;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.answer-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.answer-button {
  width: 100%;
  min-height: 66px;
  display: grid;
  grid-template-columns: 42px 1fr 26px;
  align-items: center;
  gap: 12px;
  border: 2px solid var(--line);
  border-radius: 0;
  padding: 10px 16px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: background-color 140ms ease, color 140ms ease, transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.answer-button:hover {
  background: var(--lime);
  color: #151515;
  box-shadow: 4px 4px 0 var(--hard-shadow);
  transform: translate(-2px, -2px);
}

.answer-button:active {
  box-shadow: 1px 1px 0 var(--hard-shadow);
  transform: translate(1px, 1px);
}

.answer-key {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid currentColor;
  color: inherit;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 900;
}

.answer-label {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.5;
}

.answer-check {
  color: transparent;
  font-size: 19px;
  font-weight: 900;
  text-align: center;
}

.answer-list.is-locked .answer-button:not(.is-selected) {
  opacity: 0.34;
}

.answer-button.is-selected {
  background: var(--blue);
  color: #fff9ef;
}

.answer-button.is-selected .answer-key {
  border-color: var(--lime);
  background: var(--lime);
  color: #151515;
}

.answer-button.is-selected .answer-check {
  color: var(--lime);
}

.keyboard-note {
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

kbd {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--line);
  border-bottom-width: 3px;
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 10px;
}

.tally-screen {
  min-height: calc(100dvh - 144px);
  display: grid;
  place-items: center;
  padding: 48px 0;
}

.tally-card {
  width: min(100%, 690px);
  border: 3px solid var(--line);
  padding: clamp(42px, 7vw, 82px);
  background: var(--lime);
  color: var(--ink);
  box-shadow: 12px 12px 0 var(--red);
}

.tally-card h2 {
  font-size: clamp(64px, 10vw, 122px);
  line-height: 1;
}

.tally-copy {
  margin: 22px 0 0;
  font-size: 17px;
  font-weight: 800;
}

.tally-meter {
  height: 14px;
  margin-top: 38px;
  border: 2px solid var(--ink);
  overflow: hidden;
}

.tally-meter span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  animation: tally-fill 950ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes tally-fill {
  to {
    transform: scaleX(1);
  }
}

.tally-keywords {
  margin: 12px 0 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.result-screen {
  padding: clamp(42px, 7vh, 78px) 0 78px;
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(390px, 0.94fr) minmax(0, 1.06fr);
  gap: clamp(48px, 8vw, 108px);
  align-items: center;
}

.certificate-wrap {
  position: relative;
  width: min(100%, 520px);
}

.certificate-preview {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}

.certificate--accessible {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  border: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.certificate {
  --rank-bg: var(--red);
  --rank-accent: var(--blue);
  --rank-secondary: var(--red);
  --rank-tag: var(--lime);
  --rank-shadow: var(--lime);
  --rank-ink: #151515;
  --rank-emblem-ink: #fffdf7;
  position: relative;
  isolation: isolate;
  aspect-ratio: 1;
  overflow: hidden;
  border: 3px solid #151515;
  padding: 7.5%;
  background: var(--rank-bg);
  color: var(--rank-ink);
  box-shadow: 11px 11px 0 var(--rank-shadow);
}

.certificate::before,
.certificate::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.certificate__backdrop {
  position: absolute;
  inset: 7.5%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.certificate__motif {
  position: absolute;
  display: block;
  pointer-events: none;
}

.certificate__frame {
  position: absolute;
  inset: 2.7%;
  z-index: 1;
  border: 2px solid var(--rank-accent);
  color: var(--rank-accent);
  pointer-events: none;
}

.certificate__frame::before,
.certificate__frame::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.certificate__frame::before {
  inset: 1.9%;
  border: 1px solid #151515;
}

.certificate__frame::after {
  inset: 3.7%;
  border: 1px solid transparent;
}

.certificate__corner,
.certificate__edge {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  background: var(--rank-bg);
  color: var(--rank-accent);
  font-family: var(--display);
  font-weight: 900;
  line-height: 1;
}

.certificate__corner {
  width: 7%;
  aspect-ratio: 1;
  font-size: clamp(12px, 1.8vw, 22px);
}

.certificate__corner::before {
  content: "✦";
}

.certificate__corner--tl {
  top: -3.5%;
  left: -3.5%;
}

.certificate__corner--tr {
  top: -3.5%;
  right: -3.5%;
}

.certificate__corner--bl {
  bottom: -3.5%;
  left: -3.5%;
}

.certificate__corner--br {
  right: -3.5%;
  bottom: -3.5%;
}

.certificate__edge {
  padding: 0 1.2%;
  font-size: clamp(7px, 1vw, 12px);
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.certificate__edge::before {
  content: "✦";
}

.certificate__edge--top,
.certificate__edge--bottom {
  left: 50%;
  transform: translateX(-50%);
}

.certificate__edge--top {
  top: -1.6%;
}

.certificate__edge--bottom {
  bottom: -1.6%;
}

.certificate__edge--left,
.certificate__edge--right {
  top: 50%;
}

.certificate__edge--left {
  left: -2.4%;
  transform: translateY(-50%) rotate(-90deg);
}

.certificate__edge--right {
  right: -2.4%;
  transform: translateY(-50%) rotate(90deg);
}

.certificate__head {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 3px solid #151515;
  padding-bottom: 2.5%;
  margin-inline: 4%;
}

.certificate__head span,
.certificate__head strong {
  font-family: var(--display);
  font-size: clamp(13px, 1.7vw, 21px);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.certificate__body {
  position: relative;
  z-index: 3;
  margin-top: 3%;
  text-align: left;
  margin-inline: 4%;
}

.certificate__body > p {
  margin: 0;
  font-size: clamp(10px, 1vw, 13px);
  font-weight: 900;
}

.certificate__owner {
  max-width: 72%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.certificate__score {
  display: inline-flex;
  align-items: center;
  margin: -2% 0 0;
  font-family: var(--display);
  font-size: clamp(108px, 15vw, 180px);
  font-weight: 900;
  letter-spacing: -0.095em;
  line-height: 1.15;
}

.certificate__score i {
  display: inline-block;
  margin-left: 0.16em;
  font-size: 19%;
  font-style: normal;
  letter-spacing: 0;
  line-height: 1;
  transform: translateY(-0.03em);
}

.certificate__body h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(28px, 4.3vw, 50px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.06em;
}

.certificate__type {
  display: inline-block;
  margin-top: 4%;
  border: 2px solid #151515;
  padding: 1% 3%;
  background: var(--rank-tag);
  color: #151515;
  font-size: clamp(9px, 1vw, 12px);
  font-weight: 900;
}

.certificate__footer {
  position: absolute;
  left: 11.5%;
  right: 11.5%;
  bottom: 7%;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  padding: 1.8% 2.2%;
  border-block: 2px solid #151515;
  border-inline: 0;
  background: var(--paper);
  color: #151515;
  font-size: clamp(8px, 0.9vw, 11px);
  font-weight: 900;
}

.certificate__emblem {
  position: absolute;
  right: 3.4%;
  bottom: 18.9%;
  z-index: 4;
  display: grid;
  width: 18%;
  aspect-ratio: 1;
  place-content: center;
  border: 2px solid #151515;
  background: var(--rank-accent);
  color: var(--rank-emblem-ink);
  box-shadow: 4px 4px 0 var(--rank-secondary);
  text-align: center;
}

.certificate__emblem::before {
  content: "";
  position: absolute;
  top: 50%;
  right: -22%;
  width: 22%;
  border-top: 2px solid var(--rank-accent);
}

.certificate__emblem span {
  font-family: var(--display);
  font-size: clamp(25px, 3.6vw, 44px);
  font-weight: 900;
  line-height: 0.95;
}

.certificate__emblem small {
  margin-top: 4%;
  font-family: var(--display);
  font-size: clamp(6px, 0.68vw, 8px);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.certificate[data-rank-theme="king"] .certificate__frame {
  border: 3px solid var(--rank-accent);
  clip-path: polygon(3% 0, 97% 0, 100% 3%, 100% 97%, 97% 100%, 3% 100%, 0 97%, 0 3%);
  outline: 1px solid #151515;
  outline-offset: -8px;
  box-shadow: inset 0 0 0 12px var(--rank-bg), inset 0 0 0 14px var(--rank-secondary);
}

.certificate[data-rank-theme="king"] .certificate__backdrop {
  color: var(--rank-accent);
}

.certificate[data-rank-theme="king"] .certificate__motif--1 {
  top: 31%;
  right: -5%;
  width: 46%;
  aspect-ratio: 1;
  border: 2px solid rgb(183 121 31 / 20%);
  border-radius: 50%;
  outline: 1px solid rgb(225 63 118 / 18%);
  outline-offset: -10%;
  background: repeating-conic-gradient(
    from 0deg,
    transparent 0 9deg,
    rgb(255 253 247 / 13%) 9deg 18deg,
    rgb(212 71 115 / 7%) 18deg 22deg,
    transparent 22deg 30deg
  );
  box-shadow: inset 0 0 0 15px rgb(255 253 247 / 9%), inset 0 0 0 17px rgb(183 121 31 / 11%);
}

.certificate[data-rank-theme="king"] .certificate__motif--1::before {
  content: "✦";
  position: absolute;
  top: 50%;
  left: 50%;
  color: rgb(183 121 31 / 19%);
  font-family: var(--display);
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1;
  transform: translate(-50%, -50%);
}

.certificate[data-rank-theme="king"] .certificate__motif--2 {
  top: 31%;
  right: 2%;
  width: 35%;
  height: 45%;
  border: 2px solid rgb(36 86 255 / 13%);
  border-radius: 50%;
  box-shadow: inset 0 0 0 10px rgb(255 253 247 / 8%), inset 0 0 0 12px rgb(225 63 118 / 9%);
  transform: rotate(-17deg);
}

.certificate[data-rank-theme="king"] .certificate__motif--2::before {
  content: "✦";
  position: absolute;
  top: 50%;
  left: 50%;
  color: rgb(183 121 31 / 17%);
  font-family: var(--display);
  font-size: clamp(64px, 11vw, 118px);
  line-height: 1;
  transform: translate(-50%, -50%) rotate(17deg);
}

.certificate[data-rank-theme="king"] .certificate__motif--3,
.certificate[data-rank-theme="king"] .certificate__motif--4 {
  right: 12%;
  bottom: 8%;
  width: 56%;
  height: 24%;
  border-bottom: 2px solid rgb(198 143 45 / 19%);
  border-radius: 0 0 50% 50%;
  transform: rotate(-4deg);
}

.certificate[data-rank-theme="king"] .certificate__motif--4 {
  right: 4%;
  bottom: 2%;
  width: 65%;
  border-color: rgb(225 63 118 / 12%);
  transform: rotate(3deg);
}

.certificate[data-rank-theme="king"] .certificate__motif--3::after,
.certificate[data-rank-theme="king"] .certificate__motif--4::after {
  content: "•　·　•　·　•　·　•";
  position: absolute;
  right: 4%;
  bottom: -0.55em;
  color: rgb(183 121 31 / 22%);
  font-family: var(--display);
  font-size: clamp(8px, 1.5vw, 16px);
  white-space: nowrap;
}

.certificate[data-rank-theme="king"] .certificate__motif--5::before,
.certificate[data-rank-theme="king"] .certificate__motif--6::before,
.certificate[data-rank-theme="king"] .certificate__motif--7::before,
.certificate[data-rank-theme="king"] .certificate__motif--8::before {
  content: "✦";
  color: rgb(198 143 45 / 30%);
  font-family: var(--display);
  font-size: clamp(18px, 3vw, 34px);
}

.certificate[data-rank-theme="king"] .certificate__motif--5 { top: 15%; right: 12%; }
.certificate[data-rank-theme="king"] .certificate__motif--6 { top: 50%; right: 1%; transform: scale(.62); }
.certificate[data-rank-theme="king"] .certificate__motif--7 { right: 36%; bottom: 8%; transform: scale(.48); }
.certificate[data-rank-theme="king"] .certificate__motif--8 { right: 21%; bottom: 17%; transform: scale(.3); }

.certificate[data-rank-theme="king"] .certificate__frame::before {
  inset: 4.2%;
  border-color: var(--rank-accent);
}

.certificate[data-rank-theme="king"] .certificate__corner::before {
  content: "◆";
  color: var(--rank-secondary);
  text-shadow: 1px 1px 0 #151515;
}

.certificate[data-rank-theme="king"] .certificate__edge--top {
  top: -0.4%;
  padding: 0 2%;
  background: transparent;
  font-size: clamp(8px, 1.3vw, 15px);
}

.certificate[data-rank-theme="king"] .certificate__edge--top::before {
  content: "✦　◆　✦";
  color: var(--rank-accent);
}

.certificate[data-rank-theme="king"] .certificate__edge--bottom::before {
  content: "✦　◆　✦";
}

.certificate[data-rank-theme="king"] .certificate__edge--left::before,
.certificate[data-rank-theme="king"] .certificate__edge--right::before {
  content: "✦　·　✦";
}

.certificate[data-rank-theme="king"] .certificate__emblem {
  width: 19.5%;
  border: 5px double #151515;
}

.certificate[data-rank-theme="seiso"] .certificate__frame {
  border: 2px solid var(--rank-accent);
  box-shadow: inset 0 0 0 9px var(--rank-bg), inset 0 0 0 10px var(--rank-secondary);
}

.certificate[data-rank-theme="seiso"] .certificate__motif--1,
.certificate[data-rank-theme="seiso"] .certificate__motif--2 {
  top: 18%;
  right: -5%;
  width: 43%;
  height: 60%;
  border: 2px solid rgb(36 86 255 / 12%);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.certificate[data-rank-theme="seiso"] .certificate__motif--2 {
  top: 25%;
  right: 1%;
  width: 31%;
  height: 48%;
  border-color: rgb(225 63 118 / 13%);
}

.certificate[data-rank-theme="seiso"] .certificate__motif--3 {
  top: 23%;
  right: 13%;
  width: 20%;
  height: 58%;
  border-right: 2px solid rgb(36 86 255 / 16%);
  border-radius: 0 60% 55% 0;
  transform: rotate(11deg);
}

.certificate[data-rank-theme="seiso"] .certificate__motif--4,
.certificate[data-rank-theme="seiso"] .certificate__motif--5,
.certificate[data-rank-theme="seiso"] .certificate__motif--6,
.certificate[data-rank-theme="seiso"] .certificate__motif--7 {
  width: 9%;
  aspect-ratio: 1.8;
  border-radius: 100% 0 100% 0;
  background: rgb(36 86 255 / 10%);
  transform: rotate(25deg);
}

.certificate[data-rank-theme="seiso"] .certificate__motif--4 { top: 28%; right: 18%; }
.certificate[data-rank-theme="seiso"] .certificate__motif--5 { top: 43%; right: 9%; background: rgb(225 63 118 / 10%); transform: rotate(155deg); }
.certificate[data-rank-theme="seiso"] .certificate__motif--6 { top: 59%; right: 20%; transform: rotate(38deg); }
.certificate[data-rank-theme="seiso"] .certificate__motif--7 { top: 72%; right: 7%; background: rgb(225 63 118 / 9%); transform: rotate(145deg); }

.certificate[data-rank-theme="seiso"] .certificate__motif--8::before {
  content: "✦";
  color: rgb(36 86 255 / 22%);
  font-size: clamp(20px, 3.2vw, 36px);
}

.certificate[data-rank-theme="seiso"] .certificate__motif--8 { top: 18%; right: 6%; }

.certificate[data-rank-theme="seiso"] .certificate__corner::before {
  content: "❧";
  color: var(--rank-accent);
  font-size: 1.2em;
}

.certificate[data-rank-theme="seiso"] .certificate__edge--top::before,
.certificate[data-rank-theme="seiso"] .certificate__edge--bottom::before {
  content: "❧　✦　❧　✦　❧";
}

.certificate[data-rank-theme="seiso"] .certificate__edge--left::before,
.certificate[data-rank-theme="seiso"] .certificate__edge--right::before {
  content: "❧　✦　❧";
}

.certificate[data-rank-theme="seiso"] .certificate__emblem {
  outline: 2px solid var(--rank-secondary);
  outline-offset: 3px;
}

.certificate[data-rank-theme="honori"] .certificate__frame {
  border: 1px dashed rgb(228 119 170 / 52%);
}

.certificate[data-rank-theme="honori"] .certificate__motif--1 {
  right: 2%;
  bottom: 9%;
  width: 54%;
  height: 32%;
  border-bottom: 2px dashed rgb(63 146 210 / 14%);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.certificate[data-rank-theme="honori"] .certificate__motif--2::before,
.certificate[data-rank-theme="honori"] .certificate__motif--3::before,
.certificate[data-rank-theme="honori"] .certificate__motif--4::before,
.certificate[data-rank-theme="honori"] .certificate__motif--5::before,
.certificate[data-rank-theme="honori"] .certificate__motif--6::before,
.certificate[data-rank-theme="honori"] .certificate__motif--7::before {
  content: "⋈";
  color: rgb(228 119 170 / 22%);
  font-family: var(--display);
  font-size: clamp(22px, 4vw, 48px);
  text-shadow: 0 0 11px rgb(255 253 247 / 72%);
}

.certificate[data-rank-theme="honori"] .certificate__motif--2 { top: 22%; right: 8%; transform: rotate(-13deg); }
.certificate[data-rank-theme="honori"] .certificate__motif--3 { top: 39%; right: 24%; transform: rotate(18deg) scale(.72); }
.certificate[data-rank-theme="honori"] .certificate__motif--4 { top: 53%; right: 2%; transform: rotate(-7deg) scale(1.2); }
.certificate[data-rank-theme="honori"] .certificate__motif--5 { right: 30%; bottom: 12%; transform: rotate(12deg) scale(.85); }
.certificate[data-rank-theme="honori"] .certificate__motif--6 { right: 52%; bottom: 6%; transform: rotate(-20deg) scale(.58); }
.certificate[data-rank-theme="honori"] .certificate__motif--7 { top: 15%; right: 30%; transform: rotate(24deg) scale(.42); }

.certificate[data-rank-theme="honori"] .certificate__motif--8 {
  right: -2%;
  bottom: -6%;
  width: 39%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgb(255 253 247 / 17%);
  box-shadow: -22px -10px 0 rgb(92 190 178 / 7%), -40px 24px 0 rgb(228 119 170 / 7%);
}

.certificate[data-rank-theme="honori"] .certificate__corner::before {
  content: "⋈";
  color: var(--rank-secondary);
  font-size: 1.45em;
  opacity: 0.7;
  text-shadow: 0 0 8px currentColor;
}

.certificate[data-rank-theme="honori"] .certificate__edge--top::before,
.certificate[data-rank-theme="honori"] .certificate__edge--bottom::before {
  content: "⋈　　⋈　　⋈";
  opacity: 0.54;
}

.certificate[data-rank-theme="honori"] .certificate__edge--left::before,
.certificate[data-rank-theme="honori"] .certificate__edge--right::before {
  content: "⋈　　⋈";
  color: var(--rank-secondary);
  opacity: 0.5;
}

.certificate[data-rank-theme="honori"] .certificate__emblem {
  width: 16.5%;
}

.certificate[data-rank-theme="normal"] .certificate__frame {
  inset: 3.2%;
  border: 0;
  background: #3d3e43;
  clip-path: polygon(1% 1.2%, 10% .5%, 20% 1.3%, 31% .6%, 42% 1.5%, 53% .7%, 64% 1.2%, 75% .5%, 86% 1.4%, 99% .8%, 98.8% 11%, 99.5% 22%, 98.9% 34%, 99.4% 46%, 98.7% 58%, 99.3% 70%, 98.8% 83%, 99.4% 99%, 88% 98.8%, 77% 99.5%, 65% 98.9%, 53% 99.4%, 42% 98.7%, 30% 99.3%, 18% 98.8%, .8% 99.4%, 1.3% 88%, .6% 76%, 1.2% 64%, .5% 51%, 1.4% 39%, .7% 27%, 1.3% 15%);
  box-shadow: none;
}

.certificate[data-rank-theme="normal"] .certificate__motif--1 {
  top: 20%;
  right: 1%;
  width: 38%;
  height: 52%;
  border: 1px solid rgb(61 62 67 / 13%);
  clip-path: polygon(2% 4%, 27% 1%, 53% 5%, 78% 2%, 98% 6%, 96% 31%, 99% 58%, 95% 96%, 70% 98%, 43% 95%, 18% 99%, 1% 94%, 4% 68%, 1% 40%);
  transform: rotate(-1deg);
}

.certificate[data-rank-theme="normal"] .certificate__motif--2 {
  top: 24%;
  right: 3%;
  width: 34%;
  height: 43%;
  background-image: radial-gradient(circle, rgb(61 62 67 / 16%) 0 1px, transparent 1.2px);
  background-size: 9px 9px;
  clip-path: ellipse(52% 45% at 55% 50%);
}

.certificate[data-rank-theme="normal"] .certificate__motif--3,
.certificate[data-rank-theme="normal"] .certificate__motif--4,
.certificate[data-rank-theme="normal"] .certificate__motif--5,
.certificate[data-rank-theme="normal"] .certificate__motif--6,
.certificate[data-rank-theme="normal"] .certificate__motif--7,
.certificate[data-rank-theme="normal"] .certificate__motif--8 {
  right: 10%;
  bottom: 9%;
  width: 42%;
  border-top: 2px solid rgb(61 62 67 / 9%);
  transform-origin: right center;
  transform: rotate(-12deg);
}

.certificate[data-rank-theme="normal"] .certificate__motif--4 { bottom: 12%; }
.certificate[data-rank-theme="normal"] .certificate__motif--5 { bottom: 15%; }
.certificate[data-rank-theme="normal"] .certificate__motif--6 { bottom: 18%; }
.certificate[data-rank-theme="normal"] .certificate__motif--7 { bottom: 21%; }
.certificate[data-rank-theme="normal"] .certificate__motif--8 { bottom: 24%; }

.certificate[data-rank-theme="normal"] .certificate__frame::before {
  inset: 0.75%;
  border: 0;
  background: var(--rank-bg);
  clip-path: polygon(1% 1.2%, 10% .5%, 20% 1.3%, 31% .6%, 42% 1.5%, 53% .7%, 64% 1.2%, 75% .5%, 86% 1.4%, 99% .8%, 98.8% 11%, 99.5% 22%, 98.9% 34%, 99.4% 46%, 98.7% 58%, 99.3% 70%, 98.8% 83%, 99.4% 99%, 88% 98.8%, 77% 99.5%, 65% 98.9%, 53% 99.4%, 42% 98.7%, 30% 99.3%, 18% 98.8%, .8% 99.4%, 1.3% 88%, .6% 76%, 1.2% 64%, .5% 51%, 1.4% 39%, .7% 27%, 1.3% 15%);
}

.certificate[data-rank-theme="normal"] .certificate__frame::after {
  inset: 2.4%;
  border: 1px solid var(--rank-secondary);
  transform: rotate(-0.24deg);
}

.certificate[data-rank-theme="normal"] .certificate__corner,
.certificate[data-rank-theme="normal"] .certificate__edge {
  display: none;
}

.certificate[data-rank-theme="normal"] .certificate__emblem {
  width: 14.5%;
  border-width: 2px;
  background: #fffdf7;
  color: #151515;
  box-shadow: 3px 3px 0 var(--rank-secondary);
}

.certificate[data-rank-theme="seiso-lol"] .certificate__backdrop {
  inset: 7.5%;
  background: conic-gradient(
    from 238deg at 80% 76%,
    transparent 0 7deg,
    rgb(228 245 65 / 34%) 7deg 20deg,
    transparent 20deg 34deg,
    rgb(36 86 255 / 22%) 34deg 50deg,
    transparent 50deg 65deg,
    rgb(255 241 168 / 36%) 65deg 82deg,
    transparent 82deg 104deg,
    rgb(228 245 65 / 30%) 104deg 118deg,
    transparent 118deg 145deg,
    rgb(36 86 255 / 20%) 145deg 161deg,
    transparent 161deg 191deg,
    rgb(255 241 168 / 38%) 191deg 208deg,
    transparent 208deg 238deg,
    rgb(228 245 65 / 30%) 238deg 253deg,
    transparent 253deg 282deg,
    rgb(36 86 255 / 20%) 282deg 300deg,
    transparent 300deg 326deg,
    rgb(255 241 168 / 34%) 326deg 341deg,
    transparent 341deg 360deg
  );
}

.certificate[data-rank-theme="seiso-lol"] .certificate__motif--1 {
  right: -10%;
  bottom: -11%;
  width: 47%;
  aspect-ratio: 1;
  border: 7px solid rgb(255 253 247 / 27%);
  border-radius: 50%;
  box-shadow: 0 0 0 11px rgb(228 245 65 / 13%);
}

.certificate[data-rank-theme="seiso-lol"] .certificate__motif--2::before,
.certificate[data-rank-theme="seiso-lol"] .certificate__motif--3::before,
.certificate[data-rank-theme="seiso-lol"] .certificate__motif--4::before {
  content: "✹";
  color: rgb(21 21 21 / 12%);
  font-size: clamp(24px, 4.5vw, 52px);
}

.certificate[data-rank-theme="seiso-lol"] .certificate__motif--2 { top: 19%; right: 5%; transform: rotate(12deg); }
.certificate[data-rank-theme="seiso-lol"] .certificate__motif--3 { right: 27%; bottom: 8%; transform: rotate(-8deg) scale(.7); }
.certificate[data-rank-theme="seiso-lol"] .certificate__motif--4 { top: 52%; right: 1%; transform: rotate(20deg) scale(.45); }

.certificate[data-rank-theme="seiso-lol"] .certificate__frame {
  border: 4px solid #151515;
  transform: rotate(-0.22deg);
  box-shadow: 5px -4px 0 -1px var(--rank-secondary), inset 0 0 0 9px var(--rank-bg), inset 0 0 0 12px var(--rank-accent);
}

.certificate[data-rank-theme="seiso-lol"] .certificate__corner::before {
  content: "✹";
}

.certificate[data-rank-theme="seiso-lol"] .certificate__corner--br::before {
  content: "!?";
  color: #151515;
}

.certificate[data-rank-theme="seiso-lol"] .certificate__edge--top::before,
.certificate[data-rank-theme="seiso-lol"] .certificate__edge--bottom::before {
  content: "／　✹　＼";
}

.certificate[data-rank-theme="seiso-lol"] .certificate__emblem {
  transform: rotate(3deg);
  box-shadow: 4px 4px 0 var(--rank-secondary), 8px 1px 0 var(--rank-tag);
}

.certificate[data-rank-theme="ero-ochi"] .certificate__motif--1::before,
.certificate[data-rank-theme="ero-ochi"] .certificate__motif--2::before,
.certificate[data-rank-theme="ero-ochi"] .certificate__motif--3::before,
.certificate[data-rank-theme="ero-ochi"] .certificate__motif--4::before {
  content: "♥";
  color: rgb(255 255 255 / 24%);
  font-family: var(--display);
  font-size: clamp(48px, 8vw, 96px);
  text-shadow: 3px 4px 0 rgb(181 44 255 / 14%);
}

.certificate[data-rank-theme="ero-ochi"] .certificate__motif--1 { top: 32%; right: 1%; transform: rotate(-9deg); }
.certificate[data-rank-theme="ero-ochi"] .certificate__motif--2 { top: 51%; right: 20%; transform: rotate(11deg) scale(.62); }
.certificate[data-rank-theme="ero-ochi"] .certificate__motif--3 { right: 4%; bottom: 7%; transform: rotate(8deg) scale(.82); }
.certificate[data-rank-theme="ero-ochi"] .certificate__motif--4 { right: 39%; bottom: 2%; transform: rotate(-13deg) scale(.48); }

.certificate[data-rank-theme="ero-ochi"] .certificate__motif--5,
.certificate[data-rank-theme="ero-ochi"] .certificate__motif--6 {
  right: -5%;
  bottom: 24%;
  width: 51%;
  height: 23%;
  border-bottom: 4px solid rgb(255 23 111 / 20%);
  border-radius: 50%;
  box-shadow: 0 5px 12px rgb(255 23 111 / 10%);
  transform: rotate(-20deg);
}

.certificate[data-rank-theme="ero-ochi"] .certificate__motif--6 {
  right: 5%;
  bottom: 8%;
  width: 62%;
  border-color: rgb(36 208 255 / 17%);
  box-shadow: 0 5px 12px rgb(36 208 255 / 9%);
  transform: rotate(8deg);
}

.certificate[data-rank-theme="ero-ochi"] .certificate__motif--7::before,
.certificate[data-rank-theme="ero-ochi"] .certificate__motif--8::before {
  content: "✦";
  color: rgb(255 255 255 / 34%);
  font-size: clamp(20px, 3.2vw, 38px);
  text-shadow: 0 0 10px rgb(255 23 111 / 38%);
}

.certificate[data-rank-theme="ero-ochi"] .certificate__motif--7 { top: 43%; right: 31%; }
.certificate[data-rank-theme="ero-ochi"] .certificate__motif--8 { right: 8%; bottom: 34%; transform: scale(.62); }

.certificate[data-rank-theme="ero-ochi"] .certificate__frame {
  border: 3px solid var(--rank-accent);
  box-shadow: 0 0 9px var(--rank-accent), inset 0 0 0 11px var(--rank-bg), inset 0 0 0 14px var(--rank-secondary), inset 0 0 10px var(--rank-secondary);
}

.certificate[data-rank-theme="ero-ochi"] .certificate__frame::before {
  inset: 4%;
  border-color: rgb(255 255 255 / 85%);
  box-shadow: 0 0 9px var(--rank-secondary);
}

.certificate[data-rank-theme="ero-ochi"] .certificate__corner::before {
  content: "✦";
  color: #fff1f6;
  text-shadow: 3px 4px 0 #151515, 0 0 8px var(--rank-accent);
}

.certificate[data-rank-theme="ero-ochi"] .certificate__corner--bl::before,
.certificate[data-rank-theme="ero-ochi"] .certificate__corner--br::before {
  content: "♥";
}

.certificate[data-rank-theme="ero-ochi"] .certificate__edge--top::before,
.certificate[data-rank-theme="ero-ochi"] .certificate__edge--bottom::before {
  content: "✦　♡　✦";
  text-shadow: 0 0 8px currentColor;
}

.certificate[data-rank-theme="ero-ochi"] .certificate__edge--left::before,
.certificate[data-rank-theme="ero-ochi"] .certificate__edge--right::before {
  content: "♡　✦　♡";
  color: var(--rank-secondary);
  text-shadow: 0 0 8px currentColor;
}

.certificate[data-rank-theme="ero-ochi"] .certificate__emblem {
  width: 18.5%;
}

.certificate[data-rank-theme="ero-ochi"] .certificate__emblem::after {
  content: "⌄⌄⌄";
  position: absolute;
  right: 0;
  bottom: -18%;
  left: 0;
  color: var(--rank-accent);
  font-family: var(--display);
  font-size: clamp(7px, 1vw, 12px);
  font-weight: 900;
  letter-spacing: 0.15em;
}

.result-name {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.result-name strong {
  color: var(--ink);
  font-size: 17px;
  overflow-wrap: anywhere;
}

.result-details > h1 {
  font-size: clamp(44px, 5.4vw, 72px);
  line-height: 1.08;
}

.result-details > h1 em {
  display: inline-block;
  margin: 0.06em 0;
  margin-inline-end: clamp(8px, 0.16em, 12px);
  padding: 0.02em 0.1em 0.06em;
  background: var(--result-tag, var(--lime));
  color: var(--ink);
  box-shadow: 6px 6px 0 var(--result-shadow, var(--red));
  font-style: normal;
  white-space: nowrap;
}

.result-lead {
  max-width: 560px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.result-stats {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 0;
  margin: 27px 0 0;
  border-block: 3px solid var(--line);
  padding: 14px 0;
}

.result-stats div {
  padding: 0 16px;
}

.result-stats div:first-child {
  padding-left: 0;
}

.result-stats div + div {
  border-left: 2px solid var(--line);
}

.result-stats dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.result-stats dd {
  margin: 1px 0 0;
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.06em;
}

.result-stats dd small {
  margin-left: 3px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 10px;
}

.type-note {
  margin-top: 25px;
  border-left: 9px solid var(--result-shadow, var(--red));
  padding-left: 16px;
}

.type-note > p:first-child {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.type-note h2 {
  margin: 2px 0 4px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.type-note h2 + p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.share-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 28px;
}

.share-actions .primary-button {
  grid-column: 1 / -1;
  width: 100%;
  justify-content: center;
}

.secondary-button {
  border: 2px solid var(--line);
  padding: 12px 15px;
  background: var(--surface);
  box-shadow: 4px 4px 0 var(--hard-shadow);
}

.secondary-button:hover {
  background: var(--lime);
  color: #151515;
  box-shadow: 2px 2px 0 var(--hard-shadow);
  transform: translate(2px, 2px);
}

.retry-button {
  margin-top: 16px;
}

.site-footer {
  width: min(1180px, calc(100% - 48px));
  min-height: 112px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 2px solid var(--line);
  color: var(--muted);
}

.site-footer__note {
  flex: 0 1 300px;
}

.site-footer__note p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.site-footer__note small {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.5;
}

.site-footer__services {
  flex: 1 1 680px;
  display: grid;
  gap: 8px;
  justify-items: end;
}

.site-footer__label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px 18px;
}

.site-footer__links a {
  border-bottom: 2px solid var(--red);
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.5;
  text-decoration: none;
  transition: color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.site-footer__links a:hover {
  border-color: var(--blue);
  color: var(--blue);
  transform: translateY(-1px);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 20;
  max-width: calc(100% - 40px);
  border: 2px solid var(--line);
  border-radius: 0;
  padding: 10px 16px;
  background: var(--lime);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--red);
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.preview-share-image {
  display: block;
  width: 600px;
  height: 600px;
  object-fit: contain;
  max-width: none;
  margin: 36px auto 72px;
  border: 2px solid var(--line);
}

body.is-rank-preview {
  min-height: 1080px;
}

body.is-rank-preview .preview-share-image {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 1080px;
  height: 1080px;
  margin: 0;
  border: 0;
}

@media (min-width: 721px) and (max-height: 800px) {
  .intro-screen {
    padding: 32px 0 42px;
  }

  .intro-copy h1 {
    font-size: clamp(52px, 7vw, 86px);
  }

  .intro-lead {
    margin-top: 22px;
  }

  .intro-actions {
    margin-top: 26px;
  }

  .quiz-screen {
    padding: 22px 0 30px;
  }

  .question-copy {
    min-height: 134px;
    padding-top: 22px;
  }

  .question-copy h2 {
    font-size: 30px;
  }

  .question-note {
    margin-top: 6px;
  }

  .answer-list {
    gap: 7px;
    margin-top: 12px;
  }

  .answer-button {
    min-height: 53px;
    padding-block: 7px;
  }

  .keyboard-note {
    margin-top: 9px;
  }

  .result-screen {
    padding: 26px 0 40px;
  }

  .result-layout {
    gap: clamp(40px, 6vw, 72px);
  }

  .certificate-wrap {
    max-width: 430px;
  }

  .certificate__score {
    font-size: 148px;
  }

  .certificate__body h2 {
    font-size: 36px;
  }

  .certificate__type {
    margin-top: 2%;
  }

  .result-details > h1 {
    font-size: 50px;
  }

  .result-lead {
    margin-top: 11px;
  }

  .result-stats {
    margin-top: 14px;
    padding-block: 9px;
  }

  .type-note {
    margin-top: 14px;
  }

  .share-actions {
    margin-top: 16px;
  }

  .share-actions .primary-button,
  .share-actions .secondary-button {
    min-height: 48px;
  }
}

@media (max-width: 720px) {
  .site-header,
  .app-shell,
  .site-footer {
    width: min(100% - 32px, 600px);
  }

  .site-header {
    height: 64px;
  }

  .brand__seal {
    width: 36px;
    height: 36px;
    font-size: 19px;
  }

  .brand strong {
    font-size: 16px;
  }

  .header-count {
    font-size: 10px;
  }

  .app-shell {
    min-height: calc(100dvh - 136px);
  }

  .intro-screen {
    min-height: calc(100dvh - 136px);
    padding: 36px 0 48px;
  }

  .intro-copy h1 {
    font-size: min(9.7vw, 42px);
    letter-spacing: -0.06em;
  }

  .intro-copy h1 em {
    padding-inline: 0.06em;
  }

  .intro-lead {
    margin-top: 25px;
    font-size: 16px;
  }

  .intro-actions {
    margin-top: 30px;
  }

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

  .quiz-screen {
    min-height: calc(100dvh - 136px);
    padding: 26px 0 44px;
  }

  .question-copy {
    min-height: 168px;
    padding-top: 38px;
  }

  .question-copy h2 {
    font-size: clamp(25px, 7.2vw, 32px);
  }

  .answer-list {
    margin-top: 18px;
  }

  .answer-button {
    min-height: 61px;
    grid-template-columns: 38px 1fr 20px;
    gap: 9px;
    padding: 9px 12px;
  }

  .answer-key {
    width: 31px;
    height: 31px;
  }

  .answer-label {
    font-size: 14px;
  }

  .keyboard-note {
    display: none;
  }

  .tally-screen {
    min-height: calc(100dvh - 136px);
    padding: 40px 0;
  }

  .tally-card {
    padding: 40px 26px;
    box-shadow: 8px 8px 0 var(--red);
  }

  .tally-card h2 {
    font-size: clamp(58px, 20vw, 92px);
  }

  .result-screen {
    padding: 38px 0 58px;
  }

  .result-layout {
    display: flex;
    flex-direction: column;
    gap: 40px;
  }

  .result-details {
    display: contents;
  }

  .result-name {
    order: 0;
    width: 100%;
    margin-bottom: -34px;
  }

  .result-details > h1 {
    order: 1;
    align-self: flex-start;
    font-size: clamp(40px, 12vw, 58px);
  }

  .result-lead {
    order: 2;
    margin-top: -25px;
  }

  .result-stats {
    order: 3;
    width: 100%;
    margin-top: -17px;
  }

  .share-actions {
    order: 4;
    width: 100%;
    margin-top: -17px;
  }

  .certificate-wrap {
    order: 5;
    width: calc(100% - 8px);
    align-self: flex-start;
  }

  .type-note {
    order: 6;
    width: 100%;
    margin-top: -12px;
  }

  .retry-button {
    order: 7;
    align-self: flex-start;
    margin-top: -27px;
  }

  .certificate__score {
    font-size: clamp(104px, 30vw, 158px);
  }

  .certificate__body h2 {
    font-size: clamp(27px, 8vw, 43px);
  }

  .site-footer {
    min-height: 174px;
    padding-block: 22px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
  }

  .site-footer__note {
    flex: none;
  }

  .site-footer__note small {
    font-size: 9px;
    text-align: left;
  }

  .site-footer__services {
    flex: none;
    width: 100%;
    justify-items: start;
  }

  .site-footer__links {
    justify-content: flex-start;
    gap: 7px 15px;
  }
}

@media (max-width: 390px) {
  .header-count {
    display: none;
  }

  .intro-copy h1 {
    font-size: 9.45vw;
  }

  .question-copy h2 {
    font-size: 24px;
  }

  .result-stats div {
    padding-inline: 9px;
  }

  .result-stats dd {
    font-size: 25px;
  }

  .share-actions {
    grid-template-columns: 1fr;
  }

  .share-actions .primary-button {
    grid-column: auto;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
