:root {
  --bg: #f4f7fb;
  --card: rgba(255, 255, 255, 0.94);
  --text: #25201d;
  --muted: #766d66;
  --line: #dfe6ed;
  --accent: #e85f4f;
  --accent-dark: #c93f31;
  --gold: #f5b64b;
  --mint: #8fc7b5;
  --blue: #7da6d9;
  --shadow: 0 22px 60px rgba(42, 63, 87, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    linear-gradient(135deg, rgba(245, 182, 75, 0.16), transparent 32%),
    linear-gradient(315deg, rgba(125, 166, 217, 0.2), transparent 34%),
    var(--bg);
}

button {
  font: inherit;
}

.app-shell {
  width: min(100%, 520px);
  min-height: calc(100vh - 44px);
  margin: 0 auto;
  padding: 28px 18px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screen {
  display: none;
  width: 100%;
}

.screen.is-active {
  display: block;
}

.card {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-card {
  padding: 26px 22px 24px;
  text-align: center;
}

.city-visual {
  position: relative;
  height: 164px;
  margin-bottom: 14px;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #fff4de 0%, #f8ddd1 50%, #d9eee8 100%);
}

.sun {
  position: absolute;
  top: 23px;
  right: 60px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 12px rgba(245, 182, 75, 0.18);
}

.tower {
  position: absolute;
  bottom: 0;
  display: block;
  width: 56px;
  border-radius: 8px 8px 0 0;
  background: #304957;
}

.tower::before,
.tower::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  height: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

.tower::before {
  top: 22px;
}

.tower::after {
  top: 48px;
}

.tower-a {
  left: 62px;
  height: 96px;
  background: #42677a;
}

.tower-b {
  left: 142px;
  height: 126px;
  background: #2e3f52;
}

.tower-c {
  right: 72px;
  height: 76px;
  background: #5b7f73;
}

.city-chip {
  position: absolute;
  padding: 7px 10px;
  border-radius: 999px;
  color: #47362c;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 18px rgba(58, 45, 35, 0.1);
}

.chip-a {
  left: 18px;
  top: 28px;
}

.chip-b {
  right: 22px;
  bottom: 26px;
}

.chip-c {
  left: 28px;
  bottom: 22px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

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

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

.subtitle {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.primary-btn,
.secondary-btn,
.option-btn {
  border: 0;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary-btn {
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  border-radius: 16px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 14px 26px rgba(232, 95, 79, 0.28);
}

.secondary-btn {
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  font-weight: 800;
  background: #fbfdff;
}

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

.quiz-card,
.result-card {
  padding: 22px;
}

.quiz-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.progress-bar {
  height: 9px;
  margin-bottom: 24px;
  overflow: hidden;
  border-radius: 999px;
  background: #dde7ef;
}

.progress-bar span {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: width 0.28s ease;
}

.question-panel {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.question-panel.is-fading {
  opacity: 0;
  transform: translateY(8px);
}

.question-panel h2 {
  margin-bottom: 18px;
  font-size: 23px;
  line-height: 1.42;
  letter-spacing: 0;
}

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

.option-btn {
  width: 100%;
  min-height: 58px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  line-height: 1.45;
  text-align: left;
  background: #fbfdff;
}

.option-btn:hover,
.option-btn.is-selected {
  border-color: rgba(232, 95, 79, 0.44);
  background: #fff0ea;
  box-shadow: 0 10px 22px rgba(119, 79, 55, 0.1);
}

.result-card {
  position: relative;
  overflow: hidden;
}

.result-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 9px;
  background: linear-gradient(90deg, var(--accent), var(--gold), var(--mint), var(--blue));
}

.result-label {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

#resultCity {
  margin-bottom: 12px;
  font-size: 42px;
  line-height: 1.1;
  letter-spacing: 0;
}

.match-row {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 16px;
  padding: 9px 13px;
  border-radius: 999px;
  color: #7d392f;
  font-weight: 800;
  background: #fff0ea;
}

.match-row span:first-child {
  font-size: 28px;
}

.result-intro {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.info-block {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.muted-block {
  background: #f8fbf8;
}

.info-block h3,
.alternatives h3 {
  margin-bottom: 10px;
  font-size: 16px;
}

ul {
  margin: 0;
  padding-left: 20px;
}

li {
  margin: 8px 0;
  color: #4c433d;
  line-height: 1.55;
}

.alternatives {
  margin-top: 18px;
}

.alt-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.alt-pill {
  padding: 9px 12px;
  border-radius: 999px;
  color: #3f3832;
  font-size: 14px;
  font-weight: 800;
  background: #eef7f4;
}

.action-row {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.share-text {
  display: none;
  width: 100%;
  min-height: 132px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  line-height: 1.6;
  resize: vertical;
  background: #fbfdff;
}

.share-text.is-visible {
  display: block;
}

.copy-hint {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

footer {
  min-height: 44px;
  padding: 0 16px 18px;
  color: rgba(37, 32, 29, 0.5);
  font-size: 12px;
  text-align: center;
}

@media (min-width: 560px) {
  .app-shell {
    padding-top: 46px;
  }

  .hero-card,
  .quiz-card,
  .result-card {
    padding: 30px;
  }

  h1 {
    font-size: 38px;
  }

  .action-row {
    grid-template-columns: 1fr 1fr;
  }
}
