/* 第二职业测试 - 参考 /Users/xmly/vscode-xhs 低饱和暖色风格 */
:root {
  --bg: #fffaf5;
  --card: #ffffff;
  --text: #4b4b4b;
  --text-strong: #333333;
  --text-muted: #9d9d9d;
  --primary: #ff7e67;
  --primary-soft: #ff9a8b;
  --secondary: #e6f2ff;
  --secondary-text: #6c9eeb;
  --line: #f0f0f0;
  --shadow-soft: 0 8px 28px rgba(0, 0, 0, 0.06);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

#app {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

#welcome,
#quiz,
#result {
  max-width: 460px;
  margin: 0 auto;
}

.screen {
  display: none;
  animation: fadeInUp 0.35s ease;
}

.screen.active {
  display: block;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn {
  width: 100%;
  display: inline-block;
  border: none;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  padding: 13px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  text-align: center;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-soft));
  box-shadow: 0 8px 18px rgba(255, 126, 103, 0.28);
}

.btn-secondary {
  color: var(--secondary-text);
  background: var(--secondary);
}

.btn:disabled {
  opacity: 0.56;
  cursor: not-allowed;
  box-shadow: none;
}

/* Welcome */
#welcome {
  min-height: calc(100vh - 52px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.welcome-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(180deg, #fff5f0 0%, rgba(255, 250, 245, 0) 100%);
  pointer-events: none;
  z-index: 0;
}

#welcome > *:not(.welcome-bg) {
  position: relative;
  z-index: 1;
}

.floating-emoji {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 32px;
  animation: welcomeFadeIn 0.6s ease-out;
}

.floating-emoji span {
  font-size: 28px;
  animation: float 3s ease-in-out infinite;
}

.floating-emoji span:nth-child(2) {
  animation-delay: 0.5s;
}

.floating-emoji span:nth-child(3) {
  animation-delay: 1s;
}

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

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

.hero-block {
  text-align: center;
  margin-bottom: 28px;
  animation: welcomeFadeIn 0.6s ease-out 0.1s both;
}

.hero-block h1 {
  color: var(--text-strong);
  font-size: 28px;
  line-height: 1.45;
  font-weight: 800;
  margin-bottom: 14px;
  letter-spacing: -0.3px;
}

.hero-block .subtitle {
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 18px;
  background: rgba(255, 126, 103, 0.1);
  border-radius: 999px;
  display: inline-block;
}

.illus-card {
  background: linear-gradient(135deg, #ffebe6 0%, #e8f4ff 100%);
  border-radius: 22px;
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 126, 103, 0.08);
  box-shadow: 0 8px 32px rgba(255, 126, 103, 0.08);
  animation: welcomeFadeIn 0.6s ease-out 0.2s both;
}

.illus-icons {
  display: flex;
  justify-content: center;
  gap: 36px;
  margin-bottom: 14px;
}

.illus-icons span {
  font-size: 34px;
  animation: float 2.5s ease-in-out infinite;
}

.illus-icons span:nth-child(2) { animation-delay: 0.3s; }
.illus-icons span:nth-child(3) { animation-delay: 0.6s; }

.illus-card p {
  color: #5a5a5a;
  font-size: 14px;
  line-height: 1.65;
}

.feature-card {
  background: var(--card);
  border-radius: 20px;
  padding: 12px 24px 28px;
  margin-bottom: 28px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(255, 126, 103, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.03);
  animation: welcomeFadeIn 0.6s ease-out 0.3s both;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid #f5f5f5;
}

.feature-item > div {
  min-width: 0;
  flex: 1;
}

.feature-item:last-child {
  border-bottom: none;
}

.f-icon {
  font-size: 26px;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 126, 103, 0.1), rgba(108, 158, 235, 0.08));
  border-radius: 14px;
}

.feature-item h3 {
  color: var(--text-strong);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 4px;
}

.feature-item p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.welcome-foot {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 20px;
  line-height: 1.5;
  animation: welcomeFadeIn 0.6s ease-out 0.5s both;
}

#welcome .btn-primary {
  display: block;
  width: auto;
  min-width: 200px;
  max-width: 100%;
  font-size: 16px;
  padding: 18px 48px;
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(255, 126, 103, 0.35);
  animation: welcomeFadeIn 0.6s ease-out 0.4s both;
  margin: 0 auto 8px;
}

#welcome .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255, 126, 103, 0.4);
}

.access-card {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(108, 158, 235, 0.08);
  color: #4d6b9f;
  border: 1px solid rgba(108, 158, 235, 0.16);
  animation: welcomeFadeIn 0.6s ease-out 0.35s both;
}

.access-card.is-error {
  background: rgba(255, 126, 103, 0.08);
  color: #b45e4e;
  border-color: rgba(255, 126, 103, 0.16);
}

.access-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.access-text {
  font-size: 13px;
  line-height: 1.5;
}

.btn.is-disabled,
.btn[aria-disabled='true'] {
  pointer-events: none;
  opacity: 0.55;
}

.btn.is-loading {
  opacity: 0.8;
}

/* Quiz */
#quiz {
  padding-top: 12px;
  min-height: 100vh;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.progress-text,
.progress-percent {
  font-size: 13px;
}

.progress-text {
  color: #666;
}

.progress-percent {
  color: var(--primary);
  font-weight: 600;
}

.progress-bar {
  height: 10px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 24px;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-soft));
  transition: width 0.4s ease;
}

.question-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 24px 20px;
}

.question-title {
  color: var(--text-strong);
  font-size: 21px;
  line-height: 1.45;
  margin-bottom: 10px;
}

.question-hint {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 18px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1.5px solid #f0f0f0;
  border-radius: 18px;
  background: #fff;
  padding: 16px 18px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.option:active {
  transform: translateY(1px);
}

.option.selected {
  border-color: var(--primary);
  background: #fff5f3;
  box-shadow: 0 6px 16px rgba(255, 126, 103, 0.15);
}

.option-index {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #666;
  background: #f5f5f5;
  font-weight: 600;
}

.option.selected .option-index {
  color: #fff;
  background: var(--primary);
}

.option-text {
  flex: 1;
  color: var(--text-strong);
  font-size: 15px;
  line-height: 1.45;
}

.option-check {
  color: var(--primary);
  font-weight: 700;
  font-size: 15px;
  min-width: 15px;
}

.nav-buttons {
  display: flex;
  gap: 16px;
  margin-top: 28px;
}

.nav-buttons .btn {
  flex: 1;
  padding: 16px 20px;
  font-size: 15px;
}

/* Result */
#result {
  padding-top: 10px;
}

#result .result-title {
  animation: resultFadeIn 0.5s ease-out;
}

#result .result-desc {
  animation: resultFadeIn 0.5s ease-out 0.1s both;
}

@keyframes resultFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes resultFadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes barFill {
  from { width: 0 !important; }
}

@keyframes emojiShimmer {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.result-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.result-title span {
  font-size: 24px;
  animation: emojiShimmer 2s ease-in-out infinite;
}

.result-title h1 {
  color: var(--text-strong);
  font-size: 24px;
  font-weight: 700;
}

.result-desc {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 14px;
}

.result-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 22px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.06), 0 4px 10px rgba(255, 126, 103, 0.05);
  padding: 18px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.anim-fade-in-up {
  animation: resultFadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.anim-dim-row {
  animation: resultFadeInUp 0.4s ease-out both;
}

.anim-alt-item {
  animation: resultFadeInUp 0.45s ease-out both;
}

.anim-bar-fill {
  animation: barFill 0.8s ease-out 0.3s forwards;
}

.main-career-card {
  text-align: center;
  padding: 26px 20px;
  border: 2px solid rgba(255, 126, 103, 0.25);
  background: linear-gradient(135deg, #fff 0%, #fff9f7 100%);
  position: relative;
  overflow: hidden;
}

.main-career-glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255, 126, 103, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.main-career-card .career-label {
  display: block;
  font-size: 12px;
  color: var(--primary);
  margin-bottom: 10px;
  font-weight: 600;
}

.main-career-card .main-career-name {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: var(--text-strong);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.main-career-card .main-career-desc {
  display: block;
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 12px;
}

.main-career-card .why-fit {
  display: block;
  font-size: 13px;
  color: var(--primary);
  line-height: 1.55;
  margin-bottom: 14px;
  padding: 12px;
  background: rgba(255, 126, 103, 0.06);
  border-radius: 12px;
  border-left: 4px solid var(--primary);
}

.reason-list {
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(125, 109, 241, 0.05);
  text-align: left;
}

.reasons-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 10px;
}

.reason-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.reason-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7d6df1;
  margin-top: 7px;
  flex-shrink: 0;
}

.reason-text {
  flex: 1;
  font-size: 13px;
  color: #555;
  line-height: 1.55;
}

.main-career-card .career-tips {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #f0f0f0;
  text-align: left;
}

.snapshot-grid {
  display: grid;
  gap: 12px;
}

.snapshot-chip {
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff8f4 0%, #fdfcff 100%);
  border: 1px solid rgba(255, 126, 103, 0.12);
}

.snapshot-k {
  display: block;
  font-size: 12px;
  color: #999;
  margin-bottom: 6px;
}

.snapshot-v {
  display: block;
  font-size: 15px;
  color: var(--text-strong);
  font-weight: 700;
  line-height: 1.45;
}

.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.info-tag {
  padding: 6px 10px;
  font-size: 12px;
  color: #7d6df1;
  background: rgba(125, 109, 241, 0.08);
  border-radius: 999px;
}

.info-tag.hot {
  color: var(--primary);
  background: rgba(255, 126, 103, 0.12);
}

.summary-copy {
  display: block;
  margin-top: 14px;
  font-size: 13px;
  color: #555;
  line-height: 1.65;
}

.radar-card .result-section-title {
  margin-bottom: 14px;
}

.radar-canvas-web {
  width: 100%;
  display: block;
  max-width: 420px;
  aspect-ratio: 1 / 1;
  height: auto;
  margin: 0 auto;
}

.main-career-card .tips-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 12px;
}

.main-career-card .tip-item {
  margin-bottom: 10px;
}

.main-career-card .tip-num {
  font-size: 12px;
  color: var(--primary);
  margin-right: 6px;
}

.main-career-card .tip-text {
  font-size: 13px;
  color: #555;
  line-height: 1.5;
}

.main-career-card .match-bar-wrap {
  margin-top: 14px;
}

.dim-insights {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #f0f0f0;
}

.dim-insights .insights-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 12px;
}

.dim-insights .insight-item {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 126, 103, 0.05);
}

.dim-insights .insight-name {
  display: block;
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 4px;
}

.dim-insights .insight-text {
  font-size: 13px;
  color: #555;
  line-height: 1.5;
}

.two-col-panel {
  display: grid;
  gap: 12px;
}

.panel-block {
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fffaf7 0%, #ffffff 100%);
  border: 1px solid rgba(255, 126, 103, 0.08);
}

.panel-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 10px;
}

.bullet-row {
  position: relative;
  padding-left: 16px;
  font-size: 13px;
  color: #555;
  line-height: 1.55;
  margin-bottom: 10px;
}

.bullet-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.bullet-row.positive::before {
  background: var(--primary);
}

.bullet-row.caution::before {
  background: #7d6df1;
}

.plan-steps {
  margin-top: 16px;
}

.plan-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.step-index {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-soft));
  color: #fff;
  text-align: center;
  line-height: 24px;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.main-career-card .match-bar {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 126, 103, 0.15);
  overflow: hidden;
  margin-bottom: 8px;
}

.main-career-card .match-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-soft));
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(255, 126, 103, 0.3);
}

.main-career-card .match-text {
  font-size: 13px;
  color: var(--primary);
  font-weight: 700;
}

.alternative-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.alternative-item {
  border: 1px solid #f0f0f0;
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(135deg, #fff 0%, #fefbf9 100%);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s;
}

.alternative-item:hover {
  transform: translateY(-2px);
}

.alternative-item .alt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.alternative-item .alt-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-strong);
}

.alternative-item .alt-score {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  padding: 4px 10px;
  background: rgba(255, 126, 103, 0.1);
  border-radius: 20px;
}

.alternative-item .alt-desc {
  font-size: 13px;
  color: #777;
  line-height: 1.45;
}

.result-section-title {
  color: var(--text-strong);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
}

.dimension-bars h3 {
  color: #555;
  font-size: 15px;
  margin-bottom: 10px;
}

.dim-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.dim-row:last-child {
  margin-bottom: 0;
}

.dim-name {
  width: 68px;
  color: #666;
  font-size: 12px;
}

.dim-bar-wrap {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: #edf2f7;
  overflow: hidden;
}

.dim-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-soft));
  transition: width 0.55s ease;
}

.dim-score {
  width: 30px;
  text-align: right;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}


.result-btn-wrap {
  margin-top: 20px;
  animation: resultFadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.75s both;
  opacity: 0;
}

#shareBtn {
  margin-top: 8px;
}

#retryBtn {
  margin-top: 8px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%) translateY(10px);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 13px;
  border-radius: 999px;
  padding: 8px 16px;
  opacity: 0;
  transition: all 0.25s ease;
  z-index: 999;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 手机 / 窄屏：强制单列，避免部分机型误命中「桌面端」媒体查询导致双栏挤压、题目区异常 */
@media (max-width: 900px) {
  #welcome {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    max-width: 100% !important;
    min-height: auto !important;
    justify-content: flex-start !important;
    overflow: visible !important;
    padding-top: max(8px, env(safe-area-inset-top, 0px));
  }

  #welcome .welcome-bg,
  #welcome .floating-emoji,
  #welcome .hero-block,
  #welcome .access-card,
  #welcome .illus-card,
  #welcome .feature-card,
  #welcome .btn-primary,
  #welcome .welcome-foot {
    grid-column: auto !important;
    grid-row: auto !important;
    width: 100%;
    max-width: 100%;
  }

  .hero-block {
    text-align: center;
  }

  #quiz {
    min-height: auto !important;
    padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
  }

  #quiz .options {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
  }

  #quiz .option {
    width: 100% !important;
    min-height: 52px;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
  }

  /* 未出结果时彻底隐藏结果区，避免少数 WebView 仍占位挡点击 */
  #result:not(.screen.active) {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
  }

  #result.screen.active {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
    pointer-events: auto !important;
  }
}

@media (max-width: 768px) {
  #app {
    padding: 14px 12px 28px;
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }

  #welcome,
  #quiz,
  #result {
    max-width: 100%;
    margin: 0;
  }

  #welcome {
    min-height: auto;
    justify-content: flex-start;
    padding-top: 8px;
  }

  .floating-emoji {
    gap: 18px;
    margin-bottom: 18px;
  }

  .floating-emoji span {
    font-size: 24px;
  }

  .hero-block {
    margin-bottom: 16px;
  }

  .hero-block h1 {
    font-size: 32px;
    line-height: 1.3;
  }

  .hero-block .subtitle {
    font-size: 12px;
    padding: 7px 12px;
  }

  .illus-card,
  .feature-card {
    padding-left: 14px;
    padding-right: 14px;
  }

  #welcome .btn-primary {
    width: 100%;
    min-width: 0;
    padding: 15px 18px;
    font-size: 16px;
  }

  .question-card {
    padding: 18px 14px;
    border-radius: 16px;
  }

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

  .options {
    gap: 10px;
  }

  .option {
    padding: 13px 12px;
    border-radius: 14px;
  }

  .option-text {
    font-size: 14px;
  }

  .nav-buttons {
    gap: 10px;
    margin-top: 18px;
  }

  .nav-buttons .btn {
    padding: 13px 12px;
  }

  .result-card {
    padding: 14px;
    border-radius: 16px;
  }

  .main-career-card {
    padding: 18px 14px;
  }

  .main-career-card .main-career-name {
    font-size: 22px;
  }

  .radar-canvas-web {
    max-width: 340px;
  }

  /* 结果页：部分手机 WebView 在 display:none→block 时不运行动画，卡片会一直保持透明 */
  #result.screen.active {
    padding-bottom: max(40px, calc(env(safe-area-inset-bottom, 0px) + 20px));
  }

  #result.screen.active .result-card,
  #result.screen.active .anim-dim-row,
  #result.screen.active .anim-alt-item,
  #result.screen.active .result-btn-wrap {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  #result.screen.active .anim-bar-fill {
    animation: none !important;
  }
}

/* 触屏设备兜底：进一步去掉复杂布局与动效，优先保证“能点、能看、能答题” */
@media (hover: none) and (pointer: coarse) and (max-width: 1024px) {
  #welcome {
    display: block !important;
    min-height: auto !important;
    overflow: visible !important;
  }

  .welcome-bg,
  .floating-emoji {
    display: none !important;
  }

  .hero-block,
  .illus-card,
  .feature-card,
  .access-card,
  #welcome .btn-primary,
  .welcome-foot {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .hero-block h1 {
    font-size: 28px !important;
    line-height: 1.35 !important;
  }

  .question-card {
    width: 100% !important;
  }

  #quiz .options,
  .options {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  #quiz .option,
  .option {
    display: flex !important;
    width: 100% !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  #quiz .nav-buttons {
    position: sticky;
    bottom: 0;
    background: var(--bg);
    padding-top: 10px;
    padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
    z-index: 5;
  }
}

@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  #app {
    padding: 34px 28px 56px;
  }

  body {
    background:
      radial-gradient(circle at 10% 10%, rgba(255, 126, 103, 0.08), transparent 24%),
      radial-gradient(circle at 90% 0%, rgba(108, 158, 235, 0.08), transparent 18%),
      var(--bg);
  }

  #welcome {
    max-width: 1160px;
    display: grid;
    grid-template-columns: 1.06fr 0.94fr;
    grid-template-rows: auto auto auto auto auto;
    gap: 28px 34px;
    align-items: start;
    align-content: start;
    min-height: calc(100vh - 72px);
  }

  .welcome-bg,
  .floating-emoji,
  .hero-block,
  .access-card,
  #welcome .btn-primary,
  .welcome-foot {
    grid-column: 1;
  }

  .illus-card,
  .feature-card {
    grid-column: 2;
  }

  .floating-emoji { grid-row: 1; }
  .hero-block { grid-row: 2; }
  .access-card { grid-row: 3; }
  #welcome .btn-primary { grid-row: 4; }
  .welcome-foot { grid-row: 5; }

  .illus-card {
    grid-row: 1 / span 2;
    align-self: start;
  }

  .feature-card {
    grid-row: 3 / span 3;
    align-self: start;
  }

  .floating-emoji,
  .hero-block,
  .access-card,
  #welcome .btn-primary,
  .welcome-foot {
    margin-left: 0;
    margin-right: 0;
  }

  #welcome .btn-primary {
    width: fit-content;
    min-width: 260px;
    padding: 18px 52px;
  }

  .hero-block {
    margin-bottom: 8px;
    text-align: left;
  }

  .hero-block h1 {
    font-size: 42px;
    line-height: 1.3;
    margin-bottom: 18px;
  }

  .hero-block .subtitle {
    font-size: 15px;
  }

  .welcome-foot {
    text-align: left;
    font-size: 13px;
  }

  .floating-emoji {
    justify-content: flex-start;
    margin-bottom: 18px;
  }

  .illus-card {
    padding: 32px 28px;
    margin-bottom: 0;
  }

  .feature-card {
    margin-bottom: 0;
    padding: 16px 26px 28px;
  }

  #quiz {
    max-width: 1100px;
    min-height: calc(100vh - 90px);
  }

  .progress-head {
    margin-bottom: 12px;
  }

  .progress-text,
  .progress-percent {
    font-size: 14px;
  }

  .question-card {
    padding: 34px 30px;
    border-radius: 24px;
  }

  .question-title {
    font-size: 28px;
    line-height: 1.38;
    margin-bottom: 14px;
  }

  .question-hint {
    font-size: 14px;
    margin-bottom: 22px;
  }

  .options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .option {
    min-height: 82px;
  }

  .nav-buttons {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 30px;
  }

  #result {
    max-width: 1200px;
    display: none;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 16px 20px;
    align-items: start;
  }

  #result.screen.active {
    display: grid;
  }

  #result .result-title,
  #result .result-desc,
  #mainCareerCard,
  #alternativeCard,
  .result-btn-wrap {
    grid-column: 1 / -1;
  }

  #snapshotCard,
  #radarCard,
  #dimensionBars,
  #planCard {
    margin-bottom: 0;
  }

  .two-col-panel {
    grid-template-columns: 1fr 1fr;
  }

  .radar-canvas-web {
    max-width: 500px;
  }
}

@media (min-width: 1280px) and (hover: hover) and (pointer: fine) {
  #app {
    max-width: 1320px;
    padding-left: 34px;
    padding-right: 34px;
  }

  #welcome {
    max-width: 1240px;
    gap: 30px 44px;
  }

  .hero-block h1 {
    font-size: 46px;
  }

  #quiz {
    max-width: 1180px;
  }

  #result {
    max-width: 1260px;
    display: none;
    grid-template-columns: 1.16fr 0.84fr;
  }

  #result.screen.active {
    display: grid;
  }
}
