:root {
  --paper: #f9f3dc;
  --ink: #152033;
  --ink-soft: #51607a;
  --sea: #0e7490;
  --sea-deep: #0b3954;
  --sun: #ffb703;
  --coral: #ee6c4d;
  --mint: #7bd389;
  --card: rgba(255, 251, 240, 0.88);
  --line: rgba(21, 32, 51, 0.12);
  --shadow: 0 22px 50px rgba(11, 57, 84, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans SC", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 183, 3, 0.3), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(123, 211, 137, 0.22), transparent 24%),
    linear-gradient(180deg, #0d3b66 0%, #1d5f8f 38%, #f2cc8f 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.4) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px);
  background-size: 28px 28px;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 28px;
}

.hero-copy,
.hero-card,
.quiz-panel,
.result-panel {
  background: var(--card);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 32px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--sea);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

h1,
h2,
h3,
h4 {
  margin: 0;
}

h1,
h2,
.mbti-badge,
#characterName {
  font-family: "ZCOOL KuaiLe", cursive;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1.08;
  margin-bottom: 14px;
}

.hero-text {
  margin: 0;
  max-width: 680px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--ink-soft);
}

.hero-card {
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(255, 183, 3, 0.18), rgba(14, 116, 144, 0.2)),
    var(--card);
}

.hero-card p {
  margin: 0 0 12px;
  font-weight: 800;
}

.hero-card ul {
  margin: 0;
  padding-left: 20px;
  line-height: 1.9;
  color: var(--ink-soft);
}

.layout {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 24px;
}

.quiz-panel,
.result-panel {
  padding: 28px;
}

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

.panel-head h2 {
  font-size: 2rem;
}

.ghost-button,
.primary-button {
  border: 0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ghost-button {
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(14, 116, 144, 0.09);
  color: var(--sea-deep);
  font-weight: 700;
}

.primary-button {
  min-width: 180px;
  padding: 16px 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--coral), var(--sun));
  color: #fffdf6;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 18px 24px rgba(238, 108, 77, 0.28);
}

.ghost-button:hover,
.primary-button:hover {
  transform: translateY(-2px);
}

.progress-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.progress-bar {
  flex: 1;
  height: 12px;
  border-radius: 999px;
  background: rgba(21, 32, 51, 0.08);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sea), var(--mint));
  transition: width 0.25s ease;
}

#progressText {
  margin: 0;
  min-width: 62px;
  text-align: right;
  font-weight: 700;
  color: var(--ink-soft);
}

.question-list {
  display: grid;
  gap: 18px;
}

.question-card {
  padding: 20px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
}

.question-card h3 {
  font-size: 1.08rem;
  line-height: 1.6;
  margin-bottom: 14px;
}

.option-list {
  display: grid;
  gap: 12px;
}

.option {
  position: relative;
}

.option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option label {
  display: block;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(21, 32, 51, 0.1);
  background: rgba(255, 252, 243, 0.92);
  color: var(--ink);
  line-height: 1.6;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.option label strong {
  display: block;
  margin-bottom: 4px;
}

.option label:hover {
  transform: translateX(4px);
  border-color: rgba(14, 116, 144, 0.35);
}

.option input:checked + label {
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.12), rgba(123, 211, 137, 0.15));
  border-color: rgba(14, 116, 144, 0.5);
  box-shadow: inset 0 0 0 1px rgba(14, 116, 144, 0.18);
}

.actions {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
}

.result-panel {
  position: sticky;
  top: 20px;
  height: fit-content;
}

.empty-state {
  padding: 26px 0 6px;
}

.empty-state h3 {
  margin-bottom: 8px;
  font-size: 1.5rem;
}

.empty-state p,
.result-summary,
#resultReason,
#resultAdvice,
.character-title,
.illustration-label {
  color: var(--ink-soft);
  line-height: 1.8;
}

.hidden {
  display: none;
}

.result-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.mbti-badge,
.character-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.mbti-badge {
  padding: 8px 16px;
  background: var(--sea-deep);
  color: #fff;
  font-size: 1.1rem;
}

.character-tag {
  padding: 8px 14px;
  background: rgba(255, 183, 3, 0.18);
  color: #8d5200;
  font-weight: 700;
}

#characterName {
  font-size: 2.2rem;
  margin-bottom: 6px;
}

.art-showcase {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.character-illustration-card {
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 245, 217, 0.52)),
    rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.illustration-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.illustration-kicker {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sea);
}

.illustration-label {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

#characterIllustration {
  display: block;
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(21, 32, 51, 0.08);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 16px 28px rgba(17, 31, 45, 0.12);
}

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

.result-tools .primary-button,
.result-tools .ghost-button {
  flex: 1 1 180px;
}

.character-title {
  margin: 0 0 16px;
  font-weight: 700;
}

.dimension-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.dimension-card {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.dimension-card p {
  margin: 0;
}

.dimension-card .dimension-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.dimension-card .dimension-value {
  margin-top: 8px;
  font-size: 1.08rem;
  font-weight: 800;
}

.result-section + .result-section {
  margin-top: 18px;
}

.result-section h4 {
  margin-bottom: 8px;
  font-size: 1rem;
}

@media (max-width: 960px) {
  .hero,
  .layout {
    grid-template-columns: 1fr;
  }

  .result-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 100%);
    padding-top: 18px;
  }

  .hero-copy,
  .hero-card,
  .quiz-panel,
  .result-panel {
    padding: 20px;
    border-radius: 22px;
  }

  .panel-head {
    flex-direction: column;
  }

  .dimension-grid {
    grid-template-columns: 1fr;
  }

  .actions,
  .result-tools {
    justify-content: stretch;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }
}
