:root {
  --bg-start: #f8f4eb;
  --bg-end: #e6edf7;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-strong: #ffffff;
  --text-primary: #19212e;
  --text-secondary: #5d6878;
  --accent: #d66f3d;
  --accent-deep: #a94d25;
  --line: rgba(25, 33, 46, 0.08);
  --shadow: 0 18px 50px rgba(38, 47, 63, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text-primary);
  background:
    radial-gradient(circle at top left, rgba(214, 111, 61, 0.14), transparent 30%),
    radial-gradient(circle at top right, rgba(74, 132, 214, 0.14), transparent 32%),
    linear-gradient(180deg, var(--bg-start), var(--bg-end));
}

body {
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}

button {
  border: none;
  font: inherit;
  cursor: pointer;
}

.app-shell {
  width: min(100%, 520px);
  margin: 0 auto;
  min-height: 100vh;
  padding: 20px 16px 28px;
}

.screen {
  display: none;
  animation: fade-in 0.28s ease;
}

.screen--active {
  display: block;
}

.hero-card,
.content-card,
.question-card,
.loading-card,
.result-header,
.result-section,
.modal-panel {
  backdrop-filter: blur(12px);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
}

.hero-card,
.content-card,
.question-card,
.loading-card,
.result-header,
.result-section {
  border-radius: var(--radius-xl);
}

.hero-card {
  padding: 30px 22px;
}

.eyebrow,
.result-caption,
.question-index {
  margin: 0 0 10px;
  color: var(--accent-deep);
  font-size: 14px;
  letter-spacing: 0.08em;
}

h1,
h2,
p {
  margin: 0;
}

.hero-card h1,
.result-header h1 {
  font-size: 34px;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.hero-copy {
  margin-top: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.hero-card .primary-btn {
  margin-top: 30px;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  min-height: 52px;
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.primary-btn:active,
.secondary-btn:active,
.ghost-btn:active,
.option-btn:active {
  transform: scale(0.98);
}

.primary-btn {
  width: 100%;
  padding: 0 18px;
  background: linear-gradient(135deg, var(--accent), #ef9d61);
  color: #fff;
  font-weight: 700;
}

.secondary-btn {
  width: 100%;
  padding: 0 18px;
  background: #fff;
  border: 1px solid rgba(25, 33, 46, 0.1);
  color: var(--text-primary);
  font-weight: 700;
}

.ghost-btn {
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(25, 33, 46, 0.08);
  color: var(--text-secondary);
}

.content-card {
  margin-top: 16px;
  padding: 22px 18px;
}

.content-card h2,
.result-section h2,
.modal-panel h2 {
  font-size: 18px;
  margin-bottom: 12px;
}

.info-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.quiz-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.progress-meta {
  color: var(--text-secondary);
  font-size: 15px;
}

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(25, 33, 46, 0.08);
  overflow: hidden;
  margin: 16px 0 20px;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #f2b278);
  transition: width 0.25s ease;
}

.question-card {
  padding: 26px 18px;
}

.question-title {
  font-size: 28px;
  line-height: 1.35;
}

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

.option-btn {
  width: 100%;
  padding: 18px 16px;
  text-align: left;
  border-radius: var(--radius-md);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(25, 33, 46, 0.06);
}

.option-btn.is-selected {
  border-color: rgba(214, 111, 61, 0.5);
  background: rgba(214, 111, 61, 0.08);
}

.option-label {
  display: block;
  font-size: 13px;
  color: var(--accent-deep);
  margin-bottom: 8px;
}

.option-text {
  display: block;
  line-height: 1.6;
  color: var(--text-primary);
}

.quiz-actions,
.bottom-actions {
  margin-top: 16px;
}

.loading-card {
  min-height: 65vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 28px 20px;
  text-align: center;
}

.loading-card h2 {
  margin-top: 24px;
  font-size: 28px;
}

.loading-card p {
  margin-top: 12px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.loading-orbit {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 3px solid rgba(214, 111, 61, 0.14);
  border-top-color: var(--accent);
  animation: rotate 1s linear infinite;
}

.result-header {
  padding: 30px 22px;
  text-align: center;
}

.result-tags {
  margin-top: 14px;
  color: var(--text-secondary);
  font-size: 16px;
  text-align: center;
}

.result-quote-inline {
  margin-top: 18px;
  color: var(--text-primary);
  font-size: 18px;
  line-height: 1.8;
  text-align: center;
}

.result-body {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.result-section {
  padding: 20px 18px;
}

.result-section p {
  color: var(--text-secondary);
  line-height: 1.85;
}

.radar-card {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 8px;
}

.radar-chart {
  width: 100%;
  max-width: 300px;
  height: auto;
}

.bottom-actions--stack {
  display: grid;
  gap: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 99;
}

.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.48);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(100% - 24px, 420px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  margin: 20px auto;
  padding: 20px;
  border-radius: var(--radius-lg);
}

.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 40px;
  border-radius: 999px;
  background: rgba(25, 33, 46, 0.06);
  color: var(--text-secondary);
  margin-left: auto;
}

#poster-image {
  width: 100%;
  border-radius: 18px;
  margin-top: 14px;
  box-shadow: 0 12px 28px rgba(25, 33, 46, 0.12);
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@media (max-width: 430px) {
  .app-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero-card h1,
  .result-header h1 {
    font-size: 30px;
  }

  .question-title,
  .loading-card h2 {
    font-size: 24px;
  }
}
