:root {
    color-scheme: dark;
    --bg: #0c0912;
    --bg-2: #120d1d;
    --panel: rgba(27, 21, 42, .82);
    --panel-strong: rgba(38, 29, 59, .96);
    --line: rgba(255, 255, 255, .11);
    --text: #f7f1ff;
    --muted: #b9acc7;
    --muted-2: #8f819e;
    --accent: #f6b94b;
    --accent-2: #ff4f8b;
    --accent-3: #8a7cff;
    --danger: #ff6b85;
    --success: #83f1b2;
    --shadow: 0 24px 80px rgba(0, 0, 0, .45);
    --radius: 28px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255, 79, 139, .24), transparent 32rem),
        radial-gradient(circle at 85% 15%, rgba(138, 124, 255, .26), transparent 28rem),
        linear-gradient(160deg, var(--bg), var(--bg-2) 52%, #09070d);
    color: var(--text);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.85), transparent 78%);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

code {
    padding: .12rem .4rem;
    border: 1px solid var(--line);
    border-radius: .5rem;
    background: rgba(255,255,255,.06);
    color: #fff8d7;
}

.site-shell {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 48px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(14, 10, 22, .72);
    backdrop-filter: blur(18px);
    box-shadow: 0 14px 44px rgba(0,0,0,.24);
}

.brand,
.nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand {
    min-width: 0;
    padding-right: 12px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #190d18;
    font-size: .8rem;
    box-shadow: 0 10px 24px rgba(246, 185, 75, .23);
}

.nav a {
    padding: .75rem 1rem;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--muted);
}

.nav a:hover,
.nav a:focus-visible {
    border-color: var(--line);
    background: rgba(255,255,255,.06);
    color: var(--text);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr);
    gap: 22px;
    align-items: stretch;
}

.hero-card,
.panel,
.info-card,
.question-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.035));
    box-shadow: var(--shadow);
}

.hero-copy {
    padding: clamp(28px, 6vw, 70px);
    overflow: hidden;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: 18px;
    padding: .45rem .75rem;
    border: 1px solid rgba(246,185,75,.32);
    border-radius: 999px;
    background: rgba(246,185,75,.08);
    color: #ffe0a1;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

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

h1 {
    margin-bottom: 18px;
    font-size: clamp(2.4rem, 7vw, 5.8rem);
    line-height: .92;
    letter-spacing: -.08em;
}

h2 {
    margin-bottom: 12px;
    font-size: clamp(1.45rem, 3vw, 2.2rem);
    line-height: 1.05;
    letter-spacing: -.04em;
}

.lead {
    max-width: 62ch;
    color: var(--muted);
    font-size: clamp(1rem, 2.1vw, 1.22rem);
    line-height: 1.75;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: .85rem 1.2rem;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 850;
    letter-spacing: -.01em;
    transition: transform .18s ease, border-color .18s ease, background .18s ease, opacity .18s ease;
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-1px);
}

.btn:disabled {
    cursor: wait;
    opacity: .72;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #180b16;
    box-shadow: 0 14px 34px rgba(255, 79, 139, .22);
}

.btn-ghost {
    border-color: var(--line);
    background: rgba(255,255,255,.06);
    color: var(--text);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
    border-color: rgba(255,255,255,.24);
    background: rgba(255,255,255,.1);
}

.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 34px;
}

.trust-row span {
    padding: .5rem .75rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255,255,255,.045);
    color: var(--muted);
    font-size: .9rem;
}

.mascot-card {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 520px;
    overflow: hidden;
    padding: 28px;
}

.orb {
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.22), rgba(246,185,75,.2), rgba(255,79,139,.12) 55%, transparent 70%);
    filter: blur(1px);
}

.mascot-img {
    position: relative;
    width: min(100%, 420px);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 38px;
    transform: rotate(-2deg);
    box-shadow: 0 24px 70px rgba(0,0,0,.5);
}

.mascot-badge {
    position: absolute;
    left: 26px;
    right: 26px;
    bottom: 26px;
    padding: .9rem 1rem;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 18px;
    background: rgba(10, 8, 16, .76);
    color: #fff4cf;
    text-align: center;
    backdrop-filter: blur(12px);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.info-card,
.panel {
    padding: 26px;
}

.info-card p,
.panel p {
    color: var(--muted);
    line-height: 1.7;
}

.narrow {
    width: min(880px, 100%);
    margin: 0 auto;
}

.page-heading {
    margin-bottom: 16px;
}

.page-heading h1 {
    font-size: clamp(2.1rem, 6vw, 4.2rem);
}

.flash-stack {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.flash,
.alert {
    padding: 1rem 1.15rem;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 18px;
    background: rgba(255,255,255,.07);
    color: var(--text);
}

.flash-error,
.alert {
    border-color: rgba(255, 107, 133, .35);
    background: rgba(255, 107, 133, .1);
}

.quiz-form {
    display: grid;
    gap: 16px;
}

.nickname-panel {
    display: grid;
    gap: 10px;
}

.nickname-panel label,
.share-box label {
    color: var(--text);
    font-weight: 850;
}

.nickname-panel label span {
    color: var(--muted-2);
    font-weight: 650;
}

input[type="text"],
input:not([type]),
.share-box input,
.nickname-panel input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.07);
    color: var(--text);
    outline: none;
    padding: 1rem 1rem;
}

input:focus-visible {
    border-color: rgba(246,185,75,.75);
    box-shadow: 0 0 0 4px rgba(246,185,75,.12);
}

.question-card {
    padding: 0;
    overflow: hidden;
}

.question-card legend {
    display: flex;
    gap: 12px;
    width: 100%;
    padding: 22px 22px 18px;
    font-size: 1.08rem;
    font-weight: 850;
    line-height: 1.45;
}

.q-number {
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(246,185,75,.12);
    color: #ffe0a1;
    font-size: .95rem;
}

.answers {
    display: grid;
    gap: 1px;
    border-top: 1px solid var(--line);
    background: var(--line);
}

.answer-option {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(17, 13, 26, .72);
    cursor: pointer;
    color: var(--muted);
    transition: background .16s ease, color .16s ease;
}

.answer-option:hover,
.answer-option:has(input:focus-visible) {
    background: rgba(255,255,255,.07);
    color: var(--text);
}

.answer-option:has(input:checked) {
    background: linear-gradient(90deg, rgba(246,185,75,.16), rgba(255,79,139,.1));
    color: var(--text);
}

.answer-option input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.answer-letter {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: #ffe0a1;
    font-weight: 900;
}

.sticky-submit {
    position: sticky;
    bottom: 16px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 11, 24, .88);
    backdrop-filter: blur(16px);
    box-shadow: 0 18px 56px rgba(0,0,0,.34);
}

.sticky-submit p {
    margin: 0;
    color: var(--muted-2);
    font-size: .9rem;
}

.result-wrap {
    display: grid;
    place-items: center;
    min-height: 62vh;
}

.result-card {
    width: min(760px, 100%);
    text-align: center;
}

.result-card h1 {
    font-size: clamp(2rem, 5vw, 4.2rem);
    line-height: 1.02;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.meter {
    display: grid;
    place-items: center;
    margin: 12px 0 24px;
}

.meter-ring {
    position: relative;
    width: 220px;
    height: 220px;
}

.meter-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    overflow: visible;
}

.meter-ring circle {
    fill: none;
    stroke-linecap: round;
    stroke-width: 10;
}

.meter-bg {
    stroke: rgba(255,255,255,.11);
}

.meter-fg {
    stroke: url(#meterGradient);
}

.meter-ring svg .meter-fg {
    stroke: #f6b94b;
    filter: drop-shadow(0 0 10px rgba(246,185,75,.35));
}

.meter-ring span {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 3.3rem;
    font-weight: 950;
    letter-spacing: -.08em;
}

.result-card h2 {
    color: #ffe0a1;
}

.result-comment {
    max-width: 58ch;
    margin: 0 auto 24px;
    color: var(--muted);
    font-size: 1.06rem;
    line-height: 1.7;
}

.result-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 24px 0;
}

.result-meta div {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.05);
    text-align: left;
}

.result-meta dt {
    color: var(--muted-2);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.result-meta dd {
    margin: 4px 0 0;
    color: var(--text);
    font-weight: 850;
}

.share-box {
    display: grid;
    gap: 10px;
    text-align: left;
}

.copy-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.make-yours {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid rgba(246,185,75,.34);
    border-left-width: 5px;
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(246,185,75,.13), rgba(255,79,139,.08)),
        rgba(255,255,255,.055);
    text-align: left;
    box-shadow: 0 18px 48px rgba(0,0,0,.18);
}

.make-yours-kicker {
    margin: 0 0 4px;
    color: #ffe0a1;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.make-yours h3 {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.15rem, 2.2vw, 1.55rem);
    line-height: 1.15;
}

.make-yours p:last-child {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.make-yours .btn {
    white-space: nowrap;
}

.site-footer {
    margin-top: 32px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    color: var(--muted-2);
    font-size: .9rem;
    text-align: center;
}

.site-footer p {
    margin: .3rem 0;
}

.error-panel {
    text-align: center;
}

.error-panel .btn {
    margin-top: 14px;
}

@media (max-width: 860px) {
    .hero-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .mascot-card {
        min-height: 420px;
    }

    .nav {
        display: none;
    }

    .topbar {
        border-radius: 24px;
    }

    .sticky-submit,
    .copy-row {
        grid-template-columns: 1fr;
        display: grid;
    }
}

@media (max-width: 560px) {
    .site-shell {
        width: min(100% - 20px, 1180px);
        padding-top: 10px;
    }

    .hero-copy,
    .info-card,
    .panel {
        padding: 20px;
    }

    .question-card legend {
        padding: 18px;
    }

    .answer-option {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 10px;
        padding: 15px;
    }

    .answer-option input {
        grid-row: span 2;
    }

    .answer-letter {
        width: 28px;
        height: 28px;
    }

    .result-meta {
        grid-template-columns: 1fr;
    }

    .copy-row,
    .make-yours {
        grid-template-columns: 1fr;
    }

    .make-yours .btn {
        width: 100%;
        white-space: normal;
    }

    .meter-ring {
        width: 180px;
        height: 180px;
    }

    .meter-ring span {
        font-size: 2.8rem;
    }
}
