:root {
    --bg: #f4efe6;
    --panel: rgba(255, 250, 242, 0.92);
    --panel-strong: #fff8ef;
    --ink: #1f1b17;
    --muted: #6a5c51;
    --line: rgba(110, 83, 55, 0.14);
    --gold: #c67a1a;
    --wine: #8f2d1b;
    --green: #3d6b4f;
    --blue: #315c8a;
    --shadow: 0 24px 60px rgba(71, 42, 15, 0.14);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(198, 122, 26, 0.24), transparent 32%),
        radial-gradient(circle at bottom right, rgba(49, 92, 138, 0.22), transparent 28%),
        linear-gradient(160deg, #f9f4ec 0%, #efe4d6 55%, #eadbc8 100%);
}

.page-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 18px 48px;
}

.page-shell--desktop-centered {
    max-width: 1120px;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 28px 24px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(255, 248, 239, 0.96), rgba(248, 237, 219, 0.92)),
        #fff;
    box-shadow: var(--shadow);
}

.hero--desktop-compact {
    max-width: 780px;
    margin: 0 auto;
    padding: 22px 24px;
}

.hero::after {
    content: "";
    position: absolute;
    top: -32px;
    right: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(198, 122, 26, 0.28), transparent 68%);
}

.hero h1,
.panel h2,
.question-card h3,
.result-copy h3,
.share-card__header h3 {
    margin: 0;
    font-family: "STZhongsong", "Songti SC", "Noto Serif SC", serif;
    letter-spacing: 0.02em;
}

.hero h1 {
    margin-top: 8px;
    font-size: clamp(2rem, 4vw, 3.4rem);
}

.hero__eyebrow,
.panel__label,
.question-card__tag,
.share-card__brand {
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--wine);
}

.hero__lead,
.aside-copy,
.question-card__tip,
.result-copy p,
.share-card__summary,
.share-card__qr p {
    line-height: 1.72;
    color: var(--muted);
}

.hero__lead {
    max-width: 36rem;
    margin: 12px 0 0;
}

.hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.hero__chips span,
.share-card__badge {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(143, 45, 27, 0.08);
    color: var(--wine);
    font-size: 0.92rem;
}

.page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: 22px;
    margin-top: 22px;
}

.page-grid--desktop-centered {
    max-width: 980px;
    margin: 22px auto 0;
}

.page-grid--quiz-only {
    grid-template-columns: minmax(0, 760px);
    justify-content: center;
}

.page-grid.result-mode {
    grid-template-columns: minmax(0, 1fr);
}

.page-grid.result-mode .panel--secondary {
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
}

.panel {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.is-hidden {
    display: none !important;
}

.panel--primary,
.panel--secondary {
    padding: 22px;
}

.page-grid--quiz-only .panel--primary {
    width: 100%;
    margin: 0 auto;
}

.panel__top,
.progress__meta,
.share-card__header,
.share-card__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.ghost-button {
    border: 1px solid rgba(49, 92, 138, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    padding: 10px 16px;
    font-size: 0.95rem;
    color: var(--blue);
    cursor: pointer;
}

.progress {
    margin-top: 20px;
}

.progress__bar {
    height: 10px;
    border-radius: 999px;
    background: rgba(49, 92, 138, 0.1);
    overflow: hidden;
}

.progress__fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--blue), var(--gold));
    transition: width 0.28s ease;
}

.progress__meta {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.95rem;
}

.question-card {
    margin-top: 22px;
    padding: 22px;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(251, 244, 234, 0.9));
    border: 1px solid rgba(110, 83, 55, 0.1);
}

.question-card h3 {
    margin-top: 10px;
    font-size: clamp(1.4rem, 2.8vw, 2rem);
}

.options {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.option-button {
    width: 100%;
    border: 1px solid rgba(49, 92, 138, 0.12);
    border-radius: 20px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.78);
    text-align: left;
    color: var(--ink);
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.option-button:hover,
.option-button:focus-visible {
    outline: none;
    transform: translateY(-2px);
    border-color: rgba(198, 122, 26, 0.48);
    box-shadow: 0 14px 24px rgba(71, 42, 15, 0.1);
}

.option-button__index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-bottom: 10px;
    border-radius: 50%;
    background: rgba(198, 122, 26, 0.12);
    color: var(--gold);
    font-weight: 700;
}

.option-button__text {
    display: block;
    font-size: 1rem;
    line-height: 1.65;
}

.share-card {
    position: relative;
    overflow: hidden;
    margin-top: 18px;
    padding: 22px;
    border-radius: 28px;
    background:
        linear-gradient(160deg, rgba(32, 37, 43, 0.96), rgba(83, 44, 21, 0.94));
    color: #f8f0e5;
}

.share-card__glow {
    position: absolute;
    inset: auto -40px -50px auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(198, 122, 26, 0.34), transparent 70%);
}

.share-card__badge {
    background: rgba(255, 255, 255, 0.14);
    color: #fff3df;
}

.share-card__headline {
    position: relative;
    margin: 20px 0 18px;
    font-size: 1.35rem;
    line-height: 1.6;
    color: #fff7eb;
}

.share-card__body {
    align-items: stretch;
}

.share-card__left {
    flex: 1;
}

.share-card__qr {
    width: 128px;
    min-width: 128px;
    text-align: center;
}

.share-card__qr img {
    display: block;
    width: 100%;
    border-radius: 14px;
    background: #fff;
    padding: 8px;
}

.share-card__qr-copy {
    margin: 14px 0 0;
    display: grid;
    gap: 4px;
    line-height: 1.45;
    color: rgba(248, 240, 229, 0.78);
}

.share-card__qr-copy span {
    display: block;
}

.share-card__qr-copy span:first-child {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff3df;
}

.share-card__qr-copy span:last-child {
    font-size: 0.88rem;
    color: rgba(248, 240, 229, 0.66);
}

.dna-bars {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.dna-bar__row {
    display: grid;
    grid-template-columns: 86px 1fr 42px;
    align-items: center;
    gap: 10px;
}

.dna-bar__track {
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.14);
}

.dna-bar__fill {
    height: 100%;
    border-radius: inherit;
}

.result-copy {
    margin-top: 18px;
}

.result-copy__warning {
    margin-top: 12px;
    padding: 12px 14px;
    border-left: 3px solid var(--gold);
    background: rgba(198, 122, 26, 0.08);
    border-radius: 12px;
}

@media (max-width: 900px) {
    .page-shell--desktop-centered,
    .hero--desktop-compact,
    .page-grid--desktop-centered {
        max-width: none;
    }

    .page-grid {
        grid-template-columns: 1fr;
    }

    .page-grid.result-mode .panel--secondary {
        max-width: none;
        margin: 0;
    }
}

@media (min-width: 901px) {
    .hero--desktop-compact h1 {
        font-size: clamp(2.7rem, 3.4vw, 3.3rem);
    }

    .hero--desktop-compact::after {
        top: -56px;
        right: -46px;
        width: 132px;
        height: 132px;
    }

    .hero--desktop-compact .hero__eyebrow {
        font-size: 0.82rem;
    }

    .hero--desktop-compact .hero__lead {
        font-size: 0.98rem;
    }

    .page-grid--desktop-centered .panel--primary {
        min-width: 0;
    }
}

@media (max-width: 640px) {
    .page-shell {
        padding: 18px 12px 36px;
    }

    .hero,
    .panel--primary,
    .panel--secondary,
    .question-card,
    .share-card {
        border-radius: 22px;
    }

    .panel__top,
    .progress__meta,
    .share-card__header,
    .share-card__body {
        flex-direction: column;
        align-items: flex-start;
    }

    .share-card__qr {
        width: 112px;
        min-width: 112px;
    }

    .share-card__qr-copy {
        margin-top: 10px;
        gap: 2px;
    }

    .share-card__qr-copy span:first-child {
        font-size: 0.9rem;
    }

    .share-card__qr-copy span:last-child {
        font-size: 0.82rem;
    }

    .dna-bar__row {
        grid-template-columns: 72px 1fr 38px;
    }
}
