:root {
  --bg: #f4f7f2;
  --paper: #fffdf8;
  --ink: #252a2d;
  --muted: #68706f;
  --line: #e3e0d7;
  --teal: #0f766e;
  --teal-dark: #0a4f4a;
  --coral: #dc6b57;
  --blue: #315f86;
  --yellow: #e4b84a;
  --soft: #eef5f1;
  --shadow: 0 20px 55px rgba(34, 48, 45, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, #e9f1ee 0, transparent 280px),
    var(--bg);
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
}

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

.app {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.screen {
  display: none;
  min-height: 100vh;
  padding: 22px;
}

.screen.active {
  display: block;
}

.home-content {
  padding-top: 24px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: 38px;
  line-height: 1.12;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: 22px;
  line-height: 1.38;
  letter-spacing: 0;
}

.lead {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.72;
}

.hero-visual {
  position: relative;
  min-height: 312px;
  margin: -22px -22px 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, #dcecf3 0%, #f8f0df 64%, #fffdf8 100%),
    #dcecf3;
}

.window-frame {
  position: absolute;
  left: 36px;
  right: 36px;
  top: 34px;
  height: 178px;
  overflow: hidden;
  border: 10px solid rgba(255, 253, 248, 0.96);
  border-radius: 8px;
  background: linear-gradient(180deg, #cfe4ee 0%, #edf4ef 100%);
  box-shadow: 0 18px 40px rgba(47, 77, 85, 0.16);
}

.window-frame::before,
.window-frame::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 50%;
  width: 8px;
  background: rgba(255, 253, 248, 0.95);
  transform: translateX(-50%);
}

.window-frame::after {
  inset: 50% 0 auto;
  width: auto;
  height: 8px;
  transform: translateY(-50%);
}

.skyline {
  position: absolute;
  left: 34px;
  right: 30px;
  bottom: 28px;
  height: 96px;
}

.tower {
  position: absolute;
  bottom: 0;
  width: 58px;
  border-radius: 8px 8px 0 0;
  background: var(--blue);
  box-shadow: inset 0 16px 0 rgba(255, 255, 255, 0.16);
}

.tower::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 18px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.72);
  box-shadow: 0 26px 0 rgba(255, 253, 248, 0.62), 0 52px 0 rgba(255, 253, 248, 0.56);
}

.tower.tall {
  left: 18px;
  height: 96px;
}

.tower.mid {
  left: 100px;
  height: 72px;
  background: var(--teal);
}

.tower.low {
  right: 86px;
  height: 58px;
  background: var(--coral);
}

.tower.slim {
  right: 10px;
  width: 42px;
  height: 110px;
  background: #6d7890;
}

.train-line {
  position: absolute;
  left: -16px;
  right: -16px;
  bottom: 18px;
  height: 7px;
  background: rgba(15, 118, 110, 0.36);
}

.train-line::after {
  content: "";
  position: absolute;
  right: 44px;
  bottom: 9px;
  width: 98px;
  height: 26px;
  border-radius: 999px 999px 8px 8px;
  background: var(--teal);
  box-shadow: inset 18px 0 0 rgba(255, 255, 255, 0.25);
}

.life-card {
  position: absolute;
  display: grid;
  gap: 4px;
  min-width: 96px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 253, 248, 0.84);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 14px 30px rgba(46, 58, 54, 0.14);
}

.life-card span {
  color: var(--muted);
  font-size: 13px;
}

.life-card strong {
  color: var(--ink);
  font-size: 20px;
}

.rent-card {
  left: 30px;
  bottom: 40px;
}

.time-card {
  right: 34px;
  bottom: 58px;
}

.coffee-cup {
  position: absolute;
  left: 48%;
  bottom: 34px;
  width: 58px;
  height: 48px;
  border-radius: 0 0 18px 18px;
  background: var(--yellow);
  box-shadow: inset 0 10px 0 rgba(255, 253, 248, 0.34);
}

.coffee-cup::before {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  top: -10px;
  height: 16px;
  border-radius: 50%;
  background: #684231;
}

.coffee-cup::after {
  content: "";
  position: absolute;
  right: -18px;
  top: 12px;
  width: 22px;
  height: 18px;
  border: 6px solid var(--yellow);
  border-left: 0;
  border-radius: 0 14px 14px 0;
}

.map-pin {
  position: absolute;
  left: 52%;
  top: 82px;
  width: 34px;
  height: 34px;
  border: 8px solid var(--coral);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: #fffdf8;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 28px 0;
}

.feature-grid span {
  min-height: 48px;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--teal-dark);
  background: var(--soft);
  font-size: 14px;
  font-weight: 750;
  text-align: center;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  min-height: 50px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 800;
}

.primary-btn {
  width: 100%;
  color: #fff;
  background: var(--teal);
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.2);
}

.secondary-btn {
  width: 100%;
  color: var(--teal-dark);
  background: #e6f0ed;
}

.ghost-btn {
  color: var(--teal);
  background: transparent;
}

.disclaimer,
.tap-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.disclaimer {
  margin: 18px 0 0;
}

.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.count {
  color: var(--coral);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 900;
}

.module {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.progress-track {
  height: 7px;
  margin-bottom: 26px;
  overflow: hidden;
  border-radius: 999px;
  background: #ece8de;
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--coral), var(--teal));
  transition: width 220ms ease;
}

.question-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
  box-shadow: 0 14px 34px rgba(52, 58, 50, 0.08);
}

.question-number {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: 8px;
  color: #fff;
  background: var(--coral);
  font-weight: 900;
}

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

.option-btn {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fffdf8;
  text-align: left;
}

.option-btn:active,
.option-btn.selected {
  border-color: var(--teal);
  background: #edf7f3;
}

.option-key {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: var(--teal-dark);
  background: #dceee9;
  font-weight: 900;
}

.option-text {
  align-self: center;
  line-height: 1.55;
}

.tap-note {
  margin: 16px 0 0;
  text-align: center;
}

.loading-screen {
  display: none;
  place-items: center;
  text-align: center;
  background: #fffaf0;
}

.loading-screen.active {
  display: grid;
}

.spinner {
  width: 54px;
  height: 54px;
  margin: 0 auto 24px;
  border: 4px solid #eadfce;
  border-top-color: var(--coral);
  border-right-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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

.result-screen {
  background: #fbfaf5;
}

.result-hero {
  padding: 24px 0 10px;
}

.score-ring {
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  margin: 24px auto 8px;
  border: 10px solid #e8ded0;
  border-top-color: var(--coral);
  border-right-color: var(--teal);
  border-radius: 50%;
  background: #fffdf8;
}

.score-ring strong {
  font-size: 34px;
  line-height: 1;
}

.score-ring span {
  color: var(--muted);
  font-size: 12px;
}

.report-section {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.report-section h2 {
  margin-bottom: 12px;
  font-size: 18px;
}

.report-section p,
.report-section li {
  color: #47504d;
  line-height: 1.75;
}

.index-list,
.strategy-list {
  display: grid;
  gap: 12px;
}

.index-item {
  display: grid;
  gap: 8px;
}

.index-item div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--teal-dark);
  font-weight: 800;
}

.index-item i {
  display: block;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #ebe6dc;
}

.index-item i::before {
  content: "";
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--yellow), var(--teal));
}

.strategy-list article {
  padding: 14px;
  border-radius: 8px;
  background: #eef5f1;
}

.strategy-list strong {
  display: block;
  margin-bottom: 6px;
  color: var(--teal-dark);
}

.warning {
  border-color: #efd0c7;
  background: #fff6f1;
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-bottom: 18px;
}

@media (min-width: 768px) {
  body {
    padding: 28px 0;
  }

  .app {
    min-height: calc(100vh - 56px);
    border-radius: 12px;
    overflow: hidden;
  }

  .screen {
    min-height: calc(100vh - 56px);
  }
}
