/* Exact visual restoration of the former qzzqmd result page. */
.result.active {
  display: block;
  min-height: calc(100vh - 36px);
  margin: -18px;
  padding: 14px 14px 36px;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 4%, rgba(210, 58, 40, 0.28), transparent 34%),
    radial-gradient(circle at 86% 30%, rgba(109, 201, 163, 0.12), transparent 26%),
    radial-gradient(circle at 12% 72%, rgba(128, 9, 18, 0.28), transparent 34%),
    linear-gradient(180deg, #160304 0%, #320708 42%, #090403 100%);
}

.result .report {
  max-width: 430px;
  gap: 12px;
}

.result .report > .report-card,
.result .report > .top-grid,
.result .report > .balance-panel,
.result .report > .report-actions,
.result .report > .copyright {
  display: none;
}

.result .report > .report-actions.result-end-action {
  width: min(100%, 410px);
  margin: 2px auto 0;
  display: grid;
  grid-template-columns: 1fr;
}

.result-light-action-btn {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 216, 103, 0.52);
  border-radius: 999px;
  background: rgba(8, 3, 3, 0.34);
  color: #fff2df;
  font-size: 15px;
  font-weight: 500;
  box-shadow: inset 0 0 18px rgba(255, 216, 103, 0.06);
  cursor: pointer;
}

.result-poster {
  position: relative;
  margin: 0 auto;
  overflow: hidden;
  color: #fff2df;
  isolation: isolate;
}

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

.result-poster.share-result {
  width: min(100%, 410px);
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
  padding: clamp(14px, 3.4vw, 18px) 14px 18px;
  border: 1px solid rgba(255, 92, 72, 0.42);
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 28%, rgba(220, 70, 48, 0.32), transparent 35%),
    radial-gradient(circle at 18% 10%, rgba(124, 8, 18, 0.6), transparent 34%),
    radial-gradient(circle at 78% 62%, rgba(111, 205, 162, 0.12), transparent 24%),
    linear-gradient(180deg, #140404 0%, #35090b 48%, #070403 100%);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(255, 221, 130, 0.06);
}

.result-poster.share-result::before {
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(116deg, transparent 0 26%, rgba(255, 215, 132, 0.12) 34%, transparent 45% 68%, rgba(255, 237, 180, 0.08) 76%, transparent 90%),
    repeating-linear-gradient(90deg, rgba(255, 236, 190, 0.055) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(0deg, rgba(255, 236, 190, 0.045) 0 1px, transparent 1px 78px);
  filter: none;
  opacity: 1;
  transform: none;
}

.result-poster.share-result::after {
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at 50% 42%, transparent 0 50%, rgba(0, 0, 0, 0.5) 100%);
}

.share-result-inner {
  position: relative;
  z-index: 2;
  height: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.result-symbol {
  position: relative;
  width: min(72%, 230px);
  height: auto;
  aspect-ratio: 304 / 238;
  margin: 0 auto;
  flex: 0 0 auto;
  animation: result-symbol-float 5.4s ease-in-out infinite;
}

.result-symbol::before {
  content: "";
  position: absolute;
  left: 36px;
  right: 36px;
  top: 18px;
  bottom: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 46%, rgba(255, 112, 72, 0.3), rgba(185, 28, 34, 0.34) 58%, rgba(255, 221, 126, 0.11) 59%, transparent 60%);
  box-shadow: 0 0 60px rgba(232, 55, 44, 0.24);
}

.result-symbol svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.result-symbol-beam {
  transform-origin: 152px 99px;
  animation: result-symbol-beam-sway 4.6s ease-in-out infinite;
}

.result-symbol-pan-left {
  animation: result-symbol-pan-left-sway 4.6s ease-in-out infinite;
}

.result-symbol-pan-right {
  animation: result-symbol-pan-right-sway 4.6s ease-in-out infinite;
}

.result-symbol-labels {
  position: absolute;
  left: 42px;
  right: 40px;
  bottom: 7px;
  display: flex;
  justify-content: space-between;
  color: rgba(255, 149, 134, 0.86);
  font-size: 12px;
  font-weight: 500;
}

.result-kicker-share {
  margin-top: 2px;
  color: #f6ce67;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-align: center;
}

.result-share-title {
  margin-top: 5px;
  color: #fff4e3;
  font-size: clamp(32px, 9vw, 39px);
  line-height: 1.04;
  font-weight: 400;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 5px 16px rgba(0, 0, 0, 0.66);
  white-space: nowrap;
}

.result-score-readout {
  width: min(100%, 340px);
  margin: 13px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.result-score-readout-box {
  min-height: 86px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 10px 8px;
  border-radius: 17px;
  background: rgba(7, 3, 3, 0.54);
}

.result-score-readout-box.is-sin {
  border: 1px solid rgba(255, 77, 67, 0.58);
  box-shadow: inset 0 0 22px rgba(255, 77, 67, 0.1);
}

.result-score-readout-box.is-virtue {
  border: 1px solid rgba(255, 216, 103, 0.52);
  box-shadow: inset 0 0 22px rgba(255, 216, 103, 0.08);
}

.result-score-readout-label {
  color: rgba(255, 232, 210, 0.66);
  font-size: 13px;
  font-weight: 500;
}

.result-score-readout-score {
  color: #ffd867;
  font-size: 32px;
  line-height: 1;
  font-weight: 500;
}

.result-score-readout-score b {
  font-size: 19px;
  font-weight: 500;
}

.result-share-copy {
  width: min(100%, 350px);
  margin: 12px auto 0;
  color: rgba(255, 241, 222, 0.9);
  font-size: 13px;
  line-height: 1.42;
  font-weight: 400;
  text-align: center;
}

.result .panel {
  padding: 18px;
  overflow: hidden;
  border-color: rgba(255, 211, 119, 0.18);
  background:
    radial-gradient(circle at 88% 0%, rgba(255, 217, 111, 0.08), transparent 34%),
    linear-gradient(145deg, rgba(46, 7, 9, 0.92), rgba(7, 4, 4, 0.88));
  color: #fff2df;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(255, 235, 170, 0.04);
}

.result .panel h2,
.result .trait-name,
.result .tension-name,
.result .dim-name,
.result .growth-title {
  color: #fff4e3;
  font-weight: 650;
  letter-spacing: 0;
}

.result .panel h2 {
  font-size: 20px;
}

.result .overline,
.result .legend,
.result .portrait p,
.result .analysis-row,
.result .growth-desc,
.result .dim-desc,
.result .help-text,
.result .tension-score {
  color: rgba(255, 236, 214, 0.72);
}

.result .analysis-row {
  border-top-color: rgba(255, 211, 119, 0.14);
}

.result .row-label,
.result .trait-score,
.result .dim-score,
.result .growth-num {
  color: #f6ce67;
}

.result .trait-readout {
  padding: 0;
  overflow: hidden;
  border-color: rgba(255, 92, 72, 0.26);
  background:
    radial-gradient(circle at 80% 8%, rgba(255, 216, 103, 0.12), transparent 30%),
    radial-gradient(circle at 20% 70%, rgba(255, 77, 67, 0.16), transparent 36%),
    linear-gradient(180deg, #360808 0%, #160303 100%);
}

.trait-energy {
  position: relative;
  padding: 18px;
}

.trait-energy::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(116deg, transparent 0 30%, rgba(255, 216, 103, 0.09) 38%, transparent 50%),
    repeating-linear-gradient(90deg, rgba(255, 236, 190, 0.04) 0 1px, transparent 1px 68px);
  pointer-events: none;
}

.trait-energy > * {
  position: relative;
  z-index: 1;
}

.trait-energy-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(255, 216, 103, 0.14);
}

.trait-energy-kicker {
  color: #ffd867;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.trait-energy-name {
  margin-top: 4px;
  color: #fff2df;
  font-size: clamp(34px, 7.8vw, 38px);
  line-height: 1.02;
  font-weight: 400;
  letter-spacing: 0;
  text-shadow: 0 5px 16px rgba(0, 0, 0, 0.62);
}

.trait-energy-score {
  color: #ffd867;
  font-size: clamp(40px, 9vw, 44px);
  line-height: 1;
  font-weight: 500;
  white-space: nowrap;
  text-shadow: 0 0 18px rgba(255, 216, 103, 0.26);
}

.trait-energy-score span {
  font-size: 18px;
  font-weight: 500;
}

.trait-energy-bar {
  height: 14px;
  margin-top: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 236, 214, 0.1);
}

.trait-energy-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff4d43, #ff7c50, #ffd867);
  box-shadow: 0 0 24px rgba(255, 77, 67, 0.34);
}

.trait-energy.is-virtue .trait-energy-bar i {
  background: linear-gradient(90deg, #7bd3a8, #ffd867);
  box-shadow: 0 0 24px rgba(255, 216, 103, 0.24);
}

.trait-energy-copy {
  margin-top: 13px;
  color: rgba(255, 232, 210, 0.76);
  font-size: 14px;
  line-height: 1.72;
}

.result .analysis-row {
  display: grid;
  gap: 4px;
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 211, 119, 0.14);
  font-size: 14px;
  line-height: 1.74;
}

.result .row-label {
  font-size: 13px;
  font-weight: 950;
}

.tension-duel {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 9px;
  margin-top: 13px;
}

.tension-duel-card {
  min-height: 126px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 13px;
  border-radius: 16px;
  background: rgba(8, 3, 3, 0.58);
}

.tension-duel-card.is-sin {
  border: 1px solid rgba(255, 77, 67, 0.56);
  box-shadow: inset 0 0 24px rgba(255, 77, 67, 0.09);
}

.tension-duel-card.is-virtue {
  border: 1px solid rgba(255, 216, 103, 0.52);
  box-shadow: inset 0 0 24px rgba(255, 216, 103, 0.08);
}

.tension-duel-label {
  color: rgba(255, 232, 210, 0.66);
  font-size: 13px;
  font-weight: 500;
}

.tension-duel-name {
  color: #fff2df;
  font-size: 25px;
  line-height: 1.08;
  font-weight: 650;
  letter-spacing: 0;
}

.tension-duel-score {
  color: #ffd867;
  font-size: 15px;
  font-weight: 650;
}

.tension-duel-vs {
  display: grid;
  place-items: center;
  color: #ffd867;
  font-size: 15px;
  font-weight: 650;
}

.tension-duel-vs span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 216, 103, 0.36);
  border-radius: 50%;
  background: rgba(5, 2, 2, 0.72);
  box-shadow: 0 0 20px rgba(255, 77, 67, 0.15);
}

.tension-duel-result {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 216, 103, 0.2);
  border-radius: 14px;
  background: rgba(8, 3, 3, 0.42);
  color: rgba(255, 232, 210, 0.78);
  font-size: 14px;
  line-height: 1.58;
}

.result .portrait p {
  color: rgba(255, 236, 214, 0.72);
  font-size: 14px;
  line-height: 1.74;
}

.result .portrait p + p {
  margin-top: 10px;
}

.result .portrait-timeline {
  position: relative;
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.result .portrait-timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, #ff4d43, #ffd867);
  opacity: 0.58;
}

.result .portrait-step {
  position: relative;
  display: grid;
  gap: 3px;
  padding-left: 26px;
}

.result .portrait-step::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 13px;
  height: 13px;
  border: 2px solid #ffd867;
  border-radius: 50%;
  background: #130303;
  box-shadow: 0 0 12px rgba(255, 216, 103, 0.22);
}

.result .portrait-step span {
  color: rgba(255, 236, 214, 0.68);
  font-size: 14px;
}

.result .portrait-step b {
  color: #ffd867;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.result .growth-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.result .growth-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 211, 119, 0.16);
  border-radius: 14px;
  background: rgba(8, 4, 4, 0.5);
}

.result .growth-num {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(246, 206, 103, 0.18);
  border-radius: 50%;
  background: rgba(246, 206, 103, 0.1);
  font-size: 13px;
  font-weight: 950;
}

.result .growth-title {
  font-weight: 950;
}

.result .growth-desc {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.74;
}

.result .tab-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.result .tab-btn {
  min-height: 40px;
  border: 1px solid rgba(255, 211, 119, 0.22);
  border-radius: 999px;
  background: rgba(8, 4, 4, 0.52);
  color: rgba(255, 236, 214, 0.72);
  font-weight: 950;
}

.result .tab-btn.active {
  border-color: rgba(255, 83, 72, 0.72);
  background: linear-gradient(100deg, #b72a34, #e5623e 60%, #70bd9d);
  color: #fff7ec;
}

.result .dim-list {
  display: grid;
  gap: 10px;
  margin-top: 13px;
}

.result .dim-item {
  padding: 12px;
  border: 1px solid rgba(255, 211, 119, 0.16);
  border-radius: 14px;
  background: rgba(8, 4, 4, 0.5);
}

.result .dim-header,
.result .panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.result .dim-name,
.result .dim-score {
  font-weight: 950;
}

.result .dim-bar {
  height: 8px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 241, 220, 0.12);
}

.result .dim-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c92a32, #f6ce67);
}

.result .dim-desc {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.74;
}

.result .help-panel h2 {
  margin-bottom: 8px;
}

.result .help-text {
  font-size: 14px;
  line-height: 1.74;
}

.result .help-text + .help-text {
  margin-top: 8px;
}

.result .radar-panel {
  padding: 16px 6px 12px;
  overflow: visible;
}

.result-radar-caption {
  display: grid;
  gap: 4px;
  padding: 0 10px 2px;
  text-align: center;
}

.result-radar-caption h2 {
  color: #fff2df;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 650;
  letter-spacing: 0;
}

.result-radar-caption p {
  color: rgba(255, 232, 210, 0.64);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
}

.result .radar-wrap {
  width: min(calc(100vw - 22px), 420px);
  margin: 0 50%;
  transform: translateX(-50%);
  filter: drop-shadow(0 0 16px rgba(255, 60, 48, 0.28));
}

.result .legend {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 900;
}

.result .legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.result .legend i {
  width: 20px;
  height: 6px;
  border-radius: 999px;
  background: var(--tone);
}

.result .legend span:first-child i { background: #ff4d43; }
.result .legend span:last-child i { background: #ffd867; }

@keyframes result-symbol-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes result-symbol-beam-sway {
  0%, 100% { transform: rotate(4deg); }
  50% { transform: rotate(-4deg); }
}

@keyframes result-symbol-pan-left-sway {
  0%, 100% { transform: translateY(-8px); }
  50% { transform: translateY(18px); }
}

@keyframes result-symbol-pan-right-sway {
  0%, 100% { transform: translateY(18px); }
  50% { transform: translateY(-10px); }
}

@media (min-width: 760px) {
  .result.active {
    margin: -26px;
    padding: 18px 18px 42px;
  }
}

@media (max-width: 390px) {
  .result.active {
    margin: -12px;
    padding: 10px 10px 30px;
  }

  .result-poster.share-result {
    height: auto;
    padding: 12px;
  }

  .result-symbol {
    width: min(69%, 214px);
  }

  .result-share-title {
    font-size: clamp(30px, 8.6vw, 35px);
  }

  .tension-duel {
    gap: 6px;
  }

  .tension-duel-card {
    padding: 11px 10px;
  }

  .tension-duel-name {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .result-symbol,
  .result-symbol-beam,
  .result-symbol-pan-left,
  .result-symbol-pan-right {
    animation: none;
  }
}
