:root {
  --bg: #fbf6e9;
  --paper: rgba(255, 251, 242, 0.94);
  --paper-strong: rgba(255, 253, 248, 0.98);
  --ink: #342516;
  --muted: #6f5940;
  --line: rgba(111, 86, 47, 0.16);
  --line-strong: rgba(111, 86, 47, 0.26);
  --yellow: #f2c86b;
  --yellow-deep: #e2ad3f;
  --yellow-soft: #fff0bf;
  --orange: #eca65a;
  --shadow-lg: 0 24px 56px rgba(137, 106, 55, 0.12);
  --shadow-md: 0 14px 28px rgba(137, 106, 55, 0.08);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Baskerville", "Iowan Old Style", "Palatino Linotype",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", serif;
  background:
    radial-gradient(circle at 12% 10%, rgba(242, 200, 107, 0.26), transparent 20%),
    radial-gradient(circle at 90% 14%, rgba(255, 230, 162, 0.3), transparent 18%),
    linear-gradient(180deg, #fffaf0 0%, #f9f1dc 54%, #f5ead2 100%);
  overflow-x: hidden;
  touch-action: manipulation;
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(32px);
  z-index: 0;
}

body::before {
  top: -72px;
  right: -72px;
  width: 220px;
  height: 220px;
  background: rgba(255, 233, 162, 0.38);
}

body::after {
  left: -80px;
  bottom: 8%;
  width: 180px;
  height: 180px;
  background: rgba(242, 200, 107, 0.24);
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 32px;
}

.hero-card,
.assessment-card {
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: var(--paper);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg);
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 10px;
  align-items: center;
  padding: 20px 22px;
  border-radius: var(--radius-xl);
}

.eyebrow,
.question-index,
.result-kicker,
.share-eyebrow {
  margin: 0;
  font-family: "Avenir Next Condensed", "DIN Condensed", "PingFang SC",
    sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b4862b;
}

.hero-copy h1 {
  margin: 8px 0 0;
  font-size: clamp(2.15rem, 5.8vw, 4rem);
  line-height: 0.98;
}

.hero-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.hero-actions {
  margin-top: 16px;
}

.hero-art {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 9px;
}

.hero-otter {
  width: 112px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  filter: drop-shadow(0 18px 22px rgba(130, 98, 49, 0.14));
}

.hero-progress {
  width: 100%;
}

.home-app-card {
  grid-column: 1 / -1;
}

.assessment-card {
  margin-top: 16px;
  padding: 20px;
  border-radius: var(--radius-xl);
}

.progress-panel {
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--paper-strong);
  border: 1px solid var(--line);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.progress-bar {
  width: 100%;
  height: 10px;
  margin-top: 10px;
  border-radius: 999px;
  background: rgba(111, 86, 47, 0.08);
  overflow: hidden;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--yellow) 0%, var(--orange) 100%);
  transition: width 0.26s ease;
}

.question-panel,
.result-panel {
  margin-top: 0;
}

.question-index {
  font-size: 0.82rem;
}

.question-text {
  margin: 10px 0 0;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  line-height: 1.4;
}

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

.choice-grid.is-triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.primary-button,
.ghost-button {
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
}

.primary-button {
  background: linear-gradient(180deg, #f7cf78 0%, #e8b24b 100%);
  color: #5b4217;
  box-shadow: 0 14px 24px rgba(226, 173, 63, 0.28);
}

.ghost-button {
  background: rgba(255, 251, 243, 0.9);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.choice-button {
  min-height: 96px;
  padding: 16px 18px;
  text-align: left;
  border-radius: var(--radius-md);
  background: rgba(255, 252, 246, 0.96);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.choice-button strong {
  display: block;
  font-family: "PingFang SC", "Avenir Next", sans-serif;
  font-size: 1rem;
}

.choice-button span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.94rem;
}

.choice-button.is-selected {
  background: linear-gradient(180deg, #fff6d8 0%, #fff1c7 100%);
  border-color: rgba(226, 173, 63, 0.46);
  box-shadow: 0 16px 28px rgba(226, 173, 63, 0.18);
}

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

.primary-button:disabled,
.ghost-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.question-actions,
.result-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.is-hidden {
  display: none !important;
}

.share-card {
  padding: 20px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(255, 223, 142, 0.22), transparent 22%),
    linear-gradient(180deg, #fffefb 0%, #fff6e5 100%);
  border: 1px solid rgba(111, 86, 47, 0.12);
  box-shadow: 0 14px 26px rgba(111, 86, 47, 0.08);
}

.share-card-top {
  display: block;
}

.share-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.share-title {
  margin: 4px 0 0;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.08;
  color: #291a0f;
}

.share-title-block {
  min-width: 0;
}

.share-subtitle {
  margin: 8px 0 0;
  color: #584431;
  line-height: 1.5;
  font-size: 0.92rem;
  max-width: 28ch;
}

.share-qr-block {
  flex-shrink: 0;
  text-align: center;
}

.share-qr-image {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  background: #fffaf2;
  border: 1px solid rgba(111, 86, 47, 0.08);
}

.share-note {
  margin: 6px 0 0;
  color: #9a6b1f;
  font-size: 0.74rem;
  line-height: 1.25;
  font-weight: 600;
  white-space: nowrap;
}

.axis-pills {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.axis-pill {
  display: inline-flex;
  align-items: center;
  min-height: 35px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.98);
  border: 1px solid rgba(111, 86, 47, 0.2);
  color: #5a452f;
  font-size: 0.82rem;
  font-weight: 600;
}

.axis-pill-alt {
  background: rgba(255, 239, 205, 0.98);
}

.result-section-title {
  font-family: "Avenir Next Condensed", "DIN Condensed", "PingFang SC",
    sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #b4862b;
  font-size: 0.78rem;
}

.result-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}

.result-section-card {
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 252, 0.99);
  border: 1px solid rgba(111, 86, 47, 0.14);
  box-shadow: 0 6px 12px rgba(111, 86, 47, 0.04);
}

.result-section-text {
  margin: 8px 0 0;
  color: #493929;
  line-height: 1.58;
  font-size: 0.92rem;
}

.compact-list {
  margin: 8px 0 0;
  padding-left: 16px;
  color: #493929;
  line-height: 1.56;
  font-size: 0.93rem;
}

.compact-list li + li {
  margin-top: 4px;
}

.result-section-note {
  margin: 10px 0 0;
  color: #9a6b1f;
  line-height: 1.5;
  font-size: 0.84rem;
  font-weight: 600;
}

.app-promo {
  margin-top: 16px;
}

.download-card {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffefcb 0%, #ffe1aa 100%);
  border: 1px solid rgba(111, 86, 47, 0.13);
  color: #5d411c;
}

.download-main {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  justify-content: space-between;
}

.app-promo-main {
  justify-content: space-between;
  flex-wrap: wrap;
}

.app-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.18);
}

.download-card .app-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  box-shadow: 0 7px 12px rgba(0, 0, 0, 0.1);
}

.app-title {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: #4a3115;
}

.app-copy {
  margin: 2px 0 0;
  color: #6f5230;
  font-size: 0.72rem;
  white-space: nowrap;
  font-weight: 700;
}

.download-copy,
.app-promo-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  min-width: 0;
}

.app-open-button {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(180deg, #f5ca72 0%, #e4a93d 100%);
  color: #563d18;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 14px rgba(226, 173, 63, 0.16);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-app-open-button {
  margin-left: auto;
}

.app-open-button:hover {
  transform: translateY(-2px);
}

.app-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.app-shortcuts span {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 250, 239, 0.66);
  border: 1px solid rgba(111, 86, 47, 0.16);
  color: #6f5432;
  font-size: 0.68rem;
  line-height: 1.2;
}

.result-footnote {
  margin: 10px 0 0;
  color: rgba(95, 73, 50, 0.62);
  font-size: 0.73rem;
  text-align: center;
}

.primary-button:focus-visible,
.ghost-button:focus-visible,
.choice-button:focus-visible,
.app-open-button:focus-visible {
  outline: 3px solid rgba(242, 200, 107, 0.4);
  outline-offset: 2px;
}

@media (max-width: 820px) {
  .hero-card {
    grid-template-columns: 1fr;
  }

  .hero-art {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .page-shell {
    width: min(100% - 18px, 980px);
    padding-top: 10px;
    padding-bottom: 18px;
  }

  .hero-card,
  .assessment-card,
  .share-card {
    padding: 14px;
  }

  .hero-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-height: calc(100dvh - 20px);
  }

  .home-app-card {
    padding: 8px 10px;
  }

  .hero-otter {
    width: 84px;
  }

  .hero-copy h1 {
    font-size: 1.82rem;
  }

  .hero-subtitle {
    font-size: 0.8rem;
  }

  .hero-actions {
    margin-top: 10px;
  }

  .progress-panel {
    padding: 8px 9px;
  }

  .progress-meta {
    font-size: 0.82rem;
  }

  .progress-bar {
    height: 7px;
    margin-top: 7px;
  }

  .choice-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 16px;
  }

  .question-text {
    font-size: 1.18rem;
    line-height: 1.34;
  }

  .choice-button {
    min-height: 74px;
    padding: 12px 14px;
  }

  .choice-button strong {
    font-size: 0.94rem;
  }

  .choice-button span {
    margin-top: 6px;
    font-size: 0.82rem;
  }

  .question-actions,
  .result-actions {
    flex-direction: row;
    gap: 8px;
    margin-top: 14px;
  }

  .question-actions .primary-button,
  .question-actions .ghost-button,
  .result-actions .primary-button,
  .result-actions .ghost-button {
    min-height: 42px;
    padding: 0 14px;
    flex: 1;
  }

  .share-card {
    padding: 14px;
  }

  .share-title {
    font-size: 1.26rem;
  }

  .share-subtitle {
    max-width: none;
    font-size: 0.76rem;
    line-height: 1.38;
  }

  .share-title-row,
  .download-copy,
  .app-promo-copy,
  .app-promo-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .download-main {
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }

  .share-qr-block {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
  }

  .share-note {
    font-size: 0.67rem;
    max-width: none;
    white-space: nowrap;
  }

  .share-qr-image {
    width: 44px;
    height: 44px;
  }

  .axis-pills {
    gap: 5px;
  }

  .axis-pill {
    min-height: 31px;
    padding: 0 10px;
    font-size: 0.74rem;
  }

  .result-sections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
  }

  .result-section-card {
    padding: 10px 10px 9px;
    border-radius: 14px;
  }

  .result-section-title {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
  }

  .result-section-text {
    margin-top: 6px;
    font-size: 0.76rem;
    line-height: 1.36;
  }

  .compact-list {
    margin-top: 6px;
    padding-left: 14px;
    font-size: 0.74rem;
    line-height: 1.36;
  }

  .compact-list li + li {
    margin-top: 2px;
  }

  .result-section-note {
    margin-top: 7px;
    font-size: 0.72rem;
    line-height: 1.34;
  }

  .app-promo {
    padding: 8px 10px;
  }

  .app-promo-main {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .download-card .app-icon {
    width: 34px;
    height: 34px;
  }

  .app-title {
    font-size: 0.78rem;
  }

  .app-open-button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.76rem;
    margin-left: auto;
    flex-shrink: 0;
  }

  .app-copy {
    font-size: 0.64rem;
  }

  .home-app-open-button {
    margin-left: 0;
  }

  .primary-button,
  .ghost-button {
    width: auto;
  }
}
