:root {
    --bg: #faf6f8;
    --panel: #ffffff;
    --text: #2a1e24;
    --muted: #8a7880;
    --line: #e8dde2;
    --soft: #f5edf1;
    --accent: #c4899e;
    --accent-strong: #a05d76;
    --shadow: 0 16px 40px rgba(73, 47, 60, 0.08);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, #fdf8fa 0, #faf6f8 36%, #f7f2f5 100%);
    color: var(--text);
    min-height: 100vh;
}

.shell {
    max-width: 980px;
    margin: 0 auto;
    padding: 24px 16px 56px;
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero {
    padding: 28px;
    margin-top: 20px;
    overflow: hidden;
    position: relative;
}

.hero::after {
    content: "";
    position: absolute;
    right: -60px;
    top: -60px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(196, 137, 158, 0.18), rgba(196, 137, 158, 0.02));
    pointer-events: none;
}

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

.hero h1 {
    font-size: clamp(28px, 5vw, 52px);
    line-height: 1.08;
    letter-spacing: -0.03em;
    max-width: 680px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--accent-strong);
    border: 1px solid var(--line);
    background: var(--soft);
    border-radius: 999px;
    padding: 8px 12px;
    margin-bottom: 16px;
}

.hero .sub {
    margin-top: 14px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.75;
    max-width: 720px;
}

.hero-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

.hero-pills span {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--soft);
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 700;
}

.hero-minimal {
    min-height: 48vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 42px 20px;
}

.hero-minimal::after {
    display: none;
}

.hero-minimal h1 {
    max-width: none;
    margin: 0;
}

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

.hero-actions-single {
    justify-content: center;
    margin-top: 28px;
}

button {
    border: 0;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
    font: inherit;
}

button:hover {
    transform: translateY(-1px);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

.btn-primary {
    background: var(--accent-strong);
    color: #fff;
    padding: 14px 20px;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(160, 93, 118, 0.18);
    font-weight: 700;
}

.btn-secondary {
    background: #fff;
    color: var(--accent-strong);
    padding: 14px 20px;
    border-radius: 14px;
    border: 1px solid var(--line);
    font-weight: 700;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

.test-wrap,
.result-wrap {
    margin-top: 22px;
    padding: 22px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.progress {
    flex: 1;
    min-width: 240px;
    height: 10px;
    background: #f0e6eb;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.progress > span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #d4a0b4, #a05d76);
    border-radius: inherit;
    transition: width .22s ease;
}

.progress-text {
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

.question-list {
    display: grid;
    gap: 16px;
}

.section-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 0;
}

.section-divider .divider-line {
    flex: 1;
    height: 1px;
    background: var(--line);
}

.section-divider .divider-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-strong);
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 14px;
    white-space: nowrap;
}

.question {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    background: linear-gradient(180deg, #ffffff, #fdfbfc);
}

.question-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 10px;
    background: var(--soft);
    border: 1px solid var(--line);
}

.question-title {
    font-size: 16px;
    line-height: 1.7;
    white-space: pre-wrap;
}

.options {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.option:hover {
    border-color: #d4aabb;
    background: #fdf8fa;
}

.option.selected {
    border-color: var(--accent-strong);
    background: var(--soft);
}

.option input {
    margin-top: 3px;
    accent-color: var(--accent-strong);
    transform: scale(1.1);
    flex-shrink: 0;
}

.option-code {
    font-weight: 800;
    color: var(--accent-strong);
    min-width: 22px;
}

.actions-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 6px;
}

.hint {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

/* Result */

.result-layout {
    display: grid;
    gap: 18px;
}

.result-top {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 18px;
    align-items: stretch;
}

.type-card-box {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 280px;
    overflow: hidden;
    position: relative;
    background:
        radial-gradient(circle at top right, rgba(196, 137, 158, 0.16), rgba(196, 137, 158, 0) 40%),
        linear-gradient(180deg, #ffffff, #fdf8fa);
}

.type-card-box::after {
    content: "";
    position: absolute;
    right: -46px;
    bottom: -46px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(196, 137, 158, 0.12), rgba(196, 137, 158, 0.01));
    pointer-events: none;
}

.type-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #fff;
    position: relative;
    z-index: 1;
}

.type-label-main {
    font-size: 18px;
    font-weight: 800;
    color: var(--accent-strong);
    text-align: center;
    position: relative;
    z-index: 1;
}

.type-label-sub {
    font-size: 13px;
    color: var(--muted);
    text-align: center;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.type-box,
.analysis-box,
.dim-box,
.note-box {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    background: linear-gradient(180deg, #ffffff, #fdfbfc);
}

.type-kicker {
    font-size: 12px;
    color: var(--accent-strong);
    margin-bottom: 8px;
    letter-spacing: .06em;
}

.type-name {
    font-size: clamp(24px, 4vw, 40px);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.type-subname {
    margin-top: 10px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
}

.match {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 8px 14px;
    background: var(--soft);
    border: 1px solid var(--line);
    color: var(--accent-strong);
    font-weight: 700;
    font-size: 13px;
    line-height: 1.4;
}

.analysis-box h3,
.dim-box h3,
.note-box h3 {
    font-size: 16px;
    margin-bottom: 12px;
}

.analysis-box p {
    margin: 0;
    color: #34282e;
    font-size: 15px;
    line-height: 1.9;
    white-space: pre-wrap;
}

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

.dim-item {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    background: #fff;
}

.dim-item-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.dim-item-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.dim-item-score {
    color: var(--accent-strong);
    font-weight: 800;
    font-size: 14px;
    white-space: nowrap;
}

.dim-bar-wrap {
    height: 8px;
    background: #f0e6eb;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 8px;
}

.dim-bar {
    height: 100%;
    background: linear-gradient(90deg, #d4a0b4, #a05d76);
    border-radius: inherit;
    transition: width .3s ease;
}

.dim-item p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
    white-space: pre-wrap;
}

.note-box p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
}

.result-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
}

@media (max-width: 860px) {
    .result-top {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .shell {
        padding: 14px 12px 42px;
    }

    .hero,
    .test-wrap,
    .result-wrap {
        padding: 16px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .question-title {
        font-size: 15px;
    }
}
