:root {
  color-scheme: dark;
  --bg: #030717;
  --panel: rgba(10, 20, 54, 0.72);
  --panel-strong: rgba(9, 18, 48, 0.94);
  --line: rgba(139, 177, 255, 0.34);
  --line-bright: rgba(139, 207, 255, 0.72);
  --text: #f5f7ff;
  --muted: #a9b8df;
  --blue: #4ca8ff;
  --violet: #8d68ff;
  --pink: #df83ff;
  --danger: #ff9fb9;
  --radius: 26px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -10%, rgba(44, 75, 170, 0.3), transparent 38%),
    linear-gradient(180deg, #020513 0%, #06102d 58%, #071746 100%);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #bce6ff;
  box-shadow: 0 0 12px 3px rgba(72, 147, 255, 0.8);
  animation: twinkle 3.4s ease-in-out infinite;
}

.star--one { top: 8%; left: 12%; }
.star--two { top: 17%; right: 14%; animation-delay: -1.3s; }
.star--three { top: 48%; left: 7%; animation-delay: -2.1s; }
.star--four { top: 67%; right: 8%; animation-delay: -0.7s; }

.glow {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.18;
}

.glow--top {
  top: -190px;
  right: -150px;
  background: var(--violet);
}

.glow--bottom {
  bottom: -230px;
  left: -150px;
  background: #135fff;
}

.app-shell {
  width: min(100%, 520px);
  min-height: 100svh;
  margin-inline: auto;
  position: relative;
}

.screen {
  min-height: 100svh;
  padding: 46px 20px 30px;
  animation: screen-in 0.5s ease both;
}

.brand {
  text-align: center;
}

.brand__eyebrow {
  margin: 0;
  color: #eaf3ff;
  font-size: clamp(1.8rem, 10vw, 3.2rem);
  font-weight: 750;
  letter-spacing: 0.04em;
  line-height: 0.95;
}

.brand h1 {
  margin: 6px 0 0;
  color: transparent;
  background: linear-gradient(100deg, #eef6ff 8%, #77ceff 48%, #dc84ff 88%);
  background-clip: text;
  -webkit-background-clip: text;
  font-size: clamp(2.35rem, 13vw, 4rem);
  font-weight: 800;
  letter-spacing: 0.025em;
  line-height: 1;
  filter: drop-shadow(0 0 15px rgba(99, 129, 255, 0.42));
}

.brand__loading {
  margin: 17px 0 0;
  color: #dce6ff;
  font-size: 0.9rem;
  letter-spacing: 0.24em;
}

.mascot {
  width: 102px;
  height: 92px;
  margin: 27px auto -9px;
  position: relative;
  z-index: 2;
  animation: float 3.6s ease-in-out infinite;
}

.mascot__antenna {
  width: 28px;
  height: 15px;
  margin: auto;
  border: 2px solid #8cdcff;
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 0 12px #716cff;
}

.mascot__body {
  width: 82px;
  height: 66px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border: 2px solid #8eeaff;
  border-radius: 39% 39% 46% 46%;
  background: linear-gradient(145deg, rgba(94, 129, 255, 0.8), rgba(83, 45, 165, 0.72));
  box-shadow: 0 0 12px #4e8cff, inset 0 0 24px rgba(74, 228, 255, 0.25);
}

.mascot__face {
  width: 53px;
  height: 31px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  border: 1px solid #99eaff;
  border-radius: 14px;
  background: #081433;
}

.mascot__face i {
  width: 5px;
  height: 13px;
  border-radius: 5px;
  background: #e9fbff;
  box-shadow: 0 0 8px #53c8ff;
}

.mascot__shadow {
  width: 92px;
  height: 12px;
  margin: 4px auto 0;
  border: 1px solid rgba(92, 196, 255, 0.62);
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(71, 113, 255, 0.85);
}

.glass-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(155deg, rgba(18, 34, 78, 0.78), var(--panel));
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 30px rgba(47, 91, 220, 0.08);
  backdrop-filter: blur(18px);
}

.identity-card {
  padding: 31px 22px 24px;
}

.card-heading {
  text-align: center;
}

.card-heading__signal {
  margin: 0 0 12px;
  color: #7285bb;
  font-size: 0.64rem;
  letter-spacing: 0.18em;
}

.card-heading h2 {
  margin: 0;
  font-size: 1.48rem;
  font-weight: 650;
  letter-spacing: 0.07em;
}

.card-heading > p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
  letter-spacing: 0.08em;
}

.welcome-message {
  margin: 20px 0 -5px;
  color: #bfe5ff;
  text-align: center;
  font-size: 0.88rem;
}

.field-group {
  margin-top: 27px;
}

.field-group label,
.avatar-picker legend {
  display: block;
  margin-bottom: 10px;
  color: #d8e5ff;
  font-size: 0.92rem;
  font-weight: 600;
}

.text-field {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-inline: 15px;
  border: 1px solid rgba(126, 155, 255, 0.46);
  border-radius: 15px;
  background: rgba(4, 10, 34, 0.62);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.text-field:focus-within {
  border-color: var(--line-bright);
  box-shadow: 0 0 0 3px rgba(82, 133, 255, 0.12), 0 0 18px rgba(95, 86, 255, 0.14);
}

.text-field span {
  color: #69c9ff;
  font-size: 1.3rem;
}

.text-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 1rem;
}

.text-field input::placeholder {
  color: #65749e;
}

.field-error {
  min-height: 18px;
  margin: 6px 3px 0;
  color: var(--danger);
  font-size: 0.78rem;
}

.avatar-picker {
  min-width: 0;
  margin: 17px 0 0;
  padding: 0;
  border: 0;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.avatar-option {
  min-width: 0;
  min-height: 82px;
  padding: 7px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(116, 143, 220, 0.32);
  border-radius: 17px;
  background: rgba(9, 16, 45, 0.62);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.avatar-option:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 181, 255, 0.72);
}

.avatar-option:focus-visible,
.primary-button:focus-visible,
.text-button:focus-visible {
  outline: 3px solid rgba(140, 221, 255, 0.65);
  outline-offset: 3px;
}

.avatar-option.is-selected {
  border-color: #b08cff;
  background: linear-gradient(145deg, rgba(76, 116, 255, 0.23), rgba(164, 82, 255, 0.22));
  box-shadow: 0 0 16px rgba(112, 92, 255, 0.3), inset 0 0 12px rgba(92, 193, 255, 0.09);
}

.avatar-option__icon {
  font-size: clamp(1.65rem, 8vw, 2.25rem);
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.avatar-option > span:last-child {
  max-width: 100%;
  color: #c8d6f5;
  font-size: clamp(0.67rem, 3vw, 0.78rem);
  white-space: nowrap;
}

.primary-button {
  width: 100%;
  min-height: 58px;
  margin-top: 26px;
  padding: 0 21px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  border: 1px solid rgba(210, 232, 255, 0.68);
  border-radius: 16px;
  color: white;
  background: linear-gradient(100deg, #ad62ea 0%, #705cff 44%, #2f86ff 100%);
  box-shadow: 0 10px 26px rgba(70, 78, 255, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.32);
  cursor: pointer;
  font-size: 1.06rem;
  font-weight: 680;
  letter-spacing: 0.06em;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.primary-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.primary-button:active {
  transform: translateY(1px);
}

.primary-button__arrow {
  font-size: 1.4rem;
  font-weight: 400;
}

.system-online {
  margin: 26px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  color: #6988d5;
  font-size: 0.62rem;
  letter-spacing: 0.4em;
}

.system-online span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #7a75ff;
  box-shadow: 0 0 7px #7a75ff;
}

.scan-screen {
  padding-top: 30px;
}

.scan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.scan-header p {
  margin: 0;
  color: #d8e8ff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.scan-header p span {
  color: #a478ff;
}

.text-button {
  min-width: 52px;
  min-height: 44px;
  padding: 0;
  border: 0;
  color: #93a8d5;
  background: transparent;
  cursor: pointer;
}

.scan-core {
  width: 190px;
  height: 190px;
  margin: 35px auto 22px;
  position: relative;
  display: grid;
  place-items: center;
}

.scan-core__orbit {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(96, 192, 255, 0.5);
  border-right-color: #b369ff;
  border-radius: 50%;
  box-shadow: 0 0 26px rgba(59, 115, 255, 0.26), inset 0 0 24px rgba(77, 61, 255, 0.14);
  animation: spin 5s linear infinite;
}

.scan-core__orbit::before,
.scan-core__orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(127, 105, 255, 0.4);
}

.scan-core__orbit::before { inset: 14px; }
.scan-core__orbit::after { inset: -9px; }

.scan-core__avatar {
  position: relative;
  z-index: 2;
  font-size: 4.8rem;
  filter: drop-shadow(0 0 17px rgba(102, 169, 255, 0.72));
  animation: pulse 2.2s ease-in-out infinite;
}

.scan-core__beam {
  position: absolute;
  z-index: 3;
  width: 142px;
  height: 2px;
  left: 24px;
  top: 28px;
  background: linear-gradient(90deg, transparent, #83e3ff, transparent);
  box-shadow: 0 0 15px #5ebfff;
  animation: scan-beam 2.2s ease-in-out infinite;
}

.scan-card {
  min-height: 394px;
  padding: 27px 22px;
}

.scan-card__heading {
  padding-bottom: 19px;
  border-bottom: 1px solid rgba(123, 151, 227, 0.2);
}

.scan-card__heading p {
  margin: 0 0 8px;
  color: #8499cc;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scan-card__heading h2 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: 0.035em;
}

.typing-dots {
  display: inline-block;
  width: 1.8em;
  overflow: hidden;
  vertical-align: bottom;
  animation: typing 1.2s steps(4, end) infinite;
}

.scan-log {
  display: grid;
  gap: 17px;
  padding-top: 23px;
}

.scan-item {
  animation: log-in 0.32s ease both;
}

.scan-item__label {
  margin: 0 0 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #d9e5ff;
  font-size: 0.88rem;
}

.scan-item__value {
  color: #77c8ff;
  font-variant-numeric: tabular-nums;
}

.scan-item.is-error .scan-item__value {
  color: #ff83b4;
  letter-spacing: 0.1em;
}

.scan-track {
  height: 5px;
  overflow: hidden;
  border-radius: 9px;
  background: rgba(70, 92, 154, 0.32);
}

.scan-track span {
  width: var(--progress);
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #7d5cff, #4ccaff);
  box-shadow: 0 0 10px rgba(84, 178, 255, 0.65);
  transform-origin: left;
  animation: fill-track 0.75s ease both;
}

.scan-item.is-error .scan-track span {
  width: 42%;
  background: linear-gradient(90deg, #9c4cff, #ff5e9e);
}

.scan-ending {
  margin-top: 26px;
  padding: 22px 17px;
  border: 1px solid rgba(181, 116, 255, 0.34);
  border-radius: 17px;
  background: rgba(57, 25, 105, 0.2);
  text-align: center;
  animation: ending-in 0.55s ease both;
}

.scan-ending p {
  margin: 0 0 9px;
  color: #c6d4f4;
}

.scan-ending p:first-child {
  color: #ff9ccc;
  font-size: 1.05rem;
  font-weight: 700;
}

.scan-ending strong {
  display: block;
  margin-top: 14px;
  color: #e9d8ff;
  font-size: 1.08rem;
}

.scan-footnote {
  margin: 21px 0 0;
  color: #647aae;
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.quiz-screen {
  padding-top: 25px;
}

.quiz-header {
  min-height: 82px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-inline: 3px;
}

.quiz-brand {
  margin: 10px 0 0;
  color: #dbe9ff;
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.07em;
}

.quiz-brand span {
  color: #a779ff;
}

.quiz-avatar {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(112, 197, 255, 0.5);
  border-radius: 50%;
  background: rgba(15, 29, 71, 0.72);
  box-shadow: 0 0 20px rgba(84, 105, 255, 0.27), inset 0 0 16px rgba(91, 196, 255, 0.12);
  font-size: 2.1rem;
  animation: float 3.6s ease-in-out infinite;
}

.quiz-card {
  padding: 23px 20px 25px;
}

.quiz-progress {
  display: flex;
  align-items: center;
  gap: 15px;
}

.quiz-progress p {
  min-width: 77px;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: #7589bc;
  font-variant-numeric: tabular-nums;
}

.quiz-progress strong {
  color: transparent;
  background: linear-gradient(135deg, #c99cff, #69caff);
  background-clip: text;
  -webkit-background-clip: text;
  font-size: 1.8rem;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(113, 94, 255, 0.42));
}

.quiz-progress__track {
  height: 5px;
  flex: 1;
  overflow: hidden;
  border: 1px solid rgba(108, 135, 209, 0.25);
  border-radius: 999px;
  background: rgba(48, 67, 128, 0.34);
}

.quiz-progress__track span {
  width: 8.333%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #975cff, #50bfff);
  box-shadow: 0 0 10px rgba(82, 150, 255, 0.68);
  transition: width 0.35s ease;
}

.question-copy {
  min-height: 174px;
  padding: 36px 7px 23px;
  text-align: center;
}

.question-copy__chapter {
  margin: 0 0 12px;
  color: #7189c2;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
}

.question-copy h2 {
  margin: 0;
  color: #f5f7ff;
  font-size: clamp(1.55rem, 7.4vw, 2rem);
  line-height: 1.24;
  text-shadow: 0 0 16px rgba(80, 125, 255, 0.25);
}

.question-copy__prompt {
  margin: 16px auto 0;
  color: #aebde1;
  font-size: 0.94rem;
  line-height: 1.72;
  white-space: pre-line;
}

.question-copy__note {
  width: fit-content;
  margin: 12px auto 0;
  padding: 4px 10px;
  border-radius: 999px;
  color: #8ea4d6;
  background: rgba(62, 78, 136, 0.22);
  font-size: 0.72rem;
}

.quiz-card.is-quiet .question-copy {
  min-height: 248px;
  padding-top: 38px;
}

.quiz-card.is-quiet .question-copy h2 {
  color: #dfe8ff;
  font-size: 1.42rem;
}

.quiz-card.is-quiet .question-copy__prompt {
  color: #c4cdec;
}

.quiz-options {
  display: grid;
  gap: 12px;
}

.quiz-option {
  width: 100%;
  min-height: 74px;
  padding: 13px 15px;
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  border: 1px solid rgba(113, 157, 255, 0.5);
  border-radius: 18px;
  color: #f0f4ff;
  background: linear-gradient(145deg, rgba(19, 37, 85, 0.82), rgba(10, 23, 65, 0.76));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  text-align: left;
  cursor: pointer;
  animation: option-in 0.35s ease both;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.quiz-option:nth-child(2) { animation-delay: 0.04s; }
.quiz-option:nth-child(3) { animation-delay: 0.08s; }
.quiz-option:nth-child(4) { animation-delay: 0.12s; }

.quiz-option:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(130, 208, 255, 0.82);
  background: linear-gradient(145deg, rgba(34, 58, 121, 0.9), rgba(21, 34, 84, 0.82));
}

.quiz-option:focus-visible,
.secondary-button:focus-visible {
  outline: 3px solid rgba(140, 221, 255, 0.65);
  outline-offset: 3px;
}

.quiz-option:disabled {
  cursor: default;
}

.quiz-option.is-selected {
  border-color: #9b86ff;
  background: linear-gradient(145deg, rgba(76, 94, 209, 0.55), rgba(72, 40, 148, 0.5));
  box-shadow: 0 0 18px rgba(95, 77, 255, 0.2), inset 0 0 15px rgba(97, 195, 255, 0.09);
}

.quiz-option.is-confirming {
  border-color: rgba(255, 130, 193, 0.72);
  background: linear-gradient(145deg, rgba(91, 39, 116, 0.7), rgba(61, 24, 83, 0.62));
}

.quiz-option__number {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border: 1px solid #7c69ff;
  border-radius: 50%;
  color: #8fd7ff;
  background: rgba(20, 30, 79, 0.75);
  box-shadow: 0 0 10px rgba(88, 70, 255, 0.25);
  font-size: 1.08rem;
  font-weight: 750;
}

.quiz-option__text {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.94rem;
  line-height: 1.55;
}

.quiz-feedback {
  min-height: 20px;
  margin: 15px 4px 0;
  color: #d2a8ff;
  text-align: center;
  font-size: 0.78rem;
}

.quiz-hint {
  margin: 13px 0 0;
  color: #7185b4;
  text-align: center;
  font-size: 0.72rem;
  line-height: 1.55;
}

.quiz-hint span {
  color: #74d5ff;
}

.quiz-complete-screen {
  padding-top: 30px;
}

.completion-core {
  width: 156px;
  height: 156px;
  margin: 70px auto 34px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  border: 1px solid rgba(120, 191, 255, 0.55);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 69, 206, 0.38), rgba(8, 18, 52, 0.7) 67%);
  box-shadow: 0 0 35px rgba(84, 89, 255, 0.28), inset 0 0 25px rgba(84, 201, 255, 0.12);
  animation: pulse 2.2s ease-in-out infinite;
}

.completion-core span {
  color: #f1f4ff;
  font-size: 3.65rem;
  font-weight: 800;
  line-height: 156px;
}

.completion-core small {
  color: #91a8df;
  font-size: 0.85rem;
}

.completion-card {
  padding: 32px 24px 25px;
  text-align: center;
}

.completion-card__signal {
  margin: 0 0 14px;
  color: #788dc2;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
}

.completion-card h2 {
  margin: 0;
  font-size: 1.55rem;
}

.completion-card > p:not(.completion-card__signal) {
  margin: 14px 0 0;
  color: #b3c0e2;
}

.completion-card .completion-card__pending {
  color: #7589ba;
  font-size: 0.8rem;
}

.secondary-button {
  width: 100%;
  min-height: 52px;
  margin-top: 25px;
  border: 1px solid rgba(126, 166, 255, 0.48);
  border-radius: 15px;
  color: #e4edff;
  background: rgba(22, 38, 88, 0.68);
  cursor: pointer;
}

.result-screen { padding: 22px 16px 42px; }

.result-header {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.result-header > p {
  margin: 0;
  color: #dceaff;
  font-size: 0.77rem;
  font-weight: 760;
  letter-spacing: 0.07em;
}

.result-header > p span { color: #b379ff; }

.result-header__identity {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: #8fa5d2;
  font-size: 0.74rem;
}

.result-header__identity > span:first-child {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-header__avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(117, 199, 255, 0.42);
  border-radius: 50%;
  background: rgba(18, 32, 75, 0.75);
  box-shadow: 0 0 16px rgba(86, 105, 255, 0.18);
  font-size: 1.25rem;
}

.result-intro {
  margin: 28px 0 19px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 9px;
  text-align: center;
}

.result-intro > span { color: #7fd7ff; text-shadow: 0 0 10px #725cff; }
.result-intro p { margin: 0 0 6px; color: #8298c7; font-size: 0.65rem; letter-spacing: 0.2em; }
.result-intro h1 { margin: 0; font-size: clamp(1.25rem, 6.3vw, 1.62rem); letter-spacing: 0.04em; }

.result-title-card,
.result-major-card,
.result-radar-card,
.result-list-card { margin-top: 14px; }

.result-title-card {
  padding: 29px 20px 24px;
  overflow: hidden;
  position: relative;
  text-align: center;
}

.result-title-card::after {
  content: "";
  width: 180px;
  height: 180px;
  position: absolute;
  top: -118px;
  right: -70px;
  border-radius: 50%;
  background: rgba(105, 67, 255, 0.17);
  filter: blur(24px);
  pointer-events: none;
}

.result-mascot {
  width: 62px;
  height: 55px;
  margin: 0 auto 15px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 2px solid #81ddff;
  border-radius: 42% 42% 47% 47%;
  background: linear-gradient(145deg, rgba(76, 115, 255, 0.88), rgba(112, 55, 193, 0.82));
  box-shadow: 0 0 20px rgba(76, 121, 255, 0.5), inset 0 0 16px rgba(104, 224, 255, 0.2);
}

.result-mascot span {
  width: 20px;
  height: 8px;
  position: absolute;
  top: -10px;
  border: 2px solid #8edfff;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
}

.result-mascot i { width: 5px; height: 13px; border-radius: 5px; background: white; box-shadow: 0 0 8px #5ed7ff; }
.result-section-kicker { margin: 0 0 8px; color: #879bca; font-size: 0.64rem; letter-spacing: 0.18em; }

.result-title-card h2 {
  margin: 0;
  color: transparent;
  background: linear-gradient(100deg, #f5f8ff 12%, #83d8ff 47%, #ce8fff 88%);
  background-clip: text;
  -webkit-background-clip: text;
  font-size: clamp(2rem, 10vw, 3rem);
  line-height: 1.16;
  overflow-wrap: anywhere;
  filter: drop-shadow(0 0 13px rgba(89, 107, 255, 0.34));
}

.result-title-card blockquote { max-width: 360px; margin: 15px auto 0; color: #dae4ff; font-size: 0.96rem; line-height: 1.7; }
.result-title-card blockquote::before, .result-title-card blockquote::after { color: #9d83ff; }
.result-title-card blockquote::before { content: "“"; }
.result-title-card blockquote::after { content: "”"; }

.result-world {
  width: fit-content;
  margin: 17px auto 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #b8c9ed;
  font-size: 0.9rem;
}

.result-world > span:first-child { color: #7bd7ff; text-shadow: 0 0 9px #7863ff; }

.result-major-card, .result-radar-card, .result-list-card { padding: 19px 18px; }
.result-card-heading { display: flex; align-items: center; gap: 9px; }
.result-card-heading > span { color: #9b83ff; text-shadow: 0 0 9px rgba(94, 129, 255, 0.72); }
.result-card-heading h2 { margin: 0; font-size: 1rem; font-weight: 650; letter-spacing: 0.04em; }

.top-major {
  min-width: 0;
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(116, 151, 241, 0.28);
  border-radius: 19px;
  background: rgba(8, 18, 52, 0.45);
}

.top-major__copy { min-width: 0; display: flex; align-items: center; gap: 12px; }
.top-major__copy > div { min-width: 0; }

.rank-medal {
  width: 42px;
  height: 48px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #ffd878;
  border-radius: 50% 50% 42% 42%;
  color: #fff3bb;
  background: linear-gradient(145deg, #d88a24, #80551b);
  box-shadow: 0 0 14px rgba(255, 189, 70, 0.28);
  font-size: 1.25rem;
  font-weight: 800;
}

.top-major__copy p, .other-majors > p { margin: 0 0 6px; color: #7489bd; font-size: 0.62rem; letter-spacing: 0.12em; }
.top-major__copy h3 { margin: 0; color: #f3f6ff; font-size: clamp(1.05rem, 5vw, 1.34rem); line-height: 1.35; overflow-wrap: anywhere; }

.match-orb {
  --match: 0;
  width: 100px;
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  border-radius: 50%;
  position: relative;
  background: radial-gradient(circle, #0a1745 57%, transparent 58%), conic-gradient(from 220deg, #6ad2ff calc(var(--match) * 1%), #9665ff calc(var(--match) * 1%), rgba(67, 88, 153, 0.24) 0);
  box-shadow: 0 0 22px rgba(99, 91, 255, 0.25), inset 0 0 18px rgba(76, 180, 255, 0.12);
  text-align: center;
}

.match-orb::after { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(179, 211, 255, 0.24); border-radius: inherit; }
.match-orb strong { position: relative; z-index: 1; color: #f5f5ff; font-size: 1.75rem; font-variant-numeric: tabular-nums; line-height: 1; }
.match-orb small { color: #bca6ff; font-size: 0.78rem; }
.match-orb > span { margin-top: 4px; position: relative; z-index: 1; color: #94a7d4; font-size: 0.58rem; }

.other-majors { margin-top: 16px; }
.other-majors ol { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; list-style: none; }
.other-majors li { min-width: 0; min-height: 48px; display: flex; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid rgba(110, 140, 214, 0.25); border-radius: 13px; color: #cdd8f4; background: rgba(10, 22, 58, 0.4); font-size: 0.78rem; }
.other-majors li span { color: #9d83ff; font-size: 0.7rem; }
.other-majors li strong { min-width: 0; overflow-wrap: anywhere; font-weight: 550; line-height: 1.35; }

.radar-wrap { margin-top: 10px; }
.radar-chart { width: 100%; max-width: 390px; display: block; margin: 0 auto; overflow: visible; }
.radar-grid polygon, .radar-grid line { fill: rgba(75, 71, 181, 0.035); stroke: rgba(103, 120, 220, 0.31); stroke-width: 1; vector-effect: non-scaling-stroke; }
.radar-grid polygon:last-of-type { stroke: rgba(116, 151, 255, 0.56); }

.radar-area {
  fill: url(#radar-fill);
  stroke: #8fcfff;
  stroke-width: 2;
  filter: url(#radar-glow);
  transform: scale(0);
  transform-origin: 160px 140px;
  transition: transform 0.9s cubic-bezier(.2, .75, .25, 1);
  vector-effect: non-scaling-stroke;
}

.result-screen.is-active .radar-area { transform: scale(1); }
.radar-points {
  transform: scale(0);
  transform-origin: 160px 140px;
  transition: transform 0.9s cubic-bezier(.2, .75, .25, 1);
}
.result-screen.is-active .radar-points { transform: scale(1); }
.radar-points circle { fill: #eef9ff; stroke: #856fff; stroke-width: 2; filter: url(#radar-glow); }

.trait-values { margin: -2px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.trait-value { min-width: 0; margin: 0; display: flex; align-items: baseline; justify-content: center; gap: 5px; color: #9aaed8; font-size: 0.72rem; }
.trait-value dt, .trait-value dd { margin: 0; }
.trait-value dd { color: #ae8cff; font-size: 0.9rem; font-weight: 750; font-variant-numeric: tabular-nums; }

.tag-list { margin-top: 15px; display: flex; flex-wrap: wrap; gap: 8px; }
.result-tag { max-width: 100%; padding: 8px 11px; border: 1px solid rgba(138, 105, 255, 0.5); border-radius: 999px; color: #d4c6ff; background: linear-gradient(135deg, rgba(72, 47, 149, 0.34), rgba(21, 51, 118, 0.36)); overflow-wrap: anywhere; font-size: 0.73rem; line-height: 1.35; }
.tag-warning, .result-empty { margin: 14px 2px 0; color: #8296c5; font-size: 0.76rem; line-height: 1.65; }
.tag-warning { color: #bc9ee9; }

.achievement-list { margin-top: 15px; display: grid; gap: 9px; }
.achievement-item { min-width: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 11px; align-items: center; padding: 12px; border: 1px solid rgba(106, 142, 223, 0.26); border-radius: 15px; background: rgba(8, 20, 55, 0.45); }
.achievement-item__icon { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(131, 201, 255, 0.46); border-radius: 50%; color: #c6b4ff; background: rgba(49, 49, 132, 0.35); box-shadow: 0 0 13px rgba(101, 89, 255, 0.18); }
.achievement-item strong { display: block; color: #e3eaff; font-size: 0.85rem; line-height: 1.4; }
.achievement-item p { margin: 4px 0 0; color: #889bc7; font-size: 0.72rem; line-height: 1.55; }

.result-actions { margin-top: 16px; display: grid; gap: 10px; }
.result-button { min-width: 0; min-height: 54px; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 10px 13px; border-radius: 15px; cursor: pointer; font-weight: 650; line-height: 1.35; transition: transform 0.18s ease, filter 0.18s ease, border-color 0.18s ease; }
.result-button:hover { transform: translateY(-1px); filter: brightness(1.08); }
.result-button:focus-visible { outline: 3px solid rgba(140, 221, 255, 0.65); outline-offset: 3px; }
.result-button--secondary { border: 1px solid rgba(133, 169, 255, 0.55); color: #dce7ff; background: rgba(13, 29, 70, 0.7); }
.result-button--primary { border: 1px solid rgba(219, 232, 255, 0.68); color: white; background: linear-gradient(105deg, #ad61ea, #6f5cff 47%, #2c85ff); box-shadow: 0 9px 25px rgba(73, 74, 255, 0.27), inset 0 1px 0 rgba(255, 255, 255, 0.28); }
.result-button.is-saved { border-color: rgba(116, 238, 211, 0.58); background: linear-gradient(105deg, #2d8d9f, #5960d4); }
.result-footnote { margin: 19px 0 0; color: #647bab; text-align: center; font-size: 0.69rem; letter-spacing: 0.08em; }

.save-toast { width: max-content; max-width: calc(100% - 32px); position: fixed; z-index: 20; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); transform: translateX(-50%); padding: 11px 16px; border: 1px solid rgba(117, 222, 226, 0.45); border-radius: 999px; color: #e7ffff; background: rgba(8, 32, 62, 0.94); box-shadow: 0 10px 35px rgba(0, 0, 0, 0.36), 0 0 17px rgba(62, 171, 255, 0.2); text-align: center; font-size: 0.78rem; animation: toast-in 0.3s ease both; }

.result-reveal { opacity: 0; transform: translateY(10px); }
.result-screen.is-active .result-reveal { animation: result-reveal 0.48s ease forwards; animation-delay: calc(var(--reveal-order, 0) * 75ms); }

@keyframes twinkle {
  50% { opacity: 0.25; transform: scale(0.65); }
}

@keyframes float {
  50% { transform: translateY(-7px); }
}

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  50% { transform: scale(1.05); }
}

@keyframes scan-beam {
  0%, 100% { transform: translateY(0); opacity: 0.3; }
  50% { transform: translateY(132px); opacity: 1; }
}

@keyframes typing {
  from { width: 0; }
}

@keyframes log-in {
  from { opacity: 0; transform: translateX(-7px); }
}

@keyframes fill-track {
  from { transform: scaleX(0); }
}

@keyframes ending-in {
  from { opacity: 0; transform: translateY(8px); }
}

@keyframes option-in {
  from { opacity: 0; transform: translateY(7px); }
}

@keyframes result-reveal {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
}

@media (min-width: 400px) {
  .result-actions {
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  }
}

@media (min-width: 600px) {
  body {
    padding-block: 24px;
  }

  .app-shell {
    min-height: calc(100svh - 48px);
    border: 1px solid rgba(117, 153, 233, 0.16);
    border-radius: 34px;
    background: rgba(3, 9, 29, 0.25);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
  }

  .screen {
    min-height: calc(100svh - 48px);
    padding-inline: 28px;
  }
}

@media (max-width: 350px) {
  .screen {
    padding-inline: 14px;
  }

  .identity-card,
  .scan-card,
  .quiz-card {
    padding-inline: 16px;
  }

  .avatar-grid {
    gap: 4px;
  }

  .avatar-option {
    min-height: 76px;
    border-radius: 14px;
  }

  .result-screen {
    padding-inline: 12px;
  }

  .result-major-card,
  .result-radar-card,
  .result-list-card {
    padding-inline: 16px;
  }

  .top-major {
    grid-template-columns: minmax(0, 1fr) 92px;
    padding-inline: 12px;
  }

  .match-orb {
    width: 88px;
  }

  .top-major__copy {
    gap: 8px;
  }

  .rank-medal {
    width: 35px;
    height: 42px;
  }
}

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

/* Phase 4 result hierarchy: one settlement hero, followed by three quiet modules. */
.result-screen {
  padding: 22px 18px 48px;
}

.result-hero {
  position: relative;
  isolation: isolate;
  padding: 58px 4px 48px;
  text-align: center;
}

.result-hero::before {
  content: "";
  width: 92%;
  height: 440px;
  position: absolute;
  z-index: -1;
  top: -18px;
  left: 4%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(85, 72, 225, 0.2), rgba(35, 93, 189, 0.08) 42%, transparent 72%);
  filter: blur(10px);
  pointer-events: none;
}

.result-hero .result-intro {
  margin: 0;
  justify-content: center;
  gap: 11px;
}

.result-hero .result-intro p {
  margin: 0;
  color: #93a9dc;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
}

.result-hero .result-intro > span {
  color: #70ceff;
  font-size: 0.66rem;
  filter: drop-shadow(0 0 7px #6e70ff);
}

.result-hero .result-section-kicker {
  margin-top: 46px;
}

.result-hero > h1 {
  max-width: 460px;
  margin: 12px auto 0;
  color: transparent;
  background: linear-gradient(100deg, #eaf8ff 4%, #79ceff 43%, #ad83ff 92%);
  background-clip: text;
  -webkit-background-clip: text;
  filter: drop-shadow(0 0 15px rgba(104, 111, 255, 0.24));
  font-size: clamp(2.15rem, 11vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}

.result-hero > blockquote {
  max-width: 410px;
  margin: 22px auto 0;
  color: #ccd6f1;
  font-size: 0.88rem;
  line-height: 1.75;
}

.result-hero > blockquote::before { content: "“"; }
.result-hero > blockquote::after { content: "”"; }

.result-hero .result-world {
  margin-top: 18px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(25, 43, 95, 0.42);
}

.hero-major {
  min-width: 0;
  margin-top: 50px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 142px;
  align-items: center;
  gap: 18px;
  padding: 28px 4px;
  border-block: 1px solid rgba(115, 147, 223, 0.2);
  text-align: left;
}

.hero-major__copy { min-width: 0; }
.hero-major__copy p { margin: 0 0 8px; color: #758aba; font-size: 0.63rem; letter-spacing: 0.14em; }
.hero-major__copy h2 { margin: 0; color: #f4f7ff; font-size: clamp(1.5rem, 7vw, 2.15rem); line-height: 1.25; overflow-wrap: anywhere; }

.hero-major .match-orb {
  width: 140px;
  background: radial-gradient(circle, #07163e 59%, transparent 60%), conic-gradient(from 220deg, #70d7ff calc(var(--match) * 1%), #9665ff calc(var(--match) * 1%), rgba(67, 88, 153, 0.18) 0);
  box-shadow: 0 0 34px rgba(86, 102, 255, 0.25), inset 0 0 24px rgba(76, 180, 255, 0.12);
}

.hero-major .match-orb strong { font-size: 2.55rem; }
.hero-major .match-orb small { font-size: 0.95rem; }

.hero-other-majors {
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  text-align: left;
}

.hero-other-majors li { min-width: 0; padding-left: 12px; border-left: 1px solid rgba(127, 111, 233, 0.35); }
.hero-other-majors span { display: block; color: #6478a8; font-size: 0.59rem; letter-spacing: 0.12em; }
.hero-other-majors strong { display: block; margin-top: 5px; color: #a9b6d8; font-size: 0.79rem; font-weight: 550; line-height: 1.45; overflow-wrap: anywhere; }

.result-section {
  padding: 52px 0;
  border-top: 1px solid rgba(101, 130, 199, 0.16);
}

.result-section-heading > p { margin: 0 0 7px; color: #6b7eac; font-size: 0.59rem; letter-spacing: 0.19em; }
.result-section-heading h2 { margin: 0; color: #edf3ff; font-size: 1.35rem; letter-spacing: 0.02em; }
.result-section-heading--row { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.result-section-heading--row > strong { flex: 0 0 auto; color: #e5b76a; font-size: 0.62rem; letter-spacing: 0.12em; }

.result-personality .radar-wrap { margin: 26px -8px 0; }
.result-personality .radar-chart { max-width: 430px; }
.radar-axis-copy text { fill: #92a5d2; font-size: 9px; letter-spacing: 0.03em; }
.radar-axis-copy tspan { fill: #c5a2ff; font-size: 11px; font-weight: 750; }

.result-personality .trait-values {
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  position: absolute;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.behavior-profile {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 23px 20px;
  border-left: 2px solid #8272ff;
  border-radius: 0 18px 18px 0;
  background: linear-gradient(110deg, rgba(55, 47, 137, 0.35), rgba(16, 31, 74, 0.2));
}

.behavior-profile__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: #bcecff;
  background: linear-gradient(145deg, rgba(75, 160, 232, 0.36), rgba(100, 68, 203, 0.42));
  box-shadow: 0 0 20px rgba(89, 105, 255, 0.18);
  font-size: 1.45rem;
}

.behavior-profile p { margin: 1px 0 6px; color: #7e92c0; font-size: 0.61rem; letter-spacing: 0.14em; }
.behavior-profile h3 { margin: 0; color: #eef2ff; font-size: 1.14rem; line-height: 1.4; }
.behavior-profile blockquote { margin: 8px 0 0; color: #a8b5d5; font-size: 0.78rem; line-height: 1.65; }

.analysis-tags { margin-top: 36px; }
.analysis-tags > h3 { margin: 0; color: #8ea1cd; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; }
.analysis-tags .tag-list { margin-top: 13px; }

.result-achievements .achievement-list { margin-top: 24px; gap: 14px; }
.result-achievements .achievement-item {
  min-height: 118px;
  position: relative;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 15px;
  padding: 35px 18px 18px;
  overflow: hidden;
  border: 1px solid rgba(229, 181, 91, 0.46);
  border-radius: 19px;
  background: radial-gradient(circle at 100% 0, rgba(238, 184, 80, 0.16), transparent 36%), linear-gradient(125deg, rgba(64, 47, 104, 0.48), rgba(15, 30, 70, 0.68));
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 225, 160, 0.12);
  animation: achievement-unlock 0.65s cubic-bezier(.2, .8, .25, 1) both;
}

.achievement-item__unlocked {
  position: absolute;
  top: 10px;
  left: 18px;
  color: #f4c978;
  font-size: 0.57rem;
  font-weight: 800;
  letter-spacing: 0.19em;
}

.result-achievements .achievement-item__icon {
  width: 48px;
  height: 48px;
  border-color: rgba(255, 211, 117, 0.7);
  color: #ffe4a3;
  background: radial-gradient(circle, rgba(232, 179, 66, 0.4), rgba(104, 69, 38, 0.42));
  box-shadow: 0 0 22px rgba(243, 184, 69, 0.2);
  font-size: 1.22rem;
}

.result-achievements .achievement-item strong { color: #fff3d4; font-size: 0.98rem; }
.result-achievements .achievement-item p { color: #b8b3c3; font-size: 0.76rem; }
.result-actions { margin-top: 2px; padding-top: 48px; border-top: 1px solid rgba(101, 130, 199, 0.16); }

@keyframes achievement-unlock {
  from { opacity: 0; transform: translateY(12px) scale(0.97); filter: brightness(1.45); }
}

@media (max-width: 350px) {
  .result-screen { padding-inline: 14px; }
  .result-hero { padding-top: 48px; }
  .hero-major { grid-template-columns: minmax(0, 1fr) 112px; gap: 10px; }
  .hero-major .match-orb { width: 110px; }
  .hero-major .match-orb strong { font-size: 2rem; }
  .result-personality .radar-wrap { margin-inline: -12px; }
  .behavior-profile { grid-template-columns: 44px minmax(0, 1fr); padding-inline: 15px; }
  .behavior-profile__icon { width: 44px; height: 44px; }
}
